diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..f96575f --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +*.txt -crlf diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b6c5584 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +bin +link.txt diff --git a/README.md b/README.md new file mode 100644 index 0000000..8def06b --- /dev/null +++ b/README.md @@ -0,0 +1,50 @@ +# Origins +**pico-c** is a project created by Zik at [https://code.google.com/p/picoc](https://code.google.com/p/picoc/ "Google code"). +The projet is now hosted at [https://gitlab.com/zsaleeba/picoc](https://gitlab.com/zsaleeba/picoc/ "Github.com"). + +**pico-c** intends to be a very light **C** interpreter. **pico-c** is very small, but include many standard libraries. + +# The content +Initially those libraries were natively integrated into pico-c: + +* ctype.h +* errno.h +* math.h +* stdbool.h +* stdio.h +* stdlib.h +* string.h +* time.h +* unistd.h + +Some of them were improved: + +* stdio.h +* unistd.h + +We have planned to add support for 3 other useful libraries: + +* dirent.h +* regex.h +* socket.h +* stat.h + +# The pico-c syntax + +``` +$ pico-c -h +pico-c.exe, A very small C interpreter +Usage: pico-c.exe [-h] [-i] [-m] [-n] [-o] [...] [- ...] + -h: this help message + -i: force interactive mode at the end of scripts + -m: run main() function automaticaly + -n: don't print prompt + -o: the original "old" mode + -v: print version +Exemples: + pico-c.exe script1.pcc script2.pcc + pico-c.exe -i script.pcc + pico-c.exe -m script1.pcc script2.pcc - arg1 agr2} +``` + +**Cyd** diff --git a/src/Makefile b/src/Makefile new file mode 100644 index 0000000..2e393f5 --- /dev/null +++ b/src/Makefile @@ -0,0 +1,76 @@ +CC=gcc +CFLAGS=-Wall -pedantic -g -DUNIX_HOST -DVER=\"2.1\" -DPERSOPORT +LIBS=-lm -lreadline + +TARGET = picoc +SRCS = picoc.c table.c lex.c parse.c expression.c heap.c type.c \ + variable.c clibrary.c platform.c include.c debug.c \ + platform/platform_unix.c platform/library_unix.c \ + cstdlib/stdio.c cstdlib/math.c cstdlib/string.c cstdlib/stdlib.c \ + cstdlib/time.c cstdlib/errno.c cstdlib/ctype.c cstdlib/stdbool.c \ + cstdlib2/main.o cstdlib2/types.o cstdlib2/stat.o cstdlib2/dirent.o cstdlib2/popen.o cstdlib2/tools_h.o cstdlib2/various.o cstdlib2/regex.o cstdlib2/socket.o \ + cstdlib/unistd.c +OBJS := $(SRCS:%.c=%.o) + +all: $(TARGET) + +$(TARGET): $(OBJS) + $(CC) $(CFLAGS) -o $(TARGET) $(OBJS) $(LIBS) + +test: all + (cd tests; make test) + +clean: + rm -f $(TARGET) $(OBJS) *~ *.o + +count: + @echo "Core:" + @cat picoc.h interpreter.h picoc.c table.c lex.c parse.c expression.c platform.c heap.c type.c variable.c include.c debug.c | grep -v '^[ ]*/\*' | grep -v '^[ ]*$$' | wc + @echo "" + @echo "Everything:" + @cat $(SRCS) *.h */*.h | wc + +.PHONY: clibrary.c + +picoc.o: picoc.c picoc.h +table.o: table.c interpreter.h platform.h +lex.o: lex.c interpreter.h platform.h +parse.o: parse.c picoc.h interpreter.h platform.h +expression.o: expression.c interpreter.h platform.h +heap.o: heap.c interpreter.h platform.h +type.o: type.c interpreter.h platform.h +variable.o: variable.c interpreter.h platform.h +clibrary.o: clibrary.c picoc.h interpreter.h platform.h +platform.o: platform.c picoc.h interpreter.h platform.h +include.o: include.c picoc.h interpreter.h platform.h +debug.o: debug.c interpreter.h platform.h +platform/platform_unix.o: platform/platform_unix.c picoc.h interpreter.h platform.h +platform/library_unix.o: platform/library_unix.c interpreter.h platform.h +cstdlib/stdio.o: cstdlib/stdio.c interpreter.h platform.h +cstdlib/math.o: cstdlib/math.c interpreter.h platform.h +cstdlib/string.o: cstdlib/string.c interpreter.h platform.h +cstdlib/stdlib.o: cstdlib/stdlib.c interpreter.h platform.h +cstdlib/time.o: cstdlib/time.c interpreter.h platform.h +cstdlib/errno.o: cstdlib/errno.c interpreter.h platform.h +cstdlib/ctype.o: cstdlib/ctype.c interpreter.h platform.h +cstdlib/stdbool.o: cstdlib/stdbool.c interpreter.h platform.h +cstdlib/unistd.o: cstdlib/unistd.c interpreter.h platform.h + +# Ajout PERSOPORT +cstdlib2/build.h: + printf "#define BUILD_TIME \""`date +'%d/%m/%Y-%H:%M:%S'`"\"\n" > cstdlib2/build.h +cstdlib2/main.o: cstdlib2/main.c cstdlib2/build.h +cstdlib2/tools.o: cstdlib2/tools.c cstdlib2/tools.h +cstdlib2/tools_h.o: cstdlib2/tools_h.c cstdlib2/tools.c cstdlib2/tools.h cstdlib2/bc_eval.c cstdlib2/base64.c cstdlib2/md5.c cstdlib2/bcrypt.c cstdlib2/mini_h.c interpreter.h platform.h +cstdlib2/dirent.o: cstdlib2/dirent.c +cstdlib2/popen.o: cstdlib2/popen.c +cstdlib2/types.o: cstdlib2/types.c +cstdlib2/stat.o: cstdlib2/stat.c +cstdlib2/various.o: cstdlib2/various.c +cstdlib2/regex.o: cstdlib2/regex.c cstdlib2/regex.h +cstdlib2/socket.o: cstdlib2/socket.c + +CP = cp + +pcc: $(TARGET) + $(CP) $(TARGET) pcc diff --git a/src/Makefile.win32 b/src/Makefile.win32 new file mode 100644 index 0000000..96a5399 --- /dev/null +++ b/src/Makefile.win32 @@ -0,0 +1,87 @@ +CC=gcc +CFLAGS=-Wall -pedantic -g -DWIN32 -DVER=\"2.1\" -I. -DPERSOPORT +#LIBS=-lm -lwsock32 -lgettextlib libs/win32/libregex.a +LIBS=-lm -lws2_32 -lole32 -luuid -lregex -Llibs/win32 -static -static-libgcc -static-libstdc++ + +TARGET = picoc +SRCS = picoc.c table.c lex.c parse.c expression.c heap.c type.c \ + variable.c clibrary.c platform.c include.c debug.c \ + platform/platform_win32.c platform/library_win32.c \ + cstdlib/stdio.c cstdlib/math.c cstdlib/string.c cstdlib/stdlib.c \ + cstdlib/time.c cstdlib/errno.c cstdlib/ctype.c cstdlib/stdbool.c \ + cstdlib2/main.o cstdlib2/types.o cstdlib2/stat.o cstdlib2/dirent.o cstdlib2/popen.o cstdlib2/tools_h.o cstdlib2/various.o cstdlib2/regex.o cstdlib2/socket.o cstdlib2/win.o picoc.res.o \ + cstdlib/unistd.c +OBJS := $(SRCS:%.c=%.o) + +all: $(TARGET) + +$(TARGET): $(OBJS) + $(CC) $(CFLAGS) -o $(TARGET) $(OBJS) $(LIBS) + +test: all + (cd tests; make test) + +clean: + rm -f $(TARGET) $(OBJS) *~ + +count: + @echo "Core:" + @cat picoc.h interpreter.h picoc.c table.c lex.c parse.c expression.c platform.c heap.c type.c variable.c include.c debug.c | grep -v '^[ ]*/\*' | grep -v '^[ ]*$$' | wc + @echo "" + @echo "Everything:" + @cat $(SRCS) *.h */*.h | wc + +.PHONY: clibrary.c + +picoc.o: picoc.c picoc.h +table.o: table.c interpreter.h platform.h +lex.o: lex.c interpreter.h platform.h +parse.o: parse.c picoc.h interpreter.h platform.h +expression.o: expression.c interpreter.h platform.h +heap.o: heap.c interpreter.h platform.h +type.o: type.c interpreter.h platform.h +variable.o: variable.c interpreter.h platform.h +clibrary.o: clibrary.c picoc.h interpreter.h platform.h +platform.o: platform.c picoc.h interpreter.h platform.h +include.o: include.c picoc.h interpreter.h platform.h +debug.o: debug.c interpreter.h platform.h +platform/platform_win32.o: platform/platform_win32.c picoc.h interpreter.h platform.h +platform/library_win32.o: platform/library_win32.c interpreter.h platform.h +cstdlib/stdio.o: cstdlib/stdio.c interpreter.h platform.h +cstdlib/math.o: cstdlib/math.c interpreter.h platform.h +cstdlib/string.o: cstdlib/string.c interpreter.h platform.h +cstdlib/stdlib.o: cstdlib/stdlib.c interpreter.h platform.h +cstdlib/time.o: cstdlib/time.c interpreter.h platform.h +cstdlib/errno.o: cstdlib/errno.c interpreter.h platform.h +cstdlib/ctype.o: cstdlib/ctype.c interpreter.h platform.h +cstdlib/stdbool.o: cstdlib/stdbool.c interpreter.h platform.h +cstdlib/unistd.o: cstdlib/unistd.c interpreter.h platform.h + +# Ajout PERSOPORT +cstdlib2/build.h: + printf "#define BUILD_TIME \""`date +'%d/%m/%Y-%H:%M:%S'`"\"\n" > cstdlib2/build.h +cstdlib2/main.o: cstdlib2/main.c cstdlib2/build.h +cstdlib2/tools.o: cstdlib2/tools.c cstdlib2/tools.h +cstdlib2/tools_h.o: cstdlib2/tools_h.c cstdlib2/tools.c cstdlib2/tools.h cstdlib2/bc_eval.c cstdlib2/base64.c cstdlib2/md5.c cstdlib2/bcrypt.c cstdlib2/mini_h.c interpreter.h platform.h +cstdlib2/dirent.o: cstdlib2/dirent.c +cstdlib2/popen.o: cstdlib2/popen.c +cstdlib2/types.o: cstdlib2/types.c +cstdlib2/stat.o: cstdlib2/stat.c +cstdlib2/various.o: cstdlib2/various.c +cstdlib2/regex.o: cstdlib2/regex.c cstdlib2/regex.h +cstdlib2/socket.o: cstdlib2/socket.c +cstdlib2/win.o: cstdlib2/win.c cstdlib2/rundll.c + +picoc.res.o: cstdlib2/picoc.rc + windres cstdlib2/picoc.rc picoc.res.o + +CP = cp + +pcc: $(TARGET) + $(CP) $(TARGET) pcc.exe + +UPX = upx -9 + +upx: $(TARGET) pcc + $(UPX) $(TARGET).exe pcc.exe + diff --git a/src/README b/src/README new file mode 100644 index 0000000..18779d3 --- /dev/null +++ b/src/README @@ -0,0 +1,91 @@ +picoc +----- + +PicoC is a very small C interpreter for scripting. It was originally written +as a script language for a UAV's on-board flight system. It's also very +suitable for other robotic, embedded and non-embedded applications. + +The core C source code is around 3500 lines of code. It's not intended to be +a complete implementation of ISO C but it has all the essentials. When +compiled it only takes a few k of code space and is also very sparing of +data space. This means it can work well in small embedded devices. It's also +a fun example of how to create a very small language implementation while +still keeping the code readable. + +picoc is now feature frozen. Since it's important that it remain small it's +intended that no more major features will be added from now on. It's been +tested on x86-32, x86-64, powerpc, arm, ultrasparc, HP-PA and blackfin +processors and is easy to port to new targets. + + +Compiling picoc +--------------- + +picoc can be compiled for a UNIX/Linux/POSIX host by typing "make". + +The test suite can be run by typing "make test". + + +Porting picoc +------------- + +platform.h is where you select your platform type and specify the includes +etc. for your platform. + +platform_XXX.c contains support functions so the compiler can work on +your platform, such as how to write characters to the console etc.. + +platform_library.c contains your library of functions you want to make +available to user programs. + +There's also a clibrary.c which contains user library functions like +printf() which are platform-independent. + +Porting the system will involve setting up suitable includes and defines +in platform.h, writing some I/O routines in platform_XXX.c, putting +whatever user functions you want in platform_library.c and then changing +the main program in picoc.c to whatever you need to do to get programs +into the system. + +platform.h is set to UNIX_HOST by default so tests can be easily run on +a UNIX system. You'll need to specify your own host setup dependent on +your target platform. + + +Copyright +--------- + +picoc is published under the "New BSD License". +http://www.opensource.org/licenses/bsd-license.php + + +Copyright (c) 2009-2011, Zik Saleeba +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + * Neither the name of the Zik Saleeba nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/src/clibrary.c b/src/clibrary.c new file mode 100644 index 0000000..d6ca7ca --- /dev/null +++ b/src/clibrary.c @@ -0,0 +1,676 @@ +/* picoc mini standard C library - provides an optional tiny C standard library + * if BUILTIN_MINI_STDLIB is defined */ + +#include "picoc.h" +#include "interpreter.h" + + +/* endian-ness checking */ +static const int __ENDIAN_CHECK__ = 1; +static int BigEndian; +static int LittleEndian; + + +/* global initialisation for libraries */ +void LibraryInit(Picoc *pc) +{ + + /* define the version number macro */ + pc->VersionString = TableStrRegister(pc, PICOC_VERSION); + VariableDefinePlatformVar(pc, NULL, "PICOC_VERSION", pc->CharPtrType, (union AnyValue *)&pc->VersionString, FALSE); + + /* define endian-ness macros */ + BigEndian = ((*(char*)&__ENDIAN_CHECK__) == 0); + LittleEndian = ((*(char*)&__ENDIAN_CHECK__) == 1); + + VariableDefinePlatformVar(pc, NULL, "BIG_ENDIAN", &pc->IntType, (union AnyValue *)&BigEndian, FALSE); + VariableDefinePlatformVar(pc, NULL, "LITTLE_ENDIAN", &pc->IntType, (union AnyValue *)&LittleEndian, FALSE); +} + +/* add a library */ +void LibraryAdd(Picoc *pc, struct Table *GlobalTable, const char *LibraryName, struct LibraryFunction *FuncList) +{ + struct ParseState Parser; + int Count; + char *Identifier; + struct ValueType *ReturnType; + struct Value *NewValue; + void *Tokens; + char *IntrinsicName = TableStrRegister(pc, "c library"); + + /* read all the library definitions */ + for (Count = 0; FuncList[Count].Prototype != NULL; Count++) + { + Tokens = LexAnalyse(pc, IntrinsicName, FuncList[Count].Prototype, strlen((char *)FuncList[Count].Prototype), NULL); + LexInitParser(&Parser, pc, FuncList[Count].Prototype, Tokens, IntrinsicName, TRUE, FALSE); + TypeParse(&Parser, &ReturnType, &Identifier, NULL); + NewValue = ParseFunctionDefinition(&Parser, ReturnType, Identifier); + NewValue->Val->FuncDef.Intrinsic = FuncList[Count].Func; + HeapFreeMem(pc, Tokens); + } +} + +/* print a type to a stream without using printf/sprintf */ +void PrintType(struct ValueType *Typ, IOFILE *Stream) +{ + switch (Typ->Base) + { + case TypeVoid: PrintStr("void", Stream); break; + case TypeInt: PrintStr("int", Stream); break; + case TypeShort: PrintStr("short", Stream); break; + case TypeChar: PrintStr("char", Stream); break; + case TypeLong: PrintStr("long", Stream); break; + case TypeUnsignedInt: PrintStr("unsigned int", Stream); break; + case TypeUnsignedShort: PrintStr("unsigned short", Stream); break; + case TypeUnsignedLong: PrintStr("unsigned long", Stream); break; + case TypeUnsignedChar: PrintStr("unsigned char", Stream); break; +#ifndef NO_FP + case TypeFP: PrintStr("double", Stream); break; +#endif + case TypeFunction: PrintStr("function", Stream); break; + case TypeMacro: PrintStr("macro", Stream); break; + case TypePointer: if (Typ->FromType) PrintType(Typ->FromType, Stream); PrintCh('*', Stream); break; + case TypeArray: PrintType(Typ->FromType, Stream); PrintCh('[', Stream); if (Typ->ArraySize != 0) PrintSimpleInt(Typ->ArraySize, Stream); PrintCh(']', Stream); break; + case TypeStruct: PrintStr("struct ", Stream); PrintStr( Typ->Identifier, Stream); break; + case TypeUnion: PrintStr("union ", Stream); PrintStr(Typ->Identifier, Stream); break; + case TypeEnum: PrintStr("enum ", Stream); PrintStr(Typ->Identifier, Stream); break; + case TypeGotoLabel: PrintStr("goto label ", Stream); break; + case Type_Type: PrintStr("type ", Stream); break; + } +} + + +#ifdef BUILTIN_MINI_STDLIB + +/* + * This is a simplified standard library for small embedded systems. It doesn't require + * a system stdio library to operate. + * + * A more complete standard library for larger computers is in the library_XXX.c files. + */ + +static int TRUEValue = 1; +static int ZeroValue = 0; + +void BasicIOInit(Picoc *pc) +{ + pc->CStdOutBase.Putch = &PlatformPutc; + pc->CStdOut = &CStdOutBase; +} + +/* initialise the C library */ +void CLibraryInit(Picoc *pc) +{ + /* define some constants */ + VariableDefinePlatformVar(pc, NULL, "NULL", &IntType, (union AnyValue *)&ZeroValue, FALSE); + VariableDefinePlatformVar(pc, NULL, "TRUE", &IntType, (union AnyValue *)&TRUEValue, FALSE); + VariableDefinePlatformVar(pc, NULL, "FALSE", &IntType, (union AnyValue *)&ZeroValue, FALSE); +} + +/* stream for writing into strings */ +void SPutc(unsigned char Ch, union OutputStreamInfo *Stream) +{ + struct StringOutputStream *Out = &Stream->Str; + *Out->WritePos++ = Ch; +} + +/* print a character to a stream without using printf/sprintf */ +void PrintCh(char OutCh, struct OutputStream *Stream) +{ + (*Stream->Putch)(OutCh, &Stream->i); +} + +/* print a string to a stream without using printf/sprintf */ +void PrintStr(const char *Str, struct OutputStream *Stream) +{ + while (*Str != 0) + PrintCh(*Str++, Stream); +} + +/* print a single character a given number of times */ +void PrintRepeatedChar(Picoc *pc, char ShowChar, int Length, struct OutputStream *Stream) +{ + while (Length-- > 0) + PrintCh(ShowChar, Stream); +} + +/* print an unsigned integer to a stream without using printf/sprintf */ +void PrintUnsigned(unsigned long Num, unsigned int Base, int FieldWidth, int ZeroPad, int LeftJustify, struct OutputStream *Stream) +{ + char Result[33]; + int ResPos = sizeof(Result); + + Result[--ResPos] = '\0'; + if (Num == 0) + Result[--ResPos] = '0'; + + while (Num > 0) + { + unsigned long NextNum = Num / Base; + unsigned long Digit = Num - NextNum * Base; + if (Digit < 10) + Result[--ResPos] = '0' + Digit; + else + Result[--ResPos] = 'a' + Digit - 10; + + Num = NextNum; + } + + if (FieldWidth > 0 && !LeftJustify) + PrintRepeatedChar(ZeroPad ? '0' : ' ', FieldWidth - (sizeof(Result) - 1 - ResPos), Stream); + + PrintStr(&Result[ResPos], Stream); + + if (FieldWidth > 0 && LeftJustify) + PrintRepeatedChar(' ', FieldWidth - (sizeof(Result) - 1 - ResPos), Stream); +} + +/* print an integer to a stream without using printf/sprintf */ +void PrintSimpleInt(long Num, struct OutputStream *Stream) +{ + PrintInt(Num, -1, FALSE, FALSE, Stream); +} + +/* print an integer to a stream without using printf/sprintf */ +void PrintInt(long Num, int FieldWidth, int ZeroPad, int LeftJustify, struct OutputStream *Stream) +{ + if (Num < 0) + { + PrintCh('-', Stream); + Num = -Num; + if (FieldWidth != 0) + FieldWidth--; + } + + PrintUnsigned((unsigned long)Num, 10, FieldWidth, ZeroPad, LeftJustify, Stream); +} + +#ifndef NO_FP +/* print a double to a stream without using printf/sprintf */ +void PrintFP(double Num, struct OutputStream *Stream) +{ + int Exponent = 0; + int MaxDecimal; + + if (Num < 0) + { + PrintCh('-', Stream); + Num = -Num; + } + + if (Num >= 1e7) + Exponent = log10(Num); + else if (Num <= 1e-7 && Num != 0.0) + Exponent = log10(Num) - 0.999999999; + + Num /= pow(10.0, Exponent); + PrintInt((long)Num, 0, FALSE, FALSE, Stream); + PrintCh('.', Stream); + Num = (Num - (long)Num) * 10; + if (abs(Num) >= 1e-7) + { + for (MaxDecimal = 6; MaxDecimal > 0 && abs(Num) >= 1e-7; Num = (Num - (long)(Num + 1e-7)) * 10, MaxDecimal--) + PrintCh('0' + (long)(Num + 1e-7), Stream); + } + else + PrintCh('0', Stream); + + if (Exponent != 0) + { + PrintCh('e', Stream); + PrintInt(Exponent, 0, FALSE, FALSE, Stream); + } +} +#endif + +/* intrinsic functions made available to the language */ +void GenericPrintf(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs, struct OutputStream *Stream) +{ + char *FPos; + struct Value *NextArg = Param[0]; + struct ValueType *FormatType; + int ArgCount = 1; + int LeftJustify = FALSE; + int ZeroPad = FALSE; + int FieldWidth = 0; + char *Format = Param[0]->Val->Pointer; + + for (FPos = Format; *FPos != '\0'; FPos++) + { + if (*FPos == '%') + { + FPos++; + FieldWidth = 0; + if (*FPos == '-') + { + /* a leading '-' means left justify */ + LeftJustify = TRUE; + FPos++; + } + + if (*FPos == '0') + { + /* a leading zero means zero pad a decimal number */ + ZeroPad = TRUE; + FPos++; + } + + /* get any field width in the format */ + while (isdigit((int)*FPos)) + FieldWidth = FieldWidth * 10 + (*FPos++ - '0'); + + /* now check the format type */ + switch (*FPos) + { + case 's': FormatType = CharPtrType; break; + case 'd': case 'u': case 'x': case 'b': case 'c': FormatType = &IntType; break; +#ifndef NO_FP + case 'f': FormatType = &FPType; break; +#endif + case '%': PrintCh('%', Stream); FormatType = NULL; break; + case '\0': FPos--; FormatType = NULL; break; + default: PrintCh(*FPos, Stream); FormatType = NULL; break; + } + + if (FormatType != NULL) + { + /* we have to format something */ + if (ArgCount >= NumArgs) + PrintStr("XXX", Stream); /* not enough parameters for format */ + else + { + NextArg = (struct Value *)((char *)NextArg + MEM_ALIGN(sizeof(struct Value) + TypeStackSizeValue(NextArg))); + if (NextArg->Typ != FormatType && + !((FormatType == &IntType || *FPos == 'f') && IS_NUMERIC_COERCIBLE(NextArg)) && + !(FormatType == CharPtrType && (NextArg->Typ->Base == TypePointer || + (NextArg->Typ->Base == TypeArray && NextArg->Typ->FromType->Base == TypeChar) ) ) ) + PrintStr("XXX", Stream); /* bad type for format */ + else + { + switch (*FPos) + { + case 's': + { + char *Str; + + if (NextArg->Typ->Base == TypePointer) + Str = NextArg->Val->Pointer; + else + Str = &NextArg->Val->ArrayMem[0]; + + if (Str == NULL) + PrintStr("NULL", Stream); + else + PrintStr(Str, Stream); + break; + } + case 'd': PrintInt(ExpressionCoerceInteger(NextArg), FieldWidth, ZeroPad, LeftJustify, Stream); break; + case 'u': PrintUnsigned(ExpressionCoerceUnsignedInteger(NextArg), 10, FieldWidth, ZeroPad, LeftJustify, Stream); break; + case 'x': PrintUnsigned(ExpressionCoerceUnsignedInteger(NextArg), 16, FieldWidth, ZeroPad, LeftJustify, Stream); break; + case 'b': PrintUnsigned(ExpressionCoerceUnsignedInteger(NextArg), 2, FieldWidth, ZeroPad, LeftJustify, Stream); break; + case 'c': PrintCh(ExpressionCoerceUnsignedInteger(NextArg), Stream); break; +#ifndef NO_FP + case 'f': PrintFP(ExpressionCoerceFP(NextArg), Stream); break; +#endif + } + } + } + + ArgCount++; + } + } + else + PrintCh(*FPos, Stream); + } +} + +/* printf(): print to console output */ +void LibPrintf(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + struct OutputStream ConsoleStream; + + ConsoleStream.Putch = &PlatformPutc; + GenericPrintf(Parser, ReturnValue, Param, NumArgs, &ConsoleStream); +} + +/* sprintf(): print to a string */ +void LibSPrintf(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + struct OutputStream StrStream; + + StrStream.Putch = &SPutc; + StrStream.i.Str.Parser = Parser; + StrStream.i.Str.WritePos = Param[0]->Val->Pointer; + + GenericPrintf(Parser, ReturnValue, Param+1, NumArgs-1, &StrStream); + PrintCh(0, &StrStream); + ReturnValue->Val->Pointer = *Param; +} + +/* get a line of input. protected from buffer overrun */ +void LibGets(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Pointer = PlatformGetLine(Param[0]->Val->Pointer, GETS_BUF_MAX, NULL); + if (ReturnValue->Val->Pointer != NULL) + { + char *EOLPos = strchr(Param[0]->Val->Pointer, '\n'); + if (EOLPos != NULL) + *EOLPos = '\0'; + } +} + +void LibGetc(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = PlatformGetCharacter(); +} + +void LibExit(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + PlatformExit(Param[0]->Val->Integer); +} + +#ifdef PICOC_LIBRARY +void LibSin(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->FP = sin(Param[0]->Val->FP); +} + +void LibCos(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->FP = cos(Param[0]->Val->FP); +} + +void LibTan(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->FP = tan(Param[0]->Val->FP); +} + +void LibAsin(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->FP = asin(Param[0]->Val->FP); +} + +void LibAcos(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->FP = acos(Param[0]->Val->FP); +} + +void LibAtan(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->FP = atan(Param[0]->Val->FP); +} + +void LibSinh(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->FP = sinh(Param[0]->Val->FP); +} + +void LibCosh(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->FP = cosh(Param[0]->Val->FP); +} + +void LibTanh(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->FP = tanh(Param[0]->Val->FP); +} + +void LibExp(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->FP = exp(Param[0]->Val->FP); +} + +void LibFabs(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->FP = fabs(Param[0]->Val->FP); +} + +void LibLog(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->FP = log(Param[0]->Val->FP); +} + +void LibLog10(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->FP = log10(Param[0]->Val->FP); +} + +void LibPow(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->FP = pow(Param[0]->Val->FP, Param[1]->Val->FP); +} + +void LibSqrt(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->FP = sqrt(Param[0]->Val->FP); +} + +void LibRound(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->FP = floor(Param[0]->Val->FP + 0.5); /* XXX - fix for soft float */ +} + +void LibCeil(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->FP = ceil(Param[0]->Val->FP); +} + +void LibFloor(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->FP = floor(Param[0]->Val->FP); +} +#endif + +#ifndef NO_STRING_FUNCTIONS +void LibMalloc(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Pointer = malloc(Param[0]->Val->Integer); +} + +#ifndef NO_CALLOC +void LibCalloc(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Pointer = calloc(Param[0]->Val->Integer, Param[1]->Val->Integer); +} +#endif + +#ifndef NO_REALLOC +void LibRealloc(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Pointer = realloc(Param[0]->Val->Pointer, Param[1]->Val->Integer); +} +#endif + +void LibFree(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + free(Param[0]->Val->Pointer); +} + +void LibStrcpy(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + char *To = (char *)Param[0]->Val->Pointer; + char *From = (char *)Param[1]->Val->Pointer; + + while (*From != '\0') + *To++ = *From++; + + *To = '\0'; +} + +void LibStrncpy(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + char *To = (char *)Param[0]->Val->Pointer; + char *From = (char *)Param[1]->Val->Pointer; + int Len = Param[2]->Val->Integer; + + for (; *From != '\0' && Len > 0; Len--) + *To++ = *From++; + + if (Len > 0) + *To = '\0'; +} + +void LibStrcmp(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + char *Str1 = (char *)Param[0]->Val->Pointer; + char *Str2 = (char *)Param[1]->Val->Pointer; + int StrEnded; + + for (StrEnded = FALSE; !StrEnded; StrEnded = (*Str1 == '\0' || *Str2 == '\0'), Str1++, Str2++) + { + if (*Str1 < *Str2) { ReturnValue->Val->Integer = -1; return; } + else if (*Str1 > *Str2) { ReturnValue->Val->Integer = 1; return; } + } + + ReturnValue->Val->Integer = 0; +} + +void LibStrncmp(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + char *Str1 = (char *)Param[0]->Val->Pointer; + char *Str2 = (char *)Param[1]->Val->Pointer; + int Len = Param[2]->Val->Integer; + int StrEnded; + + for (StrEnded = FALSE; !StrEnded && Len > 0; StrEnded = (*Str1 == '\0' || *Str2 == '\0'), Str1++, Str2++, Len--) + { + if (*Str1 < *Str2) { ReturnValue->Val->Integer = -1; return; } + else if (*Str1 > *Str2) { ReturnValue->Val->Integer = 1; return; } + } + + ReturnValue->Val->Integer = 0; +} + +void LibStrcat(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + char *To = (char *)Param[0]->Val->Pointer; + char *From = (char *)Param[1]->Val->Pointer; + + while (*To != '\0') + To++; + + while (*From != '\0') + *To++ = *From++; + + *To = '\0'; +} + +void LibIndex(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + char *Pos = (char *)Param[0]->Val->Pointer; + int SearchChar = Param[1]->Val->Integer; + + while (*Pos != '\0' && *Pos != SearchChar) + Pos++; + + if (*Pos != SearchChar) + ReturnValue->Val->Pointer = NULL; + else + ReturnValue->Val->Pointer = Pos; +} + +void LibRindex(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + char *Pos = (char *)Param[0]->Val->Pointer; + int SearchChar = Param[1]->Val->Integer; + + ReturnValue->Val->Pointer = NULL; + for (; *Pos != '\0'; Pos++) + { + if (*Pos == SearchChar) + ReturnValue->Val->Pointer = Pos; + } +} + +void LibStrlen(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + char *Pos = (char *)Param[0]->Val->Pointer; + int Len; + + for (Len = 0; *Pos != '\0'; Pos++) + Len++; + + ReturnValue->Val->Integer = Len; +} + +void LibMemset(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + /* we can use the system memset() */ + memset(Param[0]->Val->Pointer, Param[1]->Val->Integer, Param[2]->Val->Integer); +} + +void LibMemcpy(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + /* we can use the system memcpy() */ + memcpy(Param[0]->Val->Pointer, Param[1]->Val->Pointer, Param[2]->Val->Integer); +} + +void LibMemcmp(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + unsigned char *Mem1 = (unsigned char *)Param[0]->Val->Pointer; + unsigned char *Mem2 = (unsigned char *)Param[1]->Val->Pointer; + int Len = Param[2]->Val->Integer; + + for (; Len > 0; Mem1++, Mem2++, Len--) + { + if (*Mem1 < *Mem2) { ReturnValue->Val->Integer = -1; return; } + else if (*Mem1 > *Mem2) { ReturnValue->Val->Integer = 1; return; } + } + + ReturnValue->Val->Integer = 0; +} +#endif + +/* list of all library functions and their prototypes */ +struct LibraryFunction CLibrary[] = +{ + { LibPrintf, "void printf(char *, ...);" }, + { LibSPrintf, "char *sprintf(char *, char *, ...);" }, + { LibGets, "char *gets(char *);" }, + { LibGetc, "int getchar();" }, + { LibExit, "void exit(int);" }, +#ifdef PICOC_LIBRARY + { LibSin, "float sin(float);" }, + { LibCos, "float cos(float);" }, + { LibTan, "float tan(float);" }, + { LibAsin, "float asin(float);" }, + { LibAcos, "float acos(float);" }, + { LibAtan, "float atan(float);" }, + { LibSinh, "float sinh(float);" }, + { LibCosh, "float cosh(float);" }, + { LibTanh, "float tanh(float);" }, + { LibExp, "float exp(float);" }, + { LibFabs, "float fabs(float);" }, + { LibLog, "float log(float);" }, + { LibLog10, "float log10(float);" }, + { LibPow, "float pow(float,float);" }, + { LibSqrt, "float sqrt(float);" }, + { LibRound, "float round(float);" }, + { LibCeil, "float ceil(float);" }, + { LibFloor, "float floor(float);" }, +#endif + { LibMalloc, "void *malloc(int);" }, +#ifndef NO_CALLOC + { LibCalloc, "void *calloc(int,int);" }, +#endif +#ifndef NO_REALLOC + { LibRealloc, "void *realloc(void *,int);" }, +#endif + { LibFree, "void free(void *);" }, +#ifndef NO_STRING_FUNCTIONS + { LibStrcpy, "void strcpy(char *,char *);" }, + { LibStrncpy, "void strncpy(char *,char *,int);" }, + { LibStrcmp, "int strcmp(char *,char *);" }, + { LibStrncmp, "int strncmp(char *,char *,int);" }, + { LibStrcat, "void strcat(char *,char *);" }, + { LibIndex, "char *index(char *,int);" }, + { LibRindex, "char *rindex(char *,int);" }, + { LibStrlen, "int strlen(char *);" }, + { LibMemset, "void memset(void *,int,int);" }, + { LibMemcpy, "void memcpy(void *,void *,int);" }, + { LibMemcmp, "int memcmp(void *,void *,int);" }, +#endif + { NULL, NULL } +}; + +#endif /* BUILTIN_MINI_STDLIB */ diff --git a/src/clibrary.o b/src/clibrary.o new file mode 100644 index 0000000..fda6589 Binary files /dev/null and b/src/clibrary.o differ diff --git a/src/cstdlib/ctype.c b/src/cstdlib/ctype.c new file mode 100644 index 0000000..d1e8140 --- /dev/null +++ b/src/cstdlib/ctype.c @@ -0,0 +1,110 @@ +/* string.h library for large systems - small embedded systems use clibrary.c instead */ +#include +#include "../interpreter.h" + +#ifndef BUILTIN_MINI_STDLIB + +void StdIsalnum(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = isalnum(Param[0]->Val->Integer); +} + +void StdIsalpha(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = isalpha(Param[0]->Val->Integer); +} + +void StdIsblank(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + int ch = Param[0]->Val->Integer; + ReturnValue->Val->Integer = (ch == ' ') | (ch == '\t'); +} + +void StdIscntrl(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = iscntrl(Param[0]->Val->Integer); +} + +void StdIsdigit(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = isdigit(Param[0]->Val->Integer); +} + +void StdIsgraph(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = isgraph(Param[0]->Val->Integer); +} + +void StdIslower(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = islower(Param[0]->Val->Integer); +} + +void StdIsprint(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = isprint(Param[0]->Val->Integer); +} + +void StdIspunct(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = ispunct(Param[0]->Val->Integer); +} + +void StdIsspace(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = isspace(Param[0]->Val->Integer); +} + +void StdIsupper(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = isupper(Param[0]->Val->Integer); +} + +void StdIsxdigit(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = isxdigit(Param[0]->Val->Integer); +} + +void StdTolower(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = tolower(Param[0]->Val->Integer); +} + +void StdToupper(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = toupper(Param[0]->Val->Integer); +} + +void StdIsascii(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = isascii(Param[0]->Val->Integer); +} + +void StdToascii(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = toascii(Param[0]->Val->Integer); +} + +/* all string.h functions */ +struct LibraryFunction StdCtypeFunctions[] = +{ + { StdIsalnum, "int isalnum(int);" }, + { StdIsalpha, "int isalpha(int);" }, + { StdIsblank, "int isblank(int);" }, + { StdIscntrl, "int iscntrl(int);" }, + { StdIsdigit, "int isdigit(int);" }, + { StdIsgraph, "int isgraph(int);" }, + { StdIslower, "int islower(int);" }, + { StdIsprint, "int isprint(int);" }, + { StdIspunct, "int ispunct(int);" }, + { StdIsspace, "int isspace(int);" }, + { StdIsupper, "int isupper(int);" }, + { StdIsxdigit, "int isxdigit(int);" }, + { StdTolower, "int tolower(int);" }, + { StdToupper, "int toupper(int);" }, + { StdIsascii, "int isascii(int);" }, + { StdToascii, "int toascii(int);" }, + { NULL, NULL } +}; + +#endif /* !BUILTIN_MINI_STDLIB */ diff --git a/src/cstdlib/ctype.o b/src/cstdlib/ctype.o new file mode 100644 index 0000000..406d9a1 Binary files /dev/null and b/src/cstdlib/ctype.o differ diff --git a/src/cstdlib/errno.c b/src/cstdlib/errno.c new file mode 100644 index 0000000..042ea74 --- /dev/null +++ b/src/cstdlib/errno.c @@ -0,0 +1,655 @@ +/* string.h library for large systems - small embedded systems use clibrary.c instead */ +#include +#include "../interpreter.h" + +#ifndef BUILTIN_MINI_STDLIB + +#ifdef EACCES +static int EACCESValue = EACCES; +#endif + +#ifdef EADDRINUSE +static int EADDRINUSEValue = EADDRINUSE; +#endif + +#ifdef EADDRNOTAVAIL +static int EADDRNOTAVAILValue = EADDRNOTAVAIL; +#endif + +#ifdef EAFNOSUPPORT +static int EAFNOSUPPORTValue = EAFNOSUPPORT; +#endif + +#ifdef EAGAIN +static int EAGAINValue = EAGAIN; +#endif + +#ifdef EALREADY +static int EALREADYValue = EALREADY; +#endif + +#ifdef EBADF +static int EBADFValue = EBADF; +#endif + +#ifdef EBADMSG +static int EBADMSGValue = EBADMSG; +#endif + +#ifdef EBUSY +static int EBUSYValue = EBUSY; +#endif + +#ifdef ECANCELED +static int ECANCELEDValue = ECANCELED; +#endif + +#ifdef ECHILD +static int ECHILDValue = ECHILD; +#endif + +#ifdef ECONNABORTED +static int ECONNABORTEDValue = ECONNABORTED; +#endif + +#ifdef ECONNREFUSED +static int ECONNREFUSEDValue = ECONNREFUSED; +#endif + +#ifdef ECONNRESET +static int ECONNRESETValue = ECONNRESET; +#endif + +#ifdef EDEADLK +static int EDEADLKValue = EDEADLK; +#endif + +#ifdef EDESTADDRREQ +static int EDESTADDRREQValue = EDESTADDRREQ; +#endif + +#ifdef EDOM +static int EDOMValue = EDOM; +#endif + +#ifdef EDQUOT +static int EDQUOTValue = EDQUOT; +#endif + +#ifdef EEXIST +static int EEXISTValue = EEXIST; +#endif + +#ifdef EFAULT +static int EFAULTValue = EFAULT; +#endif + +#ifdef EFBIG +static int EFBIGValue = EFBIG; +#endif + +#ifdef EHOSTUNREACH +static int EHOSTUNREACHValue = EHOSTUNREACH; +#endif + +#ifdef EIDRM +static int EIDRMValue = EIDRM; +#endif + +#ifdef EILSEQ +static int EILSEQValue = EILSEQ; +#endif + +#ifdef EINPROGRESS +static int EINPROGRESSValue = EINPROGRESS; +#endif + +#ifdef EINTR +static int EINTRValue = EINTR; +#endif + +#ifdef EINVAL +static int EINVALValue = EINVAL; +#endif + +#ifdef EIO +static int EIOValue = EIO; +#endif + +#ifdef EISCONN +static int EISCONNValue = EISCONN; +#endif + +#ifdef EISDIR +static int EISDIRValue = EISDIR; +#endif + +#ifdef ELOOP +static int ELOOPValue = ELOOP; +#endif + +#ifdef EMFILE +static int EMFILEValue = EMFILE; +#endif + +#ifdef EMLINK +static int EMLINKValue = EMLINK; +#endif + +#ifdef EMSGSIZE +static int EMSGSIZEValue = EMSGSIZE; +#endif + +#ifdef EMULTIHOP +static int EMULTIHOPValue = EMULTIHOP; +#endif + +#ifdef ENAMETOOLONG +static int ENAMETOOLONGValue = ENAMETOOLONG; +#endif + +#ifdef ENETDOWN +static int ENETDOWNValue = ENETDOWN; +#endif + +#ifdef ENETRESET +static int ENETRESETValue = ENETRESET; +#endif + +#ifdef ENETUNREACH +static int ENETUNREACHValue = ENETUNREACH; +#endif + +#ifdef ENFILE +static int ENFILEValue = ENFILE; +#endif + +#ifdef ENOBUFS +static int ENOBUFSValue = ENOBUFS; +#endif + +#ifdef ENODATA +static int ENODATAValue = ENODATA; +#endif + +#ifdef ENODEV +static int ENODEVValue = ENODEV; +#endif + +#ifdef ENOENT +static int ENOENTValue = ENOENT; +#endif + +#ifdef ENOEXEC +static int ENOEXECValue = ENOEXEC; +#endif + +#ifdef ENOLCK +static int ENOLCKValue = ENOLCK; +#endif + +#ifdef ENOLINK +static int ENOLINKValue = ENOLINK; +#endif + +#ifdef ENOMEM +static int ENOMEMValue = ENOMEM; +#endif + +#ifdef ENOMSG +static int ENOMSGValue = ENOMSG; +#endif + +#ifdef ENOPROTOOPT +static int ENOPROTOOPTValue = ENOPROTOOPT; +#endif + +#ifdef ENOSPC +static int ENOSPCValue = ENOSPC; +#endif + +#ifdef ENOSR +static int ENOSRValue = ENOSR; +#endif + +#ifdef ENOSTR +static int ENOSTRValue = ENOSTR; +#endif + +#ifdef ENOSYS +static int ENOSYSValue = ENOSYS; +#endif + +#ifdef ENOTCONN +static int ENOTCONNValue = ENOTCONN; +#endif + +#ifdef ENOTDIR +static int ENOTDIRValue = ENOTDIR; +#endif + +#ifdef ENOTEMPTY +static int ENOTEMPTYValue = ENOTEMPTY; +#endif + +#ifdef ENOTRECOVERABLE +static int ENOTRECOVERABLEValue = ENOTRECOVERABLE; +#endif + +#ifdef ENOTSOCK +static int ENOTSOCKValue = ENOTSOCK; +#endif + +#ifdef ENOTSUP +static int ENOTSUPValue = ENOTSUP; +#endif + +#ifdef ENOTTY +static int ENOTTYValue = ENOTTY; +#endif + +#ifdef ENXIO +static int ENXIOValue = ENXIO; +#endif + +#ifdef EOPNOTSUPP +static int EOPNOTSUPPValue = EOPNOTSUPP; +#endif + +#ifdef EOVERFLOW +static int EOVERFLOWValue = EOVERFLOW; +#endif + +#ifdef EOWNERDEAD +static int EOWNERDEADValue = EOWNERDEAD; +#endif + +#ifdef EPERM +static int EPERMValue = EPERM; +#endif + +#ifdef EPIPE +static int EPIPEValue = EPIPE; +#endif + +#ifdef EPROTO +static int EPROTOValue = EPROTO; +#endif + +#ifdef EPROTONOSUPPORT +static int EPROTONOSUPPORTValue = EPROTONOSUPPORT; +#endif + +#ifdef EPROTOTYPE +static int EPROTOTYPEValue = EPROTOTYPE; +#endif + +#ifdef ERANGE +static int ERANGEValue = ERANGE; +#endif + +#ifdef EROFS +static int EROFSValue = EROFS; +#endif + +#ifdef ESPIPE +static int ESPIPEValue = ESPIPE; +#endif + +#ifdef ESRCH +static int ESRCHValue = ESRCH; +#endif + +#ifdef ESTALE +static int ESTALEValue = ESTALE; +#endif + +#ifdef ETIME +static int ETIMEValue = ETIME; +#endif + +#ifdef ETIMEDOUT +static int ETIMEDOUTValue = ETIMEDOUT; +#endif + +#ifdef ETXTBSY +static int ETXTBSYValue = ETXTBSY; +#endif + +#ifdef EWOULDBLOCK +static int EWOULDBLOCKValue = EWOULDBLOCK; +#endif + +#ifdef EXDEV +static int EXDEVValue = EXDEV; +#endif + + +/* creates various system-dependent definitions */ +void StdErrnoSetupFunc(Picoc *pc) +{ + /* defines */ +#ifdef EACCES + VariableDefinePlatformVar(pc, NULL, "EACCES", &pc->IntType, (union AnyValue *)&EACCESValue, FALSE); +#endif + +#ifdef EADDRINUSE + VariableDefinePlatformVar(pc, NULL, "EADDRINUSE", &pc->IntType, (union AnyValue *)&EADDRINUSEValue, FALSE); +#endif + +#ifdef EADDRNOTAVAIL + VariableDefinePlatformVar(pc, NULL, "EADDRNOTAVAIL", &pc->IntType, (union AnyValue *)&EADDRNOTAVAILValue, FALSE); +#endif + +#ifdef EAFNOSUPPORT + VariableDefinePlatformVar(pc, NULL, "EAFNOSUPPORT", &pc->IntType, (union AnyValue *)&EAFNOSUPPORTValue, FALSE); +#endif + +#ifdef EAGAIN + VariableDefinePlatformVar(pc, NULL, "EAGAIN", &pc->IntType, (union AnyValue *)&EAGAINValue, FALSE); +#endif + +#ifdef EALREADY + VariableDefinePlatformVar(pc, NULL, "EALREADY", &pc->IntType, (union AnyValue *)&EALREADYValue, FALSE); +#endif + +#ifdef EBADF + VariableDefinePlatformVar(pc, NULL, "EBADF", &pc->IntType, (union AnyValue *)&EBADFValue, FALSE); +#endif + +#ifdef EBADMSG + VariableDefinePlatformVar(pc, NULL, "EBADMSG", &pc->IntType, (union AnyValue *)&EBADMSGValue, FALSE); +#endif + +#ifdef EBUSY + VariableDefinePlatformVar(pc, NULL, "EBUSY", &pc->IntType, (union AnyValue *)&EBUSYValue, FALSE); +#endif + +#ifdef ECANCELED + VariableDefinePlatformVar(pc, NULL, "ECANCELED", &pc->IntType, (union AnyValue *)&ECANCELEDValue, FALSE); +#endif + +#ifdef ECHILD + VariableDefinePlatformVar(pc, NULL, "ECHILD", &pc->IntType, (union AnyValue *)&ECHILDValue, FALSE); +#endif + +#ifdef ECONNABORTED + VariableDefinePlatformVar(pc, NULL, "ECONNABORTED", &pc->IntType, (union AnyValue *)&ECONNABORTEDValue, FALSE); +#endif + +#ifdef ECONNREFUSED + VariableDefinePlatformVar(pc, NULL, "ECONNREFUSED", &pc->IntType, (union AnyValue *)&ECONNREFUSEDValue, FALSE); +#endif + +#ifdef ECONNRESET + VariableDefinePlatformVar(pc, NULL, "ECONNRESET", &pc->IntType, (union AnyValue *)&ECONNRESETValue, FALSE); +#endif + +#ifdef EDEADLK + VariableDefinePlatformVar(pc, NULL, "EDEADLK", &pc->IntType, (union AnyValue *)&EDEADLKValue, FALSE); +#endif + +#ifdef EDESTADDRREQ + VariableDefinePlatformVar(pc, NULL, "EDESTADDRREQ", &pc->IntType, (union AnyValue *)&EDESTADDRREQValue, FALSE); +#endif + +#ifdef EDOM + VariableDefinePlatformVar(pc, NULL, "EDOM", &pc->IntType, (union AnyValue *)&EDOMValue, FALSE); +#endif + +#ifdef EDQUOT + VariableDefinePlatformVar(pc, NULL, "EDQUOT", &pc->IntType, (union AnyValue *)&EDQUOTValue, FALSE); +#endif + +#ifdef EEXIST + VariableDefinePlatformVar(pc, NULL, "EEXIST", &pc->IntType, (union AnyValue *)&EEXISTValue, FALSE); +#endif + +#ifdef EFAULT + VariableDefinePlatformVar(pc, NULL, "EFAULT", &pc->IntType, (union AnyValue *)&EFAULTValue, FALSE); +#endif + +#ifdef EFBIG + VariableDefinePlatformVar(pc, NULL, "EFBIG", &pc->IntType, (union AnyValue *)&EFBIGValue, FALSE); +#endif + +#ifdef EHOSTUNREACH + VariableDefinePlatformVar(pc, NULL, "EHOSTUNREACH", &pc->IntType, (union AnyValue *)&EHOSTUNREACHValue, FALSE); +#endif + +#ifdef EIDRM + VariableDefinePlatformVar(pc, NULL, "EIDRM", &pc->IntType, (union AnyValue *)&EIDRMValue, FALSE); +#endif + +#ifdef EILSEQ + VariableDefinePlatformVar(pc, NULL, "EILSEQ", &pc->IntType, (union AnyValue *)&EILSEQValue, FALSE); +#endif + +#ifdef EINPROGRESS + VariableDefinePlatformVar(pc, NULL, "EINPROGRESS", &pc->IntType, (union AnyValue *)&EINPROGRESSValue, FALSE); +#endif + +#ifdef EINTR + VariableDefinePlatformVar(pc, NULL, "EINTR", &pc->IntType, (union AnyValue *)&EINTRValue, FALSE); +#endif + +#ifdef EINVAL + VariableDefinePlatformVar(pc, NULL, "EINVAL", &pc->IntType, (union AnyValue *)&EINVALValue, FALSE); +#endif + +#ifdef EIO + VariableDefinePlatformVar(pc, NULL, "EIO", &pc->IntType, (union AnyValue *)&EIOValue, FALSE); +#endif + +#ifdef EISCONN + VariableDefinePlatformVar(pc, NULL, "EISCONN", &pc->IntType, (union AnyValue *)&EISCONNValue, FALSE); +#endif + +#ifdef EISDIR + VariableDefinePlatformVar(pc, NULL, "EISDIR", &pc->IntType, (union AnyValue *)&EISDIRValue, FALSE); +#endif + +#ifdef ELOOP + VariableDefinePlatformVar(pc, NULL, "ELOOP", &pc->IntType, (union AnyValue *)&ELOOPValue, FALSE); +#endif + +#ifdef EMFILE + VariableDefinePlatformVar(pc, NULL, "EMFILE", &pc->IntType, (union AnyValue *)&EMFILEValue, FALSE); +#endif + +#ifdef EMLINK + VariableDefinePlatformVar(pc, NULL, "EMLINK", &pc->IntType, (union AnyValue *)&EMLINKValue, FALSE); +#endif + +#ifdef EMSGSIZE + VariableDefinePlatformVar(pc, NULL, "EMSGSIZE", &pc->IntType, (union AnyValue *)&EMSGSIZEValue, FALSE); +#endif + +#ifdef EMULTIHOP + VariableDefinePlatformVar(pc, NULL, "EMULTIHOP", &pc->IntType, (union AnyValue *)&EMULTIHOPValue, FALSE); +#endif + +#ifdef ENAMETOOLONG + VariableDefinePlatformVar(pc, NULL, "ENAMETOOLONG", &pc->IntType, (union AnyValue *)&ENAMETOOLONGValue, FALSE); +#endif + +#ifdef ENETDOWN + VariableDefinePlatformVar(pc, NULL, "ENETDOWN", &pc->IntType, (union AnyValue *)&ENETDOWNValue, FALSE); +#endif + +#ifdef ENETRESET + VariableDefinePlatformVar(pc, NULL, "ENETRESET", &pc->IntType, (union AnyValue *)&ENETRESETValue, FALSE); +#endif + +#ifdef ENETUNREACH + VariableDefinePlatformVar(pc, NULL, "ENETUNREACH", &pc->IntType, (union AnyValue *)&ENETUNREACHValue, FALSE); +#endif + +#ifdef ENFILE + VariableDefinePlatformVar(pc, NULL, "ENFILE", &pc->IntType, (union AnyValue *)&ENFILEValue, FALSE); +#endif + +#ifdef ENOBUFS + VariableDefinePlatformVar(pc, NULL, "ENOBUFS", &pc->IntType, (union AnyValue *)&ENOBUFSValue, FALSE); +#endif + +#ifdef ENODATA + VariableDefinePlatformVar(pc, NULL, "ENODATA", &pc->IntType, (union AnyValue *)&ENODATAValue, FALSE); +#endif + +#ifdef ENODEV + VariableDefinePlatformVar(pc, NULL, "ENODEV", &pc->IntType, (union AnyValue *)&ENODEVValue, FALSE); +#endif + +#ifdef ENOENT + VariableDefinePlatformVar(pc, NULL, "ENOENT", &pc->IntType, (union AnyValue *)&ENOENTValue, FALSE); +#endif + +#ifdef ENOEXEC + VariableDefinePlatformVar(pc, NULL, "ENOEXEC", &pc->IntType, (union AnyValue *)&ENOEXECValue, FALSE); +#endif + +#ifdef ENOLCK + VariableDefinePlatformVar(pc, NULL, "ENOLCK", &pc->IntType, (union AnyValue *)&ENOLCKValue, FALSE); +#endif + +#ifdef ENOLINK + VariableDefinePlatformVar(pc, NULL, "ENOLINK", &pc->IntType, (union AnyValue *)&ENOLINKValue, FALSE); +#endif + +#ifdef ENOMEM + VariableDefinePlatformVar(pc, NULL, "ENOMEM", &pc->IntType, (union AnyValue *)&ENOMEMValue, FALSE); +#endif + +#ifdef ENOMSG + VariableDefinePlatformVar(pc, NULL, "ENOMSG", &pc->IntType, (union AnyValue *)&ENOMSGValue, FALSE); +#endif + +#ifdef ENOPROTOOPT + VariableDefinePlatformVar(pc, NULL, "ENOPROTOOPT", &pc->IntType, (union AnyValue *)&ENOPROTOOPTValue, FALSE); +#endif + +#ifdef ENOSPC + VariableDefinePlatformVar(pc, NULL, "ENOSPC", &pc->IntType, (union AnyValue *)&ENOSPCValue, FALSE); +#endif + +#ifdef ENOSR + VariableDefinePlatformVar(pc, NULL, "ENOSR", &pc->IntType, (union AnyValue *)&ENOSRValue, FALSE); +#endif + +#ifdef ENOSTR + VariableDefinePlatformVar(pc, NULL, "ENOSTR", &pc->IntType, (union AnyValue *)&ENOSTRValue, FALSE); +#endif + +#ifdef ENOSYS + VariableDefinePlatformVar(pc, NULL, "ENOSYS", &pc->IntType, (union AnyValue *)&ENOSYSValue, FALSE); +#endif + +#ifdef ENOTCONN + VariableDefinePlatformVar(pc, NULL, "ENOTCONN", &pc->IntType, (union AnyValue *)&ENOTCONNValue, FALSE); +#endif + +#ifdef ENOTDIR + VariableDefinePlatformVar(pc, NULL, "ENOTDIR", &pc->IntType, (union AnyValue *)&ENOTDIRValue, FALSE); +#endif + +#ifdef ENOTEMPTY + VariableDefinePlatformVar(pc, NULL, "ENOTEMPTY", &pc->IntType, (union AnyValue *)&ENOTEMPTYValue, FALSE); +#endif + +#ifdef ENOTRECOVERABLE + VariableDefinePlatformVar(pc, NULL, "ENOTRECOVERABLE", &pc->IntType, (union AnyValue *)&ENOTRECOVERABLEValue, FALSE); +#endif + +#ifdef ENOTSOCK + VariableDefinePlatformVar(pc, NULL, "ENOTSOCK", &pc->IntType, (union AnyValue *)&ENOTSOCKValue, FALSE); +#endif + +#ifdef ENOTSUP + VariableDefinePlatformVar(pc, NULL, "ENOTSUP", &pc->IntType, (union AnyValue *)&ENOTSUPValue, FALSE); +#endif + +#ifdef ENOTTY + VariableDefinePlatformVar(pc, NULL, "ENOTTY", &pc->IntType, (union AnyValue *)&ENOTTYValue, FALSE); +#endif + +#ifdef ENXIO + VariableDefinePlatformVar(pc, NULL, "ENXIO", &pc->IntType, (union AnyValue *)&ENXIOValue, FALSE); +#endif + +#ifdef EOPNOTSUPP + VariableDefinePlatformVar(pc, NULL, "EOPNOTSUPP", &pc->IntType, (union AnyValue *)&EOPNOTSUPPValue, FALSE); +#endif + +#ifdef EOVERFLOW + VariableDefinePlatformVar(pc, NULL, "EOVERFLOW", &pc->IntType, (union AnyValue *)&EOVERFLOWValue, FALSE); +#endif + +#ifdef EOWNERDEAD + VariableDefinePlatformVar(pc, NULL, "EOWNERDEAD", &pc->IntType, (union AnyValue *)&EOWNERDEADValue, FALSE); +#endif + +#ifdef EPERM + VariableDefinePlatformVar(pc, NULL, "EPERM", &pc->IntType, (union AnyValue *)&EPERMValue, FALSE); +#endif + +#ifdef EPIPE + VariableDefinePlatformVar(pc, NULL, "EPIPE", &pc->IntType, (union AnyValue *)&EPIPEValue, FALSE); +#endif + +#ifdef EPROTO + VariableDefinePlatformVar(pc, NULL, "EPROTO", &pc->IntType, (union AnyValue *)&EPROTOValue, FALSE); +#endif + +#ifdef EPROTONOSUPPORT + VariableDefinePlatformVar(pc, NULL, "EPROTONOSUPPORT", &pc->IntType, (union AnyValue *)&EPROTONOSUPPORTValue, FALSE); +#endif + +#ifdef EPROTOTYPE + VariableDefinePlatformVar(pc, NULL, "EPROTOTYPE", &pc->IntType, (union AnyValue *)&EPROTOTYPEValue, FALSE); +#endif + +#ifdef ERANGE + VariableDefinePlatformVar(pc, NULL, "ERANGE", &pc->IntType, (union AnyValue *)&ERANGEValue, FALSE); +#endif + +#ifdef EROFS + VariableDefinePlatformVar(pc, NULL, "EROFS", &pc->IntType, (union AnyValue *)&EROFSValue, FALSE); +#endif + +#ifdef ESPIPE + VariableDefinePlatformVar(pc, NULL, "ESPIPE", &pc->IntType, (union AnyValue *)&ESPIPEValue, FALSE); +#endif + +#ifdef ESRCH + VariableDefinePlatformVar(pc, NULL, "ESRCH", &pc->IntType, (union AnyValue *)&ESRCHValue, FALSE); +#endif + +#ifdef ESTALE + VariableDefinePlatformVar(pc, NULL, "ESTALE", &pc->IntType, (union AnyValue *)&ESTALEValue, FALSE); +#endif + +#ifdef ETIME + VariableDefinePlatformVar(pc, NULL, "ETIME", &pc->IntType, (union AnyValue *)&ETIMEValue, FALSE); +#endif + +#ifdef ETIMEDOUT + VariableDefinePlatformVar(pc, NULL, "ETIMEDOUT", &pc->IntType, (union AnyValue *)&ETIMEDOUTValue, FALSE); +#endif + +#ifdef ETXTBSY + VariableDefinePlatformVar(pc, NULL, "ETXTBSY", &pc->IntType, (union AnyValue *)&ETXTBSYValue, FALSE); +#endif + +#ifdef EWOULDBLOCK + VariableDefinePlatformVar(pc, NULL, "EWOULDBLOCK", &pc->IntType, (union AnyValue *)&EWOULDBLOCKValue, FALSE); +#endif + +#ifdef EXDEV + VariableDefinePlatformVar(pc, NULL, "EXDEV", &pc->IntType, (union AnyValue *)&EXDEVValue, FALSE); +#endif + + VariableDefinePlatformVar(pc, NULL, "errno", &pc->IntType, (union AnyValue *)&errno, TRUE); +} + +#endif /* !BUILTIN_MINI_STDLIB */ diff --git a/src/cstdlib/errno.o b/src/cstdlib/errno.o new file mode 100644 index 0000000..04d284a Binary files /dev/null and b/src/cstdlib/errno.o differ diff --git a/src/cstdlib/math.c b/src/cstdlib/math.c new file mode 100644 index 0000000..d89e3dc --- /dev/null +++ b/src/cstdlib/math.c @@ -0,0 +1,187 @@ +/* stdio.h library for large systems - small embedded systems use clibrary.c instead */ +#include "../interpreter.h" + +#ifndef BUILTIN_MINI_STDLIB +#ifndef NO_FP + +static double M_EValue = 2.7182818284590452354; /* e */ +static double M_LOG2EValue = 1.4426950408889634074; /* log_2 e */ +static double M_LOG10EValue = 0.43429448190325182765; /* log_10 e */ +static double M_LN2Value = 0.69314718055994530942; /* log_e 2 */ +static double M_LN10Value = 2.30258509299404568402; /* log_e 10 */ +static double M_PIValue = 3.14159265358979323846; /* pi */ +static double M_PI_2Value = 1.57079632679489661923; /* pi/2 */ +static double M_PI_4Value = 0.78539816339744830962; /* pi/4 */ +static double M_1_PIValue = 0.31830988618379067154; /* 1/pi */ +static double M_2_PIValue = 0.63661977236758134308; /* 2/pi */ +static double M_2_SQRTPIValue = 1.12837916709551257390; /* 2/sqrt(pi) */ +static double M_SQRT2Value = 1.41421356237309504880; /* sqrt(2) */ +static double M_SQRT1_2Value = 0.70710678118654752440; /* 1/sqrt(2) */ + + +void MathSin(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->FP = sin(Param[0]->Val->FP); +} + +void MathCos(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->FP = cos(Param[0]->Val->FP); +} + +void MathTan(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->FP = tan(Param[0]->Val->FP); +} + +void MathAsin(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->FP = asin(Param[0]->Val->FP); +} + +void MathAcos(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->FP = acos(Param[0]->Val->FP); +} + +void MathAtan(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->FP = atan(Param[0]->Val->FP); +} + +void MathAtan2(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->FP = atan2(Param[0]->Val->FP, Param[1]->Val->FP); +} + +void MathSinh(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->FP = sinh(Param[0]->Val->FP); +} + +void MathCosh(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->FP = cosh(Param[0]->Val->FP); +} + +void MathTanh(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->FP = tanh(Param[0]->Val->FP); +} + +void MathExp(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->FP = exp(Param[0]->Val->FP); +} + +void MathFabs(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->FP = fabs(Param[0]->Val->FP); +} + +void MathFmod(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->FP = fmod(Param[0]->Val->FP, Param[1]->Val->FP); +} + +void MathFrexp(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->FP = frexp(Param[0]->Val->FP, Param[1]->Val->Pointer); +} + +void MathLdexp(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->FP = ldexp(Param[0]->Val->FP, Param[1]->Val->Integer); +} + +void MathLog(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->FP = log(Param[0]->Val->FP); +} + +void MathLog10(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->FP = log10(Param[0]->Val->FP); +} + +void MathModf(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->FP = modf(Param[0]->Val->FP, Param[0]->Val->Pointer); +} + +void MathPow(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->FP = pow(Param[0]->Val->FP, Param[1]->Val->FP); +} + +void MathSqrt(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->FP = sqrt(Param[0]->Val->FP); +} + +void MathRound(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + /* this awkward definition of "round()" due to it being inconsistently + * declared in math.h */ + ReturnValue->Val->FP = ceil(Param[0]->Val->FP - 0.5); +} + +void MathCeil(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->FP = ceil(Param[0]->Val->FP); +} + +void MathFloor(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->FP = floor(Param[0]->Val->FP); +} + +/* all math.h functions */ +struct LibraryFunction MathFunctions[] = +{ + { MathAcos, "float acos(float);" }, + { MathAsin, "float asin(float);" }, + { MathAtan, "float atan(float);" }, + { MathAtan2, "float atan2(float, float);" }, + { MathCeil, "float ceil(float);" }, + { MathCos, "float cos(float);" }, + { MathCosh, "float cosh(float);" }, + { MathExp, "float exp(float);" }, + { MathFabs, "float fabs(float);" }, + { MathFloor, "float floor(float);" }, + { MathFmod, "float fmod(float, float);" }, + { MathFrexp, "float frexp(float, int *);" }, + { MathLdexp, "float ldexp(float, int);" }, + { MathLog, "float log(float);" }, + { MathLog10, "float log10(float);" }, + { MathModf, "float modf(float, float *);" }, + { MathPow, "float pow(float,float);" }, + { MathRound, "float round(float);" }, + { MathSin, "float sin(float);" }, + { MathSinh, "float sinh(float);" }, + { MathSqrt, "float sqrt(float);" }, + { MathTan, "float tan(float);" }, + { MathTanh, "float tanh(float);" }, + { NULL, NULL } +}; + +/* creates various system-dependent definitions */ +void MathSetupFunc(Picoc *pc) +{ + VariableDefinePlatformVar(pc, NULL, "M_E", &pc->FPType, (union AnyValue *)&M_EValue, FALSE); + VariableDefinePlatformVar(pc, NULL, "M_LOG2E", &pc->FPType, (union AnyValue *)&M_LOG2EValue, FALSE); + VariableDefinePlatformVar(pc, NULL, "M_LOG10E", &pc->FPType, (union AnyValue *)&M_LOG10EValue, FALSE); + VariableDefinePlatformVar(pc, NULL, "M_LN2", &pc->FPType, (union AnyValue *)&M_LN2Value, FALSE); + VariableDefinePlatformVar(pc, NULL, "M_LN10", &pc->FPType, (union AnyValue *)&M_LN10Value, FALSE); + VariableDefinePlatformVar(pc, NULL, "M_PI", &pc->FPType, (union AnyValue *)&M_PIValue, FALSE); + VariableDefinePlatformVar(pc, NULL, "M_PI_2", &pc->FPType, (union AnyValue *)&M_PI_2Value, FALSE); + VariableDefinePlatformVar(pc, NULL, "M_PI_4", &pc->FPType, (union AnyValue *)&M_PI_4Value, FALSE); + VariableDefinePlatformVar(pc, NULL, "M_1_PI", &pc->FPType, (union AnyValue *)&M_1_PIValue, FALSE); + VariableDefinePlatformVar(pc, NULL, "M_2_PI", &pc->FPType, (union AnyValue *)&M_2_PIValue, FALSE); + VariableDefinePlatformVar(pc, NULL, "M_2_SQRTPI", &pc->FPType, (union AnyValue *)&M_2_SQRTPIValue, FALSE); + VariableDefinePlatformVar(pc, NULL, "M_SQRT2", &pc->FPType, (union AnyValue *)&M_SQRT2Value, FALSE); + VariableDefinePlatformVar(pc, NULL, "M_SQRT1_2", &pc->FPType, (union AnyValue *)&M_SQRT1_2Value, FALSE); +} + +#endif /* !NO_FP */ +#endif /* !BUILTIN_MINI_STDLIB */ diff --git a/src/cstdlib/math.o b/src/cstdlib/math.o new file mode 100644 index 0000000..b39b5e5 Binary files /dev/null and b/src/cstdlib/math.o differ diff --git a/src/cstdlib/stdbool.c b/src/cstdlib/stdbool.c new file mode 100644 index 0000000..5121eff --- /dev/null +++ b/src/cstdlib/stdbool.c @@ -0,0 +1,22 @@ +/* string.h library for large systems - small embedded systems use clibrary.c instead */ +#include "../interpreter.h" + +#ifndef BUILTIN_MINI_STDLIB + +static int trueValue = 1; +static int falseValue = 0; + + +/* structure definitions */ +const char StdboolDefs[] = "typedef int bool;"; + +/* creates various system-dependent definitions */ +void StdboolSetupFunc(Picoc *pc) +{ + /* defines */ + VariableDefinePlatformVar(pc, NULL, "true", &pc->IntType, (union AnyValue *)&trueValue, FALSE); + VariableDefinePlatformVar(pc, NULL, "false", &pc->IntType, (union AnyValue *)&falseValue, FALSE); + VariableDefinePlatformVar(pc, NULL, "__bool_true_false_are_defined", &pc->IntType, (union AnyValue *)&trueValue, FALSE); +} + +#endif /* !BUILTIN_MINI_STDLIB */ diff --git a/src/cstdlib/stdbool.o b/src/cstdlib/stdbool.o new file mode 100644 index 0000000..51695a4 Binary files /dev/null and b/src/cstdlib/stdbool.o differ diff --git a/src/cstdlib/stdio.c b/src/cstdlib/stdio.c new file mode 100644 index 0000000..de58ab8 --- /dev/null +++ b/src/cstdlib/stdio.c @@ -0,0 +1,739 @@ +/* stdio.h library for large systems - small embedded systems use clibrary.c instead */ +#ifndef BUILTIN_MINI_STDLIB + +#include +#include "../interpreter.h" + +#define MAX_FORMAT 80 +#define MAX_SCANF_ARGS 10 + +static int Stdio_ZeroValue = 0; +static int EOFValue = EOF; +static int SEEK_SETValue = SEEK_SET; +static int SEEK_CURValue = SEEK_CUR; +static int SEEK_ENDValue = SEEK_END; +static int BUFSIZValue = BUFSIZ; +static int FILENAME_MAXValue = FILENAME_MAX; +static int _IOFBFValue = _IOFBF; +static int _IOLBFValue = _IOLBF; +static int _IONBFValue = _IONBF; +static int L_tmpnamValue = L_tmpnam; +static int GETS_MAXValue = 255; /* arbitrary maximum size of a gets() file */ + +static FILE *stdinValue; +static FILE *stdoutValue; +static FILE *stderrValue; + + +/* our own internal output stream which can output to FILE * or strings */ +typedef struct StdOutStreamStruct +{ + FILE *FilePtr; + char *StrOutPtr; + int StrOutLen; + int CharCount; + +} StdOutStream; + +/* our representation of varargs within picoc */ +struct StdVararg +{ + struct Value **Param; + int NumArgs; +}; + +/* initialises the I/O system so error reporting works */ +void BasicIOInit(Picoc *pc) +{ + pc->CStdOut = stdout; + stdinValue = stdin; + stdoutValue = stdout; + stderrValue = stderr; +} + +/* output a single character to either a FILE * or a string */ +void StdioOutPutc(int OutCh, StdOutStream *Stream) +{ + if (Stream->FilePtr != NULL) + { + /* output to stdio stream */ + putc(OutCh, Stream->FilePtr); + Stream->CharCount++; + } + else if (Stream->StrOutLen < 0 || Stream->StrOutLen > 1) + { + /* output to a string */ + *Stream->StrOutPtr = OutCh; + Stream->StrOutPtr++; + + if (Stream->StrOutLen > 1) + Stream->StrOutLen--; + + Stream->CharCount++; + } +} + +/* output a string to either a FILE * or a string */ +void StdioOutPuts(const char *Str, StdOutStream *Stream) +{ + if (Stream->FilePtr != NULL) + { + /* output to stdio stream */ + fputs(Str, Stream->FilePtr); + } + else + { + /* output to a string */ + while (*Str != '\0') + { + if (Stream->StrOutLen < 0 || Stream->StrOutLen > 1) + { + /* output to a string */ + *Stream->StrOutPtr = *Str; + Str++; + Stream->StrOutPtr++; + + if (Stream->StrOutLen > 1) + Stream->StrOutLen--; + + Stream->CharCount++; + } + } + } +} + +/* printf-style format of an int or other word-sized object */ +void StdioFprintfWord(StdOutStream *Stream, const char *Format, unsigned long Value) +{ + if (Stream->FilePtr != NULL) + Stream->CharCount += fprintf(Stream->FilePtr, Format, Value); + + else if (Stream->StrOutLen >= 0) + { +#ifndef WIN32 + int CCount = snprintf(Stream->StrOutPtr, Stream->StrOutLen, Format, Value); +#else + int CCount = _snprintf(Stream->StrOutPtr, Stream->StrOutLen, Format, Value); +#endif + Stream->StrOutPtr += CCount; + Stream->StrOutLen -= CCount; + Stream->CharCount += CCount; + } + else + { + int CCount = sprintf(Stream->StrOutPtr, Format, Value); + Stream->CharCount += CCount; + Stream->StrOutPtr += CCount; + } +} + +/* printf-style format of a floating point number */ +void StdioFprintfFP(StdOutStream *Stream, const char *Format, double Value) +{ + if (Stream->FilePtr != NULL) + Stream->CharCount += fprintf(Stream->FilePtr, Format, Value); + + else if (Stream->StrOutLen >= 0) + { +#ifndef WIN32 + int CCount = snprintf(Stream->StrOutPtr, Stream->StrOutLen, Format, Value); +#else + int CCount = _snprintf(Stream->StrOutPtr, Stream->StrOutLen, Format, Value); +#endif + Stream->StrOutPtr += CCount; + Stream->StrOutLen -= CCount; + Stream->CharCount += CCount; + } + else + { + int CCount = sprintf(Stream->StrOutPtr, Format, Value); + Stream->CharCount += CCount; + Stream->StrOutPtr += CCount; + } +} + +/* printf-style format of a pointer */ +void StdioFprintfPointer(StdOutStream *Stream, const char *Format, void *Value) +{ + if (Stream->FilePtr != NULL) + Stream->CharCount += fprintf(Stream->FilePtr, Format, Value); + + else if (Stream->StrOutLen >= 0) + { +#ifndef WIN32 + int CCount = snprintf(Stream->StrOutPtr, Stream->StrOutLen, Format, Value); +#else + int CCount = _snprintf(Stream->StrOutPtr, Stream->StrOutLen, Format, Value); +#endif + Stream->StrOutPtr += CCount; + Stream->StrOutLen -= CCount; + Stream->CharCount += CCount; + } + else + { + int CCount = sprintf(Stream->StrOutPtr, Format, Value); + Stream->CharCount += CCount; + Stream->StrOutPtr += CCount; + } +} + +/* internal do-anything v[s][n]printf() formatting system with output to strings or FILE * */ +int StdioBasePrintf(struct ParseState *Parser, FILE *Stream, char *StrOut, int StrOutLen, char *Format, struct StdVararg *Args) +{ + struct Value *ThisArg = Args->Param[0]; + int ArgCount = 0; + char *FPos; + char OneFormatBuf[MAX_FORMAT+1]; + int OneFormatCount; + struct ValueType *ShowType; + StdOutStream SOStream; + Picoc *pc = Parser->pc; + + if (Format == NULL) + Format = "[null format]\n"; + + FPos = Format; + SOStream.FilePtr = Stream; + SOStream.StrOutPtr = StrOut; + SOStream.StrOutLen = StrOutLen; + SOStream.CharCount = 0; + + while (*FPos != '\0') + { + if (*FPos == '%') + { + /* work out what type we're printing */ + FPos++; + ShowType = NULL; + OneFormatBuf[0] = '%'; + OneFormatCount = 1; + + do + { + switch (*FPos) + { + case 'd': case 'i': ShowType = &pc->IntType; break; /* integer decimal */ + case 'o': case 'u': case 'x': case 'X': ShowType = &pc->IntType; break; /* integer base conversions */ +#ifndef NO_FP + case 'e': case 'E': ShowType = &pc->FPType; break; /* double, exponent form */ + case 'f': case 'F': ShowType = &pc->FPType; break; /* double, fixed-point */ + case 'g': case 'G': ShowType = &pc->FPType; break; /* double, flexible format */ +#endif + case 'a': case 'A': ShowType = &pc->IntType; break; /* hexadecimal, 0x- format */ + case 'c': ShowType = &pc->IntType; break; /* character */ + case 's': ShowType = pc->CharPtrType; break; /* string */ + case 'p': ShowType = pc->VoidPtrType; break; /* pointer */ + case 'n': ShowType = &pc->VoidType; break; /* number of characters written */ + case 'm': ShowType = &pc->VoidType; break; /* strerror(errno) */ + case '%': ShowType = &pc->VoidType; break; /* just a '%' character */ + case '\0': ShowType = &pc->VoidType; break; /* end of format string */ + } + + /* copy one character of format across to the OneFormatBuf */ + OneFormatBuf[OneFormatCount] = *FPos; + OneFormatCount++; + + /* do special actions depending on the conversion type */ + if (ShowType == &pc->VoidType) + { + switch (*FPos) + { + case 'm': StdioOutPuts(strerror(errno), &SOStream); break; + case '%': StdioOutPutc(*FPos, &SOStream); break; + case '\0': OneFormatBuf[OneFormatCount] = '\0'; StdioOutPutc(*FPos, &SOStream); break; + case 'n': + ThisArg = (struct Value *)((char *)ThisArg + MEM_ALIGN(sizeof(struct Value) + TypeStackSizeValue(ThisArg))); + if (ThisArg->Typ->Base == TypeArray && ThisArg->Typ->FromType->Base == TypeInt) + *(int *)ThisArg->Val->Pointer = SOStream.CharCount; + break; + } + } + + FPos++; + + } while (ShowType == NULL && OneFormatCount < MAX_FORMAT); + + if (ShowType != &pc->VoidType) + { + if (ArgCount >= Args->NumArgs) + StdioOutPuts("XXX", &SOStream); + else + { + /* null-terminate the buffer */ + OneFormatBuf[OneFormatCount] = '\0'; + + /* print this argument */ + ThisArg = (struct Value *)((char *)ThisArg + MEM_ALIGN(sizeof(struct Value) + TypeStackSizeValue(ThisArg))); + if (ShowType == &pc->IntType) + { + /* show a signed integer */ + if (IS_NUMERIC_COERCIBLE(ThisArg)) + StdioFprintfWord(&SOStream, OneFormatBuf, ExpressionCoerceUnsignedInteger(ThisArg)); + else + StdioOutPuts("XXX", &SOStream); + } +#ifndef NO_FP + else if (ShowType == &pc->FPType) + { + /* show a floating point number */ + if (IS_NUMERIC_COERCIBLE(ThisArg)) + StdioFprintfFP(&SOStream, OneFormatBuf, ExpressionCoerceFP(ThisArg)); + else + StdioOutPuts("XXX", &SOStream); + } +#endif + else if (ShowType == pc->CharPtrType) + { + if (ThisArg->Typ->Base == TypePointer) + StdioFprintfPointer(&SOStream, OneFormatBuf, ThisArg->Val->Pointer); + + else if (ThisArg->Typ->Base == TypeArray && ThisArg->Typ->FromType->Base == TypeChar) + StdioFprintfPointer(&SOStream, OneFormatBuf, &ThisArg->Val->ArrayMem[0]); + + else + StdioOutPuts("XXX", &SOStream); + } + else if (ShowType == pc->VoidPtrType) + { + if (ThisArg->Typ->Base == TypePointer) + StdioFprintfPointer(&SOStream, OneFormatBuf, ThisArg->Val->Pointer); + + else if (ThisArg->Typ->Base == TypeArray) + StdioFprintfPointer(&SOStream, OneFormatBuf, &ThisArg->Val->ArrayMem[0]); + + else + StdioOutPuts("XXX", &SOStream); + } + + ArgCount++; + } + } + } + else + { + /* just output a normal character */ + StdioOutPutc(*FPos, &SOStream); + FPos++; + } + } + + /* null-terminate */ + if (SOStream.StrOutPtr != NULL && SOStream.StrOutLen > 0) + *SOStream.StrOutPtr = '\0'; + + return SOStream.CharCount; +} + +/* internal do-anything v[s][n]scanf() formatting system with input from strings or FILE * */ +int StdioBaseScanf(struct ParseState *Parser, FILE *Stream, char *StrIn, char *Format, struct StdVararg *Args) +{ + struct Value *ThisArg = Args->Param[0]; + int ArgCount = 0; + void *ScanfArg[MAX_SCANF_ARGS]; + + if (Args->NumArgs > MAX_SCANF_ARGS) + ProgramFail(Parser, "too many arguments to scanf() - %d max", MAX_SCANF_ARGS); + + for (ArgCount = 0; ArgCount < Args->NumArgs; ArgCount++) + { + ThisArg = (struct Value *)((char *)ThisArg + MEM_ALIGN(sizeof(struct Value) + TypeStackSizeValue(ThisArg))); + + if (ThisArg->Typ->Base == TypePointer) + ScanfArg[ArgCount] = ThisArg->Val->Pointer; + + else if (ThisArg->Typ->Base == TypeArray) + ScanfArg[ArgCount] = &ThisArg->Val->ArrayMem[0]; + + else + ProgramFail(Parser, "non-pointer argument to scanf() - argument %d after format", ArgCount+1); + } + + if (Stream != NULL) + return fscanf(Stream, Format, ScanfArg[0], ScanfArg[1], ScanfArg[2], ScanfArg[3], ScanfArg[4], ScanfArg[5], ScanfArg[6], ScanfArg[7], ScanfArg[8], ScanfArg[9]); + else + return sscanf(StrIn, Format, ScanfArg[0], ScanfArg[1], ScanfArg[2], ScanfArg[3], ScanfArg[4], ScanfArg[5], ScanfArg[6], ScanfArg[7], ScanfArg[8], ScanfArg[9]); +} + +/* stdio calls */ +void StdioFopen(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Pointer = fopen(Param[0]->Val->Pointer, Param[1]->Val->Pointer); +} + +void StdioFreopen(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Pointer = freopen(Param[0]->Val->Pointer, Param[1]->Val->Pointer, Param[2]->Val->Pointer); +} + +void StdioFclose(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = fclose(Param[0]->Val->Pointer); +} + +void StdioFread(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = fread(Param[0]->Val->Pointer, Param[1]->Val->Integer, Param[2]->Val->Integer, Param[3]->Val->Pointer); +} + +void StdioFwrite(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = fwrite(Param[0]->Val->Pointer, Param[1]->Val->Integer, Param[2]->Val->Integer, Param[3]->Val->Pointer); +} + +void StdioFgetc(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = fgetc(Param[0]->Val->Pointer); +} + +void StdioFgets(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Pointer = fgets(Param[0]->Val->Pointer, Param[1]->Val->Integer, Param[2]->Val->Pointer); +} + +void StdioRemove(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = remove(Param[0]->Val->Pointer); +} + +void StdioRename(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = rename(Param[0]->Val->Pointer, Param[1]->Val->Pointer); +} + +void StdioRewind(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + rewind(Param[0]->Val->Pointer); +} + +void StdioTmpfile(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Pointer = tmpfile(); +} + +void StdioClearerr(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + clearerr((FILE *)Param[0]->Val->Pointer); +} + +void StdioFeof(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = feof((FILE *)Param[0]->Val->Pointer); +} + +void StdioFerror(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = ferror((FILE *)Param[0]->Val->Pointer); +} + +void StdioFileno(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ +#ifndef WIN32 + ReturnValue->Val->Integer = fileno(Param[0]->Val->Pointer); +#else + ReturnValue->Val->Integer = _fileno((FILE*)Param[0]->Val->Pointer); +#endif +} + +void StdioFflush(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = fflush(Param[0]->Val->Pointer); +} + +void StdioFgetpos(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = fgetpos(Param[0]->Val->Pointer, Param[1]->Val->Pointer); +} + +void StdioFsetpos(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = fsetpos(Param[0]->Val->Pointer, Param[1]->Val->Pointer); +} + +void StdioFputc(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = fputc(Param[0]->Val->Integer, Param[1]->Val->Pointer); +} + +void StdioFputs(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = fputs(Param[0]->Val->Pointer, Param[1]->Val->Pointer); +} + +void StdioFtell(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = ftell(Param[0]->Val->Pointer); +} + +void StdioFseek(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = fseek(Param[0]->Val->Pointer, Param[1]->Val->Integer, Param[2]->Val->Integer); +} + +void StdioPerror(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + perror(Param[0]->Val->Pointer); +} + +void StdioPutc(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = putc(Param[0]->Val->Integer, Param[1]->Val->Pointer); +} + +void StdioPutchar(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = putchar(Param[0]->Val->Integer); +} + +void StdioSetbuf(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + setbuf(Param[0]->Val->Pointer, Param[1]->Val->Pointer); +} + +void StdioSetvbuf(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + setvbuf(Param[0]->Val->Pointer, Param[1]->Val->Pointer, Param[2]->Val->Integer, Param[3]->Val->Integer); +} + +void StdioUngetc(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = ungetc(Param[0]->Val->Integer, Param[1]->Val->Pointer); +} + +void StdioPuts(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = puts(Param[0]->Val->Pointer); +} + +void StdioGets(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Pointer = fgets(Param[0]->Val->Pointer, GETS_MAXValue, stdin); + if (ReturnValue->Val->Pointer != NULL) + { + char *EOLPos = strchr(Param[0]->Val->Pointer, '\n'); + if (EOLPos != NULL) + *EOLPos = '\0'; + } +} + +void StdioGetchar(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = getchar(); +} + +void StdioPrintf(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + struct StdVararg PrintfArgs; + + PrintfArgs.Param = Param; + PrintfArgs.NumArgs = NumArgs-1; + ReturnValue->Val->Integer = StdioBasePrintf(Parser, stdout, NULL, 0, Param[0]->Val->Pointer, &PrintfArgs); +} + +void StdioVprintf(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = StdioBasePrintf(Parser, stdout, NULL, 0, Param[0]->Val->Pointer, Param[1]->Val->Pointer); +} + +void StdioFprintf(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + struct StdVararg PrintfArgs; + + PrintfArgs.Param = Param + 1; + PrintfArgs.NumArgs = NumArgs-2; + ReturnValue->Val->Integer = StdioBasePrintf(Parser, Param[0]->Val->Pointer, NULL, 0, Param[1]->Val->Pointer, &PrintfArgs); +} + +void StdioVfprintf(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = StdioBasePrintf(Parser, Param[0]->Val->Pointer, NULL, 0, Param[1]->Val->Pointer, Param[2]->Val->Pointer); +} + +void StdioSprintf(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + struct StdVararg PrintfArgs; + + PrintfArgs.Param = Param + 1; + PrintfArgs.NumArgs = NumArgs-2; + ReturnValue->Val->Integer = StdioBasePrintf(Parser, NULL, Param[0]->Val->Pointer, -1, Param[1]->Val->Pointer, &PrintfArgs); +} + +void StdioSnprintf(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + struct StdVararg PrintfArgs; + + PrintfArgs.Param = Param+2; + PrintfArgs.NumArgs = NumArgs-3; + ReturnValue->Val->Integer = StdioBasePrintf(Parser, NULL, Param[0]->Val->Pointer, Param[1]->Val->Integer, Param[2]->Val->Pointer, &PrintfArgs); +} + +void StdioScanf(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + struct StdVararg ScanfArgs; + + ScanfArgs.Param = Param; + ScanfArgs.NumArgs = NumArgs-1; + ReturnValue->Val->Integer = StdioBaseScanf(Parser, stdin, NULL, Param[0]->Val->Pointer, &ScanfArgs); +} + +void StdioFscanf(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + struct StdVararg ScanfArgs; + + ScanfArgs.Param = Param+1; + ScanfArgs.NumArgs = NumArgs-2; + ReturnValue->Val->Integer = StdioBaseScanf(Parser, Param[0]->Val->Pointer, NULL, Param[1]->Val->Pointer, &ScanfArgs); +} + +void StdioSscanf(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + struct StdVararg ScanfArgs; + + ScanfArgs.Param = Param+1; + ScanfArgs.NumArgs = NumArgs-2; + ReturnValue->Val->Integer = StdioBaseScanf(Parser, NULL, Param[0]->Val->Pointer, Param[1]->Val->Pointer, &ScanfArgs); +} + +void StdioVsprintf(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = StdioBasePrintf(Parser, NULL, Param[0]->Val->Pointer, -1, Param[1]->Val->Pointer, Param[2]->Val->Pointer); +} + +void StdioVsnprintf(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = StdioBasePrintf(Parser, NULL, Param[0]->Val->Pointer, Param[1]->Val->Integer, Param[2]->Val->Pointer, Param[3]->Val->Pointer); +} + +void StdioVscanf(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = StdioBaseScanf(Parser, stdin, NULL, Param[0]->Val->Pointer, Param[1]->Val->Pointer); +} + +void StdioVfscanf(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = StdioBaseScanf(Parser, Param[0]->Val->Pointer, NULL, Param[1]->Val->Pointer, Param[2]->Val->Pointer); +} + +void StdioVsscanf(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = StdioBaseScanf(Parser, NULL, Param[0]->Val->Pointer, Param[1]->Val->Pointer, Param[2]->Val->Pointer); +} + +/* handy structure definitions */ +const char StdioDefs[] = "\ +typedef struct __va_listStruct va_list; \ +typedef struct __FILEStruct FILE;\ +"; + +/* all stdio functions */ +struct LibraryFunction StdioFunctions[] = +{ + { StdioFopen, "FILE *fopen(char *, char *);" }, + { StdioFreopen, "FILE *freopen(char *, char *, FILE *);" }, + { StdioFclose, "int fclose(FILE *);" }, + { StdioFread, "int fread(void *, int, int, FILE *);" }, + { StdioFwrite, "int fwrite(void *, int, int, FILE *);" }, + { StdioFgetc, "int fgetc(FILE *);" }, + { StdioFgetc, "int getc(FILE *);" }, + { StdioFgets, "char *fgets(char *, int, FILE *);" }, + { StdioFputc, "int fputc(int, FILE *);" }, + { StdioFputs, "int fputs(char *, FILE *);" }, + { StdioRemove, "int remove(char *);" }, + { StdioRename, "int rename(char *, char *);" }, + { StdioRewind, "void rewind(FILE *);" }, + { StdioTmpfile, "FILE *tmpfile();" }, + { StdioClearerr,"void clearerr(FILE *);" }, + { StdioFeof, "int feof(FILE *);" }, + { StdioFerror, "int ferror(FILE *);" }, + { StdioFileno, "int fileno(FILE *);" }, + { StdioFflush, "int fflush(FILE *);" }, + { StdioFgetpos, "int fgetpos(FILE *, int *);" }, + { StdioFsetpos, "int fsetpos(FILE *, int *);" }, + { StdioFtell, "int ftell(FILE *);" }, + { StdioFseek, "int fseek(FILE *, int, int);" }, + { StdioPerror, "void perror(char *);" }, + { StdioPutc, "int putc(char *, FILE *);" }, + { StdioPutchar, "int putchar(int);" }, + { StdioPutchar, "int fputchar(int);" }, + { StdioSetbuf, "void setbuf(FILE *, char *);" }, + { StdioSetvbuf, "void setvbuf(FILE *, char *, int, int);" }, + { StdioUngetc, "int ungetc(int, FILE *);" }, + { StdioPuts, "int puts(char *);" }, + { StdioGets, "char *gets(char *);" }, + { StdioGetchar, "int getchar();" }, + { StdioPrintf, "int printf(char *, ...);" }, + { StdioFprintf, "int fprintf(FILE *, char *, ...);" }, + { StdioSprintf, "int sprintf(char *, char *, ...);" }, + { StdioSnprintf,"int snprintf(char *, int, char *, ...);" }, + { StdioScanf, "int scanf(char *, ...);" }, + { StdioFscanf, "int fscanf(FILE *, char *, ...);" }, + { StdioSscanf, "int sscanf(char *, char *, ...);" }, + { StdioVprintf, "int vprintf(char *, va_list);" }, + { StdioVfprintf,"int vfprintf(FILE *, char *, va_list);" }, + { StdioVsprintf,"int vsprintf(char *, char *, va_list);" }, + { StdioVsnprintf,"int vsnprintf(char *, int, char *, va_list);" }, + { StdioVscanf, "int vscanf(char *, va_list);" }, + { StdioVfscanf, "int vfscanf(FILE *, char *, va_list);" }, + { StdioVsscanf, "int vsscanf(char *, char *, va_list);" }, + { NULL, NULL } +}; + +/* creates various system-dependent definitions */ +void StdioSetupFunc(Picoc *pc) +{ + struct ValueType *StructFileType; + struct ValueType *FilePtrType; + + /* make a "struct __FILEStruct" which is the same size as a native FILE structure */ + StructFileType = TypeCreateOpaqueStruct(pc, NULL, TableStrRegister(pc, "__FILEStruct"), sizeof(FILE)); + + /* get a FILE * type */ + FilePtrType = TypeGetMatching(pc, NULL, StructFileType, TypePointer, 0, pc->StrEmpty, TRUE); + + /* make a "struct __va_listStruct" which is the same size as our struct StdVararg */ + TypeCreateOpaqueStruct(pc, NULL, TableStrRegister(pc, "__va_listStruct"), sizeof(FILE)); + + /* define EOF equal to the system EOF */ + VariableDefinePlatformVar(pc, NULL, "EOF", &pc->IntType, (union AnyValue *)&EOFValue, FALSE); + VariableDefinePlatformVar(pc, NULL, "SEEK_SET", &pc->IntType, (union AnyValue *)&SEEK_SETValue, FALSE); + VariableDefinePlatformVar(pc, NULL, "SEEK_CUR", &pc->IntType, (union AnyValue *)&SEEK_CURValue, FALSE); + VariableDefinePlatformVar(pc, NULL, "SEEK_END", &pc->IntType, (union AnyValue *)&SEEK_ENDValue, FALSE); + VariableDefinePlatformVar(pc, NULL, "BUFSIZ", &pc->IntType, (union AnyValue *)&BUFSIZValue, FALSE); + VariableDefinePlatformVar(pc, NULL, "FILENAME_MAX", &pc->IntType, (union AnyValue *)&FILENAME_MAXValue, FALSE); + VariableDefinePlatformVar(pc, NULL, "_IOFBF", &pc->IntType, (union AnyValue *)&_IOFBFValue, FALSE); + VariableDefinePlatformVar(pc, NULL, "_IOLBF", &pc->IntType, (union AnyValue *)&_IOLBFValue, FALSE); + VariableDefinePlatformVar(pc, NULL, "_IONBF", &pc->IntType, (union AnyValue *)&_IONBFValue, FALSE); + VariableDefinePlatformVar(pc, NULL, "L_tmpnam", &pc->IntType, (union AnyValue *)&L_tmpnamValue, FALSE); + VariableDefinePlatformVar(pc, NULL, "GETS_MAX", &pc->IntType, (union AnyValue *)&GETS_MAXValue, FALSE); + + /* define stdin, stdout and stderr */ + VariableDefinePlatformVar(pc, NULL, "stdin", FilePtrType, (union AnyValue *)&stdinValue, FALSE); + VariableDefinePlatformVar(pc, NULL, "stdout", FilePtrType, (union AnyValue *)&stdoutValue, FALSE); + VariableDefinePlatformVar(pc, NULL, "stderr", FilePtrType, (union AnyValue *)&stderrValue, FALSE); + + /* define NULL, TRUE and FALSE */ + if (!VariableDefined(pc, TableStrRegister(pc, "NULL"))) + VariableDefinePlatformVar(pc, NULL, "NULL", &pc->IntType, (union AnyValue *)&Stdio_ZeroValue, FALSE); +} + +/* portability-related I/O calls */ +void PrintCh(char OutCh, FILE *Stream) +{ + putc(OutCh, Stream); +} + +void PrintSimpleInt(long Num, FILE *Stream) +{ + fprintf(Stream, "%ld", Num); +} + +void PrintStr(const char *Str, FILE *Stream) +{ + fputs(Str, Stream); +} + +void PrintFP(double Num, FILE *Stream) +{ + fprintf(Stream, "%f", Num); +} + +#endif /* !BUILTIN_MINI_STDLIB */ diff --git a/src/cstdlib/stdio.o b/src/cstdlib/stdio.o new file mode 100644 index 0000000..c53a8d6 Binary files /dev/null and b/src/cstdlib/stdio.o differ diff --git a/src/cstdlib/stdlib.c b/src/cstdlib/stdlib.c new file mode 100644 index 0000000..91e1a38 --- /dev/null +++ b/src/cstdlib/stdlib.c @@ -0,0 +1,174 @@ +/* stdlib.h library for large systems - small embedded systems use clibrary.c instead */ +#include "../interpreter.h" + +#ifndef BUILTIN_MINI_STDLIB + +static int Stdlib_ZeroValue = 0; + +#ifndef NO_FP +void StdlibAtof(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->FP = atof(Param[0]->Val->Pointer); +} +#endif + +void StdlibAtoi(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = atoi(Param[0]->Val->Pointer); +} + +void StdlibAtol(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = atol(Param[0]->Val->Pointer); +} + +#ifndef NO_FP +void StdlibStrtod(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->FP = strtod(Param[0]->Val->Pointer, Param[1]->Val->Pointer); +} +#endif + +void StdlibStrtol(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = strtol(Param[0]->Val->Pointer, Param[1]->Val->Pointer, Param[2]->Val->Integer); +} + +void StdlibStrtoul(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = strtoul(Param[0]->Val->Pointer, Param[1]->Val->Pointer, Param[2]->Val->Integer); +} + +void StdlibMalloc(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Pointer = malloc(Param[0]->Val->Integer); +} + +void StdlibCalloc(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Pointer = calloc(Param[0]->Val->Integer, Param[1]->Val->Integer); +} + +void StdlibRealloc(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Pointer = realloc(Param[0]->Val->Pointer, Param[1]->Val->Integer); +} + +void StdlibFree(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + free(Param[0]->Val->Pointer); +} + +void StdlibRand(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = rand(); +} + +void StdlibSrand(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + srand(Param[0]->Val->Integer); +} + +void StdlibAbort(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ProgramFail(Parser, "abort"); +} + +void StdlibExit(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + PlatformExit(Parser->pc, Param[0]->Val->Integer); +} + +void StdlibGetenv(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Pointer = getenv(Param[0]->Val->Pointer); +} + +void StdlibSystem(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = system(Param[0]->Val->Pointer); +} + +#if 0 +void StdlibBsearch(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Pointer = bsearch(Param[0]->Val->Pointer, Param[1]->Val->Pointer, Param[2]->Val->Integer, Param[3]->Val->Integer, (int (*)())Param[4]->Val->Pointer); +} +#endif + +void StdlibAbs(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = abs(Param[0]->Val->Integer); +} + +void StdlibLabs(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = labs(Param[0]->Val->Integer); +} + +#if 0 +void StdlibDiv(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = div(Param[0]->Val->Integer, Param[1]->Val->Integer); +} + +void StdlibLdiv(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = ldiv(Param[0]->Val->Integer, Param[1]->Val->Integer); +} +#endif + +#if 0 +/* handy structure definitions */ +const char StdlibDefs[] = "\ +typedef struct { \ + int quot, rem; \ +} div_t; \ +\ +typedef struct { \ + int quot, rem; \ +} ldiv_t; \ +"; +#endif + +/* all stdlib.h functions */ +struct LibraryFunction StdlibFunctions[] = +{ +#ifndef NO_FP + { StdlibAtof, "float atof(char *);" }, + { StdlibStrtod, "float strtod(char *,char **);" }, +#endif + { StdlibAtoi, "int atoi(char *);" }, + { StdlibAtol, "int atol(char *);" }, + { StdlibStrtol, "int strtol(char *,char **,int);" }, + { StdlibStrtoul, "int strtoul(char *,char **,int);" }, + { StdlibMalloc, "void *malloc(int);" }, + { StdlibCalloc, "void *calloc(int,int);" }, + { StdlibRealloc, "void *realloc(void *,int);" }, + { StdlibFree, "void free(void *);" }, + { StdlibRand, "int rand();" }, + { StdlibSrand, "void srand(int);" }, + { StdlibAbort, "void abort();" }, + { StdlibExit, "void exit(int);" }, + { StdlibGetenv, "char *getenv(char *);" }, + { StdlibSystem, "int system(char *);" }, +/* { StdlibBsearch, "void *bsearch(void *,void *,int,int,int (*)());" }, */ +/* { StdlibQsort, "void *qsort(void *,int,int,int (*)());" }, */ + { StdlibAbs, "int abs(int);" }, + { StdlibLabs, "int labs(int);" }, +#if 0 + { StdlibDiv, "div_t div(int);" }, + { StdlibLdiv, "ldiv_t ldiv(int);" }, +#endif + { NULL, NULL } +}; + +/* creates various system-dependent definitions */ +void StdlibSetupFunc(Picoc *pc) +{ + /* define NULL, TRUE and FALSE */ + if (!VariableDefined(pc, TableStrRegister(pc, "NULL"))) + VariableDefinePlatformVar(pc, NULL, "NULL", &pc->IntType, (union AnyValue *)&Stdlib_ZeroValue, FALSE); +} + +#endif /* !BUILTIN_MINI_STDLIB */ diff --git a/src/cstdlib/stdlib.o b/src/cstdlib/stdlib.o new file mode 100644 index 0000000..2b2dba2 Binary files /dev/null and b/src/cstdlib/stdlib.o differ diff --git a/src/cstdlib/string.c b/src/cstdlib/string.c new file mode 100644 index 0000000..982a1b7 --- /dev/null +++ b/src/cstdlib/string.c @@ -0,0 +1,186 @@ +/* string.h library for large systems - small embedded systems use clibrary.c instead */ +#include "../interpreter.h" + +#ifndef BUILTIN_MINI_STDLIB + +static int String_ZeroValue = 0; + +void StringStrcpy(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Pointer = strcpy(Param[0]->Val->Pointer, Param[1]->Val->Pointer); +} + +void StringStrncpy(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Pointer = strncpy(Param[0]->Val->Pointer, Param[1]->Val->Pointer, Param[2]->Val->Integer); +} + +void StringStrcmp(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = strcmp(Param[0]->Val->Pointer, Param[1]->Val->Pointer); +} + +void StringStrncmp(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = strncmp(Param[0]->Val->Pointer, Param[1]->Val->Pointer, Param[2]->Val->Integer); +} + +void StringStrcat(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Pointer = strcat(Param[0]->Val->Pointer, Param[1]->Val->Pointer); +} + +void StringStrncat(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Pointer = strncat(Param[0]->Val->Pointer, Param[1]->Val->Pointer, Param[2]->Val->Integer); +} + +#ifndef WIN32 +void StringIndex(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Pointer = index(Param[0]->Val->Pointer, Param[1]->Val->Integer); +} + +void StringRindex(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Pointer = rindex(Param[0]->Val->Pointer, Param[1]->Val->Integer); +} +#endif + +void StringStrlen(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = strlen(Param[0]->Val->Pointer); +} + +void StringMemset(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Pointer = memset(Param[0]->Val->Pointer, Param[1]->Val->Integer, Param[2]->Val->Integer); +} + +void StringMemcpy(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Pointer = memcpy(Param[0]->Val->Pointer, Param[1]->Val->Pointer, Param[2]->Val->Integer); +} + +void StringMemcmp(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = memcmp(Param[0]->Val->Pointer, Param[1]->Val->Pointer, Param[2]->Val->Integer); +} + +void StringMemmove(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Pointer = memmove(Param[0]->Val->Pointer, Param[1]->Val->Pointer, Param[2]->Val->Integer); +} + +void StringMemchr(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Pointer = memchr(Param[0]->Val->Pointer, Param[1]->Val->Integer, Param[2]->Val->Integer); +} + +void StringStrchr(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Pointer = strchr(Param[0]->Val->Pointer, Param[1]->Val->Integer); +} + +void StringStrrchr(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Pointer = strrchr(Param[0]->Val->Pointer, Param[1]->Val->Integer); +} + +void StringStrcoll(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = strcoll(Param[0]->Val->Pointer, Param[1]->Val->Pointer); +} + +void StringStrerror(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Pointer = strerror(Param[0]->Val->Integer); +} + +void StringStrspn(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = strspn(Param[0]->Val->Pointer, Param[1]->Val->Pointer); +} + +void StringStrcspn(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = strcspn(Param[0]->Val->Pointer, Param[1]->Val->Pointer); +} + +void StringStrpbrk(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Pointer = strpbrk(Param[0]->Val->Pointer, Param[1]->Val->Pointer); +} + +void StringStrstr(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Pointer = strstr(Param[0]->Val->Pointer, Param[1]->Val->Pointer); +} + +void StringStrtok(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Pointer = strtok(Param[0]->Val->Pointer, Param[1]->Val->Pointer); +} + +void StringStrxfrm(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = strxfrm(Param[0]->Val->Pointer, Param[1]->Val->Pointer, Param[2]->Val->Integer); +} + +#ifndef WIN32 +void StringStrdup(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Pointer = strdup(Param[0]->Val->Pointer); +} + +void StringStrtok_r(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Pointer = strtok_r(Param[0]->Val->Pointer, Param[1]->Val->Pointer, Param[2]->Val->Pointer); +} +#endif + +/* all string.h functions */ +struct LibraryFunction StringFunctions[] = +{ +#ifndef WIN32 + { StringIndex, "char *index(char *,int);" }, + { StringRindex, "char *rindex(char *,int);" }, +#endif + { StringMemcpy, "void *memcpy(void *,void *,int);" }, + { StringMemmove, "void *memmove(void *,void *,int);" }, + { StringMemchr, "void *memchr(char *,int,int);" }, + { StringMemcmp, "int memcmp(void *,void *,int);" }, + { StringMemset, "void *memset(void *,int,int);" }, + { StringStrcat, "char *strcat(char *,char *);" }, + { StringStrncat, "char *strncat(char *,char *,int);" }, + { StringStrchr, "char *strchr(char *,int);" }, + { StringStrrchr, "char *strrchr(char *,int);" }, + { StringStrcmp, "int strcmp(char *,char *);" }, + { StringStrncmp, "int strncmp(char *,char *,int);" }, + { StringStrcoll, "int strcoll(char *,char *);" }, + { StringStrcpy, "char *strcpy(char *,char *);" }, + { StringStrncpy, "char *strncpy(char *,char *,int);" }, + { StringStrerror, "char *strerror(int);" }, + { StringStrlen, "int strlen(char *);" }, + { StringStrspn, "int strspn(char *,char *);" }, + { StringStrcspn, "int strcspn(char *,char *);" }, + { StringStrpbrk, "char *strpbrk(char *,char *);" }, + { StringStrstr, "char *strstr(char *,char *);" }, + { StringStrtok, "char *strtok(char *,char *);" }, + { StringStrxfrm, "int strxfrm(char *,char *,int);" }, +#ifndef WIN32 + { StringStrdup, "char *strdup(char *);" }, + { StringStrtok_r, "char *strtok_r(char *,char *,char **);" }, +#endif + { NULL, NULL } +}; + +/* creates various system-dependent definitions */ +void StringSetupFunc(Picoc *pc) +{ + /* define NULL */ + if (!VariableDefined(pc, TableStrRegister(pc, "NULL"))) + VariableDefinePlatformVar(pc, NULL, "NULL", &pc->IntType, (union AnyValue *)&String_ZeroValue, FALSE); +} + +#endif /* !BUILTIN_MINI_STDLIB */ diff --git a/src/cstdlib/string.o b/src/cstdlib/string.o new file mode 100644 index 0000000..e1a5fee Binary files /dev/null and b/src/cstdlib/string.o differ diff --git a/src/cstdlib/time.c b/src/cstdlib/time.c new file mode 100644 index 0000000..98292d6 --- /dev/null +++ b/src/cstdlib/time.c @@ -0,0 +1,149 @@ +/* string.h library for large systems - small embedded systems use clibrary.c instead */ +#include +#include "../interpreter.h" + +#ifndef BUILTIN_MINI_STDLIB + +static int CLOCKS_PER_SECValue = CLOCKS_PER_SEC; + +#ifdef CLK_PER_SEC +static int CLK_PER_SECValue = CLK_PER_SEC; +#endif + +#ifdef CLK_TCK +static int CLK_TCKValue = CLK_TCK; +#endif + +void StdAsctime(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Pointer = asctime(Param[0]->Val->Pointer); +} + +void StdClock(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = clock(); +} + +void StdCtime(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Pointer = ctime(Param[0]->Val->Pointer); +} + +#ifndef NO_FP +void StdDifftime(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->FP = difftime((time_t)Param[0]->Val->Integer, Param[1]->Val->Integer); +} +#endif + +void StdGmtime(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Pointer = gmtime(Param[0]->Val->Pointer); +} + +void StdLocaltime(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Pointer = localtime(Param[0]->Val->Pointer); +} + +void StdMktime(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = (int)mktime(Param[0]->Val->Pointer); +} + +void StdTime(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = (int)time(Param[0]->Val->Pointer); +} + +void StdStrftime(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = strftime(Param[0]->Val->Pointer, Param[1]->Val->Integer, Param[2]->Val->Pointer, Param[3]->Val->Pointer); +} + +#ifndef WIN32 +void StdStrptime(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + extern char *strptime(const char *s, const char *format, struct tm *tm); + + ReturnValue->Val->Pointer = strptime(Param[0]->Val->Pointer, Param[1]->Val->Pointer, Param[2]->Val->Pointer); +} + +void StdGmtime_r(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Pointer = gmtime_r(Param[0]->Val->Pointer, Param[1]->Val->Pointer); +} + +void StdTimegm(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = timegm(Param[0]->Val->Pointer); +} +#endif + +/* handy structure definitions */ +#ifndef PERSOPORT +const char StdTimeDefs[] = "\ +typedef int time_t; \ +typedef int clock_t;\ +"; +#else +/* handy structure definitions */ +const char StdTimeDefs[] = "\ +typedef int time_t; \ +typedef int clock_t;\ +struct tm {\ + int tm_sec; /* seconds */\ + int tm_min; /* minutes */\ + int tm_hour; /* hours */\ + int tm_mday; /* day of the month */\ + int tm_mon; /* month */\ + int tm_year; /* year */\ + int tm_wday; /* day of the week */\ + int tm_yday; /* day in the year */\ + int tm_isdst; /* daylight saving time */\ +};\ +"; +#endif + +/* all string.h functions */ +struct LibraryFunction StdTimeFunctions[] = +{ + { StdAsctime, "char *asctime(struct tm *);" }, + { StdClock, "time_t clock();" }, + { StdCtime, "char *ctime(int *);" }, +#ifndef NO_FP + { StdDifftime, "double difftime(int, int);" }, +#endif + { StdGmtime, "struct tm *gmtime(int *);" }, + { StdLocaltime, "struct tm *localtime(int *);" }, + { StdMktime, "int mktime(struct tm *ptm);" }, + { StdTime, "int time(int *);" }, + { StdStrftime, "int strftime(char *, int, char *, struct tm *);" }, +#ifndef WIN32 + { StdStrptime, "char *strptime(char *, char *, struct tm *);" }, + { StdGmtime_r, "struct tm *gmtime_r(int *, struct tm *);" }, + { StdTimegm, "int timegm(struct tm *);" }, +#endif + { NULL, NULL } +}; + + +/* creates various system-dependent definitions */ +void StdTimeSetupFunc(Picoc *pc) +{ + /* make a "struct tm" which is the same size as a native tm structure */ +#ifndef PERSOPORT + TypeCreateOpaqueStruct(pc, NULL, TableStrRegister(pc, "tm"), sizeof(struct tm)); +#endif + + /* define CLK_PER_SEC etc. */ + VariableDefinePlatformVar(pc, NULL, "CLOCKS_PER_SEC", &pc->IntType, (union AnyValue *)&CLOCKS_PER_SECValue, FALSE); +#ifdef CLK_PER_SEC + VariableDefinePlatformVar(pc, NULL, "CLK_PER_SEC", &pc->IntType, (union AnyValue *)&CLK_PER_SECValue, FALSE); +#endif +#ifdef CLK_TCK + VariableDefinePlatformVar(pc, NULL, "CLK_TCK", &pc->IntType, (union AnyValue *)&CLK_TCKValue, FALSE); +#endif +} + +#endif /* !BUILTIN_MINI_STDLIB */ diff --git a/src/cstdlib/time.o b/src/cstdlib/time.o new file mode 100644 index 0000000..50e373f Binary files /dev/null and b/src/cstdlib/time.o differ diff --git a/src/cstdlib/unistd.c b/src/cstdlib/unistd.c new file mode 100644 index 0000000..ba4ab24 --- /dev/null +++ b/src/cstdlib/unistd.c @@ -0,0 +1,515 @@ +/* stdlib.h library for large systems - small embedded systems use clibrary.c instead */ +#include +#include +#include +#include +#include "../interpreter.h" + +#ifndef BUILTIN_MINI_STDLIB + +static int ZeroValue = 0; + +void UnistdAccess(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = access(Param[0]->Val->Pointer, Param[1]->Val->Integer); +} + +void UnistdAlarm(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = alarm(Param[0]->Val->Integer); +} + +void UnistdChdir(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = chdir(Param[0]->Val->Pointer); +} + +void UnistdChroot(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = chroot(Param[0]->Val->Pointer); +} + +void UnistdChown(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = chown(Param[0]->Val->Pointer, Param[1]->Val->Integer, Param[2]->Val->Integer); +} + +void UnistdClose(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = close(Param[0]->Val->Integer); +} + +void UnistdConfstr(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = confstr(Param[0]->Val->Integer, Param[1]->Val->Pointer, Param[2]->Val->Integer); +} + +void UnistdCtermid(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Pointer = ctermid(Param[0]->Val->Pointer); +} + +#if 0 +void UnistdCuserid(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Pointer = cuserid(Param[0]->Val->Pointer); +} +#endif + +void UnistdDup(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = dup(Param[0]->Val->Integer); +} + +void UnistdDup2(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = dup2(Param[0]->Val->Integer, Param[1]->Val->Integer); +} + +void Unistd_Exit(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + _exit(Param[0]->Val->Integer); +} + +void UnistdFchown(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = fchown(Param[0]->Val->Integer, Param[1]->Val->Integer, Param[2]->Val->Integer); +} + +void UnistdFchdir(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = fchdir(Param[0]->Val->Integer); +} + +void UnistdFdatasync(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ +#ifndef F_FULLSYNC + ReturnValue->Val->Integer = fdatasync(Param[0]->Val->Integer); +#else + /* Mac OS X equivalent */ + ReturnValue->Val->Integer = fcntl(Param[0]->Val->Integer, F_FULLFSYNC); +#endif +} + +void UnistdFork(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = fork(); +} + +void UnistdFpathconf(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = fpathconf(Param[0]->Val->Integer, Param[1]->Val->Integer); +} + +void UnistdFsync(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = fsync(Param[0]->Val->Integer); +} + +void UnistdFtruncate(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = ftruncate(Param[0]->Val->Integer, Param[1]->Val->Integer); +} + +void UnistdGetcwd(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Pointer = getcwd(Param[0]->Val->Pointer, Param[1]->Val->Integer); +} + +void UnistdGetdtablesize(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = getdtablesize(); +} + +void UnistdGetegid(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = getegid(); +} + +void UnistdGeteuid(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = geteuid(); +} + +void UnistdGetgid(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = getgid(); +} + +void UnistdGethostid(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = gethostid(); +} + +void UnistdGetlogin(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Pointer = getlogin(); +} + +void UnistdGetlogin_r(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = getlogin_r(Param[0]->Val->Pointer, Param[1]->Val->Integer); +} + +void UnistdGetpagesize(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = getpagesize(); +} + +void UnistdGetpass(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Pointer = getpass(Param[0]->Val->Pointer); +} + +#if 0 +void UnistdGetpgid(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = getpgid(Param[0]->Val->Integer); +} +#endif + +void UnistdGetpgrp(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = getpgrp(); +} + +void UnistdGetpid(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = getpid(); +} + +void UnistdGetppid(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = getppid(); +} + +#if 0 +void UnistdGetsid(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = getsid(Param[0]->Val->Integer); +} +#endif + +void UnistdGetuid(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = getuid(); +} + +void UnistdGetwd(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Pointer = getcwd(Param[0]->Val->Pointer, PATH_MAX); +} + +void UnistdIsatty(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = isatty(Param[0]->Val->Integer); +} + +void UnistdLchown(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = lchown(Param[0]->Val->Pointer, Param[1]->Val->Integer, Param[2]->Val->Integer); +} + +void UnistdLink(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = link(Param[0]->Val->Pointer, Param[1]->Val->Pointer); +} + +void UnistdLockf(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = lockf(Param[0]->Val->Integer, Param[1]->Val->Integer, Param[2]->Val->Integer); +} + +void UnistdLseek(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = lseek(Param[0]->Val->Integer, Param[1]->Val->Integer, Param[2]->Val->Integer); +} + +void UnistdNice(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = nice(Param[0]->Val->Integer); +} + +void UnistdPathconf(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = pathconf(Param[0]->Val->Pointer, Param[1]->Val->Integer); +} + +void UnistdPause(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = pause(); +} + +#if 0 +void UnistdPread(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = pread(Param[0]->Val->Integer, Param[1]->Val->Pointer, Param[2]->Val->Integer, Param[3]->Val->Integer); +} + +void UnistdPwrite(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = pwrite(Param[0]->Val->Integer, Param[1]->Val->Pointer, Param[2]->Val->Integer, Param[3]->Val->Integer); +} +void UnistdReadlink(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = readlink(Param[0]->Val->Pointer, Param[1]->Val->Pointer, Param[2]->Val->Integer); +} +#endif + +void UnistdRead(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = read(Param[0]->Val->Integer, Param[1]->Val->Pointer, Param[2]->Val->Integer); +} + + +void UnistdRmdir(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = rmdir(Param[0]->Val->Pointer); +} + +void UnistdSbrk(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Pointer = sbrk(Param[0]->Val->Integer); +} + +void UnistdSetgid(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = setgid(Param[0]->Val->Integer); +} + +void UnistdSetpgid(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = setpgid(Param[0]->Val->Integer, Param[1]->Val->Integer); +} + +void UnistdSetpgrp(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = setpgrp(); +} + +void UnistdSetregid(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = setregid(Param[0]->Val->Integer, Param[1]->Val->Integer); +} + +void UnistdSetreuid(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = setreuid(Param[0]->Val->Integer, Param[1]->Val->Integer); +} + +void UnistdSetsid(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = setsid(); +} + +void UnistdSetuid(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = setuid(Param[0]->Val->Integer); +} + +void UnistdSleep(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = sleep(Param[0]->Val->Integer); +} + +#if 0 +void UnistdSwab(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = swab(Param[0]->Val->Pointer, Param[1]->Val->Pointer, Param[2]->Val->Integer); +} +#endif + +void UnistdSymlink(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = symlink(Param[0]->Val->Pointer, Param[1]->Val->Pointer); +} + +void UnistdSync(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + sync(); +} + +void UnistdSysconf(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = sysconf(Param[0]->Val->Integer); +} + +void UnistdTcgetpgrp(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = tcgetpgrp(Param[0]->Val->Integer); +} + +void UnistdTcsetpgrp(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = tcsetpgrp(Param[0]->Val->Integer, Param[1]->Val->Integer); +} + +void UnistdTruncate(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = truncate(Param[0]->Val->Pointer, Param[1]->Val->Integer); +} + +void UnistdTtyname(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Pointer = ttyname(Param[0]->Val->Integer); +} + +void UnistdTtyname_r(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = ttyname_r(Param[0]->Val->Integer, Param[1]->Val->Pointer, Param[2]->Val->Integer); +} + +void UnistdUalarm(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = ualarm(Param[0]->Val->Integer, Param[1]->Val->Integer); +} + +void UnistdUnlink(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = unlink(Param[0]->Val->Pointer); +} + +void UnistdUsleep(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = usleep(Param[0]->Val->Integer); +} + +void UnistdVfork(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = vfork(); +} + +void UnistdWrite(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = write(Param[0]->Val->Integer, Param[1]->Val->Pointer, Param[2]->Val->Integer); +} + + +/* handy structure definitions */ +const char UnistdDefs[] = "\ +typedef int uid_t; \ +typedef int gid_t; \ +typedef int pid_t; \ +typedef int off_t; \ +typedef int size_t; \ +typedef int ssize_t; \ +typedef int useconds_t;\ +typedef int intptr_t;\ +"; + +/* all unistd.h functions */ +struct LibraryFunction UnistdFunctions[] = +{ + { UnistdAccess, "int access(char *, int);" }, + { UnistdAlarm, "unsigned int alarm(unsigned int);" }, +/* { UnistdBrk, "int brk(void *);" }, */ + { UnistdChdir, "int chdir(char *);" }, + { UnistdChroot, "int chroot(char *);" }, + { UnistdChown, "int chown(char *, uid_t, gid_t);" }, + { UnistdClose, "int close(int);" }, + { UnistdConfstr, "size_t confstr(int, char *, size_t);" }, + { UnistdCtermid, "char *ctermid(char *);" }, +/* { UnistdCuserid, "char *cuserid(char *);" }, */ + { UnistdDup, "int dup(int);" }, + { UnistdDup2, "int dup2(int, int);" }, +/* { UnistdEncrypt, "void encrypt(char[64], int);" }, */ +/* { UnistdExecl, "int execl(char *, char *, ...);" }, */ +/* { UnistdExecle, "int execle(char *, char *, ...);" }, */ +/* { UnistdExeclp, "int execlp(char *, char *, ...);" }, */ +/* { UnistdExecv, "int execv(char *, char *[]);" }, */ +/* { UnistdExecve, "int execve(char *, char *[], char *[]);" }, */ +/* { UnistdExecvp, "int execvp(char *, char *[]);" }, */ + { Unistd_Exit, "void _exit(int);" }, + { UnistdFchown, "int fchown(int, uid_t, gid_t);" }, + { UnistdFchdir, "int fchdir(int);" }, + { UnistdFdatasync, "int fdatasync(int);" }, + { UnistdFork, "pid_t fork(void);" }, + { UnistdFpathconf, "long fpathconf(int, int);" }, + { UnistdFsync, "int fsync(int);" }, + { UnistdFtruncate, "int ftruncate(int, off_t);" }, + { UnistdGetcwd, "char *getcwd(char *, size_t);" }, + { UnistdGetdtablesize, "int getdtablesize(void);" }, + { UnistdGetegid, "gid_t getegid(void);" }, + { UnistdGeteuid, "uid_t geteuid(void);" }, + { UnistdGetgid, "gid_t getgid(void);" }, +/* { UnistdGetgroups, "int getgroups(int, gid_t []);" }, */ + { UnistdGethostid, "long gethostid(void);" }, + { UnistdGetlogin, "char *getlogin(void);" }, + { UnistdGetlogin_r, "int getlogin_r(char *, size_t);" }, +/* { UnistdGetopt, "int getopt(int, char * [], char *);" }, */ + { UnistdGetpagesize, "int getpagesize(void);" }, + { UnistdGetpass, "char *getpass(char *);" }, +/* { UnistdGetpgid, "pid_t getpgid(pid_t);" }, */ + { UnistdGetpgrp, "pid_t getpgrp(void);" }, + { UnistdGetpid, "pid_t getpid(void);" }, + { UnistdGetppid, "pid_t getppid(void);" }, +/* { UnistdGetsid, "pid_t getsid(pid_t);" }, */ + { UnistdGetuid, "uid_t getuid(void);" }, + { UnistdGetwd, "char *getwd(char *);" }, + { UnistdIsatty, "int isatty(int);" }, + { UnistdLchown, "int lchown(char *, uid_t, gid_t);" }, + { UnistdLink, "int link(char *, char *);" }, + { UnistdLockf, "int lockf(int, int, off_t);" }, + { UnistdLseek, "off_t lseek(int, off_t, int);" }, + { UnistdNice, "int nice(int);" }, + { UnistdPathconf, "long pathconf(char *, int);" }, + { UnistdPause, "int pause(void);" }, +/* { UnistdPipe, "int pipe(int [2]);" }, */ +/* { UnistdPread, "ssize_t pread(int, void *, size_t, off_t);" }, */ +/* { UnistdPthread_atfork,"int pthread_atfork(void (*)(void), void (*)(void), void(*)(void));" }, */ +/* { UnistdPwrite, "ssize_t pwrite(int, void *, size_t, off_t);" }, */ + { UnistdRead, "ssize_t read(int, void *, size_t);" }, +/* { UnistdReadlink, "int readlink(char *, char *, size_t);" },*/ + { UnistdRmdir, "int rmdir(char *);" }, + { UnistdSbrk, "void *sbrk(intptr_t);" }, + { UnistdSetgid, "int setgid(gid_t);" }, + { UnistdSetpgid, "int setpgid(pid_t, pid_t);" }, + { UnistdSetpgrp, "pid_t setpgrp(void);" }, + { UnistdSetregid, "int setregid(gid_t, gid_t);" }, + { UnistdSetreuid, "int setreuid(uid_t, uid_t);" }, + { UnistdSetsid, "pid_t setsid(void);" }, + { UnistdSetuid, "int setuid(uid_t);" }, + { UnistdSleep, "unsigned int sleep(unsigned int);" }, +/* { UnistdSwab, "void swab(void *, void *, ssize_t);" }, */ + { UnistdSymlink, "int symlink(char *, char *);" }, + { UnistdSync, "void sync(void);" }, + { UnistdSysconf, "long sysconf(int);" }, + { UnistdTcgetpgrp, "pid_t tcgetpgrp(int);" }, + { UnistdTcsetpgrp, "int tcsetpgrp(int, pid_t);" }, + { UnistdTruncate, "int truncate(char *, off_t);" }, + { UnistdTtyname, "char *ttyname(int);" }, + { UnistdTtyname_r, "int ttyname_r(int, char *, size_t);" }, + { UnistdUalarm, "useconds_t ualarm(useconds_t, useconds_t);" }, + { UnistdUnlink, "int unlink(char *);" }, + { UnistdUsleep, "int usleep(useconds_t);" }, + { UnistdVfork, "pid_t vfork(void);" }, + { UnistdWrite, "ssize_t write(int, void *, size_t);" }, + { NULL, NULL } +}; + +#ifdef PERSOPORT +extern char ** environ ; +static char ** environValue ; +#endif + +/* creates various system-dependent definitions */ +void UnistdSetupFunc(Picoc *pc) +{ + /* define NULL */ + if (!VariableDefined(pc, TableStrRegister(pc, "NULL"))) + VariableDefinePlatformVar(pc, NULL, "NULL", &pc->IntType, (union AnyValue *)&ZeroValue, FALSE); + + /* define optarg and friends */ + VariableDefinePlatformVar(pc, NULL, "optarg", pc->CharPtrType, (union AnyValue *)&optarg, TRUE); + VariableDefinePlatformVar(pc, NULL, "optind", &pc->IntType, (union AnyValue *)&optind, TRUE); + VariableDefinePlatformVar(pc, NULL, "opterr", &pc->IntType, (union AnyValue *)&opterr, TRUE); + VariableDefinePlatformVar(pc, NULL, "optopt", &pc->IntType, (union AnyValue *)&optopt, TRUE); + +#ifdef PERSOPORT +environValue = environ ; +VariableDefinePlatformVar(pc, NULL, "environ", pc->CharPtrPtrType, (union AnyValue *)&environValue, FALSE); +#endif +} + +#endif /* !BUILTIN_MINI_STDLIB */ + diff --git a/src/cstdlib/unistd.o b/src/cstdlib/unistd.o new file mode 100644 index 0000000..d292f49 Binary files /dev/null and b/src/cstdlib/unistd.o differ diff --git a/src/cstdlib2/__HOW TO.txt b/src/cstdlib2/__HOW TO.txt new file mode 100644 index 0000000..433ffd8 --- /dev/null +++ b/src/cstdlib2/__HOW TO.txt @@ -0,0 +1,69 @@ +Aprs avoir cr le .c +Ajouter dans +- include.c dans la fonction IncludeInit ==> L'ordre est important + IncludeRegister("dirent.h", &DirentSetupFunc, &DirentFunctions[0], DirentDefs) ; +- interpreter.h les definitions + extern const char DirentDefs[]; + +extern struct LibraryFunction DirentFunctions[]; + +void DirentSetupFunc(void); +- Makefile + cstdlib2/dirent.o: cstdlib2/dirent.c interpreter.h platform.h + + + +- modifier platform.h + Remplacer les + #define INTERACTIVE_PROMPT_START "starting picoc " PICOC_VERSION "\n" + #define INTERACTIVE_PROMPT_STATEMENT "pico-c> " + #define INTERACTIVE_PROMPT_LINE " > " + par + #define INTERACTIVE_PROMPT_START "starting pico-c " PICOC_VERSION "\n" + extern char INTERACTIVE_PROMPT_STATEMENT[32] ; + extern char INTERACTIVE_PROMPT_LINE[32] ; + +- modifier picoc.c + Remplacer LES + int main(int argc, char **argv) + par + int picoc_main(int argc, char **argv) + + Ajouter + int enhanced_mode = 1 ; + +==> Voir aussi picoc.c pour les modifications d'option de lancement (-v) + +- modifier picoc.h pour la variable globale enhanced_mode (qui permet d'inclure tools.h) + Ajouter + extern int enhanced_mode ; + +- Modifier la struct tm directement dans le fichier cstdlib/time.c + +- Modifier platform.c + Ajouter + char INTERACTIVE_PROMPT_STATEMENT[32] = "pico-c> " ; + char INTERACTIVE_PROMPT_LINE[32] = " > " ; + Ajouter la fonction + void PrintHelp( char * filename, struct LibraryFunction DefFunctions[], const char * Defs ) { + int i=0 ; + if( filename != NULL ) { printf( "/* %s prototypes */\n", filename ) ; } + if( Defs != NULL ) { printf( "%s\n", Defs ) ; } + if( DefFunctions != NULL ) + while( DefFunctions[i].Prototype != NULL ) { + printf( "%s\n", DefFunctions[i].Prototype ) ; + i++; + } + printf( "\n" ) ; +} + + +- modifier cstdlib/unistd.c + Ajouter la gestion de la variable environ (4 lignes): + extern char ** environ ; + static char ** environValue ; + et + environValue = environ ; + VariableDefinePlatformVar(pc, NULL, "environ", pc->CharPtrPtrType, (union AnyValue *)&environValue, FALSE); + + diff --git a/src/cstdlib2/base64.c b/src/cstdlib2/base64.c new file mode 100644 index 0000000..37ca45e --- /dev/null +++ b/src/cstdlib2/base64.c @@ -0,0 +1,147 @@ +/* + Fichier base64.c + Auteur Bernard Chardonneau + amliorations encode64 proposes par big.lol@free.fr + + Logiciel libre, droits d'utilisation prciss en franais + dans le fichier : licence.fr + + Traductions des droits d'utilisation dans les fichiers : + licence.de , licence.en , licence.es , licence.it + licence.nl , licence.pt , licence.eo , licence.eo-utf + + + Bibliothque de fonctions permettant d'encoder et de + dcoder le contenu d'un tableau en base64. +*/ + +#include "base64.h" + + +/* encode base64 nbcar caractres mmoriss + dans orig et met le rsultat dans dest */ + +void encode64 (char *orig, char *dest, int nbcar) +{ + /* groupe de 3 octets convertir en base 64 */ + unsigned char octet1, octet2, octet3; + + /* tableau d'encodage + ce tableau est statique pour viter une allocation + memoire + initialisation chaque appel de la fonction */ + static char valcar [] = + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + + + /* tant qu'il reste au moins 3 caractres encoder */ + while (nbcar >= 3) + { + /* extraire 3 caractres de la chaine et les + memoriser sous la forme d'octets (non signs) */ + octet1 = *(orig++); + octet2 = *(orig++); + octet3 = *(orig++); + + /* dcomposer les 3 octets en tranches de 6 bits et les + remplacer par les caractres correspondants dans valcar */ + *(dest++) = valcar [octet1 >> 2]; + *(dest++) = valcar [((octet1 & 3) << 4) | (octet2 >> 4)]; + *(dest++) = valcar [((octet2 & 0x0F) << 2) | (octet3 >> 6)]; + *(dest++) = valcar [octet3 & 0x3F]; + + /* 3 caractres de moins traiter */ + nbcar -= 3; + } + + /* s'il reste des caractres encoder */ + if (nbcar) + { + /* encodage des 6 bits de poids fort du premier caractre */ + octet1 = *(orig++); + *(dest++) = valcar [octet1 >> 2]; + + /* s'il ne reste que ce caractre encoder */ + if (nbcar == 1) + { + /* encodage des 2 bits de poids faible de ce ce caractre */ + *(dest++) = valcar [(octet1 & 3) << 4]; + + /* indique qu'aucun autre caractre n'est encod */ + *(dest++) = '='; + } + /* sinon (il reste 2 caractres encoder) */ + else + { + /* 2 bits de poids faible du 1er caractre + encodage de l'autre */ + octet2 = *orig; + *(dest++) = valcar [((octet1 & 3) << 4) | (octet2 >> 4)]; + *(dest++) = valcar [(octet2 & 0x0F) << 2]; + } + + /* indique qu'aucun autre caractre n'est encod */ + *(dest++) = '='; + } + + /* fin de l'encodage */ + *dest = '\0'; +} + + + +/* dcode le contenu de buffer encod base64, met le rsultat + dans buffer et retourne le nombre de caractres convertis */ + +int decode64 (char *buffer) +{ + int car; /* caractre du fichier */ + char valcar [4]; /* valeur aprs conversion des caractres */ + int i; /* compteur */ + int posorig; /* position dans la ligne passe en paramtre */ + int posdest; /* position dans la nouvelle ligne gnre */ + + + /* initialisations */ + posorig = 0; + posdest = 0; + + /* tant que non fin de ligne */ + while (buffer [posorig] > ' ' && buffer [posorig] != '=') + { + /* dcoder la valeur de 4 caractres */ + for (i = 0; i < 4 && buffer [posorig] != '='; i++) + { + /* rcuprer un caractre dans la ligne */ + car = buffer [posorig++]; + + /* dcoder ce caractre */ + if ('A' <= car && car <= 'Z') + valcar [i] = car - 'A'; + else if ('a' <= car && car <= 'z') + valcar [i] = car + 26 - 'a'; + else if ('0' <= car && car <= '9') + valcar [i] = car + 52 - '0'; + else if (car == '+') + valcar [i] = 62; + else if (car == '/') + valcar [i] = 63; + } + + /* recopier les caractres correspondants dans le buffer */ + buffer [posdest++] = (valcar [0] << 2) | (valcar [1] >> 4); + + /* sauf si indicateur de fin de message */ + if (i > 2) + { + buffer [posdest++] = (valcar [1] << 4) | (valcar [2] >> 2); + + if (i > 3) + buffer [posdest++] = (valcar [2] << 6) | (valcar [3]); + } + } + + /* terminer le buffer */ + buffer [posdest] = '\0'; + + /* et retourner le nombre de caractres obtenus */ + return (posdest); +} diff --git a/src/cstdlib2/base64.h b/src/cstdlib2/base64.h new file mode 100644 index 0000000..3539e29 --- /dev/null +++ b/src/cstdlib2/base64.h @@ -0,0 +1,9 @@ +/* + Fichier base64.h + Auteur Bernard Chardonneau +*/ + +/* prototypes des fonctions de la bibliothque base64 */ + +void encode64 (char *orig, char *dest, int nbcar); +int decode64 (char *buffer); diff --git a/src/cstdlib2/bc_eval.c b/src/cstdlib2/bc_eval.c new file mode 100644 index 0000000..1b47203 --- /dev/null +++ b/src/cstdlib2/bc_eval.c @@ -0,0 +1,788 @@ +#include "../platform.h" +#include +#include +#include +#include +#include +#include +#include + +/* +Syntaxe de compilation en double + gcc -o bc_eval.exe bc_eval.c -Wall -O3 -lm -mno-cygwin -DMAIN -std=c99 +Syntaxe de compilation en long double + gcc -o bc_eval.exe bc_eval.c -Wall -O3 -lm -mno-cygwin -DLD -DMAIN -std=c99 +*/ + +/* +long double atold (const char *nptr); +long double strtold (const char *nptr, char **endptr); atold = strtold(nptr, (char **)NULL) +double=64bits, prcision=15 dcimales +-1.7e-308 -> +-1.7e+308 +long double=80bits, prcision 38 dcimales +-1e-4932 -> +-1e+4932 +float precision pi = 3.141593 +double precision pi = 3.141592653589793 +long double precision pi = 3.141592653589793239 + +pi = 4*atan(1) = 2*asin(1) = acos(-1) + +Type de donne Signification Taille (en octets) Plage de valeurs accepte +char Caractre 1 -128 127 +unsigned char Caractre non sign 1 0 255 +short int Entier court 2 -32 768 32 767 +unsigned short int Entier court non sign 2 0 65 535 +int Entier 2 (sur processeur 16 bits) +4 (sur processeur 32 bits) -32 768 32 767 +-2 147 483 648 2 147 483 647 +unsigned int Entier non sign 2 (sur processeur 16 bits) +4 (sur processeur 32 bits) 0 65 535 +0 4 294 967 295 +long int Entier long 4 -2 147 483 648 2 147 483 647 +unsigned long int Entier long non sign 4 0 4 294 967 295 +float Flottant (rel) 4 3.4*10-38 3.4*1038 +double Flottant double 8 1.7*10-308 1.7*10308 +long double Flottant double long 10 3.4*10-4932 3.4*104932 +*/ + + +#ifndef LD + +#define BC_ERROR 1.7E-308 +#define BC_PI 3.141592653589793 +#define BC_PATTERN "%15.13g" +#define BC_STRTOD strtod +typedef double bc_double ; + +#else + +/* #define BC_ERROR 3.4E-4932 */ +#define BC_ERROR 1.7E-308 +#define BC_PI 3.141592653589793239 + /* 3.1415926535897932384626433832795 */ +#define BC_PATTERN "%19.17Lg" +#define BC_STRTOD strtold +typedef long double bc_double ; + +#endif + + +bc_double bc_eval( const char * str ) { + bc_double bc_error = (bc_double)BC_ERROR ; /* Valeur renvoyee en cas d'erreur */ + bc_double bc_result = (bc_double)0.0 ; + bc_double dres, dres1 ; + + char *deb, *fin, *cmd=NULL, *pst ; + unsigned char c ; + unsigned int i, j, k, p ; + long int m, n ; + static unsigned int bc_seed = 0 ; + + bc_result = bc_error ; + + if( str==NULL ) return bc_error ; + if( strlen(str) == 0 ) { return (bc_double)0.0L ; } + + /* Allocation de memoire */ + if( ( cmd=(char*)malloc( strlen(str) + 256 ) ) == NULL ) { return bc_error ; } + strcpy( cmd, str ) ; + + /* Remplace les , par des ., les {, [ par des }, ] et passage en minuscule */ + for( k=0 ; k='A')&&(cmd[k]<='Z') ) cmd[k]=cmd[k]-'A'+'a' ; + } + + /* Verifie les parentheses ouvrantes et fermantes */ + p = 0 ; + for( i=0 ; ii ; k-- ) cmd[k+1]=cmd[k] ; + switch(cmd[i]) { + case '': cmd[i+1] = '2' ; break ; + case '': cmd[i+1] = '3' ; break ; + } + cmd[i] = '^' ; + } + else if( (cmd[i]=='')||(cmd[i]=='')||(cmd[i]=='') ) { + if( cmd[i+1]=='*' ) for( k=strlen(cmd) ; k>i ; k-- ) cmd[k+2]=cmd[k] ; + else for( k=strlen(cmd) ; k>i ; k-- ) cmd[k+3]=cmd[k] ; + switch(cmd[i]) { + case '': cmd[i+1] = '2' ; cmd[i+2] = '5' ; break ; + case '': cmd[i+1] = '5' ; cmd[i+2] = '0' ; break ; + case '': cmd[i+1] = '7' ; cmd[i+2] = '5' ; break ; + } + cmd[i] = '.' ; cmd[i+3] = '*' ; + } + } + + /* Modification des operateurs deux caractres: On remplace les && || <= >= == != <> par des ? @ ' ` = ! ! */ + for( i=0 ; i<(strlen(cmd)-1) ; i++ ) { + if( ((cmd[i]=='&')&&(cmd[i+1]=='&')) || ((cmd[i]=='|')&&(cmd[i+1]=='|')) + || ((cmd[i]=='<')&&(cmd[i+1]=='=')) || ((cmd[i]=='>')&&(cmd[i+1]=='=')) + || ((cmd[i]=='=')&&(cmd[i+1]=='=')) || ((cmd[i]=='!')&&(cmd[i+1]=='=')) + || ((cmd[i]=='<')&&(cmd[i+1]=='>')) ) { + if( cmd[i]=='&' ) cmd[i+1]='?' ; + else if( cmd[i]=='|' ) cmd[i+1]='@' ; + else if( cmd[i]=='!' ) cmd[i+1]='!' ; + else if( cmd[i]=='<' ) { if(cmd[i+1]=='>') cmd[i+1]='!' ; else cmd[i+1]='\'' ; } + else if( cmd[i]=='>' ) cmd[i+1]='`' ; + for( k=i ; k 1 ) + for( i=1 ; i='0')&&(cmd[i-1]<='9') ) ) { + for( k=strlen(cmd) ; k>=i ; k-- ) cmd[k+1]=cmd[k] ; + cmd[i] = '*' ; + } + } + + /* Ajoute un 0 quand la chaine commence par un - suivi d'une fonction */ + if( (cmd[0]=='-')&& !( (cmd[1]>='0')&&(cmd[1]<='9') ) ) + { for( k=strlen(cmd) ; k>=0 ; k-- ) { cmd[k+1] = cmd[k] ; if(k==0) break ; } cmd[0] = '0' ; } + + /* Ajoute un 0 si la chane se termine par un . */ + if( cmd[strlen(cmd)-1]=='.' ) strcat( cmd, "0" ) ; + + /* Nettoyage */ + while( (cmd[strlen(cmd)-1]=='\"')||(cmd[strlen(cmd)-1]=='\t') + ||(cmd[strlen(cmd)-1]==' ')||(cmd[strlen(cmd)-1]=='\r') + ||(cmd[strlen(cmd)-1]=='\n') ) cmd[strlen(cmd)-1]='\0' ; + while( (cmd[0]=='\"')||(cmd[0]=='\t')||(cmd[0]==' ')||(cmd[0]=='\r')||(cmd[0]=='\n')||(cmd[0]=='+') ) + for( k=0 ; k 0 ) + for( k=i-1 ; k 0 ) + for( k=i-1 ; k 0 ) + for( k=i-1 ; k 0 ) + for( k=i ; k')||(c=='=')||(c=='!')||(c=='&')||(c=='|')||(c=='?')||(c=='@')||(c=='\'')||(c=='`') ) + { free( cmd ) ; return bc_error ; } + + /* Verifie le dernier caractere */ + c = cmd[strlen(cmd)-1] ; + if( ((c<'0')||(c>'9'))&&(c!=')')&&(c!='.') ) + { free( cmd ) ; return bc_error ; } + + /* Chaine vide */ + if( (strlen(cmd)==0)||(!strcmp(cmd,"()")) ) { free(cmd) ; return (bc_double)0. ; } + + /* Allocation de memoire */ + if( ( deb=(char*)malloc( strlen(cmd) + 1 ) ) == NULL ) { free(cmd) ; return bc_error ; } + if( ( fin=(char*)malloc( strlen(cmd) + 1 ) ) == NULL ) { free(cmd) ; free(deb) ; return bc_error ; } + +/* printf("cmd=%s|\n", cmd ) ; */ + + /* Recherche de nombre seul */ + i=( (((cmd[0]=='-')||(cmd[0]=='+'))&&(strlen(cmd)>1)) + || ( (cmd[0]>='0')&&(cmd[0]<='9') ) + || (cmd[0]=='.') ) ; + if( cmd[0]=='.' ) j=1; else j=0; /* decompte le nombre de . */ + if( strlen(cmd)>1 ) + for( k=1 ; k0 ) { i=0 ; break ; } else j++ ; } + else if( ! ((cmd[k]>='0')&&(cmd[k]<='9')) ) { i=0 ; break ; } + } + + if( i==1 ) /* on a trouv un nombre */ + /* bc_result = atof( cmd ) ; */ + { + bc_result = (bc_double)BC_STRTOD( cmd, &pst ) ; + if( bc_result==HUGE_VAL ) bc_result=bc_error ; + else if( bc_result==0 ) { if( pst==cmd ) bc_result=bc_error ; } + if( strlen( pst ) != 0 ) bc_result=bc_error ; + } + else { + /* Recherche d'operateurs hors parenthses (par ordre inverse de priorit) */ + n=0 ; + for( i=0 ; i='0')&&(cmd[i-1]<='9') ) + ) ) + { if( (n==0) + ||(cmd[n]=='?')||(cmd[n]=='@') + ||(cmd[n]=='&')||(cmd[n]=='|') + ||(cmd[n]=='=')||(cmd[n]=='!') + ||(cmd[n]=='<')||(cmd[n]=='>')||(cmd[n]=='\'')||(cmd[n]=='`') + ||(cmd[n]=='-')||(cmd[n]=='+') + ||(cmd[n]=='*')||(cmd[n]=='/')||(cmd[n]=='%') + ||(cmd[n]=='^') ) n=i ; } + + else if( ((cmd[i]=='&')||(cmd[i]=='|')) && ( /* & = ET bit-a-bit | = OU bit-a-bit */ + (cmd[i-1]==')')||(cmd[i-1]=='.')||( (cmd[i-1]>='0')&&(cmd[i-1]<='9') ) + ) ) + { if( (n==0) + ||(cmd[n]=='&')||(cmd[n]=='|') + ||(cmd[n]=='=')||(cmd[n]=='!') + ||(cmd[n]=='<')||(cmd[n]=='>')||(cmd[n]=='\'')||(cmd[n]=='`') + ||(cmd[n]=='-')||(cmd[n]=='+') + ||(cmd[n]=='*')||(cmd[n]=='/')||(cmd[n]=='%') + ||(cmd[n]=='^') ) n=i ; } + + else if( ((cmd[i]=='=')||(cmd[i]=='!')) && ( + (cmd[i-1]==')')||(cmd[i-1]=='.')||( (cmd[i-1]>='0')&&(cmd[i-1]<='9') ) + ) ) + { if( (n==0) + ||(cmd[n]=='=')||(cmd[n]=='!') + ||(cmd[n]=='<')||(cmd[n]=='>')||(cmd[n]=='\'')||(cmd[n]=='`') + ||(cmd[n]=='-')||(cmd[n]=='+') + ||(cmd[n]=='*')||(cmd[n]=='/')||(cmd[n]=='%') + ||(cmd[n]=='^') ) n=i ; } + + else if( ((cmd[i]=='<')||(cmd[i]=='>')||(cmd[i]=='\'')||(cmd[i]=='`')) && ( /* ' = <= ` = >= */ + (cmd[i-1]==')')||(cmd[i-1]=='.')||( (cmd[i-1]>='0')&&(cmd[i-1]<='9') ) + ) ) + { if( (n==0) + ||(cmd[n]=='<')||(cmd[n]=='>')||(cmd[n]=='\'')||(cmd[n]=='`') + ||(cmd[n]=='-')||(cmd[n]=='+') + ||(cmd[n]=='*')||(cmd[n]=='/')||(cmd[n]=='%') + ||(cmd[n]=='^') ) n=i ; } + + else if( ((cmd[i]=='-')||(cmd[i]=='+')) && ( + (cmd[i-1]==')')||(cmd[i-1]=='.')||( (cmd[i-1]>='0')&&(cmd[i-1]<='9') ) + ) ) + { if( (n==0) + ||(cmd[n]=='-')||(cmd[n]=='+') + ||(cmd[n]=='*')||(cmd[n]=='/')||(cmd[n]=='%') + ||(cmd[n]=='^') ) n=i ; } + + else if( ((cmd[i]=='*')||(cmd[i]=='/')||(cmd[i]=='%')) && ( + (cmd[i-1]==')')||(cmd[i-1]=='.')||( (cmd[i-1]>='0')&&(cmd[i-1]<='9') ) + ) ) + { if( (n==0) + ||(cmd[n]=='*')||(cmd[n]=='/')||(cmd[n]=='%') + ||(cmd[n]=='^') ) n=i ; } + + else if( (cmd[i]=='^') && ( + (cmd[i-1]==')')||(cmd[i-1]=='.')||( (cmd[i-1]>='0')&&(cmd[i-1]<='9') ) + ) ) + { if( ( n==0 ) + ||(cmd[n]=='^') ) n=i ; } + + else if( cmd[i] == '(' ) { + p = 1 ; + do { + i++ ; + if( cmd[i]=='(' ) p++ ; + if( cmd[i]==')' ) p-- ; + } + while( (i0 ) { /* Operateur trouve */ + memcpy( deb, cmd, n ) ; deb[n] = '\0' ; + memcpy( fin, cmd+n+1 , strlen(cmd)-(n+1) ) ; fin[strlen(cmd)-(n+1)] = '\0' ; + switch( cmd[n] ) { + case '?': + if( (dres=bc_eval(deb))==bc_error ) bc_result=bc_error ; + else if( (bc_result=bc_eval(fin))!=bc_error ) + bc_result = dres && bc_result ; + break ; + case '@': + if( (dres=bc_eval(deb))==bc_error ) bc_result=bc_error ; + else if( (bc_result=bc_eval(fin))!=bc_error ) + bc_result = dres || bc_result ; + break ; + case '&': + if( (dres=bc_eval(deb))==bc_error ) bc_result=bc_error ; + else if( (bc_result=bc_eval(fin))!=bc_error ) + bc_result = (long int)dres & (long int)bc_result ; + break ; + case '|': + if( (dres=bc_eval(deb))==bc_error ) bc_result=bc_error ; + else if( (bc_result=bc_eval(fin))!=bc_error ) + bc_result = (long int)dres | (long int)bc_result ; + break ; + case '=': + if( (dres=bc_eval(deb))==bc_error ) bc_result=bc_error ; + else if( (bc_result=bc_eval(fin))!=bc_error ) + bc_result = dres == bc_result ; + break ; + case '!': + if( (dres=bc_eval(deb))==bc_error ) bc_result=bc_error ; + else if( (bc_result=bc_eval(fin))!=bc_error ) + bc_result = dres != bc_result ; + break ; + case '<': + if( (dres=bc_eval(deb))==bc_error ) bc_result=bc_error ; + else if( (bc_result=bc_eval(fin))!=bc_error ) + bc_result = dres < bc_result ; + break ; + case '>': + if( (dres=bc_eval(deb))==bc_error ) bc_result=bc_error ; + else if( (bc_result=bc_eval(fin))!=bc_error ) + bc_result = dres > bc_result ; + break ; + case '\'': + if( (dres=bc_eval(deb))==bc_error ) bc_result=bc_error ; + else if( (bc_result=bc_eval(fin))!=bc_error ) + bc_result = dres <= bc_result ; + break ; + case '`': + if( (dres=bc_eval(deb))==bc_error ) bc_result=bc_error ; + else if( (bc_result=bc_eval(fin))!=bc_error ) + bc_result = dres >= bc_result ; + break ; + case '-': + if( (dres=bc_eval(deb))==bc_error ) bc_result=bc_error ; + else if( (bc_result=bc_eval(fin))!=bc_error ) + bc_result=dres-bc_result ; + break ; + case '+': + if( (dres=bc_eval(deb))==bc_error ) bc_result=bc_error ; + else if( (bc_result=bc_eval(fin))!=bc_error ) + bc_result=dres+bc_result ; + break ; + case '*': + if( (dres=bc_eval(deb))==bc_error ) bc_result=bc_error ; + else if( (bc_result=bc_eval(fin))!=bc_error ) + bc_result=dres*bc_result ; + break ; + case '/': + if( (dres=bc_eval(deb))==bc_error ) bc_result=bc_error ; + else if( (bc_result=bc_eval(fin))!=bc_error ) { + if( bc_result==0 ) bc_result=bc_error ; + else bc_result=dres/bc_result ; + } + break ; + case '%': /* Modulo */ + while( strlen(deb)>7 ) { + c=deb[7] ; deb[7]='\0' ; + m = (long int)(bc_eval(deb)) % (long int)(bc_eval(fin)) ; + deb[7] = c ; + pst=deb+7; + sprintf( deb, "%ld%s", m, pst ) ; + } + if( (dres=bc_eval(deb))==bc_error ) bc_result=bc_error ; + else if( (bc_result=bc_eval(fin))!=bc_error ) + bc_result = (long int)dres % (long int)bc_result ; + break ; + case '^': + if( (dres=bc_eval(deb))==bc_error ) bc_result=bc_error ; + else if( (bc_result=bc_eval(fin))!=bc_error ) { + if( (dres==0)&&(bc_result==-1) ) bc_result=bc_error ; + else if( (dres<0)&&( bc_result!=ceil(bc_result) ) ) bc_result=bc_error ; + else bc_result=pow( dres, bc_result ) ; + } + + break ; + } + } + + else { + + /* Recherche de parenthse */ + if( cmd[0]=='(' ) { + p=1 ; i=1 ; + while( (p!=0)&&(i2) ) { + memcpy( deb, cmd+1, i-2 ) ; deb[i-2] = '\0' ; + for( k=0 ; k<(strlen(cmd)-i+1) ; k++ ) { cmd[k]=cmd[k+i]; if( cmd[k]=='\0' ) break ; } + bc_result = bc_eval( deb ) ; + } + } + + /* Recherche de fonctions */ + else if( (toupper(cmd[0])>='A')&&(toupper(cmd[0])<='Z') ) { + j = ( strstr(cmd,"(")!=NULL?strstr(cmd,"(")-cmd+1:0 ) ; + p=1 ; i=j; + while( (p!=0)&&(i=(j+1)) ) { + memcpy( deb, cmd, j ) ; deb[j] = '\0' ; + memcpy( fin, cmd+j, i-(j+1) ) ; fin[i-(j+1)] = '\0' ; + for( k=0 ; k<(strlen(cmd)-i+1) ; k++ ) { cmd[k]=cmd[k+i] ; if( cmd[k]=='\0' ) break ; } + + if( !strcmp(deb,"a(") ) /* Arrangement */ + { + for( k=0 ; (k bc_result ) bc_result = bc_error ; + else { dres1 = bc_result ; + for( k = bc_result-1 ; k >= (dres1-dres+1) ; k-- ) + bc_result = bc_result * k ; + } + } + else if( !strcmp(deb,"abs(") ) + { if( (bc_result=bc_eval( fin ))!=bc_error ) bc_result=fabs( bc_result ) ; } + else if( !strcmp(deb,"acos(") ) + { if( (bc_result=bc_eval( fin ))!=bc_error ) + bc_result=((bc_result>1)||(bc_result<-1))?bc_error:acos(bc_result) ; + } + else if( !strcmp(deb,"acosh(") ) + { if( (bc_result=bc_eval( fin ))!=bc_error ) + bc_result=(bc_result<1)?bc_error:acosh(bc_result) ; + } + else if( !strcmp(deb,"asin(") ) + { if( (bc_result=bc_eval( fin ))!=bc_error ) + bc_result=((bc_result>1)||(bc_result<-1))?bc_error:asin(bc_result) ; + } + else if( !strcmp(deb,"asinh(") ) + { if( (bc_result=bc_eval( fin ))!=bc_error ) bc_result=asinh( bc_result ) ; } + else if( !strcmp(deb,"atan(") ) + { if( (bc_result=bc_eval( fin ))!=bc_error ) bc_result=atan( bc_result ) ; } + else if( !strcmp(deb,"atanh(") ) + { if( (bc_result=bc_eval( fin ))!=bc_error ) + bc_result=((bc_result>=1)||(bc_result<=-1))?bc_error:atanh(bc_result) ; + } + else if( !strcmp(deb,"bin(") ) { + n = 0 ; bc_result = 1 ; + if( strlen(fin)>0 ) { + if( (strlen(fin)==(8*sizeof(long int)))&&(fin[0]=='1') ) {/* Cas d'un nombre negatif */ + for( i=(8*sizeof(long int)-1) ; i>=0 ; i-- ) { + if( fin[i]=='1' ) { fin[i]='0' ; break ; } + else if( fin[i]=='0' ) fin[i]='1' ; + else bc_result = bc_error ; + } + for( i=0 ; i<(8*sizeof(long int)) ; i++ ) { + if( fin[i]=='0' ) fin[i]='1' ; + else if( fin[i]=='1' ) fin[i]='0' ; + else bc_result = bc_error ; + } + if( bc_result!=bc_error ) bc_result = -1.0 ; + } + for( i=strlen(fin),j=0 ; i>0 ; i--, j++ ) { + if(fin[i-1]=='1') n=n+(long int)(pow(2.0,(bc_double)1.0*j)) ; + else if(fin[i-1]!='0') bc_result=bc_error ; + } + } + if( bc_result!=bc_error ) bc_result = bc_result*n ; + } + else if( !strcmp(deb,"c(") ) /* Combinaison */ + { + for( k=0 ; (k bc_result ) bc_result = bc_error ; + else { dres1 = bc_result ; + for( k = bc_result-1 ; k >= (dres1-dres+1) ; k-- ) + bc_result = bc_result * k ; + if( dres>1 ) + for( k=2 ; k<=dres ; k++ ) + bc_result=bc_result / k ; + } + } + else if( !strcmp(deb,"cbr(") ) + { if( (bc_result=bc_eval( fin ))!=bc_error ) bc_result=pow( bc_result, 3 ) ; } + else if( !strcmp(deb,"cbrt(") ) + { if( (bc_result=bc_eval( fin ))!=bc_error ) bc_result=cbrt( bc_result ) ; } + else if( !strcmp(deb,"ceil(") ) + { if( (bc_result=bc_eval( fin ))!=bc_error ) bc_result=ceil( bc_result ) ; } + else if( !strcmp(deb,"comp(") ) /* Complement 1 */ + { if( (bc_result=bc_eval( fin ))!=bc_error ) bc_result=~(long int)bc_result ; } + else if( !strcmp(deb,"cos(") ) + { if( (bc_result=bc_eval( fin ))!=bc_error ) bc_result=cos( bc_result ) ; } + else if( !strcmp(deb,"cosh(") ) + { if( (bc_result=bc_eval( fin ))!=bc_error ) bc_result=cosh( bc_result ) ; } + else if( !strcmp(deb,"cotan(") ) + { if( (bc_result=bc_eval( fin ))!=bc_error ) + bc_result=(bc_result==0)?bc_error:cosh(bc_result)/sin(bc_result) ; + } + else if( !strcmp(deb,"deg2rad(") ) + { if( (bc_result=bc_eval( fin ))!=bc_error ) bc_result= acos(-1.0)*(bc_result/180.0) ; } + else if( !strcmp(deb,"exp(") ) + { if( (bc_result=bc_eval( fin ))!=bc_error ) bc_result=exp( bc_result ) ; } + else if( !strcmp(deb,"fact(") ) { + bc_result = 1 ; + if( ( j = bc_eval( fin ) ) == bc_error ) bc_result = bc_error ; + else if( j>1 ) for( i=2 ; i<=j ; i++ ) bc_result=bc_result*i ; + } + else if( !strcmp(deb,"floor(") ) + { if( (bc_result=bc_eval( fin ))!=bc_error ) bc_result=floor( bc_result ) ; } + else if( !strcmp(deb,"help(") ) { + printf("Operators: ^, / * %%, + -, < > <= >=, == !=, & |, && ||\n") ; + printf( "Known functions: a, abs, acos, acosh, asin, asinh, atan, atanh, bin, c, cbr, cbrt, ceil, comp, cos, cosh, cotan, deg2rad, exp, fact, floor, help, hex, int, inv, ln, log, not, oct, pi, rad2deg, rand, sgn, sin, sinh, sqr, sqrt, tan, tanh, time\n" ); + bc_result=0. ; + return 0. ; + } + else if( !strcmp(deb,"hex(") ) + { if( sscanf(fin,"%lX",(long unsigned int *)&n)==0 ) bc_result=bc_error ; else bc_result=1.0*n ; } + else if( !strcmp(deb,"int(") ) + { if( (bc_result=bc_eval( fin ))!=bc_error ) bc_result=(int)( bc_result ) ; } + else if( !strcmp(deb,"inv(") ) + { if( (bc_result=bc_eval( fin ))!=bc_error ) + bc_result=(bc_result==0)?bc_error:(1/bc_result) ; + } + else if( !strcmp(deb,"ln(") ) + { if( (bc_result=bc_eval( fin ))!=bc_error ) + bc_result=(bc_result<=0)?bc_error:log(bc_result) ; + } + else if( !strcmp(deb,"log(") ) + { if( (bc_result=bc_eval( fin ))!=bc_error ) + bc_result=(bc_result<=0)?bc_error:log10(bc_result) ; + } + else if( !strcmp(deb,"not(") ) + { if( (bc_result=bc_eval( fin ))!=bc_error ) + bc_result=(bc_result==0.0)?1.0:0.0 ; + } + else if( !strcmp(deb,"oct(") ) + { if( sscanf(fin,"%lo",(long unsigned int *)&n)==0 ) bc_result=bc_error ; else bc_result=1.0*n ; } + else if( !strcmp(deb,"pi(") ) bc_result = BC_PI ; + else if( !strcmp(deb,"rad2deg(") ) + { if( (bc_result=bc_eval( fin ))!=bc_error ) bc_result= bc_result*180.0/acos(-1.0) ; } + else if( !strcmp(deb,"rand(") ) + { bc_seed = (unsigned int)(time(NULL)*cos(bc_seed+time(NULL))) ; + srand( bc_seed ) ; + if( strlen(fin)>0) { + if( (bc_result=bc_eval( fin ))!=bc_error ) { + if( bc_result==0 ) bc_result=(bc_double)(1.0*rand())/(RAND_MAX+1.0) ; + else { + dres=(bc_double)1.0*floor( fabs(bc_result) ) ; + bc_result=(bc_double)( 1+(int)(dres*1.0*rand()/(RAND_MAX+1.0)) ); + } + } + } + else { bc_result=(bc_double)(1.0*rand())/(RAND_MAX+1.0) ; } + } + else if( !strcmp(deb,"sgn(") ) + { if( (bc_result=bc_eval( fin ))!=bc_error ) { + if( bc_result > 0. ) bc_result=1.0 ; + else if( bc_result < 0. ) bc_result=-1.0 ; } + } + else if( !strcmp(deb,"sin(") ) + { if( (bc_result=bc_eval( fin ))!=bc_error ) bc_result=sin( bc_result ) ; } + else if( !strcmp(deb,"sinh(") ) + { if( (bc_result=bc_eval( fin ))!=bc_error ) bc_result=sinh( bc_result ) ; } + else if( !strcmp(deb,"sqr(") ) + { if( (bc_result=bc_eval( fin ))!=bc_error ) bc_result=bc_result*bc_result ; } + else if( !strcmp(deb,"sqrt(") ) + { if( (bc_result=bc_eval( fin ))!=bc_error ) + bc_result=(bc_result<0)?bc_error:sqrt(bc_result) ; + } + else if( !strcmp(deb,"tan(") ) + { if( (bc_result=bc_eval( fin ))!=bc_error ) + bc_result=(bc_result==(3.141592653589793239/2))?bc_error:tan(bc_result) ; + } + else if( !strcmp(deb,"tanh(") ) + { if( (bc_result=bc_eval( fin ))!=bc_error ) bc_result=tanh( bc_result ) ; } + else if( !strcmp(deb,"time(") ) bc_result = (bc_double) time(0) ; + + else bc_result = bc_error ; + } + else { bc_result = 0. ; } /* nombre de parentheses incoherentes */ + } + else { + /* bc_result = atof( cmd ) ; */ + bc_result = (bc_double)BC_STRTOD( cmd, &pst ) ; + if( bc_result==HUGE_VAL ) bc_result=bc_error ; + else if( bc_result==0. ) { if( pst==cmd ) bc_result=bc_error ; } + if( strlen( pst ) != 0 ) bc_result=bc_error ; + } + } + } + + free( cmd ) ; free( deb ) ; free( fin ) ; + return bc_result ; + } + + + +bc_double bc_function( const char * function, const int nbvar, ... ) { + bc_double bc_error = BC_ERROR ; /* Valeur renvoyee en cas d'erreur */ + bc_double bc_result = 0. ; + bc_double value ; + + char * str = NULL, *var, buffer[256] ; + int num, i, j ; + va_list ap; + + bc_result = bc_error ; + + if( ( str = (char*)malloc( strlen(function)+nbvar*250 ) ) != NULL ) { + strcpy( str, function ) ; + if( nbvar>0 ) { + va_start( ap, nbvar ) ; + + for( num=1 ; num<=nbvar ; num++ ) { + var = (char*) va_arg (ap, char *); + value = (bc_double) va_arg (ap, bc_double) ; + if( strlen(var) == 0 ) { va_end( ap ) ; break ; } + for( i=0 ; i='A')&&(toupper(str[i-1])>='Z')) ) + && !( (toupper(str[i-1+strlen(var)])>='A')&&(toupper(str[i-1+strlen(var)])>='Z') ) + ) { + + sprintf( buffer, BC_PATTERN, value ) ; + + if( strlen( buffer ) > 0 ) { + for( j=strlen(str) ; j>=i ; j-- ) + str[j+strlen(buffer)-strlen(var)]=str[j] ; + for( j=0 ; jprecision) && (iter=0 ; i-- ) { + if(v-(pow(2.0,(bc_double)i))>=0) { + v=v-(long int)(pow(2.0,(bc_double)i)); + st[8*sizeof(long int)-i-1] = '1' ; + } + } + if( f<0 ) { /* Cas d'un nombre negatif */ + for( i=0 ; i<(8*sizeof(long int)) ; i++ ) + if( st[i]=='0' ) st[i]='1' ; + else if( st[i]=='1' ) st[i]='0' ; + for( i=(8*sizeof(long int)-1) ; i>=0 ; i-- ) { + if( st[i]=='0' ) { st[i]='1' ; break ; } + else if( st[i]=='1' ) st[i]='0' ; + } + } + if( strlen(st) == 0 ) strcpy( st, "0" ) ; + /* On supprime les zeros devant */ + while( st[0]=='0' ) for( i=0 ; i= key_length ) j = 0 ; + } + } + } + +int bcrypt_test_pattern( const char * pattern, const unsigned int pattern_length ) { + unsigned int i, j ; + + if( pattern == NULL ) return 0 ; + if( pattern_length < 2 ) return 0 ; + if( (pattern[0]=='\n')||(pattern[0]=='\r') ) return 0 ; + for( i=1 ; i < pattern_length ; i++ ) { + if( (pattern[i]=='\n')||(pattern[i]=='\r') ) return 0 ; + for( j = 0 ; j < i ; j++ ) + if( pattern[j] == pattern[i] ) return 0 ; + } + + return 1 ; + } + +static int bcrypt_init_scramble( char * init_scramble, const char * pattern ) { + unsigned int i ; + sprintf( init_scramble, "%05d", rand() ) ; + for( i = 0 ; i < 5 ; i++ ) { + init_scramble[i] = init_scramble[strlen(init_scramble)-1-i] ; + init_scramble[i] = pattern[ init_scramble[i]%strlen( pattern ) + 1 ] ; + } + init_scramble[5] = '\0' ; + return 5 ; + } + +void bcrypt_init( const long t ) { + if( t == 0 ) srand( time(0) ) ; + else srand( t ) ; + } + +int bcrypt_string( const char * st_in, char * st_out, const unsigned int length, const char * init_pattern, const char * key, const unsigned int maxlinesize ) { + char * buf, * pattern ; + unsigned char c ; + unsigned int i, j = 0, linesize = 0, swapnumber = 0 ; + char init_scramble[256] = "" ; + + if( !bcrypt_test_pattern( init_pattern, strlen( init_pattern ) ) ) + { fprintf( stderr, "Not a valid pattern: %s\n", init_pattern ) ; return 0 ; } + + if( ( buf = (char*) malloc( length + 1 ) ) == NULL ) return 0 ; + memcpy( buf, st_in, length + 1 ) ; + + if( ( pattern = (char*) malloc( strlen( init_pattern ) + 1 ) ) == NULL ) + { free( buf ) ; return 0 ; } + strcpy( pattern, init_pattern ) ; + + j = bcrypt_init_scramble( init_scramble, pattern ) ; + for( i = 0 ; i < j ; i++ ) st_out[i] = init_scramble[i] ; + linesize = j ; + + bcrypt_scramble( pattern, strlen( pattern ), init_scramble, strlen( init_scramble ) ) ; + + for( i = 0 ; i < length ; i++ ) { + c = buf[i] ; + while( c >= (int)( strlen( pattern ) - 1 ) ) { + st_out[j] = pattern[strlen(pattern)-1] ; + j++ ; + c = c - ( strlen(pattern) -1 ) ; + bcrypt_scramble( pattern, strlen( pattern ), key, strlen( key ) ) ; + swapnumber = 0 ; + linesize++ ; + if( ( maxlinesize > 0 ) &&( linesize >= maxlinesize ) ) + { st_out[j] = '\n' ; j++ ; linesize = 0 ; } + } + st_out[j] = pattern[(int)c] ; + j++ ; + swapnumber++ ; + if( swapnumber >= strlen( pattern ) ) + { bcrypt_scramble( pattern, strlen( pattern ), key, strlen( key ) ) ; swapnumber = 0 ; } + linesize++ ; + if( ( maxlinesize > 0 ) &&( linesize >= maxlinesize ) ) + { st_out[j] = '\n' ; j++ ; linesize = 0 ; } + } + st_out[j] = '\0' ; + + free( pattern ) ; + free( buf ) ; + return j ; + } + +int bcrypt_string_printable( const char * st_in, char * st_out, const unsigned int length, const char * key, const unsigned int maxlinesize ) { + return bcrypt_string( st_in, st_out, length, bcrypt_pattern_printable, key, maxlinesize ) ; + } + +int bcrypt_string_base64( const char * st_in, char * st_out, const unsigned int length, const char * key, const unsigned int maxlinesize ) { + return bcrypt_string( st_in, st_out, length, bcrypt_pattern_base64, key, maxlinesize ) ; + } + +int bcrypt_string_base64url( const char * st_in, char * st_out, const unsigned int length, const char * key, const unsigned int maxlinesize ) { + return bcrypt_string( st_in, st_out, length, bcrypt_pattern_base64url, key, maxlinesize ) ; + } + +int bcrypt_string_auto( char * st, const unsigned int length, const char * init_pattern, const char * key, const unsigned int maxlinesize ) { + return bcrypt_string( st, st, length, init_pattern, key, maxlinesize ) ; + } + +int buncrypt_string( const char * st_in, char * st_out, const unsigned int length, const char * init_pattern, const char * key ) { + char * buf, * pattern, c = 0, c2 ; + unsigned int i, j = 0, k, swapnumber = 0 ; + char init_scramble[256] = "" ; + + if( !bcrypt_test_pattern( init_pattern, strlen( init_pattern ) ) ) + { fprintf( stderr, "Not a valid pattern: %s\n", init_pattern ) ; return 0 ; } + + if( ( buf = (char*) malloc( length + 1 ) ) == NULL ) return 0 ; + memcpy( buf, st_in, length + 1 ) ; + + if( ( pattern = (char*) malloc( strlen( init_pattern ) + 1 ) ) == NULL ) + { free( buf ) ; return 0 ; } + strcpy( pattern, init_pattern ) ; + + for( i = 0 ; i < 5 ; i++ ) init_scramble[i] = st_in[i] ; + init_scramble[5] = '\0' ; + bcrypt_scramble( pattern, strlen( pattern ), init_scramble, strlen( init_scramble ) ) ; + + c2 = 0 ; + for( i = 5 ; i < length ; i++ ) { + if( c != '\n' ) { + c = buf[i] ; + + while( c == pattern[strlen(pattern)-1] ) { + c2 = c2 + ( strlen(pattern) -1 ) ; + bcrypt_scramble( pattern, strlen( pattern ), key, strlen( key ) ) ; + swapnumber = 0 ; + do { i++ ; c = buf[i] ; } while( c == '\n' ) ; + } + for( k = 0 ; k < strlen( pattern ) ; k++ ) + if( pattern[k] == c ) + { c2 = c2 + k ; k = strlen( pattern ) ; } + st_out[j] = c2 ; + j++; + c2 = 0 ; + swapnumber++ ; + if( swapnumber >= strlen( pattern ) ) + { bcrypt_scramble( pattern, strlen( pattern ), key, strlen( key ) ) ; swapnumber = 0 ; } + } + } + st_out[j] = '\0' ; + + free( pattern ) ; + free( buf ) ; + return j ; + } + +int buncrypt_string_printable( const char * st_in, char * st_out, const unsigned int length, const char * key ) { + return buncrypt_string( st_in, st_out, length, bcrypt_pattern_printable, key ) ; + } + +int buncrypt_string_base64( const char * st_in, char * st_out, const unsigned int length, const char * key ) { + return buncrypt_string( st_in, st_out, length, bcrypt_pattern_base64, key ) ; + } + +int buncrypt_string_base64url( const char * st_in, char * st_out, const unsigned int length, const char * key ) { + return buncrypt_string( st_in, st_out, length, bcrypt_pattern_base64url, key ) ; + } + +int buncrypt_string_auto( char * st, const unsigned int length, const char * init_pattern, const char * key ) { + return buncrypt_string( st, st, length, init_pattern, key ) ; + } + +int bcrypt_file( const char * filename_in, const char * filename_out, const char * init_pattern, const char * key, const unsigned int maxlinesize ) { + FILE * fp, * fpout ; + unsigned int linesize = 0, swapnumber = 0 ; + int c ; + char * pattern, init_scramble[256] = "" ; + + if( !bcrypt_test_pattern( init_pattern, strlen( init_pattern ) ) ) + { fprintf( stderr, "Not a valid pattern: %s\n", init_pattern ) ; return 0 ; } + + if( !strcmp( filename_in, "-" ) ) { fp = stdin ; } + else { +#ifdef WIN32 + if( ( fp = fopen( filename_in, "rb" ) ) == NULL ) +#else + if( ( fp = fopen( filename_in, "r" ) ) == NULL ) +#endif + { + fprintf( stderr, "Unable to open file %s\n", filename_in ) ; + return 0 ; + } + } + + if( !strcmp( filename_out, "-" ) ) { fpout = stdout ; } + else { +#ifdef WIN32 + if( ( fpout = fopen( filename_out, "wt" ) ) == NULL ) +#else + if( ( fpout = fopen( filename_out, "wt" ) ) == NULL ) +#endif + { + fprintf( stderr, "Unable to open file %s\n", filename_out ) ; + fclose( fp ) ; + return 0 ; + } + } + + if( ( pattern = (char*) malloc( strlen( init_pattern ) + 1 ) ) == NULL ) + { fclose( fp ) ; fclose( fpout ) ; return 0 ; } + strcpy( pattern, init_pattern ) ; + + linesize = bcrypt_init_scramble( init_scramble, pattern ) ; + fwrite( init_scramble, 1, linesize, fpout ) ; + + bcrypt_scramble( pattern, strlen( pattern ), init_scramble, strlen( init_scramble ) ) ; + + while( ( c = fgetc( fp ) ) != EOF ) { + while( c >= (int)( strlen( pattern ) - 1 ) ) { + fprintf( fpout, "%c", pattern[strlen(pattern)-1] ) ; + c = c - ( strlen(pattern) -1 ) ; + bcrypt_scramble( pattern, strlen( pattern ), key, strlen( key ) ) ; + swapnumber = 0 ; + linesize++ ; + if( ( maxlinesize > 0 ) &&( linesize >= maxlinesize ) ) + { fprintf( fpout, "\n" ) ; linesize = 0 ; } + } + fprintf( fpout, "%c", pattern[c] ) ; + swapnumber++ ; + if( swapnumber >= strlen( pattern ) ) + { bcrypt_scramble( pattern, strlen( pattern ), key, strlen( key ) ) ; swapnumber = 0 ; } + linesize++ ; + if( ( maxlinesize > 0 ) &&( linesize >= maxlinesize ) ) + { fprintf( fpout, "\n" ) ; linesize = 0 ; } + } + + free( pattern ) ; + if( fp != stdin ) fclose( fp ); + if( fpout != stdout ) fclose( fpout ); + return 1 ; + } + +int bcrypt_file_printable( const char * filename_in, const char * filename_out, const char * key, const unsigned int maxlinesize ) { + return bcrypt_file( filename_in, filename_out, bcrypt_pattern_printable, key, maxlinesize ) ; + } + +int bcrypt_file_base64( const char * filename_in, const char * filename_out, const char * key, const unsigned int maxlinesize ) { + return bcrypt_file( filename_in, filename_out, bcrypt_pattern_base64, key, maxlinesize ) ; + } + +int bcrypt_file_base64url( const char * filename_in, const char * filename_out, const char * key, const unsigned int maxlinesize ) { + return bcrypt_file( filename_in, filename_out, bcrypt_pattern_base64url, key, maxlinesize ) ; + } + +int bcrypt_file_auto( const char * filename, const char * init_pattern, const char * key, const int unsigned maxlinesize ) { + char * fileout ; + int res ; + + if( !strcmp( filename, "-" ) ) + return bcrypt_file( "-", "-", init_pattern, key, maxlinesize ) ; + + fileout = (char*) malloc( strlen( filename ) + 5 ) ; + sprintf( fileout, "%s.bcr", filename ) ; + + res = bcrypt_file( filename, fileout, init_pattern, key, maxlinesize ) ; + free( fileout ) ; + + return res ; + } + +int buncrypt_file( const char * filename_in, const char * filename_out, const char * init_pattern, const char * key ) { + FILE * fp, * fpout ; + unsigned int swapnumber = 0, i ; + int c, c2 ; + char * pattern, init_scramble[256] ; + + if( !bcrypt_test_pattern( init_pattern, strlen( init_pattern ) ) ) + { fprintf( stderr, "Not a valid pattern: %s\n", init_pattern ) ; return 0 ; } + + if( !strcmp( filename_in, "-" ) ) { fp = stdin ; } + + else { +#ifdef WIN32 + if( ( fp = fopen( filename_in, "rt" ) ) == NULL ) +#else + if( ( fp = fopen( filename_in, "r" ) ) == NULL ) +#endif + { + fprintf( stderr, "Unable to open file %s\n", filename_in ) ; + return 0 ; + } + } + + if( !strcmp( filename_out, "-" ) ) { fpout = stdout ; } + else { +#ifdef WIN32 + if( ( fpout = fopen( filename_out, "wb" ) ) == NULL ) +#else + if( ( fpout = fopen( filename_out, "wb" ) ) == NULL ) +#endif + { + fprintf( stderr, "Unable to open file %s\n", filename_out ) ; + fclose( fp ) ; + return 0 ; + } + } + + if( ( pattern = (char*) malloc( strlen( init_pattern ) + 1 ) ) == NULL ) + { fclose( fp ) ; fclose( fpout ) ; return 0 ; } + strcpy( pattern, init_pattern ) ; + + fread( init_scramble, 1, 5, fp ) ; init_scramble[5] = '\0' ; + bcrypt_scramble( pattern, strlen( pattern ), init_scramble, strlen( init_scramble ) ) ; + + c2 = 0 ; + while( ( c = fgetc( fp ) ) != EOF ) { + if( c != '\n' ) { + while( c == pattern[strlen(pattern)-1] ) { + c2 = c2 + ( strlen(pattern) -1 ) ; + bcrypt_scramble( pattern, strlen( pattern ), key, strlen( key ) ) ; + swapnumber = 0 ; + while( ( c = fgetc( fp ) ) == '\n' ) { } + } + for( i = 0 ; i < strlen( pattern ) ; i++ ) + if( pattern[i] == c ) + { c2 = c2 + i ; i = strlen( pattern ) ; } + fprintf( fpout, "%c", c2 ) ; + swapnumber++ ; + if( swapnumber >= strlen( pattern ) ) + { bcrypt_scramble( pattern, strlen( pattern ), key, strlen( key ) ) ; swapnumber = 0 ; } + c2 = 0 ; + } + } + + free( pattern ) ; + if( fp != stdin ) fclose( fp ); + if( fpout != stdout ) fclose( fpout ); + return 1 ; + } + +int buncrypt_file_printable( const char * filename_in, const char * filename_out, const char * key ) { + return buncrypt_file( filename_in, filename_out, bcrypt_pattern_printable, key ) ; + } + +int buncrypt_file_base64( const char * filename_in, const char * filename_out, const char * key ) { + return buncrypt_file( filename_in, filename_out, bcrypt_pattern_base64, key ) ; + } + +int buncrypt_file_base64url( const char * filename_in, const char * filename_out, const char * key ) { + return buncrypt_file( filename_in, filename_out, bcrypt_pattern_base64url, key ) ; + } + +int buncrypt_file_auto( const char * filename, const char * init_pattern, const char * key ) { + char * fileout ; + int res ; + + if( !strcmp( filename, "-" ) ) + return buncrypt_file( "-", "-", init_pattern, key ) ; + + fileout = (char*) malloc( strlen( filename ) + 5 ) ; + + if( !strcmp( filename+strlen(filename)-4, ".bcr" ) ) { + strcpy( fileout, filename ) ; + fileout[strlen(fileout)-4] = '\0' ; + } + else + sprintf( fileout, "%s.ucr", filename ) ; + + res = buncrypt_file( filename, fileout, init_pattern, key ) ; + free( fileout ) ; + + return res ; + } + + +void bcrypt_usage( char * progname ) { + fprintf( stderr, "Usage: %s [-a] [-b] [-c] [-d] [-h] [-k key] [-l] [-n] [-s size] [-x] filename|string\n", progname ) ; + fprintf( stderr, "\t-a: A-Z, a-z pattern\n" ) ; + fprintf( stderr, "\t-b: base64 pattern\n" ) ; + fprintf( stderr, "\t-d: decrypt\n" ) ; + fprintf( stderr, "\t-c: string encryption\n" ) ; + fprintf( stderr, "\t-h: this help message\n" ) ; + fprintf( stderr, "\t-k key: define a key password\n" ) ; + fprintf( stderr, "\t-l: A-Z pattern\n" ) ; + fprintf( stderr, "\t-n: A-Z, a-z, 0-9 pattern\n" ) ; + fprintf( stderr, "\t-s size: size of output line (0=unlimited)\n" ) ; + fprintf( stderr, "\t-u: base64URL pattern\n" ) ; + fprintf( stderr, "\t-x: A-F pattern\n" ) ; + fprintf( stderr, "\tfilename|string: name of the file to treat (- for stdin), or string (with -c option)\n" ) ; + } + +int bcrypt_main( int argc, char * argv[], char * arge [] ) { + int return_code = 0, action = 1, maxlinesize = 80 ; + char pattern[1024], str[4096] ; + signed char ch ; + char * key = NULL ; + + if( !strcmp( argv[0]+strlen(argv[0])-12, "buncrypt.exe" ) ) action = action + 1 ; + + strcpy( pattern, bcrypt_pattern_printable ) ; + + while( ( ch = getopt( argc, argv, "abcdhk:lns:vx" ) ) != -1 ) { + switch( ch ) { + case 'a' : strcpy( pattern, bcrypt_pattern_alpha ) ; break ; + case 'b' : strcpy( pattern, bcrypt_pattern_base64 ) ; break ; + case 'c' : action = action + 2 ; break ; + case 'd' : action = action + 1 ; break ; + case 'l' : strcpy( pattern, bcrypt_pattern_letters ) ; break ; + case 'n' : strcpy( pattern, bcrypt_pattern_alphanum ) ; break ; + case 's' : maxlinesize = atoi( optarg ) ; break ; + case 'x' : strcpy( pattern, bcrypt_pattern_hexa ) ; break ; + case 'k' : + if( ( key = (char*) malloc( strlen( optarg ) + 1 ) ) == NULL ) return -5 ; + strcpy( key, optarg ) ; + break ; + case 'u' : strcpy( pattern, bcrypt_pattern_base64url ) ; break ; + case 'v' : bcrypt_verbose = 1 ; break ; + case 'h' : + default : bcrypt_usage( argv[0] ) ; exit( 1 ) ; break ; + } + } + + if( key == NULL ) { key = (char*) malloc( 5 ) ; strcpy( key, "0910" ) ; } + + if( optind == argc ) { + switch( action ) { + case 1 : return_code = bcrypt_file_auto( "-", pattern, key, maxlinesize ) ; break ; + case 2 : return_code = buncrypt_file_auto( "-", pattern, key ) ; break ; + default: bcrypt_usage( argv[0] ) ; exit( 1 ) ; break ; + } + } + else { + switch( action ) { + case 1 : return_code = bcrypt_file_auto( argv[optind], pattern, key, maxlinesize ) ; break ; + case 2 : return_code = buncrypt_file_auto( argv[optind], pattern, key ) ; break ; + case 3 : return_code = bcrypt_string( argv[optind], str, strlen( argv[optind] ), pattern, key, maxlinesize ) ; + printf( "%s\n", str ) ; + break ; + case 4 : return_code = buncrypt_string( argv[optind], str, strlen( argv[optind] ), pattern, key ) ; + printf( "%s\n", str ) ; + break ; + default: bcrypt_usage( argv[0] ) ; exit( 1 ) ; break ; + } + } + + if( return_code == 0 ) { + fprintf( stderr, "An error occure during de crypting process\n" ) ; + if( bcrypt_verbose ) printf( "return_code=%d\n", return_code ) ; + return_code = -1 ; + } + if( return_code == 1 ) return_code = 0 ; + + if( key != NULL ) free( key ) ; + return return_code ; + } + +#ifdef MAIN +int main( int argc, char * argv[], char * arge [] ) { + int return_code = 0 ; + return_code = bcrypt_main( argc, argv, arge ) ; + return return_code ; + } +#endif diff --git a/src/cstdlib2/bcrypt.h b/src/cstdlib2/bcrypt.h new file mode 100644 index 0000000..e6b7016 --- /dev/null +++ b/src/cstdlib2/bcrypt.h @@ -0,0 +1,81 @@ + +#ifndef __BCRYPT +#define __BCRYPT + +#include "../platform.h" + +#include +#include +#include +#include +#include + +/* Cas de la construction de la DLL */ +#ifdef BUILD_DLL +#define LINKDLL extern "C" __declspec(dllexport) +#define LINKDLLCPP __declspec(dllexport) +#else +#define LINKDLL +#define LINKDLLCPP +#endif + +/* code retour +1 si tout va bien +0 en cas d'erreur +*/ + +LINKDLL int bcrypt_test_pattern( const char * pattern, const unsigned int pattern_length ) ; + +LINKDLL void bcrypt_init( const long t ) ; + +LINKDLL int bcrypt_string( const char * st_in, char * st_out, const unsigned int length + , const char * init_pattern, const char * key, const unsigned int maxlinesize ) ; +LINKDLL int buncrypt_string( const char * st_in, char * st_out, const unsigned int length + , const char * init_pattern, const char * key ) ; + +LINKDLL int bcrypt_string_printable( const char * st_in, char * st_out + , const unsigned int length, const char * key, const unsigned int maxlinesize ) ; +LINKDLL int buncrypt_string_printable( const char * st_in, char * st_out + , const unsigned int length, const char * key ) ; + +LINKDLL int bcrypt_string_base64( const char * st_in, char * st_out + , const unsigned int length, const char * key, const unsigned int maxlinesize ) ; +LINKDLL int buncrypt_string_base64( const char * st_in, char * st_out + , const unsigned int length, const char * key ) ; + +LINKDLL int bcrypt_string_base64url( const char * st_in, char * st_out + , const unsigned int length, const char * key, const unsigned int maxlinesize ) ; +LINKDLL int buncrypt_string_base64url( const char * st_in, char * st_out + , const unsigned int length, const char * key ) ; + +LINKDLL int bcrypt_string_auto( char * st, const unsigned int length + , const char * init_pattern, const char * key, const unsigned int maxlinesize ) ; +LINKDLL int buncrypt_string_auto( char * st, const unsigned int length + , const char * init_pattern, const char * key ) ; + +LINKDLL int bcrypt_file( const char * filename_in, const char * filename_out + , const char * init_pattern, const char * key, const int unsigned maxlinesize ) ; +LINKDLL int buncrypt_file( const char * filename_in, const char * filename_out + , const char * init_pattern, const char * key ) ; + +LINKDLL int bcrypt_file_printable( const char * filename_in, const char * filename_out + , const char * key, const unsigned int maxlinesize ) ; +LINKDLL int buncrypt_file_printable( const char * filename, const char * filename_out + , const char * key ) ; + +LINKDLL int bcrypt_file_base64( const char * filename_in, const char * filename_out + , const char * key, const unsigned int maxlinesize ) ; +LINKDLL int buncrypt_file_base64( const char * filename, const char * filename_out + , const char * key ) ; + +LINKDLL int bcrypt_file_base64url( const char * filename_in, const char * filename_out + , const char * key, const unsigned int maxlinesize ) ; +LINKDLL int buncrypt_file_base64url( const char * filename, const char * filename_out + , const char * key ) ; + +LINKDLL int bcrypt_file_auto( const char * filename + , const char * init_pattern, const char * key, const int unsigned maxlinesize ) ; +LINKDLL int buncrypt_file_auto( const char * filename + , const char * init_pattern, const char * key ) ; + +#endif diff --git a/src/cstdlib2/build.h b/src/cstdlib2/build.h new file mode 100644 index 0000000..4ed1237 --- /dev/null +++ b/src/cstdlib2/build.h @@ -0,0 +1 @@ +#define BUILD_TIME "05/11/2018-22:10:43" diff --git a/src/cstdlib2/c.ico b/src/cstdlib2/c.ico new file mode 100644 index 0000000..b73f6e0 Binary files /dev/null and b/src/cstdlib2/c.ico differ diff --git a/src/cstdlib2/c.png b/src/cstdlib2/c.png new file mode 100644 index 0000000..8c5b522 Binary files /dev/null and b/src/cstdlib2/c.png differ diff --git a/src/cstdlib2/dirent.c b/src/cstdlib2/dirent.c new file mode 100644 index 0000000..b1ddc0a --- /dev/null +++ b/src/cstdlib2/dirent.c @@ -0,0 +1,117 @@ +/* dirent.h library for large systems - small embedded systems use clibrary.c instead */ +#include "../interpreter.h" +#include + +typedef struct dir { DIR * ptr ; } DIRStruct ; +typedef struct dirent DirentStruct ; + +/* handy structure definitions */ +#ifdef WIN32 +char DirentDefs[1024] = "\ +typedef struct dir {\n\ + void * ptr ;\n\ +} DIR ;\n\ +"; +/* struct dirent { long d_ino; unsigned short d_reclen; unsigned short d_namlen; char d_name[260]; }; */ + +#else +char DirentDefs[1024] = "\ +typedef struct dir {\n\ + void * ptr ;\n\ +} DIR ; \n\ +"; +#endif + +/* dirent calls */ +void DirentOpendir(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + DIR * dir = opendir( Param[0]->Val->Pointer ) ; + DIRStruct * ds ; + ds = (DIRStruct *)malloc( sizeof( DIRStruct ) ) ; + ds->ptr = (void*)dir ; + ReturnValue->Val->Pointer = ds ; +} +void DirentClosedir(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + DIRStruct * ds = (DIRStruct *)Param[0]->Val->Pointer ; + DIR * dir = ds->ptr ; + int ret = closedir( dir ) ; + free( ds ) ; + ReturnValue->Val->Integer = ret ; +} +void DirentReaddir(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + DIRStruct * ds = (DIRStruct *)Param[0]->Val->Pointer ; + DIR * dir = ds->ptr ; + ReturnValue->Val->Pointer = readdir(dir); +} +void DirentRewinddir(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + DIRStruct * ds = (DIRStruct *)Param[0]->Val->Pointer ; + DIR * dir = ds->ptr ; + rewinddir(dir); +} +void DirentTelldir(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + DIRStruct * ds = (DIRStruct *)Param[0]->Val->Pointer ; + DIR * dir = ds->ptr ; + ReturnValue->Val->Integer = telldir(dir); +} +void DirentSeekdir(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + DIRStruct * ds = (DIRStruct *)Param[0]->Val->Pointer ; + DIR * dir = ds->ptr ; + seekdir(dir, Param[1]->Val->Integer); +} +void DirentGetname(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + struct dirent *dp = Param[0]->Val->Pointer ; + ReturnValue->Val->Pointer = (char*)dp->d_name ; +} + +/* all dirent functions */ +struct LibraryFunction DirentFunctions[] = +{ + { DirentOpendir, "DIR * opendir( char * name ) ;" }, + { DirentClosedir, "int closedir( DIR * dirp ) ;" }, + { DirentReaddir, "struct dirent * readdir( DIR * dirp ) ;" }, + { DirentRewinddir, "void rewinddir( DIR * dirp ) ;" }, + { DirentTelldir, "long telldir( DIR * dirp ) ;" }, + { DirentSeekdir, "void seekdir( DIR * dirp, long offset ) ;" }, + { DirentGetname, "char * dirent_getname( struct dirent * dp ) ;" }, + { NULL, NULL } +}; + +/* creates various system-dependent definitions */ +void InitDirentDefs(void) { + char buffer[1024] ; + struct dirent de ; +#ifdef WIN32 + sprintf( buffer, "struct dirent { long d_ino; char vide[%d]; char d_name[%d]; };", (int)(&(de.d_name))-(int)(&(de.d_ino))-sizeof(de.d_ino), sizeof(de.d_name) ); +#else + sprintf( buffer, "struct dirent { long d_ino; char vide[%lu]; char d_name[%lu]; };", (long unsigned int)(&(de.d_name))-(long unsigned int)(&(de.d_ino))-sizeof(de.d_ino), sizeof(de.d_name) ); +#endif + strcat( DirentDefs, buffer ) ; +} + +void DirentSetupFunc(Picoc *pc) +{ + /*struct ValueType *StructDirType;*/ + /*struct ValueType *DirPtrType;*/ + + /* make a "struct __DIRStruct" which is the same size as a native DIR structure */ + /* TypeCreateOpaqueStruct(NULL, TableStrRegister("__DIRStruct"), sizeof(DIR)); */ + +/* +#ifndef WIN32 + TypeCreateOpaqueStruct(NULL, TableStrRegister("dirent"), sizeof(struct dirent)); +#endif +*/ + + /* get a DIR * type */ + /*DirPtrType = TypeGetMatching(NULL, StructDirType, TypePointer, 0, StrEmpty, TRUE);*/ + + /* make a "struct __DirentStruct" which is the same size as a native dirent structure */ + /*TypeCreateOpaqueStruct(NULL, TableStrRegister("__DirentStruct"), sizeof(struct dirent));*/ + +} diff --git a/src/cstdlib2/dirent.o b/src/cstdlib2/dirent.o new file mode 100644 index 0000000..f133d17 Binary files /dev/null and b/src/cstdlib2/dirent.o differ diff --git a/src/cstdlib2/keyb.c b/src/cstdlib2/keyb.c new file mode 100644 index 0000000..ffdbb54 --- /dev/null +++ b/src/cstdlib2/keyb.c @@ -0,0 +1,637 @@ +#define MAXCORRESP 300 + +int pos( const char * , const char * ) ; +int del( char * , const int , const int ) ; + +struct tabcorresp { + unsigned int valint ; + char valchar[11] ; + } ; +/* +struct tabcorresp TabCorresp[MAXCORRESP] = { + 0x10,"SHIFT", 0xa0,"SHIFT", 0xa1,"SHIFT", + 0x03,"CANCEL", 0x08,"BACKSPACE", 0x09,"TAB", 0x0c,"CLEAR", 0x0d,"RETURN", + 0x11,"CTRL", 0xa2,"CTRL", 0xa3,"CTRL", + 0x12,"ALT", 0xa4,"ALT", 0xa5,"ALTGR", + 0x13,"PAUSE", 0x14,"CAPS", 0x1b,"ESC", 0x20,"SPACE", + 0x21,"PRIOR", 0x22,"NEXT", 0x23,"END", 0x24,"HOME", 0x25,"LEFT", 0x26,"UP", 0x27,"RIGHT", 0x28,"DOWN", // Touche flches + 0x2a,"PRINT", 0x2d,"INS", 0x2e,"DEL", 0x2f,"HELP", + 0x30,"", 0x31,"&", 0x32,"", 0x33,"\"", 0x34,"\'", 0x35,"(", 0x36,"-", 0x37,"", 0x38,"_", 0x39,"", 0xdb,")", 0xbb,"=", // Touches au dessus des lettres + 0x41,"a", 0x42,"b", 0x43,"c", 0x44,"d", 0x45,"e", 0x46,"f", 0x47,"g", 0x48,"h", 0x49,"i", 0x4a,"j", + 0x4b,"k", 0x4c,"l", 0x4d,"m", 0x4e,"n", 0x4f,"o", 0x50,"p", 0x51,"q", 0x52,"r", 0x53,"s", 0x54,"t", + 0x55,"u", 0x56,"v", 0x57,"w", 0x58,"x", 0x59,"y", 0x5a,"z", + 0x5b,"WIN", 0x5c,"WIN", 0x5d,"APPS", + 0x60,"0", 0x61,"1", 0x62,"2", 0x63,"3", 0x64,"4", 0x65,"5", 0x66,"6", 0x67,"7", 0x68,"8", 0x69,"9", 0x6e,".", 0x6b,"+", 0x6a,"*", 0x6f,"/", // Pav numerique + 0x70,"F1", 0x71,"F2", 0x72,"F3", 0x73,"F4", 0x74,"F5", 0x75,"F6", 0x76,"F7", 0x77,"F8", 0x78,"F9", 0x79,"F10", 0x7a,"F11", 0x7b,"F12", 0x7c,"F13", 0x7d,"F14", 0x7e,"F15", 0x7f,"F16", 0x80,"F17", 0x81,"F18", 0x82,"F19", 0x83,"F20", 0x84,"F21", 0x85,"F22", 0x86,"F23", 0x87,"F24", // Touches de fonction + 0x90,"NUMLOCK", 0x91,"SCROLLLOCK", + 0xba,"$", 0xc0,"", 0xdc,"*", 0xbc,",", 0xbe,";", 0xdf,"!", 0xde,"" + } ;*/ +struct tabcorresp TabCorresp[MAXCORRESP] = { + {0x10,"SHIFT"}, {0xa0,"SHIFT"}, {0xa1,"SHIFT"}, + {0x03,"CANCEL"}, {0x08,"BACKSPACE"}, {0x09,"TAB"}, {0x0c,"CLEAR"}, {0x0d,"RETURN"}, + {0x11,"CTRL"}, {0xa2,"CTRL"}, {0xa3,"CTRL"}, + {0x12,"ALT"}, {0xa4,"ALT"}, {0xa5,"ALTGR"}, + {0x13,"PAUSE"}, {0x14,"CAPS"}, {0x1b,"ESC"}, {0x20,"SPACE"}, + {0x21,"PRIOR"}, {0x22,"NEXT"}, {0x23,"END"}, {0x24,"HOME"}, {0x25,"LEFT"}, {0x26,"UP"}, {0x27,"RIGHT"}, {0x28,"DOWN"}, /* Touche flches */ + {0x2a,"PRINT"}, {0x2d,"INS"}, {0x2e,"DEL"}, {0x2f,"HELP"}, + {0x30,""}, {0x31,"&"}, {0x32,""}, {0x33,"\""}, {0x34,"\'"}, {0x35,"("}, {0x36,"-"}, {0x37,""}, {0x38,"_"}, {0x39,""}, {0xdb,")"}, {0xbb,"="}, /* Touches au dessus des lettres */ + {0x41,"a"}, {0x42,"b"}, {0x43,"c"}, {0x44,"d"}, {0x45,"e"}, {0x46,"f"}, {0x47,"g"}, {0x48,"h"}, {0x49,"i"}, {0x4a,"j"}, + {0x4b,"k"}, {0x4c,"l"}, {0x4d,"m"}, {0x4e,"n"}, {0x4f,"o"}, {0x50,"p"}, {0x51,"q"}, {0x52,"r"}, {0x53,"s"}, {0x54,"t"}, + {0x55,"u"}, {0x56,"v"}, {0x57,"w"}, {0x58,"x"}, {0x59,"y"}, {0x5a,"z"}, + {0x5b,"WIN"}, {0x5c,"WIN"}, {0x5d,"APPS"}, + {0x60,"0"}, {0x61,"1"}, {0x62,"2"}, {0x63,"3"}, {0x64,"4"}, {0x65,"5"}, {0x66,"6"}, {0x67,"7"}, {0x68,"8"}, {0x69,"9"}, {0x6e,"."}, {0x6b,"+"}, {0x6a,"*"}, {0x6f,"/"}, /* Pav numerique */ + {0x70,"F1"}, {0x71,"F2"}, {0x72,"F3"}, {0x73,"F4"}, {0x74,"F5"}, {0x75,"F6"}, {0x76,"F7"}, {0x77,"F8"}, {0x78,"F9"}, {0x79,"F10"}, {0x7a,"F11"}, {0x7b,"F12"}, {0x7c,"F13"}, {0x7d,"F14"}, {0x7e,"F15"}, {0x7f,"F16"}, {0x80,"F17"}, {0x81,"F18"}, {0x82,"F19"}, {0x83,"F20"}, {0x84,"F21"}, {0x85,"F22"}, {0x86,"F23"}, {0x87,"F24"}, /* Touches de fonction */ + {0x90,"NUMLOCK"}, {0x91,"SCROLLLOCK"}, + {0xba,"$"}, {0xc0,""}, {0xdc,"*"}, {0xbc,","}, {0xbe,";"}, {0xdf,"!"}, {0xde,""} + } ; + +/* Envoi simple de suite de touches 'standard' de clavier */ +void __stdcall KeyboardSimule(TCHAR *psz) +{ + INPUT npt; + npt.ki.dwExtraInfo = npt.ki.time = 0; + npt.type = INPUT_KEYBOARD; + npt.ki.wVk = 0; + while(*psz) { +#ifdef UNICODE + npt.ki.wScan = (WORD) *psz; +#else + npt.ki.wScan = (WORD) (BYTE) *psz; +#endif + npt.ki.dwFlags = KEYEVENTF_UNICODE; + SendInput(1, &npt, sizeof(INPUT)); + npt.ki.dwFlags = KEYEVENTF_UNICODE| KEYEVENTF_KEYUP; + SendInput(1, &npt, sizeof(INPUT)); + psz++; + } +} + +/* Envoi simple de suite de touches 'standard' de clavier avec un beep entre chaque */ +void __stdcall KeyboardSimuleBeep(TCHAR *psz) +{ + INPUT npt; + npt.ki.dwExtraInfo = npt.ki.time = 0; + npt.type = INPUT_KEYBOARD; + npt.ki.wVk = 0; + while(*psz) { +#ifdef UNICODE + npt.ki.wScan = (WORD) *psz; +#else + npt.ki.wScan = (WORD) (BYTE) *psz; +#endif + npt.ki.dwFlags = KEYEVENTF_UNICODE; + SendInput(1, &npt, sizeof(INPUT)); + npt.ki.dwFlags = KEYEVENTF_UNICODE| KEYEVENTF_KEYUP; + SendInput(1, &npt, sizeof(INPUT)); + psz++; + MessageBeep(0); + Sleep(40); + } +} + + +/* Envoi simple d'une touche 'standard' du clavier */ +void __stdcall Keyboard1Simule(const char c) { + char st[2]; + st[0]=c;st[1]='\0'; + KeyboardSimule((TCHAR*)st); + } + +void GetKeyName( DWORD x, char * buf ) { + unsigned int i; + for( i=0 ; i='A') && (x<='Z') ) VirtualKeyDown(VK_SHIFT) ; + KeyDown(x); + KeyUp(x); + if( (x>='A') && (x<='Z') ) VirtualKeyUp(VK_SHIFT) ; + } + +/* Envoi d'une touche "virtuelle" */ +void KeyboardVirtualKey(const int x) { + VirtualKeyDown(x); + VirtualKeyUp(x); + } + +/* Procedure generale du clavier */ +void RunKeyboard(const char * cmd) { + char * st; + st = (char*)malloc(strlen(cmd)+1); + strcpy(st,cmd); + while( st[0] ){ + if( st[0] == '{' ) { + if(pos("{BACKSPACE}",st)==1) {KeyboardVirtualKey(VK_BACK);del(st,1,11);} + else if(pos("{+BACKSPACE}",st)==1 ) {VirtualKeyDown(VK_BACK);del(st,1,12);} + else if(pos("{-BACKSPACE}",st)==1 ) {VirtualKeyUp(VK_BACK);del(st,1,12);} + else if(pos("{APPS}",st)==1) {KeyboardVirtualKey(VK_APPS);del(st,1,6);} + else if(pos("{+APPS}",st)==1) {VirtualKeyDown(VK_APPS);del(st,1,7);} + else if(pos("{-APPS}",st)==1) {VirtualKeyUp(VK_APPS);del(st,1,7);} + else if(pos("{ALT}",st)==1 ) { + KeyboardMultiVirtualKey(VK_MENU,st[5],0,2); + del(st,1,6); + } + else if(pos("{+ALT}",st)==1 ) {VirtualKeyDown(VK_MENU);del(st,1,6);} + else if(pos("{-ALT}",st)==1 ) {VirtualKeyUp(VK_MENU);del(st,1,6);} + else if(pos("{ALTGR}",st)==1 ) { + KeyboardMultiVirtualKey(VK_RMENU,st[7],0,2); + del(st,1,8); + } + else if(pos("{+ALTGR}",st)==1 ) {VirtualKeyDown(VK_RMENU);del(st,1,8);} + else if(pos("{-ALTGR}",st)==1 ) {VirtualKeyUp(VK_RMENU);del(st,1,8);} + else if(pos("{CAPS}",st)==1) {KeyboardVirtualKey(VK_CAPITAL);del(st,1,6);} + else if(pos("{+CAPS}",st)==1) {VirtualKeyDown(VK_CAPITAL);del(st,1,7);} + else if(pos("{-CAPS}",st)==1) {VirtualKeyUp(VK_CAPITAL);del(st,1,7);} + else if(pos("{CANCEL}",st)==1) {KeyboardVirtualKey(VK_CANCEL);del(st,1,8);} + else if(pos("{+CANCEL}",st)==1 ) {VirtualKeyDown(VK_CANCEL);del(st,1,9);} + else if(pos("{-CANCEL}",st)==1 ) {VirtualKeyUp(VK_CANCEL);del(st,1,9);} + else if(pos("{CTRL}",st)==1 ) { + KeyboardMultiVirtualKey(VK_CONTROL,st[6],0,2); + del(st,1,7); + } + else if(pos("{+CTRL}",st)==1 ) {VirtualKeyDown(VK_CONTROL);del(st,1,7);} + else if(pos("{-CTRL}",st)==1 ) {VirtualKeyUp(VK_CONTROL);del(st,1,7);} + else if(pos("{DEL}",st)==1) {KeyboardVirtualKey(VK_CLEAR);del(st,1,5);} + else if(pos("{+DEL}",st)==1) {VirtualKeyDown(VK_CLEAR);del(st,1,6);} + else if(pos("{-DEL}",st)==1) {VirtualKeyUp(VK_CLEAR);del(st,1,6);} + else if(pos("{DOWN}",st)==1) {KeyboardVirtualKey(VK_DOWN);del(st,1,6);} + else if(pos("{+DOWN}",st)==1) {VirtualKeyDown(VK_DOWN);del(st,1,7);} + else if(pos("{-DOWN}",st)==1) {VirtualKeyUp(VK_DOWN);del(st,1,7);} + else if(pos("{END}",st)==1) {KeyboardVirtualKey(VK_END);del(st,1,5);} + else if(pos("{+END}",st)==1) {VirtualKeyDown(VK_END);del(st,1,6);} + else if(pos("{-END}",st)==1) {VirtualKeyUp(VK_END);del(st,1,6);} + else if(pos("{ESC}",st)==1) {KeyboardVirtualKey(VK_ESCAPE);del(st,1,5);} + else if(pos("{+ESC}",st)==1) {VirtualKeyDown(VK_ESCAPE);del(st,1,6);} + else if(pos("{-ESC}",st)==1) {VirtualKeyUp(VK_ESCAPE);del(st,1,6);} + else if(pos("{F1}",st)==1) {KeyboardVirtualKey(VK_F1);del(st,1,4);} + else if(pos("{+F1}",st)==1) {VirtualKeyDown(VK_F1);del(st,1,5);} + else if(pos("{-F1}",st)==1) {VirtualKeyUp(VK_F1);del(st,1,5);} + else if(pos("{F2}",st)==1) {KeyboardVirtualKey(VK_F2);del(st,1,4);} + else if(pos("{+F2}",st)==1) {VirtualKeyDown(VK_F2);del(st,1,5);} + else if(pos("{-F2}",st)==1) {VirtualKeyUp(VK_F2);del(st,1,5);} + else if(pos("{F3}",st)==1) {KeyboardVirtualKey(VK_F3);del(st,1,4);} + else if(pos("{+F3}",st)==1) {VirtualKeyDown(VK_F3);del(st,1,5);} + else if(pos("{-F3}",st)==1) {VirtualKeyUp(VK_F3);del(st,1,5);} + else if(pos("{F4}",st)==1) {KeyboardVirtualKey(VK_F4);del(st,1,4);} + else if(pos("{+F4}",st)==1) {VirtualKeyDown(VK_F4);del(st,1,5);} + else if(pos("{-F4}",st)==1) {VirtualKeyUp(VK_F4);del(st,1,5);} + else if(pos("{F5}",st)==1) {KeyboardVirtualKey(VK_F5);del(st,1,4);} + else if(pos("{+F5}",st)==1) {VirtualKeyDown(VK_F5);del(st,1,5);} + else if(pos("{-F5}",st)==1) {VirtualKeyUp(VK_F5);del(st,1,5);} + else if(pos("{F6}",st)==1) {KeyboardVirtualKey(VK_F6);del(st,1,4);} + else if(pos("{+F6}",st)==1) {VirtualKeyDown(VK_F6);del(st,1,5);} + else if(pos("{-F6}",st)==1) {VirtualKeyUp(VK_F6);del(st,1,5);} + else if(pos("{F7}",st)==1) {KeyboardVirtualKey(VK_F7);del(st,1,4);} + else if(pos("{+F7}",st)==1) {VirtualKeyDown(VK_F7);del(st,1,5);} + else if(pos("{-F7}",st)==1) {VirtualKeyUp(VK_F7);del(st,1,5);} + else if(pos("{F8}",st)==1) {KeyboardVirtualKey(VK_F8);del(st,1,4);} + else if(pos("{+F8}",st)==1) {VirtualKeyDown(VK_F8);del(st,1,5);} + else if(pos("{-F8}",st)==1) {VirtualKeyUp(VK_F8);del(st,1,5);} + else if(pos("{F9}",st)==1) {KeyboardVirtualKey(VK_F9);del(st,1,4);} + else if(pos("{+F9}",st)==1) {VirtualKeyDown(VK_F9);del(st,1,5);} + else if(pos("{-F9}",st)==1) {VirtualKeyUp(VK_F9);del(st,1,5);} + else if(pos("{F10}",st)==1) {KeyboardVirtualKey(VK_F10);del(st,1,5);} + else if(pos("{+F10}",st)==1) {VirtualKeyDown(VK_F10);del(st,1,6);} + else if(pos("{-F10}",st)==1) {VirtualKeyUp(VK_F10);del(st,1,6);} + else if(pos("{F11}",st)==1) {KeyboardVirtualKey(VK_F11);del(st,1,5);} + else if(pos("{+F11}",st)==1) {VirtualKeyDown(VK_F11);del(st,1,6);} + else if(pos("{-F11}",st)==1) {VirtualKeyUp(VK_F11);del(st,1,6);} + else if(pos("{F12}",st)==1) {KeyboardVirtualKey(VK_F12);del(st,1,5);} + else if(pos("{+F12}",st)==1) {VirtualKeyDown(VK_F12);del(st,1,6);} + else if(pos("{-F12}",st)==1) {VirtualKeyUp(VK_F12);del(st,1,6);} + else if(pos("{F13}",st)==1) {KeyboardVirtualKey(VK_F13);del(st,1,5);} + else if(pos("{+F13}",st)==1) {VirtualKeyDown(VK_F13);del(st,1,6);} + else if(pos("{-F13}",st)==1) {VirtualKeyUp(VK_F13);del(st,1,6);} + else if(pos("{F14}",st)==1) {KeyboardVirtualKey(VK_F14);del(st,1,5);} + else if(pos("{+F14}",st)==1) {VirtualKeyDown(VK_F14);del(st,1,6);} + else if(pos("{-F14}",st)==1) {VirtualKeyUp(VK_F14);del(st,1,6);} + else if(pos("{F15}",st)==1) {KeyboardVirtualKey(VK_F15);del(st,1,5);} + else if(pos("{+F15}",st)==1) {VirtualKeyDown(VK_F15);del(st,1,6);} + else if(pos("{-F15}",st)==1) {VirtualKeyUp(VK_F15);del(st,1,6);} + else if(pos("{F16}",st)==1) {KeyboardVirtualKey(VK_F16);del(st,1,5);} + else if(pos("{+F16}",st)==1) {VirtualKeyDown(VK_F16);del(st,1,6);} + else if(pos("{-F16}",st)==1) {VirtualKeyUp(VK_F16);del(st,1,6);} + else if(pos("{F17}",st)==1) {KeyboardVirtualKey(VK_F17);del(st,1,5);} + else if(pos("{+F17}",st)==1) {VirtualKeyDown(VK_F17);del(st,1,6);} + else if(pos("{-F17}",st)==1) {VirtualKeyUp(VK_F17);del(st,1,6);} + else if(pos("{F18}",st)==1) {KeyboardVirtualKey(VK_F18);del(st,1,5);} + else if(pos("{+F18}",st)==1) {VirtualKeyDown(VK_F18);del(st,1,6);} + else if(pos("{-F18}",st)==1) {VirtualKeyUp(VK_F18);del(st,1,6);} + else if(pos("{F19}",st)==1) {KeyboardVirtualKey(VK_F19);del(st,1,5);} + else if(pos("{+F19}",st)==1) {VirtualKeyDown(VK_F19);del(st,1,6);} + else if(pos("{-F19}",st)==1) {VirtualKeyUp(VK_F19);del(st,1,6);} + else if(pos("{F20}",st)==1) {KeyboardVirtualKey(VK_F20);del(st,1,5);} + else if(pos("{+F20}",st)==1) {VirtualKeyDown(VK_F20);del(st,1,6);} + else if(pos("{-F20}",st)==1) {VirtualKeyUp(VK_F20);del(st,1,6);} + else if(pos("{F21}",st)==1) {KeyboardVirtualKey(VK_F21);del(st,1,5);} + else if(pos("{+F21}",st)==1) {VirtualKeyDown(VK_F21);del(st,1,6);} + else if(pos("{-F21}",st)==1) {VirtualKeyUp(VK_F21);del(st,1,6);} + else if(pos("{F22}",st)==1) {KeyboardVirtualKey(VK_F22);del(st,1,5);} + else if(pos("{+F22}",st)==1) {VirtualKeyDown(VK_F22);del(st,1,6);} + else if(pos("{-F22}",st)==1) {VirtualKeyUp(VK_F22);del(st,1,6);} + else if(pos("{F23}",st)==1) {KeyboardVirtualKey(VK_F23);del(st,1,5);} + else if(pos("{+F23}",st)==1) {VirtualKeyDown(VK_F23);del(st,1,6);} + else if(pos("{-F23}",st)==1) {VirtualKeyUp(VK_F23);del(st,1,6);} + else if(pos("{F24}",st)==1) {KeyboardVirtualKey(VK_F24);del(st,1,5);} + else if(pos("{+F24}",st)==1) {VirtualKeyDown(VK_F24);del(st,1,6);} + else if(pos("{-F24}",st)==1) {VirtualKeyUp(VK_F24);del(st,1,6);} + else if(pos("{HELP}",st)==1) {KeyboardVirtualKey(VK_HELP);del(st,1,6);} + else if(pos("{+HELP}",st)==1) {VirtualKeyDown(VK_HELP);del(st,1,7);} + else if(pos("{-HELP}",st)==1) {VirtualKeyUp(VK_HELP);del(st,1,7);} + else if(pos("{HOME}",st)==1) {KeyboardVirtualKey(VK_HOME);del(st,1,6);} + else if(pos("{+HOME}",st)==1) {VirtualKeyDown(VK_HOME);del(st,1,7);} + else if(pos("{-HOME}",st)==1) {VirtualKeyUp(VK_HOME);del(st,1,7);} + else if(pos("{INS}",st)==1) {KeyboardVirtualKey(VK_INSERT);del(st,1,5);} + else if(pos("{+INS}",st)==1) {VirtualKeyDown(VK_INSERT);del(st,1,6);} + else if(pos("{-INS}",st)==1) {VirtualKeyUp(VK_INSERT);del(st,1,6);} + else if(pos("{LEFT}",st)==1) {KeyboardVirtualKey(VK_LEFT);del(st,1,6);} + else if(pos("{+LEFT}",st)==1) {VirtualKeyDown(VK_LEFT);del(st,1,7);} + else if(pos("{-LEFT}",st)==1) {VirtualKeyUp(VK_LEFT);del(st,1,7);} + else if(pos("{NEXT}",st)==1) {KeyboardVirtualKey(VK_NEXT);del(st,1,6);} + else if(pos("{+NEXT}",st)==1) {VirtualKeyDown(VK_NEXT);del(st,1,7);} + else if(pos("{-NEXT}",st)==1) {VirtualKeyUp(VK_NEXT);del(st,1,7);} + else if(pos("{NUMLOCK}",st)==1) {KeyboardVirtualKey(VK_NUMLOCK);del(st,1,9);} + else if(pos("{+NUMLOCK}",st)==1) {VirtualKeyDown(VK_NUMLOCK);del(st,1,10);} + else if(pos("{-NUMLOCK}",st)==1) {VirtualKeyUp(VK_NUMLOCK);del(st,1,10);} + else if(pos("{PAUSE}",st)==1) {KeyboardVirtualKey(VK_PAUSE);del(st,1,7);} + else if(pos("{+PAUSE}",st)==1) {VirtualKeyDown(VK_PAUSE);del(st,1,8);} + else if(pos("{-PAUSE}",st)==1) {VirtualKeyUp(VK_PAUSE);del(st,1,8);} + else if(pos("{PRINT}",st)==1) {KeyboardVirtualKey(VK_PRINT);del(st,1,7);} + else if(pos("{+PRINT}",st)==1) {VirtualKeyDown(VK_PRINT);del(st,1,8);} + else if(pos("{-PRINT}",st)==1) {VirtualKeyUp(VK_PRINT);del(st,1,8);} + else if(pos("{PRIOR}",st)==1) {KeyboardVirtualKey(VK_PRIOR);del(st,1,7);} + else if(pos("{+PRIOR}",st)==1) {VirtualKeyDown(VK_PRIOR);del(st,1,8);} + else if(pos("{-PRIOR}",st)==1) {VirtualKeyUp(VK_PRIOR);del(st,1,8);} + else if(pos("{RETURN}",st)==1) {KeyboardVirtualKey(VK_RETURN);del(st,1,8);} + else if(pos("{+RETURN}",st)==1) {VirtualKeyDown(VK_RETURN);del(st,1,9);} + else if(pos("{-RETURN}",st)==1) {VirtualKeyUp(VK_RETURN);del(st,1,9);} + else if(pos("{RIGHT}",st)==1) {KeyboardVirtualKey(VK_RIGHT);del(st,1,7);} + else if(pos("{+RIGHT}",st)==1) {VirtualKeyDown(VK_RIGHT);del(st,1,8);} + else if(pos("{-RIGHT}",st)==1) {VirtualKeyUp(VK_RIGHT);del(st,1,8);} + else if(pos("{SCROLLLOCK}",st)==1) {KeyboardVirtualKey(VK_SCROLL);del(st,1,12);} + else if(pos("{+SCROLLLOCK}",st)==1) {VirtualKeyDown(VK_SCROLL);del(st,1,13);} + else if(pos("{-SCROLLLOCK}",st)==1) {VirtualKeyUp(VK_SCROLL);del(st,1,13);} + else if(pos("{SHIFT}",st)==1 ) { + KeyboardMultiVirtualKey(VK_SHIFT,st[7],0,2); + del(st,1,8); + } + else if(pos("{+SHIFT}",st)==1 ) {VirtualKeyDown(VK_SHIFT);del(st,1,8);} + else if(pos("{-SHIFT}",st)==1 ) {VirtualKeyUp(VK_SHIFT);del(st,1,8);} + else if(pos("{CTRLALT}",st)==1 ) { + KeyboardMultiVirtualKey(VK_CONTROL,VK_MENU,st[9],3); + del(st,1,10); + } + else if(pos("{SHIFTALT}",st)==1 ) { + KeyboardMultiVirtualKey(VK_SHIFT,VK_MENU,st[10],3); + del(st,1,11); + } + else if(pos("{SHIFTCTRL}",st)==1 ) { + KeyboardMultiVirtualKey(VK_SHIFT,VK_CONTROL,st[11],3); + del(st,1,12); + } + else if(pos("{SHIFTWIN}",st)==1 ) { + KeyboardMultiVirtualKey(VK_SHIFT,VK_RWIN,st[10],3); + del(st,1,11); + } + else if(pos("{SPACE}",st)==1) {KeyboardVirtualKey(VK_SPACE);del(st,1,7);} + else if(pos("{+SPACE}",st)==1 ) {VirtualKeyDown(VK_SPACE);del(st,1,8);} + else if(pos("{-SPACE}",st)==1 ) {VirtualKeyUp(VK_SPACE);del(st,1,8);} + else if(pos("{TAB}",st)==1) {KeyboardVirtualKey(VK_TAB);del(st,1,5);} + else if(pos("{+TAB}",st)==1 ) {VirtualKeyDown(VK_TAB);del(st,1,6);} + else if(pos("{-TAB}",st)==1 ) {VirtualKeyUp(VK_TAB);del(st,1,6);} + else if(pos("{UP}",st)==1) {KeyboardVirtualKey(VK_UP);del(st,1,4);} + else if(pos("{+UP}",st)==1 ) {VirtualKeyDown(VK_UP);del(st,1,5);} + else if(pos("{-UP}",st)==1 ) {VirtualKeyUp(VK_UP);del(st,1,5);} + else if(pos("{WIN}",st)==1) { + KeyboardMultiVirtualKey(VK_RWIN,st[5],0,2); + del(st,1,6); + } + else if(pos("{+WIN}",st)==1) {VirtualKeyDown(VK_RWIN);del(st,1,6);} + else if(pos("{-WIN}",st)==1) {VirtualKeyUp(VK_RWIN);del(st,1,6);} + else if( st[2] == '}' ) {KeyboardKey(st[1]);del(st,1,3);} + else if( (st[1]=='+') && (st[3] == '}') ) {KeyDown(st[2]);del(st,1,4);} + else if( (st[1]=='-') && (st[3] == '}') ) {KeyUp(st[2]);del(st,1,4);} + else {Keyboard1Simule(st[0]) ; del(st,1,1);} + } + else { Keyboard1Simule(st[0]); del(st,1,1); } + } + } +/* +Fonctionnement des "touches mortes" (ALT, CTRL, SHIFT, WIN) + +- Pour appeler une touche morte suivie d'une touche "normale" (ex A-Z, 0-9, mais pas F1-F12 ni flche ...) +il suffit de la nommer suivie simplement de la touche + Ex Touche Windows + E => keyboard {WIN}e + MAJ + A => keyboard {SHIFT}a + +- Pour n'appeler que de la touche morte (sans rien derrire) + Ex Touche windows seule pour ouvrir le menu dmarrer => keyboard {+WIN}{-WIN} + +- Pour appeler une touche morte suivie d'une touche virtuelle + Ex ALT + Tabulation => keyboard {+ALT}{TAB}{-ALT} +*/ + + + +/* Positionne l'etat d'une touche: 1 == DOWN , Autre == UP */ +void SetKeyState( const int nVirtKey, const short state) { + short ActualState = GetKeyState( nVirtKey ) ; + if( (state == 1) && (ActualState != 1) ) KeyboardVirtualKey( nVirtKey ) ; + if( (state !=1 ) && (ActualState == 1) ) KeyboardVirtualKey( nVirtKey ) ; + } + diff --git a/src/cstdlib2/main.c b/src/cstdlib2/main.c new file mode 100644 index 0000000..6458b35 --- /dev/null +++ b/src/cstdlib2/main.c @@ -0,0 +1,175 @@ +#include "../platform.h" +#include "build.h" + +#include "tools.h" + +#include +#include +#include +#include + +//int stricmp( const char * s1, const char * s2 ) ; +int picoc_main(int argc, char **argv) ; + +int main1( int argc, char ** argv ) { return picoc_main( argc, argv ) ; } + +void picoc_usage( char * progname ) { + printf( "%s, A very small C interpreter\nUsage: %s [-h] [-i] [-m] [-n] [-o] [...] [- ...]\n", progname, progname) ; + printf( " -h: this help message\n" ) ; + printf( " -i: force interactive mode at the end of scripts\n" ) ; + printf( " -m: run main() function automaticaly\n" ) ; + printf( " -n: don't print prompt\n" ) ; + printf( " -o: the original \"old\" mode\n" ) ; + printf( " -v: print version\n" ) ; + printf( "Exemples:\n" ) ; + printf( " %s script1.pcc script2.pcc\n", progname ) ; + printf( " %s -i script.pcc\n", progname ) ; + printf( " %s -m script1.pcc script2.pcc - arg1 agr2\n", progname ) ; + printf( "Build time:\n" ) ; + printf( " %s\n", BUILD_TIME ) ; +} + +#include "../picoc.h" +#include "../platform.h" +#ifndef PICOC_STACK_SIZE +#define PICOC_STACK_SIZE (128*1024) +#endif + +int enhanced_mode = 1 ; + +int ParseInteractiveMode = 0 ; + +extern int PicocExitValue; + +void PicocParseInteractiveNoStartPrompt(Picoc *pc, int EnableDebugger); + +int main( int argc, char ** argv ) { + int return_code = 0 ; + int noprompt = 0 ; + int interactivemode = 0 ; + int oldmode = 0 ; + int runmain = 0 ; + int i=1, j ; + int ParamCount = 1 ; + + char *binname = argv[0]+strlen(argv[0]) ; + while( binname!=argv[0] ) { + if( (binname[0]=='/')||(binname[0]=='\\') ) { binname++ ; break ; } + binname-- ; + } + if( stricmp(binname,"pcc.exe") && strcmp(binname,"pcc") ) { + enhanced_mode = 0 ; + } else { + strcpy(INTERACTIVE_PROMPT_STATEMENT,"pcc> "); + strcpy(INTERACTIVE_PROMPT_LINE ," > "); + } + + if( argc == 1 ) { interactivemode = 1 ; } + if( argc>1 ) + for( i=1 ; i=0 ; i-- ) { free( arv[i] ); } + free(arv); + } else { + int StackSize = getenv("STACKSIZE") ? atoi(getenv("STACKSIZE")) : PICOC_STACK_SIZE; + Picoc pc; + + PicocInitialise(&pc,StackSize); + PicocIncludeAllSystemHeaders(&pc); + + if( i==argc ) { interactivemode = 1 ; } + if( i2 ) { + for( i=1 ; i<(argc-1) ; i++ ) { + arv[i] = (char*) malloc( strlen(argv[i+1])+1 ) ; + strcpy( arv[i], argv[i+1] ); + } + } + } else { + arv[1] = (char*)malloc( 3 ) ; + strcpy( arv[1], "-s" ) ; + if( argc>1 ) { + for( i=1 ; i=0 ; i-- ) { free( arv[i] ); } + + free(arv); + return return_code ; +} diff --git a/src/cstdlib2/main.o b/src/cstdlib2/main.o new file mode 100644 index 0000000..d14a8ad Binary files /dev/null and b/src/cstdlib2/main.o differ diff --git a/src/cstdlib2/md5.c b/src/cstdlib2/md5.c new file mode 100644 index 0000000..8ba303f --- /dev/null +++ b/src/cstdlib2/md5.c @@ -0,0 +1,571 @@ +/* + ********************************************************************** + ** md5.h -- Header file for implementation of MD5 ** + ** RSA Data Security, Inc. MD5 Message Digest Algorithm ** + ** Created: 2/17/90 RLR ** + ** Revised: 12/27/90 SRD,AJ,BSK,JT Reference C version ** + ** Revised (for MD5): RLR 4/27/91 ** + ** -- G modified to have y&~z instead of y&z ** + ** -- FF, GG, HH modified to add in last register done ** + ** -- Access pattern: round 2 works mod 5, round 3 works mod 3 ** + ** -- distinct additive constant for each step ** + ** -- round 4 added, working mod 7 ** + ********************************************************************** + */ + +/* + ********************************************************************** + ** Copyright (C) 1990, RSA Data Security, Inc. All rights reserved. ** + ** ** + ** License to copy and use this software is granted provided that ** + ** it is identified as the "RSA Data Security, Inc. MD5 Message ** + ** Digest Algorithm" in all material mentioning or referencing this ** + ** software or this function. ** + ** ** + ** License is also granted to make and use derivative works ** + ** provided that such works are identified as "derived from the RSA ** + ** Data Security, Inc. MD5 Message Digest Algorithm" in all ** + ** material mentioning or referencing the derived work. ** + ** ** + ** RSA Data Security, Inc. makes no representations concerning ** + ** either the merchantability of this software or the suitability ** + ** of this software for any particular purpose. It is provided "as ** + ** is" without express or implied warranty of any kind. ** + ** ** + ** These notices must be retained in any copies of any part of this ** + ** documentation and/or software. ** + ********************************************************************** + */ + +/* typedef a 32 bit type */ +typedef unsigned long int UINT4; + +/* Data structure for MD5 (Message Digest) computation */ +typedef struct { + UINT4 i[2]; /* number of _bits_ handled mod 2^64 */ + UINT4 buf[4]; /* scratch buffer */ + unsigned char in[64]; /* input buffer */ + unsigned char digest[16]; /* actual digest after MD5Final call */ +} MD5_CTX; + +void MD5Init (); +void MD5Update (); +void MD5Final (); + +/* + ********************************************************************** + ** End of md5.h ** + ******************************* (cut) ******************************** + */ + +/* + ********************************************************************** + ** md5.c ** + ** RSA Data Security, Inc. MD5 Message Digest Algorithm ** + ** Created: 2/17/90 RLR ** + ** Revised: 1/91 SRD,AJ,BSK,JT Reference C Version ** + ********************************************************************** + */ + +/* + ********************************************************************** + ** Copyright (C) 1990, RSA Data Security, Inc. All rights reserved. ** + ** ** + ** License to copy and use this software is granted provided that ** + ** it is identified as the "RSA Data Security, Inc. MD5 Message ** + ** Digest Algorithm" in all material mentioning or referencing this ** + ** software or this function. ** + ** ** + ** License is also granted to make and use derivative works ** + ** provided that such works are identified as "derived from the RSA ** + ** Data Security, Inc. MD5 Message Digest Algorithm" in all ** + ** material mentioning or referencing the derived work. ** + ** ** + ** RSA Data Security, Inc. makes no representations concerning ** + ** either the merchantability of this software or the suitability ** + ** of this software for any particular purpose. It is provided "as ** + ** is" without express or implied warranty of any kind. ** + ** ** + ** These notices must be retained in any copies of any part of this ** + ** documentation and/or software. ** + ********************************************************************** + */ + +/* -- include the following line if the md5.h header file is separate -- */ +/* #include "md5.h" */ + +/* forward declaration */ +static void Transform (); + +static unsigned char PADDING[64] = { + 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +}; + +/* F, G and H are basic MD5 functions: selection, majority, parity */ +#define F(x, y, z) (((x) & (y)) | ((~x) & (z))) +#define G(x, y, z) (((x) & (z)) | ((y) & (~z))) +#define H(x, y, z) ((x) ^ (y) ^ (z)) +#define I(x, y, z) ((y) ^ ((x) | (~z))) + +/* ROTATE_LEFT rotates x left n bits */ +#define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32-(n)))) + +/* FF, GG, HH, and II transformations for rounds 1, 2, 3, and 4 */ +/* Rotation is separate from addition to prevent recomputation */ +#define FF(a, b, c, d, x, s, ac) \ + {(a) += F ((b), (c), (d)) + (x) + (UINT4)(ac); \ + (a) = ROTATE_LEFT ((a), (s)); \ + (a) += (b); \ + } +#define GG(a, b, c, d, x, s, ac) \ + {(a) += G ((b), (c), (d)) + (x) + (UINT4)(ac); \ + (a) = ROTATE_LEFT ((a), (s)); \ + (a) += (b); \ + } +#define HH(a, b, c, d, x, s, ac) \ + {(a) += H ((b), (c), (d)) + (x) + (UINT4)(ac); \ + (a) = ROTATE_LEFT ((a), (s)); \ + (a) += (b); \ + } +#define II(a, b, c, d, x, s, ac) \ + {(a) += I ((b), (c), (d)) + (x) + (UINT4)(ac); \ + (a) = ROTATE_LEFT ((a), (s)); \ + (a) += (b); \ + } + +void MD5Init (mdContext) +MD5_CTX *mdContext; +{ + mdContext->i[0] = mdContext->i[1] = (UINT4)0; + + /* Load magic initialization constants. + */ + mdContext->buf[0] = (UINT4)0x67452301; + mdContext->buf[1] = (UINT4)0xefcdab89; + mdContext->buf[2] = (UINT4)0x98badcfe; + mdContext->buf[3] = (UINT4)0x10325476; +} + +void MD5Update (mdContext, inBuf, inLen) +MD5_CTX *mdContext; +unsigned char *inBuf; +unsigned int inLen; +{ + UINT4 in[16]; + int mdi; + unsigned int i, ii; + + /* compute number of bytes mod 64 */ + mdi = (int)((mdContext->i[0] >> 3) & 0x3F); + + /* update number of bits */ + if ((mdContext->i[0] + ((UINT4)inLen << 3)) < mdContext->i[0]) + mdContext->i[1]++; + mdContext->i[0] += ((UINT4)inLen << 3); + mdContext->i[1] += ((UINT4)inLen >> 29); + + while (inLen--) { + /* add new character to buffer, increment mdi */ + mdContext->in[mdi++] = *inBuf++; + + /* transform if necessary */ + if (mdi == 0x40) { + for (i = 0, ii = 0; i < 16; i++, ii += 4) + in[i] = (((UINT4)mdContext->in[ii+3]) << 24) | + (((UINT4)mdContext->in[ii+2]) << 16) | + (((UINT4)mdContext->in[ii+1]) << 8) | + ((UINT4)mdContext->in[ii]); + Transform (mdContext->buf, in); + mdi = 0; + } + } +} + +void MD5Final (mdContext) +MD5_CTX *mdContext; +{ + UINT4 in[16]; + int mdi; + unsigned int i, ii; + unsigned int padLen; + + /* save number of bits */ + in[14] = mdContext->i[0]; + in[15] = mdContext->i[1]; + + /* compute number of bytes mod 64 */ + mdi = (int)((mdContext->i[0] >> 3) & 0x3F); + + /* pad out to 56 mod 64 */ + padLen = (mdi < 56) ? (56 - mdi) : (120 - mdi); + MD5Update (mdContext, PADDING, padLen); + + /* append length in bits and transform */ + for (i = 0, ii = 0; i < 14; i++, ii += 4) + in[i] = (((UINT4)mdContext->in[ii+3]) << 24) | + (((UINT4)mdContext->in[ii+2]) << 16) | + (((UINT4)mdContext->in[ii+1]) << 8) | + ((UINT4)mdContext->in[ii]); + Transform (mdContext->buf, in); + + /* store buffer in digest */ + for (i = 0, ii = 0; i < 4; i++, ii += 4) { + mdContext->digest[ii] = (unsigned char)(mdContext->buf[i] & 0xFF); + mdContext->digest[ii+1] = + (unsigned char)((mdContext->buf[i] >> 8) & 0xFF); + mdContext->digest[ii+2] = + (unsigned char)((mdContext->buf[i] >> 16) & 0xFF); + mdContext->digest[ii+3] = + (unsigned char)((mdContext->buf[i] >> 24) & 0xFF); + } +} + +/* Basic MD5 step. Transform buf based on in. + */ +static void Transform (buf, in) +UINT4 *buf; +UINT4 *in; +{ + UINT4 a = buf[0], b = buf[1], c = buf[2], d = buf[3]; + + /* Round 1 */ +#define S11 7 +#define S12 12 +#define S13 17 +#define S14 22 + FF ( a, b, c, d, in[ 0], S11, 3614090360); /* 1 */ + FF ( d, a, b, c, in[ 1], S12, 3905402710); /* 2 */ + FF ( c, d, a, b, in[ 2], S13, 606105819); /* 3 */ + FF ( b, c, d, a, in[ 3], S14, 3250441966); /* 4 */ + FF ( a, b, c, d, in[ 4], S11, 4118548399); /* 5 */ + FF ( d, a, b, c, in[ 5], S12, 1200080426); /* 6 */ + FF ( c, d, a, b, in[ 6], S13, 2821735955); /* 7 */ + FF ( b, c, d, a, in[ 7], S14, 4249261313); /* 8 */ + FF ( a, b, c, d, in[ 8], S11, 1770035416); /* 9 */ + FF ( d, a, b, c, in[ 9], S12, 2336552879); /* 10 */ + FF ( c, d, a, b, in[10], S13, 4294925233); /* 11 */ + FF ( b, c, d, a, in[11], S14, 2304563134); /* 12 */ + FF ( a, b, c, d, in[12], S11, 1804603682); /* 13 */ + FF ( d, a, b, c, in[13], S12, 4254626195); /* 14 */ + FF ( c, d, a, b, in[14], S13, 2792965006); /* 15 */ + FF ( b, c, d, a, in[15], S14, 1236535329); /* 16 */ + + /* Round 2 */ +#define S21 5 +#define S22 9 +#define S23 14 +#define S24 20 + GG ( a, b, c, d, in[ 1], S21, 4129170786); /* 17 */ + GG ( d, a, b, c, in[ 6], S22, 3225465664); /* 18 */ + GG ( c, d, a, b, in[11], S23, 643717713); /* 19 */ + GG ( b, c, d, a, in[ 0], S24, 3921069994); /* 20 */ + GG ( a, b, c, d, in[ 5], S21, 3593408605); /* 21 */ + GG ( d, a, b, c, in[10], S22, 38016083); /* 22 */ + GG ( c, d, a, b, in[15], S23, 3634488961); /* 23 */ + GG ( b, c, d, a, in[ 4], S24, 3889429448); /* 24 */ + GG ( a, b, c, d, in[ 9], S21, 568446438); /* 25 */ + GG ( d, a, b, c, in[14], S22, 3275163606); /* 26 */ + GG ( c, d, a, b, in[ 3], S23, 4107603335); /* 27 */ + GG ( b, c, d, a, in[ 8], S24, 1163531501); /* 28 */ + GG ( a, b, c, d, in[13], S21, 2850285829); /* 29 */ + GG ( d, a, b, c, in[ 2], S22, 4243563512); /* 30 */ + GG ( c, d, a, b, in[ 7], S23, 1735328473); /* 31 */ + GG ( b, c, d, a, in[12], S24, 2368359562); /* 32 */ + + /* Round 3 */ +#define S31 4 +#define S32 11 +#define S33 16 +#define S34 23 + HH ( a, b, c, d, in[ 5], S31, 4294588738); /* 33 */ + HH ( d, a, b, c, in[ 8], S32, 2272392833); /* 34 */ + HH ( c, d, a, b, in[11], S33, 1839030562); /* 35 */ + HH ( b, c, d, a, in[14], S34, 4259657740); /* 36 */ + HH ( a, b, c, d, in[ 1], S31, 2763975236); /* 37 */ + HH ( d, a, b, c, in[ 4], S32, 1272893353); /* 38 */ + HH ( c, d, a, b, in[ 7], S33, 4139469664); /* 39 */ + HH ( b, c, d, a, in[10], S34, 3200236656); /* 40 */ + HH ( a, b, c, d, in[13], S31, 681279174); /* 41 */ + HH ( d, a, b, c, in[ 0], S32, 3936430074); /* 42 */ + HH ( c, d, a, b, in[ 3], S33, 3572445317); /* 43 */ + HH ( b, c, d, a, in[ 6], S34, 76029189); /* 44 */ + HH ( a, b, c, d, in[ 9], S31, 3654602809); /* 45 */ + HH ( d, a, b, c, in[12], S32, 3873151461); /* 46 */ + HH ( c, d, a, b, in[15], S33, 530742520); /* 47 */ + HH ( b, c, d, a, in[ 2], S34, 3299628645); /* 48 */ + + /* Round 4 */ +#define S41 6 +#define S42 10 +#define S43 15 +#define S44 21 + II ( a, b, c, d, in[ 0], S41, 4096336452); /* 49 */ + II ( d, a, b, c, in[ 7], S42, 1126891415); /* 50 */ + II ( c, d, a, b, in[14], S43, 2878612391); /* 51 */ + II ( b, c, d, a, in[ 5], S44, 4237533241); /* 52 */ + II ( a, b, c, d, in[12], S41, 1700485571); /* 53 */ + II ( d, a, b, c, in[ 3], S42, 2399980690); /* 54 */ + II ( c, d, a, b, in[10], S43, 4293915773); /* 55 */ + II ( b, c, d, a, in[ 1], S44, 2240044497); /* 56 */ + II ( a, b, c, d, in[ 8], S41, 1873313359); /* 57 */ + II ( d, a, b, c, in[15], S42, 4264355552); /* 58 */ + II ( c, d, a, b, in[ 6], S43, 2734768916); /* 59 */ + II ( b, c, d, a, in[13], S44, 1309151649); /* 60 */ + II ( a, b, c, d, in[ 4], S41, 4149444226); /* 61 */ + II ( d, a, b, c, in[11], S42, 3174756917); /* 62 */ + II ( c, d, a, b, in[ 2], S43, 718787259); /* 63 */ + II ( b, c, d, a, in[ 9], S44, 3951481745); /* 64 */ + + buf[0] += a; + buf[1] += b; + buf[2] += c; + buf[3] += d; +} + +/* + ********************************************************************** + ** End of md5.c ** + ******************************* (cut) ******************************** + */ + +/* + ********************************************************************** + ** md5driver.c -- sample routines to test ** + ** RSA Data Security, Inc. MD5 message digest algorithm. ** + ** Created: 2/16/90 RLR ** + ** Updated: 1/91 SRD ** + ********************************************************************** + */ + +/* + ********************************************************************** + ** Copyright (C) 1990, RSA Data Security, Inc. All rights reserved. ** + ** ** + ** RSA Data Security, Inc. makes no representations concerning ** + ** either the merchantability of this software or the suitability ** + ** of this software for any particular purpose. It is provided "as ** + ** is" without express or implied warranty of any kind. ** + ** ** + ** These notices must be retained in any copies of any part of this ** + ** documentation and/or software. ** + ********************************************************************** + */ + +#include +#include +#include +#include +/* -- include the following file if the file md5.h is separate -- */ +/* #include "md5.h" */ + +/* Prints message digest buffer in mdContext as 32 hexadecimal digits. + Order is from low-order byte to high-order byte of digest. + Each byte is printed with high-order hexadecimal digit first. + */ +static void MDPrint (mdContext) +MD5_CTX *mdContext; +{ + int i; + + for (i = 0; i < 16; i++) + printf ("%02x", mdContext->digest[i]); +} + +/* size of test block */ +#define TEST_BLOCK_SIZE 1000 + +/* number of blocks to process */ +#define TEST_BLOCKS 10000 + +/* number of test bytes = TEST_BLOCK_SIZE * TEST_BLOCKS */ +static long TEST_BYTES = (long)TEST_BLOCK_SIZE * (long)TEST_BLOCKS; + +/* A time trial routine, to measure the speed of MD5. + Measures wall time required to digest TEST_BLOCKS * TEST_BLOCK_SIZE + characters. + */ +static void MDTimeTrial () +{ + MD5_CTX mdContext; + time_t endTime, startTime; + unsigned char data[TEST_BLOCK_SIZE]; + unsigned int i; + + /* initialize test data */ + for (i = 0; i < TEST_BLOCK_SIZE; i++) + data[i] = (unsigned char)(i & 0xFF); + + /* start timer */ + printf ("MD5 time trial. Processing %ld characters...\n", TEST_BYTES); + time (&startTime); + + /* digest data in TEST_BLOCK_SIZE byte blocks */ + MD5Init (&mdContext); + for (i = TEST_BLOCKS; i > 0; i--) + MD5Update (&mdContext, data, TEST_BLOCK_SIZE); + MD5Final (&mdContext); + + /* stop timer, get time difference */ + time (&endTime); + MDPrint (&mdContext); + printf (" is digest of test input.\n"); + printf + ("Seconds to process test input: %ld\n", (long)(endTime-startTime)); + printf + ("Characters processed per second: %ld\n", + TEST_BYTES/(endTime-startTime)); +} + +/* Computes the message digest for string inString. + Prints out message digest, a space, the string (in quotes) and a + carriage return. + */ +static void MDString (inString) +char *inString; +{ + MD5_CTX mdContext; + unsigned int len = strlen (inString); + + MD5Init (&mdContext); + MD5Update (&mdContext, inString, len); + MD5Final (&mdContext); + MDPrint (&mdContext); + printf (" \"%s\"\n\n", inString); +} + +/* Computes the message digest for a specified file. + Prints out message digest, a space, the file name, and a carriage + return. + */ +static void MDFile (filename) +char *filename; +{ + FILE *inFile = fopen (filename, "rb"); + MD5_CTX mdContext; + int bytes; + unsigned char data[1024]; + + if (inFile == NULL) { + printf ("%s can't be opened.\n", filename); + return; + } + + MD5Init (&mdContext); + while ((bytes = fread (data, 1, 1024, inFile)) != 0) + MD5Update (&mdContext, data, bytes); + MD5Final (&mdContext); + MDPrint (&mdContext); + printf (" %s\n", filename); + fclose (inFile); +} + +/* Writes the message digest of the data from stdin onto stdout, + followed by a carriage return. + */ +static void MDFilter () +{ + MD5_CTX mdContext; + int bytes; + unsigned char data[16]; + + MD5Init (&mdContext); + while ((bytes = fread (data, 1, 16, stdin)) != 0) + MD5Update (&mdContext, data, bytes); + MD5Final (&mdContext); + MDPrint (&mdContext); + printf ("\n"); +} + +/* Runs a standard suite of test data. + */ +static void MDTestSuite () +{ + printf ("MD5 test suite results:\n\n"); + MDString (""); + MDString ("a"); + MDString ("abc"); + MDString ("message digest"); + MDString ("abcdefghijklmnopqrstuvwxyz"); + MDString + ("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"); + MDString + ("1234567890123456789012345678901234567890\ +1234567890123456789012345678901234567890"); + /* Contents of file foo are "abc" */ + MDFile ("foo"); +} + +int main_md5 (int argc,char *argv[]){ + int i; + + /* For each command line argument in turn: + ** filename -- prints message digest and name of file + ** -sstring -- prints message digest and contents of string + ** -t -- prints time trial statistics for 1M characters + ** -x -- execute a standard suite of test data + ** (no args) -- writes messages digest of stdin onto stdout + */ + if (argc == 1) + MDFilter (); + else + for (i = 1; i < argc; i++) + if (argv[i][0] == '-' && argv[i][1] == 's') + MDString (argv[i] + 2); + else if (strcmp (argv[i], "-t") == 0) + MDTimeTrial (); + else if (strcmp (argv[i], "-x") == 0) + MDTestSuite (); + else MDFile (argv[i]); +return 0; +} + +/* + ********************************************************************** + ** End of md5driver.c ** + ******************************* (cut) ******************************** + */ + +void MD5Cal( char * inString, char * outString ) { + MD5_CTX mdContext; + unsigned int len = strlen (inString), i ; + + MD5Init (&mdContext); + MD5Update (&mdContext, (unsigned char*)inString, len); + MD5Final (&mdContext); + + for (i = 0; i < 16; i++) sprintf( (outString+(2*i)), "%02x", mdContext.digest[i] ) ; + outString[32] = '\0' ; + } + +void MD5CalFile (char * filename, char * outString ) { + FILE *inFile = NULL ; + MD5_CTX mdContext; + int bytes,i; + unsigned char data[1024]; + + if( !strcmp(filename,"-") ) { inFile = stdin ; } + else { inFile = fopen (filename, "rb"); } + + if (inFile == NULL) { printf ("%s can't be opened.\n", filename); return; } + + MD5Init (&mdContext); + while ((bytes = fread (data, 1, 1024, inFile)) != 0) + MD5Update (&mdContext, data, bytes); + MD5Final (&mdContext); + for (i = 0; i < 16; i++) sprintf( (outString+(2*i)), "%02x", mdContext.digest[i] ) ; + outString[32] = '\0' ; + if( inFile!=stdin ) fclose (inFile); +} + +#ifdef MAIN +int main(int argc, char *argv[], char *arge[]) { + return main_md5(argc,argv); + } +#endif diff --git a/src/cstdlib2/mini.c b/src/cstdlib2/mini.c new file mode 100644 index 0000000..6f84b50 --- /dev/null +++ b/src/cstdlib2/mini.c @@ -0,0 +1,550 @@ +#include "mini.h" + +#ifdef DEBUG_MODE +#include "leaktracker.h" +#endif + +#define STYPE_NULL 0 +#define STYPE_SECTION 1 +#define STYPE_KEY 2 + +#define SINI_MAX_SIZE 4096 + + +SSECTION * newSECTION( const char * name ) { + SSECTION * newSection = NULL ; + if( name==NULL ) return NULL ; + if( strlen(name)<=0 ) return NULL ; + if( ( newSection = (SSECTION*) malloc( sizeof( SSECTION ) ) ) != NULL ) { + newSection->type = STYPE_SECTION ; + if( ( newSection->name = (char*) malloc( strlen( name ) + 1 ) ) != NULL ) + strcpy( newSection->name, name ) ; + newSection->next = NULL ; + newSection->first = NULL ; + } + return newSection ; + } + +SKEY * newKEY( const char * name, const char * value ) { + SKEY * newKey = NULL ; + if( name==NULL ) return NULL ; + if( strlen(name)<= 0 ) return NULL ; + if( ( newKey = (SKEY*) malloc( sizeof( SKEY ) ) ) != NULL ) { + newKey->type = STYPE_KEY ; + if( ( newKey->name = (char*) malloc( strlen( name ) + 1 ) ) != NULL ) + strcpy( newKey->name, name ) ; + if( ( newKey->value = (char*) malloc( strlen( value ) + 1 ) ) != NULL ) + strcpy( (char*)newKey->value, value ) ; + newKey->next = NULL ; + } + return newKey ; + } + +SINI * newINI( void ) { + SINI * newIni = NULL ; + if( ( newIni = (SINI*) malloc( sizeof( SINI ) ) ) != NULL ) { + newIni->name = NULL ; + newIni->first = NULL ; + } + return newIni ; + } + +void freeSECTION( SSECTION ** Section ) { + if( Section == NULL ) return ; + if( (*Section) == NULL ) return ; + + if( (*Section)->next != NULL ) + { freeSECTION( &((*Section)->next) ) ; (*Section)->next = NULL ; } + if( (*Section)->first != NULL ) + { freeKEY( &((*Section)->first) ) ; (*Section)->first = NULL ; } + + if( (*Section)->name != NULL ) { free( (*Section)->name ) ; (*Section)->name = NULL ; } + + (*Section)->type = STYPE_NULL ; + + free( *Section ) ; + (*Section) = NULL ; + } + +void freeKEY( SKEY ** Key ) { + if( Key == NULL ) return ; + if( (*Key) == NULL ) return ; + + if( (*Key)->next != NULL ) + { freeKEY( &((*Key)->next) ) ; (*Key)->next = NULL ; } + + if( (*Key)->name != NULL ) { free( (*Key)->name ) ; (*Key)->name = NULL ; } + if( (*Key)->value != NULL ) { free( (*Key)->value ) ; (*Key)->value = NULL ; } + + (*Key)->type = STYPE_NULL ; + + free( *Key ) ; + (*Key) = NULL ; + } + +void freeINI( SINI ** Ini ) { + if( Ini == NULL ) return ; + if( (*Ini) == NULL ) return ; + if( (*Ini)->name != NULL ) { free( (*Ini)->name ) ; (*Ini)->name = NULL ; } + freeSECTION( & ((*Ini)->first) ) ; + free( *Ini ) ; + (*Ini) = NULL ; + } + +int addSECTION( SSECTION * Section, SSECTION * SectionAdd ) { + SSECTION * Current ; + if( Section == NULL ) return 0 ; + if( SectionAdd == NULL ) return 0 ; + Current = Section->next ; + + if( Current == NULL ) { + Section->next = SectionAdd ; + } + else { + while( Current->next != NULL ) { Current = Current->next ; } + Current->next = SectionAdd ; + } + return 1 ; + } + +int addINI( SINI * Ini, SSECTION * Section ) { + int return_code = 1 ; + if( Ini->first == NULL ) Ini->first = Section ; + else return_code = addSECTION( Ini->first, Section ) ; + return return_code ; + } + +int delSECTION( SSECTION * Section, const char * name ) { + int return_code = 0 ; + SSECTION * Current, * Last = NULL, * Next = NULL ; + if( Section == NULL ) return 0 ; + if( name == NULL ) return 0 ; + if( strlen( name ) == 0 ) return 0 ; + Current = Section->next ; + if( Current == NULL ) return 0 ; + + while( (Current != NULL) && ( strcmp( Current->name, name ) ) ) { + Last = Current ; + Current = Current->next ; + Next = Current->next ; + } + if( !strcmp( Current->name, name ) && ( Current->type = STYPE_SECTION ) ) { + freeSECTION( &Current ) ; + if( Last != NULL ) Last->next = Next ; + else Section->next = Next ; + return_code = 1 ; + } + return return_code ; + } + +int addKEY( SSECTION * Section, SKEY * Key ) { + SKEY * Current ; + if( Section == NULL ) return 0 ; + if( Key == NULL ) return 0 ; + + if( ( Current = getKEY( Section, Key->name ) ) != NULL ) { /* Si la clé existe déjà on la supprime d'abord */ + /*if( !delKEY( Section, Key->name ) ) return 0 ;*/ + if( Current->value != NULL ) { free( Current->value ) ; Current->value = NULL ; } + if( ( Current->value = malloc( strlen( (const char*)(Key->value) ) + 1 ) ) == NULL ) return 0 ; + /*strcpy( Current->value, Key->value ) ;*/ + memcpy( Current->value, Key->value, strlen( (const char*)Key->value ) + 1 ) ; + freeKEY( &Key ) ; + return 1 ; + } + + Current = Section->first ; + + if( Current == NULL ) { + Section->first = Key ; + } + else { + while( Current->next != NULL ) { Current = Current->next ; } + Current->next = Key ; + } + return 1 ; + } + +void freeSKEY( SKEY ** c ) { free( *c ) ; } + +int delKEY( SSECTION * Section, const char * name ) { + int return_code = 0 ; + SKEY * Current, * Last = NULL, * Next = NULL ; + if( Section == NULL ) return 0 ; + if( name == NULL ) return 0 ; + if( strlen( name ) == 0 ) return 0 ; + Current = Section->first ; + if( Current == NULL ) return 0 ; + while( (Current != NULL ) && ( strcmp( Current->name, name ) ) ) { + Last = Current ; + Current = Current->next ; + if( Current != NULL ) Next = Current->next ; else Next = NULL ; + } + if( Current != NULL ) + if( !strcmp( Current->name, name ) && ( Current->type = STYPE_KEY ) ) { + free( Current->name ) ; Current->name = NULL ; + if( Current->value != NULL ) + { free( Current->value ) ; Current->value = NULL ; } + Current->type = STYPE_NULL ; + freeSKEY( &Current ) ; + Current = NULL ; + if( Last != NULL ) Last->next = Next ; + else Section->first = Next ; + return_code = 1 ; + } + return return_code ; + } + +SSECTION * getSECTION( SSECTION * Section, const char * name ) { + SSECTION * Current ; + if( Section == NULL ) return NULL ; + if( name == NULL ) return Section ; + if( strlen( name ) == 0 ) return Section ; + Current = Section ; + while( ( Current != NULL ) && ( strcmp( Current->name, name ) ) ) { + Current = Current->next ; + } + return Current ; + } + +SSECTION * lastSECTION( SSECTION * Section ) { + SSECTION * Current ; + if( Section == NULL ) return NULL ; + Current = Section ; + while( Current->next != NULL ) { + Current = Current->next ; + } + return Current ; + } + +SKEY * getKEY( SSECTION * Section, const char * name ) { + SKEY * Current ; + if( Section == NULL ) return NULL ; + if( name == NULL ) return Section->first ; + if( strlen( name ) == 0 ) return Section->first ; + Current = Section->first ; + while( ( Current != NULL ) && ( strcmp( Current->name, name ) ) ) { + Current = Current->next ; + } + return Current ; + } + +char * getvalueKEY( SKEY * Key ) { + if( Key == NULL ) return NULL ; + return (char*)Key->value ; + } + +int setKEY( SKEY * Key, char * value ) { + if( Key == NULL ) return 0 ; + if( Key->value != NULL ) { free( Key->value ) ; Key->value = NULL ; } + if( value != NULL ) { + if( ( Key->value = (char*) malloc( strlen( value ) + 1 ) ) == NULL ) return 0 ; + strcpy( (char*)Key->value, value ) ; + } + return 1 ; + } + +SSECTION * getINI( SINI * Ini ) { + if( Ini == NULL ) return NULL ; + return Ini->first ; + } + +void printKEY( SKEY * Key ) { + if( Key == NULL ) return ; + printf( "%s=%s\n", Key->name, (char*)Key->value ) ; + if( Key->next != NULL ) printKEY( Key->next ) ; + } + +void printSECTION( SSECTION * Section ) { + if( Section == NULL ) return ; + if( Section->type == STYPE_SECTION ) printf( "[%s]\n", Section->name ) ; + if( Section->first != NULL ) printKEY( Section->first ) ; + if( Section->next != NULL ) printSECTION( Section->next ) ; + } + +void printINI( SINI * Ini ) { + if( Ini == NULL ) return ; + printSECTION( Ini->first ) ; + } + +int loadINI( SINI * Ini, const char * filename ) { + FILE * fp ; + SSECTION * Section, * Last = NULL ; + SKEY * Key ; + char buffer[SINI_MAX_SIZE], name[SINI_MAX_SIZE], value[SINI_MAX_SIZE] ; + unsigned int i, p ; + if( Ini == NULL ) return 0 ; + if( filename==NULL ) return 0 ; + if( strlen(filename)<=0 ) return 0 ; + freeSECTION( &(Ini->first) ) ; + if( ( fp = fopen( filename, "r" ) ) == NULL ) { return 0 ; } + while( fgets( buffer, SINI_MAX_SIZE, fp ) != NULL ) { + buffer[SINI_MAX_SIZE-1]='\0'; + while( (buffer[strlen(buffer)-1]=='\n')||(buffer[strlen(buffer)-1]=='\r') ) buffer[strlen(buffer)-1]='\0' ; + while( (buffer[0]==' ')||(buffer[0]=='\t') ) + for( i=0; ifirst, buffer+1 )) == NULL ) { /*On recherche si la section existe deja*/ + Section = newSECTION( buffer+1 ) ; + if( Ini->first == NULL ) Ini->first = Section ; + else addSECTION( Ini->first, Section ) ; + } + Last = Section ; + } + } + else if( Last!= NULL ) { /* Nouvelle clé dans la section en cours */ + name[0] = '\0' ; value[0] = '\0' ; + p = 0 ; + for( i=0; (i0) && (p<(strlen(buffer)-1) ) ) { + for( i=0; iname, (char*)Key->value ) ; + if( Key->next != NULL ) storeKEY( Key->next, fp ) ; + return 1 ; + } + +int storeSECTION( SSECTION * Section, FILE * fp ) { + if( Section == NULL ) return 0 ; + if( fp==NULL ) return 0 ; + fprintf( fp, "[%s]\n", Section->name ) ; + if( Section->first != NULL ) storeKEY( Section->first, fp ) ; + if( Section->next != NULL ) storeSECTION( Section->next, fp ) ; + return 1 ; + } + +int storeINI( SINI * Ini, const char * filename ) { + FILE * fp ; + if( filename==NULL ) return 0 ; + if( strlen(filename)<=0 ) return 0 ; + if( ( fp = fopen( filename, "w" ) ) == NULL ) return 0 ; + + if( _locking( fileno(fp) , LK_LOCK, 1000000L ) == -1 ) { fclose(fp) ; return 0 ; } + + storeSECTION( getINI( Ini ), fp ) ; + + _locking( fileno(fp) , LK_UNLCK, 1000000L ); + + fclose( fp ) ; + return 1 ; + } + +/* Amelioration pour ne pas relire le fichier à chaque fois */ +static char * mini_filename = NULL ; +static time_t mini_mtime = 0 ; +static SINI * mini_Ini = NULL ; + +int readINI( const char * filename, const char * section, const char * key, char * pStr) { + int return_code = 0 ; + struct stat buf ; + + /*SINI * Ini = NULL ;*/ + SSECTION * Section = NULL ; + SKEY * Key = NULL ; + if( filename==NULL ) return 0 ; + if( strlen(filename)<=0 ) return 0 ; + if( section==NULL ) return 0 ; + if( strlen(section)<=0 ) return 0 ; + + if( mini_filename != NULL ) /* On compare la date du fichier en mémoire avec celle du fichier sur dique*/ + if( stat(filename, &buf) != -1 ) { + if( buf.st_mtime > mini_mtime ) { + free( mini_filename ) ; + mini_filename = NULL ; + mini_mtime = 0 ; + } + } + + if( (mini_filename!=NULL)&&(!strcmp( filename, mini_filename )) ) { + if( ( Section = getSECTION( getINI( mini_Ini ), section ) ) != NULL ) { + if( ( Key = getKEY( Section, key ) ) != NULL ) { + strcpy( pStr, getvalueKEY( Key ) ) ; + return_code = 1 ; + } + } + } + else { + freeINI( &mini_Ini ) ; + if( mini_filename!=NULL ) { free(mini_filename); mini_filename=NULL;mini_mtime=0; } + mini_filename=(char*)malloc( strlen(filename)+1 ); strcpy(mini_filename,filename); + if( ( mini_Ini = newINI() ) != NULL ) { + loadINI( mini_Ini, filename ) ; + if( stat(filename, &buf) != 1 ) { + mini_mtime = buf.st_mtime ; + } + if( ( Section = getSECTION( getINI( mini_Ini ), section ) ) != NULL ) { + if( ( Key = getKEY( Section, key ) ) != NULL ) { + strcpy( pStr, getvalueKEY( Key ) ) ; + return_code = 1 ; + } + } + /*freeINI( &mini_Ini ) ;*/ + } + } + + return return_code ; + } + +int writeINI( const char * filename, const char * section, const char * key, const char * value ) { + int return_code = 0 ; + SINI * Ini = NULL ; + SSECTION * Section = NULL ; + SKEY * Key ; + if( filename==NULL ) return 0 ; + if( strlen(filename)<=0 ) return 0 ; + if( section==NULL ) return 0 ; + if( strlen(section)<=0 ) return 0 ; + + freeINI( &mini_Ini ) ; + if( mini_filename!=NULL ) { free(mini_filename); mini_filename=NULL; } + + if( ( Ini = newINI() ) != NULL ) { + loadINI( Ini, filename ) ; + if( ( Section = getSECTION( getINI( Ini ), section ) ) == NULL ) { + if( ( Section = newSECTION( section ) ) != NULL ) { + addINI( Ini, Section ) ; + } + else return 0 ; + } + if( key != NULL ) if( strlen(key)>0 ) { + if( ( Key = newKEY( key, value ) ) != NULL ) { + if( !addKEY( Section, Key ) ) + { freeKEY( &Key ) ; } + } + } + if( storeINI( Ini, filename ) ) + return_code = 1 ; + freeINI( &Ini ) ; + } + return return_code ; + } + +int writeINISec( const char * filename, const char * section, const char * key, const char * value ) { + int return_code = 0 ; + char * newname = NULL ; + if( (newname=(char*)malloc( strlen(filename)+5 )) == NULL ) return 0 ; + sprintf( newname, "%s.new", filename ); + return_code = writeINI( newname, section, key, value ) ; + free(newname) ; + return return_code ; + } + +int delINI( const char * filename, const char * section, const char * key ) { + int return_code = 0 ; + SINI * Ini = NULL ; + SSECTION * Section = NULL ; + if( filename==NULL ) return 0 ; + if( strlen(filename)<=0 ) return 0 ; + if( section==NULL ) return 0 ; + if( strlen(section)<=0 ) return 0 ; + + freeINI( &mini_Ini ) ; + if( mini_filename!=NULL ) { free(mini_filename); mini_filename=NULL; } + + if( ( Ini = newINI() ) != NULL ) { + loadINI( Ini, filename ) ; + if( ( Section = getSECTION( getINI( Ini ), section ) ) != NULL ) { + if( (key!=NULL) && (strlen(key)>0) ){ + delKEY( Section, key ) ; + } + else { + delSECTION( getINI( Ini ), section ) ; + } + if( storeINI( Ini, filename ) ) + return_code = 1 ; + } + freeINI( &Ini ) ; + } + return return_code ; + } + +int delINISec( const char * filename, const char * section, const char * key ) { + int return_code = 0 ; + char * newname = NULL ; + if( (newname=(char*)malloc( strlen(filename)+5 )) == NULL ) return 0 ; + sprintf( newname, "%s.new", filename ); + return_code = delINI( newname, section, key ) ; + free(newname) ; + return return_code ; + } + +void destroyINI( void ) { + if(mini_filename!=NULL) { free(mini_filename) ; } mini_filename=NULL ; + freeINI( &mini_Ini ) ; + } + +int ini_main( int argc, char *argv[], char *arge[] ) { + char buf[256]; + char b[10]; + + + /*SINI * INI = newINI( ) ; loadINI( INI, "test.ini" ) ; printINI( INI ) ; freeINI( &INI ) ;*/ + /*delINI( "test.ini", "new_section", "password") ;*/ + + system( "rm test.ini" ) ; + + writeINI( "test.ini", "Section1", "Name1", "Value1") ; + writeINI( "test.ini", "Section1", "Name2", "Value2") ; + system( "cat test.ini" ) ; system( "echo." ) ; + writeINI( "test.ini", "Section2", "Name1", "Value1") ; + + system( "cat test.ini" ) ; system( "echo." ) ; + writeINI( "test.ini", "Section1", "Name1", "Value3") ; + + system( "cat test.ini" ) ; system( "echo." ) ; + writeINI( "test.ini", "Section3", NULL, "") ; + + system( "cat test.ini" ) ; system( "echo." ) ; + delINI( "test.ini", "Section2", "Name1" ); + system( "cat test.ini" ) ; system( "echo." ) ; + + readINI( "test.ini", "Section1", "Name1", buf); printf("Name1=%s\n",buf); + readINI( "test.ini", "Section1", "Name2", buf); printf("Name2=%s\n",buf); + + fscanf( stdin, "%s", b) ; + readINI( "test.ini", "Section1", "Name1", buf); printf("Name1=%s\n",buf); + + fscanf( stdin, "%s", b) ; + readINI( "test.ini", "Section1", "Name1", buf); printf("Name1=%s\n",buf); + + destroyINI(); + + return 1; + } + +#ifdef MAIN +int main( int argc, char *argv[], char *arge[] ) { + int return_code = 0 ; + return_code = ini_main( argc, argv, arge ) ; +#ifdef DEBUG_MODE + _leaktracker61_EnableReportLeakOnApplication_Exit("ini.leaktracker.log", 1); + _leaktracker61_DumpAllLeaks("ini.leaktracker.log", 0); + printf("Leak tracker log in ini.leaktracker.log file\n"); +#endif + return return_code ; + } +#endif diff --git a/src/cstdlib2/mini.h b/src/cstdlib2/mini.h new file mode 100644 index 0000000..9a85efc --- /dev/null +++ b/src/cstdlib2/mini.h @@ -0,0 +1,101 @@ + +#ifndef __MINI +#define __MINI + +#include "../platform.h" +#include +#include +#include + +#ifdef AIX_HOST +#include +#define _locking lockf +#define LK_LOCK F_LOCK +#define LK_UNLCK F_ULOCK +#elif WIN32 +#include +#include +#else +#include +#define _locking lockf +#define LK_LOCK F_LOCK +#define LK_UNLCK F_ULOCK +#endif + + +typedef struct s_section { + int type ; + char * name ; + struct s_section * next ; /* section suivante */ + struct s_key * first ; /* premire cl */ + } SSECTION ; + +typedef struct s_key { + int type ; + char * name ; + void * value ; + struct s_key * next ; + } SKEY ; + +typedef struct s_ini { + char * name ; + struct s_section * first ; + } SINI ; + +SSECTION * newSECTION( const char * name ) ; + +SKEY * newKEY( const char * name, const char * value ) ; + +SINI * newINI( void ) ; + +void freeSECTION( SSECTION ** Section ) ; + +void freeKEY( SKEY ** Key ) ; + +void freeINI( SINI ** Ini ) ; + +int addSECTION( SSECTION * Section, SSECTION * SectionAdd ) ; + +int addINI( SINI * Ini, SSECTION * Section ) ; + +int delSECTION( SSECTION * Section, const char * name ) ; + +int addKEY( SSECTION * Section, SKEY * Key ) ; + +int delKEY( SSECTION * Section, const char * name ) ; + +SSECTION * getSECTION( SSECTION * Section, const char * name ) ; + +SSECTION * lastSECTION( SSECTION * Section ) ; + +SKEY * getKEY( SSECTION * Section, const char * name ) ; + +char * getvalueKEY( SKEY * Key ) ; + +int setKEY( SKEY * Key, char * value ) ; + +void printKEY( SKEY * Key ) ; + +void printSECTION( SSECTION * Section ) ; + +void printINI( SINI * Ini ) ; + +int loadINI( SINI * Ini, const char * fileName ) ; + +int readINI( const char * filename, const char * section, const char * key, char * pStr) ; + +int storeKEY( SKEY * Key, FILE * fp ) ; + +int storeSECTION( SSECTION * Section, FILE * fp ) ; + +int storeINI( SINI * Ini, const char * filename ) ; + +int writeINI( const char * filename, const char * section, const char * key, const char * value ) ; + +int writeINISec( const char * filename, const char * section, const char * key, const char * value ) ; + +int delINI( const char * filename, const char * section, const char * key ) ; + +int delINISec( const char * filename, const char * section, const char * key ) ; + +#endif diff --git a/src/cstdlib2/mini_h.c b/src/cstdlib2/mini_h.c new file mode 100644 index 0000000..02c5e9f --- /dev/null +++ b/src/cstdlib2/mini_h.c @@ -0,0 +1,34 @@ +/* mini.h library for large systems - small embedded systems use clibrary.c instead */ +#include "mini.c" +#include "../interpreter.h" + +/* handy structure definitions */ +const char MiniDefs[] = "\ +"; + +void MiniDelINI(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = delINI( Param[0]->Val->Pointer, Param[1]->Val->Pointer, Param[2]->Val->Pointer ) ; +} + +void MiniReadINI(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = readINI( Param[0]->Val->Pointer, Param[1]->Val->Pointer, Param[2]->Val->Pointer, Param[3]->Val->Pointer ) ; +} + +void MiniWriteINI(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = writeINI( Param[0]->Val->Pointer, Param[1]->Val->Pointer, Param[2]->Val->Pointer, Param[3]->Val->Pointer ) ; +} + +/* all mini.h functions */ +struct LibraryFunction MiniFunctions[] = +{ + { MiniDelINI, "int delINI( char * filename, char * section, char * key ) ;" }, + { MiniReadINI, "int readINI( char * filename, char * section, char * key, char * pStr) ;" }, + { MiniWriteINI, "int writeINI( char * filename, char * section, char * key, char * value ) ;" }, + { NULL, NULL } +} ; + + +/* creates various system-dependent definitions */ +void MiniSetupFunc(Picoc *pc) +{ +} diff --git a/src/cstdlib2/picoc.rc b/src/cstdlib2/picoc.rc new file mode 100644 index 0000000..d1aaaee --- /dev/null +++ b/src/cstdlib2/picoc.rc @@ -0,0 +1 @@ +IDI_APPICON ICON DISCARDABLE "c.ico" \ No newline at end of file diff --git a/src/cstdlib2/popen.c b/src/cstdlib2/popen.c new file mode 100644 index 0000000..9f7a27a --- /dev/null +++ b/src/cstdlib2/popen.c @@ -0,0 +1,29 @@ +/* complement a stdio.h pour ajouter popen et pclose */ +#include +#include "../interpreter.h" + +/* define definition */ +const char PopenDefs[] = "" ; + +/* popen calls */ +void PopenPopen(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Pointer = popen( Param[0]->Val->Pointer, Param[1]->Val->Pointer ) ; +} + +void PopenPclose(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = pclose( Param[0]->Val->Pointer ) ; +} + +/* all stdio.h functions */ +struct LibraryFunction PopenFunctions[] = +{ + { PopenPopen, "FILE * popen( char * commande, char * type ) ;" }, + { PopenPclose, "int pclose( FILE * stream) ;" }, + { NULL, NULL } +}; + +/* creates various system-dependent definitions */ +void PopenSetupFunc(Picoc *pc) +{ + /* printf("PATH_MAX=%d\n",PATH_MAX); */ +} diff --git a/src/cstdlib2/popen.o b/src/cstdlib2/popen.o new file mode 100644 index 0000000..a39c2ea Binary files /dev/null and b/src/cstdlib2/popen.o differ diff --git a/src/cstdlib2/regex.c b/src/cstdlib2/regex.c new file mode 100644 index 0000000..88d515a --- /dev/null +++ b/src/cstdlib2/regex.c @@ -0,0 +1,115 @@ +/* regex.h library for large systems - small embedded systems use clibrary.c instead */ +#include +#include "regex.h" +#include "../interpreter.h" + +/* Equivalent des #define NAME VALUE */ +static int REG_EXTENDEDValue = REG_EXTENDED ; +static int REG_ICASEValue = REG_ICASE ; +static int REG_NOSUBValue = REG_NOSUB ; +static int REG_NEWLINEValue = REG_NEWLINE ; +static int REG_NOTBOLValue = REG_NOTBOL ; +static int REG_NOTEOLValue = REG_NOTEOL ; +static int REG_NOMATCHValue = REG_NOMATCH ; +static int REG_BADPATValue = REG_BADPAT ; +static int REG_ECOLLATEValue = REG_ECOLLATE ; +static int REG_ECTYPEValue = REG_ECTYPE ; +static int REG_EESCAPEValue = REG_EESCAPE ; +static int REG_ESUBREGValue = REG_ESUBREG ; +static int REG_EBRACKValue = REG_EBRACK ; +static int REG_EPARENValue = REG_EPAREN ; +static int REG_EBRACEValue = REG_EBRACE ; +static int REG_BADBRValue = REG_BADBR ; +static int REG_ERANGEValue = REG_ERANGE ; +static int REG_ESPACEValue = REG_ESPACE ; +static int REG_BADRPTValue = REG_BADRPT ; +/*static int REG_ENOSYSValue = REG_ENOSYS ;*/ + +typedef struct REGEX { regex_t * ptr ; } REGEXStruct ; +/* +The structure type regex_t contains at least the following member: +size_t re_nsub number of parenthesised subexpressions +*/ + +typedef struct REGMATCH { regmatch_t * ptr ; } REGMATCHStruct ; +/* +The structure type regmatch_t contains at least the following members: +regoff_t rm_so byte offset from start of string + to start of substring +regoff_t rm_eo byte offset from start of string + of the first character after the end of substring +*/ + + +/* handy structure definitions */ +const char RegexDefs[1024] = "\ +typedef int regoff_t ;\n\ +typedef struct __REGEXtruct regex_t ;\n\ +typedef struct __REGMATCHtruct {\n\ + regoff_t rm_so ;\n\ + regoff_t rm_eo ;\n\ +} regmatch_t ;\n\ +"; + +/* regex calls */ +void RegexRegcomp(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = regcomp( Param[0]->Val->Pointer, Param[1]->Val->Pointer, Param[2]->Val->Integer ) ; +} +void RegexRegexec(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = regexec( Param[0]->Val->Pointer, Param[1]->Val->Pointer, Param[2]->Val->Integer, Param[3]->Val->Pointer, Param[4]->Val->Integer ) ; +} +void RegexRegerror(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = regerror( Param[0]->Val->Integer, Param[1]->Val->Pointer, Param[2]->Val->Pointer, Param[3]->Val->Integer ) ; +} +void RegexRegfree(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + regfree( Param[0]->Val->Pointer ) ; +} + +/* all regex functions */ +struct LibraryFunction RegexFunctions[] = +{ + { RegexRegcomp, "int regcomp( regex_t *, char *, int ) ;" }, + { RegexRegexec, "int regexec( regex_t *, char *, size_t, regmatch_t *, int ) ;" }, + { RegexRegerror, "size_t regerror( int, regex_t *, char *, size_t ) ;" }, + { RegexRegfree, "void regfree( regex_t * ) ;" }, + { NULL, NULL } +}; + +/* creates various system-dependent definitions */ +void PicocParse(const char *FileName, const char *Source, int SourceLen, int RunIt, int CleanupNow, int CleanupSource, int EnableDebugger) ; +void RegexSetupFunc(Picoc *pc) +{ + /* struct ValueType *StructRegexType ; */ + /* struct ValueType *StructRegmatchType ; */ + + /* make a "struct __REGEXtruct" which is the same size as a native regex_t structure */ + /* StructRegexType = */TypeCreateOpaqueStruct(pc, NULL, TableStrRegister(pc, "__REGEXtruct"), sizeof(regex_t)); + + /* make a "struct __REGMATCHtruct" which is the same size as a native regmatch_t structure */ + /*StructRegmatchType = TypeCreateOpaqueStruct(NULL, TableStrRegister("__REGMATCHtruct"), sizeof(regmatch_t));*/ + + /* define definitions */ + VariableDefinePlatformVar(pc, NULL, "REG_EXTENDED", &pc->IntType, (union AnyValue *)®_EXTENDEDValue, FALSE); + VariableDefinePlatformVar(pc, NULL, "REG_ICASE", &pc->IntType, (union AnyValue *)®_ICASEValue, FALSE); + VariableDefinePlatformVar(pc, NULL, "REG_NOSUB", &pc->IntType, (union AnyValue *)®_NOSUBValue, FALSE); + VariableDefinePlatformVar(pc, NULL, "REG_NEWLINE", &pc->IntType, (union AnyValue *)®_NEWLINEValue, FALSE); + VariableDefinePlatformVar(pc, NULL, "REG_NOTBOL", &pc->IntType, (union AnyValue *)®_NOTBOLValue, FALSE); + VariableDefinePlatformVar(pc, NULL, "REG_NOTEOL", &pc->IntType, (union AnyValue *)®_NOTEOLValue, FALSE); + VariableDefinePlatformVar(pc, NULL, "REG_NOMATCH", &pc->IntType, (union AnyValue *)®_NOMATCHValue, FALSE); + VariableDefinePlatformVar(pc, NULL, "REG_BADPAT", &pc->IntType, (union AnyValue *)®_BADPATValue, FALSE); + VariableDefinePlatformVar(pc, NULL, "REG_ECOLLATE", &pc->IntType, (union AnyValue *)®_ECOLLATEValue, FALSE); + VariableDefinePlatformVar(pc, NULL, "REG_ECTYPE", &pc->IntType, (union AnyValue *)®_ECTYPEValue, FALSE); + VariableDefinePlatformVar(pc, NULL, "REG_EESCAPE", &pc->IntType, (union AnyValue *)®_EESCAPEValue, FALSE); + VariableDefinePlatformVar(pc, NULL, "REG_ESUBREG", &pc->IntType, (union AnyValue *)®_ESUBREGValue, FALSE); + VariableDefinePlatformVar(pc, NULL, "REG_EBRACK", &pc->IntType, (union AnyValue *)®_EBRACKValue, FALSE); + VariableDefinePlatformVar(pc, NULL, "REG_EPAREN", &pc->IntType, (union AnyValue *)®_EPARENValue, FALSE); + VariableDefinePlatformVar(pc, NULL, "REG_EBRACE", &pc->IntType, (union AnyValue *)®_EBRACEValue, FALSE); + VariableDefinePlatformVar(pc, NULL, "REG_BADBR", &pc->IntType, (union AnyValue *)®_BADBRValue, FALSE); + VariableDefinePlatformVar(pc, NULL, "REG_ERANGE", &pc->IntType, (union AnyValue *)®_ERANGEValue, FALSE); + VariableDefinePlatformVar(pc, NULL, "REG_ESPACE", &pc->IntType, (union AnyValue *)®_ESPACEValue, FALSE); + VariableDefinePlatformVar(pc, NULL, "REG_BADRPT", &pc->IntType, (union AnyValue *)®_BADRPTValue, FALSE); + /*VariableDefinePlatformVar(NULL, "REG_ENOSYS", &IntType, (union AnyValue *)®_ENOSYSValue, FALSE);*/ + + + /*PicocParse("regex.h", RegexDefine, strlen(RegexDefine), TRUE, TRUE, FALSE, FALSE);*/ +} diff --git a/src/cstdlib2/regex.h b/src/cstdlib2/regex.h new file mode 100644 index 0000000..1ce09f0 --- /dev/null +++ b/src/cstdlib2/regex.h @@ -0,0 +1,499 @@ +/* Definitions for data structures and routines for the regular + expression library, version 0.12. + + Copyright (C) 1985, 1989, 1990, 1991, 1992, 1993 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + +#ifndef __REGEXP_LIBRARY_H__ +#define __REGEXP_LIBRARY_H__ + +#include "../platform.h" + +#ifdef _POSIX_SOURCE +#undef _POSIX_SOURCE +#endif +/* POSIX says that must be included (by the caller) before + . */ + +#ifdef VMS +/* VMS doesn't have `size_t' in , even though POSIX says it + should be there. */ +#include +#endif + + +/* The following bits are used to determine the regexp syntax we + recognize. The set/not-set meanings are chosen so that Emacs syntax + remains the value 0. The bits are given in alphabetical order, and + the definitions shifted by one from the previous bit; thus, when we + add or remove a bit, only one other definition need change. */ +typedef unsigned reg_syntax_t; + +/* If this bit is not set, then \ inside a bracket expression is literal. + If set, then such a \ quotes the following character. */ +#define RE_BACKSLASH_ESCAPE_IN_LISTS (1) + +/* If this bit is not set, then + and ? are operators, and \+ and \? are + literals. + If set, then \+ and \? are operators and + and ? are literals. */ +#define RE_BK_PLUS_QM (RE_BACKSLASH_ESCAPE_IN_LISTS << 1) + +/* If this bit is set, then character classes are supported. They are: + [:alpha:], [:upper:], [:lower:], [:digit:], [:alnum:], [:xdigit:], + [:space:], [:print:], [:punct:], [:graph:], and [:cntrl:]. + If not set, then character classes are not supported. */ +#define RE_CHAR_CLASSES (RE_BK_PLUS_QM << 1) + +/* If this bit is set, then ^ and $ are always anchors (outside bracket + expressions, of course). + If this bit is not set, then it depends: + ^ is an anchor if it is at the beginning of a regular + expression or after an open-group or an alternation operator; + $ is an anchor if it is at the end of a regular expression, or + before a close-group or an alternation operator. + + This bit could be (re)combined with RE_CONTEXT_INDEP_OPS, because + POSIX draft 11.2 says that * etc. in leading positions is undefined. + We already implemented a previous draft which made those constructs + invalid, though, so we haven't changed the code back. */ +#define RE_CONTEXT_INDEP_ANCHORS (RE_CHAR_CLASSES << 1) + +/* If this bit is set, then special characters are always special + regardless of where they are in the pattern. + If this bit is not set, then special characters are special only in + some contexts; otherwise they are ordinary. Specifically, + * + ? and intervals are only special when not after the beginning, + open-group, or alternation operator. */ +#define RE_CONTEXT_INDEP_OPS (RE_CONTEXT_INDEP_ANCHORS << 1) + +/* If this bit is set, then *, +, ?, and { cannot be first in an re or + immediately after an alternation or begin-group operator. */ +#define RE_CONTEXT_INVALID_OPS (RE_CONTEXT_INDEP_OPS << 1) + +/* If this bit is set, then . matches newline. + If not set, then it doesn't. */ +#define RE_DOT_NEWLINE (RE_CONTEXT_INVALID_OPS << 1) + +/* If this bit is set, then . doesn't match NUL. + If not set, then it does. */ +#define RE_DOT_NOT_NULL (RE_DOT_NEWLINE << 1) + +/* If this bit is set, nonmatching lists [^...] do not match newline. + If not set, they do. */ +#define RE_HAT_LISTS_NOT_NEWLINE (RE_DOT_NOT_NULL << 1) + +/* If this bit is set, either \{...\} or {...} defines an + interval, depending on RE_NO_BK_BRACES. + If not set, \{, \}, {, and } are literals. */ +#define RE_INTERVALS (RE_HAT_LISTS_NOT_NEWLINE << 1) + +/* If this bit is set, +, ? and | aren't recognized as operators. + If not set, they are. */ +#define RE_LIMITED_OPS (RE_INTERVALS << 1) + +/* If this bit is set, newline is an alternation operator. + If not set, newline is literal. */ +#define RE_NEWLINE_ALT (RE_LIMITED_OPS << 1) + +/* If this bit is set, then `{...}' defines an interval, and \{ and \} + are literals. + If not set, then `\{...\}' defines an interval. */ +#define RE_NO_BK_BRACES (RE_NEWLINE_ALT << 1) + +/* If this bit is set, (...) defines a group, and \( and \) are literals. + If not set, \(...\) defines a group, and ( and ) are literals. */ +#define RE_NO_BK_PARENS (RE_NO_BK_BRACES << 1) + +/* If this bit is set, then \ matches . + If not set, then \ is a back-reference. */ +#define RE_NO_BK_REFS (RE_NO_BK_PARENS << 1) + +/* If this bit is set, then | is an alternation operator, and \| is literal. + If not set, then \| is an alternation operator, and | is literal. */ +#define RE_NO_BK_VBAR (RE_NO_BK_REFS << 1) + +/* If this bit is set, then an ending range point collating higher + than the starting range point, as in [z-a], is invalid. + If not set, then when ending range point collates higher than the + starting range point, the range is ignored. */ +#define RE_NO_EMPTY_RANGES (RE_NO_BK_VBAR << 1) + +/* If this bit is set, then an unmatched ) is ordinary. + If not set, then an unmatched ) is invalid. */ +#define RE_UNMATCHED_RIGHT_PAREN_ORD (RE_NO_EMPTY_RANGES << 1) + +/* This global variable defines the particular regexp syntax to use (for + some interfaces). When a regexp is compiled, the syntax used is + stored in the pattern buffer, so changing this does not affect + already-compiled regexps. */ +extern reg_syntax_t re_syntax_options; + +/* Define combinations of the above bits for the standard possibilities. + (The [[[ comments delimit what gets put into the Texinfo file, so + don't delete them!) */ +/* [[[begin syntaxes]]] */ +#define RE_SYNTAX_EMACS 0 + +#define RE_SYNTAX_AWK \ + (RE_BACKSLASH_ESCAPE_IN_LISTS | RE_DOT_NOT_NULL \ + | RE_NO_BK_PARENS | RE_NO_BK_REFS \ + | RE_NO_BK_VBAR | RE_NO_EMPTY_RANGES \ + | RE_UNMATCHED_RIGHT_PAREN_ORD) + +#define RE_SYNTAX_POSIX_AWK \ + (RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS) + +#define RE_SYNTAX_GREP \ + (RE_BK_PLUS_QM | RE_CHAR_CLASSES \ + | RE_HAT_LISTS_NOT_NEWLINE | RE_INTERVALS \ + | RE_NEWLINE_ALT) + +#define RE_SYNTAX_EGREP \ + (RE_CHAR_CLASSES | RE_CONTEXT_INDEP_ANCHORS \ + | RE_CONTEXT_INDEP_OPS | RE_HAT_LISTS_NOT_NEWLINE \ + | RE_NEWLINE_ALT | RE_NO_BK_PARENS \ + | RE_NO_BK_VBAR) + +#define RE_SYNTAX_POSIX_EGREP \ + (RE_SYNTAX_EGREP | RE_INTERVALS | RE_NO_BK_BRACES) + +/* P1003.2/D11.2, section 4.20.7.1, lines 5078ff. */ +#define RE_SYNTAX_ED RE_SYNTAX_POSIX_BASIC + +#define RE_SYNTAX_SED RE_SYNTAX_POSIX_BASIC + +/* Syntax bits common to both basic and extended POSIX regex syntax. */ +#define _RE_SYNTAX_POSIX_COMMON \ + (RE_CHAR_CLASSES | RE_DOT_NEWLINE | RE_DOT_NOT_NULL \ + | RE_INTERVALS | RE_NO_EMPTY_RANGES) + +#define RE_SYNTAX_POSIX_BASIC \ + (_RE_SYNTAX_POSIX_COMMON | RE_BK_PLUS_QM) + +/* Differs from ..._POSIX_BASIC only in that RE_BK_PLUS_QM becomes + RE_LIMITED_OPS, i.e., \? \+ \| are not recognized. Actually, this + isn't minimal, since other operators, such as \`, aren't disabled. */ +#define RE_SYNTAX_POSIX_MINIMAL_BASIC \ + (_RE_SYNTAX_POSIX_COMMON | RE_LIMITED_OPS) + +#define RE_SYNTAX_POSIX_EXTENDED \ + (_RE_SYNTAX_POSIX_COMMON | RE_CONTEXT_INDEP_ANCHORS \ + | RE_CONTEXT_INDEP_OPS | RE_NO_BK_BRACES \ + | RE_NO_BK_PARENS | RE_NO_BK_VBAR \ + | RE_UNMATCHED_RIGHT_PAREN_ORD) + +/* Differs from ..._POSIX_EXTENDED in that RE_CONTEXT_INVALID_OPS + replaces RE_CONTEXT_INDEP_OPS and RE_NO_BK_REFS is added. */ +#define RE_SYNTAX_POSIX_MINIMAL_EXTENDED \ + (_RE_SYNTAX_POSIX_COMMON | RE_CONTEXT_INDEP_ANCHORS \ + | RE_CONTEXT_INVALID_OPS | RE_NO_BK_BRACES \ + | RE_NO_BK_PARENS | RE_NO_BK_REFS \ + | RE_NO_BK_VBAR | RE_UNMATCHED_RIGHT_PAREN_ORD) +/* [[[end syntaxes]]] */ + +/* Maximum number of duplicates an interval can allow. Some systems + (erroneously) define this in other header files, but we want our + value, so remove any previous define. */ +#ifdef RE_DUP_MAX +#undef RE_DUP_MAX +#endif +#define RE_DUP_MAX ((1 << 15) - 1) + + +/* POSIX `cflags' bits (i.e., information for `regcomp'). */ + +/* If this bit is set, then use extended regular expression syntax. + If not set, then use basic regular expression syntax. */ +#define REG_EXTENDED 1 + +/* If this bit is set, then ignore case when matching. + If not set, then case is significant. */ +#define REG_ICASE (REG_EXTENDED << 1) + +/* If this bit is set, then anchors do not match at newline + characters in the string. + If not set, then anchors do match at newlines. */ +#define REG_NEWLINE (REG_ICASE << 1) + +/* If this bit is set, then report only success or fail in regexec. + If not set, then returns differ between not matching and errors. */ +#define REG_NOSUB (REG_NEWLINE << 1) + + +/* POSIX `eflags' bits (i.e., information for regexec). */ + +/* If this bit is set, then the beginning-of-line operator doesn't match + the beginning of the string (presumably because it's not the + beginning of a line). + If not set, then the beginning-of-line operator does match the + beginning of the string. */ +#define REG_NOTBOL 1 + +/* Like REG_NOTBOL, except for the end-of-line. */ +#define REG_NOTEOL (1 << 1) + + +/* If any error codes are removed, changed, or added, update the + `re_error_msg' table in regex.c. */ +typedef enum +{ + REG_NOERROR = 0, /* Success. */ + REG_NOMATCH, /* Didn't find a match (for regexec). */ + + /* POSIX regcomp return error codes. (In the order listed in the + standard.) */ + REG_BADPAT, /* Invalid pattern. */ + REG_ECOLLATE, /* Not implemented. */ + REG_ECTYPE, /* Invalid character class name. */ + REG_EESCAPE, /* Trailing backslash. */ + REG_ESUBREG, /* Invalid back reference. */ + REG_EBRACK, /* Unmatched left bracket. */ + REG_EPAREN, /* Parenthesis imbalance. */ + REG_EBRACE, /* Unmatched \{. */ + REG_BADBR, /* Invalid contents of \{\}. */ + REG_ERANGE, /* Invalid range end. */ + REG_ESPACE, /* Ran out of memory. */ + REG_BADRPT, /* No preceding re for repetition op. */ + + /* Error codes we've added. */ + REG_EEND, /* Premature end. */ + REG_ESIZE, /* Compiled pattern bigger than 2^16 bytes. */ + REG_ERPAREN /* Unmatched ) or \); not returned from regcomp. */ +} reg_errcode_t; + +/* This data structure represents a compiled pattern. Before calling + the pattern compiler, the fields `buffer', `allocated', `fastmap', + `translate', and `no_sub' can be set. After the pattern has been + compiled, the `re_nsub' field is available. All other fields are + private to the regex routines. */ + +struct re_pattern_buffer +{ +/* [[[begin pattern_buffer]]] */ + /* Space that holds the compiled pattern. It is declared as + `unsigned char *' because its elements are + sometimes used as array indexes. */ + unsigned char *buffer; + + /* Number of bytes to which `buffer' points. */ + unsigned long allocated; + + /* Number of bytes actually used in `buffer'. */ + unsigned long used; + + /* Syntax setting with which the pattern was compiled. */ + reg_syntax_t syntax; + + /* Pointer to a fastmap, if any, otherwise zero. re_search uses + the fastmap, if there is one, to skip over impossible + starting points for matches. */ + char *fastmap; + + /* Either a translate table to apply to all characters before + comparing them, or zero for no translation. The translation + is applied to a pattern when it is compiled and to a string + when it is matched. */ + char *translate; + + /* Number of subexpressions found by the compiler. */ + size_t re_nsub; + + /* Zero if this pattern cannot match the empty string, one else. + Well, in truth it's used only in `re_search_2', to see + whether or not we should use the fastmap, so we don't set + this absolutely perfectly; see `re_compile_fastmap' (the + `duplicate' case). */ + unsigned can_be_null : 1; + + /* If REGS_UNALLOCATED, allocate space in the `regs' structure + for `max (RE_NREGS, re_nsub + 1)' groups. + If REGS_REALLOCATE, reallocate space if necessary. + If REGS_FIXED, use what's there. */ +#define REGS_UNALLOCATED 0 +#define REGS_REALLOCATE 1 +#define REGS_FIXED 2 + unsigned regs_allocated : 2; + + /* Set to zero when `regex_compile' compiles a pattern; set to one + by `re_compile_fastmap' if it updates the fastmap. */ + unsigned fastmap_accurate : 1; + + /* If set, `re_match_2' does not return information about + subexpressions. */ + unsigned no_sub : 1; + + /* If set, a beginning-of-line anchor doesn't match at the + beginning of the string. */ + unsigned not_bol : 1; + + /* Similarly for an end-of-line anchor. */ + unsigned not_eol : 1; + + /* If true, an anchor at a newline matches. */ + unsigned newline_anchor : 1; + +/* [[[end pattern_buffer]]] */ +}; + +typedef struct re_pattern_buffer regex_t; + + +/* search.c (search_buffer) in Emacs needs this one opcode value. It is + defined both in `regex.c' and here. */ +#define RE_EXACTN_VALUE 1 + +/* Type for byte offsets within the string. POSIX mandates this. */ +typedef int regoff_t; + + +/* This is the structure we store register match data in. See + regex.texinfo for a full description of what registers match. */ +struct re_registers +{ + unsigned num_regs; + regoff_t *start; + regoff_t *end; +}; + + +/* If `regs_allocated' is REGS_UNALLOCATED in the pattern buffer, + `re_match_2' returns information about at least this many registers + the first time a `regs' structure is passed. */ +#ifndef RE_NREGS +#define RE_NREGS 30 +#endif + + +/* POSIX specification for registers. Aside from the different names than + `re_registers', POSIX uses an array of structures, instead of a + structure of arrays. */ +typedef struct +{ + regoff_t rm_so; /* Byte offset from string's start to substring's start. */ + regoff_t rm_eo; /* Byte offset from string's start to substring's end. */ +} regmatch_t; + +/* Declarations for routines. */ + +/* To avoid duplicating every routine declaration -- once with a + prototype (if we are ANSI), and once without (if we aren't) -- we + use the following macro to declare argument types. This + unfortunately clutters up the declarations a bit, but I think it's + worth it. */ + +#if __STDC__ + +#define _RE_ARGS(args) args + +#else /* not __STDC__ */ + +#define _RE_ARGS(args) () + +#endif /* not __STDC__ */ + +/* Sets the current default syntax to SYNTAX, and return the old syntax. + You can also simply assign to the `re_syntax_options' variable. */ +extern reg_syntax_t re_set_syntax _RE_ARGS ((reg_syntax_t syntax)); + +/* Compile the regular expression PATTERN, with length LENGTH + and syntax given by the global `re_syntax_options', into the buffer + BUFFER. Return NULL if successful, and an error string if not. */ +extern const char *re_compile_pattern + _RE_ARGS ((const char *pattern, int length, + struct re_pattern_buffer *buffer)); + + +/* Compile a fastmap for the compiled pattern in BUFFER; used to + accelerate searches. Return 0 if successful and -2 if was an + internal error. */ +extern int re_compile_fastmap _RE_ARGS ((struct re_pattern_buffer *buffer)); + + +/* Search in the string STRING (with length LENGTH) for the pattern + compiled into BUFFER. Start searching at position START, for RANGE + characters. Return the starting position of the match, -1 for no + match, or -2 for an internal error. Also return register + information in REGS (if REGS and BUFFER->no_sub are nonzero). */ +extern int re_search + _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string, + int length, int start, int range, struct re_registers *regs)); + + +/* Like `re_search', but search in the concatenation of STRING1 and + STRING2. Also, stop searching at index START + STOP. */ +extern int re_search_2 + _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string1, + int length1, const char *string2, int length2, + int start, int range, struct re_registers *regs, int stop)); + + +/* Like `re_search', but return how many characters in STRING the regexp + in BUFFER matched, starting at position START. */ +extern int re_match + _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string, + int length, int start, struct re_registers *regs)); + + +/* Relates to `re_match' as `re_search_2' relates to `re_search'. */ +extern int re_match_2 + _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string1, + int length1, const char *string2, int length2, + int start, struct re_registers *regs, int stop)); + + +/* Set REGS to hold NUM_REGS registers, storing them in STARTS and + ENDS. Subsequent matches using BUFFER and REGS will use this memory + for recording register information. STARTS and ENDS must be + allocated with malloc, and must each be at least `NUM_REGS * sizeof + (regoff_t)' bytes long. + + If NUM_REGS == 0, then subsequent matches should allocate their own + register data. + + Unless this function is called, the first search or match using + PATTERN_BUFFER will allocate its own register data, without + freeing the old data. */ +extern void re_set_registers + _RE_ARGS ((struct re_pattern_buffer *buffer, struct re_registers *regs, + unsigned num_regs, regoff_t *starts, regoff_t *ends)); + +/* 4.2 bsd compatibility. */ +extern char *re_comp _RE_ARGS ((const char *)); +extern int re_exec _RE_ARGS ((const char *)); + +/* POSIX compatibility. */ +extern int regcomp _RE_ARGS ((regex_t *preg, const char *pattern, int cflags)); +extern int regexec + _RE_ARGS ((const regex_t *preg, const char *string, size_t nmatch, + regmatch_t pmatch[], int eflags)); +extern size_t regerror + _RE_ARGS ((int errcode, const regex_t *preg, char *errbuf, + size_t errbuf_size)); +extern void regfree _RE_ARGS ((regex_t *preg)); + +#ifdef _POSIX_SOURCE +#error POSIX_SOURCE +#endif + +#endif /* not __REGEXP_LIBRARY_H__ */ + +/* +Local variables: +make-backup-files: t +version-control: t +trim-versions-without-asking: nil +End: +*/ diff --git a/src/cstdlib2/regex.o b/src/cstdlib2/regex.o new file mode 100644 index 0000000..5571694 Binary files /dev/null and b/src/cstdlib2/regex.o differ diff --git a/src/cstdlib2/rundll.c b/src/cstdlib2/rundll.c new file mode 100644 index 0000000..9f6a6b1 --- /dev/null +++ b/src/cstdlib2/rundll.c @@ -0,0 +1,55 @@ +#ifdef WIN32 +#include +#include + +/* Exemple d'appel dans pico-c +struct { char * st ; } st_s; +char st[256]; +strcpy( st, "Ceci est un test\n" ); +st_s.st=st; +rundll("cstdlib2/testdll.dll","myputs_h",&st_s); +*/ +typedef int (__cdecl *MYPROC)( void* ) ; + +int runDLL( char * dllname, char * functionname, void * param ) +{ + HINSTANCE hinstLib; + MYPROC ProcAdd; + //BOOL fFreeResult, fRunTimeLinkSuccess = FALSE; + + /* Get a handle to the DLL module. */ + + hinstLib = LoadLibrary(TEXT(dllname)); + + /* If the handle is valid, try to get the function address. */ + + if (hinstLib != NULL) + { + ProcAdd = (MYPROC) GetProcAddress(hinstLib,functionname); + + /* If the function address is valid, call the function. */ + + if (NULL != ProcAdd) + { + //fRunTimeLinkSuccess = TRUE; + (ProcAdd) ( param ); + } else { + fprintf( stderr, "Unable to run function %s\n", functionname ); + } + + /* Free the DLL module. */ + //fFreeResult = + FreeLibrary(hinstLib); + } else { + fprintf(stderr,"Unable to load DLL %s\n", dllname); + } + + /* If unable to call the DLL function, use an alternative. */ + /* if (! fRunTimeLinkSuccess) printf("Message printed from executable\n"); */ + + return 0; + +} + + +#endif diff --git a/src/cstdlib2/socket.c b/src/cstdlib2/socket.c new file mode 100644 index 0000000..c76781e --- /dev/null +++ b/src/cstdlib2/socket.c @@ -0,0 +1,616 @@ +#include "../interpreter.h" + +#ifdef WIN32 +#include +#include +#ifndef T_SOCKLEN_T +#define T_SOCKLEN_T +typedef int socklen_t; +#endif +#else +#include +#include +#include +#include +#include +#include +#include +#endif + +/* Equivalent des #define NAME VALUE */ +#ifdef WIN32 +static int SD_RECEIVEValue = SD_RECEIVE ; +static int SD_SENDValue = SD_SEND ; +static int SD_BOTHValue = SD_BOTH ; +static int IOCPARM_MASKValue = IOCPARM_MASK ; +static int IOC_VOIDValue = IOC_VOID ; +static int IOC_OUTValue = IOC_OUT ; +static int IOC_INValue = IOC_IN ; +static int IPPROTO_GGPValue = IPPROTO_GGP ; +static int IPPROTO_NDValue = IPPROTO_ND ; +static int IMPLINK_IPValue = IMPLINK_IP ; +static int FD_READValue = FD_READ ; +static int FD_WRITEValue = FD_WRITE ; +static int FD_OOBValue = FD_OOB ; +static int FD_ACCEPTValue = FD_ACCEPT ; +static int FD_CONNECTValue = FD_CONNECT ; +static int FD_CLOSEValue = FD_CLOSE ; +static int MSG_MAXIOVLENValue = MSG_MAXIOVLEN ; +static int MSG_PARTIALValue = MSG_PARTIAL ; +static int MAXGETHOSTSTRUCTValue = MAXGETHOSTSTRUCT ; +static int WSABASEERRValue = WSABASEERR ; +static int WSANO_ADDRESSValue = WSANO_ADDRESS ; +static int PF_VOICEVIEWValue = PF_VOICEVIEW ; +static int PF_FIREFOXValue = PF_FIREFOX ; +static int PF_UNKNOWN1Value = PF_UNKNOWN1 ; +static int PF_BANValue = PF_BAN ; +static int PF_ATMValue = PF_ATM ; +static int PF_LATValue = PF_LAT ; +static int PF_HYLINKValue = PF_HYLINK ; +static int PF_ISOValue = PF_ISO ; +static int PF_OSIValue = PF_OSI ; +static int PF_ECMAValue = PF_ECMA ; +static int PF_DATAKITValue = PF_DATAKIT ; +static int PF_CCITTValue = PF_CCITT ; +static int PF_DLIValue = PF_DLI ; +static int PF_PUPValue = PF_PUP ; +static int PF_CHAOSValue = PF_CHAOS ; +static int PF_NSValue = PF_NS ; +static int AF_DLIValue = AF_DLI ; +static int AF_LATValue = AF_LAT ; +static int AF_HYLINKValue = AF_HYLINK ; +static int AF_NETBIOSValue = AF_NETBIOS ; +static int AF_VOICEVIEWValue = AF_VOICEVIEW ; +static int AF_ATMValue = AF_ATM ; +static int PF_IMPLINKValue = PF_IMPLINK ; +static int AF_DATAKITValue = AF_DATAKIT ; +static int AF_CCITTValue = AF_CCITT ; +static int AF_IMPLINKValue = AF_IMPLINK ; +static int AF_PUPValue = AF_PUP ; +static int AF_CHAOSValue = AF_CHAOS ; +static int AF_NSValue = AF_NS ; +static int AF_ISOValue = AF_ISO ; +static int AF_OSIValue = AF_OSI ; +static int AF_ECMAValue = AF_ECMA ; +static int IMPLINK_LOWEXPERValue = IMPLINK_LOWEXPER ; +static int IMPLINK_HIGHEXPERValue = IMPLINK_HIGHEXPER ; +static int WSADESCRIPTION_LENValue = WSADESCRIPTION_LEN ; +static int WSASYS_STATUS_LENValue = WSASYS_STATUS_LEN ; +static int SO_USELOOPBACKValue = SO_USELOOPBACK ; +#endif +#ifndef AIX_HOST +static int IPPORT_ECHOValue = IPPORT_ECHO ; +static int IPPORT_DISCARDValue = IPPORT_DISCARD ; +static int IPPORT_SYSTATValue = IPPORT_SYSTAT ; +static int IPPORT_DAYTIMEValue = IPPORT_DAYTIME ; +static int IPPORT_NETSTATValue = IPPORT_NETSTAT ; +static int IPPORT_FTPValue = IPPORT_FTP ; +static int IPPORT_TELNETValue = IPPORT_TELNET ; +static int IPPORT_SMTPValue = IPPORT_SMTP ; +static int IPPORT_NAMESERVERValue = IPPORT_NAMESERVER ; +static int IPPORT_WHOISValue = IPPORT_WHOIS ; +static int IPPORT_MTPValue = IPPORT_MTP ; +static int IPPORT_TFTPValue = IPPORT_TFTP ; +static int IPPORT_RJEValue = IPPORT_RJE ; +static int IPPORT_FINGERValue = IPPORT_FINGER ; +static int IPPORT_TTYLINKValue = IPPORT_TTYLINK ; +static int IPPORT_SUPDUPValue = IPPORT_SUPDUP ; +static int IPPORT_EXECSERVERValue = IPPORT_EXECSERVER ; +static int IPPORT_LOGINSERVERValue = IPPORT_LOGINSERVER ; +static int IPPORT_CMDSERVERValue = IPPORT_CMDSERVER ; +static int IPPORT_EFSSERVERValue = IPPORT_EFSSERVER ; +static int IPPORT_BIFFUDPValue = IPPORT_BIFFUDP ; +static int IPPORT_WHOSERVERValue = IPPORT_WHOSERVER ; +static int IPPORT_ROUTESERVERValue = IPPORT_ROUTESERVER ; +static int IP_MAX_MEMBERSHIPSValue = IP_MAX_MEMBERSHIPS ; +static int AF_IPXValue = AF_IPX ; +static int PF_IPXValue = PF_IPX ; +#endif +static int FD_SETSIZEValue = FD_SETSIZE ; +static int IPPROTO_IPValue = IPPROTO_IP ; +static int IPPROTO_ICMPValue = IPPROTO_ICMP ; +static int IPPROTO_IGMPValue = IPPROTO_IGMP ; +static int IPPROTO_TCPValue = IPPROTO_TCP ; +static int IPPROTO_PUPValue = IPPROTO_PUP ; +static int IPPROTO_UDPValue = IPPROTO_UDP ; +static int IPPROTO_IDPValue = IPPROTO_IDP ; +static int IPPROTO_RAWValue = IPPROTO_RAW ; +static int IPPROTO_MAXValue = IPPROTO_MAX ; +static int IPPORT_TIMESERVERValue = IPPORT_TIMESERVER ; +static int IPPORT_RESERVEDValue = IPPORT_RESERVED ; +static int IN_CLASSA_NETValue = IN_CLASSA_NET ; +static int IN_CLASSA_NSHIFTValue = IN_CLASSA_NSHIFT ; +static int IN_CLASSA_HOSTValue = IN_CLASSA_HOST ; +static int IN_CLASSA_MAXValue = IN_CLASSA_MAX ; +static int IN_CLASSB_NETValue = IN_CLASSB_NET ; +static int IN_CLASSB_NSHIFTValue = IN_CLASSB_NSHIFT ; +static int IN_CLASSB_HOSTValue = IN_CLASSB_HOST ; +static int IN_CLASSB_MAXValue = IN_CLASSB_MAX ; +static int IN_CLASSC_NETValue = IN_CLASSC_NET ; +static int IN_CLASSC_NSHIFTValue = IN_CLASSC_NSHIFT ; +static int IN_CLASSC_HOSTValue = IN_CLASSC_HOST ; +static int INADDR_ANYValue = INADDR_ANY ; +static int INADDR_LOOPBACKValue = INADDR_LOOPBACK ; +static int INADDR_NONEValue = INADDR_NONE ; +static int IP_OPTIONSValue = IP_OPTIONS ; +static int SO_DEBUGValue = SO_DEBUG ; +static int SO_ACCEPTCONNValue = SO_ACCEPTCONN ; +static int SO_REUSEADDRValue = SO_REUSEADDR ; +static int SO_KEEPALIVEValue = SO_KEEPALIVE ; +static int SO_DONTROUTEValue = SO_DONTROUTE ; +static int SO_BROADCASTValue = SO_BROADCAST ; +static int SO_LINGERValue = SO_LINGER ; +static int SO_OOBINLINEValue = SO_OOBINLINE ; +static int SO_SNDBUFValue = SO_SNDBUF ; +static int SO_RCVBUFValue = SO_RCVBUF ; +static int SO_SNDLOWATValue = SO_SNDLOWAT ; +static int SO_RCVLOWATValue = SO_RCVLOWAT ; +static int SO_SNDTIMEOValue = SO_SNDTIMEO ; +static int SO_RCVTIMEOValue = SO_RCVTIMEO ; +static int SO_ERRORValue = SO_ERROR ; +static int SO_TYPEValue = SO_TYPE ; +static int IP_MULTICAST_IFValue = IP_MULTICAST_IF ; +static int IP_MULTICAST_TTLValue = IP_MULTICAST_TTL ; +static int IP_MULTICAST_LOOPValue = IP_MULTICAST_LOOP ; +static int IP_ADD_MEMBERSHIPValue = IP_ADD_MEMBERSHIP ; +static int IP_DROP_MEMBERSHIPValue = IP_DROP_MEMBERSHIP ; +static int IP_DEFAULT_MULTICAST_TTLValue = IP_DEFAULT_MULTICAST_TTL ; +static int IP_DEFAULT_MULTICAST_LOOPValue = IP_DEFAULT_MULTICAST_LOOP ; +static int SOCK_STREAMValue = SOCK_STREAM ; +static int SOCK_DGRAMValue = SOCK_DGRAM ; +static int SOCK_RAWValue = SOCK_RAW ; +static int SOCK_RDMValue = SOCK_RDM ; +static int SOCK_SEQPACKETValue = SOCK_SEQPACKET ; +static int TCP_NODELAYValue = TCP_NODELAY ; +static int AF_UNSPECValue = AF_UNSPEC ; +static int AF_UNIXValue = AF_UNIX ; +static int AF_INETValue = AF_INET ; +static int AF_SNAValue = AF_SNA ; +static int AF_DECnetValue = AF_DECnet ; +static int AF_APPLETALKValue = AF_APPLETALK ; +static int AF_INET6Value = AF_INET6 ; +static int AF_MAXValue = AF_MAX ; +static int PF_UNSPECValue = PF_UNSPEC ; +static int PF_UNIXValue = PF_UNIX ; +static int PF_INETValue = PF_INET ; +static int PF_SNAValue = PF_SNA ; +static int PF_DECnetValue = PF_DECnet ; +static int PF_APPLETALKValue = PF_APPLETALK ; +static int PF_INET6Value = PF_INET6 ; +static int PF_MAXValue = PF_MAX ; +static int SOL_SOCKETValue = SOL_SOCKET ; +static int SOMAXCONNValue = SOMAXCONN ; +static int MSG_OOBValue = MSG_OOB ; +static int MSG_PEEKValue = MSG_PEEK ; +static int MSG_DONTROUTEValue = MSG_DONTROUTE ; +static int HOST_NOT_FOUNDValue = HOST_NOT_FOUND ; +static int TRY_AGAINValue = TRY_AGAIN ; +static int NO_RECOVERYValue = NO_RECOVERY ; +static int NO_DATAValue = NO_DATA ; +static int NO_ADDRESSValue = NO_ADDRESS ; +static int SHUT_RDValue = 0 ; +static int SHUT_WRValue = 1 ; +static int SHUT_RDWRValue = 2 ; + +void SocketAccept(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = accept( Param[0]->Val->Integer, Param[1]->Val->Pointer, Param[2]->Val->Pointer ); +} + +void SocketBind(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = bind( Param[0]->Val->Integer, Param[1]->Val->Pointer, Param[2]->Val->Integer ); +} + +void SocketConnect(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = connect( Param[0]->Val->Integer, Param[1]->Val->Pointer, Param[2]->Val->Integer ); +} + +void SocketGetpeername(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = getpeername( Param[0]->Val->Integer, Param[1]->Val->Pointer, Param[2]->Val->Pointer ); +} + +void SocketGetsockname(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = getsockname( Param[0]->Val->Integer, Param[1]->Val->Pointer, Param[2]->Val->Pointer ); +} + +void SocketGetsockopt(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = getsockopt( Param[0]->Val->Integer, Param[1]->Val->Integer, Param[2]->Val->Integer, Param[3]->Val->Pointer, Param[4]->Val->Pointer ); +} + +void SocketListen(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = listen( Param[0]->Val->Integer, Param[1]->Val->Integer ); +} + +void SocketRecv(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = recv( Param[0]->Val->Integer, Param[1]->Val->Pointer, Param[2]->Val->Integer, Param[3]->Val->Integer ); +} + +void SocketRecvfrom(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = recvfrom( Param[0]->Val->Integer, Param[1]->Val->Pointer, Param[2]->Val->Integer, Param[3]->Val->Integer, Param[4]->Val->Pointer, Param[5]->Val->Pointer ); +} + +/* +void SocketRead(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = read( Param[0]->Val->Integer, Param[1]->Val->Pointer, Param[2]->Val->Integer ); +} +*/ + +void SocketSend(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = send( Param[0]->Val->Integer, Param[1]->Val->Pointer, Param[2]->Val->Integer, Param[3]->Val->Integer ); +} + +void SocketSendto(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = sendto( Param[0]->Val->Integer, Param[1]->Val->Pointer, Param[2]->Val->Integer, Param[3]->Val->Integer, Param[4]->Val->Pointer, Param[5]->Val->Integer ); +} + +void SocketSetsockopt(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = setsockopt( Param[0]->Val->Integer, Param[1]->Val->Integer, Param[2]->Val->Integer, Param[3]->Val->Pointer, Param[4]->Val->Integer ); +} + +void SocketShutdown(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = shutdown( Param[0]->Val->Integer, Param[1]->Val->Integer ); +} + +void SocketSocket(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = socket( Param[0]->Val->Integer, Param[1]->Val->Integer, Param[2]->Val->Integer ); +} + +/* +void SocketWrite(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = write( Param[0]->Val->Integer, Param[1]->Val->Pointer, Param[2]->Val->Integer ); +} +*/ + +void SocketHtonl(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = htonl( Param[0]->Val->Integer ) ; +} + +void SocketHtons(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = htons( Param[0]->Val->Integer ) ; +} + +void SocketNtohl(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = ntohl( Param[0]->Val->Integer ) ; +} + +void SocketNtohs(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = ntohs( Param[0]->Val->Integer ) ; +} + +void SocketGethostbyname(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Pointer = gethostbyname( Param[0]->Val->Pointer ) ; +} + +void SocketGethostbyaddr(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Pointer = gethostbyaddr( Param[0]->Val->Pointer, Param[1]->Val->Integer, Param[2]->Val->Integer ) ; +} + +/* +void SocketInet_addr(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = inet_addr( Param[0]->Val->Pointer ) ; +} + +void SocketInet_aton(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = inet_aton( Param[0]->Val->Pointer, Param[1]->Val->Pointer ) ; +} + +void SocketInet_network(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = inet_network( Param[0]->Val->Pointer ) ; +} +void SocketInet_ntoa(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Pointer = inet_ntoa( Param[0]->Val->Pointer ) ; +} + +void SocketInet_makeaddr(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Pointer = inet_makeaddr( Param[0]->Val->Integer, Param[1]->Val->Integer ) ; +} +*/ + +/* handy structure definitions */ +const char SocketDefs[] = "\ +typedef int socklen_t;\n\ +typedef unsigned uint32_t;\n\ +typedef unsigned short uint16_t;\n\ +struct sockaddr {\n\ + unsigned short sa_family;\n\ + char sa_data[14];\n\ +};\n\ +struct in_addr {\n\ + unsigned long s_addr;\n\ +};\n\ +struct sockaddr_in {\n\ + short sin_family;\n\ + unsigned short sin_port;\n\ + struct in_addr sin_addr;\n\ + char sin_zero[8];\n\ +};\n\ +struct hostent {\n\ + char *h_name;\n\ + char **h_aliases;\n\ + int h_addrtype;\n\ + int h_length;\n\ + char **h_addr_list;\n\ +};\n\ +"; + +/* all various.h functions */ +struct LibraryFunction SocketFunctions[] = +{ + { SocketAccept, "int accept( int sockfd, struct sockaddr *addr, socklen_t *addrlen ) ;" }, + { SocketBind, "int bind( int sockfd, struct sockaddr *addr, socklen_t addrlen ) ;" }, + { SocketConnect, "int connect( int sockfd, struct sockaddr *addr, socklen_t addrlen ) ;" }, + { SocketGetpeername, "int getpeername( int sockfd, struct sockaddr *addr, socklen_t *addrlen ) ;" }, + { SocketGetsockname, "int getsockname( int sockfd, struct sockaddr *addr, socklen_t *addrlen ) ;" }, + { SocketGetsockopt, "int getsockopt(int sockfd, int level, int optname, void *optval, socklen_t *optlen ) ;" }, + { SocketListen, "int listen( int sockfd, int backlog ) ; " }, + { SocketRecv, "ssize_t recv( int sockfd, void *buf, size_t len, int flags ) ;" }, + { SocketRecvfrom, "ssize_t recvfrom( int sockfd, void *buf, size_t len, int flags, struct sockaddr *src_addr, socklen_t *addrlen ) ;" }, +/* { SocketRead, "ssize_t read( int fd, void *buf, size_t count ) ;" }, DEFINI DANS cstdlib/unistd.c */ + { SocketSend, "ssize_t send( int sockfd, void *buf, size_t len, int flags ) ;" }, + { SocketSendto, "ssize_t sendto( int sockfd, void *buf, size_t len, int flags, struct sockaddr *dest_addr, socklen_t addrlen ) ;" }, + { SocketSetsockopt, "int setsockopt( int sockfd, int level, int optname, void *optval, socklen_t optlen ) ;" }, + { SocketShutdown, "int shutdown( int sockfd, int how ) ;" }, + { SocketSocket, "int socket( int domain, int type, int protocol ) ;" }, +/* {SocketWrite, "ssize_t write( int fd, void *buf, size_t count ) ;" }, DEFINI DANS cstdlib/unistd.c */ + { SocketHtonl, "uint32_t htonl( uint32_t hostlong ) ;" }, + { SocketHtons, "uint16_t htons( uint16_t hostshort ) ;" }, + { SocketNtohl, "uint32_t ntohl( uint32_t netlong ) ;" }, + { SocketNtohs, "uint16_t ntohs( uint16_t netshort ) ;" }, + { SocketGethostbyname, "struct hostent * gethostbyname( char *name ) ;" }, + { SocketGethostbyaddr, "struct hostent * gethostbyaddr( void *addr, socklen_t len, int type ) ;" }, + { NULL, NULL } +}; + +/* POUR INFORMATION +tcp_socket = socket(AF_INET, SOCK_STREAM, 0); +udp_socket = socket(AF_INET, SOCK_DGRAM, 0); +raw_socket = socket(AF_INET, SOCK_RAW, protocol); +*/ + +/* NON IMPLEMENTEE */ +/* +#include +int fcntl(int fd, int cmd, ... ) ; + +#include +int ioctl(int fd, unsigned long request, ...) ; + +ssize_t recvmsg(int sockfd, struct msghdr *msg, int flags); +ssize_t sendmsg(int sockfd, const struct msghdr *msg, int flags); + +int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout); +void FD_CLR(int fd, fd_set *set); +int FD_ISSET(int fd, fd_set *set); +void FD_SET(int fd, fd_set *set); +void FD_ZERO(fd_set *set); + +int socketpair( int domain, int type, int protocol, int sv[2] ) ; + +#include +struct protoent *getprotoent(void); +struct protoent *getprotobyname(const char *name); +struct protoent *getprotobynumber(int proto); +void setprotoent(int stayopen); +void endprotoent(void); + +{ SocketInet_addr, "unsigned long int inet_addr( char *cp ) ;" }, +{ SocketInet_aton, "int inet_aton( char *cp, struct in_addr *inp ) ;" }, +{ SocketInet_network, "unsigned long int inet_network( char *cp ) ;" }, +char *inet_ntoa (struct in_addr in); +struct in_addr inet_makeaddr (int net, int host); +unsigned long int inet_lnaof (struct in_addr in); +unsigned long int inet_netof (struct in_addr in); +*/ + +/* creates various system-dependent definitions */ +void SocketSetupFunc(Picoc *pc) +{ +#ifdef WIN32 + WSADATA WSAData; + if( WSAStartup( MAKEWORD( 2, 2 ), &WSAData ) ) { + fprintf( stderr, "unable to start winsock !\n" ) ; + } +#endif + + /* define definitions */ + +#ifdef WIN32 +VariableDefinePlatformVar(pc, NULL, "SD_RECEIVE", &pc->IntType, (union AnyValue *)&SD_RECEIVEValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "SD_SEND", &pc->IntType, (union AnyValue *)&SD_SENDValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "SD_BOTH", &pc->IntType, (union AnyValue *)&SD_BOTHValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "IOCPARM_MASK", &pc->IntType, (union AnyValue *)&IOCPARM_MASKValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "IOC_VOID", &pc->IntType, (union AnyValue *)&IOC_VOIDValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "IOC_OUT", &pc->IntType, (union AnyValue *)&IOC_OUTValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "IOC_IN", &pc->IntType, (union AnyValue *)&IOC_INValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "IPPROTO_GGP", &pc->IntType, (union AnyValue *)&IPPROTO_GGPValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "IPPROTO_ND", &pc->IntType, (union AnyValue *)&IPPROTO_NDValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "IMPLINK_IP", &pc->IntType, (union AnyValue *)&IMPLINK_IPValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "FD_READ", &pc->IntType, (union AnyValue *)&FD_READValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "FD_WRITE", &pc->IntType, (union AnyValue *)&FD_WRITEValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "FD_OOB", &pc->IntType, (union AnyValue *)&FD_OOBValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "FD_ACCEPT", &pc->IntType, (union AnyValue *)&FD_ACCEPTValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "FD_CONNECT", &pc->IntType, (union AnyValue *)&FD_CONNECTValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "FD_CLOSE", &pc->IntType, (union AnyValue *)&FD_CLOSEValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "MSG_MAXIOVLEN", &pc->IntType, (union AnyValue *)&MSG_MAXIOVLENValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "MSG_PARTIAL", &pc->IntType, (union AnyValue *)&MSG_PARTIALValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "MAXGETHOSTSTRUCT", &pc->IntType, (union AnyValue *)&MAXGETHOSTSTRUCTValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "WSABASEERR", &pc->IntType, (union AnyValue *)&WSABASEERRValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "WSANO_ADDRESS", &pc->IntType, (union AnyValue *)&WSANO_ADDRESSValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "PF_VOICEVIEW", &pc->IntType, (union AnyValue *)&PF_VOICEVIEWValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "PF_FIREFOX", &pc->IntType, (union AnyValue *)&PF_FIREFOXValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "PF_UNKNOWN1", &pc->IntType, (union AnyValue *)&PF_UNKNOWN1Value, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "PF_BAN", &pc->IntType, (union AnyValue *)&PF_BANValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "PF_ATM", &pc->IntType, (union AnyValue *)&PF_ATMValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "PF_LAT", &pc->IntType, (union AnyValue *)&PF_LATValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "PF_HYLINK", &pc->IntType, (union AnyValue *)&PF_HYLINKValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "PF_ISO", &pc->IntType, (union AnyValue *)&PF_ISOValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "PF_OSI", &pc->IntType, (union AnyValue *)&PF_OSIValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "PF_ECMA", &pc->IntType, (union AnyValue *)&PF_ECMAValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "PF_DATAKIT", &pc->IntType, (union AnyValue *)&PF_DATAKITValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "PF_CCITT", &pc->IntType, (union AnyValue *)&PF_CCITTValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "PF_DLI", &pc->IntType, (union AnyValue *)&PF_DLIValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "PF_PUP", &pc->IntType, (union AnyValue *)&PF_PUPValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "PF_CHAOS", &pc->IntType, (union AnyValue *)&PF_CHAOSValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "PF_NS", &pc->IntType, (union AnyValue *)&PF_NSValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "AF_DLI", &pc->IntType, (union AnyValue *)&AF_DLIValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "AF_LAT", &pc->IntType, (union AnyValue *)&AF_LATValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "AF_HYLINK", &pc->IntType, (union AnyValue *)&AF_HYLINKValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "AF_NETBIOS", &pc->IntType, (union AnyValue *)&AF_NETBIOSValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "AF_VOICEVIEW", &pc->IntType, (union AnyValue *)&AF_VOICEVIEWValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "AF_ATM", &pc->IntType, (union AnyValue *)&AF_ATMValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "PF_IMPLINK", &pc->IntType, (union AnyValue *)&PF_IMPLINKValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "AF_DATAKIT", &pc->IntType, (union AnyValue *)&AF_DATAKITValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "AF_CCITT", &pc->IntType, (union AnyValue *)&AF_CCITTValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "AF_IMPLINK", &pc->IntType, (union AnyValue *)&AF_IMPLINKValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "AF_PUP", &pc->IntType, (union AnyValue *)&AF_PUPValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "AF_CHAOS", &pc->IntType, (union AnyValue *)&AF_CHAOSValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "AF_NS", &pc->IntType, (union AnyValue *)&AF_NSValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "AF_ISO", &pc->IntType, (union AnyValue *)&AF_ISOValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "AF_OSI", &pc->IntType, (union AnyValue *)&AF_OSIValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "AF_ECMA", &pc->IntType, (union AnyValue *)&AF_ECMAValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "IMPLINK_LOWEXPER", &pc->IntType, (union AnyValue *)&IMPLINK_LOWEXPERValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "IMPLINK_HIGHEXPER", &pc->IntType, (union AnyValue *)&IMPLINK_HIGHEXPERValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "WSADESCRIPTION_LEN", &pc->IntType, (union AnyValue *)&WSADESCRIPTION_LENValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "WSASYS_STATUS_LEN", &pc->IntType, (union AnyValue *)&WSASYS_STATUS_LENValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "SO_USELOOPBACK", &pc->IntType, (union AnyValue *)&SO_USELOOPBACKValue,FALSE) ; +#endif +#ifndef AIX_HOST +VariableDefinePlatformVar(pc, NULL, "IPPORT_DISCARD", &pc->IntType, (union AnyValue *)&IPPORT_DISCARDValue,FALSE) ; +VariableDefinePlatformVar(pc, NULL, "IPPORT_SYSTAT", &pc->IntType, (union AnyValue *)&IPPORT_SYSTATValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "IPPORT_DAYTIME", &pc->IntType, (union AnyValue *)&IPPORT_DAYTIMEValue,FALSE) ; +VariableDefinePlatformVar(pc, NULL, "IPPORT_NETSTAT", &pc->IntType, (union AnyValue *)&IPPORT_NETSTATValue,FALSE) ; +VariableDefinePlatformVar(pc, NULL, "IPPORT_FTP", &pc->IntType, (union AnyValue *)&IPPORT_FTPValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "IPPORT_TELNET", &pc->IntType, (union AnyValue *)&IPPORT_TELNETValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "IPPORT_SMTP", &pc->IntType, (union AnyValue *)&IPPORT_SMTPValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "IPPORT_NAMESERVER", &pc->IntType, (union AnyValue *)&IPPORT_NAMESERVERValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "IPPORT_WHOIS", &pc->IntType, (union AnyValue *)&IPPORT_WHOISValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "IPPORT_MTP", &pc->IntType, (union AnyValue *)&IPPORT_MTPValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "IPPORT_TFTP", &pc->IntType, (union AnyValue *)&IPPORT_TFTPValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "IPPORT_RJE", &pc->IntType, (union AnyValue *)&IPPORT_RJEValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "IPPORT_FINGER", &pc->IntType, (union AnyValue *)&IPPORT_FINGERValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "IPPORT_TTYLINK", &pc->IntType, (union AnyValue *)&IPPORT_TTYLINKValue,FALSE) ; +VariableDefinePlatformVar(pc, NULL, "IPPORT_SUPDUP", &pc->IntType, (union AnyValue *)&IPPORT_SUPDUPValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "IPPORT_EXECSERVER", &pc->IntType, (union AnyValue *)&IPPORT_EXECSERVERValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "IPPORT_LOGINSERVER", &pc->IntType, (union AnyValue *)&IPPORT_LOGINSERVERValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "IPPORT_CMDSERVER", &pc->IntType, (union AnyValue *)&IPPORT_CMDSERVERValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "IPPORT_EFSSERVER", &pc->IntType, (union AnyValue *)&IPPORT_EFSSERVERValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "IPPORT_BIFFUDP", &pc->IntType, (union AnyValue *)&IPPORT_BIFFUDPValue,FALSE) ; +VariableDefinePlatformVar(pc, NULL, "IPPORT_WHOSERVER", &pc->IntType, (union AnyValue *)&IPPORT_WHOSERVERValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "IPPORT_ECHO", &pc->IntType, (union AnyValue *)&IPPORT_ECHOValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "IPPORT_ROUTESERVER", &pc->IntType, (union AnyValue *)&IPPORT_ROUTESERVERValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "IP_MAX_MEMBERSHIPS", &pc->IntType, (union AnyValue *)&IP_MAX_MEMBERSHIPSValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "AF_IPX", &pc->IntType, (union AnyValue *)&AF_IPXValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "PF_IPX", &pc->IntType, (union AnyValue *)&PF_IPXValue, FALSE) ; +#endif +VariableDefinePlatformVar(pc, NULL, "FD_SETSIZE", &pc->IntType, (union AnyValue *)&FD_SETSIZEValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "IPPROTO_IP", &pc->IntType, (union AnyValue *)&IPPROTO_IPValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "IPPROTO_ICMP", &pc->IntType, (union AnyValue *)&IPPROTO_ICMPValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "IPPROTO_IGMP", &pc->IntType, (union AnyValue *)&IPPROTO_IGMPValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "IPPROTO_TCP", &pc->IntType, (union AnyValue *)&IPPROTO_TCPValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "IPPROTO_PUP", &pc->IntType, (union AnyValue *)&IPPROTO_PUPValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "IPPROTO_UDP", &pc->IntType, (union AnyValue *)&IPPROTO_UDPValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "IPPROTO_IDP", &pc->IntType, (union AnyValue *)&IPPROTO_IDPValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "IPPROTO_RAW", &pc->IntType, (union AnyValue *)&IPPROTO_RAWValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "IPPROTO_MAX", &pc->IntType, (union AnyValue *)&IPPROTO_MAXValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "IPPORT_TIMESERVER", &pc->IntType, (union AnyValue *)&IPPORT_TIMESERVERValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "IPPORT_RESERVED", &pc->IntType, (union AnyValue *)&IPPORT_RESERVEDValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "IN_CLASSA_NET", &pc->IntType, (union AnyValue *)&IN_CLASSA_NETValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "IN_CLASSA_NSHIFT", &pc->IntType, (union AnyValue *)&IN_CLASSA_NSHIFTValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "IN_CLASSA_HOST", &pc->IntType, (union AnyValue *)&IN_CLASSA_HOSTValue,FALSE) ; +VariableDefinePlatformVar(pc, NULL, "IN_CLASSA_MAX", &pc->IntType, (union AnyValue *)&IN_CLASSA_MAXValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "IN_CLASSB_NET", &pc->IntType, (union AnyValue *)&IN_CLASSB_NETValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "IN_CLASSB_NSHIFT", &pc->IntType, (union AnyValue *)&IN_CLASSB_NSHIFTValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "IN_CLASSB_HOST", &pc->IntType, (union AnyValue *)&IN_CLASSB_HOSTValue,FALSE) ; +VariableDefinePlatformVar(pc, NULL, "IN_CLASSB_MAX", &pc->IntType, (union AnyValue *)&IN_CLASSB_MAXValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "IN_CLASSC_NET", &pc->IntType, (union AnyValue *)&IN_CLASSC_NETValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "IN_CLASSC_NSHIFT", &pc->IntType, (union AnyValue *)&IN_CLASSC_NSHIFTValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "IN_CLASSC_HOST", &pc->IntType, (union AnyValue *)&IN_CLASSC_HOSTValue,FALSE) ; +VariableDefinePlatformVar(pc, NULL, "INADDR_ANY", &pc->IntType, (union AnyValue *)&INADDR_ANYValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "INADDR_LOOPBACK", &pc->IntType, (union AnyValue *)&INADDR_LOOPBACKValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "INADDR_NONE", &pc->IntType, (union AnyValue *)&INADDR_NONEValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "IP_OPTIONS", &pc->IntType, (union AnyValue *)&IP_OPTIONSValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "SO_DEBUG", &pc->IntType, (union AnyValue *)&SO_DEBUGValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "SO_ACCEPTCONN", &pc->IntType, (union AnyValue *)&SO_ACCEPTCONNValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "SO_REUSEADDR", &pc->IntType, (union AnyValue *)&SO_REUSEADDRValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "SO_KEEPALIVE", &pc->IntType, (union AnyValue *)&SO_KEEPALIVEValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "SO_DONTROUTE", &pc->IntType, (union AnyValue *)&SO_DONTROUTEValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "SO_BROADCAST", &pc->IntType, (union AnyValue *)&SO_BROADCASTValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "SO_LINGER", &pc->IntType, (union AnyValue *)&SO_LINGERValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "SO_OOBINLINE", &pc->IntType, (union AnyValue *)&SO_OOBINLINEValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "SO_SNDBUF", &pc->IntType, (union AnyValue *)&SO_SNDBUFValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "SO_RCVBUF", &pc->IntType, (union AnyValue *)&SO_RCVBUFValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "SO_SNDLOWAT", &pc->IntType, (union AnyValue *)&SO_SNDLOWATValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "SO_RCVLOWAT", &pc->IntType, (union AnyValue *)&SO_RCVLOWATValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "SO_SNDTIMEO", &pc->IntType, (union AnyValue *)&SO_SNDTIMEOValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "SO_RCVTIMEO", &pc->IntType, (union AnyValue *)&SO_RCVTIMEOValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "SO_ERROR", &pc->IntType, (union AnyValue *)&SO_ERRORValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "SO_TYPE", &pc->IntType, (union AnyValue *)&SO_TYPEValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "IP_MULTICAST_IF", &pc->IntType, (union AnyValue *)&IP_MULTICAST_IFValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "IP_MULTICAST_TTL", &pc->IntType, (union AnyValue *)&IP_MULTICAST_TTLValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "IP_MULTICAST_LOOP", &pc->IntType, (union AnyValue *)&IP_MULTICAST_LOOPValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "IP_ADD_MEMBERSHIP", &pc->IntType, (union AnyValue *)&IP_ADD_MEMBERSHIPValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "IP_DROP_MEMBERSHIP", &pc->IntType, (union AnyValue *)&IP_DROP_MEMBERSHIPValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "IP_DEFAULT_MULTICAST_TTL", &pc->IntType, (union AnyValue *)&IP_DEFAULT_MULTICAST_TTLValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "IP_DEFAULT_MULTICAST_LOOP", &pc->IntType, (union AnyValue *)&IP_DEFAULT_MULTICAST_LOOPValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "SOCK_STREAM", &pc->IntType, (union AnyValue *)&SOCK_STREAMValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "SOCK_DGRAM", &pc->IntType, (union AnyValue *)&SOCK_DGRAMValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "SOCK_RAW", &pc->IntType, (union AnyValue *)&SOCK_RAWValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "SOCK_RDM", &pc->IntType, (union AnyValue *)&SOCK_RDMValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "SOCK_SEQPACKET", &pc->IntType, (union AnyValue *)&SOCK_SEQPACKETValue,FALSE) ; +VariableDefinePlatformVar(pc, NULL, "TCP_NODELAY", &pc->IntType, (union AnyValue *)&TCP_NODELAYValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "AF_UNSPEC", &pc->IntType, (union AnyValue *)&AF_UNSPECValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "AF_UNIX", &pc->IntType, (union AnyValue *)&AF_UNIXValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "AF_INET", &pc->IntType, (union AnyValue *)&AF_INETValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "AF_SNA", &pc->IntType, (union AnyValue *)&AF_SNAValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "AF_DECnet", &pc->IntType, (union AnyValue *)&AF_DECnetValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "AF_APPLETALK", &pc->IntType, (union AnyValue *)&AF_APPLETALKValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "AF_INET6", &pc->IntType, (union AnyValue *)&AF_INET6Value, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "AF_MAX", &pc->IntType, (union AnyValue *)&AF_MAXValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "PF_UNSPEC", &pc->IntType, (union AnyValue *)&PF_UNSPECValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "PF_UNIX", &pc->IntType, (union AnyValue *)&PF_UNIXValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "PF_INET", &pc->IntType, (union AnyValue *)&PF_INETValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "PF_SNA", &pc->IntType, (union AnyValue *)&PF_SNAValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "PF_DECnet", &pc->IntType, (union AnyValue *)&PF_DECnetValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "PF_APPLETALK", &pc->IntType, (union AnyValue *)&PF_APPLETALKValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "PF_INET6", &pc->IntType, (union AnyValue *)&PF_INET6Value, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "PF_MAX", &pc->IntType, (union AnyValue *)&PF_MAXValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "SOL_SOCKET", &pc->IntType, (union AnyValue *)&SOL_SOCKETValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "SOMAXCONN", &pc->IntType, (union AnyValue *)&SOMAXCONNValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "MSG_OOB", &pc->IntType, (union AnyValue *)&MSG_OOBValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "MSG_PEEK", &pc->IntType, (union AnyValue *)&MSG_PEEKValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "MSG_DONTROUTE", &pc->IntType, (union AnyValue *)&MSG_DONTROUTEValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "HOST_NOT_FOUND", &pc->IntType, (union AnyValue *)&HOST_NOT_FOUNDValue,FALSE) ; +VariableDefinePlatformVar(pc, NULL, "TRY_AGAIN", &pc->IntType, (union AnyValue *)&TRY_AGAINValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "NO_RECOVERY", &pc->IntType, (union AnyValue *)&NO_RECOVERYValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "NO_DATA", &pc->IntType, (union AnyValue *)&NO_DATAValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "NO_ADDRESS", &pc->IntType, (union AnyValue *)&NO_ADDRESSValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "SHUT_RD", &pc->IntType, (union AnyValue *)&SHUT_RDValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "SHUT_WR", &pc->IntType, (union AnyValue *)&SHUT_WRValue, FALSE) ; +VariableDefinePlatformVar(pc, NULL, "SHUT_RDWR", &pc->IntType, (union AnyValue *)&SHUT_RDWRValue, FALSE) ; +} diff --git a/src/cstdlib2/socket.o b/src/cstdlib2/socket.o new file mode 100644 index 0000000..a9c866e Binary files /dev/null and b/src/cstdlib2/socket.o differ diff --git a/src/cstdlib2/stat.c b/src/cstdlib2/stat.c new file mode 100644 index 0000000..fa6619c --- /dev/null +++ b/src/cstdlib2/stat.c @@ -0,0 +1,132 @@ +/* stat.h library for large systems - small embedded systems use clibrary.c instead */ +#include +#include +#include "../interpreter.h" + +/* Equivalent des #define NAME VALUE */ +static int S_IFIFOValue = S_IFIFO ; +static int S_IFCHRValue = S_IFCHR ; +static int S_IFBLKValue = S_IFBLK ; +static int S_IFDIRValue = S_IFDIR ; +static int S_IFREGValue = S_IFREG ; +static int S_IFMTValue = S_IFMT ; +static int S_IEXECValue = S_IEXEC ; +static int S_IWRITEValue = S_IWRITE ; +static int S_IREADValue = S_IREAD ; +static int S_IRWXUValue = S_IRWXU ; +static int S_IXUSRValue = S_IXUSR ; +static int S_IWUSRValue = S_IWUSR ; +static int S_IRUSRValue = S_IRUSR ; + + +/* define definition */ +const char StatDefine [] ="\ +#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)\n\ +#define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)\n\ +#define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)\n\ +#define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)\n\ +#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)\n\ +"; + +/* handy structure definitions */ +typedef struct StatStructDef { + unsigned int st_dev ; + unsigned int st_ino ; + unsigned int st_mode ; + short st_nlink ; + short st_uid ; + short st_gid ; + unsigned int st_rdev ; + long st_size ; + int st_atime_h ; + int st_mtime_h ; + int st_ctime_h ; +} StatStruct ; + +#ifdef WIN32 +const char StatDefs[] = "\ +struct stat \ +{\n\ + dev_t st_dev;\n\ + ino_t st_ino;\n\ + mode_t st_mode;\n\ + short st_nlink;\n\ + short st_uid;\n\ + short st_gid;\n\ + dev_t st_rdev;\n\ + off_t st_size;\n\ + time_t st_atime;\n\ + time_t st_mtime;\n\ + time_t st_ctime;\n\ +} ;\n\ +"; +#else +const char StatDefs[] = "\ +struct timespec { long tv_sec ; long tv_nsec ; } ;\n\ +struct stat { unsigned int st_dev; unsigned int st_ino; int st_mode; short st_nlink; short st_uid; short st_gid; unsigned int st_rdev; long st_size; int st_atime; int st_mtime; int st_ctime; } ;\n\ +"; + +#endif +/* stat calls */ +void StatStat(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { +#ifdef WIN32 + ReturnValue->Val->Integer = stat( Param[0]->Val->Pointer, Param[1]->Val->Pointer ) ; +#else + struct stat st ; + StatStruct * s ; + int ret ; + ret = stat( Param[0]->Val->Pointer, &st ) ; + s = (StatStruct *)Param[1]->Val->Pointer ; + s->st_dev = (unsigned int)st.st_dev ; + s->st_ino = (unsigned int)st.st_ino ; + s->st_mode = st.st_mode ; + s->st_nlink = st.st_nlink ; + s->st_uid = st.st_uid ; + s->st_gid = st.st_gid ; + s->st_rdev = st.st_rdev ; + s->st_size = st.st_size ; + s->st_atime_h = st.st_atim.tv_sec ; + s->st_mtime_h = st.st_mtim.tv_sec ; + s->st_ctime_h = st.st_ctim.tv_sec ; + ReturnValue->Val->Integer = ret ; +#endif +} +void StatFstat(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = fstat( Param[0]->Val->Integer, Param[1]->Val->Pointer ) ; +} + +/* all stat functions */ +struct LibraryFunction StatFunctions[] = +{ + { StatStat, "int stat( char *file_name, struct stat *buf ) ;" }, + { StatFstat, "int fstat( int filedes, struct stat *buf ) ;" }, + { NULL, NULL } +}; + +/* creates various system-dependent definitions */ +void PicocParse(const char *FileName, const char *Source, int SourceLen, int RunIt, int CleanupNow, int CleanupSource, int EnableDebugger) ; +void StatSetupFunc(Picoc *pc) +{ + /* make a "struct tm" which is the same size as a native tm structure */ +/* +#ifndef WIN32 + TypeCreateOpaqueStruct(NULL, TableStrRegister("stat"), sizeof(struct stat)); +#endif +*/ + /* define definitions */ + VariableDefinePlatformVar(pc, NULL, "S_IFIFO", &pc->IntType, (union AnyValue *)&S_IFIFOValue, FALSE); + VariableDefinePlatformVar(pc, NULL, "S_IFCHR", &pc->IntType, (union AnyValue *)&S_IFCHRValue, FALSE); + VariableDefinePlatformVar(pc, NULL, "S_IFBLK", &pc->IntType, (union AnyValue *)&S_IFBLKValue, FALSE); + VariableDefinePlatformVar(pc, NULL, "S_IFDIR", &pc->IntType, (union AnyValue *)&S_IFDIRValue, FALSE); + VariableDefinePlatformVar(pc, NULL, "S_IFREG", &pc->IntType, (union AnyValue *)&S_IFREGValue, FALSE); + VariableDefinePlatformVar(pc, NULL, "S_IFMT", &pc->IntType, (union AnyValue *)&S_IFMTValue, FALSE); + VariableDefinePlatformVar(pc, NULL, "S_IEXEC", &pc->IntType, (union AnyValue *)&S_IEXECValue, FALSE); + VariableDefinePlatformVar(pc, NULL, "S_IWRITE", &pc->IntType, (union AnyValue *)&S_IWRITEValue, FALSE); + VariableDefinePlatformVar(pc, NULL, "S_IREAD", &pc->IntType, (union AnyValue *)&S_IREADValue, FALSE); + VariableDefinePlatformVar(pc, NULL, "S_IRWXU", &pc->IntType, (union AnyValue *)&S_IRWXUValue, FALSE); + VariableDefinePlatformVar(pc, NULL, "S_IXUSR", &pc->IntType, (union AnyValue *)&S_IXUSRValue, FALSE); + VariableDefinePlatformVar(pc, NULL, "S_IWUSR", &pc->IntType, (union AnyValue *)&S_IWUSRValue, FALSE); + VariableDefinePlatformVar(pc, NULL, "S_IRUSR", &pc->IntType, (union AnyValue *)&S_IRUSRValue, FALSE); + + //PicocParse("stat.h", StatDefine, strlen(StatDefine), TRUE, TRUE, FALSE, FALSE); +} diff --git a/src/cstdlib2/stat.o b/src/cstdlib2/stat.o new file mode 100644 index 0000000..d655264 Binary files /dev/null and b/src/cstdlib2/stat.o differ diff --git a/src/cstdlib2/tests/bcrypt.pcc b/src/cstdlib2/tests/bcrypt.pcc new file mode 100644 index 0000000..d74efd1 --- /dev/null +++ b/src/cstdlib2/tests/bcrypt.pcc @@ -0,0 +1,11 @@ +char b[256], c[256], d[256] ; +int nb; + +strcpy(b,"Ceci est un test !") ; + +bcrypt_init(time(0)); +nb = bcrypt_string_printable( b, c, strlen(b), "123456", 80 ) ; +printf( "nb=%d, str=%s\n", nb, c); + +buncrypt_string_printable( c, d, nb, "123456" ) ; +printf( "str=%s\n",d ); diff --git a/src/cstdlib2/tests/dirent.pcc b/src/cstdlib2/tests/dirent.pcc new file mode 100644 index 0000000..143db77 --- /dev/null +++ b/src/cstdlib2/tests/dirent.pcc @@ -0,0 +1,7 @@ +// +// Test de cstdlib2/dirent.c +// +void printdir( char * directory ) { DIR * dir ; struct dirent * de ; if( (dir=opendir( directory )) != NULL ) { while( (de=readdir(dir)) != NULL ) { char * name = dirent_getname( de ) ; if( strcmp(name,".")&&strcmp(name,"..") ) { printf("%s\n",name); } } closedir(dir); + } +} +printdir("."); diff --git a/src/cstdlib2/tests/dll.pcc b/src/cstdlib2/tests/dll.pcc new file mode 100644 index 0000000..9263bd5 --- /dev/null +++ b/src/cstdlib2/tests/dll.pcc @@ -0,0 +1,5 @@ +struct { char * st ; } st_s; +char st[256]; +strcpy( st, "Ceci est un test\n" ); +st_s.st=st; +rundll("cstdlib2/testdll.dll","myputs_h",&st_s); diff --git a/src/cstdlib2/tests/f1.pcc b/src/cstdlib2/tests/f1.pcc new file mode 100644 index 0000000..e0f462e --- /dev/null +++ b/src/cstdlib2/tests/f1.pcc @@ -0,0 +1,6 @@ +void printmessage( char * msg ) { + printf( "%s\n", msg ) ; +} +void f2() { + printf( "in f2\n" ) ; +} diff --git a/src/cstdlib2/tests/fork.pcc b/src/cstdlib2/tests/fork.pcc new file mode 100644 index 0000000..eb508c5 --- /dev/null +++ b/src/cstdlib2/tests/fork.pcc @@ -0,0 +1,26 @@ +#include +#include +#include +void main(void) { + int pid; /* PID du processus fils */ + int i; + + pid = fork(); + switch (pid) { + case -1: + printf("Erreur: echec du fork()\n"); + exit(1); + break; + case 0: + /* PROCESSUS FILS */ + printf("Processus fils : pid = %d\n", getpid() ); + sleep(1); + exit(0); /* fin du processus fils */ + break; + default: + /* PROCESSUS PERE */ + printf("Ici le pere: le fils a un pid=%d\n", pid ); + wait(0); /* attente de la fin du fils */ + printf("Fin du pere.\n"); + } +} diff --git a/src/cstdlib2/tests/hello.pcc b/src/cstdlib2/tests/hello.pcc new file mode 100644 index 0000000..6e70bdc --- /dev/null +++ b/src/cstdlib2/tests/hello.pcc @@ -0,0 +1,3 @@ +#include +#include +printf( "Hello world !\n"); diff --git a/src/cstdlib2/tests/include.pcc b/src/cstdlib2/tests/include.pcc new file mode 100644 index 0000000..e2e1549 --- /dev/null +++ b/src/cstdlib2/tests/include.pcc @@ -0,0 +1,8 @@ +/* Affiche le repertoire courant */ +char c[256] ; +getcwd(c, 256); +printf("%s\n",c); + +INCLUDE( "f1.pcc" ); +printmessage( "Hello world !!\n" ); +f2(); diff --git a/src/cstdlib2/tests/main.pcc b/src/cstdlib2/tests/main.pcc new file mode 100644 index 0000000..0a34511 --- /dev/null +++ b/src/cstdlib2/tests/main.pcc @@ -0,0 +1,11 @@ +/* pcc -m main.pcc - 1 2 3 ; echo $? */ +int main( int argc, char ** argv ) { + int ret = 0, i ; + + printf("argc=%d\n",argc); + for( i=0 ; istrlen(res) ) { + for( i=strlen(res) ; itm_year+1900 ) ; + +// +// Test de cstdlib2/stat.c +// +struct stat sst ; stat("README", &sst ) ; printf("%ld\n", sst.st_size ) ; printf("%ld\n", sst.st_mtime ) ; + +// +// Test de l'encodage base64 +// +char buf[1024]; +base64_encode( "toto", buf, 4 ) ; +printf( "%s\n", buf) ; +base64_decode( buf ); +printf( "%s\n", buf) ; + +// +// Test de la fonction printhelp +// +printhelp("various.h"); + + +// +// Test des fonctions MD5 +// +MD5Cal("Ceci est la chaîne à évaluer", buf); +printf("md5=%s\n",buf); +MD5CalFile("Makefile",buf); +printf("md5=%s\n",buf); + +// +// Test des fonctions Windows +// +MsgBox( "Titre","Ceci est un message" ) ; + +E; diff --git a/src/cstdlib2/tools.c b/src/cstdlib2/tools.c new file mode 100644 index 0000000..866e4b3 --- /dev/null +++ b/src/cstdlib2/tools.c @@ -0,0 +1,1756 @@ +/* TOOLS C/C++ + Copyright (C) 1999, 2000, 2001 Leonard Nero + Contributed by Lenny + e-mail lenny.nero@zdnetonebox.com + +This file is part of GNU CC. +*/ + +#include "tools.h" + + +#ifdef DEBUG_MODE +#include "../leaktracker.h" +#endif + + +/* Numero de version de la librairie */ +const char __tools_version_header[20] = "1.23 05/02/2008" ; +const char __tools_version_body[20] = "1.38 24/02/2000" ; + +void printversion_tools(void) { + printf( "Version librairie TOOLS\nheader : %s\nbody : %s\n", __tools_version_header, __tools_version_body ) ; + } + + +/* Partie specifique Windows */ +#ifdef WIN32 +int WINAPI +dll_init_tools(HANDLE h, DWORD reason, void *foo) +{ + return 1; +} +#endif + +int mprintf( const char * ch ) +{ char * s; + size_t i; + /*set_new_handler(0);s=new char[strlen(ch)+1];*/ + if( ( s = (char *) malloc( strlen( ch ) + 1 ) ) == NULL ) return 1; + strcpy(s,ch); + for(i=0;i='A') && (c<='Z')) return c; + if((c>='a') && (c<='z')) {c=toupper(c);return c;} + + if((c=='') || (c=='') || (c=='') || (c=='')) c='E'; + if((c==-118) || (c==-126) || (c==-120) || (c==-119)) c='E'; + + if((c=='') || (c=='') || (c=='') || (c=='') || (c=='')) c='A'; + if((c==-123) || (c==-96) || (c==-125) || (c==-124) || (c==-122)) c='A'; + + if((c=='') || (c=='') || (c=='') || (c=='')) c='U'; + if((c==-105) || (c==-93) || (c==-106) || (c==-127)) c='U'; + + if((c=='') || (c=='') || (c=='') || (c=='')) c='I'; + if((c==-115) || (c==-95) || (c==-116) || (c==-117)) c='I'; + + if((c=='') || (c=='') || (c=='') || (c=='')) c='O'; + if((c==-107) || (c==-94) || (c==-109) || (c==-108)) c='O'; + + if(c=='') c='Y'; + if(c==-104) c='Y'; + + if(c=='') c='C'; + if(c==-121) c='C'; + + if(c=='') c='N'; + if(c==-92) c='N'; + return c ; + } + +/* Fonction permettant de passer une chaine de caracteres en majuscules */ +#ifdef CPPLUS +int majuscule(char ch[]) +{ size_t i; + if(ch==NULL) return -1; + for(i=0;i 1 ) { + p += strlen( ch1 ) - 1 ; + while( ( ( res = (char*) strstr( p, ch2 ) ) == NULL ) && ( p != ch1 ) ) + { p-- ; } + } + else { if( strcmp( ch1, ch2 ) ) p = NULL ; } + return p ; + } + +/* Fonction permettant de concatener un caractere a la fin d'une chaine de caracteres */ +char * strcatc( char * st , const char c ) { + char cc[2] ; + cc[0] = c ; cc[1] = '\0' ; + strcat( st, cc ) ; + return st ; + } + +/* Fonction permettant de concatener la premire chane au dbut de la seconde */ +char * strbcat( const char * st, char * buf ) { + char * st1 ; + st1 = (char*) malloc( strlen( st ) + strlen( buf ) + 1 ) ; + if( st1 == NULL ) return NULL ; + strcpy( st1, st ) ; + strcat( st1, buf ) ; + strcpy( buf, st1 ) ; + free( st1 ) ; + return buf ; + } + +/* Fonction permettant de construire une chaine de caracteres par repetition d'une autre chaine */ +LINKDLL int strrepeat( char * st, const char * init, const unsigned int n ) { + unsigned int i ; + if( ( st==NULL ) || ( init==NULL ) ) return 0 ; + st[0] = '\0' ; + if( ( n > 0 ) && ( strlen(init) > 0 ) ) + for( i=0 ; i 0 ) && ( i > 0 ) && ( i <= len ) ) { + s = (char *) malloc( j + 1 ) ; + if( s == NULL ) return NULL ; + for( k = 0 ; k < j ; k++ ) { + if( ( i + k - 1 ) < len ) s[k] = st[i+k-1] ; + else s[k] = '\0' ; + } + s[j] = '\0' ; + return s ; + } + else return NULL ; + } + +/* Fonction permettant de copier des carateres d'une chaine dans une autre + s: chaine en sortie + st: chaine initiale + i: position de dpart + j: nombre de caracteres a copier */ +int copy( char * s, const char * st, const int i, const int j ) { + int k, len = strlen( st ) ; + if( ( s == NULL ) || ( st == NULL ) ) return -1 ; + if( ( j > 0 ) && ( i > 0 ) && ( i <= len ) ) { + for( k = 0 ; k < j ; k++ ) { + if( ( i + k - 1 ) < len ) s[k] = st[i+k-1] ; + else s[k] = '\0' ; + } + s[j] = '\0' ; + return 0 ; + } + else return -2 ; + } + +/* Fonction permettant de retrouver la position d'une chaine dans une autre chaine */ +int pos( const char * c, const char * ch ) { + char * c1 , * ch1 , * cc ; + int res ; + if( ( ch == NULL ) || ( c == NULL ) ) return -1 ; + if( ( c1 = (char *) malloc( strlen( c ) + 1 ) ) == NULL ) return -2 ; + if( ( ch1 = (char *) malloc( strlen( ch ) + 1 ) ) == NULL ) { free( c1 ) ; return -3 ; } + strcpy( c1, c ) ; strcpy( ch1, ch ) ; + cc = (char *) strstr( ch1, c1 ) ; + if( cc == NULL ) res = 0 ; + else res = (int) ( cc - ch1 ) + 1 ; + if( (size_t) res > strlen( ch ) ) res = 0 ; + free( ch1 ) ; + free( c1 ) ; + return res ; + } + +/* Fonction permettant de retrouver la position d'un caractere dans une chaine */ +int posc( const char c, const char * ch ) { + char * ch1 , * cc ; + int res ; + if( ch == NULL ) return -1 ; + if( ( ch1 = (char *) malloc( strlen( ch ) + 1 ) ) == NULL ) return -2 ; + strcpy( ch1, ch ) ; + cc = (char *) strchr( ch1, c ) ; + if( cc == NULL ) res = 0 ; + else res = (int) ( cc - ch1 ) + 1 ; + if( (size_t) res > strlen( ch ) ) res = 0 ; + free( ch1 ) ; + return res ; + } + +/* Fonction permettant de retrouver la position d'une chane de caracteres dans une chaine a partir d'une position donnee */ +int posi( const char * c, const char * ch, const int ipos ) { + int res ; + if( ( c == NULL ) || ( ch == NULL ) ) return -1 ; + if( ( ipos <= 0 ) || ( (size_t) ipos > strlen( ch ) ) ) return 0 ; + res = pos( c, ch + ( ipos - 1 ) ) ; + if( res > 0 ) return res + ( ipos -1 ) ; + else return 0 ; + } + +/* Fonction permettant de retrouver la position d'un caractere dans une chaine a partir d'une position donnee */ +int posic( const char c, const char * ch, const int ipos ) { + int res ; + if( ch == NULL ) return -1 ; + if( ( ipos <= 0 ) || ( (size_t) ipos > strlen( ch ) ) ) return 0 ; + res = posc( c, ch + ( ipos - 1 ) ) ; + if( res > 0 ) return res + ( ipos - 1 ) ; + else return 0 ; + } + +/* Fonction permettant de retrouver la position d'une chaine dans une autre en partant de la fin */ +int posn( const char * c, const char * ch ) { + char * c1 , * ch1 ; + char * cc, * s ; + int res = 0 ; + if( ( ch == NULL ) || ( c == NULL ) ) return -1 ; + if( ( c1 = (char *) malloc( strlen( c ) + 1 ) ) == NULL ) return -2 ; + if( ( ch1 = (char *) malloc( strlen( ch ) + 1 ) ) == NULL ) { free( c1 ) ; return -3 ; } + strcpy( c1, c ) ; strcpy( ch1, ch ) ; + s = &( ch1[ strlen( ch1 ) ] ) ; + while( ( s >= ch1 ) && ( res == 0 ) ) { + cc = (char *) strstr( s, c1 ) ; + if( cc != NULL ) res = (int)( cc - ch1 ) + 1 ; + s-- ; + } + if( (size_t) res > strlen( ch ) ) res = 0 ; + free( ch1 ) ; + free( c1 ) ; + return res ; + } + +/* Fonction permettant de retrouver la position d'un caractere dans une chaine en partant de la fin */ +int posnc( const char c, const char * ch ) { + char * ch1, * cc ; + int res ; + if( ch == NULL ) return -1 ; + if( ( ch1 = (char *) malloc( strlen( ch ) + 1 ) ) == NULL ) return -2 ; + strcpy( ch1, ch ) ; + cc = (char *) strrchr( ch1, c ) ; + if( cc == NULL ) res = 0 ; + else res = (int) ( cc - ch1 ) + 1 ; + if( (size_t) res > strlen( ch ) ) res = 0 ; + free( ch1 ) ; + return res ; + } + +/* Fonction permettant de retrouver la position d'une chaine dans une autre sans regarder la casse */ +int mpos( const char * c, const char * ch ) { + int res = 0 ; + char * c1, * c2 ; + if( ( c == NULL ) || ( ch == NULL ) ) return -1 ; + if( ( strlen( c ) == 0 ) || ( strlen( ch ) == 0 ) ) return 0 ; + if( ( c1 = (char *) malloc( strlen( c ) + 1 ) ) == NULL ) return -2 ; + if( ( c2 = (char *) malloc( strlen( ch ) + 1 ) ) == NULL ) { free( c1 ) ; return -3 ; } + strcpy( c1, c ) ; strcpy( c2, ch ) ; + majuscule( (signed char*) c1 ) ; majuscule( (signed char*) c2 ) ; + res = pos( c1, c2 ) ; + if( (size_t) res > strlen( ch ) ) res = 0 ; + free( c2 ) ; + free( c1 ) ; + return res ; + } + +/* Procdure permettant de tester l'infriorit de deux chanes de caractres */ +int strinf( const char * a, const char * b ) { + int lena ; + int lenb ; + int lenmin, i ; + int test ; + + if( a == NULL ) return 1 ; + if( b == NULL ) return 0 ; + if( strlen( a ) == 0 ) return 1 ; + if( strlen( b ) == 0 ) return 0 ; + + lena = strlen( a ) ; + lenb = strlen( b ) ; + + if( lena < lenb ) lenmin = lena ; else lenmin = lenb ; + + test = 1 ; + i = 0 ; + while( i < lenmin ) { + if( a[i] > b[i] ) { test = 0 ; i = lenmin + 1 ; } + if( a[i] < b[i] ) { break ; } + i++ ; + } + + if( (test == true) && ( i == lenmin ) ) { + if( lena > lenb ) test = 0 ; + } + + return test ; + } + +char * delnew( const char * ch, const int i, const int j ) { + char * ch1, * ch2 ; + int ii ; + if( ch == NULL ) return NULL ; + if( ( ch1 = (char *) malloc( strlen( ch ) + 1 ) ) == NULL ) return NULL ; + strcpy( ch1, ch ) ; + ii = del( ch1, i, j ) ; + if( ii < 0 ) { free( ch1 ) ; return NULL ; } + if( ( ch2 = (char *) malloc( strlen( ch1 ) + 1 ) ) == NULL ) { free( ch1 ) ; return NULL ; } + strcpy( ch2, ch1 ) ; + free(ch1) ; + return ch2 ; + } + +/* Fonction permettant de supprimer une partie d'une chaine de caracteres */ +int del( char * ch, const int start, const int length ) { + int k, len = strlen( ch ) ; + if( ch == NULL ) return -1 ; + if( ( start == 1 ) && ( length >= len ) ) { ch[0] = '\0' ; len = 0 ; } + if( ( start > 0 ) && ( start <= len ) && ( length > 0 ) ) { + for( k = start - 1 ; k < ( len - length ) ; k++ ) { + if( k < ( len - length ) ) ch[k] = ch[ k + length ] ; + else ch = '\0' ; + } + k = len - length ; + if( ( start + length ) > len ) k = start - 1 ; + ch[k] = '\0' ; + } + return strlen( ch ) ; + } + +char * insertnew( const char * ch, const char * c, const int ipos ) { + int res ; + char * ch1 ; + if( ( c == NULL ) || ( ch == NULL ) ) return NULL ; + if( ( ch1 = (char *) malloc( strlen( ch ) + strlen( c ) + 1 ) ) == NULL ) return NULL ; + strcpy( ch1, ch ) ; + res = insert( ch1, c, ipos ) ; + if( res < 0 ) return NULL ; + return ch1 ; + } + +/* Fonction permettant d'inserer une chaine dans une autre */ +int insert( char * ch, const char * c, const int ipos ) { + int i = ipos, len = strlen( c ), k ; + if( ( ch == NULL ) || ( c == NULL ) ) return -1 ; + if( len > 0 ) { + if( (size_t) i > ( strlen( ch ) + 1 ) ) i = strlen( ch ) + 1 ; + for( k = strlen( ch ) ; k >= ( i - 1 ) ; k-- ) ch[k + len] = ch[k] ; + for( k = 0 ; k < len ; k++ ) ch[k + i - 1] = c[k] ; + } + return strlen( ch ) ; + } + +/* Fonction permettant de remplacer un caractere par un autre dans toute une chaine */ +int replacec( char * ch, const char c1, const char c2 ) { + int i, nb = 0 ; + if( c1 == c2 ) return 0 ; + while( ( i = posc( c1, ch ) ) > 0 ) { ch[ i - 1 ] = c2 ; nb++ ; } + return nb ; + } +int remplacec( char * ch, const char c1, const char c2 ) { + return replacec( ch, c1, c2 ) ; + } + +/* Fonction permettant de remplacer une chaine par une autre dans toute une chaine */ +int replace( char * ch, const char * c1, const char * c2 ) { + int i, nb = 0 ; + if( !strcmp( c1, c2 ) ) return 0 ; + while( ( i = pos( c1, ch ) ) > 0 ) { + if( del( ch, i, strlen( c1 ) ) < 0 ) { nb = -1 ; } + if( insert( ch, c2, i ) < 0 ) { nb =-2 ; } + if( nb >= 0 ) { nb++ ; } + } + return nb ; + } +int remplace( char * ch, const char * c1, const char * c2 ) { + return replace( ch, c1, c2 ) ; + } + +char __bufferchar[35] = "" ; +char * itos( const int i ) { + sprintf( __bufferchar, "%d", i ) ; + return __bufferchar ; + } + +/* Procedure permettant de verifier si une chaine match avec un pattern acceptant les caracteres jocker * et les ? */ +int matchpattern( const char * pattern, const char * st) { + unsigned int i = 0, j = 0 , k ; + + if( pattern == NULL ) return 1 ; + if( strlen( pattern ) == 0 ) return 1 ; + if( st == NULL ) return 0 ; + if( strlen( st ) == 0 ) return 0 ; + + do { + if( pattern[j] == '*' ) { /* cas o on a une etoile */ + if( j == ( strlen( pattern ) - 1 ) ) return 1 ; /* Etoile en fin */ + for( k=(strlen( st )-1) ; k >= i ; k-- ) { + if( st[k]==pattern[j+1] ) { + if( matchpattern( pattern+j+1, st+k ) ) return 1 ; + } + if( k == 0 ) return 0 ; + } + return 0 ; + } + if( pattern[j] != '*' ) { /* cas o il n'y a pas d'toile */ + if( (st[i]!=pattern[j]) && (pattern[j]!='?') ) return 0; + i++ ; + j++ ; + } + } + while ( ( i <= strlen( st ) ) && ( j <= strlen( pattern ) ) ) ; + + return 1 ; + } + +/* strscan - scanner de chaine de caracteres + permet de rechercher dans une chaine de caracteres st les diffrents parametres de + type char* separes par le(s) caractere(s) sep +*/ +int strscan( const char * st, const char * sep, ... ) { + char * pst ; + int nb = 0, i = 0, j = 0 ; + va_list ap ; + + if( st == NULL ) return 0 ; + if( strlen( st ) == 0 ) return 0 ; + + va_start( ap, sep ) ; + if( ( pst = va_arg( ap, char* ) ) == NULL ) return 0 ; + + if( (sep == NULL) || ( strlen(sep) == 0 ) ) { + strcpy( pst, st ) ; + return 1 ; + } + else {pst[0]='\0' ; nb++; } + + while( (pst != NULL ) && ( st[i]!='\0' ) ) { + while( strstr( st+i, sep ) == ( st + i ) ) { + pst[j] = '\0' ; + if( ( pst = va_arg( ap, char* ) ) == NULL ) return nb ; + pst[0]='\0' ; + j = 0 ; + i = i + strlen( sep ) ; + nb++ ; + } + pst[j] = st[i] ; + pst[j+1]='\0' ; + i++ ; + j++ ; + } + pst[j]='\0' ; + + va_end( ap ) ; + return nb ; + } + +/* rpad - ajout le motif droite jusqu' obtenir une longueur totale de n */ +int rpad( char * st, const unsigned int len, const char motif ) { + if( st == NULL ) return 0 ; + while( strlen( st ) < len ) { + st[strlen(st)+1] = '\0' ; + st[strlen(st)] = motif ; + } + return strlen( st ) ; + } + +/* drpad - ajout des espace droite jusqu' obtenir une longueur totale de n */ +int drpad( char * st, const unsigned int len ) { return rpad( st, len, ' ' ) ; } + +/* lpad - ajout le motif gauche jusqu' obtenir une longueur totale de n */ +int lpad( char * st, const unsigned int len, const char motif ) { + char b[2] ; + if( st == NULL ) return 0 ; + b[0] = motif ; b[1] = '\0' ; + while( strlen( st ) < len ) { + insert( st, b, 1 ) ; + } + return strlen( st ) ; + } + +/* dlpad - ajout des espace gauche jusqu' obtenir une longueur totale de n */ +int dlpad( char * st, const int len ) { return lpad( st, len, ' ' ) ; } + +/* rtrim - supprime droite les caractres de la chaine motif */ +int rtrim( char * st, const char * motif ) { + if( st == NULL ) return 0 ; + if( motif == NULL ) return strlen( st ) ; + if( strlen(motif) == 0 ) return strlen( st ) ; + + while( posc( st[strlen(st)-1], motif ) ) st[strlen(st)-1] = '\0' ; + return strlen( st ) ; + } + +/* drtrim - supprime droite les espaces tabulation et retour chariot */ +int drtrim( char * st ) { return rtrim( st, " \t\r\n" ) ; } + +/* ltrim - supprime gauche les caractres de la chaine motif */ +int ltrim( char * st, const char * motif ) { + if( st == NULL ) return 0 ; + if( motif == NULL ) return strlen( st ) ; + if( strlen(motif) == 0 ) return strlen( st ) ; + + while( posc( st[0], motif ) ) del( st, 1, 1 ) ; + return strlen( st ) ; + } + +/* dltrim - supprime gauche les espaces tabulation et retour chariot */ +int dltrim( char * st ) { return ltrim( st, " \t\r\n" ) ; } + +/* trim - supprime gauche et droite les caractres de la chaine motif */ +int trim( char * st, const char * motif ) { rtrim( st, motif ) ; return ltrim( st, motif ) ; } + +/* dtrim - supprime gauche et droite les espaces tabulation et retour chariot */ +int dtrim( char * st ) { rtrim( st, " \t\r\n" ) ; return ltrim( st, " \t\r\n" ) ; } + +/************************************************************************** + FONCTIONS DE GESTION DE LA LIGNE DE COMMANDE +**************************************************************************/ +/* Fonction permettant de recuperer un argument de la ligne de commande et de le mettre dans la variable buf */ +int scanparam( char * st, int * argc1, char ** argv, char * buf ) { + /* st: la chaine recherchee + ATTENTION aux pointeurs + Exemple d'appel: scanparam("-r",&argc,argv,buf); + */ + + int i, res = 1, pos = 1 ; + int argc = *argc1 ; + if( ( *argc1 <= 1 ) || ( argv == NULL ) || ( buf == NULL ) ) return -1 ; + for( i = 1 ; i < argc ; i++ ) { + if( ( !strcmp( argv[i], st ) ) && ( i < ( argc -1 ) ) ) + { res = 0 ; pos = i ; } + } + if( res == 0 ) { + strcpy( buf, argv[pos + 1] ) ; + free( argv[pos] ) ; free( argv[pos + 1] ) ; + if( pos < ( argc - 2 ) ) { + for( i = pos ; i < ( argc - 2 ) ; i++ ) + { argv[i] = argv[i+2] ; } + } + ( *argc1 ) = argc - 2 ; + } + + return res ; + } + +/* Fonction permettant de recuperer un flag de la ligne de commande*/ +int scanparam1( char * st, int * argc1, char ** argv ) { + /* st: la chaine recherchee + ATTENTION aux pointeurs + Exemple d'appel: scanparam("-r",&argc,argv); + Le code retour vaut zero si la valeur est trouve + */ + + int i, res = 1 , pos = 1 ; + int argc = *argc1 ; + if( ( *argc1 <= 1 ) || ( argv == NULL ) ) return -1 ; + for( i = 1 ; i < argc ; i++ ) + { if( !strcmp( argv[i], st ) ) { res = 0 ; pos =i ; } } + if( res == 0 ) { + free( argv[pos] ) ; + if( pos < ( argc - 1 ) ) { + for( i = pos ; i < ( argc - 1 ) ; i++ ) + { argv[i] = argv[i + 1] ; } + } + ( *argc1 ) = argc - 1 ; + } + + return res ; + } + +/* Dfinition du tableau interne de gestion de la ligne de commande */ +static int __tools_argc = 0 ; +static char ** __tools_argv = NULL ; + +/* Copie la ligne de commande dans un tableau interne */ +int param_init( const int argc, const char **argv ) { + int i ; + if( argc > 0 ) { + if( __tools_argv != NULL ) { param_clean() ; __tools_argc = 0 ; } + if( ( __tools_argv = (char**) malloc( argc*sizeof(char*) ) ) == NULL ) return 0 ; + __tools_argc = argc ; + for( i = 0 ; i < argc ; i++ ) { + if( ( __tools_argv[i] = (char*)malloc( strlen( argv[i] ) + 1 ) ) == NULL ) return 0 ; + strcpy( __tools_argv[i], argv[i] ) ; + } + } + return 1 ; + } + +/* Donne le nombre d'arguments restant */ +int param_nbr( void ) { + return __tools_argc ; + } + +/* Renvoie le tableau de paramtres restants */ +char ** param_tab( void ) { + return __tools_argv ; + } + +/* Test l'existance d'un flag et le supprime */ +int param_scan1( const char * val ) { + int i, j ; + if( __tools_argv != NULL ) + if( __tools_argc > 0 ) { + for( i = 0 ; i < __tools_argc ; i++ ) + if( __tools_argv[i] != NULL ) + if( !strcmp( __tools_argv[i], val ) ) { + free( __tools_argv[i] ) ; + __tools_argv[i] = NULL ; + if( i < (__tools_argc-1) ) { + for( j = i ; j < (__tools_argc-1) ; j++ ) { + __tools_argv[j] = (char*)malloc( strlen(__tools_argv[j+1]) + 1 ) ; + strcpy( __tools_argv[j], __tools_argv[j+1] ) ; + free( __tools_argv[j+1] ) ; + __tools_argv[j+1] = NULL ; + /* __tools_argv[j] = __tools_argv[j+1] ; */ + } + } + /* __tools_argv[ __tools_argc-1 ] = NULL ; */ + __tools_argc-- ; + return 1 ; + } + } + return 0 ; + } + +/* Test l'existance d'un paramtre et le supprime */ +int param_scan( const char * val, char * st ) { + int i, j ; + if( __tools_argv != NULL ) + if( __tools_argc > 0 ) { + for( i = 0 ; i < (__tools_argc-1) ; i++ ) + if( __tools_argv[i] != NULL ) + if( !strcmp( __tools_argv[i], val ) ) { + if( __tools_argv[i+1] != NULL ) strcpy( st, __tools_argv[i+1] ) ; + free( __tools_argv[i] ) ; __tools_argv[i] = NULL ; + free( __tools_argv[i+1] ) ; __tools_argv[i+1] = NULL ; + if( i < (__tools_argc-2) ) { + for( j = i ; j < (__tools_argc-2) ; j++ ) + if( __tools_argv[j+2] != NULL ) { + __tools_argv[j] = (char*) malloc( strlen(__tools_argv[j+2]) + 1 ) ; + strcpy( __tools_argv[j], __tools_argv[j+2] ) ; + free( __tools_argv[j+2] ) ; + __tools_argv[j+2] = NULL ; + /* __tools_argv[j] = __tools_argv[j+2] ; */ + } + } + /* __tools_argv[ __tools_argc-1 ] = NULL ; */ + /* __tools_argv[ __tools_argc-2 ] = NULL ; */ + __tools_argc -= 2 ; + return 1 ; + } + } + return 0 ; + } + +/* Rcupre le contenu d'un paramtre */ +char * param_get( const int nb ) { + if( nb < 0 ) return NULL ; + if( nb >= __tools_argc ) return NULL ; + if( __tools_argv != NULL ) { + return __tools_argv[nb] ; + } + return NULL ; + } + +/* Affiche le buffer interne */ +void param_print( void ) { + int i ; + if( __tools_argv != NULL ) + if( __tools_argc > 0 ) { + for( i = 0 ; i < __tools_argc ; i++ ) + if( __tools_argv[i] != NULL ) { + printf( "%d: %s\n", i, __tools_argv[i] ) ; + } + } + } + +/* Vide le buffer interne */ +void param_clean( void ) { + int i ; + if( __tools_argv != NULL ) + if( __tools_argc > 0 ) { + for( i = 0 ; i < __tools_argc ; i++ ) + if( __tools_argv[i] != NULL ) { + free( __tools_argv[i] ) ; + __tools_argv[i] = NULL ; + } + free( __tools_argv ) ; + __tools_argv = NULL ; + } + __tools_argc = 0 ; + } + +/************************************************************************** + FONCTIONS DE GESTION DE DATE +**************************************************************************/ +char __TIMEPATTERN[256] = "%A %d %B %Y %j %m %y %b %a %w %W %I%p %X %Z" ; /* Variable a modifier pour redefinir le format d'affichage */ +/* Calcul de la date partir d'aujourd'hui +/- n secondes +'%A' The full weekday name ('Friday') +'%a' The abbreviated weekday name ('Fri') +'%B' The full month name ('October') +'%b'%h' The abbreviated month name ('Oct') +'%C' Short for '%a %b %e %H:%M:%S %Y' ('Fri Oct 1 15:30:34 1993') +'%c' Short for '%m/%d/%y %H:%M:%S' ('10/01/93 15:30:34') +'%e' The day of the month, blank padded to two characters (' 2') +'%D' Short for '%m/%d/%y' ('10/01/93') +'%d' The day of the month, zero padded to two characters ('02') +'%H' The hour (0-24), zero padded to two characters ('15') +'%I' The hour (1-12), zero padded to two characters ('03') +'%j' The Julian day, zero padded to three characters ('275') +'%k' The hour (0-24), space padded to two characters ('15') +'%l' The hour (1-12), space padded to two characters(' 3') +'%M' The minutes, zero padded to two characters ('30') +'%m' The month (1-12), zero padded to two characters ('10') +'%n' A newline ('\n') +'%p' AM or PM ('PM') +'%R' Short for '%H:%M' ('15:30') +'%r' Short for '%I:%M:%S %p' ('03:30:35 PM') +'%S' The seconds, zero padded to two characters ('35') +'%T'%X' Short for '%H:%M:%S' ('15:30:35') +'%t' A tab ('\t') +'%U' The week of the year, with the first week defined by the first Sunday of the year, zero padded to two characters ('39') +'%W' The week of the year, with the first week defined by the first Monday of the year, zero padded to two characters ('39') +'%w' The day of the week (0-6) ('5') +'%x' Short for '%m/%d/%y' ('10/01/93') +'%y' The year (00-99) of the century ('93') +'%Y' The year, zero padded to four digits ('1993') +'%Z' The timezone abbreviation ('EDT') +'%%' A percent symbol ('%') + +struct tm { + int tm_sec; seconds after the minute [0-60] + int tm_min; minutes after the hour [0-59] + int tm_hour; hours since midnight [0-23] + int tm_mday; day of the month [1-31] + int tm_mon; months since January [0-11] + int tm_year; years since 1900 + int tm_wday; days since Sunday [0-6] + int tm_yday; days since January 1 [0-365] + int tm_isdst; Daylight Savings Time flag + long tm_gmtoff; offset from GMT in seconds + char * tm_zone; timezone abbreviation +};*/ + +int adddate( const int secondes, char * buf ) { + char * pays = "fr_FR.ISO8859-1" ; + time_t temps ; + struct tm date ; + + setlocale( LC_TIME, pays ) ; + temps = time( & temps ) ; + /*temps=temps-(3600*24*jours);*/ + temps = temps - secondes ; + date = * localtime( & temps ) ; + /*strftime(buf,255,"%A %d %B %Y %j %m %y",&date);*/ + strftime( buf, 255, __TIMEPATTERN, & date ) ; + return 0 ; + } + +/* Fonction permettant d'attendre (seconde avec virgule) */ +#ifndef CPPLUS +void mysleep( const double delay ) { +#ifdef WIN32 + /* _sleep( (unsigned long)( 1000. * delay ) ) ; */ + Sleep( (unsigned long)( 1000. * delay ) ) ; +#else + sleep( (unsigned int) ceil( delay ) ) ; +#endif + } +#endif + + +/************************************************************************** + FONCTIONS MATHEMATIQUES +**************************************************************************/ +double sqr( const double f ) { + return pow( f, 2 ) ; + } + +double myabs( const double dd ) { + if( dd < 0 ) return -dd ; + else return dd ; + } + + +double mymin( const double f1, const double f2 ) { + if( f1 <= f2 ) return f1 ; + else return f2 ; + } + +int mymini( const int f1, const int f2 ) { + if( f1 <= f2 ) return f1 ; + else return f2 ; + } + +double mymax( const double f1, const double f2 ) { + if( f1 >= f2 ) return f1 ; + else return f2 ; + } + +int mymaxi( const int f1, const int f2 ) { + if( f1 >= f2 ) return f1 ; + else return f2 ; + } + +int sgn( const double a ) { + if( a < 0 ) return -1 ; + else if( a > 0 ) return 1 ; + else return 0 ; + } + + +/********************************************************************************************* + GENERATEUR DE NOMBRES ALEATOIRES +*********************************************************************************************/ +int __MYRANDSEED = 0 ; /* Initialisation du generateur de nombre alatoire */ +int __MYCOUNTRAND = 0 ; + +void myrandseed( const int myseed ) { + __MYRANDSEED = myseed ; + __MYCOUNTRAND= myseed ; + } + +double myrandomd( void ) { + double dd = 0.5 * ( sin ( (double) __MYCOUNTRAND ) + 1 ) ; + __MYCOUNTRAND = __MYRANDSEED + __MYCOUNTRAND ; + dd = 1000 * dd ; + dd = dd - floor( dd ) ; + return dd ; + } + +int myrandom( const int num ) { + return (int) ( floor ( num * myrandomd() ) ) ; + } + +void myrandomize( void ) { + long int h ; + h = time( 0L ) ; + myrandseed( h ) ; + } + +/********************************************************************************************* + GESTION DES ERREURS ERRNO +*********************************************************************************************/ +#ifndef __ERRNO +#define __ERRNO + +const int MAX_ERRNO = 139 ; + +const struct { + const char * code ; + const int value ; + char * libelle ; + } +SERRNO[] = +{ +{"NULL",0,""}, +{"EPERM",1,"Not super-user"}, +{"ENOENT",2,"No such file or directory"}, +{"ESRCH",3,"No such process"}, +{"EINTR",4,"Interrupted system call"}, +{"EIO",5,"I/O error"}, +{"ENXIO",6,"No such device or address"}, +{"E2BIG",7,"Arg list too long"}, +{"ENOEXEC",8,"Exec format error"}, +{"EBADF",9,"Bad file number"}, +{"ECHILD",10,"No children"}, +{"EAGAIN",11,"No more processes"}, +{"ENOMEM",12,"Not enough core"}, +{"EACCES",13,"Permission denied"}, +{"EFAULT",14,"Bad address"}, +{"ENOTBLK",15,"Block device required"}, +{"EBUSY",16,"Mount device busy"}, +{"EEXIST",17,"File exists"}, +{"EXDEV",18,"Cross-device link"}, +{"ENODEV",19,"No such device"}, +{"ENOTDIR",20,"Not a directory"}, +{"EISDIR",21,"Is a directory"}, +{"EINVAL",22,"Invalid argument"}, +{"ENFILE",23,"Too many open files in system"}, +{"EMFILE",24,"Too many open files"}, +{"ENOTTY",25,"Not a typewriter"}, +{"ETXTBSY",26,"Text file busy"}, +{"EFBIG",27,"File too large"}, +{"ENOSPC",28,"No space left on device"}, +{"ESPIPE",29,"Illegal seek"}, +{"EROFS",30,"Read only file system"}, +{"EMLINK",31,"Too many links"}, +{"EPIPE",32,"Broken pipe"}, +{"EDOM",33,"Math arg out of domain of func"}, +{"ERANGE",34,"Math result not representable"}, +{"ENOMSG",35,"No message of desired type"}, +{"EIDRM",36,"Identifier removed"}, +{"ECHRNG",37,"Channel number out of range"}, +{"EL2NSYNC",38,"Level 2 not synchronized"}, +{"EL3HLT",39,"Level 3 halted"}, +{"EL3RST",40,"Level 3 reset"}, +{"ELNRNG",41,"Link number out of range"}, +{"EUNATCH",42,"Protocol driver not attached"}, +{"ENOCSI",43,"No CSI structure available"}, +{"EL2HLT",44,"Level 2 halted"}, +{"EDEADLK",45,"Deadlock condition"}, +{"ENOLCK",46,"No record locks available"}, +{"NULL",47,""}, +{"NULL",48,""}, +{"NULL",49,""}, +{"EBADE",50,"Invalid exchange"}, +{"EBADR",51,"Invalid request descriptor"}, +{"EXFULL",52,"Exchange full"}, +{"ENOANO",53,"No anode"}, +{"EBADRQC",54,"Invalid request code"}, +{"EBADSLT",55,"Invalid slot"}, +{"EDEADLOCK",56,"File locking deadlock error"}, +{"EBFONT",57,"Bad font file fmt"}, +{"NULL",58,""}, +{"NULL",59,""}, +{"ENOSTR",60,"Device not a stream"}, +{"ENODATA",61,"No data (for no delay io)"}, +{"ETIME",62,"Timer expired"}, +{"ENOSR",63,"Out of streams resources"}, +{"ENONET",64,"Machine is not on the network"}, +{"ENOPKG",65,"Package not installed"}, +{"EREMOTE",66,"The object is remote"}, +{"ENOLINK",67,"The link has been severed"}, +{"EADV",68,"Advertise error"}, +{"ESRMNT",69,"Srmount error"}, +{"ECOMM",70,"Communication error on send"}, +{"EPROTO",71,"Protocol error"}, +{"NULL",72,""}, +{"NULL",73,""}, +{"EMULTIHOP",74,"Multihop attempted"}, +{"ELBIN",75,"Inode is remote (not really error)"}, +{"EDOTDOT",76,"Cross mount point (not really error)"}, +{"EBADMSG",77,"Trying to read unreadable message"}, +{"NULL",78,""}, +{"EFTYPE",79,"Inappropriate file type or format"}, +{"ENOTUNIQ",80,"Given log. name not unique"}, +{"EBADFD",81,"f.d. invalid for this operation"}, +{"EREMCHG",82,"Remote address changed"}, +{"ELIBACC",83,"Can\"t access a needed shared lib"}, +{"ELIBBAD",84,"Accessing a corrupted shared lib"}, +{"ELIBSCN",85,".lib section in a.out corrupted"}, +{"ELIBMAX",86,"Attempting to link in too many libs"}, +{"ELIBEXEC",87,"Attempting to exec a shared library"}, +{"ENOSYS",88,"Function not implemented"}, +{"ENMFILE",89,"No more files"}, +{"ENOTEMPTY",90,"Directory not empty"}, +{"ENAMETOOLONG",91,"File or path name too long"}, +{"ELOOP",92,"Too many symbolic links"}, +{"NULL",93,""}, +{"NULL",94,""}, +{"EOPNOTSUPP",95,"Operation not supported on transport endpoint"}, +{"EPFNOSUPPORT",96,"Protocol family not supported"}, +{"NULL",97,""}, +{"NULL",98,""}, +{"NULL",99,""}, +{"NULL",100,""}, +{"NULL",101,""}, +{"NULL",102,""}, +{"NULL",103,""}, +{"ECONNRESET",104,"Connection reset by peer"}, +{"ENOBUFS",105,"No buffer space available"}, +{"EAFNOSUPPORT",106,"Address family not supported by protocol family"}, +{"EPROTOTYPE",107,"Protocol wrong type for socket"}, +{"ENOTSOCK",108,"Socket operation on non-socket"}, +{"ENOPROTOOPT",109,"Protocol not available"}, +{"ESHUTDOWN",110,"Can\"t send after socket shutdown"}, +{"ECONNREFUSED",111,"Connection refused"}, +{"EADDRINUSE",112,"Address already in use"}, +{"ECONNABORTED",113,"Connection aborted"}, +{"ENETUNREACH",114,"Network is unreachable"}, +{"ENETDOWN",115,"Network interface is not configured"}, +{"ETIMEDOUT",116,"Connection timed out"}, +{"EHOSTDOWN",117,"Host is down"}, +{"EHOSTUNREACH",118,"Host is unreachable"}, +{"EINPROGRESS",119,"Connection already in progress"}, +{"EALREADY",120,"Socket already connected"}, +{"EDESTADDRREQ",121,"Destination address required"}, +{"EMSGSIZE",122,"Message too long"}, +{"EPROTONOSUPPORT",123,"Unknown protocol"}, +{"ESOCKTNOSUPPORT",124,"Socket type not supported"}, +{"EADDRNOTAVAIL",125,"Address not available"}, +{"ENETRESET",126,""}, +{"EISCONN",127,"Socket is already connected"}, +{"ENOTCONN",128,"Socket is not connected"}, +{"ETOOMANYREFS",129,""}, +{"EPROCLIM",130,""}, +{"EUSERS",131,""}, +{"EDQUOT",132,""}, +{"ESTALE",133,""}, +{"ENOTSUP",134,"Not supported"}, +{"ENOMEDIUM",135,"No medium (in tape drive)"}, +{"ENOSHARE",136,"No such host or network path"}, +{"ECASECLASH",137,"Filename exists with different case"}, +{"EILSEQ",138,""}, +{"EOVERFLOW",139,"Value too large for defined data type"}, +{"EWOULDBLOCK",11,"Operation would block"}, +{"__ELASTERROR",2000,"Users can add values starting here"} +} ; + +/* Fonction permettant de retrouver le libell d'une erreur a partir de la valeur errno */ +char *sterrno( const int value ) { + if( ( value < 0 ) || ( value > MAX_ERRNO ) ) return NULL ; + return SERRNO[value].libelle ; + } + +/* Fonction permettant de retrouver le libell d'une erreur a partir du code errno */ +char *ssterrno( const char * code ) { + int i ; + for( i = 0 ; i <= MAX_ERRNO ; i++ ) + if( !strcmp( code, SERRNO[i].code ) ) return sterrno( i ) ; + return NULL ; + } +#endif + +/********************************************************************************************* + PARTIE ACCES AUX FICHIERS +*********************************************************************************************/ +/* Teste l'existance d'un fichier */ +int existfile( const char * filename ) { + struct stat statBuf ; + + if( filename == NULL ) return 0 ; + if( stat( filename, &statBuf ) == -1 ) return 0 ; + + if( ( statBuf.st_mode & S_IFMT ) == S_IFREG ) { return 1 ; } + else { return 0 ; } + } + +/* Teste l'existance d'un repertoire */ +int existdir( const char * name ) { + struct stat statBuf ; + char * dirname ; + + if( name == NULL ) return 0 ; + dirname = (char*) malloc( strlen( name ) + 4 ) ; + strcpy( dirname, name ) ; + while( (dirname[strlen(dirname)-1]=='/')||(dirname[strlen(dirname)-1]=='\\') ) dirname[strlen(dirname)-1]='\0' ; + if( stat( dirname, &statBuf ) == -1 ) { + strcat( dirname, "/." ) ; + if( stat( dirname, &statBuf ) == -1 ) { free( dirname ) ; return 0 ; } + } + + if( ( statBuf.st_mode & S_IFMT) == S_IFDIR ) { free( dirname ) ; return 1 ; } + else { free( dirname ) ; return 0 ; } + } + +/* Teste l'existance d'un lien symbolique */ +int existlink( const char * linkname ) { + struct stat statBuf ; + + if( linkname == NULL ) return 0 ; + if( stat( linkname, &statBuf ) == -1 ) return 0 ; + + if( ( statBuf.st_mode & S_IFMT) == S_IFDIR ) { return 1 ; } + else { return 0 ; } + } + +/* Teste l'existance d'un fichier ou d'un repertoire ou d'un lien symbolique */ +int exist( const char * name ) { + return ( existfile( name ) || existdir( name ) || existlink( name ) ) ; + } + +/* Donne la taille d'un fichier */ +long filesize( const char * filename ) { + FILE * fp ; + long length ; + + if( filename == NULL ) return 0 ; + if( strlen( filename ) <= 0 ) return 0 ; + + if( ( fp = fopen( filename, "r" ) ) == 0 ) return 0 ; + + fseek( fp, 0L, SEEK_END ) ; + length = ftell( fp ) ; + + fclose( fp ) ; + return length ; + } + +/* Supprime toute une arborescence */ +int rmalldir( const char * name ) { + int return_code = 0 ; + DIR * dir ; + struct dirent * de ; + char * buffer ; + + if( existfile( name ) ) { if( unlink( name )==0 ) return 1 ; else return 0 ; } + if( existdir( name ) ) { + if( ( dir = opendir( name ) ) == NULL ) return 0 ; + while( ( de = readdir( dir ) ) != NULL ) + if( strcmp( de->d_name, "." ) && strcmp( de->d_name, ".." ) ) { + if( ( buffer = (char*) malloc( strlen(name)+strlen(de->d_name) + 3 ) ) == NULL ) { + closedir( dir ) ; return 0 ; } + if( name[ strlen( name ) - 1 ] == '/' ) sprintf( buffer,"%s%s", name, de->d_name ); + else sprintf( buffer,"%s/%s", name, de->d_name ) ; + if( existdir( buffer ) ) return_code += rmalldir( buffer ) ; + else { + if( unlink( buffer )==0 ) return_code++ ; + else { chmod( buffer, 400 ) ; if( unlink( buffer )==0 ) return_code++ ; } + } + free( buffer ) ; + } + if( rmdir( name ) == 0 ) return_code++ ; + else { chmod( name, 400 ) ; if( rmdir( name ) == 0 ) return_code++ ; } + closedir( dir ) ; + } + return return_code ; + } +/* Recupere la date de derniere modification d'un fichier */ +LINKDLL time_t filetime( const char * name ) { + struct stat statBuf ; + + if( stat( name, &statBuf ) == -1 ) return 0 ; + else return statBuf.st_mtime ; + } + +/* Rcupre le rpertoire dans un chemin, "" si vide */ +/*LINKDLL void dirname( const char * path, char * dir ) { + int i ; + if( existdir( path ) ) { strcpy( dir, path ) ; return ; } + if( ( i = posnc( '/', path ) ) == 0 ) i = posnc( '\\', path ) ; + if( i > 0 ) { + strcpy( dir, path ) ; + dir[i-1] = '\0' ; + } + else strcpy( dir, "" ) ; + } +*/ + +#ifndef PERSOPORT +/* Rcupre le nom de fichier dans un chemin, "" si vide */ +LINKDLL void basename( const char * path, char * base ) { + int i ; + strcpy( base, path ) ; + if( existdir( base ) ) { strcpy( base, "" ) ; return ; } + /* if( ( i = posnc( '/', path ) ) == 0 ) i = posnc( '\\', path ) ; */ + i = ( posnc( '/', path )>=posnc( '\\', path ) ? posnc( '/', path ) : posnc( '\\', path ) ) ; + if( i > 0 ) { + del( base, 1, i ) ; + } + } +#endif + +/* Procedure d'encodage des parametes d'une URL ( ' ' -> '+', et ? -> %XX ) */ +void URLencode( char * st ) { + size_t i ; + int c ; + char * h = "0123456789abcdef" ; + + if( strlen( st ) <= 0 ) return ; + for( i = 0 ; i < strlen( st ); i++ ) { + c = st[i] ; + + if( ( ( 'a' <= c ) && ( c <= 'z' ) ) + || ( ( 'A' <= c ) && ( c <= 'Z' ) ) + || ( ( '0' <= c ) && ( c <= '9' ) ) + /* || ( c == '-' ) || ( c == '_' ) || ( c == '.' ) */ + /* || ( c == '&' ) || ( c == '=' ) */ + ) + continue ; + else if( c == ' ' ) + st[i] = '+' ; + else { + del( st, i + 1, 1 ) ; + insert( st, " ", i + 1 ) ; + st[i] = '%' ; + st[i + 1] = h[c >> 4] ; + st[i + 2] = h[c & 0x0f] ; + i += 2 ; + } + } + } + +void URLencodeFilename( char * st ) { + size_t i ; + int c ; + char * h = "0123456789abcdef" ; + + if( strlen( st ) <= 0 ) return ; + for( i = 0 ; i < strlen( st ) ; i++ ) { + c = st[i] ; + + if( ( ( 'a' <= c ) && ( c <= 'z' ) ) + || ( ( 'A' <= c ) && ( c <= 'Z' ) ) + || ( ( '0' <= c ) && ( c <= '9' ) ) + /* || ( c == '-' ) || ( c == '_' ) || ( c == '.' ) */ + ) + continue ; + else { + del( st, i + 1, 1 ) ; + insert( st, " ", i + 1 ) ; + st[i] = '%' ; + st[i + 1] = h[c >> 4] ; + st[i + 2] = h[c & 0x0f] ; + i += 2 ; + } + } + } + +void URLdecode( char * st ) { + size_t i ; + char c, c1, c2 ; + + if( strlen( st ) <= 0 ) return ; + for( i = 0 ; i < strlen( st ) ; i++ ) { + c = st[i] ; + if( c == '%' ){ + c1 = st[i+1] ; + c2 = st[i+2] ; + if( c1 == EOF || c2 == EOF ) return ; + c1 = tolower( c1 ) ; + c2 = tolower( c2 ) ; + if( !isxdigit( c1 ) || !isxdigit( c2 ) ) return ; + if( c1 <= '9' ) + c1 = c1 - '0' ; + else + c1 = c1 - 'a' + 10 ; + if( c2 <= '9' ) + c2 = c2 - '0' ; + else + c2 = c2 - 'a' + 10 ; + del( st, i + 2, 2) ; + st[i] = 16 * c1 + c2 ; + } + else if( c == '+' ) + st[i] = ' ' ; + } + } + +int URLread( const char * URL, char * protocol, char * user, char * password, char * adress, char * port, char * path, char * name, char * param ) { + /* Format: protocol://user:password@adress:port/path/filename?param */ + int i, j ; + char * buf ; + + buf = (char*) malloc( strlen( URL ) + 1 ) ; + + strcpy( buf, URL ) ; strcpy( protocol, "") ; strcpy (user, "" ) ; strcpy( password, "" ) ; + strcpy( adress, "" ) ; strcpy( port, "" ) ; strcpy( path, "" ) ; strcpy( name, "" ) ; strcpy( param, "" ) ; + + while( ( buf[ strlen( buf ) - 1 ] == ' ' ) || ( buf[ strlen( buf ) - 1 ] == '\r' ) || ( buf[ strlen( buf ) - 1 ] == '\n' ) || ( buf[ strlen( buf ) - 1 ] == '\t' ) ) buf[ strlen( buf ) - 1 ] = '\0' ; + while( ( buf[0] == ' ' ) || ( buf[0] == '\t' ) ) del( buf, 1, 1 ) ; + + if( ( i = pos( "?", buf ) ) > 0 ) { + strcpy( param, buf + i ) ; + buf[i-1] = '\0' ; + } + + if( ( i = pos( "://", buf ) ) > 0 ) { + copy( protocol, buf, 1, i - 1 ) ; + del( buf, 1, i + 2 ) ; + } + if( ( i = pos( "@", buf ) ) > 0 ) { + if( ( j = pos( ":", buf ) ) > i ) { free( buf ) ; return -2 ; } + copy( user, buf, 1, j - 1) ; + copy( password, buf, j + 1, i - j - 1 ) ; + del( buf, 1, i ) ; + } + if( ( i = pos( ":", buf ) ) > 0 ) { + if( ( j = pos( "/", buf ) ) < i ) j = strlen( buf ) + 1 ; + copy( adress, buf, 1, i - 1 ) ; + copy( port, buf, i + 1, j - i - 1 ) ; + del( buf, 1 , j ) ; + } + else { + if( ( i = pos( "/", buf ) ) <= 0 ) { strcpy( adress, buf ) ; free( buf ) ; return 0 ; } + copy( adress, buf, 1, i - 1 ) ; + del( buf, 1, i ) ; + } + + if( ( i = posn( "/", buf ) ) > 0 ) { + copy( path, buf, 1, i - 1 ) ; + del( buf, 1, i ) ; + } + strcpy( name, buf ) ; + + if( strcmp( path, "" ) ) { + if( path[ strlen( path ) - 1 ] != '/' ) strcat( path, "/" ) ; + j = 1 ; + while( ( i = posi( "/", path, j ) ) > 0 ) { + copy( buf, path, j, i - j ) ; + URLencodeFilename( buf ) ; + del( path, j, i - j ) ; + insert( path, buf, j ) ; + j = i + 1 ; + } + if( path[ strlen( path ) - 1 ] == '/' ) path[ strlen( path ) - 1 ] = '\0' ; + } + + URLencodeFilename( name ) ; + URLencode( param ) ; + + free( buf ) ; + return 0 ; + } + +/* Partie spcifique au C++ */ +#ifdef CPPLUS + +/* Fonction permettant de concatener un caractere a la fin d'une chaine de caracteres */ +char * strcat( char *st, const char c ) { + char cc[2] ; + cc[0] = c ; + cc[1] = '\0' ; + strcat( st, cc ) ; + return st ; + } + +/* Fonction permettant de retrouver le position d'un caractere dans une chaine */ +int pos( const char c, const char * ch ) { + char * ch1, * cc ; + int res ; + if( ch == NULL ) return -1 ; + if( ( ch1 = (char *) malloc( strlen( ch ) + 1 ) ) == NULL ) return -2 ; + strcpy( ch1, ch ) ; + cc = (char *) strchr( ch1, c ) ; + if( cc == NULL ) res = 0 ; + else res = (int) ( cc - ch1 ) + 1 ; + free( ch1 ) ; + return res ; + } + +/* Fonction permettant de retrouver la position d'un caractere dans une chaine en partant de la fin */ +int posn( const char c, const char * ch ) { + char * ch1, * cc ; + int res ; + if( ch == NULL ) return -1 ; + if( ( ch1 = (char *) malloc( strlen( ch ) + 1 ) ) == NULL ) return -2 ; + strcpy( ch1, ch ) ; + cc = (char *) strrchr( ch1, c ) ; + if( cc == NULL ) res = 0 ; + else res = (int) ( cc - ch1 ) + 1 ; + free( ch1 ) ; + return res ; + } + +/* Fonction permettant de remplacer un caractere par un autre dans toute une chaine */ +int remplace( char * ch, const char c1, const char c2 ) { + int i, nb = 0 ; + while( ( i = posc( c1, ch ) ) > 0 ) { ch[i-1] = c2 ; nb++ ; } + return nb ; + } + +/********************************************************************************************* + CLASSE T-WEB +*********************************************************************************************/ +TWeb::TWeb() {lcmd=NULL;meth=NULL;} + +TWeb::~TWeb() + {if(lcmd!=NULL) free(lcmd); + if(meth!=NULL) free(meth); + } + +int TWeb::readcmd() + { + char * st; + st=::getenv("REQUEST_METHOD"); + if(st==NULL) return -1; + if(meth!=NULL) free(meth); + meth=(char *)malloc(strlen(st)+2); + if(meth==NULL) return -2; + strcpy(meth,st); + majuscule(meth); + if(!strcmp(meth,"GET")) return readget(); + if(!strcmp(meth,"POST")) return readpost(); + return -3; + } + +int TWeb::readget() + { + char * st; + st=::getenv("QUERY_STRING"); + if(st==NULL) return -1; + if(lcmd!=NULL) free(lcmd); + lcmd=(char *)malloc(strlen(st)+2); + if(lcmd==NULL) return -2; + strcpy(lcmd,st); + return strlen(lcmd); + } + +int TWeb::readpost() + { + char * st; + int nb; + st=::getenv("CONTENT_LENGTH"); + if(st==NULL) return -1; + nb=atoi(st); + if(lcmd!=NULL) free(lcmd); + lcmd=(char *)malloc(nb+3); + if(lcmd==NULL) return -2; + fgets(lcmd,nb+1,stdin); + return strlen(lcmd); + } + +int TWeb::getcmdlen() {return strlen(lcmd);} + +int TWeb::getcmd(char st[]) {strcpy(st,lcmd);decode(st);return strlen(st);} + +int TWeb::getarg(char arg[], char st[]) + { + int n; + char * st2, * arg2; + arg2=(char *)malloc(strlen(arg)+3); + if(arg2==NULL) return -2; + strcpy(arg2,arg);strcat(arg2,"="); + n=mpos(arg2,lcmd); + if(n<=0) {strcpy(st,"");return -1;} + st2=(char *)malloc(strlen(lcmd)-n+2); + if(st2==NULL) return -2; + copy(st2,lcmd,n+strlen(arg2),strlen(lcmd)-(n+strlen(arg))); + n=posc('&',st2); + if(n<=0) n=strlen(st2)+1; + if(n>1) copy(st,st2,1,n-1); + else strcpy(st,""); + free(arg2); + free(st2); + decode(st); + return strlen(st); + } + +int calchexadec(char st[]) + { + char ch1,ch2; + int i=0; + majuscule(st); + ch1=st[0];ch2=st[1]; + if((ch1>='A') && (ch1<='F')) i=16*(ch1-55); + else i=16*(ch1-48); + if((ch2>='A') && (ch2<='F')) i=i+(ch2-55); + else i=i+(ch2-48); + return i; + } + +void TWeb::decode(char st[]) + { + int n,m; + char st2[10], ch; + + while((n=posc('+',st))>0) {st[n-1]=' ';} + while((n=pos("%0D%0A",st))>0) {del(st,n,6);insert(st,"\n",n);} + while((n=pos("%09",st))>0) {del(st,n,3);insert(st,"\t",n);} + while((n=pos("%25",st))>0) {del(st,n,3);insert(st,"",n);} + while((n=posc('\%',st))>0) + { + copy(st2,st,n+1,2); + del(st,n,3); + m=calchexadec(st2); + ch=m; + st2[0]=ch; + st2[1]='\0'; + insert(st,st2,n); + } + while((n=pos("",st))>0) {del(st,n,2);insert(st,"\%",n);} + } + +void TWeb::contenttype() {/* Envoie de l'entte HTML */printf("Content-type: text/html\n\n");} + +void TWeb::write(char st[]) {printf("%s",st);} + +void TWeb::writeln(char st[]) {printf("%s
\n",st);} + +void TWeb::getenv(char env[], char st[]) + {char * pst;pst=::getenv(env);if(pst!=NULL) strcpy(st,pst);else strcpy(st,"");} + +void TWeb::writeenv() + { + char st[5000]; + getenv("SERVER_SOFTWARE",st);printf("

SERVEUR_SOFTWARE
%s

\n",st); + getenv("SERVER_NAME",st);printf("

SERVER_NAME
%s

\n",st); + getenv("GATEWAY_INTERFACE",st);printf("

GATEWAY_INTERFACE
%s

\n",st); + getenv("SERVER_PROTOCOL",st);printf("

SERVER_PROTOCOL
%s

\n",st); + getenv("SERVER_PORT",st);printf("

SERVER_PORT
%s

\n",st); + getenv("REQUEST_METHOD",st);printf("

REQUEST_METHOD
%s

\n",st); + getenv("SCRIPT_NAME",st);printf("

SCRIPT_NAME
%s

\n",st); + getenv("REMOTE_HOST",st);printf("

REMOTE_HOST
%s

\n",st); + getenv("REMOTE_ADDR",st);printf("

REMOTE_ADDR
%s

\n",st); + getenv("AUTH_TYPE",st);printf("

AUTH_TYPE
%s

\n",st); + getenv("REMOTE_USER",st);printf("

REMOTE_USER
%s

\n",st); + getenv("REMOTE_IDENT",st);printf("

REMOTE_IDENT
%s

\n",st); + getenv("CONTENT_LENGTH",st);printf("

CONTENT_LENGTH
%s

\n",st); + getenv("PATH_INFO",st);printf("

PATH_INFO
%s

\n",st); + getenv("QUERY_STRING",st);printf("

QUERY_STRING
%s

\n",st); + getenv("PATH_TRANSLATED",st);printf("

PATH_TRANSLATED
%s

\n",st); + getenv("HTTP_ACCEPT",st);printf("

HTTP_ACCEPT
%s

\n",st); + getenv("HTTP_USER_AGENT",st);printf("

HTTP_USER_AGENT
%s

\n",st); + } + + +/********************************************************************************************* + CLASSE T-FILE +*********************************************************************************************/ +TFile::~TFile(void) + { + if(vDIR!=NULL) {/*delete[] vDIR;*/free(vDIR);vDIR=NULL;} + if(vDirent!=NULL) {/*delete[] vDirent;*/free(vDirent);vDirent=NULL;} + if(maskDIR!=NULL) {/*delete[] maskDIR;*/free(maskDIR);maskDIR=NULL;} + if(maskFILE!=NULL) {/*delete[] maskFILE;*/free(maskFILE);maskFILE=NULL;} + } + +int TFile::setmask(char * mask, int MAJ) + { + int i; + char stmask[strlen(mask)+2]; + maskMAJ=0; + while((i=posc('\\',mask))!=0) {mask[i-1]='/';} + strcpy(stmask,mask); + if((i=posc(':',stmask))>0) + if(stmask[i]!='/') insert(stmask,"/",i+1); + if(vDIR != NULL) {closedir(vDIR);vDIR=NULL;} + vDIR=opendir(stmask); + if(vDIR!=NULL) + { + if(maskDIR!=NULL) {/*delete[] maskDIR;*/free(maskDIR);maskDIR=NULL;} + /*maskDIR=new char[strlen(stmask)+1];*/ + maskDIR=(char*)malloc(strlen(stmask)+1); + if(maskDIR==NULL) {return 0;} + strcpy(maskDIR,stmask); + if(maskFILE!=NULL) {/*delete[] maskFILE;*/free(maskFILE);maskFILE=NULL;} + /*maskFILE=new char[4];*/ + maskFILE=(char*)malloc(4); + if(maskFILE==NULL) {return 0;} + strcpy(maskFILE,"*.*");maskMAJ=MAJ; + } + if(vDIR==NULL) + { + char st[strlen(mask)+2]; + int i; + i=posnc('/',mask);if(i<=0) {return 0;} + copy(st,stmask,1,i); + vDIR=opendir(st);if(vDIR==NULL) {return 0;} + if(maskDIR!=NULL) {/*delete[] maskDIR;*/free(maskDIR);maskDIR=NULL;} + /*maskDIR=new char[strlen(st)+1];*/ + maskDIR=(char*)malloc(strlen(st)+1); + if(maskDIR==NULL) {return 0;} + strcpy(maskDIR,st); + + copy(st,stmask,i+1,strlen(stmask)-i); + if(maskFILE!=NULL) {/*delete[] maskFILE;*/free(maskFILE);maskFILE=NULL;} + /*maskFILE=new char[strlen(st)+1];*/ + maskFILE=(char*)malloc(strlen(st)+1); + if(maskFILE==NULL) {return 0;} + strcpy(maskFILE,st);maskMAJ=MAJ; + } + if(maskMAJ==1) majuscule(maskFILE); + if(maskDIR[strlen(maskDIR)-1]=='/') maskDIR[strlen(maskDIR)-1]='\0' ; +/* printf("#%s#%s#\n",maskDIR,maskFILE); */ + return 1; + } + +int TFile::nextfile(char * stfile) + { + bool test=false; + + while(!test) + { + vDirent=readdir(vDIR); + if(vDirent==NULL) {strcpy(stfile,"");return 0;} + test=testfile(vDirent->d_name); + } + strcpy(stfile,vDirent->d_name); + return 1; + } + +int TFile::prevfile(char * stfile) + { + char actualFILE[256],newFILE[256]; + strcpy(actualFILE,vDirent->d_name); + strcpy(stfile,""); + + rewinddir(vDIR); + while(nextfile(newFILE)>0) + { + if(!strcmp(newFILE,actualFILE)) + {if(!strcmp(stfile,"")) {return 0;} + else { rewinddir(vDIR); + do {nextfile(newFILE);} while(!strcmp(newFILE,stfile)); + nextfile(newFILE); + return 1;} + } + else {strcpy(stfile,newFILE);} + } + strcpy(stfile,""); + return 0; + } + +int TFile::dir(void) + {char stfile[256]; + int i=0; + while(nextfile(stfile)>0) {printf("%s/%s\n",maskDIR,stfile);i++;};return i;} + +int TFile::dir(char * mask) + {setmask(mask);return dir();} + +void TFile::rewind(void) + {rewinddir(vDIR);} + +bool TFile::testfile(char * stfile) + { + char nom[256]; + bool test=true; + int i,j; + if(!strcmp(maskFILE,"*.*") || !strcmp(maskFILE,"*")) return true; + if(strlen(stfile)0) && (j>0)) + { + +/* printf(" %c %c\n",nom[i-1],maskFILE[j-1]); */ + + if(nom[i-1]==maskFILE[j-1]) {i--;j--;} + else + { + if(maskFILE[j-1]=='?') + {/*if(nom[i-1]==maskFILE[j-2]) {j--;} else */{i--;j--;}} + else + { + if(maskFILE[j-1]=='*') + {if(j==1) {i=0;j=0;} + else if(nom[i-1]==maskFILE[j-2]) {j--;} else {i--;}} + else {test=false;} + } + } + } + if(j>0) test=false; + /* Verifie l'accessibilite au fichier */ + /* if(access(maskFILE,0)!=0) test=false; */ + return test; + } + +void TFile::info(void) + { +#ifdef CPPLUS + printf(" "); +#else + printf("%d %d %d %d %d\n",vDirent->__d_reserved[0],vDirent->__d_reserved[1],vDirent->__d_reserved[2],vDirent->__d_reserved[3],vDirent->d_ino); +#endif + } + +extern int const TFile::MAJ = 1; + +#endif /* Fin de la partie specifique C++ */ + + +/* Fonction MAIN de test de la library */ +/* +int main(int argc, char **argv, char **arge) +{ + + char buffer[256] , p1[256], p2[256],p3[256]; + +printf( "%d\n", strscan( "/ABC/", "/", p1,p2,p3) ); printf( "#%s#%s#%s#\n",p1,p2,p3 ); + + +#ifdef DEBUG_MODE + _leaktracker61_EnableReportLeakOnApplication_Exit("tools.leaktracker.log", 1); + _leaktracker61_DumpAllLeaks("tools.leaktracker.log", 0); + printf("Leak tracker log in tools.leaktracker.log file\n"); +#endif + + return 0; +} +*/ + + diff --git a/src/cstdlib2/tools.h b/src/cstdlib2/tools.h new file mode 100644 index 0000000..ac6e154 --- /dev/null +++ b/src/cstdlib2/tools.h @@ -0,0 +1,281 @@ +/***************************************************************************************** + TOOLS C/C++ + Copyright (C) 1999, 2000, 2001 Leonard Nero + Contributed by Lenny + e-mail lenny.nero@zdnetonebox.com + + This file is part of GNU CC. + + Options de compilation + -DWIN32 : Compilation sous Windows (librairie -lwsock32) + -DCPPLUS : Compilation C++ (avec g++) + +*****************************************************************************************/ + +#include "../platform.h" +#include +#include +#include +#include +#include +#include /* sous /usr/ccs/lib/libm.a */ +#include +#include +#include +#include +#include + + +/* Cas de la construction de la DLL */ +#ifdef BUILD_DLL +#define LINKDLL extern "C" __declspec(dllexport) +#define LINKDLLCPP __declspec(dllexport) +#else +#define LINKDLL +#define LINKDLLCPP +#endif + +/* +Syntaxe de compilation +sous DEC +gcc -c tools.c -lm + +sous Solaris +gcc -c tools.c + +Sous Windows en mode DLL +gcc -o tools.dll -shared tools.c + +Sous CygWin +gcc -c tools.c +*/ + +/* Definition permettant de compiler du C++ */ +/* #define CPPLUS */ + +#ifndef CPPLUS +#define bool int +#define true 1 +#define false 0 +#endif + +/* Definition permettant de compiler du C++ Windows */ +/* #define WIN32 */ +#ifdef WIN32 +#include +#endif + +#ifndef __TOOLS +#define __TOOLS +void printversion_tools(void); + +LINKDLL int mprintf( const char * ) ; +LINKDLL bool find( const char * ) ; + +/************************************************************************** + FONCTIONS DE GESTION DE CHAINES +**************************************************************************/ +int maj( int ) ; +#ifndef CPPLUS +int majuscule( signed char [] ) ; /* Fonction permettant de passer une chaine de caracteres en majuscules */ +/*void strcat(char *, char);*/ +#else +/* LINKDLL int majuscule(signed char []); */ +LINKDLL int majuscule( char [] ) ; +#endif + +LINKDLL int stricmp( const char * s1 , const char * s2 ) ; /* Fonction permettant de faire des comparaisons de chaine en majuscule */ +LINKDLL char * strnew( const double ) ; +LINKDLL int str( char *, double const ) ; /* Fonction permettant de remplir une chaine de caracteres avec un entier */ +LINKDLL char * strbstr( char *, const char * ) ; /* Fonction permettant de retrouver une sous-chaine dans une autre en partant de la fin */ +LINKDLL char * strcatc( char *, const char ) ; /* Fonction permettant de concatener un caractere a la fin d'une chaine de caracteres */ +LINKDLL char * strbcat( const char *, char * ) ; /* Fonction permettant de concatener la premiere chaine au debut de la seconde */ + /* strbcat = fonction ko */ +LINKDLL int strrepeat( char *, const char *, const unsigned int ) ; /* Fonction permettant de construire une chaine de caracteres par repetition d'une autre chaine */ + +LINKDLL double val( const char [] ) ; /* Fonction transformant une chaine de caracteres en rel (double) */ + +LINKDLL char * copynew( char const [], int const, int const ) ; +LINKDLL int copy( char * , const char * , const int , const int ) ; /* Fonction permetant de des carateres d'une chaine dans une autre */ + +LINKDLL int pos( const char * , const char * ) ; /* Fonction permettant de retrouver la position d'une chaine dans une autre chaine */ +LINKDLL int posc( const char , const char * ) ; /* Fonction permettant de retrouver le position d'un caractere dans une chaine */ +LINKDLL int posi( const char * , const char * , const int ) ; /* Fonction permettant de retrouver le position d'un caractere dans une chaine a partir d'une position donnee */ +LINKDLL int posic( const char , const char *, const int ) ; /* Fonction permettant de retrouver le position d'un caractere dans une chaine a partir d'une position donnee */ + +LINKDLL int posn( const char * , const char * ) ; /* Fonction permettant de retrouver la position d'une chaine dans une autre en partant de la fin */ +LINKDLL int posnc( const char , const char * ) ; /* Fonction permettant de retrouver la position d'un caractere dans une chaine en partant de la fin */ + +LINKDLL int mpos( const char * , const char * ) ; /* Fonction permettant de retrouver la position d'une chaine dans une autre sans regarder la casse */ +LINKDLL int strinf( const char * , const char * ) ; /* Procdure permettant de tester l'infriorit de deux chanes de caractres */ + +LINKDLL char * delnew( const char * , const int , const int ) ; +LINKDLL int del( char * , const int , const int ) ; /* Fonction permettant de supprimer une partie d'une chaine de caracteres */ + +LINKDLL char * insertnew( const char * , const char * , const int ) ; +LINKDLL int insert( char *, const char * , const int ) ; /* Fonction permettant d'inserer une chaine dans une autre */ + +LINKDLL int replacec( char *, const char , const char ) ; /* Fonction permettant de remplacer un caractere par un autre dans toute une chaine */ +LINKDLL int remplacec( char *, const char , const char ) ; /* Fonction permettant de remplacer un caractere par un autre dans toute une chaine */ +LINKDLL int replace( char *, const char * , const char * ) ; /* Fonction permettant de remplacer une chaine par une autre dans toute une chaine */ +LINKDLL int remplace( char *, const char * , const char * ) ; /* Fonction permettant de remplacer une chaine par une autre dans toute une chaine */ + +LINKDLL char * itos( const int i); /* Conversion d'entier en chaine de caracteres */ +LINKDLL int matchpattern( const char * pattern, const char * st) ; /* Procedure permettant de verifier si une chaine match avec un pattern acceptant les caracteres jocker * et les ? */ +LINKDLL int strscan( const char * st, const char * sep, ... ) ; /* Procedure permettant de rechercher dans une chaine de caracteres st les diffrents parametres de type char* separes par le(s) caractere(s) sep */ + +LINKDLL int rpad( char * st, const unsigned int len, const char motif ) ;/* rpad - ajout le motif droite jusqu' obtenir une longueur totale de n */ +LINKDLL int drpad( char * st, const unsigned int len ) ; /* rpad - ajout des espace droite jusqu' obtenir une longueur totale de n */ +LINKDLL int lpad( char * st, const unsigned int len, const char motif ) ; /* lpad - ajout le motif gauche jusqu' obtenir une longueur totale de n */ +LINKDLL int dlpad( char * st, const int len ) ; /* dlpad - ajout des espace gauche jusqu' obtenir une longueur totale de n */ +LINKDLL int rtrim( char * st, const char * motif ) ; /* rtrim - supprime droite les caractres de la chaine motif */ +LINKDLL int drtrim( char * st ) ; /* drtrim - supprime droite les espaces tabulation et retour chariot */ +LINKDLL int ltrim( char * st, const char * motif ) ; /* ltrim - supprime gauche les caractres de la chaine motif */ +LINKDLL int dltrim( char * st ) ; /* dltrim - supprime gauche les espaces tabulation et retour chariot */ +LINKDLL int trim( char * st, const char * motif ) ; /* trim - supprime gauche et droite les caractres de la chaine motif */ +LINKDLL int dtrim( char * st ) ; /* dtrim - supprime gauche et droite les espaces tabulation et retour chariot */ + +LINKDLL int scanparam( char *, int *, char **argv, char * ) ; /* Fonction permettant de recuperer un argument de la ligne de commande et de le mettre dans la variable buf */ +LINKDLL int scanparam1( char * st , int * , char ** argv ) ; /* Fonction permettant de recuperer un flag de la ligne de commande*/ + +LINKDLL int param_init( const int argc, const char **argv ) ; /* Copie la ligne de commande dans un tableau interne */ +LINKDLL int param_nbr( void ) ; /* Donne le nombre d'arguments restant */ +LINKDLL char ** param_tab( void ) ; /* Renvoie le tableau de paramtres restants */ +LINKDLL int param_scan1( const char * val ) ; /* Test l'existance d'un flag et le supprime */ +LINKDLL int param_scan( const char * val, char * st ) ; /* Test l'existance d'un paramtre et le supprime */ +LINKDLL char * param_get( const int nb ) ; /* Rcupre le contenu d'un paramtre */ +LINKDLL void param_print( void ) ; /* Affiche le buffer interne */ +LINKDLL void param_clean( void ) ; /* Vide le buffer interne */ + +/************************************************************************** + FONCTIONS DE GESTION DE DATE +**************************************************************************/ +LINKDLL int adddate( const int, char * ) ; /* Calcul de la date partir d'aujourd'hui +/- n secondes */ +#ifndef CPPLUS +LINKDLL void mysleep( const double delay ) ; /* Fonction d'attente de delay seconds */ +#endif + +/************************************************************************** + FONCTIONS MATHEMATIQUES +**************************************************************************/ +LINKDLL double sqr( const double ) ; +LINKDLL double myabs( const double ) ; + + +LINKDLL double mymin( const double , const double ) ; +LINKDLL int mymini( const int , const int ) ; +LINKDLL double mymax( const double , const double ) ; +LINKDLL int mymaxi( const int , const int ) ; +LINKDLL int sgn( const double ) ; + +/************************************************************************** + GENERATEUR DE NOMBRES ALEATOIRES +**************************************************************************/ +LINKDLL void myrandseed( const int ) ; +LINKDLL double myrandomd( void ) ; +LINKDLL int myrandom( const int ) ; +LINKDLL void myrandomize( void ) ; + +/********************************************************************************************* + GESTION DES ERREURS ERRNO +*********************************************************************************************/ +LINKDLL char *sterrno( const int value ) ; /* Fonction permettant de retrouver le libell d'une erreur a partir de la valeur errno */ +LINKDLL char *ssterrno( const char * code ) ; /* Fonction permettant de retrouver le libell d'une erreur a partir du code errno */ + +/************************************************************************** + ACCES AUX FICHIERS +**************************************************************************/ +LINKDLL int existfile( const char * ) ; /* Teste l'existance d'un fichier */ +LINKDLL int existdir( const char * ) ; /* Teste l'existance d'un repertoire */ +LINKDLL int existlink( const char * ) ; /* Teste l'existance d'un lien symbolique */ +LINKDLL int exist( const char * ) ; /* Teste l'existance d'un fichier ou d'un repertoire ou d'un lien symbolique */ +LINKDLL long filesize( const char * ) ; /* Donne la taille d'un fichier */ +LINKDLL int rmalldir( const char * ) ; /* Spprime toute une arborescence */ +LINKDLL time_t filetime( const char * ) ; /* Recupere la date de derniere modification d'un fichier */ +//LINKDLL void dirname( const char *, char * ) ; /* Rcupre le rpertoire dans un chemin, "" si vide */ + +#ifndef PERSOPORT +LINKDLL void basename( const char *, char * ) ; /* Rcupre le nom de fichier dans un chemin, "" si vide */ +#endif + +LINKDLL void URLencode( char * ) ; /* Procedure d'encodage des parametes d'une URL ( ' ' -> '+', et ? -> %XX ) */ +LINKDLL void URLencodeFilename( char * ) ; /* Procedure d'encodage des chemins d'une URL ( ? -> %XX y compris pour les ' ' ) */ +LINKDLL void URLdecode( char * ) ; /* Procedure de decodage d'une URL (remplace les %XX par leur valeur) */ +LINKDLL int URLread( const char * URL, char * protocol, char * user, char * password, char * adress, char * port, char * path, char * name, char * param ) ; /* Procedure de lecture des elements d'une URL au format: protocol://user:password@adress:port/path/filename?param */ + +#endif + +/* Partie specifique au C++ */ +#ifdef CPPLUS + +LINKDLLCPP char * strcat( char * , const char ) ; /* Fonction permettant de concatener un caractere a la fin d'une chaine de caracteres */ +LINKDLLCPP int pos( const char , const char * ) ; /* Fonction permettant de retrouver le position d'un caractere dans une chaine */ +LINKDLLCPP int posn( const char , const char * ) ; /* Fonction permettant de retrouver la position d'un caractere dans une chaine en partant de la fin */ +LINKDLLCPP int remplace( char * , const char , const char ) ; /* Fonction permettant de remplacer un caractere par un autre dans toute une chaine */ + +/************************************************************************** + CLASSE T-WEB +**************************************************************************/ +#ifndef TWEB +#define TWEB +class LINKDLLCPP TWeb { + public: + TWeb() ; + ~TWeb() ; + int readcmd() ; + int getcmdlen() ; + int getcmd( char st[] ) ; + int getarg( char arg[], char st[] ) ; + + void contenttype() ; + void write( char st[] ) ; + void writeln( char st[] ) ; + void getenv( char env[], char st[] ) ; + void writeenv() ; + private: + int readget() ; + int readpost() ; + void decode( char st[] ) ; + char * lcmd, * meth ; + } ; +#endif + +/************************************************************************** + CLASSE T-FILE +**************************************************************************/ +#ifndef TFILE +#define TFILE +class LINKDLLCPP TFile { + public: + TFile( void ) { vDIR = NULL ; vDirent = NULL ; maskDIR = NULL ; maskFILE = NULL ; maskMAJ = 0 ; } + ~TFile( void ) ; + int setmask( char * mask, int maskMAJ = 0 ) ; + int nextfile( char * stfile ) ; + int prevfile( char * stfile ) ; + int dir( void ) ; + int dir( char * mask ) ; + void rewind( void ) ; + + static const int MAJ; + + private: + bool testfile( char * stfile ) ; + void info( void ) ; + + DIR * vDIR ; + struct dirent * vDirent ; + char * maskDIR, * maskFILE ; + int maskMAJ ; + } ; + +#endif + +#endif /* Fin de la partie spcifique C++ */ + + +/* +typedef long time_t; +typedef long _ssize_t; +typedef _ssize_t ssize_t; +typedef unsigned int size_t; +*/ diff --git a/src/cstdlib2/tools.o b/src/cstdlib2/tools.o new file mode 100644 index 0000000..c20f830 Binary files /dev/null and b/src/cstdlib2/tools.o differ diff --git a/src/cstdlib2/tools_h.c b/src/cstdlib2/tools_h.c new file mode 100644 index 0000000..498c030 --- /dev/null +++ b/src/cstdlib2/tools_h.c @@ -0,0 +1,538 @@ +/* tools.h library for large systems - small embedded systems use clibrary.c instead */ +#include "tools.c" +#include "../interpreter.h" + +/* la commande bc est incluse dans le tools.h */ +#include "bc_eval.c" + +/* Les commandes encode64 et decode64 sont incluses dans le tools.h */ +#include "base64.c" + +/* Les commandes MD5Cal et MD5CalFile sont incluses dans le tools.h */ +#include "md5.c" + +/* Les commandes bcrypt sont incluses dans le bcrypt.h */ +#include "bcrypt.c" + +#include + +/* handy structure definitions */ +const char ToolsDefs[] = "\ +#define E EXIT(0)\n\ +#define L LIST(NULL)\n\ +"; + +/* tools calls */ +void ToolsPrintversion_tools(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + printversion_tools() ; +} +void ToolsMaj(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = maj( Param[0]->Val->Integer ) ; +} +void ToolsMajuscule(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = majuscule( Param[0]->Val->Pointer ) ; +} +void ToolsStrnew(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Pointer = strnew( Param[0]->Val->FP ) ; +} +void ToolsStr(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = str( Param[0]->Val->Pointer, Param[1]->Val->FP ) ; +} +void ToolsStrbstr(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Pointer = strbstr( Param[0]->Val->Pointer, Param[1]->Val->Pointer ) ; +} +void ToolsStrcatc(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Pointer = strcatc( Param[0]->Val->Pointer, Param[1]->Val->Integer ) ; +} +void ToolsStrbcat(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Pointer = strbcat( Param[0]->Val->Pointer, Param[1]->Val->Pointer ) ; +} +void ToolsStrrepeat(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = strrepeat( Param[0]->Val->Pointer, Param[1]->Val->Pointer, Param[2]->Val->Integer ) ; +} +void ToolsVal(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->FP = val( Param[0]->Val->Pointer ) ; +} +void ToolsCopynew(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Pointer = copynew( Param[0]->Val->Pointer, Param[1]->Val->Integer, Param[2]->Val->Integer ) ; +} +void ToolsCopy(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = copy( Param[0]->Val->Pointer, Param[1]->Val->Pointer, Param[2]->Val->Integer, Param[3]->Val->Integer ) ; +} +void ToolsPos(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = pos( Param[0]->Val->Pointer, Param[1]->Val->Pointer ) ; +} +void ToolsPosc(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = posc( Param[0]->Val->Integer, Param[1]->Val->Pointer ) ; +} +void ToolsPosi(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = posi( Param[0]->Val->Pointer, Param[1]->Val->Pointer, Param[2]->Val->Integer ) ; +} +void ToolsPosic(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = posic( Param[0]->Val->Integer, Param[1]->Val->Pointer, Param[2]->Val->Integer ) ; +} +void ToolsPosn(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = posn( Param[0]->Val->Pointer, Param[1]->Val->Pointer ) ; +} +void ToolsPosnc(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = posnc( Param[0]->Val->Integer, Param[1]->Val->Pointer ) ; +} +void ToolsMpos(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = mpos( Param[0]->Val->Pointer, Param[1]->Val->Pointer ) ; +} +void ToolsStrinf(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = strinf( Param[0]->Val->Pointer, Param[1]->Val->Pointer ) ; +} +void ToolsDelnew(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Pointer = delnew( Param[0]->Val->Pointer, Param[1]->Val->Integer, Param[2]->Val->Integer ) ; +} +void ToolsDel(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = del( Param[0]->Val->Pointer, Param[1]->Val->Integer, Param[2]->Val->Integer ) ; +} +void ToolsInsertnew(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Pointer = insertnew( Param[0]->Val->Pointer, Param[1]->Val->Pointer, Param[2]->Val->Integer ) ; +} +void ToolsInsert(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = insert( Param[0]->Val->Pointer, Param[1]->Val->Pointer, Param[2]->Val->Integer ) ; +} +void ToolsReplacec(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = replacec( Param[0]->Val->Pointer, Param[1]->Val->Integer, Param[2]->Val->Integer ) ; +} +void ToolsRemplacec(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = remplacec( Param[0]->Val->Pointer, Param[1]->Val->Integer, Param[2]->Val->Integer ) ; +} +void ToolsReplace(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = replace( Param[0]->Val->Pointer, Param[1]->Val->Pointer, Param[2]->Val->Pointer ) ; +} +void ToolsRemplace(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = remplace( Param[0]->Val->Pointer, Param[1]->Val->Pointer, Param[2]->Val->Pointer ) ; +} +void ToolsItos(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Pointer = itos( Param[0]->Val->Integer ) ; +} +void ToolsMatchpattern(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = matchpattern( Param[0]->Val->Pointer, Param[1]->Val->Pointer ) ; +} +void ToolsStrscan(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + printf("Not implemented yet!\n"); +} +void ToolsRpad(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = rpad( Param[0]->Val->Pointer, Param[1]->Val->Integer, Param[2]->Val->Integer ) ; +} +void ToolsDrpad(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = drpad( Param[0]->Val->Pointer, Param[1]->Val->Integer ) ; +} +void ToolsLpad(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = lpad( Param[0]->Val->Pointer, Param[1]->Val->Integer, Param[2]->Val->Integer ) ; +} +void ToolsDlpad(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = dlpad( Param[0]->Val->Pointer, Param[1]->Val->Integer ) ; +} +void ToolsRtrim(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = rtrim( Param[0]->Val->Pointer, Param[1]->Val->Pointer ) ; +} +void ToolsDrtrim(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = drtrim( Param[0]->Val->Pointer ) ; +} +void ToolsLtrim(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = ltrim( Param[0]->Val->Pointer, Param[1]->Val->Pointer ) ; +} +void ToolsDltrim(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = dltrim( Param[0]->Val->Pointer ) ; +} +void ToolsTrim(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = trim( Param[0]->Val->Pointer, Param[1]->Val->Pointer ) ; +} +void ToolsDtrim(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = dtrim( Param[0]->Val->Pointer ) ; +} +void ToolsScanparam(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = scanparam( Param[0]->Val->Pointer, Param[1]->Val->Pointer, Param[2]->Val->Pointer, Param[3]->Val->Pointer ) ; +} +void ToolsScanparam1(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = scanparam1( Param[0]->Val->Pointer, Param[1]->Val->Pointer, Param[2]->Val->Pointer ) ; +} +void ToolsParam_init(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = param_init( Param[0]->Val->Integer, Param[1]->Val->Pointer ) ; +} +void ToolsParam_nbr(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = param_nbr() ; +} +void ToolsParam_tab(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Pointer = param_tab() ; +} +void ToolsParam_scan1(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = param_scan1( Param[0]->Val->Pointer ) ; +} +void ToolsParam_scan(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = param_scan( Param[0]->Val->Pointer, Param[1]->Val->Pointer ) ; +} +void ToolsParam_get(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Pointer = param_get( Param[0]->Val->Integer ) ; +} +void ToolsParam_print(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + param_print(); +} +void ToolsParam_clean(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + param_clean(); +} +void ToolsAdddate(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = adddate( Param[0]->Val->Integer, Param[1]->Val->Pointer ) ; +} +void ToolsSqr(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->FP = sqr( Param[0]->Val->FP ) ; +} +void ToolsMyabs(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->FP = myabs( Param[0]->Val->FP ) ; +} +void ToolsMymin(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->FP = mymin( Param[0]->Val->FP, Param[1]->Val->FP ) ; +} +void ToolsMymini(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = mymini( Param[0]->Val->Integer, Param[1]->Val->Integer ) ; +} +void ToolsMymax(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->FP = mymax( Param[0]->Val->FP, Param[1]->Val->FP ) ; +} +void ToolsMymaxi(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = mymaxi( Param[0]->Val->Integer, Param[1]->Val->Integer ) ; +} +void ToolsSgn(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = sgn( Param[0]->Val->FP ) ; +} +void ToolsMyrandseed(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + myrandseed( Param[0]->Val->Integer ) ; +} +void ToolsMyrandomd(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->FP = myrandomd() ; +} +void ToolsMyrandom(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = myrandom( Param[0]->Val->Integer ) ; +} +void ToolsMyrandomize(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + myrandomize() ; +} +void ToolsSterrno(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Pointer = sterrno( Param[0]->Val->Integer ) ; +} +void ToolsSsterrno(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Pointer = ssterrno( Param[0]->Val->Pointer ) ; +} +void ToolsExistfile(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = existfile( Param[0]->Val->Pointer ) ; +} +void ToolsExistdir(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = existdir( Param[0]->Val->Pointer ) ; +} +void ToolsExistlink(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = existlink( Param[0]->Val->Pointer ) ; +} +void ToolsExist(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = exist( Param[0]->Val->Pointer ) ; +} +void ToolsFilesize(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = filesize( Param[0]->Val->Pointer ) ; +} +void ToolsRmalldir(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = rmalldir( Param[0]->Val->Pointer ) ; +} +void ToolsFiletime(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = filetime( Param[0]->Val->Pointer ) ; +} +void ToolsDirname(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Pointer = dirname( Param[0]->Val->Pointer ) ; +} +void ToolsBasename(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Pointer = basename( Param[0]->Val->Pointer ) ; +} +void ToolsURLencode(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + URLencode( Param[0]->Val->Pointer ) ; +} +void ToolsURLencodeFilename(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + URLencodeFilename( Param[0]->Val->Pointer ) ; +} +void ToolsURLdecode(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + URLdecode( Param[0]->Val->Pointer ) ; +} + +void ToolsURLread(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = URLread( Param[0]->Val->Pointer, Param[1]->Val->Pointer, Param[2]->Val->Pointer, Param[3]->Val->Pointer, Param[4]->Val->Pointer, Param[5]->Val->Pointer, Param[6]->Val->Pointer, Param[7]->Val->Pointer, Param[8]->Val->Pointer ) ; +} + +void ToolsBcEval(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->FP = bc_eval( Param[0]->Val->Pointer ) ; +} + +void ToolsEncode64(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + encode64( Param[0]->Val->Pointer, Param[1]->Val->Pointer, Param[2]->Val->Integer ) ; +} + +void ToolsDecode64(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = decode64( Param[0]->Val->Pointer ) ; +} + +void ToolsMD5Cal(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + MD5Cal( Param[0]->Val->Pointer, Param[1]->Val->Pointer ) ; +} + +void ToolsMD5CalFile(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + MD5CalFile( Param[0]->Val->Pointer, Param[1]->Val->Pointer ) ; +} + +void ToolsBcryptTestPattern(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = bcrypt_test_pattern( Param[0]->Val->Pointer, Param[1]->Val->Integer ) ; +} + +void ToolsBcryptInit(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + bcrypt_init( Param[0]->Val->Integer ) ; +} + +void ToolsBcryptString(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = bcrypt_string( Param[0]->Val->Pointer, Param[1]->Val->Pointer, Param[2]->Val->Integer, Param[3]->Val->Pointer, Param[4]->Val->Pointer, Param[1]->Val->Integer) ; +} + +void ToolsBuncryptString(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = buncrypt_string( Param[0]->Val->Pointer, Param[1]->Val->Pointer, Param[2]->Val->Integer, Param[3]->Val->Pointer, Param[4]->Val->Pointer) ; +} + +void ToolsBcryptStringPrintable(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = bcrypt_string_printable( Param[0]->Val->Pointer, Param[1]->Val->Pointer, Param[2]->Val->Integer, Param[3]->Val->Pointer, Param[4]->Val->Integer) ; +} + +void ToolsBuncryptStringPrintable(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = buncrypt_string_printable( Param[0]->Val->Pointer, Param[1]->Val->Pointer, Param[2]->Val->Integer, Param[3]->Val->Pointer) ; +} + +void ToolsBcryptStringBase64(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = bcrypt_string_base64( Param[0]->Val->Pointer, Param[1]->Val->Pointer, Param[2]->Val->Integer, Param[3]->Val->Pointer, Param[4]->Val->Integer) ; +} + +void ToolsBuncryptStringBase64(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = buncrypt_string_base64( Param[0]->Val->Pointer, Param[1]->Val->Pointer, Param[2]->Val->Integer, Param[3]->Val->Pointer) ; +} + +void ToolsBcryptStringBase64url(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = bcrypt_string_base64url( Param[0]->Val->Pointer, Param[1]->Val->Pointer, Param[2]->Val->Integer, Param[3]->Val->Pointer, Param[4]->Val->Integer) ; +} + +void ToolsBuncryptStringBase64url(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = buncrypt_string_base64url( Param[0]->Val->Pointer, Param[1]->Val->Pointer, Param[2]->Val->Integer, Param[3]->Val->Pointer) ; +} + +void ToolsBcryptStringAuto(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = bcrypt_string_auto( Param[0]->Val->Pointer, Param[1]->Val->Integer, Param[2]->Val->Pointer, Param[3]->Val->Pointer, Param[4]->Val->Integer) ; +} + +void ToolsBuncryptStringAuto(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = buncrypt_string_auto( Param[0]->Val->Pointer, Param[1]->Val->Integer, Param[2]->Val->Pointer, Param[3]->Val->Pointer) ; +} + +void ToolsBcryptFile(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = bcrypt_file( Param[0]->Val->Pointer, Param[1]->Val->Pointer, Param[2]->Val->Pointer, Param[3]->Val->Pointer, Param[4]->Val->Integer) ; +} + +void ToolsBuncryptFile(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = buncrypt_file( Param[0]->Val->Pointer, Param[1]->Val->Pointer, Param[2]->Val->Pointer, Param[3]->Val->Pointer) ; +} + +void ToolsBcryptFilePrintable(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = bcrypt_file_printable( Param[0]->Val->Pointer, Param[1]->Val->Pointer, Param[2]->Val->Pointer, Param[3]->Val->Integer) ; +} + +void ToolsBuncryptFilePrintable(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = buncrypt_file_printable( Param[0]->Val->Pointer, Param[1]->Val->Pointer, Param[2]->Val->Pointer) ; +} + +void ToolsBcryptFileBase64(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = bcrypt_file_base64( Param[0]->Val->Pointer, Param[1]->Val->Pointer, Param[2]->Val->Pointer, Param[3]->Val->Integer) ; +} + +void ToolsBuncryptFileBase64(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = buncrypt_file_base64( Param[0]->Val->Pointer, Param[1]->Val->Pointer, Param[2]->Val->Pointer) ; +} + +void ToolsBcryptFileBase64url(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = bcrypt_file_base64url( Param[0]->Val->Pointer, Param[1]->Val->Pointer, Param[2]->Val->Pointer, Param[3]->Val->Integer) ; +} + +void ToolsBuncryptFileBase64url(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = buncrypt_file_base64url( Param[0]->Val->Pointer, Param[1]->Val->Pointer, Param[2]->Val->Pointer) ; +} + +void ToolsBcryptFileAuto(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = bcrypt_file_auto( Param[0]->Val->Pointer, Param[1]->Val->Pointer, Param[2]->Val->Pointer, Param[3]->Val->Integer) ; +} + +void ToolsBuncryptFileAuto(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = buncrypt_file_auto( Param[0]->Val->Pointer, Param[1]->Val->Pointer, Param[2]->Val->Pointer) ; +} + +void ToolsPrintHelp(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs); + +void ToolsPrintHelp(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + char * pst = Param[0]->Val->Pointer ; + if( pst != NULL ) { if( strlen( pst ) > 0 ) { + if( !strcmp( pst, "tools.h" ) ) { PrintHelp( pst, ToolsFunctions, ToolsDefs ) ; } + else if( !strcmp( pst, "dirent.h" ) ) { PrintHelp( pst, DirentFunctions, DirentDefs ) ; } + else if( !strcmp( pst, "math.h" ) ) { PrintHelp( pst, MathFunctions, NULL ) ; } + else if( !strcmp( pst, "mini.h" ) ) { PrintHelp( pst, MiniFunctions, MiniDefs ) ; } + else if( !strcmp( pst, "popen.h" ) ) { PrintHelp( pst, PopenFunctions, PopenDefs ) ; } + else if( !strcmp( pst, "stdbool.h" ) ) { PrintHelp( pst, NULL, StdboolDefs ) ; } + else if( !strcmp( pst, "stdio.h" ) ) { PrintHelp( pst, StdioFunctions, StdioDefs ) ; } + else if( !strcmp( pst, "stdlib.h" ) ) { PrintHelp( pst, StdlibFunctions, NULL ) ; } + else if( !strcmp( pst, "string.h" ) ) { PrintHelp( pst, StringFunctions, NULL ) ; } + else if( !strcmp( pst, "time.h" ) ) { PrintHelp( pst, StdTimeFunctions, StdTimeDefs ) ; } + else if( !strcmp( pst, "types.h" ) ) { PrintHelp( pst, TypesFunctions, TypesDefs ) ; } + else if( !strcmp( pst, "unistd.h" ) ) { PrintHelp( pst, UnistdFunctions, UnistdDefs ) ; } + else if( !strcmp( pst, "stat.h" ) ) { PrintHelp( pst, StatFunctions, StatDefs ) ; } + else if( !strcmp( pst, "various.h" ) ) { PrintHelp( pst, VariousFunctions, VariousDefs ) ; } + else if( !strcmp( pst, "regex.h" ) ) { PrintHelp( pst, RegexFunctions, RegexDefs ) ; } + else if( !strcmp( pst, "socket.h" ) ) { PrintHelp( pst, SocketFunctions, SocketDefs ) ; } +#ifdef WIN + else if( !strcmp( pst, "win.h" ) ) { PrintHelp( pst, WinFunctions, WinDefs ) ; } +#endif + else { printf( "Unknown prototype filename !\n" ) ; } + } else { + printf( "Avalaible libraries:\n" ) ; + printf( "dirent.h, regex.h, math.h, popen.h, socket.h, stat.h, stdbool.h, stdio.h, stdlib.h, string.h, time.h, types.h, unistd.h, various.h, win.h" ) ; + printf( "\n" ) ; + } + } +} + +/* all tools.h functions */ +struct LibraryFunction ToolsFunctions[] = +{ + { ToolsPrintversion_tools, "void printversion_tools( void ) ;" }, + { ToolsMaj, "int maj( int ) ;" }, + { ToolsMajuscule, "int majuscule( signed char * ) ;" }, + { ToolsStrnew, "char * strnew( double ) ;" }, + { ToolsStr, "int str( char *, double ) ;" }, + { ToolsStrbstr, "char * strbstr( char *, char * ) ;" } , + { ToolsStrcatc, "char * strcatc( char *, char ) ;" } , + { ToolsStrbcat, "char * strbcat( char *, char * ) ;" }, + { ToolsStrrepeat, "int strrepeat( char *, char *, unsigned int ) ;" } , + { ToolsVal, "double val( char * ) ; " }, + { ToolsCopynew, "char * copynew( char *, int, int ) ;" }, + { ToolsCopy, "int copy( char *, char *, int, int ) ;" }, + { ToolsPos, "int pos( char *, char * ) ;" }, + { ToolsPosc, "int posc( char, char * ) ;" }, + { ToolsPosi, "int posi( char *, char *, int ) ;" }, + { ToolsPosic, "int posic( char, char *, int ) ;" }, + { ToolsPosn, "int posn( char *, char * ) ;" }, + { ToolsPosnc, "int posnc( char, char * ) ;" }, + { ToolsMpos, "int mpos( char *, char * ) ;" }, + { ToolsStrinf, "int strinf( char *, char * ) ;" }, + { ToolsDelnew, "char * delnew( char *, int, int ) ;" }, + { ToolsDel, "int del( char *, int, int ) ;" }, + { ToolsInsertnew, "char * insertnew( char *, char *, int ) ;" }, + { ToolsInsert, "int insert( char *, char *, int ) ;" }, + { ToolsReplacec, "int replacec( char *, char, char ) ;" }, + { ToolsRemplacec, "int remplacec( char *, char, char ) ;" }, + { ToolsReplace, "int replace( char *, char *, char * ) ;" }, + { ToolsRemplace, "int remplace( char *, char *, char * ) ;" }, + { ToolsItos, "char * itos( int i ) ;" }, + { ToolsMatchpattern, "int matchpattern( char * pattern, char * st) ;" }, + { ToolsStrscan, "int strscan( char * st, char * sep, ... ) ;" }, + { ToolsRpad, "int rpad( char * st, unsigned int len, char motif ) ;" }, + { ToolsDrpad, "int drpad( char * st, unsigned int len ) ;" }, + { ToolsLpad, "int lpad( char * st, unsigned int len, char motif ) ;" }, + { ToolsDlpad, "int dlpad( char * st, int len ) ;" }, + { ToolsRtrim, "int rtrim( char * st, char * motif ) ;" }, + { ToolsDrtrim, "int drtrim( char * st ) ;" }, + { ToolsLtrim, "int ltrim( char * st, char * motif ) ;" }, + { ToolsDltrim, "int dltrim( char * st ) ;" }, + { ToolsTrim, "int trim( char * st, char * motif ) ;" }, + { ToolsDtrim, "int dtrim( char * st ) ;" }, + { ToolsScanparam, "int scanparam( char *, int *, char **argv, char * ) ;" }, + { ToolsScanparam1, "int scanparam1( char * st, int *, char ** argv ) ;" }, + { ToolsParam_init, "int param_init( int argc, char **argv ) ;" }, + { ToolsParam_nbr, "int param_nbr( void ) ;" }, + { ToolsParam_tab, "char ** param_tab( void ) ;" }, + { ToolsParam_scan1, "int param_scan1( char * val ) ;" }, + { ToolsParam_scan, "int param_scan( char * val, char * st ) ;" }, + { ToolsParam_get, "char * param_get( int nb ) ;" }, + { ToolsParam_print, "void param_print( void ) ;" }, + { ToolsParam_clean, "void param_clean( void ) ;" }, + { ToolsAdddate, "int adddate( int, char * ) ;" }, + { ToolsSqr, "double sqr( double ) ;" }, + { ToolsMyabs, "double myabs( double ) ;" }, + { ToolsMymin, "double mymin( double, double ) ;" }, + { ToolsMymini, "int mymini( int, int ) ;" }, + { ToolsMymax, "double mymax( double, double ) ;" }, + { ToolsMymaxi, "int mymaxi( int, int ) ;" }, + { ToolsSgn, "int sgn( double ) ;" }, + { ToolsMyrandseed, "void myrandseed( int ) ;" }, + { ToolsMyrandomd, "double myrandomd( void ) ;" }, + { ToolsMyrandom, "int myrandom( int ) ;" }, + { ToolsMyrandomize, "void myrandomize( void ) ;" }, + { ToolsSterrno, "char *sterrno( int value ) ;" }, + { ToolsSsterrno, "char *ssterrno( char * code ) ;" }, + { ToolsExistfile, "int existfile( char * ) ;" }, + { ToolsExistdir, "int existdir( char * ) ;" }, + { ToolsExistlink, "int existlink( char * ) ;" }, + { ToolsExist, "int exist( char * ) ;" }, + { ToolsFilesize, "long filesize( char * ) ;" }, + { ToolsRmalldir, "int rmalldir( char * ) ;" }, + { ToolsFiletime, "time_t filetime( char * ) ;" }, + { ToolsDirname, "char * dirname( char * ) ;" }, + { ToolsBasename, "char * basename( char * ) ;" }, + { ToolsURLencode, "void URLencode( char * ) ;" }, + { ToolsURLencodeFilename, "void URLencodeFilename( char * ) ;" }, + { ToolsURLdecode, "void URLdecode( char * ) ;" }, + { ToolsURLread, "int URLread( char * URL, char * protocol, char * user, char * password, char * adress, char * port, char * path, char * name, char * param ) ;" }, + { ToolsBcEval, "double bc( char * str ) ;" }, + { ToolsEncode64, "void base64_encode( char * orig, char * dest, int nbcar) ;" }, + { ToolsDecode64, "int base64_decode( char * buffer ) ;" }, + { ToolsMD5Cal, "void MD5Cal( char * inString, char * outString ) ;" }, + { ToolsMD5CalFile, "void MD5CalFile (char * filename, char * outString ) ;" }, + { ToolsBcryptTestPattern, "int bcrypt_test_pattern( char * pattern, unsigned int pattern_length ) ;" }, + { ToolsBcryptInit, "void bcrypt_init( long t ) ;" }, + { ToolsBcryptString, "int bcrypt_string( char * st_in, char * st_out, unsigned int length, char * init_pattern, char * key, unsigned int maxlinesize ) ;" }, + { ToolsBuncryptString, "int buncrypt_string( char * st_in, char * st_out, unsigned int length, char * init_pattern, char * key ) ;" }, + { ToolsBcryptStringPrintable, "int bcrypt_string_printable( char * st_in, char * st_out, unsigned int length, char * key, unsigned int maxlinesize ) ;" }, + { ToolsBuncryptStringPrintable, "int buncrypt_string_printable( char * st_in, char * st_out, unsigned int length, char * key ) ;" }, + { ToolsBcryptStringBase64, "int bcrypt_string_base64( char * st_in, char * st_out, unsigned int length, char * key, unsigned int maxlinesize ) ;" }, + { ToolsBuncryptStringBase64, "int buncrypt_string_base64( char * st_in, char * st_out, unsigned int length, char * key ) ;" }, + { ToolsBcryptStringBase64url, "int bcrypt_string_base64url( char * st_in, char * st_out, unsigned int length, char * key, unsigned int maxlinesize ) ;" }, + { ToolsBuncryptStringBase64url, "int buncrypt_string_base64url( char * st_in, char * st_out, unsigned int length, char * key ) ;" }, + { ToolsBcryptStringAuto, "int bcrypt_string_auto( char * st, unsigned int length, char * init_pattern, char * key, unsigned int maxlinesize ) ;" }, + { ToolsBuncryptStringAuto, "int buncrypt_string_auto( char * st, unsigned int length, char * init_pattern, char * key ) ;" }, + { ToolsBcryptFile, "int bcrypt_file( char * filename_in, char * filename_out, char * init_pattern, char * key, unsigned int maxlinesize ) ;" }, + { ToolsBuncryptFile, "int buncrypt_file( char * filename_in, char * filename_out, char * init_pattern, char * key ) ;" }, + { ToolsBcryptFilePrintable, "int bcrypt_file_printable( char * filename_in, char * filename_out, char * key, unsigned int maxlinesize ) ;" }, + { ToolsBuncryptFilePrintable, "int buncrypt_file_printable( char * filename, char * filename_out, char * key ) ;" }, + { ToolsBcryptFileBase64, "int bcrypt_file_base64( char * filename_in, char * filename_out, char * key, unsigned int maxlinesize ) ;" }, + { ToolsBuncryptFileBase64, "int buncrypt_file_base64( char * filename, char * filename_out, char * key ) ;" }, + { ToolsBcryptFileBase64url, "int bcrypt_file_base64url( char * filename_in, char * filename_out, char * key, unsigned int maxlinesize ) ;" }, + { ToolsBuncryptFileBase64url, "int buncrypt_file_base64url( char * filename, char * filename_out, char * key ) ;" }, + { ToolsBcryptFileAuto, "int bcrypt_file_auto( char * filename, char * init_pattern, char * key, unsigned int maxlinesize ) ;" }, + { ToolsBuncryptFileAuto, "int buncrypt_file_auto( char * filename, char * init_pattern, char * key ) ;" }, + { ToolsPrintHelp, "void printhelp( char * filename ) ;" }, + { NULL, NULL } +}; + +/* creates various system-dependent definitions */ +void ToolsSetupFunc(Picoc *pc) +{ + + /* make a "struct __DIRStruct" which is the same size as a native DIR structure */ + /* StructDirType = TypeCreateOpaqueStruct(NULL, TableStrRegister("__DIRStruct"), sizeof(DIR)); */ + + /* get a DIR * type */ + /* DirPtrType = TypeGetMatching(NULL, StructDirType, TypePointer, 0, StrEmpty, TRUE); */ + + /* make a "struct __DirentStruct" which is the same size as a native dirent structure */ + /*TypeCreateOpaqueStruct(NULL, TableStrRegister("__DirentStruct"), sizeof(struct dirent));*/ + + /* define EOF equal to the system EOF */ +} + + +/* Les commandes mini sont incluses dans le mini.h */ +#include "mini_h.c" + +void IncludeExternalTools(Picoc *pc) { + IncludeRegister(pc, "mini.h", &MiniSetupFunc, &MiniFunctions[0], MiniDefs) ; + IncludeRegister(pc, "tools.h", &ToolsSetupFunc, &ToolsFunctions[0], ToolsDefs) ; +} diff --git a/src/cstdlib2/tools_h.o b/src/cstdlib2/tools_h.o new file mode 100644 index 0000000..b7b7952 Binary files /dev/null and b/src/cstdlib2/tools_h.o differ diff --git a/src/cstdlib2/types.c b/src/cstdlib2/types.c new file mode 100644 index 0000000..684a946 --- /dev/null +++ b/src/cstdlib2/types.c @@ -0,0 +1,37 @@ +/* types.h library for large systems - small embedded systems use clibrary.c instead */ +#include +#include +#include "../interpreter.h" + +/* define definition */ +static int S_PATH_MAX = PATH_MAX ; + +/* handy structure definitions */ +#ifdef WIN32 +const char TypesDefs[] = "\ +typedef unsigned int dev_t ;\n\ +typedef short ino_t ;\n\ +typedef unsigned short mode_t ;\n\ +" ; +#else +const char TypesDefs[] = "\ +typedef unsigned int dev_t ;\n\ +typedef unsigned int ino_t ;\n\ +typedef unsigned int mode_t ;\n\ +typedef unsigned int nlink_t ;\n\ +typedef int blksize_t ;\n\ +typedef long blkcnt_t ;\n\ +" ; +#endif + +/* all types functions */ +struct LibraryFunction TypesFunctions[] = +{ + { NULL, NULL } +} ; + +/* creates various system-dependent definitions */ +void TypesSetupFunc(Picoc *pc) +{ + VariableDefinePlatformVar(pc, NULL, "PATH_MAX", &pc->IntType, (union AnyValue *)&S_PATH_MAX, FALSE); +} diff --git a/src/cstdlib2/types.o b/src/cstdlib2/types.o new file mode 100644 index 0000000..51261b4 Binary files /dev/null and b/src/cstdlib2/types.o differ diff --git a/src/cstdlib2/various.c b/src/cstdlib2/various.c new file mode 100644 index 0000000..613b8b7 --- /dev/null +++ b/src/cstdlib2/various.c @@ -0,0 +1,154 @@ +#include "../interpreter.h" +#include +#include "tools.h" + +/* Equivalent des #define NAME VALUE */ +static int RAND_MAXValue = RAND_MAX ; + +#ifndef WIN32 +#ifdef AIX_HOST +#include +#else +#include +#endif +#else +pid_t wait( int *status ) ; +pid_t waitpid(pid_t pid, int *status, int options) ; +#endif + +extern int ParseInteractiveMode ; + +int existfile( const char * filename ) ; + +void VariousBcopy(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + memcpy( Param[1]->Val->Pointer, Param[0]->Val->Pointer, Param[2]->Val->Integer ) ; +} + +void VariousBzero(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + memset( Param[0]->Val->Pointer, 0, Param[1]->Val->Integer ) ; +} + +void VariousWait(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = wait( Param[0]->Val->Pointer ); +} + +void VariousWaitpid(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = waitpid( Param[0]->Val->Integer, Param[1]->Val->Pointer, Param[2]->Val->Integer ); +} + +void PicocPlatformScanFile(const char *FileName) ; +void VariousInclude(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + int return_code = 0 ; + if( ParseInteractiveMode ) { + fprintf( stderr, "This function is not available in interactive mode !\n" ) ; + ReturnValue->Val->Integer = -1 ; + return ; + } + if( !existfile( Param[0]->Val->Pointer ) ) { + return_code = -1 ; + fprintf( stderr, "Unable to open file %s !\n", (char*)Param[0]->Val->Pointer ) ; + } else { + PicocPlatformScanFile( Param[0]->Val->Pointer ) ; + return_code = 0 ; + } + ReturnValue->Val->Integer = return_code ; +} + +void PicocParse(const char *FileName, const char *Source, int SourceLen, int RunIt, int CleanupNow, int CleanupSource, int EnableDebugger) ; +void VariousIncludeStr(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + int return_code = 0 ; + char * str = Param[0]->Val->Pointer ; + if( ParseInteractiveMode ) { + fprintf( stderr, "This function is not available in interactive mode !\n" ) ; + ReturnValue->Val->Integer = -1 ; + return ; + } + if( (str!=NULL) && (strlen(str)>0) ) { + PicocParse("nofile", str, strlen(str), TRUE, FALSE, TRUE, TRUE ) ; + } else { + return_code = -1 ; + } + ReturnValue->Val->Integer = return_code ; +} + +void VariousEXIT(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + exit( Param[0]->Val->Integer ) ; +} + +/* list all the strings (complete le fichier table.c) */ +int TableList( Picoc *pc, char * st ) +{ + int nb=0 ; + struct TableEntry *Entry; + struct TableEntry *NextEntry; + int Count; + + for (Count = 0; Count < (pc->StringTable).Size; Count++) + { + for (Entry = (pc->StringTable).HashTable[Count]; Entry != NULL; Entry = NextEntry) + { + NextEntry = Entry->Next; + if( (st == NULL) || (strlen(st)==0) ) { + printf("%s\n",&Entry->p.Key[0]) ; + nb++ ; + } else if ( matchpattern(st,&Entry->p.Key[0]) ) { + if( (strstr(&Entry->p.Key[0],"*")==NULL) && (strstr(&Entry->p.Key[0],"?")==NULL) ) { + printf("%s\n",&Entry->p.Key[0]) ; + nb++ ; + } + } + + } + } + return nb; +} + +void VariousLIST(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + int nb = TableList( Parser->pc, Param[0]->Val->Pointer ) ; + printf( "Total: %d\n",nb ) ; + ReturnValue->Val->Integer = nb ; +} + +#ifdef WIN32 +#include "rundll.c" +int runDLL( char * dllname, char * functionname, void * param ) ; +void VariousRunDLL(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = runDLL( Param[0]->Val->Pointer, Param[1]->Val->Pointer, Param[2]->Val->Pointer ) ; +} +#endif + +/* handy structure definitions */ +const char VariousDefs[] = "\ +"; + + +/* all various.h functions */ +struct LibraryFunction VariousFunctions[] = +{ + { VariousBcopy, "void bcopy( void *src, void *dest, size_t n ) ;" }, + { VariousBzero, "void bzero( void *s, size_t n ) ;" }, + { VariousWait, "pid_t wait( int *status ) ;" }, + { VariousWaitpid, "pid_t waitpid( pid_t pid, int *status, int options ) ;" }, + { VariousInclude, "int INCLUDE( char * filename ) ;" }, + { VariousIncludeStr, "int INCLUDESTR( char * str ) ;" }, + { VariousEXIT, "void EXIT( int retval ) ;" }, + { VariousLIST, "int LIST( char * st ) ;" }, +#ifdef WIN32 + { VariousRunDLL, "int rundll( char * dllname, char * functionname, void * param ) ;" }, +#endif + { NULL, NULL } +}; + +/* creates various system-dependent definitions */ +void VariousSetupFunc(Picoc *pc) +{ + /* define definitions */ + VariableDefinePlatformVar(pc, NULL, "RAND_MAX", &pc->IntType, (union AnyValue *)&RAND_MAXValue, FALSE); +} diff --git a/src/cstdlib2/various.o b/src/cstdlib2/various.o new file mode 100644 index 0000000..0804cfd Binary files /dev/null and b/src/cstdlib2/various.o differ diff --git a/src/cstdlib2/win.c b/src/cstdlib2/win.c new file mode 100644 index 0000000..b2b520d --- /dev/null +++ b/src/cstdlib2/win.c @@ -0,0 +1,281 @@ +#include "../interpreter.h" + +//#define _WIN32_WINNT 0x0500 +#include + +#include "keyb.c" + +/* Equivalent des #define NAME VALUE */ +static int S_SW_FORCEMINIMIZE = SW_FORCEMINIMIZE ; +static int S_SW_HIDE = SW_HIDE ; +static int S_SW_MAXIMIZE = SW_MAXIMIZE ; +static int S_SW_MINIMIZE = SW_MINIMIZE ; +static int S_SW_RESTORE = SW_RESTORE ; +static int S_SW_SHOW = SW_SHOW ; +static int S_SW_SHOWDEFAULT = SW_SHOWDEFAULT ; +static int S_SW_SHOWMAXIMIZED = SW_SHOWMAXIMIZED ; +static int S_SW_SHOWMINIMIZED = SW_SHOWMINIMIZED ; +static int S_SW_SHOWMINNOACTIVE = SW_SHOWMINNOACTIVE ; +static int S_SW_SHOWNA = SW_SHOWNA ; +static int S_SW_SHOWNOACTIVATE = SW_SHOWNOACTIVATE ; +static int S_SW_SHOWNORMAL = SW_SHOWNORMAL ; + +static int S_HWND_BOTTOM = 1 ; +static int S_HWND_NOTOPMOST = -2 ; +static int S_HWND_TOP = 0 ; +static int S_HWND_TOPMOST = -1 ; +static int S_SWP_ASYNCWINDOWPOS = SWP_ASYNCWINDOWPOS ; +static int S_SWP_DEFERERASE = SWP_DEFERERASE ; +static int S_SWP_DRAWFRAME = SWP_DRAWFRAME ; +static int S_SWP_FRAMECHANGED = SWP_FRAMECHANGED ; +static int S_SWP_HIDEWINDOW = SWP_HIDEWINDOW ; +static int S_SWP_NOACTIVATE = SWP_NOACTIVATE ; +static int S_SWP_NOCOPYBITS = SWP_NOCOPYBITS ; +static int S_SWP_NOMOVE = SWP_NOMOVE ; +static int S_SWP_NOOWNERZORDER = SWP_NOOWNERZORDER ; +static int S_SWP_NOREDRAW = SWP_NOREDRAW ; +static int S_SWP_NOREPOSITION = SWP_NOREPOSITION ; +static int S_SWP_NOSENDCHANGING = SWP_NOSENDCHANGING ; +static int S_SWP_NOSIZE = SWP_NOSIZE ; +static int S_SWP_NOZORDER = SWP_NOZORDER ; +static int S_SWP_SHOWWINDOW = SWP_SHOWWINDOW ; + +static int S_WM_COMMAND = WM_COMMAND ; +static int S_WM_SYSCOMMAND = WM_SYSCOMMAND ; +static int S_SC_MAXIMIZE = SC_MAXIMIZE ; +static int S_SC_MINIMIZE = SC_MINIMIZE ; +static int S_SC_CLOSE = SC_CLOSE ; + +/* handy structure definitions */ +/*typedef struct hwnd { HWND * ptr ; } HWNDStruct ;*/ +int matchpattern( const char * pattern, const char * st) ; + +/* define definition */ +const char WinDefs[] = "\ +typedef struct __HWNDStruct HWND ;\n\ +typedef char * LPCTSTR ;\n\ +typedef int BOOL ;\n\ +typedef unsigned int UINT ;\n\ +typedef unsigned int WPARAM ;\n\ +typedef long LPARAM ;\n\ +typedef long LRESULT ;\n\ +"; + +void WinMsgBox(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + MessageBox( NULL, Param[1]->Val->Pointer, Param[0]->Val->Pointer, MB_OK ) ; +} +void WinGetForegroundWindow(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Pointer = GetForegroundWindow() ; +} +void WinGetWindowText(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + GetWindowText( Param[0]->Val->Pointer, Param[1]->Val->Pointer, Param[2]->Val->Integer ) ; +} +void WinShowWindow(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = ShowWindow( Param[0]->Val->Pointer, Param[1]->Val->Integer ) ; +} +void WinFindWindow(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Pointer = FindWindow( Param[0]->Val->Pointer, Param[1]->Val->Pointer ) ; +} +void WindowActive( HWND hwnd ) { + if ( hwnd!=0 ) { + if( IsIconic( hwnd ) ) ShowWindow( hwnd, SW_RESTORE ) ; + else ShowWindow(hwnd, SW_SHOW); + SetForegroundWindow( hwnd ) ; + SetActiveWindow( hwnd ) ; + SetCapture( hwnd ) ; + } + } +void WinActiveWindow(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + WindowActive( Param[0]->Val->Pointer ) ; +} + +BOOL CALLBACK EnumWndProcActive( HWND hwnd, LPARAM pPattern ) { + char title[1024] ; + if( hwnd != 0 ) if( IsWindow( hwnd ) ) { + if( GetWindowText( hwnd, title, 1024 ) ) { + if( strlen( title ) > 0 ) + if( matchpattern( (char*)pPattern, title ) ) { + if( IsIconic( hwnd ) ) ShowWindow( hwnd, SW_RESTORE ) ; + else ShowWindow(hwnd, SW_SHOW); + SetActiveWindow( hwnd ); + SetForegroundWindow ( hwnd ); + return FALSE ; + } + } + } + return TRUE ; + } +int WindowActivePattern(LPCTSTR Name) { + EnumWindows(EnumWndProcActive,(LPARAM)Name) ; + return 0 ; + } +void WinActiveWindowWithPattern(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = WindowActivePattern( Param[0]->Val->Pointer ) ; +} +void WinCloseWindow(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + SendMessage( Param[0]->Val->Pointer, WM_SYSCOMMAND, SC_CLOSE, (LPARAM)NULL ); + } + +void WinBringWindowToTop(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = BringWindowToTop( Param[0]->Val->Pointer ) ; +} + +void WinSetWindowPos(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + HWND hWndInsertAfter ; + switch((int)Param[1]->Val->Pointer) { + case 1: hWndInsertAfter = HWND_BOTTOM ; break ; + case -2: hWndInsertAfter = HWND_NOTOPMOST ; break ; + case 0: hWndInsertAfter = HWND_TOP ; break ; + case -1: hWndInsertAfter = HWND_TOPMOST ; break ; + default: hWndInsertAfter = Param[1]->Val->Pointer ; break ; + } + ReturnValue->Val->Integer = SetWindowPos( Param[0]->Val->Pointer, hWndInsertAfter, Param[2]->Val->Integer, Param[3]->Val->Integer, Param[4]->Val->Integer, Param[5]->Val->Integer, Param[6]->Val->Integer ) ; +} +void WinSendMessage(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = SendMessage( Param[0]->Val->Pointer, Param[1]->Val->Integer, Param[2]->Val->Integer, Param[3]->Val->Integer ) ; +} +void WinSleep(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + Sleep( Param[0]->Val->Integer ) ; +} + +void WinWindowMaximize(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + SendMessage( Param[0]->Val->Pointer, WM_SYSCOMMAND, SC_MAXIMIZE, (LPARAM)NULL ); +} +void WinWindowMinimize(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + SendMessage( Param[0]->Val->Pointer, WM_SYSCOMMAND, SC_MINIMIZE, (LPARAM)NULL ); +} + +BOOL CALLBACK EnumWndProcMinimizeAll(HWND hFen,LPARAM pLstWnd) { + if( IsWindowVisible( hFen ) ) + if( !IsIconic( hFen ) ) + SendMessage( hFen, WM_SYSCOMMAND, SC_MINIMIZE, (LPARAM)NULL ); + return TRUE; + } +void WinMinimizeAllWindows(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + EnumWindows(EnumWndProcMinimizeAll,(LPARAM)NULL) ; +} +BOOL CALLBACK EnumWndProcMaximizeAll(HWND hFen,LPARAM pLstWnd) { + if( IsWindowVisible( hFen ) && IsWindow( hFen ) ) + ShowWindow( hFen, SW_RESTORE ); + return TRUE; + } +void WinMaximizeAllWindows(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + EnumWindows(EnumWndProcMaximizeAll,(LPARAM)NULL) ; +} + +void WinSendKeyboard(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + RunKeyboard( Param[0]->Val->Pointer ) ; +} + +void WinSetCursorPos(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = SetCursorPos( Param[0]->Val->Integer, Param[1]->Val->Integer ) ; +} +void WinMouseLeftClick(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0); + mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0); +} +void WinMouseRightClick(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + mouse_event(MOUSEEVENTF_RIGHTDOWN, 0, 0, 0, 0); + mouse_event(MOUSEEVENTF_RIGHTUP, 0, 0, 0, 0); +} + +void WinMouseDoubleClick(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0); + mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0); + mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0); + mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0); + ShowCursor( TRUE ) ; +} +void WinShowCursor(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = ShowCursor( Param[0]->Val->Integer ) ; +} + +/* all various.h functions */ +struct LibraryFunction WinFunctions[] = +{ + { WinMsgBox, "void MsgBox( LPCTSTR title, LPCTSTR msg ) ;" }, + { WinGetForegroundWindow, "HWND GetForegroundWindow( void ) ;" }, + { WinGetWindowText, "void GetWindowText( HWND hWnd, LPCTSTR lpString, int nMaxCount ) ;" }, + { WinShowWindow, "BOOL ShowWindow( HWND hWnd, int nCmdShow ) ; " }, + { WinFindWindow, "HWND FindWindow( LPCTSTR lpClassName, LPCTSTR lpWindowName ) ;" }, + { WinActiveWindow, "void ActiveWindow( HWND hwnd ) ;" }, + { WinActiveWindowWithPattern, "int ActiveWindowWithPattern( LPCTSTR lpWindowName ) ;" }, + { WinCloseWindow, "void CloseWindow( HWND hwnd ) ;" }, + { WinBringWindowToTop, "BOOL BringWindowToTop( HWND hwnd ) ;" }, + { WinSetWindowPos, "BOOL SetWindowPos( HWND hWnd, void* hWndInsertAfter, int X, int Y, int cx, int cy, UINT uFlags ) ;" }, + { WinSendMessage, "LRESULT SendMessage( HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam ) ;" }, + { WinSleep, "void Sleep( long time ) ;" }, + { WinWindowMaximize, "void MaximizeWindow( HWND hwnd ) ;" }, + { WinWindowMinimize, "void MinimizeWindow( HWND hwnd ) ;" }, + { WinMaximizeAllWindows, "void MaximizeAllWindows( void ) ;" }, + { WinMinimizeAllWindows, "void MinimizeAllWindows( void ) ;" }, + { WinSendKeyboard, "void SendKeyboard( char * keys ) ;" }, + { WinSetCursorPos, "BOOL SetCursorPos( int X, int Y ) ;" }, + { WinMouseLeftClick, "void MouseLeftClick( void ) ;" }, + { WinMouseRightClick, "void MouseRightClick( void ) ;" }, + { WinMouseDoubleClick, "void MouseDoubleClick( void ) ;" }, + { WinShowCursor, "int ShowCursor( BOOL bShow ) ;" }, + { NULL, NULL } +}; + +/* creates various system-dependent definitions */ +void WinSetupFunc(Picoc *pc) +{ + /* define definitions */ + TypeCreateOpaqueStruct(pc, NULL, TableStrRegister(pc, "__HWNDStruct"), sizeof(HWND)); + + /* define definitions */ + VariableDefinePlatformVar(pc, NULL, "SW_FORCEMINIMIZE", &pc->IntType, (union AnyValue *)&S_SW_FORCEMINIMIZE, FALSE); + VariableDefinePlatformVar(pc, NULL, "SW_HIDE", &pc->IntType, (union AnyValue *)&S_SW_HIDE, FALSE); + VariableDefinePlatformVar(pc, NULL, "SW_MAXIMIZE", &pc->IntType, (union AnyValue *)&S_SW_MAXIMIZE, FALSE); + VariableDefinePlatformVar(pc, NULL, "SW_MINIMIZE", &pc->IntType, (union AnyValue *)&S_SW_MINIMIZE, FALSE); + VariableDefinePlatformVar(pc, NULL, "SW_RESTORE", &pc->IntType, (union AnyValue *)&S_SW_RESTORE, FALSE); + VariableDefinePlatformVar(pc, NULL, "SW_SHOW", &pc->IntType, (union AnyValue *)&S_SW_SHOW, FALSE); + VariableDefinePlatformVar(pc, NULL, "SW_SHOWDEFAULT", &pc->IntType, (union AnyValue *)&S_SW_SHOWDEFAULT, FALSE); + VariableDefinePlatformVar(pc, NULL, "SW_SHOWMAXIMIZED", &pc->IntType, (union AnyValue *)&S_SW_SHOWMAXIMIZED, FALSE); + VariableDefinePlatformVar(pc, NULL, "SW_SHOWMINIMIZED", &pc->IntType, (union AnyValue *)&S_SW_SHOWMINIMIZED, FALSE); + VariableDefinePlatformVar(pc, NULL, "SW_SHOWMINNOACTIVE", &pc->IntType, (union AnyValue *)&S_SW_SHOWMINNOACTIVE, FALSE); + VariableDefinePlatformVar(pc, NULL, "SW_SHOWNA", &pc->IntType, (union AnyValue *)&S_SW_SHOWNA, FALSE); + VariableDefinePlatformVar(pc, NULL, "SW_SHOWNOACTIVATE", &pc->IntType, (union AnyValue *)&S_SW_SHOWNOACTIVATE, FALSE); + VariableDefinePlatformVar(pc, NULL, "SW_SHOWNORMAL", &pc->IntType, (union AnyValue *)&S_SW_SHOWNORMAL, FALSE); + + VariableDefinePlatformVar(pc, NULL, "HWND_BOTTOM", &pc->IntType, (union AnyValue *)&S_HWND_BOTTOM, FALSE); + VariableDefinePlatformVar(pc, NULL, "HWND_NOTOPMOST", &pc->IntType, (union AnyValue *)&S_HWND_NOTOPMOST, FALSE); + VariableDefinePlatformVar(pc, NULL, "HWND_TOP", &pc->IntType, (union AnyValue *)&S_HWND_TOP, FALSE); + VariableDefinePlatformVar(pc, NULL, "HWND_TOPMOST", &pc->IntType, (union AnyValue *)&S_HWND_TOPMOST, FALSE); + VariableDefinePlatformVar(pc, NULL, "SWP_ASYNCWINDOWPOS", &pc->IntType, (union AnyValue *)&S_SWP_ASYNCWINDOWPOS, FALSE); + VariableDefinePlatformVar(pc, NULL, "SWP_DEFERERASE", &pc->IntType, (union AnyValue *)&S_SWP_DEFERERASE, FALSE); + VariableDefinePlatformVar(pc, NULL, "SWP_DRAWFRAME", &pc->IntType, (union AnyValue *)&S_SWP_DRAWFRAME, FALSE); + VariableDefinePlatformVar(pc, NULL, "SWP_FRAMECHANGED", &pc->IntType, (union AnyValue *)&S_SWP_FRAMECHANGED, FALSE); + VariableDefinePlatformVar(pc, NULL, "SWP_HIDEWINDOW", &pc->IntType, (union AnyValue *)&S_SWP_HIDEWINDOW, FALSE); + VariableDefinePlatformVar(pc, NULL, "SWP_NOACTIVATE", &pc->IntType, (union AnyValue *)&S_SWP_NOACTIVATE, FALSE); + VariableDefinePlatformVar(pc, NULL, "SWP_NOCOPYBITS", &pc->IntType, (union AnyValue *)&S_SWP_NOCOPYBITS, FALSE); + VariableDefinePlatformVar(pc, NULL, "SWP_NOMOVE", &pc->IntType, (union AnyValue *)&S_SWP_NOMOVE, FALSE); + VariableDefinePlatformVar(pc, NULL, "SWP_NOOWNERZORDER", &pc->IntType, (union AnyValue *)&S_SWP_NOOWNERZORDER, FALSE); + VariableDefinePlatformVar(pc, NULL, "SWP_NOREDRAW", &pc->IntType, (union AnyValue *)&S_SWP_NOREDRAW, FALSE); + VariableDefinePlatformVar(pc, NULL, "SWP_NOREPOSITION", &pc->IntType, (union AnyValue *)&S_SWP_NOREPOSITION, FALSE); + VariableDefinePlatformVar(pc, NULL, "SWP_NOSENDCHANGING", &pc->IntType, (union AnyValue *)&S_SWP_NOSENDCHANGING, FALSE); + VariableDefinePlatformVar(pc, NULL, "SWP_NOSIZE", &pc->IntType, (union AnyValue *)&S_SWP_NOSIZE, FALSE); + VariableDefinePlatformVar(pc, NULL, "SWP_NOZORDER", &pc->IntType, (union AnyValue *)&S_SWP_NOZORDER, FALSE); + VariableDefinePlatformVar(pc, NULL, "SWP_SHOWWINDOW", &pc->IntType, (union AnyValue *)&S_SWP_SHOWWINDOW, FALSE); + + VariableDefinePlatformVar(pc, NULL, "S_WM_COMMAND", &pc->IntType, (union AnyValue *)&S_WM_COMMAND, FALSE); + VariableDefinePlatformVar(pc, NULL, "S_WM_SYSCOMMAND", &pc->IntType, (union AnyValue *)&S_WM_SYSCOMMAND, FALSE); + VariableDefinePlatformVar(pc, NULL, "S_SC_MAXIMIZE", &pc->IntType, (union AnyValue *)&S_SC_MAXIMIZE, FALSE); + VariableDefinePlatformVar(pc, NULL, "S_SC_MINIMIZE", &pc->IntType, (union AnyValue *)&S_SC_MINIMIZE, FALSE); + VariableDefinePlatformVar(pc, NULL, "S_SC_CLOSE", &pc->IntType, (union AnyValue *)&S_SC_CLOSE, FALSE); +} + + +/* +HWND hwnd; hwnd=GetForegroundWindow() ; +ActiveWindowWithPattern( "*Bloc*" ); hwnd=GetForegroundWindow() ; SendKeyboard("Ceci est un test !!!" ); +SetWindowPos(hwnd,HWND_TOP,10,10,0,0,SWP_NOSIZE|SWP_NOZORDER); +char buffer[1024]; +GetWindowText(hwnd, buffer, 1024 ); +GetWindowText(hwnd, buffer, 1024 ); +printf("%s\n",buffer); +hwnd=FindWindow(NULL,"Sans titre - Bloc-notes"); +WindowMaximize(hwnd); +WindowMinimize(hwnd); +*/ diff --git a/src/cstdlib2/win.o b/src/cstdlib2/win.o new file mode 100644 index 0000000..27152a3 Binary files /dev/null and b/src/cstdlib2/win.o differ diff --git a/src/debug.c b/src/debug.c new file mode 100644 index 0000000..6e83be9 --- /dev/null +++ b/src/debug.c @@ -0,0 +1,126 @@ +/* picoc interactive debugger */ + +#ifndef NO_DEBUGGER + +#include "interpreter.h" + +#define BREAKPOINT_HASH(p) ( ((unsigned long)(p)->FileName) ^ (((p)->Line << 16) | ((p)->CharacterPos << 16)) ) + +/* initialise the debugger by clearing the breakpoint table */ +void DebugInit(Picoc *pc) +{ + TableInitTable(&pc->BreakpointTable, &pc->BreakpointHashTable[0], BREAKPOINT_TABLE_SIZE, TRUE); + pc->BreakpointCount = 0; +} + +/* free the contents of the breakpoint table */ +void DebugCleanup(Picoc *pc) +{ + struct TableEntry *Entry; + struct TableEntry *NextEntry; + int Count; + + for (Count = 0; Count < pc->BreakpointTable.Size; Count++) + { + for (Entry = pc->BreakpointHashTable[Count]; Entry != NULL; Entry = NextEntry) + { + NextEntry = Entry->Next; + HeapFreeMem(pc, Entry); + } + } +} + +/* search the table for a breakpoint */ +static struct TableEntry *DebugTableSearchBreakpoint(struct ParseState *Parser, int *AddAt) +{ + struct TableEntry *Entry; + Picoc *pc = Parser->pc; + int HashValue = BREAKPOINT_HASH(Parser) % pc->BreakpointTable.Size; + + for (Entry = pc->BreakpointHashTable[HashValue]; Entry != NULL; Entry = Entry->Next) + { + if (Entry->p.b.FileName == Parser->FileName && Entry->p.b.Line == Parser->Line && Entry->p.b.CharacterPos == Parser->CharacterPos) + return Entry; /* found */ + } + + *AddAt = HashValue; /* didn't find it in the chain */ + return NULL; +} + +/* set a breakpoint in the table */ +void DebugSetBreakpoint(struct ParseState *Parser) +{ + int AddAt; + struct TableEntry *FoundEntry = DebugTableSearchBreakpoint(Parser, &AddAt); + Picoc *pc = Parser->pc; + + if (FoundEntry == NULL) + { + /* add it to the table */ + struct TableEntry *NewEntry = HeapAllocMem(pc, sizeof(struct TableEntry)); + if (NewEntry == NULL) + ProgramFailNoParser(pc, "out of memory"); + + NewEntry->p.b.FileName = Parser->FileName; + NewEntry->p.b.Line = Parser->Line; + NewEntry->p.b.CharacterPos = Parser->CharacterPos; + NewEntry->Next = pc->BreakpointHashTable[AddAt]; + pc->BreakpointHashTable[AddAt] = NewEntry; + pc->BreakpointCount++; + } +} + +/* delete a breakpoint from the hash table */ +int DebugClearBreakpoint(struct ParseState *Parser) +{ + struct TableEntry **EntryPtr; + Picoc *pc = Parser->pc; + int HashValue = BREAKPOINT_HASH(Parser) % pc->BreakpointTable.Size; + + for (EntryPtr = &pc->BreakpointHashTable[HashValue]; *EntryPtr != NULL; EntryPtr = &(*EntryPtr)->Next) + { + struct TableEntry *DeleteEntry = *EntryPtr; + if (DeleteEntry->p.b.FileName == Parser->FileName && DeleteEntry->p.b.Line == Parser->Line && DeleteEntry->p.b.CharacterPos == Parser->CharacterPos) + { + *EntryPtr = DeleteEntry->Next; + HeapFreeMem(pc, DeleteEntry); + pc->BreakpointCount--; + + return TRUE; + } + } + + return FALSE; +} + +/* before we run a statement, check if there's anything we have to do with the debugger here */ +void DebugCheckStatement(struct ParseState *Parser) +{ + int DoBreak = FALSE; + int AddAt; + Picoc *pc = Parser->pc; + + /* has the user manually pressed break? */ + if (pc->DebugManualBreak) + { + PlatformPrintf(pc->CStdOut, "break\n"); + DoBreak = TRUE; + pc->DebugManualBreak = FALSE; + } + + /* is this a breakpoint location? */ + if (Parser->pc->BreakpointCount != 0 && DebugTableSearchBreakpoint(Parser, &AddAt) != NULL) + DoBreak = TRUE; + + /* handle a break */ + if (DoBreak) + { + PlatformPrintf(pc->CStdOut, "Handling a break\n"); + PicocParseInteractiveNoStartPrompt(pc, FALSE); + } +} + +void DebugStep() +{ +} +#endif /* !NO_DEBUGGER */ diff --git a/src/debug.o b/src/debug.o new file mode 100644 index 0000000..710aa23 Binary files /dev/null and b/src/debug.o differ diff --git a/src/expression.c b/src/expression.c new file mode 100644 index 0000000..60de722 --- /dev/null +++ b/src/expression.c @@ -0,0 +1,1588 @@ +/* picoc expression evaluator - a stack-based expression evaluation system + * which handles operator precedence */ + +#include "interpreter.h" + +/* whether evaluation is left to right for a given precedence level */ +#define IS_LEFT_TO_RIGHT(p) ((p) != 2 && (p) != 14) +#define BRACKET_PRECEDENCE 20 + +/* If the destination is not float, we can't assign a floating value to it, we need to convert it to integer instead */ +#define ASSIGN_FP_OR_INT(value) \ + if (IS_FP(BottomValue)) { ResultFP = ExpressionAssignFP(Parser, BottomValue, value); } \ + else { ResultInt = ExpressionAssignInt(Parser, BottomValue, (long)(value), FALSE); ResultIsInt = TRUE; } \ + +#define DEEP_PRECEDENCE (BRACKET_PRECEDENCE*1000) + +#ifdef DEBUG_EXPRESSIONS +#define debugf printf +#else +void debugf(char *Format, ...) +{ +} +#endif + +/* local prototypes */ +enum OperatorOrder +{ + OrderNone, + OrderPrefix, + OrderInfix, + OrderPostfix +}; + +/* a stack of expressions we use in evaluation */ +struct ExpressionStack +{ + struct ExpressionStack *Next; /* the next lower item on the stack */ + struct Value *Val; /* the value for this stack node */ + enum LexToken Op; /* the operator */ + short unsigned int Precedence; /* the operator precedence of this node */ + unsigned char Order; /* the evaluation order of this operator */ +}; + +/* operator precedence definitions */ +struct OpPrecedence +{ + unsigned int PrefixPrecedence:4; + unsigned int PostfixPrecedence:4; + unsigned int InfixPrecedence:4; + char *Name; +}; + +/* NOTE: the order of this array must correspond exactly to the order of these tokens in enum LexToken */ +static struct OpPrecedence OperatorPrecedence[] = +{ + /* TokenNone, */ { 0, 0, 0, "none" }, + /* TokenComma, */ { 0, 0, 0, "," }, + /* TokenAssign, */ { 0, 0, 2, "=" }, /* TokenAddAssign, */ { 0, 0, 2, "+=" }, /* TokenSubtractAssign, */ { 0, 0, 2, "-=" }, + /* TokenMultiplyAssign, */ { 0, 0, 2, "*=" }, /* TokenDivideAssign, */ { 0, 0, 2, "/=" }, /* TokenModulusAssign, */ { 0, 0, 2, "%=" }, + /* TokenShiftLeftAssign, */ { 0, 0, 2, "<<=" }, /* TokenShiftRightAssign, */ { 0, 0, 2, ">>=" }, /* TokenArithmeticAndAssign, */ { 0, 0, 2, "&=" }, + /* TokenArithmeticOrAssign, */ { 0, 0, 2, "|=" }, /* TokenArithmeticExorAssign, */ { 0, 0, 2, "^=" }, + /* TokenQuestionMark, */ { 0, 0, 3, "?" }, /* TokenColon, */ { 0, 0, 3, ":" }, + /* TokenLogicalOr, */ { 0, 0, 4, "||" }, + /* TokenLogicalAnd, */ { 0, 0, 5, "&&" }, + /* TokenArithmeticOr, */ { 0, 0, 6, "|" }, + /* TokenArithmeticExor, */ { 0, 0, 7, "^" }, + /* TokenAmpersand, */ { 14, 0, 8, "&" }, + /* TokenEqual, */ { 0, 0, 9, "==" }, /* TokenNotEqual, */ { 0, 0, 9, "!=" }, + /* TokenLessThan, */ { 0, 0, 10, "<" }, /* TokenGreaterThan, */ { 0, 0, 10, ">" }, /* TokenLessEqual, */ { 0, 0, 10, "<=" }, /* TokenGreaterEqual, */ { 0, 0, 10, ">=" }, + /* TokenShiftLeft, */ { 0, 0, 11, "<<" }, /* TokenShiftRight, */ { 0, 0, 11, ">>" }, + /* TokenPlus, */ { 14, 0, 12, "+" }, /* TokenMinus, */ { 14, 0, 12, "-" }, + /* TokenAsterisk, */ { 14, 0, 13, "*" }, /* TokenSlash, */ { 0, 0, 13, "/" }, /* TokenModulus, */ { 0, 0, 13, "%" }, + /* TokenIncrement, */ { 14, 15, 0, "++" }, /* TokenDecrement, */ { 14, 15, 0, "--" }, /* TokenUnaryNot, */ { 14, 0, 0, "!" }, /* TokenUnaryExor, */ { 14, 0, 0, "~" }, /* TokenSizeof, */ { 14, 0, 0, "sizeof" }, /* TokenCast, */ { 14, 0, 0, "cast" }, + /* TokenLeftSquareBracket, */ { 0, 0, 15, "[" }, /* TokenRightSquareBracket, */ { 0, 15, 0, "]" }, /* TokenDot, */ { 0, 0, 15, "." }, /* TokenArrow, */ { 0, 0, 15, "->" }, + /* TokenOpenBracket, */ { 15, 0, 0, "(" }, /* TokenCloseBracket, */ { 0, 15, 0, ")" } +}; + +void ExpressionParseFunctionCall(struct ParseState *Parser, struct ExpressionStack **StackTop, const char *FuncName, int RunIt); + +#ifdef DEBUG_EXPRESSIONS +/* show the contents of the expression stack */ +void ExpressionStackShow(Picoc *pc, struct ExpressionStack *StackTop) +{ + printf("Expression stack [0x%lx,0x%lx]: ", (long)pc->HeapStackTop, (long)StackTop); + + while (StackTop != NULL) + { + if (StackTop->Order == OrderNone) + { + /* it's a value */ + if (StackTop->Val->IsLValue) + printf("lvalue="); + else + printf("value="); + + switch (StackTop->Val->Typ->Base) + { + case TypeVoid: printf("void"); break; + case TypeInt: printf("%d:int", StackTop->Val->Val->Integer); break; + case TypeShort: printf("%d:short", StackTop->Val->Val->ShortInteger); break; + case TypeChar: printf("%d:char", StackTop->Val->Val->Character); break; + case TypeLong: printf("%ld:long", StackTop->Val->Val->LongInteger); break; + case TypeUnsignedShort: printf("%d:unsigned short", StackTop->Val->Val->UnsignedShortInteger); break; + case TypeUnsignedInt: printf("%d:unsigned int", StackTop->Val->Val->UnsignedInteger); break; + case TypeUnsignedLong: printf("%ld:unsigned long", StackTop->Val->Val->UnsignedLongInteger); break; + case TypeFP: printf("%f:fp", StackTop->Val->Val->FP); break; + case TypeFunction: printf("%s:function", StackTop->Val->Val->Identifier); break; + case TypeMacro: printf("%s:macro", StackTop->Val->Val->Identifier); break; + case TypePointer: + if (StackTop->Val->Val->Pointer == NULL) + printf("ptr(NULL)"); + else if (StackTop->Val->Typ->FromType->Base == TypeChar) + printf("\"%s\":string", (char *)StackTop->Val->Val->Pointer); + else + printf("ptr(0x%lx)", (long)StackTop->Val->Val->Pointer); + break; + case TypeArray: printf("array"); break; + case TypeStruct: printf("%s:struct", StackTop->Val->Val->Identifier); break; + case TypeUnion: printf("%s:union", StackTop->Val->Val->Identifier); break; + case TypeEnum: printf("%s:enum", StackTop->Val->Val->Identifier); break; + case Type_Type: PrintType(StackTop->Val->Val->Typ, pc->CStdOut); printf(":type"); break; + default: printf("unknown"); break; + } + printf("[0x%lx,0x%lx]", (long)StackTop, (long)StackTop->Val); + } + else + { + /* it's an operator */ + printf("op='%s' %s %d", OperatorPrecedence[(int)StackTop->Op].Name, + (StackTop->Order == OrderPrefix) ? "prefix" : ((StackTop->Order == OrderPostfix) ? "postfix" : "infix"), + StackTop->Precedence); + printf("[0x%lx]", (long)StackTop); + } + + StackTop = StackTop->Next; + if (StackTop != NULL) + printf(", "); + } + + printf("\n"); +} +#endif + +int IsTypeToken(struct ParseState * Parser, enum LexToken t, struct Value * LexValue) +{ + if (t >= TokenIntType && t <= TokenUnsignedType) + return 1; /* base type */ + + /* typedef'ed type? */ + if (t == TokenIdentifier) /* see TypeParseFront, case TokenIdentifier and ParseTypedef */ + { + struct Value * VarValue; + if (VariableDefined(Parser->pc, LexValue->Val->Pointer)) + { + VariableGet(Parser->pc, Parser, LexValue->Val->Pointer, &VarValue); + if (VarValue->Typ == &Parser->pc->TypeType) + return 1; + } + } + + return 0; +} + +long ExpressionCoerceInteger(struct Value *Val) +{ + switch (Val->Typ->Base) + { + case TypeInt: return (long)Val->Val->Integer; + case TypeChar: return (long)Val->Val->Character; + case TypeShort: return (long)Val->Val->ShortInteger; + case TypeLong: return (long)Val->Val->LongInteger; + case TypeUnsignedInt: return (long)Val->Val->UnsignedInteger; + case TypeUnsignedShort: return (long)Val->Val->UnsignedShortInteger; + case TypeUnsignedLong: return (long)Val->Val->UnsignedLongInteger; + case TypeUnsignedChar: return (long)Val->Val->UnsignedCharacter; + case TypePointer: return (long)Val->Val->Pointer; +#ifndef NO_FP + case TypeFP: return (long)Val->Val->FP; +#endif + default: return 0; + } +} + +unsigned long ExpressionCoerceUnsignedInteger(struct Value *Val) +{ + switch (Val->Typ->Base) + { + case TypeInt: return (unsigned long)Val->Val->Integer; + case TypeChar: return (unsigned long)Val->Val->Character; + case TypeShort: return (unsigned long)Val->Val->ShortInteger; + case TypeLong: return (unsigned long)Val->Val->LongInteger; + case TypeUnsignedInt: return (unsigned long)Val->Val->UnsignedInteger; + case TypeUnsignedShort: return (unsigned long)Val->Val->UnsignedShortInteger; + case TypeUnsignedLong: return (unsigned long)Val->Val->UnsignedLongInteger; + case TypeUnsignedChar: return (unsigned long)Val->Val->UnsignedCharacter; + case TypePointer: return (unsigned long)Val->Val->Pointer; +#ifndef NO_FP + case TypeFP: return (unsigned long)Val->Val->FP; +#endif + default: return 0; + } +} + +#ifndef NO_FP +double ExpressionCoerceFP(struct Value *Val) +{ +#ifndef BROKEN_FLOAT_CASTS + int IntVal; + unsigned UnsignedVal; + + switch (Val->Typ->Base) + { + case TypeInt: IntVal = Val->Val->Integer; return (double)IntVal; + case TypeChar: IntVal = Val->Val->Character; return (double)IntVal; + case TypeShort: IntVal = Val->Val->ShortInteger; return (double)IntVal; + case TypeLong: IntVal = Val->Val->LongInteger; return (double)IntVal; + case TypeUnsignedInt: UnsignedVal = Val->Val->UnsignedInteger; return (double)UnsignedVal; + case TypeUnsignedShort: UnsignedVal = Val->Val->UnsignedShortInteger; return (double)UnsignedVal; + case TypeUnsignedLong: UnsignedVal = Val->Val->UnsignedLongInteger; return (double)UnsignedVal; + case TypeUnsignedChar: UnsignedVal = Val->Val->UnsignedCharacter; return (double)UnsignedVal; + case TypeFP: return Val->Val->FP; + default: return 0.0; + } +#else + switch (Val->Typ->Base) + { + case TypeInt: return (double)Val->Val->Integer; + case TypeChar: return (double)Val->Val->Character; + case TypeShort: return (double)Val->Val->ShortInteger; + case TypeLong: return (double)Val->Val->LongInteger; + case TypeUnsignedInt: return (double)Val->Val->UnsignedInteger; + case TypeUnsignedShort: return (double)Val->Val->UnsignedShortInteger; + case TypeUnsignedLong: return (double)Val->Val->UnsignedLongInteger; + case TypeUnsignedChar: return (double)Val->Val->UnsignedCharacter; + case TypeFP: return (double)Val->Val->FP; + default: return 0.0; + } +#endif +} +#endif + +/* assign an integer value */ +long ExpressionAssignInt(struct ParseState *Parser, struct Value *DestValue, long FromInt, int After) +{ + long Result; + + if (!DestValue->IsLValue) + ProgramFail(Parser, "can't assign to this"); + + if (After) + Result = ExpressionCoerceInteger(DestValue); + else + Result = FromInt; + + switch (DestValue->Typ->Base) + { + case TypeInt: DestValue->Val->Integer = FromInt; break; + case TypeShort: DestValue->Val->ShortInteger = (short)FromInt; break; + case TypeChar: DestValue->Val->Character = (char)FromInt; break; + case TypeLong: DestValue->Val->LongInteger = (long)FromInt; break; + case TypeUnsignedInt: DestValue->Val->UnsignedInteger = (unsigned int)FromInt; break; + case TypeUnsignedShort: DestValue->Val->UnsignedShortInteger = (unsigned short)FromInt; break; + case TypeUnsignedLong: DestValue->Val->UnsignedLongInteger = (unsigned long)FromInt; break; + case TypeUnsignedChar: DestValue->Val->UnsignedCharacter = (unsigned char)FromInt; break; + default: break; + } + return Result; +} + +#ifndef NO_FP +/* assign a floating point value */ +double ExpressionAssignFP(struct ParseState *Parser, struct Value *DestValue, double FromFP) +{ + if (!DestValue->IsLValue) + ProgramFail(Parser, "can't assign to this"); + + DestValue->Val->FP = FromFP; + return FromFP; +} +#endif + +/* push a node on to the expression stack */ +void ExpressionStackPushValueNode(struct ParseState *Parser, struct ExpressionStack **StackTop, struct Value *ValueLoc) +{ + struct ExpressionStack *StackNode = VariableAlloc(Parser->pc, Parser, sizeof(struct ExpressionStack), FALSE); + StackNode->Next = *StackTop; + StackNode->Val = ValueLoc; + *StackTop = StackNode; +#ifdef FANCY_ERROR_MESSAGES + StackNode->Line = Parser->Line; + StackNode->CharacterPos = Parser->CharacterPos; +#endif +#ifdef DEBUG_EXPRESSIONS + ExpressionStackShow(Parser->pc, *StackTop); +#endif +} + +/* push a blank value on to the expression stack by type */ +struct Value *ExpressionStackPushValueByType(struct ParseState *Parser, struct ExpressionStack **StackTop, struct ValueType *PushType) +{ + struct Value *ValueLoc = VariableAllocValueFromType(Parser->pc, Parser, PushType, FALSE, NULL, FALSE); + ExpressionStackPushValueNode(Parser, StackTop, ValueLoc); + + return ValueLoc; +} + +/* push a value on to the expression stack */ +void ExpressionStackPushValue(struct ParseState *Parser, struct ExpressionStack **StackTop, struct Value *PushValue) +{ + struct Value *ValueLoc = VariableAllocValueAndCopy(Parser->pc, Parser, PushValue, FALSE); + ExpressionStackPushValueNode(Parser, StackTop, ValueLoc); +} + +void ExpressionStackPushLValue(struct ParseState *Parser, struct ExpressionStack **StackTop, struct Value *PushValue, int Offset) +{ + struct Value *ValueLoc = VariableAllocValueShared(Parser, PushValue); + ValueLoc->Val = (void *)((char *)ValueLoc->Val + Offset); + ExpressionStackPushValueNode(Parser, StackTop, ValueLoc); +} + +void ExpressionStackPushDereference(struct ParseState *Parser, struct ExpressionStack **StackTop, struct Value *DereferenceValue) +{ + struct Value *DerefVal; + struct Value *ValueLoc; + int Offset; + struct ValueType *DerefType; + int DerefIsLValue; + void *DerefDataLoc = VariableDereferencePointer(Parser, DereferenceValue, &DerefVal, &Offset, &DerefType, &DerefIsLValue); + if (DerefDataLoc == NULL) + ProgramFail(Parser, "NULL pointer dereference"); + + ValueLoc = VariableAllocValueFromExistingData(Parser, DerefType, (union AnyValue *)DerefDataLoc, DerefIsLValue, DerefVal); + ExpressionStackPushValueNode(Parser, StackTop, ValueLoc); +} + +void ExpressionPushInt(struct ParseState *Parser, struct ExpressionStack **StackTop, long IntValue) +{ + struct Value *ValueLoc = VariableAllocValueFromType(Parser->pc, Parser, &Parser->pc->IntType, FALSE, NULL, FALSE); + ValueLoc->Val->Integer = IntValue; + ExpressionStackPushValueNode(Parser, StackTop, ValueLoc); +} + +#ifndef NO_FP +void ExpressionPushFP(struct ParseState *Parser, struct ExpressionStack **StackTop, double FPValue) +{ + struct Value *ValueLoc = VariableAllocValueFromType(Parser->pc, Parser, &Parser->pc->FPType, FALSE, NULL, FALSE); + ValueLoc->Val->FP = FPValue; + ExpressionStackPushValueNode(Parser, StackTop, ValueLoc); +} +#endif + +/* assign to a pointer */ +void ExpressionAssignToPointer(struct ParseState *Parser, struct Value *ToValue, struct Value *FromValue, const char *FuncName, int ParamNo, int AllowPointerCoercion) +{ + struct ValueType *PointedToType = ToValue->Typ->FromType; + + if (FromValue->Typ == ToValue->Typ || FromValue->Typ == Parser->pc->VoidPtrType || (ToValue->Typ == Parser->pc->VoidPtrType && FromValue->Typ->Base == TypePointer)) + ToValue->Val->Pointer = FromValue->Val->Pointer; /* plain old pointer assignment */ + + else if (FromValue->Typ->Base == TypeArray && (PointedToType == FromValue->Typ->FromType || ToValue->Typ == Parser->pc->VoidPtrType)) + { + /* the form is: blah *x = array of blah */ + ToValue->Val->Pointer = (void *)&FromValue->Val->ArrayMem[0]; + } + else if (FromValue->Typ->Base == TypePointer && FromValue->Typ->FromType->Base == TypeArray && + (PointedToType == FromValue->Typ->FromType->FromType || ToValue->Typ == Parser->pc->VoidPtrType) ) + { + /* the form is: blah *x = pointer to array of blah */ + ToValue->Val->Pointer = VariableDereferencePointer(Parser, FromValue, NULL, NULL, NULL, NULL); + } + else if (IS_NUMERIC_COERCIBLE(FromValue) && ExpressionCoerceInteger(FromValue) == 0) + { + /* null pointer assignment */ + ToValue->Val->Pointer = NULL; + } + else if (AllowPointerCoercion && IS_NUMERIC_COERCIBLE(FromValue)) + { + /* assign integer to native pointer */ + ToValue->Val->Pointer = (void *)(unsigned long)ExpressionCoerceUnsignedInteger(FromValue); + } + else if (AllowPointerCoercion && FromValue->Typ->Base == TypePointer) + { + /* assign a pointer to a pointer to a different type */ + ToValue->Val->Pointer = FromValue->Val->Pointer; + } + else + AssignFail(Parser, "%t from %t", ToValue->Typ, FromValue->Typ, 0, 0, FuncName, ParamNo); +} + +/* assign any kind of value */ +void ExpressionAssign(struct ParseState *Parser, struct Value *DestValue, struct Value *SourceValue, int Force, const char *FuncName, int ParamNo, int AllowPointerCoercion) +{ + if (!DestValue->IsLValue && !Force) + AssignFail(Parser, "not an lvalue", NULL, NULL, 0, 0, FuncName, ParamNo); + + if (IS_NUMERIC_COERCIBLE(DestValue) && !IS_NUMERIC_COERCIBLE_PLUS_POINTERS(SourceValue, AllowPointerCoercion)) + AssignFail(Parser, "%t from %t", DestValue->Typ, SourceValue->Typ, 0, 0, FuncName, ParamNo); + + switch (DestValue->Typ->Base) + { + case TypeInt: DestValue->Val->Integer = ExpressionCoerceInteger(SourceValue); break; + case TypeShort: DestValue->Val->ShortInteger = (short)ExpressionCoerceInteger(SourceValue); break; + case TypeChar: DestValue->Val->Character = (char)ExpressionCoerceInteger(SourceValue); break; + case TypeLong: DestValue->Val->LongInteger = ExpressionCoerceInteger(SourceValue); break; + case TypeUnsignedInt: DestValue->Val->UnsignedInteger = ExpressionCoerceUnsignedInteger(SourceValue); break; + case TypeUnsignedShort: DestValue->Val->UnsignedShortInteger = (unsigned short)ExpressionCoerceUnsignedInteger(SourceValue); break; + case TypeUnsignedLong: DestValue->Val->UnsignedLongInteger = ExpressionCoerceUnsignedInteger(SourceValue); break; + case TypeUnsignedChar: DestValue->Val->UnsignedCharacter = (unsigned char)ExpressionCoerceUnsignedInteger(SourceValue); break; + +#ifndef NO_FP + case TypeFP: + if (!IS_NUMERIC_COERCIBLE_PLUS_POINTERS(SourceValue, AllowPointerCoercion)) + AssignFail(Parser, "%t from %t", DestValue->Typ, SourceValue->Typ, 0, 0, FuncName, ParamNo); + + DestValue->Val->FP = ExpressionCoerceFP(SourceValue); + break; +#endif + case TypePointer: + ExpressionAssignToPointer(Parser, DestValue, SourceValue, FuncName, ParamNo, AllowPointerCoercion); + break; + + case TypeArray: + if (SourceValue->Typ->Base == TypeArray && DestValue->Typ->FromType == DestValue->Typ->FromType && DestValue->Typ->ArraySize == 0) + { + /* destination array is unsized - need to resize the destination array to the same size as the source array */ + DestValue->Typ = SourceValue->Typ; + VariableRealloc(Parser, DestValue, TypeSizeValue(DestValue, FALSE)); + + if (DestValue->LValueFrom != NULL) + { + /* copy the resized value back to the LValue */ + DestValue->LValueFrom->Val = DestValue->Val; + DestValue->LValueFrom->AnyValOnHeap = DestValue->AnyValOnHeap; + } + } + + /* char array = "abcd" */ + if (DestValue->Typ->FromType->Base == TypeChar && SourceValue->Typ->Base == TypePointer && SourceValue->Typ->FromType->Base == TypeChar) + { + if (DestValue->Typ->ArraySize == 0) /* char x[] = "abcd", x is unsized */ + { + int Size = strlen(SourceValue->Val->Pointer) + 1; + #ifdef DEBUG_ARRAY_INITIALIZER + PRINT_SOURCE_POS; + fprintf(stderr, "str size: %d\n", Size); + #endif + DestValue->Typ = TypeGetMatching(Parser->pc, Parser, DestValue->Typ->FromType, DestValue->Typ->Base, Size, DestValue->Typ->Identifier, TRUE); + VariableRealloc(Parser, DestValue, TypeSizeValue(DestValue, FALSE)); + } + /* else, it's char x[10] = "abcd" */ + + #ifdef DEBUG_ARRAY_INITIALIZER + PRINT_SOURCE_POS; + fprintf(stderr, "char[%d] from char* (len=%d)\n", DestValue->Typ->ArraySize, strlen(SourceValue->Val->Pointer)); + #endif + memcpy((void *)DestValue->Val, SourceValue->Val->Pointer, TypeSizeValue(DestValue, FALSE)); + break; + } + + if (DestValue->Typ != SourceValue->Typ) + AssignFail(Parser, "%t from %t", DestValue->Typ, SourceValue->Typ, 0, 0, FuncName, ParamNo); + + if (DestValue->Typ->ArraySize != SourceValue->Typ->ArraySize) + AssignFail(Parser, "from an array of size %d to one of size %d", NULL, NULL, DestValue->Typ->ArraySize, SourceValue->Typ->ArraySize, FuncName, ParamNo); + + memcpy((void *)DestValue->Val, (void *)SourceValue->Val, TypeSizeValue(DestValue, FALSE)); + break; + + case TypeStruct: + case TypeUnion: + if (DestValue->Typ != SourceValue->Typ) + AssignFail(Parser, "%t from %t", DestValue->Typ, SourceValue->Typ, 0, 0, FuncName, ParamNo); + + memcpy((void *)DestValue->Val, (void *)SourceValue->Val, TypeSizeValue(SourceValue, FALSE)); + break; + + default: + AssignFail(Parser, "%t", DestValue->Typ, NULL, 0, 0, FuncName, ParamNo); + break; + } +} + +/* evaluate the first half of a ternary operator x ? y : z */ +void ExpressionQuestionMarkOperator(struct ParseState *Parser, struct ExpressionStack **StackTop, struct Value *BottomValue, struct Value *TopValue) +{ + if (!IS_NUMERIC_COERCIBLE(TopValue)) + ProgramFail(Parser, "first argument to '?' should be a number"); + + if (ExpressionCoerceInteger(TopValue)) + { + /* the condition's true, return the BottomValue */ + ExpressionStackPushValue(Parser, StackTop, BottomValue); + } + else + { + /* the condition's false, return void */ + ExpressionStackPushValueByType(Parser, StackTop, &Parser->pc->VoidType); + } +} + +/* evaluate the second half of a ternary operator x ? y : z */ +void ExpressionColonOperator(struct ParseState *Parser, struct ExpressionStack **StackTop, struct Value *BottomValue, struct Value *TopValue) +{ + if (TopValue->Typ->Base == TypeVoid) + { + /* invoke the "else" part - return the BottomValue */ + ExpressionStackPushValue(Parser, StackTop, BottomValue); + } + else + { + /* it was a "then" - return the TopValue */ + ExpressionStackPushValue(Parser, StackTop, TopValue); + } +} + +/* evaluate a prefix operator */ +void ExpressionPrefixOperator(struct ParseState *Parser, struct ExpressionStack **StackTop, enum LexToken Op, struct Value *TopValue) +{ + struct Value *Result; + union AnyValue *ValPtr; + + debugf("ExpressionPrefixOperator()\n"); + switch (Op) + { + case TokenAmpersand: + if (!TopValue->IsLValue) + ProgramFail(Parser, "can't get the address of this"); + + ValPtr = TopValue->Val; + Result = VariableAllocValueFromType(Parser->pc, Parser, TypeGetMatching(Parser->pc, Parser, TopValue->Typ, TypePointer, 0, Parser->pc->StrEmpty, TRUE), FALSE, NULL, FALSE); + Result->Val->Pointer = (void *)ValPtr; + ExpressionStackPushValueNode(Parser, StackTop, Result); + break; + + case TokenAsterisk: + ExpressionStackPushDereference(Parser, StackTop, TopValue); + break; + + case TokenSizeof: + /* return the size of the argument */ + if (TopValue->Typ == &Parser->pc->TypeType) + ExpressionPushInt(Parser, StackTop, TypeSize(TopValue->Val->Typ, TopValue->Val->Typ->ArraySize, TRUE)); + else + ExpressionPushInt(Parser, StackTop, TypeSize(TopValue->Typ, TopValue->Typ->ArraySize, TRUE)); + break; + + default: + /* an arithmetic operator */ +#ifndef NO_FP + if (TopValue->Typ == &Parser->pc->FPType) + { + /* floating point prefix arithmetic */ + double ResultFP = 0.0; + + switch (Op) + { + case TokenPlus: ResultFP = TopValue->Val->FP; break; + case TokenMinus: ResultFP = -TopValue->Val->FP; break; + case TokenIncrement: ResultFP = ExpressionAssignFP(Parser, TopValue, TopValue->Val->FP+1); break; + case TokenDecrement: ResultFP = ExpressionAssignFP(Parser, TopValue, TopValue->Val->FP-1); break; + case TokenUnaryNot: ResultFP = !TopValue->Val->FP; break; + default: ProgramFail(Parser, "invalid operation"); break; + } + + ExpressionPushFP(Parser, StackTop, ResultFP); + } + else +#endif + if (IS_NUMERIC_COERCIBLE(TopValue)) + { + /* integer prefix arithmetic */ + long ResultInt = 0; + long TopInt = ExpressionCoerceInteger(TopValue); + switch (Op) + { + case TokenPlus: ResultInt = TopInt; break; + case TokenMinus: ResultInt = -TopInt; break; + case TokenIncrement: ResultInt = ExpressionAssignInt(Parser, TopValue, TopInt+1, FALSE); break; + case TokenDecrement: ResultInt = ExpressionAssignInt(Parser, TopValue, TopInt-1, FALSE); break; + case TokenUnaryNot: ResultInt = !TopInt; break; + case TokenUnaryExor: ResultInt = ~TopInt; break; + default: ProgramFail(Parser, "invalid operation"); break; + } + + ExpressionPushInt(Parser, StackTop, ResultInt); + } + else if (TopValue->Typ->Base == TypePointer) + { + /* pointer prefix arithmetic */ + int Size = TypeSize(TopValue->Typ->FromType, 0, TRUE); + struct Value *StackValue; + void *ResultPtr; + + if (TopValue->Val->Pointer == NULL) + ProgramFail(Parser, "invalid use of a NULL pointer"); + + if (!TopValue->IsLValue) + ProgramFail(Parser, "can't assign to this"); + + switch (Op) + { + case TokenIncrement: TopValue->Val->Pointer = (void *)((char *)TopValue->Val->Pointer + Size); break; + case TokenDecrement: TopValue->Val->Pointer = (void *)((char *)TopValue->Val->Pointer - Size); break; + default: ProgramFail(Parser, "invalid operation"); break; + } + + ResultPtr = TopValue->Val->Pointer; + StackValue = ExpressionStackPushValueByType(Parser, StackTop, TopValue->Typ); + StackValue->Val->Pointer = ResultPtr; + } + else + ProgramFail(Parser, "invalid operation"); + break; + } +} + +/* evaluate a postfix operator */ +void ExpressionPostfixOperator(struct ParseState *Parser, struct ExpressionStack **StackTop, enum LexToken Op, struct Value *TopValue) +{ + debugf("ExpressionPostfixOperator()\n"); +#ifndef NO_FP + if (TopValue->Typ == &Parser->pc->FPType) + { + /* floating point prefix arithmetic */ + double ResultFP = 0.0; + + switch (Op) + { + case TokenIncrement: ResultFP = ExpressionAssignFP(Parser, TopValue, TopValue->Val->FP+1); break; + case TokenDecrement: ResultFP = ExpressionAssignFP(Parser, TopValue, TopValue->Val->FP-1); break; + default: ProgramFail(Parser, "invalid operation"); break; + } + + ExpressionPushFP(Parser, StackTop, ResultFP); + } + else +#endif + if (IS_NUMERIC_COERCIBLE(TopValue)) + { + long ResultInt = 0; + long TopInt = ExpressionCoerceInteger(TopValue); + switch (Op) + { + case TokenIncrement: ResultInt = ExpressionAssignInt(Parser, TopValue, TopInt+1, TRUE); break; + case TokenDecrement: ResultInt = ExpressionAssignInt(Parser, TopValue, TopInt-1, TRUE); break; + case TokenRightSquareBracket: ProgramFail(Parser, "not supported"); break; /* XXX */ + case TokenCloseBracket: ProgramFail(Parser, "not supported"); break; /* XXX */ + default: ProgramFail(Parser, "invalid operation"); break; + } + + ExpressionPushInt(Parser, StackTop, ResultInt); + } + else if (TopValue->Typ->Base == TypePointer) + { + /* pointer postfix arithmetic */ + int Size = TypeSize(TopValue->Typ->FromType, 0, TRUE); + struct Value *StackValue; + void *OrigPointer = TopValue->Val->Pointer; + + if (TopValue->Val->Pointer == NULL) + ProgramFail(Parser, "invalid use of a NULL pointer"); + + if (!TopValue->IsLValue) + ProgramFail(Parser, "can't assign to this"); + + switch (Op) + { + case TokenIncrement: TopValue->Val->Pointer = (void *)((char *)TopValue->Val->Pointer + Size); break; + case TokenDecrement: TopValue->Val->Pointer = (void *)((char *)TopValue->Val->Pointer - Size); break; + default: ProgramFail(Parser, "invalid operation"); break; + } + + StackValue = ExpressionStackPushValueByType(Parser, StackTop, TopValue->Typ); + StackValue->Val->Pointer = OrigPointer; + } + else + ProgramFail(Parser, "invalid operation"); +} + +/* evaluate an infix operator */ +void ExpressionInfixOperator(struct ParseState *Parser, struct ExpressionStack **StackTop, enum LexToken Op, struct Value *BottomValue, struct Value *TopValue) +{ + long ResultInt = 0; + struct Value *StackValue; + void *Pointer; + + debugf("ExpressionInfixOperator()\n"); + if (BottomValue == NULL || TopValue == NULL) + ProgramFail(Parser, "invalid expression"); + + if (Op == TokenLeftSquareBracket) + { + /* array index */ + int ArrayIndex; + struct Value *Result = NULL; + + if (!IS_NUMERIC_COERCIBLE(TopValue)) + ProgramFail(Parser, "array index must be an integer"); + + ArrayIndex = ExpressionCoerceInteger(TopValue); + + /* make the array element result */ + switch (BottomValue->Typ->Base) + { + case TypeArray: Result = VariableAllocValueFromExistingData(Parser, BottomValue->Typ->FromType, (union AnyValue *)(&BottomValue->Val->ArrayMem[0] + TypeSize(BottomValue->Typ, ArrayIndex, TRUE)), BottomValue->IsLValue, BottomValue->LValueFrom); break; + case TypePointer: Result = VariableAllocValueFromExistingData(Parser, BottomValue->Typ->FromType, (union AnyValue *)((char *)BottomValue->Val->Pointer + TypeSize(BottomValue->Typ->FromType, 0, TRUE) * ArrayIndex), BottomValue->IsLValue, BottomValue->LValueFrom); break; + default: ProgramFail(Parser, "this %t is not an array", BottomValue->Typ); + } + + ExpressionStackPushValueNode(Parser, StackTop, Result); + } + else if (Op == TokenQuestionMark) + ExpressionQuestionMarkOperator(Parser, StackTop, TopValue, BottomValue); + + else if (Op == TokenColon) + ExpressionColonOperator(Parser, StackTop, TopValue, BottomValue); + +#ifndef NO_FP + else if ( (TopValue->Typ == &Parser->pc->FPType && BottomValue->Typ == &Parser->pc->FPType) || + (TopValue->Typ == &Parser->pc->FPType && IS_NUMERIC_COERCIBLE(BottomValue)) || + (IS_NUMERIC_COERCIBLE(TopValue) && BottomValue->Typ == &Parser->pc->FPType) ) + { + /* floating point infix arithmetic */ + int ResultIsInt = FALSE; + double ResultFP = 0.0; + double TopFP = (TopValue->Typ == &Parser->pc->FPType) ? TopValue->Val->FP : (double)ExpressionCoerceInteger(TopValue); + double BottomFP = (BottomValue->Typ == &Parser->pc->FPType) ? BottomValue->Val->FP : (double)ExpressionCoerceInteger(BottomValue); + + switch (Op) + { + case TokenAssign: ASSIGN_FP_OR_INT(TopFP); break; + case TokenAddAssign: ASSIGN_FP_OR_INT(BottomFP + TopFP); break; + case TokenSubtractAssign: ASSIGN_FP_OR_INT(BottomFP - TopFP); break; + case TokenMultiplyAssign: ASSIGN_FP_OR_INT(BottomFP * TopFP); break; + case TokenDivideAssign: ASSIGN_FP_OR_INT(BottomFP / TopFP); break; + case TokenEqual: ResultInt = BottomFP == TopFP; ResultIsInt = TRUE; break; + case TokenNotEqual: ResultInt = BottomFP != TopFP; ResultIsInt = TRUE; break; + case TokenLessThan: ResultInt = BottomFP < TopFP; ResultIsInt = TRUE; break; + case TokenGreaterThan: ResultInt = BottomFP > TopFP; ResultIsInt = TRUE; break; + case TokenLessEqual: ResultInt = BottomFP <= TopFP; ResultIsInt = TRUE; break; + case TokenGreaterEqual: ResultInt = BottomFP >= TopFP; ResultIsInt = TRUE; break; + case TokenPlus: ResultFP = BottomFP + TopFP; break; + case TokenMinus: ResultFP = BottomFP - TopFP; break; + case TokenAsterisk: ResultFP = BottomFP * TopFP; break; + case TokenSlash: ResultFP = BottomFP / TopFP; break; + default: ProgramFail(Parser, "invalid operation"); break; + } + + if (ResultIsInt) + ExpressionPushInt(Parser, StackTop, ResultInt); + else + ExpressionPushFP(Parser, StackTop, ResultFP); + } +#endif + else if (IS_NUMERIC_COERCIBLE(TopValue) && IS_NUMERIC_COERCIBLE(BottomValue)) + { + /* integer operation */ + long TopInt = ExpressionCoerceInteger(TopValue); + long BottomInt = ExpressionCoerceInteger(BottomValue); + switch (Op) + { + case TokenAssign: ResultInt = ExpressionAssignInt(Parser, BottomValue, TopInt, FALSE); break; + case TokenAddAssign: ResultInt = ExpressionAssignInt(Parser, BottomValue, BottomInt + TopInt, FALSE); break; + case TokenSubtractAssign: ResultInt = ExpressionAssignInt(Parser, BottomValue, BottomInt - TopInt, FALSE); break; + case TokenMultiplyAssign: ResultInt = ExpressionAssignInt(Parser, BottomValue, BottomInt * TopInt, FALSE); break; + case TokenDivideAssign: ResultInt = ExpressionAssignInt(Parser, BottomValue, BottomInt / TopInt, FALSE); break; +#ifndef NO_MODULUS + case TokenModulusAssign: ResultInt = ExpressionAssignInt(Parser, BottomValue, BottomInt % TopInt, FALSE); break; +#endif + case TokenShiftLeftAssign: ResultInt = ExpressionAssignInt(Parser, BottomValue, BottomInt << TopInt, FALSE); break; + case TokenShiftRightAssign: ResultInt = ExpressionAssignInt(Parser, BottomValue, BottomInt >> TopInt, FALSE); break; + case TokenArithmeticAndAssign: ResultInt = ExpressionAssignInt(Parser, BottomValue, BottomInt & TopInt, FALSE); break; + case TokenArithmeticOrAssign: ResultInt = ExpressionAssignInt(Parser, BottomValue, BottomInt | TopInt, FALSE); break; + case TokenArithmeticExorAssign: ResultInt = ExpressionAssignInt(Parser, BottomValue, BottomInt ^ TopInt, FALSE); break; + case TokenLogicalOr: ResultInt = BottomInt || TopInt; break; + case TokenLogicalAnd: ResultInt = BottomInt && TopInt; break; + case TokenArithmeticOr: ResultInt = BottomInt | TopInt; break; + case TokenArithmeticExor: ResultInt = BottomInt ^ TopInt; break; + case TokenAmpersand: ResultInt = BottomInt & TopInt; break; + case TokenEqual: ResultInt = BottomInt == TopInt; break; + case TokenNotEqual: ResultInt = BottomInt != TopInt; break; + case TokenLessThan: ResultInt = BottomInt < TopInt; break; + case TokenGreaterThan: ResultInt = BottomInt > TopInt; break; + case TokenLessEqual: ResultInt = BottomInt <= TopInt; break; + case TokenGreaterEqual: ResultInt = BottomInt >= TopInt; break; + case TokenShiftLeft: ResultInt = BottomInt << TopInt; break; + case TokenShiftRight: ResultInt = BottomInt >> TopInt; break; + case TokenPlus: ResultInt = BottomInt + TopInt; break; + case TokenMinus: ResultInt = BottomInt - TopInt; break; + case TokenAsterisk: ResultInt = BottomInt * TopInt; break; + case TokenSlash: ResultInt = BottomInt / TopInt; break; +#ifndef NO_MODULUS + case TokenModulus: ResultInt = BottomInt % TopInt; break; +#endif + default: ProgramFail(Parser, "invalid operation"); break; + } + + ExpressionPushInt(Parser, StackTop, ResultInt); + } + else if (BottomValue->Typ->Base == TypePointer && IS_NUMERIC_COERCIBLE(TopValue)) + { + /* pointer/integer infix arithmetic */ + long TopInt = ExpressionCoerceInteger(TopValue); + + if (Op == TokenEqual || Op == TokenNotEqual) + { + /* comparison to a NULL pointer */ + if (TopInt != 0) + ProgramFail(Parser, "invalid operation"); + + if (Op == TokenEqual) + ExpressionPushInt(Parser, StackTop, BottomValue->Val->Pointer == NULL); + else + ExpressionPushInt(Parser, StackTop, BottomValue->Val->Pointer != NULL); + } + else if (Op == TokenPlus || Op == TokenMinus) + { + /* pointer arithmetic */ + int Size = TypeSize(BottomValue->Typ->FromType, 0, TRUE); + + Pointer = BottomValue->Val->Pointer; + if (Pointer == NULL) + ProgramFail(Parser, "invalid use of a NULL pointer"); + + if (Op == TokenPlus) + Pointer = (void *)((char *)Pointer + TopInt * Size); + else + Pointer = (void *)((char *)Pointer - TopInt * Size); + + StackValue = ExpressionStackPushValueByType(Parser, StackTop, BottomValue->Typ); + StackValue->Val->Pointer = Pointer; + } + else if (Op == TokenAssign && TopInt == 0) + { + /* assign a NULL pointer */ + HeapUnpopStack(Parser->pc, sizeof(struct Value)); + ExpressionAssign(Parser, BottomValue, TopValue, FALSE, NULL, 0, FALSE); + ExpressionStackPushValueNode(Parser, StackTop, BottomValue); + } + else if (Op == TokenAddAssign || Op == TokenSubtractAssign) + { + /* pointer arithmetic */ + int Size = TypeSize(BottomValue->Typ->FromType, 0, TRUE); + + Pointer = BottomValue->Val->Pointer; + if (Pointer == NULL) + ProgramFail(Parser, "invalid use of a NULL pointer"); + + if (Op == TokenAddAssign) + Pointer = (void *)((char *)Pointer + TopInt * Size); + else + Pointer = (void *)((char *)Pointer - TopInt * Size); + + HeapUnpopStack(Parser->pc, sizeof(struct Value)); + BottomValue->Val->Pointer = Pointer; + ExpressionStackPushValueNode(Parser, StackTop, BottomValue); + } + else + ProgramFail(Parser, "invalid operation"); + } + else if (BottomValue->Typ->Base == TypePointer && TopValue->Typ->Base == TypePointer && Op != TokenAssign) + { + /* pointer/pointer operations */ + char *TopLoc = (char *)TopValue->Val->Pointer; + char *BottomLoc = (char *)BottomValue->Val->Pointer; + + switch (Op) + { + case TokenEqual: ExpressionPushInt(Parser, StackTop, BottomLoc == TopLoc); break; + case TokenNotEqual: ExpressionPushInt(Parser, StackTop, BottomLoc != TopLoc); break; + case TokenMinus: ExpressionPushInt(Parser, StackTop, BottomLoc - TopLoc); break; + default: ProgramFail(Parser, "invalid operation"); break; + } + } + else if (Op == TokenAssign) + { + /* assign a non-numeric type */ + HeapUnpopStack(Parser->pc, sizeof(struct Value)); /* XXX - possible bug if lvalue is a temp value and takes more than sizeof(struct Value) */ + ExpressionAssign(Parser, BottomValue, TopValue, FALSE, NULL, 0, FALSE); + ExpressionStackPushValueNode(Parser, StackTop, BottomValue); + } + else if (Op == TokenCast) + { + /* cast a value to a different type */ /* XXX - possible bug if the destination type takes more than sizeof(struct Value) + sizeof(struct ValueType *) */ + struct Value *ValueLoc = ExpressionStackPushValueByType(Parser, StackTop, BottomValue->Val->Typ); + ExpressionAssign(Parser, ValueLoc, TopValue, TRUE, NULL, 0, TRUE); + } + else + ProgramFail(Parser, "invalid operation"); +} + +/* take the contents of the expression stack and compute the top until there's nothing greater than the given precedence */ +void ExpressionStackCollapse(struct ParseState *Parser, struct ExpressionStack **StackTop, int Precedence, int *IgnorePrecedence) +{ + int FoundPrecedence = Precedence; + struct Value *TopValue; + struct Value *BottomValue; + struct ExpressionStack *TopStackNode = *StackTop; + struct ExpressionStack *TopOperatorNode; + + debugf("ExpressionStackCollapse(%d):\n", Precedence); +#ifdef DEBUG_EXPRESSIONS + ExpressionStackShow(Parser->pc, *StackTop); +#endif + while (TopStackNode != NULL && TopStackNode->Next != NULL && FoundPrecedence >= Precedence) + { + /* find the top operator on the stack */ + if (TopStackNode->Order == OrderNone) + TopOperatorNode = TopStackNode->Next; + else + TopOperatorNode = TopStackNode; + + FoundPrecedence = TopOperatorNode->Precedence; + + /* does it have a high enough precedence? */ + if (FoundPrecedence >= Precedence && TopOperatorNode != NULL) + { + /* execute this operator */ + switch (TopOperatorNode->Order) + { + case OrderPrefix: + /* prefix evaluation */ + debugf("prefix evaluation\n"); + TopValue = TopStackNode->Val; + + /* pop the value and then the prefix operator - assume they'll still be there until we're done */ + HeapPopStack(Parser->pc, NULL, sizeof(struct ExpressionStack) + sizeof(struct Value) + TypeStackSizeValue(TopValue)); + HeapPopStack(Parser->pc, TopOperatorNode, sizeof(struct ExpressionStack)); + *StackTop = TopOperatorNode->Next; + + /* do the prefix operation */ + if (Parser->Mode == RunModeRun /* && FoundPrecedence < *IgnorePrecedence */) + { + /* run the operator */ + ExpressionPrefixOperator(Parser, StackTop, TopOperatorNode->Op, TopValue); + } + else + { + /* we're not running it so just return 0 */ + ExpressionPushInt(Parser, StackTop, 0); + } + break; + + case OrderPostfix: + /* postfix evaluation */ + debugf("postfix evaluation\n"); + TopValue = TopStackNode->Next->Val; + + /* pop the postfix operator and then the value - assume they'll still be there until we're done */ + HeapPopStack(Parser->pc, NULL, sizeof(struct ExpressionStack)); + HeapPopStack(Parser->pc, TopValue, sizeof(struct ExpressionStack) + sizeof(struct Value) + TypeStackSizeValue(TopValue)); + *StackTop = TopStackNode->Next->Next; + + /* do the postfix operation */ + if (Parser->Mode == RunModeRun /* && FoundPrecedence < *IgnorePrecedence */) + { + /* run the operator */ + ExpressionPostfixOperator(Parser, StackTop, TopOperatorNode->Op, TopValue); + } + else + { + /* we're not running it so just return 0 */ + ExpressionPushInt(Parser, StackTop, 0); + } + break; + + case OrderInfix: + /* infix evaluation */ + debugf("infix evaluation\n"); + TopValue = TopStackNode->Val; + if (TopValue != NULL) + { + BottomValue = TopOperatorNode->Next->Val; + + /* pop a value, the operator and another value - assume they'll still be there until we're done */ + HeapPopStack(Parser->pc, NULL, sizeof(struct ExpressionStack) + sizeof(struct Value) + TypeStackSizeValue(TopValue)); + HeapPopStack(Parser->pc, NULL, sizeof(struct ExpressionStack)); + HeapPopStack(Parser->pc, BottomValue, sizeof(struct ExpressionStack) + sizeof(struct Value) + TypeStackSizeValue(BottomValue)); + *StackTop = TopOperatorNode->Next->Next; + + /* do the infix operation */ + if (Parser->Mode == RunModeRun /* && FoundPrecedence <= *IgnorePrecedence */) + { + /* run the operator */ + ExpressionInfixOperator(Parser, StackTop, TopOperatorNode->Op, BottomValue, TopValue); + } + else + { + /* we're not running it so just return 0 */ + ExpressionPushInt(Parser, StackTop, 0); + } + } + else + FoundPrecedence = -1; + break; + + case OrderNone: + /* this should never happen */ + assert(TopOperatorNode->Order != OrderNone); + break; + } + + /* if we've returned above the ignored precedence level turn ignoring off */ + if (FoundPrecedence <= *IgnorePrecedence) + *IgnorePrecedence = DEEP_PRECEDENCE; + } +#ifdef DEBUG_EXPRESSIONS + ExpressionStackShow(Parser->pc, *StackTop); +#endif + TopStackNode = *StackTop; + } + debugf("ExpressionStackCollapse() finished\n"); +#ifdef DEBUG_EXPRESSIONS + ExpressionStackShow(Parser->pc, *StackTop); +#endif +} + +/* push an operator on to the expression stack */ +void ExpressionStackPushOperator(struct ParseState *Parser, struct ExpressionStack **StackTop, enum OperatorOrder Order, enum LexToken Token, int Precedence) +{ + struct ExpressionStack *StackNode = VariableAlloc(Parser->pc, Parser, sizeof(struct ExpressionStack), FALSE); + StackNode->Next = *StackTop; + StackNode->Order = Order; + StackNode->Op = Token; + StackNode->Precedence = Precedence; + *StackTop = StackNode; + debugf("ExpressionStackPushOperator()\n"); +#ifdef FANCY_ERROR_MESSAGES + StackNode->Line = Parser->Line; + StackNode->CharacterPos = Parser->CharacterPos; +#endif +#ifdef DEBUG_EXPRESSIONS + ExpressionStackShow(Parser->pc, *StackTop); +#endif +} + +/* do the '.' and '->' operators */ +void ExpressionGetStructElement(struct ParseState *Parser, struct ExpressionStack **StackTop, enum LexToken Token) +{ + struct Value *Ident; + + /* get the identifier following the '.' or '->' */ + if (LexGetToken(Parser, &Ident, TRUE) != TokenIdentifier) + ProgramFail(Parser, "need an structure or union member after '%s'", (Token == TokenDot) ? "." : "->"); + + if (Parser->Mode == RunModeRun) + { + /* look up the struct element */ + struct Value *ParamVal = (*StackTop)->Val; + struct Value *StructVal = ParamVal; + struct ValueType *StructType = ParamVal->Typ; + char *DerefDataLoc = (char *)ParamVal->Val; + struct Value *MemberValue = NULL; + struct Value *Result; + + /* if we're doing '->' dereference the struct pointer first */ + if (Token == TokenArrow) + DerefDataLoc = VariableDereferencePointer(Parser, ParamVal, &StructVal, NULL, &StructType, NULL); + + if (StructType->Base != TypeStruct && StructType->Base != TypeUnion) + ProgramFail(Parser, "can't use '%s' on something that's not a struct or union %s : it's a %t", (Token == TokenDot) ? "." : "->", (Token == TokenArrow) ? "pointer" : "", ParamVal->Typ); + + if (!TableGet(StructType->Members, Ident->Val->Identifier, &MemberValue, NULL, NULL, NULL)) + ProgramFail(Parser, "doesn't have a member called '%s'", Ident->Val->Identifier); + + /* pop the value - assume it'll still be there until we're done */ + HeapPopStack(Parser->pc, ParamVal, sizeof(struct ExpressionStack) + sizeof(struct Value) + TypeStackSizeValue(StructVal)); + *StackTop = (*StackTop)->Next; + + /* make the result value for this member only */ + Result = VariableAllocValueFromExistingData(Parser, MemberValue->Typ, (void *)(DerefDataLoc + MemberValue->Val->Integer), TRUE, (StructVal != NULL) ? StructVal->LValueFrom : NULL); + ExpressionStackPushValueNode(Parser, StackTop, Result); + } +} + +/* parse an expression with operator precedence */ +int ExpressionParse(struct ParseState *Parser, struct Value **Result) +{ + struct Value *LexValue; + int PrefixState = TRUE; + int Done = FALSE; + int BracketPrecedence = 0; + int LocalPrecedence; + int Precedence = 0; + int IgnorePrecedence = DEEP_PRECEDENCE; + struct ExpressionStack *StackTop = NULL; + int TernaryDepth = 0; + + debugf("ExpressionParse():\n"); + do + { + struct ParseState PreState; + enum LexToken Token; + + ParserCopy(&PreState, Parser); + Token = LexGetToken(Parser, &LexValue, TRUE); + if ( ( ( (int)Token > TokenComma && (int)Token <= (int)TokenOpenBracket) || + (Token == TokenCloseBracket && BracketPrecedence != 0)) && + (Token != TokenColon || TernaryDepth > 0) ) + { + /* it's an operator with precedence */ + if (PrefixState) + { + /* expect a prefix operator */ + if (OperatorPrecedence[(int)Token].PrefixPrecedence == 0) + ProgramFail(Parser, "operator not expected here"); + + LocalPrecedence = OperatorPrecedence[(int)Token].PrefixPrecedence; + Precedence = BracketPrecedence + LocalPrecedence; + + if (Token == TokenOpenBracket) + { + /* it's either a new bracket level or a cast */ + enum LexToken BracketToken = LexGetToken(Parser, &LexValue, FALSE); + if (IsTypeToken(Parser, BracketToken, LexValue) && (StackTop == NULL || StackTop->Op != TokenSizeof) ) + { + /* it's a cast - get the new type */ + struct ValueType *CastType; + char *CastIdentifier; + struct Value *CastTypeValue; + + TypeParse(Parser, &CastType, &CastIdentifier, NULL); + if (LexGetToken(Parser, &LexValue, TRUE) != TokenCloseBracket) + ProgramFail(Parser, "brackets not closed"); + + /* scan and collapse the stack to the precedence of this infix cast operator, then push */ + Precedence = BracketPrecedence + OperatorPrecedence[(int)TokenCast].PrefixPrecedence; + + ExpressionStackCollapse(Parser, &StackTop, Precedence+1, &IgnorePrecedence); + CastTypeValue = VariableAllocValueFromType(Parser->pc, Parser, &Parser->pc->TypeType, FALSE, NULL, FALSE); + CastTypeValue->Val->Typ = CastType; + ExpressionStackPushValueNode(Parser, &StackTop, CastTypeValue); + ExpressionStackPushOperator(Parser, &StackTop, OrderInfix, TokenCast, Precedence); + } + else + { + /* boost the bracket operator precedence */ + BracketPrecedence += BRACKET_PRECEDENCE; + } + } + else + { + /* scan and collapse the stack to the precedence of this operator, then push */ + + /* take some extra care for double prefix operators, e.g. x = - -5, or x = **y */ + int NextToken = LexGetToken(Parser, NULL, FALSE); + int TempPrecedenceBoost = 0; + if (NextToken > TokenComma && NextToken < TokenOpenBracket) + { + int NextPrecedence = OperatorPrecedence[(int)NextToken].PrefixPrecedence; + + /* two prefix operators with equal precedence? make sure the innermost one runs first */ + /* XXX - probably not correct, but can't find a test that fails at this */ + if (LocalPrecedence == NextPrecedence) + TempPrecedenceBoost = -1; + } + + ExpressionStackCollapse(Parser, &StackTop, Precedence, &IgnorePrecedence); + ExpressionStackPushOperator(Parser, &StackTop, OrderPrefix, Token, Precedence + TempPrecedenceBoost); + } + } + else + { + /* expect an infix or postfix operator */ + if (OperatorPrecedence[(int)Token].PostfixPrecedence != 0) + { + switch (Token) + { + case TokenCloseBracket: + case TokenRightSquareBracket: + if (BracketPrecedence == 0) + { + /* assume this bracket is after the end of the expression */ + ParserCopy(Parser, &PreState); + Done = TRUE; + } + else + { + /* collapse to the bracket precedence */ + ExpressionStackCollapse(Parser, &StackTop, BracketPrecedence, &IgnorePrecedence); + BracketPrecedence -= BRACKET_PRECEDENCE; + } + break; + + default: + /* scan and collapse the stack to the precedence of this operator, then push */ + Precedence = BracketPrecedence + OperatorPrecedence[(int)Token].PostfixPrecedence; + ExpressionStackCollapse(Parser, &StackTop, Precedence, &IgnorePrecedence); + ExpressionStackPushOperator(Parser, &StackTop, OrderPostfix, Token, Precedence); + break; + } + } + else if (OperatorPrecedence[(int)Token].InfixPrecedence != 0) + { + /* scan and collapse the stack, then push */ + Precedence = BracketPrecedence + OperatorPrecedence[(int)Token].InfixPrecedence; + + /* for right to left order, only go down to the next higher precedence so we evaluate it in reverse order */ + /* for left to right order, collapse down to this precedence so we evaluate it in forward order */ + if (IS_LEFT_TO_RIGHT(OperatorPrecedence[(int)Token].InfixPrecedence)) + ExpressionStackCollapse(Parser, &StackTop, Precedence, &IgnorePrecedence); + else + ExpressionStackCollapse(Parser, &StackTop, Precedence+1, &IgnorePrecedence); + + if (Token == TokenDot || Token == TokenArrow) + { + ExpressionGetStructElement(Parser, &StackTop, Token); /* this operator is followed by a struct element so handle it as a special case */ + } + else + { + /* if it's a && or || operator we may not need to evaluate the right hand side of the expression */ + if ( (Token == TokenLogicalOr || Token == TokenLogicalAnd) && IS_NUMERIC_COERCIBLE(StackTop->Val)) + { + long LHSInt = ExpressionCoerceInteger(StackTop->Val); + if ( ( (Token == TokenLogicalOr && LHSInt) || (Token == TokenLogicalAnd && !LHSInt) ) && + (IgnorePrecedence > Precedence) ) + IgnorePrecedence = Precedence; + } + + /* push the operator on the stack */ + ExpressionStackPushOperator(Parser, &StackTop, OrderInfix, Token, Precedence); + PrefixState = TRUE; + + switch (Token) + { + case TokenQuestionMark: TernaryDepth++; break; + case TokenColon: TernaryDepth--; break; + default: break; + } + } + + /* treat an open square bracket as an infix array index operator followed by an open bracket */ + if (Token == TokenLeftSquareBracket) + { + /* boost the bracket operator precedence, then push */ + BracketPrecedence += BRACKET_PRECEDENCE; + } + } + else + ProgramFail(Parser, "operator not expected here"); + } + } + else if (Token == TokenIdentifier) + { + /* it's a variable, function or a macro */ + if (!PrefixState) + ProgramFail(Parser, "identifier not expected here"); + + if (LexGetToken(Parser, NULL, FALSE) == TokenOpenBracket) + { + ExpressionParseFunctionCall(Parser, &StackTop, LexValue->Val->Identifier, Parser->Mode == RunModeRun && Precedence < IgnorePrecedence); + } + else + { + if (Parser->Mode == RunModeRun /* && Precedence < IgnorePrecedence */) + { + struct Value *VariableValue = NULL; + + VariableGet(Parser->pc, Parser, LexValue->Val->Identifier, &VariableValue); + if (VariableValue->Typ->Base == TypeMacro) + { + /* evaluate a macro as a kind of simple subroutine */ + struct ParseState MacroParser; + struct Value *MacroResult; + + ParserCopy(&MacroParser, &VariableValue->Val->MacroDef.Body); + MacroParser.Mode = Parser->Mode; + if (VariableValue->Val->MacroDef.NumParams != 0) + ProgramFail(&MacroParser, "macro arguments missing"); + + if (!ExpressionParse(&MacroParser, &MacroResult) || LexGetToken(&MacroParser, NULL, FALSE) != TokenEndOfFunction) + ProgramFail(&MacroParser, "expression expected"); + + ExpressionStackPushValueNode(Parser, &StackTop, MacroResult); + } + else if (VariableValue->Typ == &Parser->pc->VoidType) + ProgramFail(Parser, "a void value isn't much use here"); + else + ExpressionStackPushLValue(Parser, &StackTop, VariableValue, 0); /* it's a value variable */ + } + else /* push a dummy value */ + ExpressionPushInt(Parser, &StackTop, 0); + + } + + /* if we've successfully ignored the RHS turn ignoring off */ + if (Precedence <= IgnorePrecedence) + IgnorePrecedence = DEEP_PRECEDENCE; + + PrefixState = FALSE; + } + else if ((int)Token > TokenCloseBracket && (int)Token <= TokenCharacterConstant) + { + /* it's a value of some sort, push it */ + if (!PrefixState) + ProgramFail(Parser, "value not expected here"); + + PrefixState = FALSE; + ExpressionStackPushValue(Parser, &StackTop, LexValue); + } + else if (IsTypeToken(Parser, Token, LexValue)) + { + /* it's a type. push it on the stack like a value. this is used in sizeof() */ + struct ValueType *Typ; + char *Identifier; + struct Value *TypeValue; + + if (!PrefixState) + ProgramFail(Parser, "type not expected here"); + + PrefixState = FALSE; + ParserCopy(Parser, &PreState); + TypeParse(Parser, &Typ, &Identifier, NULL); + TypeValue = VariableAllocValueFromType(Parser->pc, Parser, &Parser->pc->TypeType, FALSE, NULL, FALSE); + TypeValue->Val->Typ = Typ; + ExpressionStackPushValueNode(Parser, &StackTop, TypeValue); + } + else + { + /* it isn't a token from an expression */ + ParserCopy(Parser, &PreState); + Done = TRUE; + } + + } while (!Done); + + /* check that brackets have been closed */ + if (BracketPrecedence > 0) + ProgramFail(Parser, "brackets not closed"); + + /* scan and collapse the stack to precedence 0 */ + ExpressionStackCollapse(Parser, &StackTop, 0, &IgnorePrecedence); + + /* fix up the stack and return the result if we're in run mode */ + if (StackTop != NULL) + { + /* all that should be left is a single value on the stack */ + if (Parser->Mode == RunModeRun) + { + if (StackTop->Order != OrderNone || StackTop->Next != NULL) + ProgramFail(Parser, "invalid expression"); + + *Result = StackTop->Val; + HeapPopStack(Parser->pc, StackTop, sizeof(struct ExpressionStack)); + } + else + HeapPopStack(Parser->pc, StackTop->Val, sizeof(struct ExpressionStack) + sizeof(struct Value) + TypeStackSizeValue(StackTop->Val)); + } + + debugf("ExpressionParse() done\n\n"); +#ifdef DEBUG_EXPRESSIONS + ExpressionStackShow(Parser->pc, StackTop); +#endif + return StackTop != NULL; +} + + +/* do a parameterised macro call */ +void ExpressionParseMacroCall(struct ParseState *Parser, struct ExpressionStack **StackTop, const char *MacroName, struct MacroDef *MDef) +{ + struct Value *ReturnValue = NULL; + struct Value *Param; + struct Value **ParamArray = NULL; + int ArgCount; + enum LexToken Token; + + if (Parser->Mode == RunModeRun) + { + /* create a stack frame for this macro */ +#ifndef NO_FP + ExpressionStackPushValueByType(Parser, StackTop, &Parser->pc->FPType); /* largest return type there is */ +#else + ExpressionStackPushValueByType(Parser, StackTop, &Parser->pc->IntType); /* largest return type there is */ +#endif + ReturnValue = (*StackTop)->Val; + HeapPushStackFrame(Parser->pc); + ParamArray = HeapAllocStack(Parser->pc, sizeof(struct Value *) * MDef->NumParams); + if (ParamArray == NULL) + ProgramFail(Parser, "out of memory"); + } + else + ExpressionPushInt(Parser, StackTop, 0); + + /* parse arguments */ + ArgCount = 0; + do { + if (ExpressionParse(Parser, &Param)) + { + if (Parser->Mode == RunModeRun) + { + if (ArgCount < MDef->NumParams) + ParamArray[ArgCount] = Param; + else + ProgramFail(Parser, "too many arguments to %s()", MacroName); + } + + ArgCount++; + Token = LexGetToken(Parser, NULL, TRUE); + if (Token != TokenComma && Token != TokenCloseBracket) + ProgramFail(Parser, "comma expected"); + } + else + { + /* end of argument list? */ + Token = LexGetToken(Parser, NULL, TRUE); + if (!TokenCloseBracket) + ProgramFail(Parser, "bad argument"); + } + + } while (Token != TokenCloseBracket); + + if (Parser->Mode == RunModeRun) + { + /* evaluate the macro */ + struct ParseState MacroParser; + int Count; + struct Value *EvalValue; + + if (ArgCount < MDef->NumParams) + ProgramFail(Parser, "not enough arguments to '%s'", MacroName); + + if (MDef->Body.Pos == NULL) + ProgramFail(Parser, "'%s' is undefined", MacroName); + + ParserCopy(&MacroParser, &MDef->Body); + MacroParser.Mode = Parser->Mode; + VariableStackFrameAdd(Parser, MacroName, 0); + Parser->pc->TopStackFrame->NumParams = ArgCount; + Parser->pc->TopStackFrame->ReturnValue = ReturnValue; + for (Count = 0; Count < MDef->NumParams; Count++) + VariableDefine(Parser->pc, Parser, MDef->ParamName[Count], ParamArray[Count], NULL, TRUE); + + ExpressionParse(&MacroParser, &EvalValue); + ExpressionAssign(Parser, ReturnValue, EvalValue, TRUE, MacroName, 0, FALSE); + VariableStackFramePop(Parser); + HeapPopStackFrame(Parser->pc); + } +} + +/* do a function call */ +void ExpressionParseFunctionCall(struct ParseState *Parser, struct ExpressionStack **StackTop, const char *FuncName, int RunIt) +{ + struct Value *ReturnValue = NULL; + struct Value *FuncValue = NULL; + struct Value *Param; + struct Value **ParamArray = NULL; + int ArgCount; + enum LexToken Token = LexGetToken(Parser, NULL, TRUE); /* open bracket */ + enum RunMode OldMode = Parser->Mode; + + if (RunIt) + { + /* get the function definition */ + VariableGet(Parser->pc, Parser, FuncName, &FuncValue); + + if (FuncValue->Typ->Base == TypeMacro) + { + /* this is actually a macro, not a function */ + ExpressionParseMacroCall(Parser, StackTop, FuncName, &FuncValue->Val->MacroDef); + return; + } + + if (FuncValue->Typ->Base != TypeFunction) + ProgramFail(Parser, "%t is not a function - can't call", FuncValue->Typ); + + ExpressionStackPushValueByType(Parser, StackTop, FuncValue->Val->FuncDef.ReturnType); + ReturnValue = (*StackTop)->Val; + HeapPushStackFrame(Parser->pc); + ParamArray = HeapAllocStack(Parser->pc, sizeof(struct Value *) * FuncValue->Val->FuncDef.NumParams); + if (ParamArray == NULL) + ProgramFail(Parser, "out of memory"); + } + else + { + ExpressionPushInt(Parser, StackTop, 0); + Parser->Mode = RunModeSkip; + } + + /* parse arguments */ + ArgCount = 0; + do { + if (RunIt && ArgCount < FuncValue->Val->FuncDef.NumParams) + ParamArray[ArgCount] = VariableAllocValueFromType(Parser->pc, Parser, FuncValue->Val->FuncDef.ParamType[ArgCount], FALSE, NULL, FALSE); + + if (ExpressionParse(Parser, &Param)) + { + if (RunIt) + { + if (ArgCount < FuncValue->Val->FuncDef.NumParams) + { + ExpressionAssign(Parser, ParamArray[ArgCount], Param, TRUE, FuncName, ArgCount+1, FALSE); + VariableStackPop(Parser, Param); + } + else + { + if (!FuncValue->Val->FuncDef.VarArgs) + ProgramFail(Parser, "too many arguments to %s()", FuncName); + } + } + + ArgCount++; + Token = LexGetToken(Parser, NULL, TRUE); + if (Token != TokenComma && Token != TokenCloseBracket) + ProgramFail(Parser, "comma expected"); + } + else + { + /* end of argument list? */ + Token = LexGetToken(Parser, NULL, TRUE); + if (!TokenCloseBracket) + ProgramFail(Parser, "bad argument"); + } + + } while (Token != TokenCloseBracket); + + if (RunIt) + { + /* run the function */ + if (ArgCount < FuncValue->Val->FuncDef.NumParams) + ProgramFail(Parser, "not enough arguments to '%s'", FuncName); + + if (FuncValue->Val->FuncDef.Intrinsic == NULL) + { + /* run a user-defined function */ + struct ParseState FuncParser; + int Count; + int OldScopeID = Parser->ScopeID; + + if (FuncValue->Val->FuncDef.Body.Pos == NULL) + ProgramFail(Parser, "'%s' is undefined", FuncName); + + ParserCopy(&FuncParser, &FuncValue->Val->FuncDef.Body); + VariableStackFrameAdd(Parser, FuncName, FuncValue->Val->FuncDef.Intrinsic ? FuncValue->Val->FuncDef.NumParams : 0); + Parser->pc->TopStackFrame->NumParams = ArgCount; + Parser->pc->TopStackFrame->ReturnValue = ReturnValue; + + /* Function parameters should not go out of scope */ + Parser->ScopeID = -1; + + for (Count = 0; Count < FuncValue->Val->FuncDef.NumParams; Count++) + VariableDefine(Parser->pc, Parser, FuncValue->Val->FuncDef.ParamName[Count], ParamArray[Count], NULL, TRUE); + + Parser->ScopeID = OldScopeID; + + if (ParseStatement(&FuncParser, TRUE) != ParseResultOk) + ProgramFail(&FuncParser, "function body expected"); + + if (RunIt) + { + if (FuncParser.Mode == RunModeRun && FuncValue->Val->FuncDef.ReturnType != &Parser->pc->VoidType) + ProgramFail(&FuncParser, "no value returned from a function returning %t", FuncValue->Val->FuncDef.ReturnType); + + else if (FuncParser.Mode == RunModeGoto) + ProgramFail(&FuncParser, "couldn't find goto label '%s'", FuncParser.SearchGotoLabel); + } + + VariableStackFramePop(Parser); + } + else + FuncValue->Val->FuncDef.Intrinsic(Parser, ReturnValue, ParamArray, ArgCount); + + HeapPopStackFrame(Parser->pc); + } + + Parser->Mode = OldMode; +} + +/* parse an expression */ +long ExpressionParseInt(struct ParseState *Parser) +{ + struct Value *Val; + long Result = 0; + + if (!ExpressionParse(Parser, &Val)) + ProgramFail(Parser, "expression expected"); + + if (Parser->Mode == RunModeRun) + { + if (!IS_NUMERIC_COERCIBLE(Val)) + ProgramFail(Parser, "integer value expected instead of %t", Val->Typ); + + Result = ExpressionCoerceInteger(Val); + VariableStackPop(Parser, Val); + } + + return Result; +} + diff --git a/src/expression.o b/src/expression.o new file mode 100644 index 0000000..692d2fb Binary files /dev/null and b/src/expression.o differ diff --git a/src/heap.c b/src/heap.c new file mode 100644 index 0000000..938d2ee --- /dev/null +++ b/src/heap.c @@ -0,0 +1,278 @@ +/* picoc heap memory allocation. This is a complete (but small) memory + * allocator for embedded systems which have no memory allocator. Alternatively + * you can define USE_MALLOC_HEAP to use your system's own malloc() allocator */ + +/* stack grows up from the bottom and heap grows down from the top of heap space */ +#include "interpreter.h" + +#ifdef DEBUG_HEAP +void ShowBigList(Picoc *pc) +{ + struct AllocNode *LPos; + + printf("Heap: bottom=0x%lx 0x%lx-0x%lx, big freelist=", (long)pc->HeapBottom, (long)&(pc->HeapMemory)[0], (long)&(pc->HeapMemory)[HEAP_SIZE]); + for (LPos = pc->FreeListBig; LPos != NULL; LPos = LPos->NextFree) + printf("0x%lx:%d ", (long)LPos, LPos->Size); + + printf("\n"); +} +#endif + +/* initialise the stack and heap storage */ +void HeapInit(Picoc *pc, int StackOrHeapSize) +{ + int Count; + int AlignOffset = 0; + +#ifdef USE_MALLOC_STACK + pc->HeapMemory = malloc(StackOrHeapSize); + pc->HeapBottom = NULL; /* the bottom of the (downward-growing) heap */ + pc->StackFrame = NULL; /* the current stack frame */ + pc->HeapStackTop = NULL; /* the top of the stack */ +#else +# ifdef SURVEYOR_HOST + pc->HeapMemory = (unsigned char *)C_HEAPSTART; /* all memory - stack and heap */ + pc->HeapBottom = (void *)C_HEAPSTART + HEAP_SIZE; /* the bottom of the (downward-growing) heap */ + pc->StackFrame = (void *)C_HEAPSTART; /* the current stack frame */ + pc->HeapStackTop = (void *)C_HEAPSTART; /* the top of the stack */ + pc->HeapMemStart = (void *)C_HEAPSTART; +# else + pc->HeapBottom = &HeapMemory[HEAP_SIZE]; /* the bottom of the (downward-growing) heap */ + pc->StackFrame = &HeapMemory[0]; /* the current stack frame */ + pc->HeapStackTop = &HeapMemory[0]; /* the top of the stack */ +# endif +#endif + + while (((unsigned long)&pc->HeapMemory[AlignOffset] & (sizeof(ALIGN_TYPE)-1)) != 0) + AlignOffset++; + + pc->StackFrame = &(pc->HeapMemory)[AlignOffset]; + pc->HeapStackTop = &(pc->HeapMemory)[AlignOffset]; + *(void **)(pc->StackFrame) = NULL; + pc->HeapBottom = &(pc->HeapMemory)[StackOrHeapSize-sizeof(ALIGN_TYPE)+AlignOffset]; + pc->FreeListBig = NULL; + for (Count = 0; Count < FREELIST_BUCKETS; Count++) + pc->FreeListBucket[Count] = NULL; +} + +void HeapCleanup(Picoc *pc) +{ +#ifdef USE_MALLOC_STACK + free(pc->HeapMemory); +#endif +} + +/* allocate some space on the stack, in the current stack frame + * clears memory. can return NULL if out of stack space */ +void *HeapAllocStack(Picoc *pc, int Size) +{ + char *NewMem = pc->HeapStackTop; + char *NewTop = (char *)pc->HeapStackTop + MEM_ALIGN(Size); +#ifdef DEBUG_HEAP + printf("HeapAllocStack(%ld) at 0x%lx\n", (unsigned long)MEM_ALIGN(Size), (unsigned long)pc->HeapStackTop); +#endif + if (NewTop > (char *)pc->HeapBottom) + return NULL; + + pc->HeapStackTop = (void *)NewTop; + memset((void *)NewMem, '\0', Size); + return NewMem; +} + +/* allocate some space on the stack, in the current stack frame */ +void HeapUnpopStack(Picoc *pc, int Size) +{ +#ifdef DEBUG_HEAP + printf("HeapUnpopStack(%ld) at 0x%lx\n", (unsigned long)MEM_ALIGN(Size), (unsigned long)pc->HeapStackTop); +#endif + pc->HeapStackTop = (void *)((char *)pc->HeapStackTop + MEM_ALIGN(Size)); +} + +/* free some space at the top of the stack */ +int HeapPopStack(Picoc *pc, void *Addr, int Size) +{ + int ToLose = MEM_ALIGN(Size); + if (ToLose > ((char *)pc->HeapStackTop - (char *)&(pc->HeapMemory)[0])) + return FALSE; + +#ifdef DEBUG_HEAP + printf("HeapPopStack(0x%lx, %ld) back to 0x%lx\n", (unsigned long)Addr, (unsigned long)MEM_ALIGN(Size), (unsigned long)pc->HeapStackTop - ToLose); +#endif + pc->HeapStackTop = (void *)((char *)pc->HeapStackTop - ToLose); + assert(Addr == NULL || pc->HeapStackTop == Addr); + + return TRUE; +} + +/* push a new stack frame on to the stack */ +void HeapPushStackFrame(Picoc *pc) +{ +#ifdef DEBUG_HEAP + printf("Adding stack frame at 0x%lx\n", (unsigned long)pc->HeapStackTop); +#endif + *(void **)pc->HeapStackTop = pc->StackFrame; + pc->StackFrame = pc->HeapStackTop; + pc->HeapStackTop = (void *)((char *)pc->HeapStackTop + MEM_ALIGN(sizeof(ALIGN_TYPE))); +} + +/* pop the current stack frame, freeing all memory in the frame. can return NULL */ +int HeapPopStackFrame(Picoc *pc) +{ + if (*(void **)pc->StackFrame != NULL) + { + pc->HeapStackTop = pc->StackFrame; + pc->StackFrame = *(void **)pc->StackFrame; +#ifdef DEBUG_HEAP + printf("Popping stack frame back to 0x%lx\n", (unsigned long)pc->HeapStackTop); +#endif + return TRUE; + } + else + return FALSE; +} + +/* allocate some dynamically allocated memory. memory is cleared. can return NULL if out of memory */ +void *HeapAllocMem(Picoc *pc, int Size) +{ +#ifdef USE_MALLOC_HEAP + return calloc(Size, 1); +#else + struct AllocNode *NewMem = NULL; + struct AllocNode **FreeNode; + int AllocSize = MEM_ALIGN(Size) + MEM_ALIGN(sizeof(NewMem->Size)); + int Bucket; + void *ReturnMem; + + if (Size == 0) + return NULL; + + assert(Size > 0); + + /* make sure we have enough space for an AllocNode */ + if (AllocSize < sizeof(struct AllocNode)) + AllocSize = sizeof(struct AllocNode); + + Bucket = AllocSize >> 2; + if (Bucket < FREELIST_BUCKETS && pc->FreeListBucket[Bucket] != NULL) + { + /* try to allocate from a freelist bucket first */ +#ifdef DEBUG_HEAP + printf("allocating %d(%d) from bucket", Size, AllocSize); +#endif + NewMem = pc->FreeListBucket[Bucket]; + assert((unsigned long)NewMem >= (unsigned long)&(pc->HeapMemory)[0] && (unsigned char *)NewMem - &(pc->HeapMemory)[0] < HEAP_SIZE); + pc->FreeListBucket[Bucket] = *(struct AllocNode **)NewMem; + assert(pc->FreeListBucket[Bucket] == NULL || ((unsigned long)pc->FreeListBucket[Bucket] >= (unsigned long)&(pc->HeapMemory)[0] && (unsigned char *)pc->FreeListBucket[Bucket] - &(pc->HeapMemory)[0] < HEAP_SIZE)); + NewMem->Size = AllocSize; + } + else if (pc->FreeListBig != NULL) + { + /* grab the first item from the "big" freelist we can fit in */ + for (FreeNode = &pc->FreeListBig; *FreeNode != NULL && (*FreeNode)->Size < AllocSize; FreeNode = &(*FreeNode)->NextFree) + {} + + if (*FreeNode != NULL) + { + assert((unsigned long)*FreeNode >= (unsigned long)&(pc->HeapMemory)[0] && (unsigned char *)*FreeNode - &(pc->HeapMemory)[0] < HEAP_SIZE); + assert((*FreeNode)->Size < HEAP_SIZE && (*FreeNode)->Size > 0); + if ((*FreeNode)->Size < AllocSize + SPLIT_MEM_THRESHOLD) + { + /* close in size - reduce fragmentation by not splitting */ +#ifdef DEBUG_HEAP + printf("allocating %d(%d) from freelist, no split (%d)", Size, AllocSize, (*FreeNode)->Size); +#endif + NewMem = *FreeNode; + assert((unsigned long)NewMem >= (unsigned long)&(pc->HeapMemory)[0] && (unsigned char *)NewMem - &(pc->HeapMemory)[0] < HEAP_SIZE); + *FreeNode = NewMem->NextFree; + } + else + { + /* split this big memory chunk */ +#ifdef DEBUG_HEAP + printf("allocating %d(%d) from freelist, split chunk (%d)", Size, AllocSize, (*FreeNode)->Size); +#endif + NewMem = (void *)((char *)*FreeNode + (*FreeNode)->Size - AllocSize); + assert((unsigned long)NewMem >= (unsigned long)&(pc->HeapMemory)[0] && (unsigned char *)NewMem - &(pc->HeapMemory)[0] < HEAP_SIZE); + (*FreeNode)->Size -= AllocSize; + NewMem->Size = AllocSize; + } + } + } + + if (NewMem == NULL) + { + /* couldn't allocate from a freelist - try to increase the size of the heap area */ +#ifdef DEBUG_HEAP + printf("allocating %d(%d) at bottom of heap (0x%lx-0x%lx)", Size, AllocSize, (long)((char *)pc->HeapBottom - AllocSize), (long)HeapBottom); +#endif + if ((char *)pc->HeapBottom - AllocSize < (char *)pc->HeapStackTop) + return NULL; + + pc->HeapBottom = (void *)((char *)pc->HeapBottom - AllocSize); + NewMem = pc->HeapBottom; + NewMem->Size = AllocSize; + } + + ReturnMem = (void *)((char *)NewMem + MEM_ALIGN(sizeof(NewMem->Size))); + memset(ReturnMem, '\0', AllocSize - MEM_ALIGN(sizeof(NewMem->Size))); +#ifdef DEBUG_HEAP + printf(" = %lx\n", (unsigned long)ReturnMem); +#endif + return ReturnMem; +#endif +} + +/* free some dynamically allocated memory */ +void HeapFreeMem(Picoc *pc, void *Mem) +{ +#ifdef USE_MALLOC_HEAP + free(Mem); +#else + struct AllocNode *MemNode = (struct AllocNode *)((char *)Mem - MEM_ALIGN(sizeof(MemNode->Size))); + int Bucket = MemNode->Size >> 2; + +#ifdef DEBUG_HEAP + printf("HeapFreeMem(0x%lx)\n", (unsigned long)Mem); +#endif + assert((unsigned long)Mem >= (unsigned long)&(pc->HeapMemory)[0] && (unsigned char *)Mem - &(pc->HeapMemory)[0] < HEAP_SIZE); + assert(MemNode->Size < HEAP_SIZE && MemNode->Size > 0); + if (Mem == NULL) + return; + + if ((void *)MemNode == pc->HeapBottom) + { + /* pop it off the bottom of the heap, reducing the heap size */ +#ifdef DEBUG_HEAP + printf("freeing %d from bottom of heap\n", MemNode->Size); +#endif + pc->HeapBottom = (void *)((char *)pc->HeapBottom + MemNode->Size); +#ifdef DEBUG_HEAP + ShowBigList(pc); +#endif + } + else if (Bucket < FREELIST_BUCKETS) + { + /* we can fit it in a bucket */ +#ifdef DEBUG_HEAP + printf("freeing %d to bucket\n", MemNode->Size); +#endif + assert(pc->FreeListBucket[Bucket] == NULL || ((unsigned long)pc->FreeListBucket[Bucket] >= (unsigned long)&(pc->HeapMemory)[0] && (unsigned char *)FreeListBucket[Bucket] - &HeapMemory[0] < HEAP_SIZE)); + *(struct AllocNode **)MemNode = pc->FreeListBucket[Bucket]; + pc->FreeListBucket[Bucket] = (struct AllocNode *)MemNode; + } + else + { + /* put it in the big memory freelist */ +#ifdef DEBUG_HEAP + printf("freeing %lx:%d to freelist\n", (unsigned long)Mem, MemNode->Size); +#endif + assert(pc->FreeListBig == NULL || ((unsigned long)pc->FreeListBig >= (unsigned long)&(pc->HeapMemory)[0] && (unsigned char *)pc->FreeListBig - &(pc->HeapMemory)[0] < HEAP_SIZE)); + MemNode->NextFree = pc->FreeListBig; + FreeListBig = MemNode; +#ifdef DEBUG_HEAP + ShowBigList(pc); +#endif + } +#endif +} + diff --git a/src/heap.o b/src/heap.o new file mode 100644 index 0000000..041eac5 Binary files /dev/null and b/src/heap.o differ diff --git a/src/include.c b/src/include.c new file mode 100644 index 0000000..304ad9e --- /dev/null +++ b/src/include.c @@ -0,0 +1,130 @@ +/* picoc include system - can emulate system includes from built-in libraries + * or it can include and parse files if the system has files */ + +#include "picoc.h" +#include "interpreter.h" + +#ifndef NO_HASH_INCLUDE + +#ifdef PERSOPORT +extern int enhanced_mode ; +void IncludeExternalTools(Picoc *pc) ; +#endif + + +/* initialise the built-in include libraries */ +void IncludeInit(Picoc *pc) +{ +#ifndef BUILTIN_MINI_STDLIB + IncludeRegister(pc, "ctype.h", NULL, &StdCtypeFunctions[0], NULL); + IncludeRegister(pc, "errno.h", &StdErrnoSetupFunc, NULL, NULL); +# ifndef NO_FP + IncludeRegister(pc, "math.h", &MathSetupFunc, &MathFunctions[0], NULL); +# endif + IncludeRegister(pc, "stdbool.h", &StdboolSetupFunc, NULL, StdboolDefs); + +#ifdef PERSOPORT + IncludeRegister(pc, "popen.h", &PopenSetupFunc, &PopenFunctions[0], PopenDefs) ; + InitDirentDefs(); + IncludeRegister(pc, "dirent.h", &DirentSetupFunc, &DirentFunctions[0], DirentDefs) ; + if( enhanced_mode ) { IncludeExternalTools(pc); } + IncludeRegister(pc, "stat.h", &StatSetupFunc, &StatFunctions[0], StatDefs); + IncludeRegister(pc, "regex.h", &RegexSetupFunc, &RegexFunctions[0], RegexDefs); + IncludeRegister(pc, "socket.h", &SocketSetupFunc, &SocketFunctions[0], SocketDefs); + IncludeRegister(pc, "various.h", &VariousSetupFunc, &VariousFunctions[0], VariousDefs); +#endif + + IncludeRegister(pc, "stdio.h", &StdioSetupFunc, &StdioFunctions[0], StdioDefs); + IncludeRegister(pc, "stdlib.h", &StdlibSetupFunc, &StdlibFunctions[0], NULL); + IncludeRegister(pc, "string.h", &StringSetupFunc, &StringFunctions[0], NULL); + IncludeRegister(pc, "time.h", &StdTimeSetupFunc, &StdTimeFunctions[0], StdTimeDefs); + +#ifndef WIN32 + IncludeRegister(pc, "unistd.h", &UnistdSetupFunc, &UnistdFunctions[0], UnistdDefs); +# endif + +#ifdef PERSOPORT + IncludeRegister(pc, "unistd.h", &UnistdSetupFunc, &UnistdFunctions[0], UnistdDefs); + IncludeRegister(pc, "types.h", &TypesSetupFunc, &TypesFunctions[0], TypesDefs); +#ifdef WIN32 + IncludeRegister(pc, "win.h", &WinSetupFunc, &WinFunctions[0], WinDefs); +#endif +#endif + +#endif +} + +/* clean up space used by the include system */ +void IncludeCleanup(Picoc *pc) +{ + struct IncludeLibrary *ThisInclude = pc->IncludeLibList; + struct IncludeLibrary *NextInclude; + + while (ThisInclude != NULL) + { + NextInclude = ThisInclude->NextLib; + HeapFreeMem(pc, ThisInclude); + ThisInclude = NextInclude; + } + + pc->IncludeLibList = NULL; +} + +/* register a new build-in include file */ +void IncludeRegister(Picoc *pc, const char *IncludeName, void (*SetupFunction)(Picoc *pc), struct LibraryFunction *FuncList, const char *SetupCSource) +{ + struct IncludeLibrary *NewLib = HeapAllocMem(pc, sizeof(struct IncludeLibrary)); + NewLib->IncludeName = TableStrRegister(pc, IncludeName); + NewLib->SetupFunction = SetupFunction; + NewLib->FuncList = FuncList; + NewLib->SetupCSource = SetupCSource; + NewLib->NextLib = pc->IncludeLibList; + pc->IncludeLibList = NewLib; +} + +/* include all of the system headers */ +void PicocIncludeAllSystemHeaders(Picoc *pc) +{ + struct IncludeLibrary *ThisInclude = pc->IncludeLibList; + + for (; ThisInclude != NULL; ThisInclude = ThisInclude->NextLib) + IncludeFile(pc, ThisInclude->IncludeName); +} + +/* include one of a number of predefined libraries, or perhaps an actual file */ +void IncludeFile(Picoc *pc, char *FileName) +{ + struct IncludeLibrary *LInclude; + + /* scan for the include file name to see if it's in our list of predefined includes */ + for (LInclude = pc->IncludeLibList; LInclude != NULL; LInclude = LInclude->NextLib) + { + if (strcmp(LInclude->IncludeName, FileName) == 0) + { + /* found it - protect against multiple inclusion */ + if (!VariableDefined(pc, FileName)) + { + VariableDefine(pc, NULL, FileName, NULL, &pc->VoidType, FALSE); + + /* run an extra startup function if there is one */ + if (LInclude->SetupFunction != NULL) + (*LInclude->SetupFunction)(pc); + + /* parse the setup C source code - may define types etc. */ + if (LInclude->SetupCSource != NULL) + PicocParse(pc, FileName, LInclude->SetupCSource, strlen(LInclude->SetupCSource), TRUE, TRUE, FALSE, FALSE); + + /* set up the library functions */ + if (LInclude->FuncList != NULL) + LibraryAdd(pc, &pc->GlobalTable, FileName, LInclude->FuncList); + } + + return; + } + } + + /* not a predefined file, read a real file */ + PicocPlatformScanFile(pc, FileName); +} + +#endif /* NO_HASH_INCLUDE */ diff --git a/src/include.o b/src/include.o new file mode 100644 index 0000000..4ec8a29 Binary files /dev/null and b/src/include.o differ diff --git a/src/interpreter.h b/src/interpreter.h new file mode 100644 index 0000000..217c5a3 --- /dev/null +++ b/src/interpreter.h @@ -0,0 +1,713 @@ +/* picoc main header file - this has all the main data structures and + * function prototypes. If you're just calling picoc you should look at the + * external interface instead, in picoc.h */ + +#ifndef INTERPRETER_H +#define INTERPRETER_H + +#include "platform.h" + + +/* handy definitions */ +#ifndef TRUE +#define TRUE 1 +#define FALSE 0 +#endif + +#ifndef NULL +#define NULL 0 +#endif + +#ifndef min +#define min(x,y) (((x)<(y))?(x):(y)) +#endif + +#define MEM_ALIGN(x) (((x) + sizeof(ALIGN_TYPE) - 1) & ~(sizeof(ALIGN_TYPE)-1)) + +#define GETS_BUF_MAX 256 + +/* for debugging */ +#define PRINT_SOURCE_POS ({ PrintSourceTextErrorLine(Parser->pc->CStdOut, Parser->FileName, Parser->SourceText, Parser->Line, Parser->CharacterPos); PlatformPrintf(Parser->pc->CStdOut, "\n"); }) +#define PRINT_TYPE(typ) PlatformPrintf(Parser->pc->CStdOut, "%t\n", typ); + +/* small processors use a simplified FILE * for stdio, otherwise use the system FILE * */ +#ifdef BUILTIN_MINI_STDLIB +typedef struct OutputStream IOFILE; +#else +typedef FILE IOFILE; +#endif + +/* coercion of numeric types to other numeric types */ +#ifndef NO_FP +#define IS_FP(v) ((v)->Typ->Base == TypeFP) +#define FP_VAL(v) ((v)->Val->FP) +#else +#define IS_FP(v) 0 +#define FP_VAL(v) 0 +#endif + +#define IS_POINTER_COERCIBLE(v, ap) ((ap) ? ((v)->Typ->Base == TypePointer) : 0) +#define POINTER_COERCE(v) ((int)(v)->Val->Pointer) + +#define IS_INTEGER_NUMERIC_TYPE(t) ((t)->Base >= TypeInt && (t)->Base <= TypeUnsignedLong) +#define IS_INTEGER_NUMERIC(v) IS_INTEGER_NUMERIC_TYPE((v)->Typ) +#define IS_NUMERIC_COERCIBLE(v) (IS_INTEGER_NUMERIC(v) || IS_FP(v)) +#define IS_NUMERIC_COERCIBLE_PLUS_POINTERS(v,ap) (IS_NUMERIC_COERCIBLE(v) || IS_POINTER_COERCIBLE(v,ap)) + + +struct Table; +struct Picoc_Struct; + +typedef struct Picoc_Struct Picoc; + +/* lexical tokens */ +enum LexToken +{ + /* 0x00 */ TokenNone, + /* 0x01 */ TokenComma, + /* 0x02 */ TokenAssign, TokenAddAssign, TokenSubtractAssign, TokenMultiplyAssign, TokenDivideAssign, TokenModulusAssign, + /* 0x08 */ TokenShiftLeftAssign, TokenShiftRightAssign, TokenArithmeticAndAssign, TokenArithmeticOrAssign, TokenArithmeticExorAssign, + /* 0x0d */ TokenQuestionMark, TokenColon, + /* 0x0f */ TokenLogicalOr, + /* 0x10 */ TokenLogicalAnd, + /* 0x11 */ TokenArithmeticOr, + /* 0x12 */ TokenArithmeticExor, + /* 0x13 */ TokenAmpersand, + /* 0x14 */ TokenEqual, TokenNotEqual, + /* 0x16 */ TokenLessThan, TokenGreaterThan, TokenLessEqual, TokenGreaterEqual, + /* 0x1a */ TokenShiftLeft, TokenShiftRight, + /* 0x1c */ TokenPlus, TokenMinus, + /* 0x1e */ TokenAsterisk, TokenSlash, TokenModulus, + /* 0x21 */ TokenIncrement, TokenDecrement, TokenUnaryNot, TokenUnaryExor, TokenSizeof, TokenCast, + /* 0x27 */ TokenLeftSquareBracket, TokenRightSquareBracket, TokenDot, TokenArrow, + /* 0x2b */ TokenOpenBracket, TokenCloseBracket, + /* 0x2d */ TokenIdentifier, TokenIntegerConstant, TokenFPConstant, TokenStringConstant, TokenCharacterConstant, + /* 0x32 */ TokenSemicolon, TokenEllipsis, + /* 0x34 */ TokenLeftBrace, TokenRightBrace, + /* 0x36 */ TokenIntType, TokenCharType, TokenFloatType, TokenDoubleType, TokenVoidType, TokenEnumType, + /* 0x3c */ TokenLongType, TokenSignedType, TokenShortType, TokenStaticType, TokenAutoType, TokenRegisterType, TokenExternType, TokenStructType, TokenUnionType, TokenUnsignedType, TokenTypedef, + /* 0x46 */ TokenContinue, TokenDo, TokenElse, TokenFor, TokenGoto, TokenIf, TokenWhile, TokenBreak, TokenSwitch, TokenCase, TokenDefault, TokenReturn, + /* 0x52 */ TokenHashDefine, TokenHashInclude, TokenHashIf, TokenHashIfdef, TokenHashIfndef, TokenHashElse, TokenHashEndif, + /* 0x59 */ TokenNew, TokenDelete, + /* 0x5b */ TokenOpenMacroBracket, + /* 0x5c */ TokenEOF, TokenEndOfLine, TokenEndOfFunction +}; + +/* used in dynamic memory allocation */ +struct AllocNode +{ + unsigned int Size; + struct AllocNode *NextFree; +}; + +/* whether we're running or skipping code */ +enum RunMode +{ + RunModeRun, /* we're running code as we parse it */ + RunModeSkip, /* skipping code, not running */ + RunModeReturn, /* returning from a function */ + RunModeCaseSearch, /* searching for a case label */ + RunModeBreak, /* breaking out of a switch/while/do */ + RunModeContinue, /* as above but repeat the loop */ + RunModeGoto /* searching for a goto label */ +}; + +/* parser state - has all this detail so we can parse nested files */ +struct ParseState +{ + Picoc *pc; /* the picoc instance this parser is a part of */ + const unsigned char *Pos; /* the character position in the source text */ + char *FileName; /* what file we're executing (registered string) */ + short int Line; /* line number we're executing */ + short int CharacterPos; /* character/column in the line we're executing */ + enum RunMode Mode; /* whether to skip or run code */ + int SearchLabel; /* what case label we're searching for */ + const char *SearchGotoLabel;/* what goto label we're searching for */ + const char *SourceText; /* the entire source text */ + short int HashIfLevel; /* how many "if"s we're nested down */ + short int HashIfEvaluateToLevel; /* if we're not evaluating an if branch, what the last evaluated level was */ + char DebugMode; /* debugging mode */ + int ScopeID; /* for keeping track of local variables (free them after they go out of scope) */ +}; + +/* values */ +enum BaseType +{ + TypeVoid, /* no type */ + TypeInt, /* integer */ + TypeShort, /* short integer */ + TypeChar, /* a single character (signed) */ + TypeLong, /* long integer */ + TypeUnsignedInt, /* unsigned integer */ + TypeUnsignedShort, /* unsigned short integer */ + TypeUnsignedChar, /* unsigned 8-bit number */ /* must be before unsigned long */ + TypeUnsignedLong, /* unsigned long integer */ +#ifndef NO_FP + TypeFP, /* floating point */ +#endif + TypeFunction, /* a function */ + TypeMacro, /* a macro */ + TypePointer, /* a pointer */ + TypeArray, /* an array of a sub-type */ + TypeStruct, /* aggregate type */ + TypeUnion, /* merged type */ + TypeEnum, /* enumerated integer type */ + TypeGotoLabel, /* a label we can "goto" */ + Type_Type /* a type for storing types */ +}; + +/* data type */ +struct ValueType +{ + enum BaseType Base; /* what kind of type this is */ + int ArraySize; /* the size of an array type */ + int Sizeof; /* the storage required */ + int AlignBytes; /* the alignment boundary of this type */ + const char *Identifier; /* the name of a struct or union */ + struct ValueType *FromType; /* the type we're derived from (or NULL) */ + struct ValueType *DerivedTypeList; /* first in a list of types derived from this one */ + struct ValueType *Next; /* next item in the derived type list */ + struct Table *Members; /* members of a struct or union */ + int OnHeap; /* true if allocated on the heap */ + int StaticQualifier; /* true if it's a static */ +}; + +/* function definition */ +struct FuncDef +{ + struct ValueType *ReturnType; /* the return value type */ + int NumParams; /* the number of parameters */ + int VarArgs; /* has a variable number of arguments after the explicitly specified ones */ + struct ValueType **ParamType; /* array of parameter types */ + char **ParamName; /* array of parameter names */ + void (*Intrinsic)(); /* intrinsic call address or NULL */ + struct ParseState Body; /* lexical tokens of the function body if not intrinsic */ +}; + +/* macro definition */ +struct MacroDef +{ + int NumParams; /* the number of parameters */ + char **ParamName; /* array of parameter names */ + struct ParseState Body; /* lexical tokens of the function body if not intrinsic */ +}; + +/* values */ +union AnyValue +{ + char Character; + short ShortInteger; + int Integer; + long LongInteger; + unsigned short UnsignedShortInteger; + unsigned int UnsignedInteger; + unsigned long UnsignedLongInteger; + unsigned char UnsignedCharacter; + char *Identifier; + char ArrayMem[2]; /* placeholder for where the data starts, doesn't point to it */ + struct ValueType *Typ; + struct FuncDef FuncDef; + struct MacroDef MacroDef; +#ifndef NO_FP + double FP; +#endif + void *Pointer; /* unsafe native pointers */ +}; + +struct Value +{ + struct ValueType *Typ; /* the type of this value */ + union AnyValue *Val; /* pointer to the AnyValue which holds the actual content */ + struct Value *LValueFrom; /* if an LValue, this is a Value our LValue is contained within (or NULL) */ + char ValOnHeap; /* this Value is on the heap */ + char ValOnStack; /* the AnyValue is on the stack along with this Value */ + char AnyValOnHeap; /* the AnyValue is separately allocated from the Value on the heap */ + char IsLValue; /* is modifiable and is allocated somewhere we can usefully modify it */ + int ScopeID; /* to know when it goes out of scope */ + char OutOfScope; +}; + +/* hash table data structure */ +struct TableEntry +{ + struct TableEntry *Next; /* next item in this hash chain */ + const char *DeclFileName; /* where the variable was declared */ + unsigned short DeclLine; + unsigned short DeclColumn; + + union TableEntryPayload + { + struct ValueEntry + { + char *Key; /* points to the shared string table */ + struct Value *Val; /* the value we're storing */ + } v; /* used for tables of values */ + + char Key[1]; /* dummy size - used for the shared string table */ + + struct BreakpointEntry /* defines a breakpoint */ + { + const char *FileName; + short int Line; + short int CharacterPos; + } b; + + } p; +}; + +struct Table +{ + short Size; + short OnHeap; + struct TableEntry **HashTable; +}; + +/* stack frame for function calls */ +struct StackFrame +{ + struct ParseState ReturnParser; /* how we got here */ + const char *FuncName; /* the name of the function we're in */ + struct Value *ReturnValue; /* copy the return value here */ + struct Value **Parameter; /* array of parameter values */ + int NumParams; /* the number of parameters */ + struct Table LocalTable; /* the local variables and parameters */ + struct TableEntry *LocalHashTable[LOCAL_TABLE_SIZE]; + struct StackFrame *PreviousStackFrame; /* the next lower stack frame */ +}; + +/* lexer state */ +enum LexMode +{ + LexModeNormal, + LexModeHashInclude, + LexModeHashDefine, + LexModeHashDefineSpace, + LexModeHashDefineSpaceIdent +}; + +struct LexState +{ + const char *Pos; + const char *End; + const char *FileName; + int Line; + int CharacterPos; + const char *SourceText; + enum LexMode Mode; + int EmitExtraNewlines; +}; + +/* library function definition */ +struct LibraryFunction +{ + void (*Func)(struct ParseState *Parser, struct Value *, struct Value **, int); + const char *Prototype; +}; + +/* output stream-type specific state information */ +union OutputStreamInfo +{ + struct StringOutputStream + { + struct ParseState *Parser; + char *WritePos; + } Str; +}; + +/* stream-specific method for writing characters to the console */ +typedef void CharWriter(unsigned char, union OutputStreamInfo *); + +/* used when writing output to a string - eg. sprintf() */ +struct OutputStream +{ + CharWriter *Putch; + union OutputStreamInfo i; +}; + +/* possible results of parsing a statement */ +enum ParseResult { ParseResultEOF, ParseResultError, ParseResultOk }; + +/* a chunk of heap-allocated tokens we'll cleanup when we're done */ +struct CleanupTokenNode +{ + void *Tokens; + const char *SourceText; + struct CleanupTokenNode *Next; +}; + +/* linked list of lexical tokens used in interactive mode */ +struct TokenLine +{ + struct TokenLine *Next; + unsigned char *Tokens; + int NumBytes; +}; + + +/* a list of libraries we can include */ +struct IncludeLibrary +{ + char *IncludeName; + void (*SetupFunction)(Picoc *pc); + struct LibraryFunction *FuncList; + const char *SetupCSource; + struct IncludeLibrary *NextLib; +}; + +#define FREELIST_BUCKETS 8 /* freelists for 4, 8, 12 ... 32 byte allocs */ +#define SPLIT_MEM_THRESHOLD 16 /* don't split memory which is close in size */ +#define BREAKPOINT_TABLE_SIZE 21 + + +/* the entire state of the picoc system */ +struct Picoc_Struct +{ + /* parser global data */ + struct Table GlobalTable; + struct CleanupTokenNode *CleanupTokenList; + struct TableEntry *GlobalHashTable[GLOBAL_TABLE_SIZE]; + + /* lexer global data */ + struct TokenLine *InteractiveHead; + struct TokenLine *InteractiveTail; + struct TokenLine *InteractiveCurrentLine; + int LexUseStatementPrompt; + union AnyValue LexAnyValue; + struct Value LexValue; + struct Table ReservedWordTable; + struct TableEntry *ReservedWordHashTable[RESERVED_WORD_TABLE_SIZE]; + + /* the table of string literal values */ + struct Table StringLiteralTable; + struct TableEntry *StringLiteralHashTable[STRING_LITERAL_TABLE_SIZE]; + + /* the stack */ + struct StackFrame *TopStackFrame; + + /* the value passed to exit() */ + int PicocExitValue; + + /* a list of libraries we can include */ + struct IncludeLibrary *IncludeLibList; + + /* heap memory */ +#ifdef USE_MALLOC_STACK + unsigned char *HeapMemory; /* stack memory since our heap is malloc()ed */ + void *HeapBottom; /* the bottom of the (downward-growing) heap */ + void *StackFrame; /* the current stack frame */ + void *HeapStackTop; /* the top of the stack */ +#else +# ifdef SURVEYOR_HOST + unsigned char *HeapMemory; /* all memory - stack and heap */ + void *HeapBottom; /* the bottom of the (downward-growing) heap */ + void *StackFrame; /* the current stack frame */ + void *HeapStackTop; /* the top of the stack */ + void *HeapMemStart; +# else + unsigned char HeapMemory[HEAP_SIZE]; /* all memory - stack and heap */ + void *HeapBottom; /* the bottom of the (downward-growing) heap */ + void *StackFrame; /* the current stack frame */ + void *HeapStackTop; /* the top of the stack */ +# endif +#endif + + struct AllocNode *FreeListBucket[FREELIST_BUCKETS]; /* we keep a pool of freelist buckets to reduce fragmentation */ + struct AllocNode *FreeListBig; /* free memory which doesn't fit in a bucket */ + + /* types */ + struct ValueType UberType; + struct ValueType IntType; + struct ValueType ShortType; + struct ValueType CharType; + struct ValueType LongType; + struct ValueType UnsignedIntType; + struct ValueType UnsignedShortType; + struct ValueType UnsignedLongType; + struct ValueType UnsignedCharType; + #ifndef NO_FP + struct ValueType FPType; + #endif + struct ValueType VoidType; + struct ValueType TypeType; + struct ValueType FunctionType; + struct ValueType MacroType; + struct ValueType EnumType; + struct ValueType GotoLabelType; + struct ValueType *CharPtrType; + struct ValueType *CharPtrPtrType; + struct ValueType *CharArrayType; + struct ValueType *VoidPtrType; + + /* debugger */ + struct Table BreakpointTable; + struct TableEntry *BreakpointHashTable[BREAKPOINT_TABLE_SIZE]; + int BreakpointCount; + int DebugManualBreak; + + /* C library */ + int BigEndian; + int LittleEndian; + + IOFILE *CStdOut; + IOFILE CStdOutBase; + + /* the picoc version string */ + const char *VersionString; + + /* exit longjump buffer */ +#if defined(UNIX_HOST) || defined(WIN32) + jmp_buf PicocExitBuf; +#endif +#ifdef SURVEYOR_HOST + int PicocExitBuf[41]; +#endif + + /* string table */ + struct Table StringTable; + struct TableEntry *StringHashTable[STRING_TABLE_SIZE]; + char *StrEmpty; +}; + +/* table.c */ +void TableInit(Picoc *pc); +char *TableStrRegister(Picoc *pc, const char *Str); +char *TableStrRegister2(Picoc *pc, const char *Str, int Len); +void TableInitTable(struct Table *Tbl, struct TableEntry **HashTable, int Size, int OnHeap); +int TableSet(Picoc *pc, struct Table *Tbl, char *Key, struct Value *Val, const char *DeclFileName, int DeclLine, int DeclColumn); +int TableGet(struct Table *Tbl, const char *Key, struct Value **Val, const char **DeclFileName, int *DeclLine, int *DeclColumn); +struct Value *TableDelete(Picoc *pc, struct Table *Tbl, const char *Key); +char *TableSetIdentifier(Picoc *pc, struct Table *Tbl, const char *Ident, int IdentLen); +void TableStrFree(Picoc *pc); + +/* lex.c */ +void LexInit(Picoc *pc); +void LexCleanup(Picoc *pc); +void *LexAnalyse(Picoc *pc, const char *FileName, const char *Source, int SourceLen, int *TokenLen); +void LexInitParser(struct ParseState *Parser, Picoc *pc, const char *SourceText, void *TokenSource, char *FileName, int RunIt, int SetDebugMode); +enum LexToken LexGetToken(struct ParseState *Parser, struct Value **Value, int IncPos); +enum LexToken LexRawPeekToken(struct ParseState *Parser); +void LexToEndOfLine(struct ParseState *Parser); +void *LexCopyTokens(struct ParseState *StartParser, struct ParseState *EndParser); +void LexInteractiveClear(Picoc *pc, struct ParseState *Parser); +void LexInteractiveCompleted(Picoc *pc, struct ParseState *Parser); +void LexInteractiveStatementPrompt(Picoc *pc); + +/* parse.c */ +/* the following are defined in picoc.h: + * void PicocParse(const char *FileName, const char *Source, int SourceLen, int RunIt, int CleanupNow, int CleanupSource); + * void PicocParseInteractive(); */ +void PicocParseInteractiveNoStartPrompt(Picoc *pc, int EnableDebugger); +enum ParseResult ParseStatement(struct ParseState *Parser, int CheckTrailingSemicolon); +struct Value *ParseFunctionDefinition(struct ParseState *Parser, struct ValueType *ReturnType, char *Identifier); +void ParseCleanup(Picoc *pc); +void ParserCopyPos(struct ParseState *To, struct ParseState *From); +void ParserCopy(struct ParseState *To, struct ParseState *From); + +/* expression.c */ +int ExpressionParse(struct ParseState *Parser, struct Value **Result); +long ExpressionParseInt(struct ParseState *Parser); +void ExpressionAssign(struct ParseState *Parser, struct Value *DestValue, struct Value *SourceValue, int Force, const char *FuncName, int ParamNo, int AllowPointerCoercion); +long ExpressionCoerceInteger(struct Value *Val); +unsigned long ExpressionCoerceUnsignedInteger(struct Value *Val); +#ifndef NO_FP +double ExpressionCoerceFP(struct Value *Val); +#endif + +/* type.c */ +void TypeInit(Picoc *pc); +void TypeCleanup(Picoc *pc); +int TypeSize(struct ValueType *Typ, int ArraySize, int Compact); +int TypeSizeValue(struct Value *Val, int Compact); +int TypeStackSizeValue(struct Value *Val); +int TypeLastAccessibleOffset(Picoc *pc, struct Value *Val); +int TypeParseFront(struct ParseState *Parser, struct ValueType **Typ, int *IsStatic); +void TypeParseIdentPart(struct ParseState *Parser, struct ValueType *BasicTyp, struct ValueType **Typ, char **Identifier); +void TypeParse(struct ParseState *Parser, struct ValueType **Typ, char **Identifier, int *IsStatic); +struct ValueType *TypeGetMatching(Picoc *pc, struct ParseState *Parser, struct ValueType *ParentType, enum BaseType Base, int ArraySize, const char *Identifier, int AllowDuplicates); +struct ValueType *TypeCreateOpaqueStruct(Picoc *pc, struct ParseState *Parser, const char *StructName, int Size); +int TypeIsForwardDeclared(struct ParseState *Parser, struct ValueType *Typ); + +/* heap.c */ +void HeapInit(Picoc *pc, int StackSize); +void HeapCleanup(Picoc *pc); +void *HeapAllocStack(Picoc *pc, int Size); +int HeapPopStack(Picoc *pc, void *Addr, int Size); +void HeapUnpopStack(Picoc *pc, int Size); +void HeapPushStackFrame(Picoc *pc); +int HeapPopStackFrame(Picoc *pc); +void *HeapAllocMem(Picoc *pc, int Size); +void HeapFreeMem(Picoc *pc, void *Mem); + +/* variable.c */ +void VariableInit(Picoc *pc); +void VariableCleanup(Picoc *pc); +void VariableFree(Picoc *pc, struct Value *Val); +void VariableTableCleanup(Picoc *pc, struct Table *HashTable); +void *VariableAlloc(Picoc *pc, struct ParseState *Parser, int Size, int OnHeap); +void VariableStackPop(struct ParseState *Parser, struct Value *Var); +struct Value *VariableAllocValueAndData(Picoc *pc, struct ParseState *Parser, int DataSize, int IsLValue, struct Value *LValueFrom, int OnHeap); +struct Value *VariableAllocValueAndCopy(Picoc *pc, struct ParseState *Parser, struct Value *FromValue, int OnHeap); +struct Value *VariableAllocValueFromType(Picoc *pc, struct ParseState *Parser, struct ValueType *Typ, int IsLValue, struct Value *LValueFrom, int OnHeap); +struct Value *VariableAllocValueFromExistingData(struct ParseState *Parser, struct ValueType *Typ, union AnyValue *FromValue, int IsLValue, struct Value *LValueFrom); +struct Value *VariableAllocValueShared(struct ParseState *Parser, struct Value *FromValue); +struct Value *VariableDefine(Picoc *pc, struct ParseState *Parser, char *Ident, struct Value *InitValue, struct ValueType *Typ, int MakeWritable); +struct Value *VariableDefineButIgnoreIdentical(struct ParseState *Parser, char *Ident, struct ValueType *Typ, int IsStatic, int *FirstVisit); +int VariableDefined(Picoc *pc, const char *Ident); +int VariableDefinedAndOutOfScope(Picoc *pc, const char *Ident); +void VariableRealloc(struct ParseState *Parser, struct Value *FromValue, int NewSize); +void VariableGet(Picoc *pc, struct ParseState *Parser, const char *Ident, struct Value **LVal); +void VariableDefinePlatformVar(Picoc *pc, struct ParseState *Parser, char *Ident, struct ValueType *Typ, union AnyValue *FromValue, int IsWritable); +void VariableStackFrameAdd(struct ParseState *Parser, const char *FuncName, int NumParams); +void VariableStackFramePop(struct ParseState *Parser); +struct Value *VariableStringLiteralGet(Picoc *pc, char *Ident); +void VariableStringLiteralDefine(Picoc *pc, char *Ident, struct Value *Val); +void *VariableDereferencePointer(struct ParseState *Parser, struct Value *PointerValue, struct Value **DerefVal, int *DerefOffset, struct ValueType **DerefType, int *DerefIsLValue); +int VariableScopeBegin(struct ParseState * Parser, int* PrevScopeID); +void VariableScopeEnd(struct ParseState * Parser, int ScopeID, int PrevScopeID); + +/* clibrary.c */ +void BasicIOInit(Picoc *pc); +void LibraryInit(Picoc *pc); +void LibraryAdd(Picoc *pc, struct Table *GlobalTable, const char *LibraryName, struct LibraryFunction *FuncList); +void CLibraryInit(Picoc *pc); +void PrintCh(char OutCh, IOFILE *Stream); +void PrintSimpleInt(long Num, IOFILE *Stream); +void PrintInt(long Num, int FieldWidth, int ZeroPad, int LeftJustify, IOFILE *Stream); +void PrintStr(const char *Str, IOFILE *Stream); +void PrintFP(double Num, IOFILE *Stream); +void PrintType(struct ValueType *Typ, IOFILE *Stream); +void LibPrintf(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs); + +/* platform.c */ +/* the following are defined in picoc.h: + * void PicocCallMain(int argc, char **argv); + * int PicocPlatformSetExitPoint(); + * void PicocInitialise(int StackSize); + * void PicocCleanup(); + * void PicocPlatformScanFile(const char *FileName); + * extern int PicocExitValue; */ +void ProgramFail(struct ParseState *Parser, const char *Message, ...); +void ProgramFailNoParser(Picoc *pc, const char *Message, ...); +void AssignFail(struct ParseState *Parser, const char *Format, struct ValueType *Type1, struct ValueType *Type2, int Num1, int Num2, const char *FuncName, int ParamNo); +void LexFail(Picoc *pc, struct LexState *Lexer, const char *Message, ...); +void PlatformInit(Picoc *pc); +void PlatformCleanup(Picoc *pc); +char *PlatformGetLine(char *Buf, int MaxLen, const char *Prompt); +int PlatformGetCharacter(); +void PlatformPutc(unsigned char OutCh, union OutputStreamInfo *); +void PlatformPrintf(IOFILE *Stream, const char *Format, ...); +void PlatformVPrintf(IOFILE *Stream, const char *Format, va_list Args); +void PlatformExit(Picoc *pc, int ExitVal); +char *PlatformMakeTempName(Picoc *pc, char *TempNameBuffer); +void PlatformLibraryInit(Picoc *pc); + +/* include.c */ +void IncludeInit(Picoc *pc); +void IncludeCleanup(Picoc *pc); +void IncludeRegister(Picoc *pc, const char *IncludeName, void (*SetupFunction)(Picoc *pc), struct LibraryFunction *FuncList, const char *SetupCSource); +void IncludeFile(Picoc *pc, char *Filename); +/* the following is defined in picoc.h: + * void PicocIncludeAllSystemHeaders(); */ + +/* debug.c */ +void DebugInit(); +void DebugCleanup(); +void DebugCheckStatement(struct ParseState *Parser); + + +/* stdio.c */ +extern const char StdioDefs[]; +extern struct LibraryFunction StdioFunctions[]; +void StdioSetupFunc(Picoc *pc); + +/* math.c */ +extern struct LibraryFunction MathFunctions[]; +void MathSetupFunc(Picoc *pc); + +/* string.c */ +extern struct LibraryFunction StringFunctions[]; +void StringSetupFunc(Picoc *pc); + +/* stdlib.c */ +extern struct LibraryFunction StdlibFunctions[]; +void StdlibSetupFunc(Picoc *pc); + +/* time.c */ +extern const char StdTimeDefs[]; +extern struct LibraryFunction StdTimeFunctions[]; +void StdTimeSetupFunc(Picoc *pc); + +/* errno.c */ +void StdErrnoSetupFunc(Picoc *pc); + +/* ctype.c */ +extern struct LibraryFunction StdCtypeFunctions[]; + +/* stdbool.c */ +extern const char StdboolDefs[]; +void StdboolSetupFunc(Picoc *pc); + +/* unistd.c */ +extern const char UnistdDefs[]; +extern struct LibraryFunction UnistdFunctions[]; +void UnistdSetupFunc(Picoc *pc); + +#endif /* INTERPRETER_H */ + +#ifdef PERSOPORT +void PrintHelp( char * filename, struct LibraryFunction DefFunctions[], const char * Defs ) ; + +/* dirent.c */ +extern char DirentDefs[]; +void InitDirentDefs(void) ; +extern struct LibraryFunction DirentFunctions[]; +void DirentSetupFunc(Picoc *pc); + +/* mini_h.c */ +extern const char MiniDefs[]; +extern struct LibraryFunction MiniFunctions[]; +void MiniSetupFunc(Picoc *pc); + +/* tools.c */ +extern const char ToolsDefs[]; +extern struct LibraryFunction ToolsFunctions[]; +void ToolsSetupFunc(Picoc *pc); + +/* popen.c */ +extern const char PopenDefs[]; +extern struct LibraryFunction PopenFunctions[]; +void PopenSetupFunc(Picoc *pc); + +/* types.c */ +extern const char TypesDefs[]; +extern struct LibraryFunction TypesFunctions[]; +void TypesSetupFunc(Picoc *pc); + +/* stat.c */ +extern const char StatDefs[]; +extern struct LibraryFunction StatFunctions[]; +void StatSetupFunc(Picoc *pc); + +/* various.c */ +extern const char VariousDefs[]; +extern struct LibraryFunction VariousFunctions[]; +void VariousSetupFunc(Picoc *pc); + +/* regex.c */ +extern const char RegexDefs[]; +extern struct LibraryFunction RegexFunctions[]; +void RegexSetupFunc(Picoc *pc); + +/* socket.c */ +extern const char SocketDefs[]; +extern struct LibraryFunction SocketFunctions[]; +void SocketSetupFunc(Picoc *pc); + +#ifdef WIN32 +/* win.c */ +extern const char WinDefs[]; +extern struct LibraryFunction WinFunctions[]; +void WinSetupFunc(Picoc *pc); +#endif + +#endif diff --git a/src/lex.c b/src/lex.c new file mode 100644 index 0000000..9524b5b --- /dev/null +++ b/src/lex.c @@ -0,0 +1,1037 @@ +/* picoc lexer - converts source text into a tokenised form */ + +#include "interpreter.h" + +#ifdef NO_CTYPE +#define isalpha(c) (((c) >= 'a' && (c) <= 'z') || ((c) >= 'A' && (c) <= 'Z')) +#define isdigit(c) ((c) >= '0' && (c) <= '9') +#define isalnum(c) (isalpha(c) || isdigit(c)) +#define isspace(c) ((c) == ' ' || (c) == '\t' || (c) == '\r' || (c) == '\n') +#endif +#define isCidstart(c) (isalpha(c) || (c)=='_' || (c)=='#') +#define isCident(c) (isalnum(c) || (c)=='_') + +#define IS_HEX_ALPHA_DIGIT(c) (((c) >= 'a' && (c) <= 'f') || ((c) >= 'A' && (c) <= 'F')) +#define IS_BASE_DIGIT(c,b) (((c) >= '0' && (c) < '0' + (((b)<10)?(b):10)) || (((b) > 10) ? IS_HEX_ALPHA_DIGIT(c) : FALSE)) +#define GET_BASE_DIGIT(c) (((c) <= '9') ? ((c) - '0') : (((c) <= 'F') ? ((c) - 'A' + 10) : ((c) - 'a' + 10))) + +#define NEXTIS(c,x,y) { if (NextChar == (c)) { LEXER_INC(Lexer); GotToken = (x); } else GotToken = (y); } +#define NEXTIS3(c,x,d,y,z) { if (NextChar == (c)) { LEXER_INC(Lexer); GotToken = (x); } else NEXTIS(d,y,z) } +#define NEXTIS4(c,x,d,y,e,z,a) { if (NextChar == (c)) { LEXER_INC(Lexer); GotToken = (x); } else NEXTIS3(d,y,e,z,a) } +#define NEXTIS3PLUS(c,x,d,y,e,z,a) { if (NextChar == (c)) { LEXER_INC(Lexer); GotToken = (x); } else if (NextChar == (d)) { if (Lexer->Pos[1] == (e)) { LEXER_INCN(Lexer, 2); GotToken = (z); } else { LEXER_INC(Lexer); GotToken = (y); } } else GotToken = (a); } +#define NEXTISEXACTLY3(c,d,y,z) { if (NextChar == (c) && Lexer->Pos[1] == (d)) { LEXER_INCN(Lexer, 2); GotToken = (y); } else GotToken = (z); } + +#define LEXER_INC(l) ( (l)->Pos++, (l)->CharacterPos++ ) +#define LEXER_INCN(l, n) ( (l)->Pos+=(n), (l)->CharacterPos+=(n) ) +#define TOKEN_DATA_OFFSET 2 + +#define MAX_CHAR_VALUE 255 /* maximum value which can be represented by a "char" data type */ + + +struct ReservedWord +{ + const char *Word; + enum LexToken Token; +}; + +static struct ReservedWord ReservedWords[] = +{ + { "#define", TokenHashDefine }, + { "#else", TokenHashElse }, + { "#endif", TokenHashEndif }, + { "#if", TokenHashIf }, + { "#ifdef", TokenHashIfdef }, + { "#ifndef", TokenHashIfndef }, + { "#include", TokenHashInclude }, + { "auto", TokenAutoType }, + { "break", TokenBreak }, + { "case", TokenCase }, + { "char", TokenCharType }, + { "continue", TokenContinue }, + { "default", TokenDefault }, + { "delete", TokenDelete }, + { "do", TokenDo }, +#ifndef NO_FP + { "double", TokenDoubleType }, +#endif + { "else", TokenElse }, + { "enum", TokenEnumType }, + { "extern", TokenExternType }, +#ifndef NO_FP + { "float", TokenFloatType }, +#endif + { "for", TokenFor }, + { "goto", TokenGoto }, + { "if", TokenIf }, + { "int", TokenIntType }, + { "long", TokenLongType }, + { "new", TokenNew }, + { "register", TokenRegisterType }, + { "return", TokenReturn }, + { "short", TokenShortType }, + { "signed", TokenSignedType }, + { "sizeof", TokenSizeof }, + { "static", TokenStaticType }, + { "struct", TokenStructType }, + { "switch", TokenSwitch }, + { "typedef", TokenTypedef }, + { "union", TokenUnionType }, + { "unsigned", TokenUnsignedType }, + { "void", TokenVoidType }, + { "while", TokenWhile } +}; + + + +/* initialise the lexer */ +void LexInit(Picoc *pc) +{ + int Count; + + TableInitTable(&pc->ReservedWordTable, &pc->ReservedWordHashTable[0], sizeof(ReservedWords) / sizeof(struct ReservedWord) * 2, TRUE); + + for (Count = 0; Count < sizeof(ReservedWords) / sizeof(struct ReservedWord); Count++) + { + TableSet(pc, &pc->ReservedWordTable, TableStrRegister(pc, ReservedWords[Count].Word), (struct Value *)&ReservedWords[Count], NULL, 0, 0); + } + + pc->LexValue.Typ = NULL; + pc->LexValue.Val = &pc->LexAnyValue; + pc->LexValue.LValueFrom = FALSE; + pc->LexValue.ValOnHeap = FALSE; + pc->LexValue.ValOnStack = FALSE; + pc->LexValue.AnyValOnHeap = FALSE; + pc->LexValue.IsLValue = FALSE; +} + +/* deallocate */ +void LexCleanup(Picoc *pc) +{ + int Count; + + LexInteractiveClear(pc, NULL); + + for (Count = 0; Count < sizeof(ReservedWords) / sizeof(struct ReservedWord); Count++) + TableDelete(pc, &pc->ReservedWordTable, TableStrRegister(pc, ReservedWords[Count].Word)); +} + +/* check if a word is a reserved word - used while scanning */ +enum LexToken LexCheckReservedWord(Picoc *pc, const char *Word) +{ + struct Value *val; + + if (TableGet(&pc->ReservedWordTable, Word, &val, NULL, NULL, NULL)) + return ((struct ReservedWord *)val)->Token; + else + return TokenNone; +} + +/* get a numeric literal - used while scanning */ +enum LexToken LexGetNumber(Picoc *pc, struct LexState *Lexer, struct Value *Value) +{ + long Result = 0; + long Base = 10; + enum LexToken ResultToken; +#ifndef NO_FP + double FPResult; + double FPDiv; +#endif + /* long/unsigned flags */ +#if 0 /* unused for now */ + char IsLong = 0; + char IsUnsigned = 0; +#endif + + if (*Lexer->Pos == '0') + { + /* a binary, octal or hex literal */ + LEXER_INC(Lexer); + if (Lexer->Pos != Lexer->End) + { + if (*Lexer->Pos == 'x' || *Lexer->Pos == 'X') + { Base = 16; LEXER_INC(Lexer); } + else if (*Lexer->Pos == 'b' || *Lexer->Pos == 'B') + { Base = 2; LEXER_INC(Lexer); } + else if (*Lexer->Pos != '.') + Base = 8; + } + } + + /* get the value */ + for (; Lexer->Pos != Lexer->End && IS_BASE_DIGIT(*Lexer->Pos, Base); LEXER_INC(Lexer)) + Result = Result * Base + GET_BASE_DIGIT(*Lexer->Pos); + + if (*Lexer->Pos == 'u' || *Lexer->Pos == 'U') + { + LEXER_INC(Lexer); + /* IsUnsigned = 1; */ + } + if (*Lexer->Pos == 'l' || *Lexer->Pos == 'L') + { + LEXER_INC(Lexer); + /* IsLong = 1; */ + } + + Value->Typ = &pc->LongType; /* ignored? */ + Value->Val->LongInteger = Result; + + ResultToken = TokenIntegerConstant; + + if (Lexer->Pos == Lexer->End) + return ResultToken; + +#ifndef NO_FP + if (Lexer->Pos == Lexer->End) + { + return ResultToken; + } + + if (*Lexer->Pos != '.' && *Lexer->Pos != 'e' && *Lexer->Pos != 'E') + { + return ResultToken; + } + + Value->Typ = &pc->FPType; + FPResult = (double)Result; + + if (*Lexer->Pos == '.') + { + LEXER_INC(Lexer); + for (FPDiv = 1.0/Base; Lexer->Pos != Lexer->End && IS_BASE_DIGIT(*Lexer->Pos, Base); LEXER_INC(Lexer), FPDiv /= (double)Base) + { + FPResult += GET_BASE_DIGIT(*Lexer->Pos) * FPDiv; + } + } + + if (Lexer->Pos != Lexer->End && (*Lexer->Pos == 'e' || *Lexer->Pos == 'E')) + { + int ExponentSign = 1; + + LEXER_INC(Lexer); + if (Lexer->Pos != Lexer->End && *Lexer->Pos == '-') + { + ExponentSign = -1; + LEXER_INC(Lexer); + } + + Result = 0; + while (Lexer->Pos != Lexer->End && IS_BASE_DIGIT(*Lexer->Pos, Base)) + { + Result = Result * Base + GET_BASE_DIGIT(*Lexer->Pos); + LEXER_INC(Lexer); + } + + FPResult *= pow((double)Base, (double)Result * ExponentSign); + } + + Value->Val->FP = FPResult; + + if (*Lexer->Pos == 'f' || *Lexer->Pos == 'F') + LEXER_INC(Lexer); + + return TokenFPConstant; +#else + return ResultToken; +#endif +} + +/* get a reserved word or identifier - used while scanning */ +enum LexToken LexGetWord(Picoc *pc, struct LexState *Lexer, struct Value *Value) +{ + const char *StartPos = Lexer->Pos; + enum LexToken Token; + + do { + LEXER_INC(Lexer); + } while (Lexer->Pos != Lexer->End && isCident((int)*Lexer->Pos)); + + Value->Typ = NULL; + Value->Val->Identifier = TableStrRegister2(pc, StartPos, Lexer->Pos - StartPos); + + Token = LexCheckReservedWord(pc, Value->Val->Identifier); + switch (Token) + { + case TokenHashInclude: Lexer->Mode = LexModeHashInclude; break; + case TokenHashDefine: Lexer->Mode = LexModeHashDefine; break; + default: break; + } + + if (Token != TokenNone) + return Token; + + if (Lexer->Mode == LexModeHashDefineSpace) + Lexer->Mode = LexModeHashDefineSpaceIdent; + + return TokenIdentifier; +} + +/* unescape a character from an octal character constant */ +unsigned char LexUnEscapeCharacterConstant(const char **From, const char *End, unsigned char FirstChar, int Base) +{ + unsigned char Total = GET_BASE_DIGIT(FirstChar); + int CCount; + for (CCount = 0; IS_BASE_DIGIT(**From, Base) && CCount < 2; CCount++, (*From)++) + Total = Total * Base + GET_BASE_DIGIT(**From); + + return Total; +} + +/* unescape a character from a string or character constant */ +unsigned char LexUnEscapeCharacter(const char **From, const char *End) +{ + unsigned char ThisChar; + + while ( *From != End && **From == '\\' && + &(*From)[1] != End && (*From)[1] == '\n' ) + (*From) += 2; /* skip escaped end of lines with LF line termination */ + + while ( *From != End && **From == '\\' && + &(*From)[1] != End && &(*From)[2] != End && (*From)[1] == '\r' && (*From)[2] == '\n') + (*From) += 3; /* skip escaped end of lines with CR/LF line termination */ + + if (*From == End) + return '\\'; + + if (**From == '\\') + { + /* it's escaped */ + (*From)++; + if (*From == End) + return '\\'; + + ThisChar = *(*From)++; + switch (ThisChar) + { + case '\\': return '\\'; + case '\'': return '\''; + case '"': return '"'; + case 'a': return '\a'; + case 'b': return '\b'; + case 'f': return '\f'; + case 'n': return '\n'; + case 'r': return '\r'; + case 't': return '\t'; + case 'v': return '\v'; + case '0': case '1': case '2': case '3': return LexUnEscapeCharacterConstant(From, End, ThisChar, 8); + case 'x': return LexUnEscapeCharacterConstant(From, End, '0', 16); + default: return ThisChar; + } + } + else + return *(*From)++; +} + +/* get a string constant - used while scanning */ +enum LexToken LexGetStringConstant(Picoc *pc, struct LexState *Lexer, struct Value *Value, char EndChar) +{ + int Escape = FALSE; + const char *StartPos = Lexer->Pos; + const char *EndPos; + char *EscBuf; + char *EscBufPos; + char *RegString; + struct Value *ArrayValue; + + while (Lexer->Pos != Lexer->End && (*Lexer->Pos != EndChar || Escape)) + { + /* find the end */ + if (Escape) + { + if (*Lexer->Pos == '\r' && Lexer->Pos+1 != Lexer->End) + Lexer->Pos++; + + if (*Lexer->Pos == '\n' && Lexer->Pos+1 != Lexer->End) + { + Lexer->Line++; + Lexer->Pos++; + Lexer->CharacterPos = 0; + Lexer->EmitExtraNewlines++; + } + + Escape = FALSE; + } + else if (*Lexer->Pos == '\\') + Escape = TRUE; + + LEXER_INC(Lexer); + } + EndPos = Lexer->Pos; + + EscBuf = HeapAllocStack(pc, EndPos - StartPos); + if (EscBuf == NULL) + LexFail(pc, Lexer, "out of memory"); + + for (EscBufPos = EscBuf, Lexer->Pos = StartPos; Lexer->Pos != EndPos;) + *EscBufPos++ = LexUnEscapeCharacter(&Lexer->Pos, EndPos); + + /* try to find an existing copy of this string literal */ + RegString = TableStrRegister2(pc, EscBuf, EscBufPos - EscBuf); + HeapPopStack(pc, EscBuf, EndPos - StartPos); + ArrayValue = VariableStringLiteralGet(pc, RegString); + if (ArrayValue == NULL) + { + /* create and store this string literal */ + ArrayValue = VariableAllocValueAndData(pc, NULL, 0, FALSE, NULL, TRUE); + ArrayValue->Typ = pc->CharArrayType; + ArrayValue->Val = (union AnyValue *)RegString; + VariableStringLiteralDefine(pc, RegString, ArrayValue); + } + + /* create the the pointer for this char* */ + Value->Typ = pc->CharPtrType; + Value->Val->Pointer = RegString; + if (*Lexer->Pos == EndChar) + LEXER_INC(Lexer); + + return TokenStringConstant; +} + +/* get a character constant - used while scanning */ +enum LexToken LexGetCharacterConstant(Picoc *pc, struct LexState *Lexer, struct Value *Value) +{ + Value->Typ = &pc->CharType; + Value->Val->Character = LexUnEscapeCharacter(&Lexer->Pos, Lexer->End); + if (Lexer->Pos != Lexer->End && *Lexer->Pos != '\'') + LexFail(pc, Lexer, "expected \"'\""); + + LEXER_INC(Lexer); + return TokenCharacterConstant; +} + +/* skip a comment - used while scanning */ +void LexSkipComment(struct LexState *Lexer, char NextChar, enum LexToken *ReturnToken) +{ + if (NextChar == '*') + { + /* conventional C comment */ + while (Lexer->Pos != Lexer->End && (*(Lexer->Pos-1) != '*' || *Lexer->Pos != '/')) + { + if (*Lexer->Pos == '\n') + Lexer->EmitExtraNewlines++; + + LEXER_INC(Lexer); + } + + if (Lexer->Pos != Lexer->End) + LEXER_INC(Lexer); + + Lexer->Mode = LexModeNormal; + } + else + { + /* C++ style comment */ + while (Lexer->Pos != Lexer->End && *Lexer->Pos != '\n') + LEXER_INC(Lexer); + } +} + +/* get a single token from the source - used while scanning */ +enum LexToken LexScanGetToken(Picoc *pc, struct LexState *Lexer, struct Value **Value) +{ + char ThisChar; + char NextChar; + enum LexToken GotToken = TokenNone; + + /* handle cases line multi-line comments or string constants which mess up the line count */ + if (Lexer->EmitExtraNewlines > 0) + { + Lexer->EmitExtraNewlines--; + return TokenEndOfLine; + } + + /* scan for a token */ + do + { + *Value = &pc->LexValue; + while (Lexer->Pos != Lexer->End && isspace((int)*Lexer->Pos)) + { + if (*Lexer->Pos == '\n') + { + Lexer->Line++; + Lexer->Pos++; + Lexer->Mode = LexModeNormal; + Lexer->CharacterPos = 0; + return TokenEndOfLine; + } + else if (Lexer->Mode == LexModeHashDefine || Lexer->Mode == LexModeHashDefineSpace) + Lexer->Mode = LexModeHashDefineSpace; + + else if (Lexer->Mode == LexModeHashDefineSpaceIdent) + Lexer->Mode = LexModeNormal; + + LEXER_INC(Lexer); + } + + if (Lexer->Pos == Lexer->End || *Lexer->Pos == '\0') + return TokenEOF; + + ThisChar = *Lexer->Pos; + if (isCidstart((int)ThisChar)) + return LexGetWord(pc, Lexer, *Value); + + if (isdigit((int)ThisChar)) + return LexGetNumber(pc, Lexer, *Value); + + NextChar = (Lexer->Pos+1 != Lexer->End) ? *(Lexer->Pos+1) : 0; + LEXER_INC(Lexer); + switch (ThisChar) + { + case '"': GotToken = LexGetStringConstant(pc, Lexer, *Value, '"'); break; + case '\'': GotToken = LexGetCharacterConstant(pc, Lexer, *Value); break; + case '(': if (Lexer->Mode == LexModeHashDefineSpaceIdent) GotToken = TokenOpenMacroBracket; else GotToken = TokenOpenBracket; Lexer->Mode = LexModeNormal; break; + case ')': GotToken = TokenCloseBracket; break; + case '=': NEXTIS('=', TokenEqual, TokenAssign); break; + case '+': NEXTIS3('=', TokenAddAssign, '+', TokenIncrement, TokenPlus); break; + case '-': NEXTIS4('=', TokenSubtractAssign, '>', TokenArrow, '-', TokenDecrement, TokenMinus); break; + case '*': NEXTIS('=', TokenMultiplyAssign, TokenAsterisk); break; + case '/': if (NextChar == '/' || NextChar == '*') { LEXER_INC(Lexer); LexSkipComment(Lexer, NextChar, &GotToken); } else NEXTIS('=', TokenDivideAssign, TokenSlash); break; + case '%': NEXTIS('=', TokenModulusAssign, TokenModulus); break; + case '<': if (Lexer->Mode == LexModeHashInclude) GotToken = LexGetStringConstant(pc, Lexer, *Value, '>'); else { NEXTIS3PLUS('=', TokenLessEqual, '<', TokenShiftLeft, '=', TokenShiftLeftAssign, TokenLessThan); } break; + case '>': NEXTIS3PLUS('=', TokenGreaterEqual, '>', TokenShiftRight, '=', TokenShiftRightAssign, TokenGreaterThan); break; + case ';': GotToken = TokenSemicolon; break; + case '&': NEXTIS3('=', TokenArithmeticAndAssign, '&', TokenLogicalAnd, TokenAmpersand); break; + case '|': NEXTIS3('=', TokenArithmeticOrAssign, '|', TokenLogicalOr, TokenArithmeticOr); break; + case '{': GotToken = TokenLeftBrace; break; + case '}': GotToken = TokenRightBrace; break; + case '[': GotToken = TokenLeftSquareBracket; break; + case ']': GotToken = TokenRightSquareBracket; break; + case '!': NEXTIS('=', TokenNotEqual, TokenUnaryNot); break; + case '^': NEXTIS('=', TokenArithmeticExorAssign, TokenArithmeticExor); break; + case '~': GotToken = TokenUnaryExor; break; + case ',': GotToken = TokenComma; break; + case '.': NEXTISEXACTLY3('.', '.', TokenEllipsis, TokenDot); break; + case '?': GotToken = TokenQuestionMark; break; + case ':': GotToken = TokenColon; break; + default: LexFail(pc, Lexer, "illegal character '%c'", ThisChar); break; + } + } while (GotToken == TokenNone); + + return GotToken; +} + +/* what size value goes with each token */ +int LexTokenSize(enum LexToken Token) +{ + switch (Token) + { + case TokenIdentifier: case TokenStringConstant: return sizeof(char *); + case TokenIntegerConstant: return sizeof(long); + case TokenCharacterConstant: return sizeof(unsigned char); + case TokenFPConstant: return sizeof(double); + default: return 0; + } +} + +/* produce tokens from the lexer and return a heap buffer with the result - used for scanning */ +void *LexTokenise(Picoc *pc, struct LexState *Lexer, int *TokenLen) +{ + enum LexToken Token; + void *HeapMem; + struct Value *GotValue; + int MemUsed = 0; + int ValueSize; + int ReserveSpace = (Lexer->End - Lexer->Pos) * 4 + 16; + void *TokenSpace = HeapAllocStack(pc, ReserveSpace); + char *TokenPos = (char *)TokenSpace; + int LastCharacterPos = 0; + + if (TokenSpace == NULL) + LexFail(pc, Lexer, "out of memory"); + + do + { + /* store the token at the end of the stack area */ + Token = LexScanGetToken(pc, Lexer, &GotValue); + +#ifdef DEBUG_LEXER + printf("Token: %02x\n", Token); +#endif + *(unsigned char *)TokenPos = Token; + TokenPos++; + MemUsed++; + + *(unsigned char *)TokenPos = (unsigned char)LastCharacterPos; + TokenPos++; + MemUsed++; + + ValueSize = LexTokenSize(Token); + if (ValueSize > 0) + { + /* store a value as well */ + memcpy((void *)TokenPos, (void *)GotValue->Val, ValueSize); + TokenPos += ValueSize; + MemUsed += ValueSize; + } + + LastCharacterPos = Lexer->CharacterPos; + + } while (Token != TokenEOF); + + HeapMem = HeapAllocMem(pc, MemUsed); + if (HeapMem == NULL) + LexFail(pc, Lexer, "out of memory"); + + assert(ReserveSpace >= MemUsed); + memcpy(HeapMem, TokenSpace, MemUsed); + HeapPopStack(pc, TokenSpace, ReserveSpace); +#ifdef DEBUG_LEXER + { + int Count; + printf("Tokens: "); + for (Count = 0; Count < MemUsed; Count++) + printf("%02x ", *((unsigned char *)HeapMem+Count)); + printf("\n"); + } +#endif + if (TokenLen) + *TokenLen = MemUsed; + + return HeapMem; +} + +/* lexically analyse some source text */ +void *LexAnalyse(Picoc *pc, const char *FileName, const char *Source, int SourceLen, int *TokenLen) +{ + struct LexState Lexer; + + Lexer.Pos = Source; + Lexer.End = Source + SourceLen; + Lexer.Line = 1; + Lexer.FileName = FileName; + Lexer.Mode = LexModeNormal; + Lexer.EmitExtraNewlines = 0; + Lexer.CharacterPos = 1; + Lexer.SourceText = Source; + + return LexTokenise(pc, &Lexer, TokenLen); +} + +/* prepare to parse a pre-tokenised buffer */ +void LexInitParser(struct ParseState *Parser, Picoc *pc, const char *SourceText, void *TokenSource, char *FileName, int RunIt, int EnableDebugger) +{ + Parser->pc = pc; + Parser->Pos = TokenSource; + Parser->Line = 1; + Parser->FileName = FileName; + Parser->Mode = RunIt ? RunModeRun : RunModeSkip; + Parser->SearchLabel = 0; + Parser->HashIfLevel = 0; + Parser->HashIfEvaluateToLevel = 0; + Parser->CharacterPos = 0; + Parser->SourceText = SourceText; + Parser->DebugMode = EnableDebugger; +} + +/* get the next token, without pre-processing */ +enum LexToken LexGetRawToken(struct ParseState *Parser, struct Value **Value, int IncPos) +{ + enum LexToken Token = TokenNone; + int ValueSize; + char *Prompt = NULL; + Picoc *pc = Parser->pc; + + do + { + /* get the next token */ + if (Parser->Pos == NULL && pc->InteractiveHead != NULL) + Parser->Pos = pc->InteractiveHead->Tokens; + + if (Parser->FileName != pc->StrEmpty || pc->InteractiveHead != NULL) + { + /* skip leading newlines */ + while ((Token = (enum LexToken)*(unsigned char *)Parser->Pos) == TokenEndOfLine) + { + Parser->Line++; + Parser->Pos += TOKEN_DATA_OFFSET; + } + } + + if (Parser->FileName == pc->StrEmpty && (pc->InteractiveHead == NULL || Token == TokenEOF)) + { + /* we're at the end of an interactive input token list */ + char LineBuffer[LINEBUFFER_MAX]; + void *LineTokens; + int LineBytes; + struct TokenLine *LineNode; + + if (pc->InteractiveHead == NULL || (unsigned char *)Parser->Pos == &pc->InteractiveTail->Tokens[pc->InteractiveTail->NumBytes-TOKEN_DATA_OFFSET]) + { + /* get interactive input */ + if (pc->LexUseStatementPrompt) + { + Prompt = INTERACTIVE_PROMPT_STATEMENT; + pc->LexUseStatementPrompt = FALSE; + } + else + Prompt = INTERACTIVE_PROMPT_LINE; + + if (PlatformGetLine(&LineBuffer[0], LINEBUFFER_MAX, Prompt) == NULL) + return TokenEOF; + + /* put the new line at the end of the linked list of interactive lines */ + LineTokens = LexAnalyse(pc, pc->StrEmpty, &LineBuffer[0], strlen(LineBuffer), &LineBytes); + LineNode = VariableAlloc(pc, Parser, sizeof(struct TokenLine), TRUE); + LineNode->Tokens = LineTokens; + LineNode->NumBytes = LineBytes; + if (pc->InteractiveHead == NULL) + { + /* start a new list */ + pc->InteractiveHead = LineNode; + Parser->Line = 1; + Parser->CharacterPos = 0; + } + else + pc->InteractiveTail->Next = LineNode; + + pc->InteractiveTail = LineNode; + pc->InteractiveCurrentLine = LineNode; + Parser->Pos = LineTokens; + } + else + { + /* go to the next token line */ + if (Parser->Pos != &pc->InteractiveCurrentLine->Tokens[pc->InteractiveCurrentLine->NumBytes-TOKEN_DATA_OFFSET]) + { + /* scan for the line */ + for (pc->InteractiveCurrentLine = pc->InteractiveHead; Parser->Pos != &pc->InteractiveCurrentLine->Tokens[pc->InteractiveCurrentLine->NumBytes-TOKEN_DATA_OFFSET]; pc->InteractiveCurrentLine = pc->InteractiveCurrentLine->Next) + { assert(pc->InteractiveCurrentLine->Next != NULL); } + } + + assert(pc->InteractiveCurrentLine != NULL); + pc->InteractiveCurrentLine = pc->InteractiveCurrentLine->Next; + assert(pc->InteractiveCurrentLine != NULL); + Parser->Pos = pc->InteractiveCurrentLine->Tokens; + } + + Token = (enum LexToken)*(unsigned char *)Parser->Pos; + } + } while ((Parser->FileName == pc->StrEmpty && Token == TokenEOF) || Token == TokenEndOfLine); + + Parser->CharacterPos = *((unsigned char *)Parser->Pos + 1); + ValueSize = LexTokenSize(Token); + if (ValueSize > 0) + { + /* this token requires a value - unpack it */ + if (Value != NULL) + { + switch (Token) + { + case TokenStringConstant: pc->LexValue.Typ = pc->CharPtrType; break; + case TokenIdentifier: pc->LexValue.Typ = NULL; break; + case TokenIntegerConstant: pc->LexValue.Typ = &pc->LongType; break; + case TokenCharacterConstant: pc->LexValue.Typ = &pc->CharType; break; +#ifndef NO_FP + case TokenFPConstant: pc->LexValue.Typ = &pc->FPType; break; +#endif + default: break; + } + + memcpy((void *)pc->LexValue.Val, (void *)((char *)Parser->Pos + TOKEN_DATA_OFFSET), ValueSize); + pc->LexValue.ValOnHeap = FALSE; + pc->LexValue.ValOnStack = FALSE; + pc->LexValue.IsLValue = FALSE; + pc->LexValue.LValueFrom = NULL; + *Value = &pc->LexValue; + } + + if (IncPos) + Parser->Pos += ValueSize + TOKEN_DATA_OFFSET; + } + else + { + if (IncPos && Token != TokenEOF) + Parser->Pos += TOKEN_DATA_OFFSET; + } + +#ifdef DEBUG_LEXER + printf("Got token=%02x inc=%d pos=%d\n", Token, IncPos, Parser->CharacterPos); +#endif + assert(Token >= TokenNone && Token <= TokenEndOfFunction); + return Token; +} + +/* correct the token position depending if we already incremented the position */ +void LexHashIncPos(struct ParseState *Parser, int IncPos) +{ + if (!IncPos) + LexGetRawToken(Parser, NULL, TRUE); +} + +/* handle a #ifdef directive */ +void LexHashIfdef(struct ParseState *Parser, int IfNot) +{ + /* get symbol to check */ + struct Value *IdentValue; + struct Value *SavedValue; + int IsDefined; + enum LexToken Token = LexGetRawToken(Parser, &IdentValue, TRUE); + + if (Token != TokenIdentifier) + ProgramFail(Parser, "identifier expected"); + + /* is the identifier defined? */ + IsDefined = TableGet(&Parser->pc->GlobalTable, IdentValue->Val->Identifier, &SavedValue, NULL, NULL, NULL); + if (Parser->HashIfEvaluateToLevel == Parser->HashIfLevel && ( (IsDefined && !IfNot) || (!IsDefined && IfNot)) ) + { + /* #if is active, evaluate to this new level */ + Parser->HashIfEvaluateToLevel++; + } + + Parser->HashIfLevel++; +} + +/* handle a #if directive */ +void LexHashIf(struct ParseState *Parser) +{ + /* get symbol to check */ + struct Value *IdentValue; + struct Value *SavedValue = NULL; + struct ParseState MacroParser; + enum LexToken Token = LexGetRawToken(Parser, &IdentValue, TRUE); + + if (Token == TokenIdentifier) + { + /* look up a value from a macro definition */ + if (!TableGet(&Parser->pc->GlobalTable, IdentValue->Val->Identifier, &SavedValue, NULL, NULL, NULL)) + ProgramFail(Parser, "'%s' is undefined", IdentValue->Val->Identifier); + + if (SavedValue->Typ->Base != TypeMacro) + ProgramFail(Parser, "value expected"); + + ParserCopy(&MacroParser, &SavedValue->Val->MacroDef.Body); + Token = LexGetRawToken(&MacroParser, &IdentValue, TRUE); + } + + if (Token != TokenCharacterConstant && Token != TokenIntegerConstant) + ProgramFail(Parser, "value expected"); + + /* is the identifier defined? */ + if (Parser->HashIfEvaluateToLevel == Parser->HashIfLevel && IdentValue->Val->Character) + { + /* #if is active, evaluate to this new level */ + Parser->HashIfEvaluateToLevel++; + } + + Parser->HashIfLevel++; +} + +/* handle a #else directive */ +void LexHashElse(struct ParseState *Parser) +{ + if (Parser->HashIfEvaluateToLevel == Parser->HashIfLevel - 1) + Parser->HashIfEvaluateToLevel++; /* #if was not active, make this next section active */ + + else if (Parser->HashIfEvaluateToLevel == Parser->HashIfLevel) + { + /* #if was active, now go inactive */ + if (Parser->HashIfLevel == 0) + ProgramFail(Parser, "#else without #if"); + + Parser->HashIfEvaluateToLevel--; + } +} + +/* handle a #endif directive */ +void LexHashEndif(struct ParseState *Parser) +{ + if (Parser->HashIfLevel == 0) + ProgramFail(Parser, "#endif without #if"); + + Parser->HashIfLevel--; + if (Parser->HashIfEvaluateToLevel > Parser->HashIfLevel) + Parser->HashIfEvaluateToLevel = Parser->HashIfLevel; +} + +#if 0 /* useful for debug */ +void LexPrintToken(enum LexToken Token) +{ + char* TokenNames[] = { + /* 0x00 */ "None", + /* 0x01 */ "Comma", + /* 0x02 */ "Assign", "AddAssign", "SubtractAssign", "MultiplyAssign", "DivideAssign", "ModulusAssign", + /* 0x08 */ "ShiftLeftAssign", "ShiftRightAssign", "ArithmeticAndAssign", "ArithmeticOrAssign", "ArithmeticExorAssign", + /* 0x0d */ "QuestionMark", "Colon", + /* 0x0f */ "LogicalOr", + /* 0x10 */ "LogicalAnd", + /* 0x11 */ "ArithmeticOr", + /* 0x12 */ "ArithmeticExor", + /* 0x13 */ "Ampersand", + /* 0x14 */ "Equal", "NotEqual", + /* 0x16 */ "LessThan", "GreaterThan", "LessEqual", "GreaterEqual", + /* 0x1a */ "ShiftLeft", "ShiftRight", + /* 0x1c */ "Plus", "Minus", + /* 0x1e */ "Asterisk", "Slash", "Modulus", + /* 0x21 */ "Increment", "Decrement", "UnaryNot", "UnaryExor", "Sizeof", "Cast", + /* 0x27 */ "LeftSquareBracket", "RightSquareBracket", "Dot", "Arrow", + /* 0x2b */ "OpenBracket", "CloseBracket", + /* 0x2d */ "Identifier", "IntegerConstant", "FPConstant", "StringConstant", "CharacterConstant", + /* 0x32 */ "Semicolon", "Ellipsis", + /* 0x34 */ "LeftBrace", "RightBrace", + /* 0x36 */ "IntType", "CharType", "FloatType", "DoubleType", "VoidType", "EnumType", + /* 0x3c */ "LongType", "SignedType", "ShortType", "StaticType", "AutoType", "RegisterType", "ExternType", "StructType", "UnionType", "UnsignedType", "Typedef", + /* 0x46 */ "Continue", "Do", "Else", "For", "Goto", "If", "While", "Break", "Switch", "Case", "Default", "Return", + /* 0x52 */ "HashDefine", "HashInclude", "HashIf", "HashIfdef", "HashIfndef", "HashElse", "HashEndif", + /* 0x59 */ "New", "Delete", + /* 0x5b */ "OpenMacroBracket", + /* 0x5c */ "EOF", "EndOfLine", "EndOfFunction" + }; + printf("{%s}", TokenNames[Token]); +} +#endif + +/* get the next token given a parser state, pre-processing as we go */ +enum LexToken LexGetToken(struct ParseState *Parser, struct Value **Value, int IncPos) +{ + enum LexToken Token; + int TryNextToken; + + /* implements the pre-processor #if commands */ + do + { + int WasPreProcToken = TRUE; + + Token = LexGetRawToken(Parser, Value, IncPos); + switch (Token) + { + case TokenHashIfdef: LexHashIncPos(Parser, IncPos); LexHashIfdef(Parser, FALSE); break; + case TokenHashIfndef: LexHashIncPos(Parser, IncPos); LexHashIfdef(Parser, TRUE); break; + case TokenHashIf: LexHashIncPos(Parser, IncPos); LexHashIf(Parser); break; + case TokenHashElse: LexHashIncPos(Parser, IncPos); LexHashElse(Parser); break; + case TokenHashEndif: LexHashIncPos(Parser, IncPos); LexHashEndif(Parser); break; + default: WasPreProcToken = FALSE; break; + } + + /* if we're going to reject this token, increment the token pointer to the next one */ + TryNextToken = (Parser->HashIfEvaluateToLevel < Parser->HashIfLevel && Token != TokenEOF) || WasPreProcToken; + if (!IncPos && TryNextToken) + LexGetRawToken(Parser, NULL, TRUE); + + } while (TryNextToken); + + return Token; +} + +/* take a quick peek at the next token, skipping any pre-processing */ +enum LexToken LexRawPeekToken(struct ParseState *Parser) +{ + return (enum LexToken)*(unsigned char *)Parser->Pos; +} + +/* find the end of the line */ +void LexToEndOfLine(struct ParseState *Parser) +{ + while (TRUE) + { + enum LexToken Token = (enum LexToken)*(unsigned char *)Parser->Pos; + if (Token == TokenEndOfLine || Token == TokenEOF) + return; + else + LexGetRawToken(Parser, NULL, TRUE); + } +} + +/* copy the tokens from StartParser to EndParser into new memory, removing TokenEOFs and terminate with a TokenEndOfFunction */ +void *LexCopyTokens(struct ParseState *StartParser, struct ParseState *EndParser) +{ + int MemSize = 0; + int CopySize; + unsigned char *Pos = (unsigned char *)StartParser->Pos; + unsigned char *NewTokens; + unsigned char *NewTokenPos; + struct TokenLine *ILine; + Picoc *pc = StartParser->pc; + + if (pc->InteractiveHead == NULL) + { + /* non-interactive mode - copy the tokens */ + MemSize = EndParser->Pos - StartParser->Pos; + NewTokens = VariableAlloc(pc, StartParser, MemSize + TOKEN_DATA_OFFSET, TRUE); + memcpy(NewTokens, (void *)StartParser->Pos, MemSize); + } + else + { + /* we're in interactive mode - add up line by line */ + for (pc->InteractiveCurrentLine = pc->InteractiveHead; pc->InteractiveCurrentLine != NULL && (Pos < &pc->InteractiveCurrentLine->Tokens[0] || Pos >= &pc->InteractiveCurrentLine->Tokens[pc->InteractiveCurrentLine->NumBytes]); pc->InteractiveCurrentLine = pc->InteractiveCurrentLine->Next) + {} /* find the line we just counted */ + + if (EndParser->Pos >= StartParser->Pos && EndParser->Pos < &pc->InteractiveCurrentLine->Tokens[pc->InteractiveCurrentLine->NumBytes]) + { + /* all on a single line */ + MemSize = EndParser->Pos - StartParser->Pos; + NewTokens = VariableAlloc(pc, StartParser, MemSize + TOKEN_DATA_OFFSET, TRUE); + memcpy(NewTokens, (void *)StartParser->Pos, MemSize); + } + else + { + /* it's spread across multiple lines */ + MemSize = &pc->InteractiveCurrentLine->Tokens[pc->InteractiveCurrentLine->NumBytes-TOKEN_DATA_OFFSET] - Pos; + + for (ILine = pc->InteractiveCurrentLine->Next; ILine != NULL && (EndParser->Pos < &ILine->Tokens[0] || EndParser->Pos >= &ILine->Tokens[ILine->NumBytes]); ILine = ILine->Next) + MemSize += ILine->NumBytes - TOKEN_DATA_OFFSET; + + assert(ILine != NULL); + MemSize += EndParser->Pos - &ILine->Tokens[0]; + NewTokens = VariableAlloc(pc, StartParser, MemSize + TOKEN_DATA_OFFSET, TRUE); + + CopySize = &pc->InteractiveCurrentLine->Tokens[pc->InteractiveCurrentLine->NumBytes-TOKEN_DATA_OFFSET] - Pos; + memcpy(NewTokens, Pos, CopySize); + NewTokenPos = NewTokens + CopySize; + for (ILine = pc->InteractiveCurrentLine->Next; ILine != NULL && (EndParser->Pos < &ILine->Tokens[0] || EndParser->Pos >= &ILine->Tokens[ILine->NumBytes]); ILine = ILine->Next) + { + memcpy(NewTokenPos, &ILine->Tokens[0], ILine->NumBytes - TOKEN_DATA_OFFSET); + NewTokenPos += ILine->NumBytes-TOKEN_DATA_OFFSET; + } + assert(ILine != NULL); + memcpy(NewTokenPos, &ILine->Tokens[0], EndParser->Pos - &ILine->Tokens[0]); + } + } + + NewTokens[MemSize] = (unsigned char)TokenEndOfFunction; + + return NewTokens; +} + +/* indicate that we've completed up to this point in the interactive input and free expired tokens */ +void LexInteractiveClear(Picoc *pc, struct ParseState *Parser) +{ + while (pc->InteractiveHead != NULL) + { + struct TokenLine *NextLine = pc->InteractiveHead->Next; + + HeapFreeMem(pc, pc->InteractiveHead->Tokens); + HeapFreeMem(pc, pc->InteractiveHead); + pc->InteractiveHead = NextLine; + } + + if (Parser != NULL) + Parser->Pos = NULL; + + pc->InteractiveTail = NULL; +} + +/* indicate that we've completed up to this point in the interactive input and free expired tokens */ +void LexInteractiveCompleted(Picoc *pc, struct ParseState *Parser) +{ + while (pc->InteractiveHead != NULL && !(Parser->Pos >= &pc->InteractiveHead->Tokens[0] && Parser->Pos < &pc->InteractiveHead->Tokens[pc->InteractiveHead->NumBytes])) + { + /* this token line is no longer needed - free it */ + struct TokenLine *NextLine = pc->InteractiveHead->Next; + + HeapFreeMem(pc, pc->InteractiveHead->Tokens); + HeapFreeMem(pc, pc->InteractiveHead); + pc->InteractiveHead = NextLine; + + if (pc->InteractiveHead == NULL) + { + /* we've emptied the list */ + Parser->Pos = NULL; + pc->InteractiveTail = NULL; + } + } +} + +/* the next time we prompt, make it the full statement prompt */ +void LexInteractiveStatementPrompt(Picoc *pc) +{ + pc->LexUseStatementPrompt = TRUE; +} diff --git a/src/lex.o b/src/lex.o new file mode 100644 index 0000000..91c45cc Binary files /dev/null and b/src/lex.o differ diff --git a/src/libs/win32/libgw32c.a b/src/libs/win32/libgw32c.a new file mode 100644 index 0000000..f667ddf Binary files /dev/null and b/src/libs/win32/libgw32c.a differ diff --git a/src/libs/win32/libregex.a b/src/libs/win32/libregex.a new file mode 100644 index 0000000..b0361bb Binary files /dev/null and b/src/libs/win32/libregex.a differ diff --git a/src/msvc/picoc/picoc.sln b/src/msvc/picoc/picoc.sln new file mode 100644 index 0000000..e2be657 --- /dev/null +++ b/src/msvc/picoc/picoc.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 11 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "picoc", "picoc.vcxproj", "{C0156FB3-55AB-4F82-8A97-A776DFC57951}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {C0156FB3-55AB-4F82-8A97-A776DFC57951}.Debug|Win32.ActiveCfg = Debug|Win32 + {C0156FB3-55AB-4F82-8A97-A776DFC57951}.Debug|Win32.Build.0 = Debug|Win32 + {C0156FB3-55AB-4F82-8A97-A776DFC57951}.Release|Win32.ActiveCfg = Release|Win32 + {C0156FB3-55AB-4F82-8A97-A776DFC57951}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/msvc/picoc/picoc.vcxproj b/src/msvc/picoc/picoc.vcxproj new file mode 100644 index 0000000..63f24a0 --- /dev/null +++ b/src/msvc/picoc/picoc.vcxproj @@ -0,0 +1,111 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + $(VCTargetsPath11) + + + {C0156FB3-55AB-4F82-8A97-A776DFC57951} + Win32Proj + picoc + + + + Application + true + v110 + Unicode + + + Application + false + v110 + true + Unicode + + + + + + + + + + + + + true + + + false + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + + + Console + true + + + + + Level3 + NotUsing + MaxSpeed + true + true + WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + + + Console + true + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/msvc/picoc/picoc.vcxproj.filters b/src/msvc/picoc/picoc.vcxproj.filters new file mode 100644 index 0000000..77be70a --- /dev/null +++ b/src/msvc/picoc/picoc.vcxproj.filters @@ -0,0 +1,99 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + {9cc822ce-c7ed-4deb-93d2-ab0077cfe681} + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files\cstdlib + + + Source Files\cstdlib + + + Source Files\cstdlib + + + Source Files\cstdlib + + + Source Files\cstdlib + + + Source Files\cstdlib + + + Source Files\cstdlib + + + Source Files\cstdlib + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + \ No newline at end of file diff --git a/src/parse.c b/src/parse.c new file mode 100644 index 0000000..c9c7513 --- /dev/null +++ b/src/parse.c @@ -0,0 +1,1006 @@ +/* picoc parser - parses source and executes statements */ + +#include "picoc.h" +#include "interpreter.h" + +/* deallocate any memory */ +void ParseCleanup(Picoc *pc) +{ + while (pc->CleanupTokenList != NULL) + { + struct CleanupTokenNode *Next = pc->CleanupTokenList->Next; + + HeapFreeMem(pc, pc->CleanupTokenList->Tokens); + if (pc->CleanupTokenList->SourceText != NULL) + HeapFreeMem(pc, (void *)pc->CleanupTokenList->SourceText); + + HeapFreeMem(pc, pc->CleanupTokenList); + pc->CleanupTokenList = Next; + } +} + +/* parse a statement, but only run it if Condition is TRUE */ +enum ParseResult ParseStatementMaybeRun(struct ParseState *Parser, int Condition, int CheckTrailingSemicolon) +{ + if (Parser->Mode != RunModeSkip && !Condition) + { + enum RunMode OldMode = Parser->Mode; + int Result; + Parser->Mode = RunModeSkip; + Result = ParseStatement(Parser, CheckTrailingSemicolon); + Parser->Mode = OldMode; + return Result; + } + else + return ParseStatement(Parser, CheckTrailingSemicolon); +} + +/* count the number of parameters to a function or macro */ +int ParseCountParams(struct ParseState *Parser) +{ + int ParamCount = 0; + + enum LexToken Token = LexGetToken(Parser, NULL, TRUE); + if (Token != TokenCloseBracket && Token != TokenEOF) + { + /* count the number of parameters */ + ParamCount++; + while ((Token = LexGetToken(Parser, NULL, TRUE)) != TokenCloseBracket && Token != TokenEOF) + { + if (Token == TokenComma) + ParamCount++; + } + } + + return ParamCount; +} + +/* parse a function definition and store it for later */ +struct Value *ParseFunctionDefinition(struct ParseState *Parser, struct ValueType *ReturnType, char *Identifier) +{ + struct ValueType *ParamType; + char *ParamIdentifier; + enum LexToken Token = TokenNone; + struct ParseState ParamParser; + struct Value *FuncValue; + struct Value *OldFuncValue; + struct ParseState FuncBody; + int ParamCount = 0; + Picoc *pc = Parser->pc; + + if (pc->TopStackFrame != NULL) + ProgramFail(Parser, "nested function definitions are not allowed"); + + LexGetToken(Parser, NULL, TRUE); /* open bracket */ + ParserCopy(&ParamParser, Parser); + ParamCount = ParseCountParams(Parser); + if (ParamCount > PARAMETER_MAX) + ProgramFail(Parser, "too many parameters (%d allowed)", PARAMETER_MAX); + + FuncValue = VariableAllocValueAndData(pc, Parser, sizeof(struct FuncDef) + sizeof(struct ValueType *) * ParamCount + sizeof(const char *) * ParamCount, FALSE, NULL, TRUE); + FuncValue->Typ = &pc->FunctionType; + FuncValue->Val->FuncDef.ReturnType = ReturnType; + FuncValue->Val->FuncDef.NumParams = ParamCount; + FuncValue->Val->FuncDef.VarArgs = FALSE; + FuncValue->Val->FuncDef.ParamType = (struct ValueType **)((char *)FuncValue->Val + sizeof(struct FuncDef)); + FuncValue->Val->FuncDef.ParamName = (char **)((char *)FuncValue->Val->FuncDef.ParamType + sizeof(struct ValueType *) * ParamCount); + + for (ParamCount = 0; ParamCount < FuncValue->Val->FuncDef.NumParams; ParamCount++) + { + /* harvest the parameters into the function definition */ + if (ParamCount == FuncValue->Val->FuncDef.NumParams-1 && LexGetToken(&ParamParser, NULL, FALSE) == TokenEllipsis) + { + /* ellipsis at end */ + FuncValue->Val->FuncDef.NumParams--; + FuncValue->Val->FuncDef.VarArgs = TRUE; + break; + } + else + { + /* add a parameter */ + TypeParse(&ParamParser, &ParamType, &ParamIdentifier, NULL); + if (ParamType->Base == TypeVoid) + { + /* this isn't a real parameter at all - delete it */ + ParamCount--; + FuncValue->Val->FuncDef.NumParams--; + } + else + { + FuncValue->Val->FuncDef.ParamType[ParamCount] = ParamType; + FuncValue->Val->FuncDef.ParamName[ParamCount] = ParamIdentifier; + } + } + + Token = LexGetToken(&ParamParser, NULL, TRUE); + if (Token != TokenComma && ParamCount < FuncValue->Val->FuncDef.NumParams-1) + ProgramFail(&ParamParser, "comma expected"); + } + + if (FuncValue->Val->FuncDef.NumParams != 0 && Token != TokenCloseBracket && Token != TokenComma && Token != TokenEllipsis) + ProgramFail(&ParamParser, "bad parameter"); + + if (strcmp(Identifier, "main") == 0) + { + /* make sure it's int main() */ + if ( FuncValue->Val->FuncDef.ReturnType != &pc->IntType && + FuncValue->Val->FuncDef.ReturnType != &pc->VoidType ) + ProgramFail(Parser, "main() should return an int or void"); + + if (FuncValue->Val->FuncDef.NumParams != 0 && + (FuncValue->Val->FuncDef.NumParams != 2 || FuncValue->Val->FuncDef.ParamType[0] != &pc->IntType) ) + ProgramFail(Parser, "bad parameters to main()"); + } + + /* look for a function body */ + Token = LexGetToken(Parser, NULL, FALSE); + if (Token == TokenSemicolon) + LexGetToken(Parser, NULL, TRUE); /* it's a prototype, absorb the trailing semicolon */ + else + { + /* it's a full function definition with a body */ + if (Token != TokenLeftBrace) + ProgramFail(Parser, "bad function definition"); + + ParserCopy(&FuncBody, Parser); + if (ParseStatementMaybeRun(Parser, FALSE, TRUE) != ParseResultOk) + ProgramFail(Parser, "function definition expected"); + + FuncValue->Val->FuncDef.Body = FuncBody; + FuncValue->Val->FuncDef.Body.Pos = LexCopyTokens(&FuncBody, Parser); + + /* is this function already in the global table? */ + if (TableGet(&pc->GlobalTable, Identifier, &OldFuncValue, NULL, NULL, NULL)) + { + if (OldFuncValue->Val->FuncDef.Body.Pos == NULL) + { + /* override an old function prototype */ + VariableFree(pc, TableDelete(pc, &pc->GlobalTable, Identifier)); + } + else + ProgramFail(Parser, "'%s' is already defined", Identifier); + } + } + + if (!TableSet(pc, &pc->GlobalTable, Identifier, FuncValue, (char *)Parser->FileName, Parser->Line, Parser->CharacterPos)) + ProgramFail(Parser, "'%s' is already defined", Identifier); + + return FuncValue; +} + +/* parse an array initialiser and assign to a variable */ +int ParseArrayInitialiser(struct ParseState *Parser, struct Value *NewVariable, int DoAssignment) +{ + int ArrayIndex = 0; + enum LexToken Token; + struct Value *CValue; + + /* count the number of elements in the array */ + if (DoAssignment && Parser->Mode == RunModeRun) + { + struct ParseState CountParser; + int NumElements; + + ParserCopy(&CountParser, Parser); + NumElements = ParseArrayInitialiser(&CountParser, NewVariable, FALSE); + + if (NewVariable->Typ->Base != TypeArray) + AssignFail(Parser, "%t from array initializer", NewVariable->Typ, NULL, 0, 0, NULL, 0); + + if (NewVariable->Typ->ArraySize == 0) + { + NewVariable->Typ = TypeGetMatching(Parser->pc, Parser, NewVariable->Typ->FromType, NewVariable->Typ->Base, NumElements, NewVariable->Typ->Identifier, TRUE); + VariableRealloc(Parser, NewVariable, TypeSizeValue(NewVariable, FALSE)); + } + #ifdef DEBUG_ARRAY_INITIALIZER + PRINT_SOURCE_POS; + printf("array size: %d \n", NewVariable->Typ->ArraySize); + #endif + } + + /* parse the array initialiser */ + Token = LexGetToken(Parser, NULL, FALSE); + while (Token != TokenRightBrace) + { + if (LexGetToken(Parser, NULL, FALSE) == TokenLeftBrace) + { + /* this is a sub-array initialiser */ + int SubArraySize = 0; + struct Value *SubArray = NewVariable; + if (Parser->Mode == RunModeRun && DoAssignment) + { + SubArraySize = TypeSize(NewVariable->Typ->FromType, NewVariable->Typ->FromType->ArraySize, TRUE); + SubArray = VariableAllocValueFromExistingData(Parser, NewVariable->Typ->FromType, (union AnyValue *)(&NewVariable->Val->ArrayMem[0] + SubArraySize * ArrayIndex), TRUE, NewVariable); + #ifdef DEBUG_ARRAY_INITIALIZER + int FullArraySize = TypeSize(NewVariable->Typ, NewVariable->Typ->ArraySize, TRUE); + PRINT_SOURCE_POS; + PRINT_TYPE(NewVariable->Typ) + printf("[%d] subarray size: %d (full: %d,%d) \n", ArrayIndex, SubArraySize, FullArraySize, NewVariable->Typ->ArraySize); + #endif + if (ArrayIndex >= NewVariable->Typ->ArraySize) + ProgramFail(Parser, "too many array elements"); + } + LexGetToken(Parser, NULL, TRUE); + ParseArrayInitialiser(Parser, SubArray, DoAssignment); + } + else + { + struct Value *ArrayElement = NULL; + + if (Parser->Mode == RunModeRun && DoAssignment) + { + struct ValueType * ElementType = NewVariable->Typ; + int TotalSize = 1; + int ElementSize = 0; + + /* int x[3][3] = {1,2,3,4} => handle it just like int x[9] = {1,2,3,4} */ + while (ElementType->Base == TypeArray) + { + TotalSize *= ElementType->ArraySize; + ElementType = ElementType->FromType; + + /* char x[10][10] = {"abc", "def"} => assign "abc" to x[0], "def" to x[1] etc */ + if (LexGetToken(Parser, NULL, FALSE) == TokenStringConstant && ElementType->FromType->Base == TypeChar) + break; + } + ElementSize = TypeSize(ElementType, ElementType->ArraySize, TRUE); + #ifdef DEBUG_ARRAY_INITIALIZER + PRINT_SOURCE_POS; + printf("[%d/%d] element size: %d (x%d) \n", ArrayIndex, TotalSize, ElementSize, ElementType->ArraySize); + #endif + if (ArrayIndex >= TotalSize) + ProgramFail(Parser, "too many array elements"); + ArrayElement = VariableAllocValueFromExistingData(Parser, ElementType, (union AnyValue *)(&NewVariable->Val->ArrayMem[0] + ElementSize * ArrayIndex), TRUE, NewVariable); + } + + /* this is a normal expression initialiser */ + if (!ExpressionParse(Parser, &CValue)) + ProgramFail(Parser, "expression expected"); + + if (Parser->Mode == RunModeRun && DoAssignment) + { + ExpressionAssign(Parser, ArrayElement, CValue, FALSE, NULL, 0, FALSE); + VariableStackPop(Parser, CValue); + VariableStackPop(Parser, ArrayElement); + } + } + + ArrayIndex++; + + Token = LexGetToken(Parser, NULL, FALSE); + if (Token == TokenComma) + { + LexGetToken(Parser, NULL, TRUE); + Token = LexGetToken(Parser, NULL, FALSE); + } + else if (Token != TokenRightBrace) + ProgramFail(Parser, "comma expected"); + } + + if (Token == TokenRightBrace) + LexGetToken(Parser, NULL, TRUE); + else + ProgramFail(Parser, "'}' expected"); + + return ArrayIndex; +} + +/* assign an initial value to a variable */ +void ParseDeclarationAssignment(struct ParseState *Parser, struct Value *NewVariable, int DoAssignment) +{ + struct Value *CValue; + + if (LexGetToken(Parser, NULL, FALSE) == TokenLeftBrace) + { + /* this is an array initialiser */ + LexGetToken(Parser, NULL, TRUE); + ParseArrayInitialiser(Parser, NewVariable, DoAssignment); + } + else + { + /* this is a normal expression initialiser */ + if (!ExpressionParse(Parser, &CValue)) + ProgramFail(Parser, "expression expected"); + + if (Parser->Mode == RunModeRun && DoAssignment) + { + ExpressionAssign(Parser, NewVariable, CValue, FALSE, NULL, 0, FALSE); + VariableStackPop(Parser, CValue); + } + } +} + +/* declare a variable or function */ +int ParseDeclaration(struct ParseState *Parser, enum LexToken Token) +{ + char *Identifier; + struct ValueType *BasicType; + struct ValueType *Typ; + struct Value *NewVariable = NULL; + int IsStatic = FALSE; + int FirstVisit = FALSE; + Picoc *pc = Parser->pc; + + TypeParseFront(Parser, &BasicType, &IsStatic); + do + { + TypeParseIdentPart(Parser, BasicType, &Typ, &Identifier); + if ((Token != TokenVoidType && Token != TokenStructType && Token != TokenUnionType && Token != TokenEnumType) && Identifier == pc->StrEmpty) + ProgramFail(Parser, "identifier expected"); + + if (Identifier != pc->StrEmpty) + { + /* handle function definitions */ + if (LexGetToken(Parser, NULL, FALSE) == TokenOpenBracket) + { + ParseFunctionDefinition(Parser, Typ, Identifier); + return FALSE; + } + else + { + if (Typ == &pc->VoidType && Identifier != pc->StrEmpty) + ProgramFail(Parser, "can't define a void variable"); + + if (Parser->Mode == RunModeRun || Parser->Mode == RunModeGoto) + NewVariable = VariableDefineButIgnoreIdentical(Parser, Identifier, Typ, IsStatic, &FirstVisit); + + if (LexGetToken(Parser, NULL, FALSE) == TokenAssign) + { + /* we're assigning an initial value */ + LexGetToken(Parser, NULL, TRUE); + ParseDeclarationAssignment(Parser, NewVariable, !IsStatic || FirstVisit); + } + } + } + + Token = LexGetToken(Parser, NULL, FALSE); + if (Token == TokenComma) + LexGetToken(Parser, NULL, TRUE); + + } while (Token == TokenComma); + + return TRUE; +} + +/* parse a #define macro definition and store it for later */ +void ParseMacroDefinition(struct ParseState *Parser) +{ + struct Value *MacroName; + char *MacroNameStr; + struct Value *ParamName; + struct Value *MacroValue; + + if (LexGetToken(Parser, &MacroName, TRUE) != TokenIdentifier) + ProgramFail(Parser, "identifier expected"); + + MacroNameStr = MacroName->Val->Identifier; + + if (LexRawPeekToken(Parser) == TokenOpenMacroBracket) + { + /* it's a parameterised macro, read the parameters */ + enum LexToken Token = LexGetToken(Parser, NULL, TRUE); + struct ParseState ParamParser; + int NumParams; + int ParamCount = 0; + + ParserCopy(&ParamParser, Parser); + NumParams = ParseCountParams(&ParamParser); + MacroValue = VariableAllocValueAndData(Parser->pc, Parser, sizeof(struct MacroDef) + sizeof(const char *) * NumParams, FALSE, NULL, TRUE); + MacroValue->Val->MacroDef.NumParams = NumParams; + MacroValue->Val->MacroDef.ParamName = (char **)((char *)MacroValue->Val + sizeof(struct MacroDef)); + + Token = LexGetToken(Parser, &ParamName, TRUE); + + while (Token == TokenIdentifier) + { + /* store a parameter name */ + MacroValue->Val->MacroDef.ParamName[ParamCount++] = ParamName->Val->Identifier; + + /* get the trailing comma */ + Token = LexGetToken(Parser, NULL, TRUE); + if (Token == TokenComma) + Token = LexGetToken(Parser, &ParamName, TRUE); + + else if (Token != TokenCloseBracket) + ProgramFail(Parser, "comma expected"); + } + + if (Token != TokenCloseBracket) + ProgramFail(Parser, "close bracket expected"); + } + else + { + /* allocate a simple unparameterised macro */ + MacroValue = VariableAllocValueAndData(Parser->pc, Parser, sizeof(struct MacroDef), FALSE, NULL, TRUE); + MacroValue->Val->MacroDef.NumParams = 0; + } + + /* copy the body of the macro to execute later */ + ParserCopy(&MacroValue->Val->MacroDef.Body, Parser); + MacroValue->Typ = &Parser->pc->MacroType; + LexToEndOfLine(Parser); + MacroValue->Val->MacroDef.Body.Pos = LexCopyTokens(&MacroValue->Val->MacroDef.Body, Parser); + + if (!TableSet(Parser->pc, &Parser->pc->GlobalTable, MacroNameStr, MacroValue, (char *)Parser->FileName, Parser->Line, Parser->CharacterPos)) + ProgramFail(Parser, "'%s' is already defined", MacroNameStr); +} + +/* copy the entire parser state */ +void ParserCopy(struct ParseState *To, struct ParseState *From) +{ + memcpy((void *)To, (void *)From, sizeof(*To)); +} + +/* copy where we're at in the parsing */ +void ParserCopyPos(struct ParseState *To, struct ParseState *From) +{ + To->Pos = From->Pos; + To->Line = From->Line; + To->HashIfLevel = From->HashIfLevel; + To->HashIfEvaluateToLevel = From->HashIfEvaluateToLevel; + To->CharacterPos = From->CharacterPos; +} + +/* parse a "for" statement */ +void ParseFor(struct ParseState *Parser) +{ + int Condition; + struct ParseState PreConditional; + struct ParseState PreIncrement; + struct ParseState PreStatement; + struct ParseState After; + + enum RunMode OldMode = Parser->Mode; + + int PrevScopeID = 0, ScopeID = VariableScopeBegin(Parser, &PrevScopeID); + + if (LexGetToken(Parser, NULL, TRUE) != TokenOpenBracket) + ProgramFail(Parser, "'(' expected"); + + if (ParseStatement(Parser, TRUE) != ParseResultOk) + ProgramFail(Parser, "statement expected"); + + ParserCopyPos(&PreConditional, Parser); + if (LexGetToken(Parser, NULL, FALSE) == TokenSemicolon) + Condition = TRUE; + else + Condition = ExpressionParseInt(Parser); + + if (LexGetToken(Parser, NULL, TRUE) != TokenSemicolon) + ProgramFail(Parser, "';' expected"); + + ParserCopyPos(&PreIncrement, Parser); + ParseStatementMaybeRun(Parser, FALSE, FALSE); + + if (LexGetToken(Parser, NULL, TRUE) != TokenCloseBracket) + ProgramFail(Parser, "')' expected"); + + ParserCopyPos(&PreStatement, Parser); + if (ParseStatementMaybeRun(Parser, Condition, TRUE) != ParseResultOk) + ProgramFail(Parser, "statement expected"); + + if (Parser->Mode == RunModeContinue && OldMode == RunModeRun) + Parser->Mode = RunModeRun; + + ParserCopyPos(&After, Parser); + + while (Condition && Parser->Mode == RunModeRun) + { + ParserCopyPos(Parser, &PreIncrement); + ParseStatement(Parser, FALSE); + + ParserCopyPos(Parser, &PreConditional); + if (LexGetToken(Parser, NULL, FALSE) == TokenSemicolon) + Condition = TRUE; + else + Condition = ExpressionParseInt(Parser); + + if (Condition) + { + ParserCopyPos(Parser, &PreStatement); + ParseStatement(Parser, TRUE); + + if (Parser->Mode == RunModeContinue) + Parser->Mode = RunModeRun; + } + } + + if (Parser->Mode == RunModeBreak && OldMode == RunModeRun) + Parser->Mode = RunModeRun; + + VariableScopeEnd(Parser, ScopeID, PrevScopeID); + + ParserCopyPos(Parser, &After); +} + +/* parse a block of code and return what mode it returned in */ +enum RunMode ParseBlock(struct ParseState *Parser, int AbsorbOpenBrace, int Condition) +{ + int PrevScopeID = 0, ScopeID = VariableScopeBegin(Parser, &PrevScopeID); + + if (AbsorbOpenBrace && LexGetToken(Parser, NULL, TRUE) != TokenLeftBrace) + ProgramFail(Parser, "'{' expected"); + + if (Parser->Mode == RunModeSkip || !Condition) + { + /* condition failed - skip this block instead */ + enum RunMode OldMode = Parser->Mode; + Parser->Mode = RunModeSkip; + while (ParseStatement(Parser, TRUE) == ParseResultOk) + {} + Parser->Mode = OldMode; + } + else + { + /* just run it in its current mode */ + while (ParseStatement(Parser, TRUE) == ParseResultOk) + {} + } + + if (LexGetToken(Parser, NULL, TRUE) != TokenRightBrace) + ProgramFail(Parser, "'}' expected"); + + VariableScopeEnd(Parser, ScopeID, PrevScopeID); + + return Parser->Mode; +} + +/* parse a typedef declaration */ +void ParseTypedef(struct ParseState *Parser) +{ + struct ValueType *Typ; + struct ValueType **TypPtr; + char *TypeName; + struct Value InitValue; + + TypeParse(Parser, &Typ, &TypeName, NULL); + + if (Parser->Mode == RunModeRun) + { + TypPtr = &Typ; + InitValue.Typ = &Parser->pc->TypeType; + InitValue.Val = (union AnyValue *)TypPtr; + VariableDefine(Parser->pc, Parser, TypeName, &InitValue, NULL, FALSE); + } +} + +/* parse a statement */ +enum ParseResult ParseStatement(struct ParseState *Parser, int CheckTrailingSemicolon) +{ + struct Value *CValue; + struct Value *LexerValue; + struct Value *VarValue; + int Condition; + struct ParseState PreState; + enum LexToken Token; + + /* if we're debugging, check for a breakpoint */ + if (Parser->DebugMode && Parser->Mode == RunModeRun) + DebugCheckStatement(Parser); + + /* take note of where we are and then grab a token to see what statement we have */ + ParserCopy(&PreState, Parser); + Token = LexGetToken(Parser, &LexerValue, TRUE); + + switch (Token) + { + case TokenEOF: + return ParseResultEOF; + + case TokenIdentifier: + /* might be a typedef-typed variable declaration or it might be an expression */ + if (VariableDefined(Parser->pc, LexerValue->Val->Identifier)) + { + VariableGet(Parser->pc, Parser, LexerValue->Val->Identifier, &VarValue); + if (VarValue->Typ->Base == Type_Type) + { + *Parser = PreState; + ParseDeclaration(Parser, Token); + break; + } + } + else + { + /* it might be a goto label */ + enum LexToken NextToken = LexGetToken(Parser, NULL, FALSE); + if (NextToken == TokenColon) + { + /* declare the identifier as a goto label */ + LexGetToken(Parser, NULL, TRUE); + if (Parser->Mode == RunModeGoto && LexerValue->Val->Identifier == Parser->SearchGotoLabel) + Parser->Mode = RunModeRun; + + CheckTrailingSemicolon = FALSE; + break; + } +#ifdef FEATURE_AUTO_DECLARE_VARIABLES + else /* new_identifier = something */ + { /* try to guess type and declare the variable based on assigned value */ + if (NextToken == TokenAssign && !VariableDefinedAndOutOfScope(Parser->pc, LexerValue->Val->Identifier)) + { + if (Parser->Mode == RunModeRun) + { + struct Value *CValue; + char* Identifier = LexerValue->Val->Identifier; + + LexGetToken(Parser, NULL, TRUE); + if (!ExpressionParse(Parser, &CValue)) + { + ProgramFail(Parser, "expected: expression"); + } + + #if 0 + PRINT_SOURCE_POS; + PlatformPrintf(Parser->pc->CStdOut, "%t %s = %d;\n", CValue->Typ, Identifier, CValue->Val->Integer); + printf("%d\n", VariableDefined(Parser->pc, Identifier)); + #endif + VariableDefine(Parser->pc, Parser, Identifier, CValue, CValue->Typ, TRUE); + break; + } + } + } +#endif + } + /* else fallthrough to expression */ + /* no break */ + + case TokenAsterisk: + case TokenAmpersand: + case TokenIncrement: + case TokenDecrement: + case TokenOpenBracket: + *Parser = PreState; + ExpressionParse(Parser, &CValue); + if (Parser->Mode == RunModeRun) + VariableStackPop(Parser, CValue); + break; + + case TokenLeftBrace: + ParseBlock(Parser, FALSE, TRUE); + CheckTrailingSemicolon = FALSE; + break; + + case TokenIf: + if (LexGetToken(Parser, NULL, TRUE) != TokenOpenBracket) + ProgramFail(Parser, "'(' expected"); + + Condition = ExpressionParseInt(Parser); + + if (LexGetToken(Parser, NULL, TRUE) != TokenCloseBracket) + ProgramFail(Parser, "')' expected"); + + if (ParseStatementMaybeRun(Parser, Condition, TRUE) != ParseResultOk) + ProgramFail(Parser, "statement expected"); + + if (LexGetToken(Parser, NULL, FALSE) == TokenElse) + { + LexGetToken(Parser, NULL, TRUE); + if (ParseStatementMaybeRun(Parser, !Condition, TRUE) != ParseResultOk) + ProgramFail(Parser, "statement expected"); + } + CheckTrailingSemicolon = FALSE; + break; + + case TokenWhile: + { + struct ParseState PreConditional; + enum RunMode PreMode = Parser->Mode; + + if (LexGetToken(Parser, NULL, TRUE) != TokenOpenBracket) + ProgramFail(Parser, "'(' expected"); + + ParserCopyPos(&PreConditional, Parser); + do + { + ParserCopyPos(Parser, &PreConditional); + Condition = ExpressionParseInt(Parser); + if (LexGetToken(Parser, NULL, TRUE) != TokenCloseBracket) + ProgramFail(Parser, "')' expected"); + + if (ParseStatementMaybeRun(Parser, Condition, TRUE) != ParseResultOk) + ProgramFail(Parser, "statement expected"); + + if (Parser->Mode == RunModeContinue) + Parser->Mode = PreMode; + + } while (Parser->Mode == RunModeRun && Condition); + + if (Parser->Mode == RunModeBreak) + Parser->Mode = PreMode; + + CheckTrailingSemicolon = FALSE; + } + break; + + case TokenDo: + { + struct ParseState PreStatement; + enum RunMode PreMode = Parser->Mode; + ParserCopyPos(&PreStatement, Parser); + do + { + ParserCopyPos(Parser, &PreStatement); + if (ParseStatement(Parser, TRUE) != ParseResultOk) + ProgramFail(Parser, "statement expected"); + + if (Parser->Mode == RunModeContinue) + Parser->Mode = PreMode; + + if (LexGetToken(Parser, NULL, TRUE) != TokenWhile) + ProgramFail(Parser, "'while' expected"); + + if (LexGetToken(Parser, NULL, TRUE) != TokenOpenBracket) + ProgramFail(Parser, "'(' expected"); + + Condition = ExpressionParseInt(Parser); + if (LexGetToken(Parser, NULL, TRUE) != TokenCloseBracket) + ProgramFail(Parser, "')' expected"); + + } while (Condition && Parser->Mode == RunModeRun); + + if (Parser->Mode == RunModeBreak) + Parser->Mode = PreMode; + } + break; + + case TokenFor: + ParseFor(Parser); + CheckTrailingSemicolon = FALSE; + break; + + case TokenSemicolon: + CheckTrailingSemicolon = FALSE; + break; + + case TokenIntType: + case TokenShortType: + case TokenCharType: + case TokenLongType: + case TokenFloatType: + case TokenDoubleType: + case TokenVoidType: + case TokenStructType: + case TokenUnionType: + case TokenEnumType: + case TokenSignedType: + case TokenUnsignedType: + case TokenStaticType: + case TokenAutoType: + case TokenRegisterType: + case TokenExternType: + *Parser = PreState; + CheckTrailingSemicolon = ParseDeclaration(Parser, Token); + break; + + case TokenHashDefine: + ParseMacroDefinition(Parser); + CheckTrailingSemicolon = FALSE; + break; + +#ifndef NO_HASH_INCLUDE + case TokenHashInclude: + if (LexGetToken(Parser, &LexerValue, TRUE) != TokenStringConstant) + ProgramFail(Parser, "\"filename.h\" expected"); + + IncludeFile(Parser->pc, (char *)LexerValue->Val->Pointer); + CheckTrailingSemicolon = FALSE; + break; +#endif + + case TokenSwitch: + if (LexGetToken(Parser, NULL, TRUE) != TokenOpenBracket) + ProgramFail(Parser, "'(' expected"); + + Condition = ExpressionParseInt(Parser); + + if (LexGetToken(Parser, NULL, TRUE) != TokenCloseBracket) + ProgramFail(Parser, "')' expected"); + + if (LexGetToken(Parser, NULL, FALSE) != TokenLeftBrace) + ProgramFail(Parser, "'{' expected"); + + { + /* new block so we can store parser state */ + enum RunMode OldMode = Parser->Mode; + int OldSearchLabel = Parser->SearchLabel; + Parser->Mode = RunModeCaseSearch; + Parser->SearchLabel = Condition; + + ParseBlock(Parser, TRUE, (OldMode != RunModeSkip) && (OldMode != RunModeReturn)); + + if (Parser->Mode != RunModeReturn) + Parser->Mode = OldMode; + + Parser->SearchLabel = OldSearchLabel; + } + + CheckTrailingSemicolon = FALSE; + break; + + case TokenCase: + if (Parser->Mode == RunModeCaseSearch) + { + Parser->Mode = RunModeRun; + Condition = ExpressionParseInt(Parser); + Parser->Mode = RunModeCaseSearch; + } + else + Condition = ExpressionParseInt(Parser); + + if (LexGetToken(Parser, NULL, TRUE) != TokenColon) + ProgramFail(Parser, "':' expected"); + + if (Parser->Mode == RunModeCaseSearch && Condition == Parser->SearchLabel) + Parser->Mode = RunModeRun; + + CheckTrailingSemicolon = FALSE; + break; + + case TokenDefault: + if (LexGetToken(Parser, NULL, TRUE) != TokenColon) + ProgramFail(Parser, "':' expected"); + + if (Parser->Mode == RunModeCaseSearch) + Parser->Mode = RunModeRun; + + CheckTrailingSemicolon = FALSE; + break; + + case TokenBreak: + if (Parser->Mode == RunModeRun) + Parser->Mode = RunModeBreak; + break; + + case TokenContinue: + if (Parser->Mode == RunModeRun) + Parser->Mode = RunModeContinue; + break; + + case TokenReturn: + if (Parser->Mode == RunModeRun) + { + if (!Parser->pc->TopStackFrame || Parser->pc->TopStackFrame->ReturnValue->Typ->Base != TypeVoid) + { + if (!ExpressionParse(Parser, &CValue)) + ProgramFail(Parser, "value required in return"); + + if (!Parser->pc->TopStackFrame) /* return from top-level program? */ + PlatformExit(Parser->pc, ExpressionCoerceInteger(CValue)); + else + ExpressionAssign(Parser, Parser->pc->TopStackFrame->ReturnValue, CValue, TRUE, NULL, 0, FALSE); + + VariableStackPop(Parser, CValue); + } + else + { + if (ExpressionParse(Parser, &CValue)) + ProgramFail(Parser, "value in return from a void function"); + } + + Parser->Mode = RunModeReturn; + } + else + ExpressionParse(Parser, &CValue); + break; + + case TokenTypedef: + ParseTypedef(Parser); + break; + + case TokenGoto: + if (LexGetToken(Parser, &LexerValue, TRUE) != TokenIdentifier) + ProgramFail(Parser, "identifier expected"); + + if (Parser->Mode == RunModeRun) + { + /* start scanning for the goto label */ + Parser->SearchGotoLabel = LexerValue->Val->Identifier; + Parser->Mode = RunModeGoto; + } + break; + + case TokenDelete: + { + /* try it as a function or variable name to delete */ + if (LexGetToken(Parser, &LexerValue, TRUE) != TokenIdentifier) + ProgramFail(Parser, "identifier expected"); + + if (Parser->Mode == RunModeRun) + { + /* delete this variable or function */ + CValue = TableDelete(Parser->pc, &Parser->pc->GlobalTable, LexerValue->Val->Identifier); + + if (CValue == NULL) + ProgramFail(Parser, "'%s' is not defined", LexerValue->Val->Identifier); + + VariableFree(Parser->pc, CValue); + } + break; + } + + default: + *Parser = PreState; + return ParseResultError; + } + + if (CheckTrailingSemicolon) + { + if (LexGetToken(Parser, NULL, TRUE) != TokenSemicolon) + ProgramFail(Parser, "';' expected"); + } + + return ParseResultOk; +} + +/* quick scan a source file for definitions */ +void PicocParse(Picoc *pc, const char *FileName, const char *Source, int SourceLen, int RunIt, int CleanupNow, int CleanupSource, int EnableDebugger) +{ + struct ParseState Parser; + enum ParseResult Ok; + struct CleanupTokenNode *NewCleanupNode; + char *RegFileName = TableStrRegister(pc, FileName); + + void *Tokens = LexAnalyse(pc, RegFileName, Source, SourceLen, NULL); + + /* allocate a cleanup node so we can clean up the tokens later */ + if (!CleanupNow) + { + NewCleanupNode = HeapAllocMem(pc, sizeof(struct CleanupTokenNode)); + if (NewCleanupNode == NULL) + ProgramFailNoParser(pc, "out of memory"); + + NewCleanupNode->Tokens = Tokens; + if (CleanupSource) + NewCleanupNode->SourceText = Source; + else + NewCleanupNode->SourceText = NULL; + + NewCleanupNode->Next = pc->CleanupTokenList; + pc->CleanupTokenList = NewCleanupNode; + } + + /* do the parsing */ + LexInitParser(&Parser, pc, Source, Tokens, RegFileName, RunIt, EnableDebugger); + + do { + Ok = ParseStatement(&Parser, TRUE); + } while (Ok == ParseResultOk); + + if (Ok == ParseResultError) + ProgramFail(&Parser, "parse error"); + + /* clean up */ + if (CleanupNow) + HeapFreeMem(pc, Tokens); +} + +/* parse interactively */ +void PicocParseInteractiveNoStartPrompt(Picoc *pc, int EnableDebugger) +{ + struct ParseState Parser; + enum ParseResult Ok; + + LexInitParser(&Parser, pc, NULL, NULL, pc->StrEmpty, TRUE, EnableDebugger); + PicocPlatformSetExitPoint(pc); + LexInteractiveClear(pc, &Parser); + + do + { + LexInteractiveStatementPrompt(pc); + Ok = ParseStatement(&Parser, TRUE); + LexInteractiveCompleted(pc, &Parser); + + } while (Ok == ParseResultOk); + + if (Ok == ParseResultError) + ProgramFail(&Parser, "parse error"); + + PlatformPrintf(pc->CStdOut, "\n"); +} + +/* parse interactively, showing a startup message */ +void PicocParseInteractive(Picoc *pc) +{ + PlatformPrintf(pc->CStdOut, INTERACTIVE_PROMPT_START); + PicocParseInteractiveNoStartPrompt(pc, TRUE); +} diff --git a/src/parse.o b/src/parse.o new file mode 100644 index 0000000..d6235f7 Binary files /dev/null and b/src/parse.o differ diff --git a/src/pcc.exe b/src/pcc.exe new file mode 100644 index 0000000..d9451df Binary files /dev/null and b/src/pcc.exe differ diff --git a/src/picoc.c b/src/picoc.c new file mode 100644 index 0000000..2579638 --- /dev/null +++ b/src/picoc.c @@ -0,0 +1,109 @@ +/* picoc main program - this varies depending on your operating system and + * how you're using picoc */ + +/* include only picoc.h here - should be able to use it with only the external interfaces, no internals from interpreter.h */ +#include "picoc.h" + +/* platform-dependent code for running programs is in this file */ + +#if defined(UNIX_HOST) || defined(WIN32) +#include +#include +#include + +#define PICOC_STACK_SIZE (128*1024) /* space for the the stack */ + +#ifdef PERSOPORT +int picoc_main(int argc, char **argv) +#else +int main(int argc, char **argv) +#endif +{ + int ParamCount = 1; + int DontRunMain = FALSE; + int StackSize = getenv("STACKSIZE") ? atoi(getenv("STACKSIZE")) : PICOC_STACK_SIZE; + Picoc pc; + + if (argc < 2) + { + printf("Format: picoc ... [- ...] : run a program (calls main() to start it)\n" + " picoc -s ... [- ...] : script mode - runs the program without calling main()\n" + " picoc -i : interactive mode\n"); + exit(1); + } + + PicocInitialise(&pc, StackSize); + + if (strcmp(argv[ParamCount], "-s") == 0 || strcmp(argv[ParamCount], "-m") == 0) + { + DontRunMain = TRUE; + PicocIncludeAllSystemHeaders(&pc); + ParamCount++; + } + + if (argc > ParamCount && strcmp(argv[ParamCount], "-i") == 0) + { + PicocIncludeAllSystemHeaders(&pc); + PicocParseInteractive(&pc); + } + else + { + if (PicocPlatformSetExitPoint(&pc)) + { + PicocCleanup(&pc); + return pc.PicocExitValue; + } + + for (; ParamCount < argc && strcmp(argv[ParamCount], "-") != 0; ParamCount++) + PicocPlatformScanFile(&pc, argv[ParamCount]); + + if (!DontRunMain) + PicocCallMain(&pc, argc - ParamCount, &argv[ParamCount]); + } + + PicocCleanup(&pc); + return pc.PicocExitValue; +} +#else +# ifdef SURVEYOR_HOST +# define HEAP_SIZE C_HEAPSIZE +# include +# include "../srv.h" +# include "../print.h" +# include "../string.h" + +int picoc(char *SourceStr) +{ + char *pos; + + PicocInitialise(HEAP_SIZE); + + if (SourceStr) + { + for (pos = SourceStr; *pos != 0; pos++) + { + if (*pos == 0x1a) + { + *pos = 0x20; + } + } + } + + PicocExitBuf[40] = 0; + PicocPlatformSetExitPoint(); + if (PicocExitBuf[40]) { + printf("Leaving PicoC\n\r"); + PicocCleanup(); + return PicocExitValue; + } + + if (SourceStr) + PicocParse("nofile", SourceStr, strlen(SourceStr), TRUE, TRUE, FALSE); + + PicocParseInteractive(); + PicocCleanup(); + + return PicocExitValue; +} +# endif +#endif diff --git a/src/picoc.exe b/src/picoc.exe new file mode 100644 index 0000000..d9451df Binary files /dev/null and b/src/picoc.exe differ diff --git a/src/picoc.h b/src/picoc.h new file mode 100644 index 0000000..2ac0f06 --- /dev/null +++ b/src/picoc.h @@ -0,0 +1,49 @@ +/* picoc external interface. This should be the only header you need to use if + * you're using picoc as a library. Internal details are in interpreter.h */ +#ifndef PICOC_H +#define PICOC_H + +/* picoc version number */ +#ifdef VER +#define PICOC_VERSION "v2.2 beta r" VER /* VER is the subversion version number, obtained via the Makefile */ +#else +#define PICOC_VERSION "v2.2" +#endif + +/* handy definitions */ +#ifndef TRUE +#define TRUE 1 +#define FALSE 0 +#endif + +#include "interpreter.h" + + +#if defined(UNIX_HOST) || defined(WIN32) +#include + +/* this has to be a macro, otherwise errors will occur due to the stack being corrupt */ +#define PicocPlatformSetExitPoint(pc) setjmp((pc)->PicocExitBuf) +#endif + +#ifdef SURVEYOR_HOST +/* mark where to end the program for platforms which require this */ +extern int PicocExitBuf[]; + +#define PicocPlatformSetExitPoint(pc) setjmp((pc)->PicocExitBuf) +#endif + +/* parse.c */ +void PicocParse(Picoc *pc, const char *FileName, const char *Source, int SourceLen, int RunIt, int CleanupNow, int CleanupSource, int EnableDebugger); +void PicocParseInteractive(Picoc *pc); + +/* platform.c */ +void PicocCallMain(Picoc *pc, int argc, char **argv); +void PicocInitialise(Picoc *pc, int StackSize); +void PicocCleanup(Picoc *pc); +void PicocPlatformScanFile(Picoc *pc, const char *FileName); + +/* include.c */ +void PicocIncludeAllSystemHeaders(Picoc *pc); + +#endif /* PICOC_H */ diff --git a/src/picoc.o b/src/picoc.o new file mode 100644 index 0000000..8b3cf06 Binary files /dev/null and b/src/picoc.o differ diff --git a/src/picoc.res.o b/src/picoc.res.o new file mode 100644 index 0000000..907ca88 Binary files /dev/null and b/src/picoc.res.o differ diff --git a/src/platform.c b/src/platform.c new file mode 100644 index 0000000..8a784ac --- /dev/null +++ b/src/platform.c @@ -0,0 +1,265 @@ +/* picoc's interface to the underlying platform. most platform-specific code + * is in platform/platform_XX.c and platform/library_XX.c */ + +#include "picoc.h" +#include "interpreter.h" + + +/* initialise everything */ +void PicocInitialise(Picoc *pc, int StackSize) +{ + memset(pc, '\0', sizeof(*pc)); + PlatformInit(pc); + BasicIOInit(pc); + HeapInit(pc, StackSize); + TableInit(pc); + VariableInit(pc); + LexInit(pc); + TypeInit(pc); +#ifndef NO_HASH_INCLUDE + IncludeInit(pc); +#endif + LibraryInit(pc); +#ifdef BUILTIN_MINI_STDLIB + LibraryAdd(pc, &GlobalTable, "c library", &CLibrary[0]); + CLibraryInit(pc); +#endif + PlatformLibraryInit(pc); + DebugInit(pc); +} + +/* free memory */ +void PicocCleanup(Picoc *pc) +{ + DebugCleanup(pc); +#ifndef NO_HASH_INCLUDE + IncludeCleanup(pc); +#endif + ParseCleanup(pc); + LexCleanup(pc); + VariableCleanup(pc); + TypeCleanup(pc); + TableStrFree(pc); + HeapCleanup(pc); + PlatformCleanup(pc); +} + +/* platform-dependent code for running programs */ +#if defined(UNIX_HOST) || defined(WIN32) + +#define CALL_MAIN_NO_ARGS_RETURN_VOID "main();" +#define CALL_MAIN_WITH_ARGS_RETURN_VOID "main(__argc,__argv);" +#define CALL_MAIN_NO_ARGS_RETURN_INT "__exit_value = main();" +#define CALL_MAIN_WITH_ARGS_RETURN_INT "__exit_value = main(__argc,__argv);" + +void PicocCallMain(Picoc *pc, int argc, char **argv) +{ + /* check if the program wants arguments */ + struct Value *FuncValue = NULL; + + if (!VariableDefined(pc, TableStrRegister(pc, "main"))) + ProgramFailNoParser(pc, "main() is not defined"); + + VariableGet(pc, NULL, TableStrRegister(pc, "main"), &FuncValue); + if (FuncValue->Typ->Base != TypeFunction) + ProgramFailNoParser(pc, "main is not a function - can't call it"); + + if (FuncValue->Val->FuncDef.NumParams != 0) + { + /* define the arguments */ + VariableDefinePlatformVar(pc, NULL, "__argc", &pc->IntType, (union AnyValue *)&argc, FALSE); + VariableDefinePlatformVar(pc, NULL, "__argv", pc->CharPtrPtrType, (union AnyValue *)&argv, FALSE); + } + + if (FuncValue->Val->FuncDef.ReturnType == &pc->VoidType) + { + if (FuncValue->Val->FuncDef.NumParams == 0) + PicocParse(pc, "startup", CALL_MAIN_NO_ARGS_RETURN_VOID, strlen(CALL_MAIN_NO_ARGS_RETURN_VOID), TRUE, TRUE, FALSE, TRUE); + else + PicocParse(pc, "startup", CALL_MAIN_WITH_ARGS_RETURN_VOID, strlen(CALL_MAIN_WITH_ARGS_RETURN_VOID), TRUE, TRUE, FALSE, TRUE); + } + else + { + VariableDefinePlatformVar(pc, NULL, "__exit_value", &pc->IntType, (union AnyValue *)&pc->PicocExitValue, TRUE); + + if (FuncValue->Val->FuncDef.NumParams == 0) + PicocParse(pc, "startup", CALL_MAIN_NO_ARGS_RETURN_INT, strlen(CALL_MAIN_NO_ARGS_RETURN_INT), TRUE, TRUE, FALSE, TRUE); + else + PicocParse(pc, "startup", CALL_MAIN_WITH_ARGS_RETURN_INT, strlen(CALL_MAIN_WITH_ARGS_RETURN_INT), TRUE, TRUE, FALSE, TRUE); + } +} +#endif + +void PrintSourceTextErrorLine(IOFILE *Stream, const char *FileName, const char *SourceText, int Line, int CharacterPos) +{ + int LineCount; + const char *LinePos; + const char *CPos; + int CCount; + + if (SourceText != NULL) + { + /* find the source line */ + for (LinePos = SourceText, LineCount = 1; *LinePos != '\0' && LineCount < Line; LinePos++) + { + if (*LinePos == '\n') + LineCount++; + } + + /* display the line */ + for (CPos = LinePos; *CPos != '\n' && *CPos != '\0'; CPos++) + PrintCh(*CPos, Stream); + PrintCh('\n', Stream); + + /* display the error position */ + for (CPos = LinePos, CCount = 0; *CPos != '\n' && *CPos != '\0' && (CCount < CharacterPos || *CPos == ' '); CPos++, CCount++) + { + if (*CPos == '\t') + PrintCh('\t', Stream); + else + PrintCh(' ', Stream); + } + } + else + { + /* assume we're in interactive mode - try to make the arrow match up with the input text */ + for (CCount = 0; CCount < CharacterPos + (int)strlen(INTERACTIVE_PROMPT_STATEMENT); CCount++) + PrintCh(' ', Stream); + } + PlatformPrintf(Stream, "^\n%s:%d:%d ", FileName, Line, CharacterPos); + +} + +/* exit with a message */ +void ProgramFail(struct ParseState *Parser, const char *Message, ...) +{ + va_list Args; + + PrintSourceTextErrorLine(Parser->pc->CStdOut, Parser->FileName, Parser->SourceText, Parser->Line, Parser->CharacterPos); + va_start(Args, Message); + PlatformVPrintf(Parser->pc->CStdOut, Message, Args); + va_end(Args); + PlatformPrintf(Parser->pc->CStdOut, "\n"); + PlatformExit(Parser->pc, 1); +} + +/* exit with a message, when we're not parsing a program */ +void ProgramFailNoParser(Picoc *pc, const char *Message, ...) +{ + va_list Args; + + va_start(Args, Message); + PlatformVPrintf(pc->CStdOut, Message, Args); + va_end(Args); + PlatformPrintf(pc->CStdOut, "\n"); + PlatformExit(pc, 1); +} + +/* like ProgramFail() but gives descriptive error messages for assignment */ +void AssignFail(struct ParseState *Parser, const char *Format, struct ValueType *Type1, struct ValueType *Type2, int Num1, int Num2, const char *FuncName, int ParamNo) +{ + IOFILE *Stream = Parser->pc->CStdOut; + + PrintSourceTextErrorLine(Parser->pc->CStdOut, Parser->FileName, Parser->SourceText, Parser->Line, Parser->CharacterPos); + PlatformPrintf(Stream, "can't %s ", (FuncName == NULL) ? "assign" : "set"); + + if (Type1 != NULL) + PlatformPrintf(Stream, Format, Type1, Type2); + else + PlatformPrintf(Stream, Format, Num1, Num2); + + if (FuncName != NULL) + PlatformPrintf(Stream, " in argument %d of call to %s()", ParamNo, FuncName); + + PlatformPrintf(Stream, "\n"); + PlatformExit(Parser->pc, 1); +} + +/* exit lexing with a message */ +void LexFail(Picoc *pc, struct LexState *Lexer, const char *Message, ...) +{ + va_list Args; + + PrintSourceTextErrorLine(pc->CStdOut, Lexer->FileName, Lexer->SourceText, Lexer->Line, Lexer->CharacterPos); + va_start(Args, Message); + PlatformVPrintf(pc->CStdOut, Message, Args); + va_end(Args); + PlatformPrintf(pc->CStdOut, "\n"); + PlatformExit(pc, 1); +} + +/* printf for compiler error reporting */ +void PlatformPrintf(IOFILE *Stream, const char *Format, ...) +{ + va_list Args; + + va_start(Args, Format); + PlatformVPrintf(Stream, Format, Args); + va_end(Args); +} + +void PlatformVPrintf(IOFILE *Stream, const char *Format, va_list Args) +{ + const char *FPos; + + for (FPos = Format; *FPos != '\0'; FPos++) + { + if (*FPos == '%') + { + FPos++; + switch (*FPos) + { + case 's': PrintStr(va_arg(Args, char *), Stream); break; + case 'd': PrintSimpleInt(va_arg(Args, int), Stream); break; + case 'c': PrintCh(va_arg(Args, int), Stream); break; + case 't': PrintType(va_arg(Args, struct ValueType *), Stream); break; +#ifndef NO_FP + case 'f': PrintFP(va_arg(Args, double), Stream); break; +#endif + case '%': PrintCh('%', Stream); break; + case '\0': FPos--; break; + } + } + else + PrintCh(*FPos, Stream); + } +} + +/* make a new temporary name. takes a static buffer of char [7] as a parameter. should be initialised to "XX0000" + * where XX can be any characters */ +char *PlatformMakeTempName(Picoc *pc, char *TempNameBuffer) +{ + int CPos = 5; + + while (CPos > 1) + { + if (TempNameBuffer[CPos] < '9') + { + TempNameBuffer[CPos]++; + return TableStrRegister(pc, TempNameBuffer); + } + else + { + TempNameBuffer[CPos] = '0'; + CPos--; + } + } + + return TableStrRegister(pc, TempNameBuffer); +} + +#ifdef PERSOPORT +char INTERACTIVE_PROMPT_STATEMENT[32] = "pico-c> " ; +char INTERACTIVE_PROMPT_LINE[32] = " > " ; +void PrintHelp( char * filename, struct LibraryFunction DefFunctions[], const char * Defs ) { + int i=0 ; + if( filename != NULL ) { printf( "/* %s prototypes */\n", filename ) ; } + if( Defs != NULL ) { printf( "%s\n", Defs ) ; } + if( DefFunctions != NULL ) + while( DefFunctions[i].Prototype != NULL ) { + printf( "%s\n", DefFunctions[i].Prototype ) ; + i++; + } + printf( "\n" ) ; +} +#endif diff --git a/src/platform.h b/src/platform.h new file mode 100644 index 0000000..ad84e66 --- /dev/null +++ b/src/platform.h @@ -0,0 +1,153 @@ +/* all platform-specific includes and defines go in this file */ +#ifndef PLATFORM_H +#define PLATFORM_H + +/* configurable options */ +/* select your host type (or do it in the Makefile): + * #define UNIX_HOST + * #define FLYINGFOX_HOST + * #define SURVEYOR_HOST + * #define SRV1_UNIX_HOST + * #define UMON_HOST + * #define WIN32 (predefined on MSVC) + */ + +#define LARGE_INT_POWER_OF_TEN 1000000000 /* the largest power of ten which fits in an int on this architecture */ +#if defined(__hppa__) || defined(__sparc__) +#define ALIGN_TYPE double /* the default data type to use for alignment */ +#else +#define ALIGN_TYPE void * /* the default data type to use for alignment */ +#endif + +#define GLOBAL_TABLE_SIZE 97 /* global variable table */ +#define STRING_TABLE_SIZE 97 /* shared string table size */ +#define STRING_LITERAL_TABLE_SIZE 97 /* string literal table size */ +#define RESERVED_WORD_TABLE_SIZE 97 /* reserved word table size */ +#define PARAMETER_MAX 16 /* maximum number of parameters to a function */ +#define LINEBUFFER_MAX 256 /* maximum number of characters on a line */ +#define LOCAL_TABLE_SIZE 11 /* size of local variable table (can expand) */ +#define STRUCT_TABLE_SIZE 11 /* size of struct/union member table (can expand) */ + +#define INTERACTIVE_PROMPT_START "starting picoc " PICOC_VERSION "\n" +#ifndef PERSOPORT +#define INTERACTIVE_PROMPT_STATEMENT "picoc> " +#define INTERACTIVE_PROMPT_LINE " > " +#else +extern char INTERACTIVE_PROMPT_STATEMENT[32] ; +extern char INTERACTIVE_PROMPT_LINE[32] ; +#endif + +/* host platform includes */ +#ifdef UNIX_HOST +# define USE_MALLOC_STACK /* stack is allocated using malloc() */ +# define USE_MALLOC_HEAP /* heap is allocated using malloc() */ +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# ifndef NO_FP +# include +# define PICOC_MATH_LIBRARY +# define USE_READLINE +# undef BIG_ENDIAN +# if defined(__powerpc__) || defined(__hppa__) || defined(__sparc__) +# define BIG_ENDIAN +# endif +# endif + +extern jmp_buf ExitBuf; + +#else +# ifdef WIN32 +# define USE_MALLOC_STACK /* stack is allocated using malloc() */ +# define USE_MALLOC_HEAP /* heap is allocated using malloc() */ +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# define PICOC_MATH_LIBRARY +# undef BIG_ENDIAN + +extern jmp_buf ExitBuf; + +# else +# ifdef FLYINGFOX_HOST +# define HEAP_SIZE (16*1024) /* space for the heap and the stack */ +# define NO_HASH_INCLUDE +# include +# include +# include +# include +# include +# include +# include +# define assert(x) +# define BUILTIN_MINI_STDLIB +# undef BIG_ENDIAN + +# else +# ifdef SURVEYOR_HOST +# define HEAP_SIZE C_HEAPSIZE +# define NO_FP +# define NO_CTYPE +# define NO_HASH_INCLUDE +# define NO_MODULUS +# include +# include "../string.h" +# include "../print.h" +# include "../srv.h" +# include "../setjmp.h" +# include "../stdarg.h" +# include "../colors.h" +# include "../neural.h" +# include "../gps.h" +# include "../i2c.h" +# include "../jpeg.h" +# include "../malloc.h" +# include "../xmodem.h" +# define assert(x) +# undef BIG_ENDIAN +# define NO_CALLOC +# define NO_REALLOC +# define BROKEN_FLOAT_CASTS +# define BUILTIN_MINI_STDLIB +# else +# ifdef UMON_HOST +# define HEAP_SIZE (128*1024) /* space for the heap and the stack */ +# define NO_FP +# define BUILTIN_MINI_STDLIB +# include +# include +# include +# include +# include +# include +# include "monlib.h" +# define assert(x) +# define malloc mon_malloc +# define calloc(a,b) mon_malloc(a*b) +# define realloc mon_realloc +# define free mon_free +# endif +# endif +# endif + +extern int ExitBuf[]; + +# endif +#endif + +#endif /* PLATFORM_H */ diff --git a/src/platform.o b/src/platform.o new file mode 100644 index 0000000..7ebdd79 Binary files /dev/null and b/src/platform.o differ diff --git a/src/platform/library_ffox.c b/src/platform/library_ffox.c new file mode 100644 index 0000000..9e68e62 --- /dev/null +++ b/src/platform/library_ffox.c @@ -0,0 +1,13 @@ +#include "../interpreter.h" + +/* list of all library functions and their prototypes */ +struct LibraryFunction PlatformLibrary[] = +{ + { NULL, NULL } +}; + +void PlatformLibraryInit() +{ + LibraryAdd(&GlobalTable, "platform library", &PlatformLibrary); +} + diff --git a/src/platform/library_msvc.c b/src/platform/library_msvc.c new file mode 100644 index 0000000..621a067 --- /dev/null +++ b/src/platform/library_msvc.c @@ -0,0 +1,30 @@ +#include "../interpreter.h" + +void MsvcSetupFunc(Picoc *pc) +{ +} + +void CTest (struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + printf("test(%d)\n", Param[0]->Val->Integer); + Param[0]->Val->Integer = 1234; +} + +void CLineNo (struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = Parser->Line; +} + +/* list of all library functions and their prototypes */ +struct LibraryFunction MsvcFunctions[] = +{ + { CTest, "void Test(int);" }, + { CLineNo, "int LineNo();" }, + { NULL, NULL } +}; + +void PlatformLibraryInit(Picoc *pc) +{ + IncludeRegister(pc, "picoc_msvc.h", &MsvcSetupFunc, &MsvcFunctions[0], NULL); +} + diff --git a/src/platform/library_srv1.c b/src/platform/library_srv1.c new file mode 100644 index 0000000..a8cd443 --- /dev/null +++ b/src/platform/library_srv1.c @@ -0,0 +1,809 @@ +#include "../interpreter.h" + +static int Blobcnt, Blobx1, Blobx2, Bloby1, Bloby2, Iy1, Iy2, Iu1, Iu2, Iv1, Iv2; +static int GPSlat, GPSlon, GPSalt, GPSfix, GPSsat, GPSutc, Elcount, Ercount; +static int ScanVect[16], NNVect[NUM_OUTPUT]; + +struct ValueType *IntArrayType; + + +void SRV1SetupFunc() +{ + IntArrayType = TypeGetMatching(NULL, &IntType, TypeArray, 16, StrEmpty, TRUE); + VariableDefinePlatformVar(NULL, "scanvect", IntArrayType, (union AnyValue *)&ScanVect, FALSE); + VariableDefinePlatformVar(NULL, "neuron", IntArrayType, (union AnyValue *)&NNVect, FALSE); + VariableDefinePlatformVar(NULL, "blobcnt", &IntType, (union AnyValue *)&Blobcnt, FALSE); + VariableDefinePlatformVar(NULL, "blobx1", &IntType, (union AnyValue *)&Blobx1, FALSE); + VariableDefinePlatformVar(NULL, "blobx2", &IntType, (union AnyValue *)&Blobx2, FALSE); + VariableDefinePlatformVar(NULL, "bloby1", &IntType, (union AnyValue *)&Bloby1, FALSE); + VariableDefinePlatformVar(NULL, "bloby2", &IntType, (union AnyValue *)&Bloby2, FALSE); + VariableDefinePlatformVar(NULL, "lcount", &IntType, (union AnyValue *)&Elcount, FALSE); + VariableDefinePlatformVar(NULL, "rcount", &IntType, (union AnyValue *)&Ercount, FALSE); + VariableDefinePlatformVar(NULL, "y1", &IntType, (union AnyValue *)&Iy1, FALSE); + VariableDefinePlatformVar(NULL, "y2", &IntType, (union AnyValue *)&Iy2, FALSE); + VariableDefinePlatformVar(NULL, "u1", &IntType, (union AnyValue *)&Iu1, FALSE); + VariableDefinePlatformVar(NULL, "u2", &IntType, (union AnyValue *)&Iu2, FALSE); + VariableDefinePlatformVar(NULL, "v1", &IntType, (union AnyValue *)&Iv1, FALSE); + VariableDefinePlatformVar(NULL, "v2", &IntType, (union AnyValue *)&Iv2, FALSE); + VariableDefinePlatformVar(NULL, "gpslat", &IntType, (union AnyValue *)&GPSlat, FALSE); + VariableDefinePlatformVar(NULL, "gpslon", &IntType, (union AnyValue *)&GPSlon, FALSE); + VariableDefinePlatformVar(NULL, "gpsalt", &IntType, (union AnyValue *)&GPSalt, FALSE); + VariableDefinePlatformVar(NULL, "gpsfix", &IntType, (union AnyValue *)&GPSfix, FALSE); + VariableDefinePlatformVar(NULL, "gpssat", &IntType, (union AnyValue *)&GPSsat, FALSE); + VariableDefinePlatformVar(NULL, "gpsutc", &IntType, (union AnyValue *)&GPSutc, FALSE); +} + +void Csignal(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) // check for kbhit, return t or nil +{ + if (getsignal()) + ReturnValue->Val->Integer = 1; + else + ReturnValue->Val->Integer = 0; +} + +void Cinput(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) // return 0-9 from console input +{ + ReturnValue->Val->Integer = getch(); +} + +void Cdelay(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + int del; + + del = Param[0]->Val->Integer; + if ((del < 0) || (del > 1000000)) + return; + delayMS(del); +} + +void Crand(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = (int)rand() % (unsigned int)(Param[0]->Val->Integer + 1); +} + +void Ctime(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = (int)readRTC(); +} + +void Ciodir(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + int dir; + + dir = Param[0]->Val->Integer; + *pPORTHIO_DIR = ((dir << 10) & 0xFC00) + (*pPORTHIO_DIR & 0x03FF); // H15/14/13/12/11/10 - 1=output, 0=input + *pPORTHIO_INEN = (((~dir) << 10) & 0xFC00) + (*pPORTHIO_INEN & 0x03FF); // invert dir bits to enable inputs +} + +void Cioread(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = (*pPORTHIO >> 10) & 0x003F; +} + +void Ciowrite(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + *pPORTHIO = ((Param[0]->Val->Integer << 10) & 0xFC00) + (*pPORTHIO & 0x03FF); +} + +void Cpeek(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + int size, ptr; + unsigned char *cp; + unsigned short *sp; + unsigned int *ip; + + /* x = peek(addr, size); + mask ptr to align with word size */ + ptr = Param[0]->Val->Integer; + size = Param[1]->Val->Integer; + switch (size) { + case 1: // char * + cp = (unsigned char *)ptr; + ReturnValue->Val->Integer = (int)((unsigned int)*cp); + break; + case 2: // short * + sp = (unsigned short *)(ptr & 0xFFFFFFFE); // align with even boundary + ReturnValue->Val->Integer = (int)((unsigned short)*sp); + break; + case 4: // int * + ip = (unsigned int *)(ptr & 0xFFFFFFFC); // aling with quad boundary + ReturnValue->Val->Integer = (int)*ip; + break; + default: + ReturnValue->Val->Integer = 0; + break; + } +} + +void Cpoke(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + int size, ptr, val; + unsigned char *cp; + unsigned short *sp; + unsigned int *ip; + + /* x = poke(addr, size, val); + mask ptr to align with word size */ + ptr = Param[0]->Val->Integer; + size = Param[1]->Val->Integer; + val = Param[2]->Val->Integer; + switch (size) { + case 1: // char * + cp = (unsigned char *)ptr; + *cp = (unsigned char)(val & 0x000000FF); + break; + case 2: // short * + sp = (unsigned short *)(ptr & 0xFFFFFFFE); + *sp = (unsigned short)(val & 0x0000FFFF); + break; + case 4: // int * + ip = (unsigned int *)(ptr & 0xFFFFFFFC); + *ip = val; + break; + default: // don't bother with bad value + break; + } +} + +void Cencoders(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + unsigned int ix; + + ix = encoders(); // read left and right encoders; save data to C globals lcount, rcount + Elcount = (ix >> 16) & 0x0000FFFF; + Ercount = ix & 0x0000FFFF; +} + +void Cmotors(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + lspeed = Param[0]->Val->Integer; + if ((lspeed < -100) || (lspeed > 100)) + ProgramFail(NULL, "motors(): left motor value out of range"); + rspeed = Param[1]->Val->Integer; + if ((rspeed < -100) || (rspeed > 100)) + ProgramFail(NULL, "motors(): right motor value out of range"); + if (!pwm1_init) { + initPWM(); + pwm1_init = 1; + pwm1_mode = PWM_PWM; + base_speed = 50; + } + setPWM(lspeed, rspeed); +} + +void Cmotors2(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + lspeed2 = Param[0]->Val->Integer; + if ((lspeed2 < -100) || (lspeed2 > 100)) + ProgramFail(NULL, "motors2(): left motor value out of range"); + rspeed2 = Param[1]->Val->Integer; + if ((rspeed2 < -100) || (rspeed2 > 100)) + ProgramFail(NULL, "motors2(): right motor value out of range"); + if (!pwm2_init) { + initPWM2(); + pwm2_init = 1; + pwm2_mode = PWM_PWM; + base_speed2 = 50; + } + setPWM2(lspeed2, rspeed2); +} + +void Cservos(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + int lspeed, rspeed; + + lspeed = Param[0]->Val->Integer; + if ((lspeed < 0) || (lspeed > 100)) + ProgramFail(NULL, "servos(): TMR2 value out of range"); + rspeed = Param[1]->Val->Integer; + if ((rspeed < 0) || (rspeed > 100)) + ProgramFail(NULL, "servos()(): TMR3 value out of range"); + if (!pwm1_init) { + initPPM1(); + pwm1_init = 1; + pwm1_mode = PWM_PPM; + } + setPPM1(lspeed, rspeed); +} + +void Cservos2(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + int lspeed, rspeed; + + lspeed = Param[0]->Val->Integer; + if ((lspeed < 0) || (lspeed > 100)) + ProgramFail(NULL, "servos2(): TMR6 value out of range"); + rspeed = Param[1]->Val->Integer; + if ((rspeed < 0) || (rspeed > 100)) + ProgramFail(NULL, "servos2(): TMR7 value out of range"); + if (!pwm2_init) { + initPPM2(); + pwm2_init = 1; + pwm2_mode = PWM_PPM; + } + setPPM2(lspeed, rspeed); +} + +void Claser(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) // laser(1) turns them on, laser(0) turns them off +{ + *pPORTHIO &= 0xFD7F; // turn off both lasers + switch (Param[0]->Val->Integer) { + case 1: + *pPORTHIO |= 0x0080; // turn on left laser + break; + case 2: + *pPORTHIO |= 0x0200; // turn on right laser + break; + case 3: + *pPORTHIO |= 0x0280; // turn on both lasers + break; + } +} + +void Csonar(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) // read sonar module +{ + unsigned int i; + i = Param[0]->Val->Integer; + if ((i<1) || (i>4)) { + ProgramFail(NULL, "sonar(): 1, 2, 3, 4 are only valid selections"); + } + sonar(); + ReturnValue->Val->Integer = sonar_data[i] / 100; +} + +void Crange(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = laser_range(0); +} + +void Cbattery(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + if (*pPORTHIO & 0x0004) + ReturnValue->Val->Integer = 0; // low battery voltage detected + else + ReturnValue->Val->Integer = 1; // battery voltage okay +} + +void Cvcolor(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) // set color bin - + // vcolor (color, ymin, ymax, umin, umax, vmin, vmax); +{ + int ix; + + ix = Param[0]->Val->Integer; + ymin[ix] = Param[1]->Val->Integer; + ymax[ix] = Param[2]->Val->Integer; + umin[ix] = Param[3]->Val->Integer; + umax[ix] = Param[4]->Val->Integer; + vmin[ix] = Param[5]->Val->Integer; + vmax[ix] = Param[6]->Val->Integer; +} + +void Cvcam(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) // set camera functions - + // enable/disable AGC(4) / AWB(2) / AEC(1) camera controls + // vcam(7) = AGC+AWB+AEC on vcam(0) = AGC+AWB+AEC off +{ + unsigned char cx, i2c_data[2]; + + cx = (unsigned char)Param[0]->Val->Integer & 0x07; + i2c_data[0] = 0x13; + i2c_data[1] = 0xC0 + cx; + i2cwrite(0x30, (unsigned char *)i2c_data, 1, SCCB_ON); // OV9655 + i2cwrite(0x21, (unsigned char *)i2c_data, 1, SCCB_ON); // OV7725 +} + +void Cvfind(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) // set color bin - + // vfind (color, x1, x2, y1, y2); +{ + int ix, x1, x2, y1, y2; + + ix = Param[0]->Val->Integer; + x1 = Param[1]->Val->Integer; + x2 = Param[2]->Val->Integer; + y1 = Param[3]->Val->Integer; + y2 = Param[4]->Val->Integer; + ReturnValue->Val->Integer = vfind((unsigned char *)FRAME_BUF, ix, x1, x2, y1, y2); +} + +void Cvcap(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + grab_frame(); // capture frame for processing +} + +void Cvrcap(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + grab_reference_frame(); // capture reference frame for differencing +} + +void Cvdiff(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + frame_diff_flag = Param[0]->Val->Integer; // set/clear frame_diff_flag +} + +void Cvpix(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + int x, y, ix; + x = Param[0]->Val->Integer; + y = Param[1]->Val->Integer; + ix = vpix((unsigned char *)FRAME_BUF, x, y); + Iy1 = ((ix>>16) & 0x000000FF); // Y1 + Iu1 = ((ix>>24) & 0x000000FF); // U + Iv1 = ((ix>>8) & 0x000000FF); // V +} + +void Cvscan(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + int col, thresh, ix; + col = Param[0]->Val->Integer; + if ((col < 1) || (col > 9)) + ProgramFail(NULL, "vscan(): number of columns must be between 1 and 9"); + thresh = Param[1]->Val->Integer; + if ((thresh < 0) || (thresh > 9999)) + ProgramFail(NULL, "vscan(): threshold must be between 0 and 9999"); + ix = vscan((unsigned char *)SPI_BUFFER1, (unsigned char *)FRAME_BUF, thresh, (unsigned int)col, (unsigned int *)&ScanVect[0]); + ReturnValue->Val->Integer = ix; +} + +void Cvmean(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + vmean((unsigned char *)FRAME_BUF); + Iy1 = mean[0]; + Iu1 = mean[1]; + Iv1 = mean[2]; +} + +// search for blob by color, index; return center point X,Y and width Z +void Cvblob(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + int ix, iblob, numblob; + + ix = Param[0]->Val->Integer; + if (ix > MAX_COLORS) + ProgramFail(NULL, "blob(): invalid color index"); + iblob = Param[1]->Val->Integer; + if (iblob > MAX_BLOBS) + ProgramFail(NULL, "blob(): invalid blob index"); + + numblob = vblob((unsigned char *)FRAME_BUF, (unsigned char *)FRAME_BUF3, ix); + + if ((blobcnt[iblob] == 0) || (numblob == -1)) { + Blobcnt = 0; + } else { + Blobcnt = blobcnt[iblob]; + Blobx1 = blobx1[iblob]; + Blobx2 = blobx2[iblob]; + Bloby1 = bloby1[iblob]; + Bloby2 = bloby2[iblob]; + } + ReturnValue->Val->Integer = numblob; +} + +void Cvjpeg (struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + unsigned int image_size, qual; + unsigned char *output_start, *output_end; + + qual = Param[0]->Val->Integer; + if ((qual < 1) || (qual > 8)) + ProgramFail(NULL, "vjpeg(): quality parameter out of range"); + + output_start = (unsigned char *)JPEG_BUF; + output_end = encode_image((unsigned char *)FRAME_BUF, output_start, qual, + FOUR_TWO_TWO, imgWidth, imgHeight); + image_size = (unsigned int)(output_end - output_start); + + ReturnValue->Val->Integer = image_size; +} + +void Cvsend (struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + unsigned int ix, image_size; + unsigned char *cp; + + image_size = Param[0]->Val->Integer; + if ((image_size < 0) || (image_size > 200000)) + ProgramFail(NULL, "vsend(): image size out of range"); + + led1_on(); + + cp = (unsigned char *)JPEG_BUF; + for (ix=0; ixVal->Integer = ix; +} + +void Ctilt(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) // return reading from HMC6352 I2C compass +{ + unsigned int ix; + + ix = (unsigned int)Param[0]->Val->Integer; + if ((ix<1) || (ix>3)) + ProgramFail(NULL, "tilt(): invalid channel"); + ReturnValue->Val->Integer = tilt(ix); +} + +void Canalog(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) // return reading from HMC6352 I2C compass +{ + unsigned char i2c_data[3], device_id; + unsigned int ix, channel; + unsigned char mask1[] = { 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x08 }; + unsigned char mask2[] = { 0x10, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00 }; + + // decide which i2c device based on channel range + ix = (unsigned char)Param[0]->Val->Integer; + if ((ix<1) || (ix>28)) + ProgramFail(NULL, "analog(): invalid channel"); + device_id = 0; + switch (ix / 10) { + case 0: + device_id = 0x20; // channels 1-8 + break; + case 1: + device_id = 0x23; // channels 11-18 + break; + case 2: + device_id = 0x24; // channels 21-28 + break; + } + channel = ix % 10; + if ((channel<1) || (channel>8)) + ProgramFail(NULL, "analog(): invalid channel"); + + // set timer register 3 + i2c_data[0] = 0x03; + i2c_data[1] = 0x01; + i2cwrite(device_id, (unsigned char *)i2c_data, 1, SCCB_ON); + + // set analog channel + i2c_data[0] = 0x02; + i2c_data[1] = mask1[channel-1]; + i2c_data[2] = mask2[channel-1]; + i2cwritex(device_id, (unsigned char *)i2c_data, 3, SCCB_ON); + + // small delay + delayUS(1000); + + // read data + i2c_data[0] = 0x00; + i2cread(device_id, (unsigned char *)i2c_data, 2, SCCB_ON); + ix = (((i2c_data[0] & 0x0F) << 8) + i2c_data[1]); + ReturnValue->Val->Integer = ix; +} + +void Cgps(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + gps_parse(); + GPSlat = gps_gga.lat; + GPSlon = gps_gga.lon; + GPSalt = gps_gga.alt; + GPSfix = gps_gga.fix; + GPSsat = gps_gga.sat; + GPSutc = gps_gga.utc; +} + +void Creadi2c(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) // syntax val = readi2c(device, register); +{ + unsigned char i2c_device, i2c_data[2]; + + i2c_device = (unsigned char)Param[0]->Val->Integer; + i2c_data[0] = (unsigned char)Param[1]->Val->Integer; + + i2cread(i2c_device, (unsigned char *)i2c_data, 1, SCCB_OFF); + ReturnValue->Val->Integer = ((int)i2c_data[0] & 0x000000FF); +} + +void Creadi2c2(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) // syntax two_byte_val = readi2c(device, register); +{ + unsigned char i2c_device, i2c_data[2]; + + i2c_device = (unsigned char)Param[0]->Val->Integer; + i2c_data[0] = (unsigned char)Param[1]->Val->Integer; + + i2cread(i2c_device, (unsigned char *)i2c_data, 2, SCCB_OFF); + ReturnValue->Val->Integer = (((unsigned int)i2c_data[0] << 8) + i2c_data[1]); +} + +void Cwritei2c(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) // syntax writei2c(device, register, value); +{ + unsigned char i2c_device, i2c_data[2]; + + i2c_device = (unsigned char)Param[0]->Val->Integer; + i2c_data[0] = (unsigned char)Param[1]->Val->Integer; + i2c_data[1] = (unsigned char)Param[2]->Val->Integer; + + i2cwrite(i2c_device, (unsigned char *)i2c_data, 1, SCCB_OFF); +} + +void Csin(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) // sin(angle) +{ + int ix; + + ix = Param[0]->Val->Integer; // input to function is angle in degrees + ReturnValue->Val->Integer = sin(ix); +} + +void Ccos(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) // cos(angle) +{ + int ix; + + ix = Param[0]->Val->Integer; // input to function is angle in degrees + ReturnValue->Val->Integer = cos(ix); +} + +void Ctan(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) // tan(angle) +{ + int ix; + + ix = Param[0]->Val->Integer; // input to function is angle in degrees + ReturnValue->Val->Integer = tan(ix); +} + +void Casin(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) // asin(y,hyp) +{ + int y, hyp; + y = Param[0]->Val->Integer; + hyp = Param[1]->Val->Integer; + if (y > hyp) + ProgramFail(NULL, "asin(): opposite greater than hypotenuse"); + ReturnValue->Val->Integer = asin(y, hyp); +} + +void Cacos(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) // acos(x,hyp) +{ + int x, hyp; + x = Param[0]->Val->Integer; + hyp = Param[1]->Val->Integer; + if (x > hyp) + ProgramFail(NULL, "acos(): adjacent greater than hypotenuse"); + ReturnValue->Val->Integer = acos(x, hyp); +} + +void Catan(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) // atan(y,x) +{ + int x ,y; + y = Param[0]->Val->Integer; + x = Param[1]->Val->Integer; + ReturnValue->Val->Integer = atan(y, x); +} + +void Cgps_head(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) // gps_head(lat1, lon1, lat2, lon2) +{ + int lat1, lon1, lat2, lon2; + lat1 = Param[0]->Val->Integer; + lon1 = Param[1]->Val->Integer; + lat2 = Param[2]->Val->Integer; + lon2 = Param[3]->Val->Integer; + ReturnValue->Val->Integer = gps_head(lat1, lon1, lat2, lon2); +} + +void Cgps_dist(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) // gps_dist(lat1, lon1, lat2, lon2) +{ + int lat1, lon1, lat2, lon2; + lat1 = Param[0]->Val->Integer; + lon1 = Param[1]->Val->Integer; + lat2 = Param[2]->Val->Integer; + lon2 = Param[3]->Val->Integer; + ReturnValue->Val->Integer = gps_dist(lat1, lon1, lat2, lon2); +} + +void Csqrt(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) // sqrt(x) +{ + int x; + x = Param[0]->Val->Integer; + ReturnValue->Val->Integer = isqrt(x); +} + +void Cnnset(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + int ix, i1; + + ix = Param[0]->Val->Integer; + if (ix > NUM_NPATTERNS) + ProgramFail(NULL, "nnset(): invalid index"); + for (i1=0; i1<8; i1++) + npattern[ix*8 + i1] = (unsigned char)Param[i1+1]->Val->Integer; +} + +void Cnnshow(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + int ix; + + ix = Param[0]->Val->Integer; + if (ix > NUM_NPATTERNS) + ProgramFail(NULL, "nnshow(): invalid index"); + nndisplay(ix); +} + +void Cnninit(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + nninit_network(); +} + +void Cnntrain(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + int ix, i1; + + nntrain_network(10000); + for (ix=0; ixVal->Integer; + for (i2=0; i2<8; i2++) { + if (ch & nmask[i2]) + N_IN(ix++) = 1024; + else + N_IN(ix++) = 0; + } + } + nncalculate_network(); + ix = 0; + max = 0; + for (i1=0; i1Val->Integer = ix; +} + +void Cnnmatchblob(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + int ix, i1, max; + + ix = Param[0]->Val->Integer; + if (ix > MAX_BLOBS) + ProgramFail(NULL, "nnmatchblob(): invalid blob index"); + if (!blobcnt[ix]) + ProgramFail(NULL, "nnmatchblob(): not a valid blob"); + /* use data still in blob_buf[] (FRAME_BUF3) + square the aspect ratio of x1, x2, y1, y2 + then subsample blob pixels to populate N_IN(0:63) with 0:1024 values + then nncalculate_network() and display the N_OUT() results */ + nnscale8x8((unsigned char *)FRAME_BUF3, blobix[ix], blobx1[ix], blobx2[ix], + bloby1[ix], bloby2[ix], imgWidth, imgHeight); + nncalculate_network(); + ix = 0; + max = 0; + for (i1=0; i1Val->Integer = ix; +} + +void Cnnlearnblob (struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + int ix; + + ix = Param[0]->Val->Integer; + if (ix > NUM_NPATTERNS) + ProgramFail(NULL, "nnlearnblob(): invalid index"); + if (!blobcnt[0]) + ProgramFail(NULL, "nnlearnblob(): no blob to grab"); + nnscale8x8((unsigned char *)FRAME_BUF3, blobix[0], blobx1[0], blobx2[0], + bloby1[0], bloby2[0], imgWidth, imgHeight); + nnpack8x8(ix); + nndisplay(ix); +} + +void Cautorun (struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + int ix, t0; + unsigned char ch; + + ix = Param[0]->Val->Integer; + t0 = readRTC(); + while (readRTC() < (t0 + ix*1000)) { // watch for ESC in 'ix' seconds + if (getchar(&ch)) { + if (ch == 0x1B) { // if ESC found, exit picoC + printf("found ESC\r\n"); + ExitBuf[40] = 1; + longjmp(ExitBuf, 1); + } + } + } +} + +void Clineno (struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = Parser->Line; +} + +void Cerrormsg (struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + PlatformErrorPrefix(Parser); + LibPrintf(Parser, ReturnValue, Param, NumArgs); +} + +/* nothing here because we don't add any functions until srv1.h is #included */ +struct LibraryFunction PlatformLibrary[] = +{ + { NULL, NULL } +}; + +/* list of all library functions included with srv1.h */ +struct LibraryFunction SRV1Functions[] = +{ + { Csignal, "int signal();" }, + { Cinput, "int input();" }, + { Cdelay, "void delay(int);" }, + { Crand, "int rand(int);" }, + { Ctime, "int time();" }, + { Ciodir, "void iodir(int);" }, + { Cioread, "int ioread();" }, + { Ciowrite, "void iowrite(int);" }, + { Cpeek, "int peek(int, int);" }, + { Cpoke, "void poke(int, int, int);" }, + { Cmotors, "void motors(int, int);" }, + { Cmotors2, "void motors2(int, int);" }, + { Cservos, "void servos(int, int);" }, + { Cservos2, "void servos2(int, int);" }, + { Cencoders, "void encoders();" }, + { Claser, "void laser(int);" }, + { Csonar, "int sonar(int);" }, + { Crange, "int range();" }, + { Cbattery, "int battery();" }, + { Cvcolor, "void vcolor(int, int, int, int, int, int, int);" }, + { Cvfind, "int vfind(int, int, int, int, int);" }, + { Cvcam, "void vcam(int);" }, + { Cvcap, "void vcap();" }, + { Cvrcap, "void vrcap();" }, + { Cvdiff, "void vdiff(int);" }, + { Cvpix, "void vpix(int, int);" }, + { Cvscan, "int vscan(int, int);" }, + { Cvmean, "void vmean();" }, + { Cvblob, "int vblob(int, int);" }, + { Cvjpeg, "int vjpeg(int);" }, + { Cvsend, "void vsend(int);" }, + { Ccompass, "int compass();" }, + { Canalog, "int analog(int);" }, + { Ctilt, "int tilt(int);" }, + { Cgps, "void gps();" }, + { Creadi2c, "int readi2c(int, int);" }, + { Creadi2c2, "int readi2c2(int, int);" }, + { Cwritei2c, "void writei2c(int, int, int);" }, + { Csin, "int sin(int);" }, + { Ccos, "int cos(int);" }, + { Ctan, "int tan(int);" }, + { Casin, "int asin(int, int);" }, + { Cacos, "int acos(int, int);" }, + { Catan, "int atan(int, int);" }, + { Cgps_head, "int gps_head(int, int, int, int);" }, + { Cgps_dist, "int gps_dist(int, int, int, int);" }, + { Csqrt, "int sqrt(int);" }, + { Cnnshow, "void nnshow(int);" }, + { Cnnset, "void nnset(int, int, int, int, int, int, int, int, int);" }, + { Cnninit, "void nninit();" }, + { Cnntrain, "void nntrain();" }, + { Cnntest, "int nntest(int, int, int, int, int, int, int, int);" }, + { Cnnmatchblob, "int nnmatchblob(int);" }, + { Cnnlearnblob, "void nnlearnblob(int);" }, + { Cautorun, "void autorun(int);" }, + { Clineno, "int lineno();" }, + { Cerrormsg, "void errormsg(char *);" }, + { NULL, NULL } +}; + +void PlatformLibraryInit() +{ + IncludeRegister("srv1.h", &SRV1SetupFunc, &SRV1Functions[0], NULL); +} diff --git a/src/platform/library_surveyor.c b/src/platform/library_surveyor.c new file mode 100644 index 0000000..283aff2 --- /dev/null +++ b/src/platform/library_surveyor.c @@ -0,0 +1,944 @@ +#include "../interpreter.h" +#include "../picoc.h" + +static int Blobcnt, Blobx1, Blobx2, Bloby1, Bloby2, Iy1, Iy2, Iu1, Iu2, Iv1, Iv2; +static int Cxmin, Cxmax, Cymin, Cymax; +static int GPSlat, GPSlon, GPSalt, GPSfix, GPSsat, GPSutc, Elcount, Ercount; +static int ScanVect[16], NNVect[NUM_OUTPUT]; + +void PlatformLibraryInit() +{ + struct ValueType *IntArrayType; + + IntArrayType = TypeGetMatching(NULL, &IntType, TypeArray, 16, StrEmpty, TRUE); + VariableDefinePlatformVar(NULL, "scanvect", IntArrayType, (union AnyValue *)&ScanVect, FALSE); + VariableDefinePlatformVar(NULL, "neuron", IntArrayType, (union AnyValue *)&NNVect, FALSE); + VariableDefinePlatformVar(NULL, "xbuf", CharArrayType, (union AnyValue *)&xbuff, FALSE); + VariableDefinePlatformVar(NULL, "blobcnt", &IntType, (union AnyValue *)&Blobcnt, FALSE); + VariableDefinePlatformVar(NULL, "blobx1", &IntType, (union AnyValue *)&Blobx1, FALSE); + VariableDefinePlatformVar(NULL, "blobx2", &IntType, (union AnyValue *)&Blobx2, FALSE); + VariableDefinePlatformVar(NULL, "bloby1", &IntType, (union AnyValue *)&Bloby1, FALSE); + VariableDefinePlatformVar(NULL, "bloby2", &IntType, (union AnyValue *)&Bloby2, FALSE); + VariableDefinePlatformVar(NULL, "lcount", &IntType, (union AnyValue *)&Elcount, FALSE); + VariableDefinePlatformVar(NULL, "rcount", &IntType, (union AnyValue *)&Ercount, FALSE); + VariableDefinePlatformVar(NULL, "y1", &IntType, (union AnyValue *)&Iy1, FALSE); + VariableDefinePlatformVar(NULL, "y2", &IntType, (union AnyValue *)&Iy2, FALSE); + VariableDefinePlatformVar(NULL, "u1", &IntType, (union AnyValue *)&Iu1, FALSE); + VariableDefinePlatformVar(NULL, "u2", &IntType, (union AnyValue *)&Iu2, FALSE); + VariableDefinePlatformVar(NULL, "v1", &IntType, (union AnyValue *)&Iv1, FALSE); + VariableDefinePlatformVar(NULL, "v2", &IntType, (union AnyValue *)&Iv2, FALSE); + VariableDefinePlatformVar(NULL, "gpslat", &IntType, (union AnyValue *)&GPSlat, FALSE); + VariableDefinePlatformVar(NULL, "gpslon", &IntType, (union AnyValue *)&GPSlon, FALSE); + VariableDefinePlatformVar(NULL, "gpsalt", &IntType, (union AnyValue *)&GPSalt, FALSE); + VariableDefinePlatformVar(NULL, "gpsfix", &IntType, (union AnyValue *)&GPSfix, FALSE); + VariableDefinePlatformVar(NULL, "gpssat", &IntType, (union AnyValue *)&GPSsat, FALSE); + VariableDefinePlatformVar(NULL, "gpsutc", &IntType, (union AnyValue *)&GPSutc, FALSE); + VariableDefinePlatformVar(NULL, "cxmin", &IntType, (union AnyValue *)&Cxmin, FALSE); + VariableDefinePlatformVar(NULL, "cxmax", &IntType, (union AnyValue *)&Cxmax, FALSE); + VariableDefinePlatformVar(NULL, "cymin", &IntType, (union AnyValue *)&Cymin, FALSE); + VariableDefinePlatformVar(NULL, "cymax", &IntType, (union AnyValue *)&Cymax, FALSE); + LibraryAdd(&GlobalTable, "platform library", &PlatformLibrary[0]); +} + +void Csignal(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) // check for kbhit, return t or nil +{ + ReturnValue->Val->Integer = getsignal(); +} + +void Csignal1(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) // check for kbhit, return t or nil +{ + ReturnValue->Val->Integer = uart1Signal(); +} + +void Cinput(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) // return 0-9 from console input +{ + ReturnValue->Val->Integer = getch(); +} + +void Cinput1(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) // return 0-9 from console input +{ + ReturnValue->Val->Integer = uart1GetCh(); +} + +void Cread_int(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) // return 0-9 from console input +{ + int ix, sign; + unsigned char ch; + + ix = 0; + sign = 1; + while (1) { + ch = getch(); + if (ch == '-') { + sign = -1; + continue; + } + if ((ch < '0') || (ch > '9')) { // if not '-' or 0-9, we're done + ReturnValue->Val->Integer = ix * sign; + return; + } + ix = (ix * 10) + (ch & 0x0F); + } +} + +void Cread_str(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) // read string from console +{ + int ix; + unsigned char ch; + + ix = 0; + char *cp = (char *)Param[0]->Val->Pointer; + while (1) { + ch = getch(); + cp[ix++] = ch; + if ((ch == 0) || (ch == 0x01)) { // null or ctrl-A + ix--; + cp[ix] = 0; + break; + } + if (ix > 1023) { + cp[ix] = 0; + ix--; + break; + } + } + ReturnValue->Val->Integer = ix; +} + +void Cinit_uart1(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) // return 0-9 from console input +{ + int ii; + ii = Param[0]->Val->Integer; // ii = baudrate for uart1 + init_uart1(ii); +} + +void Coutput(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) // return 0-9 from console input +{ + int ch; + ch = Param[0]->Val->Integer; + putchar((unsigned char)ch); +} + +void Coutput1(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) // return 0-9 from console input +{ + int ch; + ch = Param[0]->Val->Integer; + uart1SendChar((unsigned char)ch); +} + +void Cdelay(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + int del; + + del = Param[0]->Val->Integer; + if ((del < 0) || (del > 1000000)) + return; + delayMS(del); +} + +void Crand(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = (int)rand() % (unsigned int)(Param[0]->Val->Integer + 1); +} + +void Ctime(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = (int)readRTC(); +} + +void Ciodir(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + int dir; + + dir = Param[0]->Val->Integer; + *pPORTHIO_DIR = ((dir << 10) & 0xFC00) + (*pPORTHIO_DIR & 0x03FF); // H15/14/13/12/11/10 - 1=output, 0=input + *pPORTHIO_INEN = (((~dir) << 10) & 0xFC00) + (*pPORTHIO_INEN & 0x03FF); // invert dir bits to enable inputs +} + +void Cioread(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = (*pPORTHIO >> 10) & 0x003F; +} + +void Ciowrite(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + *pPORTHIO = ((Param[0]->Val->Integer << 10) & 0xFC00) + (*pPORTHIO & 0x03FF); +} + +void Cpeek(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + int size, ptr; + unsigned char *cp; + unsigned short *sp; + unsigned int *ip; + + /* x = peek(addr, size); + mask ptr to align with word size */ + ptr = Param[0]->Val->Integer; + size = Param[1]->Val->Integer; + switch (size) { + case 1: // char * + cp = (unsigned char *)ptr; + ReturnValue->Val->Integer = (int)((unsigned int)*cp); + break; + case 2: // short * + sp = (unsigned short *)(ptr & 0xFFFFFFFE); // align with even boundary + ReturnValue->Val->Integer = (int)((unsigned short)*sp); + break; + case 4: // int * + ip = (unsigned int *)(ptr & 0xFFFFFFFC); // aling with quad boundary + ReturnValue->Val->Integer = (int)*ip; + break; + default: + ReturnValue->Val->Integer = 0; + break; + } +} + +void Cpoke(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + int size, ptr, val; + unsigned char *cp; + unsigned short *sp; + unsigned int *ip; + + /* x = poke(addr, size, val); + mask ptr to align with word size */ + ptr = Param[0]->Val->Integer; + size = Param[1]->Val->Integer; + val = Param[2]->Val->Integer; + switch (size) { + case 1: // char * + cp = (unsigned char *)ptr; + *cp = (unsigned char)(val & 0x000000FF); + break; + case 2: // short * + sp = (unsigned short *)(ptr & 0xFFFFFFFE); + *sp = (unsigned short)(val & 0x0000FFFF); + break; + case 4: // int * + ip = (unsigned int *)(ptr & 0xFFFFFFFC); + *ip = val; + break; + default: // don't bother with bad value + break; + } +} + +void Cencoders(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + unsigned int ix; + + ix = encoders(); // read left and right encoders; save data to C globals lcount, rcount + Elcount = (ix >> 16) & 0x0000FFFF; + Ercount = ix & 0x0000FFFF; +} + +void Cencoderx(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) // return reading from HMC6352 I2C compass +{ + int ix; + + ix = (unsigned char)Param[0]->Val->Integer; + if ((ix<0) || (ix>7)) + ProgramFail(NULL, "encoderx(): invalid channel"); + ReturnValue->Val->Integer = encoder_4wd(ix); +} + +void Cmotors(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + lspeed = Param[0]->Val->Integer; + if ((lspeed < -100) || (lspeed > 100)) + ProgramFail(NULL, "motors(): left motor value out of range"); + rspeed = Param[1]->Val->Integer; + if ((rspeed < -100) || (rspeed > 100)) + ProgramFail(NULL, "motors(): right motor value out of range"); + if (!pwm1_init) { + initPWM(); + pwm1_init = 1; + pwm1_mode = PWM_PWM; + base_speed = 50; + } + setPWM(lspeed, rspeed); +} + +void Cmotors2(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + lspeed2 = Param[0]->Val->Integer; + if ((lspeed2 < -100) || (lspeed2 > 100)) + ProgramFail(NULL, "motors2(): left motor value out of range"); + rspeed2 = Param[1]->Val->Integer; + if ((rspeed2 < -100) || (rspeed2 > 100)) + ProgramFail(NULL, "motors2(): right motor value out of range"); + if (!pwm2_init) { + initPWM2(); + pwm2_init = 1; + pwm2_mode = PWM_PWM; + base_speed2 = 50; + } + setPWM2(lspeed2, rspeed2); +} + +/* motor control for SRV-4WD controller */ +void Cmotorx(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + unsigned char ch; + int ls, rs; + + ls = Param[0]->Val->Integer; + if ((ls < -100) || (ls > 100)) + ProgramFail(NULL, "motors(): left motor value out of range"); + ls = (ls * 127) / 100; // scale to full +/-127 range + rs = Param[1]->Val->Integer; + if ((rs < -100) || (rs > 100)) + ProgramFail(NULL, "motors(): right motor value out of range"); + rs = (rs * 127) / 100; // scale to full +/-127 range + if (xwd_init == 0) { + xwd_init = 1; + init_uart1(115200); + delayMS(10); + } + uart1SendChar('x'); + uart1SendChar((char)ls); + uart1SendChar((char)rs); + while (uart1GetChar(&ch)) // flush the receive buffer + continue; +} + +void Cservos(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + int lspeed, rspeed; + + lspeed = Param[0]->Val->Integer; + if ((lspeed < 0) || (lspeed > 100)) + ProgramFail(NULL, "servos(): TMR2 value out of range"); + rspeed = Param[1]->Val->Integer; + if ((rspeed < 0) || (rspeed > 100)) + ProgramFail(NULL, "servos()(): TMR3 value out of range"); + if (!pwm1_init) { + initPPM1(); + pwm1_init = 1; + pwm1_mode = PWM_PPM; + } + setPPM1(lspeed, rspeed); +} + +void Cservos2(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + int lspeed, rspeed; + + lspeed = Param[0]->Val->Integer; + if ((lspeed < 0) || (lspeed > 100)) + ProgramFail(NULL, "servos2(): TMR6 value out of range"); + rspeed = Param[1]->Val->Integer; + if ((rspeed < 0) || (rspeed > 100)) + ProgramFail(NULL, "servos2(): TMR7 value out of range"); + if (!pwm2_init) { + initPPM2(); + pwm2_init = 1; + pwm2_mode = PWM_PPM; + } + setPPM2(lspeed, rspeed); +} + +void Claser(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) // laser(1) turns them on, laser(0) turns them off +{ + *pPORTHIO &= 0xFD7F; // turn off both lasers + switch (Param[0]->Val->Integer) { + case 1: + *pPORTHIO |= 0x0080; // turn on left laser + break; + case 2: + *pPORTHIO |= 0x0200; // turn on right laser + break; + case 3: + *pPORTHIO |= 0x0280; // turn on both lasers + break; + } +} + +void Csonar(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) // read sonar module +{ + unsigned int i; + i = Param[0]->Val->Integer; + if ((i<1) || (i>4)) { + ProgramFail(NULL, "sonar(): 1, 2, 3, 4 are only valid selections"); + } + sonar(); + ReturnValue->Val->Integer = sonar_data[i] / 100; +} + +void Crange(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = laser_range(0); +} + +void Cbattery(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + if (*pPORTHIO & 0x0004) + ReturnValue->Val->Integer = 0; // low battery voltage detected + else + ReturnValue->Val->Integer = 1; // battery voltage okay +} + +void Cvcolor(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) // set color bin - + // vcolor (color, ymin, ymax, umin, umax, vmin, vmax); +{ + int ix; + + ix = Param[0]->Val->Integer; + ymin[ix] = Param[1]->Val->Integer; + ymax[ix] = Param[2]->Val->Integer; + umin[ix] = Param[3]->Val->Integer; + umax[ix] = Param[4]->Val->Integer; + vmin[ix] = Param[5]->Val->Integer; + vmax[ix] = Param[6]->Val->Integer; +} + +void Cvcam(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) // set camera functions - + // enable/disable AGC(4) / AWB(2) / AEC(1) camera controls + // vcam(7) = AGC+AWB+AEC on vcam(0) = AGC+AWB+AEC off +{ + unsigned char cx, i2c_data[2]; + + cx = (unsigned char)Param[0]->Val->Integer & 0x07; + i2c_data[0] = 0x13; + i2c_data[1] = 0xC0 + cx; + i2cwrite(0x30, (unsigned char *)i2c_data, 1, SCCB_ON); // OV9655 + i2cwrite(0x21, (unsigned char *)i2c_data, 1, SCCB_ON); // OV7725 +} + +void Cvfind(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) // set color bin - + // vfind (color, x1, x2, y1, y2); +{ + int ix, x1, x2, y1, y2; + + ix = Param[0]->Val->Integer; + x1 = Param[1]->Val->Integer; + x2 = Param[2]->Val->Integer; + y1 = Param[3]->Val->Integer; + y2 = Param[4]->Val->Integer; + ReturnValue->Val->Integer = vfind((unsigned char *)FRAME_BUF, ix, x1, x2, y1, y2); +} + +void Cvcap(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + grab_frame(); // capture frame for processing +} + +void Cvrcap(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + grab_reference_frame(); // capture reference frame for differencing +} + +void Cvdiff(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + frame_diff_flag = Param[0]->Val->Integer; // set/clear frame_diff_flag +} + +void Cvpix(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + int x, y, ix; + x = Param[0]->Val->Integer; + y = Param[1]->Val->Integer; + ix = vpix((unsigned char *)FRAME_BUF, x, y); + Iy1 = ((ix>>16) & 0x000000FF); // Y1 + Iu1 = ((ix>>24) & 0x000000FF); // U + Iv1 = ((ix>>8) & 0x000000FF); // V +} + +void Cvscan(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + int col, thresh, ix; + col = Param[0]->Val->Integer; + if ((col < 1) || (col > 9)) + ProgramFail(NULL, "vscan(): number of columns must be between 1 and 9"); + thresh = Param[1]->Val->Integer; + if ((thresh < 0) || (thresh > 9999)) + ProgramFail(NULL, "vscan(): threshold must be between 0 and 9999"); + ix = vscan((unsigned char *)SPI_BUFFER1, (unsigned char *)FRAME_BUF, thresh, (unsigned int)col, (unsigned int *)&ScanVect[0]); + ReturnValue->Val->Integer = ix; +} + +void Cvmean(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + vmean((unsigned char *)FRAME_BUF); + Iy1 = mean[0]; + Iu1 = mean[1]; + Iv1 = mean[2]; +} + +// search for blob by color, index; return center point X,Y and width Z +void Cvblob(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + int ix, iblob, numblob; + + ix = Param[0]->Val->Integer; + if (ix > MAX_COLORS) + ProgramFail(NULL, "blob(): invalid color index"); + iblob = Param[1]->Val->Integer; + if (iblob > MAX_BLOBS) + ProgramFail(NULL, "blob(): invalid blob index"); + + numblob = vblob((unsigned char *)FRAME_BUF, (unsigned char *)FRAME_BUF3, ix); + + if ((blobcnt[iblob] == 0) || (numblob == -1)) { + Blobcnt = 0; + } else { + Blobcnt = blobcnt[iblob]; + Blobx1 = blobx1[iblob]; + Blobx2 = blobx2[iblob]; + Bloby1 = bloby1[iblob]; + Bloby2 = bloby2[iblob]; + } + ReturnValue->Val->Integer = numblob; +} + +void Cvjpeg (struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + unsigned int image_size, qual; + unsigned char *output_start, *output_end; + + qual = Param[0]->Val->Integer; + if ((qual < 1) || (qual > 8)) + ProgramFail(NULL, "vjpeg(): quality parameter out of range"); + + output_start = (unsigned char *)JPEG_BUF; + output_end = encode_image((unsigned char *)FRAME_BUF, output_start, qual, + FOUR_TWO_TWO, imgWidth, imgHeight); + image_size = (unsigned int)(output_end - output_start); + + ReturnValue->Val->Integer = image_size; +} + +void Cvsend (struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + unsigned int ix, image_size; + unsigned char *cp; + + image_size = Param[0]->Val->Integer; + if ((image_size < 0) || (image_size > 200000)) + ProgramFail(NULL, "vsend(): image size out of range"); + + led1_on(); + + cp = (unsigned char *)JPEG_BUF; + for (ix=0; ixVal->Integer = ix; +} + +void Ccompassx(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) // return reading from HMC5843 I2C compass +{ + short x, y, z; + int ix; + + ix = (int)read_compass3x(&x, &y, &z); + Cxmin = cxmin; + Cxmax = cxmax; + Cymin = cymin; + Cymax = cymax; + ReturnValue->Val->Integer = ix; +} + +void Ccompassxcal(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) // return reading from HMC5843 I2C compass +{ + /* cxmin, cxmax, cymin, cymax */ + cxmin = Param[0]->Val->Integer; + cxmax = Param[1]->Val->Integer; + cymin = Param[2]->Val->Integer; + cymax = Param[3]->Val->Integer; + compass_continuous_calibration = Param[4]->Val->Integer; // continuous calibration: off = 0, on = 1 +} + +void Ctilt(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) // return reading from HMC6352 I2C compass +{ + unsigned int ix; + + ix = (unsigned int)Param[0]->Val->Integer; + if ((ix<1) || (ix>3)) + ProgramFail(NULL, "tilt(): invalid channel"); + ReturnValue->Val->Integer = tilt(ix); +} + +void Canalog(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) // return reading from HMC6352 I2C compass +{ + unsigned int ix, channel; + + ix = (unsigned char)Param[0]->Val->Integer; + if ((ix<1) || (ix>28)) + ProgramFail(NULL, "analog(): invalid channel"); + channel = ix % 10; + if ((channel<1) || (channel>8)) + ProgramFail(NULL, "analog(): invalid channel"); + ReturnValue->Val->Integer = analog(ix); +} + + +/* read analog channel 0-7 from SRV-4WD ( + channel 0 = battery level + channel 1 = 5V gyro + channel 2 = 3.3V gyro + channel 3 = IR1 + channel 4 = IR2 + channel 6 = IR3 + channel 7 = IR4 + */ +void Canalogx(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) // return reading from HMC6352 I2C compass +{ + int ix; + + ix = (unsigned char)Param[0]->Val->Integer; + if ((ix<0) || (ix>7)) + ProgramFail(NULL, "analogx(): invalid channel"); + ReturnValue->Val->Integer = analog_4wd(ix); +} + +void Cgps(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + gps_parse(); + GPSlat = gps_gga.lat; + GPSlon = gps_gga.lon; + GPSalt = gps_gga.alt; + GPSfix = gps_gga.fix; + GPSsat = gps_gga.sat; + GPSutc = gps_gga.utc; +} + +void Creadi2c(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) // syntax val = readi2c(device, register); +{ + unsigned char i2c_device, i2c_data[2]; + + i2c_device = (unsigned char)Param[0]->Val->Integer; + i2c_data[0] = (unsigned char)Param[1]->Val->Integer; + + i2cread(i2c_device, (unsigned char *)i2c_data, 1, SCCB_OFF); + ReturnValue->Val->Integer = ((int)i2c_data[0] & 0x000000FF); +} + +void Creadi2c2(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) // syntax two_byte_val = readi2c(device, register); +{ + unsigned char i2c_device, i2c_data[2]; + + i2c_device = (unsigned char)Param[0]->Val->Integer; + i2c_data[0] = (unsigned char)Param[1]->Val->Integer; + + i2cread(i2c_device, (unsigned char *)i2c_data, 2, SCCB_OFF); + ReturnValue->Val->Integer = (((unsigned int)i2c_data[0] << 8) + i2c_data[1]); +} + +void Cwritei2c(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) // syntax writei2c(device, register, value); +{ + unsigned char i2c_device, i2c_data[2]; + + i2c_device = (unsigned char)Param[0]->Val->Integer; + i2c_data[0] = (unsigned char)Param[1]->Val->Integer; + i2c_data[1] = (unsigned char)Param[2]->Val->Integer; + + i2cwrite(i2c_device, (unsigned char *)i2c_data, 1, SCCB_OFF); +} + +void Cabs(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) // abs(int) +{ + int ix; + + ix = Param[0]->Val->Integer; // return absolute value of int + if (ix < 0) + ix = -ix; + ReturnValue->Val->Integer = ix; +} +void Csin(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) // sin(angle) +{ + int ix; + + ix = Param[0]->Val->Integer; // input to function is angle in degrees + ReturnValue->Val->Integer = sin(ix); +} + +void Ccos(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) // cos(angle) +{ + int ix; + + ix = Param[0]->Val->Integer; // input to function is angle in degrees + ReturnValue->Val->Integer = cos(ix); +} + +void Ctan(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) // tan(angle) +{ + int ix; + + ix = Param[0]->Val->Integer; // input to function is angle in degrees + ReturnValue->Val->Integer = tan(ix); +} + +void Casin(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) // asin(y,hyp) +{ + int y, hyp; + y = Param[0]->Val->Integer; + hyp = Param[1]->Val->Integer; + if (y > hyp) + ProgramFail(NULL, "asin(): opposite greater than hypotenuse"); + ReturnValue->Val->Integer = asin(y, hyp); +} + +void Cacos(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) // acos(x,hyp) +{ + int x, hyp; + x = Param[0]->Val->Integer; + hyp = Param[1]->Val->Integer; + if (x > hyp) + ProgramFail(NULL, "acos(): adjacent greater than hypotenuse"); + ReturnValue->Val->Integer = acos(x, hyp); +} + +void Catan(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) // atan(y,x) +{ + int x ,y; + y = Param[0]->Val->Integer; + x = Param[1]->Val->Integer; + ReturnValue->Val->Integer = atan(y, x); +} + +void Cgps_head(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) // gps_head(lat1, lon1, lat2, lon2) +{ + int lat1, lon1, lat2, lon2; + lat1 = Param[0]->Val->Integer; + lon1 = Param[1]->Val->Integer; + lat2 = Param[2]->Val->Integer; + lon2 = Param[3]->Val->Integer; + ReturnValue->Val->Integer = gps_head(lat1, lon1, lat2, lon2); +} + +void Cgps_dist(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) // gps_dist(lat1, lon1, lat2, lon2) +{ + int lat1, lon1, lat2, lon2; + lat1 = Param[0]->Val->Integer; + lon1 = Param[1]->Val->Integer; + lat2 = Param[2]->Val->Integer; + lon2 = Param[3]->Val->Integer; + ReturnValue->Val->Integer = gps_dist(lat1, lon1, lat2, lon2); +} + +void Csqrt(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) // sqrt(x) +{ + int x; + x = Param[0]->Val->Integer; + ReturnValue->Val->Integer = isqrt(x); +} + +void Cnnset(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + int ix, i1; + + ix = Param[0]->Val->Integer; + if (ix > NUM_NPATTERNS) + ProgramFail(NULL, "nnset(): invalid index"); + for (i1=0; i1<8; i1++) + npattern[ix*8 + i1] = (unsigned char)Param[i1+1]->Val->Integer; +} + +void Cnnshow(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + int ix; + + ix = Param[0]->Val->Integer; + if (ix > NUM_NPATTERNS) + ProgramFail(NULL, "nnshow(): invalid index"); + nndisplay(ix); +} + +void Cnninit(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + nninit_network(); +} + +void Cnntrain(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + int ix, i1; + + nntrain_network(10000); + for (ix=0; ixVal->Integer; + for (i2=0; i2<8; i2++) { + if (ch & nmask[i2]) + N_IN(ix++) = 1024; + else + N_IN(ix++) = 0; + } + } + nncalculate_network(); + ix = 0; + max = 0; + for (i1=0; i1Val->Integer = ix; +} + +void Cnnmatchblob(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + int ix, i1, max; + + ix = Param[0]->Val->Integer; + if (ix > MAX_BLOBS) + ProgramFail(NULL, "nnmatchblob(): invalid blob index"); + if (!blobcnt[ix]) + ProgramFail(NULL, "nnmatchblob(): not a valid blob"); + /* use data still in blob_buf[] (FRAME_BUF3) + square the aspect ratio of x1, x2, y1, y2 + then subsample blob pixels to populate N_IN(0:63) with 0:1024 values + then nncalculate_network() and display the N_OUT() results */ + nnscale8x8((unsigned char *)FRAME_BUF3, blobix[ix], blobx1[ix], blobx2[ix], + bloby1[ix], bloby2[ix], imgWidth, imgHeight); + nncalculate_network(); + ix = 0; + max = 0; + for (i1=0; i1Val->Integer = ix; +} + +void Cnnlearnblob (struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + int ix; + + ix = Param[0]->Val->Integer; + if (ix > NUM_NPATTERNS) + ProgramFail(NULL, "nnlearnblob(): invalid index"); + if (!blobcnt[0]) + ProgramFail(NULL, "nnlearnblob(): no blob to grab"); + nnscale8x8((unsigned char *)FRAME_BUF3, blobix[0], blobx1[0], blobx2[0], + bloby1[0], bloby2[0], imgWidth, imgHeight); + nnpack8x8(ix); + nndisplay(ix); +} + +void Cautorun (struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + int ix, t0; + unsigned char ch; + + ix = Param[0]->Val->Integer; + t0 = readRTC(); + while (readRTC() < (t0 + ix*1000)) { // watch for ESC in 'ix' seconds + if (getchar(&ch)) { + if (ch == 0x1B) { // if ESC found, exit picoC + printf("found ESC\r\n"); + PlatformExit(0); + } + } + } +} + +void Clineno (struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + ReturnValue->Val->Integer = Parser->Line; +} + +void Cerrormsg (struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) { + PlatformErrorPrefix(Parser); + LibPrintf(Parser, ReturnValue, Param, NumArgs); +} + +/* list of all library functions and their prototypes */ +struct LibraryFunction PlatformLibrary[] = +{ + { Csignal, "int signal();" }, + { Csignal1, "int signal1();" }, + { Cinput, "int input();" }, + { Cinput1, "int input1();" }, + { Cinit_uart1, "void init_uart1(int);" }, + { Cread_int, "int read_int();" }, + { Cread_str, "int read_str(char *);" }, + { Coutput, "void output(int);" }, + { Coutput1, "void output1(int);" }, + { Cdelay, "void delay(int);" }, + { Crand, "int rand(int);" }, + { Ctime, "int time();" }, + { Ciodir, "void iodir(int);" }, + { Cioread, "int ioread();" }, + { Ciowrite, "void iowrite(int);" }, + { Cpeek, "int peek(int, int);" }, + { Cpoke, "void poke(int, int, int);" }, + { Cmotors, "void motors(int, int);" }, + { Cmotors2, "void motors2(int, int);" }, + { Cmotorx, "void motorx(int, int);" }, + { Cservos, "void servos(int, int);" }, + { Cservos2, "void servos2(int, int);" }, + { Cencoders, "void encoders();" }, + { Cencoderx, "int encoderx(int);" }, + { Claser, "void laser(int);" }, + { Csonar, "int sonar(int);" }, + { Crange, "int range();" }, + { Cbattery, "int battery();" }, + { Cvcolor, "void vcolor(int, int, int, int, int, int, int);" }, + { Cvfind, "int vfind(int, int, int, int, int);" }, + { Cvcam, "void vcam(int);" }, + { Cvcap, "void vcap();" }, + { Cvrcap, "void vrcap();" }, + { Cvdiff, "void vdiff(int);" }, + { Cvpix, "void vpix(int, int);" }, + { Cvscan, "int vscan(int, int);" }, + { Cvmean, "void vmean();" }, + { Cvblob, "int vblob(int, int);" }, + { Cvjpeg, "int vjpeg(int);" }, + { Cvsend, "void vsend(int);" }, + { Ccompass, "int compass();" }, + { Ccompassx, "int compassx();" }, + { Ccompassxcal, "void compassxcal(int, int, int, int, int);" }, + { Canalog, "int analog(int);" }, + { Canalogx, "int analogx(int);" }, + { Ctilt, "int tilt(int);" }, + { Cgps, "void gps();" }, + { Creadi2c, "int readi2c(int, int);" }, + { Creadi2c2, "int readi2c2(int, int);" }, + { Cwritei2c, "void writei2c(int, int, int);" }, + { Cabs, "int abs(int);" }, + { Csin, "int sin(int);" }, + { Ccos, "int cos(int);" }, + { Ctan, "int tan(int);" }, + { Casin, "int asin(int, int);" }, + { Cacos, "int acos(int, int);" }, + { Catan, "int atan(int, int);" }, + { Cgps_head, "int gps_head(int, int, int, int);" }, + { Cgps_dist, "int gps_dist(int, int, int, int);" }, + { Csqrt, "int sqrt(int);" }, + { Cnnshow, "void nnshow(int);" }, + { Cnnset, "void nnset(int, int, int, int, int, int, int, int, int);" }, + { Cnninit, "void nninit();" }, + { Cnntrain, "void nntrain();" }, + { Cnntest, "int nntest(int, int, int, int, int, int, int, int);" }, + { Cnnmatchblob, "int nnmatchblob(int);" }, + { Cnnlearnblob, "void nnlearnblob(int);" }, + { Cautorun, "void autorun(int);" }, + { Clineno, "int lineno();" }, + { Cerrormsg, "void errormsg(char *);" }, + { NULL, NULL } +}; + diff --git a/src/platform/library_unix.c b/src/platform/library_unix.c new file mode 100644 index 0000000..f95ad3d --- /dev/null +++ b/src/platform/library_unix.c @@ -0,0 +1,29 @@ +#include "../interpreter.h" + +void UnixSetupFunc() +{ +} + +void Ctest (struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + printf("test(%d)\n", Param[0]->Val->Integer); + Param[0]->Val->Integer = 1234; +} + +void Clineno (struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = Parser->Line; +} + +/* list of all library functions and their prototypes */ +struct LibraryFunction UnixFunctions[] = +{ + { Ctest, "void test(int);" }, + { Clineno, "int lineno();" }, + { NULL, NULL } +}; + +void PlatformLibraryInit(Picoc *pc) +{ + IncludeRegister(pc, "picoc_unix.h", &UnixSetupFunc, &UnixFunctions[0], NULL); +} diff --git a/src/platform/library_win32.c b/src/platform/library_win32.c new file mode 100644 index 0000000..f26bab4 --- /dev/null +++ b/src/platform/library_win32.c @@ -0,0 +1,29 @@ +#include "../interpreter.h" + +void Win32SetupFunc(Picoc *pc) +{ +} + +void Ctest (struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + printf("test(%d)\n", Param[0]->Val->Integer); + Param[0]->Val->Integer = 1234; +} + +void Clineno (struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) +{ + ReturnValue->Val->Integer = Parser->Line; +} + +/* list of all library functions and their prototypes */ +struct LibraryFunction Win32Functions[] = +{ + { Ctest, "void test(int);" }, + { Clineno, "int lineno(void);" }, + { NULL, NULL } +}; + +void PlatformLibraryInit(Picoc *pc) +{ + IncludeRegister(pc, "picoc_unix.h", &Win32SetupFunc, &Win32Functions[0], NULL); +} diff --git a/src/platform/library_win32.o b/src/platform/library_win32.o new file mode 100644 index 0000000..7d02f7c Binary files /dev/null and b/src/platform/library_win32.o differ diff --git a/src/platform/platform_ffox.c b/src/platform/platform_ffox.c new file mode 100644 index 0000000..ea7bd7e --- /dev/null +++ b/src/platform/platform_ffox.c @@ -0,0 +1,51 @@ +#include "../interpreter.h" + +/* deallocate any storage */ +void PlatformCleanup() +{ +} + +/* get a line of interactive input */ +char *PlatformGetLine(char *Buf, int MaxLen) +{ + // XXX - unimplemented so far + return NULL; +} + +/* get a character of interactive input */ +int PlatformGetCharacter() +{ + // XXX - unimplemented so far + return 0; +} + +/* write a character to the console */ +void PlatformPutc(unsigned char OutCh, union OutputStreamInfo *Stream) +{ + // XXX - unimplemented so far +} + +/* read a file into memory */ +char *PlatformReadFile(const char *FileName) +{ + // XXX - unimplemented so far + return NULL; +} + +/* read and scan a file for definitions */ +void PlatformScanFile(const char *FileName) +{ + char *SourceStr = PlatformReadFile(FileName); + Parse(FileName, SourceStr, strlen(SourceStr), TRUE); + //free(SourceStr); +} + +/* mark where to end the program for platforms which require this */ +jmp_buf ExitBuf; + +/* exit the program */ +void PlatformExit() +{ + longjmp(ExitBuf, 1); +} + diff --git a/src/platform/platform_msvc.c b/src/platform/platform_msvc.c new file mode 100644 index 0000000..784058f --- /dev/null +++ b/src/platform/platform_msvc.c @@ -0,0 +1,88 @@ +#include "../picoc.h" +#include "../interpreter.h" + +/* mark where to end the program for platforms which require this */ +jmp_buf PicocExitBuf; + +void PlatformInit(Picoc *pc) +{ +} + +void PlatformCleanup(Picoc *pc) +{ +} + +/* get a line of interactive input */ +char *PlatformGetLine(char *Buf, int MaxLen, const char *Prompt) +{ + if (Prompt != NULL) + printf("%s", Prompt); + + fflush(stdout); + return fgets(Buf, MaxLen, stdin); +} + +/* get a character of interactive input */ +int PlatformGetCharacter() +{ + fflush(stdout); + return getchar(); +} + +/* write a character to the console */ +void PlatformPutc(unsigned char OutCh, union OutputStreamInfo *Stream) +{ + putchar(OutCh); +} + +/* read a file into memory */ +char *PlatformReadFile(Picoc *pc, const char *FileName) +{ + struct stat FileInfo; + char *ReadText; + FILE *InFile; + int BytesRead; + char *p; + + if (stat(FileName, &FileInfo)) + ProgramFailNoParser(pc, "can't read file %s\n", FileName); + + ReadText = malloc(FileInfo.st_size + 1); + if (ReadText == NULL) + ProgramFailNoParser(pc, "out of memory\n"); + + InFile = fopen(FileName, "r"); + if (InFile == NULL) + ProgramFailNoParser(pc, "can't read file %s\n", FileName); + + BytesRead = fread(ReadText, 1, FileInfo.st_size, InFile); + if (BytesRead == 0) + ProgramFailNoParser(pc, "can't read file %s\n", FileName); + + ReadText[BytesRead] = '\0'; + fclose(InFile); + + if ((ReadText[0] == '#') && (ReadText[1] == '!')) + { + for (p = ReadText; (*p != '\r') && (*p != '\n'); ++p) + { + *p = ' '; + } + } + + return ReadText; +} + +/* read and scan a file for definitions */ +void PicocPlatformScanFile(Picoc *pc, const char *FileName) +{ + char *SourceStr = PlatformReadFile(pc, FileName); + PicocParse(pc, FileName, SourceStr, strlen(SourceStr), TRUE, FALSE, TRUE, TRUE); +} + +/* exit the program */ +void PlatformExit(Picoc *pc, int RetVal) +{ + pc->PicocExitValue = RetVal; + longjmp(pc->PicocExitBuf, 1); +} diff --git a/src/platform/platform_surveyor.c b/src/platform/platform_surveyor.c new file mode 100644 index 0000000..1557747 --- /dev/null +++ b/src/platform/platform_surveyor.c @@ -0,0 +1,71 @@ +#include "../interpreter.h" +#include "../picoc.h" + +/* mark where to end the program for platforms which require this */ +int PicocExitBuf[41]; + +/* deallocate any storage */ +void PlatformCleanup() +{ +} + +/* get a line of interactive input */ +char *PlatformGetLine(char *Buf, int MaxLen, const char *Prompt) +{ + int ix; + char ch, *cp; + + printf(Prompt); + + ix = 0; + cp = 0; + + // If the first character is \n or \r, eat it + ch = getch(); + if (ch == '\n' || ch == '\r') + { + // And get the next character + ch = getch(); + } + + while (ix++ < MaxLen) { + + if (ch == 0x1B || ch == 0x03) { // ESC character or ctrl-c (to avoid problem with TeraTerm) - exit + printf("Leaving PicoC\n"); + return NULL; + } + if (ch == '\n') { + *cp++ = '\n'; // if newline, send newline character followed by null + *cp = 0; + return Buf; + } + *cp++ = ch; + ix++; + ch = getch(); + } + return NULL; +} + +/* write a character to the console */ +void PlatformPutc(unsigned char OutCh, union OutputStreamInfo *Stream) +{ + if (OutCh == '\n') + putchar('\r'); + + putchar(OutCh); +} + +/* read a character */ +int PlatformGetCharacter() +{ + return getch(); +} + +/* exit the program */ +void PlatformExit(int RetVal) +{ + PicocExitValue = RetVal; + PicocExitBuf[40] = 1; + longjmp(PicocExitBuf, 1); +} + diff --git a/src/platform/platform_unix.c b/src/platform/platform_unix.c new file mode 100644 index 0000000..50c3119 --- /dev/null +++ b/src/platform/platform_unix.c @@ -0,0 +1,140 @@ +#include "../picoc.h" +#include "../interpreter.h" + +#ifdef USE_READLINE +#include +#include +#endif + +/* mark where to end the program for platforms which require this */ +jmp_buf PicocExitBuf; + +#ifndef NO_DEBUGGER +#include + +Picoc *break_pc = NULL; + +static void BreakHandler(int Signal) +{ + break_pc->DebugManualBreak = TRUE; +} + +void PlatformInit(Picoc *pc) +{ + /* capture the break signal and pass it to the debugger */ + break_pc = pc; + signal(SIGINT, BreakHandler); +} +#else +void PlatformInit(Picoc *pc) +{ +} +#endif + +void PlatformCleanup(Picoc *pc) +{ +} + +/* get a line of interactive input */ +char *PlatformGetLine(char *Buf, int MaxLen, const char *Prompt) +{ +#ifdef USE_READLINE + if (Prompt != NULL) + { + /* use GNU readline to read the line */ + char *InLine = readline(Prompt); + if (InLine == NULL) + return NULL; + + Buf[MaxLen-1] = '\0'; + strncpy(Buf, InLine, MaxLen-2); + strncat(Buf, "\n", MaxLen-2); + + if (InLine[0] != '\0') + add_history(InLine); + + free(InLine); + return Buf; + } +#endif + + if (Prompt != NULL) + printf("%s", Prompt); + + fflush(stdout); + return fgets(Buf, MaxLen, stdin); +} + +/* get a character of interactive input */ +int PlatformGetCharacter() +{ + fflush(stdout); + return getchar(); +} + +/* write a character to the console */ +void PlatformPutc(unsigned char OutCh, union OutputStreamInfo *Stream) +{ + putchar(OutCh); +} + +/* read a file into memory */ +char *PlatformReadFile(Picoc *pc, const char *FileName) +{ + struct stat FileInfo; + char *ReadText; + FILE *InFile; + int BytesRead; + char *p; + + if (stat(FileName, &FileInfo)) + ProgramFailNoParser(pc, "can't read file %s\n", FileName); + + ReadText = malloc(FileInfo.st_size + 1); + if (ReadText == NULL) + ProgramFailNoParser(pc, "out of memory\n"); + + InFile = fopen(FileName, "r"); + if (InFile == NULL) + ProgramFailNoParser(pc, "can't read file %s\n", FileName); + + BytesRead = fread(ReadText, 1, FileInfo.st_size, InFile); + if (BytesRead == 0) + ProgramFailNoParser(pc, "can't read file %s\n", FileName); + + ReadText[BytesRead] = '\0'; + fclose(InFile); + + if ((ReadText[0] == '#') && (ReadText[1] == '!')) + { + for (p = ReadText; (*p != '\r') && (*p != '\n'); ++p) + { + *p = ' '; + } + } + + return ReadText; +} + +/* read and scan a file for definitions */ +void PicocPlatformScanFile(Picoc *pc, const char *FileName) +{ + char *SourceStr = PlatformReadFile(pc, FileName); + + /* ignore "#!/path/to/picoc" .. by replacing the "#!" with "//" */ + if (SourceStr != NULL && SourceStr[0] == '#' && SourceStr[1] == '!') + { + SourceStr[0] = '/'; + SourceStr[1] = '/'; + } + + PicocParse(pc, FileName, SourceStr, strlen(SourceStr), TRUE, FALSE, TRUE, TRUE); +} + +/* exit the program */ +void PlatformExit(Picoc *pc, int RetVal) +{ + pc->PicocExitValue = RetVal; + longjmp(pc->PicocExitBuf, 1); +} + diff --git a/src/platform/platform_win32.c b/src/platform/platform_win32.c new file mode 100644 index 0000000..914c77f --- /dev/null +++ b/src/platform/platform_win32.c @@ -0,0 +1,399 @@ +#include "../picoc.h" +#include "../interpreter.h" + +#ifdef USE_READLINE +#include +#include +#endif + +/* mark where to end the program for platforms which require this */ +jmp_buf PicocExitBuf; + +#ifndef NO_DEBUGGER +#include + +Picoc *break_pc = NULL; + +static void BreakHandler(int Signal) +{ + PlatformPrintf(stdout, "break\n"); + break_pc->DebugManualBreak = TRUE; +} + +void PlatformInit(Picoc *pc) +{ + /* capture the break signal and pass it to the debugger */ + signal(SIGINT, BreakHandler); +} +#else +void PlatformInit() +{ +} +#endif + +void PlatformCleanup(Picoc *pc) +{ +} + +/* get a line of interactive input */ +char *PlatformGetLine(char *Buf, int MaxLen, const char *Prompt) +{ +#ifdef USE_READLINE + if (Prompt != NULL) + { + /* use GNU readline to read the line */ + char *InLine = readline(Prompt); + if (InLine == NULL) + return NULL; + + Buf[MaxLen] = '\0'; + strncpy(Buf, InLine, MaxLen-1); + strncat(Buf, "\n", MaxLen-1); + + if (InLine[0] != '\0') + add_history(InLine); + + free(InLine); + return Buf; + } +#endif + + if (Prompt != NULL) + printf("%s", Prompt); + + fflush(stdout); + return fgets(Buf, MaxLen, stdin); +} + +/* get a character of interactive input */ +int PlatformGetCharacter(void) +{ + fflush(stdout); + return getchar(); +} + +/* write a character to the console */ +void PlatformPutc(unsigned char OutCh, union OutputStreamInfo *Stream) +{ + putchar(OutCh); +} + +/* read a file into memory */ +char *PlatformReadFile(const char *FileName) +{ + struct stat FileInfo; + char *ReadText; + FILE *InFile; + int BytesRead; + + if (stat(FileName, &FileInfo)) + ProgramFail(NULL, "can't read file %s\n", FileName); + + ReadText = malloc(FileInfo.st_size + 1); + if (ReadText == NULL) + ProgramFail(NULL, "out of memory\n"); + + InFile = fopen(FileName, "r"); + if (InFile == NULL) + ProgramFail(NULL, "can't read file %s\n", FileName); + + BytesRead = fread(ReadText, 1, FileInfo.st_size, InFile); + if (BytesRead == 0) + ProgramFail(NULL, "can't read file %s\n", FileName); + + ReadText[BytesRead] = '\0'; + fclose(InFile); + + return ReadText; +} + +/* read and scan a file for definitions */ +void PicocPlatformScanFile(Picoc *pc, const char *FileName) +{ + char *SourceStr = PlatformReadFile(FileName); + PicocParse(pc, FileName, SourceStr, strlen(SourceStr), TRUE, FALSE, TRUE, TRUE); + +free(SourceStr); /* correction, pas de free en face du malloc de PlatformReadFile */ +} + +/* exit the program */ +void PlatformExit(Picoc *pc, int RetVal) +{ + pc->PicocExitValue = RetVal; + longjmp(PicocExitBuf, 1); +} + + +/* + FONCTIONS DE REMPLACEMENT DUE A LA PLATE-FORME WINDOWS +*/ + +#include +#include +#include +#include +#include +#include +#include + +typedef uint32_t uid_t ; +typedef uint32_t gid_t ; + +/* simulates gmtime_r under windows + The difference is that gmtime_r(3) is a standard POSIX function. The closest + you can find to gmtime_r() on a windows environment is gmtime_s(), which has + it's arguments reversed: + + gmtime_r(const time_t*, struct tm*) + gmtime_s(struct tm*, const time_t*) + + Basically, they both convert a time value to a tm structure. gmtime_r then + return a pointer to this structure (or NULL if failed), whereas gmtime_s + returns 0 if successful, and a errno_t in case of failure. + The tm structure has the following body, as can be seen from both docs listed above: + + struct tm { + int tm_sec; / seconds / + int tm_min; / minutes / + int tm_hour; / hours / + int tm_mday; / day of the month / + int tm_mon; / month / + int tm_year; / year / + int tm_wday; / day of the week / + int tm_yday; / day in the year / + int tm_isdst; / daylight saving time / + }; +*/ +/* +struct tm *gmtime_r(const time_t *time, struct tm *result) +{ + errno_t gmtime_error = 0; + gmtime_error = gmtime_s(result, time); + + if (gmtime_error==0) + return result; + else + return NULL; +} +*/ + + +struct tm *gmtime_r( const time_t *time, struct tm *result ) { return gmtime( time ) ; } + +char *strtok_s(char *str, const char *delim, char **saveptr) { return strtok(str, delim) ; } + +unsigned int alarm(unsigned int seconds) { return 0 ; } + +unsigned int sleep( unsigned int seconds ) { Sleep (seconds * 1000) ; return 0 ; } + +typedef unsigned long usecs_t; + +int usleep(usecs_t usec) { Sleep((int)(usec/1000)) ; return 0 ; } + +int truncate( const char *path, off_t length ) { + int fd, ret +// , save +; + fd = open (path, O_WRONLY); + if (fd < 0) + return -1; + + ret = ftruncate (fd, length); +// save = errno; + (void) close (fd); + + return ret; +} + +char * getlogin( void ) { + static char user_name[MAX_PATH]; + DWORD length = sizeof (user_name); + + if (GetUserName (user_name, &length)) + return user_name; + return NULL; +} + +int getlogin_r(char *buf, size_t bufsize) { DWORD nSize = bufsize ; GetUserName( buf, &nSize ) ; return 0 ; } + +void sync(void) { _flushall() ; } + +int setuid( uid_t uid ) { return 0 ; } + +int setgid(gid_t gid) { return 0 ; } + +int setpgid(pid_t pid, pid_t pgid) ; +int setpgrp ( void ) { return setpgid (0, 0) ; } + +char *win2unixpath(char *FileName) { + char *s = FileName; + while (*s) { + if (*s == '\\') { + *s = '/'; + } + *s++; + } + return FileName; +} + +char *unix2winpath(char *FileName) { + char *s = FileName; + while (*s) { + if (*s == '/') { + *s = '\\'; + } + *s++; + } + return FileName; +} + + +long int __fpathconf( int fd, int name) ; +long int pathconf (const char *path, int name) { + if (path == NULL) { return -1; } + return __fpathconf (0, name); +} + +uid_t getuid( void ) { return 0 ; } + +int getppid ( void ) +{ + HANDLE hProcess, thProcess; + PROCESSENTRY32 ProcessEntry; + + thProcess = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0); + if (thProcess == INVALID_HANDLE_VALUE) { + return -1; + } + ProcessEntry.dwSize = sizeof(PROCESSENTRY32); + ProcessEntry.th32ParentProcessID = 0; + if (!Process32First(thProcess, &ProcessEntry)) { + return -1; + } + CloseHandle(thProcess); + hProcess = OpenProcess(PROCESS_QUERY_INFORMATION, FALSE, ProcessEntry.th32ProcessID); + if (hProcess == NULL) { + return -1; + } + CloseHandle(hProcess); + return ProcessEntry.th32ParentProcessID; +} + +pid_t getpgid (pid_t pid) { return pid ; } + +gid_t getgid( void ) { return 0 ; } + +uid_t geteuid( void ) { return 0 ; } + +gid_t getegid( void ) { return 0 ; } + +pid_t getpgrp(void) { return getpgid(0) ; } + +void WSAErr(const char *Msg) { fprintf(stderr, "%s: Socket error %d\n", Msg, WSAGetLastError()) ; } + +void ws_cleanup(void) { if (!WSACleanup()) ; } + +static int ws_init_done = 0; +int ws_init( void ) { + if (!ws_init_done ) { + int wsaerr; + WORD wVersionRequested; + WSADATA wsaData; + + wVersionRequested = MAKEWORD( 1, 0 ); + wsaerr = WSAStartup(wVersionRequested, &wsaData); + if (wsaerr) { + WSAErr("WSAStartup"); + return -1; + } + atexit(ws_cleanup); + ws_init_done = 1; + } + return 0; +} + +long int gethostid( void ){ + char name [MAX_PATH]; + struct hostent *hostinfo; + char *ip; + long int id; + + if (ws_init() == -1) + return -1; + if (gethostname(name, MAX_PATH) == 0) + if ((hostinfo = gethostbyname(name)) != NULL) { + ip = inet_ntoa(*(struct in_addr *)hostinfo->h_addr_list[0]); + id = inet_addr(ip); + return id; + } + return 0L; +} + + +/* NOT IMPLEMENTED */ + +usecs_t ualarm(usecs_t usecs, usecs_t interval) { fprintf( stderr, "Not implemented yet !\n" ) ; return 0 ; } + +size_t confstr(int name, char *buf, size_t len){ fprintf( stderr, "Not implemented yet !\n" ) ; return 0 ; } + +char *ctermid(char *s) { fprintf( stderr, "Not implemented yet !\n" ) ; return NULL ; } + +int fsync(int fildes) { fprintf( stderr, "Not implemented yet !\n" ) ; return -1 ; } + +int lockf(int fd, int cmd, off_t len) { fprintf( stderr, "Not implemented yet !\n" ) ; return -1 ; } + +int pause(void) { return fgetc(stdin) ; } + +pid_t setsid(void) { fprintf( stderr, "Not implemented yet !\n" ) ; return -1 ; } + +int ttyname_r(int fd, char *buf, size_t buflen) { fprintf( stderr, "Not implemented yet !\n" ) ; return -1 ; } + +pid_t vfork(void) { fprintf( stderr, "Not implemented yet !\n" ) ; return -1 ; } + +int chroot(const char *path) { fprintf( stderr, "Not implemented yet !\n" ) ; return 0 ; } + +int chown(const char *path, uid_t owner, gid_t group) { fprintf( stderr, "Not implemented yet !\n" ) ; return 0 ; } + +int fchown(int fildes, uid_t owner, gid_t group) { fprintf( stderr, "Not implemented yet !\n" ) ; return 0 ; } + +int fchdir( int fd ) { fprintf( stderr, "Not implemented yet !\n" ) ; return -1 ; } + +int fdatasync( int fd ) { fprintf( stderr, "Not implemented yet !\n" ) ; return -1 ; } + +pid_t fork( void ) { fprintf( stderr, "Not implemented yet !\n" ) ; return -1 ; } + +int fpathconf( int i1, int i2 ) { fprintf( stderr, "Not implemented yet !\n" ) ; return -1 ; } + +char * ttyname( int i ) { fprintf( stderr, "Not implemented yet !\n" ) ; return NULL ; } + +int tcsetpgrp(int i, pid_t j) { fprintf( stderr, "Not implemented yet !\n" ) ; return -1 ; } + +pid_t tcgetpgrp(int i) { fprintf( stderr, "Not implemented yet !\n" ) ; return -1 ; } + +long sysconf(int i) { fprintf( stderr, "Not implemented yet !\n" ) ; return -1 ; } + +int symlink(const char *oldpath, const char *newpath) { fprintf( stderr, "Not implemented yet !\n" ) ; return -1 ; } + +int setreuid(uid_t ruid, uid_t euid) { fprintf( stderr, "Not implemented yet !\n" ) ; return -1 ; } + +int setregid(gid_t rgid, gid_t egid) { fprintf( stderr, "Not implemented yet !\n" ) ; return -1 ; } + +int setpgid(pid_t pid, pid_t pgid) { fprintf( stderr, "Not implemented yet !\n" ) ; return -1 ; } + +void *sbrk(intptr_t increment) { fprintf( stderr, "Not implemented yet !\n" ) ; return (void *) -1 ; } + +long int __fpathconf( int fd, int name) { fprintf( stderr, "Not implemented yet !\n" ) ; return -1 ; } + +int nice(int inc) { fprintf( stderr, "Not implemented yet !\n" ) ; return -1 ; } + +int link ( const char *from, const char *to ) { fprintf( stderr, "Not implemented yet !\n" ) ; return -1 ; } + +int lchown(const char *path, uid_t owner, gid_t group) { fprintf( stderr, "Not implemented yet !\n" ) ; return -1 ; } + +char *getpass(char * st) { fprintf( stderr, "Not implemented yet !\n" ) ; return NULL ; } + +int getdtablesize( void ) { fprintf( stderr, "Not implemented yet !\n" ) ; return -1 ; } + +pid_t wait( int *status ) { fprintf( stderr, "Not implemented yet !\n" ) ; return -1 ; } + +pid_t waitpid(pid_t pid, int *status, int options) { fprintf( stderr, "Not implemented yet !\n" ) ; return -1 ; } diff --git a/src/platform/platform_win32.h b/src/platform/platform_win32.h new file mode 100644 index 0000000..81a8ecb --- /dev/null +++ b/src/platform/platform_win32.h @@ -0,0 +1,50 @@ +/* Platform_win32 specific includes */ + +#ifndef PLATFORM_WIN32_H +#define PLATFORM_WIN32_H + +/*# define HEAP_SIZE C_HEAPSIZE */ +/*# define NO_FP */ +/*# define NO_CTYPE */ +/*# define NO_HASH_INCLUDE */ +/*# define NO_MODULUS */ + +# define USE_MALLOC_STACK /* stack is allocated using malloc() */ +# define USE_MALLOC_HEAP /* heap is allocated using malloc() */ +/*# define HEAP_SIZE (128*1024) */ /* space for the heap and the stack */ +/*# define NO_FP */ +/*# define BUILTIN_MINI_STDLIB */ +/*# define USE_READLINE */ + +# include +# include +# include +# include +# include +# include +# include +# include +# include +/*# include */ +# include +# include +# ifndef NO_FP +# include +# define PICOC_MATH_LIBRARY +# undef BIG_ENDIAN +# if defined(__powerpc__) || defined(__hppa__) || defined(__sparc__) +# define BIG_ENDIAN +# endif +# endif + +/* secure versions have a slightly different name */ +#define strtok_r strtok_s +#define snprintf _snprintf +#define index strchr +#define rindex strrchr +#define timegm mktime +/* #define gmtime_r gmtime_s */ +struct tm *gmtime_r(const time_t *time, struct tm *result); + +extern jmp_buf ExitBuf; +#endif /* PLATFORM_WIN32_H */ diff --git a/src/platform/platform_win32.o b/src/platform/platform_win32.o new file mode 100644 index 0000000..d312674 Binary files /dev/null and b/src/platform/platform_win32.o differ diff --git a/src/readline/ansi_stdlib.h b/src/readline/ansi_stdlib.h new file mode 100644 index 0000000..f69d76c --- /dev/null +++ b/src/readline/ansi_stdlib.h @@ -0,0 +1,54 @@ +/* ansi_stdlib.h -- An ANSI Standard stdlib.h. */ +/* A minimal stdlib.h containing extern declarations for those functions + that bash uses. */ + +/* Copyright (C) 1993 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Bash is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Bash. If not, see . +*/ + +#if !defined (_STDLIB_H_) +#define _STDLIB_H_ 1 + +/* String conversion functions. */ +extern int atoi (); + +extern double atof (); +extern double strtod (); + +/* Memory allocation functions. */ +/* Generic pointer type. */ +#ifndef PTR_T + +#if defined (__STDC__) +# define PTR_T void * +#else +# define PTR_T char * +#endif + +#endif /* PTR_T */ + +extern PTR_T malloc (); +extern PTR_T realloc (); +extern void free (); + +/* Other miscellaneous functions. */ +extern void abort (); +extern void exit (); +extern char *getenv (); +extern void qsort (); + +#endif /* _STDLIB_H */ diff --git a/src/readline/chardefs.h b/src/readline/chardefs.h new file mode 100644 index 0000000..b0a1431 --- /dev/null +++ b/src/readline/chardefs.h @@ -0,0 +1,164 @@ +/* chardefs.h -- Character definitions for readline. */ + +/* Copyright (C) 1994-2009 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library (Readline), a library + for reading lines of text with interactive input and history editing. + + Readline is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Readline is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Readline. If not, see . +*/ + +#ifndef _CHARDEFS_H_ +#define _CHARDEFS_H_ + +#include + +#if defined (HAVE_CONFIG_H) +# if defined (HAVE_STRING_H) +# if ! defined (STDC_HEADERS) && defined (HAVE_MEMORY_H) +# include +# endif +# include +# endif /* HAVE_STRING_H */ +# if defined (HAVE_STRINGS_H) +# include +# endif /* HAVE_STRINGS_H */ +#else +# include +#endif /* !HAVE_CONFIG_H */ + +#ifndef whitespace +#define whitespace(c) (((c) == ' ') || ((c) == '\t')) +#endif + +#ifdef CTRL +# undef CTRL +#endif +#ifdef UNCTRL +# undef UNCTRL +#endif + +/* Some character stuff. */ +#define control_character_threshold 0x020 /* Smaller than this is control. */ +#define control_character_mask 0x1f /* 0x20 - 1 */ +#define meta_character_threshold 0x07f /* Larger than this is Meta. */ +#define control_character_bit 0x40 /* 0x000000, must be off. */ +#define meta_character_bit 0x080 /* x0000000, must be on. */ +#define largest_char 255 /* Largest character value. */ + +#define CTRL_CHAR(c) ((c) < control_character_threshold && (((c) & 0x80) == 0)) +#define META_CHAR(c) ((c) > meta_character_threshold && (c) <= largest_char) + +#define CTRL(c) ((c) & control_character_mask) +#define META(c) ((c) | meta_character_bit) + +#define UNMETA(c) ((c) & (~meta_character_bit)) +#define UNCTRL(c) _rl_to_upper(((c)|control_character_bit)) + +#if defined STDC_HEADERS || (!defined (isascii) && !defined (HAVE_ISASCII)) +# define IN_CTYPE_DOMAIN(c) 1 +#else +# define IN_CTYPE_DOMAIN(c) isascii(c) +#endif + +#if !defined (isxdigit) && !defined (HAVE_ISXDIGIT) && !defined (__cplusplus) +# define isxdigit(c) (isdigit((c)) || ((c) >= 'a' && (c) <= 'f') || ((c) >= 'A' && (c) <= 'F')) +#endif + +#if defined (CTYPE_NON_ASCII) +# define NON_NEGATIVE(c) 1 +#else +# define NON_NEGATIVE(c) ((unsigned char)(c) == (c)) +#endif + +/* Some systems define these; we want our definitions. */ +#undef ISPRINT + +/* Beware: these only work with single-byte ASCII characters. */ + +#define ISALNUM(c) (IN_CTYPE_DOMAIN (c) && isalnum (c)) +#define ISALPHA(c) (IN_CTYPE_DOMAIN (c) && isalpha (c)) +#define ISDIGIT(c) (IN_CTYPE_DOMAIN (c) && isdigit (c)) +#define ISLOWER(c) (IN_CTYPE_DOMAIN (c) && islower (c)) +#define ISPRINT(c) (IN_CTYPE_DOMAIN (c) && isprint (c)) +#define ISUPPER(c) (IN_CTYPE_DOMAIN (c) && isupper (c)) +#define ISXDIGIT(c) (IN_CTYPE_DOMAIN (c) && isxdigit (c)) + +#define _rl_lowercase_p(c) (NON_NEGATIVE(c) && ISLOWER(c)) +#define _rl_uppercase_p(c) (NON_NEGATIVE(c) && ISUPPER(c)) +#define _rl_digit_p(c) ((c) >= '0' && (c) <= '9') + +#define _rl_pure_alphabetic(c) (NON_NEGATIVE(c) && ISALPHA(c)) +#define ALPHABETIC(c) (NON_NEGATIVE(c) && ISALNUM(c)) + +#ifndef _rl_to_upper +# define _rl_to_upper(c) (_rl_lowercase_p(c) ? toupper((unsigned char)c) : (c)) +# define _rl_to_lower(c) (_rl_uppercase_p(c) ? tolower((unsigned char)c) : (c)) +#endif + +#ifndef _rl_digit_value +# define _rl_digit_value(x) ((x) - '0') +#endif + +#ifndef _rl_isident +# define _rl_isident(c) (ISALNUM(c) || (c) == '_') +#endif + +#ifndef ISOCTAL +# define ISOCTAL(c) ((c) >= '0' && (c) <= '7') +#endif +#define OCTVALUE(c) ((c) - '0') + +#define HEXVALUE(c) \ + (((c) >= 'a' && (c) <= 'f') \ + ? (c)-'a'+10 \ + : (c) >= 'A' && (c) <= 'F' ? (c)-'A'+10 : (c)-'0') + +#ifndef NEWLINE +#define NEWLINE '\n' +#endif + +#ifndef RETURN +#define RETURN CTRL('M') +#endif + +#ifndef RUBOUT +#define RUBOUT 0x7f +#endif + +#ifndef TAB +#define TAB '\t' +#endif + +#ifdef ABORT_CHAR +#undef ABORT_CHAR +#endif +#define ABORT_CHAR CTRL('G') + +#ifdef PAGE +#undef PAGE +#endif +#define PAGE CTRL('L') + +#ifdef SPACE +#undef SPACE +#endif +#define SPACE ' ' /* XXX - was 0x20 */ + +#ifdef ESC +#undef ESC +#endif +#define ESC CTRL('[') + +#endif /* _CHARDEFS_H_ */ diff --git a/src/readline/colors.h b/src/readline/colors.h new file mode 100644 index 0000000..e69a6cf --- /dev/null +++ b/src/readline/colors.h @@ -0,0 +1,122 @@ +/* `dir', `vdir' and `ls' directory listing programs for GNU. + + Modified by Chet Ramey for Readline. + + Copyright (C) 1985, 1988, 1990-1991, 1995-2010, 2012 Free Software Foundation, + Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Richard Stallman and David MacKenzie. */ + +/* Color support by Peter Anvin and Dennis + Flaherty based on original patches by + Greg Lee . */ + +#ifndef _COLORS_H_ +#define _COLORS_H_ + +#include // size_t + +#if defined(__TANDEM) && defined(HAVE_STDBOOL_H) && (__STDC_VERSION__ < 199901L) +typedef int _Bool; +#endif + +#if defined (HAVE_STDBOOL_H) +# include // bool +#else +typedef int _rl_bool_t; + +#ifdef bool +# undef bool +#endif +#define bool _rl_bool_t + +#ifndef true +# define true 1 +# define false 0 +#endif + +#endif /* !HAVE_STDBOOL_H */ + +/* Null is a valid character in a color indicator (think about Epson + printers, for example) so we have to use a length/buffer string + type. */ +struct bin_str + { + size_t len; + const char *string; + }; + +/* file type indicators (dir, sock, fifo, ...) + Default value is initialized in parse-colors.c. + It is then modified from the values of $LS_COLORS. */ +extern struct bin_str _rl_color_indicator[]; + +/* The LS_COLORS variable is in a termcap-like format. */ +typedef struct _color_ext_type + { + struct bin_str ext; /* The extension we're looking for */ + struct bin_str seq; /* The sequence to output when we do */ + struct _color_ext_type *next; /* Next in list */ + } COLOR_EXT_TYPE; + +/* file extensions indicators (.txt, .log, .jpg, ...) + Values are taken from $LS_COLORS in rl_parse_colors(). */ +extern COLOR_EXT_TYPE *_rl_color_ext_list; + +#define FILETYPE_INDICATORS \ + { \ + C_ORPHAN, C_FIFO, C_CHR, C_DIR, C_BLK, C_FILE, \ + C_LINK, C_SOCK, C_FILE, C_DIR \ + } + +/* Whether we used any colors in the output so far. If so, we will + need to restore the default color later. If not, we will need to + call prep_non_filename_text before using color for the first time. */ + +enum indicator_no + { + C_LEFT, C_RIGHT, C_END, C_RESET, C_NORM, C_FILE, C_DIR, C_LINK, + C_FIFO, C_SOCK, + C_BLK, C_CHR, C_MISSING, C_ORPHAN, C_EXEC, C_DOOR, C_SETUID, C_SETGID, + C_STICKY, C_OTHER_WRITABLE, C_STICKY_OTHER_WRITABLE, C_CAP, C_MULTIHARDLINK, + C_CLR_TO_EOL + }; + + +#if !S_IXUGO +# define S_IXUGO (S_IXUSR | S_IXGRP | S_IXOTH) +#endif + +enum filetype + { + unknown, + fifo, + chardev, + directory, + blockdev, + normal, + symbolic_link, + sock, + whiteout, + arg_directory + }; + +extern void _rl_put_indicator (const struct bin_str *ind); +extern void _rl_set_normal_color (void); +extern bool _rl_print_color_indicator (char *f); +extern void _rl_prep_non_filename_text (void); + +#endif /* !_COLORS_H_ */ diff --git a/src/readline/config.h b/src/readline/config.h new file mode 100644 index 0000000..a9a4341 --- /dev/null +++ b/src/readline/config.h @@ -0,0 +1,272 @@ +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Maintained by hand. */ + +/* Define NO_MULTIBYTE_SUPPORT to not compile in support for multibyte + characters, even if the OS supports them. */ +/* #undef NO_MULTIBYTE_SUPPORT */ + +#define _FILE_OFFSET_BITS 64 + +/* Define if on MINIX. */ +/* #undef _MINIX */ + +/* Define as the return type of signal handlers (int or void). */ +#define RETSIGTYPE void + +#define VOID_SIGHANDLER 1 + +/* Characteristics of the compiler. */ +/* #undef sig_atomic_t */ + +/* #undef size_t */ + +/* #undef ssize_t */ + +/* #undef const */ + +/* #undef volatile */ + +#define PROTOTYPES 1 + +/* #undef __CHAR_UNSIGNED__ */ + +/* Define if the `S_IS*' macros in do not work properly. */ +/* #undef STAT_MACROS_BROKEN */ + +/* Define if you have the fcntl function. */ +#define HAVE_FCNTL 1 + +/* Define if you have the getpwent function. */ +#define HAVE_GETPWENT 1 + +/* Define if you have the getpwnam function. */ +#define HAVE_GETPWNAM 1 + +/* Define if you have the getpwuid function. */ +#define HAVE_GETPWUID 1 + +/* Define if you have the isascii function. */ +#define HAVE_ISASCII 1 + +/* Define if you have the iswctype function. */ +#define HAVE_ISWCTYPE 1 + +/* Define if you have the iswlower function. */ +#define HAVE_ISWLOWER 1 + +/* Define if you have the iswupper function. */ +#define HAVE_ISWUPPER 1 + +/* Define if you have the isxdigit function. */ +#define HAVE_ISXDIGIT 1 + +/* Define if you have the kill function. */ +#define HAVE_KILL 1 + +/* Define if you have the lstat function. */ +#define HAVE_LSTAT 1 + +/* Define if you have the mbrlen function. */ +#define HAVE_MBRLEN 1 + +/* Define if you have the mbrtowc function. */ +#define HAVE_MBRTOWC 1 + +/* Define if you have the mbsrtowcs function. */ +#define HAVE_MBSRTOWCS 1 + +/* Define if you have the memmove function. */ +#define HAVE_MEMMOVE 1 + +/* Define if you have the putenv function. */ +#define HAVE_PUTENV 1 + +/* Define if you have the select function. */ +#define HAVE_SELECT 1 + +/* Define if you have the setenv function. */ +#define HAVE_SETENV 1 + +/* Define if you have the setlocale function. */ +#define HAVE_SETLOCALE 1 + +/* Define if you have the strcasecmp function. */ +#define HAVE_STRCASECMP 1 + +/* Define if you have the strcoll function. */ +#define HAVE_STRCOLL 1 + +/* #undef STRCOLL_BROKEN */ + +/* Define if you have the strpbrk function. */ +#define HAVE_STRPBRK 1 + +/* Define if you have the tcgetattr function. */ +#define HAVE_TCGETATTR 1 + +/* Define if you have the towlower function. */ +#define HAVE_TOWLOWER 1 + +/* Define if you have the towupper function. */ +#define HAVE_TOWUPPER 1 + +/* Define if you have the vsnprintf function. */ +#define HAVE_VSNPRINTF 1 + +/* Define if you have the wcrtomb function. */ +#define HAVE_WCRTOMB 1 + +/* Define if you have the wcscoll function. */ +#define HAVE_WCSCOLL 1 + +/* Define if you have the wctype function. */ +#define HAVE_WCTYPE 1 + +/* Define if you have the wcwidth function. */ +#define HAVE_WCWIDTH 1 + +/* and whether it works */ +/* #undef WCWIDTH_BROKEN */ + +#define STDC_HEADERS 1 + +/* Define if you have the header file. */ +#define HAVE_DIRENT_H 1 + +/* Define if you have the header file. */ +#define HAVE_FCNTL_H 1 + +/* Define if you have the header file. */ +#define HAVE_LANGINFO_H 1 + +/* Define if you have the header file. */ +#define HAVE_LIMITS_H 1 + +/* Define if you have the header file. */ +#define HAVE_LOCALE_H 1 + +/* Define if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define if you have the header file. */ +/* #undef HAVE_NDIR_H */ + +/* Define if you have the header file. */ +#define HAVE_PWD_H 1 + +/* Define if you have the header file. */ +#define HAVE_STDARG_H 1 + +/* Define if you have the header file. */ +#define HAVE_STDBOOL_H 1 + +/* Define if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define if you have the header file. */ +/* #undef HAVE_SYS_DIR_H */ + +/* Define if you have the header file. */ +#define HAVE_SYS_FILE_H 1 + +/* Define if you have the header file. */ +/* #undef HAVE_SYS_NDIR_H */ + +/* Define if you have the header file. */ +/* #undef HAVE_SYS_PTE_H */ + +/* Define if you have the header file. */ +/* #undef HAVE_SYS_PTEM_H */ + +/* Define if you have the header file. */ +#define HAVE_SYS_SELECT_H 1 + +/* Define if you have the header file. */ +/* #undef HAVE_SYS_STREAM_H */ + +/* Define if you have the header file. */ +/* #undef HAVE_TERMCAP_H */ + +/* Define if you have the header file. */ +#define HAVE_TERMIO_H 1 + +/* Define if you have the header file. */ +#define HAVE_TERMIOS_H 1 + +/* Define if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define if you have the header file. */ +/* #undef HAVE_VARARGS_H */ + +/* Define if you have the header file. */ +#define HAVE_WCHAR_H 1 + +/* Define if you have the header file. */ +#define HAVE_WCTYPE_H 1 + +#define HAVE_MBSTATE_T 1 + +/* Define if you have wchar_t in . */ +#define HAVE_WCHAR_T 1 + +/* Define if you have wctype_t in . */ +#define HAVE_WCTYPE_T 1 + +/* Define if you have wint_t in . */ +#define HAVE_WINT_T 1 + +/* Define if you have and nl_langinfo(CODESET). */ +#define HAVE_LANGINFO_CODESET 1 + +/* Define if you have and it defines AUDIT_USER_TTY */ +#define HAVE_DECL_AUDIT_USER_TTY 1 + +/* Definitions pulled in from aclocal.m4. */ +#define VOID_SIGHANDLER 1 + +#define GWINSZ_IN_SYS_IOCTL 1 + +#define STRUCT_WINSIZE_IN_SYS_IOCTL 1 + +/* #undef STRUCT_WINSIZE_IN_TERMIOS */ + +/* #undef TIOCSTAT_IN_SYS_IOCTL */ + +#define FIONREAD_IN_SYS_IOCTL 1 + +/* #undef SPEED_T_IN_SYS_TYPES */ + +#define HAVE_GETPW_DECLS 1 + +/* #undef STRUCT_DIRENT_HAS_D_INO */ + +/* #undef STRUCT_DIRENT_HAS_D_FILENO */ + +/* #undef HAVE_BSD_SIGNALS */ + +#define HAVE_POSIX_SIGNALS 1 + +/* #undef HAVE_USG_SIGHOLD */ + +/* #undef MUST_REINSTALL_SIGHANDLERS */ + +#define HAVE_POSIX_SIGSETJMP 1 + +#define CTYPE_NON_ASCII 1 + +/* modify settings or make new ones based on what autoconf tells us. */ + +/* Ultrix botches type-ahead when switching from canonical to + non-canonical mode, at least through version 4.3 */ +#if !defined (HAVE_TERMIOS_H) || !defined (HAVE_TCGETATTR) || defined (ultrix) +# define TERMIOS_MISSING +#endif + +/* VARARGS defines moved to rlstdc.h */ diff --git a/src/readline/histlib.h b/src/readline/histlib.h new file mode 100644 index 0000000..ab009c5 --- /dev/null +++ b/src/readline/histlib.h @@ -0,0 +1,82 @@ +/* histlib.h -- internal definitions for the history library. */ + +/* Copyright (C) 1989-2009 Free Software Foundation, Inc. + + This file contains the GNU History Library (History), a set of + routines for managing the text of previously typed lines. + + History is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + History is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with History. If not, see . +*/ + +#if !defined (_HISTLIB_H_) +#define _HISTLIB_H_ + +#if defined (HAVE_STRING_H) +# include +#else +# include +#endif /* !HAVE_STRING_H */ + +#if !defined (STREQ) +#define STREQ(a, b) (((a)[0] == (b)[0]) && (strcmp ((a), (b)) == 0)) +#define STREQN(a, b, n) (((n) == 0) ? (1) \ + : ((a)[0] == (b)[0]) && (strncmp ((a), (b), (n)) == 0)) +#endif + +#ifndef savestring +#define savestring(x) strcpy (xmalloc (1 + strlen (x)), (x)) +#endif + +#ifndef whitespace +#define whitespace(c) (((c) == ' ') || ((c) == '\t')) +#endif + +#ifndef _rl_digit_p +#define _rl_digit_p(c) ((c) >= '0' && (c) <= '9') +#endif + +#ifndef _rl_digit_value +#define _rl_digit_value(c) ((c) - '0') +#endif + +#ifndef member +# ifndef strchr +extern char *strchr (); +# endif +#define member(c, s) ((c) ? ((char *)strchr ((s), (c)) != (char *)NULL) : 0) +#endif + +#ifndef FREE +# define FREE(x) if (x) free (x) +#endif + +/* Possible history errors passed to hist_error. */ +#define EVENT_NOT_FOUND 0 +#define BAD_WORD_SPEC 1 +#define SUBST_FAILED 2 +#define BAD_MODIFIER 3 +#define NO_PREV_SUBST 4 + +/* Possible definitions for history starting point specification. */ +#define ANCHORED_SEARCH 1 +#define NON_ANCHORED_SEARCH 0 + +/* Possible definitions for what style of writing the history file we want. */ +#define HISTORY_APPEND 0 +#define HISTORY_OVERWRITE 1 + +/* Some variable definitions shared across history source files. */ +extern int history_offset; + +#endif /* !_HISTLIB_H_ */ diff --git a/src/readline/history.h b/src/readline/history.h new file mode 100644 index 0000000..79618e3 --- /dev/null +++ b/src/readline/history.h @@ -0,0 +1,266 @@ +/* history.h -- the names of functions that you can call in history. */ + +/* Copyright (C) 1989-2009 Free Software Foundation, Inc. + + This file contains the GNU History Library (History), a set of + routines for managing the text of previously typed lines. + + History is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + History is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with History. If not, see . +*/ + +#ifndef _HISTORY_H_ +#define _HISTORY_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include /* XXX - for history timestamp code */ + +#if defined READLINE_LIBRARY +# include "rlstdc.h" +# include "rltypedefs.h" +#else +# include +# include +#endif + +#ifdef __STDC__ +typedef void *histdata_t; +#else +typedef char *histdata_t; +#endif + +/* The structure used to store a history entry. */ +typedef struct _hist_entry { + char *line; + char *timestamp; /* char * rather than time_t for read/write */ + histdata_t data; +} HIST_ENTRY; + +/* Size of the history-library-managed space in history entry HS. */ +#define HISTENT_BYTES(hs) (strlen ((hs)->line) + strlen ((hs)->timestamp)) + +/* A structure used to pass the current state of the history stuff around. */ +typedef struct _hist_state { + HIST_ENTRY **entries; /* Pointer to the entries themselves. */ + int offset; /* The location pointer within this array. */ + int length; /* Number of elements within this array. */ + int size; /* Number of slots allocated to this array. */ + int flags; +} HISTORY_STATE; + +/* Flag values for the `flags' member of HISTORY_STATE. */ +#define HS_STIFLED 0x01 + +/* Initialization and state management. */ + +/* Begin a session in which the history functions might be used. This + just initializes the interactive variables. */ +extern void using_history PARAMS((void)); + +/* Return the current HISTORY_STATE of the history. */ +extern HISTORY_STATE *history_get_history_state PARAMS((void)); + +/* Set the state of the current history array to STATE. */ +extern void history_set_history_state PARAMS((HISTORY_STATE *)); + +/* Manage the history list. */ + +/* Place STRING at the end of the history list. + The associated data field (if any) is set to NULL. */ +extern void add_history PARAMS((const char *)); + +/* Change the timestamp associated with the most recent history entry to + STRING. */ +extern void add_history_time PARAMS((const char *)); + +/* A reasonably useless function, only here for completeness. WHICH + is the magic number that tells us which element to delete. The + elements are numbered from 0. */ +extern HIST_ENTRY *remove_history PARAMS((int)); + +/* Free the history entry H and return any application-specific data + associated with it. */ +extern histdata_t free_history_entry PARAMS((HIST_ENTRY *)); + +/* Make the history entry at WHICH have LINE and DATA. This returns + the old entry so you can dispose of the data. In the case of an + invalid WHICH, a NULL pointer is returned. */ +extern HIST_ENTRY *replace_history_entry PARAMS((int, const char *, histdata_t)); + +/* Clear the history list and start over. */ +extern void clear_history PARAMS((void)); + +/* Stifle the history list, remembering only MAX number of entries. */ +extern void stifle_history PARAMS((int)); + +/* Stop stifling the history. This returns the previous amount the + history was stifled by. The value is positive if the history was + stifled, negative if it wasn't. */ +extern int unstifle_history PARAMS((void)); + +/* Return 1 if the history is stifled, 0 if it is not. */ +extern int history_is_stifled PARAMS((void)); + +/* Information about the history list. */ + +/* Return a NULL terminated array of HIST_ENTRY which is the current input + history. Element 0 of this list is the beginning of time. If there + is no history, return NULL. */ +extern HIST_ENTRY **history_list PARAMS((void)); + +/* Returns the number which says what history element we are now + looking at. */ +extern int where_history PARAMS((void)); + +/* Return the history entry at the current position, as determined by + history_offset. If there is no entry there, return a NULL pointer. */ +extern HIST_ENTRY *current_history PARAMS((void)); + +/* Return the history entry which is logically at OFFSET in the history + array. OFFSET is relative to history_base. */ +extern HIST_ENTRY *history_get PARAMS((int)); + +/* Return the timestamp associated with the HIST_ENTRY * passed as an + argument */ +extern time_t history_get_time PARAMS((HIST_ENTRY *)); + +/* Return the number of bytes that the primary history entries are using. + This just adds up the lengths of the_history->lines. */ +extern int history_total_bytes PARAMS((void)); + +/* Moving around the history list. */ + +/* Set the position in the history list to POS. */ +extern int history_set_pos PARAMS((int)); + +/* Back up history_offset to the previous history entry, and return + a pointer to that entry. If there is no previous entry, return + a NULL pointer. */ +extern HIST_ENTRY *previous_history PARAMS((void)); + +/* Move history_offset forward to the next item in the input_history, + and return the a pointer to that entry. If there is no next entry, + return a NULL pointer. */ +extern HIST_ENTRY *next_history PARAMS((void)); + +/* Searching the history list. */ + +/* Search the history for STRING, starting at history_offset. + If DIRECTION < 0, then the search is through previous entries, + else through subsequent. If the string is found, then + current_history () is the history entry, and the value of this function + is the offset in the line of that history entry that the string was + found in. Otherwise, nothing is changed, and a -1 is returned. */ +extern int history_search PARAMS((const char *, int)); + +/* Search the history for STRING, starting at history_offset. + The search is anchored: matching lines must begin with string. + DIRECTION is as in history_search(). */ +extern int history_search_prefix PARAMS((const char *, int)); + +/* Search for STRING in the history list, starting at POS, an + absolute index into the list. DIR, if negative, says to search + backwards from POS, else forwards. + Returns the absolute index of the history element where STRING + was found, or -1 otherwise. */ +extern int history_search_pos PARAMS((const char *, int, int)); + +/* Managing the history file. */ + +/* Add the contents of FILENAME to the history list, a line at a time. + If FILENAME is NULL, then read from ~/.history. Returns 0 if + successful, or errno if not. */ +extern int read_history PARAMS((const char *)); + +/* Read a range of lines from FILENAME, adding them to the history list. + Start reading at the FROM'th line and end at the TO'th. If FROM + is zero, start at the beginning. If TO is less than FROM, read + until the end of the file. If FILENAME is NULL, then read from + ~/.history. Returns 0 if successful, or errno if not. */ +extern int read_history_range PARAMS((const char *, int, int)); + +/* Write the current history to FILENAME. If FILENAME is NULL, + then write the history list to ~/.history. Values returned + are as in read_history (). */ +extern int write_history PARAMS((const char *)); + +/* Append NELEMENT entries to FILENAME. The entries appended are from + the end of the list minus NELEMENTs up to the end of the list. */ +extern int append_history PARAMS((int, const char *)); + +/* Truncate the history file, leaving only the last NLINES lines. */ +extern int history_truncate_file PARAMS((const char *, int)); + +/* History expansion. */ + +/* Expand the string STRING, placing the result into OUTPUT, a pointer + to a string. Returns: + + 0) If no expansions took place (or, if the only change in + the text was the de-slashifying of the history expansion + character) + 1) If expansions did take place + -1) If there was an error in expansion. + 2) If the returned line should just be printed. + + If an error occurred in expansion, then OUTPUT contains a descriptive + error message. */ +extern int history_expand PARAMS((char *, char **)); + +/* Extract a string segment consisting of the FIRST through LAST + arguments present in STRING. Arguments are broken up as in + the shell. */ +extern char *history_arg_extract PARAMS((int, int, const char *)); + +/* Return the text of the history event beginning at the current + offset into STRING. Pass STRING with *INDEX equal to the + history_expansion_char that begins this specification. + DELIMITING_QUOTE is a character that is allowed to end the string + specification for what to search for in addition to the normal + characters `:', ` ', `\t', `\n', and sometimes `?'. */ +extern char *get_history_event PARAMS((const char *, int *, int)); + +/* Return an array of tokens, much as the shell might. The tokens are + parsed out of STRING. */ +extern char **history_tokenize PARAMS((const char *)); + +/* Exported history variables. */ +extern int history_base; +extern int history_length; +extern int history_max_entries; +extern char history_expansion_char; +extern char history_subst_char; +extern char *history_word_delimiters; +extern char history_comment_char; +extern char *history_no_expand_chars; +extern char *history_search_delimiter_chars; +extern int history_quotes_inhibit_expansion; + +extern int history_write_timestamps; + +/* Backwards compatibility */ +extern int max_input_history; + +/* If set, this function is called to decide whether or not a particular + history expansion should be treated as a special case for the calling + application and not expanded. */ +extern rl_linebuf_func_t *history_inhibit_expansion_function; + +#ifdef __cplusplus +} +#endif + +#endif /* !_HISTORY_H_ */ diff --git a/src/readline/keymaps.h b/src/readline/keymaps.h new file mode 100644 index 0000000..119f93f --- /dev/null +++ b/src/readline/keymaps.h @@ -0,0 +1,97 @@ +/* keymaps.h -- Manipulation of readline keymaps. */ + +/* Copyright (C) 1987, 1989, 1992 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library (Readline), a library + for reading lines of text with interactive input and history editing. + + Readline is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Readline is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Readline. If not, see . +*/ + +#ifndef _KEYMAPS_H_ +#define _KEYMAPS_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#if defined (READLINE_LIBRARY) +# include "rlstdc.h" +# include "chardefs.h" +# include "rltypedefs.h" +#else +# include +# include +# include +#endif + +/* A keymap contains one entry for each key in the ASCII set. + Each entry consists of a type and a pointer. + FUNCTION is the address of a function to run, or the + address of a keymap to indirect through. + TYPE says which kind of thing FUNCTION is. */ +typedef struct _keymap_entry { + char type; + rl_command_func_t *function; +} KEYMAP_ENTRY; + +/* This must be large enough to hold bindings for all of the characters + in a desired character set (e.g, 128 for ASCII, 256 for ISO Latin-x, + and so on) plus one for subsequence matching. */ +#define KEYMAP_SIZE 257 +#define ANYOTHERKEY KEYMAP_SIZE-1 + +typedef KEYMAP_ENTRY KEYMAP_ENTRY_ARRAY[KEYMAP_SIZE]; +typedef KEYMAP_ENTRY *Keymap; + +/* The values that TYPE can have in a keymap entry. */ +#define ISFUNC 0 +#define ISKMAP 1 +#define ISMACR 2 + +extern KEYMAP_ENTRY_ARRAY emacs_standard_keymap, emacs_meta_keymap, emacs_ctlx_keymap; +extern KEYMAP_ENTRY_ARRAY vi_insertion_keymap, vi_movement_keymap; + +/* Return a new, empty keymap. + Free it with free() when you are done. */ +extern Keymap rl_make_bare_keymap PARAMS((void)); + +/* Return a new keymap which is a copy of MAP. */ +extern Keymap rl_copy_keymap PARAMS((Keymap)); + +/* Return a new keymap with the printing characters bound to rl_insert, + the lowercase Meta characters bound to run their equivalents, and + the Meta digits bound to produce numeric arguments. */ +extern Keymap rl_make_keymap PARAMS((void)); + +/* Free the storage associated with a keymap. */ +extern void rl_discard_keymap PARAMS((Keymap)); + +/* These functions actually appear in bind.c */ + +/* Return the keymap corresponding to a given name. Names look like + `emacs' or `emacs-meta' or `vi-insert'. */ +extern Keymap rl_get_keymap_by_name PARAMS((const char *)); + +/* Return the current keymap. */ +extern Keymap rl_get_keymap PARAMS((void)); + +/* Set the current keymap to MAP. */ +extern void rl_set_keymap PARAMS((Keymap)); + +#ifdef __cplusplus +} +#endif + +#endif /* _KEYMAPS_H_ */ diff --git a/src/readline/parse-colors.h b/src/readline/parse-colors.h new file mode 100644 index 0000000..7ba1fa6 --- /dev/null +++ b/src/readline/parse-colors.h @@ -0,0 +1,46 @@ +/* `dir', `vdir' and `ls' directory listing programs for GNU. + + Modified by Chet Ramey for Readline. + + Copyright (C) 1985, 1988, 1990-1991, 1995-2010, 2012 Free Software Foundation, + Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Richard Stallman and David MacKenzie. */ + +/* Color support by Peter Anvin and Dennis + Flaherty based on original patches by + Greg Lee . */ + +#ifndef _PARSE_COLORS_H_ +#define _PARSE_COLORS_H_ + +#include "readline.h" + +#define LEN_STR_PAIR(s) sizeof (s) - 1, s + +void _rl_parse_colors (void); + +static const char *const indicator_name[]= + { + "lc", "rc", "ec", "rs", "no", "fi", "di", "ln", "pi", "so", + "bd", "cd", "mi", "or", "ex", "do", "su", "sg", "st", + "ow", "tw", "ca", "mh", "cl", NULL + }; + +/* Buffer for color sequences */ +static char *color_buf; + +#endif /* !_PARSE_COLORS_H_ */ diff --git a/src/readline/posixdir.h b/src/readline/posixdir.h new file mode 100644 index 0000000..f4c82ff --- /dev/null +++ b/src/readline/posixdir.h @@ -0,0 +1,71 @@ +/* posixdir.h -- Posix directory reading includes and defines. */ + +/* Copyright (C) 1987,1991,2012 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Bash is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Bash. If not, see . +*/ + +/* This file should be included instead of or . */ + +#if !defined (_POSIXDIR_H_) +#define _POSIXDIR_H_ + +#if defined (HAVE_DIRENT_H) +# include +# if defined (HAVE_STRUCT_DIRENT_D_NAMLEN) +# define D_NAMLEN(d) ((d)->d_namlen) +# else +# define D_NAMLEN(d) (strlen ((d)->d_name)) +# endif /* !HAVE_STRUCT_DIRENT_D_NAMLEN */ +#else +# if defined (HAVE_SYS_NDIR_H) +# include +# endif +# if defined (HAVE_SYS_DIR_H) +# include +# endif +# if defined (HAVE_NDIR_H) +# include +# endif +# if !defined (dirent) +# define dirent direct +# endif /* !dirent */ +# define D_NAMLEN(d) ((d)->d_namlen) +#endif /* !HAVE_DIRENT_H */ + +/* The bash code fairly consistenly uses d_fileno; make sure it's available */ +#if defined (HAVE_STRUCT_DIRENT_D_INO) && !defined (HAVE_STRUCT_DIRENT_D_FILENO) +# define d_fileno d_ino +#endif + +/* Posix does not require that the d_ino field be present, and some + systems do not provide it. */ +#if !defined (HAVE_STRUCT_DIRENT_D_INO) || defined (BROKEN_DIRENT_D_INO) +# define REAL_DIR_ENTRY(dp) 1 +#else +# define REAL_DIR_ENTRY(dp) (dp->d_ino != 0) +#endif /* _POSIX_SOURCE */ + +#if defined (HAVE_STRUCT_DIRENT_D_INO) && !defined (BROKEN_DIRENT_D_INO) +# define D_INO_AVAILABLE +#endif + +/* Signal the rest of the code that it can safely use dirent.d_fileno */ +#if defined (D_INO_AVAILABLE) || defined (HAVE_STRUCT_DIRENT_D_FILENO) +# define D_FILENO_AVAILABLE 1 +#endif + +#endif /* !_POSIXDIR_H_ */ diff --git a/src/readline/posixjmp.h b/src/readline/posixjmp.h new file mode 100644 index 0000000..18fa762 --- /dev/null +++ b/src/readline/posixjmp.h @@ -0,0 +1,42 @@ +/* posixjmp.h -- wrapper for setjmp.h with changes for POSIX systems. */ + +/* Copyright (C) 1987,1991 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Bash is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Bash. If not, see . +*/ + +#ifndef _POSIXJMP_H_ +#define _POSIXJMP_H_ + +#include + +/* This *must* be included *after* config.h */ + +#if defined (HAVE_POSIX_SIGSETJMP) +# define procenv_t sigjmp_buf +# if !defined (__OPENNT) +# undef setjmp +# define setjmp(x) sigsetjmp((x), 1) +# define setjmp_nosigs(x) sigsetjmp((x), 0) +# undef longjmp +# define longjmp(x, n) siglongjmp((x), (n)) +# endif /* !__OPENNT */ +#else +# define procenv_t jmp_buf +# define setjmp_nosigs setjmp +#endif + +#endif /* _POSIXJMP_H_ */ diff --git a/src/readline/posixselect.h b/src/readline/posixselect.h new file mode 100644 index 0000000..51c4cd8 --- /dev/null +++ b/src/readline/posixselect.h @@ -0,0 +1,47 @@ +/* posixselect.h -- wrapper for select(2) includes and definitions */ + +/* Copyright (C) 2009 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Bash is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Bash. If not, see . +*/ + +#ifndef _POSIXSELECT_H_ +#define _POSIXSELECT_H_ + +#if defined (FD_SET) && !defined (HAVE_SELECT) +# define HAVE_SELECT 1 +#endif + +#if defined (HAVE_SELECT) +# if !defined (HAVE_SYS_SELECT_H) || !defined (M_UNIX) +# include +# endif +#endif /* HAVE_SELECT */ +#if defined (HAVE_SYS_SELECT_H) +# include +#endif + +#ifndef USEC_PER_SEC +# define USEC_PER_SEC 1000000 +#endif + +#define USEC_TO_TIMEVAL(us, tv) \ +do { \ + (tv).tv_sec = (us) / USEC_PER_SEC; \ + (tv).tv_usec = (us) % USEC_PER_SEC; \ +} while (0) + +#endif /* _POSIXSELECT_H_ */ diff --git a/src/readline/posixstat.h b/src/readline/posixstat.h new file mode 100644 index 0000000..e75ba5f --- /dev/null +++ b/src/readline/posixstat.h @@ -0,0 +1,142 @@ +/* posixstat.h -- Posix stat(2) definitions for systems that + don't have them. */ + +/* Copyright (C) 1987,1991 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Bash is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Bash. If not, see . +*/ + +/* This file should be included instead of . + It relies on the local sys/stat.h to work though. */ +#if !defined (_POSIXSTAT_H_) +#define _POSIXSTAT_H_ + +#include + +#if defined (STAT_MACROS_BROKEN) +# undef S_ISBLK +# undef S_ISCHR +# undef S_ISDIR +# undef S_ISFIFO +# undef S_ISREG +# undef S_ISLNK +#endif /* STAT_MACROS_BROKEN */ + +/* These are guaranteed to work only on isc386 */ +#if !defined (S_IFDIR) && !defined (S_ISDIR) +# define S_IFDIR 0040000 +#endif /* !S_IFDIR && !S_ISDIR */ +#if !defined (S_IFMT) +# define S_IFMT 0170000 +#endif /* !S_IFMT */ + +/* Posix 1003.1 5.6.1.1 file types */ + +/* Some Posix-wannabe systems define _S_IF* macros instead of S_IF*, but + do not provide the S_IS* macros that Posix requires. */ + +#if defined (_S_IFMT) && !defined (S_IFMT) +#define S_IFMT _S_IFMT +#endif +#if defined (_S_IFIFO) && !defined (S_IFIFO) +#define S_IFIFO _S_IFIFO +#endif +#if defined (_S_IFCHR) && !defined (S_IFCHR) +#define S_IFCHR _S_IFCHR +#endif +#if defined (_S_IFDIR) && !defined (S_IFDIR) +#define S_IFDIR _S_IFDIR +#endif +#if defined (_S_IFBLK) && !defined (S_IFBLK) +#define S_IFBLK _S_IFBLK +#endif +#if defined (_S_IFREG) && !defined (S_IFREG) +#define S_IFREG _S_IFREG +#endif +#if defined (_S_IFLNK) && !defined (S_IFLNK) +#define S_IFLNK _S_IFLNK +#endif +#if defined (_S_IFSOCK) && !defined (S_IFSOCK) +#define S_IFSOCK _S_IFSOCK +#endif + +/* Test for each symbol individually and define the ones necessary (some + systems claiming Posix compatibility define some but not all). */ + +#if defined (S_IFBLK) && !defined (S_ISBLK) +#define S_ISBLK(m) (((m)&S_IFMT) == S_IFBLK) /* block device */ +#endif + +#if defined (S_IFCHR) && !defined (S_ISCHR) +#define S_ISCHR(m) (((m)&S_IFMT) == S_IFCHR) /* character device */ +#endif + +#if defined (S_IFDIR) && !defined (S_ISDIR) +#define S_ISDIR(m) (((m)&S_IFMT) == S_IFDIR) /* directory */ +#endif + +#if defined (S_IFREG) && !defined (S_ISREG) +#define S_ISREG(m) (((m)&S_IFMT) == S_IFREG) /* file */ +#endif + +#if defined (S_IFIFO) && !defined (S_ISFIFO) +#define S_ISFIFO(m) (((m)&S_IFMT) == S_IFIFO) /* fifo - named pipe */ +#endif + +#if defined (S_IFLNK) && !defined (S_ISLNK) +#define S_ISLNK(m) (((m)&S_IFMT) == S_IFLNK) /* symbolic link */ +#endif + +#if defined (S_IFSOCK) && !defined (S_ISSOCK) +#define S_ISSOCK(m) (((m)&S_IFMT) == S_IFSOCK) /* socket */ +#endif + +/* + * POSIX 1003.1 5.6.1.2 File Modes + */ + +#if !defined (S_IRWXU) +# if !defined (S_IREAD) +# define S_IREAD 00400 +# define S_IWRITE 00200 +# define S_IEXEC 00100 +# endif /* S_IREAD */ + +# if !defined (S_IRUSR) +# define S_IRUSR S_IREAD /* read, owner */ +# define S_IWUSR S_IWRITE /* write, owner */ +# define S_IXUSR S_IEXEC /* execute, owner */ + +# define S_IRGRP (S_IREAD >> 3) /* read, group */ +# define S_IWGRP (S_IWRITE >> 3) /* write, group */ +# define S_IXGRP (S_IEXEC >> 3) /* execute, group */ + +# define S_IROTH (S_IREAD >> 6) /* read, other */ +# define S_IWOTH (S_IWRITE >> 6) /* write, other */ +# define S_IXOTH (S_IEXEC >> 6) /* execute, other */ +# endif /* !S_IRUSR */ + +# define S_IRWXU (S_IRUSR | S_IWUSR | S_IXUSR) +# define S_IRWXG (S_IRGRP | S_IWGRP | S_IXGRP) +# define S_IRWXO (S_IROTH | S_IWOTH | S_IXOTH) +#endif /* !S_IRWXU */ + +/* These are non-standard, but are used in builtins.c$symbolic_umask() */ +#define S_IRUGO (S_IRUSR | S_IRGRP | S_IROTH) +#define S_IWUGO (S_IWUSR | S_IWGRP | S_IWOTH) +#define S_IXUGO (S_IXUSR | S_IXGRP | S_IXOTH) + +#endif /* _POSIXSTAT_H_ */ diff --git a/src/readline/readline.h b/src/readline/readline.h new file mode 100644 index 0000000..8961221 --- /dev/null +++ b/src/readline/readline.h @@ -0,0 +1,923 @@ +/* Readline.h -- the names of functions callable from within readline. */ + +/* Copyright (C) 1987-2013 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library (Readline), a library + for reading lines of text with interactive input and history editing. + + Readline is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Readline is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Readline. If not, see . +*/ + +#if !defined (_READLINE_H_) +#define _READLINE_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#if defined (READLINE_LIBRARY) +# include "rlstdc.h" +# include "rltypedefs.h" +# include "keymaps.h" +# include "tilde.h" +#else +# include +# include +# include +# include +#endif + +/* Hex-encoded Readline version number. */ +#define RL_READLINE_VERSION 0x0603 /* Readline 6.3 */ +#define RL_VERSION_MAJOR 6 +#define RL_VERSION_MINOR 3 + +/* Readline data structures. */ + +/* Maintaining the state of undo. We remember individual deletes and inserts + on a chain of things to do. */ + +/* The actions that undo knows how to undo. Notice that UNDO_DELETE means + to insert some text, and UNDO_INSERT means to delete some text. I.e., + the code tells undo what to undo, not how to undo it. */ +enum undo_code { UNDO_DELETE, UNDO_INSERT, UNDO_BEGIN, UNDO_END }; + +/* What an element of THE_UNDO_LIST looks like. */ +typedef struct undo_list { + struct undo_list *next; + int start, end; /* Where the change took place. */ + char *text; /* The text to insert, if undoing a delete. */ + enum undo_code what; /* Delete, Insert, Begin, End. */ +} UNDO_LIST; + +/* The current undo list for RL_LINE_BUFFER. */ +extern UNDO_LIST *rl_undo_list; + +/* The data structure for mapping textual names to code addresses. */ +typedef struct _funmap { + const char *name; + rl_command_func_t *function; +} FUNMAP; + +extern FUNMAP **funmap; + +/* **************************************************************** */ +/* */ +/* Functions available to bind to key sequences */ +/* */ +/* **************************************************************** */ + +/* Bindable commands for numeric arguments. */ +extern int rl_digit_argument PARAMS((int, int)); +extern int rl_universal_argument PARAMS((int, int)); + +/* Bindable commands for moving the cursor. */ +extern int rl_forward_byte PARAMS((int, int)); +extern int rl_forward_char PARAMS((int, int)); +extern int rl_forward PARAMS((int, int)); +extern int rl_backward_byte PARAMS((int, int)); +extern int rl_backward_char PARAMS((int, int)); +extern int rl_backward PARAMS((int, int)); +extern int rl_beg_of_line PARAMS((int, int)); +extern int rl_end_of_line PARAMS((int, int)); +extern int rl_forward_word PARAMS((int, int)); +extern int rl_backward_word PARAMS((int, int)); +extern int rl_refresh_line PARAMS((int, int)); +extern int rl_clear_screen PARAMS((int, int)); +extern int rl_skip_csi_sequence PARAMS((int, int)); +extern int rl_arrow_keys PARAMS((int, int)); + +/* Bindable commands for inserting and deleting text. */ +extern int rl_insert PARAMS((int, int)); +extern int rl_quoted_insert PARAMS((int, int)); +extern int rl_tab_insert PARAMS((int, int)); +extern int rl_newline PARAMS((int, int)); +extern int rl_do_lowercase_version PARAMS((int, int)); +extern int rl_rubout PARAMS((int, int)); +extern int rl_delete PARAMS((int, int)); +extern int rl_rubout_or_delete PARAMS((int, int)); +extern int rl_delete_horizontal_space PARAMS((int, int)); +extern int rl_delete_or_show_completions PARAMS((int, int)); +extern int rl_insert_comment PARAMS((int, int)); + +/* Bindable commands for changing case. */ +extern int rl_upcase_word PARAMS((int, int)); +extern int rl_downcase_word PARAMS((int, int)); +extern int rl_capitalize_word PARAMS((int, int)); + +/* Bindable commands for transposing characters and words. */ +extern int rl_transpose_words PARAMS((int, int)); +extern int rl_transpose_chars PARAMS((int, int)); + +/* Bindable commands for searching within a line. */ +extern int rl_char_search PARAMS((int, int)); +extern int rl_backward_char_search PARAMS((int, int)); + +/* Bindable commands for readline's interface to the command history. */ +extern int rl_beginning_of_history PARAMS((int, int)); +extern int rl_end_of_history PARAMS((int, int)); +extern int rl_get_next_history PARAMS((int, int)); +extern int rl_get_previous_history PARAMS((int, int)); + +/* Bindable commands for managing the mark and region. */ +extern int rl_set_mark PARAMS((int, int)); +extern int rl_exchange_point_and_mark PARAMS((int, int)); + +/* Bindable commands to set the editing mode (emacs or vi). */ +extern int rl_vi_editing_mode PARAMS((int, int)); +extern int rl_emacs_editing_mode PARAMS((int, int)); + +/* Bindable commands to change the insert mode (insert or overwrite) */ +extern int rl_overwrite_mode PARAMS((int, int)); + +/* Bindable commands for managing key bindings. */ +extern int rl_re_read_init_file PARAMS((int, int)); +extern int rl_dump_functions PARAMS((int, int)); +extern int rl_dump_macros PARAMS((int, int)); +extern int rl_dump_variables PARAMS((int, int)); + +/* Bindable commands for word completion. */ +extern int rl_complete PARAMS((int, int)); +extern int rl_possible_completions PARAMS((int, int)); +extern int rl_insert_completions PARAMS((int, int)); +extern int rl_old_menu_complete PARAMS((int, int)); +extern int rl_menu_complete PARAMS((int, int)); +extern int rl_backward_menu_complete PARAMS((int, int)); + +/* Bindable commands for killing and yanking text, and managing the kill ring. */ +extern int rl_kill_word PARAMS((int, int)); +extern int rl_backward_kill_word PARAMS((int, int)); +extern int rl_kill_line PARAMS((int, int)); +extern int rl_backward_kill_line PARAMS((int, int)); +extern int rl_kill_full_line PARAMS((int, int)); +extern int rl_unix_word_rubout PARAMS((int, int)); +extern int rl_unix_filename_rubout PARAMS((int, int)); +extern int rl_unix_line_discard PARAMS((int, int)); +extern int rl_copy_region_to_kill PARAMS((int, int)); +extern int rl_kill_region PARAMS((int, int)); +extern int rl_copy_forward_word PARAMS((int, int)); +extern int rl_copy_backward_word PARAMS((int, int)); +extern int rl_yank PARAMS((int, int)); +extern int rl_yank_pop PARAMS((int, int)); +extern int rl_yank_nth_arg PARAMS((int, int)); +extern int rl_yank_last_arg PARAMS((int, int)); +/* Not available unless __CYGWIN__ is defined. */ +#ifdef __CYGWIN__ +extern int rl_paste_from_clipboard PARAMS((int, int)); +#endif + +/* Bindable commands for incremental searching. */ +extern int rl_reverse_search_history PARAMS((int, int)); +extern int rl_forward_search_history PARAMS((int, int)); + +/* Bindable keyboard macro commands. */ +extern int rl_start_kbd_macro PARAMS((int, int)); +extern int rl_end_kbd_macro PARAMS((int, int)); +extern int rl_call_last_kbd_macro PARAMS((int, int)); +extern int rl_print_last_kbd_macro PARAMS((int, int)); + +/* Bindable undo commands. */ +extern int rl_revert_line PARAMS((int, int)); +extern int rl_undo_command PARAMS((int, int)); + +/* Bindable tilde expansion commands. */ +extern int rl_tilde_expand PARAMS((int, int)); + +/* Bindable terminal control commands. */ +extern int rl_restart_output PARAMS((int, int)); +extern int rl_stop_output PARAMS((int, int)); + +/* Miscellaneous bindable commands. */ +extern int rl_abort PARAMS((int, int)); +extern int rl_tty_status PARAMS((int, int)); + +/* Bindable commands for incremental and non-incremental history searching. */ +extern int rl_history_search_forward PARAMS((int, int)); +extern int rl_history_search_backward PARAMS((int, int)); +extern int rl_history_substr_search_forward PARAMS((int, int)); +extern int rl_history_substr_search_backward PARAMS((int, int)); +extern int rl_noninc_forward_search PARAMS((int, int)); +extern int rl_noninc_reverse_search PARAMS((int, int)); +extern int rl_noninc_forward_search_again PARAMS((int, int)); +extern int rl_noninc_reverse_search_again PARAMS((int, int)); + +/* Bindable command used when inserting a matching close character. */ +extern int rl_insert_close PARAMS((int, int)); + +/* Not available unless READLINE_CALLBACKS is defined. */ +extern void rl_callback_handler_install PARAMS((const char *, rl_vcpfunc_t *)); +extern void rl_callback_read_char PARAMS((void)); +extern void rl_callback_handler_remove PARAMS((void)); + +/* Things for vi mode. Not available unless readline is compiled -DVI_MODE. */ +/* VI-mode bindable commands. */ +extern int rl_vi_redo PARAMS((int, int)); +extern int rl_vi_undo PARAMS((int, int)); +extern int rl_vi_yank_arg PARAMS((int, int)); +extern int rl_vi_fetch_history PARAMS((int, int)); +extern int rl_vi_search_again PARAMS((int, int)); +extern int rl_vi_search PARAMS((int, int)); +extern int rl_vi_complete PARAMS((int, int)); +extern int rl_vi_tilde_expand PARAMS((int, int)); +extern int rl_vi_prev_word PARAMS((int, int)); +extern int rl_vi_next_word PARAMS((int, int)); +extern int rl_vi_end_word PARAMS((int, int)); +extern int rl_vi_insert_beg PARAMS((int, int)); +extern int rl_vi_append_mode PARAMS((int, int)); +extern int rl_vi_append_eol PARAMS((int, int)); +extern int rl_vi_eof_maybe PARAMS((int, int)); +extern int rl_vi_insertion_mode PARAMS((int, int)); +extern int rl_vi_insert_mode PARAMS((int, int)); +extern int rl_vi_movement_mode PARAMS((int, int)); +extern int rl_vi_arg_digit PARAMS((int, int)); +extern int rl_vi_change_case PARAMS((int, int)); +extern int rl_vi_put PARAMS((int, int)); +extern int rl_vi_column PARAMS((int, int)); +extern int rl_vi_delete_to PARAMS((int, int)); +extern int rl_vi_change_to PARAMS((int, int)); +extern int rl_vi_yank_to PARAMS((int, int)); +extern int rl_vi_rubout PARAMS((int, int)); +extern int rl_vi_delete PARAMS((int, int)); +extern int rl_vi_back_to_indent PARAMS((int, int)); +extern int rl_vi_first_print PARAMS((int, int)); +extern int rl_vi_char_search PARAMS((int, int)); +extern int rl_vi_match PARAMS((int, int)); +extern int rl_vi_change_char PARAMS((int, int)); +extern int rl_vi_subst PARAMS((int, int)); +extern int rl_vi_overstrike PARAMS((int, int)); +extern int rl_vi_overstrike_delete PARAMS((int, int)); +extern int rl_vi_replace PARAMS((int, int)); +extern int rl_vi_set_mark PARAMS((int, int)); +extern int rl_vi_goto_mark PARAMS((int, int)); + +/* VI-mode utility functions. */ +extern int rl_vi_check PARAMS((void)); +extern int rl_vi_domove PARAMS((int, int *)); +extern int rl_vi_bracktype PARAMS((int)); + +extern void rl_vi_start_inserting PARAMS((int, int, int)); + +/* VI-mode pseudo-bindable commands, used as utility functions. */ +extern int rl_vi_fWord PARAMS((int, int)); +extern int rl_vi_bWord PARAMS((int, int)); +extern int rl_vi_eWord PARAMS((int, int)); +extern int rl_vi_fword PARAMS((int, int)); +extern int rl_vi_bword PARAMS((int, int)); +extern int rl_vi_eword PARAMS((int, int)); + +/* **************************************************************** */ +/* */ +/* Well Published Functions */ +/* */ +/* **************************************************************** */ + +/* Readline functions. */ +/* Read a line of input. Prompt with PROMPT. A NULL PROMPT means none. */ +extern char *readline PARAMS((const char *)); + +extern int rl_set_prompt PARAMS((const char *)); +extern int rl_expand_prompt PARAMS((char *)); + +extern int rl_initialize PARAMS((void)); + +/* Undocumented; unused by readline */ +extern int rl_discard_argument PARAMS((void)); + +/* Utility functions to bind keys to readline commands. */ +extern int rl_add_defun PARAMS((const char *, rl_command_func_t *, int)); +extern int rl_bind_key PARAMS((int, rl_command_func_t *)); +extern int rl_bind_key_in_map PARAMS((int, rl_command_func_t *, Keymap)); +extern int rl_unbind_key PARAMS((int)); +extern int rl_unbind_key_in_map PARAMS((int, Keymap)); +extern int rl_bind_key_if_unbound PARAMS((int, rl_command_func_t *)); +extern int rl_bind_key_if_unbound_in_map PARAMS((int, rl_command_func_t *, Keymap)); +extern int rl_unbind_function_in_map PARAMS((rl_command_func_t *, Keymap)); +extern int rl_unbind_command_in_map PARAMS((const char *, Keymap)); +extern int rl_bind_keyseq PARAMS((const char *, rl_command_func_t *)); +extern int rl_bind_keyseq_in_map PARAMS((const char *, rl_command_func_t *, Keymap)); +extern int rl_bind_keyseq_if_unbound PARAMS((const char *, rl_command_func_t *)); +extern int rl_bind_keyseq_if_unbound_in_map PARAMS((const char *, rl_command_func_t *, Keymap)); +extern int rl_generic_bind PARAMS((int, const char *, char *, Keymap)); + +extern char *rl_variable_value PARAMS((const char *)); +extern int rl_variable_bind PARAMS((const char *, const char *)); + +/* Backwards compatibility, use rl_bind_keyseq_in_map instead. */ +extern int rl_set_key PARAMS((const char *, rl_command_func_t *, Keymap)); + +/* Backwards compatibility, use rl_generic_bind instead. */ +extern int rl_macro_bind PARAMS((const char *, const char *, Keymap)); + +/* Undocumented in the texinfo manual; not really useful to programs. */ +extern int rl_translate_keyseq PARAMS((const char *, char *, int *)); +extern char *rl_untranslate_keyseq PARAMS((int)); + +extern rl_command_func_t *rl_named_function PARAMS((const char *)); +extern rl_command_func_t *rl_function_of_keyseq PARAMS((const char *, Keymap, int *)); + +extern void rl_list_funmap_names PARAMS((void)); +extern char **rl_invoking_keyseqs_in_map PARAMS((rl_command_func_t *, Keymap)); +extern char **rl_invoking_keyseqs PARAMS((rl_command_func_t *)); + +extern void rl_function_dumper PARAMS((int)); +extern void rl_macro_dumper PARAMS((int)); +extern void rl_variable_dumper PARAMS((int)); + +extern int rl_read_init_file PARAMS((const char *)); +extern int rl_parse_and_bind PARAMS((char *)); + +/* Functions for manipulating keymaps. */ +extern Keymap rl_make_bare_keymap PARAMS((void)); +extern Keymap rl_copy_keymap PARAMS((Keymap)); +extern Keymap rl_make_keymap PARAMS((void)); +extern void rl_discard_keymap PARAMS((Keymap)); +extern void rl_free_keymap PARAMS((Keymap)); + +extern Keymap rl_get_keymap_by_name PARAMS((const char *)); +extern char *rl_get_keymap_name PARAMS((Keymap)); +extern void rl_set_keymap PARAMS((Keymap)); +extern Keymap rl_get_keymap PARAMS((void)); +/* Undocumented; used internally only. */ +extern void rl_set_keymap_from_edit_mode PARAMS((void)); +extern char *rl_get_keymap_name_from_edit_mode PARAMS((void)); + +/* Functions for manipulating the funmap, which maps command names to functions. */ +extern int rl_add_funmap_entry PARAMS((const char *, rl_command_func_t *)); +extern const char **rl_funmap_names PARAMS((void)); +/* Undocumented, only used internally -- there is only one funmap, and this + function may be called only once. */ +extern void rl_initialize_funmap PARAMS((void)); + +/* Utility functions for managing keyboard macros. */ +extern void rl_push_macro_input PARAMS((char *)); + +/* Functions for undoing, from undo.c */ +extern void rl_add_undo PARAMS((enum undo_code, int, int, char *)); +extern void rl_free_undo_list PARAMS((void)); +extern int rl_do_undo PARAMS((void)); +extern int rl_begin_undo_group PARAMS((void)); +extern int rl_end_undo_group PARAMS((void)); +extern int rl_modifying PARAMS((int, int)); + +/* Functions for redisplay. */ +extern void rl_redisplay PARAMS((void)); +extern int rl_on_new_line PARAMS((void)); +extern int rl_on_new_line_with_prompt PARAMS((void)); +extern int rl_forced_update_display PARAMS((void)); +extern int rl_clear_message PARAMS((void)); +extern int rl_reset_line_state PARAMS((void)); +extern int rl_crlf PARAMS((void)); + +#if defined (USE_VARARGS) && defined (PREFER_STDARG) +extern int rl_message (const char *, ...) __attribute__((__format__ (printf, 1, 2))); +#else +extern int rl_message (); +#endif + +extern int rl_show_char PARAMS((int)); + +/* Undocumented in texinfo manual. */ +extern int rl_character_len PARAMS((int, int)); + +/* Save and restore internal prompt redisplay information. */ +extern void rl_save_prompt PARAMS((void)); +extern void rl_restore_prompt PARAMS((void)); + +/* Modifying text. */ +extern void rl_replace_line PARAMS((const char *, int)); +extern int rl_insert_text PARAMS((const char *)); +extern int rl_delete_text PARAMS((int, int)); +extern int rl_kill_text PARAMS((int, int)); +extern char *rl_copy_text PARAMS((int, int)); + +/* Terminal and tty mode management. */ +extern void rl_prep_terminal PARAMS((int)); +extern void rl_deprep_terminal PARAMS((void)); +extern void rl_tty_set_default_bindings PARAMS((Keymap)); +extern void rl_tty_unset_default_bindings PARAMS((Keymap)); + +extern int rl_reset_terminal PARAMS((const char *)); +extern void rl_resize_terminal PARAMS((void)); +extern void rl_set_screen_size PARAMS((int, int)); +extern void rl_get_screen_size PARAMS((int *, int *)); +extern void rl_reset_screen_size PARAMS((void)); + +extern char *rl_get_termcap PARAMS((const char *)); + +/* Functions for character input. */ +extern int rl_stuff_char PARAMS((int)); +extern int rl_execute_next PARAMS((int)); +extern int rl_clear_pending_input PARAMS((void)); +extern int rl_read_key PARAMS((void)); +extern int rl_getc PARAMS((FILE *)); +extern int rl_set_keyboard_input_timeout PARAMS((int)); + +/* `Public' utility functions . */ +extern void rl_extend_line_buffer PARAMS((int)); +extern int rl_ding PARAMS((void)); +extern int rl_alphabetic PARAMS((int)); +extern void rl_free PARAMS((void *)); + +/* Readline signal handling, from signals.c */ +extern int rl_set_signals PARAMS((void)); +extern int rl_clear_signals PARAMS((void)); +extern void rl_cleanup_after_signal PARAMS((void)); +extern void rl_reset_after_signal PARAMS((void)); +extern void rl_free_line_state PARAMS((void)); + +extern void rl_echo_signal_char PARAMS((int)); + +extern int rl_set_paren_blink_timeout PARAMS((int)); + +/* History management functions. */ + +extern void rl_clear_history PARAMS((void)); + +/* Undocumented. */ +extern int rl_maybe_save_line PARAMS((void)); +extern int rl_maybe_unsave_line PARAMS((void)); +extern int rl_maybe_replace_line PARAMS((void)); + +/* Completion functions. */ +extern int rl_complete_internal PARAMS((int)); +extern void rl_display_match_list PARAMS((char **, int, int)); + +extern char **rl_completion_matches PARAMS((const char *, rl_compentry_func_t *)); +extern char *rl_username_completion_function PARAMS((const char *, int)); +extern char *rl_filename_completion_function PARAMS((const char *, int)); + +extern int rl_completion_mode PARAMS((rl_command_func_t *)); + +#if 0 +/* Backwards compatibility (compat.c). These will go away sometime. */ +extern void free_undo_list PARAMS((void)); +extern int maybe_save_line PARAMS((void)); +extern int maybe_unsave_line PARAMS((void)); +extern int maybe_replace_line PARAMS((void)); + +extern int ding PARAMS((void)); +extern int alphabetic PARAMS((int)); +extern int crlf PARAMS((void)); + +extern char **completion_matches PARAMS((char *, rl_compentry_func_t *)); +extern char *username_completion_function PARAMS((const char *, int)); +extern char *filename_completion_function PARAMS((const char *, int)); +#endif + +/* **************************************************************** */ +/* */ +/* Well Published Variables */ +/* */ +/* **************************************************************** */ + +/* The version of this incarnation of the readline library. */ +extern const char *rl_library_version; /* e.g., "4.2" */ +extern int rl_readline_version; /* e.g., 0x0402 */ + +/* True if this is real GNU readline. */ +extern int rl_gnu_readline_p; + +/* Flags word encapsulating the current readline state. */ +extern int rl_readline_state; + +/* Says which editing mode readline is currently using. 1 means emacs mode; + 0 means vi mode. */ +extern int rl_editing_mode; + +/* Insert or overwrite mode for emacs mode. 1 means insert mode; 0 means + overwrite mode. Reset to insert mode on each input line. */ +extern int rl_insert_mode; + +/* The name of the calling program. You should initialize this to + whatever was in argv[0]. It is used when parsing conditionals. */ +extern const char *rl_readline_name; + +/* The prompt readline uses. This is set from the argument to + readline (), and should not be assigned to directly. */ +extern char *rl_prompt; + +/* The prompt string that is actually displayed by rl_redisplay. Public so + applications can more easily supply their own redisplay functions. */ +extern char *rl_display_prompt; + +/* The line buffer that is in use. */ +extern char *rl_line_buffer; + +/* The location of point, and end. */ +extern int rl_point; +extern int rl_end; + +/* The mark, or saved cursor position. */ +extern int rl_mark; + +/* Flag to indicate that readline has finished with the current input + line and should return it. */ +extern int rl_done; + +/* If set to a character value, that will be the next keystroke read. */ +extern int rl_pending_input; + +/* Non-zero if we called this function from _rl_dispatch(). It's present + so functions can find out whether they were called from a key binding + or directly from an application. */ +extern int rl_dispatching; + +/* Non-zero if the user typed a numeric argument before executing the + current function. */ +extern int rl_explicit_arg; + +/* The current value of the numeric argument specified by the user. */ +extern int rl_numeric_arg; + +/* The address of the last command function Readline executed. */ +extern rl_command_func_t *rl_last_func; + +/* The name of the terminal to use. */ +extern const char *rl_terminal_name; + +/* The input and output streams. */ +extern FILE *rl_instream; +extern FILE *rl_outstream; + +/* If non-zero, Readline gives values of LINES and COLUMNS from the environment + greater precedence than values fetched from the kernel when computing the + screen dimensions. */ +extern int rl_prefer_env_winsize; + +/* If non-zero, then this is the address of a function to call just + before readline_internal () prints the first prompt. */ +extern rl_hook_func_t *rl_startup_hook; + +/* If non-zero, this is the address of a function to call just before + readline_internal_setup () returns and readline_internal starts + reading input characters. */ +extern rl_hook_func_t *rl_pre_input_hook; + +/* The address of a function to call periodically while Readline is + awaiting character input, or NULL, for no event handling. */ +extern rl_hook_func_t *rl_event_hook; + +/* The address of a function to call if a read is interrupted by a signal. */ +extern rl_hook_func_t *rl_signal_event_hook; + +/* The address of a function to call if Readline needs to know whether or not + there is data available from the current input source. */ +extern rl_hook_func_t *rl_input_available_hook; + +/* The address of the function to call to fetch a character from the current + Readline input stream */ +extern rl_getc_func_t *rl_getc_function; + +extern rl_voidfunc_t *rl_redisplay_function; + +extern rl_vintfunc_t *rl_prep_term_function; +extern rl_voidfunc_t *rl_deprep_term_function; + +/* Dispatch variables. */ +extern Keymap rl_executing_keymap; +extern Keymap rl_binding_keymap; + +extern int rl_executing_key; +extern char *rl_executing_keyseq; +extern int rl_key_sequence_length; + +/* Display variables. */ +/* If non-zero, readline will erase the entire line, including any prompt, + if the only thing typed on an otherwise-blank line is something bound to + rl_newline. */ +extern int rl_erase_empty_line; + +/* If non-zero, the application has already printed the prompt (rl_prompt) + before calling readline, so readline should not output it the first time + redisplay is done. */ +extern int rl_already_prompted; + +/* A non-zero value means to read only this many characters rather than + up to a character bound to accept-line. */ +extern int rl_num_chars_to_read; + +/* The text of a currently-executing keyboard macro. */ +extern char *rl_executing_macro; + +/* Variables to control readline signal handling. */ +/* If non-zero, readline will install its own signal handlers for + SIGINT, SIGTERM, SIGQUIT, SIGALRM, SIGTSTP, SIGTTIN, and SIGTTOU. */ +extern int rl_catch_signals; + +/* If non-zero, readline will install a signal handler for SIGWINCH + that also attempts to call any calling application's SIGWINCH signal + handler. Note that the terminal is not cleaned up before the + application's signal handler is called; use rl_cleanup_after_signal() + to do that. */ +extern int rl_catch_sigwinch; + +/* If non-zero, the readline SIGWINCH handler will modify LINES and + COLUMNS in the environment. */ +extern int rl_change_environment; + +/* Completion variables. */ +/* Pointer to the generator function for completion_matches (). + NULL means to use rl_filename_completion_function (), the default + filename completer. */ +extern rl_compentry_func_t *rl_completion_entry_function; + +/* Optional generator for menu completion. Default is + rl_completion_entry_function (rl_filename_completion_function). */ + extern rl_compentry_func_t *rl_menu_completion_entry_function; + +/* If rl_ignore_some_completions_function is non-NULL it is the address + of a function to call after all of the possible matches have been + generated, but before the actual completion is done to the input line. + The function is called with one argument; a NULL terminated array + of (char *). If your function removes any of the elements, they + must be free()'ed. */ +extern rl_compignore_func_t *rl_ignore_some_completions_function; + +/* Pointer to alternative function to create matches. + Function is called with TEXT, START, and END. + START and END are indices in RL_LINE_BUFFER saying what the boundaries + of TEXT are. + If this function exists and returns NULL then call the value of + rl_completion_entry_function to try to match, otherwise use the + array of strings returned. */ +extern rl_completion_func_t *rl_attempted_completion_function; + +/* The basic list of characters that signal a break between words for the + completer routine. The initial contents of this variable is what + breaks words in the shell, i.e. "n\"\\'`@$>". */ +extern const char *rl_basic_word_break_characters; + +/* The list of characters that signal a break between words for + rl_complete_internal. The default list is the contents of + rl_basic_word_break_characters. */ +extern /*const*/ char *rl_completer_word_break_characters; + +/* Hook function to allow an application to set the completion word + break characters before readline breaks up the line. Allows + position-dependent word break characters. */ +extern rl_cpvfunc_t *rl_completion_word_break_hook; + +/* List of characters which can be used to quote a substring of the line. + Completion occurs on the entire substring, and within the substring + rl_completer_word_break_characters are treated as any other character, + unless they also appear within this list. */ +extern const char *rl_completer_quote_characters; + +/* List of quote characters which cause a word break. */ +extern const char *rl_basic_quote_characters; + +/* List of characters that need to be quoted in filenames by the completer. */ +extern const char *rl_filename_quote_characters; + +/* List of characters that are word break characters, but should be left + in TEXT when it is passed to the completion function. The shell uses + this to help determine what kind of completing to do. */ +extern const char *rl_special_prefixes; + +/* If non-zero, then this is the address of a function to call when + completing on a directory name. The function is called with + the address of a string (the current directory name) as an arg. It + changes what is displayed when the possible completions are printed + or inserted. The directory completion hook should perform + any necessary dequoting. This function should return 1 if it modifies + the directory name pointer passed as an argument. If the directory + completion hook returns 0, it should not modify the directory name + pointer passed as an argument. */ +extern rl_icppfunc_t *rl_directory_completion_hook; + +/* If non-zero, this is the address of a function to call when completing + a directory name. This function takes the address of the directory name + to be modified as an argument. Unlike rl_directory_completion_hook, it + only modifies the directory name used in opendir(2), not what is displayed + when the possible completions are printed or inserted. If set, it takes + precedence over rl_directory_completion_hook. The directory rewrite + hook should perform any necessary dequoting. This function has the same + return value properties as the directory_completion_hook. + + I'm not happy with how this works yet, so it's undocumented. I'm trying + it in bash to see how well it goes. */ +extern rl_icppfunc_t *rl_directory_rewrite_hook; + +/* If non-zero, this is the address of a function for the completer to call + before deciding which character to append to a completed name. It should + modify the directory name passed as an argument if appropriate, and return + non-zero if it modifies the name. This should not worry about dequoting + the filename; that has already happened by the time it gets here. */ +extern rl_icppfunc_t *rl_filename_stat_hook; + +/* If non-zero, this is the address of a function to call when reading + directory entries from the filesystem for completion and comparing + them to the partial word to be completed. The function should + either return its first argument (if no conversion takes place) or + newly-allocated memory. This can, for instance, convert filenames + between character sets for comparison against what's typed at the + keyboard. The returned value is what is added to the list of + matches. The second argument is the length of the filename to be + converted. */ +extern rl_dequote_func_t *rl_filename_rewrite_hook; + +/* Backwards compatibility with previous versions of readline. */ +#define rl_symbolic_link_hook rl_directory_completion_hook + +/* If non-zero, then this is the address of a function to call when + completing a word would normally display the list of possible matches. + This function is called instead of actually doing the display. + It takes three arguments: (char **matches, int num_matches, int max_length) + where MATCHES is the array of strings that matched, NUM_MATCHES is the + number of strings in that array, and MAX_LENGTH is the length of the + longest string in that array. */ +extern rl_compdisp_func_t *rl_completion_display_matches_hook; + +/* Non-zero means that the results of the matches are to be treated + as filenames. This is ALWAYS zero on entry, and can only be changed + within a completion entry finder function. */ +extern int rl_filename_completion_desired; + +/* Non-zero means that the results of the matches are to be quoted using + double quotes (or an application-specific quoting mechanism) if the + filename contains any characters in rl_word_break_chars. This is + ALWAYS non-zero on entry, and can only be changed within a completion + entry finder function. */ +extern int rl_filename_quoting_desired; + +/* Set to a function to quote a filename in an application-specific fashion. + Called with the text to quote, the type of match found (single or multiple) + and a pointer to the quoting character to be used, which the function can + reset if desired. */ +extern rl_quote_func_t *rl_filename_quoting_function; + +/* Function to call to remove quoting characters from a filename. Called + before completion is attempted, so the embedded quotes do not interfere + with matching names in the file system. */ +extern rl_dequote_func_t *rl_filename_dequoting_function; + +/* Function to call to decide whether or not a word break character is + quoted. If a character is quoted, it does not break words for the + completer. */ +extern rl_linebuf_func_t *rl_char_is_quoted_p; + +/* Non-zero means to suppress normal filename completion after the + user-specified completion function has been called. */ +extern int rl_attempted_completion_over; + +/* Set to a character describing the type of completion being attempted by + rl_complete_internal; available for use by application completion + functions. */ +extern int rl_completion_type; + +/* Set to the last key used to invoke one of the completion functions */ +extern int rl_completion_invoking_key; + +/* Up to this many items will be displayed in response to a + possible-completions call. After that, we ask the user if she + is sure she wants to see them all. The default value is 100. */ +extern int rl_completion_query_items; + +/* Character appended to completed words when at the end of the line. The + default is a space. Nothing is added if this is '\0'. */ +extern int rl_completion_append_character; + +/* If set to non-zero by an application completion function, + rl_completion_append_character will not be appended. */ +extern int rl_completion_suppress_append; + +/* Set to any quote character readline thinks it finds before any application + completion function is called. */ +extern int rl_completion_quote_character; + +/* Set to a non-zero value if readline found quoting anywhere in the word to + be completed; set before any application completion function is called. */ +extern int rl_completion_found_quote; + +/* If non-zero, the completion functions don't append any closing quote. + This is set to 0 by rl_complete_internal and may be changed by an + application-specific completion function. */ +extern int rl_completion_suppress_quote; + +/* If non-zero, readline will sort the completion matches. On by default. */ +extern int rl_sort_completion_matches; + +/* If non-zero, a slash will be appended to completed filenames that are + symbolic links to directory names, subject to the value of the + mark-directories variable (which is user-settable). This exists so + that application completion functions can override the user's preference + (set via the mark-symlinked-directories variable) if appropriate. + It's set to the value of _rl_complete_mark_symlink_dirs in + rl_complete_internal before any application-specific completion + function is called, so without that function doing anything, the user's + preferences are honored. */ +extern int rl_completion_mark_symlink_dirs; + +/* If non-zero, then disallow duplicates in the matches. */ +extern int rl_ignore_completion_duplicates; + +/* If this is non-zero, completion is (temporarily) inhibited, and the + completion character will be inserted as any other. */ +extern int rl_inhibit_completion; + +/* Input error; can be returned by (*rl_getc_function) if readline is reading + a top-level command (RL_ISSTATE (RL_STATE_READCMD)). */ +#define READERR (-2) + +/* Definitions available for use by readline clients. */ +#define RL_PROMPT_START_IGNORE '\001' +#define RL_PROMPT_END_IGNORE '\002' + +/* Possible values for do_replace argument to rl_filename_quoting_function, + called by rl_complete_internal. */ +#define NO_MATCH 0 +#define SINGLE_MATCH 1 +#define MULT_MATCH 2 + +/* Possible state values for rl_readline_state */ +#define RL_STATE_NONE 0x000000 /* no state; before first call */ + +#define RL_STATE_INITIALIZING 0x0000001 /* initializing */ +#define RL_STATE_INITIALIZED 0x0000002 /* initialization done */ +#define RL_STATE_TERMPREPPED 0x0000004 /* terminal is prepped */ +#define RL_STATE_READCMD 0x0000008 /* reading a command key */ +#define RL_STATE_METANEXT 0x0000010 /* reading input after ESC */ +#define RL_STATE_DISPATCHING 0x0000020 /* dispatching to a command */ +#define RL_STATE_MOREINPUT 0x0000040 /* reading more input in a command function */ +#define RL_STATE_ISEARCH 0x0000080 /* doing incremental search */ +#define RL_STATE_NSEARCH 0x0000100 /* doing non-inc search */ +#define RL_STATE_SEARCH 0x0000200 /* doing a history search */ +#define RL_STATE_NUMERICARG 0x0000400 /* reading numeric argument */ +#define RL_STATE_MACROINPUT 0x0000800 /* getting input from a macro */ +#define RL_STATE_MACRODEF 0x0001000 /* defining keyboard macro */ +#define RL_STATE_OVERWRITE 0x0002000 /* overwrite mode */ +#define RL_STATE_COMPLETING 0x0004000 /* doing completion */ +#define RL_STATE_SIGHANDLER 0x0008000 /* in readline sighandler */ +#define RL_STATE_UNDOING 0x0010000 /* doing an undo */ +#define RL_STATE_INPUTPENDING 0x0020000 /* rl_execute_next called */ +#define RL_STATE_TTYCSAVED 0x0040000 /* tty special chars saved */ +#define RL_STATE_CALLBACK 0x0080000 /* using the callback interface */ +#define RL_STATE_VIMOTION 0x0100000 /* reading vi motion arg */ +#define RL_STATE_MULTIKEY 0x0200000 /* reading multiple-key command */ +#define RL_STATE_VICMDONCE 0x0400000 /* entered vi command mode at least once */ +#define RL_STATE_REDISPLAYING 0x0800000 /* updating terminal display */ + +#define RL_STATE_DONE 0x1000000 /* done; accepted line */ + +#define RL_SETSTATE(x) (rl_readline_state |= (x)) +#define RL_UNSETSTATE(x) (rl_readline_state &= ~(x)) +#define RL_ISSTATE(x) (rl_readline_state & (x)) + +struct readline_state { + /* line state */ + int point; + int end; + int mark; + char *buffer; + int buflen; + UNDO_LIST *ul; + char *prompt; + + /* global state */ + int rlstate; + int done; + Keymap kmap; + + /* input state */ + rl_command_func_t *lastfunc; + int insmode; + int edmode; + int kseqlen; + FILE *inf; + FILE *outf; + int pendingin; + char *macro; + + /* signal state */ + int catchsigs; + int catchsigwinch; + + /* search state */ + + /* completion state */ + + /* options state */ + + /* reserved for future expansion, so the struct size doesn't change */ + char reserved[64]; +}; + +extern int rl_save_state PARAMS((struct readline_state *)); +extern int rl_restore_state PARAMS((struct readline_state *)); + +#ifdef __cplusplus +} +#endif + +#endif /* _READLINE_H_ */ diff --git a/src/readline/rlconf.h b/src/readline/rlconf.h new file mode 100644 index 0000000..1bdf96c --- /dev/null +++ b/src/readline/rlconf.h @@ -0,0 +1,69 @@ +/* rlconf.h -- readline configuration definitions */ + +/* Copyright (C) 1992-2012 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library (Readline), a library + for reading lines of text with interactive input and history editing. + + Readline is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Readline is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Readline. If not, see . +*/ + +#if !defined (_RLCONF_H_) +#define _RLCONF_H_ + +/* Define this if you want the vi-mode editing available. */ +#define VI_MODE + +/* Define this to get an indication of file type when listing completions. */ +#define VISIBLE_STATS + +/* Define this to get support for colors when listing completions and in + other places. */ +#define COLOR_SUPPORT + +/* This definition is needed by readline.c, rltty.c, and signals.c. */ +/* If on, then readline handles signals in a way that doesn't suck. */ +#define HANDLE_SIGNALS + +/* Ugly but working hack for binding prefix meta. */ +#define PREFIX_META_HACK + +/* The next-to-last-ditch effort file name for a user-specific init file. */ +#define DEFAULT_INPUTRC "~/.inputrc" + +/* The ultimate last-ditch filenname for an init file -- system-wide. */ +#define SYS_INPUTRC "/etc/inputrc" + +/* If defined, expand tabs to spaces. */ +#define DISPLAY_TABS + +/* If defined, use the terminal escape sequence to move the cursor forward + over a character when updating the line rather than rewriting it. */ +/* #define HACK_TERMCAP_MOTION */ + +/* The string inserted by the `insert comment' command. */ +#define RL_COMMENT_BEGIN_DEFAULT "#" + +/* Define this if you want code that allows readline to be used in an + X `callback' style. */ +#define READLINE_CALLBACKS + +/* Define this if you want the cursor to indicate insert or overwrite mode. */ +/* #define CURSOR_MODE */ + +/* Define this if you want to enable code that talks to the Linux kernel + tty auditing system. */ +#define ENABLE_TTY_AUDIT_SUPPORT + +#endif /* _RLCONF_H_ */ diff --git a/src/readline/rldefs.h b/src/readline/rldefs.h new file mode 100644 index 0000000..fad0f83 --- /dev/null +++ b/src/readline/rldefs.h @@ -0,0 +1,166 @@ +/* rldefs.h -- an attempt to isolate some of the system-specific defines + for readline. This should be included after any files that define + system-specific constants like _POSIX_VERSION or USG. */ + +/* Copyright (C) 1987-2011 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library (Readline), a library + for reading lines of text with interactive input and history editing. + + Readline is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Readline is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Readline. If not, see . +*/ + +#if !defined (_RLDEFS_H_) +#define _RLDEFS_H_ + +#if defined (HAVE_CONFIG_H) +# include "config.h" +#endif + +#include "rlstdc.h" + +#if defined (STRCOLL_BROKEN) +# undef HAVE_STRCOLL +#endif + +#if defined (_POSIX_VERSION) && !defined (TERMIOS_MISSING) +# define TERMIOS_TTY_DRIVER +#else +# if defined (HAVE_TERMIO_H) +# define TERMIO_TTY_DRIVER +# else +# if !defined (__MINGW32__) +# define NEW_TTY_DRIVER +# else +# define NO_TTY_DRIVER +# endif +# endif +#endif + +/* Posix macro to check file in statbuf for directory-ness. + This requires that be included before this test. */ +#if defined (S_IFDIR) && !defined (S_ISDIR) +# define S_ISDIR(m) (((m)&S_IFMT) == S_IFDIR) +#endif + +/* Decide which flavor of the header file describing the C library + string functions to include and include it. */ + +#if defined (HAVE_STRING_H) +# include +#else /* !HAVE_STRING_H */ +# include +#endif /* !HAVE_STRING_H */ + +#if !defined (strchr) && !defined (__STDC__) +extern char *strchr (), *strrchr (); +#endif /* !strchr && !__STDC__ */ + +#if defined (PREFER_STDARG) +# include +#else +# if defined (PREFER_VARARGS) +# include +# endif +#endif + +#if defined (HAVE_STRCASECMP) +#define _rl_stricmp strcasecmp +#define _rl_strnicmp strncasecmp +#else +extern int _rl_stricmp PARAMS((const char *, const char *)); +extern int _rl_strnicmp PARAMS((const char *, const char *, int)); +#endif + +#if defined (HAVE_STRPBRK) && !defined (HAVE_MULTIBYTE) +# define _rl_strpbrk(a,b) strpbrk((a),(b)) +#else +extern char *_rl_strpbrk PARAMS((const char *, const char *)); +#endif + +#if !defined (emacs_mode) +# define no_mode -1 +# define vi_mode 0 +# define emacs_mode 1 +#endif + +#if !defined (RL_IM_INSERT) +# define RL_IM_INSERT 1 +# define RL_IM_OVERWRITE 0 +# +# define RL_IM_DEFAULT RL_IM_INSERT +#endif + +/* If you cast map[key].function to type (Keymap) on a Cray, + the compiler takes the value of map[key].function and + divides it by 4 to convert between pointer types (pointers + to functions and pointers to structs are different sizes). + This is not what is wanted. */ +#if defined (CRAY) +# define FUNCTION_TO_KEYMAP(map, key) (Keymap)((int)map[key].function) +# define KEYMAP_TO_FUNCTION(data) (rl_command_func_t *)((int)(data)) +#else +# define FUNCTION_TO_KEYMAP(map, key) (Keymap)(map[key].function) +# define KEYMAP_TO_FUNCTION(data) (rl_command_func_t *)(data) +#endif + +#ifndef savestring +#define savestring(x) strcpy ((char *)xmalloc (1 + strlen (x)), (x)) +#endif + +/* Possible values for _rl_bell_preference. */ +#define NO_BELL 0 +#define AUDIBLE_BELL 1 +#define VISIBLE_BELL 2 + +/* Definitions used when searching the line for characters. */ +/* NOTE: it is necessary that opposite directions are inverses */ +#define FTO 1 /* forward to */ +#define BTO -1 /* backward to */ +#define FFIND 2 /* forward find */ +#define BFIND -2 /* backward find */ + +/* Possible values for the found_quote flags word used by the completion + functions. It says what kind of (shell-like) quoting we found anywhere + in the line. */ +#define RL_QF_SINGLE_QUOTE 0x01 +#define RL_QF_DOUBLE_QUOTE 0x02 +#define RL_QF_BACKSLASH 0x04 +#define RL_QF_OTHER_QUOTE 0x08 + +/* Default readline line buffer length. */ +#define DEFAULT_BUFFER_SIZE 256 + +#if !defined (STREQ) +#define STREQ(a, b) (((a)[0] == (b)[0]) && (strcmp ((a), (b)) == 0)) +#define STREQN(a, b, n) (((n) == 0) ? (1) \ + : ((a)[0] == (b)[0]) && (strncmp ((a), (b), (n)) == 0)) +#endif + +#if !defined (RL_STRLEN) +# define RL_STRLEN(s) (((s) && (s)[0]) ? ((s)[1] ? ((s)[2] ? strlen(s) : 2) : 1) : 0) +#endif + +#if !defined (FREE) +# define FREE(x) if (x) free (x) +#endif + +#if !defined (SWAP) +# define SWAP(s, e) do { int t; t = s; s = e; e = t; } while (0) +#endif + +/* CONFIGURATION SECTION */ +#include "rlconf.h" + +#endif /* !_RLDEFS_H_ */ diff --git a/src/readline/rlmbutil.h b/src/readline/rlmbutil.h new file mode 100644 index 0000000..61d2298 --- /dev/null +++ b/src/readline/rlmbutil.h @@ -0,0 +1,163 @@ +/* rlmbutil.h -- utility functions for multibyte characters. */ + +/* Copyright (C) 2001-2009 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library (Readline), a library + for reading lines of text with interactive input and history editing. + + Readline is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Readline is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Readline. If not, see . +*/ + +#if !defined (_RL_MBUTIL_H_) +#define _RL_MBUTIL_H_ + +#include "rlstdc.h" + +/************************************************/ +/* check multibyte capability for I18N code */ +/************************************************/ + +/* For platforms which support the ISO C amendement 1 functionality we + support user defined character classes. */ + /* Solaris 2.5 has a bug: must be included before . */ +#if defined (HAVE_WCTYPE_H) && defined (HAVE_WCHAR_H) && defined (HAVE_LOCALE_H) +# include +# include +# if defined (HAVE_ISWCTYPE) && \ + defined (HAVE_ISWLOWER) && \ + defined (HAVE_ISWUPPER) && \ + defined (HAVE_MBSRTOWCS) && \ + defined (HAVE_MBRTOWC) && \ + defined (HAVE_MBRLEN) && \ + defined (HAVE_TOWLOWER) && \ + defined (HAVE_TOWUPPER) && \ + defined (HAVE_WCHAR_T) && \ + defined (HAVE_WCWIDTH) + /* system is supposed to support XPG5 */ +# define HANDLE_MULTIBYTE 1 +# endif +#endif + +/* If we don't want multibyte chars even on a system that supports them, let + the configuring user turn multibyte support off. */ +#if defined (NO_MULTIBYTE_SUPPORT) +# undef HANDLE_MULTIBYTE +#endif + +/* Some systems, like BeOS, have multibyte encodings but lack mbstate_t. */ +#if HANDLE_MULTIBYTE && !defined (HAVE_MBSTATE_T) +# define wcsrtombs(dest, src, len, ps) (wcsrtombs) (dest, src, len, 0) +# define mbsrtowcs(dest, src, len, ps) (mbsrtowcs) (dest, src, len, 0) +# define wcrtomb(s, wc, ps) (wcrtomb) (s, wc, 0) +# define mbrtowc(pwc, s, n, ps) (mbrtowc) (pwc, s, n, 0) +# define mbrlen(s, n, ps) (mbrlen) (s, n, 0) +# define mbstate_t int +#endif + +/* Make sure MB_LEN_MAX is at least 16 on systems that claim to be able to + handle multibyte chars (some systems define MB_LEN_MAX as 1) */ +#ifdef HANDLE_MULTIBYTE +# include +# if defined(MB_LEN_MAX) && (MB_LEN_MAX < 16) +# undef MB_LEN_MAX +# endif +# if !defined (MB_LEN_MAX) +# define MB_LEN_MAX 16 +# endif +#endif + +/************************************************/ +/* end of multibyte capability checks for I18N */ +/************************************************/ + +/* + * Flags for _rl_find_prev_mbchar and _rl_find_next_mbchar: + * + * MB_FIND_ANY find any multibyte character + * MB_FIND_NONZERO find a non-zero-width multibyte character + */ + +#define MB_FIND_ANY 0x00 +#define MB_FIND_NONZERO 0x01 + +extern int _rl_find_prev_mbchar PARAMS((char *, int, int)); +extern int _rl_find_next_mbchar PARAMS((char *, int, int, int)); + +#ifdef HANDLE_MULTIBYTE + +extern int _rl_compare_chars PARAMS((char *, int, mbstate_t *, char *, int, mbstate_t *)); +extern int _rl_get_char_len PARAMS((char *, mbstate_t *)); +extern int _rl_adjust_point PARAMS((char *, int, mbstate_t *)); + +extern int _rl_read_mbchar PARAMS((char *, int)); +extern int _rl_read_mbstring PARAMS((int, char *, int)); + +extern int _rl_is_mbchar_matched PARAMS((char *, int, int, char *, int)); + +extern wchar_t _rl_char_value PARAMS((char *, int)); +extern int _rl_walphabetic PARAMS((wchar_t)); + +#define _rl_to_wupper(wc) (iswlower (wc) ? towupper (wc) : (wc)) +#define _rl_to_wlower(wc) (iswupper (wc) ? towlower (wc) : (wc)) + +#define MB_NEXTCHAR(b,s,c,f) \ + ((MB_CUR_MAX > 1 && rl_byte_oriented == 0) \ + ? _rl_find_next_mbchar ((b), (s), (c), (f)) \ + : ((s) + (c))) +#define MB_PREVCHAR(b,s,f) \ + ((MB_CUR_MAX > 1 && rl_byte_oriented == 0) \ + ? _rl_find_prev_mbchar ((b), (s), (f)) \ + : ((s) - 1)) + +#define MB_INVALIDCH(x) ((x) == (size_t)-1 || (x) == (size_t)-2) +#define MB_NULLWCH(x) ((x) == 0) + +/* Unicode combining characters range from U+0300 to U+036F */ +#define UNICODE_COMBINING_CHAR(x) ((x) >= 768 && (x) <= 879) + +#if defined (WCWIDTH_BROKEN) +# define WCWIDTH(wc) ((_rl_utf8locale && UNICODE_COMBINING_CHAR(wc)) ? 0 : wcwidth(wc)) +#else +# define WCWIDTH(wc) wcwidth(wc) +#endif + +#else /* !HANDLE_MULTIBYTE */ + +#undef MB_LEN_MAX +#undef MB_CUR_MAX + +#define MB_LEN_MAX 1 +#define MB_CUR_MAX 1 + +#define _rl_find_prev_mbchar(b, i, f) (((i) == 0) ? (i) : ((i) - 1)) +#define _rl_find_next_mbchar(b, i1, i2, f) ((i1) + (i2)) + +#define _rl_char_value(buf,ind) ((buf)[(ind)]) + +#define _rl_walphabetic(c) (rl_alphabetic (c)) + +#define _rl_to_wupper(c) (_rl_to_upper (c)) +#define _rl_to_wlower(c) (_rl_to_lower (c)) + +#define MB_NEXTCHAR(b,s,c,f) ((s) + (c)) +#define MB_PREVCHAR(b,s,f) ((s) - 1) + +#define MB_INVALIDCH(x) (0) +#define MB_NULLWCH(x) (0) + +#endif /* !HANDLE_MULTIBYTE */ + +extern int rl_byte_oriented; + +#endif /* _RL_MBUTIL_H_ */ diff --git a/src/readline/rlprivate.h b/src/readline/rlprivate.h new file mode 100644 index 0000000..f9c8beb --- /dev/null +++ b/src/readline/rlprivate.h @@ -0,0 +1,535 @@ +/* rlprivate.h -- functions and variables global to the readline library, + but not intended for use by applications. */ + +/* Copyright (C) 1999-2012 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library (Readline), a library + for reading lines of text with interactive input and history editing. + + Readline is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Readline is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Readline. If not, see . +*/ + +#if !defined (_RL_PRIVATE_H_) +#define _RL_PRIVATE_H_ + +#include "rlconf.h" /* for VISIBLE_STATS */ +#include "rlstdc.h" +#include "posixjmp.h" /* defines procenv_t */ + +/************************************************************************* + * * + * Convenience definitions * + * * + *************************************************************************/ + +#define EMACS_MODE() (rl_editing_mode == emacs_mode) +#define VI_COMMAND_MODE() (rl_editing_mode == vi_mode && _rl_keymap == vi_movement_keymap) +#define VI_INSERT_MODE() (rl_editing_mode == vi_mode && _rl_keymap == vi_insertion_keymap) + +#define RL_CHECK_SIGNALS() \ + do { \ + if (_rl_caught_signal) _rl_signal_handler (_rl_caught_signal); \ + } while (0) + +#define RL_SIG_RECEIVED() (_rl_caught_signal != 0) +#define RL_SIGINT_RECEIVED() (_rl_caught_signal == SIGINT) + +#define CUSTOM_REDISPLAY_FUNC() (rl_redisplay_function != rl_redisplay) +#define CUSTOM_INPUT_FUNC() (rl_getc_function != rl_getc) + +/************************************************************************* + * * + * Global structs undocumented in texinfo manual and not in readline.h * + * * + *************************************************************************/ +/* search types */ +#define RL_SEARCH_ISEARCH 0x01 /* incremental search */ +#define RL_SEARCH_NSEARCH 0x02 /* non-incremental search */ +#define RL_SEARCH_CSEARCH 0x04 /* intra-line char search */ + +/* search flags */ +#define SF_REVERSE 0x01 +#define SF_FOUND 0x02 +#define SF_FAILED 0x04 +#define SF_CHGKMAP 0x08 + +typedef struct __rl_search_context +{ + int type; + int sflags; + + char *search_string; + int search_string_index; + int search_string_size; + + char **lines; + char *allocated_line; + int hlen; + int hindex; + + int save_point; + int save_mark; + int save_line; + int last_found_line; + char *prev_line_found; + + UNDO_LIST *save_undo_list; + + Keymap keymap; /* used when dispatching commands in search string */ + Keymap okeymap; /* original keymap */ + + int history_pos; + int direction; + + int prevc; + int lastc; +#if defined (HANDLE_MULTIBYTE) + char mb[MB_LEN_MAX]; + char pmb[MB_LEN_MAX]; +#endif + + char *sline; + int sline_len; + int sline_index; + + char *search_terminators; +} _rl_search_cxt; + +/* Callback data for reading numeric arguments */ +#define NUM_SAWMINUS 0x01 +#define NUM_SAWDIGITS 0x02 +#define NUM_READONE 0x04 + +typedef int _rl_arg_cxt; + +/* A context for reading key sequences longer than a single character when + using the callback interface. */ +#define KSEQ_DISPATCHED 0x01 +#define KSEQ_SUBSEQ 0x02 +#define KSEQ_RECURSIVE 0x04 + +typedef struct __rl_keyseq_context +{ + int flags; + int subseq_arg; + int subseq_retval; /* XXX */ + Keymap dmap; + + Keymap oldmap; + int okey; + struct __rl_keyseq_context *ocxt; + int childval; +} _rl_keyseq_cxt; + +/* vi-mode commands that use result of motion command to define boundaries */ +#define VIM_DELETE 0x01 +#define VIM_CHANGE 0x02 +#define VIM_YANK 0x04 + +/* various states for vi-mode commands that use motion commands. reflects + RL_READLINE_STATE */ +#define VMSTATE_READ 0x01 +#define VMSTATE_NUMARG 0x02 + +typedef struct __rl_vimotion_context +{ + int op; + int state; + int flags; /* reserved */ + _rl_arg_cxt ncxt; + int numeric_arg; + int start, end; /* rl_point, rl_end */ + int key, motion; /* initial key, motion command */ +} _rl_vimotion_cxt; + +/* fill in more as needed */ +/* `Generic' callback data and functions */ +typedef struct __rl_callback_generic_arg +{ + int count; + int i1, i2; + /* add here as needed */ +} _rl_callback_generic_arg; + +typedef int _rl_callback_func_t PARAMS((_rl_callback_generic_arg *)); + +typedef void _rl_sigcleanup_func_t PARAMS((int, void *)); + +/************************************************************************* + * * + * Global functions undocumented in texinfo manual and not in readline.h * + * * + *************************************************************************/ + +/************************************************************************* + * * + * Global variables undocumented in texinfo manual and not in readline.h * + * * + *************************************************************************/ + +/* complete.c */ +extern int rl_complete_with_tilde_expansion; +#if defined (VISIBLE_STATS) +extern int rl_visible_stats; +#endif /* VISIBLE_STATS */ +#if defined (COLOR_SUPPORT) +extern int _rl_colored_stats; +#endif + +/* readline.c */ +extern int rl_line_buffer_len; +extern int rl_arg_sign; +extern int rl_visible_prompt_length; +extern int rl_byte_oriented; + +/* display.c */ +extern int rl_display_fixed; + +/* parens.c */ +extern int rl_blink_matching_paren; + +/************************************************************************* + * * + * Global functions and variables unused and undocumented * + * * + *************************************************************************/ + +/* kill.c */ +extern int rl_set_retained_kills PARAMS((int)); + +/* terminal.c */ +extern void _rl_set_screen_size PARAMS((int, int)); + +/* undo.c */ +extern int _rl_fix_last_undo_of_type PARAMS((int, int, int)); + +/* util.c */ +extern char *_rl_savestring PARAMS((const char *)); + +/************************************************************************* + * * + * Functions and variables private to the readline library * + * * + *************************************************************************/ + +/* NOTE: Functions and variables prefixed with `_rl_' are + pseudo-global: they are global so they can be shared + between files in the readline library, but are not intended + to be visible to readline callers. */ + +/************************************************************************* + * Undocumented private functions * + *************************************************************************/ + +#if defined(READLINE_CALLBACKS) + +/* readline.c */ +extern void readline_internal_setup PARAMS((void)); +extern char *readline_internal_teardown PARAMS((int)); +extern int readline_internal_char PARAMS((void)); + +extern _rl_keyseq_cxt *_rl_keyseq_cxt_alloc PARAMS((void)); +extern void _rl_keyseq_cxt_dispose PARAMS((_rl_keyseq_cxt *)); +extern void _rl_keyseq_chain_dispose PARAMS((void)); + +extern int _rl_dispatch_callback PARAMS((_rl_keyseq_cxt *)); + +/* callback.c */ +extern _rl_callback_generic_arg *_rl_callback_data_alloc PARAMS((int)); +extern void _rl_callback_data_dispose PARAMS((_rl_callback_generic_arg *)); + +#endif /* READLINE_CALLBACKS */ + +/* bind.c */ +extern char *_rl_untranslate_macro_value PARAMS((char *, int)); + +/* complete.c */ +extern void _rl_reset_completion_state PARAMS((void)); +extern char _rl_find_completion_word PARAMS((int *, int *)); +extern void _rl_free_match_list PARAMS((char **)); + +/* display.c */ +extern char *_rl_strip_prompt PARAMS((char *)); +extern void _rl_reset_prompt PARAMS((void)); +extern void _rl_move_cursor_relative PARAMS((int, const char *)); +extern void _rl_move_vert PARAMS((int)); +extern void _rl_save_prompt PARAMS((void)); +extern void _rl_restore_prompt PARAMS((void)); +extern char *_rl_make_prompt_for_search PARAMS((int)); +extern void _rl_erase_at_end_of_line PARAMS((int)); +extern void _rl_clear_to_eol PARAMS((int)); +extern void _rl_clear_screen PARAMS((void)); +extern void _rl_update_final PARAMS((void)); +extern void _rl_redisplay_after_sigwinch PARAMS((void)); +extern void _rl_clean_up_for_exit PARAMS((void)); +extern void _rl_erase_entire_line PARAMS((void)); +extern int _rl_current_display_line PARAMS((void)); + +/* input.c */ +extern int _rl_any_typein PARAMS((void)); +extern int _rl_input_available PARAMS((void)); +extern int _rl_input_queued PARAMS((int)); +extern void _rl_insert_typein PARAMS((int)); +extern int _rl_unget_char PARAMS((int)); +extern int _rl_pushed_input_available PARAMS((void)); + +/* isearch.c */ +extern _rl_search_cxt *_rl_scxt_alloc PARAMS((int, int)); +extern void _rl_scxt_dispose PARAMS((_rl_search_cxt *, int)); + +extern int _rl_isearch_dispatch PARAMS((_rl_search_cxt *, int)); +extern int _rl_isearch_callback PARAMS((_rl_search_cxt *)); + +extern int _rl_search_getchar PARAMS((_rl_search_cxt *)); + +/* macro.c */ +extern void _rl_with_macro_input PARAMS((char *)); +extern int _rl_next_macro_key PARAMS((void)); +extern int _rl_prev_macro_key PARAMS((void)); +extern void _rl_push_executing_macro PARAMS((void)); +extern void _rl_pop_executing_macro PARAMS((void)); +extern void _rl_add_macro_char PARAMS((int)); +extern void _rl_kill_kbd_macro PARAMS((void)); + +/* misc.c */ +extern int _rl_arg_overflow PARAMS((void)); +extern void _rl_arg_init PARAMS((void)); +extern int _rl_arg_getchar PARAMS((void)); +extern int _rl_arg_callback PARAMS((_rl_arg_cxt)); +extern void _rl_reset_argument PARAMS((void)); + +extern void _rl_start_using_history PARAMS((void)); +extern int _rl_free_saved_history_line PARAMS((void)); +extern void _rl_set_insert_mode PARAMS((int, int)); + +extern void _rl_revert_all_lines PARAMS((void)); + +/* nls.c */ +extern int _rl_init_eightbit PARAMS((void)); + +/* parens.c */ +extern void _rl_enable_paren_matching PARAMS((int)); + +/* readline.c */ +extern void _rl_init_line_state PARAMS((void)); +extern void _rl_set_the_line PARAMS((void)); +extern int _rl_dispatch PARAMS((int, Keymap)); +extern int _rl_dispatch_subseq PARAMS((int, Keymap, int)); +extern void _rl_internal_char_cleanup PARAMS((void)); + +/* rltty.c */ +extern int _rl_disable_tty_signals PARAMS((void)); +extern int _rl_restore_tty_signals PARAMS((void)); + +/* search.c */ +extern int _rl_nsearch_callback PARAMS((_rl_search_cxt *)); + +/* signals.c */ +extern void _rl_signal_handler PARAMS((int)); + +extern void _rl_block_sigint PARAMS((void)); +extern void _rl_release_sigint PARAMS((void)); +extern void _rl_block_sigwinch PARAMS((void)); +extern void _rl_release_sigwinch PARAMS((void)); + +/* terminal.c */ +extern void _rl_get_screen_size PARAMS((int, int)); +extern void _rl_sigwinch_resize_terminal PARAMS((void)); +extern int _rl_init_terminal_io PARAMS((const char *)); +#ifdef _MINIX +extern void _rl_output_character_function PARAMS((int)); +#else +extern int _rl_output_character_function PARAMS((int)); +#endif +extern void _rl_output_some_chars PARAMS((const char *, int)); +extern int _rl_backspace PARAMS((int)); +extern void _rl_enable_meta_key PARAMS((void)); +extern void _rl_disable_meta_key PARAMS((void)); +extern void _rl_control_keypad PARAMS((int)); +extern void _rl_set_cursor PARAMS((int, int)); + +/* text.c */ +extern void _rl_fix_point PARAMS((int)); +extern int _rl_replace_text PARAMS((const char *, int, int)); +extern int _rl_forward_char_internal PARAMS((int)); +extern int _rl_insert_char PARAMS((int, int)); +extern int _rl_overwrite_char PARAMS((int, int)); +extern int _rl_overwrite_rubout PARAMS((int, int)); +extern int _rl_rubout_char PARAMS((int, int)); +#if defined (HANDLE_MULTIBYTE) +extern int _rl_char_search_internal PARAMS((int, int, char *, int)); +#else +extern int _rl_char_search_internal PARAMS((int, int, int)); +#endif +extern int _rl_set_mark_at_pos PARAMS((int)); + +/* undo.c */ +extern UNDO_LIST *_rl_copy_undo_entry PARAMS((UNDO_LIST *)); +extern UNDO_LIST *_rl_copy_undo_list PARAMS((UNDO_LIST *)); +extern void _rl_free_undo_list PARAMS((UNDO_LIST *)); + +/* util.c */ +#if defined (USE_VARARGS) && defined (PREFER_STDARG) +extern void _rl_ttymsg (const char *, ...) __attribute__((__format__ (printf, 1, 2))); +extern void _rl_errmsg (const char *, ...) __attribute__((__format__ (printf, 1, 2))); +extern void _rl_trace (const char *, ...) __attribute__((__format__ (printf, 1, 2))); +#else +extern void _rl_ttymsg (); +extern void _rl_errmsg (); +extern void _rl_trace (); +#endif +extern void _rl_audit_tty PARAMS((char *)); + +extern int _rl_tropen PARAMS((void)); + +extern int _rl_abort_internal PARAMS((void)); +extern int _rl_null_function PARAMS((int, int)); +extern char *_rl_strindex PARAMS((const char *, const char *)); +extern int _rl_qsort_string_compare PARAMS((char **, char **)); +extern int (_rl_uppercase_p) PARAMS((int)); +extern int (_rl_lowercase_p) PARAMS((int)); +extern int (_rl_pure_alphabetic) PARAMS((int)); +extern int (_rl_digit_p) PARAMS((int)); +extern int (_rl_to_lower) PARAMS((int)); +extern int (_rl_to_upper) PARAMS((int)); +extern int (_rl_digit_value) PARAMS((int)); + +/* vi_mode.c */ +extern void _rl_vi_initialize_line PARAMS((void)); +extern void _rl_vi_reset_last PARAMS((void)); +extern void _rl_vi_set_last PARAMS((int, int, int)); +extern int _rl_vi_textmod_command PARAMS((int)); +extern void _rl_vi_done_inserting PARAMS((void)); +extern int _rl_vi_domove_callback PARAMS((_rl_vimotion_cxt *)); + +/************************************************************************* + * Undocumented private variables * + *************************************************************************/ + +/* bind.c */ +extern const char * const _rl_possible_control_prefixes[]; +extern const char * const _rl_possible_meta_prefixes[]; + +/* callback.c */ +extern _rl_callback_func_t *_rl_callback_func; +extern _rl_callback_generic_arg *_rl_callback_data; + +/* complete.c */ +extern int _rl_complete_show_all; +extern int _rl_complete_show_unmodified; +extern int _rl_complete_mark_directories; +extern int _rl_complete_mark_symlink_dirs; +extern int _rl_completion_prefix_display_length; +extern int _rl_completion_columns; +extern int _rl_print_completions_horizontally; +extern int _rl_completion_case_fold; +extern int _rl_completion_case_map; +extern int _rl_match_hidden_files; +extern int _rl_page_completions; +extern int _rl_skip_completed_text; +extern int _rl_menu_complete_prefix_first; + +/* display.c */ +extern int _rl_vis_botlin; +extern int _rl_last_c_pos; +extern int _rl_suppress_redisplay; +extern int _rl_want_redisplay; + +/* isearch.c */ +extern char *_rl_isearch_terminators; + +extern _rl_search_cxt *_rl_iscxt; + +/* macro.c */ +extern char *_rl_executing_macro; + +/* misc.c */ +extern int _rl_history_preserve_point; +extern int _rl_history_saved_point; + +extern _rl_arg_cxt _rl_argcxt; + +/* nls.c */ +extern int _rl_utf8locale; + +/* readline.c */ +extern int _rl_echoing_p; +extern int _rl_horizontal_scroll_mode; +extern int _rl_mark_modified_lines; +extern int _rl_bell_preference; +extern int _rl_meta_flag; +extern int _rl_convert_meta_chars_to_ascii; +extern int _rl_output_meta_chars; +extern int _rl_bind_stty_chars; +extern int _rl_revert_all_at_newline; +extern int _rl_echo_control_chars; +extern int _rl_show_mode_in_prompt; +extern char *_rl_comment_begin; +extern unsigned char _rl_parsing_conditionalized_out; +extern Keymap _rl_keymap; +extern FILE *_rl_in_stream; +extern FILE *_rl_out_stream; +extern int _rl_last_command_was_kill; +extern int _rl_eof_char; +extern procenv_t _rl_top_level; +extern _rl_keyseq_cxt *_rl_kscxt; +extern int _rl_keyseq_timeout; + +extern int _rl_executing_keyseq_size; + +/* search.c */ +extern _rl_search_cxt *_rl_nscxt; + +/* signals.c */ +extern int _rl_interrupt_immediately; +extern int volatile _rl_caught_signal; + +extern _rl_sigcleanup_func_t *_rl_sigcleanup; +extern void *_rl_sigcleanarg; + +extern int _rl_echoctl; + +extern int _rl_intr_char; +extern int _rl_quit_char; +extern int _rl_susp_char; + +/* terminal.c */ +extern int _rl_enable_keypad; +extern int _rl_enable_meta; +extern char *_rl_term_clreol; +extern char *_rl_term_clrpag; +extern char *_rl_term_im; +extern char *_rl_term_ic; +extern char *_rl_term_ei; +extern char *_rl_term_DC; +extern char *_rl_term_up; +extern char *_rl_term_dc; +extern char *_rl_term_cr; +extern char *_rl_term_IC; +extern char *_rl_term_forward_char; +extern int _rl_screenheight; +extern int _rl_screenwidth; +extern int _rl_screenchars; +extern int _rl_terminal_can_insert; +extern int _rl_term_autowrap; + +/* undo.c */ +extern int _rl_doing_an_undo; +extern int _rl_undo_group_level; + +/* vi_mode.c */ +extern int _rl_vi_last_command; +extern _rl_vimotion_cxt *_rl_vimvcxt; + +#endif /* _RL_PRIVATE_H_ */ diff --git a/src/readline/rlshell.h b/src/readline/rlshell.h new file mode 100644 index 0000000..1126fd7 --- /dev/null +++ b/src/readline/rlshell.h @@ -0,0 +1,33 @@ +/* rlshell.h -- utility functions normally provided by bash. */ + +/* Copyright (C) 1999-2009 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library (Readline), a library + for reading lines of text with interactive input and history editing. + + Readline is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Readline is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Readline. If not, see . +*/ + +#if !defined (_RL_SHELL_H_) +#define _RL_SHELL_H_ + +#include "rlstdc.h" + +extern char *sh_single_quote PARAMS((char *)); +extern void sh_set_lines_and_columns PARAMS((int, int)); +extern char *sh_get_env_value PARAMS((const char *)); +extern char *sh_get_home_dir PARAMS((void)); +extern int sh_unset_nodelay_mode PARAMS((int)); + +#endif /* _RL_SHELL_H_ */ diff --git a/src/readline/rlstdc.h b/src/readline/rlstdc.h new file mode 100644 index 0000000..e295b7f --- /dev/null +++ b/src/readline/rlstdc.h @@ -0,0 +1,57 @@ +/* stdc.h -- macros to make source compile on both ANSI C and K&R C compilers. */ + +/* Copyright (C) 1993-2009 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library (Readline), a library + for reading lines of text with interactive input and history editing. + + Readline is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Readline is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Readline. If not, see . +*/ + +#if !defined (_RL_STDC_H_) +#define _RL_STDC_H_ + +/* Adapted from BSD /usr/include/sys/cdefs.h. */ + +/* A function can be defined using prototypes and compile on both ANSI C + and traditional C compilers with something like this: + extern char *func PARAMS((char *, char *, int)); */ + +#if !defined (PARAMS) +# if defined (__STDC__) || defined (__GNUC__) || defined (__cplusplus) +# define PARAMS(protos) protos +# else +# define PARAMS(protos) () +# endif +#endif + +#ifndef __attribute__ +# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) +# define __attribute__(x) +# endif +#endif + +/* Moved from config.h.in because readline.h:rl_message depends on these + defines. */ +#if defined (__STDC__) && defined (HAVE_STDARG_H) +# define PREFER_STDARG +# define USE_VARARGS +#else +# if defined (HAVE_VARARGS_H) +# define PREFER_VARARGS +# define USE_VARARGS +# endif +#endif + +#endif /* !_RL_STDC_H_ */ diff --git a/src/readline/rltty.h b/src/readline/rltty.h new file mode 100644 index 0000000..df71ea1 --- /dev/null +++ b/src/readline/rltty.h @@ -0,0 +1,80 @@ +/* rltty.h - tty driver-related definitions used by some library files. */ + +/* Copyright (C) 1995-2009 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library (Readline), a library + for reading lines of text with interactive input and history editing. + + Readline is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Readline is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Readline. If not, see . +*/ + +#if !defined (_RLTTY_H_) +#define _RLTTY_H_ + +/* Posix systems use termios and the Posix signal functions. */ +#if defined (TERMIOS_TTY_DRIVER) +# include +#endif /* TERMIOS_TTY_DRIVER */ + +/* System V machines use termio. */ +#if defined (TERMIO_TTY_DRIVER) +# include +# if !defined (TCOON) +# define TCOON 1 +# endif +#endif /* TERMIO_TTY_DRIVER */ + +/* Other (BSD) machines use sgtty. */ +#if defined (NEW_TTY_DRIVER) +# include +#endif + +#include "rlwinsize.h" + +/* Define _POSIX_VDISABLE if we are not using the `new' tty driver and + it is not already defined. It is used both to determine if a + special character is disabled and to disable certain special + characters. Posix systems should set to 0, USG systems to -1. */ +#if !defined (NEW_TTY_DRIVER) && !defined (_POSIX_VDISABLE) +# if defined (_SVR4_VDISABLE) +# define _POSIX_VDISABLE _SVR4_VDISABLE +# else +# if defined (_POSIX_VERSION) +# define _POSIX_VDISABLE 0 +# else /* !_POSIX_VERSION */ +# define _POSIX_VDISABLE -1 +# endif /* !_POSIX_VERSION */ +# endif /* !_SVR4_DISABLE */ +#endif /* !NEW_TTY_DRIVER && !_POSIX_VDISABLE */ + +typedef struct _rl_tty_chars { + unsigned char t_eof; + unsigned char t_eol; + unsigned char t_eol2; + unsigned char t_erase; + unsigned char t_werase; + unsigned char t_kill; + unsigned char t_reprint; + unsigned char t_intr; + unsigned char t_quit; + unsigned char t_susp; + unsigned char t_dsusp; + unsigned char t_start; + unsigned char t_stop; + unsigned char t_lnext; + unsigned char t_flush; + unsigned char t_status; +} _RL_TTY_CHARS; + +#endif /* _RLTTY_H_ */ diff --git a/src/readline/rltypedefs.h b/src/readline/rltypedefs.h new file mode 100644 index 0000000..8fe2846 --- /dev/null +++ b/src/readline/rltypedefs.h @@ -0,0 +1,81 @@ +/* rltypedefs.h -- Type declarations for readline functions. */ + +/* Copyright (C) 2000-2011 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library (Readline), a library + for reading lines of text with interactive input and history editing. + + Readline is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Readline is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Readline. If not, see . +*/ + +#ifndef _RL_TYPEDEFS_H_ +#define _RL_TYPEDEFS_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +/* New style. */ + +#if !defined (_RL_FUNCTION_TYPEDEF) +# define _RL_FUNCTION_TYPEDEF + +/* Bindable functions */ +typedef int rl_command_func_t PARAMS((int, int)); + +/* Typedefs for the completion system */ +typedef char *rl_compentry_func_t PARAMS((const char *, int)); +typedef char **rl_completion_func_t PARAMS((const char *, int, int)); + +typedef char *rl_quote_func_t PARAMS((char *, int, char *)); +typedef char *rl_dequote_func_t PARAMS((char *, int)); + +typedef int rl_compignore_func_t PARAMS((char **)); + +typedef void rl_compdisp_func_t PARAMS((char **, int, int)); + +/* Type for input and pre-read hook functions like rl_event_hook */ +typedef int rl_hook_func_t PARAMS((void)); + +/* Input function type */ +typedef int rl_getc_func_t PARAMS((FILE *)); + +/* Generic function that takes a character buffer (which could be the readline + line buffer) and an index into it (which could be rl_point) and returns + an int. */ +typedef int rl_linebuf_func_t PARAMS((char *, int)); + +/* `Generic' function pointer typedefs */ +typedef int rl_intfunc_t PARAMS((int)); +#define rl_ivoidfunc_t rl_hook_func_t +typedef int rl_icpfunc_t PARAMS((char *)); +typedef int rl_icppfunc_t PARAMS((char **)); + +typedef void rl_voidfunc_t PARAMS((void)); +typedef void rl_vintfunc_t PARAMS((int)); +typedef void rl_vcpfunc_t PARAMS((char *)); +typedef void rl_vcppfunc_t PARAMS((char **)); + +typedef char *rl_cpvfunc_t PARAMS((void)); +typedef char *rl_cpifunc_t PARAMS((int)); +typedef char *rl_cpcpfunc_t PARAMS((char *)); +typedef char *rl_cpcppfunc_t PARAMS((char **)); + +#endif /* _RL_FUNCTION_TYPEDEF */ + +#ifdef __cplusplus +} +#endif + +#endif /* _RL_TYPEDEFS_H_ */ diff --git a/src/readline/rlwinsize.h b/src/readline/rlwinsize.h new file mode 100644 index 0000000..664132f --- /dev/null +++ b/src/readline/rlwinsize.h @@ -0,0 +1,58 @@ +/* rlwinsize.h -- an attempt to isolate some of the system-specific defines + for `struct winsize' and TIOCGWINSZ. */ + +/* Copyright (C) 1997-2009 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library (Readline), a library + for reading lines of text with interactive input and history editing. + + Readline is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Readline is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Readline. If not, see . +*/ + +#if !defined (_RLWINSIZE_H_) +#define _RLWINSIZE_H_ + +#if defined (HAVE_CONFIG_H) +# include "config.h" +#endif + +/* Try to find the definitions of `struct winsize' and TIOGCWINSZ */ + +#if defined (GWINSZ_IN_SYS_IOCTL) && !defined (TIOCGWINSZ) +# include +#endif /* GWINSZ_IN_SYS_IOCTL && !TIOCGWINSZ */ + +#if defined (STRUCT_WINSIZE_IN_TERMIOS) && !defined (STRUCT_WINSIZE_IN_SYS_IOCTL) +# include +#endif /* STRUCT_WINSIZE_IN_TERMIOS && !STRUCT_WINSIZE_IN_SYS_IOCTL */ + +/* Not in either of the standard places, look around. */ +#if !defined (STRUCT_WINSIZE_IN_TERMIOS) && !defined (STRUCT_WINSIZE_IN_SYS_IOCTL) +# if defined (HAVE_SYS_STREAM_H) +# include +# endif /* HAVE_SYS_STREAM_H */ +# if defined (HAVE_SYS_PTEM_H) /* SVR4.2, at least, has it here */ +# include +# define _IO_PTEM_H /* work around SVR4.2 1.1.4 bug */ +# endif /* HAVE_SYS_PTEM_H */ +# if defined (HAVE_SYS_PTE_H) /* ??? */ +# include +# endif /* HAVE_SYS_PTE_H */ +#endif /* !STRUCT_WINSIZE_IN_TERMIOS && !STRUCT_WINSIZE_IN_SYS_IOCTL */ + +#if defined (M_UNIX) && !defined (_SCO_DS) && !defined (tcflow) +# define tcflow(fd, action) ioctl(fd, TCXONC, action) +#endif + +#endif /* _RL_WINSIZE_H */ diff --git a/src/readline/tcap.h b/src/readline/tcap.h new file mode 100644 index 0000000..9da0080 --- /dev/null +++ b/src/readline/tcap.h @@ -0,0 +1,58 @@ +/* tcap.h -- termcap library functions and variables. */ + +/* Copyright (C) 1996-2009 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library (Readline), a library + for reading lines of text with interactive input and history editing. + + Readline is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Readline is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Readline. If not, see . +*/ + +#if !defined (_RLTCAP_H_) +#define _RLTCAP_H_ + +#if defined (HAVE_CONFIG_H) +# include "config.h" +#endif + +#if defined (HAVE_TERMCAP_H) +# if defined (__linux__) && !defined (SPEED_T_IN_SYS_TYPES) +# include "rltty.h" +# endif +# include +#else + +/* On Solaris2, sys/types.h #includes sys/reg.h, which #defines PC. + Unfortunately, PC is a global variable used by the termcap library. */ +#ifdef PC +# undef PC +#endif + +extern char PC; +extern char *UP, *BC; + +extern short ospeed; + +extern int tgetent (); +extern int tgetflag (); +extern int tgetnum (); +extern char *tgetstr (); + +extern int tputs (); + +extern char *tgoto (); + +#endif /* HAVE_TERMCAP_H */ + +#endif /* !_RLTCAP_H_ */ diff --git a/src/readline/tilde.h b/src/readline/tilde.h new file mode 100644 index 0000000..4fbfbf4 --- /dev/null +++ b/src/readline/tilde.h @@ -0,0 +1,80 @@ +/* tilde.h: Externally available variables and function in libtilde.a. */ + +/* Copyright (C) 1992-2009 Free Software Foundation, Inc. + + This file contains the Readline Library (Readline), a set of + routines for providing Emacs style line input to programs that ask + for it. + + Readline is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Readline is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Readline. If not, see . +*/ + +#if !defined (_TILDE_H_) +# define _TILDE_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +/* A function can be defined using prototypes and compile on both ANSI C + and traditional C compilers with something like this: + extern char *func PARAMS((char *, char *, int)); */ + +#if !defined (PARAMS) +# if defined (__STDC__) || defined (__GNUC__) || defined (__cplusplus) +# define PARAMS(protos) protos +# else +# define PARAMS(protos) () +# endif +#endif + +typedef char *tilde_hook_func_t PARAMS((char *)); + +/* If non-null, this contains the address of a function that the application + wants called before trying the standard tilde expansions. The function + is called with the text sans tilde, and returns a malloc()'ed string + which is the expansion, or a NULL pointer if the expansion fails. */ +extern tilde_hook_func_t *tilde_expansion_preexpansion_hook; + +/* If non-null, this contains the address of a function to call if the + standard meaning for expanding a tilde fails. The function is called + with the text (sans tilde, as in "foo"), and returns a malloc()'ed string + which is the expansion, or a NULL pointer if there is no expansion. */ +extern tilde_hook_func_t *tilde_expansion_failure_hook; + +/* When non-null, this is a NULL terminated array of strings which + are duplicates for a tilde prefix. Bash uses this to expand + `=~' and `:~'. */ +extern char **tilde_additional_prefixes; + +/* When non-null, this is a NULL terminated array of strings which match + the end of a username, instead of just "/". Bash sets this to + `:' and `=~'. */ +extern char **tilde_additional_suffixes; + +/* Return a new string which is the result of tilde expanding STRING. */ +extern char *tilde_expand PARAMS((const char *)); + +/* Do the work of tilde expansion on FILENAME. FILENAME starts with a + tilde. If there is no expansion, call tilde_expansion_failure_hook. */ +extern char *tilde_expand_word PARAMS((const char *)); + +/* Find the portion of the string beginning with ~ that should be expanded. */ +extern char *tilde_find_word PARAMS((const char *, int, int *)); + +#ifdef __cplusplus +} +#endif + +#endif /* _TILDE_H_ */ diff --git a/src/readline/xmalloc.h b/src/readline/xmalloc.h new file mode 100644 index 0000000..0f09f03 --- /dev/null +++ b/src/readline/xmalloc.h @@ -0,0 +1,45 @@ +/* xmalloc.h -- memory allocation that aborts on errors. */ + +/* Copyright (C) 1999-2009 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library (Readline), a library + for reading lines of text with interactive input and history editing. + + Readline is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Readline is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Readline. If not, see . +*/ + +#if !defined (_XMALLOC_H_) +#define _XMALLOC_H_ + +#if defined (READLINE_LIBRARY) +# include "rlstdc.h" +#else +# include +#endif + +#ifndef PTR_T + +#ifdef __STDC__ +# define PTR_T void * +#else +# define PTR_T char * +#endif + +#endif /* !PTR_T */ + +extern PTR_T xmalloc PARAMS((size_t)); +extern PTR_T xrealloc PARAMS((void *, size_t)); +extern void xfree PARAMS((void *)); + +#endif /* _XMALLOC_H_ */ diff --git a/src/table.c b/src/table.c new file mode 100644 index 0000000..748e8f9 --- /dev/null +++ b/src/table.c @@ -0,0 +1,186 @@ +/* picoc hash table module. This hash table code is used for both symbol tables + * and the shared string table. */ + +#include "interpreter.h" + +/* initialise the shared string system */ +void TableInit(Picoc *pc) +{ + TableInitTable(&pc->StringTable, &pc->StringHashTable[0], STRING_TABLE_SIZE, TRUE); + pc->StrEmpty = TableStrRegister(pc, ""); +} + +/* hash function for strings */ +static unsigned int TableHash(const char *Key, int Len) +{ + unsigned int Hash = Len; + int Offset; + int Count; + + for (Count = 0, Offset = 8; Count < Len; Count++, Offset+=7) + { + if (Offset > sizeof(unsigned int) * 8 - 7) + Offset -= sizeof(unsigned int) * 8 - 6; + + Hash ^= *Key++ << Offset; + } + + return Hash; +} + +/* initialise a table */ +void TableInitTable(struct Table *Tbl, struct TableEntry **HashTable, int Size, int OnHeap) +{ + Tbl->Size = Size; + Tbl->OnHeap = OnHeap; + Tbl->HashTable = HashTable; + memset((void *)HashTable, '\0', sizeof(struct TableEntry *) * Size); +} + +/* check a hash table entry for a key */ +static struct TableEntry *TableSearch(struct Table *Tbl, const char *Key, int *AddAt) +{ + struct TableEntry *Entry; + int HashValue = ((unsigned long)Key) % Tbl->Size; /* shared strings have unique addresses so we don't need to hash them */ + + for (Entry = Tbl->HashTable[HashValue]; Entry != NULL; Entry = Entry->Next) + { + if (Entry->p.v.Key == Key) + return Entry; /* found */ + } + + *AddAt = HashValue; /* didn't find it in the chain */ + return NULL; +} + +/* set an identifier to a value. returns FALSE if it already exists. + * Key must be a shared string from TableStrRegister() */ +int TableSet(Picoc *pc, struct Table *Tbl, char *Key, struct Value *Val, const char *DeclFileName, int DeclLine, int DeclColumn) +{ + int AddAt; + struct TableEntry *FoundEntry = TableSearch(Tbl, Key, &AddAt); + + if (FoundEntry == NULL) + { /* add it to the table */ + struct TableEntry *NewEntry = VariableAlloc(pc, NULL, sizeof(struct TableEntry), Tbl->OnHeap); + NewEntry->DeclFileName = DeclFileName; + NewEntry->DeclLine = DeclLine; + NewEntry->DeclColumn = DeclColumn; + NewEntry->p.v.Key = Key; + NewEntry->p.v.Val = Val; + NewEntry->Next = Tbl->HashTable[AddAt]; + Tbl->HashTable[AddAt] = NewEntry; + return TRUE; + } + + return FALSE; +} + +/* find a value in a table. returns FALSE if not found. + * Key must be a shared string from TableStrRegister() */ +int TableGet(struct Table *Tbl, const char *Key, struct Value **Val, const char **DeclFileName, int *DeclLine, int *DeclColumn) +{ + int AddAt; + struct TableEntry *FoundEntry = TableSearch(Tbl, Key, &AddAt); + if (FoundEntry == NULL) + return FALSE; + + *Val = FoundEntry->p.v.Val; + + if (DeclFileName != NULL) + { + *DeclFileName = FoundEntry->DeclFileName; + *DeclLine = FoundEntry->DeclLine; + *DeclColumn = FoundEntry->DeclColumn; + } + + return TRUE; +} + +/* remove an entry from the table */ +struct Value *TableDelete(Picoc *pc, struct Table *Tbl, const char *Key) +{ + struct TableEntry **EntryPtr; + int HashValue = ((unsigned long)Key) % Tbl->Size; /* shared strings have unique addresses so we don't need to hash them */ + + for (EntryPtr = &Tbl->HashTable[HashValue]; *EntryPtr != NULL; EntryPtr = &(*EntryPtr)->Next) + { + if ((*EntryPtr)->p.v.Key == Key) + { + struct TableEntry *DeleteEntry = *EntryPtr; + struct Value *Val = DeleteEntry->p.v.Val; + *EntryPtr = DeleteEntry->Next; + HeapFreeMem(pc, DeleteEntry); + + return Val; + } + } + + return NULL; +} + +/* check a hash table entry for an identifier */ +static struct TableEntry *TableSearchIdentifier(struct Table *Tbl, const char *Key, int Len, int *AddAt) +{ + struct TableEntry *Entry; + int HashValue = TableHash(Key, Len) % Tbl->Size; + + for (Entry = Tbl->HashTable[HashValue]; Entry != NULL; Entry = Entry->Next) + { + if (strncmp(&Entry->p.Key[0], (char *)Key, Len) == 0 && Entry->p.Key[Len] == '\0') + return Entry; /* found */ + } + + *AddAt = HashValue; /* didn't find it in the chain */ + return NULL; +} + +/* set an identifier and return the identifier. share if possible */ +char *TableSetIdentifier(Picoc *pc, struct Table *Tbl, const char *Ident, int IdentLen) +{ + int AddAt; + struct TableEntry *FoundEntry = TableSearchIdentifier(Tbl, Ident, IdentLen, &AddAt); + + if (FoundEntry != NULL) + return &FoundEntry->p.Key[0]; + else + { /* add it to the table - we economise by not allocating the whole structure here */ + struct TableEntry *NewEntry = HeapAllocMem(pc, sizeof(struct TableEntry) - sizeof(union TableEntryPayload) + IdentLen + 1); + if (NewEntry == NULL) + ProgramFailNoParser(pc, "out of memory"); + + strncpy((char *)&NewEntry->p.Key[0], (char *)Ident, IdentLen); + NewEntry->p.Key[IdentLen] = '\0'; + NewEntry->Next = Tbl->HashTable[AddAt]; + Tbl->HashTable[AddAt] = NewEntry; + return &NewEntry->p.Key[0]; + } +} + +/* register a string in the shared string store */ +char *TableStrRegister2(Picoc *pc, const char *Str, int Len) +{ + return TableSetIdentifier(pc, &pc->StringTable, Str, Len); +} + +char *TableStrRegister(Picoc *pc, const char *Str) +{ + return TableStrRegister2(pc, Str, strlen((char *)Str)); +} + +/* free all the strings */ +void TableStrFree(Picoc *pc) +{ + struct TableEntry *Entry; + struct TableEntry *NextEntry; + int Count; + + for (Count = 0; Count < pc->StringTable.Size; Count++) + { + for (Entry = pc->StringTable.HashTable[Count]; Entry != NULL; Entry = NextEntry) + { + NextEntry = Entry->Next; + HeapFreeMem(pc, Entry); + } + } +} diff --git a/src/table.o b/src/table.o new file mode 100644 index 0000000..950dcce Binary files /dev/null and b/src/table.o differ diff --git a/src/tests/00_assignment.c b/src/tests/00_assignment.c new file mode 100644 index 0000000..56738ba --- /dev/null +++ b/src/tests/00_assignment.c @@ -0,0 +1,13 @@ +#include + +int a; +a = 42; +printf("%d\n", a); + +int b = 64; +printf("%d\n", b); + +int c = 12, d = 34; +printf("%d, %d\n", c, d); + +void main() {} diff --git a/src/tests/00_assignment.expect b/src/tests/00_assignment.expect new file mode 100644 index 0000000..d4407f3 --- /dev/null +++ b/src/tests/00_assignment.expect @@ -0,0 +1,3 @@ +42 +64 +12, 34 diff --git a/src/tests/01_comment.c b/src/tests/01_comment.c new file mode 100644 index 0000000..ce8d687 --- /dev/null +++ b/src/tests/01_comment.c @@ -0,0 +1,10 @@ +#include + +printf("Hello\n"); +printf("Hello\n"); /* this is a comment */ printf("Hello\n"); +printf("Hello\n"); +// this is also a comment sayhello(); +printf("Hello\n"); + + +void main() {} diff --git a/src/tests/01_comment.expect b/src/tests/01_comment.expect new file mode 100644 index 0000000..b1387ad --- /dev/null +++ b/src/tests/01_comment.expect @@ -0,0 +1,5 @@ +Hello +Hello +Hello +Hello +Hello diff --git a/src/tests/02_printf.c b/src/tests/02_printf.c new file mode 100644 index 0000000..f779c1e --- /dev/null +++ b/src/tests/02_printf.c @@ -0,0 +1,13 @@ +#include + +printf("Hello world\n"); + +int Count; +for (Count = -5; Count <= 5; Count++) + printf("Count = %d\n", Count); + +printf("String 'hello', 'there' is '%s', '%s'\n", "hello", "there"); +printf("Character 'A' is '%c'\n", 65); +printf("Character 'a' is '%c'\n", 'a'); + +void main() {} diff --git a/src/tests/02_printf.expect b/src/tests/02_printf.expect new file mode 100644 index 0000000..f67a0f6 --- /dev/null +++ b/src/tests/02_printf.expect @@ -0,0 +1,15 @@ +Hello world +Count = -5 +Count = -4 +Count = -3 +Count = -2 +Count = -1 +Count = 0 +Count = 1 +Count = 2 +Count = 3 +Count = 4 +Count = 5 +String 'hello', 'there' is 'hello', 'there' +Character 'A' is 'A' +Character 'a' is 'a' diff --git a/src/tests/03_struct.c b/src/tests/03_struct.c new file mode 100644 index 0000000..079622d --- /dev/null +++ b/src/tests/03_struct.c @@ -0,0 +1,21 @@ +#include + +struct fred +{ + int boris; + int natasha; +}; + +struct fred bloggs; + +bloggs.boris = 12; +bloggs.natasha = 34; + +printf("%d\n", bloggs.boris); +printf("%d\n", bloggs.natasha); + +//struct fred jones[2]; +//jones[0].boris = 12; +//jones[0].natasha = 34; + +void main() {} diff --git a/src/tests/03_struct.expect b/src/tests/03_struct.expect new file mode 100644 index 0000000..8e994dd --- /dev/null +++ b/src/tests/03_struct.expect @@ -0,0 +1,2 @@ +12 +34 diff --git a/src/tests/04_for.c b/src/tests/04_for.c new file mode 100644 index 0000000..de563b5 --- /dev/null +++ b/src/tests/04_for.c @@ -0,0 +1,10 @@ +#include + +int Count; + +for (Count = 1; Count <= 10; Count++) +{ + printf("%d\n", Count); +} + +void main() {} diff --git a/src/tests/04_for.expect b/src/tests/04_for.expect new file mode 100644 index 0000000..f00c965 --- /dev/null +++ b/src/tests/04_for.expect @@ -0,0 +1,10 @@ +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 diff --git a/src/tests/05_array.c b/src/tests/05_array.c new file mode 100644 index 0000000..03dac05 --- /dev/null +++ b/src/tests/05_array.c @@ -0,0 +1,16 @@ +#include + +int Count; +int Array[10]; + +for (Count = 1; Count <= 10; Count++) +{ + Array[Count-1] = Count * Count; +} + +for (Count = 0; Count < 10; Count++) +{ + printf("%d\n", Array[Count]); +} + +void main() {} diff --git a/src/tests/05_array.expect b/src/tests/05_array.expect new file mode 100644 index 0000000..bc7257c --- /dev/null +++ b/src/tests/05_array.expect @@ -0,0 +1,10 @@ +1 +4 +9 +16 +25 +36 +49 +64 +81 +100 diff --git a/src/tests/06_case.c b/src/tests/06_case.c new file mode 100644 index 0000000..1858205 --- /dev/null +++ b/src/tests/06_case.c @@ -0,0 +1,24 @@ +#include + +int Count; + +for (Count = 0; Count < 4; Count++) +{ + printf("%d\n", Count); + switch (Count) + { + case 1: + printf("%d\n", 1); + break; + + case 2: + printf("%d\n", 2); + break; + + default: + printf("%d\n", 0); + break; + } +} + +void main() {} diff --git a/src/tests/06_case.expect b/src/tests/06_case.expect new file mode 100644 index 0000000..fab2c20 --- /dev/null +++ b/src/tests/06_case.expect @@ -0,0 +1,8 @@ +0 +0 +1 +1 +2 +2 +3 +0 diff --git a/src/tests/07_function.c b/src/tests/07_function.c new file mode 100644 index 0000000..0501380 --- /dev/null +++ b/src/tests/07_function.c @@ -0,0 +1,25 @@ +#include + +int myfunc(int x) +{ + return x * x; +} + +printf("%d\n", myfunc(3)); +printf("%d\n", myfunc(4)); + +void vfunc(int a) +{ + printf("a=%d\n", a); +} + +vfunc(1234); + +void qfunc() +{ + printf("qfunc()\n"); +} + +qfunc(); + +void main() {} diff --git a/src/tests/07_function.expect b/src/tests/07_function.expect new file mode 100644 index 0000000..8ffb0a7 --- /dev/null +++ b/src/tests/07_function.expect @@ -0,0 +1,4 @@ +9 +16 +a=1234 +qfunc() diff --git a/src/tests/08_while.c b/src/tests/08_while.c new file mode 100644 index 0000000..aee79ba --- /dev/null +++ b/src/tests/08_while.c @@ -0,0 +1,19 @@ +#include + +int a; +int p; +int t; + +a = 1; +p = 0; +t = 0; + +while (a < 100) +{ + printf("%d\n", a); + t = a; + a = t + p; + p = t; +} + +void main() {} diff --git a/src/tests/08_while.expect b/src/tests/08_while.expect new file mode 100644 index 0000000..702d4c0 --- /dev/null +++ b/src/tests/08_while.expect @@ -0,0 +1,11 @@ +1 +1 +2 +3 +5 +8 +13 +21 +34 +55 +89 diff --git a/src/tests/09_do_while.c b/src/tests/09_do_while.c new file mode 100644 index 0000000..e55b83a --- /dev/null +++ b/src/tests/09_do_while.c @@ -0,0 +1,20 @@ +#include + +int a; +int p; +int t; + +a = 1; +p = 0; +t = 0; + +do +{ + printf("%d\n", a); + t = a; + a = t + p; + p = t; +} while (a < 100); + + +void main() {} diff --git a/src/tests/09_do_while.expect b/src/tests/09_do_while.expect new file mode 100644 index 0000000..702d4c0 --- /dev/null +++ b/src/tests/09_do_while.expect @@ -0,0 +1,11 @@ +1 +1 +2 +3 +5 +8 +13 +21 +34 +55 +89 diff --git a/src/tests/10_pointer.c b/src/tests/10_pointer.c new file mode 100644 index 0000000..1bd40e3 --- /dev/null +++ b/src/tests/10_pointer.c @@ -0,0 +1,37 @@ +#include + +int a; +int *b; +int c; + +a = 42; +b = &a; +printf("a = %d\n", *b); + +struct ziggy +{ + int a; + int b; + int c; +} bolshevic; + +bolshevic.a = 12; +bolshevic.b = 34; +bolshevic.c = 56; + +printf("bolshevic.a = %d\n", bolshevic.a); +printf("bolshevic.b = %d\n", bolshevic.b); +printf("bolshevic.c = %d\n", bolshevic.c); + +struct ziggy *tsar = &bolshevic; + +printf("tsar->a = %d\n", tsar->a); +printf("tsar->b = %d\n", tsar->b); +printf("tsar->c = %d\n", tsar->c); + +/* +b = &(bolshevic.b); +printf("bolshevic.b = %d\n", *b); +*/ + +void main() {} diff --git a/src/tests/10_pointer.expect b/src/tests/10_pointer.expect new file mode 100644 index 0000000..97116c0 --- /dev/null +++ b/src/tests/10_pointer.expect @@ -0,0 +1,7 @@ +a = 42 +bolshevic.a = 12 +bolshevic.b = 34 +bolshevic.c = 56 +tsar->a = 12 +tsar->b = 34 +tsar->c = 56 diff --git a/src/tests/11_precedence.c b/src/tests/11_precedence.c new file mode 100644 index 0000000..f7a4bda --- /dev/null +++ b/src/tests/11_precedence.c @@ -0,0 +1,38 @@ +#include + +int a; +int b; +int c; +int d; +int e; +int f; +int x; +int y; + +a = 12; +b = 34; +c = 56; +d = 78; +e = 0; +f = 1; + +printf("%d\n", c + d); +printf("%d\n", (y = c + d)); +/* printf("%d\n", a ? b+c : c+d); +printf("%d\n", a ? b+c : c+d); +printf("%d\n", a || b ? b+c : c+d); */ +printf("%d\n", e || e && f); +printf("%d\n", e || f && f); +printf("%d\n", e && e || f); +printf("%d\n", e && f || f); +printf("%d\n", a && f | f); +printf("%d\n", a | b ^ c & d); +printf("%d, %d\n", a == a, a == b); +printf("%d, %d\n", a != a, a != b); +printf("%d\n", a != b && c != d); +printf("%d\n", a + b * c / f); +printf("%d\n", a + b * c / f); +printf("%d\n", (4 << 4)); +printf("%d\n", (64 >> 4)); + +void main() {} diff --git a/src/tests/11_precedence.expect b/src/tests/11_precedence.expect new file mode 100644 index 0000000..b692396 --- /dev/null +++ b/src/tests/11_precedence.expect @@ -0,0 +1,15 @@ +134 +134 +0 +1 +1 +1 +1 +46 +1, 0 +0, 1 +1 +1916 +1916 +64 +4 diff --git a/src/tests/12_hashdefine.c b/src/tests/12_hashdefine.c new file mode 100644 index 0000000..6ffaf3f --- /dev/null +++ b/src/tests/12_hashdefine.c @@ -0,0 +1,10 @@ +#include + +#define FRED 12 +#define BLOGGS(x) (12*(x)) + +printf("%d\n", FRED); +printf("%d, %d, %d\n", BLOGGS(1), BLOGGS(2), BLOGGS(3)); + + +void main() {} diff --git a/src/tests/12_hashdefine.expect b/src/tests/12_hashdefine.expect new file mode 100644 index 0000000..99f2ed5 --- /dev/null +++ b/src/tests/12_hashdefine.expect @@ -0,0 +1,2 @@ +12 +12, 24, 36 diff --git a/src/tests/13_integer_literals.c b/src/tests/13_integer_literals.c new file mode 100644 index 0000000..f021de2 --- /dev/null +++ b/src/tests/13_integer_literals.c @@ -0,0 +1,16 @@ +#include + +int a = 24680; +int b = 01234567; +int c = 0x2468ac; +int d = 0x2468AC; +int e = 0b010101010101; + +printf("%d\n", a); +printf("%d\n", b); +printf("%d\n", c); +printf("%d\n", d); +printf("%d\n", e); + + +void main() {} diff --git a/src/tests/13_integer_literals.expect b/src/tests/13_integer_literals.expect new file mode 100644 index 0000000..f5aca06 --- /dev/null +++ b/src/tests/13_integer_literals.expect @@ -0,0 +1,5 @@ +24680 +342391 +2386092 +2386092 +1365 diff --git a/src/tests/14_if.c b/src/tests/14_if.c new file mode 100644 index 0000000..bb56ef4 --- /dev/null +++ b/src/tests/14_if.c @@ -0,0 +1,17 @@ +#include + +int a = 1; + +if (a) + printf("a is true\n"); +else + printf("a is false\n"); + +int b = 0; +if (b) + printf("b is true\n"); +else + printf("b is false\n"); + + +void main() {} diff --git a/src/tests/14_if.expect b/src/tests/14_if.expect new file mode 100644 index 0000000..c32c415 --- /dev/null +++ b/src/tests/14_if.expect @@ -0,0 +1,2 @@ +a is true +b is false diff --git a/src/tests/15_recursion.c b/src/tests/15_recursion.c new file mode 100644 index 0000000..4733c8f --- /dev/null +++ b/src/tests/15_recursion.c @@ -0,0 +1,16 @@ +#include + +int factorial(int i) +{ + if (i < 2) + return i; + else + return i * factorial(i - 1); +} + +int Count; + +for (Count = 1; Count <= 10; Count++) + printf("%d\n", factorial(Count)); + +void main() {} diff --git a/src/tests/15_recursion.expect b/src/tests/15_recursion.expect new file mode 100644 index 0000000..db47b28 --- /dev/null +++ b/src/tests/15_recursion.expect @@ -0,0 +1,10 @@ +1 +2 +6 +24 +120 +720 +5040 +40320 +362880 +3628800 diff --git a/src/tests/16_nesting.c b/src/tests/16_nesting.c new file mode 100644 index 0000000..90a62bf --- /dev/null +++ b/src/tests/16_nesting.c @@ -0,0 +1,16 @@ +#include + +int x, y, z; + +for (x = 0; x < 2; x++) +{ + for (y = 0; y < 3; y++) + { + for (z = 0; z < 3; z++) + { + printf("%d %d %d\n", x, y, z); + } + } +} + +void main() {} diff --git a/src/tests/16_nesting.expect b/src/tests/16_nesting.expect new file mode 100644 index 0000000..625ee13 --- /dev/null +++ b/src/tests/16_nesting.expect @@ -0,0 +1,18 @@ +0 0 0 +0 0 1 +0 0 2 +0 1 0 +0 1 1 +0 1 2 +0 2 0 +0 2 1 +0 2 2 +1 0 0 +1 0 1 +1 0 2 +1 1 0 +1 1 1 +1 1 2 +1 2 0 +1 2 1 +1 2 2 diff --git a/src/tests/17_enum.c b/src/tests/17_enum.c new file mode 100644 index 0000000..f53c88c --- /dev/null +++ b/src/tests/17_enum.c @@ -0,0 +1,24 @@ +#include + +enum fred +{ + a, + b, + c, + d, + e = 54, + f = 73, + g, + h +}; + +enum fred frod; + +printf("%d %d %d %d %d %d %d %d\n", a, b, c, d, e, f, g, h); +printf("%d\n", frod); +frod = 12; +printf("%d\n", frod); +frod = e; +printf("%d\n", frod); + +void main() {} diff --git a/src/tests/17_enum.expect b/src/tests/17_enum.expect new file mode 100644 index 0000000..0c17a2d --- /dev/null +++ b/src/tests/17_enum.expect @@ -0,0 +1,4 @@ +0 1 2 3 54 73 74 75 +0 +12 +54 diff --git a/src/tests/18_include.c b/src/tests/18_include.c new file mode 100644 index 0000000..f2bfcc6 --- /dev/null +++ b/src/tests/18_include.c @@ -0,0 +1,7 @@ +#include + +printf("including\n"); +#include "18_include.h" +printf("done\n"); + +void main() {} diff --git a/src/tests/18_include.expect b/src/tests/18_include.expect new file mode 100644 index 0000000..87729df --- /dev/null +++ b/src/tests/18_include.expect @@ -0,0 +1,3 @@ +including +included +done diff --git a/src/tests/18_include.h b/src/tests/18_include.h new file mode 100644 index 0000000..01f894d --- /dev/null +++ b/src/tests/18_include.h @@ -0,0 +1 @@ +printf("included\n"); diff --git a/src/tests/19_pointer_arithmetic.c b/src/tests/19_pointer_arithmetic.c new file mode 100644 index 0000000..96c7e6a --- /dev/null +++ b/src/tests/19_pointer_arithmetic.c @@ -0,0 +1,24 @@ +#include + +int a; +int *b; +int *c; + +a = 42; +b = &a; +c = NULL; + +printf("%d\n", *b); + +if (b == NULL) + printf("b is NULL\n"); +else + printf("b is not NULL\n"); + +if (c == NULL) + printf("c is NULL\n"); +else + printf("c is not NULL\n"); + + +void main() {} diff --git a/src/tests/19_pointer_arithmetic.expect b/src/tests/19_pointer_arithmetic.expect new file mode 100644 index 0000000..0cf781b --- /dev/null +++ b/src/tests/19_pointer_arithmetic.expect @@ -0,0 +1,3 @@ +42 +b is not NULL +c is NULL diff --git a/src/tests/20_pointer_comparison.c b/src/tests/20_pointer_comparison.c new file mode 100644 index 0000000..bab1d5e --- /dev/null +++ b/src/tests/20_pointer_comparison.c @@ -0,0 +1,20 @@ +#include + +int a; +int b; +int *d; +int *e; +d = &a; +e = &b; +a = 12; +b = 34; +printf("%d\n", *d); +printf("%d\n", *e); +printf("%d\n", d == e); +printf("%d\n", d != e); +d = e; +printf("%d\n", d == e); +printf("%d\n", d != e); + + +void main() {} diff --git a/src/tests/20_pointer_comparison.expect b/src/tests/20_pointer_comparison.expect new file mode 100644 index 0000000..5d1e5f5 --- /dev/null +++ b/src/tests/20_pointer_comparison.expect @@ -0,0 +1,6 @@ +12 +34 +0 +1 +1 +0 diff --git a/src/tests/21_char_array.c b/src/tests/21_char_array.c new file mode 100644 index 0000000..0f158cd --- /dev/null +++ b/src/tests/21_char_array.c @@ -0,0 +1,29 @@ +#include + +int x = 'a'; +char y = x; + +char *a = "hello"; + +printf("%s\n", a); + +int c; +c = *a; + +char *b; +for (b = a; *b != 0; b++) + printf("%c: %d\n", *b, *b); + +char destarray[10]; +char *dest = &destarray[0]; +char *src = a; + +while (*src != 0) + *dest++ = *src++; + +*dest = 0; + +printf("copied string is %s\n", destarray); + + +void main() {} diff --git a/src/tests/21_char_array.expect b/src/tests/21_char_array.expect new file mode 100644 index 0000000..dbc6068 --- /dev/null +++ b/src/tests/21_char_array.expect @@ -0,0 +1,7 @@ +hello +h: 104 +e: 101 +l: 108 +l: 108 +o: 111 +copied string is hello diff --git a/src/tests/22_floating_point.c b/src/tests/22_floating_point.c new file mode 100644 index 0000000..37754a4 --- /dev/null +++ b/src/tests/22_floating_point.c @@ -0,0 +1,45 @@ +#include +#include + +// variables +float a = 12.34 + 56.78; +printf("%f\n", a); + +// infix operators +printf("%f\n", 12.34 + 56.78); +printf("%f\n", 12.34 - 56.78); +printf("%f\n", 12.34 * 56.78); +printf("%f\n", 12.34 / 56.78); + +// comparison operators +printf("%d %d %d %d %d %d\n", 12.34 < 56.78, 12.34 <= 56.78, 12.34 == 56.78, 12.34 >= 56.78, 12.34 > 56.78, 12.34 != 56.78); +printf("%d %d %d %d %d %d\n", 12.34 < 12.34, 12.34 <= 12.34, 12.34 == 12.34, 12.34 >= 12.34, 12.34 > 12.34, 12.34 != 12.34); +printf("%d %d %d %d %d %d\n", 56.78 < 12.34, 56.78 <= 12.34, 56.78 == 12.34, 56.78 >= 12.34, 56.78 > 12.34, 56.78 != 12.34); + +// assignment operators +a = 12.34; +a += 56.78; +printf("%f\n", a); + +a = 12.34; +a -= 56.78; +printf("%f\n", a); + +a = 12.34; +a *= 56.78; +printf("%f\n", a); + +a = 12.34; +a /= 56.78; +printf("%f\n", a); + +// prefix operators +printf("%f\n", +12.34); +printf("%f\n", -12.34); + +// type coercion +a = 2; +printf("%f\n", a); +printf("%f\n", sin(2)); + +void main() {} diff --git a/src/tests/22_floating_point.expect b/src/tests/22_floating_point.expect new file mode 100644 index 0000000..282d089 --- /dev/null +++ b/src/tests/22_floating_point.expect @@ -0,0 +1,16 @@ +69.120000 +69.120000 +-44.440000 +700.665200 +0.217330 +1 1 0 0 0 1 +0 1 1 1 0 0 +0 0 0 1 1 1 +69.120000 +-44.440000 +700.665200 +0.217330 +12.340000 +-12.340000 +2.000000 +0.909297 diff --git a/src/tests/23_type_coercion.c b/src/tests/23_type_coercion.c new file mode 100644 index 0000000..9076952 --- /dev/null +++ b/src/tests/23_type_coercion.c @@ -0,0 +1,49 @@ +#include + +void charfunc(char a) +{ + printf("char: %c\n", a); +} + +void intfunc(int a) +{ + printf("int: %d\n", a); +} + +void floatfunc(float a) +{ + printf("float: %f\n", a); +} + +charfunc('a'); +charfunc(98); +charfunc(99.0); + +intfunc('a'); +intfunc(98); +intfunc(99.0); + +floatfunc('a'); +floatfunc(98); +floatfunc(99.0); + +printf("%c %d %f\n", 'a', 'b', 'c'); +printf("%c %d %f\n", 97, 98, 99); +printf("%c %d %f\n", 97.0, 98.0, 99.0); + +char b = 97; +char c = 97.0; + +printf("%d %d\n", b, c); + +int d = 'a'; +int e = 97.0; + +printf("%d %d\n", d, e); + +float f = 'a'; +float g = 97; + +printf("%f %f\n", f, g); + +void main() {} diff --git a/src/tests/23_type_coercion.expect b/src/tests/23_type_coercion.expect new file mode 100644 index 0000000..a4c5b68 --- /dev/null +++ b/src/tests/23_type_coercion.expect @@ -0,0 +1,15 @@ +char: a +char: b +char: c +int: 97 +int: 98 +int: 99 +float: 97.000000 +float: 98.000000 +float: 99.000000 +a 98 99.000000 +a 98 99.000000 +a 98 99.000000 +97 97 +97 97 +97.000000 97.000000 diff --git a/src/tests/24_math_library.c b/src/tests/24_math_library.c new file mode 100644 index 0000000..892c4b8 --- /dev/null +++ b/src/tests/24_math_library.c @@ -0,0 +1,23 @@ +#include +#include + +printf("%f\n", sin(0.12)); +printf("%f\n", cos(0.12)); +printf("%f\n", tan(0.12)); +printf("%f\n", asin(0.12)); +printf("%f\n", acos(0.12)); +printf("%f\n", atan(0.12)); +printf("%f\n", sinh(0.12)); +printf("%f\n", cosh(0.12)); +printf("%f\n", tanh(0.12)); +printf("%f\n", exp(0.12)); +printf("%f\n", fabs(-0.12)); +printf("%f\n", log(0.12)); +printf("%f\n", log10(0.12)); +printf("%f\n", pow(0.12, 0.12)); +printf("%f\n", sqrt(0.12)); +printf("%f\n", round(12.34)); +printf("%f\n", ceil(12.34)); +printf("%f\n", floor(12.34)); + +void main() {} diff --git a/src/tests/24_math_library.expect b/src/tests/24_math_library.expect new file mode 100644 index 0000000..99f7299 --- /dev/null +++ b/src/tests/24_math_library.expect @@ -0,0 +1,18 @@ +0.119712 +0.992809 +0.120579 +0.120290 +1.450506 +0.119429 +0.120288 +1.007209 +0.119427 +1.127497 +0.120000 +-2.120264 +-0.920819 +0.775357 +0.346410 +12.000000 +13.000000 +12.000000 diff --git a/src/tests/25_quicksort.c b/src/tests/25_quicksort.c new file mode 100644 index 0000000..724d9c5 --- /dev/null +++ b/src/tests/25_quicksort.c @@ -0,0 +1,80 @@ +#include + +int array[16]; + +//Swap integer values by array indexes +void swap(int a, int b) +{ + int tmp = array[a]; + array[a] = array[b]; + array[b] = tmp; +} + +//Partition the array into two halves and return the +//index about which the array is partitioned +int partition(int left, int right) +{ + int pivotIndex = left; + int pivotValue = array[pivotIndex]; + int index = left; + int i; + + swap(pivotIndex, right); + for(i = left; i < right; i++) + { + if(array[i] < pivotValue) + { + swap(i, index); + index += 1; + } + } + swap(right, index); + + return index; +} + +//Quicksort the array +void quicksort(int left, int right) +{ + if(left >= right) + return; + + int index = partition(left, right); + quicksort(left, index - 1); + quicksort(index + 1, right); +} + +void main() +{ + int i; + + array[0] = 62; + array[1] = 83; + array[2] = 4; + array[3] = 89; + array[4] = 36; + array[5] = 21; + array[6] = 74; + array[7] = 37; + array[8] = 65; + array[9] = 33; + array[10] = 96; + array[11] = 38; + array[12] = 53; + array[13] = 16; + array[14] = 74; + array[15] = 55; + + for (i = 0; i < 16; i++) + printf("%d ", array[i]); + + printf("\n"); + + quicksort(0, 15); + + for (i = 0; i < 16; i++) + printf("%d ", array[i]); + + printf("\n"); +} + diff --git a/src/tests/25_quicksort.expect b/src/tests/25_quicksort.expect new file mode 100644 index 0000000..2d39cd3 --- /dev/null +++ b/src/tests/25_quicksort.expect @@ -0,0 +1,2 @@ +62 83 4 89 36 21 74 37 65 33 96 38 53 16 74 55 +4 16 21 33 36 37 38 53 55 62 65 74 74 83 89 96 diff --git a/src/tests/26_character_constants.c b/src/tests/26_character_constants.c new file mode 100644 index 0000000..6553f76 --- /dev/null +++ b/src/tests/26_character_constants.c @@ -0,0 +1,13 @@ +#include + +printf("%d\n", '\1'); +printf("%d\n", '\10'); +printf("%d\n", '\100'); +printf("%d\n", '\x01'); +printf("%d\n", '\x0e'); +printf("%d\n", '\x10'); +printf("%d\n", '\x40'); +printf("test \x407\n"); + + +void main() {} diff --git a/src/tests/26_character_constants.expect b/src/tests/26_character_constants.expect new file mode 100644 index 0000000..53e27d0 --- /dev/null +++ b/src/tests/26_character_constants.expect @@ -0,0 +1,8 @@ +1 +8 +64 +1 +14 +16 +64 +test @7 diff --git a/src/tests/27_sizeof.c b/src/tests/27_sizeof.c new file mode 100644 index 0000000..52703aa --- /dev/null +++ b/src/tests/27_sizeof.c @@ -0,0 +1,12 @@ +#include + +char a; +int b; +double c; + +printf("%d\n", sizeof(a)); +printf("%d\n", sizeof(b)); +printf("%d\n", sizeof(c)); + + +void main() {} diff --git a/src/tests/27_sizeof.expect b/src/tests/27_sizeof.expect new file mode 100644 index 0000000..7329e00 --- /dev/null +++ b/src/tests/27_sizeof.expect @@ -0,0 +1,3 @@ +1 +4 +8 diff --git a/src/tests/28_strings.c b/src/tests/28_strings.c new file mode 100644 index 0000000..d173060 --- /dev/null +++ b/src/tests/28_strings.c @@ -0,0 +1,41 @@ +#include +#include + +char a[10]; + +strcpy(a, "hello"); +printf("%s\n", a); + +strncpy(a, "gosh", 2); +printf("%s\n", a); + +printf("%d\n", strcmp(a, "apple") > 0); +printf("%d\n", strcmp(a, "goere") > 0); +printf("%d\n", strcmp(a, "zebra") < 0); + +printf("%d\n", strlen(a)); + +strcat(a, "!"); +printf("%s\n", a); + +printf("%d\n", strncmp(a, "apple", 2) > 0); +printf("%d\n", strncmp(a, "goere", 2) == 0); +printf("%d\n", strncmp(a, "goerg", 2) == 0); +printf("%d\n", strncmp(a, "zebra", 2) < 0); + +printf("%s\n", index(a, 'o')); +printf("%s\n", rindex(a, 'l')); +printf("%d\n", rindex(a, 'x') == NULL); + +memset(&a[1], 'r', 4); +printf("%s\n", a); + +memcpy(&a[2], a, 2); +printf("%s\n", a); + +printf("%d\n", memcmp(a, "apple", 4) > 0); +printf("%d\n", memcmp(a, "grgr", 4) == 0); +printf("%d\n", memcmp(a, "zebra", 4) < 0); + + +void main() {} diff --git a/src/tests/28_strings.expect b/src/tests/28_strings.expect new file mode 100644 index 0000000..fd9217a --- /dev/null +++ b/src/tests/28_strings.expect @@ -0,0 +1,19 @@ +hello +gollo +1 +1 +1 +5 +gollo! +1 +1 +1 +1 +ollo! +lo! +1 +grrrr! +grgrr! +1 +1 +1 diff --git a/src/tests/29_array_address.c b/src/tests/29_array_address.c new file mode 100644 index 0000000..a8562af --- /dev/null +++ b/src/tests/29_array_address.c @@ -0,0 +1,8 @@ +#include +#include + +char a[10]; +strcpy(a, "abcdef"); +printf("%s\n", &a[1]); + +void main() {} diff --git a/src/tests/29_array_address.expect b/src/tests/29_array_address.expect new file mode 100644 index 0000000..9bc8683 --- /dev/null +++ b/src/tests/29_array_address.expect @@ -0,0 +1 @@ +bcdef diff --git a/src/tests/30_hanoi.c b/src/tests/30_hanoi.c new file mode 100644 index 0000000..5ca6667 --- /dev/null +++ b/src/tests/30_hanoi.c @@ -0,0 +1,125 @@ +/* example from http://barnyard.syr.edu/quickies/hanoi.c */ + +/* hanoi.c: solves the tower of hanoi problem. (Programming exercise.) */ +/* By Terry R. McConnell (12/2/97) */ +/* Compile: cc -o hanoi hanoi.c */ + +/* This program does no error checking. But then, if it's right, +it's right ... right ? */ + + +/* The original towers of hanoi problem seems to have been originally posed +by one M. Claus in 1883. There is a popular legend that goes along with +it that has been often repeated and paraphrased. It goes something like this: +In the great temple at Benares there are 3 golden spikes. On one of them, +God placed 64 disks increasing in size from bottom to top, at the beginning +of time. Since then, and to this day, the priest on duty constantly transfers +disks, one at a time, in such a way that no larger disk is ever put on top +of a smaller one. When the disks have been transferred entirely to another +spike the Universe will come to an end in a large thunderclap. + +This paraphrases the original legend due to DeParville, La Nature, Paris 1884, +Part I, 285-286. For this and further information see: Mathematical +Recreations & Essays, W.W. Rouse Ball, MacMillan, NewYork, 11th Ed. 1967, +303-305. +* +* +*/ + +#include +#include + +#define TRUE 1 +#define FALSE 0 + +#define N 4 /* This is the number of "disks" on tower A initially. */ + /* Taken to be 64 in the legend. The number of moves + required, in general, is 2^N - 1. For N = 64, this is + 18,446,744,073,709,551,615 */ + +int A[N], B[N], C[N]; /* These are the three towers. For example if the +state of A is 0,1,3,4, that means that there are three discs on A of sizes +1, 3, and 4. (Think of right as being the "down" direction.) */ + +void Hanoi(int,int*,int*,int*); + +/* Print the current configuration of A, B, and C to the screen */ + +void +PrintAll() +{ + int i; + + printf("A: "); + for(i=0;i + +int main(int argc, char **argv) +{ + int Count; + + printf("hello world %d\n", argc); + for (Count = 0; Count < argc; Count++) + printf("arg %d: %s\n", Count, argv[Count]); + + return 0; +} diff --git a/src/tests/31_args.expect b/src/tests/31_args.expect new file mode 100644 index 0000000..bf25112 --- /dev/null +++ b/src/tests/31_args.expect @@ -0,0 +1,6 @@ +hello world 5 +arg 0: - +arg 1: arg1 +arg 2: arg2 +arg 3: arg3 +arg 4: arg4 diff --git a/src/tests/32_led.c b/src/tests/32_led.c new file mode 100644 index 0000000..d1a28b6 --- /dev/null +++ b/src/tests/32_led.c @@ -0,0 +1,264 @@ +/* example from http://barnyard.syr.edu/quickies/led.c */ + +/* led.c: print out number as if on 7 line led display. I.e., write integer + given on command line like this: + _ _ _ + | _| _| |_| |_ + | |_ _| | _| etc. + + We assume the terminal behaves like a classical teletype. So the top + lines of all digits have to be printed first, then the middle lines of + all digits, etc. + + By Terry R. McConnell + + compile: cc -o led led.c + + If you just want to link in the subroutine print_led that does all the + work, compile with -DNO_MAIN, and declare the following in any source file + that uses the call: + + extern void print_led(unsigned long x, char *buf); + + Bug: you cannot call repeatedly to print more than one number to a line. + That would require curses or some other terminal API that allows moving the + cursor to a previous line. + + */ + + + +#include +#include + +#define MAX_DIGITS 32 +#define NO_MAIN + + +/* Print the top line of the digit d into buffer. + Does not null terminate buffer. */ + +void topline(int d, char *p){ + + *p++ = ' '; + switch(d){ + + /* all these have _ on top line */ + + case 0: + case 2: + case 3: + case 5: + case 7: + case 8: + case 9: + *p++ = '_'; + break; + default: + *p++=' '; + + } + *p++=' '; +} + +/* Print the middle line of the digit d into the buffer. + Does not null terminate. */ + +void midline(int d, char *p){ + + switch(d){ + + /* those that have leading | on middle line */ + + case 0: + case 4: + case 5: + case 6: + case 8: + case 9: + *p++='|'; + break; + default: + *p++=' '; + } + switch(d){ + + /* those that have _ on middle line */ + + case 2: + case 3: + case 4: + case 5: + case 6: + case 8: + case 9: + *p++='_'; + break; + default: + *p++=' '; + + } + switch(d){ + + /* those that have closing | on middle line */ + + case 0: + case 1: + case 2: + case 3: + case 4: + case 7: + case 8: + case 9: + *p++='|'; + break; + default: + *p++=' '; + + } +} + +/* Print the bottom line of the digit d. Does not null terminate. */ + +void botline(int d, char *p){ + + + switch(d){ + + /* those that have leading | on bottom line */ + + case 0: + case 2: + case 6: + case 8: + *p++='|'; + break; + default: + *p++=' '; + } + switch(d){ + + /* those that have _ on bottom line */ + + case 0: + case 2: + case 3: + case 5: + case 6: + case 8: + *p++='_'; + break; + default: + *p++=' '; + + } + switch(d){ + + /* those that have closing | on bottom line */ + + case 0: + case 1: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + *p++='|'; + break; + default: + *p++=' '; + + } +} + +/* Write the led representation of integer to string buffer. */ + +void print_led(unsigned long x, char *buf) +{ + + int i=0,n; + static int d[MAX_DIGITS]; + + + /* extract digits from x */ + + n = ( x == 0L ? 1 : 0 ); /* 0 is a digit, hence a special case */ + + while(x){ + d[n++] = (int)(x%10L); + if(n >= MAX_DIGITS)break; + x = x/10L; + } + + /* print top lines of all digits */ + + for(i=n-1;i>=0;i--){ + topline(d[i],buf); + buf += 3; + *buf++=' '; + } + *buf++='\n'; /* move teletype to next line */ + + /* print middle lines of all digits */ + + for(i=n-1;i>=0;i--){ + midline(d[i],buf); + buf += 3; + *buf++=' '; + } + *buf++='\n'; + + /* print bottom lines of all digits */ + + for(i=n-1;i>=0;i--){ + botline(d[i],buf); + buf += 3; + *buf++=' '; + } + *buf++='\n'; + *buf='\0'; +} + +int main() +{ + char buf[5*MAX_DIGITS]; + print_led(1234567, buf); + printf("%s\n",buf); + + return 0; +} + +#ifndef NO_MAIN +int main(int argc, char **argv) +{ + + int i=0,n; + long x; + static int d[MAX_DIGITS]; + char buf[5*MAX_DIGITS]; + + if(argc != 2){ + fprintf(stderr,"led: usage: led integer\n"); + return 1; + } + + /* fetch argument from command line */ + + x = atol(argv[1]); + + /* sanity check */ + + if(x<0){ + fprintf(stderr,"led: %d must be non-negative\n",x); + return 1; + } + + print_led(x,buf); + printf("%s\n",buf); + + return 0; + +} +#endif diff --git a/src/tests/32_led.expect b/src/tests/32_led.expect new file mode 100644 index 0000000..c53b58a --- /dev/null +++ b/src/tests/32_led.expect @@ -0,0 +1,4 @@ + _ _ _ _ + | _| _| |_| |_ |_ | + | |_ _| | _| |_| | + diff --git a/src/tests/33_ternary_op.c b/src/tests/33_ternary_op.c new file mode 100644 index 0000000..5c1cead --- /dev/null +++ b/src/tests/33_ternary_op.c @@ -0,0 +1,10 @@ +#include + +int Count; + +for (Count = 0; Count < 10; Count++) +{ + printf("%d\n", (Count < 5) ? (Count*Count) : (Count * 3)); +} + +void main() {} diff --git a/src/tests/33_ternary_op.expect b/src/tests/33_ternary_op.expect new file mode 100644 index 0000000..45ea507 --- /dev/null +++ b/src/tests/33_ternary_op.expect @@ -0,0 +1,10 @@ +0 +1 +4 +9 +16 +15 +18 +21 +24 +27 diff --git a/src/tests/34_array_assignment.c b/src/tests/34_array_assignment.c new file mode 100644 index 0000000..afe544e --- /dev/null +++ b/src/tests/34_array_assignment.c @@ -0,0 +1,18 @@ +#include + +int a[4]; + +a[0] = 12; +a[1] = 23; +a[2] = 34; +a[3] = 45; + +printf("%d %d %d %d\n", a[0], a[1], a[2], a[3]); + +int b[4]; + +b = a; + +printf("%d %d %d %d\n", b[0], b[1], b[2], b[3]); + +void main() {} diff --git a/src/tests/34_array_assignment.expect b/src/tests/34_array_assignment.expect new file mode 100644 index 0000000..9736bf5 --- /dev/null +++ b/src/tests/34_array_assignment.expect @@ -0,0 +1,2 @@ +12 23 34 45 +12 23 34 45 diff --git a/src/tests/35_sizeof.c b/src/tests/35_sizeof.c new file mode 100644 index 0000000..87c783a --- /dev/null +++ b/src/tests/35_sizeof.c @@ -0,0 +1,9 @@ +#include + +char a; +short b; + +printf("%d %d\n", sizeof(char), sizeof(a)); +printf("%d %d\n", sizeof(short), sizeof(b)); + +void main() {} diff --git a/src/tests/35_sizeof.expect b/src/tests/35_sizeof.expect new file mode 100644 index 0000000..534fb83 --- /dev/null +++ b/src/tests/35_sizeof.expect @@ -0,0 +1,2 @@ +1 1 +2 2 diff --git a/src/tests/36_array_initialisers.c b/src/tests/36_array_initialisers.c new file mode 100644 index 0000000..ce8695b --- /dev/null +++ b/src/tests/36_array_initialisers.c @@ -0,0 +1,16 @@ +#include + +int Count; + +int Array[10] = { 12, 34, 56, 78, 90, 123, 456, 789, 8642, 9753 }; + +for (Count = 0; Count < 10; Count++) + printf("%d: %d\n", Count, Array[Count]); + +int Array2[10] = { 12, 34, 56, 78, 90, 123, 456, 789, 8642, 9753, }; + +for (Count = 0; Count < 10; Count++) + printf("%d: %d\n", Count, Array2[Count]); + + +void main() {} diff --git a/src/tests/36_array_initialisers.expect b/src/tests/36_array_initialisers.expect new file mode 100644 index 0000000..3ac6c77 --- /dev/null +++ b/src/tests/36_array_initialisers.expect @@ -0,0 +1,20 @@ +0: 12 +1: 34 +2: 56 +3: 78 +4: 90 +5: 123 +6: 456 +7: 789 +8: 8642 +9: 9753 +0: 12 +1: 34 +2: 56 +3: 78 +4: 90 +5: 123 +6: 456 +7: 789 +8: 8642 +9: 9753 diff --git a/src/tests/37_sprintf.c b/src/tests/37_sprintf.c new file mode 100644 index 0000000..839a4d8 --- /dev/null +++ b/src/tests/37_sprintf.c @@ -0,0 +1,12 @@ +#include + +char Buf[100]; +int Count; + +for (Count = 1; Count <= 20; Count++) +{ + sprintf(Buf, "->%02d<-\n", Count); + printf("%s", Buf); +} + +void main() {} diff --git a/src/tests/37_sprintf.expect b/src/tests/37_sprintf.expect new file mode 100644 index 0000000..a643da8 --- /dev/null +++ b/src/tests/37_sprintf.expect @@ -0,0 +1,20 @@ +->01<- +->02<- +->03<- +->04<- +->05<- +->06<- +->07<- +->08<- +->09<- +->10<- +->11<- +->12<- +->13<- +->14<- +->15<- +->16<- +->17<- +->18<- +->19<- +->20<- diff --git a/src/tests/38_multiple_array_index.c b/src/tests/38_multiple_array_index.c new file mode 100644 index 0000000..383d3ee --- /dev/null +++ b/src/tests/38_multiple_array_index.c @@ -0,0 +1,29 @@ +#include + +int a[4][4]; +int b = 0; +int x; +int y; + +for (x = 0; x < 4; x++) +{ + for (y = 0; y < 4; y++) + { + b++; + a[x][y] = b; + } +} + + + +for (x = 0; x < 4; x++) +{ + printf("x=%d: ", x); + for (y = 0; y < 4; y++) + { + printf("%d ", a[x][y]); + } + printf("\n"); +} + +void main() {} diff --git a/src/tests/38_multiple_array_index.expect b/src/tests/38_multiple_array_index.expect new file mode 100644 index 0000000..747ad75 --- /dev/null +++ b/src/tests/38_multiple_array_index.expect @@ -0,0 +1,4 @@ +x=0: 1 2 3 4 +x=1: 5 6 7 8 +x=2: 9 10 11 12 +x=3: 13 14 15 16 diff --git a/src/tests/39_typedef.c b/src/tests/39_typedef.c new file mode 100644 index 0000000..e36791c --- /dev/null +++ b/src/tests/39_typedef.c @@ -0,0 +1,26 @@ +#include + +typedef int MyInt; + +MyInt a = 1; +printf("%d\n", a); + +struct FunStruct +{ + int i; + int j; +}; + +typedef struct FunStruct MyFunStruct; + +MyFunStruct b; +b.i = 12; +b.j = 34; +printf("%d,%d\n", b.i, b.j); + +typedef MyFunStruct *MoreFunThanEver; + +MoreFunThanEver c = &b; +printf("%d,%d\n", c->i, c->j); + +void main() {} diff --git a/src/tests/39_typedef.expect b/src/tests/39_typedef.expect new file mode 100644 index 0000000..b9050a9 --- /dev/null +++ b/src/tests/39_typedef.expect @@ -0,0 +1,3 @@ +1 +12,34 +12,34 diff --git a/src/tests/40_stdio.c b/src/tests/40_stdio.c new file mode 100644 index 0000000..546ca52 --- /dev/null +++ b/src/tests/40_stdio.c @@ -0,0 +1,47 @@ +#include + +FILE *f = fopen("fred.txt", "w"); +fwrite("hello\nhello\n", 1, 12, f); +fclose(f); + +char freddy[7]; +f = fopen("fred.txt", "r"); +if (fread(freddy, 1, 6, f) != 6) + printf("couldn't read fred.txt\n"); + +freddy[6] = '\0'; +fclose(f); + +printf("%s", freddy); + +char InChar; +char ShowChar; +f = fopen("fred.txt", "r"); +while ( (InChar = fgetc(f)) != EOF) +{ + ShowChar = InChar; + if (ShowChar < ' ') + ShowChar = '.'; + + printf("ch: %d '%c'\n", InChar, ShowChar); +} +fclose(f); + +f = fopen("fred.txt", "r"); +while ( (InChar = getc(f)) != EOF) +{ + ShowChar = InChar; + if (ShowChar < ' ') + ShowChar = '.'; + + printf("ch: %d '%c'\n", InChar, ShowChar); +} +fclose(f); + +f = fopen("fred.txt", "r"); +while (fgets(freddy, sizeof(freddy), f) != NULL) + printf("x: %s", freddy); + +fclose(f); + +void main() {} diff --git a/src/tests/40_stdio.expect b/src/tests/40_stdio.expect new file mode 100644 index 0000000..e08167a --- /dev/null +++ b/src/tests/40_stdio.expect @@ -0,0 +1,27 @@ +hello +ch: 104 'h' +ch: 101 'e' +ch: 108 'l' +ch: 108 'l' +ch: 111 'o' +ch: 10 '.' +ch: 104 'h' +ch: 101 'e' +ch: 108 'l' +ch: 108 'l' +ch: 111 'o' +ch: 10 '.' +ch: 104 'h' +ch: 101 'e' +ch: 108 'l' +ch: 108 'l' +ch: 111 'o' +ch: 10 '.' +ch: 104 'h' +ch: 101 'e' +ch: 108 'l' +ch: 108 'l' +ch: 111 'o' +ch: 10 '.' +x: hello +x: hello diff --git a/src/tests/41_hashif.c b/src/tests/41_hashif.c new file mode 100644 index 0000000..b1883c0 --- /dev/null +++ b/src/tests/41_hashif.c @@ -0,0 +1,80 @@ +#include + +printf("#include test\n"); + +#if 1 + #if 0 + printf("a\n"); + #else + printf("b\n"); + #endif +#else + #if 0 + printf("c\n"); + #else + printf("d\n"); + #endif +#endif + +#if 0 + #if 1 + printf("e\n"); + #else + printf("f\n"); + #endif +#else + #if 1 + printf("g\n"); + #else + printf("h\n"); + #endif +#endif + +#define DEF + +#ifdef DEF + #ifdef DEF + printf("i\n"); + #else + printf("j\n"); + #endif +#else + #ifdef DEF + printf("k\n"); + #else + printf("l\n"); + #endif +#endif + +#ifndef DEF + #ifndef DEF + printf("m\n"); + #else + printf("n\n"); + #endif +#else + #ifndef DEF + printf("o\n"); + #else + printf("p\n"); + #endif +#endif + +#define ONE 1 +#define ZERO 0 + +#if ONE + #if ZERO + printf("q\n"); + #else + printf("r\n"); + #endif +#else + #if ZERO + printf("s\n"); + #else + printf("t\n"); + #endif +#endif + +void main() {} diff --git a/src/tests/41_hashif.expect b/src/tests/41_hashif.expect new file mode 100644 index 0000000..5fd414b --- /dev/null +++ b/src/tests/41_hashif.expect @@ -0,0 +1,6 @@ +#include test +b +g +i +p +r diff --git a/src/tests/42_function_pointer.c b/src/tests/42_function_pointer.c new file mode 100644 index 0000000..ce39708 --- /dev/null +++ b/src/tests/42_function_pointer.c @@ -0,0 +1,15 @@ +#include + +int fred(int p) +{ + printf("yo %d\n", p); + return 42; +} + +int (*f)(int) = &fred; + +int main() +{ + printf("%d\n", (*f)(24)); + return 0; +} diff --git a/src/tests/43_void_param.c b/src/tests/43_void_param.c new file mode 100644 index 0000000..4803d94 --- /dev/null +++ b/src/tests/43_void_param.c @@ -0,0 +1,10 @@ +#include + +void fred(void) +{ + printf("yo\n"); +} + +fred(); + +void main() {} diff --git a/src/tests/43_void_param.expect b/src/tests/43_void_param.expect new file mode 100644 index 0000000..092bfb9 --- /dev/null +++ b/src/tests/43_void_param.expect @@ -0,0 +1 @@ +yo diff --git a/src/tests/44_scoped_declarations.c b/src/tests/44_scoped_declarations.c new file mode 100644 index 0000000..50337ef --- /dev/null +++ b/src/tests/44_scoped_declarations.c @@ -0,0 +1,12 @@ +#include + +int a; + +for (a = 0; a < 2; a++) +{ + int b = a; +} + +printf("it's all good\n"); + +void main() {} diff --git a/src/tests/44_scoped_declarations.expect b/src/tests/44_scoped_declarations.expect new file mode 100644 index 0000000..231ccc0 --- /dev/null +++ b/src/tests/44_scoped_declarations.expect @@ -0,0 +1 @@ +it's all good diff --git a/src/tests/45_empty_for.c b/src/tests/45_empty_for.c new file mode 100644 index 0000000..28d0b6c --- /dev/null +++ b/src/tests/45_empty_for.c @@ -0,0 +1,16 @@ +#include + +int main() +{ + int Count = 0; + + for (;;) + { + Count++; + printf("%d\n", Count); + if (Count >= 10) + break; + } + + return 0; +} diff --git a/src/tests/45_empty_for.expect b/src/tests/45_empty_for.expect new file mode 100644 index 0000000..f00c965 --- /dev/null +++ b/src/tests/45_empty_for.expect @@ -0,0 +1,10 @@ +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 diff --git a/src/tests/46_grep.c b/src/tests/46_grep.c new file mode 100644 index 0000000..b142f98 --- /dev/null +++ b/src/tests/46_grep.c @@ -0,0 +1,562 @@ +/* + * The information in this document is subject to change + * without notice and should not be construed as a commitment + * by Digital Equipment Corporation or by DECUS. + * + * Neither Digital Equipment Corporation, DECUS, nor the authors + * assume any responsibility for the use or reliability of this + * document or the described software. + * + * Copyright (C) 1980, DECUS + * + * General permission to copy or modify, but not for profit, is + * hereby granted, provided that the above copyright notice is + * included and reference made to the fact that reproduction + * privileges were granted by DECUS. + */ +#include + +/* + * grep + * + * Runs on the Decus compiler or on vms, On vms, define as: + * grep :== "$disk:[account]grep" (native) + * grep :== "$disk:[account]grep grep" (Decus) + * See below for more information. + */ + +#if 0 +char *documentation[] = { +"grep searches a file for a given pattern. Execute by", +" grep [flags] regular_expression file_list\n", +"Flags are single characters preceeded by '-':", +" -c Only a count of matching lines is printed", +" -f Print file name for matching lines switch, see below", +" -n Each line is preceeded by its line number", +" -v Only print non-matching lines\n", +"The file_list is a list of files (wildcards are acceptable on RSX modes).", +"\nThe file name is normally printed if there is a file given.", +"The -f flag reverses this action (print name no file, not if more).\n", +0 }; + +char *patdoc[] = { +"The regular_expression defines the pattern to search for. Upper- and", +"lower-case are always ignored. Blank lines never match. The expression", +"should be quoted to prevent file-name translation.", +"x An ordinary character (not mentioned below) matches that character.", +"'\\' The backslash quotes any character. \"\\$\" matches a dollar-sign.", +"'^' A circumflex at the beginning of an expression matches the", +" beginning of a line.", +"'$' A dollar-sign at the end of an expression matches the end of a line.", +"'.' A period matches any character except \"new-line\".", +"':a' A colon matches a class of characters described by the following", +"':d' character. \":a\" matches any alphabetic, \":d\" matches digits,", +"':n' \":n\" matches alphanumerics, \": \" matches spaces, tabs, and", +"': ' other control characters, such as new-line.", +"'*' An expression followed by an asterisk matches zero or more", +" occurrances of that expression: \"fo*\" matches \"f\", \"fo\"", +" \"foo\", etc.", +"'+' An expression followed by a plus sign matches one or more", +" occurrances of that expression: \"fo+\" matches \"fo\", etc.", +"'-' An expression followed by a minus sign optionally matches", +" the expression.", +"'[]' A string enclosed in square brackets matches any character in", +" that string, but no others. If the first character in the", +" string is a circumflex, the expression matches any character", +" except \"new-line\" and the characters in the string. For", +" example, \"[xyz]\" matches \"xx\" and \"zyx\", while \"[^xyz]\"", +" matches \"abc\" but not \"axb\". A range of characters may be", +" specified by two characters separated by \"-\". Note that,", +" [a-z] matches alphabetics, while [z-a] never matches.", +"The concatenation of regular expressions is a regular expression.", +0}; +#endif + +#define LMAX 512 +#define PMAX 256 + +#define CHAR 1 +#define BOL 2 +#define EOL 3 +#define ANY 4 +#define CLASS 5 +#define NCLASS 6 +#define STAR 7 +#define PLUS 8 +#define MINUS 9 +#define ALPHA 10 +#define DIGIT 11 +#define NALPHA 12 +#define PUNCT 13 +#define RANGE 14 +#define ENDPAT 15 + +int cflag=0, fflag=0, nflag=0, vflag=0, nfile=0, debug=0; + +char *pp, lbuf[LMAX], pbuf[PMAX]; + +char *cclass(); +char *pmatch(); + + +/*** Display a file name *******************************/ +void file(char *s) +{ + printf("File %s:\n", s); +} + +/*** Report unopenable file ****************************/ +void cant(char *s) +{ + fprintf(stderr, "%s: cannot open\n", s); +} + +/*** Give good help ************************************/ +void help(char **hp) +{ + char **dp; + + for (dp = hp; *dp; ++dp) + printf("%s\n", *dp); +} + +/*** Display usage summary *****************************/ +void usage(char *s) +{ + fprintf(stderr, "?GREP-E-%s\n", s); + fprintf(stderr, + "Usage: grep [-cfnv] pattern [file ...]. grep ? for help\n"); + exit(1); +} + +/*** Compile the pattern into global pbuf[] ************/ +void compile(char *source) +{ + char *s; /* Source string pointer */ + char *lp; /* Last pattern pointer */ + int c; /* Current character */ + int o; /* Temp */ + char *spp; /* Save beginning of pattern */ + + s = source; + if (debug) + printf("Pattern = \"%s\"\n", s); + pp = pbuf; + while (c = *s++) { + /* + * STAR, PLUS and MINUS are special. + */ + if (c == '*' || c == '+' || c == '-') { + if (pp == pbuf || + (o=pp[-1]) == BOL || + o == EOL || + o == STAR || + o == PLUS || + o == MINUS) + badpat("Illegal occurrance op.", source, s); + store(ENDPAT); + store(ENDPAT); + spp = pp; /* Save pattern end */ + while (--pp > lp) /* Move pattern down */ + *pp = pp[-1]; /* one byte */ + *pp = (c == '*') ? STAR : + (c == '-') ? MINUS : PLUS; + pp = spp; /* Restore pattern end */ + continue; + } + /* + * All the rest. + */ + lp = pp; /* Remember start */ + switch(c) { + + case '^': + store(BOL); + break; + + case '$': + store(EOL); + break; + + case '.': + store(ANY); + break; + + case '[': + s = cclass(source, s); + break; + + case ':': + if (*s) { + switch(tolower(c = *s++)) { + + case 'a': + case 'A': + store(ALPHA); + break; + + case 'd': + case 'D': + store(DIGIT); + break; + + case 'n': + case 'N': + store(NALPHA); + break; + + case ' ': + store(PUNCT); + break; + + default: + badpat("Unknown : type", source, s); + + } + break; + } + else badpat("No : type", source, s); + + case '\\': + if (*s) + c = *s++; + + default: + store(CHAR); + store(tolower(c)); + } + } + store(ENDPAT); + store(0); /* Terminate string */ + if (debug) { + for (lp = pbuf; lp < pp;) { + if ((c = (*lp++ & 0377)) < ' ') + printf("\\%o ", c); + else printf("%c ", c); + } + printf("\n"); + } +} + +/*** Compile a class (within []) ***********************/ +char *cclass(char *source, char *src) +/* char *source; // Pattern start -- for error msg. */ +/* char *src; // Class start */ +{ + char *s; /* Source pointer */ + char *cp; /* Pattern start */ + int c; /* Current character */ + int o; /* Temp */ + + s = src; + o = CLASS; + if (*s == '^') { + ++s; + o = NCLASS; + } + store(o); + cp = pp; + store(0); /* Byte count */ + while ((c = *s++) && c!=']') { + if (c == '\\') { /* Store quoted char */ + if ((c = *s++) == '\0') /* Gotta get something */ + badpat("Class terminates badly", source, s); + else store(tolower(c)); + } + else if (c == '-' && + (pp - cp) > 1 && *s != ']' && *s != '\0') { + c = pp[-1]; /* Range start */ + pp[-1] = RANGE; /* Range signal */ + store(c); /* Re-store start */ + c = *s++; /* Get end char and*/ + store(tolower(c)); /* Store it */ + } + else { + store(tolower(c)); /* Store normal char */ + } + } + if (c != ']') + badpat("Unterminated class", source, s); + if ((c = (pp - cp)) >= 256) + badpat("Class too large", source, s); + if (c == 0) + badpat("Empty class", source, s); + *cp = c; + return(s); +} + +/*** Store an entry in the pattern buffer **************/ +void store(int op) +{ + if (pp >= &pbuf[PMAX]) + error("Pattern too complex\n"); + *pp++ = op; +} + +/*** Report a bad pattern specification ****************/ +void badpat(char *message, char *source, char *stop) +/* char *message; // Error message */ +/* char *source; // Pattern start */ +/* char *stop; // Pattern end */ +{ + fprintf(stderr, "-GREP-E-%s, pattern is\"%s\"\n", message, source); + fprintf(stderr, "-GREP-E-Stopped at byte %d, '%c'\n", + stop-source, stop[-1]); + error("?GREP-E-Bad pattern\n"); +} + +/*** Scan the file for the pattern in pbuf[] ***********/ +void grep(FILE *fp, char *fn) +/* FILE *fp; // File to process */ +/* char *fn; // File name (for -f option) */ +{ + int lno, count, m; + + lno = 0; + count = 0; + while (fgets(lbuf, LMAX, fp)) { + ++lno; + m = match(); + if ((m && !vflag) || (!m && vflag)) { + ++count; + if (!cflag) { + if (fflag && fn) { + file(fn); + fn = 0; + } + if (nflag) + printf("%d\t", lno); + printf("%s\n", lbuf); + } + } + } + if (cflag) { + if (fflag && fn) + file(fn); + printf("%d\n", count); + } +} + +/*** Match line (lbuf) with pattern (pbuf) return 1 if match ***/ +void match() +{ + char *l; /* Line pointer */ + + for (l = lbuf; *l; ++l) { + if (pmatch(l, pbuf)) + return(1); + } + return(0); +} + +/*** Match partial line with pattern *******************/ +char *pmatch(char *line, char *pattern) +/* char *line; // (partial) line to match */ +/* char *pattern; // (partial) pattern to match */ +{ + char *l; /* Current line pointer */ + char *p; /* Current pattern pointer */ + char c; /* Current character */ + char *e; /* End for STAR and PLUS match */ + int op; /* Pattern operation */ + int n; /* Class counter */ + char *are; /* Start of STAR match */ + + l = line; + if (debug > 1) + printf("pmatch(\"%s\")\n", line); + p = pattern; + while ((op = *p++) != ENDPAT) { + if (debug > 1) + printf("byte[%d] = 0%o, '%c', op = 0%o\n", + l-line, *l, *l, op); + switch(op) { + + case CHAR: + if (tolower(*l++) != *p++) + return(0); + break; + + case BOL: + if (l != lbuf) + return(0); + break; + + case EOL: + if (*l != '\0') + return(0); + break; + + case ANY: + if (*l++ == '\0') + return(0); + break; + + case DIGIT: + if ((c = *l++) < '0' || (c > '9')) + return(0); + break; + + case ALPHA: + c = tolower(*l++); + if (c < 'a' || c > 'z') + return(0); + break; + + case NALPHA: + c = tolower(*l++); + if (c >= 'a' && c <= 'z') + break; + else if (c < '0' || c > '9') + return(0); + break; + + case PUNCT: + c = *l++; + if (c == 0 || c > ' ') + return(0); + break; + + case CLASS: + case NCLASS: + c = tolower(*l++); + n = *p++ & 0377; + do { + if (*p == RANGE) { + p += 3; + n -= 2; + if (c >= p[-2] && c <= p[-1]) + break; + } + else if (c == *p++) + break; + } while (--n > 1); + if ((op == CLASS) == (n <= 1)) + return(0); + if (op == CLASS) + p += n - 2; + break; + + case MINUS: + e = pmatch(l, p); /* Look for a match */ + while (*p++ != ENDPAT); /* Skip over pattern */ + if (e) /* Got a match? */ + l = e; /* Yes, update string */ + break; /* Always succeeds */ + + case PLUS: /* One or more ... */ + if ((l = pmatch(l, p)) == 0) + return(0); /* Gotta have a match */ + case STAR: /* Zero or more ... */ + are = l; /* Remember line start */ + while (*l && (e = pmatch(l, p))) + l = e; /* Get longest match */ + while (*p++ != ENDPAT); /* Skip over pattern */ + while (l >= are) { /* Try to match rest */ + if (e = pmatch(l, p)) + return(e); + --l; /* Nope, try earlier */ + } + return(0); /* Nothing else worked */ + + default: + printf("Bad op code %d\n", op); + error("Cannot happen -- match\n"); + } + } + return(l); +} + +/*** Report an error ***********************************/ +void error(char *s) +{ + fprintf(stderr, "%s", s); + exit(1); +} + +/*** Main program - parse arguments & grep *************/ +int main(int argc, char **argv) +{ + char *p; + int c, i; + int gotpattern; + + FILE *f; + + if (argc <= 1) + usage("No arguments"); + if (argc == 2 && argv[1][0] == '?' && argv[1][1] == 0) { + help(documentation); + help(patdoc); + return; + } + nfile = argc-1; + gotpattern = 0; + for (i=1; i < argc; ++i) { + p = argv[i]; + if (*p == '-') { + ++p; + while (c = *p++) { + switch(tolower(c)) { + + case '?': + help(documentation); + break; + + case 'C': + case 'c': + ++cflag; + break; + + case 'D': + case 'd': + ++debug; + break; + + case 'F': + case 'f': + ++fflag; + break; + + case 'n': + case 'N': + ++nflag; + break; + + case 'v': + case 'V': + ++vflag; + break; + + default: + usage("Unknown flag"); + } + } + argv[i] = 0; + --nfile; + } else if (!gotpattern) { + compile(p); + argv[i] = 0; + ++gotpattern; + --nfile; + } + } + if (!gotpattern) + usage("No pattern"); + if (nfile == 0) + grep(stdin, 0); + else { + fflag = fflag ^ (nfile > 0); + for (i=1; i < argc; ++i) { + if (p = argv[i]) { + if ((f=fopen(p, "r")) == NULL) + cant(p); + else { + grep(f, p); + fclose(f); + } + } + } + } +} + diff --git a/src/tests/47_switch_return.c b/src/tests/47_switch_return.c new file mode 100644 index 0000000..2fdb8bd --- /dev/null +++ b/src/tests/47_switch_return.c @@ -0,0 +1,23 @@ +#include + +void fred(int x) +{ + switch (x) + { + case 1: printf("1\n"); return; + case 2: printf("2\n"); break; + case 3: printf("3\n"); return; + } + + printf("out\n"); +} + +int main() +{ + fred(1); + fred(2); + fred(3); + + return 0; +} + diff --git a/src/tests/47_switch_return.expect b/src/tests/47_switch_return.expect new file mode 100644 index 0000000..b6deb7e --- /dev/null +++ b/src/tests/47_switch_return.expect @@ -0,0 +1,4 @@ +1 +2 +out +3 diff --git a/src/tests/48_nested_break.c b/src/tests/48_nested_break.c new file mode 100644 index 0000000..4b01a99 --- /dev/null +++ b/src/tests/48_nested_break.c @@ -0,0 +1,24 @@ +#include + +int a; +char b; + +a = 0; +while (a < 2) +{ + printf("%d", a++); + break; + + b = 'A'; + while (b < 'C') + { + printf("%c", b++); + } + printf("e"); +} +printf("\n"); + +int main() +{ + return 0; +} diff --git a/src/tests/48_nested_break.expect b/src/tests/48_nested_break.expect new file mode 100644 index 0000000..573541a --- /dev/null +++ b/src/tests/48_nested_break.expect @@ -0,0 +1 @@ +0 diff --git a/src/tests/49_bracket_evaluation.c b/src/tests/49_bracket_evaluation.c new file mode 100644 index 0000000..b4303c6 --- /dev/null +++ b/src/tests/49_bracket_evaluation.c @@ -0,0 +1,21 @@ +#include + +struct point +{ + double x; + double y; +}; + +struct point point_array[100]; + +int main() +{ + int my_point = 10; + + point_array[my_point].x = 12.34; + point_array[my_point].y = 56.78; + + printf("%f, %f\n", point_array[my_point].x, point_array[my_point].y); + + return 0; +} diff --git a/src/tests/49_bracket_evaluation.expect b/src/tests/49_bracket_evaluation.expect new file mode 100644 index 0000000..1da66db --- /dev/null +++ b/src/tests/49_bracket_evaluation.expect @@ -0,0 +1 @@ +12.340000, 56.780000 diff --git a/src/tests/50_logical_second_arg.c b/src/tests/50_logical_second_arg.c new file mode 100644 index 0000000..f4be825 --- /dev/null +++ b/src/tests/50_logical_second_arg.c @@ -0,0 +1,27 @@ +#include + +int fred() +{ + printf("fred\n"); + return 0; +} + +int joe() +{ + printf("joe\n"); + return 1; +} + +int main() +{ + printf("%d\n", fred() && joe()); + printf("%d\n", fred() || joe()); + printf("%d\n", joe() && fred()); + printf("%d\n", joe() || fred()); + printf("%d\n", fred() && (1 + joe())); + printf("%d\n", fred() || (0 + joe())); + printf("%d\n", joe() && (0 + fred())); + printf("%d\n", joe() || (1 + fred())); + + return 0; +} diff --git a/src/tests/50_logical_second_arg.expect b/src/tests/50_logical_second_arg.expect new file mode 100644 index 0000000..d6174ae --- /dev/null +++ b/src/tests/50_logical_second_arg.expect @@ -0,0 +1,20 @@ +fred +0 +fred +joe +1 +joe +fred +0 +joe +1 +fred +0 +fred +joe +1 +joe +fred +0 +joe +1 diff --git a/src/tests/51_static.c b/src/tests/51_static.c new file mode 100644 index 0000000..3e93ba9 --- /dev/null +++ b/src/tests/51_static.c @@ -0,0 +1,26 @@ +#include + +static int fred = 1234; +static int joe; + +void henry() +{ + static int fred = 4567; + + printf("%d\n", fred); + fred++; +} + +void main() +{ + printf("%d\n", fred); + henry(); + henry(); + henry(); + henry(); + printf("%d\n", fred); + fred = 8901; + joe = 2345; + printf("%d\n", fred); + printf("%d\n", joe); +} diff --git a/src/tests/51_static.expect b/src/tests/51_static.expect new file mode 100644 index 0000000..18224fa --- /dev/null +++ b/src/tests/51_static.expect @@ -0,0 +1,8 @@ +1234 +4567 +4568 +4569 +4570 +1234 +8901 +2345 diff --git a/src/tests/52_unnamed_enum.c b/src/tests/52_unnamed_enum.c new file mode 100644 index 0000000..7e99bfd --- /dev/null +++ b/src/tests/52_unnamed_enum.c @@ -0,0 +1,24 @@ +#include + +enum fred { a, b, c }; + +printf("a=%d\n", a); +printf("b=%d\n", b); +printf("c=%d\n", c); + +enum fred d; + +typedef enum { e, f, g } h; +typedef enum { i, j, k } m; + +printf("e=%d\n", e); +printf("f=%d\n", f); +printf("g=%d\n", g); + +printf("i=%d\n", i); +printf("j=%d\n", j); +printf("k=%d\n", k); + +void main() +{ +} diff --git a/src/tests/52_unnamed_enum.expect b/src/tests/52_unnamed_enum.expect new file mode 100644 index 0000000..84f2ac8 --- /dev/null +++ b/src/tests/52_unnamed_enum.expect @@ -0,0 +1,9 @@ +a=0 +b=1 +c=2 +e=0 +f=1 +g=2 +i=0 +j=1 +k=2 diff --git a/src/tests/54_goto.c b/src/tests/54_goto.c new file mode 100644 index 0000000..65ee7e2 --- /dev/null +++ b/src/tests/54_goto.c @@ -0,0 +1,52 @@ +#include + +void fred() +{ + printf("In fred()\n"); + goto done; + printf("In middle\n"); +done: + printf("At end\n"); +} + +void joe() +{ + int b = 5678; + + printf("In joe()\n"); + + { + int c = 1234; + printf("c = %d\n", c); + goto outer; + printf("uh-oh\n"); + } + +outer: + + printf("done\n"); +} + +void henry() +{ + int a; + + printf("In henry()\n"); + goto inner; + + { + int b; +inner: + b = 1234; + printf("b = %d\n", b); + } + + printf("done\n"); +} + +void main() +{ + fred(); + joe(); + henry(); +} diff --git a/src/tests/54_goto.expect b/src/tests/54_goto.expect new file mode 100644 index 0000000..8e553fa --- /dev/null +++ b/src/tests/54_goto.expect @@ -0,0 +1,8 @@ +In fred() +At end +In joe() +c = 1234 +done +In henry() +b = 1234 +done diff --git a/src/tests/55_array_initialiser.c b/src/tests/55_array_initialiser.c new file mode 100644 index 0000000..6d3d028 --- /dev/null +++ b/src/tests/55_array_initialiser.c @@ -0,0 +1,12 @@ +#include + +int main() +{ + int fred[3] = { 12, 34, 56 }; + double joe[] = { 23.4, 56.7, 89.0 }; + + printf("%d %d %d\n", fred[0], fred[1], fred[2]); + printf("%f %f %f\n", joe[0], joe[1], joe[2]); + + return 0; +} diff --git a/src/tests/55_array_initialiser.expect b/src/tests/55_array_initialiser.expect new file mode 100644 index 0000000..c486310 --- /dev/null +++ b/src/tests/55_array_initialiser.expect @@ -0,0 +1,2 @@ +12 34 56 +23.400000 56.700000 89.000000 diff --git a/src/tests/56_cross_structure.c b/src/tests/56_cross_structure.c new file mode 100644 index 0000000..f8f333d --- /dev/null +++ b/src/tests/56_cross_structure.c @@ -0,0 +1,18 @@ +#include + +struct s1; + +struct s2 +{ + struct s1 *s; +}; + +struct s1 +{ + struct s2 *s; +}; + +void main() +{ + printf("ok\n"); +} diff --git a/src/tests/56_cross_structure.expect b/src/tests/56_cross_structure.expect new file mode 100644 index 0000000..9766475 --- /dev/null +++ b/src/tests/56_cross_structure.expect @@ -0,0 +1 @@ +ok diff --git a/src/tests/57_macro_bug.c b/src/tests/57_macro_bug.c new file mode 100644 index 0000000..68fb471 --- /dev/null +++ b/src/tests/57_macro_bug.c @@ -0,0 +1,17 @@ +#include "stdio.h" + +#define MIN(a,b) ((a) < (b) ? (a) : (b)) + +void main() +{ + float x = MIN(1,2); + int y = 14; + float z; + z = MIN(y, 13.5); + y = MIN(y, 13); + + float pi = 3.14; + int pi_int = pi; + + printf("Macro test: %d %d %f %d \n", x, y, z, pi_int); +} diff --git a/src/tests/57_macro_bug.expect b/src/tests/57_macro_bug.expect new file mode 100644 index 0000000..a29f45d --- /dev/null +++ b/src/tests/57_macro_bug.expect @@ -0,0 +1 @@ +Macro test: 1 13 13.500000 3 diff --git a/src/tests/58_return_outside.c b/src/tests/58_return_outside.c new file mode 100644 index 0000000..b1f34dc --- /dev/null +++ b/src/tests/58_return_outside.c @@ -0,0 +1,2 @@ +// should not crash +return 0; diff --git a/src/tests/58_return_outside.expect b/src/tests/58_return_outside.expect new file mode 100644 index 0000000..e69de29 diff --git a/src/tests/59_break_before_loop.c b/src/tests/59_break_before_loop.c new file mode 100644 index 0000000..2df59c7 --- /dev/null +++ b/src/tests/59_break_before_loop.c @@ -0,0 +1,60 @@ +#include + +void foo() +{ + printf("foo\n"); +} +int main() +{ + int a,c; + + printf("\nTest 1\n"); + + a = 0; c = 0; + while (1) + { + printf("a=%d\n", a++); + break; + for (c=0;c<10;c++) + printf("c=%d\n",c); + } + + printf("\nTest 2\n"); + + a = 0; c = 0; + while (1) + { + printf("a=%d\n", a++); + break; + while (c < 3) + printf("c=%d\n",c++); + } + + printf("\nTest 3\n"); + + a = 0; c = 0; + for (c=0;c<10;c++) + { + printf("c=%d\n",c); + foo(); + break; + foo(); + for (a = 0; a < 2; a++) + printf("a=%d\n",a); + } + + printf("\nTest 4\n"); + + a = 0; c = 0; + for (c=0;c<10;c++) + { + printf("c=%d\n",c); + foo(); + continue; + for (a = 0; a < 2; a++) + printf("a=%d\n",a); + printf("bar\n"); + } + + return 0; +} diff --git a/src/tests/59_break_before_loop.expect b/src/tests/59_break_before_loop.expect new file mode 100644 index 0000000..269f08b --- /dev/null +++ b/src/tests/59_break_before_loop.expect @@ -0,0 +1,32 @@ + +Test 1 +a=0 + +Test 2 +a=0 + +Test 3 +c=0 +foo + +Test 4 +c=0 +foo +c=1 +foo +c=2 +foo +c=3 +foo +c=4 +foo +c=5 +foo +c=6 +foo +c=7 +foo +c=8 +foo +c=9 +foo diff --git a/src/tests/60_local_vars.c b/src/tests/60_local_vars.c new file mode 100644 index 0000000..e34db00 --- /dev/null +++ b/src/tests/60_local_vars.c @@ -0,0 +1,63 @@ +#include + +printf("first for\n"); + +for (int i = 0; i < 3; i++) +{ + int j = i+1; + printf("%d\n", i); +} + +printf("second for\n"); + +for (int i = 0; i < 3; i++) +{ + printf("%d\n", i); +} +int j; + +void foo() +{ + printf("foo: first for\n"); + + for (int i = 0; i < 3; i++) + { + int j = i+1; + printf("foo: %d\n", i); + } + + while(1) + { + int i = 5; + printf("foo: while: %d\n", i); + if (1) break; + } + + printf("foo: second for\n"); + + for (int i = 0; i < 3; i++) + { + printf("foo: %d\n", i); + } + + for (int i = 0; i < 100000; i++) + { + { + int j = i + 1; // will be caught by VariableDefineButIgnoreIdentical + } + } + + for (int i = 0; i < 3; i++) + { + { + int j = i; + printf("foo: %d\n", j); + } + } + + float j[10]; +} + +foo(); + +void main(){} diff --git a/src/tests/60_local_vars.expect b/src/tests/60_local_vars.expect new file mode 100644 index 0000000..54b905e --- /dev/null +++ b/src/tests/60_local_vars.expect @@ -0,0 +1,20 @@ +first for +0 +1 +2 +second for +0 +1 +2 +foo: first for +foo: 0 +foo: 1 +foo: 2 +foo: while: 5 +foo: second for +foo: 0 +foo: 1 +foo: 2 +foo: 0 +foo: 1 +foo: 2 diff --git a/src/tests/61_initializers.c b/src/tests/61_initializers.c new file mode 100644 index 0000000..90aefb9 --- /dev/null +++ b/src/tests/61_initializers.c @@ -0,0 +1,151 @@ +#include + +char a[10] = "abcd"; +char b[] = "efg"; + +char soko1[9][9] = { + " ##### ", + "### # ", + "#.@$ # ", + "### $.# ", + "#.##$ # ", + "# # . ##", + "#$ *$$.#", + "# . #", + "########" +}; + +char* soko2[9] = { + " ##### ", + "### # ", + "#.@$ # ", + "### $.# ", + "#.##$ # ", + "# # . ##", + "#$ *$$.#", + "# . #", + "########", +}; + + +int x[10] = {0,1,2}; +int y[] = {3,4,5,6}; +int p[3][4] = {{1, 2, 3}, {4, 5}, {6, 7}}; +int q[3][4] = {1, 2, 3, 9, 8, 7, 6, 5, 4}; +int r[3][4][5] = {{{1, 2, 3}, {4, 5}, {6, 7}}, {{2, 4}, {6, 8}}}; +int s[3][4][5] = {{1, 2, 3}, {4, 5}, {6, 7}}; +int t[3][4][5] = {1, 2, 3, 9, 8, 7, 6, 5, 1, 2, 3, 9, 8, 7, 6, 5, 1, 2, 3, 9, 8, 7, 6, 5, 1, 2, 3, 9, 8, 7, 6, 5}; + +static void func_1(void) +{ + // test case found with CSmith + int x[7][4] = {{1,2,3}}; + + for (int i = 0; i < 7; i++) + { + for (int j = 0; j < 4; j++) + printf("%d ", x[i][j]); + printf("\n"); + } + + int y[7][4] = {{0x116F538EL, 1L, 0x8DDB359CL, (-1L)}, {0x116F538EL, 1L, 0x8DDB359CL, (-1L)}, {0x116F538EL, 1L, 0x8DDB359CL, (-1L)}, {0x116F538EL, 1L, 0x8DDB359CL, (-1L)}, {0x116F538EL, 1L, 0x8DDB359CL, (-1L)}, {0x116F538EL, 1L, 0x8DDB359CL, (-1L)}, {0x116F538EL, 1L, 0x8DDB359CL, (-1L)}}; + + for (int i = 0; i < 7; i++) + { + for (int j = 0; j < 4; j++) + printf("%d ", y[i][j]); + printf("\n"); + } +} + + +int main(int argc, char** argv) +{ + printf("Hello, World!\n"); + + printf("a='%s' (%ld)\n", a, sizeof(a)); + printf("b='%s' (%ld)\n", b, sizeof(b)); + + printf("x=["); + for (int i = 0; i < sizeof(x) / sizeof(int); i++) + printf("%d ", x[i]); + printf("]\n"); + + printf("y=["); + for (int i = 0; i < sizeof(y) / sizeof(int); i++) + printf("%d ", y[i]); + printf("]\n"); + + printf("p=[\n"); + for (int i = 0; i < 3; i++) + { + printf(" "); + for (int j = 0; j < 4; j++) + printf("%d ", p[i][j]); + printf("\n"); + } + printf(" ]\n"); + + printf("q=[\n"); + for (int i = 0; i < 3; i++) + { + printf(" "); + for (int j = 0; j < 4; j++) + printf("%d ", q[i][j]); + printf("\n"); + } + printf(" ]\n"); + + printf("r=[\n"); + for (int i = 0; i < 3; i++) + { + printf(" "); + for (int j = 0; j < 4; j++) + { + for (int k = 0; k < 5; k++) + printf("%d ", r[i][j][k]); + printf(" "); + } + printf("\n"); + } + printf(" ]\n"); + + printf("s=[\n"); + for (int i = 0; i < 3; i++) + { + printf(" "); + for (int j = 0; j < 4; j++) + { + for (int k = 0; k < 5; k++) + printf("%d ", s[i][j][k]); + printf(" "); + } + printf("\n"); + } + printf(" ]\n"); + + printf("t=[\n"); + for (int i = 0; i < 3; i++) + { + printf(" "); + for (int j = 0; j < 4; j++) + { + for (int k = 0; k < 5; k++) + printf("%d ", t[i][j][k]); + printf(" "); + } + printf("\n"); + } + printf(" ]\n"); + + printf("soko1=\n"); + for (int i = 0; i < 9; i++) + printf("%s %c\n", soko1[i], soko1[i][3]); + printf("soko2=\n"); + for (int i = 0; i < 9; i++) + printf("%s %c\n", soko2[i], soko2[i][3]); + + func_1(); + + return 0; +} diff --git a/src/tests/61_initializers.expect b/src/tests/61_initializers.expect new file mode 100644 index 0000000..f571a96 --- /dev/null +++ b/src/tests/61_initializers.expect @@ -0,0 +1,64 @@ +Hello, World! +a='abcd' (10) +b='efg' (4) +x=[0 1 2 0 0 0 0 0 0 0 ] +y=[3 4 5 6 ] +p=[ + 1 2 3 0 + 4 5 0 0 + 6 7 0 0 + ] +q=[ + 1 2 3 9 + 8 7 6 5 + 4 0 0 0 + ] +r=[ + 1 2 3 0 0 4 5 0 0 0 6 7 0 0 0 0 0 0 0 0 + 2 4 0 0 0 6 8 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 + ] +s=[ + 1 2 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 4 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 6 7 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + ] +t=[ + 1 2 3 9 8 7 6 5 1 2 3 9 8 7 6 5 1 2 3 9 + 8 7 6 5 1 2 3 9 8 7 6 5 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 + ] +soko1= + ##### # +### # +#.@$ # $ +### $.# +#.##$ # # +# # . ## +#$ *$$.# * +# . # +######## # +soko2= + ##### # +### # +#.@$ # $ +### $.# +#.##$ # # +# # . ## +#$ *$$.# * +# . # +######## # +1 2 3 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 +292508558 1 -1915013732 -1 +292508558 1 -1915013732 -1 +292508558 1 -1915013732 -1 +292508558 1 -1915013732 -1 +292508558 1 -1915013732 -1 +292508558 1 -1915013732 -1 +292508558 1 -1915013732 -1 diff --git a/src/tests/62_float.c b/src/tests/62_float.c new file mode 100644 index 0000000..f88afd1 --- /dev/null +++ b/src/tests/62_float.c @@ -0,0 +1,10 @@ +#include + +void main() +{ + double x = 3.14; + double y = 1e-3; + double z = 1e-13; + double q = 4.0f / 3.0f; + printf("%f %f %f %f\n", x, y, z * 1e15, q); +} diff --git a/src/tests/62_float.expect b/src/tests/62_float.expect new file mode 100644 index 0000000..3aef575 --- /dev/null +++ b/src/tests/62_float.expect @@ -0,0 +1 @@ +3.140000 0.001000 100.000000 1.333333 diff --git a/src/tests/63_typedef.c b/src/tests/63_typedef.c new file mode 100644 index 0000000..b5ee053 --- /dev/null +++ b/src/tests/63_typedef.c @@ -0,0 +1,61 @@ +#include + +typedef char int8_t; +typedef short int16_t; +typedef int int32_t; +typedef long int64_t; + +typedef unsigned char uint8_t; +typedef unsigned short uint16_t; +typedef unsigned int uint32_t; +typedef unsigned long uint64_t; + +typedef struct _point +{ + int x; + int y; +} point; + + +void main() +{ + int8_t x8 = 0xFEDCBA98; + int16_t x16 = 0xFEDCBA98; + int32_t x32 = 0xFEDCBA98; + int64_t x64 = 0xFFFFFEDCBA98FFFF; + + uint8_t u8 = 0xFEDCBA98; + uint16_t u16 = 0xFEDCBA98; + uint32_t u32 = 0xFEDCBA98; + uint64_t u64 = 0xFEDCBA98FFFF; + + char* y = (char*) &x32; + + printf("%d<%ld>\n", x8, sizeof(x8)); + printf("%d<%ld>\n", x16, sizeof(x16)); + printf("%d<%ld>\n", x32, sizeof(x32)); + printf("%ld<%ld>\n", x64, sizeof(x64)); + + + printf("%u<%ld>\n", u8, sizeof(x8)); + printf("%u<%ld>\n", u16, sizeof(x16)); + printf("%u<%ld>\n", u32, sizeof(x32)); + printf("%lu<%ld>\n", u64, sizeof(x64)); + + printf("%d\n", *(int32_t*)y); + + point pt; + pt.x = 1; + pt.y = 2; + + point pts[2]; + pts[0] = pt; + pts[1] = pt; + + pt.y = 3; + + point* ptp = (point*) &pts[0]; + + printf("(%d, %d)\n", pt.x, pt.y); + printf("(%d, %d)\n", ptp->x, ptp->y); +} diff --git a/src/tests/63_typedef.expect b/src/tests/63_typedef.expect new file mode 100644 index 0000000..78f54a2 --- /dev/null +++ b/src/tests/63_typedef.expect @@ -0,0 +1,11 @@ +-104<1> +-17768<2> +-19088744<4> +-1250999861249<8> +152<1> +47768<2> +4275878552<4> +280223976849407<8> +-19088744 +(1, 3) +(1, 2) diff --git a/src/tests/64_double_prefix_op.c b/src/tests/64_double_prefix_op.c new file mode 100644 index 0000000..5956289 --- /dev/null +++ b/src/tests/64_double_prefix_op.c @@ -0,0 +1,24 @@ +// credits: CSmith, a random generator of C programs. + +#include "stdio.h" + +void func_1(void) +{ + int x = 5; + int* px = &x; + int** ppx = &px; + int*** pppx = &ppx; + int a = - - x; + printf("a=%d\n", a); + int b = - - - x; + printf("b=%d\n", b); + int c = -***pppx; + printf("c=%d\n", c); + int d = - -****&pppx; + printf("d=%d\n", d); +} + +void main() +{ + func_1(); +} diff --git a/src/tests/64_double_prefix_op.expect b/src/tests/64_double_prefix_op.expect new file mode 100644 index 0000000..a09140a --- /dev/null +++ b/src/tests/64_double_prefix_op.expect @@ -0,0 +1,4 @@ +a=5 +b=-5 +c=-5 +d=5 diff --git a/src/tests/65_typeless.c b/src/tests/65_typeless.c new file mode 100644 index 0000000..8eae949 --- /dev/null +++ b/src/tests/65_typeless.c @@ -0,0 +1,20 @@ +#include "stdio.h" + +void main() +{ + x = 3.9; + y = 4; + z = &y; + msg = "hi there"; + printf("%d %d %d %s\n", x*2, y*2, *z, msg); + printf("%d %d %d\n", sizeof(x), sizeof(y), sizeof(msg)); + for (i = 1; i <= 3; i++) + printf("%d\n", i); + + /* this should fail + { + int q = 5; + } + q = 3.14; // should say error + */ +} diff --git a/src/tests/65_typeless.expect b/src/tests/65_typeless.expect new file mode 100644 index 0000000..2ad42a5 --- /dev/null +++ b/src/tests/65_typeless.expect @@ -0,0 +1,5 @@ +7 8 4 hi there +8 8 8 +1 +2 +3 diff --git a/src/tests/66_printf_undefined.c b/src/tests/66_printf_undefined.c new file mode 100644 index 0000000..a1723e9 --- /dev/null +++ b/src/tests/66_printf_undefined.c @@ -0,0 +1,11 @@ +#include + +void fred() +{ + printf("test\n"); +} + +void main() +{ + fred(); +} diff --git a/src/tests/66_printf_undefined.expect b/src/tests/66_printf_undefined.expect new file mode 100644 index 0000000..9daeafb --- /dev/null +++ b/src/tests/66_printf_undefined.expect @@ -0,0 +1 @@ +test diff --git a/src/tests/67_macro_crash.c b/src/tests/67_macro_crash.c new file mode 100644 index 0000000..0195f79 --- /dev/null +++ b/src/tests/67_macro_crash.c @@ -0,0 +1,12 @@ +#include + +void printArray(void) { +#define SIZE 10 + int array[SIZE] = {5, 4, 3, 9, 1, 8, 6, 7, 5, 2}; + printf("4: %d\n", array[4]); +} + +void main() +{ + printArray(); +} diff --git a/src/tests/67_macro_crash.expect b/src/tests/67_macro_crash.expect new file mode 100644 index 0000000..aec711b --- /dev/null +++ b/src/tests/67_macro_crash.expect @@ -0,0 +1 @@ +4: 1 diff --git a/src/tests/68_return.c b/src/tests/68_return.c new file mode 100644 index 0000000..46fd7b4 --- /dev/null +++ b/src/tests/68_return.c @@ -0,0 +1,34 @@ +#include + +void demo_error() +{ + int value = 5; + + printf("Here's a print statement before quitting.\n"); + + if(1) { + printf("returning; there should be no further output.\n"); + return; + } + + printf("This statement should not print, and does not.\n"); + + switch(value) + { + case 5: + printf("case 5: value = %d\n", value); + break; + case 0: + printf("case 0: value=%d\n", value); + break; + } + + printf("This statement also should not and does not print.\n"); + + return; +} + +void main() +{ + demo_error(); +} diff --git a/src/tests/68_return.expect b/src/tests/68_return.expect new file mode 100644 index 0000000..763ef34 --- /dev/null +++ b/src/tests/68_return.expect @@ -0,0 +1,2 @@ +Here's a print statement before quitting. +returning; there should be no further output. diff --git a/src/tests/Makefile b/src/tests/Makefile new file mode 100644 index 0000000..643a9ae --- /dev/null +++ b/src/tests/Makefile @@ -0,0 +1,93 @@ +TESTS= 00_assignment.test \ + 01_comment.test \ + 02_printf.test \ + 03_struct.test \ + 04_for.test \ + 05_array.test \ + 06_case.test \ + 07_function.test \ + 08_while.test \ + 09_do_while.test \ + 10_pointer.test \ + 11_precedence.test \ + 12_hashdefine.test \ + 13_integer_literals.test \ + 14_if.test \ + 15_recursion.test \ + 16_nesting.test \ + 17_enum.test \ + 18_include.test \ + 19_pointer_arithmetic.test \ + 20_pointer_comparison.test \ + 21_char_array.test \ + 22_floating_point.test \ + 23_type_coercion.test \ + 24_math_library.test \ + 25_quicksort.test \ + 26_character_constants.test \ + 28_strings.test \ + 29_array_address.test \ + 30_hanoi.test \ + 31_args.test \ + 32_led.test \ + 33_ternary_op.test \ + 34_array_assignment.test \ + 35_sizeof.test \ + 36_array_initialisers.test \ + 37_sprintf.test \ + 38_multiple_array_index.test \ + 39_typedef.test \ + 40_stdio.test \ + 41_hashif.test \ + 43_void_param.test \ + 44_scoped_declarations.test \ + 45_empty_for.test \ + 47_switch_return.test \ + 48_nested_break.test \ + 49_bracket_evaluation.test \ + 50_logical_second_arg.test \ + 51_static.test \ + 52_unnamed_enum.test \ + 54_goto.test \ + 55_array_initialiser.test \ + 56_cross_structure.test \ + 57_macro_bug.test \ + 58_return_outside.test \ + 59_break_before_loop.test \ + 60_local_vars.test \ + 61_initializers.test \ + 62_float.test \ + 63_typedef.test \ + 64_double_prefix_op.test \ + 66_printf_undefined.test \ + 67_macro_crash.test \ + 68_return.test \ + + +include csmith/Makefile + +%.test: %.expect %.c + @echo Test: $*... + @if [ "x`echo $* | grep args`" != "x" ]; \ + then \ + ../picoc $*.c - arg1 arg2 arg3 arg4 2>&1 >$*.output; \ + else \ + ../picoc $*.c 2>&1 >$*.output; \ + fi + @if [ "x`diff -qbu $*.expect $*.output`" != "x" ]; \ + then \ + echo "error in test $*"; \ + diff -u $*.expect $*.output; \ + rm -f $*.output; \ + exit 1; \ + fi; \ + rm -f $*.output + +all: test + +test: $(TESTS) + @echo "test passed" + +csmith: $(CSMITH_TESTS) + @echo "CSmith test passed" + diff --git a/src/tests/csmith/Makefile b/src/tests/csmith/Makefile new file mode 100644 index 0000000..ded326a --- /dev/null +++ b/src/tests/csmith/Makefile @@ -0,0 +1,111 @@ +CSMITH_TESTS= csmith/rand0.test \ + csmith/rand1.test \ + csmith/rand2.test \ + csmith/rand3.test \ + csmith/rand4.test \ + csmith/rand5.test \ + csmith/rand6.test \ + csmith/rand7.test \ + csmith/rand8.test \ + csmith/rand9.test \ + csmith/rand10.test \ + csmith/rand11.test \ + csmith/rand12.test \ + csmith/rand13.test \ + csmith/rand14.test \ + csmith/rand15.test \ + csmith/rand16.test \ + csmith/rand17.test \ + csmith/rand18.test \ + csmith/rand19.test \ + csmith/rand20.test \ + csmith/rand21.test \ + csmith/rand22.test \ + csmith/rand23.test \ + csmith/rand24.test \ + csmith/rand25.test \ + csmith/rand26.test \ + csmith/rand27.test \ + csmith/rand28.test \ + csmith/rand29.test \ + csmith/rand30.test \ + csmith/rand31.test \ + csmith/rand32.test \ + csmith/rand33.test \ + csmith/rand34.test \ + csmith/rand35.test \ + csmith/rand36.test \ + csmith/rand37.test \ + csmith/rand38.test \ + csmith/rand39.test \ + csmith/rand40.test \ + csmith/rand41.test \ + csmith/rand42.test \ + csmith/rand43.test \ + csmith/rand44.test \ + csmith/rand45.test \ + csmith/rand46.test \ + csmith/rand47.test \ + csmith/rand48.test \ + csmith/rand49.test \ + csmith/rand50.test \ + csmith/rand51.test \ + csmith/rand52.test \ + csmith/rand53.test \ + csmith/rand54.test \ + csmith/rand55.test \ + csmith/rand56.test \ + csmith/rand57.test \ + csmith/rand58.test \ + csmith/rand59.test \ + csmith/rand60.test \ + csmith/rand61.test \ + csmith/rand62.test \ + csmith/rand63.test \ + csmith/rand64.test \ + csmith/rand65.test \ + csmith/rand66.test \ + csmith/rand67.test \ + csmith/rand68.test \ + csmith/rand69.test \ + csmith/rand70.test \ + csmith/rand71.test \ + csmith/rand72.test \ + csmith/rand73.test \ + csmith/rand74.test \ + csmith/rand75.test \ + csmith/rand76.test \ + csmith/rand77.test \ + csmith/rand78.test \ + csmith/rand79.test \ + csmith/rand80.test \ + csmith/rand81.test \ + csmith/rand82.test \ + csmith/rand83.test \ + csmith/rand84.test \ + csmith/rand85.test \ + csmith/rand86.test \ + csmith/rand87.test \ + csmith/rand88.test \ + csmith/rand89.test \ + csmith/rand90.test \ + csmith/rand91.test \ + csmith/rand92.test \ + csmith/rand93.test \ + csmith/rand94.test \ + csmith/rand95.test \ + csmith/rand96.test \ + csmith/rand97.test \ + csmith/rand98.test \ + csmith/rand99.test \ + csmith/rand100.test \ + csmith/rand101.test \ + csmith/rand102.test \ + csmith/rand103.test \ + csmith/rand104.test \ + csmith/rand105.test \ + csmith/rand106.test \ + csmith/rand107.test \ + csmith/rand108.test \ + csmith/rand109.test \ + csmith/rand110.test \ diff --git a/src/tests/csmith/rand0.c b/src/tests/csmith/rand0.c new file mode 100644 index 0000000..b9ca275 --- /dev/null +++ b/src/tests/csmith/rand0.c @@ -0,0 +1,1072 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static short g_23 = 0x1A9CL; +static int g_41 = (-7L); +static int g_56 = 0xEE3E4F6FL; +static int *g_62 = &g_56; +static int **g_61 = &g_62; +static int *g_83 = &g_41; +static int **g_82 = &g_83; +static int g_85 = 1L; +static int g_249 = 5L; +static unsigned short g_292 = 0xA7A5L; +static unsigned short g_533 = 0x35D4L; +static unsigned char g_574 = 0x42L; +static signed char g_805 = (-1L); +static unsigned g_862 = 0x1B116697L; +static unsigned short func_1(void); +static int func_2(unsigned short p_3, short p_4, signed char p_5); +static signed char func_8(unsigned p_9, int p_10, unsigned p_11, unsigned short p_12, unsigned short p_13); +static signed char func_24(unsigned p_25); +static short func_28(signed char p_29); +static short func_42(unsigned p_43); +static int func_47(int p_48); +static short func_57(unsigned p_58, unsigned short p_59, int ** p_60); +static unsigned short func_65(unsigned short p_66, int ** p_67, int * p_68, unsigned char p_69); +static int ** func_70(unsigned short p_71); +static unsigned short func_1(void) +{ + unsigned l_14 = 0x82FF40FCL; + int *l_584 = &g_85; + int ***l_596 = &g_61; + signed char l_691 = 0x58L; + int ***l_712 = &g_61; + signed char l_740 = 1L; + unsigned l_837 = 0x9D91B77DL; + unsigned short l_899 = 0x57ABL; + int l_900 = (-7L); + step_hash(597); + if (func_2(((signed char)func_8(l_14, ((unsigned short)((((signed char)((short)(((int)g_23 + (int)1UL) > g_23) + (short)g_23) * (signed char)func_24(((short)func_28(((((int)((unsigned char)(((signed char)l_14 * (signed char)g_23) < ((unsigned char)((signed char)0xC6L % (signed char)0xB2L) >> (unsigned char)5)) * (unsigned char)g_23) % (int)g_23) <= 0x52B4L) || 248UL)) * (short)1L))) <= g_23) || l_14) % (unsigned short)g_23), l_14, g_23, g_23) >> (signed char)g_574), g_574, g_574)) + { + signed char l_576 = 0x5DL; + int ***l_580 = &g_61; + int l_595 = (-1L); + unsigned l_610 = 4294967295UL; + unsigned short l_731 = 0xAD6EL; + short l_808 = 0L; + step_hash(493); + if (l_576) + { + int *l_583 = &g_56; + short l_592 = 9L; + int ***l_624 = &g_82; + int ***l_668 = &g_82; + unsigned l_670 = 4294967295UL; + step_hash(433); + for (g_574 = 0; (g_574 >= 29); ++g_574) + { + int ***l_579 = &g_82; + int *l_589 = &g_85; + step_hash(429); + if ((l_579 == l_580)) + { + step_hash(424); + for (l_14 = (-14); (l_14 > 20); l_14++) + { + step_hash(421); + (**g_61) = (*g_62); + step_hash(422); + (**l_580) = (*g_61); + step_hash(423); + (**g_61) ^= 1L; + } + step_hash(425); + if ((**g_61)) + break; + } + else + { + step_hash(427); + l_584 = l_583; + step_hash(428); + if ((***l_580)) + continue; + } + step_hash(430); + (*l_589) ^= (((int)(*l_583) / (int)(((short)2L * (short)func_2((***l_580), g_533, g_533)) | g_574)) || ((g_574 & g_574) || g_574)); + step_hash(431); + (**l_579) = (*g_61); + step_hash(432); + return (*l_583); + } + step_hash(480); + if ((1UL | (*l_584))) + { + unsigned char l_600 = 0xC7L; + step_hash(455); + for (g_23 = (-26); (g_23 < 18); g_23 += 8) + { + unsigned l_607 = 0x845D9B98L; + unsigned char l_611 = 0x3FL; + int *l_612 = (void*)0; + step_hash(446); + if ((g_292 <= g_23)) + { + step_hash(439); + (**l_580) = l_583; + step_hash(440); + return g_292; + } + else + { + step_hash(442); + (**g_61) = 1L; + step_hash(443); + (*l_584) &= ((l_595 && (l_596 == (void*)0)) && g_23); + step_hash(444); + g_249 |= (***l_580); + step_hash(445); + (*g_62) = (((***l_580) ^ func_47((-(int)((*g_62) & (*g_62))))) != 4UL); + } + step_hash(454); + if ((((int)l_600 / (int)((unsigned char)((unsigned short)(0xEDB5A356L >= ((unsigned char)((((l_607 > (***l_596)) >= (*l_584)) >= (g_574 ^ (((short)l_610 >> (short)14) | ((l_611 <= (+g_249)) <= g_574)))) == 0xE024L) << (unsigned char)g_56)) * (unsigned short)0xED9CL) + (unsigned char)g_56)) < 4294967293UL)) + { + step_hash(448); + (*g_82) = l_612; + step_hash(449); + (**l_580) = (*g_61); + step_hash(450); + return (*l_583); + } + else + { + int *l_613 = &g_56; + step_hash(452); + (*g_61) = l_613; + step_hash(453); + (*l_584) = l_600; + } + } + step_hash(460); + for (g_292 = 24; (g_292 != 42); ++g_292) + { + unsigned char l_629 = 0xCFL; + step_hash(459); + (*g_62) = ((unsigned short)((unsigned)((short)(g_85 | ((short)0x45E1L >> (short)(((void*)0 != l_624) || ((signed char)((unsigned short)g_292 * (unsigned short)l_629) / (signed char)0xB1L)))) % (short)(***l_580)) - (unsigned)0x58163E35L) % (unsigned short)g_23); + } + } + else + { + int **l_636 = (void*)0; + int l_669 = 9L; + int l_671 = 0L; + step_hash(466); + for (g_574 = 0; (g_574 < 32); g_574 += 5) + { + step_hash(465); + return g_41; + } + step_hash(477); + if (((unsigned char)(*l_584) << (unsigned char)(((unsigned)((&g_62 == l_636) == g_85) % (unsigned)((short)7L * (short)((unsigned short)((unsigned char)1UL / (unsigned char)((signed char)((void*)0 == &g_82) >> (signed char)((unsigned short)(~g_574) * (unsigned short)65535UL))) << (unsigned short)10))) <= 0xA8DDL))) + { + step_hash(468); + (*g_62) |= ((**l_596) == (void*)0); + } + else + { + step_hash(475); + for (l_592 = 13; (l_592 >= (-28)); --l_592) + { + int l_651 = 0x8266FC1BL; + step_hash(473); + if ((**g_61)) + break; + step_hash(474); + l_671 &= ((unsigned char)l_651 << (unsigned char)((g_41 ^ (((short)(((*l_584) >= ((signed char)(-9L) << (signed char)(*l_584))) && ((unsigned char)(((int)0x97E5E5FEL + (int)(((unsigned char)((unsigned short)((((unsigned)((unsigned char)g_41 * (unsigned char)(&g_82 == l_668)) + (unsigned)(*g_62)) == g_292) >= 1UL) * (unsigned short)0x7148L) - (unsigned char)l_669) == g_249)) || g_574) + (unsigned char)g_249)) % (short)(***l_596)) != l_670)) >= g_85)); + } + step_hash(476); + (**l_580) = (*g_61); + } + step_hash(478); + (*g_62) |= 0L; + step_hash(479); + (**l_596) = (*g_61); + } + step_hash(481); + (**l_596) = (*g_61); + } + else + { + int l_682 = 0xF1CA09A8L; + int **l_683 = &l_584; + step_hash(490); + for (g_292 = (-3); (g_292 > 57); g_292 += 4) + { + unsigned l_680 = 0x8FD928D2L; + int *l_681 = &g_249; + step_hash(486); + (***l_596) ^= 1L; + step_hash(487); + (*g_62) = 4L; + step_hash(488); + (*l_584) &= ((unsigned char)(((((unsigned)g_249 % (unsigned)((short)(***l_580) * (short)0x9EBBL)) != l_680) & (((&g_61 != &g_82) <= g_533) | 0x8A6CL)) < (***l_580)) * (unsigned char)g_292); + step_hash(489); + (*l_681) |= ((***l_580) != (*l_584)); + } + step_hash(491); + (***l_580) ^= (l_682 ^ g_292); + step_hash(492); + (*l_596) = l_683; + } + step_hash(494); + (**l_580) = (**l_580); + step_hash(591); + for (g_41 = (-26); (g_41 >= 8); g_41 += 3) + { + signed char l_690 = 2L; + int l_715 = 0L; + int l_794 = 1L; + int l_807 = (-1L); + step_hash(498); + if ((*l_584)) + break; + step_hash(499); + (***l_596) = ((((unsigned char)((signed char)((*g_61) == (**l_580)) << (signed char)l_690) >> (unsigned char)g_249) > l_690) ^ g_85); + step_hash(542); + for (l_610 = 28; (l_610 > 14); l_610 -= 9) + { + unsigned l_702 = 0x533DD5F4L; + int ***l_741 = &g_61; + step_hash(503); + (*g_82) = (**l_580); + step_hash(517); + if (((unsigned char)(((signed char)func_2(g_41, l_690, g_56) >> (signed char)((signed char)((((short)g_85 - (short)(l_702 | func_47((l_691 > l_690)))) || l_690) >= g_292) << (signed char)3)) | g_249) << (unsigned char)5)) + { + unsigned l_705 = 0x1FE613C0L; + step_hash(511); + if ((~((unsigned char)((l_702 != (l_705 | 0x22416BF5L)) <= (!((unsigned char)func_24((***l_596)) - (unsigned char)((short)((signed char)((void*)0 == l_712) - (signed char)((unsigned)g_41 % (unsigned)g_23)) + (short)g_292)))) * (unsigned char)g_23))) + { + step_hash(506); + l_715 |= (*g_62); + step_hash(507); + g_85 ^= (g_56 <= 0x5E89L); + step_hash(508); + return g_249; + } + else + { + step_hash(510); + (*g_82) = (**l_596); + } + } + else + { + short l_716 = (-3L); + int *l_717 = (void*)0; + int *l_718 = &g_249; + step_hash(513); + (*l_584) = func_47((0x9972L != l_702)); + step_hash(514); + (*l_718) |= (func_24(g_574) < l_716); + step_hash(515); + (***l_712) = ((unsigned short)((***l_596) <= (~func_47((((*l_580) != (void*)0) != (((0L & (&g_62 != &l_717)) > (0xFEL & ((short)l_715 << (short)((((((unsigned char)((short)((unsigned char)((int)0x663B5B55L - (int)(*l_584)) - (unsigned char)l_731) >> (short)8) + (unsigned char)g_85) && l_690) >= 7UL) == 0x16L) > 0xBEL)))) == g_56))))) * (unsigned short)g_533); + step_hash(516); + (**g_61) = 0x8CC47B6DL; + } + step_hash(518); + (*l_584) |= l_702; + step_hash(541); + if ((*l_584)) + { + unsigned l_744 = 0xB85332B2L; + step_hash(524); + for (g_533 = 0; (g_533 == 5); ++g_533) + { + step_hash(523); + return g_249; + } + step_hash(525); + (**g_61) = ((unsigned char)((signed char)((((unsigned short)((*g_62) & l_740) << (unsigned short)14) <= (g_533 || (l_741 != &g_82))) == g_41) << (signed char)g_574) * (unsigned char)(***l_596)); + step_hash(531); + for (g_292 = 0; (g_292 == 11); g_292++) + { + unsigned char l_749 = 255UL; + step_hash(529); + (***l_596) = (l_744 != ((unsigned short)l_715 + (unsigned short)((250UL & (((unsigned char)g_574 - (unsigned char)(***l_712)) | (0x31L & 0xBAL))) < g_41))); + step_hash(530); + return l_749; + } + } + else + { + int l_764 = 0x4BBAFEEAL; + int l_765 = 2L; + step_hash(533); + (*l_584) = (**g_61); + step_hash(539); + for (l_595 = 27; (l_595 > 15); l_595 -= 1) + { + step_hash(537); + if ((***l_741)) + break; + step_hash(538); + (***l_712) = ((unsigned char)l_690 + (unsigned char)((***l_596) >= g_533)); + } + step_hash(540); + l_765 = (func_24(g_23) == ((unsigned short)((signed char)g_533 << (signed char)4) - (unsigned short)(((unsigned short)g_292 << (unsigned short)((((((int)((unsigned char)(l_715 & ((g_85 >= 0x08F8L) | g_85)) * (unsigned char)(((void*)0 == &g_82) && g_249)) + (int)l_690) && g_574) >= g_85) != g_574) < g_249)) | l_764))); + } + } + step_hash(590); + for (l_715 = (-28); (l_715 < (-12)); l_715++) + { + unsigned char l_792 = 0x62L; + int l_809 = 0x5F1FD7BDL; + step_hash(563); + for (l_576 = 0; (l_576 <= (-12)); l_576--) + { + int *l_770 = (void*)0; + } + } + } + step_hash(592); + (***l_712) = (*g_62); + } + else + { + unsigned char l_828 = 0x93L; + step_hash(594); + (*l_584) &= (**g_61); + step_hash(595); + (*g_82) = (*g_61); + step_hash(596); + (*l_584) = l_828; + } + step_hash(642); + for (g_56 = 0; (g_56 == (-7)); g_56 -= 6) + { + int *l_831 = (void*)0; + int l_832 = 0x077F80CCL; + int **l_848 = &l_584; + unsigned short l_891 = 0UL; + int l_901 = 1L; + step_hash(601); + (**l_712) = l_831; + step_hash(602); + g_41 = l_832; + step_hash(641); + for (g_574 = 21; (g_574 >= 28); g_574++) + { + signed char l_835 = 0x81L; + int *l_836 = &g_41; + int ***l_838 = &g_82; + int l_890 = (-8L); + int *l_894 = &l_890; + unsigned l_902 = 0xFF75ECFCL; + step_hash(606); + (*l_836) = (func_24(g_574) >= (l_835 >= (5UL & (g_292 && l_832)))); + step_hash(607); + (*l_836) = (*l_836); + step_hash(639); + if (l_837) + { + unsigned short l_841 = 0x0E4EL; + int **l_849 = &l_584; + step_hash(609); + (*l_836) = (((l_838 == &g_82) != ((signed char)l_841 >> (signed char)(((unsigned)(((unsigned char)g_41 << (unsigned char)g_249) | ((unsigned)((((void*)0 == &l_832) <= (l_848 == l_849)) == 9L) - (unsigned)(*l_836))) - (unsigned)0UL) & (*l_836)))) && g_23); + step_hash(610); + (**l_712) = (*l_848); + } + else + { + int *l_850 = &g_41; + int l_889 = 1L; + step_hash(612); + l_850 = (void*)0; + step_hash(637); + if (l_832) + { + unsigned l_866 = 0x0FD79D07L; + int *l_867 = &g_85; + step_hash(614); + if (g_249) + break; + step_hash(622); + for (g_23 = 7; (g_23 == 8); g_23 += 1) + { + unsigned short l_855 = 65532UL; + step_hash(618); + (*l_836) = (((9UL == ((0x41C28DB2L && ((signed char)g_533 + (signed char)(l_855 & 0xD1AAL))) > (((unsigned char)((void*)0 != &g_62) + (unsigned char)((signed char)(-3L) % (signed char)((signed char)g_862 * (signed char)0x4EL))) | 0x3B297379L))) != 0x2AE69BD7L) != 2L); + step_hash(619); + (*l_836) |= l_855; + step_hash(620); + l_866 = ((signed char)(-(short)g_533) << (signed char)7); + step_hash(621); + (**l_596) = l_867; + } + step_hash(628); + for (l_837 = 0; (l_837 > 25); l_837++) + { + step_hash(626); + (*l_867) &= 0L; + step_hash(627); + (*l_836) &= 1L; + } + } + else + { + int l_882 = (-8L); + step_hash(634); + for (g_533 = 0; (g_533 >= 36); g_533 += 8) + { + step_hash(633); + l_882 = ((short)((unsigned char)g_56 << (unsigned char)l_882) + (short)0x7743L); + } + step_hash(635); + (**l_596) = (void*)0; + step_hash(636); + (*g_61) = (*l_848); + } + step_hash(638); + (*l_836) ^= l_889; + } + step_hash(640); + (*l_894) = func_47(((*l_894) == g_41)); + } + } + step_hash(643); + return g_249; +} +static int func_2(unsigned short p_3, short p_4, signed char p_5) +{ + int *l_575 = &g_56; + step_hash(410); + (*g_61) = l_575; + step_hash(411); + return (*l_575); +} +static signed char func_8(unsigned p_9, int p_10, unsigned p_11, unsigned short p_12, unsigned short p_13) +{ + int ***l_560 = &g_82; + int l_565 = 7L; + int *l_566 = &g_249; + step_hash(391); + (*g_62) = ((-5L) > (((l_560 != &g_82) != ((unsigned)((&g_62 != &g_83) <= (((0x9750183FL <= 0x84AF7124L) >= 0xBB52L) > ((((((unsigned short)(p_13 == 0xF8BDCD6BL) * (unsigned short)p_12) ^ p_10) && p_11) | g_85) <= 2L))) + (unsigned)l_565)) < p_11)); + step_hash(392); + (*l_566) &= (**g_61); + step_hash(407); + for (p_10 = 2; (p_10 == 27); p_10 += 7) + { + step_hash(400); + for (g_23 = 0; (g_23 >= 4); ++g_23) + { + unsigned l_571 = 0xBD989012L; + step_hash(399); + l_571 &= 0xBE916A31L; + } + step_hash(406); + for (g_41 = (-12); (g_41 != (-16)); g_41 -= 3) + { + step_hash(404); + (*l_566) |= 1L; + step_hash(405); + return p_13; + } + } + step_hash(408); + return p_12; +} +static signed char func_24(unsigned p_25) +{ + int *l_559 = &g_85; + step_hash(387); + (*g_61) = l_559; + step_hash(388); + (*g_82) = (*g_61); + step_hash(389); + return p_25; +} +static short func_28(signed char p_29) +{ + int ***l_370 = (void*)0; + unsigned char l_393 = 255UL; + int **l_431 = &g_83; + unsigned char l_518 = 0x57L; + int ***l_557 = (void*)0; + int ***l_558 = &l_431; + step_hash(382); + if (p_29) + { + int *l_40 = &g_41; + step_hash(3); + (*l_40) = 1L; + } + else + { + int ***l_369 = &g_82; + unsigned char l_375 = 0x66L; + short l_384 = 4L; + int *l_426 = &g_56; + unsigned l_513 = 4294967286UL; + step_hash(381); + if (((func_42(p_29) <= (l_369 != l_370)) > g_23)) + { + int *l_371 = &g_56; + unsigned char l_404 = 1UL; + unsigned char l_413 = 0xFCL; + int ***l_419 = (void*)0; + step_hash(267); + (*l_371) = p_29; + step_hash(274); + if (p_29) + { + int *l_372 = &g_41; + step_hash(269); + l_372 = l_372; + } + else + { + step_hash(271); + (*l_371) = ((signed char)l_375 << (signed char)g_56); + step_hash(272); + (*l_371) = (((unsigned short)0x9792L / (unsigned short)((short)((unsigned char)((unsigned short)(*l_371) << (unsigned short)g_249) << (unsigned char)6) - (short)(p_29 && l_384))) ^ ((signed char)g_85 - (signed char)((signed char)7L * (signed char)g_23))); + step_hash(273); + (*g_82) = l_371; + } + step_hash(275); + (*l_371) = p_29; + step_hash(317); + if ((*l_371)) + { + unsigned char l_394 = 0xBBL; + int *l_417 = &g_85; + int ***l_418 = (void*)0; + step_hash(286); + for (g_85 = (-9); (g_85 >= (-30)); g_85 -= 1) + { + step_hash(280); + (*l_369) = func_70(p_29); + step_hash(285); + for (g_292 = (-19); (g_292 > 51); g_292++) + { + step_hash(284); + l_394 |= (l_393 != ((*l_371) | p_29)); + } + } + step_hash(294); + if (((((unsigned char)(-(unsigned short)((unsigned short)(((((unsigned)p_29 - (unsigned)(((short)((l_394 & 1L) < l_404) >> (short)func_47(p_29)) <= ((int)((((signed char)((!(-8L)) && (func_47(func_47((*l_371))) < p_29)) << (signed char)g_249) || g_85) || 1UL) + (int)(*l_371)))) | g_56) == 0UL) != (-3L)) + (unsigned short)p_29)) / (unsigned char)0x9DL) || g_292) > l_394)) + { + step_hash(288); + (*g_82) = l_371; + step_hash(289); + (*l_369) = &g_62; + step_hash(290); + return g_85; + } + else + { + int **l_416 = &g_62; + step_hash(292); + (*l_417) = ((int)((unsigned)l_413 + (unsigned)((unsigned short)((*l_371) ^ (!g_249)) * (unsigned short)(-10L))) - (int)g_85); + step_hash(293); + (*l_371) = 0x01EA184CL; + } + step_hash(299); + for (g_41 = 0; (g_41 < (-11)); --g_41) + { + step_hash(298); + (*l_426) = ((unsigned short)((signed char)((void*)0 != l_426) << (signed char)(p_29 ^ l_393)) << (unsigned short)11); + } + } + else + { + unsigned char l_452 = 0UL; + int *l_453 = &g_85; + unsigned l_464 = 0xAA4A6445L; + step_hash(306); + for (g_292 = (-29); (g_292 == 33); ++g_292) + { + int l_440 = 0xC09D12EAL; + int **l_451 = &g_83; + step_hash(304); + l_452 |= ((&g_62 != l_431) >= (((unsigned short)(((((short)((int)(((unsigned char)g_56 * (unsigned char)l_440) & g_249) / (int)((signed char)((signed char)((unsigned short)((short)g_292 << (short)9) * (unsigned short)((int)((void*)0 != l_451) + (int)(p_29 ^ 0x800EBDDEL))) - (signed char)p_29) * (signed char)1UL)) * (short)0xF012L) < g_56) ^ p_29) | 4294967295UL) >> (unsigned short)14) > 1UL)); + step_hash(305); + (*l_451) = l_453; + } + step_hash(316); + for (g_249 = 4; (g_249 < 22); g_249 += 2) + { + int *l_468 = &g_56; + step_hash(314); + if ((g_41 > (func_47(p_29) == ((((short)((unsigned short)0x6E4FL * (unsigned short)(((unsigned)g_85 - (unsigned)(l_464 <= p_29)) && 0L)) << (short)(*l_453)) || g_41) < p_29)))) + { + step_hash(311); + (*l_453) = ((int)(*l_371) % (int)g_56); + } + else + { + signed char l_467 = 0x3AL; + step_hash(313); + (*l_426) = l_467; + } + step_hash(315); + (**l_369) = l_468; + } + } + } + else + { + unsigned char l_473 = 0xA2L; + int *l_476 = &g_249; + unsigned char l_477 = 7UL; + int *l_478 = (void*)0; + int ***l_498 = &g_82; + int l_503 = 0xC781FFB4L; + int l_509 = 7L; + int **l_510 = &l_426; + int l_532 = (-1L); + int *l_554 = &g_41; + step_hash(319); + (*l_476) |= ((int)(((((&g_62 != (void*)0) > g_23) || l_473) | (0x03L == ((unsigned)(*l_426) * (unsigned)((&g_62 == (void*)0) <= (*l_426))))) <= g_41) % (int)0x790F0472L); + step_hash(326); + if (p_29) + { + step_hash(321); + (*l_476) &= ((0x864FAA03L >= 0x2BE1988FL) || 0x8D945039L); + step_hash(322); + (*g_61) = l_478; + step_hash(323); + (*l_476) |= p_29; + } + else + { + step_hash(325); + return p_29; + } + step_hash(380); + if ((!p_29)) + { + unsigned short l_491 = 65526UL; + int ***l_499 = &g_61; + unsigned short l_505 = 0x52B8L; + int **l_506 = &l_478; + step_hash(344); + if (((short)((*g_61) != (*g_61)) + (short)(~0x9C31L))) + { + unsigned char l_487 = 0x54L; + int *l_504 = (void*)0; + step_hash(333); + for (p_29 = 0; (p_29 != 9); p_29 += 8) + { + int *l_488 = (void*)0; + int *l_489 = (void*)0; + int *l_490 = &g_41; + step_hash(332); + (*l_490) ^= (0x13A0L && ((signed char)(g_85 | ((unsigned char)((*l_426) >= l_487) * (unsigned char)(((p_29 == p_29) == 0UL) <= g_249))) >> (signed char)4)); + } + step_hash(340); + if (p_29) + { + step_hash(335); + (*l_476) ^= p_29; + step_hash(336); + (**l_499) = (*g_61); + } + else + { + short l_511 = 0x0B17L; + step_hash(338); + (**l_510) |= (func_65(p_29, func_70(((0x7607ED46L == func_65(((unsigned short)(~l_509) - (unsigned short)(p_29 & g_292)), l_510, (*g_61), l_511)) <= g_41)), (*g_61), p_29) <= g_292); + step_hash(339); + (*l_506) = (*l_510); + } + } + else + { + int *l_512 = (void*)0; + step_hash(342); + l_512 = (*l_506); + step_hash(343); + (**l_510) = p_29; + } + step_hash(366); + if ((+(*l_476))) + { + unsigned short l_519 = 0xDEE0L; + int l_520 = 1L; + step_hash(346); + (**l_510) &= l_513; + step_hash(347); + (*l_476) ^= p_29; + step_hash(356); + if ((0x35289A4EL && (*l_476))) + { + unsigned l_514 = 0x3E8D4C09L; + int **l_515 = &l_478; + int l_521 = 0x64E5E474L; + step_hash(349); + l_520 = (l_514 == ((&g_83 == l_515) != (((func_47((0x0BEA343EL <= ((((&g_82 != &l_506) > (l_518 <= (p_29 >= g_85))) ^ 0x1050L) & 0x701A0D4FL))) != l_519) <= (*l_476)) >= (-3L)))); + step_hash(350); + l_521 = g_292; + step_hash(351); + g_533 |= (((((short)(0x54458521L & g_249) - (short)((*l_426) || ((unsigned)((unsigned char)(g_85 >= ((p_29 < g_56) && (~p_29))) >> (unsigned char)g_41) / (unsigned)p_29))) || p_29) > p_29) ^ l_532); + } + else + { + step_hash(353); + (*l_426) ^= p_29; + step_hash(354); + (*l_426) |= ((unsigned short)(g_533 <= (((unsigned char)((signed char)(p_29 || ((unsigned char)((unsigned short)((p_29 ^ (func_47(p_29) != 0x31C8532FL)) ^ 0L) % (unsigned short)(((unsigned char)0xE9L << (unsigned char)(((signed char)g_41 >> (signed char)g_41) >= 0x91L)) ^ 0xE6533EEAL)) / (unsigned char)0x77L)) / (signed char)0x83L) >> (unsigned char)2) >= 0xAB29B716L)) << (unsigned short)7); + step_hash(355); + (*g_82) = (void*)0; + } + } + else + { + int *l_551 = (void*)0; + step_hash(365); + for (l_532 = 18; (l_532 < 26); l_532 += 5) + { + int *l_550 = &g_41; + step_hash(361); + (*l_476) = (*l_426); + step_hash(362); + l_550 = (void*)0; + step_hash(363); + (*l_506) = l_551; + step_hash(364); + return p_29; + } + } + } + else + { + step_hash(379); + for (l_518 = 0; (l_518 <= 14); l_518 += 7) + { + step_hash(371); + (**l_369) = (*g_61); + step_hash(372); + (**l_498) = l_554; + step_hash(378); + for (g_249 = 0; (g_249 >= (-20)); g_249 -= 1) + { + step_hash(376); + if (p_29) + break; + step_hash(377); + (***l_498) &= ((-8L) >= (p_29 <= (*l_426))); + } + } + } + } + } + step_hash(383); + (*l_558) = func_70((7L || g_292)); + step_hash(384); + (*l_431) = &g_85; + step_hash(385); + return p_29; +} +static short func_42(unsigned p_43) +{ + int *l_46 = &g_41; + int *l_55 = &g_56; + signed char l_311 = 0xF8L; + int *l_338 = &g_56; + step_hash(9); + (*l_55) |= (((((signed char)p_43 - (signed char)p_43) && ((((void*)0 == l_46) == func_47((*l_46))) != ((unsigned char)((unsigned char)0x20L + (unsigned char)((&l_46 == (void*)0) && 4UL)) >> (unsigned char)g_23))) ^ g_41) > p_43); + step_hash(263); + if (g_56) + { + int *l_302 = &g_85; + int **l_317 = &l_46; + int l_323 = (-4L); + int l_341 = 0x2BC84132L; + step_hash(213); + (*l_46) = (func_57(g_23, (*l_46), g_61) == func_47(g_292)); + step_hash(214); + (*g_61) = l_302; + step_hash(254); + if (((unsigned char)((signed char)(((unsigned char)((short)g_85 * (short)(func_47((**g_82)) && g_85)) / (unsigned char)1UL) < (*l_55)) * (signed char)g_23) << (unsigned char)(*l_302))) + { + step_hash(220); + for (g_56 = 0; (g_56 <= 29); g_56 += 5) + { + step_hash(219); + (*g_82) = (*g_82); + } + } + else + { + unsigned l_331 = 4294967288UL; + unsigned l_332 = 0x0A378391L; + int l_335 = 0xB1705E1AL; + int **l_357 = (void*)0; + step_hash(253); + for (g_56 = (-26); (g_56 <= (-20)); g_56++) + { + int ***l_316 = (void*)0; + int l_330 = 0x0F2C8688L; + step_hash(225); + l_317 = func_70(p_43); + step_hash(238); + if (func_65(p_43, &l_302, l_46, g_249)) + { + int **l_322 = &l_46; + int *l_326 = (void*)0; + int *l_327 = &g_249; + step_hash(227); + (*l_327) ^= ((unsigned short)(((((unsigned short)func_65(((*g_82) != l_46), l_322, (*g_82), (((**l_322) || ((+(((func_47(l_323) == 1L) != ((short)(*l_46) * (short)(-1L))) == g_41)) != p_43)) && (**l_322))) * (unsigned short)g_23) <= (*l_302)) > (*l_302)) || 2L) / (unsigned short)0x9F01L); + step_hash(228); + l_335 = ((unsigned short)((l_330 > ((~(g_85 | p_43)) >= l_331)) | l_332) - (unsigned short)(((void*)0 == &g_61) != ((signed char)(*l_302) * (signed char)(func_47((*g_62)) > g_56)))); + step_hash(229); + (*g_82) = l_55; + } + else + { + step_hash(235); + for (g_292 = 0; (g_292 <= 1); g_292 += 2) + { + step_hash(234); + (**g_61) = (1L != func_47((**g_82))); + } + step_hash(236); + (**g_82) |= l_331; + step_hash(237); + (*g_61) = &l_335; + } + step_hash(252); + if (((l_338 != &l_335) && (((unsigned short)((l_341 == ((*l_302) < (-1L))) || g_56) % (unsigned short)(-6L)) == ((short)func_47((+p_43)) >> (short)g_85)))) + { + step_hash(240); + (*l_46) = (g_292 < (&g_83 != (void*)0)); + } + else + { + int *l_344 = &l_323; + step_hash(242); + (*l_317) = l_344; + step_hash(249); + if ((**g_82)) + { + step_hash(244); + (*g_62) |= ((unsigned short)(((((short)((short)((short)g_23 >> (short)((unsigned short)((&g_62 == &l_344) == (p_43 >= ((p_43 ^ ((signed char)p_43 << (signed char)func_47((*g_83)))) > ((void*)0 != l_357)))) << (unsigned short)p_43)) * (short)0L) << (short)g_41) & (**l_317)) >= g_23) != 4294967292UL) >> (unsigned short)(*l_344)); + } + else + { + int *l_364 = &g_56; + step_hash(246); + (*l_317) = (*l_317); + step_hash(247); + (*g_82) = l_46; + step_hash(248); + (*l_344) &= (((unsigned short)0x4A37L - (unsigned short)func_47((255UL & ((unsigned short)((((unsigned char)(p_43 != (0xD21DL & ((((*g_82) != l_364) && (0x6BL && (((short)0x858BL << (short)8) < (*l_302)))) == p_43))) << (unsigned char)1) >= (**g_61)) != 65533UL) << (unsigned short)(*l_364))))) < (*l_55)); + } + step_hash(250); + (**l_317) = ((*l_317) != l_46); + step_hash(251); + l_344 = (void*)0; + } + } + } + } + else + { + step_hash(256); + (*l_55) ^= (*l_46); + step_hash(261); + for (g_249 = (-24); (g_249 <= 21); g_249 += 4) + { + step_hash(260); + (*g_61) = (*g_82); + } + step_hash(262); + return p_43; + } + step_hash(264); + g_41 &= (*l_55); + step_hash(265); + return g_292; +} +static int func_47(int p_48) +{ + int *l_50 = &g_41; + int **l_49 = &l_50; + step_hash(7); + (*l_49) = &p_48; + step_hash(8); + return p_48; +} +static short func_57(unsigned p_58, unsigned short p_59, int ** p_60) +{ + signed char l_271 = (-1L); + int **l_272 = &g_62; + step_hash(199); + if (func_47((**p_60))) + { + step_hash(184); + (*g_62) = (((unsigned short)func_47((**p_60)) + (unsigned short)(7L | func_65((g_41 == ((void*)0 != (*g_61))), func_70(g_23), (*g_61), g_56))) | p_59); + } + else + { + int l_273 = 0x87AE2D5EL; + step_hash(191); + if (func_47((g_56 <= ((signed char)((signed char)(((unsigned short)(0x3143DF59L != ((**p_60) < (p_58 != 0x210DL))) * (unsigned short)((int)(**p_60) - (int)((0xFA0A2640L && func_65(l_271, l_272, (*g_61), l_273)) & g_23))) > 0xD5L) << (signed char)4) << (signed char)5)))) + { + step_hash(187); + (*p_60) = (*l_272); + step_hash(188); + (**g_61) |= 0L; + } + else + { + step_hash(190); + return g_23; + } + step_hash(197); + for (g_41 = (-14); (g_41 > (-26)); g_41 -= 7) + { + int ***l_276 = (void*)0; + int ***l_277 = &g_61; + step_hash(195); + (**p_60) = (*g_62); + step_hash(196); + (*l_277) = &g_62; + } + step_hash(198); + return p_58; + } + step_hash(211); + if ((*g_83)) + { + step_hash(201); + (*l_272) = (*g_61); + } + else + { + step_hash(203); + (*g_82) = (*g_82); + step_hash(208); + for (p_59 = 0; (p_59 > 52); ++p_59) + { + unsigned short l_293 = 65535UL; + step_hash(207); + (**l_272) = ((short)((signed char)((**l_272) < ((signed char)((signed char)(**l_272) << (signed char)3) + (signed char)p_59)) >> (signed char)7) * (short)(((((unsigned char)((unsigned short)((func_65(((-1L) < ((void*)0 != (*p_60))), func_70(g_85), (*p_60), g_292) || 4294967295UL) && 0xE1FB2BD5L) + (unsigned short)g_249) - (unsigned char)(-1L)) && (**l_272)) & l_293) && g_41)); + } + step_hash(209); + (*g_82) = (*l_272); + step_hash(210); + (**g_61) = ((0UL || ((signed char)((p_59 || g_292) && 0x782E8E32L) + (signed char)255UL)) || ((0x99E0L >= ((unsigned)4294967293UL / (unsigned)(p_59 ^ ((unsigned short)((short)((&g_62 != (void*)0) && g_56) / (short)g_85) * (unsigned short)p_59)))) < (**g_61))); + } + step_hash(212); + return g_56; +} +static unsigned short func_65(unsigned short p_66, int ** p_67, int * p_68, unsigned char p_69) +{ + step_hash(181); + (*g_82) = (*p_67); + step_hash(182); + (*g_82) = (*p_67); + step_hash(183); + return p_66; +} +static int ** func_70(unsigned short p_71) +{ + unsigned l_77 = 4294967287UL; + int *l_84 = &g_85; + int l_179 = 0xBAF4236FL; + int *l_233 = &l_179; + int **l_262 = (void*)0; + step_hash(177); + for (p_71 = 6; (p_71 == 29); ++p_71) + { + int l_76 = 8L; + int *l_90 = &g_85; + unsigned l_152 = 0UL; + unsigned char l_153 = 0xA6L; + int *l_174 = &l_76; + unsigned l_201 = 4294967295UL; + } + step_hash(178); + (*l_233) |= ((unsigned short)g_41 + (unsigned short)func_47((l_262 == &l_84))); + step_hash(179); + return &g_83; +} +void csmith_compute_hash(void) +{ + transparent_crc(g_23, "g_23", print_hash_value); + transparent_crc(g_41, "g_41", print_hash_value); + transparent_crc(g_56, "g_56", print_hash_value); + transparent_crc(g_85, "g_85", print_hash_value); + transparent_crc(g_249, "g_249", print_hash_value); + transparent_crc(g_292, "g_292", print_hash_value); + transparent_crc(g_533, "g_533", print_hash_value); + transparent_crc(g_574, "g_574", print_hash_value); + transparent_crc(g_805, "g_805", print_hash_value); + transparent_crc(g_862, "g_862", print_hash_value); +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand0.expect b/src/tests/csmith/rand0.expect new file mode 100644 index 0000000..7f282ca --- /dev/null +++ b/src/tests/csmith/rand0.expect @@ -0,0 +1,396 @@ +...checksum after hashing g_23 : C763A7A6 +...checksum after hashing g_41 : 2573C268 +...checksum after hashing g_56 : 1C1F4506 +...checksum after hashing g_85 : 1399FA5F +...checksum after hashing g_249 : 199AB651 +...checksum after hashing g_292 : DA615DFB +...checksum after hashing g_533 : 85319BC0 +...checksum after hashing g_574 : CCDD86A0 +...checksum after hashing g_805 : F168B401 +...checksum after hashing g_862 : 894049E3 +before stmt(597): checksum = 894049E3 +...checksum after hashing g_23 : C763A7A6 +...checksum after hashing g_41 : 2573C268 +...checksum after hashing g_56 : 1C1F4506 +...checksum after hashing g_85 : 1399FA5F +...checksum after hashing g_249 : 199AB651 +...checksum after hashing g_292 : DA615DFB +...checksum after hashing g_533 : 85319BC0 +...checksum after hashing g_574 : CCDD86A0 +...checksum after hashing g_805 : F168B401 +...checksum after hashing g_862 : 894049E3 +before stmt(382): checksum = 894049E3 +...checksum after hashing g_23 : C763A7A6 +...checksum after hashing g_41 : 2573C268 +...checksum after hashing g_56 : 1C1F4506 +...checksum after hashing g_85 : 1399FA5F +...checksum after hashing g_249 : 199AB651 +...checksum after hashing g_292 : DA615DFB +...checksum after hashing g_533 : 85319BC0 +...checksum after hashing g_574 : CCDD86A0 +...checksum after hashing g_805 : F168B401 +...checksum after hashing g_862 : 894049E3 +before stmt(3): checksum = 894049E3 +...checksum after hashing g_23 : C763A7A6 +...checksum after hashing g_41 : 661FDA32 +...checksum after hashing g_56 : 8C076C89 +...checksum after hashing g_85 : E32B2A40 +...checksum after hashing g_249 : F727FA8E +...checksum after hashing g_292 : CB0F9F1A +...checksum after hashing g_533 : E8179968 +...checksum after hashing g_574 : B75BFDE5 +...checksum after hashing g_805 : AF080CC6 +...checksum after hashing g_862 : 40B927A0 +before stmt(383): checksum = 40B927A0 +...checksum after hashing g_23 : C763A7A6 +...checksum after hashing g_41 : 661FDA32 +...checksum after hashing g_56 : 8C076C89 +...checksum after hashing g_85 : E32B2A40 +...checksum after hashing g_249 : F727FA8E +...checksum after hashing g_292 : CB0F9F1A +...checksum after hashing g_533 : E8179968 +...checksum after hashing g_574 : B75BFDE5 +...checksum after hashing g_805 : AF080CC6 +...checksum after hashing g_862 : 40B927A0 +before stmt(177): checksum = 40B927A0 +...checksum after hashing g_23 : C763A7A6 +...checksum after hashing g_41 : 661FDA32 +...checksum after hashing g_56 : 8C076C89 +...checksum after hashing g_85 : E32B2A40 +...checksum after hashing g_249 : F727FA8E +...checksum after hashing g_292 : CB0F9F1A +...checksum after hashing g_533 : E8179968 +...checksum after hashing g_574 : B75BFDE5 +...checksum after hashing g_805 : AF080CC6 +...checksum after hashing g_862 : 40B927A0 +before stmt(178): checksum = 40B927A0 +...checksum after hashing g_23 : C763A7A6 +...checksum after hashing g_41 : 661FDA32 +...checksum after hashing g_56 : 8C076C89 +...checksum after hashing g_85 : E32B2A40 +...checksum after hashing g_249 : F727FA8E +...checksum after hashing g_292 : CB0F9F1A +...checksum after hashing g_533 : E8179968 +...checksum after hashing g_574 : B75BFDE5 +...checksum after hashing g_805 : AF080CC6 +...checksum after hashing g_862 : 40B927A0 +before stmt(7): checksum = 40B927A0 +...checksum after hashing g_23 : C763A7A6 +...checksum after hashing g_41 : 661FDA32 +...checksum after hashing g_56 : 8C076C89 +...checksum after hashing g_85 : E32B2A40 +...checksum after hashing g_249 : F727FA8E +...checksum after hashing g_292 : CB0F9F1A +...checksum after hashing g_533 : E8179968 +...checksum after hashing g_574 : B75BFDE5 +...checksum after hashing g_805 : AF080CC6 +...checksum after hashing g_862 : 40B927A0 +before stmt(8): checksum = 40B927A0 +...checksum after hashing g_23 : C763A7A6 +...checksum after hashing g_41 : 661FDA32 +...checksum after hashing g_56 : 8C076C89 +...checksum after hashing g_85 : E32B2A40 +...checksum after hashing g_249 : F727FA8E +...checksum after hashing g_292 : CB0F9F1A +...checksum after hashing g_533 : E8179968 +...checksum after hashing g_574 : B75BFDE5 +...checksum after hashing g_805 : AF080CC6 +...checksum after hashing g_862 : 40B927A0 +before stmt(179): checksum = 40B927A0 +...checksum after hashing g_23 : C763A7A6 +...checksum after hashing g_41 : 661FDA32 +...checksum after hashing g_56 : 8C076C89 +...checksum after hashing g_85 : E32B2A40 +...checksum after hashing g_249 : F727FA8E +...checksum after hashing g_292 : CB0F9F1A +...checksum after hashing g_533 : E8179968 +...checksum after hashing g_574 : B75BFDE5 +...checksum after hashing g_805 : AF080CC6 +...checksum after hashing g_862 : 40B927A0 +before stmt(384): checksum = 40B927A0 +...checksum after hashing g_23 : C763A7A6 +...checksum after hashing g_41 : 661FDA32 +...checksum after hashing g_56 : 8C076C89 +...checksum after hashing g_85 : E32B2A40 +...checksum after hashing g_249 : F727FA8E +...checksum after hashing g_292 : CB0F9F1A +...checksum after hashing g_533 : E8179968 +...checksum after hashing g_574 : B75BFDE5 +...checksum after hashing g_805 : AF080CC6 +...checksum after hashing g_862 : 40B927A0 +before stmt(385): checksum = 40B927A0 +...checksum after hashing g_23 : C763A7A6 +...checksum after hashing g_41 : 661FDA32 +...checksum after hashing g_56 : 8C076C89 +...checksum after hashing g_85 : E32B2A40 +...checksum after hashing g_249 : F727FA8E +...checksum after hashing g_292 : CB0F9F1A +...checksum after hashing g_533 : E8179968 +...checksum after hashing g_574 : B75BFDE5 +...checksum after hashing g_805 : AF080CC6 +...checksum after hashing g_862 : 40B927A0 +before stmt(387): checksum = 40B927A0 +...checksum after hashing g_23 : C763A7A6 +...checksum after hashing g_41 : 661FDA32 +...checksum after hashing g_56 : 8C076C89 +...checksum after hashing g_85 : E32B2A40 +...checksum after hashing g_249 : F727FA8E +...checksum after hashing g_292 : CB0F9F1A +...checksum after hashing g_533 : E8179968 +...checksum after hashing g_574 : B75BFDE5 +...checksum after hashing g_805 : AF080CC6 +...checksum after hashing g_862 : 40B927A0 +before stmt(388): checksum = 40B927A0 +...checksum after hashing g_23 : C763A7A6 +...checksum after hashing g_41 : 661FDA32 +...checksum after hashing g_56 : 8C076C89 +...checksum after hashing g_85 : E32B2A40 +...checksum after hashing g_249 : F727FA8E +...checksum after hashing g_292 : CB0F9F1A +...checksum after hashing g_533 : E8179968 +...checksum after hashing g_574 : B75BFDE5 +...checksum after hashing g_805 : AF080CC6 +...checksum after hashing g_862 : 40B927A0 +before stmt(389): checksum = 40B927A0 +...checksum after hashing g_23 : C763A7A6 +...checksum after hashing g_41 : 661FDA32 +...checksum after hashing g_56 : 8C076C89 +...checksum after hashing g_85 : E32B2A40 +...checksum after hashing g_249 : F727FA8E +...checksum after hashing g_292 : CB0F9F1A +...checksum after hashing g_533 : E8179968 +...checksum after hashing g_574 : B75BFDE5 +...checksum after hashing g_805 : AF080CC6 +...checksum after hashing g_862 : 40B927A0 +before stmt(391): checksum = 40B927A0 +...checksum after hashing g_23 : C763A7A6 +...checksum after hashing g_41 : 661FDA32 +...checksum after hashing g_56 : 8C076C89 +...checksum after hashing g_85 : 5B974D25 +...checksum after hashing g_249 : 3B8DFA10 +...checksum after hashing g_292 : 50AAD375 +...checksum after hashing g_533 : 467F08F9 +...checksum after hashing g_574 : D23CC6A3 +...checksum after hashing g_805 : 2E2D69E1 +...checksum after hashing g_862 : 410CDABD +before stmt(392): checksum = 410CDABD +...checksum after hashing g_23 : C763A7A6 +...checksum after hashing g_41 : 661FDA32 +...checksum after hashing g_56 : 8C076C89 +...checksum after hashing g_85 : 5B974D25 +...checksum after hashing g_249 : C530A22 +...checksum after hashing g_292 : 184ADD11 +...checksum after hashing g_533 : DEDC7FE9 +...checksum after hashing g_574 : A8651BB5 +...checksum after hashing g_805 : 5A7B9FE +...checksum after hashing g_862 : A92F21C5 +before stmt(407): checksum = A92F21C5 +...checksum after hashing g_23 : C763A7A6 +...checksum after hashing g_41 : 661FDA32 +...checksum after hashing g_56 : 8C076C89 +...checksum after hashing g_85 : 5B974D25 +...checksum after hashing g_249 : C530A22 +...checksum after hashing g_292 : 184ADD11 +...checksum after hashing g_533 : DEDC7FE9 +...checksum after hashing g_574 : A8651BB5 +...checksum after hashing g_805 : 5A7B9FE +...checksum after hashing g_862 : A92F21C5 +before stmt(408): checksum = A92F21C5 +...checksum after hashing g_23 : C763A7A6 +...checksum after hashing g_41 : 661FDA32 +...checksum after hashing g_56 : 8C076C89 +...checksum after hashing g_85 : 5B974D25 +...checksum after hashing g_249 : C530A22 +...checksum after hashing g_292 : 184ADD11 +...checksum after hashing g_533 : DEDC7FE9 +...checksum after hashing g_574 : A8651BB5 +...checksum after hashing g_805 : 5A7B9FE +...checksum after hashing g_862 : A92F21C5 +before stmt(410): checksum = A92F21C5 +...checksum after hashing g_23 : C763A7A6 +...checksum after hashing g_41 : 661FDA32 +...checksum after hashing g_56 : 8C076C89 +...checksum after hashing g_85 : 5B974D25 +...checksum after hashing g_249 : C530A22 +...checksum after hashing g_292 : 184ADD11 +...checksum after hashing g_533 : DEDC7FE9 +...checksum after hashing g_574 : A8651BB5 +...checksum after hashing g_805 : 5A7B9FE +...checksum after hashing g_862 : A92F21C5 +before stmt(411): checksum = A92F21C5 +...checksum after hashing g_23 : C763A7A6 +...checksum after hashing g_41 : 661FDA32 +...checksum after hashing g_56 : 8C076C89 +...checksum after hashing g_85 : 5B974D25 +...checksum after hashing g_249 : C530A22 +...checksum after hashing g_292 : 184ADD11 +...checksum after hashing g_533 : DEDC7FE9 +...checksum after hashing g_574 : A8651BB5 +...checksum after hashing g_805 : 5A7B9FE +...checksum after hashing g_862 : A92F21C5 +before stmt(493): checksum = A92F21C5 +...checksum after hashing g_23 : C763A7A6 +...checksum after hashing g_41 : 661FDA32 +...checksum after hashing g_56 : 8C076C89 +...checksum after hashing g_85 : 5B974D25 +...checksum after hashing g_249 : C530A22 +...checksum after hashing g_292 : 184ADD11 +...checksum after hashing g_533 : DEDC7FE9 +...checksum after hashing g_574 : A8651BB5 +...checksum after hashing g_805 : 5A7B9FE +...checksum after hashing g_862 : A92F21C5 +before stmt(433): checksum = A92F21C5 +...checksum after hashing g_23 : C763A7A6 +...checksum after hashing g_41 : 661FDA32 +...checksum after hashing g_56 : 8C076C89 +...checksum after hashing g_85 : 5B974D25 +...checksum after hashing g_249 : C530A22 +...checksum after hashing g_292 : 184ADD11 +...checksum after hashing g_533 : DEDC7FE9 +...checksum after hashing g_574 : 99788B03 +...checksum after hashing g_805 : 6E1F7C6E +...checksum after hashing g_862 : 757708AA +before stmt(480): checksum = 757708AA +...checksum after hashing g_23 : C763A7A6 +...checksum after hashing g_41 : 661FDA32 +...checksum after hashing g_56 : 8C076C89 +...checksum after hashing g_85 : 5B974D25 +...checksum after hashing g_249 : C530A22 +...checksum after hashing g_292 : 184ADD11 +...checksum after hashing g_533 : DEDC7FE9 +...checksum after hashing g_574 : 99788B03 +...checksum after hashing g_805 : 6E1F7C6E +...checksum after hashing g_862 : 757708AA +before stmt(455): checksum = 757708AA +...checksum after hashing g_23 : D2EEE7EA +...checksum after hashing g_41 : 24B7B29A +...checksum after hashing g_56 : BC10D1A6 +...checksum after hashing g_85 : 4D1A2B34 +...checksum after hashing g_249 : D255DE1D +...checksum after hashing g_292 : DB3F05F +...checksum after hashing g_533 : 3D213B4B +...checksum after hashing g_574 : 919853A3 +...checksum after hashing g_805 : F04B7A3D +...checksum after hashing g_862 : 6122F247 +before stmt(446): checksum = 6122F247 +...checksum after hashing g_23 : D2EEE7EA +...checksum after hashing g_41 : 24B7B29A +...checksum after hashing g_56 : BC10D1A6 +...checksum after hashing g_85 : 4D1A2B34 +...checksum after hashing g_249 : D255DE1D +...checksum after hashing g_292 : DB3F05F +...checksum after hashing g_533 : 3D213B4B +...checksum after hashing g_574 : 919853A3 +...checksum after hashing g_805 : F04B7A3D +...checksum after hashing g_862 : 6122F247 +before stmt(442): checksum = 6122F247 +...checksum after hashing g_23 : D2EEE7EA +...checksum after hashing g_41 : 24B7B29A +...checksum after hashing g_56 : 1A584F69 +...checksum after hashing g_85 : 93AC834E +...checksum after hashing g_249 : D24864D0 +...checksum after hashing g_292 : BE31D15E +...checksum after hashing g_533 : E7CF6806 +...checksum after hashing g_574 : 30E7A602 +...checksum after hashing g_805 : BFE54321 +...checksum after hashing g_862 : 86B00919 +before stmt(443): checksum = 86B00919 +...checksum after hashing g_23 : D2EEE7EA +...checksum after hashing g_41 : 24B7B29A +...checksum after hashing g_56 : 1A584F69 +...checksum after hashing g_85 : 93AC834E +...checksum after hashing g_249 : D24864D0 +...checksum after hashing g_292 : BE31D15E +...checksum after hashing g_533 : E7CF6806 +...checksum after hashing g_574 : 30E7A602 +...checksum after hashing g_805 : BFE54321 +...checksum after hashing g_862 : 86B00919 +before stmt(444): checksum = 86B00919 +...checksum after hashing g_23 : D2EEE7EA +...checksum after hashing g_41 : 24B7B29A +...checksum after hashing g_56 : 1A584F69 +...checksum after hashing g_85 : 93AC834E +...checksum after hashing g_249 : 6AF403B5 +...checksum after hashing g_292 : 729BD1C0 +...checksum after hashing g_533 : 7C6A2469 +...checksum after hashing g_574 : 9E8F3793 +...checksum after hashing g_805 : DA827867 +...checksum after hashing g_862 : 7956C3E +before stmt(445): checksum = 7956C3E +...checksum after hashing g_23 : D2EEE7EA +...checksum after hashing g_41 : 24B7B29A +...checksum after hashing g_56 : 1A584F69 +...checksum after hashing g_85 : 93AC834E +...checksum after hashing g_249 : 6AF403B5 +...checksum after hashing g_292 : 729BD1C0 +...checksum after hashing g_533 : 7C6A2469 +...checksum after hashing g_574 : 9E8F3793 +...checksum after hashing g_805 : DA827867 +...checksum after hashing g_862 : 7956C3E +before stmt(7): checksum = 7956C3E +...checksum after hashing g_23 : D2EEE7EA +...checksum after hashing g_41 : 24B7B29A +...checksum after hashing g_56 : 1A584F69 +...checksum after hashing g_85 : 93AC834E +...checksum after hashing g_249 : 6AF403B5 +...checksum after hashing g_292 : 729BD1C0 +...checksum after hashing g_533 : 7C6A2469 +...checksum after hashing g_574 : 9E8F3793 +...checksum after hashing g_805 : DA827867 +...checksum after hashing g_862 : 7956C3E +before stmt(8): checksum = 7956C3E +...checksum after hashing g_23 : D2EEE7EA +...checksum after hashing g_41 : 24B7B29A +...checksum after hashing g_56 : 1A584F69 +...checksum after hashing g_85 : 93AC834E +...checksum after hashing g_249 : 6AF403B5 +...checksum after hashing g_292 : 729BD1C0 +...checksum after hashing g_533 : 7C6A2469 +...checksum after hashing g_574 : 9E8F3793 +...checksum after hashing g_805 : DA827867 +...checksum after hashing g_862 : 7956C3E +before stmt(454): checksum = 7956C3E +...checksum after hashing g_23 : D2EEE7EA +...checksum after hashing g_41 : 24B7B29A +...checksum after hashing g_56 : 1A584F69 +...checksum after hashing g_85 : 93AC834E +...checksum after hashing g_249 : 6AF403B5 +...checksum after hashing g_292 : 729BD1C0 +...checksum after hashing g_533 : 7C6A2469 +...checksum after hashing g_574 : 9E8F3793 +...checksum after hashing g_805 : DA827867 +...checksum after hashing g_862 : 7956C3E +before stmt(448): checksum = 7956C3E +...checksum after hashing g_23 : D2EEE7EA +...checksum after hashing g_41 : 24B7B29A +...checksum after hashing g_56 : 1A584F69 +...checksum after hashing g_85 : 93AC834E +...checksum after hashing g_249 : 6AF403B5 +...checksum after hashing g_292 : 729BD1C0 +...checksum after hashing g_533 : 7C6A2469 +...checksum after hashing g_574 : 9E8F3793 +...checksum after hashing g_805 : DA827867 +...checksum after hashing g_862 : 7956C3E +before stmt(449): checksum = 7956C3E +...checksum after hashing g_23 : D2EEE7EA +...checksum after hashing g_41 : 24B7B29A +...checksum after hashing g_56 : 1A584F69 +...checksum after hashing g_85 : 93AC834E +...checksum after hashing g_249 : 6AF403B5 +...checksum after hashing g_292 : 729BD1C0 +...checksum after hashing g_533 : 7C6A2469 +...checksum after hashing g_574 : 9E8F3793 +...checksum after hashing g_805 : DA827867 +...checksum after hashing g_862 : 7956C3E +before stmt(450): checksum = 7956C3E +...checksum after hashing g_23 : D2EEE7EA +...checksum after hashing g_41 : 24B7B29A +...checksum after hashing g_56 : 1A584F69 +...checksum after hashing g_85 : 93AC834E +...checksum after hashing g_249 : 6AF403B5 +...checksum after hashing g_292 : 729BD1C0 +...checksum after hashing g_533 : 7C6A2469 +...checksum after hashing g_574 : 9E8F3793 +...checksum after hashing g_805 : DA827867 +...checksum after hashing g_862 : 7956C3E +checksum = 7956c3e diff --git a/src/tests/csmith/rand1.c b/src/tests/csmith/rand1.c new file mode 100644 index 0000000..e7b1855 --- /dev/null +++ b/src/tests/csmith/rand1.c @@ -0,0 +1,103 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static int g_2 = 0x5C68EC0AL; +static int g_7 = 0x6E5C7A00L; +static unsigned func_1(void); +static unsigned func_1(void) +{ + unsigned short l_8 = 65527UL; + int *l_9 = (void*)0; + step_hash(6); + for (g_2 = 0; (g_2 != 3); g_2++) + { + int *l_6 = (void*)0; + step_hash(4); + g_7 = (-(short)0x6CCEL); + step_hash(5); + return l_8; + } + step_hash(7); + l_9 = &g_2; + step_hash(8); + return g_2; +} +void csmith_compute_hash(void) +{ + transparent_crc(g_2, "g_2", print_hash_value); + transparent_crc(g_7, "g_7", print_hash_value); +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand1.expect b/src/tests/csmith/rand1.expect new file mode 100644 index 0000000..c0fa882 --- /dev/null +++ b/src/tests/csmith/rand1.expect @@ -0,0 +1,12 @@ +...checksum after hashing g_2 : 21F8EACC +...checksum after hashing g_7 : CCC413BE +before stmt(6): checksum = CCC413BE +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_7 : 80406CE8 +before stmt(4): checksum = 80406CE8 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_7 : 7E73FB15 +before stmt(5): checksum = 7E73FB15 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_7 : 7E73FB15 +checksum = 7e73fb15 diff --git a/src/tests/csmith/rand10.c b/src/tests/csmith/rand10.c new file mode 100644 index 0000000..d1eccc3 --- /dev/null +++ b/src/tests/csmith/rand10.c @@ -0,0 +1,92 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static int g_6 = (-9L); +static int func_1(void); +static int func_1(void) +{ + int l_4 = 0L; + int *l_5 = &g_6; + step_hash(1); + (*l_5) = ((unsigned short)0x0BCDL + (unsigned short)(0L < l_4)); + step_hash(2); + return g_6; +} +void csmith_compute_hash(void) +{ + transparent_crc(g_6, "g_6", print_hash_value); +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand10.expect b/src/tests/csmith/rand10.expect new file mode 100644 index 0000000..4002900 --- /dev/null +++ b/src/tests/csmith/rand10.expect @@ -0,0 +1,6 @@ +...checksum after hashing g_6 : 3A4BD710 +before stmt(1): checksum = 3A4BD710 +...checksum after hashing g_6 : A9360626 +before stmt(2): checksum = A9360626 +...checksum after hashing g_6 : A9360626 +checksum = a9360626 diff --git a/src/tests/csmith/rand100.c b/src/tests/csmith/rand100.c new file mode 100644 index 0000000..921bd90 --- /dev/null +++ b/src/tests/csmith/rand100.c @@ -0,0 +1,87 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static unsigned func_1(void); +static unsigned func_1(void) +{ + int l_2 = 0L; + step_hash(1); + return l_2; +} +void csmith_compute_hash(void) +{ +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand100.expect b/src/tests/csmith/rand100.expect new file mode 100644 index 0000000..0b4e62a --- /dev/null +++ b/src/tests/csmith/rand100.expect @@ -0,0 +1,2 @@ +before stmt(1): checksum = 0 +checksum = 0 diff --git a/src/tests/csmith/rand101.c b/src/tests/csmith/rand101.c new file mode 100644 index 0000000..9a08b43 --- /dev/null +++ b/src/tests/csmith/rand101.c @@ -0,0 +1,964 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static int g_2[1] = {0x97F6AF11L}; +static int g_7 = 0x12491E29L; +static int *g_64 = &g_7; +static int **g_63 = &g_64; +static signed char g_77 = 0xD6L; +static unsigned g_78 = 2UL; +static int g_82 = 1L; +static unsigned g_83 = 0x328171C6L; +static unsigned g_121 = 4294967295UL; +static unsigned g_162 = 0x363A23D7L; +static signed char g_232 = (-10L); +static unsigned g_234 = 6UL; +static int g_237 = 0xABEF08A7L; +static unsigned short g_238 = 1UL; +static unsigned g_250 = 0xD3086A74L; +static unsigned g_269 = 4294967295UL; +static unsigned g_274 = 0x8970AAFFL; +static short g_289[7] = {1L, 1L, 0L, 1L, 1L, 0L, 1L}; +static unsigned char g_293 = 0x28L; +static short g_315 = 0xF8D8L; +static unsigned char g_369 = 1UL; +static unsigned short g_375 = 0UL; +static int g_378 = 0L; +static unsigned short g_379 = 65535UL; +static int g_386[8] = {5L, 0x05298B28L, 5L, 0x05298B28L, 5L, 0x05298B28L, 5L, 0x05298B28L}; +static unsigned g_387[8][4] = {{0x4127F8BDL, 0x4127F8BDL, 0x4127F8BDL, 0x4127F8BDL}, {0x4127F8BDL, 0x4127F8BDL, 0x4127F8BDL, 0x4127F8BDL}, {0x4127F8BDL, 0x4127F8BDL, 0x4127F8BDL, 0x4127F8BDL}, {0x4127F8BDL, 0x4127F8BDL, 0x4127F8BDL, 0x4127F8BDL}, {0x4127F8BDL, 0x4127F8BDL, 0x4127F8BDL, 0x4127F8BDL}, {0x4127F8BDL, 0x4127F8BDL, 0x4127F8BDL, 0x4127F8BDL}, {0x4127F8BDL, 0x4127F8BDL, 0x4127F8BDL, 0x4127F8BDL}, {0x4127F8BDL, 0x4127F8BDL, 0x4127F8BDL, 0x4127F8BDL}}; +static int g_401 = 0x3580D728L; +static signed char g_448 = (-1L); +static unsigned g_452[4] = {0UL, 4294967289UL, 0UL, 4294967289UL}; +static short g_498[9][10] = {{(-4L), (-1L), 0x592FL, 1L, 0x04E0L, (-6L), 0x548BL, 5L, (-1L), (-1L)}, {(-4L), (-1L), 0x592FL, 1L, 0x04E0L, (-6L), 0x548BL, 5L, (-1L), (-1L)}, {(-4L), (-1L), 0x592FL, 1L, 0x04E0L, (-6L), 0x548BL, 5L, (-1L), (-1L)}, {(-4L), (-1L), 0x592FL, 1L, 0x04E0L, (-6L), 0x548BL, 5L, (-1L), (-1L)}, {(-4L), (-1L), 0x592FL, 1L, 0x04E0L, (-6L), 0x548BL, 5L, (-1L), (-1L)}, {(-4L), (-1L), 0x592FL, 1L, 0x04E0L, (-6L), 0x548BL, 5L, (-1L), (-1L)}, {(-4L), (-1L), 0x592FL, 1L, 0x04E0L, (-6L), 0x548BL, 5L, (-1L), (-1L)}, {(-4L), (-1L), 0x592FL, 1L, 0x04E0L, (-6L), 0x548BL, 5L, (-1L), (-1L)}, {(-4L), (-1L), 0x592FL, 1L, 0x04E0L, (-6L), 0x548BL, 5L, (-1L), (-1L)}}; +static int g_499 = 0xF89BA971L; +static unsigned short g_500 = 0x398AL; +static int *g_518 = (void*)0; +static int **g_517[5] = {(void*)0, &g_518, (void*)0, &g_518, (void*)0}; +static int ***g_516 = &g_517[3]; +static int g_520 = 0x2BF3D018L; +static unsigned short func_1(void); +static short func_14(unsigned short p_15); +static unsigned char func_19(short p_20, signed char p_21, unsigned char p_22); +static int * func_25(int p_26, unsigned short p_27); +static unsigned short func_38(int p_39, unsigned p_40, int * p_41); +static unsigned short func_43(int * p_44, unsigned char p_45, unsigned char p_46, int * p_47, int * p_48); +static int * func_49(unsigned char p_50, unsigned p_51, int * p_52, int * p_53); +static unsigned func_70(int * p_71); +static unsigned short func_88(int * p_89, short p_90, unsigned short p_91); +static int * func_92(unsigned p_93, unsigned short p_94, int p_95, int *** p_96, int ** p_97); +static unsigned short func_1(void) +{ + signed char l_5 = 0xDDL; + step_hash(284); + for (g_2[0] = 3; (g_2[0] < 2); --g_2[0]) + { + int *l_6 = &g_7; + int *l_519 = &g_520; + step_hash(4); + (*l_6) = (l_5 < l_5); + step_hash(5); + g_7 = 0x49C9FB37L; + step_hash(283); + (*l_519) |= (g_2[0] >= (((((l_5 && (&g_7 != &g_7)) < ((short)((short)(((short)func_14(((void*)0 != l_6)) + (short)(((signed char)(((void*)0 != g_516) < (-4L)) + (signed char)g_2[0]) ^ g_448)) || l_5) >> (short)l_5) + (short)1L)) || g_500) & g_386[2]) == g_386[6])); + } + step_hash(285); + return l_5; +} +static short func_14(unsigned short p_15) +{ + unsigned l_16[6][2] = {{4294967287UL, 4294967287UL}, {4294967287UL, 4294967287UL}, {4294967287UL, 4294967287UL}, {4294967287UL, 4294967287UL}, {4294967287UL, 4294967287UL}, {4294967287UL, 4294967287UL}}; + int l_23 = 0xE607D19FL; + int *l_512 = (void*)0; + int *l_513[9][6] = {{(void*)0, &g_2[0], &g_82, &g_82, &g_2[0], (void*)0}, {(void*)0, &g_2[0], &g_82, &g_82, &g_2[0], (void*)0}, {(void*)0, &g_2[0], &g_82, &g_82, &g_2[0], (void*)0}, {(void*)0, &g_2[0], &g_82, &g_82, &g_2[0], (void*)0}, {(void*)0, &g_2[0], &g_82, &g_82, &g_2[0], (void*)0}, {(void*)0, &g_2[0], &g_82, &g_82, &g_2[0], (void*)0}, {(void*)0, &g_2[0], &g_82, &g_82, &g_2[0], (void*)0}, {(void*)0, &g_2[0], &g_82, &g_82, &g_2[0], (void*)0}, {(void*)0, &g_2[0], &g_82, &g_82, &g_2[0], (void*)0}}; + int i, j; + step_hash(7); + for (g_7 = 0; g_7 < 6; g_7 += 1) + { + for (p_15 = 0; p_15 < 2; p_15 += 1) + { + l_16[g_7][p_15] = 0x8D8EF068L; + } + } + step_hash(280); + l_23 = ((unsigned char)func_19(l_23, g_2[0], l_23) << (unsigned char)g_499); + step_hash(281); + g_7 ^= ((short)(p_15 < (((unsigned short)l_23 - (unsigned short)(g_2[0] || g_448)) > (p_15 && p_15))) * (short)(p_15 >= ((int)((p_15 >= (((short)((l_16[1][1] ^ 4294967295UL) == p_15) + (short)l_23) == l_16[4][0])) < (-4L)) / (int)g_379))); + step_hash(282); + return g_121; +} +static unsigned char func_19(short p_20, signed char p_21, unsigned char p_22) +{ + int *l_24 = &g_7; + int *l_28 = &g_7; + int **l_503 = &g_64; + step_hash(9); + (*l_24) |= (8UL == (p_22 >= 0xFBFCC013L)); + step_hash(278); + (*l_503) = func_25((l_28 == l_24), p_21); + step_hash(279); + return p_22; +} +static int * func_25(int p_26, unsigned short p_27) +{ + short l_35 = 9L; + int *l_42[2]; + signed char l_65 = 0L; + int *l_106[2]; + unsigned char l_167 = 9UL; + int ***l_183[9] = {&g_63, &g_63, &g_63, &g_63, &g_63, &g_63, &g_63, &g_63, &g_63}; + unsigned short l_196 = 0x9717L; + int *l_199 = (void*)0; + int **l_203 = &g_64; + int ***l_202 = &l_203; + unsigned l_204 = 4294967295UL; + unsigned short l_241[6]; + unsigned short l_287 = 65532UL; + int l_348 = 8L; + int **l_382 = &l_106[1]; + unsigned char l_425 = 0x29L; + int *l_491 = &g_2[0]; + int i; + for (i = 0; i < 2; i++) + l_42[i] = &g_2[0]; + for (i = 0; i < 2; i++) + l_106[i] = &g_2[0]; + for (i = 0; i < 6; i++) + l_241[i] = 0xCC2EL; + step_hash(223); + if (((signed char)0x9EL >> (signed char)((unsigned short)((((signed char)1L / (signed char)(65535UL | l_35)) || ((unsigned short)(&g_2[0] != (void*)0) * (unsigned short)func_38((((void*)0 != l_42[0]) != func_43(func_49(((int)((short)((unsigned char)p_26 / (unsigned char)g_2[0]) * (short)p_27) + (int)g_2[0]), p_26, l_42[0], l_42[0]), g_7, l_65, l_42[0], l_42[1])), g_77, l_106[1]))) ^ p_27) << (unsigned short)p_26))) + { + int *l_152[9] = {&g_2[0], &g_7, &g_2[0], &g_7, &g_2[0], &g_7, &g_2[0], &g_7, &g_2[0]}; + unsigned l_184 = 0xE0279960L; + int l_197 = (-10L); + int ***l_198[2][2]; + int i, j; + for (i = 0; i < 2; i++) + { + for (j = 0; j < 2; j++) + l_198[i][j] = &g_63; + } + step_hash(103); + for (g_121 = 0; (g_121 <= 1); g_121 += 1) + { + int l_158 = 0xCA579871L; + int ***l_188 = &g_63; + int ***l_209[3][4] = {{&l_203, &l_203, (void*)0, &l_203}, {&l_203, &l_203, (void*)0, &l_203}, {&l_203, &l_203, (void*)0, &l_203}}; + int l_216 = 0x0D2993C0L; + int i, j; + step_hash(57); + g_82 |= (-4L); + step_hash(100); + for (p_27 = 0; (p_27 <= 1); p_27 += 1) + { + unsigned l_151[9][8] = {{0x39DC62CBL, 1UL, 0xE9327043L, 9UL, 9UL, 0xE9327043L, 1UL, 0x39DC62CBL}, {0x39DC62CBL, 1UL, 0xE9327043L, 9UL, 9UL, 0xE9327043L, 1UL, 0x39DC62CBL}, {0x39DC62CBL, 1UL, 0xE9327043L, 9UL, 9UL, 0xE9327043L, 1UL, 0x39DC62CBL}, {0x39DC62CBL, 1UL, 0xE9327043L, 9UL, 9UL, 0xE9327043L, 1UL, 0x39DC62CBL}, {0x39DC62CBL, 1UL, 0xE9327043L, 9UL, 9UL, 0xE9327043L, 1UL, 0x39DC62CBL}, {0x39DC62CBL, 1UL, 0xE9327043L, 9UL, 9UL, 0xE9327043L, 1UL, 0x39DC62CBL}, {0x39DC62CBL, 1UL, 0xE9327043L, 9UL, 9UL, 0xE9327043L, 1UL, 0x39DC62CBL}, {0x39DC62CBL, 1UL, 0xE9327043L, 9UL, 9UL, 0xE9327043L, 1UL, 0x39DC62CBL}, {0x39DC62CBL, 1UL, 0xE9327043L, 9UL, 9UL, 0xE9327043L, 1UL, 0x39DC62CBL}}; + int l_157 = 0x31699C01L; + int l_160[3]; + signed char l_201 = 0xD0L; + int ***l_227[10][5] = {{&g_63, &g_63, &g_63, &l_203, &g_63}, {&g_63, &g_63, &g_63, &l_203, &g_63}, {&g_63, &g_63, &g_63, &l_203, &g_63}, {&g_63, &g_63, &g_63, &l_203, &g_63}, {&g_63, &g_63, &g_63, &l_203, &g_63}, {&g_63, &g_63, &g_63, &l_203, &g_63}, {&g_63, &g_63, &g_63, &l_203, &g_63}, {&g_63, &g_63, &g_63, &l_203, &g_63}, {&g_63, &g_63, &g_63, &l_203, &g_63}, {&g_63, &g_63, &g_63, &l_203, &g_63}}; + int i, j; + for (i = 0; i < 3; i++) + l_160[i] = 0x758F72B2L; + step_hash(61); + g_82 &= ((unsigned)((unsigned char)(0xDBL >= g_78) + (unsigned char)(((l_151[5][7] && (g_2[0] < (l_106[p_27] == l_152[2]))) == (((unsigned short)((unsigned char)g_78 + (unsigned char)p_27) >> (unsigned short)14) & p_26)) <= g_2[0])) - (unsigned)l_157); + step_hash(91); + if ((g_78 && p_27)) + { + int l_159 = 1L; + int l_161 = 0L; + int *l_170 = &l_160[1]; + int **l_171 = &l_170; + step_hash(63); + --g_162; + step_hash(64); + (*l_171) = func_49((((signed char)0xF4L % (signed char)g_7) & (!l_167)), p_27, func_49(l_159, ((!((unsigned short)(func_88(l_170, (*l_170), p_27) <= (*l_170)) * (unsigned short)g_121)) > 249UL), l_170, l_42[0]), &l_160[0]); + step_hash(65); + (*l_170) = (-1L); + step_hash(74); + if ((p_26 >= (func_88(&l_160[1], (*l_170), g_2[0]) != func_88(&g_7, g_77, g_162)))) + { + step_hash(67); + (**l_171) &= 0x44FC8F34L; + step_hash(68); + if (p_26) + break; + } + else + { + short l_176 = 0x2F43L; + int l_185 = 0x42C4FA89L; + int ***l_191 = &g_63; + step_hash(70); + l_176 = ((unsigned char)0x54L - (unsigned char)((unsigned short)p_26 << (unsigned short)9)); + step_hash(71); + l_185 &= ((unsigned)func_43(func_49((((((p_27 && (l_176 >= 0x482281F5L)) == 0x0C0EL) >= (&g_82 == (void*)0)) < ((((int)((&l_42[g_121] != (void*)0) < ((void*)0 == l_183[4])) + (int)p_26) != l_184) ^ l_176)) >= g_78), l_176, &l_160[1], (*l_171)), g_162, (**l_171), &g_2[0], &g_2[0]) - (unsigned)0UL); + step_hash(72); + g_82 &= (p_27 ^ ((unsigned)g_7 + (unsigned)(l_183[6] == l_188))); + step_hash(73); + l_197 |= (((int)((l_191 != &l_171) > (!(((((p_27 | g_7) | 0L) | p_26) <= (1L > ((short)p_27 << (short)((((unsigned short)(((void*)0 != (*l_171)) == 0UL) + (unsigned short)l_196) <= g_77) > 1UL)))) | p_27))) + (int)g_162) ^ 4294967290UL); + } + } + else + { + unsigned short l_229 = 6UL; + int *l_230[3][3] = {{&l_216, &l_216, &l_216}, {&l_216, &l_216, &l_216}, {&l_216, &l_216, &l_216}}; + int i, j; + step_hash(83); + if ((func_43(func_49(p_26, (l_198[0][1] == l_183[8]), &l_158, l_199), (func_70(func_92(g_2[0], (-(signed char)0x63L), (((g_7 || p_26) >= g_77) && l_201), l_202, &g_64)) < 0xCA3EL), l_204, &g_2[0], &g_2[0]) | p_27)) + { + int **l_228 = &l_106[1]; + step_hash(77); + (*l_203) = func_49(((signed char)(((unsigned)(&g_64 == &l_106[p_27]) % (unsigned)(p_27 & 1UL)) || (&g_63 == l_209[2][1])) * (signed char)((unsigned short)(+((p_26 ^ (g_121 & ((unsigned)((unsigned short)p_27 * (unsigned short)(-5L)) + (unsigned)0L))) <= 0xD09CL)) << (unsigned short)p_27)), l_216, &g_82, &g_82); + step_hash(78); + g_82 &= func_88(func_92(p_26, ((unsigned short)(((unsigned short)1UL >> (unsigned short)8) & g_121) << (unsigned short)(((((unsigned short)(g_2[0] >= ((signed char)g_121 / (signed char)p_27)) - (unsigned short)4L) | ((unsigned char)func_70(&g_7) << (unsigned char)p_27)) <= 0xD5EEL) | 255UL)), g_77, l_227[9][1], l_228), g_162, g_121); + step_hash(79); + (*l_228) = &g_2[0]; + step_hash(80); + (*g_64) = l_229; + } + else + { + int *l_231 = &l_197; + step_hash(82); + return &g_82; + } + step_hash(90); + for (l_197 = 5; (l_197 >= 0); l_197 -= 1) + { + int l_233 = (-1L); + step_hash(87); + l_230[2][2] = l_230[2][2]; + step_hash(88); + g_234++; + step_hash(89); + ++g_238; + } + } + step_hash(92); + if (l_241[0]) + break; + step_hash(99); + for (l_65 = 0; (l_65 < 21); l_65 += 1) + { + signed char l_246 = (-9L); + int l_247 = 0xC9AB741BL; + int l_248 = 0x42A48A9BL; + int l_249 = (-8L); + step_hash(96); + g_82 &= ((unsigned short)func_70(func_92(g_78, (4294967295UL | 0x9E74196FL), p_27, l_227[5][0], (*l_188))) * (unsigned short)g_77); + step_hash(97); + --g_250; + step_hash(98); + (*g_64) = (((((unsigned char)((short)func_70((*l_203)) >> (short)12) * (unsigned char)(p_26 & g_77)) & p_26) <= 4UL) && p_27); + } + } + step_hash(101); + g_82 &= (l_198[0][1] != l_209[1][3]); + step_hash(102); + (**l_202) = &g_2[0]; + } + } + else + { + short l_257 = 0xBCE2L; + int l_265[6][9] = {{1L, 0x4D64D8A8L, 0x37457197L, 6L, 0xB7164813L, (-1L), 0xB7164813L, 6L, 0x37457197L}, {1L, 0x4D64D8A8L, 0x37457197L, 6L, 0xB7164813L, (-1L), 0xB7164813L, 6L, 0x37457197L}, {1L, 0x4D64D8A8L, 0x37457197L, 6L, 0xB7164813L, (-1L), 0xB7164813L, 6L, 0x37457197L}, {1L, 0x4D64D8A8L, 0x37457197L, 6L, 0xB7164813L, (-1L), 0xB7164813L, 6L, 0x37457197L}, {1L, 0x4D64D8A8L, 0x37457197L, 6L, 0xB7164813L, (-1L), 0xB7164813L, 6L, 0x37457197L}, {1L, 0x4D64D8A8L, 0x37457197L, 6L, 0xB7164813L, (-1L), 0xB7164813L, 6L, 0x37457197L}}; + unsigned l_266 = 0x23968A6BL; + int *l_286[5][8] = {{&l_265[3][6], &g_82, &g_82, &g_82, &g_82, &g_82, &l_265[3][6], &l_265[3][6]}, {&l_265[3][6], &g_82, &g_82, &g_82, &g_82, &g_82, &l_265[3][6], &l_265[3][6]}, {&l_265[3][6], &g_82, &g_82, &g_82, &g_82, &g_82, &l_265[3][6], &l_265[3][6]}, {&l_265[3][6], &g_82, &g_82, &g_82, &g_82, &g_82, &l_265[3][6], &l_265[3][6]}, {&l_265[3][6], &g_82, &g_82, &g_82, &g_82, &g_82, &l_265[3][6], &l_265[3][6]}}; + int *l_288[10][4] = {{&g_2[0], (void*)0, &g_2[0], &g_2[0]}, {&g_2[0], (void*)0, &g_2[0], &g_2[0]}, {&g_2[0], (void*)0, &g_2[0], &g_2[0]}, {&g_2[0], (void*)0, &g_2[0], &g_2[0]}, {&g_2[0], (void*)0, &g_2[0], &g_2[0]}, {&g_2[0], (void*)0, &g_2[0], &g_2[0]}, {&g_2[0], (void*)0, &g_2[0], &g_2[0]}, {&g_2[0], (void*)0, &g_2[0], &g_2[0]}, {&g_2[0], (void*)0, &g_2[0], &g_2[0]}, {&g_2[0], (void*)0, &g_2[0], &g_2[0]}}; + int i, j; + step_hash(114); + if ((p_27 | p_27)) + { + step_hash(111); + for (p_26 = 0; (p_26 <= 1); p_26 += 1) + { + int i; + step_hash(109); + l_257 = p_27; + step_hash(110); + l_106[p_26] = l_42[p_26]; + } + } + else + { + int l_264 = (-1L); + step_hash(113); + l_265[3][6] &= ((unsigned)((((unsigned)0xE0769A12L + (unsigned)((signed char)g_234 - (signed char)((&g_64 == (void*)0) ^ l_264))) >= func_88(&g_2[0], p_26, g_234)) > g_232) % (unsigned)g_77); + } + step_hash(115); + --l_266; + step_hash(222); + if ((0x9820A3ECL < p_26)) + { + int *l_273 = (void*)0; + step_hash(117); + l_265[5][6] |= (p_27 >= g_269); + step_hash(136); + if (p_27) + { + int *l_272 = &l_265[1][6]; + step_hash(119); + g_82 &= p_27; + step_hash(130); + for (p_26 = 0; (p_26 != (-4)); p_26--) + { + step_hash(127); + for (g_232 = 8; (g_232 >= 0); g_232 -= 1) + { + step_hash(126); + return l_273; + } + step_hash(128); + ++g_274; + step_hash(129); + if (g_83) + continue; + } + } + else + { + int l_279 = (-4L); + unsigned short l_290 = 1UL; + step_hash(132); + l_287 = ((~(l_279 <= (func_88(&l_279, l_279, (l_266 <= ((unsigned short)((unsigned short)((((unsigned)g_121 + (unsigned)(p_26 && g_269)) == l_265[3][6]) < (l_286[4][3] == (void*)0)) / (unsigned short)g_237) * (unsigned short)g_83))) != p_27))) == g_234); + step_hash(133); + l_288[3][1] = l_273; + step_hash(134); + l_290--; + step_hash(135); + l_279 = (p_27 >= g_269); + } + } + else + { + unsigned l_312 = 3UL; + int l_323 = (-1L); + int **l_333 = (void*)0; + int l_347 = 1L; + int l_349 = 0xE44B9215L; + int l_373[5][10] = {{0x181DDB77L, 0x625F9D78L, 0x51F476ADL, 0x625F9D78L, 0x181DDB77L, (-5L), 0x181DDB77L, 0x625F9D78L, 0x51F476ADL, 0x625F9D78L}, {0x181DDB77L, 0x625F9D78L, 0x51F476ADL, 0x625F9D78L, 0x181DDB77L, (-5L), 0x181DDB77L, 0x625F9D78L, 0x51F476ADL, 0x625F9D78L}, {0x181DDB77L, 0x625F9D78L, 0x51F476ADL, 0x625F9D78L, 0x181DDB77L, (-5L), 0x181DDB77L, 0x625F9D78L, 0x51F476ADL, 0x625F9D78L}, {0x181DDB77L, 0x625F9D78L, 0x51F476ADL, 0x625F9D78L, 0x181DDB77L, (-5L), 0x181DDB77L, 0x625F9D78L, 0x51F476ADL, 0x625F9D78L}, {0x181DDB77L, 0x625F9D78L, 0x51F476ADL, 0x625F9D78L, 0x181DDB77L, (-5L), 0x181DDB77L, 0x625F9D78L, 0x51F476ADL, 0x625F9D78L}}; + short l_396 = 0x3246L; + int *l_424 = (void*)0; + int i, j; + step_hash(194); + for (g_7 = 5; (g_7 >= 0); g_7 -= 1) + { + unsigned short l_298 = 2UL; + signed char l_304 = 0L; + int *l_307 = &g_7; + int i; + step_hash(151); + for (g_78 = 0; (g_78 <= 5); g_78 += 1) + { + int *l_296 = &g_7; + int l_297 = 0x89A85860L; + int i; + step_hash(144); + --g_293; + step_hash(149); + for (g_162 = 1; (g_162 <= 5); g_162 += 1) + { + int i; + step_hash(148); + l_297 = func_88(l_296, (0L != l_241[g_78]), g_289[(g_78 + 1)]); + } + step_hash(150); + if (l_241[g_7]) + continue; + } + step_hash(152); + l_298++; + step_hash(180); + if (((short)(g_289[(g_7 + 1)] != g_289[(g_7 + 1)]) >> (short)g_289[1])) + { + int *l_303 = &g_7; + int l_330 = 0L; + step_hash(163); + if (func_88(func_49(p_26, g_289[(g_7 + 1)], &g_2[0], l_303), p_26, l_304)) + { + int *l_316 = &l_265[3][6]; + step_hash(155); + g_315 = ((signed char)func_88(l_307, g_83, (p_26 && (&g_64 == &g_64))) % (signed char)((unsigned char)((((((unsigned short)(func_88(l_303, (((l_312 || ((unsigned char)251UL / (unsigned char)0xC8L)) != g_234) | g_83), p_26) >= 7UL) >> (unsigned short)l_312) & 2UL) | g_232) ^ p_26) != g_82) + (unsigned char)0xADL)); + step_hash(156); + l_330 &= func_88(l_316, func_88(l_316, ((signed char)((unsigned short)(((short)p_27 << (short)2) >= (l_323 < g_289[3])) >> (unsigned short)((unsigned short)func_88(&l_265[3][6], ((short)(-6L) + (short)((short)(p_26 || 7L) >> (short)p_26)), p_27) >> (unsigned short)p_27)) % (signed char)g_7), (*l_303)), g_234); + step_hash(157); + (*l_203) = &l_265[1][6]; + } + else + { + int *l_346[9][5] = {{&g_2[0], &g_7, &g_82, &g_82, &g_7}, {&g_2[0], &g_7, &g_82, &g_82, &g_7}, {&g_2[0], &g_7, &g_82, &g_82, &g_7}, {&g_2[0], &g_7, &g_82, &g_82, &g_7}, {&g_2[0], &g_7, &g_82, &g_82, &g_7}, {&g_2[0], &g_7, &g_82, &g_82, &g_7}, {&g_2[0], &g_7, &g_82, &g_82, &g_7}, {&g_2[0], &g_7, &g_82, &g_82, &g_7}, {&g_2[0], &g_7, &g_82, &g_82, &g_7}}; + int i, j; + step_hash(159); + l_330 &= func_88(func_49(g_274, (((unsigned short)(((void*)0 == l_333) != (0x15073BADL <= (((((int)(((unsigned short)p_26 - (unsigned short)(g_238 | ((unsigned char)(((unsigned short)(((unsigned)(p_26 >= (((((short)0L + (short)(func_88(l_346[2][0], (*l_303), g_289[1]) != 0x811DE73CL)) == g_78) != 0xBF8CL) | g_7)) - (unsigned)0xCCC2363EL) || 0xA22DL) >> (unsigned short)12) > g_293) - (unsigned char)(*l_307)))) >= p_26) % (int)p_27) < p_26) || (-3L)) >= (-1L)))) + (unsigned short)p_26) > l_347), &l_323, &g_2[0]), g_83, p_26); + step_hash(160); + l_348 = p_27; + step_hash(161); + l_349 = (func_88(l_307, g_234, g_293) & (!p_27)); + step_hash(162); + g_82 = ((void*)0 != &g_64); + } + step_hash(171); + for (l_312 = 0; (l_312 <= 6); l_312 += 1) + { + int *l_360 = (void*)0; + int i; + step_hash(167); + (*l_203) = &g_2[0]; + step_hash(168); + (**l_202) = func_49(((func_88(&g_82, (~(l_241[g_7] || ((((int)((signed char)func_88(func_49((*l_303), ((unsigned short)((unsigned)func_88(func_49(p_27, g_77, func_49(((unsigned short)p_26 >> (unsigned short)2), p_27, l_360, &l_330), &l_330), p_27, g_293) / (unsigned)(*g_64)) - (unsigned short)g_82), l_307, &l_265[3][6]), (*l_303), g_77) * (signed char)g_121) - (int)p_27) || g_83) && 246UL))), g_232) || g_238) > g_289[1]), l_241[g_7], &g_2[0], &g_2[0]); + step_hash(169); + l_333 = &g_64; + step_hash(170); + l_323 ^= p_27; + } + } + else + { + int *l_366 = &l_323; + step_hash(179); + for (l_349 = 5; (l_349 >= 0); l_349 -= 1) + { + int *l_365 = &l_323; + step_hash(176); + (**l_202) = func_49(((((unsigned char)((*l_307) <= (+p_27)) << (unsigned char)6) || 1UL) ^ g_2[0]), g_238, &l_265[2][2], &g_82); + step_hash(177); + (**l_202) = func_49(p_26, (((int)p_26 + (int)(&g_64 == &l_286[4][3])) >= 4294967295UL), l_365, l_365); + step_hash(178); + l_365 = func_49(p_26, p_26, l_366, func_49(((short)(~g_315) - (short)0x176BL), (*l_365), l_365, l_366)); + } + } + step_hash(193); + if (g_369) + { + int *l_371 = &g_2[0]; + int l_374 = 0xE3E680F1L; + step_hash(188); + if (p_27) + { + int l_370 = 0x79373D42L; + int l_372 = 0L; + step_hash(183); + l_370 |= (0x2B54E87AL >= (!(func_88(&l_323, p_27, (*l_307)) == (g_232 != 0x3AL)))); + step_hash(184); + l_372 |= (((void*)0 != l_371) || 0x6D1124C2L); + step_hash(185); + --g_375; + } + else + { + step_hash(187); + --g_379; + } + } + else + { + unsigned short l_385 = 0x1FE0L; + step_hash(190); + g_82 = (((void*)0 != l_382) < p_27); + step_hash(191); + l_385 = ((unsigned char)g_82 + (unsigned char)p_26); + step_hash(192); + return l_307; + } + } + step_hash(220); + for (g_378 = 3; (g_378 >= 0); g_378 -= 1) + { + int *l_421 = &g_2[0]; + int l_422 = 0x2C34738FL; + int i; + step_hash(198); + ++g_387[3][0]; + step_hash(199); + g_82 &= (((unsigned char)(g_289[(g_378 + 2)] | (((short)((g_289[(g_378 + 1)] >= l_241[(g_378 + 1)]) && ((unsigned short)g_386[2] - (unsigned short)l_396)) << (short)9) < (+((signed char)(((signed char)(g_289[(g_378 + 1)] < 0x020F51BEL) << (signed char)g_375) && g_7) + (signed char)p_27)))) - (unsigned char)g_401) == g_369); + step_hash(219); + for (g_83 = 1; (g_83 <= 5); g_83 += 1) + { + int l_402[7] = {0x29363A9BL, 0x29363A9BL, 0xD3290A70L, 0x29363A9BL, 0x29363A9BL, 0xD3290A70L, 0x29363A9BL}; + unsigned char l_403 = 0xC6L; + int i, j; + step_hash(203); + l_403 = l_402[0]; + step_hash(211); + if (((signed char)0x01L + (signed char)(((unsigned short)g_2[0] * (unsigned short)(&g_64 != (void*)0)) | p_26))) + { + int *l_410 = &l_323; + step_hash(205); + (*l_410) = ((((((unsigned char)((-1L) | ((void*)0 == l_410)) - (unsigned char)((unsigned short)((&l_333 != (void*)0) <= (l_410 != (void*)0)) << (unsigned short)15)) >= func_88(&g_2[0], ((unsigned)(((unsigned short)((!p_27) & 6L) >> (unsigned short)g_78) & p_27) - (unsigned)g_289[1]), g_238)) && p_26) && p_26) || g_375); + step_hash(206); + if (g_289[(g_378 + 2)]) + continue; + } + else + { + unsigned char l_417[8][7] = {{0xEDL, 0xD1L, 252UL, 0xD1L, 0xEDL, 250UL, 0xEDL}, {0xEDL, 0xD1L, 252UL, 0xD1L, 0xEDL, 250UL, 0xEDL}, {0xEDL, 0xD1L, 252UL, 0xD1L, 0xEDL, 250UL, 0xEDL}, {0xEDL, 0xD1L, 252UL, 0xD1L, 0xEDL, 250UL, 0xEDL}, {0xEDL, 0xD1L, 252UL, 0xD1L, 0xEDL, 250UL, 0xEDL}, {0xEDL, 0xD1L, 252UL, 0xD1L, 0xEDL, 250UL, 0xEDL}, {0xEDL, 0xD1L, 252UL, 0xD1L, 0xEDL, 250UL, 0xEDL}, {0xEDL, 0xD1L, 252UL, 0xD1L, 0xEDL, 250UL, 0xEDL}}; + int *l_420 = (void*)0; + int i, j; + step_hash(208); + l_417[7][3]++; + step_hash(209); + (*l_203) = l_420; + step_hash(210); + return l_421; + } + step_hash(218); + for (l_266 = 0; (l_266 <= 5); l_266 += 1) + { + int *l_423 = &l_265[4][4]; + int i; + step_hash(215); + l_422 ^= ((&g_64 != (void*)0) <= (0L || g_289[g_378])); + step_hash(216); + l_286[4][3] = &l_422; + step_hash(217); + return l_424; + } + } + } + step_hash(221); + (**l_202) = &l_265[3][6]; + } + } + step_hash(224); + g_7 = l_425; + step_hash(276); + for (g_378 = 18; (g_378 != (-16)); g_378--) + { + int *l_437[7] = {(void*)0, &g_2[0], (void*)0, &g_2[0], (void*)0, &g_2[0], (void*)0}; + signed char l_446 = 0x1EL; + unsigned l_471[2][9] = {{0xA9BEC898L, 0xA9BEC898L, 4294967290UL, 0x1F6FDC5FL, 1UL, 0x1F6FDC5FL, 4294967290UL, 0xA9BEC898L, 0xA9BEC898L}, {0xA9BEC898L, 0xA9BEC898L, 4294967290UL, 0x1F6FDC5FL, 1UL, 0x1F6FDC5FL, 4294967290UL, 0xA9BEC898L, 0xA9BEC898L}}; + short l_476 = 1L; + unsigned l_495 = 4294967294UL; + int i, j; + step_hash(232); + for (g_401 = (-23); (g_401 == 1); g_401 += 7) + { + int l_430 = 0x1B0D18BCL; + step_hash(231); + l_430 ^= ((&g_64 == (void*)0) | 0UL); + } + step_hash(275); + for (p_26 = (-18); (p_26 <= 5); p_26 += 1) + { + short l_433 = 0x9B08L; + int l_434[6]; + signed char l_440 = 7L; + int i; + for (i = 0; i < 6; i++) + l_434[i] = 0L; + step_hash(236); + l_433 = 0x507DCFA4L; + step_hash(272); + if (l_433) + { + signed char l_441 = 0xA0L; + int l_449 = 0xE7DD9E9FL; + int l_451[7] = {0x39DFA018L, 0x39DFA018L, 0xD5BABE37L, 0x39DFA018L, 0x39DFA018L, 0xD5BABE37L, 0x39DFA018L}; + int l_455 = 0xE6E5E341L; + int *l_492 = (void*)0; + int i; + step_hash(238); + l_434[1] &= (!l_433); + step_hash(244); + for (g_7 = (-29); (g_7 > (-11)); g_7++) + { + step_hash(242); + (*l_382) = l_437[2]; + step_hash(243); + if (p_27) + continue; + } + step_hash(267); + if (((((signed char)l_440 << (signed char)2) ^ (~l_441)) | l_440)) + { + int *l_447[10]; + int *l_481 = &l_449; + int i; + for (i = 0; i < 10; i++) + l_447[i] = (void*)0; + step_hash(255); + if (((func_38(p_26, l_441, func_49(p_27, (((unsigned char)0x03L - (unsigned char)g_379) >= ((p_26 > (+((p_27 <= ((short)(((p_27 >= ((g_401 != p_27) == g_2[0])) | l_446) || l_433) % (short)(-1L))) || 9UL))) <= 1UL)), l_447[2], &g_401)) <= g_274) > 0xE4BCL)) + { + int l_450[5]; + int ***l_456 = &l_382; + int i; + for (i = 0; i < 5; i++) + l_450[i] = (-2L); + step_hash(247); + --g_452[0]; + step_hash(248); + l_434[3] = p_26; + step_hash(249); + (**l_202) = func_92(p_26, g_452[1], l_455, l_456, &l_447[2]); + step_hash(250); + l_471[1][0] = (((short)((unsigned char)p_26 + (unsigned char)(((signed char)p_27 * (signed char)((signed char)(((unsigned short)(l_447[2] != (**l_456)) % (unsigned short)(p_26 && 0x4CA0E249L)) && 249UL) / (signed char)p_27)) > ((signed char)((unsigned)0UL / (unsigned)g_2[0]) >> (signed char)g_289[1]))) / (short)l_451[0]) > 4294967286UL); + } + else + { + int *l_472 = &l_434[1]; + step_hash(252); + (*l_382) = l_447[5]; + step_hash(253); + if (p_26) + continue; + step_hash(254); + g_82 |= ((6L | (func_70(l_472) < ((((short)((((-(signed char)(((l_476 < ((g_401 || 65530UL) < ((signed char)g_237 % (signed char)(((unsigned short)p_27 / (unsigned short)l_434[3]) | 0xA740L)))) <= l_434[5]) ^ p_27)) | l_455) ^ p_27) != 0L) >> (short)2) > p_26) | (-1L)))) > p_26); + } + step_hash(256); + return l_437[1]; + } + else + { + int *l_484[1]; + int i; + for (i = 0; i < 1; i++) + l_484[i] = (void*)0; + step_hash(263); + for (g_369 = 0; (g_369 <= 1); g_369 += 1) + { + int i; + step_hash(261); + (*l_202) = &l_106[g_369]; + step_hash(262); + return l_106[g_369]; + } + step_hash(264); + g_401 = (~(g_387[3][0] ^ (l_484[0] != &g_401))); + step_hash(265); + l_451[3] = ((signed char)0x2EL << (signed char)((l_434[5] && p_26) || l_455)); + step_hash(266); + l_492 = func_49((p_26 && ((signed char)(!(g_378 ^ l_434[3])) + (signed char)(((short)func_43(&l_451[0], (p_26 && g_238), p_26, l_491, &l_434[1]) * (short)0L) ^ (-8L)))), p_26, l_484[0], &l_434[0]); + } + } + else + { + short l_493 = 4L; + int l_494[5] = {(-1L), 0xBFFF465AL, (-1L), 0xBFFF465AL, (-1L)}; + int i; + step_hash(269); + if (p_26) + break; + step_hash(270); + for (l_425 = 0; l_425 < 7; l_425 += 1) + { + l_437[l_425] = &g_2[0]; + } + step_hash(271); + --l_495; + } + step_hash(273); + g_500++; + step_hash(274); + if (p_26) + continue; + } + } + step_hash(277); + return &g_401; +} + + + + + + + +static unsigned short func_38(int p_39, unsigned p_40, int * p_41) +{ + int l_113 = 5L; + step_hash(43); + for (p_40 = 0; (p_40 <= 24); ++p_40) + { + int l_120 = (-9L); + step_hash(42); + for (g_78 = 0; (g_78 == 2); g_78 += 8) + { + int *l_111 = (void*)0; + int *l_112 = &g_7; + int *l_114 = &l_113; + int *l_115 = (void*)0; + int *l_116 = (void*)0; + int *l_117 = &g_7; + int *l_118 = (void*)0; + int *l_119[4][9] = {{&g_2[0], &g_2[0], &g_7, &l_113, &l_113, &g_7, &g_2[0], &g_2[0], &g_7}, {&g_2[0], &g_2[0], &g_7, &l_113, &l_113, &g_7, &g_2[0], &g_2[0], &g_7}, {&g_2[0], &g_2[0], &g_7, &l_113, &l_113, &g_7, &g_2[0], &g_2[0], &g_7}, {&g_2[0], &g_2[0], &g_7, &l_113, &l_113, &g_7, &g_2[0], &g_2[0], &g_7}}; + int i, j; + step_hash(41); + g_121++; + } + } + step_hash(51); + for (g_83 = 0; (g_83 >= 29); g_83 += 6) + { + int **l_126 = &g_64; + int *l_127 = &g_7; + int *l_132 = &g_82; + step_hash(47); + (*l_126) = &l_113; + step_hash(48); + (*l_127) &= (**l_126); + step_hash(49); + (*l_132) |= ((unsigned char)(((0UL > (((*l_126) == (void*)0) && (p_39 < ((&p_39 != (void*)0) <= (((int)0L - (int)((&p_39 != &p_39) | p_39)) && (*l_127)))))) != p_39) | g_2[0]) * (unsigned char)l_113); + step_hash(50); + (*l_132) = ((signed char)(func_88(func_49((0UL <= ((p_39 & ((unsigned char)p_40 >> (unsigned char)((signed char)0x48L + (signed char)0x7FL))) != ((unsigned char)g_78 - (unsigned char)(((unsigned char)((unsigned short)l_113 >> (unsigned short)0) << (unsigned char)g_82) == ((**l_126) < (*g_64)))))), g_7, &g_7, &g_7), p_39, p_40) != (*g_64)) << (signed char)7); + } + step_hash(52); + return g_2[0]; +} + + + + + + + +static unsigned short func_43(int * p_44, unsigned char p_45, unsigned char p_46, int * p_47, int * p_48) +{ + short l_98 = 0x957BL; + int ***l_99 = &g_63; + int **l_105 = &g_64; + step_hash(31); + (*l_105) = func_49((((*p_47) <= ((short)(((unsigned)func_70(p_47) / (unsigned)p_45) && ((unsigned short)func_88(func_92(g_7, p_45, l_98, l_99, (*l_99)), g_77, g_77) << (unsigned short)g_77)) % (short)g_2[0])) != 0x6D66C253L), g_2[0], p_48, p_44); + step_hash(32); + (**l_105) = (*p_47); + step_hash(33); + return p_46; +} + + + + + + + +static int * func_49(unsigned char p_50, unsigned p_51, int * p_52, int * p_53) +{ + int *l_62[2][6] = {{&g_2[0], &g_2[0], (void*)0, &g_2[0], &g_2[0], (void*)0}, {&g_2[0], &g_2[0], (void*)0, &g_2[0], &g_2[0], (void*)0}}; + int **l_61 = &l_62[1][4]; + int ***l_60[2][1]; + int i, j; + for (i = 0; i < 2; i++) + { + for (j = 0; j < 1; j++) + l_60[i][j] = &l_61; + } + step_hash(12); + g_63 = (void*)0; + step_hash(13); + return &g_7; +} + + + + + + + +static unsigned func_70(int * p_71) +{ + int *l_74 = &g_7; + int *l_75 = &g_7; + int *l_76[8] = {(void*)0, (void*)0, (void*)0, (void*)0, (void*)0, (void*)0, (void*)0, (void*)0}; + int l_81 = 0x5AE7BE98L; + int i; + step_hash(20); + for (g_7 = (-29); (g_7 >= 28); g_7 += 8) + { + step_hash(19); + if ((*p_71)) + break; + } + step_hash(21); + g_78--; + step_hash(22); + --g_83; + step_hash(23); + return g_7; +} + + + + + + + +static unsigned short func_88(int * p_89, short p_90, unsigned short p_91) +{ + step_hash(29); + p_89 = p_89; + step_hash(30); + return g_7; +} + + + + + + + +static int * func_92(unsigned p_93, unsigned short p_94, int p_95, int *** p_96, int ** p_97) +{ + int *l_100 = &g_2[0]; + int l_101 = 0x643A5642L; + int **l_102[2][5] = {{&g_64, (void*)0, &g_64, (void*)0, &g_64}, {&g_64, (void*)0, &g_64, (void*)0, &g_64}}; + int *l_103[8][10] = {{&g_2[0], &g_2[0], &l_101, (void*)0, &g_2[0], (void*)0, &g_2[0], (void*)0, &l_101, &g_2[0]}, {&g_2[0], &g_2[0], &l_101, (void*)0, &g_2[0], (void*)0, &g_2[0], (void*)0, &l_101, &g_2[0]}, {&g_2[0], &g_2[0], &l_101, (void*)0, &g_2[0], (void*)0, &g_2[0], (void*)0, &l_101, &g_2[0]}, {&g_2[0], &g_2[0], &l_101, (void*)0, &g_2[0], (void*)0, &g_2[0], (void*)0, &l_101, &g_2[0]}, {&g_2[0], &g_2[0], &l_101, (void*)0, &g_2[0], (void*)0, &g_2[0], (void*)0, &l_101, &g_2[0]}, {&g_2[0], &g_2[0], &l_101, (void*)0, &g_2[0], (void*)0, &g_2[0], (void*)0, &l_101, &g_2[0]}, {&g_2[0], &g_2[0], &l_101, (void*)0, &g_2[0], (void*)0, &g_2[0], (void*)0, &l_101, &g_2[0]}, {&g_2[0], &g_2[0], &l_101, (void*)0, &g_2[0], (void*)0, &g_2[0], (void*)0, &l_101, &g_2[0]}}; + int *l_104[9] = {&g_7, &g_2[0], &g_7, &g_2[0], &g_7, &g_2[0], &g_7, &g_2[0], &g_7}; + int i, j; + step_hash(25); + l_101 |= (0xFB31L <= (func_70(l_100) != ((void*)0 == l_100))); + step_hash(26); + g_64 = &g_7; + step_hash(27); + return l_104[7]; +} + + +void csmith_compute_hash(void) +{ + int i, j; + for (i = 0; i < 1; i++) + { + transparent_crc(g_2[i], "g_2[i]", print_hash_value); + if (print_hash_value) printf("index = [%d]\n", i); + + } + transparent_crc(g_7, "g_7", print_hash_value); + transparent_crc(g_77, "g_77", print_hash_value); + transparent_crc(g_78, "g_78", print_hash_value); + transparent_crc(g_82, "g_82", print_hash_value); + transparent_crc(g_83, "g_83", print_hash_value); + transparent_crc(g_121, "g_121", print_hash_value); + transparent_crc(g_162, "g_162", print_hash_value); + transparent_crc(g_232, "g_232", print_hash_value); + transparent_crc(g_234, "g_234", print_hash_value); + transparent_crc(g_237, "g_237", print_hash_value); + transparent_crc(g_238, "g_238", print_hash_value); + transparent_crc(g_250, "g_250", print_hash_value); + transparent_crc(g_269, "g_269", print_hash_value); + transparent_crc(g_274, "g_274", print_hash_value); + for (i = 0; i < 7; i++) + { + transparent_crc(g_289[i], "g_289[i]", print_hash_value); + if (print_hash_value) printf("index = [%d]\n", i); + + } + transparent_crc(g_293, "g_293", print_hash_value); + transparent_crc(g_315, "g_315", print_hash_value); + transparent_crc(g_369, "g_369", print_hash_value); + transparent_crc(g_375, "g_375", print_hash_value); + transparent_crc(g_378, "g_378", print_hash_value); + transparent_crc(g_379, "g_379", print_hash_value); + for (i = 0; i < 8; i++) + { + transparent_crc(g_386[i], "g_386[i]", print_hash_value); + if (print_hash_value) printf("index = [%d]\n", i); + + } + for (i = 0; i < 8; i++) + { + for (j = 0; j < 4; j++) + { + transparent_crc(g_387[i][j], "g_387[i][j]", print_hash_value); + if (print_hash_value) printf("index = [%d][%d]\n", i, j); + + } + } + transparent_crc(g_401, "g_401", print_hash_value); + transparent_crc(g_448, "g_448", print_hash_value); + for (i = 0; i < 4; i++) + { + transparent_crc(g_452[i], "g_452[i]", print_hash_value); + if (print_hash_value) printf("index = [%d]\n", i); + + } + for (i = 0; i < 9; i++) + { + for (j = 0; j < 10; j++) + { + transparent_crc(g_498[i][j], "g_498[i][j]", print_hash_value); + if (print_hash_value) printf("index = [%d][%d]\n", i, j); + + } + } + transparent_crc(g_499, "g_499", print_hash_value); + transparent_crc(g_500, "g_500", print_hash_value); + transparent_crc(g_520, "g_520", print_hash_value); +} + +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} + + + +int main (void) +{ + int i, j; + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand101.expect b/src/tests/csmith/rand101.expect new file mode 100644 index 0000000..9725553 --- /dev/null +++ b/src/tests/csmith/rand101.expect @@ -0,0 +1,930 @@ +...checksum after hashing g_2[i] : 3748B567 +index = [0] +...checksum after hashing g_7 : DDBDA795 +...checksum after hashing g_77 : DD653BA4 +...checksum after hashing g_78 : 8192A23F +...checksum after hashing g_82 : 328482AE +...checksum after hashing g_83 : 1523393C +...checksum after hashing g_121 : BDCCF573 +...checksum after hashing g_162 : 52C5045F +...checksum after hashing g_232 : 2578148E +...checksum after hashing g_234 : BE646DDD +...checksum after hashing g_237 : DE703344 +...checksum after hashing g_238 : E5F7AAFF +...checksum after hashing g_250 : D62D108D +...checksum after hashing g_269 : B3701F67 +...checksum after hashing g_274 : 5C29F31E +...checksum after hashing g_289[i] : B827D768 +index = [0] +...checksum after hashing g_289[i] : F0D3CDFB +index = [1] +...checksum after hashing g_289[i] : FEFC2F69 +index = [2] +...checksum after hashing g_289[i] : ECB7087 +index = [3] +...checksum after hashing g_289[i] : 72317D29 +index = [4] +...checksum after hashing g_289[i] : D801D309 +index = [5] +...checksum after hashing g_289[i] : FA2C173D +index = [6] +...checksum after hashing g_293 : 3BB3BDE8 +...checksum after hashing g_315 : 67FB6E36 +...checksum after hashing g_369 : 2A6F35A3 +...checksum after hashing g_375 : 65E4F032 +...checksum after hashing g_378 : C9683FD9 +...checksum after hashing g_379 : 7A2E2205 +...checksum after hashing g_386[i] : A15ADC9C +index = [0] +...checksum after hashing g_386[i] : F0E7320 +index = [1] +...checksum after hashing g_386[i] : EE236606 +index = [2] +...checksum after hashing g_386[i] : DA49798 +index = [3] +...checksum after hashing g_386[i] : 22E84D40 +index = [4] +...checksum after hashing g_386[i] : 3D1FB966 +index = [5] +...checksum after hashing g_386[i] : 576A00E1 +index = [6] +...checksum after hashing g_386[i] : 9950A6EF +index = [7] +...checksum after hashing g_387[i][j] : CE14AE58 +index = [0][0] +...checksum after hashing g_387[i][j] : 21B8C795 +index = [0][1] +...checksum after hashing g_387[i][j] : D09E0DED +index = [0][2] +...checksum after hashing g_387[i][j] : EB49D7A6 +index = [0][3] +...checksum after hashing g_387[i][j] : 58300280 +index = [1][0] +...checksum after hashing g_387[i][j] : FABE2530 +index = [1][1] +...checksum after hashing g_387[i][j] : 47164CCE +index = [1][2] +...checksum after hashing g_387[i][j] : B5A72425 +index = [1][3] +...checksum after hashing g_387[i][j] : 5C70744D +index = [2][0] +...checksum after hashing g_387[i][j] : D9F18C15 +index = [2][1] +...checksum after hashing g_387[i][j] : D3D55795 +index = [2][2] +...checksum after hashing g_387[i][j] : AE6D33C7 +index = [2][3] +...checksum after hashing g_387[i][j] : 821FBE23 +index = [3][0] +...checksum after hashing g_387[i][j] : 1D3E9708 +index = [3][1] +...checksum after hashing g_387[i][j] : B1BE596E +index = [3][2] +...checksum after hashing g_387[i][j] : D0213D73 +index = [3][3] +...checksum after hashing g_387[i][j] : F1E016D6 +index = [4][0] +...checksum after hashing g_387[i][j] : 21C5A0B1 +index = [4][1] +...checksum after hashing g_387[i][j] : 28C7EF9A +index = [4][2] +...checksum after hashing g_387[i][j] : 6FD8D77E +index = [4][3] +...checksum after hashing g_387[i][j] : 395F6F94 +index = [5][0] +...checksum after hashing g_387[i][j] : BD1A9B2D +index = [5][1] +...checksum after hashing g_387[i][j] : 876BD48 +index = [5][2] +...checksum after hashing g_387[i][j] : 4A0DE383 +index = [5][3] +...checksum after hashing g_387[i][j] : D97A09BF +index = [6][0] +...checksum after hashing g_387[i][j] : CE8A361F +index = [6][1] +...checksum after hashing g_387[i][j] : 3BB9E9CD +index = [6][2] +...checksum after hashing g_387[i][j] : 88D8971 +index = [6][3] +...checksum after hashing g_387[i][j] : 13042192 +index = [7][0] +...checksum after hashing g_387[i][j] : 60812972 +index = [7][1] +...checksum after hashing g_387[i][j] : 3715757A +index = [7][2] +...checksum after hashing g_387[i][j] : 77250108 +index = [7][3] +...checksum after hashing g_401 : 43D051B0 +...checksum after hashing g_448 : E11E20D7 +...checksum after hashing g_452[i] : A1C6F5ED +index = [0] +...checksum after hashing g_452[i] : 71FF6B4B +index = [1] +...checksum after hashing g_452[i] : 9DF59839 +index = [2] +...checksum after hashing g_452[i] : 43C20441 +index = [3] +...checksum after hashing g_498[i][j] : DFF26273 +index = [0][0] +...checksum after hashing g_498[i][j] : FDC0A3B9 +index = [0][1] +...checksum after hashing g_498[i][j] : 9CACE8D +index = [0][2] +...checksum after hashing g_498[i][j] : 5533EAB5 +index = [0][3] +...checksum after hashing g_498[i][j] : 91811D6D +index = [0][4] +...checksum after hashing g_498[i][j] : B0031AE8 +index = [0][5] +...checksum after hashing g_498[i][j] : 929FC774 +index = [0][6] +...checksum after hashing g_498[i][j] : 8EFFFC9D +index = [0][7] +...checksum after hashing g_498[i][j] : 952F1F67 +index = [0][8] +...checksum after hashing g_498[i][j] : DC0D8BAE +index = [0][9] +...checksum after hashing g_498[i][j] : 97552AF4 +index = [1][0] +...checksum after hashing g_498[i][j] : 6A8612CF +index = [1][1] +...checksum after hashing g_498[i][j] : 4B4A4B8E +index = [1][2] +...checksum after hashing g_498[i][j] : 32924C7 +index = [1][3] +...checksum after hashing g_498[i][j] : F9A3C02A +index = [1][4] +...checksum after hashing g_498[i][j] : D74A7345 +index = [1][5] +...checksum after hashing g_498[i][j] : 98F5F6B4 +index = [1][6] +...checksum after hashing g_498[i][j] : A2DCF70F +index = [1][7] +...checksum after hashing g_498[i][j] : 242C22B +index = [1][8] +...checksum after hashing g_498[i][j] : 36A6D945 +index = [1][9] +...checksum after hashing g_498[i][j] : F43F7857 +index = [2][0] +...checksum after hashing g_498[i][j] : 11C9ED35 +index = [2][1] +...checksum after hashing g_498[i][j] : AC3F72DE +index = [2][2] +...checksum after hashing g_498[i][j] : 8FB80F12 +index = [2][3] +...checksum after hashing g_498[i][j] : 506554D0 +index = [2][4] +...checksum after hashing g_498[i][j] : F621FE2E +index = [2][5] +...checksum after hashing g_498[i][j] : 575FAC57 +index = [2][6] +...checksum after hashing g_498[i][j] : 580E39FD +index = [2][7] +...checksum after hashing g_498[i][j] : 5B7A1BD2 +index = [2][8] +...checksum after hashing g_498[i][j] : 4AB8DB7C +index = [2][9] +...checksum after hashing g_498[i][j] : F76A19DA +index = [3][0] +...checksum after hashing g_498[i][j] : 192ADA6F +index = [3][1] +...checksum after hashing g_498[i][j] : 52234610 +index = [3][2] +...checksum after hashing g_498[i][j] : 863A592D +index = [3][3] +...checksum after hashing g_498[i][j] : E075AC48 +index = [3][4] +...checksum after hashing g_498[i][j] : B4A1B4D0 +index = [3][5] +...checksum after hashing g_498[i][j] : EFBA7D22 +index = [3][6] +...checksum after hashing g_498[i][j] : 6E170A43 +index = [3][7] +...checksum after hashing g_498[i][j] : D4404533 +index = [3][8] +...checksum after hashing g_498[i][j] : 1AF7BE53 +index = [3][9] +...checksum after hashing g_498[i][j] : 5DADAD47 +index = [4][0] +...checksum after hashing g_498[i][j] : 26EFBEA5 +index = [4][1] +...checksum after hashing g_498[i][j] : 4E625B8 +index = [4][2] +...checksum after hashing g_498[i][j] : 70F1CA74 +index = [4][3] +...checksum after hashing g_498[i][j] : D5F5B365 +index = [4][4] +...checksum after hashing g_498[i][j] : 9CB37B16 +index = [4][5] +...checksum after hashing g_498[i][j] : 6B2EC5AC +index = [4][6] +...checksum after hashing g_498[i][j] : 57246CC4 +index = [4][7] +...checksum after hashing g_498[i][j] : 43FA911B +index = [4][8] +...checksum after hashing g_498[i][j] : 85B0E4BB +index = [4][9] +...checksum after hashing g_498[i][j] : F0C538E1 +index = [5][0] +...checksum after hashing g_498[i][j] : B074BC9D +index = [5][1] +...checksum after hashing g_498[i][j] : B9244438 +index = [5][2] +...checksum after hashing g_498[i][j] : 98A1A7A5 +index = [5][3] +...checksum after hashing g_498[i][j] : 1F7802F4 +index = [5][4] +...checksum after hashing g_498[i][j] : A84FA458 +index = [5][5] +...checksum after hashing g_498[i][j] : F8DC2AB +index = [5][6] +...checksum after hashing g_498[i][j] : 490893 +index = [5][7] +...checksum after hashing g_498[i][j] : 7FA21441 +index = [5][8] +...checksum after hashing g_498[i][j] : 9BF379CD +index = [5][9] +...checksum after hashing g_498[i][j] : 6A01CDA7 +index = [6][0] +...checksum after hashing g_498[i][j] : 2486257 +index = [6][1] +...checksum after hashing g_498[i][j] : 715FF93F +index = [6][2] +...checksum after hashing g_498[i][j] : 918418E0 +index = [6][3] +...checksum after hashing g_498[i][j] : EC9F7B95 +index = [6][4] +...checksum after hashing g_498[i][j] : 457EA16C +index = [6][5] +...checksum after hashing g_498[i][j] : 6EE9F6C1 +index = [6][6] +...checksum after hashing g_498[i][j] : 4C94ADD5 +index = [6][7] +...checksum after hashing g_498[i][j] : 55923AC2 +index = [6][8] +...checksum after hashing g_498[i][j] : 5231F4D7 +index = [6][9] +...checksum after hashing g_498[i][j] : A73C3D57 +index = [7][0] +...checksum after hashing g_498[i][j] : BED7F193 +index = [7][1] +...checksum after hashing g_498[i][j] : 432BEFB5 +index = [7][2] +...checksum after hashing g_498[i][j] : 884F7C0F +index = [7][3] +...checksum after hashing g_498[i][j] : 6138EF42 +index = [7][4] +...checksum after hashing g_498[i][j] : 76A8E5D3 +index = [7][5] +...checksum after hashing g_498[i][j] : 34D98E9E +index = [7][6] +...checksum after hashing g_498[i][j] : D1E005D0 +index = [7][7] +...checksum after hashing g_498[i][j] : 70CA9523 +index = [7][8] +...checksum after hashing g_498[i][j] : D7B0CBCC +index = [7][9] +...checksum after hashing g_498[i][j] : B05991C1 +index = [8][0] +...checksum after hashing g_498[i][j] : 6DC7F1CA +index = [8][1] +...checksum after hashing g_498[i][j] : A0363EA2 +index = [8][2] +...checksum after hashing g_498[i][j] : FA593F0 +index = [8][3] +...checksum after hashing g_498[i][j] : CACE73CB +index = [8][4] +...checksum after hashing g_498[i][j] : 111261AD +index = [8][5] +...checksum after hashing g_498[i][j] : 94F958A4 +index = [8][6] +...checksum after hashing g_498[i][j] : 8420D3DD +index = [8][7] +...checksum after hashing g_498[i][j] : DB5F7649 +index = [8][8] +...checksum after hashing g_498[i][j] : 65BDB66D +index = [8][9] +...checksum after hashing g_499 : 6191BFAB +...checksum after hashing g_500 : 8E9D9AE0 +...checksum after hashing g_520 : 4259F80C +before stmt(284): checksum = 4259F80C +...checksum after hashing g_2[i] : 33F170F2 +index = [0] +...checksum after hashing g_7 : F22D3340 +...checksum after hashing g_77 : EC65D560 +...checksum after hashing g_78 : 8A1F26FE +...checksum after hashing g_82 : 3B6871F +...checksum after hashing g_83 : A888663 +...checksum after hashing g_121 : 205B3B7D +...checksum after hashing g_162 : 99953B02 +...checksum after hashing g_232 : 85252730 +...checksum after hashing g_234 : BC278F4C +...checksum after hashing g_237 : 44B0CCA1 +...checksum after hashing g_238 : 61EE820C +...checksum after hashing g_250 : 57550BD +...checksum after hashing g_269 : 5E793E34 +...checksum after hashing g_274 : B3675A09 +...checksum after hashing g_289[i] : FD0F43C3 +index = [0] +...checksum after hashing g_289[i] : CB485866 +index = [1] +...checksum after hashing g_289[i] : 69B0D6FE +index = [2] +...checksum after hashing g_289[i] : A6EEE72B +index = [3] +...checksum after hashing g_289[i] : BD2E8EDC +index = [4] +...checksum after hashing g_289[i] : 18BA29AA +index = [5] +...checksum after hashing g_289[i] : 81F4E213 +index = [6] +...checksum after hashing g_293 : 4667337D +...checksum after hashing g_315 : CD2E44B0 +...checksum after hashing g_369 : 1DCB64DE +...checksum after hashing g_375 : E3191016 +...checksum after hashing g_378 : EA136EF5 +...checksum after hashing g_379 : 9318A74B +...checksum after hashing g_386[i] : 6DA5E150 +index = [0] +...checksum after hashing g_386[i] : 1ED027B4 +index = [1] +...checksum after hashing g_386[i] : C2BF5EFA +index = [2] +...checksum after hashing g_386[i] : 440235A +index = [3] +...checksum after hashing g_386[i] : 7F35B34D +index = [4] +...checksum after hashing g_386[i] : 5163A97A +index = [5] +...checksum after hashing g_386[i] : 960D503F +index = [6] +...checksum after hashing g_386[i] : F5B849B3 +index = [7] +...checksum after hashing g_387[i][j] : 3FD2DD48 +index = [0][0] +...checksum after hashing g_387[i][j] : 700CF441 +index = [0][1] +...checksum after hashing g_387[i][j] : C3407234 +index = [0][2] +...checksum after hashing g_387[i][j] : 74BDA797 +index = [0][3] +...checksum after hashing g_387[i][j] : 54365F78 +index = [1][0] +...checksum after hashing g_387[i][j] : 82E44D36 +index = [1][1] +...checksum after hashing g_387[i][j] : 3A33C55A +index = [1][2] +...checksum after hashing g_387[i][j] : AF26AFBF +index = [1][3] +...checksum after hashing g_387[i][j] : BC17D19C +index = [2][0] +...checksum after hashing g_387[i][j] : 121CD27A +index = [2][1] +...checksum after hashing g_387[i][j] : 31D425E3 +index = [2][2] +...checksum after hashing g_387[i][j] : E053C2AC +index = [2][3] +...checksum after hashing g_387[i][j] : A9FA02C +index = [3][0] +...checksum after hashing g_387[i][j] : 8B059A7D +index = [3][1] +...checksum after hashing g_387[i][j] : C05943DA +index = [3][2] +...checksum after hashing g_387[i][j] : 65BDE699 +index = [3][3] +...checksum after hashing g_387[i][j] : AF01EF4E +index = [4][0] +...checksum after hashing g_387[i][j] : 28929FFB +index = [4][1] +...checksum after hashing g_387[i][j] : 7F7F8659 +index = [4][2] +...checksum after hashing g_387[i][j] : 953586DE +index = [4][3] +...checksum after hashing g_387[i][j] : AFF2A4B5 +index = [5][0] +...checksum after hashing g_387[i][j] : 3AABDE02 +index = [5][1] +...checksum after hashing g_387[i][j] : 874C471 +index = [5][2] +...checksum after hashing g_387[i][j] : AE3865F5 +index = [5][3] +...checksum after hashing g_387[i][j] : 77C0751A +index = [6][0] +...checksum after hashing g_387[i][j] : C69086C1 +index = [6][1] +...checksum after hashing g_387[i][j] : 869AAB9E +index = [6][2] +...checksum after hashing g_387[i][j] : A952C8C3 +index = [6][3] +...checksum after hashing g_387[i][j] : 72560ADA +index = [7][0] +...checksum after hashing g_387[i][j] : B8019EB9 +index = [7][1] +...checksum after hashing g_387[i][j] : E5C33645 +index = [7][2] +...checksum after hashing g_387[i][j] : 120E0B07 +index = [7][3] +...checksum after hashing g_401 : 5D8CAC8E +...checksum after hashing g_448 : A0F760FD +...checksum after hashing g_452[i] : 90B40ED4 +index = [0] +...checksum after hashing g_452[i] : 99A5B1F +index = [1] +...checksum after hashing g_452[i] : BBA583B0 +index = [2] +...checksum after hashing g_452[i] : AB5669C8 +index = [3] +...checksum after hashing g_498[i][j] : B450E6E5 +index = [0][0] +...checksum after hashing g_498[i][j] : C586C826 +index = [0][1] +...checksum after hashing g_498[i][j] : 264A4BA3 +index = [0][2] +...checksum after hashing g_498[i][j] : 62724EC1 +index = [0][3] +...checksum after hashing g_498[i][j] : FA720451 +index = [0][4] +...checksum after hashing g_498[i][j] : FCF8CFA0 +index = [0][5] +...checksum after hashing g_498[i][j] : CF5F75B0 +index = [0][6] +...checksum after hashing g_498[i][j] : 6F2A55B5 +index = [0][7] +...checksum after hashing g_498[i][j] : D421DED +index = [0][8] +...checksum after hashing g_498[i][j] : 73EA0703 +index = [0][9] +...checksum after hashing g_498[i][j] : 972DD29A +index = [1][0] +...checksum after hashing g_498[i][j] : ED4E4369 +index = [1][1] +...checksum after hashing g_498[i][j] : 3ECB0215 +index = [1][2] +...checksum after hashing g_498[i][j] : 14D4D894 +index = [1][3] +...checksum after hashing g_498[i][j] : BE04F0E5 +index = [1][4] +...checksum after hashing g_498[i][j] : D4F19698 +index = [1][5] +...checksum after hashing g_498[i][j] : 7DDAA372 +index = [1][6] +...checksum after hashing g_498[i][j] : 59F18414 +index = [1][7] +...checksum after hashing g_498[i][j] : D9A8B5C7 +index = [1][8] +...checksum after hashing g_498[i][j] : 4E21492A +index = [1][9] +...checksum after hashing g_498[i][j] : 4075D070 +index = [2][0] +...checksum after hashing g_498[i][j] : 3DDDA670 +index = [2][1] +...checksum after hashing g_498[i][j] : 604C0346 +index = [2][2] +...checksum after hashing g_498[i][j] : 34BF6090 +index = [2][3] +...checksum after hashing g_498[i][j] : 474C5ABE +index = [2][4] +...checksum after hashing g_498[i][j] : E0D34938 +index = [2][5] +...checksum after hashing g_498[i][j] : 30627AEF +index = [2][6] +...checksum after hashing g_498[i][j] : B0F2AA4F +index = [2][7] +...checksum after hashing g_498[i][j] : 58C5F91 +index = [2][8] +...checksum after hashing g_498[i][j] : 7ABF337B +index = [2][9] +...checksum after hashing g_498[i][j] : A4D40610 +index = [3][0] +...checksum after hashing g_498[i][j] : 9F84B338 +index = [3][1] +...checksum after hashing g_498[i][j] : 77A036D6 +index = [3][2] +...checksum after hashing g_498[i][j] : DA479F68 +index = [3][3] +...checksum after hashing g_498[i][j] : 21D1F4D1 +index = [3][4] +...checksum after hashing g_498[i][j] : 304EEE3D +index = [3][5] +...checksum after hashing g_498[i][j] : 99B7E7BB +index = [3][6] +...checksum after hashing g_498[i][j] : 5213330F +index = [3][7] +...checksum after hashing g_498[i][j] : 653BC52A +index = [3][8] +...checksum after hashing g_498[i][j] : A67E9EE1 +index = [3][9] +...checksum after hashing g_498[i][j] : FA0DB113 +index = [4][0] +...checksum after hashing g_498[i][j] : 9109F6E6 +index = [4][1] +...checksum after hashing g_498[i][j] : AEEF7C56 +index = [4][2] +...checksum after hashing g_498[i][j] : C2FD18FF +index = [4][3] +...checksum after hashing g_498[i][j] : E87AFEAD +index = [4][4] +...checksum after hashing g_498[i][j] : B37B6BF9 +index = [4][5] +...checksum after hashing g_498[i][j] : 51E657AD +index = [4][6] +...checksum after hashing g_498[i][j] : D420E3CB +index = [4][7] +...checksum after hashing g_498[i][j] : E12DCA6E +index = [4][8] +...checksum after hashing g_498[i][j] : 4F19E458 +index = [4][9] +...checksum after hashing g_498[i][j] : 307BFA39 +index = [5][0] +...checksum after hashing g_498[i][j] : 209D2E43 +index = [5][1] +...checksum after hashing g_498[i][j] : FE8B3DED +index = [5][2] +...checksum after hashing g_498[i][j] : 132CC9C4 +index = [5][3] +...checksum after hashing g_498[i][j] : 2AECC816 +index = [5][4] +...checksum after hashing g_498[i][j] : B9FB540 +index = [5][5] +...checksum after hashing g_498[i][j] : 492343D1 +index = [5][6] +...checksum after hashing g_498[i][j] : 4B074C1E +index = [5][7] +...checksum after hashing g_498[i][j] : 98F6A528 +index = [5][8] +...checksum after hashing g_498[i][j] : F9F8BAE8 +index = [5][9] +...checksum after hashing g_498[i][j] : 2E4C630D +index = [6][0] +...checksum after hashing g_498[i][j] : C71E5F9D +index = [6][1] +...checksum after hashing g_498[i][j] : 43F34D73 +index = [6][2] +...checksum after hashing g_498[i][j] : 48740BCC +index = [6][3] +...checksum after hashing g_498[i][j] : F3A8FDF7 +index = [6][4] +...checksum after hashing g_498[i][j] : 2CE65417 +index = [6][5] +...checksum after hashing g_498[i][j] : EC2EB989 +index = [6][6] +...checksum after hashing g_498[i][j] : EEFFB47F +index = [6][7] +...checksum after hashing g_498[i][j] : DA622BF4 +index = [6][8] +...checksum after hashing g_498[i][j] : F32EE5E1 +index = [6][9] +...checksum after hashing g_498[i][j] : 313CE8D +index = [7][0] +...checksum after hashing g_498[i][j] : 831B3A7B +index = [7][1] +...checksum after hashing g_498[i][j] : F23D2B90 +index = [7][2] +...checksum after hashing g_498[i][j] : 29FB2B52 +index = [7][3] +...checksum after hashing g_498[i][j] : 10D4F8CA +index = [7][4] +...checksum after hashing g_498[i][j] : 92E533B8 +index = [7][5] +...checksum after hashing g_498[i][j] : B34AA037 +index = [7][6] +...checksum after hashing g_498[i][j] : FAE0F7EF +index = [7][7] +...checksum after hashing g_498[i][j] : C27E232A +index = [7][8] +...checksum after hashing g_498[i][j] : CEADBFF8 +index = [7][9] +...checksum after hashing g_498[i][j] : 7EFFA67 +index = [8][0] +...checksum after hashing g_498[i][j] : A6DFBCC3 +index = [8][1] +...checksum after hashing g_498[i][j] : 2BD1ECDA +index = [8][2] +...checksum after hashing g_498[i][j] : 4476C55E +index = [8][3] +...checksum after hashing g_498[i][j] : 4450413B +index = [8][4] +...checksum after hashing g_498[i][j] : 55594F47 +index = [8][5] +...checksum after hashing g_498[i][j] : 7DD48155 +index = [8][6] +...checksum after hashing g_498[i][j] : C15EAC93 +index = [8][7] +...checksum after hashing g_498[i][j] : 4833974D +index = [8][8] +...checksum after hashing g_498[i][j] : E2B17DF8 +index = [8][9] +...checksum after hashing g_499 : A99C8E13 +...checksum after hashing g_500 : 53E347FD +...checksum after hashing g_520 : 2CA52B3C +before stmt(285): checksum = 2CA52B3C +...checksum after hashing g_2[i] : 33F170F2 +index = [0] +...checksum after hashing g_7 : F22D3340 +...checksum after hashing g_77 : EC65D560 +...checksum after hashing g_78 : 8A1F26FE +...checksum after hashing g_82 : 3B6871F +...checksum after hashing g_83 : A888663 +...checksum after hashing g_121 : 205B3B7D +...checksum after hashing g_162 : 99953B02 +...checksum after hashing g_232 : 85252730 +...checksum after hashing g_234 : BC278F4C +...checksum after hashing g_237 : 44B0CCA1 +...checksum after hashing g_238 : 61EE820C +...checksum after hashing g_250 : 57550BD +...checksum after hashing g_269 : 5E793E34 +...checksum after hashing g_274 : B3675A09 +...checksum after hashing g_289[i] : FD0F43C3 +index = [0] +...checksum after hashing g_289[i] : CB485866 +index = [1] +...checksum after hashing g_289[i] : 69B0D6FE +index = [2] +...checksum after hashing g_289[i] : A6EEE72B +index = [3] +...checksum after hashing g_289[i] : BD2E8EDC +index = [4] +...checksum after hashing g_289[i] : 18BA29AA +index = [5] +...checksum after hashing g_289[i] : 81F4E213 +index = [6] +...checksum after hashing g_293 : 4667337D +...checksum after hashing g_315 : CD2E44B0 +...checksum after hashing g_369 : 1DCB64DE +...checksum after hashing g_375 : E3191016 +...checksum after hashing g_378 : EA136EF5 +...checksum after hashing g_379 : 9318A74B +...checksum after hashing g_386[i] : 6DA5E150 +index = [0] +...checksum after hashing g_386[i] : 1ED027B4 +index = [1] +...checksum after hashing g_386[i] : C2BF5EFA +index = [2] +...checksum after hashing g_386[i] : 440235A +index = [3] +...checksum after hashing g_386[i] : 7F35B34D +index = [4] +...checksum after hashing g_386[i] : 5163A97A +index = [5] +...checksum after hashing g_386[i] : 960D503F +index = [6] +...checksum after hashing g_386[i] : F5B849B3 +index = [7] +...checksum after hashing g_387[i][j] : 3FD2DD48 +index = [0][0] +...checksum after hashing g_387[i][j] : 700CF441 +index = [0][1] +...checksum after hashing g_387[i][j] : C3407234 +index = [0][2] +...checksum after hashing g_387[i][j] : 74BDA797 +index = [0][3] +...checksum after hashing g_387[i][j] : 54365F78 +index = [1][0] +...checksum after hashing g_387[i][j] : 82E44D36 +index = [1][1] +...checksum after hashing g_387[i][j] : 3A33C55A +index = [1][2] +...checksum after hashing g_387[i][j] : AF26AFBF +index = [1][3] +...checksum after hashing g_387[i][j] : BC17D19C +index = [2][0] +...checksum after hashing g_387[i][j] : 121CD27A +index = [2][1] +...checksum after hashing g_387[i][j] : 31D425E3 +index = [2][2] +...checksum after hashing g_387[i][j] : E053C2AC +index = [2][3] +...checksum after hashing g_387[i][j] : A9FA02C +index = [3][0] +...checksum after hashing g_387[i][j] : 8B059A7D +index = [3][1] +...checksum after hashing g_387[i][j] : C05943DA +index = [3][2] +...checksum after hashing g_387[i][j] : 65BDE699 +index = [3][3] +...checksum after hashing g_387[i][j] : AF01EF4E +index = [4][0] +...checksum after hashing g_387[i][j] : 28929FFB +index = [4][1] +...checksum after hashing g_387[i][j] : 7F7F8659 +index = [4][2] +...checksum after hashing g_387[i][j] : 953586DE +index = [4][3] +...checksum after hashing g_387[i][j] : AFF2A4B5 +index = [5][0] +...checksum after hashing g_387[i][j] : 3AABDE02 +index = [5][1] +...checksum after hashing g_387[i][j] : 874C471 +index = [5][2] +...checksum after hashing g_387[i][j] : AE3865F5 +index = [5][3] +...checksum after hashing g_387[i][j] : 77C0751A +index = [6][0] +...checksum after hashing g_387[i][j] : C69086C1 +index = [6][1] +...checksum after hashing g_387[i][j] : 869AAB9E +index = [6][2] +...checksum after hashing g_387[i][j] : A952C8C3 +index = [6][3] +...checksum after hashing g_387[i][j] : 72560ADA +index = [7][0] +...checksum after hashing g_387[i][j] : B8019EB9 +index = [7][1] +...checksum after hashing g_387[i][j] : E5C33645 +index = [7][2] +...checksum after hashing g_387[i][j] : 120E0B07 +index = [7][3] +...checksum after hashing g_401 : 5D8CAC8E +...checksum after hashing g_448 : A0F760FD +...checksum after hashing g_452[i] : 90B40ED4 +index = [0] +...checksum after hashing g_452[i] : 99A5B1F +index = [1] +...checksum after hashing g_452[i] : BBA583B0 +index = [2] +...checksum after hashing g_452[i] : AB5669C8 +index = [3] +...checksum after hashing g_498[i][j] : B450E6E5 +index = [0][0] +...checksum after hashing g_498[i][j] : C586C826 +index = [0][1] +...checksum after hashing g_498[i][j] : 264A4BA3 +index = [0][2] +...checksum after hashing g_498[i][j] : 62724EC1 +index = [0][3] +...checksum after hashing g_498[i][j] : FA720451 +index = [0][4] +...checksum after hashing g_498[i][j] : FCF8CFA0 +index = [0][5] +...checksum after hashing g_498[i][j] : CF5F75B0 +index = [0][6] +...checksum after hashing g_498[i][j] : 6F2A55B5 +index = [0][7] +...checksum after hashing g_498[i][j] : D421DED +index = [0][8] +...checksum after hashing g_498[i][j] : 73EA0703 +index = [0][9] +...checksum after hashing g_498[i][j] : 972DD29A +index = [1][0] +...checksum after hashing g_498[i][j] : ED4E4369 +index = [1][1] +...checksum after hashing g_498[i][j] : 3ECB0215 +index = [1][2] +...checksum after hashing g_498[i][j] : 14D4D894 +index = [1][3] +...checksum after hashing g_498[i][j] : BE04F0E5 +index = [1][4] +...checksum after hashing g_498[i][j] : D4F19698 +index = [1][5] +...checksum after hashing g_498[i][j] : 7DDAA372 +index = [1][6] +...checksum after hashing g_498[i][j] : 59F18414 +index = [1][7] +...checksum after hashing g_498[i][j] : D9A8B5C7 +index = [1][8] +...checksum after hashing g_498[i][j] : 4E21492A +index = [1][9] +...checksum after hashing g_498[i][j] : 4075D070 +index = [2][0] +...checksum after hashing g_498[i][j] : 3DDDA670 +index = [2][1] +...checksum after hashing g_498[i][j] : 604C0346 +index = [2][2] +...checksum after hashing g_498[i][j] : 34BF6090 +index = [2][3] +...checksum after hashing g_498[i][j] : 474C5ABE +index = [2][4] +...checksum after hashing g_498[i][j] : E0D34938 +index = [2][5] +...checksum after hashing g_498[i][j] : 30627AEF +index = [2][6] +...checksum after hashing g_498[i][j] : B0F2AA4F +index = [2][7] +...checksum after hashing g_498[i][j] : 58C5F91 +index = [2][8] +...checksum after hashing g_498[i][j] : 7ABF337B +index = [2][9] +...checksum after hashing g_498[i][j] : A4D40610 +index = [3][0] +...checksum after hashing g_498[i][j] : 9F84B338 +index = [3][1] +...checksum after hashing g_498[i][j] : 77A036D6 +index = [3][2] +...checksum after hashing g_498[i][j] : DA479F68 +index = [3][3] +...checksum after hashing g_498[i][j] : 21D1F4D1 +index = [3][4] +...checksum after hashing g_498[i][j] : 304EEE3D +index = [3][5] +...checksum after hashing g_498[i][j] : 99B7E7BB +index = [3][6] +...checksum after hashing g_498[i][j] : 5213330F +index = [3][7] +...checksum after hashing g_498[i][j] : 653BC52A +index = [3][8] +...checksum after hashing g_498[i][j] : A67E9EE1 +index = [3][9] +...checksum after hashing g_498[i][j] : FA0DB113 +index = [4][0] +...checksum after hashing g_498[i][j] : 9109F6E6 +index = [4][1] +...checksum after hashing g_498[i][j] : AEEF7C56 +index = [4][2] +...checksum after hashing g_498[i][j] : C2FD18FF +index = [4][3] +...checksum after hashing g_498[i][j] : E87AFEAD +index = [4][4] +...checksum after hashing g_498[i][j] : B37B6BF9 +index = [4][5] +...checksum after hashing g_498[i][j] : 51E657AD +index = [4][6] +...checksum after hashing g_498[i][j] : D420E3CB +index = [4][7] +...checksum after hashing g_498[i][j] : E12DCA6E +index = [4][8] +...checksum after hashing g_498[i][j] : 4F19E458 +index = [4][9] +...checksum after hashing g_498[i][j] : 307BFA39 +index = [5][0] +...checksum after hashing g_498[i][j] : 209D2E43 +index = [5][1] +...checksum after hashing g_498[i][j] : FE8B3DED +index = [5][2] +...checksum after hashing g_498[i][j] : 132CC9C4 +index = [5][3] +...checksum after hashing g_498[i][j] : 2AECC816 +index = [5][4] +...checksum after hashing g_498[i][j] : B9FB540 +index = [5][5] +...checksum after hashing g_498[i][j] : 492343D1 +index = [5][6] +...checksum after hashing g_498[i][j] : 4B074C1E +index = [5][7] +...checksum after hashing g_498[i][j] : 98F6A528 +index = [5][8] +...checksum after hashing g_498[i][j] : F9F8BAE8 +index = [5][9] +...checksum after hashing g_498[i][j] : 2E4C630D +index = [6][0] +...checksum after hashing g_498[i][j] : C71E5F9D +index = [6][1] +...checksum after hashing g_498[i][j] : 43F34D73 +index = [6][2] +...checksum after hashing g_498[i][j] : 48740BCC +index = [6][3] +...checksum after hashing g_498[i][j] : F3A8FDF7 +index = [6][4] +...checksum after hashing g_498[i][j] : 2CE65417 +index = [6][5] +...checksum after hashing g_498[i][j] : EC2EB989 +index = [6][6] +...checksum after hashing g_498[i][j] : EEFFB47F +index = [6][7] +...checksum after hashing g_498[i][j] : DA622BF4 +index = [6][8] +...checksum after hashing g_498[i][j] : F32EE5E1 +index = [6][9] +...checksum after hashing g_498[i][j] : 313CE8D +index = [7][0] +...checksum after hashing g_498[i][j] : 831B3A7B +index = [7][1] +...checksum after hashing g_498[i][j] : F23D2B90 +index = [7][2] +...checksum after hashing g_498[i][j] : 29FB2B52 +index = [7][3] +...checksum after hashing g_498[i][j] : 10D4F8CA +index = [7][4] +...checksum after hashing g_498[i][j] : 92E533B8 +index = [7][5] +...checksum after hashing g_498[i][j] : B34AA037 +index = [7][6] +...checksum after hashing g_498[i][j] : FAE0F7EF +index = [7][7] +...checksum after hashing g_498[i][j] : C27E232A +index = [7][8] +...checksum after hashing g_498[i][j] : CEADBFF8 +index = [7][9] +...checksum after hashing g_498[i][j] : 7EFFA67 +index = [8][0] +...checksum after hashing g_498[i][j] : A6DFBCC3 +index = [8][1] +...checksum after hashing g_498[i][j] : 2BD1ECDA +index = [8][2] +...checksum after hashing g_498[i][j] : 4476C55E +index = [8][3] +...checksum after hashing g_498[i][j] : 4450413B +index = [8][4] +...checksum after hashing g_498[i][j] : 55594F47 +index = [8][5] +...checksum after hashing g_498[i][j] : 7DD48155 +index = [8][6] +...checksum after hashing g_498[i][j] : C15EAC93 +index = [8][7] +...checksum after hashing g_498[i][j] : 4833974D +index = [8][8] +...checksum after hashing g_498[i][j] : E2B17DF8 +index = [8][9] +...checksum after hashing g_499 : A99C8E13 +...checksum after hashing g_500 : 53E347FD +...checksum after hashing g_520 : 2CA52B3C +checksum = 2ca52b3c diff --git a/src/tests/csmith/rand102.c b/src/tests/csmith/rand102.c new file mode 100644 index 0000000..ee89e94 --- /dev/null +++ b/src/tests/csmith/rand102.c @@ -0,0 +1,95 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static int g_2 = 0L; +static int g_5 = 0xA3A11C15L; +static unsigned char func_1(void); +static unsigned char func_1(void) +{ + unsigned l_3 = 0xA4F402E3L; + int *l_4 = &g_5; + int l_6 = 0x4AD72D76L; + step_hash(1); + (*l_4) &= (g_2 ^ (l_3 && g_2)); + step_hash(2); + return l_6; +} +void csmith_compute_hash(void) +{ + transparent_crc(g_2, "g_2", print_hash_value); + transparent_crc(g_5, "g_5", print_hash_value); +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand102.expect b/src/tests/csmith/rand102.expect new file mode 100644 index 0000000..2eed40b --- /dev/null +++ b/src/tests/csmith/rand102.expect @@ -0,0 +1,9 @@ +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_5 : EF1A5D2A +before stmt(1): checksum = EF1A5D2A +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_5 : 6522DF69 +before stmt(2): checksum = 6522DF69 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_5 : 6522DF69 +checksum = 6522df69 diff --git a/src/tests/csmith/rand103.c b/src/tests/csmith/rand103.c new file mode 100644 index 0000000..34b36ae --- /dev/null +++ b/src/tests/csmith/rand103.c @@ -0,0 +1,91 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static signed char g_5 = 0x6FL; +static short func_1(void); +static short func_1(void) +{ + int l_2 = 0x5252CB13L; + step_hash(1); + l_2 = (l_2 && (l_2 || ((unsigned)0x2EAC4530L - (unsigned)g_5))); + step_hash(2); + return g_5; +} +void csmith_compute_hash(void) +{ + transparent_crc(g_5, "g_5", print_hash_value); +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand103.expect b/src/tests/csmith/rand103.expect new file mode 100644 index 0000000..4b5d9e2 --- /dev/null +++ b/src/tests/csmith/rand103.expect @@ -0,0 +1,6 @@ +...checksum after hashing g_5 : 42013849 +before stmt(1): checksum = 42013849 +...checksum after hashing g_5 : 42013849 +before stmt(2): checksum = 42013849 +...checksum after hashing g_5 : 42013849 +checksum = 42013849 diff --git a/src/tests/csmith/rand104.c b/src/tests/csmith/rand104.c new file mode 100644 index 0000000..6ca3c6c --- /dev/null +++ b/src/tests/csmith/rand104.c @@ -0,0 +1,115 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static int g_3[7][8] = {{0x4A025691L, 7L, 0x4A025691L, 7L, 0x4A025691L, 7L, 0x4A025691L, 7L}, {0x4A025691L, 7L, 0x4A025691L, 7L, 0x4A025691L, 7L, 0x4A025691L, 7L}, {0x4A025691L, 7L, 0x4A025691L, 7L, 0x4A025691L, 7L, 0x4A025691L, 7L}, {0x4A025691L, 7L, 0x4A025691L, 7L, 0x4A025691L, 7L, 0x4A025691L, 7L}, {0x4A025691L, 7L, 0x4A025691L, 7L, 0x4A025691L, 7L, 0x4A025691L, 7L}, {0x4A025691L, 7L, 0x4A025691L, 7L, 0x4A025691L, 7L, 0x4A025691L, 7L}, {0x4A025691L, 7L, 0x4A025691L, 7L, 0x4A025691L, 7L, 0x4A025691L, 7L}}; +static int g_11 = (-8L); +static signed char func_1(void); +static signed char func_1(void) +{ + int *l_2 = &g_3[1][5]; + int **l_4 = &l_2; + int l_5 = 0x6DEEC541L; + int *l_6 = &g_3[0][4]; + int *l_7[7][2]; + unsigned l_8 = 0x78150149L; + int i, j; + for (i = 0; i < 7; i++) + { + for (j = 0; j < 2; j++) + l_7[i][j] = &g_3[1][5]; + } + step_hash(1); + (*l_4) = l_2; + step_hash(2); + ++l_8; + step_hash(3); + return g_11; +} +void csmith_compute_hash(void) +{ + int i, j; + for (i = 0; i < 7; i++) + { + for (j = 0; j < 8; j++) + { + transparent_crc(g_3[i][j], "g_3[i][j]", print_hash_value); + if (print_hash_value) printf("index = [%d][%d]\n", i, j); + } + } + transparent_crc(g_11, "g_11", print_hash_value); +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int i, j; + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand104.expect b/src/tests/csmith/rand104.expect new file mode 100644 index 0000000..764fcaf --- /dev/null +++ b/src/tests/csmith/rand104.expect @@ -0,0 +1,456 @@ +...checksum after hashing g_3[i][j] : E8B6C1D3 +index = [0][0] +...checksum after hashing g_3[i][j] : 4516ED1 +index = [0][1] +...checksum after hashing g_3[i][j] : 90DA5109 +index = [0][2] +...checksum after hashing g_3[i][j] : 273D5279 +index = [0][3] +...checksum after hashing g_3[i][j] : 5E5B29CE +index = [0][4] +...checksum after hashing g_3[i][j] : C801FB93 +index = [0][5] +...checksum after hashing g_3[i][j] : 7276686B +index = [0][6] +...checksum after hashing g_3[i][j] : D11EC35F +index = [0][7] +...checksum after hashing g_3[i][j] : CDA42BA3 +index = [1][0] +...checksum after hashing g_3[i][j] : F8EB3FAF +index = [1][1] +...checksum after hashing g_3[i][j] : DC653A24 +index = [1][2] +...checksum after hashing g_3[i][j] : 2DD0BE97 +index = [1][3] +...checksum after hashing g_3[i][j] : C30652BE +index = [1][4] +...checksum after hashing g_3[i][j] : 7A31105E +index = [1][5] +...checksum after hashing g_3[i][j] : A9CF85A2 +index = [1][6] +...checksum after hashing g_3[i][j] : 5F673F8D +index = [1][7] +...checksum after hashing g_3[i][j] : 9DABC9D +index = [2][0] +...checksum after hashing g_3[i][j] : 3DF64C99 +index = [2][1] +...checksum after hashing g_3[i][j] : 4BF01173 +index = [2][2] +...checksum after hashing g_3[i][j] : 2D4F5835 +index = [2][3] +...checksum after hashing g_3[i][j] : 7FD2B9F7 +index = [2][4] +...checksum after hashing g_3[i][j] : 1E19C714 +index = [2][5] +...checksum after hashing g_3[i][j] : C22215A5 +index = [2][6] +...checksum after hashing g_3[i][j] : E138AB5 +index = [2][7] +...checksum after hashing g_3[i][j] : A8EF8DB8 +index = [3][0] +...checksum after hashing g_3[i][j] : 8C53CDFA +index = [3][1] +...checksum after hashing g_3[i][j] : ED82F39F +index = [3][2] +...checksum after hashing g_3[i][j] : 393CBFD2 +index = [3][3] +...checksum after hashing g_3[i][j] : 861FF81B +index = [3][4] +...checksum after hashing g_3[i][j] : 49DD3DD8 +index = [3][5] +...checksum after hashing g_3[i][j] : 1C736400 +index = [3][6] +...checksum after hashing g_3[i][j] : E35EF223 +index = [3][7] +...checksum after hashing g_3[i][j] : F14AA5A5 +index = [4][0] +...checksum after hashing g_3[i][j] : D9B9F41C +index = [4][1] +...checksum after hashing g_3[i][j] : 8ABC8D79 +index = [4][2] +...checksum after hashing g_3[i][j] : 6540BEA +index = [4][3] +...checksum after hashing g_3[i][j] : 6A95B20B +index = [4][4] +...checksum after hashing g_3[i][j] : C19BCC3 +index = [4][5] +...checksum after hashing g_3[i][j] : D2BC627C +index = [4][6] +...checksum after hashing g_3[i][j] : F684B583 +index = [4][7] +...checksum after hashing g_3[i][j] : DFFEEE9B +index = [5][0] +...checksum after hashing g_3[i][j] : E9FD7FDC +index = [5][1] +...checksum after hashing g_3[i][j] : A35D2DB3 +index = [5][2] +...checksum after hashing g_3[i][j] : C30B0229 +index = [5][3] +...checksum after hashing g_3[i][j] : D791BFC8 +index = [5][4] +...checksum after hashing g_3[i][j] : B185644D +index = [5][5] +...checksum after hashing g_3[i][j] : 3484CDDB +index = [5][6] +...checksum after hashing g_3[i][j] : AAEA75D4 +index = [5][7] +...checksum after hashing g_3[i][j] : 81281436 +index = [6][0] +...checksum after hashing g_3[i][j] : B51E5668 +index = [6][1] +...checksum after hashing g_3[i][j] : 115F34E1 +index = [6][2] +...checksum after hashing g_3[i][j] : A6A1EDDD +index = [6][3] +...checksum after hashing g_3[i][j] : 151B6811 +index = [6][4] +...checksum after hashing g_3[i][j] : D61962B6 +index = [6][5] +...checksum after hashing g_3[i][j] : 6F4C1122 +index = [6][6] +...checksum after hashing g_3[i][j] : 2A8D3597 +index = [6][7] +...checksum after hashing g_11 : 358916F0 +before stmt(1): checksum = 358916F0 +...checksum after hashing g_3[i][j] : E8B6C1D3 +index = [0][0] +...checksum after hashing g_3[i][j] : 4516ED1 +index = [0][1] +...checksum after hashing g_3[i][j] : 90DA5109 +index = [0][2] +...checksum after hashing g_3[i][j] : 273D5279 +index = [0][3] +...checksum after hashing g_3[i][j] : 5E5B29CE +index = [0][4] +...checksum after hashing g_3[i][j] : C801FB93 +index = [0][5] +...checksum after hashing g_3[i][j] : 7276686B +index = [0][6] +...checksum after hashing g_3[i][j] : D11EC35F +index = [0][7] +...checksum after hashing g_3[i][j] : CDA42BA3 +index = [1][0] +...checksum after hashing g_3[i][j] : F8EB3FAF +index = [1][1] +...checksum after hashing g_3[i][j] : DC653A24 +index = [1][2] +...checksum after hashing g_3[i][j] : 2DD0BE97 +index = [1][3] +...checksum after hashing g_3[i][j] : C30652BE +index = [1][4] +...checksum after hashing g_3[i][j] : 7A31105E +index = [1][5] +...checksum after hashing g_3[i][j] : A9CF85A2 +index = [1][6] +...checksum after hashing g_3[i][j] : 5F673F8D +index = [1][7] +...checksum after hashing g_3[i][j] : 9DABC9D +index = [2][0] +...checksum after hashing g_3[i][j] : 3DF64C99 +index = [2][1] +...checksum after hashing g_3[i][j] : 4BF01173 +index = [2][2] +...checksum after hashing g_3[i][j] : 2D4F5835 +index = [2][3] +...checksum after hashing g_3[i][j] : 7FD2B9F7 +index = [2][4] +...checksum after hashing g_3[i][j] : 1E19C714 +index = [2][5] +...checksum after hashing g_3[i][j] : C22215A5 +index = [2][6] +...checksum after hashing g_3[i][j] : E138AB5 +index = [2][7] +...checksum after hashing g_3[i][j] : A8EF8DB8 +index = [3][0] +...checksum after hashing g_3[i][j] : 8C53CDFA +index = [3][1] +...checksum after hashing g_3[i][j] : ED82F39F +index = [3][2] +...checksum after hashing g_3[i][j] : 393CBFD2 +index = [3][3] +...checksum after hashing g_3[i][j] : 861FF81B +index = [3][4] +...checksum after hashing g_3[i][j] : 49DD3DD8 +index = [3][5] +...checksum after hashing g_3[i][j] : 1C736400 +index = [3][6] +...checksum after hashing g_3[i][j] : E35EF223 +index = [3][7] +...checksum after hashing g_3[i][j] : F14AA5A5 +index = [4][0] +...checksum after hashing g_3[i][j] : D9B9F41C +index = [4][1] +...checksum after hashing g_3[i][j] : 8ABC8D79 +index = [4][2] +...checksum after hashing g_3[i][j] : 6540BEA +index = [4][3] +...checksum after hashing g_3[i][j] : 6A95B20B +index = [4][4] +...checksum after hashing g_3[i][j] : C19BCC3 +index = [4][5] +...checksum after hashing g_3[i][j] : D2BC627C +index = [4][6] +...checksum after hashing g_3[i][j] : F684B583 +index = [4][7] +...checksum after hashing g_3[i][j] : DFFEEE9B +index = [5][0] +...checksum after hashing g_3[i][j] : E9FD7FDC +index = [5][1] +...checksum after hashing g_3[i][j] : A35D2DB3 +index = [5][2] +...checksum after hashing g_3[i][j] : C30B0229 +index = [5][3] +...checksum after hashing g_3[i][j] : D791BFC8 +index = [5][4] +...checksum after hashing g_3[i][j] : B185644D +index = [5][5] +...checksum after hashing g_3[i][j] : 3484CDDB +index = [5][6] +...checksum after hashing g_3[i][j] : AAEA75D4 +index = [5][7] +...checksum after hashing g_3[i][j] : 81281436 +index = [6][0] +...checksum after hashing g_3[i][j] : B51E5668 +index = [6][1] +...checksum after hashing g_3[i][j] : 115F34E1 +index = [6][2] +...checksum after hashing g_3[i][j] : A6A1EDDD +index = [6][3] +...checksum after hashing g_3[i][j] : 151B6811 +index = [6][4] +...checksum after hashing g_3[i][j] : D61962B6 +index = [6][5] +...checksum after hashing g_3[i][j] : 6F4C1122 +index = [6][6] +...checksum after hashing g_3[i][j] : 2A8D3597 +index = [6][7] +...checksum after hashing g_11 : 358916F0 +before stmt(2): checksum = 358916F0 +...checksum after hashing g_3[i][j] : E8B6C1D3 +index = [0][0] +...checksum after hashing g_3[i][j] : 4516ED1 +index = [0][1] +...checksum after hashing g_3[i][j] : 90DA5109 +index = [0][2] +...checksum after hashing g_3[i][j] : 273D5279 +index = [0][3] +...checksum after hashing g_3[i][j] : 5E5B29CE +index = [0][4] +...checksum after hashing g_3[i][j] : C801FB93 +index = [0][5] +...checksum after hashing g_3[i][j] : 7276686B +index = [0][6] +...checksum after hashing g_3[i][j] : D11EC35F +index = [0][7] +...checksum after hashing g_3[i][j] : CDA42BA3 +index = [1][0] +...checksum after hashing g_3[i][j] : F8EB3FAF +index = [1][1] +...checksum after hashing g_3[i][j] : DC653A24 +index = [1][2] +...checksum after hashing g_3[i][j] : 2DD0BE97 +index = [1][3] +...checksum after hashing g_3[i][j] : C30652BE +index = [1][4] +...checksum after hashing g_3[i][j] : 7A31105E +index = [1][5] +...checksum after hashing g_3[i][j] : A9CF85A2 +index = [1][6] +...checksum after hashing g_3[i][j] : 5F673F8D +index = [1][7] +...checksum after hashing g_3[i][j] : 9DABC9D +index = [2][0] +...checksum after hashing g_3[i][j] : 3DF64C99 +index = [2][1] +...checksum after hashing g_3[i][j] : 4BF01173 +index = [2][2] +...checksum after hashing g_3[i][j] : 2D4F5835 +index = [2][3] +...checksum after hashing g_3[i][j] : 7FD2B9F7 +index = [2][4] +...checksum after hashing g_3[i][j] : 1E19C714 +index = [2][5] +...checksum after hashing g_3[i][j] : C22215A5 +index = [2][6] +...checksum after hashing g_3[i][j] : E138AB5 +index = [2][7] +...checksum after hashing g_3[i][j] : A8EF8DB8 +index = [3][0] +...checksum after hashing g_3[i][j] : 8C53CDFA +index = [3][1] +...checksum after hashing g_3[i][j] : ED82F39F +index = [3][2] +...checksum after hashing g_3[i][j] : 393CBFD2 +index = [3][3] +...checksum after hashing g_3[i][j] : 861FF81B +index = [3][4] +...checksum after hashing g_3[i][j] : 49DD3DD8 +index = [3][5] +...checksum after hashing g_3[i][j] : 1C736400 +index = [3][6] +...checksum after hashing g_3[i][j] : E35EF223 +index = [3][7] +...checksum after hashing g_3[i][j] : F14AA5A5 +index = [4][0] +...checksum after hashing g_3[i][j] : D9B9F41C +index = [4][1] +...checksum after hashing g_3[i][j] : 8ABC8D79 +index = [4][2] +...checksum after hashing g_3[i][j] : 6540BEA +index = [4][3] +...checksum after hashing g_3[i][j] : 6A95B20B +index = [4][4] +...checksum after hashing g_3[i][j] : C19BCC3 +index = [4][5] +...checksum after hashing g_3[i][j] : D2BC627C +index = [4][6] +...checksum after hashing g_3[i][j] : F684B583 +index = [4][7] +...checksum after hashing g_3[i][j] : DFFEEE9B +index = [5][0] +...checksum after hashing g_3[i][j] : E9FD7FDC +index = [5][1] +...checksum after hashing g_3[i][j] : A35D2DB3 +index = [5][2] +...checksum after hashing g_3[i][j] : C30B0229 +index = [5][3] +...checksum after hashing g_3[i][j] : D791BFC8 +index = [5][4] +...checksum after hashing g_3[i][j] : B185644D +index = [5][5] +...checksum after hashing g_3[i][j] : 3484CDDB +index = [5][6] +...checksum after hashing g_3[i][j] : AAEA75D4 +index = [5][7] +...checksum after hashing g_3[i][j] : 81281436 +index = [6][0] +...checksum after hashing g_3[i][j] : B51E5668 +index = [6][1] +...checksum after hashing g_3[i][j] : 115F34E1 +index = [6][2] +...checksum after hashing g_3[i][j] : A6A1EDDD +index = [6][3] +...checksum after hashing g_3[i][j] : 151B6811 +index = [6][4] +...checksum after hashing g_3[i][j] : D61962B6 +index = [6][5] +...checksum after hashing g_3[i][j] : 6F4C1122 +index = [6][6] +...checksum after hashing g_3[i][j] : 2A8D3597 +index = [6][7] +...checksum after hashing g_11 : 358916F0 +before stmt(3): checksum = 358916F0 +...checksum after hashing g_3[i][j] : E8B6C1D3 +index = [0][0] +...checksum after hashing g_3[i][j] : 4516ED1 +index = [0][1] +...checksum after hashing g_3[i][j] : 90DA5109 +index = [0][2] +...checksum after hashing g_3[i][j] : 273D5279 +index = [0][3] +...checksum after hashing g_3[i][j] : 5E5B29CE +index = [0][4] +...checksum after hashing g_3[i][j] : C801FB93 +index = [0][5] +...checksum after hashing g_3[i][j] : 7276686B +index = [0][6] +...checksum after hashing g_3[i][j] : D11EC35F +index = [0][7] +...checksum after hashing g_3[i][j] : CDA42BA3 +index = [1][0] +...checksum after hashing g_3[i][j] : F8EB3FAF +index = [1][1] +...checksum after hashing g_3[i][j] : DC653A24 +index = [1][2] +...checksum after hashing g_3[i][j] : 2DD0BE97 +index = [1][3] +...checksum after hashing g_3[i][j] : C30652BE +index = [1][4] +...checksum after hashing g_3[i][j] : 7A31105E +index = [1][5] +...checksum after hashing g_3[i][j] : A9CF85A2 +index = [1][6] +...checksum after hashing g_3[i][j] : 5F673F8D +index = [1][7] +...checksum after hashing g_3[i][j] : 9DABC9D +index = [2][0] +...checksum after hashing g_3[i][j] : 3DF64C99 +index = [2][1] +...checksum after hashing g_3[i][j] : 4BF01173 +index = [2][2] +...checksum after hashing g_3[i][j] : 2D4F5835 +index = [2][3] +...checksum after hashing g_3[i][j] : 7FD2B9F7 +index = [2][4] +...checksum after hashing g_3[i][j] : 1E19C714 +index = [2][5] +...checksum after hashing g_3[i][j] : C22215A5 +index = [2][6] +...checksum after hashing g_3[i][j] : E138AB5 +index = [2][7] +...checksum after hashing g_3[i][j] : A8EF8DB8 +index = [3][0] +...checksum after hashing g_3[i][j] : 8C53CDFA +index = [3][1] +...checksum after hashing g_3[i][j] : ED82F39F +index = [3][2] +...checksum after hashing g_3[i][j] : 393CBFD2 +index = [3][3] +...checksum after hashing g_3[i][j] : 861FF81B +index = [3][4] +...checksum after hashing g_3[i][j] : 49DD3DD8 +index = [3][5] +...checksum after hashing g_3[i][j] : 1C736400 +index = [3][6] +...checksum after hashing g_3[i][j] : E35EF223 +index = [3][7] +...checksum after hashing g_3[i][j] : F14AA5A5 +index = [4][0] +...checksum after hashing g_3[i][j] : D9B9F41C +index = [4][1] +...checksum after hashing g_3[i][j] : 8ABC8D79 +index = [4][2] +...checksum after hashing g_3[i][j] : 6540BEA +index = [4][3] +...checksum after hashing g_3[i][j] : 6A95B20B +index = [4][4] +...checksum after hashing g_3[i][j] : C19BCC3 +index = [4][5] +...checksum after hashing g_3[i][j] : D2BC627C +index = [4][6] +...checksum after hashing g_3[i][j] : F684B583 +index = [4][7] +...checksum after hashing g_3[i][j] : DFFEEE9B +index = [5][0] +...checksum after hashing g_3[i][j] : E9FD7FDC +index = [5][1] +...checksum after hashing g_3[i][j] : A35D2DB3 +index = [5][2] +...checksum after hashing g_3[i][j] : C30B0229 +index = [5][3] +...checksum after hashing g_3[i][j] : D791BFC8 +index = [5][4] +...checksum after hashing g_3[i][j] : B185644D +index = [5][5] +...checksum after hashing g_3[i][j] : 3484CDDB +index = [5][6] +...checksum after hashing g_3[i][j] : AAEA75D4 +index = [5][7] +...checksum after hashing g_3[i][j] : 81281436 +index = [6][0] +...checksum after hashing g_3[i][j] : B51E5668 +index = [6][1] +...checksum after hashing g_3[i][j] : 115F34E1 +index = [6][2] +...checksum after hashing g_3[i][j] : A6A1EDDD +index = [6][3] +...checksum after hashing g_3[i][j] : 151B6811 +index = [6][4] +...checksum after hashing g_3[i][j] : D61962B6 +index = [6][5] +...checksum after hashing g_3[i][j] : 6F4C1122 +index = [6][6] +...checksum after hashing g_3[i][j] : 2A8D3597 +index = [6][7] +...checksum after hashing g_11 : 358916F0 +checksum = 358916f0 diff --git a/src/tests/csmith/rand105.c b/src/tests/csmith/rand105.c new file mode 100644 index 0000000..207cc31 --- /dev/null +++ b/src/tests/csmith/rand105.c @@ -0,0 +1,96 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static int g_4 = (-7L); +static unsigned char g_5 = 5UL; +static unsigned func_1(void); +static unsigned func_1(void) +{ + unsigned l_2 = 0x36951AD3L; + int *l_3 = &g_4; + step_hash(1); + (*l_3) &= ((l_2 ^ l_2) != 0x57L); + step_hash(2); + g_5 |= (*l_3); + step_hash(3); + return g_5; +} +void csmith_compute_hash(void) +{ + transparent_crc(g_4, "g_4", print_hash_value); + transparent_crc(g_5, "g_5", print_hash_value); +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand105.expect b/src/tests/csmith/rand105.expect new file mode 100644 index 0000000..b5bd2e2 --- /dev/null +++ b/src/tests/csmith/rand105.expect @@ -0,0 +1,12 @@ +...checksum after hashing g_4 : DA94A023 +...checksum after hashing g_5 : E4E064A +before stmt(1): checksum = E4E064A +...checksum after hashing g_4 : 99F8B879 +...checksum after hashing g_5 : 9E562FC5 +before stmt(2): checksum = 9E562FC5 +...checksum after hashing g_4 : 99F8B879 +...checksum after hashing g_5 : 9E562FC5 +before stmt(3): checksum = 9E562FC5 +...checksum after hashing g_4 : 99F8B879 +...checksum after hashing g_5 : 9E562FC5 +checksum = 9e562fc5 diff --git a/src/tests/csmith/rand106.c b/src/tests/csmith/rand106.c new file mode 100644 index 0000000..7b7197d --- /dev/null +++ b/src/tests/csmith/rand106.c @@ -0,0 +1,1151 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static unsigned g_2[10][10] = {{4294967286UL, 0xB24CE554L, 1UL, 0xDEC4F3F7L, 1UL, 0xB24CE554L, 4294967286UL, 0xA4A9BDBAL, 4294967288UL, 0xF451D52AL}, {4294967286UL, 0xB24CE554L, 1UL, 0xDEC4F3F7L, 1UL, 0xB24CE554L, 4294967286UL, 0xA4A9BDBAL, 4294967288UL, 0xF451D52AL}, {4294967286UL, 0xB24CE554L, 1UL, 0xDEC4F3F7L, 1UL, 0xB24CE554L, 4294967286UL, 0xA4A9BDBAL, 4294967288UL, 0xF451D52AL}, {4294967286UL, 0xB24CE554L, 1UL, 0xDEC4F3F7L, 1UL, 0xB24CE554L, 4294967286UL, 0xA4A9BDBAL, 4294967288UL, 0xF451D52AL}, {4294967286UL, 0xB24CE554L, 1UL, 0xDEC4F3F7L, 1UL, 0xB24CE554L, 4294967286UL, 0xA4A9BDBAL, 4294967288UL, 0xF451D52AL}, {4294967286UL, 0xB24CE554L, 1UL, 0xDEC4F3F7L, 1UL, 0xB24CE554L, 4294967286UL, 0xA4A9BDBAL, 4294967288UL, 0xF451D52AL}, {4294967286UL, 0xB24CE554L, 1UL, 0xDEC4F3F7L, 1UL, 0xB24CE554L, 4294967286UL, 0xA4A9BDBAL, 4294967288UL, 0xF451D52AL}, {4294967286UL, 0xB24CE554L, 1UL, 0xDEC4F3F7L, 1UL, 0xB24CE554L, 4294967286UL, 0xA4A9BDBAL, 4294967288UL, 0xF451D52AL}, {4294967286UL, 0xB24CE554L, 1UL, 0xDEC4F3F7L, 1UL, 0xB24CE554L, 4294967286UL, 0xA4A9BDBAL, 4294967288UL, 0xF451D52AL}, {4294967286UL, 0xB24CE554L, 1UL, 0xDEC4F3F7L, 1UL, 0xB24CE554L, 4294967286UL, 0xA4A9BDBAL, 4294967288UL, 0xF451D52AL}}; +static int g_3 = 0xA3DBC56EL; +static int g_25 = (-8L); +static unsigned short g_63[1] = {0UL}; +static int g_69[3][3] = {{0x966A49DFL, 0x361F3D49L, 0x966A49DFL}, {0x966A49DFL, 0x361F3D49L, 0x966A49DFL}, {0x966A49DFL, 0x361F3D49L, 0x966A49DFL}}; +static unsigned g_77 = 0x2DAEADADL; +static int *g_81[5] = {&g_25, &g_25, &g_25, &g_25, &g_25}; +static int **g_80 = &g_81[3]; +static short g_284 = 7L; +static unsigned char g_381[9][9] = {{0xFEL, 251UL, 0x6AL, 251UL, 0xFEL, 7UL, 0xFEL, 251UL, 0x6AL}, {0xFEL, 251UL, 0x6AL, 251UL, 0xFEL, 7UL, 0xFEL, 251UL, 0x6AL}, {0xFEL, 251UL, 0x6AL, 251UL, 0xFEL, 7UL, 0xFEL, 251UL, 0x6AL}, {0xFEL, 251UL, 0x6AL, 251UL, 0xFEL, 7UL, 0xFEL, 251UL, 0x6AL}, {0xFEL, 251UL, 0x6AL, 251UL, 0xFEL, 7UL, 0xFEL, 251UL, 0x6AL}, {0xFEL, 251UL, 0x6AL, 251UL, 0xFEL, 7UL, 0xFEL, 251UL, 0x6AL}, {0xFEL, 251UL, 0x6AL, 251UL, 0xFEL, 7UL, 0xFEL, 251UL, 0x6AL}, {0xFEL, 251UL, 0x6AL, 251UL, 0xFEL, 7UL, 0xFEL, 251UL, 0x6AL}, {0xFEL, 251UL, 0x6AL, 251UL, 0xFEL, 7UL, 0xFEL, 251UL, 0x6AL}}; +static int g_399 = 2L; +static signed char g_512 = 1L; +static int g_573 = (-7L); +static int g_604 = 0x01269993L; +static short g_638[8] = {(-2L), 5L, (-2L), 5L, (-2L), 5L, (-2L), 5L}; +static int *g_653 = &g_3; +static int *g_822[4] = {&g_69[1][2], &g_69[1][2], &g_69[1][2], &g_69[1][2]}; +static int func_1(void); +static signed char func_9(unsigned p_10, unsigned short p_11); +static unsigned char func_15(int p_16, unsigned p_17); +static int * func_19(signed char p_20, int * p_21); +static int func_26(unsigned short p_27, unsigned char p_28); +static int * func_36(int ** p_37); +static int func_40(int * p_41); +static int * func_42(signed char p_43, short p_44, int ** p_45, unsigned char p_46, int ** p_47); +static int func_48(unsigned p_49); +static unsigned func_66(int p_67); +static int func_1(void) +{ + int l_14 = 0xF17245C2L; + int *l_813 = &g_69[0][0]; + unsigned short l_816 = 0x6E43L; + step_hash(677); + for (g_3 = 0; (g_3 <= 9); g_3 += 1) + { + int l_6 = 0L; + int *l_812 = &g_604; + } + step_hash(678); + return g_604; +} +static signed char func_9(unsigned p_10, unsigned short p_11) +{ + int ***l_797 = (void*)0; + int *l_798 = &g_69[0][1]; + int *l_799 = &g_69[1][2]; + int *l_800 = &g_604; + int *l_801 = &g_604; + int *l_802 = (void*)0; + int *l_803 = (void*)0; + int *l_804 = &g_25; + int l_805 = 0xA0EAED82L; + int *l_806 = &g_69[0][2]; + int *l_807 = &g_604; + int *l_808[6][6] = {{(void*)0, (void*)0, (void*)0, &g_69[1][2], &g_604, &g_69[1][2]}, {(void*)0, (void*)0, (void*)0, &g_69[1][2], &g_604, &g_69[1][2]}, {(void*)0, (void*)0, (void*)0, &g_69[1][2], &g_604, &g_69[1][2]}, {(void*)0, (void*)0, (void*)0, &g_69[1][2], &g_604, &g_69[1][2]}, {(void*)0, (void*)0, (void*)0, &g_69[1][2], &g_604, &g_69[1][2]}, {(void*)0, (void*)0, (void*)0, &g_69[1][2], &g_604, &g_69[1][2]}}; + unsigned short l_809 = 65535UL; + int i, j; + step_hash(618); + (**g_80) = (l_797 == (void*)0); + step_hash(619); + (*l_798) &= (**g_80); + step_hash(620); + --l_809; + step_hash(621); + return p_10; +} +static unsigned char func_15(int p_16, unsigned p_17) +{ + unsigned char l_18[4][9] = {{0x0EL, 0xBDL, 5UL, 253UL, 0x7DL, 0x92L, 0xF0L, 0xF8L, 5UL}, {0x0EL, 0xBDL, 5UL, 253UL, 0x7DL, 0x92L, 0xF0L, 0xF8L, 5UL}, {0x0EL, 0xBDL, 5UL, 253UL, 0x7DL, 0x92L, 0xF0L, 0xF8L, 5UL}, {0x0EL, 0xBDL, 5UL, 253UL, 0x7DL, 0x92L, 0xF0L, 0xF8L, 5UL}}; + int *l_24 = &g_25; + unsigned l_720 = 0x4DC3B152L; + unsigned char l_721 = 255UL; + unsigned l_734[4] = {7UL, 4294967288UL, 7UL, 4294967288UL}; + int l_757 = (-10L); + int l_758 = 0xAEE75660L; + unsigned short l_759[7]; + int l_783[10][9] = {{0L, 0x8E7617E0L, 0x8E7617E0L, 0L, 6L, 0x63F16FA1L, 4L, (-4L), 0x9654480BL}, {0L, 0x8E7617E0L, 0x8E7617E0L, 0L, 6L, 0x63F16FA1L, 4L, (-4L), 0x9654480BL}, {0L, 0x8E7617E0L, 0x8E7617E0L, 0L, 6L, 0x63F16FA1L, 4L, (-4L), 0x9654480BL}, {0L, 0x8E7617E0L, 0x8E7617E0L, 0L, 6L, 0x63F16FA1L, 4L, (-4L), 0x9654480BL}, {0L, 0x8E7617E0L, 0x8E7617E0L, 0L, 6L, 0x63F16FA1L, 4L, (-4L), 0x9654480BL}, {0L, 0x8E7617E0L, 0x8E7617E0L, 0L, 6L, 0x63F16FA1L, 4L, (-4L), 0x9654480BL}, {0L, 0x8E7617E0L, 0x8E7617E0L, 0L, 6L, 0x63F16FA1L, 4L, (-4L), 0x9654480BL}, {0L, 0x8E7617E0L, 0x8E7617E0L, 0L, 6L, 0x63F16FA1L, 4L, (-4L), 0x9654480BL}, {0L, 0x8E7617E0L, 0x8E7617E0L, 0L, 6L, 0x63F16FA1L, 4L, (-4L), 0x9654480BL}, {0L, 0x8E7617E0L, 0x8E7617E0L, 0L, 6L, 0x63F16FA1L, 4L, (-4L), 0x9654480BL}}; + int l_794 = 0xB5B64923L; + int i, j; + for (i = 0; i < 7; i++) + l_759[i] = 1UL; + step_hash(615); + for (p_16 = 0; (p_16 <= 3); p_16 += 1) + { + int *l_22 = (void*)0; + int *l_743 = &g_69[2][1]; + int *l_744 = &g_69[1][2]; + int *l_745 = &g_69[1][2]; + int *l_746 = &g_604; + int *l_747 = &g_69[1][2]; + int *l_748 = &g_69[0][0]; + int *l_749 = (void*)0; + int *l_750 = &g_69[1][2]; + int *l_751 = &g_604; + int *l_752 = &g_604; + int *l_753 = &g_69[1][2]; + int l_754 = 0x4A7B852CL; + int *l_755 = &l_754; + int *l_756[2][7] = {{&l_754, &l_754, &l_754, &l_754, &l_754, &l_754, &l_754}, {&l_754, &l_754, &l_754, &l_754, &l_754, &l_754, &l_754}}; + unsigned short l_773[6] = {65528UL, 65528UL, 65526UL, 65528UL, 65528UL, 65526UL}; + signed char l_793[4] = {(-1L), 0x46L, (-1L), 0x46L}; + int i, j; + step_hash(583); + for (p_17 = 0; (p_17 <= 3); p_17 += 1) + { + int **l_23[7]; + int i, j; + for (i = 0; i < 7; i++) + l_23[i] = &l_22; + step_hash(13); + l_24 = func_19(l_18[p_17][(p_17 + 3)], l_22); + } + step_hash(584); + l_759[3]--; + } + step_hash(616); + return l_794; +} +static int * func_19(signed char p_20, int * p_21) +{ + step_hash(12); + return p_21; +} + + + + + + + +static int func_26(unsigned short p_27, unsigned char p_28) +{ + unsigned short l_35 = 0x70A6L; + int *l_39 = &g_3; + int **l_38[9] = {&l_39, &l_39, &l_39, &l_39, &l_39, &l_39, &l_39, &l_39, &l_39}; + int l_677 = 0xD8D15997L; + int ***l_678[9] = {(void*)0, &g_80, (void*)0, &g_80, (void*)0, &g_80, (void*)0, &g_80, (void*)0}; + unsigned l_716[3][9] = {{0UL, 0UL, 0xDF9847A2L, 0x200534F1L, 0x41B48F0DL, 0UL, 0x41B48F0DL, 0x200534F1L, 0xDF9847A2L}, {0UL, 0UL, 0xDF9847A2L, 0x200534F1L, 0x41B48F0DL, 0UL, 0x41B48F0DL, 0x200534F1L, 0xDF9847A2L}, {0UL, 0UL, 0xDF9847A2L, 0x200534F1L, 0x41B48F0DL, 0UL, 0x41B48F0DL, 0x200534F1L, 0xDF9847A2L}}; + int l_718[1]; + int l_719 = 0x9A6EC0C8L; + int i, j; + for (i = 0; i < 1; i++) + l_718[i] = (-1L); + step_hash(15); + l_35 |= ((unsigned short)0UL << (unsigned short)2); + step_hash(502); + g_81[2] = func_36(l_38[0]); + step_hash(558); + for (g_399 = 1; (g_399 >= 11); g_399 += 7) + { + int *l_667 = &g_69[1][2]; + int l_670 = (-1L); + unsigned char l_684 = 0xD8L; + unsigned short l_717 = 65535UL; + step_hash(555); + for (g_77 = 0; (g_77 >= 6); g_77 += 7) + { + int l_658 = 3L; + unsigned l_688 = 9UL; + unsigned l_710 = 0xFEA74D49L; + int l_711 = 0L; + } + step_hash(556); + (*l_667) = (((p_28 & ((signed char)(((void*)0 != &l_670) == p_28) - (signed char)((((p_28 < ((unsigned char)(*l_667) >> (unsigned char)7)) >= g_512) > (g_69[1][2] > l_716[0][2])) >= p_28))) <= (*l_667)) > l_717); + step_hash(557); + if (l_718[0]) + break; + } + step_hash(559); + l_719 |= (-2L); + step_hash(560); + return p_28; +} + + + + + + + +static int * func_36(int ** p_37) +{ + int l_50[2][6] = {{6L, 0xAED5A0A0L, 6L, 0xAED5A0A0L, 6L, 0xAED5A0A0L}, {6L, 0xAED5A0A0L, 6L, 0xAED5A0A0L, 6L, 0xAED5A0A0L}}; + int *l_632 = &g_69[1][2]; + unsigned short l_646 = 65533UL; + int i, j; + step_hash(480); + l_50[1][5] = func_40(func_42(g_25, (g_2[0][5] | func_48(((0xD0L == l_50[1][2]) && 0xD5E7L))), p_37, l_50[1][2], g_80)); + step_hash(481); + l_50[1][2] = l_50[0][4]; + step_hash(482); + (*l_632) = (((void*)0 != p_37) && ((unsigned short)(g_284 ^ (l_50[0][5] || g_63[0])) % (unsigned short)0xD363L)); + step_hash(500); + for (g_604 = 0; (g_604 >= 0); g_604 -= 1) + { + int *l_637 = &g_604; + int l_642[7][9] = {{(-2L), (-8L), 0xE8EB4D9DL, (-8L), (-2L), (-8L), 0xE8EB4D9DL, (-8L), (-2L)}, {(-2L), (-8L), 0xE8EB4D9DL, (-8L), (-2L), (-8L), 0xE8EB4D9DL, (-8L), (-2L)}, {(-2L), (-8L), 0xE8EB4D9DL, (-8L), (-2L), (-8L), 0xE8EB4D9DL, (-8L), (-2L)}, {(-2L), (-8L), 0xE8EB4D9DL, (-8L), (-2L), (-8L), 0xE8EB4D9DL, (-8L), (-2L)}, {(-2L), (-8L), 0xE8EB4D9DL, (-8L), (-2L), (-8L), 0xE8EB4D9DL, (-8L), (-2L)}, {(-2L), (-8L), 0xE8EB4D9DL, (-8L), (-2L), (-8L), 0xE8EB4D9DL, (-8L), (-2L)}, {(-2L), (-8L), 0xE8EB4D9DL, (-8L), (-2L), (-8L), 0xE8EB4D9DL, (-8L), (-2L)}}; + short l_645 = 1L; + int **l_652 = &g_81[3]; + int i, j; + } + step_hash(501); + return g_653; +} + + + + + + + +static int func_40(int * p_41) +{ + signed char l_600[8] = {1L, 1L, (-1L), 1L, 1L, (-1L), 1L, 1L}; + int ***l_605[5]; + unsigned l_619 = 4294967295UL; + int i; + for (i = 0; i < 5; i++) + l_605[i] = &g_80; + step_hash(478); + for (g_512 = 8; (g_512 < (-15)); g_512--) + { + int *l_601 = &g_69[2][0]; + step_hash(465); + (*l_601) ^= l_600[1]; + step_hash(466); + (*l_601) = ((signed char)(~(g_399 && (l_605[3] != &g_80))) >> (signed char)(0x50F7B81FL <= (g_2[0][4] && (((unsigned char)((unsigned short)0x15BDL * (unsigned short)(+(((void*)0 == p_41) >= (-10L)))) / (unsigned char)g_69[1][2]) < g_3)))); + step_hash(476); + for (g_25 = 0; (g_25 <= 2); g_25 += 1) + { + unsigned l_613 = 4294967295UL; + step_hash(475); + for (g_77 = 0; (g_77 <= 4); g_77 += 1) + { + int l_610 = (-4L); + signed char l_611[1][6] = {{0x9AL, 0L, 0x9AL, 0L, 0x9AL, 0L}}; + int l_612[5] = {0x29DF4F1BL, 0xBDB339B9L, 0x29DF4F1BL, 0xBDB339B9L, 0x29DF4F1BL}; + short l_618[2]; + int i, j; + for (i = 0; i < 2; i++) + l_618[i] = 0x2C06L; + step_hash(473); + --l_613; + step_hash(474); + l_618[1] = ((signed char)0x19L << (signed char)g_69[g_25][g_25]); + } + } + step_hash(477); + g_80 = (void*)0; + } + step_hash(479); + return l_619; +} + + + + + + + +static int * func_42(signed char p_43, short p_44, int ** p_45, unsigned char p_46, int ** p_47) +{ + int *l_405 = (void*)0; + int l_410 = 0L; + int l_413 = 0L; + int l_414[7][6] = {{1L, 0x1D20E5B2L, 1L, 0L, 7L, 0x4CA6F729L}, {1L, 0x1D20E5B2L, 1L, 0L, 7L, 0x4CA6F729L}, {1L, 0x1D20E5B2L, 1L, 0L, 7L, 0x4CA6F729L}, {1L, 0x1D20E5B2L, 1L, 0L, 7L, 0x4CA6F729L}, {1L, 0x1D20E5B2L, 1L, 0L, 7L, 0x4CA6F729L}, {1L, 0x1D20E5B2L, 1L, 0L, 7L, 0x4CA6F729L}, {1L, 0x1D20E5B2L, 1L, 0L, 7L, 0x4CA6F729L}}; + unsigned short l_422 = 1UL; + unsigned l_423 = 4294967295UL; + unsigned short l_446 = 1UL; + int l_536[3]; + int ***l_545 = &g_80; + int *l_595 = &g_25; + int *l_596 = &l_536[0]; + int *l_597 = (void*)0; + int i, j; + for (i = 0; i < 3; i++) + l_536[i] = 0xABDD28EFL; + step_hash(330); + (*g_80) = l_405; + step_hash(343); + for (g_399 = 0; (g_399 >= (-1)); --g_399) + { + int *l_408 = &g_69[1][2]; + int *l_409 = &g_69[2][2]; + int *l_411 = &l_410; + int *l_412[9]; + unsigned l_415 = 0xA6152829L; + int i; + for (i = 0; i < 9; i++) + l_412[i] = &l_410; + step_hash(334); + ++l_415; + step_hash(335); + (*l_408) = (g_69[1][2] > (*l_409)); + step_hash(336); + if (p_44) + break; + step_hash(342); + for (g_284 = 10; (g_284 == (-16)); --g_284) + { + step_hash(340); + l_422 = ((unsigned char)p_43 / (unsigned char)0x78L); + step_hash(341); + (*l_408) &= 7L; + } + } + step_hash(458); + if (l_423) + { + int *l_424 = &l_414[0][1]; + step_hash(345); + (*p_47) = l_424; + step_hash(346); + (*l_424) = (*l_424); + } + else + { + unsigned short l_425 = 0xEB44L; + unsigned l_435[4] = {4294967295UL, 0x0593E5CDL, 4294967295UL, 0x0593E5CDL}; + int l_436 = 0xA3D276FBL; + signed char l_456 = 0L; + unsigned l_471 = 0xD501E037L; + signed char l_501 = 0xB5L; + int l_509 = 5L; + int l_513 = 0x8067A6EBL; + int l_515 = 0xBC9AE906L; + int l_517 = 0xD788FA73L; + int l_522[5][5] = {{1L, 0x580D25E7L, 0L, (-1L), (-1L)}, {1L, 0x580D25E7L, 0L, (-1L), (-1L)}, {1L, 0x580D25E7L, 0L, (-1L), (-1L)}, {1L, 0x580D25E7L, 0L, (-1L), (-1L)}, {1L, 0x580D25E7L, 0L, (-1L), (-1L)}}; + unsigned short l_525 = 0xA3EBL; + int ***l_544[1][10] = {{(void*)0, (void*)0, &g_80, (void*)0, (void*)0, &g_80, (void*)0, (void*)0, &g_80, (void*)0}}; + unsigned char l_551 = 0x36L; + signed char l_560[1][5]; + int *l_590 = &l_414[3][0]; + int *l_591 = &l_522[3][4]; + int i, j; + for (i = 0; i < 1; i++) + { + for (j = 0; j < 5; j++) + l_560[i][j] = 0x7AL; + } + step_hash(348); + l_414[0][1] &= l_425; + step_hash(373); + if ((!(0x74005842L || 0xFDB3F3CBL))) + { + int ***l_428 = (void*)0; + int **l_434 = &l_405; + step_hash(350); + (*p_47) = func_19(g_69[2][2], func_19(g_3, &g_25)); + step_hash(351); + l_436 &= (((signed char)((&p_47 != l_428) > (l_423 && ((int)(l_428 == &p_45) + (int)((-(int)((unsigned short)g_63[0] * (unsigned short)((l_434 != p_47) > (g_63[0] < l_435[0])))) > p_44)))) >> (signed char)p_46) | g_3); + step_hash(356); + for (g_25 = 0; (g_25 <= 0); g_25 += 1) + { + step_hash(355); + return &g_25; + } + step_hash(357); + (*g_80) = func_19(((l_436 || ((1L != 0x3BL) <= 0x31039514L)) > ((((g_63[0] && ((short)((short)l_435[3] - (short)((unsigned char)255UL + (unsigned char)0xE5L)) * (short)0UL)) && l_435[0]) & g_399) ^ l_446)), &g_69[1][2]); + } + else + { + step_hash(372); + for (g_77 = 17; (g_77 < 53); g_77 += 3) + { + step_hash(366); + for (l_413 = (-21); (l_413 < 24); ++l_413) + { + int ***l_451 = &g_80; + step_hash(365); + (*l_451) = p_45; + } + step_hash(371); + for (p_43 = 4; (p_43 >= 0); p_43 -= 1) + { + int i; + step_hash(370); + (*p_47) = &g_69[1][2]; + } + } + } + step_hash(457); + for (l_425 = 0; (l_425 <= 3); l_425 += 1) + { + int l_462 = 0xC0204249L; + int l_502 = 0xCF2547A4L; + int l_503 = 0L; + int l_504 = 0x7037EB1AL; + int l_506 = (-1L); + int l_507[5][6] = {{0x564BEFC6L, 0x66AA51C4L, 0xE0765D78L, 0x66AA51C4L, 0x564BEFC6L, 0x66AA51C4L}, {0x564BEFC6L, 0x66AA51C4L, 0xE0765D78L, 0x66AA51C4L, 0x564BEFC6L, 0x66AA51C4L}, {0x564BEFC6L, 0x66AA51C4L, 0xE0765D78L, 0x66AA51C4L, 0x564BEFC6L, 0x66AA51C4L}, {0x564BEFC6L, 0x66AA51C4L, 0xE0765D78L, 0x66AA51C4L, 0x564BEFC6L, 0x66AA51C4L}, {0x564BEFC6L, 0x66AA51C4L, 0xE0765D78L, 0x66AA51C4L, 0x564BEFC6L, 0x66AA51C4L}}; + int *l_589 = &l_509; + int *l_592 = &l_513; + int *l_593[5][10]; + int i, j; + for (i = 0; i < 5; i++) + { + for (j = 0; j < 10; j++) + l_593[i][j] = &l_506; + } + step_hash(385); + for (p_46 = 0; (p_46 <= 3); p_46 += 1) + { + step_hash(384); + for (l_422 = 0; (l_422 <= 3); l_422 += 1) + { + step_hash(383); + return &g_25; + } + } + step_hash(414); + if ((l_435[l_425] >= (((0x85AE5FD1L >= l_435[l_425]) >= g_381[6][0]) <= 0L))) + { + unsigned l_461 = 8UL; + step_hash(387); + (*p_47) = &g_69[1][0]; + step_hash(388); + l_436 = ((unsigned)((l_435[l_425] | (((unsigned char)p_43 >> (unsigned char)4) ^ p_44)) | ((p_44 <= ((l_435[l_425] & p_46) ^ l_435[0])) == 0xB40FL)) / (unsigned)l_435[1]); + } + else + { + int l_463 = 0L; + int l_470 = 0x54C8AF70L; + int l_505 = 1L; + int l_508 = 0x66F370C3L; + int l_510 = (-2L); + int l_511 = (-4L); + int l_514 = 0L; + int l_516 = 0x4DF85C84L; + int l_519 = 1L; + int l_521 = (-1L); + int l_523[2]; + unsigned l_529 = 0x07C17F65L; + int i; + for (i = 0; i < 2; i++) + l_523[i] = (-1L); + step_hash(400); + if ((((((l_470 < l_435[l_425]) >= l_470) || 0x21A5L) <= g_77) ^ l_435[l_425])) + { + step_hash(397); + for (l_446 = 0; (l_446 <= 3); l_446 += 1) + { + int *l_472 = (void*)0; + int *l_473 = (void*)0; + int *l_474 = (void*)0; + int *l_475[6] = {&g_25, (void*)0, &g_25, (void*)0, &g_25, (void*)0}; + int i; + step_hash(394); + if (l_435[l_425]) + break; + step_hash(395); + l_414[0][1] &= l_435[l_425]; + step_hash(396); + l_410 |= ((int)((signed char)((unsigned short)0x65E8L >> (unsigned short)2) / (signed char)p_44) - (int)(((unsigned short)((short)((int)p_43 / (int)(((unsigned short)((void*)0 != p_47) * (unsigned short)p_44) ^ ((int)(!((unsigned short)(0L && g_3) * (unsigned short)g_3)) / (int)l_463))) * (short)p_44) >> (unsigned short)2) < g_3)); + } + } + else + { + unsigned l_496 = 4UL; + int *l_497 = &l_470; + step_hash(399); + (*l_497) = ((((&g_81[3] != (void*)0) != 4294967292UL) ^ (((unsigned char)(g_381[6][0] != (p_43 != (g_2[8][6] || (5UL <= p_43)))) % (unsigned char)255UL) != l_496)) ^ g_69[0][2]); + } + step_hash(412); + for (l_422 = 0; (l_422 <= 3); l_422 += 1) + { + int *l_498 = &g_69[1][2]; + int *l_499 = &l_436; + int *l_500[5] = {&l_436, &l_462, &l_436, &l_462, &l_436}; + int l_518[6][1] = {{1L}, {1L}, {1L}, {1L}, {1L}, {1L}}; + int l_520 = (-5L); + signed char l_524 = 0x96L; + int i, j; + step_hash(404); + if (l_435[l_425]) + break; + step_hash(405); + ++l_525; + step_hash(411); + for (l_504 = 3; (l_504 >= 0); l_504 -= 1) + { + step_hash(409); + if (p_43) + break; + step_hash(410); + (*l_498) = ((-(unsigned char)0x1CL) < 0x17C7L); + } + } + step_hash(413); + if (l_529) + break; + } + step_hash(450); + if (l_506) + { + int l_537 = 0x0449D25AL; + int l_554 = 0x7C655232L; + int **l_561[4] = {&l_405, (void*)0, &l_405, (void*)0}; + int *l_594 = &g_25; + int i; + step_hash(436); + if ((((unsigned char)((signed char)p_44 << (signed char)0) >> (unsigned char)7) == (((short)l_536[1] << (short)((l_506 | l_537) >= ((((unsigned short)(((short)((short)(l_544[0][3] == l_545) / (short)g_69[0][0]) * (short)l_537) ^ g_512) >> (unsigned short)12) && g_69[1][2]) <= l_504))) && 0x98L))) + { + unsigned char l_550[2][2] = {{0x8CL, 0xC8L}, {0x8CL, 0xC8L}}; + int i, j; + step_hash(417); + l_551 = (((unsigned char)((signed char)(g_25 != (!(((l_550[0][1] >= g_2[3][5]) ^ ((!(~l_537)) != 3UL)) == 0x8117L))) >> (signed char)2) >> (unsigned char)0) <= (p_43 > l_550[0][1])); + step_hash(418); + l_537 ^= ((unsigned char)(&l_462 != &g_3) >> (unsigned char)1); + } + else + { + unsigned l_568 = 4294967290UL; + unsigned char l_580 = 1UL; + int l_582 = 0L; + unsigned short l_585[5][7] = {{0x71F9L, 0x71F9L, 0x31AAL, 0x71F9L, 0x71F9L, 0x31AAL, 0x71F9L}, {0x71F9L, 0x71F9L, 0x31AAL, 0x71F9L, 0x71F9L, 0x31AAL, 0x71F9L}, {0x71F9L, 0x71F9L, 0x31AAL, 0x71F9L, 0x71F9L, 0x31AAL, 0x71F9L}, {0x71F9L, 0x71F9L, 0x31AAL, 0x71F9L, 0x71F9L, 0x31AAL, 0x71F9L}, {0x71F9L, 0x71F9L, 0x31AAL, 0x71F9L, 0x71F9L, 0x31AAL, 0x71F9L}}; + int i, j; + step_hash(427); + for (g_512 = 0; (g_512 <= 0); g_512 += 1) + { + int *l_559 = &g_25; + int i; + step_hash(423); + l_537 ^= g_63[g_512]; + step_hash(424); + l_554 |= l_537; + step_hash(425); + (*p_47) = func_19(((unsigned char)p_46 - (unsigned char)((unsigned char)0UL + (unsigned char)0x22L)), l_559); + step_hash(426); + if (l_560[0][1]) + continue; + } + step_hash(435); + if (((l_561[1] == &g_81[3]) && (((short)(((signed char)((((int)l_568 / (int)l_435[l_425]) ^ ((short)((signed char)g_3 << (signed char)p_44) >> (short)13)) || 1UL) + (signed char)p_46) > p_43) - (short)g_63[0]) != g_2[8][2]))) + { + int l_581 = (-3L); + int l_583 = 0xCA7D7568L; + int l_584 = 0xDE48840DL; + step_hash(429); + l_582 = ((int)(l_580 != 0xC2F9DA00L) / (int)l_581); + step_hash(430); + l_507[3][0] ^= 0x50CB2111L; + step_hash(431); + (*p_47) = &l_506; + step_hash(432); + ++l_585[0][2]; + } + else + { + int *l_588[7][4] = {{&l_414[0][1], &l_536[1], &l_536[1], &l_582}, {&l_414[0][1], &l_536[1], &l_536[1], &l_582}, {&l_414[0][1], &l_536[1], &l_536[1], &l_582}, {&l_414[0][1], &l_536[1], &l_536[1], &l_582}, {&l_414[0][1], &l_536[1], &l_536[1], &l_582}, {&l_414[0][1], &l_536[1], &l_536[1], &l_582}, {&l_414[0][1], &l_536[1], &l_536[1], &l_582}}; + int i, j; + step_hash(434); + (*p_47) = l_588[5][0]; + } + } + step_hash(437); + return l_594; + } + else + { + step_hash(439); + (*l_589) = (1L > 65535UL); + step_hash(440); + for (p_43 = 0; p_43 < 1; p_43 += 1) + { + g_63[p_43] = 65535UL; + } + step_hash(449); + for (l_551 = 0; (l_551 <= 2); l_551 += 1) + { + step_hash(448); + for (l_456 = 2; (l_456 >= 0); l_456 -= 1) + { + int i; + step_hash(447); + if (l_435[(l_551 + 1)]) + break; + } + } + } + step_hash(456); + for (l_513 = 1; (l_513 <= 4); l_513 += 1) + { + int i, j; + step_hash(454); + (*p_47) = &l_522[l_513][l_425]; + step_hash(455); + (*l_589) = p_46; + } + } + } + step_hash(459); + (*l_595) = l_413; + step_hash(460); + return l_597; +} + + + + + + + +static int func_48(unsigned p_49) +{ + unsigned char l_55 = 0xDFL; + int *l_59 = &g_25; + int **l_58 = &l_59; + int l_62 = 0L; + int l_384 = 0xC196D13BL; + int l_386 = 0x0F7F4287L; + int l_387 = 0x5BD2089DL; + unsigned short l_388 = 8UL; + int l_392[10] = {0xAC9A5B74L, 0x4861DBECL, (-1L), (-1L), 0x4861DBECL, 0xAC9A5B74L, 0x4861DBECL, (-1L), (-1L), 0x4861DBECL}; + unsigned l_400 = 4294967293UL; + int i; + step_hash(326); + for (p_49 = (-23); (p_49 <= 51); p_49++) + { + int *l_57[3]; + int **l_56 = &l_57[1]; + int i; + for (i = 0; i < 3; i++) + l_57[i] = &g_3; + step_hash(21); + l_62 &= (((((unsigned char)g_25 << (unsigned char)l_55) & 0x4CC0L) ^ (l_56 != l_58)) >= ((int)g_3 % (int)(**l_58))); + step_hash(22); + g_63[0] = p_49; + } + step_hash(327); + l_384 |= ((short)0x35ADL % (short)func_66(p_49)); + step_hash(328); + return p_49; +} + + + + + + + +static unsigned func_66(int p_67) +{ + int *l_68 = &g_69[1][2]; + int l_72 = (-1L); + int l_73 = 1L; + int l_74 = 0xAE354A5AL; + int l_75[1]; + int l_76 = (-1L); + int *l_117 = &l_75[0]; + unsigned l_179[9][5] = {{4294967295UL, 0UL, 0x092D7B6EL, 4294967295UL, 0x092D7B6EL}, {4294967295UL, 0UL, 0x092D7B6EL, 4294967295UL, 0x092D7B6EL}, {4294967295UL, 0UL, 0x092D7B6EL, 4294967295UL, 0x092D7B6EL}, {4294967295UL, 0UL, 0x092D7B6EL, 4294967295UL, 0x092D7B6EL}, {4294967295UL, 0UL, 0x092D7B6EL, 4294967295UL, 0x092D7B6EL}, {4294967295UL, 0UL, 0x092D7B6EL, 4294967295UL, 0x092D7B6EL}, {4294967295UL, 0UL, 0x092D7B6EL, 4294967295UL, 0x092D7B6EL}, {4294967295UL, 0UL, 0x092D7B6EL, 4294967295UL, 0x092D7B6EL}, {4294967295UL, 0UL, 0x092D7B6EL, 4294967295UL, 0x092D7B6EL}}; + unsigned l_231[1]; + short l_282 = 0x477EL; + signed char l_283 = 0x04L; + unsigned short l_341 = 65535UL; + int l_380[9][6] = {{0L, 0x5795E8B1L, 0x9F0471CBL, 0xEFFC2D33L, 0L, 0xA0E3ADE0L}, {0L, 0x5795E8B1L, 0x9F0471CBL, 0xEFFC2D33L, 0L, 0xA0E3ADE0L}, {0L, 0x5795E8B1L, 0x9F0471CBL, 0xEFFC2D33L, 0L, 0xA0E3ADE0L}, {0L, 0x5795E8B1L, 0x9F0471CBL, 0xEFFC2D33L, 0L, 0xA0E3ADE0L}, {0L, 0x5795E8B1L, 0x9F0471CBL, 0xEFFC2D33L, 0L, 0xA0E3ADE0L}, {0L, 0x5795E8B1L, 0x9F0471CBL, 0xEFFC2D33L, 0L, 0xA0E3ADE0L}, {0L, 0x5795E8B1L, 0x9F0471CBL, 0xEFFC2D33L, 0L, 0xA0E3ADE0L}, {0L, 0x5795E8B1L, 0x9F0471CBL, 0xEFFC2D33L, 0L, 0xA0E3ADE0L}, {0L, 0x5795E8B1L, 0x9F0471CBL, 0xEFFC2D33L, 0L, 0xA0E3ADE0L}}; + int i, j; + for (i = 0; i < 1; i++) + l_75[i] = 1L; + for (i = 0; i < 1; i++) + l_231[i] = 2UL; + step_hash(24); + (*l_68) |= p_67; + step_hash(51); + for (p_67 = 0; (p_67 >= 0); p_67 -= 1) + { + int *l_70 = &g_69[1][2]; + int *l_71[8][8] = {{&g_69[2][2], &g_69[0][2], (void*)0, (void*)0, (void*)0, &g_69[0][2], &g_69[2][2], &g_69[1][2]}, {&g_69[2][2], &g_69[0][2], (void*)0, (void*)0, (void*)0, &g_69[0][2], &g_69[2][2], &g_69[1][2]}, {&g_69[2][2], &g_69[0][2], (void*)0, (void*)0, (void*)0, &g_69[0][2], &g_69[2][2], &g_69[1][2]}, {&g_69[2][2], &g_69[0][2], (void*)0, (void*)0, (void*)0, &g_69[0][2], &g_69[2][2], &g_69[1][2]}, {&g_69[2][2], &g_69[0][2], (void*)0, (void*)0, (void*)0, &g_69[0][2], &g_69[2][2], &g_69[1][2]}, {&g_69[2][2], &g_69[0][2], (void*)0, (void*)0, (void*)0, &g_69[0][2], &g_69[2][2], &g_69[1][2]}, {&g_69[2][2], &g_69[0][2], (void*)0, (void*)0, (void*)0, &g_69[0][2], &g_69[2][2], &g_69[1][2]}, {&g_69[2][2], &g_69[0][2], (void*)0, (void*)0, (void*)0, &g_69[0][2], &g_69[2][2], &g_69[1][2]}}; + int i, j; + step_hash(28); + g_77--; + step_hash(50); + for (l_74 = 0; (l_74 <= 0); l_74 += 1) + { + int i, j; + step_hash(32); + g_69[p_67][(p_67 + 2)] ^= (&l_68 == g_80); + step_hash(42); + for (l_73 = 0; (l_73 <= 0); l_73 += 1) + { + int i, j; + step_hash(36); + if (g_69[l_73][(p_67 + 2)]) + break; + step_hash(41); + if ((((-4L) < 0xA230L) ^ g_63[p_67])) + { + step_hash(38); + return p_67; + } + else + { + step_hash(40); + return g_25; + } + } + } + } + step_hash(317); + if (p_67) + { + int **l_89 = &g_81[3]; + int *l_90 = (void*)0; + int *l_91[8][7] = {{&l_76, &l_75[0], &l_75[0], &l_72, &l_75[0], &l_75[0], &l_75[0]}, {&l_76, &l_75[0], &l_75[0], &l_72, &l_75[0], &l_75[0], &l_75[0]}, {&l_76, &l_75[0], &l_75[0], &l_72, &l_75[0], &l_75[0], &l_75[0]}, {&l_76, &l_75[0], &l_75[0], &l_72, &l_75[0], &l_75[0], &l_75[0]}, {&l_76, &l_75[0], &l_75[0], &l_72, &l_75[0], &l_75[0], &l_75[0]}, {&l_76, &l_75[0], &l_75[0], &l_72, &l_75[0], &l_75[0], &l_75[0]}, {&l_76, &l_75[0], &l_75[0], &l_72, &l_75[0], &l_75[0], &l_75[0]}, {&l_76, &l_75[0], &l_75[0], &l_72, &l_75[0], &l_75[0], &l_75[0]}}; + signed char l_92 = 8L; + int l_131[3][3] = {{0L, 1L, 0L}, {0L, 1L, 0L}, {0L, 1L, 0L}}; + int l_134 = 0L; + unsigned l_175 = 0xB8245335L; + unsigned l_191 = 0x1B506038L; + signed char l_199 = 9L; + int i, j; + step_hash(53); + l_92 ^= ((*l_68) && ((signed char)(l_89 != &l_68) + (signed char)g_63[0])); + step_hash(195); + for (l_74 = 0; (l_74 != (-1)); l_74--) + { + unsigned short l_95 = 0xDCEEL; + int l_98 = 0x42BFDF69L; + unsigned short l_99 = 0x042FL; + short l_108 = 0x31B0L; + int *l_125[10] = {&g_69[0][0], &l_73, &l_72, &l_72, &l_73, &g_69[0][0], &l_73, &l_72, &l_72, &l_73}; + unsigned l_163 = 4294967294UL; + int l_190[8] = {0xCEC5DDE9L, 0xCEC5DDE9L, 8L, 0xCEC5DDE9L, 0xCEC5DDE9L, 8L, 0xCEC5DDE9L, 0xCEC5DDE9L}; + int **l_197 = &g_81[3]; + unsigned char l_200 = 246UL; + int i; + step_hash(57); + l_95--; + step_hash(58); + --l_99; + } + } + else + { + unsigned short l_217 = 0x603EL; + int l_227 = 0xA9FFF2E2L; + int l_230[9]; + unsigned l_285 = 0xA150D49BL; + unsigned short l_294 = 0xC941L; + int ***l_348 = (void*)0; + int i; + for (i = 0; i < 9; i++) + l_230[i] = 1L; + step_hash(201); + for (l_73 = 0; (l_73 >= 0); l_73 -= 1) + { + int i; + step_hash(200); + (*l_68) = (((0UL || ((unsigned short)l_75[l_73] / (unsigned short)((((((signed char)((unsigned)((((unsigned char)l_75[l_73] << (unsigned char)7) >= 4294967289UL) > ((short)((int)0x15F20776L % (int)g_63[l_73]) >> (short)(g_63[l_73] > p_67))) - (unsigned)l_217) + (signed char)g_77) ^ g_77) || p_67) != g_25) | p_67))) ^ g_2[6][7]) == p_67); + } + step_hash(316); + if (l_217) + { + int *l_218 = &l_74; + int *l_219 = &l_76; + int *l_220 = &l_76; + int *l_221 = &g_69[1][2]; + int *l_222 = &l_73; + int *l_223 = &l_75[0]; + int *l_224 = &g_69[2][1]; + int *l_225 = &g_69[0][2]; + int *l_226 = &l_73; + int *l_228 = &l_75[0]; + int *l_229[1][6]; + int i, j; + for (i = 0; i < 1; i++) + { + for (j = 0; j < 6; j++) + l_229[i][j] = &l_75[0]; + } + step_hash(203); + ++l_231[0]; + step_hash(208); + for (p_67 = 0; (p_67 < 17); p_67 += 1) + { + step_hash(207); + return g_77; + } + } + else + { + unsigned l_258 = 0x4F7B4F8BL; + int *l_266 = &l_227; + int l_271 = 1L; + int l_274 = (-6L); + int l_280[7]; + int ***l_291 = (void*)0; + int i; + for (i = 0; i < 7; i++) + l_280[i] = 0xE116C163L; + step_hash(283); + if ((l_227 || g_69[2][1])) + { + unsigned l_261 = 0x9122180EL; + int l_273[8][7] = {{0xAEB1A127L, 0x310BF789L, 0x7615848DL, 0x4EB570CDL, (-1L), 4L, (-1L)}, {0xAEB1A127L, 0x310BF789L, 0x7615848DL, 0x4EB570CDL, (-1L), 4L, (-1L)}, {0xAEB1A127L, 0x310BF789L, 0x7615848DL, 0x4EB570CDL, (-1L), 4L, (-1L)}, {0xAEB1A127L, 0x310BF789L, 0x7615848DL, 0x4EB570CDL, (-1L), 4L, (-1L)}, {0xAEB1A127L, 0x310BF789L, 0x7615848DL, 0x4EB570CDL, (-1L), 4L, (-1L)}, {0xAEB1A127L, 0x310BF789L, 0x7615848DL, 0x4EB570CDL, (-1L), 4L, (-1L)}, {0xAEB1A127L, 0x310BF789L, 0x7615848DL, 0x4EB570CDL, (-1L), 4L, (-1L)}, {0xAEB1A127L, 0x310BF789L, 0x7615848DL, 0x4EB570CDL, (-1L), 4L, (-1L)}}; + int **l_292 = &g_81[2]; + int i, j; + step_hash(222); + for (l_217 = (-26); (l_217 >= 37); l_217 += 9) + { + int l_244[3][2] = {{0x2C99AB52L, 0x2C99AB52L}, {0x2C99AB52L, 0x2C99AB52L}, {0x2C99AB52L, 0x2C99AB52L}}; + int i, j; + step_hash(221); + for (l_72 = 0; (l_72 <= (-23)); --l_72) + { + step_hash(217); + if (l_230[4]) + break; + step_hash(218); + if (p_67) + continue; + step_hash(219); + (*l_117) = (((unsigned short)0x32CFL * (unsigned short)((p_67 ^ ((short)0L >> (short)13)) | (**g_80))) || l_244[0][0]); + step_hash(220); + if ((*l_117)) + break; + } + } + step_hash(249); + for (l_76 = 0; (l_76 >= 23); l_76 += 1) + { + signed char l_249 = 0xC4L; + int l_272 = 0x35D1E971L; + int l_275 = 1L; + int l_276[5] = {4L, 0xB89AE079L, 4L, 0xB89AE079L, 4L}; + unsigned l_277 = 0xC68E37BBL; + short l_281[6] = {0x4A58L, 0xFE76L, 0x4A58L, 0xFE76L, 0x4A58L, 0xFE76L}; + int i; + step_hash(232); + for (l_72 = 0; (l_72 == (-10)); l_72 -= 3) + { + step_hash(229); + (*l_117) = (**g_80); + step_hash(230); + l_249 = ((((void*)0 == (*g_80)) || g_77) <= g_25); + step_hash(231); + (*g_80) = &p_67; + } + step_hash(233); + (*g_80) = (*g_80); + step_hash(241); + if ((((int)((short)((0L & ((short)g_25 * (short)g_2[5][1])) != (**g_80)) + (short)((*l_117) >= 0L)) - (int)(!(l_258 < ((((unsigned short)p_67 << (unsigned short)g_63[0]) && 4294967295UL) <= g_3)))) >= l_261)) + { + step_hash(235); + (*g_80) = func_19(l_249, (*g_80)); + } + else + { + step_hash(237); + if (p_67) + break; + step_hash(238); + (*l_68) = l_230[4]; + step_hash(239); + if (p_67) + break; + step_hash(240); + (*g_80) = func_19((p_67 & ((**g_80) != (((signed char)(((int)(-3L) - (int)((*g_80) == l_266)) ^ ((!g_69[2][2]) < (*l_266))) * (signed char)(&p_67 == &p_67)) < p_67))), (*g_80)); + } + step_hash(248); + for (l_74 = 0; (l_74 > 7); l_74 += 5) + { + int *l_269 = &g_69[1][0]; + int *l_270[7][10] = {{&l_230[4], &g_3, &l_75[0], (void*)0, &l_73, &l_75[0], &l_73, (void*)0, &l_75[0], &g_3}, {&l_230[4], &g_3, &l_75[0], (void*)0, &l_73, &l_75[0], &l_73, (void*)0, &l_75[0], &g_3}, {&l_230[4], &g_3, &l_75[0], (void*)0, &l_73, &l_75[0], &l_73, (void*)0, &l_75[0], &g_3}, {&l_230[4], &g_3, &l_75[0], (void*)0, &l_73, &l_75[0], &l_73, (void*)0, &l_75[0], &g_3}, {&l_230[4], &g_3, &l_75[0], (void*)0, &l_73, &l_75[0], &l_73, (void*)0, &l_75[0], &g_3}, {&l_230[4], &g_3, &l_75[0], (void*)0, &l_73, &l_75[0], &l_73, (void*)0, &l_75[0], &g_3}, {&l_230[4], &g_3, &l_75[0], (void*)0, &l_73, &l_75[0], &l_73, (void*)0, &l_75[0], &g_3}}; + int i, j; + step_hash(245); + (*l_266) |= (*l_117); + step_hash(246); + l_277++; + step_hash(247); + l_285--; + } + } + step_hash(250); + (*l_292) = func_19(p_67, func_19((-(unsigned short)((unsigned char)(l_291 != (void*)0) << (unsigned char)(l_292 != &g_81[3]))), (*g_80))); + step_hash(251); + (*g_80) = func_19(g_77, &p_67); + } + else + { + int l_299 = (-1L); + int l_300 = 3L; + short l_340[2][9] = {{0x6CD5L, 0L, 0x6CD5L, 0L, 0x6CD5L, 0L, 0x6CD5L, 0L, 0x6CD5L}, {0x6CD5L, 0L, 0x6CD5L, 0L, 0x6CD5L, 0L, 0x6CD5L, 0L, 0x6CD5L}}; + int ***l_349 = (void*)0; + int i, j; + step_hash(281); + if (p_67) + { + int *l_293[3]; + unsigned short l_301[7][7] = {{0x88C4L, 0x42F5L, 0xB4E1L, 0x0DA8L, 65532UL, 0x2332L, 1UL}, {0x88C4L, 0x42F5L, 0xB4E1L, 0x0DA8L, 65532UL, 0x2332L, 1UL}, {0x88C4L, 0x42F5L, 0xB4E1L, 0x0DA8L, 65532UL, 0x2332L, 1UL}, {0x88C4L, 0x42F5L, 0xB4E1L, 0x0DA8L, 65532UL, 0x2332L, 1UL}, {0x88C4L, 0x42F5L, 0xB4E1L, 0x0DA8L, 65532UL, 0x2332L, 1UL}, {0x88C4L, 0x42F5L, 0xB4E1L, 0x0DA8L, 65532UL, 0x2332L, 1UL}, {0x88C4L, 0x42F5L, 0xB4E1L, 0x0DA8L, 65532UL, 0x2332L, 1UL}}; + int i, j; + for (i = 0; i < 3; i++) + l_293[i] = &g_69[1][2]; + step_hash(254); + l_294--; + step_hash(261); + for (l_258 = 0; (l_258 <= 21); ++l_258) + { + unsigned char l_304 = 0x61L; + step_hash(258); + l_301[4][1]--; + step_hash(259); + --l_304; + step_hash(260); + (*g_80) = (*g_80); + } + } + else + { + signed char l_307 = 0xC8L; + int l_339[7][2] = {{5L, 5L}, {5L, 5L}, {5L, 5L}, {5L, 5L}, {5L, 5L}, {5L, 5L}, {5L, 5L}}; + int i, j; + step_hash(270); + if (l_307) + { + unsigned l_317 = 0x2DF453E9L; + step_hash(264); + (*l_68) = (((unsigned short)p_67 * (unsigned short)(g_69[1][2] > 0x9EL)) <= 0xD804L); + step_hash(265); + (*g_80) = func_19(((g_63[0] > ((signed char)(-(unsigned short)g_2[6][3]) >> (signed char)g_69[1][0])) != 0x1BB33F9AL), &p_67); + step_hash(266); + (*l_68) = (((short)g_77 % (short)((short)l_317 * (short)((unsigned)((unsigned short)(p_67 ^ 249UL) * (unsigned short)0x611FL) - (unsigned)l_300))) == (&l_300 == (void*)0)); + } + else + { + step_hash(268); + (*g_80) = (*g_80); + step_hash(269); + (*l_68) = ((unsigned short)p_67 / (unsigned short)2L); + } + step_hash(279); + if (l_230[6]) + { + int *l_324 = &l_280[3]; + int *l_325 = &l_72; + int *l_326 = &l_230[4]; + int *l_327 = (void*)0; + int *l_328 = &l_75[0]; + int *l_329 = &l_75[0]; + int *l_330 = (void*)0; + int *l_331 = &l_74; + int *l_332 = (void*)0; + int *l_333 = &l_274; + int *l_334 = &l_75[0]; + int *l_335 = &l_271; + int *l_336 = &l_300; + int *l_337 = &l_271; + int *l_338[5]; + int i; + for (i = 0; i < 5; i++) + l_338[i] = &l_271; + step_hash(272); + (*l_117) &= (p_67 != 2UL); + step_hash(273); + --l_341; + step_hash(274); + (*l_266) &= (p_67 || 0x4DL); + } + else + { + step_hash(276); + (*l_68) &= p_67; + step_hash(277); + l_339[0][1] &= ((*g_80) == (void*)0); + step_hash(278); + (*l_266) &= (**g_80); + } + step_hash(280); + return g_25; + } + step_hash(282); + (*l_266) |= ((&p_67 == (void*)0) & ((short)g_69[1][2] * (short)((unsigned char)((l_291 == (void*)0) >= (l_348 != l_349)) / (unsigned char)1L))); + } + step_hash(315); + for (l_341 = 0; (l_341 <= 0); l_341 += 1) + { + int *l_350 = &l_280[5]; + unsigned l_377[9] = {1UL, 1UL, 4UL, 1UL, 1UL, 4UL, 1UL, 1UL, 4UL}; + int i; + step_hash(293); + for (g_77 = 0; (g_77 <= 2); g_77 += 1) + { + int **l_356[8][2] = {{(void*)0, &l_350}, {(void*)0, &l_350}, {(void*)0, &l_350}, {(void*)0, &l_350}, {(void*)0, &l_350}, {(void*)0, &l_350}, {(void*)0, &l_350}, {(void*)0, &l_350}}; + int i, j; + step_hash(290); + (*g_80) = l_350; + step_hash(291); + if (l_231[l_341]) + continue; + step_hash(292); + g_69[g_77][g_77] ^= (0xD5F7L && ((int)(-(unsigned)(*l_350)) % (int)((signed char)((l_356[6][1] == l_356[6][1]) ^ 0x119B53ADL) / (signed char)((short)p_67 << (short)12)))); + } + step_hash(298); + for (l_285 = 0; (l_285 <= 0); l_285 += 1) + { + step_hash(297); + return g_63[0]; + } + step_hash(313); + for (l_74 = 0; (l_74 >= 0); l_74 -= 1) + { + int i; + step_hash(302); + l_280[(l_74 + 3)] = ((unsigned)((int)l_75[l_341] - (int)(l_280[(l_74 + 3)] >= ((short)(((unsigned char)p_67 >> (unsigned char)4) >= (-9L)) - (short)((short)g_69[1][2] * (short)g_77)))) - (unsigned)((g_25 && p_67) && (-1L))); + step_hash(303); + (*g_80) = &p_67; + step_hash(304); + (*l_117) = (0x2B3A094EL ^ (((unsigned short)g_2[2][8] % (unsigned short)1L) && (**g_80))); + } + step_hash(314); + return g_3; + } + } + } + step_hash(318); + return g_284; +} + + +void csmith_compute_hash(void) +{ + int i, j; + for (i = 0; i < 10; i++) + { + for (j = 0; j < 10; j++) + { + transparent_crc(g_2[i][j], "g_2[i][j]", print_hash_value); + if (print_hash_value) printf("index = [%d][%d]\n", i, j); + + } + } + transparent_crc(g_3, "g_3", print_hash_value); + transparent_crc(g_25, "g_25", print_hash_value); + for (i = 0; i < 1; i++) + { + transparent_crc(g_63[i], "g_63[i]", print_hash_value); + if (print_hash_value) printf("index = [%d]\n", i); + + } + for (i = 0; i < 3; i++) + { + for (j = 0; j < 3; j++) + { + transparent_crc(g_69[i][j], "g_69[i][j]", print_hash_value); + if (print_hash_value) printf("index = [%d][%d]\n", i, j); + + } + } + transparent_crc(g_77, "g_77", print_hash_value); + transparent_crc(g_284, "g_284", print_hash_value); + for (i = 0; i < 9; i++) + { + for (j = 0; j < 9; j++) + { + transparent_crc(g_381[i][j], "g_381[i][j]", print_hash_value); + if (print_hash_value) printf("index = [%d][%d]\n", i, j); + + } + } + transparent_crc(g_399, "g_399", print_hash_value); + transparent_crc(g_512, "g_512", print_hash_value); + transparent_crc(g_573, "g_573", print_hash_value); + transparent_crc(g_604, "g_604", print_hash_value); + for (i = 0; i < 8; i++) + { + transparent_crc(g_638[i], "g_638[i]", print_hash_value); + if (print_hash_value) printf("index = [%d]\n", i); + + } +} + +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} + + + +int main (void) +{ + int i, j; + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand106.expect b/src/tests/csmith/rand106.expect new file mode 100644 index 0000000..2c33fb5 --- /dev/null +++ b/src/tests/csmith/rand106.expect @@ -0,0 +1,1221 @@ +...checksum after hashing g_2[i][j] : 82F7B075 +index = [0][0] +...checksum after hashing g_2[i][j] : 7255BCC3 +index = [0][1] +...checksum after hashing g_2[i][j] : 488347E4 +index = [0][2] +...checksum after hashing g_2[i][j] : 7EB9E12 +index = [0][3] +...checksum after hashing g_2[i][j] : B78B0D13 +index = [0][4] +...checksum after hashing g_2[i][j] : 74A78B86 +index = [0][5] +...checksum after hashing g_2[i][j] : 118B32F8 +index = [0][6] +...checksum after hashing g_2[i][j] : E6891234 +index = [0][7] +...checksum after hashing g_2[i][j] : A1EBBBE1 +index = [0][8] +...checksum after hashing g_2[i][j] : C76AB378 +index = [0][9] +...checksum after hashing g_2[i][j] : 7176AC71 +index = [1][0] +...checksum after hashing g_2[i][j] : EE277B2C +index = [1][1] +...checksum after hashing g_2[i][j] : B6CF5254 +index = [1][2] +...checksum after hashing g_2[i][j] : 6BD6E01 +index = [1][3] +...checksum after hashing g_2[i][j] : DB054CF6 +index = [1][4] +...checksum after hashing g_2[i][j] : 55A45CD +index = [1][5] +...checksum after hashing g_2[i][j] : 40BF88D4 +index = [1][6] +...checksum after hashing g_2[i][j] : 63E2EBE1 +index = [1][7] +...checksum after hashing g_2[i][j] : 11AF7FD6 +index = [1][8] +...checksum after hashing g_2[i][j] : 63447471 +index = [1][9] +...checksum after hashing g_2[i][j] : 42220DE3 +index = [2][0] +...checksum after hashing g_2[i][j] : 40D39C12 +index = [2][1] +...checksum after hashing g_2[i][j] : 4B28B1B5 +index = [2][2] +...checksum after hashing g_2[i][j] : 11E9CD2F +index = [2][3] +...checksum after hashing g_2[i][j] : 1DD26A55 +index = [2][4] +...checksum after hashing g_2[i][j] : DA3AFD29 +index = [2][5] +...checksum after hashing g_2[i][j] : A17E55F1 +index = [2][6] +...checksum after hashing g_2[i][j] : 74B3266F +index = [2][7] +...checksum after hashing g_2[i][j] : A52D521F +index = [2][8] +...checksum after hashing g_2[i][j] : 9D2D8D12 +index = [2][9] +...checksum after hashing g_2[i][j] : 3F9E12A4 +index = [3][0] +...checksum after hashing g_2[i][j] : 37AEF4EE +index = [3][1] +...checksum after hashing g_2[i][j] : 95AC6116 +index = [3][2] +...checksum after hashing g_2[i][j] : FD3AEC68 +index = [3][3] +...checksum after hashing g_2[i][j] : 21371E89 +index = [3][4] +...checksum after hashing g_2[i][j] : E92640AA +index = [3][5] +...checksum after hashing g_2[i][j] : CAB31D2C +index = [3][6] +...checksum after hashing g_2[i][j] : 7A308A80 +index = [3][7] +...checksum after hashing g_2[i][j] : C4541FA +index = [3][8] +...checksum after hashing g_2[i][j] : 60C2DBD2 +index = [3][9] +...checksum after hashing g_2[i][j] : 3B08CF22 +index = [4][0] +...checksum after hashing g_2[i][j] : 5ABB52EF +index = [4][1] +...checksum after hashing g_2[i][j] : F453DC50 +index = [4][2] +...checksum after hashing g_2[i][j] : 27522A76 +index = [4][3] +...checksum after hashing g_2[i][j] : CFF10EB2 +index = [4][4] +...checksum after hashing g_2[i][j] : 83823CD +index = [4][5] +...checksum after hashing g_2[i][j] : 259F4ADE +index = [4][6] +...checksum after hashing g_2[i][j] : 3628F8DE +index = [4][7] +...checksum after hashing g_2[i][j] : 8D9310B7 +index = [4][8] +...checksum after hashing g_2[i][j] : 291FCE9A +index = [4][9] +...checksum after hashing g_2[i][j] : 44D39C0D +index = [5][0] +...checksum after hashing g_2[i][j] : 6E660D17 +index = [5][1] +...checksum after hashing g_2[i][j] : C543C472 +index = [5][2] +...checksum after hashing g_2[i][j] : 2440AD60 +index = [5][3] +...checksum after hashing g_2[i][j] : BF042A9D +index = [5][4] +...checksum after hashing g_2[i][j] : F6E3165D +index = [5][5] +...checksum after hashing g_2[i][j] : 82B64FCE +index = [5][6] +...checksum after hashing g_2[i][j] : 6C0EC40A +index = [5][7] +...checksum after hashing g_2[i][j] : 41B41943 +index = [5][8] +...checksum after hashing g_2[i][j] : 67DD481B +index = [5][9] +...checksum after hashing g_2[i][j] : 9C26F33A +index = [6][0] +...checksum after hashing g_2[i][j] : A1D20E0C +index = [6][1] +...checksum after hashing g_2[i][j] : CB6F1E28 +index = [6][2] +...checksum after hashing g_2[i][j] : DE67B4E9 +index = [6][3] +...checksum after hashing g_2[i][j] : BB0FE2B4 +index = [6][4] +...checksum after hashing g_2[i][j] : 50FC2CC3 +index = [6][5] +...checksum after hashing g_2[i][j] : 43AB15C +index = [6][6] +...checksum after hashing g_2[i][j] : 57F042AD +index = [6][7] +...checksum after hashing g_2[i][j] : 4F847ADA +index = [6][8] +...checksum after hashing g_2[i][j] : D5FA88B8 +index = [6][9] +...checksum after hashing g_2[i][j] : ADFDB354 +index = [7][0] +...checksum after hashing g_2[i][j] : 39A31F12 +index = [7][1] +...checksum after hashing g_2[i][j] : AEBDA402 +index = [7][2] +...checksum after hashing g_2[i][j] : 57F7B23F +index = [7][3] +...checksum after hashing g_2[i][j] : 5998C9DD +index = [7][4] +...checksum after hashing g_2[i][j] : 52CEA2C2 +index = [7][5] +...checksum after hashing g_2[i][j] : 5453D5EE +index = [7][6] +...checksum after hashing g_2[i][j] : 7001265A +index = [7][7] +...checksum after hashing g_2[i][j] : B34652AF +index = [7][8] +...checksum after hashing g_2[i][j] : F282C4B5 +index = [7][9] +...checksum after hashing g_2[i][j] : 64FB59B8 +index = [8][0] +...checksum after hashing g_2[i][j] : B59D6976 +index = [8][1] +...checksum after hashing g_2[i][j] : EF4E04C2 +index = [8][2] +...checksum after hashing g_2[i][j] : C688C221 +index = [8][3] +...checksum after hashing g_2[i][j] : 920047CA +index = [8][4] +...checksum after hashing g_2[i][j] : C185E044 +index = [8][5] +...checksum after hashing g_2[i][j] : 95F43197 +index = [8][6] +...checksum after hashing g_2[i][j] : C5F86938 +index = [8][7] +...checksum after hashing g_2[i][j] : 27DABA2D +index = [8][8] +...checksum after hashing g_2[i][j] : 38B5A956 +index = [8][9] +...checksum after hashing g_2[i][j] : B886487 +index = [9][0] +...checksum after hashing g_2[i][j] : E879A1BE +index = [9][1] +...checksum after hashing g_2[i][j] : ECC31E72 +index = [9][2] +...checksum after hashing g_2[i][j] : DD6F1DA1 +index = [9][3] +...checksum after hashing g_2[i][j] : 62D62F3B +index = [9][4] +...checksum after hashing g_2[i][j] : D3449B9B +index = [9][5] +...checksum after hashing g_2[i][j] : 923F88AE +index = [9][6] +...checksum after hashing g_2[i][j] : 343E80AA +index = [9][7] +...checksum after hashing g_2[i][j] : C1BACA6F +index = [9][8] +...checksum after hashing g_2[i][j] : 71CD7D5A +index = [9][9] +...checksum after hashing g_3 : E105196D +...checksum after hashing g_25 : 12E956CC +...checksum after hashing g_63[i] : 9EBE54D +index = [0] +...checksum after hashing g_69[i][j] : A44775E8 +index = [0][0] +...checksum after hashing g_69[i][j] : C6795830 +index = [0][1] +...checksum after hashing g_69[i][j] : B8385753 +index = [0][2] +...checksum after hashing g_69[i][j] : C4286AFC +index = [1][0] +...checksum after hashing g_69[i][j] : A1AF6A85 +index = [1][1] +...checksum after hashing g_69[i][j] : B1CF4E67 +index = [1][2] +...checksum after hashing g_69[i][j] : 8AB7522B +index = [2][0] +...checksum after hashing g_69[i][j] : 57E9A5CF +index = [2][1] +...checksum after hashing g_69[i][j] : 2D6898E9 +index = [2][2] +...checksum after hashing g_77 : 8A3247C5 +...checksum after hashing g_284 : 68C85C9B +...checksum after hashing g_381[i][j] : 850BBD5 +index = [0][0] +...checksum after hashing g_381[i][j] : 1CC2C386 +index = [0][1] +...checksum after hashing g_381[i][j] : C3C9E006 +index = [0][2] +...checksum after hashing g_381[i][j] : E4FF3ECB +index = [0][3] +...checksum after hashing g_381[i][j] : FC07C406 +index = [0][4] +...checksum after hashing g_381[i][j] : F414AE15 +index = [0][5] +...checksum after hashing g_381[i][j] : 67A2881F +index = [0][6] +...checksum after hashing g_381[i][j] : D89869DB +index = [0][7] +...checksum after hashing g_381[i][j] : F21C5CB8 +index = [0][8] +...checksum after hashing g_381[i][j] : 4F59C144 +index = [1][0] +...checksum after hashing g_381[i][j] : 7922C7BB +index = [1][1] +...checksum after hashing g_381[i][j] : A5270E9D +index = [1][2] +...checksum after hashing g_381[i][j] : 49EEBFCB +index = [1][3] +...checksum after hashing g_381[i][j] : E74E49F4 +index = [1][4] +...checksum after hashing g_381[i][j] : 9A48C54A +index = [1][5] +...checksum after hashing g_381[i][j] : C4AED2D +index = [1][6] +...checksum after hashing g_381[i][j] : 8061910E +index = [1][7] +...checksum after hashing g_381[i][j] : F88FB449 +index = [1][8] +...checksum after hashing g_381[i][j] : 6CCB0159 +index = [2][0] +...checksum after hashing g_381[i][j] : ABEE4753 +index = [2][1] +...checksum after hashing g_381[i][j] : 584B5770 +index = [2][2] +...checksum after hashing g_381[i][j] : 4D2991B +index = [2][3] +...checksum after hashing g_381[i][j] : 86448EED +index = [2][4] +...checksum after hashing g_381[i][j] : E3E3E4DE +index = [2][5] +...checksum after hashing g_381[i][j] : 63CD1BB3 +index = [2][6] +...checksum after hashing g_381[i][j] : C5787ABE +index = [2][7] +...checksum after hashing g_381[i][j] : DDFCD995 +index = [2][8] +...checksum after hashing g_381[i][j] : F50A179 +index = [3][0] +...checksum after hashing g_381[i][j] : 94AAD63E +index = [3][1] +...checksum after hashing g_381[i][j] : 4FA50D55 +index = [3][2] +...checksum after hashing g_381[i][j] : B13B36D4 +index = [3][3] +...checksum after hashing g_381[i][j] : 4EF96546 +index = [3][4] +...checksum after hashing g_381[i][j] : 18EADFEC +index = [3][5] +...checksum after hashing g_381[i][j] : EA7CB135 +index = [3][6] +...checksum after hashing g_381[i][j] : B01FEF92 +index = [3][7] +...checksum after hashing g_381[i][j] : C613CBDB +index = [3][8] +...checksum after hashing g_381[i][j] : 38BADFA6 +index = [4][0] +...checksum after hashing g_381[i][j] : A8DE84C2 +index = [4][1] +...checksum after hashing g_381[i][j] : 88119EE1 +index = [4][2] +...checksum after hashing g_381[i][j] : 59D7D51F +index = [4][3] +...checksum after hashing g_381[i][j] : 180BB412 +index = [4][4] +...checksum after hashing g_381[i][j] : 744C6FE0 +index = [4][5] +...checksum after hashing g_381[i][j] : D9ADC681 +index = [4][6] +...checksum after hashing g_381[i][j] : 5442DDC2 +index = [4][7] +...checksum after hashing g_381[i][j] : 8283F0FF +index = [4][8] +...checksum after hashing g_381[i][j] : 3F24E22D +index = [5][0] +...checksum after hashing g_381[i][j] : CF93F10C +index = [5][1] +...checksum after hashing g_381[i][j] : DAB868DC +index = [5][2] +...checksum after hashing g_381[i][j] : 107FCD79 +index = [5][3] +...checksum after hashing g_381[i][j] : 7DAD21D0 +index = [5][4] +...checksum after hashing g_381[i][j] : 9655BDCE +index = [5][5] +...checksum after hashing g_381[i][j] : C249D59E +index = [5][6] +...checksum after hashing g_381[i][j] : F22F7826 +index = [5][7] +...checksum after hashing g_381[i][j] : EBCBAA2C +index = [5][8] +...checksum after hashing g_381[i][j] : 662043CD +index = [6][0] +...checksum after hashing g_381[i][j] : B78DAB37 +index = [6][1] +...checksum after hashing g_381[i][j] : 16267ACB +index = [6][2] +...checksum after hashing g_381[i][j] : BF03FC4E +index = [6][3] +...checksum after hashing g_381[i][j] : F01BE6EC +index = [6][4] +...checksum after hashing g_381[i][j] : 99DE8CB1 +index = [6][5] +...checksum after hashing g_381[i][j] : 9C74B6E2 +index = [6][6] +...checksum after hashing g_381[i][j] : 7F6C2636 +index = [6][7] +...checksum after hashing g_381[i][j] : 95AD1D52 +index = [6][8] +...checksum after hashing g_381[i][j] : A9CBECED +index = [7][0] +...checksum after hashing g_381[i][j] : 73CAEB52 +index = [7][1] +...checksum after hashing g_381[i][j] : 49752F51 +index = [7][2] +...checksum after hashing g_381[i][j] : 6DCB5327 +index = [7][3] +...checksum after hashing g_381[i][j] : FEFAA86 +index = [7][4] +...checksum after hashing g_381[i][j] : E9172446 +index = [7][5] +...checksum after hashing g_381[i][j] : 1A93891F +index = [7][6] +...checksum after hashing g_381[i][j] : 31B309DF +index = [7][7] +...checksum after hashing g_381[i][j] : 9A0FA77A +index = [7][8] +...checksum after hashing g_381[i][j] : 80AD300 +index = [8][0] +...checksum after hashing g_381[i][j] : BD8A56B +index = [8][1] +...checksum after hashing g_381[i][j] : 9878B16D +index = [8][2] +...checksum after hashing g_381[i][j] : 64C11DCB +index = [8][3] +...checksum after hashing g_381[i][j] : 6A71A4E2 +index = [8][4] +...checksum after hashing g_381[i][j] : 85D75B5B +index = [8][5] +...checksum after hashing g_381[i][j] : 68B3D30D +index = [8][6] +...checksum after hashing g_381[i][j] : 8107091F +index = [8][7] +...checksum after hashing g_381[i][j] : A78A914C +index = [8][8] +...checksum after hashing g_399 : 2F80645F +...checksum after hashing g_512 : D51A6163 +...checksum after hashing g_573 : FC868559 +...checksum after hashing g_604 : 4083B922 +...checksum after hashing g_638[i] : E185B0A8 +index = [0] +...checksum after hashing g_638[i] : CAE25E34 +index = [1] +...checksum after hashing g_638[i] : 49D14E16 +index = [2] +...checksum after hashing g_638[i] : 8ECF8ACD +index = [3] +...checksum after hashing g_638[i] : 69A455B1 +index = [4] +...checksum after hashing g_638[i] : 27264A9B +index = [5] +...checksum after hashing g_638[i] : 36DBC066 +index = [6] +...checksum after hashing g_638[i] : 340E98FC +index = [7] +before stmt(677): checksum = 340E98FC +...checksum after hashing g_2[i][j] : 82F7B075 +index = [0][0] +...checksum after hashing g_2[i][j] : 7255BCC3 +index = [0][1] +...checksum after hashing g_2[i][j] : 488347E4 +index = [0][2] +...checksum after hashing g_2[i][j] : 7EB9E12 +index = [0][3] +...checksum after hashing g_2[i][j] : B78B0D13 +index = [0][4] +...checksum after hashing g_2[i][j] : 74A78B86 +index = [0][5] +...checksum after hashing g_2[i][j] : 118B32F8 +index = [0][6] +...checksum after hashing g_2[i][j] : E6891234 +index = [0][7] +...checksum after hashing g_2[i][j] : A1EBBBE1 +index = [0][8] +...checksum after hashing g_2[i][j] : C76AB378 +index = [0][9] +...checksum after hashing g_2[i][j] : 7176AC71 +index = [1][0] +...checksum after hashing g_2[i][j] : EE277B2C +index = [1][1] +...checksum after hashing g_2[i][j] : B6CF5254 +index = [1][2] +...checksum after hashing g_2[i][j] : 6BD6E01 +index = [1][3] +...checksum after hashing g_2[i][j] : DB054CF6 +index = [1][4] +...checksum after hashing g_2[i][j] : 55A45CD +index = [1][5] +...checksum after hashing g_2[i][j] : 40BF88D4 +index = [1][6] +...checksum after hashing g_2[i][j] : 63E2EBE1 +index = [1][7] +...checksum after hashing g_2[i][j] : 11AF7FD6 +index = [1][8] +...checksum after hashing g_2[i][j] : 63447471 +index = [1][9] +...checksum after hashing g_2[i][j] : 42220DE3 +index = [2][0] +...checksum after hashing g_2[i][j] : 40D39C12 +index = [2][1] +...checksum after hashing g_2[i][j] : 4B28B1B5 +index = [2][2] +...checksum after hashing g_2[i][j] : 11E9CD2F +index = [2][3] +...checksum after hashing g_2[i][j] : 1DD26A55 +index = [2][4] +...checksum after hashing g_2[i][j] : DA3AFD29 +index = [2][5] +...checksum after hashing g_2[i][j] : A17E55F1 +index = [2][6] +...checksum after hashing g_2[i][j] : 74B3266F +index = [2][7] +...checksum after hashing g_2[i][j] : A52D521F +index = [2][8] +...checksum after hashing g_2[i][j] : 9D2D8D12 +index = [2][9] +...checksum after hashing g_2[i][j] : 3F9E12A4 +index = [3][0] +...checksum after hashing g_2[i][j] : 37AEF4EE +index = [3][1] +...checksum after hashing g_2[i][j] : 95AC6116 +index = [3][2] +...checksum after hashing g_2[i][j] : FD3AEC68 +index = [3][3] +...checksum after hashing g_2[i][j] : 21371E89 +index = [3][4] +...checksum after hashing g_2[i][j] : E92640AA +index = [3][5] +...checksum after hashing g_2[i][j] : CAB31D2C +index = [3][6] +...checksum after hashing g_2[i][j] : 7A308A80 +index = [3][7] +...checksum after hashing g_2[i][j] : C4541FA +index = [3][8] +...checksum after hashing g_2[i][j] : 60C2DBD2 +index = [3][9] +...checksum after hashing g_2[i][j] : 3B08CF22 +index = [4][0] +...checksum after hashing g_2[i][j] : 5ABB52EF +index = [4][1] +...checksum after hashing g_2[i][j] : F453DC50 +index = [4][2] +...checksum after hashing g_2[i][j] : 27522A76 +index = [4][3] +...checksum after hashing g_2[i][j] : CFF10EB2 +index = [4][4] +...checksum after hashing g_2[i][j] : 83823CD +index = [4][5] +...checksum after hashing g_2[i][j] : 259F4ADE +index = [4][6] +...checksum after hashing g_2[i][j] : 3628F8DE +index = [4][7] +...checksum after hashing g_2[i][j] : 8D9310B7 +index = [4][8] +...checksum after hashing g_2[i][j] : 291FCE9A +index = [4][9] +...checksum after hashing g_2[i][j] : 44D39C0D +index = [5][0] +...checksum after hashing g_2[i][j] : 6E660D17 +index = [5][1] +...checksum after hashing g_2[i][j] : C543C472 +index = [5][2] +...checksum after hashing g_2[i][j] : 2440AD60 +index = [5][3] +...checksum after hashing g_2[i][j] : BF042A9D +index = [5][4] +...checksum after hashing g_2[i][j] : F6E3165D +index = [5][5] +...checksum after hashing g_2[i][j] : 82B64FCE +index = [5][6] +...checksum after hashing g_2[i][j] : 6C0EC40A +index = [5][7] +...checksum after hashing g_2[i][j] : 41B41943 +index = [5][8] +...checksum after hashing g_2[i][j] : 67DD481B +index = [5][9] +...checksum after hashing g_2[i][j] : 9C26F33A +index = [6][0] +...checksum after hashing g_2[i][j] : A1D20E0C +index = [6][1] +...checksum after hashing g_2[i][j] : CB6F1E28 +index = [6][2] +...checksum after hashing g_2[i][j] : DE67B4E9 +index = [6][3] +...checksum after hashing g_2[i][j] : BB0FE2B4 +index = [6][4] +...checksum after hashing g_2[i][j] : 50FC2CC3 +index = [6][5] +...checksum after hashing g_2[i][j] : 43AB15C +index = [6][6] +...checksum after hashing g_2[i][j] : 57F042AD +index = [6][7] +...checksum after hashing g_2[i][j] : 4F847ADA +index = [6][8] +...checksum after hashing g_2[i][j] : D5FA88B8 +index = [6][9] +...checksum after hashing g_2[i][j] : ADFDB354 +index = [7][0] +...checksum after hashing g_2[i][j] : 39A31F12 +index = [7][1] +...checksum after hashing g_2[i][j] : AEBDA402 +index = [7][2] +...checksum after hashing g_2[i][j] : 57F7B23F +index = [7][3] +...checksum after hashing g_2[i][j] : 5998C9DD +index = [7][4] +...checksum after hashing g_2[i][j] : 52CEA2C2 +index = [7][5] +...checksum after hashing g_2[i][j] : 5453D5EE +index = [7][6] +...checksum after hashing g_2[i][j] : 7001265A +index = [7][7] +...checksum after hashing g_2[i][j] : B34652AF +index = [7][8] +...checksum after hashing g_2[i][j] : F282C4B5 +index = [7][9] +...checksum after hashing g_2[i][j] : 64FB59B8 +index = [8][0] +...checksum after hashing g_2[i][j] : B59D6976 +index = [8][1] +...checksum after hashing g_2[i][j] : EF4E04C2 +index = [8][2] +...checksum after hashing g_2[i][j] : C688C221 +index = [8][3] +...checksum after hashing g_2[i][j] : 920047CA +index = [8][4] +...checksum after hashing g_2[i][j] : C185E044 +index = [8][5] +...checksum after hashing g_2[i][j] : 95F43197 +index = [8][6] +...checksum after hashing g_2[i][j] : C5F86938 +index = [8][7] +...checksum after hashing g_2[i][j] : 27DABA2D +index = [8][8] +...checksum after hashing g_2[i][j] : 38B5A956 +index = [8][9] +...checksum after hashing g_2[i][j] : B886487 +index = [9][0] +...checksum after hashing g_2[i][j] : E879A1BE +index = [9][1] +...checksum after hashing g_2[i][j] : ECC31E72 +index = [9][2] +...checksum after hashing g_2[i][j] : DD6F1DA1 +index = [9][3] +...checksum after hashing g_2[i][j] : 62D62F3B +index = [9][4] +...checksum after hashing g_2[i][j] : D3449B9B +index = [9][5] +...checksum after hashing g_2[i][j] : 923F88AE +index = [9][6] +...checksum after hashing g_2[i][j] : 343E80AA +index = [9][7] +...checksum after hashing g_2[i][j] : C1BACA6F +index = [9][8] +...checksum after hashing g_2[i][j] : 71CD7D5A +index = [9][9] +...checksum after hashing g_3 : EF36C314 +...checksum after hashing g_25 : 9713410B +...checksum after hashing g_63[i] : 8899F89F +index = [0] +...checksum after hashing g_69[i][j] : BB529C1B +index = [0][0] +...checksum after hashing g_69[i][j] : 4E24E1B7 +index = [0][1] +...checksum after hashing g_69[i][j] : EE4F3445 +index = [0][2] +...checksum after hashing g_69[i][j] : 19BD0C36 +index = [1][0] +...checksum after hashing g_69[i][j] : 510343 +index = [1][1] +...checksum after hashing g_69[i][j] : 8E01505F +index = [1][2] +...checksum after hashing g_69[i][j] : 4A8FDBE2 +index = [2][0] +...checksum after hashing g_69[i][j] : 3EB35A07 +index = [2][1] +...checksum after hashing g_69[i][j] : 543306CF +index = [2][2] +...checksum after hashing g_77 : 88706FDA +...checksum after hashing g_284 : 7AAD40A1 +...checksum after hashing g_381[i][j] : 69C917AE +index = [0][0] +...checksum after hashing g_381[i][j] : EAA82082 +index = [0][1] +...checksum after hashing g_381[i][j] : 2CC3CDAC +index = [0][2] +...checksum after hashing g_381[i][j] : 3CE6057A +index = [0][3] +...checksum after hashing g_381[i][j] : 62FF1476 +index = [0][4] +...checksum after hashing g_381[i][j] : D970EE4F +index = [0][5] +...checksum after hashing g_381[i][j] : F7C618CF +index = [0][6] +...checksum after hashing g_381[i][j] : F2415555 +index = [0][7] +...checksum after hashing g_381[i][j] : 59AA36C4 +index = [0][8] +...checksum after hashing g_381[i][j] : D86BE3C8 +index = [1][0] +...checksum after hashing g_381[i][j] : 667F0E20 +index = [1][1] +...checksum after hashing g_381[i][j] : D305EB1B +index = [1][2] +...checksum after hashing g_381[i][j] : 3021D64E +index = [1][3] +...checksum after hashing g_381[i][j] : 1F74FD4B +index = [1][4] +...checksum after hashing g_381[i][j] : 8BC1691D +index = [1][5] +...checksum after hashing g_381[i][j] : A037DC2 +index = [1][6] +...checksum after hashing g_381[i][j] : 3BB629E9 +index = [1][7] +...checksum after hashing g_381[i][j] : EAA05BBC +index = [1][8] +...checksum after hashing g_381[i][j] : 9E683974 +index = [2][0] +...checksum after hashing g_381[i][j] : 557F882 +index = [2][1] +...checksum after hashing g_381[i][j] : CC8ABBF +index = [2][2] +...checksum after hashing g_381[i][j] : EA8AB39A +index = [2][3] +...checksum after hashing g_381[i][j] : D3AB84A6 +index = [2][4] +...checksum after hashing g_381[i][j] : 6086F46C +index = [2][5] +...checksum after hashing g_381[i][j] : A4AB73AA +index = [2][6] +...checksum after hashing g_381[i][j] : 980A6301 +index = [2][7] +...checksum after hashing g_381[i][j] : 83C9299B +index = [2][8] +...checksum after hashing g_381[i][j] : 74A91BDF +index = [3][0] +...checksum after hashing g_381[i][j] : 36CA1961 +index = [3][1] +...checksum after hashing g_381[i][j] : 1B1D6ABF +index = [3][2] +...checksum after hashing g_381[i][j] : 57BFB70 +index = [3][3] +...checksum after hashing g_381[i][j] : 29F2D697 +index = [3][4] +...checksum after hashing g_381[i][j] : 71386C69 +index = [3][5] +...checksum after hashing g_381[i][j] : 7083C914 +index = [3][6] +...checksum after hashing g_381[i][j] : 718D9909 +index = [3][7] +...checksum after hashing g_381[i][j] : 533AA322 +index = [3][8] +...checksum after hashing g_381[i][j] : 4133E433 +index = [4][0] +...checksum after hashing g_381[i][j] : C9E675BF +index = [4][1] +...checksum after hashing g_381[i][j] : 88681272 +index = [4][2] +...checksum after hashing g_381[i][j] : E0F0BB0E +index = [4][3] +...checksum after hashing g_381[i][j] : DA9FDB8F +index = [4][4] +...checksum after hashing g_381[i][j] : 18AA3606 +index = [4][5] +...checksum after hashing g_381[i][j] : 5F4B443 +index = [4][6] +...checksum after hashing g_381[i][j] : 3B6F3F93 +index = [4][7] +...checksum after hashing g_381[i][j] : A673BAD0 +index = [4][8] +...checksum after hashing g_381[i][j] : 92C7503F +index = [5][0] +...checksum after hashing g_381[i][j] : 2E6D3B1C +index = [5][1] +...checksum after hashing g_381[i][j] : 4BAB3208 +index = [5][2] +...checksum after hashing g_381[i][j] : 3E85AA91 +index = [5][3] +...checksum after hashing g_381[i][j] : 117B915A +index = [5][4] +...checksum after hashing g_381[i][j] : 42895A6B +index = [5][5] +...checksum after hashing g_381[i][j] : B8626652 +index = [5][6] +...checksum after hashing g_381[i][j] : CF0C0C9A +index = [5][7] +...checksum after hashing g_381[i][j] : 956A0F2 +index = [5][8] +...checksum after hashing g_381[i][j] : 27D77FB2 +index = [6][0] +...checksum after hashing g_381[i][j] : F3860175 +index = [6][1] +...checksum after hashing g_381[i][j] : 61916E89 +index = [6][2] +...checksum after hashing g_381[i][j] : F0D4BBB4 +index = [6][3] +...checksum after hashing g_381[i][j] : 440F84B3 +index = [6][4] +...checksum after hashing g_381[i][j] : A3412CCB +index = [6][5] +...checksum after hashing g_381[i][j] : 715BE41D +index = [6][6] +...checksum after hashing g_381[i][j] : 2F67CB1 +index = [6][7] +...checksum after hashing g_381[i][j] : 211257A7 +index = [6][8] +...checksum after hashing g_381[i][j] : CA2FC78C +index = [7][0] +...checksum after hashing g_381[i][j] : 2AE1D43F +index = [7][1] +...checksum after hashing g_381[i][j] : CBC9B61B +index = [7][2] +...checksum after hashing g_381[i][j] : 20666BB9 +index = [7][3] +...checksum after hashing g_381[i][j] : 6BCC77B0 +index = [7][4] +...checksum after hashing g_381[i][j] : 4D70F778 +index = [7][5] +...checksum after hashing g_381[i][j] : 7EAF1775 +index = [7][6] +...checksum after hashing g_381[i][j] : AB8957FC +index = [7][7] +...checksum after hashing g_381[i][j] : 7BD90033 +index = [7][8] +...checksum after hashing g_381[i][j] : 324E3F25 +index = [8][0] +...checksum after hashing g_381[i][j] : 6ED58010 +index = [8][1] +...checksum after hashing g_381[i][j] : 92B6F961 +index = [8][2] +...checksum after hashing g_381[i][j] : E5326DD5 +index = [8][3] +...checksum after hashing g_381[i][j] : 2B68EDD6 +index = [8][4] +...checksum after hashing g_381[i][j] : 1F0E5AFC +index = [8][5] +...checksum after hashing g_381[i][j] : F9ED9C8A +index = [8][6] +...checksum after hashing g_381[i][j] : 297F9E68 +index = [8][7] +...checksum after hashing g_381[i][j] : 96D57F38 +index = [8][8] +...checksum after hashing g_399 : 45CEF9F +...checksum after hashing g_512 : CF060857 +...checksum after hashing g_573 : DFDCBE27 +...checksum after hashing g_604 : 16EA050 +...checksum after hashing g_638[i] : D94FBCE7 +index = [0] +...checksum after hashing g_638[i] : 19986861 +index = [1] +...checksum after hashing g_638[i] : 5FEE3AB6 +index = [2] +...checksum after hashing g_638[i] : 3C56CC29 +index = [3] +...checksum after hashing g_638[i] : C142915F +index = [4] +...checksum after hashing g_638[i] : 57093DBC +index = [5] +...checksum after hashing g_638[i] : 18996065 +index = [6] +...checksum after hashing g_638[i] : E15A4A3A +index = [7] +before stmt(678): checksum = E15A4A3A +...checksum after hashing g_2[i][j] : 82F7B075 +index = [0][0] +...checksum after hashing g_2[i][j] : 7255BCC3 +index = [0][1] +...checksum after hashing g_2[i][j] : 488347E4 +index = [0][2] +...checksum after hashing g_2[i][j] : 7EB9E12 +index = [0][3] +...checksum after hashing g_2[i][j] : B78B0D13 +index = [0][4] +...checksum after hashing g_2[i][j] : 74A78B86 +index = [0][5] +...checksum after hashing g_2[i][j] : 118B32F8 +index = [0][6] +...checksum after hashing g_2[i][j] : E6891234 +index = [0][7] +...checksum after hashing g_2[i][j] : A1EBBBE1 +index = [0][8] +...checksum after hashing g_2[i][j] : C76AB378 +index = [0][9] +...checksum after hashing g_2[i][j] : 7176AC71 +index = [1][0] +...checksum after hashing g_2[i][j] : EE277B2C +index = [1][1] +...checksum after hashing g_2[i][j] : B6CF5254 +index = [1][2] +...checksum after hashing g_2[i][j] : 6BD6E01 +index = [1][3] +...checksum after hashing g_2[i][j] : DB054CF6 +index = [1][4] +...checksum after hashing g_2[i][j] : 55A45CD +index = [1][5] +...checksum after hashing g_2[i][j] : 40BF88D4 +index = [1][6] +...checksum after hashing g_2[i][j] : 63E2EBE1 +index = [1][7] +...checksum after hashing g_2[i][j] : 11AF7FD6 +index = [1][8] +...checksum after hashing g_2[i][j] : 63447471 +index = [1][9] +...checksum after hashing g_2[i][j] : 42220DE3 +index = [2][0] +...checksum after hashing g_2[i][j] : 40D39C12 +index = [2][1] +...checksum after hashing g_2[i][j] : 4B28B1B5 +index = [2][2] +...checksum after hashing g_2[i][j] : 11E9CD2F +index = [2][3] +...checksum after hashing g_2[i][j] : 1DD26A55 +index = [2][4] +...checksum after hashing g_2[i][j] : DA3AFD29 +index = [2][5] +...checksum after hashing g_2[i][j] : A17E55F1 +index = [2][6] +...checksum after hashing g_2[i][j] : 74B3266F +index = [2][7] +...checksum after hashing g_2[i][j] : A52D521F +index = [2][8] +...checksum after hashing g_2[i][j] : 9D2D8D12 +index = [2][9] +...checksum after hashing g_2[i][j] : 3F9E12A4 +index = [3][0] +...checksum after hashing g_2[i][j] : 37AEF4EE +index = [3][1] +...checksum after hashing g_2[i][j] : 95AC6116 +index = [3][2] +...checksum after hashing g_2[i][j] : FD3AEC68 +index = [3][3] +...checksum after hashing g_2[i][j] : 21371E89 +index = [3][4] +...checksum after hashing g_2[i][j] : E92640AA +index = [3][5] +...checksum after hashing g_2[i][j] : CAB31D2C +index = [3][6] +...checksum after hashing g_2[i][j] : 7A308A80 +index = [3][7] +...checksum after hashing g_2[i][j] : C4541FA +index = [3][8] +...checksum after hashing g_2[i][j] : 60C2DBD2 +index = [3][9] +...checksum after hashing g_2[i][j] : 3B08CF22 +index = [4][0] +...checksum after hashing g_2[i][j] : 5ABB52EF +index = [4][1] +...checksum after hashing g_2[i][j] : F453DC50 +index = [4][2] +...checksum after hashing g_2[i][j] : 27522A76 +index = [4][3] +...checksum after hashing g_2[i][j] : CFF10EB2 +index = [4][4] +...checksum after hashing g_2[i][j] : 83823CD +index = [4][5] +...checksum after hashing g_2[i][j] : 259F4ADE +index = [4][6] +...checksum after hashing g_2[i][j] : 3628F8DE +index = [4][7] +...checksum after hashing g_2[i][j] : 8D9310B7 +index = [4][8] +...checksum after hashing g_2[i][j] : 291FCE9A +index = [4][9] +...checksum after hashing g_2[i][j] : 44D39C0D +index = [5][0] +...checksum after hashing g_2[i][j] : 6E660D17 +index = [5][1] +...checksum after hashing g_2[i][j] : C543C472 +index = [5][2] +...checksum after hashing g_2[i][j] : 2440AD60 +index = [5][3] +...checksum after hashing g_2[i][j] : BF042A9D +index = [5][4] +...checksum after hashing g_2[i][j] : F6E3165D +index = [5][5] +...checksum after hashing g_2[i][j] : 82B64FCE +index = [5][6] +...checksum after hashing g_2[i][j] : 6C0EC40A +index = [5][7] +...checksum after hashing g_2[i][j] : 41B41943 +index = [5][8] +...checksum after hashing g_2[i][j] : 67DD481B +index = [5][9] +...checksum after hashing g_2[i][j] : 9C26F33A +index = [6][0] +...checksum after hashing g_2[i][j] : A1D20E0C +index = [6][1] +...checksum after hashing g_2[i][j] : CB6F1E28 +index = [6][2] +...checksum after hashing g_2[i][j] : DE67B4E9 +index = [6][3] +...checksum after hashing g_2[i][j] : BB0FE2B4 +index = [6][4] +...checksum after hashing g_2[i][j] : 50FC2CC3 +index = [6][5] +...checksum after hashing g_2[i][j] : 43AB15C +index = [6][6] +...checksum after hashing g_2[i][j] : 57F042AD +index = [6][7] +...checksum after hashing g_2[i][j] : 4F847ADA +index = [6][8] +...checksum after hashing g_2[i][j] : D5FA88B8 +index = [6][9] +...checksum after hashing g_2[i][j] : ADFDB354 +index = [7][0] +...checksum after hashing g_2[i][j] : 39A31F12 +index = [7][1] +...checksum after hashing g_2[i][j] : AEBDA402 +index = [7][2] +...checksum after hashing g_2[i][j] : 57F7B23F +index = [7][3] +...checksum after hashing g_2[i][j] : 5998C9DD +index = [7][4] +...checksum after hashing g_2[i][j] : 52CEA2C2 +index = [7][5] +...checksum after hashing g_2[i][j] : 5453D5EE +index = [7][6] +...checksum after hashing g_2[i][j] : 7001265A +index = [7][7] +...checksum after hashing g_2[i][j] : B34652AF +index = [7][8] +...checksum after hashing g_2[i][j] : F282C4B5 +index = [7][9] +...checksum after hashing g_2[i][j] : 64FB59B8 +index = [8][0] +...checksum after hashing g_2[i][j] : B59D6976 +index = [8][1] +...checksum after hashing g_2[i][j] : EF4E04C2 +index = [8][2] +...checksum after hashing g_2[i][j] : C688C221 +index = [8][3] +...checksum after hashing g_2[i][j] : 920047CA +index = [8][4] +...checksum after hashing g_2[i][j] : C185E044 +index = [8][5] +...checksum after hashing g_2[i][j] : 95F43197 +index = [8][6] +...checksum after hashing g_2[i][j] : C5F86938 +index = [8][7] +...checksum after hashing g_2[i][j] : 27DABA2D +index = [8][8] +...checksum after hashing g_2[i][j] : 38B5A956 +index = [8][9] +...checksum after hashing g_2[i][j] : B886487 +index = [9][0] +...checksum after hashing g_2[i][j] : E879A1BE +index = [9][1] +...checksum after hashing g_2[i][j] : ECC31E72 +index = [9][2] +...checksum after hashing g_2[i][j] : DD6F1DA1 +index = [9][3] +...checksum after hashing g_2[i][j] : 62D62F3B +index = [9][4] +...checksum after hashing g_2[i][j] : D3449B9B +index = [9][5] +...checksum after hashing g_2[i][j] : 923F88AE +index = [9][6] +...checksum after hashing g_2[i][j] : 343E80AA +index = [9][7] +...checksum after hashing g_2[i][j] : C1BACA6F +index = [9][8] +...checksum after hashing g_2[i][j] : 71CD7D5A +index = [9][9] +...checksum after hashing g_3 : EF36C314 +...checksum after hashing g_25 : 9713410B +...checksum after hashing g_63[i] : 8899F89F +index = [0] +...checksum after hashing g_69[i][j] : BB529C1B +index = [0][0] +...checksum after hashing g_69[i][j] : 4E24E1B7 +index = [0][1] +...checksum after hashing g_69[i][j] : EE4F3445 +index = [0][2] +...checksum after hashing g_69[i][j] : 19BD0C36 +index = [1][0] +...checksum after hashing g_69[i][j] : 510343 +index = [1][1] +...checksum after hashing g_69[i][j] : 8E01505F +index = [1][2] +...checksum after hashing g_69[i][j] : 4A8FDBE2 +index = [2][0] +...checksum after hashing g_69[i][j] : 3EB35A07 +index = [2][1] +...checksum after hashing g_69[i][j] : 543306CF +index = [2][2] +...checksum after hashing g_77 : 88706FDA +...checksum after hashing g_284 : 7AAD40A1 +...checksum after hashing g_381[i][j] : 69C917AE +index = [0][0] +...checksum after hashing g_381[i][j] : EAA82082 +index = [0][1] +...checksum after hashing g_381[i][j] : 2CC3CDAC +index = [0][2] +...checksum after hashing g_381[i][j] : 3CE6057A +index = [0][3] +...checksum after hashing g_381[i][j] : 62FF1476 +index = [0][4] +...checksum after hashing g_381[i][j] : D970EE4F +index = [0][5] +...checksum after hashing g_381[i][j] : F7C618CF +index = [0][6] +...checksum after hashing g_381[i][j] : F2415555 +index = [0][7] +...checksum after hashing g_381[i][j] : 59AA36C4 +index = [0][8] +...checksum after hashing g_381[i][j] : D86BE3C8 +index = [1][0] +...checksum after hashing g_381[i][j] : 667F0E20 +index = [1][1] +...checksum after hashing g_381[i][j] : D305EB1B +index = [1][2] +...checksum after hashing g_381[i][j] : 3021D64E +index = [1][3] +...checksum after hashing g_381[i][j] : 1F74FD4B +index = [1][4] +...checksum after hashing g_381[i][j] : 8BC1691D +index = [1][5] +...checksum after hashing g_381[i][j] : A037DC2 +index = [1][6] +...checksum after hashing g_381[i][j] : 3BB629E9 +index = [1][7] +...checksum after hashing g_381[i][j] : EAA05BBC +index = [1][8] +...checksum after hashing g_381[i][j] : 9E683974 +index = [2][0] +...checksum after hashing g_381[i][j] : 557F882 +index = [2][1] +...checksum after hashing g_381[i][j] : CC8ABBF +index = [2][2] +...checksum after hashing g_381[i][j] : EA8AB39A +index = [2][3] +...checksum after hashing g_381[i][j] : D3AB84A6 +index = [2][4] +...checksum after hashing g_381[i][j] : 6086F46C +index = [2][5] +...checksum after hashing g_381[i][j] : A4AB73AA +index = [2][6] +...checksum after hashing g_381[i][j] : 980A6301 +index = [2][7] +...checksum after hashing g_381[i][j] : 83C9299B +index = [2][8] +...checksum after hashing g_381[i][j] : 74A91BDF +index = [3][0] +...checksum after hashing g_381[i][j] : 36CA1961 +index = [3][1] +...checksum after hashing g_381[i][j] : 1B1D6ABF +index = [3][2] +...checksum after hashing g_381[i][j] : 57BFB70 +index = [3][3] +...checksum after hashing g_381[i][j] : 29F2D697 +index = [3][4] +...checksum after hashing g_381[i][j] : 71386C69 +index = [3][5] +...checksum after hashing g_381[i][j] : 7083C914 +index = [3][6] +...checksum after hashing g_381[i][j] : 718D9909 +index = [3][7] +...checksum after hashing g_381[i][j] : 533AA322 +index = [3][8] +...checksum after hashing g_381[i][j] : 4133E433 +index = [4][0] +...checksum after hashing g_381[i][j] : C9E675BF +index = [4][1] +...checksum after hashing g_381[i][j] : 88681272 +index = [4][2] +...checksum after hashing g_381[i][j] : E0F0BB0E +index = [4][3] +...checksum after hashing g_381[i][j] : DA9FDB8F +index = [4][4] +...checksum after hashing g_381[i][j] : 18AA3606 +index = [4][5] +...checksum after hashing g_381[i][j] : 5F4B443 +index = [4][6] +...checksum after hashing g_381[i][j] : 3B6F3F93 +index = [4][7] +...checksum after hashing g_381[i][j] : A673BAD0 +index = [4][8] +...checksum after hashing g_381[i][j] : 92C7503F +index = [5][0] +...checksum after hashing g_381[i][j] : 2E6D3B1C +index = [5][1] +...checksum after hashing g_381[i][j] : 4BAB3208 +index = [5][2] +...checksum after hashing g_381[i][j] : 3E85AA91 +index = [5][3] +...checksum after hashing g_381[i][j] : 117B915A +index = [5][4] +...checksum after hashing g_381[i][j] : 42895A6B +index = [5][5] +...checksum after hashing g_381[i][j] : B8626652 +index = [5][6] +...checksum after hashing g_381[i][j] : CF0C0C9A +index = [5][7] +...checksum after hashing g_381[i][j] : 956A0F2 +index = [5][8] +...checksum after hashing g_381[i][j] : 27D77FB2 +index = [6][0] +...checksum after hashing g_381[i][j] : F3860175 +index = [6][1] +...checksum after hashing g_381[i][j] : 61916E89 +index = [6][2] +...checksum after hashing g_381[i][j] : F0D4BBB4 +index = [6][3] +...checksum after hashing g_381[i][j] : 440F84B3 +index = [6][4] +...checksum after hashing g_381[i][j] : A3412CCB +index = [6][5] +...checksum after hashing g_381[i][j] : 715BE41D +index = [6][6] +...checksum after hashing g_381[i][j] : 2F67CB1 +index = [6][7] +...checksum after hashing g_381[i][j] : 211257A7 +index = [6][8] +...checksum after hashing g_381[i][j] : CA2FC78C +index = [7][0] +...checksum after hashing g_381[i][j] : 2AE1D43F +index = [7][1] +...checksum after hashing g_381[i][j] : CBC9B61B +index = [7][2] +...checksum after hashing g_381[i][j] : 20666BB9 +index = [7][3] +...checksum after hashing g_381[i][j] : 6BCC77B0 +index = [7][4] +...checksum after hashing g_381[i][j] : 4D70F778 +index = [7][5] +...checksum after hashing g_381[i][j] : 7EAF1775 +index = [7][6] +...checksum after hashing g_381[i][j] : AB8957FC +index = [7][7] +...checksum after hashing g_381[i][j] : 7BD90033 +index = [7][8] +...checksum after hashing g_381[i][j] : 324E3F25 +index = [8][0] +...checksum after hashing g_381[i][j] : 6ED58010 +index = [8][1] +...checksum after hashing g_381[i][j] : 92B6F961 +index = [8][2] +...checksum after hashing g_381[i][j] : E5326DD5 +index = [8][3] +...checksum after hashing g_381[i][j] : 2B68EDD6 +index = [8][4] +...checksum after hashing g_381[i][j] : 1F0E5AFC +index = [8][5] +...checksum after hashing g_381[i][j] : F9ED9C8A +index = [8][6] +...checksum after hashing g_381[i][j] : 297F9E68 +index = [8][7] +...checksum after hashing g_381[i][j] : 96D57F38 +index = [8][8] +...checksum after hashing g_399 : 45CEF9F +...checksum after hashing g_512 : CF060857 +...checksum after hashing g_573 : DFDCBE27 +...checksum after hashing g_604 : 16EA050 +...checksum after hashing g_638[i] : D94FBCE7 +index = [0] +...checksum after hashing g_638[i] : 19986861 +index = [1] +...checksum after hashing g_638[i] : 5FEE3AB6 +index = [2] +...checksum after hashing g_638[i] : 3C56CC29 +index = [3] +...checksum after hashing g_638[i] : C142915F +index = [4] +...checksum after hashing g_638[i] : 57093DBC +index = [5] +...checksum after hashing g_638[i] : 18996065 +index = [6] +...checksum after hashing g_638[i] : E15A4A3A +index = [7] +checksum = e15a4a3a diff --git a/src/tests/csmith/rand107.c b/src/tests/csmith/rand107.c new file mode 100644 index 0000000..d01dc17 --- /dev/null +++ b/src/tests/csmith/rand107.c @@ -0,0 +1,2017 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static unsigned g_4 = 4294967295UL; +static int g_49[1][9] = {{0xDA7DA9FCL, (-1L), 0xDA7DA9FCL, (-1L), 0xDA7DA9FCL, (-1L), 0xDA7DA9FCL, (-1L), 0xDA7DA9FCL}}; +static int g_74 = (-1L); +static int g_102 = 1L; +static unsigned char g_137 = 0UL; +static short g_152 = 0L; +static int g_175[9] = {0x2668A2AEL, 0x8BBEDE7EL, 0x2668A2AEL, 0x8BBEDE7EL, 0x2668A2AEL, 0x8BBEDE7EL, 0x2668A2AEL, 0x8BBEDE7EL, 0x2668A2AEL}; +static int *g_205[9] = {&g_102, (void*)0, &g_102, (void*)0, &g_102, (void*)0, &g_102, (void*)0, &g_102}; +static int **g_204 = &g_205[7]; +static signed char g_274 = (-1L); +static short g_276 = 0x36D0L; +static unsigned char g_281 = 0xE4L; +static int g_371 = 1L; +static unsigned char g_426 = 0xF4L; +static int g_476 = 0xCD6301DFL; +static unsigned g_525 = 0x46235F77L; +static unsigned char g_722 = 0x6AL; +static signed char g_768 = 0xEAL; +static signed char g_817 = 1L; +static unsigned char g_881 = 1UL; +static short g_1035 = 1L; +static int g_1037 = 0L; +static unsigned g_1061 = 1UL; +static unsigned g_1164 = 0xDAE71126L; +static signed char g_1259 = 0x87L; +static int g_1283 = (-1L); +static unsigned g_1295 = 0x8B0FDABCL; +static int g_1307 = 0xDA66759FL; +static int g_1313 = (-8L); +static int func_1(void); +static unsigned func_5(unsigned p_6, unsigned p_7); +static unsigned short func_14(signed char p_15, unsigned p_16, unsigned p_17, unsigned p_18, unsigned p_19); +static unsigned char func_24(unsigned p_25); +static int func_31(short p_32); +static int * func_52(unsigned p_53, unsigned char p_54); +static int func_59(int * p_60, signed char p_61, unsigned short p_62, short p_63, int * p_64); +static short func_65(unsigned short p_66, short p_67, int * p_68, int p_69); +static int * func_70(int * p_71); +static int * func_77(unsigned p_78, int * p_79, unsigned p_80, int p_81); +static int func_1(void) +{ + short l_8 = 0x3E31L; + unsigned l_9[10][2] = {{0x23371247L, 0xDB2BC40EL}, {0x23371247L, 0xDB2BC40EL}, {0x23371247L, 0xDB2BC40EL}, {0x23371247L, 0xDB2BC40EL}, {0x23371247L, 0xDB2BC40EL}, {0x23371247L, 0xDB2BC40EL}, {0x23371247L, 0xDB2BC40EL}, {0x23371247L, 0xDB2BC40EL}, {0x23371247L, 0xDB2BC40EL}, {0x23371247L, 0xDB2BC40EL}}; + int l_1286[2]; + short l_1312 = 0x64C7L; + int i, j; + for (i = 0; i < 2; i++) + l_1286[i] = 8L; + step_hash(758); + if (((unsigned short)(0xBA394643L > (g_4 < (func_5(l_8, g_4) >= l_8))) << (unsigned short)4)) + { + unsigned short l_26 = 1UL; + int *l_1306 = &g_1307; + step_hash(754); + (*l_1306) |= (l_9[6][1] || (((((unsigned)((unsigned short)g_4 + (unsigned short)func_14(g_4, g_4, g_4, (((((signed char)((unsigned char)func_24(((l_26 & func_5((((signed char)(((unsigned short)0x4225L % (unsigned short)g_4) ^ ((g_4 > l_26) || g_4)) >> (signed char)g_4) && 0UL), l_8)) || 0xB45BEAC3L)) % (unsigned char)l_26) >> (signed char)5) & 65531UL) <= l_1286[1]) & l_1286[1]), g_881)) % (unsigned)l_1286[1]) | l_26) < g_4) >= (-1L))); + step_hash(755); + return (*l_1306); + } + else + { + unsigned short l_1308[7][3] = {{0xA6D6L, 65528UL, 0UL}, {0xA6D6L, 65528UL, 0UL}, {0xA6D6L, 65528UL, 0UL}, {0xA6D6L, 65528UL, 0UL}, {0xA6D6L, 65528UL, 0UL}, {0xA6D6L, 65528UL, 0UL}, {0xA6D6L, 65528UL, 0UL}}; + int *l_1309 = &g_1307; + int i, j; + step_hash(757); + (*g_204) = (*g_204); + } + step_hash(759); + return l_9[6][1]; +} +static unsigned func_5(unsigned p_6, unsigned p_7) +{ + step_hash(2); + return g_4; +} +static unsigned short func_14(signed char p_15, unsigned p_16, unsigned p_17, unsigned p_18, unsigned p_19) +{ + int ***l_1287 = &g_204; + int *l_1288 = &g_175[7]; + int **l_1293 = &l_1288; + int *l_1294[4][10] = {{&g_49[0][8], &g_49[0][8], &g_49[0][8], &g_49[0][8], &g_49[0][8], &g_49[0][8], &g_49[0][8], &g_49[0][8], &g_49[0][8], &g_49[0][8]}, {&g_49[0][8], &g_49[0][8], &g_49[0][8], &g_49[0][8], &g_49[0][8], &g_49[0][8], &g_49[0][8], &g_49[0][8], &g_49[0][8], &g_49[0][8]}, {&g_49[0][8], &g_49[0][8], &g_49[0][8], &g_49[0][8], &g_49[0][8], &g_49[0][8], &g_49[0][8], &g_49[0][8], &g_49[0][8], &g_49[0][8]}, {&g_49[0][8], &g_49[0][8], &g_49[0][8], &g_49[0][8], &g_49[0][8], &g_49[0][8], &g_49[0][8], &g_49[0][8], &g_49[0][8], &g_49[0][8]}}; + int i, j; + step_hash(744); + (*l_1293) = l_1288; + step_hash(745); + g_1295 |= ((&l_1288 != (void*)0) && (**l_1293)); + step_hash(752); + for (p_16 = 2; (p_16 <= 8); p_16 += 1) + { + short l_1303[4] = {0x746FL, 1L, 0x746FL, 1L}; + unsigned short l_1304 = 0UL; + int l_1305 = 0x2B2A99B9L; + int i; + step_hash(749); + (**l_1293) &= p_15; + step_hash(750); + g_205[p_16] = &g_476; + step_hash(751); + l_1305 ^= ((signed char)(g_281 != (((short)((signed char)p_19 - (signed char)((void*)0 != &l_1293)) >> (short)p_17) || ((0UL != (-(signed char)((l_1303[3] < p_15) <= func_5(l_1304, p_15)))) ^ g_525))) - (signed char)g_175[1]); + } + step_hash(753); + return g_281; +} +static unsigned char func_24(unsigned p_25) +{ + unsigned l_45[2]; + int l_46 = 0x5296947AL; + unsigned l_47 = 1UL; + int *l_1282 = &g_1283; + int **l_1284 = (void*)0; + int **l_1285 = &l_1282; + int i; + for (i = 0; i < 2; i++) + l_45[i] = 1UL; + step_hash(739); + (*l_1282) ^= func_31(((0xA34071E9L <= 0UL) <= ((int)((unsigned char)p_25 >> (unsigned char)(((unsigned)((((((short)((unsigned)(((short)func_5(g_4, g_4) * (short)func_5(l_45[0], p_25)) == l_46) - (unsigned)l_45[1]) >> (short)13) || p_25) != g_4) > l_47) != p_25) + (unsigned)p_25) != p_25)) + (int)0x26B4FF51L))); + step_hash(740); + (*l_1282) = (-3L); + step_hash(741); + (*l_1285) = &l_46; + step_hash(742); + return p_25; +} + + + + + + + +static int func_31(short p_32) +{ + unsigned short l_953 = 65530UL; + int l_977 = (-1L); + unsigned l_978 = 0xE45E55B5L; + int l_981 = 2L; + int l_983 = 0x8AD69D4DL; + int l_985 = 0xE3F3B9A0L; + int l_986[9][6] = {{0xBB960DA5L, 0L, 0xE0C51D04L, (-5L), (-5L), 0xE0C51D04L}, {0xBB960DA5L, 0L, 0xE0C51D04L, (-5L), (-5L), 0xE0C51D04L}, {0xBB960DA5L, 0L, 0xE0C51D04L, (-5L), (-5L), 0xE0C51D04L}, {0xBB960DA5L, 0L, 0xE0C51D04L, (-5L), (-5L), 0xE0C51D04L}, {0xBB960DA5L, 0L, 0xE0C51D04L, (-5L), (-5L), 0xE0C51D04L}, {0xBB960DA5L, 0L, 0xE0C51D04L, (-5L), (-5L), 0xE0C51D04L}, {0xBB960DA5L, 0L, 0xE0C51D04L, (-5L), (-5L), 0xE0C51D04L}, {0xBB960DA5L, 0L, 0xE0C51D04L, (-5L), (-5L), 0xE0C51D04L}, {0xBB960DA5L, 0L, 0xE0C51D04L, (-5L), (-5L), 0xE0C51D04L}}; + unsigned short l_990 = 0xA4AFL; + unsigned short l_1010 = 0xB3CEL; + signed char l_1036 = 0xE3L; + int l_1049[3]; + short l_1132 = 0xB773L; + int ***l_1169 = &g_204; + unsigned l_1176 = 0UL; + unsigned short l_1205 = 9UL; + int l_1249 = (-7L); + unsigned l_1261 = 0UL; + int *l_1281 = &g_175[6]; + int i, j; + for (i = 0; i < 3; i++) + l_1049[i] = 0x1D3028DEL; + step_hash(737); + if ((p_32 & (p_32 && g_4))) + { + int *l_48 = &g_49[0][8]; + step_hash(7); + (*l_48) ^= 0x93C34F97L; + step_hash(554); + for (p_32 = 0; (p_32 == 17); p_32 += 1) + { + signed char l_55 = 0L; + step_hash(552); + (*g_204) = func_52(p_32, l_55); + step_hash(553); + l_953++; + } + } + else + { + int l_958 = (-1L); + int l_964 = (-1L); + int l_975 = 0L; + int l_976 = (-10L); + short l_982 = (-1L); + int l_984 = 0x2E36DFE0L; + int l_987 = 0x4F0DEC1BL; + int l_988 = 0x00CE6BF4L; + int l_989[3][2] = {{(-10L), 7L}, {(-10L), 7L}, {(-10L), 7L}}; + int *l_999 = (void*)0; + int l_1006 = 0xF4318063L; + int **l_1055 = &g_205[5]; + short l_1060[6][6] = {{0x86D8L, 0x477AL, 0x86D8L, 0x477AL, 0x86D8L, 0x477AL}, {0x86D8L, 0x477AL, 0x86D8L, 0x477AL, 0x86D8L, 0x477AL}, {0x86D8L, 0x477AL, 0x86D8L, 0x477AL, 0x86D8L, 0x477AL}, {0x86D8L, 0x477AL, 0x86D8L, 0x477AL, 0x86D8L, 0x477AL}, {0x86D8L, 0x477AL, 0x86D8L, 0x477AL, 0x86D8L, 0x477AL}, {0x86D8L, 0x477AL, 0x86D8L, 0x477AL, 0x86D8L, 0x477AL}}; + int *l_1064[8]; + short l_1080 = 0x0AB7L; + unsigned short l_1104 = 65535UL; + int l_1122 = (-1L); + unsigned l_1194[7] = {0UL, 4294967290UL, 0UL, 4294967290UL, 0UL, 4294967290UL, 0UL}; + int l_1234 = 0x35CF6B0FL; + short l_1268 = (-1L); + int i, j; + for (i = 0; i < 8; i++) + l_1064[i] = (void*)0; + step_hash(586); + for (g_371 = 0; (g_371 != (-17)); g_371--) + { + int *l_959 = &g_102; + int *l_960 = &g_74; + int *l_961 = &g_102; + int *l_962 = &g_175[0]; + int *l_963 = &g_74; + int *l_965 = (void*)0; + int l_966 = 0x19642840L; + int *l_967 = &g_102; + int *l_968 = (void*)0; + int *l_969 = &g_175[8]; + int *l_970 = &g_175[7]; + int *l_971 = &g_49[0][8]; + int *l_972 = &g_49[0][8]; + int *l_973 = (void*)0; + int *l_974[2][7]; + int i, j; + for (i = 0; i < 2; i++) + { + for (j = 0; j < 7; j++) + l_974[i][j] = &l_964; + } + step_hash(559); + l_978--; + step_hash(560); + ++l_990; + step_hash(585); + for (l_988 = 5; (l_988 >= 0); l_988 -= 1) + { + unsigned char l_1007 = 246UL; + int *l_1013 = &l_981; + unsigned l_1018 = 0x154304B4L; + unsigned l_1023 = 0x3D2A7710L; + int i, j; + step_hash(583); + if ((((int)((unsigned)((((unsigned short)65535UL - (unsigned short)l_986[(l_988 + 1)][l_988]) ^ (p_32 ^ 0xDE89B7DFL)) > 0xA1L) - (unsigned)l_1007) % (int)l_986[(l_988 + 1)][l_988]) & g_276)) + { + unsigned l_1008 = 4294967295UL; + int l_1009 = 0x6724A2A5L; + step_hash(565); + for (l_1007 = 0; l_1007 < 2; l_1007 += 1) + { + for (g_137 = 0; g_137 < 7; g_137 += 1) + { + l_974[l_1007][g_137] = (void*)0; + } + } + step_hash(572); + if ((p_32 != (((&l_964 != (void*)0) > l_1008) == (*l_961)))) + { + step_hash(567); + return (*l_969); + } + else + { + int i, j; + step_hash(569); + if (p_32) + break; + step_hash(570); + if (p_32) + break; + step_hash(571); + --l_1010; + } + step_hash(573); + l_1013 = (*g_204); + } + else + { + int l_1022 = 0xB13A2D03L; + int **l_1034 = &l_972; + step_hash(575); + (*l_959) = ((unsigned char)func_5(func_5(((void*)0 != &l_986[8][3]), (((unsigned char)l_1018 * (unsigned char)0xEFL) & (*l_1013))), g_768) >> (unsigned char)2); + step_hash(581); + for (l_985 = 0; (l_985 > 11); l_985 += 9) + { + signed char l_1021 = 0x35L; + step_hash(579); + l_1023--; + step_hash(580); + g_1037 |= ((unsigned short)l_1022 + (unsigned short)func_65((((p_32 == (((((short)((signed char)1L + (signed char)(func_5((p_32 == (*l_1013)), ((unsigned short)(g_722 == (l_1034 != &l_999)) / (unsigned short)0xACC7L)) | l_986[0][3])) << (short)g_1035) >= g_175[7]) | 247UL) | 1UL)) >= g_137) != p_32), p_32, &l_976, l_1036)); + } + step_hash(582); + (*l_967) = (g_371 == 0xB9L); + } + step_hash(584); + return p_32; + } + } + step_hash(736); + if (p_32) + { + signed char l_1046 = 0x01L; + int l_1047 = (-1L); + int l_1048[4][7] = {{0x418AD974L, 4L, 0x8C773E95L, 7L, 7L, 0x8C773E95L, 4L}, {0x418AD974L, 4L, 0x8C773E95L, 7L, 7L, 0x8C773E95L, 4L}, {0x418AD974L, 4L, 0x8C773E95L, 7L, 7L, 0x8C773E95L, 4L}, {0x418AD974L, 4L, 0x8C773E95L, 7L, 7L, 0x8C773E95L, 4L}}; + unsigned char l_1050[9] = {0x0DL, 6UL, 0x0DL, 6UL, 0x0DL, 6UL, 0x0DL, 6UL, 0x0DL}; + int **l_1065[6][8] = {{&l_999, &l_999, (void*)0, &l_999, &l_999, (void*)0, &l_999, &l_999}, {&l_999, &l_999, (void*)0, &l_999, &l_999, (void*)0, &l_999, &l_999}, {&l_999, &l_999, (void*)0, &l_999, &l_999, (void*)0, &l_999, &l_999}, {&l_999, &l_999, (void*)0, &l_999, &l_999, (void*)0, &l_999, &l_999}, {&l_999, &l_999, (void*)0, &l_999, &l_999, (void*)0, &l_999, &l_999}, {&l_999, &l_999, (void*)0, &l_999, &l_999, (void*)0, &l_999, &l_999}}; + unsigned l_1079 = 0x706C4E9DL; + int l_1083 = 0xB8F53A9BL; + int l_1100 = 4L; + int i, j; + step_hash(633); + if (p_32) + { + int l_1038 = (-1L); + int *l_1039 = &g_49[0][8]; + int *l_1040 = &l_986[3][2]; + int *l_1041 = &g_1037; + int *l_1042 = (void*)0; + int *l_1043 = &l_989[1][0]; + int *l_1044 = &g_49[0][3]; + int *l_1045[8]; + int i; + for (i = 0; i < 8; i++) + l_1045[i] = &l_964; + step_hash(589); + l_1050[4]--; + step_hash(590); + (*l_1041) = ((unsigned char)253UL * (unsigned char)(((l_1045[5] == (void*)0) <= g_49[0][8]) >= ((l_1055 == &l_999) > l_953))); + step_hash(597); + for (l_1038 = 0; (l_1038 <= (-22)); l_1038--) + { + int l_1058[3]; + int l_1059[7] = {0x5860123AL, 0x5860123AL, 0x122B95B8L, 0x5860123AL, 0x5860123AL, 0x122B95B8L, 0x5860123AL}; + int i; + for (i = 0; i < 3; i++) + l_1058[i] = 0x733EA963L; + step_hash(594); + --g_1061; + step_hash(595); + (*l_1044) = func_65((*l_1041), l_1050[4], func_70(l_1064[0]), (func_5(g_49[0][8], (l_1065[0][6] == &l_1039)) || (0x8D2CL == 65535UL))); + step_hash(596); + return p_32; + } + } + else + { + int *l_1072 = &g_49[0][5]; + int ***l_1086 = (void*)0; + unsigned l_1097 = 0UL; + step_hash(599); + l_1049[0] &= p_32; + step_hash(600); + g_1037 ^= (((int)((signed char)((unsigned)(func_59(l_1072, (&l_1064[6] == &l_1072), ((int)p_32 / (int)(-6L)), g_881, &l_1049[0]) && p_32) - (unsigned)p_32) * (signed char)g_175[5]) - (int)2L) == p_32); + step_hash(616); + if (((+((signed char)((((unsigned char)(l_1079 <= (func_5(g_152, p_32) == l_1080)) - (unsigned char)((((g_426 | ((short)0x4105L / (short)(g_1035 | (p_32 || p_32)))) >= l_1083) ^ p_32) != 0x3949326CL)) <= p_32) <= 0x6D60L) >> (signed char)p_32)) ^ 4L)) + { + step_hash(606); + for (l_1083 = 19; (l_1083 == 4); --l_1083) + { + step_hash(605); + return p_32; + } + } + else + { + int *l_1096 = &l_1047; + step_hash(613); + if ((&l_1055 == l_1086)) + { + step_hash(609); + return p_32; + } + else + { + int ***l_1091[7] = {&l_1065[0][6], &l_1065[0][6], &l_1065[0][6], &l_1065[0][6], &l_1065[0][6], &l_1065[0][6], &l_1065[0][6]}; + int i; + step_hash(611); + l_986[0][1] &= p_32; + step_hash(612); + (*l_1096) ^= ((unsigned char)p_32 - (unsigned char)(((signed char)(((&g_204 != l_1091[0]) == ((short)((unsigned)(p_32 || p_32) - (unsigned)p_32) / (short)0x6A35L)) && l_977) / (signed char)p_32) < 6L)); + } + step_hash(614); + ++l_1097; + step_hash(615); + return l_1100; + } + step_hash(632); + for (l_985 = 5; (l_985 >= 0); l_985 -= 1) + { + unsigned l_1103 = 0x6014BD46L; + step_hash(624); + for (l_988 = 0; (l_988 >= 0); l_988 -= 1) + { + int i, j; + step_hash(623); + g_49[l_988][(l_988 + 6)] &= p_32; + } + step_hash(631); + if (((unsigned)((*l_1072) > (g_102 < ((void*)0 == &l_999))) % (unsigned)g_768)) + { + step_hash(626); + (*l_1055) = (*l_1055); + step_hash(627); + if (l_953) + break; + step_hash(628); + return p_32; + } + else + { + step_hash(630); + return p_32; + } + } + } + step_hash(634); + (*l_1055) = (*l_1055); + step_hash(635); + l_1049[0] = 0xDF5775CBL; + step_hash(636); + ++l_1104; + } + else + { + unsigned l_1111 = 0x472F4193L; + int *l_1112 = &g_49[0][8]; + int l_1115[1][10] = {{0xC910B2FEL, (-1L), 0xC910B2FEL, (-1L), 0xC910B2FEL, (-1L), 0xC910B2FEL, (-1L), 0xC910B2FEL, (-1L)}}; + int l_1161 = 0x9DDDD402L; + int l_1185 = 0x5375133AL; + int *l_1204 = &l_986[0][1]; + int l_1269[1]; + unsigned short l_1270 = 0x730FL; + int i, j; + for (i = 0; i < 1; i++) + l_1269[i] = 7L; + step_hash(692); + if ((!((unsigned short)((signed char)func_59(l_1112, l_981, (*l_1112), func_5(((g_276 > 0xD954L) || 0x44A40EC2L), l_1049[0]), l_1112) % (signed char)l_985) + (unsigned short)p_32))) + { + int l_1113 = (-8L); + int l_1114 = 1L; + int l_1116 = 0x683C7407L; + int l_1117 = 1L; + int l_1118 = 0xBF4173BDL; + int l_1119 = 0xE817E0B2L; + int l_1120 = 0x11206265L; + int l_1121[6][1] = {{(-10L)}, {(-10L)}, {(-10L)}, {(-10L)}, {(-10L)}, {(-10L)}}; + unsigned l_1123 = 9UL; + unsigned l_1141 = 1UL; + int i, j; + step_hash(639); + --l_1123; + step_hash(645); + for (g_1035 = 0; (g_1035 <= 0); g_1035 += 1) + { + unsigned short l_1135 = 65533UL; + signed char l_1136 = 1L; + int l_1137 = 7L; + step_hash(643); + l_1137 = ((int)0x5A3115DEL - (int)(l_1136 || l_1117)); + step_hash(644); + return p_32; + } + step_hash(651); + for (g_276 = (-5); (g_276 != (-2)); g_276 += 1) + { + int **l_1140[3]; + int i; + for (i = 0; i < 3; i++) + l_1140[i] = &g_205[4]; + step_hash(649); + (*l_1112) &= l_1141; + step_hash(650); + (*l_1112) = ((g_276 == 2UL) && ((*l_1112) && p_32)); + } + step_hash(669); + for (l_977 = 0; (l_977 == (-17)); l_977 -= 5) + { + int l_1148[2]; + int i; + for (i = 0; i < 2; i++) + l_1148[i] = (-1L); + step_hash(661); + for (l_958 = 0; (l_958 <= 2); l_958 += 1) + { + int i; + step_hash(658); + (*l_1112) |= (l_1049[l_958] | g_281); + step_hash(659); + (*l_1112) ^= l_1148[0]; + step_hash(660); + return p_32; + } + step_hash(662); + (*l_1112) = 0xD4A795E8L; + step_hash(668); + for (l_1114 = 0; (l_1114 <= 0); l_1114 += 1) + { + int i, j; + step_hash(666); + g_205[l_1114] = &g_1037; + step_hash(667); + return p_32; + } + } + } + else + { + unsigned char l_1152 = 0x6DL; + int l_1177 = 0x8F290536L; + step_hash(671); + (*l_1112) = 0x1FCF356DL; + step_hash(672); + l_1152--; + step_hash(690); + for (g_722 = 0; (g_722 <= 8); g_722 += 1) + { + int l_1182 = 0x34D1C211L; + int l_1186 = (-1L); + int l_1187 = 0x12F60873L; + unsigned l_1188 = 0UL; + int i; + step_hash(683); + if (((unsigned)((l_1152 == 1UL) == (&g_205[g_722] != &l_1112)) / (unsigned)((signed char)p_32 - (signed char)((unsigned short)g_817 + (unsigned short)0x4A0EL)))) + { + int l_1167 = (-1L); + int l_1168 = 0xE25A87B6L; + int i; + step_hash(677); + (*l_1112) |= p_32; + step_hash(678); + l_1168 ^= ((int)l_1167 / (int)0x7C5E8B64L); + step_hash(679); + (*l_1112) = p_32; + step_hash(680); + g_205[g_722] = (void*)0; + } + else + { + int *l_1180 = (void*)0; + step_hash(682); + (*l_1112) = ((l_1169 != (void*)0) <= p_32); + } + step_hash(688); + for (g_74 = 5; (g_74 >= 0); g_74 -= 1) + { + int l_1181 = 7L; + int l_1183 = 0xCF08F72FL; + int l_1184[8]; + int i, j; + for (i = 0; i < 8; i++) + l_1184[i] = 0x00E060AEL; + step_hash(687); + ++l_1188; + } + step_hash(689); + return (*l_1112); + } + step_hash(691); + (*l_1055) = &g_175[7]; + } + step_hash(734); + for (l_987 = 0; (l_987 == 24); ++l_987) + { + int *l_1193 = (void*)0; + int l_1232 = 0L; + int l_1246 = 1L; + int l_1248[10][5] = {{0x687220D4L, 0x09D6B2C9L, 0x830F1D69L, 0L, (-3L)}, {0x687220D4L, 0x09D6B2C9L, 0x830F1D69L, 0L, (-3L)}, {0x687220D4L, 0x09D6B2C9L, 0x830F1D69L, 0L, (-3L)}, {0x687220D4L, 0x09D6B2C9L, 0x830F1D69L, 0L, (-3L)}, {0x687220D4L, 0x09D6B2C9L, 0x830F1D69L, 0L, (-3L)}, {0x687220D4L, 0x09D6B2C9L, 0x830F1D69L, 0L, (-3L)}, {0x687220D4L, 0x09D6B2C9L, 0x830F1D69L, 0L, (-3L)}, {0x687220D4L, 0x09D6B2C9L, 0x830F1D69L, 0L, (-3L)}, {0x687220D4L, 0x09D6B2C9L, 0x830F1D69L, 0L, (-3L)}, {0x687220D4L, 0x09D6B2C9L, 0x830F1D69L, 0L, (-3L)}}; + int l_1252 = (-4L); + int i, j; + step_hash(696); + (*l_1055) = l_1193; + step_hash(721); + if ((((unsigned char)g_4 + (unsigned char)(p_32 < g_4)) <= ((unsigned char)((void*)0 == &l_1115[0][8]) % (unsigned char)(*l_1112)))) + { + int *l_1203 = &l_1049[0]; + step_hash(698); + (*l_1112) &= p_32; + step_hash(699); + (*l_1204) = 0xB58E3E7CL; + } + else + { + unsigned char l_1233 = 0xC7L; + int **l_1243 = (void*)0; + int l_1244 = 0x6D70BEB8L; + int l_1245 = 0x2D6F53B6L; + int l_1247 = 7L; + int l_1250 = 0x670A8041L; + int l_1251 = 0x52B4076AL; + int l_1253 = 0x87772AB4L; + int l_1254 = 0x41990D11L; + int l_1255 = 1L; + int l_1256 = 0xB15ECCAEL; + int l_1257 = 8L; + int l_1258[7][4] = {{5L, 5L, 0x5846B21DL, 0xA9F86872L}, {5L, 5L, 0x5846B21DL, 0xA9F86872L}, {5L, 5L, 0x5846B21DL, 0xA9F86872L}, {5L, 5L, 0x5846B21DL, 0xA9F86872L}, {5L, 5L, 0x5846B21DL, 0xA9F86872L}, {5L, 5L, 0x5846B21DL, 0xA9F86872L}, {5L, 5L, 0x5846B21DL, 0xA9F86872L}}; + short l_1260 = (-9L); + int i, j; + step_hash(707); + for (l_975 = 0; (l_975 < 24); l_975 += 8) + { + int l_1212 = 0L; + step_hash(704); + if (p_32) + break; + step_hash(705); + (*l_1112) = (((unsigned char)(((short)l_1212 >> (short)14) != ((unsigned char)(0x931590E5L && (-(int)((int)(-3L) / (int)((unsigned short)((int)(((((short)(p_32 >= ((((((short)p_32 >> (short)8) < ((unsigned char)0xF0L - (unsigned char)((unsigned char)((l_1212 && (!(((int)(*l_1204) + (int)l_1212) && p_32))) >= p_32) >> (unsigned char)4))) ^ (-1L)) == l_1232) ^ p_32)) - (short)g_817) || p_32) < p_32) | g_476) % (int)l_1233) * (unsigned short)0x621AL)))) - (unsigned char)0L)) << (unsigned char)l_1234) > 1UL); + step_hash(706); + (*l_1055) = &l_1161; + } + step_hash(708); + l_1261--; + step_hash(714); + for (l_1250 = 4; (l_1250 > 28); ++l_1250) + { + signed char l_1266[9][3] = {{5L, 0x71L, (-1L)}, {5L, 0x71L, (-1L)}, {5L, 0x71L, (-1L)}, {5L, 0x71L, (-1L)}, {5L, 0x71L, (-1L)}, {5L, 0x71L, (-1L)}, {5L, 0x71L, (-1L)}, {5L, 0x71L, (-1L)}, {5L, 0x71L, (-1L)}}; + int l_1267[6][3] = {{0L, 0x637279BAL, 0L}, {0L, 0x637279BAL, 0L}, {0L, 0x637279BAL, 0L}, {0L, 0x637279BAL, 0L}, {0L, 0x637279BAL, 0L}, {0L, 0x637279BAL, 0L}}; + int i, j; + step_hash(712); + (*l_1204) |= p_32; + step_hash(713); + l_1270--; + } + step_hash(720); + for (l_978 = 6; (l_978 == 15); ++l_978) + { + step_hash(718); + if (p_32) + break; + step_hash(719); + g_205[8] = &g_49[0][6]; + } + } + step_hash(722); + if (l_990) + continue; + step_hash(733); + if (((int)((((unsigned char)((*l_1204) < p_32) / (unsigned char)g_1037) == p_32) && p_32) + (int)p_32)) + { + step_hash(724); + (*l_1055) = (*l_1055); + } + else + { + step_hash(732); + for (l_1232 = 0; (l_1232 <= 0); l_1232 += 1) + { + int i, j; + step_hash(729); + g_49[l_1232][(l_1232 + 5)] = ((unsigned char)0x41L << (unsigned char)g_49[l_1232][(l_1232 + 2)]); + step_hash(730); + if (g_175[(l_1232 + 4)]) + continue; + step_hash(731); + l_1281 = &g_175[(l_1232 + 7)]; + } + } + } + step_hash(735); + return (*l_1281); + } + } + step_hash(738); + return p_32; +} + + + + + + + +static int * func_52(unsigned p_53, unsigned char p_54) +{ + int *l_58 = &g_49[0][6]; + int *l_929 = &g_49[0][8]; + int *l_930 = (void*)0; + int *l_931 = &g_175[7]; + int *l_932 = (void*)0; + int *l_933[10][8] = {{&g_175[5], &g_49[0][8], &g_49[0][8], &g_49[0][8], &g_49[0][5], (void*)0, &g_102, &g_102}, {&g_175[5], &g_49[0][8], &g_49[0][8], &g_49[0][8], &g_49[0][5], (void*)0, &g_102, &g_102}, {&g_175[5], &g_49[0][8], &g_49[0][8], &g_49[0][8], &g_49[0][5], (void*)0, &g_102, &g_102}, {&g_175[5], &g_49[0][8], &g_49[0][8], &g_49[0][8], &g_49[0][5], (void*)0, &g_102, &g_102}, {&g_175[5], &g_49[0][8], &g_49[0][8], &g_49[0][8], &g_49[0][5], (void*)0, &g_102, &g_102}, {&g_175[5], &g_49[0][8], &g_49[0][8], &g_49[0][8], &g_49[0][5], (void*)0, &g_102, &g_102}, {&g_175[5], &g_49[0][8], &g_49[0][8], &g_49[0][8], &g_49[0][5], (void*)0, &g_102, &g_102}, {&g_175[5], &g_49[0][8], &g_49[0][8], &g_49[0][8], &g_49[0][5], (void*)0, &g_102, &g_102}, {&g_175[5], &g_49[0][8], &g_49[0][8], &g_49[0][8], &g_49[0][5], (void*)0, &g_102, &g_102}, {&g_175[5], &g_49[0][8], &g_49[0][8], &g_49[0][8], &g_49[0][5], (void*)0, &g_102, &g_102}}; + unsigned char l_934 = 0UL; + unsigned l_952[2][3]; + int i, j; + for (i = 0; i < 2; i++) + { + for (j = 0; j < 3; j++) + l_952[i][j] = 0x159386EFL; + } + step_hash(16); + for (p_53 = 0; (p_53 <= 2); p_53 += 5) + { + step_hash(15); + return l_58; + } + step_hash(548); + for (p_53 = 0; (p_53 <= 0); p_53 += 1) + { + int *l_72 = (void*)0; + short l_926 = (-4L); + int l_928 = 0x22A56471L; + } + step_hash(549); + ++l_934; + step_hash(550); + (*l_58) = (-(int)(((unsigned short)((unsigned)g_276 / (unsigned)(*l_931)) * (unsigned short)(*l_929)) && ((unsigned char)(((signed char)(((int)p_53 - (int)(g_137 > p_53)) | (((short)(p_53 | p_54) * (short)(((unsigned char)func_65((l_932 == (*g_204)), l_952[0][0], (*g_204), p_54) >> (unsigned char)2) | g_152)) && (*l_931))) * (signed char)(-1L)) && (*l_929)) / (unsigned char)(*l_931)))); + step_hash(551); + return (*g_204); +} + + + + + + + +static int func_59(int * p_60, signed char p_61, unsigned short p_62, short p_63, int * p_64) +{ + int *l_843[4][7] = {{(void*)0, &g_476, (void*)0, &g_476, (void*)0, &g_476, (void*)0}, {(void*)0, &g_476, (void*)0, &g_476, (void*)0, &g_476, (void*)0}, {(void*)0, &g_476, (void*)0, &g_476, (void*)0, &g_476, (void*)0}, {(void*)0, &g_476, (void*)0, &g_476, (void*)0, &g_476, (void*)0}}; + int ***l_850 = (void*)0; + int i, j; + step_hash(463); + (*g_204) = l_843[0][4]; + step_hash(525); + for (g_102 = 0; (g_102 > (-3)); g_102 -= 3) + { + int ***l_846[7] = {&g_204, &g_204, &g_204, &g_204, &g_204, &g_204, &g_204}; + unsigned l_862[10] = {0xA2DA5F1EL, 4294967288UL, 4294967295UL, 4294967295UL, 4294967288UL, 0xA2DA5F1EL, 4294967288UL, 4294967295UL, 4294967295UL, 4294967288UL}; + unsigned short l_868[10][6] = {{65527UL, 0x2E06L, 0x229DL, 0x88D9L, 0x64A0L, 0xD69AL}, {65527UL, 0x2E06L, 0x229DL, 0x88D9L, 0x64A0L, 0xD69AL}, {65527UL, 0x2E06L, 0x229DL, 0x88D9L, 0x64A0L, 0xD69AL}, {65527UL, 0x2E06L, 0x229DL, 0x88D9L, 0x64A0L, 0xD69AL}, {65527UL, 0x2E06L, 0x229DL, 0x88D9L, 0x64A0L, 0xD69AL}, {65527UL, 0x2E06L, 0x229DL, 0x88D9L, 0x64A0L, 0xD69AL}, {65527UL, 0x2E06L, 0x229DL, 0x88D9L, 0x64A0L, 0xD69AL}, {65527UL, 0x2E06L, 0x229DL, 0x88D9L, 0x64A0L, 0xD69AL}, {65527UL, 0x2E06L, 0x229DL, 0x88D9L, 0x64A0L, 0xD69AL}, {65527UL, 0x2E06L, 0x229DL, 0x88D9L, 0x64A0L, 0xD69AL}}; + int l_880 = 0x0E15C5B8L; + unsigned l_922 = 8UL; + unsigned l_923 = 1UL; + int i, j; + step_hash(467); + g_204 = &p_60; + step_hash(523); + for (p_62 = 0; (p_62 > 49); p_62 += 2) + { + int ***l_849 = &g_204; + int l_853[7][10] = {{0x4A04B825L, 4L, 0x7FAE4EFDL, (-1L), 0x732BF405L, 1L, 1L, 0x732BF405L, (-1L), 0x7FAE4EFDL}, {0x4A04B825L, 4L, 0x7FAE4EFDL, (-1L), 0x732BF405L, 1L, 1L, 0x732BF405L, (-1L), 0x7FAE4EFDL}, {0x4A04B825L, 4L, 0x7FAE4EFDL, (-1L), 0x732BF405L, 1L, 1L, 0x732BF405L, (-1L), 0x7FAE4EFDL}, {0x4A04B825L, 4L, 0x7FAE4EFDL, (-1L), 0x732BF405L, 1L, 1L, 0x732BF405L, (-1L), 0x7FAE4EFDL}, {0x4A04B825L, 4L, 0x7FAE4EFDL, (-1L), 0x732BF405L, 1L, 1L, 0x732BF405L, (-1L), 0x7FAE4EFDL}, {0x4A04B825L, 4L, 0x7FAE4EFDL, (-1L), 0x732BF405L, 1L, 1L, 0x732BF405L, (-1L), 0x7FAE4EFDL}, {0x4A04B825L, 4L, 0x7FAE4EFDL, (-1L), 0x732BF405L, 1L, 1L, 0x732BF405L, (-1L), 0x7FAE4EFDL}}; + unsigned char l_865[5] = {255UL, 0x2AL, 255UL, 0x2AL, 255UL}; + unsigned l_899 = 4294967295UL; + int i, j; + step_hash(482); + for (g_525 = 0; (g_525 <= 0); g_525 += 1) + { + int i, j; + step_hash(478); + for (p_63 = 0; (p_63 <= 6); p_63 += 1) + { + int i, j; + step_hash(477); + g_49[g_525][(p_63 + 2)] = (((void*)0 == l_846[(g_525 + 2)]) & 0L); + } + step_hash(479); + (**g_204) = func_5((l_849 == l_850), (func_5(g_49[g_525][(g_525 + 3)], p_61) != ((int)l_853[5][8] - (int)g_49[g_525][(g_525 + 3)]))); + step_hash(480); + if ((*p_60)) + break; + step_hash(481); + if ((**g_204)) + break; + } + step_hash(520); + for (g_476 = 8; (g_476 >= 0); g_476 -= 1) + { + int l_901 = (-1L); + int i; + } + step_hash(521); + (***l_849) = ((signed char)((unsigned char)p_63 * (unsigned char)((short)((unsigned short)((unsigned)((((signed char)func_5(p_62, g_881) * (signed char)246UL) == (g_768 || (((unsigned char)0x7DL >> (unsigned char)2) < ((short)(g_722 && ((unsigned short)p_63 << (unsigned short)l_922)) * (short)p_63)))) >= (-9L)) / (unsigned)(*p_60)) * (unsigned short)p_61) + (short)g_371)) << (signed char)7); + step_hash(522); + if ((***l_849)) + continue; + } + step_hash(524); + return l_923; + } + step_hash(530); + for (g_152 = 14; (g_152 > 17); g_152++) + { + step_hash(529); + (*g_204) = &g_102; + } + step_hash(531); + return (*p_60); +} + + + + + + + +static short func_65(unsigned short p_66, short p_67, int * p_68, int p_69) +{ + unsigned short l_785 = 0xC1E0L; + int l_795 = 0x9F0E0620L; + int l_798 = 0x3BFEF334L; + int l_799 = (-9L); + int l_800 = 0x7DF590FBL; + int l_801 = (-5L); + int l_802 = (-1L); + signed char l_803[9] = {(-1L), (-1L), 4L, (-1L), (-1L), 4L, (-1L), (-1L), 4L}; + int l_804 = (-6L); + int l_805 = 4L; + int l_806 = 4L; + int l_807 = 0x051FD8FEL; + unsigned l_808 = 0x30C24094L; + short l_828 = 0L; + int i; + step_hash(460); + for (p_66 = 0; (p_66 == 16); p_66 += 1) + { + unsigned char l_784 = 0xBEL; + int l_796 = 0xF0D3C596L; + int l_797[9] = {(-1L), (-1L), 3L, (-1L), (-1L), 3L, (-1L), (-1L), 3L}; + int i; + step_hash(459); + if (((signed char)(func_5(((p_66 == ((short)(((short)((int)((unsigned char)((unsigned char)func_5(g_102, p_66) + (unsigned char)g_276) - (unsigned char)p_66) / (int)l_784) << (short)13) >= func_5((g_49[0][1] >= g_102), l_785)) * (short)g_476)) >= g_49[0][8]), l_785) || 0x1DD158B9L) + (signed char)l_784)) + { + int *l_788 = &g_102; + int *l_789 = &g_175[3]; + int *l_790 = &g_49[0][8]; + int *l_791 = &g_175[7]; + int *l_792 = &g_49[0][8]; + int *l_793 = &g_74; + int *l_794[2]; + int i; + for (i = 0; i < 2; i++) + l_794[i] = (void*)0; + step_hash(429); + (*l_788) = ((unsigned)l_785 / (unsigned)(-6L)); + step_hash(430); + l_808++; + } + else + { + unsigned l_815 = 0x81B8F4E4L; + unsigned l_816[2]; + int l_842 = 1L; + int i; + for (i = 0; i < 2; i++) + l_816[i] = 0x5901B339L; + step_hash(450); + if ((func_5(l_796, ((l_799 ^ ((&p_68 != &g_205[7]) <= func_5(func_5(((((unsigned short)p_69 >> (unsigned short)((short)g_525 << (short)9)) | l_815) == l_816[1]), g_102), g_426))) == 0UL)) > g_476)) + { + step_hash(433); + if (p_69) + break; + step_hash(445); + if ((g_817 & (p_67 < ((int)((signed char)((signed char)((&p_68 == (void*)0) > ((signed char)(0UL >= p_66) - (signed char)0x40L)) >> (signed char)(((unsigned char)0x9FL / (unsigned char)g_274) || l_816[1])) * (signed char)l_815) % (int)l_828)))) + { + step_hash(435); + (*g_204) = &g_49[0][8]; + } + else + { + step_hash(444); + for (l_804 = 0; (l_804 <= (-4)); l_804--) + { + int *l_831 = &l_797[2]; + step_hash(440); + (*l_831) = l_796; + step_hash(441); + l_798 ^= (((void*)0 != &p_68) >= (((unsigned char)p_67 >> (unsigned char)2) < ((unsigned short)((unsigned)g_74 + (unsigned)(g_817 != l_815)) * (unsigned short)g_49[0][8]))); + step_hash(442); + if (l_816[0]) + continue; + step_hash(443); + (*l_831) ^= 0L; + } + } + } + else + { + int *l_838 = &g_49[0][0]; + step_hash(447); + (*g_204) = p_68; + step_hash(448); + (*l_838) = ((g_152 | (func_5(g_476, p_67) || p_66)) != (p_67 >= 1L)); + step_hash(449); + (*l_838) |= (-3L); + } + step_hash(456); + for (p_69 = 0; (p_69 > 12); p_69 += 5) + { + int *l_841 = (void*)0; + step_hash(454); + l_842 &= (g_525 == p_69); + step_hash(455); + (*g_204) = p_68; + } + step_hash(457); + (*g_204) = p_68; + step_hash(458); + if (l_805) + break; + } + } + step_hash(461); + return p_69; +} + + + + + + + +static int * func_70(int * p_71) +{ + unsigned char l_73[8] = {0x5FL, 0x5FL, 0xCCL, 0x5FL, 0x5FL, 0xCCL, 0x5FL, 0x5FL}; + int l_552[1]; + unsigned char l_633 = 0UL; + int **l_647[10] = {&g_205[7], &g_205[7], &g_205[7], &g_205[7], &g_205[7], &g_205[7], &g_205[7], &g_205[7], &g_205[7], &g_205[7]}; + int ***l_655 = (void*)0; + short l_660 = 0xEDF0L; + short l_664 = (-1L); + unsigned short l_701 = 0xA532L; + unsigned l_706 = 0UL; + int i; + for (i = 0; i < 1; i++) + l_552[i] = 0xF814E8C0L; + step_hash(421); + for (g_74 = 7; (g_74 >= 0); g_74 -= 1) + { + unsigned l_464 = 0x1A8B8813L; + unsigned l_467[2][6] = {{4294967295UL, 2UL, 4294967295UL, 2UL, 4294967295UL, 2UL}, {4294967295UL, 2UL, 4294967295UL, 2UL, 4294967295UL, 2UL}}; + int *l_549[6]; + unsigned l_555 = 0xB77D671DL; + unsigned short l_646 = 1UL; + int ***l_704 = &l_647[6]; + unsigned l_749 = 0x7BF2DA4FL; + int i, j; + for (i = 0; i < 6; i++) + l_549[i] = &g_175[8]; + step_hash(268); + if (((signed char)l_73[2] - (signed char)((void*)0 != p_71))) + { + unsigned short l_82 = 0x2859L; + int *l_83 = &g_49[0][2]; + int *l_477 = &g_175[6]; + step_hash(263); + (*g_204) = func_77(l_82, l_83, ((void*)0 != &g_49[0][2]), l_73[4]); + step_hash(264); + (*l_477) = func_5(((unsigned short)((signed char)(l_464 | (&g_205[7] != (void*)0)) << (signed char)(!(0x9952L | (func_5(l_467[1][2], l_73[3]) >= (func_5((+(((unsigned short)((unsigned short)l_464 >> (unsigned short)(((((unsigned short)((short)((&p_71 == &p_71) & 0x04L) - (short)l_464) >> (unsigned short)8) != 0xC100CEB9L) > 1UL) && (*l_83))) << (unsigned short)l_73[7]) > l_464)), (*l_83)) ^ l_467[0][3]))))) << (unsigned short)(*l_83)), g_476); + step_hash(265); + return l_83; + } + else + { + int l_478 = (-1L); + step_hash(267); + l_478 = l_478; + } + step_hash(420); + if (l_467[1][4]) + { + int l_482 = (-4L); + int l_489 = 4L; + int l_498 = 6L; + unsigned l_542 = 4294967286UL; + int l_587[4][1] = {{1L}, {1L}, {1L}, {1L}}; + int **l_628 = (void*)0; + int i, j; + step_hash(284); + for (g_476 = 7; (g_476 >= 2); g_476 -= 1) + { + short l_485 = (-7L); + step_hash(283); + if (((l_464 | ((unsigned char)l_73[5] * (unsigned char)0x36L)) <= l_73[4])) + { + int *l_481 = &g_102; + step_hash(274); + return l_481; + } + else + { + step_hash(281); + for (g_274 = 7; (g_274 >= 0); g_274 -= 1) + { + unsigned l_488 = 1UL; + step_hash(279); + (*g_204) = (*g_204); + step_hash(280); + l_489 = (l_482 > (0x70A5548BL && ((int)(g_102 || func_5(l_485, ((void*)0 != (*g_204)))) / (int)((unsigned char)l_488 * (unsigned char)(l_485 != 0L))))); + } + step_hash(282); + return (*g_204); + } + } + step_hash(318); + for (g_426 = 2; (g_426 <= 8); g_426 += 1) + { + unsigned l_507 = 0x6838FC12L; + int l_551[7] = {0x2C148369L, 0x988396F2L, 0x2C148369L, 0x988396F2L, 0x2C148369L, 0x988396F2L, 0x2C148369L}; + int i; + step_hash(305); + for (g_152 = 1; (g_152 >= 0); g_152 -= 1) + { + int l_492 = 0L; + int l_553 = 0xCB230E7AL; + int l_554 = 0xF0FC990BL; + int i, j; + step_hash(298); + for (g_276 = 0; (g_276 <= 8); g_276 += 1) + { + int *l_490 = &l_489; + int *l_491 = &l_489; + int *l_493 = &g_476; + int *l_494 = &l_489; + int *l_495 = &l_489; + int *l_496 = &g_175[g_276]; + int *l_497 = &g_175[g_276]; + int *l_499 = &l_489; + int *l_500 = &l_489; + int *l_501 = &g_175[7]; + int *l_502 = (void*)0; + int *l_503 = &g_175[g_276]; + int *l_504 = &g_175[g_276]; + int *l_505 = &g_175[0]; + int *l_506 = (void*)0; + int i, j; + step_hash(294); + --l_507; + step_hash(295); + (*l_497) = (l_467[g_152][g_152] > (((unsigned char)g_175[(g_152 + 6)] - (unsigned char)g_175[g_426]) <= ((unsigned short)((unsigned char)g_175[(g_152 + 1)] + (unsigned char)((unsigned short)g_175[g_276] >> (unsigned short)(!((signed char)((signed char)(*l_501) * (signed char)(-(signed char)(l_507 == ((unsigned char)l_492 / (unsigned char)func_5(g_4, l_492))))) << (signed char)g_152)))) / (unsigned short)l_489))); + step_hash(296); + (*l_491) = (g_525 ^ func_5(l_73[5], l_492)); + step_hash(297); + (*l_497) = ((!((((short)0x4E43L - (short)l_467[1][2]) & g_49[0][8]) <= ((unsigned short)((signed char)((*g_204) != (void*)0) % (signed char)l_73[0]) << (unsigned short)2))) <= ((signed char)g_4 << (signed char)6)); + } + step_hash(304); + if (((g_205[g_74] != &l_498) ^ ((1UL > (((((short)func_5(((short)0xF9B0L * (short)l_467[g_152][g_152]), ((func_5(l_467[1][2], (((unsigned char)((short)((&p_71 != (void*)0) ^ (-1L)) / (short)l_464) * (unsigned char)(-2L)) ^ l_507)) != g_137) >= l_498)) >> (short)9) < l_467[1][2]) && 0L) ^ l_467[1][1])) ^ l_542))) + { + int l_547 = (-1L); + int l_548 = 0xC0A71CE0L; + step_hash(300); + l_548 &= (func_5(l_467[1][2], l_467[1][2]) != func_5(g_274, ((signed char)(((unsigned short)(l_73[5] ^ 0x6BA9E9AEL) % (unsigned short)g_102) | ((((l_507 == l_73[1]) >= l_547) ^ g_276) > 0x1E08L)) * (signed char)l_547))); + step_hash(301); + return l_549[4]; + } + else + { + int l_550[1]; + int i; + for (i = 0; i < 1; i++) + l_550[i] = 0xE1015C25L; + step_hash(303); + --l_555; + } + } + step_hash(317); + for (l_542 = 0; (l_542 <= 8); l_542 += 1) + { + int l_570 = (-10L); + int i; + step_hash(309); + l_570 &= ((unsigned short)4UL << (unsigned short)(((short)0L / (short)((unsigned char)(g_205[l_542] == &g_175[g_426]) * (unsigned char)g_175[g_426])) & (g_175[g_426] != ((short)l_507 * (short)(l_498 <= (((unsigned char)func_5(func_5(((unsigned char)g_476 + (unsigned char)l_73[3]), l_552[0]), g_49[0][8]) * (unsigned char)l_552[0]) != 0x9AL)))))); + step_hash(310); + l_498 |= (((unsigned char)((signed char)((short)((unsigned short)((signed char)((signed char)g_152 + (signed char)(((signed char)func_5(g_102, (((unsigned short)((func_5(l_551[3], g_152) | ((void*)0 == (*g_204))) | l_551[1]) << (unsigned short)10) == (g_4 < l_482))) / (signed char)l_552[0]) <= 253UL)) - (signed char)0L) % (unsigned short)0x801CL) / (short)l_552[0]) >> (signed char)l_587[2][0]) >> (unsigned char)4) <= g_102); + step_hash(311); + l_551[3] = 0x50DD6A42L; + step_hash(316); + for (g_274 = 7; (g_274 >= 0); g_274 -= 1) + { + int l_613 = (-10L); + step_hash(315); + l_551[4] &= ((-(signed char)((short)((unsigned short)((short)(((unsigned short)0xE91DL << (unsigned short)9) == 0x31EBL) / (short)(~((signed char)((signed char)(0x0A21L <= (g_49[0][8] >= ((signed char)((unsigned)((unsigned short)g_281 - (unsigned short)(1L > ((signed char)l_73[5] - (signed char)0x8EL))) - (unsigned)((short)((unsigned short)((g_175[7] ^ 255UL) >= l_613) % (unsigned short)0xA56FL) - (short)0x106BL)) + (signed char)(-6L)))) << (signed char)l_542) + (signed char)(-1L)))) % (unsigned short)l_613) + (short)1UL)) <= (-1L)); + } + } + } + step_hash(353); + for (l_498 = 0; (l_498 <= 7); l_498 += 1) + { + int *l_616 = &g_175[0]; + int l_649 = 0x68A8D662L; + int i; + step_hash(350); + if (((signed char)func_5(l_73[l_498], l_73[0]) + (signed char)0x91L)) + { + int l_623 = 1L; + step_hash(323); + (*g_204) = l_616; + step_hash(330); + if ((((signed char)((short)(func_5(g_137, ((unsigned char)l_623 * (unsigned char)(l_623 ^ ((((((int)l_623 - (int)(-1L)) && (l_628 != &p_71)) ^ (((unsigned short)((unsigned short)l_623 - (unsigned short)(func_5((*l_616), l_623) != g_426)) + (unsigned short)g_4) >= l_623)) && g_476) != g_137)))) & l_633) + (short)l_73[2]) % (signed char)1UL) && l_623)) + { + step_hash(325); + l_552[0] |= 1L; + step_hash(326); + return (*g_204); + } + else + { + int l_640 = (-6L); + step_hash(328); + (*l_616) = ((short)l_552[0] * (short)(((short)0x5B2CL >> (short)7) <= (l_73[5] == (l_640 || g_4)))); + step_hash(329); + (*g_204) = p_71; + } + step_hash(338); + for (g_371 = 7; (g_371 >= 1); g_371 -= 1) + { + short l_641[1][7] = {{0x30DDL, 1L, 0x30DDL, 1L, 0x30DDL, 1L, 0x30DDL}}; + int i, j; + step_hash(334); + (*l_616) = l_552[0]; + step_hash(335); + (*g_204) = l_616; + step_hash(336); + (*l_616) = (p_71 != (*g_204)); + step_hash(337); + (*l_616) = (l_641[0][6] <= ((l_641[0][1] >= func_5(g_4, ((unsigned char)g_74 << (unsigned char)((unsigned char)func_5(((l_623 < (0x5398601FL != l_633)) == (l_73[3] < l_646)), l_641[0][1]) - (unsigned char)g_476)))) > 0xC6C4L)); + } + } + else + { + unsigned char l_650 = 0x31L; + step_hash(349); + if ((&g_205[3] != l_647[6])) + { + int ***l_648 = &l_647[6]; + step_hash(341); + (*l_648) = &g_205[7]; + step_hash(342); + p_71 = (*g_204); + step_hash(343); + l_650++; + } + else + { + short l_661[5] = {0xD094L, 1L, 0xD094L, 1L, 0xD094L}; + int i; + step_hash(345); + l_661[2] |= ((int)(((g_102 | (l_655 == (void*)0)) <= (((unsigned short)(*l_616) * (unsigned short)0xC48EL) <= ((short)g_49[0][8] * (short)l_660))) <= (*l_616)) % (int)func_5((*l_616), g_152)); + step_hash(346); + (*l_616) = (*l_616); + step_hash(347); + (*l_616) = l_661[2]; + step_hash(348); + if ((*l_616)) + continue; + } + } + step_hash(351); + for (l_555 = 0; l_555 < 9; l_555 += 1) + { + g_205[l_555] = &g_175[6]; + } + step_hash(352); + return (*g_204); + } + step_hash(376); + for (g_137 = 0; (g_137 <= 7); g_137 += 1) + { + int l_667 = (-9L); + int **l_674 = &l_549[4]; + step_hash(373); + if (((unsigned char)l_664 >> (unsigned char)1)) + { + int l_665 = 0xCB319FA1L; + step_hash(364); + if (l_665) + { + int l_666 = 8L; + step_hash(359); + (*g_204) = (*g_204); + step_hash(360); + l_665 = l_666; + } + else + { + int l_670 = 0L; + step_hash(362); + l_489 = (l_667 <= (g_281 || (65535UL < l_670))); + step_hash(363); + if (l_498) + continue; + } + step_hash(365); + if (l_665) + break; + } + else + { + short l_679 = 0x07F3L; + short l_709 = 0x03F9L; + step_hash(372); + if ((4294967293UL <= ((unsigned short)(-(unsigned char)(((l_674 != &g_205[0]) != 0UL) >= ((((short)g_274 << (short)g_426) ^ ((unsigned char)(((((**l_674) >= 0x35B07568L) > 4294967292UL) && l_679) & g_49[0][8]) / (unsigned char)0xA0L)) > 1L))) << (unsigned short)0))) + { + signed char l_684[1]; + int i; + for (i = 0; i < 1; i++) + l_684[i] = 1L; + step_hash(368); + (**l_674) = ((unsigned)((signed char)l_684[0] << (signed char)5) + (unsigned)func_5(((((unsigned short)((signed char)g_175[5] / (signed char)((unsigned char)g_137 - (unsigned char)249UL)) >> (unsigned short)((unsigned char)((signed char)((signed char)((unsigned char)g_152 * (unsigned char)((unsigned)(p_71 != (void*)0) - (unsigned)g_274)) * (signed char)func_5((**l_674), l_684[0])) * (signed char)g_426) % (unsigned char)0xDDL)) < g_49[0][6]) > 0x00L), (**l_674))); + step_hash(369); + (**l_674) = l_701; + } + else + { + short l_705 = (-1L); + int l_710 = 3L; + step_hash(371); + l_710 &= (g_4 == ((((short)((void*)0 != l_704) << (short)(func_5(l_705, g_175[7]) <= l_679)) ^ l_706) ^ ((((((int)l_709 % (int)l_679) < (**l_674)) >= (-1L)) >= 0x94D027EEL) || g_102))); + } + } + step_hash(374); + (*g_204) = (*l_674); + step_hash(375); + (**l_674) = ((unsigned short)g_4 + (unsigned short)((*g_204) != (void*)0)); + } + } + else + { + int l_721 = 0xA63D87FCL; + int ***l_734 = &g_204; + int l_752 = 0xDB6A5336L; + step_hash(396); + for (l_633 = 1; (l_633 <= 7); l_633 += 1) + { + int l_731 = 7L; + signed char l_741 = 0x76L; + int l_744 = 0xB4172AF5L; + int l_745[6] = {9L, 9L, 0xD42503CBL, 9L, 9L, 0xD42503CBL}; + int i; + step_hash(394); + if (((void*)0 != &g_205[2])) + { + step_hash(382); + g_722 = ((unsigned short)(1L && ((-1L) == (-1L))) / (unsigned short)((short)l_721 / (short)0x1D2AL)); + step_hash(383); + if (l_721) + break; + } + else + { + unsigned short l_743[4][6]; + int l_746 = 0xD2AE76E6L; + int l_748[9][4] = {{2L, 0x06811A1FL, (-5L), 3L}, {2L, 0x06811A1FL, (-5L), 3L}, {2L, 0x06811A1FL, (-5L), 3L}, {2L, 0x06811A1FL, (-5L), 3L}, {2L, 0x06811A1FL, (-5L), 3L}, {2L, 0x06811A1FL, (-5L), 3L}, {2L, 0x06811A1FL, (-5L), 3L}, {2L, 0x06811A1FL, (-5L), 3L}, {2L, 0x06811A1FL, (-5L), 3L}}; + int i, j; + for (i = 0; i < 4; i++) + { + for (j = 0; j < 6; j++) + l_743[i][j] = 0x9B49L; + } + step_hash(393); + if (((unsigned)((l_721 ^ (func_5(g_281, ((short)func_5(l_721, (&g_204 == &l_647[6])) >> (short)func_5(g_175[7], ((signed char)g_274 * (signed char)((signed char)(0x948E1FD1L <= l_731) - (signed char)g_152))))) <= g_281)) > 0x81L) - (unsigned)l_721)) + { + short l_742 = 0x1E8BL; + int l_747 = (-7L); + step_hash(386); + if (l_721) + break; + step_hash(387); + (**l_734) = (*g_204); + step_hash(388); + l_749--; + } + else + { + step_hash(390); + if (l_721) + break; + step_hash(391); + l_748[7][2] &= 5L; + step_hash(392); + (**l_734) = (void*)0; + } + } + step_hash(395); + return (*g_204); + } + step_hash(418); + if (((void*)0 == &g_205[7])) + { + step_hash(402); + for (g_371 = 0; (g_371 <= 7); g_371 += 1) + { + step_hash(401); + l_752 = ((void*)0 != &l_647[7]); + } + } + else + { + unsigned l_753 = 0UL; + step_hash(417); + for (l_749 = 0; (l_749 <= 7); l_749 += 1) + { + int l_754[1][8] = {{0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L}}; + int l_755 = 0L; + int l_769 = 0L; + int i, j; + step_hash(414); + for (g_281 = 0; (g_281 <= 5); g_281 += 1) + { + int i; + step_hash(410); + g_175[g_281] ^= func_5(((l_549[g_281] == &g_175[g_74]) != (&p_71 == (void*)0)), l_753); + step_hash(411); + l_549[g_281] = (*g_204); + step_hash(412); + if (l_753) + continue; + step_hash(413); + l_755 &= l_754[0][3]; + } + step_hash(415); + l_769 |= (((short)((unsigned short)((void*)0 != &g_204) / (unsigned short)g_4) << (short)((unsigned short)((int)(g_152 | ((signed char)(-1L) % (signed char)(((unsigned char)0UL * (unsigned char)func_5(l_754[0][1], g_768)) | l_755))) / (int)g_476) / (unsigned short)g_371)) >= g_768); + step_hash(416); + if (l_753) + continue; + } + } + step_hash(419); + return (*g_204); + } + } + step_hash(422); + for (g_525 = 0; g_525 < 10; g_525 += 1) + { + l_647[g_525] = &g_205[3]; + } + step_hash(423); + return (*g_204); +} + + + + + + + +static int * func_77(unsigned p_78, int * p_79, unsigned p_80, int p_81) +{ + unsigned char l_84 = 0x8BL; + int *l_126 = &g_49[0][1]; + int l_150[8][10] = {{0x6B0EF2B8L, 0xA65C328AL, 0x86F5F88DL, 0x86F5F88DL, 0xA65C328AL, 0x6B0EF2B8L, 0xA65C328AL, 0x86F5F88DL, 0x86F5F88DL, 0xA65C328AL}, {0x6B0EF2B8L, 0xA65C328AL, 0x86F5F88DL, 0x86F5F88DL, 0xA65C328AL, 0x6B0EF2B8L, 0xA65C328AL, 0x86F5F88DL, 0x86F5F88DL, 0xA65C328AL}, {0x6B0EF2B8L, 0xA65C328AL, 0x86F5F88DL, 0x86F5F88DL, 0xA65C328AL, 0x6B0EF2B8L, 0xA65C328AL, 0x86F5F88DL, 0x86F5F88DL, 0xA65C328AL}, {0x6B0EF2B8L, 0xA65C328AL, 0x86F5F88DL, 0x86F5F88DL, 0xA65C328AL, 0x6B0EF2B8L, 0xA65C328AL, 0x86F5F88DL, 0x86F5F88DL, 0xA65C328AL}, {0x6B0EF2B8L, 0xA65C328AL, 0x86F5F88DL, 0x86F5F88DL, 0xA65C328AL, 0x6B0EF2B8L, 0xA65C328AL, 0x86F5F88DL, 0x86F5F88DL, 0xA65C328AL}, {0x6B0EF2B8L, 0xA65C328AL, 0x86F5F88DL, 0x86F5F88DL, 0xA65C328AL, 0x6B0EF2B8L, 0xA65C328AL, 0x86F5F88DL, 0x86F5F88DL, 0xA65C328AL}, {0x6B0EF2B8L, 0xA65C328AL, 0x86F5F88DL, 0x86F5F88DL, 0xA65C328AL, 0x6B0EF2B8L, 0xA65C328AL, 0x86F5F88DL, 0x86F5F88DL, 0xA65C328AL}, {0x6B0EF2B8L, 0xA65C328AL, 0x86F5F88DL, 0x86F5F88DL, 0xA65C328AL, 0x6B0EF2B8L, 0xA65C328AL, 0x86F5F88DL, 0x86F5F88DL, 0xA65C328AL}}; + unsigned char l_182 = 0xFFL; + unsigned l_259 = 1UL; + int l_278 = (-8L); + short l_368 = 0x3573L; + signed char l_380 = 0xFAL; + short l_383 = 0xA039L; + int *l_456[6][2] = {{&g_102, (void*)0}, {&g_102, (void*)0}, {&g_102, (void*)0}, {&g_102, (void*)0}, {&g_102, (void*)0}, {&g_102, (void*)0}}; + int l_457 = (-1L); + int i, j; + step_hash(260); + if (((l_84 | (-1L)) | ((-(int)((short)(-8L) >> (short)10)) ^ ((unsigned char)((short)((unsigned short)65535UL % (unsigned short)(l_84 && (0x84D1L < 0x3B75L))) << (short)10) >> (unsigned char)func_5(((void*)0 != p_79), l_84))))) + { + unsigned l_100 = 1UL; + int *l_101 = &g_102; + step_hash(27); + (*l_101) = func_5(((unsigned short)g_74 * (unsigned short)(((short)p_80 / (short)(-1L)) ^ p_80)), (0xB2L >= ((unsigned char)((0xB764FAD6L == (*p_79)) && l_100) << (unsigned char)2))); + } + else + { + short l_105 = 0x06CDL; + int l_170 = 0L; + unsigned short l_226 = 0x16AAL; + int l_233 = 1L; + int l_234 = 0L; + int l_235 = (-8L); + int *l_241[9][2] = {{&l_150[2][6], &l_235}, {&l_150[2][6], &l_235}, {&l_150[2][6], &l_235}, {&l_150[2][6], &l_235}, {&l_150[2][6], &l_235}, {&l_150[2][6], &l_235}, {&l_150[2][6], &l_235}, {&l_150[2][6], &l_235}, {&l_150[2][6], &l_235}}; + int l_280[7][5] = {{0L, 1L, 0xDDF0E5C4L, 0xDDF0E5C4L, 1L}, {0L, 1L, 0xDDF0E5C4L, 0xDDF0E5C4L, 1L}, {0L, 1L, 0xDDF0E5C4L, 0xDDF0E5C4L, 1L}, {0L, 1L, 0xDDF0E5C4L, 0xDDF0E5C4L, 1L}, {0L, 1L, 0xDDF0E5C4L, 0xDDF0E5C4L, 1L}, {0L, 1L, 0xDDF0E5C4L, 0xDDF0E5C4L, 1L}, {0L, 1L, 0xDDF0E5C4L, 0xDDF0E5C4L, 1L}}; + int l_338 = 0L; + unsigned short l_359 = 65535UL; + int l_370 = 1L; + short l_374 = 5L; + unsigned short l_384[7]; + signed char l_393 = 4L; + int l_398[6] = {0L, 0L, 0x90A3DE15L, 0L, 0L, 0x90A3DE15L}; + int l_441 = (-4L); + int i, j; + for (i = 0; i < 7; i++) + l_384[i] = 0xF3B5L; + step_hash(161); + if (g_49[0][8]) + { + int l_112 = 1L; + short l_119 = 0xF228L; + int l_151[5][7] = {{0xD1920081L, 0xD1920081L, 0x8DB39B42L, 0xD1920081L, 0xD1920081L, 0x8DB39B42L, 0xD1920081L}, {0xD1920081L, 0xD1920081L, 0x8DB39B42L, 0xD1920081L, 0xD1920081L, 0x8DB39B42L, 0xD1920081L}, {0xD1920081L, 0xD1920081L, 0x8DB39B42L, 0xD1920081L, 0xD1920081L, 0x8DB39B42L, 0xD1920081L}, {0xD1920081L, 0xD1920081L, 0x8DB39B42L, 0xD1920081L, 0xD1920081L, 0x8DB39B42L, 0xD1920081L}, {0xD1920081L, 0xD1920081L, 0x8DB39B42L, 0xD1920081L, 0xD1920081L, 0x8DB39B42L, 0xD1920081L}}; + int i, j; + step_hash(92); + if ((((unsigned short)l_105 * (unsigned short)((unsigned char)((short)((unsigned short)p_81 * (unsigned short)l_112) + (short)(((unsigned)(((signed char)g_4 + (signed char)0x16L) || (((g_49[0][8] == g_4) && (((((unsigned)(!l_84) % (unsigned)(*p_79)) && (*p_79)) != 0x80F98811L) ^ l_84)) <= l_112)) + (unsigned)0x999AA20CL) ^ l_105)) - (unsigned char)l_112)) ^ g_49[0][8])) + { + int *l_121[8][6] = {{&g_49[0][8], &g_49[0][2], &g_49[0][7], &g_74, &g_49[0][2], (void*)0}, {&g_49[0][8], &g_49[0][2], &g_49[0][7], &g_74, &g_49[0][2], (void*)0}, {&g_49[0][8], &g_49[0][2], &g_49[0][7], &g_74, &g_49[0][2], (void*)0}, {&g_49[0][8], &g_49[0][2], &g_49[0][7], &g_74, &g_49[0][2], (void*)0}, {&g_49[0][8], &g_49[0][2], &g_49[0][7], &g_74, &g_49[0][2], (void*)0}, {&g_49[0][8], &g_49[0][2], &g_49[0][7], &g_74, &g_49[0][2], (void*)0}, {&g_49[0][8], &g_49[0][2], &g_49[0][7], &g_74, &g_49[0][2], (void*)0}, {&g_49[0][8], &g_49[0][2], &g_49[0][7], &g_74, &g_49[0][2], (void*)0}}; + int **l_120 = &l_121[2][3]; + int i, j; + step_hash(31); + l_119 ^= g_49[0][8]; + step_hash(32); + (*l_120) = &g_102; + step_hash(56); + for (l_112 = 5; (l_112 >= 0); l_112 -= 1) + { + int *l_138 = &g_49[0][4]; + int l_139 = 0xF4BB62B1L; + step_hash(36); + g_102 &= ((unsigned short)(&g_49[0][7] != &g_49[0][2]) << (unsigned short)p_80); + step_hash(37); + (*l_120) = &g_49[0][8]; + step_hash(46); + if (((int)(l_126 != (void*)0) + (int)l_112)) + { + step_hash(39); + if ((*p_79)) + break; + step_hash(40); + if ((*p_79)) + break; + step_hash(41); + if (g_74) + break; + } + else + { + step_hash(43); + g_102 = (((signed char)func_5(((signed char)((p_81 && l_105) | g_74) / (signed char)(((signed char)(func_5((((unsigned)((p_78 | (*l_126)) == (0UL & ((signed char)p_80 << (signed char)p_78))) + (unsigned)(((p_80 || g_49[0][8]) | 0xA50BL) >= 0UL)) == 1UL), p_78) < p_81) - (signed char)6L) || 0x3044D688L)), g_49[0][4]) >> (signed char)l_105) | g_137); + step_hash(44); + l_139 = (l_138 != p_79); + step_hash(45); + (*l_120) = p_79; + } + step_hash(47); + if ((*p_79)) + break; + step_hash(55); + for (p_81 = 5; (p_81 >= 0); p_81 -= 1) + { + int i, j; + step_hash(51); + (*l_120) = l_121[(l_112 + 2)][p_81]; + step_hash(52); + g_102 ^= 0x11C87380L; + step_hash(53); + g_102 = ((unsigned short)l_105 - (unsigned short)((int)l_112 - (int)l_112)); + step_hash(54); + g_102 |= (g_74 < (((func_5(((unsigned)g_49[0][8] % (unsigned)func_5((func_5(l_119, ((signed char)l_112 + (signed char)((p_78 ^ p_81) == l_119))) >= ((unsigned char)(*l_138) << (unsigned char)7)), l_105)), g_49[0][8]) | g_49[0][8]) <= g_4) >= p_81)); + } + } + step_hash(69); + for (p_78 = 0; (p_78 <= 5); p_78 += 1) + { + step_hash(67); + for (l_84 = 0; (l_84 <= 5); l_84 += 1) + { + int i, j; + step_hash(63); + l_150[2][6] ^= (*p_79); + step_hash(64); + l_151[3][4] ^= (p_79 != &g_49[0][8]); + step_hash(65); + g_152 ^= g_102; + step_hash(66); + l_151[0][6] = func_5(g_49[0][8], g_152); + } + step_hash(68); + return p_79; + } + } + else + { + int **l_159 = &l_126; + signed char l_210 = 0x5CL; + step_hash(71); + l_126 = p_79; + step_hash(72); + l_170 |= ((int)(0x73A5L > (4294967292UL >= g_152)) / (int)((unsigned)(((((unsigned short)g_152 * (unsigned short)((&p_79 == l_159) || p_81)) ^ ((short)((signed char)((unsigned char)g_49[0][7] * (unsigned char)((unsigned short)func_5(((short)(-1L) * (short)l_151[3][4]), p_81) % (unsigned short)(**l_159))) % (signed char)p_78) % (short)p_80)) > 4UL) > 0x79L) + (unsigned)l_119)); + step_hash(91); + for (g_102 = (-15); (g_102 < (-7)); g_102 += 2) + { + int *l_176 = &l_150[1][3]; + int *l_177 = &l_150[2][6]; + int *l_178 = &l_150[2][6]; + int *l_179 = &l_151[3][4]; + int *l_180 = (void*)0; + int *l_181 = (void*)0; + step_hash(81); + for (p_81 = 7; (p_81 >= 1); p_81 -= 1) + { + int i, j; + step_hash(79); + l_150[p_81][(p_81 + 1)] = ((unsigned short)(l_150[p_81][p_81] && l_150[p_81][(p_81 + 2)]) << (unsigned short)l_150[p_81][(p_81 + 2)]); + step_hash(80); + l_150[p_81][p_81] &= (l_151[1][1] == g_152); + } + step_hash(82); + l_182++; + step_hash(89); + if ((0L || (+0x7DAE833BL))) + { + step_hash(84); + g_175[7] = (*p_79); + step_hash(85); + return &g_74; + } + else + { + int **l_185 = &l_176; + step_hash(87); + (**l_185) = ((void*)0 == l_185); + step_hash(88); + (*l_178) = ((short)((~65535UL) & ((((short)(((void*)0 == &l_126) > (*p_79)) % (short)l_112) & (+(((((~((short)(0xC9L == ((int)0L - (int)g_4)) << (short)6)) & (0x8482C93BL == 1L)) < (-6L)) | (**l_159)) < (*p_79)))) & l_105)) - (short)0UL); + } + step_hash(90); + (*l_176) |= ((signed char)func_5((*l_126), ((unsigned char)(0xF3F7L && ((int)g_102 % (int)func_5(((unsigned char)(0xD8L == ((((g_102 | ((signed char)(g_204 == (void*)0) << (signed char)7)) <= func_5(((unsigned short)((unsigned char)((void*)0 == &l_170) << (unsigned char)1) >> (unsigned short)7), g_175[4])) != l_210) | g_74)) * (unsigned char)g_4), p_81))) >> (unsigned char)(**l_159))) >> (signed char)5); + } + } + } + else + { + int *l_211 = &l_150[2][0]; + int l_215 = 0x64C33588L; + int l_232[6][1] = {{(-1L)}, {(-1L)}, {(-1L)}, {(-1L)}, {(-1L)}, {(-1L)}}; + short l_314[3][7] = {{0L, 0x513DL, 0L, 0x513DL, 0L, 0x513DL, 0L}, {0L, 0x513DL, 0L, 0x513DL, 0L, 0x513DL, 0L}, {0L, 0x513DL, 0L, 0x513DL, 0L, 0x513DL, 0L}}; + unsigned char l_323 = 255UL; + unsigned l_342[4][4] = {{4294967295UL, 0UL, 0x1BA29303L, 0UL}, {4294967295UL, 0UL, 0x1BA29303L, 0UL}, {4294967295UL, 0UL, 0x1BA29303L, 0UL}, {4294967295UL, 0UL, 0x1BA29303L, 0UL}}; + unsigned l_345[2]; + int i, j; + for (i = 0; i < 2; i++) + l_345[i] = 0UL; + step_hash(94); + (*l_211) = (1UL | 65531UL); + step_hash(99); + for (g_102 = 7; (g_102 >= 1); g_102 -= 1) + { + int i; + step_hash(98); + return g_205[(g_102 + 1)]; + } + step_hash(160); + if ((func_5((!g_4), p_78) & (*l_211))) + { + unsigned short l_216 = 0x851AL; + int l_229[4][10]; + signed char l_244 = 0x09L; + signed char l_249 = 0x66L; + unsigned l_251 = 0x6E68A10EL; + signed char l_305 = 1L; + signed char l_319 = 0L; + int i, j; + for (i = 0; i < 4; i++) + { + for (j = 0; j < 10; j++) + l_229[i][j] = 0xBB092B10L; + } + step_hash(111); + for (g_152 = 0; (g_152 >= 13); g_152 += 1) + { + int *l_214[9]; + int i; + for (i = 0; i < 9; i++) + l_214[i] = &g_175[7]; + step_hash(104); + l_216--; + step_hash(110); + if ((&l_215 != (void*)0)) + { + step_hash(106); + return p_79; + } + else + { + step_hash(108); + (*l_211) &= (*p_79); + step_hash(109); + return (*g_204); + } + } + step_hash(116); + for (l_170 = 0; (l_170 >= 7); ++l_170) + { + step_hash(115); + return p_79; + } + step_hash(137); + if (((short)func_5(func_5((*l_126), ((short)(p_80 < l_170) + (short)(0x5A989734L < ((~0xE0L) != (func_5(p_80, g_102) != ((void*)0 != &l_215)))))), l_105) * (short)(-5L))) + { + unsigned char l_225 = 255UL; + step_hash(123); + for (p_81 = 2; (p_81 <= 8); p_81 += 1) + { + int i; + step_hash(121); + (*l_211) = func_5(g_49[0][1], g_49[0][8]); + step_hash(122); + (*l_211) = l_225; + } + } + else + { + int l_227 = 0L; + int *l_228 = &l_227; + int *l_230 = &g_102; + int *l_231[4][8] = {{&l_150[2][6], &l_150[2][6], (void*)0, &l_150[2][6], &l_150[2][6], (void*)0, &l_150[2][6], &l_150[2][6]}, {&l_150[2][6], &l_150[2][6], (void*)0, &l_150[2][6], &l_150[2][6], (void*)0, &l_150[2][6], &l_150[2][6]}, {&l_150[2][6], &l_150[2][6], (void*)0, &l_150[2][6], &l_150[2][6], (void*)0, &l_150[2][6], &l_150[2][6]}, {&l_150[2][6], &l_150[2][6], (void*)0, &l_150[2][6], &l_150[2][6], (void*)0, &l_150[2][6], &l_150[2][6]}}; + unsigned l_236 = 4294967289UL; + short l_250[8][1] = {{0x20AEL}, {0x20AEL}, {0x20AEL}, {0x20AEL}, {0x20AEL}, {0x20AEL}, {0x20AEL}, {0x20AEL}}; + unsigned l_268 = 0x40DFEE72L; + int i, j; + step_hash(125); + (*l_211) = l_226; + step_hash(126); + l_236--; + step_hash(136); + if ((+((unsigned short)((&l_227 != l_241[4][1]) == (func_5(func_5(g_102, ((4294967287UL != ((*l_211) == ((unsigned)((*l_228) <= func_5(g_4, (*l_228))) - (unsigned)l_229[1][6]))) | p_78)), g_49[0][7]) | l_244)) << (unsigned short)p_80))) + { + step_hash(128); + l_229[0][1] ^= ((((signed char)((((unsigned short)g_152 >> (unsigned short)1) == (g_49[0][8] <= (p_79 != (void*)0))) <= func_5(l_249, ((0UL || l_250[3][0]) >= ((0xFD22L < ((*l_126) != l_251)) & 4L)))) * (signed char)p_78) <= 0x29L) & 4294967295UL); + step_hash(129); + (*l_211) = (&g_205[0] != (void*)0); + step_hash(130); + (*l_228) |= (*p_79); + } + else + { + unsigned char l_258[6] = {0xC1L, 0xC1L, 255UL, 0xC1L, 0xC1L, 255UL}; + int l_273 = 0x5576E561L; + int l_275 = 0x5BEE3EABL; + int l_277 = 0xC4DEAE77L; + int l_279[7] = {0L, 0L, 0x5434C744L, 0L, 0L, 0x5434C744L, 0L}; + int i; + step_hash(132); + (*l_230) = ((unsigned)(&l_234 == (*g_204)) / (unsigned)(*l_126)); + step_hash(133); + (*l_228) ^= ((int)1L - (int)((unsigned char)func_5((((0UL > (*p_79)) >= ((func_5(l_258[4], g_137) != 0x78100EF0L) != (*p_79))) <= (*p_79)), l_259) / (unsigned char)0x62L)); + step_hash(134); + l_273 ^= ((signed char)((+((unsigned short)(((void*)0 != p_79) <= ((signed char)(((short)(((*p_79) && (l_268 ^ 0UL)) | ((unsigned char)(g_4 & (((signed char)g_175[7] >> (signed char)(p_79 == p_79)) | g_74)) * (unsigned char)l_229[0][3])) - (short)p_78) >= 0x8284AA03L) << (signed char)7)) * (unsigned short)g_175[5])) ^ p_78) << (signed char)7); + step_hash(135); + g_281++; + } + } + step_hash(157); + if (l_229[0][1]) + { + unsigned short l_302 = 0xD42BL; + int l_309 = 0xF09C6116L; + int l_310 = 0xAAFCCFCCL; + int l_311[9] = {0L, 0L, 0xB900E7DEL, 0L, 0L, 0xB900E7DEL, 0L, 0L, 0xB900E7DEL}; + int l_321 = 1L; + int i; + step_hash(144); + for (l_259 = 16; (l_259 < 47); l_259 += 1) + { + signed char l_297 = 0L; + step_hash(142); + (*l_211) = ((signed char)(((&l_211 == (void*)0) ^ ((unsigned short)(((unsigned)((short)(g_152 >= ((unsigned short)p_78 - (unsigned short)(-(unsigned)l_297))) + (short)((unsigned short)(((signed char)func_5(l_302, ((signed char)((((void*)0 == (*g_204)) & p_78) != 5L) + (signed char)p_81)) + (signed char)g_74) <= 0UL) >> (unsigned short)10)) / (unsigned)l_302) == l_305) - (unsigned short)p_80)) == 0UL) * (signed char)0x41L); + step_hash(143); + l_229[0][1] = l_305; + } + step_hash(151); + if (func_5(g_152, (func_5(((unsigned)0xA07E1623L % (unsigned)(*l_126)), (*l_126)) == (g_49[0][4] > 4L)))) + { + signed char l_308 = 0x92L; + int l_312 = 0x80934606L; + int l_313 = 0x73DFDAE5L; + int l_315 = (-10L); + int l_316 = 1L; + int l_317 = 0x026B42F2L; + int l_318 = 0L; + int l_320 = 0x37A764B2L; + int l_322 = 0xDFBD8FCFL; + step_hash(146); + ++l_323; + } + else + { + short l_336[4][4] = {{5L, 5L, 3L, (-7L)}, {5L, 5L, 3L, (-7L)}, {5L, 5L, 3L, (-7L)}, {5L, 5L, 3L, (-7L)}}; + int l_337 = 9L; + int l_339 = 0xF92FA34FL; + int l_340 = (-1L); + int l_341[1][10] = {{5L, (-4L), 5L, (-4L), 5L, (-4L), 5L, (-4L), 5L, (-4L)}}; + int i, j; + step_hash(148); + p_79 = p_79; + step_hash(149); + (*l_211) &= (l_302 >= ((signed char)(((short)(g_137 != func_5(func_5(p_81, ((unsigned short)(func_5(((int)(p_79 != &l_229[0][1]) + (int)((~(p_80 <= (0x3642L <= g_152))) || (p_79 == (void*)0))), g_49[0][2]) != 0UL) + (unsigned short)0x85F9L)), g_274)) * (short)7UL) > l_305) << (signed char)p_78)); + step_hash(150); + l_342[3][2]--; + } + step_hash(152); + return p_79; + } + else + { + int *l_358[6][6] = {{&l_229[0][1], &l_150[0][4], &l_229[0][1], &l_150[0][4], &l_229[0][1], &l_150[0][4]}, {&l_229[0][1], &l_150[0][4], &l_229[0][1], &l_150[0][4], &l_229[0][1], &l_150[0][4]}, {&l_229[0][1], &l_150[0][4], &l_229[0][1], &l_150[0][4], &l_229[0][1], &l_150[0][4]}, {&l_229[0][1], &l_150[0][4], &l_229[0][1], &l_150[0][4], &l_229[0][1], &l_150[0][4]}, {&l_229[0][1], &l_150[0][4], &l_229[0][1], &l_150[0][4], &l_229[0][1], &l_150[0][4]}, {&l_229[0][1], &l_150[0][4], &l_229[0][1], &l_150[0][4], &l_229[0][1], &l_150[0][4]}}; + int i, j; + step_hash(154); + ++l_345[1]; + step_hash(155); + (*l_211) = (0x6862L > ((~((int)(*l_126) / (int)(g_274 | ((0x0AL != (((unsigned)func_5(g_175[7], ((signed char)g_49[0][5] << (signed char)((unsigned short)((unsigned)((*l_211) <= (p_78 <= 5L)) / (unsigned)g_175[7]) - (unsigned short)0x7AB5L))) - (unsigned)(*l_211)) >= g_175[7])) >= 4UL)))) & g_152)); + step_hash(156); + l_358[0][4] = (*g_204); + } + } + else + { + step_hash(159); + (*g_204) = (*g_204); + } + } + step_hash(186); + for (l_226 = 1; (l_226 <= 8); l_226 += 1) + { + int l_372 = 2L; + int l_373[10] = {(-1L), 0x6A351DA5L, (-1L), 0x6A351DA5L, (-1L), 0x6A351DA5L, (-1L), 0x6A351DA5L, (-1L), 0x6A351DA5L}; + int i; + step_hash(165); + l_359 = (+g_175[l_226]); + step_hash(166); + for (l_234 = 0; l_234 < 9; l_234 += 1) + { + g_205[l_234] = &g_49[0][8]; + } + step_hash(167); + g_175[l_226] = (((func_5(g_175[l_226], ((signed char)0xADL - (signed char)p_81)) != ((signed char)func_5(g_281, func_5((0xA6L < ((unsigned short)(((void*)0 == (*g_204)) & (p_78 < 9UL)) + (unsigned short)g_74)), g_102)) + (signed char)g_281)) | g_74) <= l_368); + step_hash(185); + for (l_182 = 0; (l_182 <= 1); l_182 += 1) + { + int l_369[4] = {0L, 1L, 0L, 1L}; + unsigned char l_375 = 0UL; + int i, j; + step_hash(171); + l_241[l_226][l_182] = l_241[l_226][l_182]; + step_hash(172); + l_150[1][9] = (*p_79); + step_hash(173); + ++l_375; + step_hash(184); + if ((*p_79)) + { + step_hash(175); + (*g_204) = p_79; + step_hash(180); + for (g_276 = (-27); (g_276 <= 12); g_276++) + { + step_hash(179); + g_175[l_226] = (*p_79); + } + } + else + { + int l_381 = (-2L); + int l_382[5][4] = {{(-5L), (-7L), 0x92619201L, (-7L)}, {(-5L), (-7L), 0x92619201L, (-7L)}, {(-5L), (-7L), 0x92619201L, (-7L)}, {(-5L), (-7L), 0x92619201L, (-7L)}, {(-5L), (-7L), 0x92619201L, (-7L)}}; + int i, j; + step_hash(182); + (*g_204) = p_79; + step_hash(183); + --l_384[6]; + } + } + } + step_hash(259); + if ((+func_5(p_81, g_74))) + { + short l_419 = 0x9D62L; + int l_423 = (-2L); + step_hash(223); + if ((g_74 >= ((((((signed char)((short)(0xD3L | 252UL) - (short)(((int)(*p_79) + (int)g_49[0][8]) || (func_5(g_175[7], (*l_126)) && l_393))) - (signed char)(*l_126)) && 0x50L) && 4294967286UL) <= 7L) <= 0x8CEB4637L))) + { + unsigned l_401 = 4294967287UL; + unsigned short l_404[3][5] = {{0x811AL, 0xB77DL, 0x811AL, 0xB77DL, 0x811AL}, {0x811AL, 0xB77DL, 0x811AL, 0xB77DL, 0x811AL}, {0x811AL, 0xB77DL, 0x811AL, 0xB77DL, 0x811AL}}; + int l_420 = 7L; + int i, j; + step_hash(208); + if (((unsigned short)((signed char)((p_79 != (*g_204)) <= l_398[4]) >> (signed char)1) << (unsigned short)((unsigned short)l_401 / (unsigned short)((unsigned short)l_404[2][2] * (unsigned short)0x3A50L)))) + { + step_hash(190); + (*g_204) = (*g_204); + step_hash(191); + (*g_204) = (*g_204); + step_hash(192); + (*g_204) = (*g_204); + step_hash(193); + (*g_204) = &l_170; + } + else + { + short l_418 = (-7L); + int l_421 = 0x53750595L; + short l_422 = 0L; + step_hash(195); + l_420 |= ((short)((unsigned short)(-(signed char)(*l_126)) * (unsigned short)(((unsigned short)((unsigned short)(p_79 == (void*)0) + (unsigned short)((((short)((((int)l_418 - (int)(5L == ((g_152 ^ (0xCEL > p_80)) > (*l_126)))) && 0x33B4C881L) == 0x67E3055AL) << (short)1) < 0xBD53L) & (*p_79))) * (unsigned short)p_80) && 1L)) >> (short)l_419); + step_hash(196); + l_421 = (*p_79); + step_hash(202); + if ((p_79 == &l_421)) + { + step_hash(198); + return (*g_204); + } + else + { + step_hash(200); + l_423 = (+l_422); + step_hash(201); + (*g_204) = (*g_204); + } + step_hash(207); + for (g_274 = 2; (g_274 >= 0); g_274 -= 1) + { + int i; + step_hash(206); + g_175[(g_274 + 2)] = l_398[(g_274 + 1)]; + } + } + step_hash(209); + (*g_204) = &l_423; + } + else + { + short l_428 = 0xB9A0L; + int l_429 = 0xB3EB2CECL; + step_hash(221); + for (l_383 = 0; (l_383 == 13); l_383 += 2) + { + signed char l_427 = 0x91L; + step_hash(220); + for (g_152 = 1; (g_152 >= 0); g_152 -= 1) + { + int i, j; + step_hash(217); + l_423 &= g_426; + step_hash(218); + l_429 |= (l_427 <= l_428); + step_hash(219); + if (l_419) + continue; + } + } + step_hash(222); + return p_79; + } + } + else + { + unsigned l_434 = 0x0D8E497EL; + int l_442 = 9L; + step_hash(225); + l_442 = ((*l_126) || (((*g_204) != (void*)0) != func_5(((signed char)(((unsigned)func_5(l_434, ((((short)func_5(g_175[7], p_80) - (short)func_5(g_175[7], ((((unsigned char)((int)((func_5((0L > g_102), l_434) == (*l_126)) & 0L) - (int)p_80) / (unsigned char)p_80) >= p_80) > p_78))) ^ l_441) != g_102)) - (unsigned)0xB6C6D5C3L) > p_80) / (signed char)p_80), g_426))); + step_hash(258); + if (((unsigned char)g_274 << (unsigned char)4)) + { + step_hash(227); + l_442 = (*p_79); + step_hash(232); + for (p_81 = 0; (p_81 >= (-3)); p_81 -= 9) + { + step_hash(231); + return p_79; + } + step_hash(238); + for (p_80 = 0; (p_80 <= 4); p_80 += 1) + { + step_hash(236); + (*g_204) = (*g_204); + step_hash(237); + return p_79; + } + step_hash(239); + for (l_259 = 0; l_259 < 7; l_259 += 1) + { + for (l_368 = 0; l_368 < 5; l_368 += 1) + { + l_280[l_259][l_368] = 0xA5BAB5D3L; + } + } + } + else + { + short l_447 = (-2L); + int *l_452 = &l_234; + unsigned l_453 = 7UL; + step_hash(241); + l_442 = l_447; + step_hash(256); + for (l_370 = 0; (l_370 == 8); l_370 += 6) + { + step_hash(249); + for (l_234 = 0; (l_234 <= (-21)); l_234 -= 3) + { + step_hash(248); + return (*g_204); + } + step_hash(250); + (*g_204) = (*g_204); + step_hash(255); + for (l_278 = 0; (l_278 <= 5); l_278 += 1) + { + step_hash(254); + return (*g_204); + } + } + step_hash(257); + --l_453; + } + } + } + step_hash(261); + l_457 ^= 0x2D5F306DL; + step_hash(262); + return p_79; +} + + +void csmith_compute_hash(void) +{ + int i, j; + transparent_crc(g_4, "g_4", print_hash_value); + for (i = 0; i < 1; i++) + { + for (j = 0; j < 9; j++) + { + transparent_crc(g_49[i][j], "g_49[i][j]", print_hash_value); + if (print_hash_value) printf("index = [%d][%d]\n", i, j); + + } + } + transparent_crc(g_74, "g_74", print_hash_value); + transparent_crc(g_102, "g_102", print_hash_value); + transparent_crc(g_137, "g_137", print_hash_value); + transparent_crc(g_152, "g_152", print_hash_value); + for (i = 0; i < 9; i++) + { + transparent_crc(g_175[i], "g_175[i]", print_hash_value); + if (print_hash_value) printf("index = [%d]\n", i); + + } + transparent_crc(g_274, "g_274", print_hash_value); + transparent_crc(g_276, "g_276", print_hash_value); + transparent_crc(g_281, "g_281", print_hash_value); + transparent_crc(g_371, "g_371", print_hash_value); + transparent_crc(g_426, "g_426", print_hash_value); + transparent_crc(g_476, "g_476", print_hash_value); + transparent_crc(g_525, "g_525", print_hash_value); + transparent_crc(g_722, "g_722", print_hash_value); + transparent_crc(g_768, "g_768", print_hash_value); + transparent_crc(g_817, "g_817", print_hash_value); + transparent_crc(g_881, "g_881", print_hash_value); + transparent_crc(g_1035, "g_1035", print_hash_value); + transparent_crc(g_1037, "g_1037", print_hash_value); + transparent_crc(g_1061, "g_1061", print_hash_value); + transparent_crc(g_1164, "g_1164", print_hash_value); + transparent_crc(g_1259, "g_1259", print_hash_value); + transparent_crc(g_1283, "g_1283", print_hash_value); + transparent_crc(g_1295, "g_1295", print_hash_value); + transparent_crc(g_1307, "g_1307", print_hash_value); + transparent_crc(g_1313, "g_1313", print_hash_value); +} + +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} + + + +int main (void) +{ + int i, j; + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand107.expect b/src/tests/csmith/rand107.expect new file mode 100644 index 0000000..2bbdd88 --- /dev/null +++ b/src/tests/csmith/rand107.expect @@ -0,0 +1,310 @@ +...checksum after hashing g_4 : FFFFFFFF +...checksum after hashing g_49[i][j] : 19710C7E +index = [0][0] +...checksum after hashing g_49[i][j] : 2F4A3143 +index = [0][1] +...checksum after hashing g_49[i][j] : CA85CE3F +index = [0][2] +...checksum after hashing g_49[i][j] : F1C3EBE2 +index = [0][3] +...checksum after hashing g_49[i][j] : 3466DC68 +index = [0][4] +...checksum after hashing g_49[i][j] : 97EDD4D3 +index = [0][5] +...checksum after hashing g_49[i][j] : FC102C40 +index = [0][6] +...checksum after hashing g_49[i][j] : AB75B420 +index = [0][7] +...checksum after hashing g_49[i][j] : B6E322BC +index = [0][8] +...checksum after hashing g_74 : C4C32AC5 +...checksum after hashing g_102 : 916FE75F +...checksum after hashing g_137 : 7BEAD277 +...checksum after hashing g_152 : 3AE715B5 +...checksum after hashing g_175[i] : CE573FDC +index = [0] +...checksum after hashing g_175[i] : E70C49BF +index = [1] +...checksum after hashing g_175[i] : 81A48C22 +index = [2] +...checksum after hashing g_175[i] : 9F5F861D +index = [3] +...checksum after hashing g_175[i] : 337D7B48 +index = [4] +...checksum after hashing g_175[i] : EDA58D9 +index = [5] +...checksum after hashing g_175[i] : 8CB9D5FF +index = [6] +...checksum after hashing g_175[i] : A9D1E2C7 +index = [7] +...checksum after hashing g_175[i] : 5FF06115 +index = [8] +...checksum after hashing g_274 : 3E45549D +...checksum after hashing g_276 : 4F06E659 +...checksum after hashing g_281 : D30A1ECE +...checksum after hashing g_371 : FCE7C4D2 +...checksum after hashing g_426 : 978FCA7E +...checksum after hashing g_476 : 301CDCD7 +...checksum after hashing g_525 : 6EE49DF5 +...checksum after hashing g_722 : A1B47FFA +...checksum after hashing g_768 : F36793E +...checksum after hashing g_817 : CB8FE8D0 +...checksum after hashing g_881 : A8F01F44 +...checksum after hashing g_1035 : 56455939 +...checksum after hashing g_1037 : C00C3289 +...checksum after hashing g_1061 : 1997FD8A +...checksum after hashing g_1164 : AB53BA99 +...checksum after hashing g_1259 : 8967D693 +...checksum after hashing g_1283 : 67D63ED3 +...checksum after hashing g_1295 : 15AC9030 +...checksum after hashing g_1307 : A1AB24E1 +...checksum after hashing g_1313 : DF8DF97B +before stmt(758): checksum = DF8DF97B +...checksum after hashing g_4 : FFFFFFFF +...checksum after hashing g_49[i][j] : 19710C7E +index = [0][0] +...checksum after hashing g_49[i][j] : 2F4A3143 +index = [0][1] +...checksum after hashing g_49[i][j] : CA85CE3F +index = [0][2] +...checksum after hashing g_49[i][j] : F1C3EBE2 +index = [0][3] +...checksum after hashing g_49[i][j] : 3466DC68 +index = [0][4] +...checksum after hashing g_49[i][j] : 97EDD4D3 +index = [0][5] +...checksum after hashing g_49[i][j] : FC102C40 +index = [0][6] +...checksum after hashing g_49[i][j] : AB75B420 +index = [0][7] +...checksum after hashing g_49[i][j] : B6E322BC +index = [0][8] +...checksum after hashing g_74 : C4C32AC5 +...checksum after hashing g_102 : 916FE75F +...checksum after hashing g_137 : 7BEAD277 +...checksum after hashing g_152 : 3AE715B5 +...checksum after hashing g_175[i] : CE573FDC +index = [0] +...checksum after hashing g_175[i] : E70C49BF +index = [1] +...checksum after hashing g_175[i] : 81A48C22 +index = [2] +...checksum after hashing g_175[i] : 9F5F861D +index = [3] +...checksum after hashing g_175[i] : 337D7B48 +index = [4] +...checksum after hashing g_175[i] : EDA58D9 +index = [5] +...checksum after hashing g_175[i] : 8CB9D5FF +index = [6] +...checksum after hashing g_175[i] : A9D1E2C7 +index = [7] +...checksum after hashing g_175[i] : 5FF06115 +index = [8] +...checksum after hashing g_274 : 3E45549D +...checksum after hashing g_276 : 4F06E659 +...checksum after hashing g_281 : D30A1ECE +...checksum after hashing g_371 : FCE7C4D2 +...checksum after hashing g_426 : 978FCA7E +...checksum after hashing g_476 : 301CDCD7 +...checksum after hashing g_525 : 6EE49DF5 +...checksum after hashing g_722 : A1B47FFA +...checksum after hashing g_768 : F36793E +...checksum after hashing g_817 : CB8FE8D0 +...checksum after hashing g_881 : A8F01F44 +...checksum after hashing g_1035 : 56455939 +...checksum after hashing g_1037 : C00C3289 +...checksum after hashing g_1061 : 1997FD8A +...checksum after hashing g_1164 : AB53BA99 +...checksum after hashing g_1259 : 8967D693 +...checksum after hashing g_1283 : 67D63ED3 +...checksum after hashing g_1295 : 15AC9030 +...checksum after hashing g_1307 : A1AB24E1 +...checksum after hashing g_1313 : DF8DF97B +before stmt(2): checksum = DF8DF97B +...checksum after hashing g_4 : FFFFFFFF +...checksum after hashing g_49[i][j] : 19710C7E +index = [0][0] +...checksum after hashing g_49[i][j] : 2F4A3143 +index = [0][1] +...checksum after hashing g_49[i][j] : CA85CE3F +index = [0][2] +...checksum after hashing g_49[i][j] : F1C3EBE2 +index = [0][3] +...checksum after hashing g_49[i][j] : 3466DC68 +index = [0][4] +...checksum after hashing g_49[i][j] : 97EDD4D3 +index = [0][5] +...checksum after hashing g_49[i][j] : FC102C40 +index = [0][6] +...checksum after hashing g_49[i][j] : AB75B420 +index = [0][7] +...checksum after hashing g_49[i][j] : B6E322BC +index = [0][8] +...checksum after hashing g_74 : C4C32AC5 +...checksum after hashing g_102 : 916FE75F +...checksum after hashing g_137 : 7BEAD277 +...checksum after hashing g_152 : 3AE715B5 +...checksum after hashing g_175[i] : CE573FDC +index = [0] +...checksum after hashing g_175[i] : E70C49BF +index = [1] +...checksum after hashing g_175[i] : 81A48C22 +index = [2] +...checksum after hashing g_175[i] : 9F5F861D +index = [3] +...checksum after hashing g_175[i] : 337D7B48 +index = [4] +...checksum after hashing g_175[i] : EDA58D9 +index = [5] +...checksum after hashing g_175[i] : 8CB9D5FF +index = [6] +...checksum after hashing g_175[i] : A9D1E2C7 +index = [7] +...checksum after hashing g_175[i] : 5FF06115 +index = [8] +...checksum after hashing g_274 : 3E45549D +...checksum after hashing g_276 : 4F06E659 +...checksum after hashing g_281 : D30A1ECE +...checksum after hashing g_371 : FCE7C4D2 +...checksum after hashing g_426 : 978FCA7E +...checksum after hashing g_476 : 301CDCD7 +...checksum after hashing g_525 : 6EE49DF5 +...checksum after hashing g_722 : A1B47FFA +...checksum after hashing g_768 : F36793E +...checksum after hashing g_817 : CB8FE8D0 +...checksum after hashing g_881 : A8F01F44 +...checksum after hashing g_1035 : 56455939 +...checksum after hashing g_1037 : C00C3289 +...checksum after hashing g_1061 : 1997FD8A +...checksum after hashing g_1164 : AB53BA99 +...checksum after hashing g_1259 : 8967D693 +...checksum after hashing g_1283 : 67D63ED3 +...checksum after hashing g_1295 : 15AC9030 +...checksum after hashing g_1307 : A1AB24E1 +...checksum after hashing g_1313 : DF8DF97B +before stmt(754): checksum = DF8DF97B +...checksum after hashing g_4 : FFFFFFFF +...checksum after hashing g_49[i][j] : 19710C7E +index = [0][0] +...checksum after hashing g_49[i][j] : 2F4A3143 +index = [0][1] +...checksum after hashing g_49[i][j] : CA85CE3F +index = [0][2] +...checksum after hashing g_49[i][j] : F1C3EBE2 +index = [0][3] +...checksum after hashing g_49[i][j] : 3466DC68 +index = [0][4] +...checksum after hashing g_49[i][j] : 97EDD4D3 +index = [0][5] +...checksum after hashing g_49[i][j] : FC102C40 +index = [0][6] +...checksum after hashing g_49[i][j] : AB75B420 +index = [0][7] +...checksum after hashing g_49[i][j] : B6E322BC +index = [0][8] +...checksum after hashing g_74 : C4C32AC5 +...checksum after hashing g_102 : 916FE75F +...checksum after hashing g_137 : 7BEAD277 +...checksum after hashing g_152 : 3AE715B5 +...checksum after hashing g_175[i] : CE573FDC +index = [0] +...checksum after hashing g_175[i] : E70C49BF +index = [1] +...checksum after hashing g_175[i] : 81A48C22 +index = [2] +...checksum after hashing g_175[i] : 9F5F861D +index = [3] +...checksum after hashing g_175[i] : 337D7B48 +index = [4] +...checksum after hashing g_175[i] : EDA58D9 +index = [5] +...checksum after hashing g_175[i] : 8CB9D5FF +index = [6] +...checksum after hashing g_175[i] : A9D1E2C7 +index = [7] +...checksum after hashing g_175[i] : 5FF06115 +index = [8] +...checksum after hashing g_274 : 3E45549D +...checksum after hashing g_276 : 4F06E659 +...checksum after hashing g_281 : D30A1ECE +...checksum after hashing g_371 : FCE7C4D2 +...checksum after hashing g_426 : 978FCA7E +...checksum after hashing g_476 : 301CDCD7 +...checksum after hashing g_525 : 6EE49DF5 +...checksum after hashing g_722 : A1B47FFA +...checksum after hashing g_768 : F36793E +...checksum after hashing g_817 : CB8FE8D0 +...checksum after hashing g_881 : A8F01F44 +...checksum after hashing g_1035 : 56455939 +...checksum after hashing g_1037 : C00C3289 +...checksum after hashing g_1061 : 1997FD8A +...checksum after hashing g_1164 : AB53BA99 +...checksum after hashing g_1259 : 8967D693 +...checksum after hashing g_1283 : 67D63ED3 +...checksum after hashing g_1295 : 15AC9030 +...checksum after hashing g_1307 : A1AB24E1 +...checksum after hashing g_1313 : DF8DF97B +before stmt(755): checksum = DF8DF97B +...checksum after hashing g_4 : FFFFFFFF +...checksum after hashing g_49[i][j] : 19710C7E +index = [0][0] +...checksum after hashing g_49[i][j] : 2F4A3143 +index = [0][1] +...checksum after hashing g_49[i][j] : CA85CE3F +index = [0][2] +...checksum after hashing g_49[i][j] : F1C3EBE2 +index = [0][3] +...checksum after hashing g_49[i][j] : 3466DC68 +index = [0][4] +...checksum after hashing g_49[i][j] : 97EDD4D3 +index = [0][5] +...checksum after hashing g_49[i][j] : FC102C40 +index = [0][6] +...checksum after hashing g_49[i][j] : AB75B420 +index = [0][7] +...checksum after hashing g_49[i][j] : B6E322BC +index = [0][8] +...checksum after hashing g_74 : C4C32AC5 +...checksum after hashing g_102 : 916FE75F +...checksum after hashing g_137 : 7BEAD277 +...checksum after hashing g_152 : 3AE715B5 +...checksum after hashing g_175[i] : CE573FDC +index = [0] +...checksum after hashing g_175[i] : E70C49BF +index = [1] +...checksum after hashing g_175[i] : 81A48C22 +index = [2] +...checksum after hashing g_175[i] : 9F5F861D +index = [3] +...checksum after hashing g_175[i] : 337D7B48 +index = [4] +...checksum after hashing g_175[i] : EDA58D9 +index = [5] +...checksum after hashing g_175[i] : 8CB9D5FF +index = [6] +...checksum after hashing g_175[i] : A9D1E2C7 +index = [7] +...checksum after hashing g_175[i] : 5FF06115 +index = [8] +...checksum after hashing g_274 : 3E45549D +...checksum after hashing g_276 : 4F06E659 +...checksum after hashing g_281 : D30A1ECE +...checksum after hashing g_371 : FCE7C4D2 +...checksum after hashing g_426 : 978FCA7E +...checksum after hashing g_476 : 301CDCD7 +...checksum after hashing g_525 : 6EE49DF5 +...checksum after hashing g_722 : A1B47FFA +...checksum after hashing g_768 : F36793E +...checksum after hashing g_817 : CB8FE8D0 +...checksum after hashing g_881 : A8F01F44 +...checksum after hashing g_1035 : 56455939 +...checksum after hashing g_1037 : C00C3289 +...checksum after hashing g_1061 : 1997FD8A +...checksum after hashing g_1164 : AB53BA99 +...checksum after hashing g_1259 : 8967D693 +...checksum after hashing g_1283 : 67D63ED3 +...checksum after hashing g_1295 : 15AC9030 +...checksum after hashing g_1307 : A1AB24E1 +...checksum after hashing g_1313 : DF8DF97B +checksum = df8df97b diff --git a/src/tests/csmith/rand108.c b/src/tests/csmith/rand108.c new file mode 100644 index 0000000..ff4a868 --- /dev/null +++ b/src/tests/csmith/rand108.c @@ -0,0 +1,1401 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static int g_2[5][3] = {{0xF833FCB5L, 0xA0E60F95L, 0L}, {0xF833FCB5L, 0xA0E60F95L, 0L}, {0xF833FCB5L, 0xA0E60F95L, 0L}, {0xF833FCB5L, 0xA0E60F95L, 0L}, {0xF833FCB5L, 0xA0E60F95L, 0L}}; +static unsigned g_7 = 0xC90D2972L; +static unsigned g_10[10] = {0x864896E6L, 0x864896E6L, 0x864896E6L, 0x864896E6L, 0x864896E6L, 0x864896E6L, 0x864896E6L, 0x864896E6L, 0x864896E6L, 0x864896E6L}; +static int *g_59 = &g_2[0][1]; +static int **g_58[9][2] = {{&g_59, &g_59}, {&g_59, &g_59}, {&g_59, &g_59}, {&g_59, &g_59}, {&g_59, &g_59}, {&g_59, &g_59}, {&g_59, &g_59}, {&g_59, &g_59}, {&g_59, &g_59}}; +static int g_62 = 0xDE2E510BL; +static int g_66 = 0x0438315EL; +static int g_133 = 0x9C3AD06FL; +static short g_220 = 0L; +static int g_409 = (-6L); +static int **g_415 = &g_59; +static int ***g_414 = &g_415; +static unsigned short g_437[2][5] = {{65530UL, 1UL, 65530UL, 1UL, 65530UL}, {65530UL, 1UL, 65530UL, 1UL, 65530UL}}; +static unsigned g_455 = 1UL; +static unsigned char g_606 = 255UL; +static unsigned char g_624 = 6UL; +static short g_678 = 0L; +static int *g_719 = (void*)0; +static unsigned g_939 = 4294967295UL; +static int g_1014[3] = {8L, 8L, 8L}; +static int *g_1015[5][5] = {{&g_66, &g_1014[1], (void*)0, &g_1014[1], &g_66}, {&g_66, &g_1014[1], (void*)0, &g_1014[1], &g_66}, {&g_66, &g_1014[1], (void*)0, &g_1014[1], &g_66}, {&g_66, &g_1014[1], (void*)0, &g_1014[1], &g_66}, {&g_66, &g_1014[1], (void*)0, &g_1014[1], &g_66}}; +static int g_1046 = 0xE36C15B1L; +static int g_1061 = 0x4DB2AA9AL; +static int *g_1084 = (void*)0; +static signed char g_1156 = (-5L); +static int *g_1158[9][3] = {{&g_2[0][1], (void*)0, &g_62}, {&g_2[0][1], (void*)0, &g_62}, {&g_2[0][1], (void*)0, &g_62}, {&g_2[0][1], (void*)0, &g_62}, {&g_2[0][1], (void*)0, &g_62}, {&g_2[0][1], (void*)0, &g_62}, {&g_2[0][1], (void*)0, &g_62}, {&g_2[0][1], (void*)0, &g_62}, {&g_2[0][1], (void*)0, &g_62}}; +static short func_1(void); +static unsigned func_11(int * p_12, int p_13, int * p_14); +static int * func_15(int * p_16, unsigned short p_17, int * p_18, unsigned p_19, short p_20); +static int * func_21(int * p_22, int * p_23, unsigned p_24); +static int func_30(int * p_31, unsigned p_32, unsigned char p_33, int * p_34); +static int * func_35(int * p_36, int p_37, unsigned short p_38, int * p_39); +static int * func_40(unsigned p_41); +static int ** func_44(int p_45, int ** p_46, short p_47, int p_48, int * p_49); +static unsigned char func_53(unsigned p_54, int * p_55, int ** p_56); +static signed char func_76(int p_77, int * p_78, short p_79, short p_80); +static short func_1(void) +{ + int l_5 = 0xF6B8F3D4L; + int l_1056 = 0x4EE314B4L; + int l_1057 = 8L; + int l_1059 = 0x24B62344L; + int l_1060 = (-1L); + int l_1062 = 0x9C00CE3CL; + int *l_1077 = &g_66; + int *l_1078 = &g_2[0][0]; + int l_1130 = 1L; + int l_1131 = (-1L); + int l_1136 = 0xC412B939L; + int l_1137 = (-1L); + int l_1139 = 1L; + int l_1141 = (-1L); + int l_1142 = 0x0E75C8BEL; + int l_1143 = 0xF40BE531L; + int l_1144 = 0xD5BC1AA1L; + int l_1145 = (-1L); + unsigned l_1147 = 0x09B2B6A0L; + short l_1150 = 0xEFB7L; + step_hash(573); + for (g_2[0][1] = 17; (g_2[0][1] != 13); --g_2[0][1]) + { + int *l_6 = &l_5; + int l_1058 = 3L; + step_hash(4); + g_7++; + step_hash(567); + if (g_2[4][1]) + { + signed char l_1042 = (-5L); + step_hash(6); + g_10[5] = (&g_2[0][0] != &g_2[0][1]); + step_hash(562); + for (l_5 = 0; (l_5 <= 9); l_5 += 1) + { + int *l_1045 = &g_1046; + int i; + step_hash(10); + if (g_10[l_5]) + break; + step_hash(560); + (*l_1045) &= (func_11(func_15(func_21(&g_2[1][0], &g_2[0][1], g_10[l_5]), g_10[l_5], &g_2[0][1], g_1014[2], (*l_6)), l_1042, l_6) <= g_10[5]); + step_hash(561); + return l_5; + } + step_hash(563); + (*l_6) = (0x8548L | ((unsigned short)(-(unsigned)g_455) << (unsigned short)(*l_6))); + step_hash(564); + return l_5; + } + else + { + step_hash(566); + (*g_415) = l_6; + } + step_hash(572); + for (g_7 = 0; (g_7 > 28); ++g_7) + { + int *l_1052 = &g_1014[0]; + int *l_1053 = &g_62; + int *l_1054 = &l_5; + int *l_1055[9][3] = {{&g_62, &g_133, &g_133}, {&g_62, &g_133, &g_133}, {&g_62, &g_133, &g_133}, {&g_62, &g_133, &g_133}, {&g_62, &g_133, &g_133}, {&g_62, &g_133, &g_133}, {&g_62, &g_133, &g_133}, {&g_62, &g_133, &g_133}, {&g_62, &g_133, &g_133}}; + unsigned short l_1063[1]; + int i, j; + for (i = 0; i < 1; i++) + l_1063[i] = 0x4F59L; + step_hash(571); + l_1063[0]--; + } + } + step_hash(574); + (*g_415) = &l_1059; + step_hash(617); + if ((***g_414)) + { + unsigned char l_1070[10]; + int *l_1071 = (void*)0; + int l_1122 = 0x99F0346CL; + int l_1124 = (-3L); + int l_1126 = (-6L); + int l_1127 = 0x2036AFB2L; + int l_1128 = 0xE57F90F6L; + int l_1129 = 0xD6EE825FL; + int l_1132 = (-1L); + int l_1138 = 1L; + int l_1146 = 0xD0B4FD73L; + int **l_1170 = &g_1015[1][3]; + unsigned l_1175[4][5] = {{0x58B3F19DL, 0x1444FBF9L, 0x58B3F19DL, 0x1444FBF9L, 0x58B3F19DL}, {0x58B3F19DL, 0x1444FBF9L, 0x58B3F19DL, 0x1444FBF9L, 0x58B3F19DL}, {0x58B3F19DL, 0x1444FBF9L, 0x58B3F19DL, 0x1444FBF9L, 0x58B3F19DL}, {0x58B3F19DL, 0x1444FBF9L, 0x58B3F19DL, 0x1444FBF9L, 0x58B3F19DL}}; + int ***l_1178 = &g_415; + int *l_1205 = &l_1138; + unsigned short l_1208 = 0xD490L; + int i, j; + for (i = 0; i < 10; i++) + l_1070[i] = 249UL; + step_hash(598); + if ((+((unsigned char)(g_220 & ((((signed char)(((l_1070[4] ^ ((l_1070[4] > (func_11(l_1071, func_76((((signed char)((((short)(((0xE3L == func_11(func_35(l_1071, l_1070[4], ((-(unsigned)func_11(l_1071, (**g_415), l_1077)) && (*l_1077)), l_1078), (***g_414), &l_1059)) > (*l_1078)) == (*l_1077)) * (short)0UL) <= (*l_1078)) == 0xCCL) << (signed char)4) < (**g_415)), (**g_414), g_133, g_10[2]), (*g_415)) <= 0x11L)) >= 9L)) & 4294967295UL) > (-5L)) * (signed char)l_1070[4]) >= g_10[0]) || 0x9E8FL)) * (unsigned char)(*l_1078)))) + { + signed char l_1083 = 1L; + step_hash(577); + (*g_59) ^= (((unsigned char)((unsigned short)l_1083 * (unsigned short)(g_624 == (!l_1083))) * (unsigned char)(g_1084 != l_1071)) ^ 1L); + } + else + { + short l_1090 = (-2L); + int l_1121 = 0L; + int l_1123 = 6L; + int l_1125 = 0x42A04EB4L; + int l_1133 = 2L; + int l_1134[1][8] = {{4L, 4L, 0x9F58F75FL, 4L, 4L, 0x9F58F75FL, 4L, 4L}}; + int l_1135 = 1L; + int i, j; + step_hash(597); + for (l_1060 = 0; (l_1060 >= (-8)); l_1060 -= 2) + { + unsigned l_1087[2][6] = {{0xE6E23C7CL, 0x200C2B67L, 0xABA06BFBL, 0x200C2B67L, 0xE6E23C7CL, 4294967286UL}, {0xE6E23C7CL, 0x200C2B67L, 0xABA06BFBL, 0x200C2B67L, 0xE6E23C7CL, 4294967286UL}}; + int l_1113[1]; + int i, j; + for (i = 0; i < 1; i++) + l_1113[i] = 0L; + step_hash(596); + if (l_1087[0][5]) + { + int l_1095 = 0xA9059866L; + step_hash(587); + for (g_1061 = 2; (g_1061 >= 0); g_1061 -= 1) + { + int i, j; + step_hash(586); + if (g_2[(g_1061 + 1)][g_1061]) + break; + } + step_hash(588); + (*g_59) ^= ((unsigned short)((((((l_1090 != g_1014[2]) && g_1046) <= ((unsigned short)g_220 << (unsigned short)((unsigned char)251UL * (unsigned char)(l_1095 && 0x72L)))) ^ ((void*)0 != &g_415)) ^ 0x52D16866L) || l_1087[1][2]) << (unsigned short)g_1061); + step_hash(593); + for (g_455 = 1; (g_455 <= 4); g_455 += 1) + { + step_hash(592); + (*l_1077) |= l_1095; + } + } + else + { + int *l_1096 = &l_1057; + int *l_1097 = &l_1062; + int *l_1098 = &g_133; + int *l_1099 = &l_1057; + int *l_1100 = (void*)0; + int *l_1101 = (void*)0; + int *l_1102 = &g_1014[2]; + int *l_1103 = (void*)0; + int *l_1104 = &g_2[0][1]; + int *l_1105 = &g_2[0][1]; + int *l_1106 = &g_1014[2]; + int *l_1107 = &g_66; + int *l_1108 = &g_1014[0]; + int *l_1109 = &g_62; + int *l_1110 = &l_1056; + int *l_1111 = &g_1046; + int *l_1112 = &g_2[0][1]; + int *l_1114 = &g_2[0][0]; + int *l_1115 = &l_1056; + int *l_1116 = &g_66; + int *l_1117 = &l_5; + int *l_1118 = &g_1014[2]; + int *l_1119[1]; + int l_1120 = (-1L); + short l_1140 = (-1L); + int i; + for (i = 0; i < 1; i++) + l_1119[i] = &l_1113[0]; + step_hash(595); + --l_1147; + } + } + } + step_hash(614); + if ((*g_59)) + { + unsigned l_1153 = 0xA3B01D8BL; + int *l_1157[5] = {&l_1138, &l_1127, &l_1138, &l_1127, &l_1138}; + int i; + step_hash(600); + (*g_415) = g_1158[5][0]; + step_hash(608); + for (l_1128 = 16; (l_1128 >= (-6)); --l_1128) + { + int *l_1163 = &g_409; + step_hash(604); + (*l_1077) |= (((((signed char)g_2[0][1] % (signed char)g_1014[1]) & 0xBCEF8833L) != 0x7FL) | (*l_1163)); + step_hash(605); + (*l_1077) |= (!(((int)(&g_58[3][0] != l_1178) + (int)((((unsigned)((int)((unsigned char)(g_2[0][1] || g_2[0][1]) % (unsigned char)func_11(l_1157[4], (*l_1163), (*g_415))) % (int)(*l_1163)) % (unsigned)0x049A58F2L) >= 0x5AB6698FL) ^ 255UL)) <= (*l_1078))); + step_hash(606); + if ((*l_1163)) + continue; + step_hash(607); + (*l_1078) |= (*l_1077); + } + step_hash(609); + (*l_1077) = ((int)(*l_1078) + (int)((unsigned char)((int)((unsigned short)g_2[0][1] << (unsigned short)(*l_1078)) - (int)0xA9B4475AL) + (unsigned char)248UL)); + } + else + { + int l_1206 = 0x60388E62L; + int l_1207 = 0L; + step_hash(611); + l_1077 = l_1205; + step_hash(612); + (**l_1178) = (**g_414); + step_hash(613); + l_1208++; + } + } + else + { + step_hash(616); + (**g_414) = &l_1139; + } + step_hash(622); + for (l_1056 = 0; (l_1056 > (-16)); --l_1056) + { + signed char l_1213 = 0x79L; + int ***l_1214 = (void*)0; + int l_1215 = 0x73A10687L; + short l_1216[5]; + signed char l_1217 = 0x26L; + int i; + for (i = 0; i < 5; i++) + l_1216[i] = (-5L); + step_hash(621); + l_1217 |= ((g_437[1][3] || ((+l_1213) || (4UL || ((*g_414) == (void*)0)))) != (*l_1078)); + } + step_hash(623); + return g_62; +} +static unsigned func_11(int * p_12, int p_13, int * p_14) +{ + signed char l_1043 = 0L; + int l_1044 = 0x743F6940L; + step_hash(558); + l_1044 |= l_1043; + step_hash(559); + return l_1044; +} +static int * func_15(int * p_16, unsigned short p_17, int * p_18, unsigned p_19, short p_20) +{ + int *l_1020 = (void*)0; + int *l_1021 = &g_62; + int ***l_1041[8] = {&g_415, &g_415, &g_58[4][0], &g_415, &g_415, &g_58[4][0], &g_415, &g_415}; + int i; + step_hash(549); + (*l_1021) &= (*p_18); + step_hash(554); + if ((((*l_1021) & (*l_1021)) >= (((*l_1021) < p_20) && (((int)(*p_18) / (int)((signed char)(((unsigned short)((int)(*l_1021) + (int)(*p_18)) - (unsigned short)g_62) & ((short)0x01D6L * (short)p_17)) / (signed char)0xB7L)) | 0x79L)))) + { + signed char l_1032[9] = {0x62L, 0xB2L, 0x62L, 0xB2L, 0x62L, 0xB2L, 0x62L, 0xB2L, 0x62L}; + int *l_1033 = &g_1014[1]; + int i; + step_hash(551); + (*l_1021) = (l_1032[5] > (*l_1033)); + } + else + { + int *l_1034 = &g_66; + step_hash(553); + (*l_1021) ^= ((p_17 ^ ((int)(*p_18) % (int)(((unsigned char)(((*p_18) > g_1014[0]) | (*l_1034)) * (unsigned char)g_10[5]) & p_17))) > (*l_1034)); + } + step_hash(555); + (*l_1021) = ((signed char)(0UL ^ ((void*)0 == l_1041[6])) * (signed char)(l_1041[6] == &g_58[4][0])); + step_hash(556); + return p_16; +} +static int * func_21(int * p_22, int * p_23, unsigned p_24) +{ + int *l_25 = &g_2[0][1]; + int ***l_416 = (void*)0; + int l_466 = 0xB2269265L; + int l_542 = 8L; + int l_543 = 0x1ACBACA6L; + int l_548 = 0x322B0EFEL; + int l_552 = 0xB76F88AEL; + int l_553 = 0L; + int l_555 = 0xC4A2FE5BL; + int **l_561[2]; + unsigned char l_568 = 0xF2L; + int *l_577[9]; + unsigned short l_588 = 0x66C4L; + int l_608 = 0x55055953L; + unsigned char l_623[5] = {0xC7L, 0x07L, 0xC7L, 0x07L, 0xC7L}; + short l_672 = 0x83B2L; + unsigned l_702 = 0xC5844E50L; + int *l_769 = (void*)0; + int **l_919 = &l_577[4]; + int *l_1011 = &l_543; + unsigned l_1019 = 0UL; + int i; + for (i = 0; i < 2; i++) + l_561[i] = (void*)0; + for (i = 0; i < 9; i++) + l_577[i] = (void*)0; + step_hash(543); + if ((((p_24 == (p_22 == l_25)) >= (*p_23)) > (((unsigned char)((int)func_30(func_35(func_40((*l_25)), (*g_59), ((((unsigned char)(g_414 != l_416) * (unsigned char)g_10[5]) == p_24) && (*l_25)), (**g_414)), p_24, (*l_25), (**g_414)) / (int)p_24) << (unsigned char)p_24) == g_10[5]))) + { + short l_454 = (-1L); + int l_467 = (-3L); + int ***l_486 = &g_58[4][1]; + int l_544 = 2L; + int l_545 = 3L; + int l_546[6] = {(-1L), (-1L), (-1L), (-1L), (-1L), (-1L)}; + unsigned l_556 = 1UL; + unsigned short l_569 = 0x0747L; + unsigned char l_570 = 0x66L; + unsigned char l_692 = 1UL; + unsigned char l_698 = 255UL; + unsigned l_703 = 0x5C58AA86L; + signed char l_762 = (-10L); + int i; + step_hash(454); + if (((unsigned)4294967288UL + (unsigned)0UL)) + { + int *l_449 = &g_409; + int l_465 = (-1L); + int l_469 = 1L; + unsigned l_497 = 0xF7889023L; + int l_554[8]; + int ***l_564 = &l_561[1]; + int *l_594[7][5] = {{&g_133, &g_133, &g_2[0][1], &g_133, &g_133}, {&g_133, &g_133, &g_2[0][1], &g_133, &g_133}, {&g_133, &g_133, &g_2[0][1], &g_133, &g_133}, {&g_133, &g_133, &g_2[0][1], &g_133, &g_133}, {&g_133, &g_133, &g_2[0][1], &g_133, &g_133}, {&g_133, &g_133, &g_2[0][1], &g_133, &g_133}, {&g_133, &g_133, &g_2[0][1], &g_133, &g_133}}; + unsigned l_627 = 0UL; + unsigned char l_632 = 249UL; + unsigned short l_699 = 65531UL; + int i, j; + for (i = 0; i < 8; i++) + l_554[i] = 0L; + step_hash(393); + if ((*p_22)) + { + unsigned char l_452 = 0x16L; + int *l_453 = &g_2[4][1]; + int l_468 = 0x4276C7E5L; + step_hash(288); + (*g_415) = p_23; + step_hash(302); + for (g_7 = (-21); (g_7 != 52); g_7 += 8) + { + int l_456 = 0L; + step_hash(300); + if (func_76(g_437[0][3], func_35(func_35(l_449, ((unsigned short)p_24 >> (unsigned short)14), ((*l_449) ^ (*l_25)), p_22), (p_23 == p_23), l_452, l_453), l_454, g_455)) + { + int l_457 = (-4L); + int *l_458 = &g_62; + int *l_459 = &l_456; + int *l_460 = &g_62; + int *l_461 = (void*)0; + int *l_462 = &l_456; + int *l_463 = (void*)0; + int *l_464[4][2] = {{&g_133, &g_2[0][1]}, {&g_133, &g_2[0][1]}, {&g_133, &g_2[0][1]}, {&g_133, &g_2[0][1]}}; + unsigned char l_470 = 0x72L; + int *l_473 = &g_2[0][1]; + int i, j; + step_hash(293); + (*g_415) = (*g_415); + step_hash(294); + l_470++; + step_hash(295); + l_456 = (g_7 != ((&g_58[4][0] != &g_415) <= 0UL)); + step_hash(296); + return l_473; + } + else + { + int *l_474 = (void*)0; + step_hash(298); + (*g_415) = l_474; + step_hash(299); + (*l_449) &= l_456; + } + step_hash(301); + return (*g_415); + } + step_hash(303); + l_467 |= ((*l_453) && ((void*)0 == &p_23)); + step_hash(316); + for (g_455 = 0; (g_455 < 58); g_455 += 2) + { + unsigned l_485 = 0xBD2C4DF9L; + step_hash(315); + if (((signed char)(0x819FACD3L == ((unsigned)l_467 - (unsigned)(g_2[0][1] || 65531UL))) << (signed char)1)) + { + step_hash(308); + (*l_449) &= (p_24 >= ((unsigned)l_485 - (unsigned)(l_486 == (void*)0))); + step_hash(309); + if ((*p_23)) + continue; + step_hash(310); + return (*g_415); + } + else + { + unsigned l_487 = 4294967286UL; + step_hash(312); + (*l_449) = (p_24 | (((l_487 && 4UL) != 0L) <= ((short)0L << (short)11))); + step_hash(313); + (*l_449) = ((unsigned char)p_24 + (unsigned char)func_30(p_23, g_437[1][2], g_10[5], p_23)); + step_hash(314); + return p_22; + } + } + } + else + { + int *l_492[10][6] = {{&l_466, &g_409, &g_62, &g_409, &l_466, &l_469}, {&l_466, &g_409, &g_62, &g_409, &l_466, &l_469}, {&l_466, &g_409, &g_62, &g_409, &l_466, &l_469}, {&l_466, &g_409, &g_62, &g_409, &l_466, &l_469}, {&l_466, &g_409, &g_62, &g_409, &l_466, &l_469}, {&l_466, &g_409, &g_62, &g_409, &l_466, &l_469}, {&l_466, &g_409, &g_62, &g_409, &l_466, &l_469}, {&l_466, &g_409, &g_62, &g_409, &l_466, &l_469}, {&l_466, &g_409, &g_62, &g_409, &l_466, &l_469}, {&l_466, &g_409, &g_62, &g_409, &l_466, &l_469}}; + int **l_533[6] = {(void*)0, (void*)0, &g_59, (void*)0, (void*)0, &g_59}; + short l_549 = (-1L); + int l_613 = (-6L); + unsigned char l_675 = 0xAEL; + int i, j; + step_hash(342); + if ((***g_414)) + { + step_hash(319); + (*g_415) = l_492[0][3]; + step_hash(320); + (*g_415) = p_23; + } + else + { + unsigned l_523 = 4294967295UL; + int l_539 = 0L; + int l_541 = 0x179BC41CL; + int l_551 = 0xE7571C81L; + step_hash(322); + (*l_449) = ((unsigned char)p_24 >> (unsigned char)((signed char)l_497 * (signed char)g_66)); + step_hash(328); + for (l_465 = 12; (l_465 <= 2); l_465 -= 7) + { + unsigned l_510 = 0UL; + int *l_526 = &g_62; + step_hash(326); + l_467 ^= ((signed char)((short)(((unsigned)(*l_449) + (unsigned)((unsigned)g_133 % (unsigned)((signed char)(g_2[0][1] ^ (((((**g_414) == p_23) > l_510) == p_24) | ((unsigned short)((short)((signed char)((signed char)((signed char)p_24 << (signed char)((unsigned short)g_220 + (unsigned short)p_24)) * (signed char)p_24) / (signed char)l_523) / (short)(*l_25)) * (unsigned short)p_24))) >> (signed char)g_10[5]))) <= g_133) << (short)g_2[4][1]) >> (signed char)2); + step_hash(327); + (*l_526) = (0UL == ((signed char)func_76(g_455, l_526, p_24, (l_526 == (void*)0)) % (signed char)p_24)); + } + step_hash(334); + if ((&l_469 != p_23)) + { + step_hash(330); + (*g_415) = func_40(g_10[3]); + step_hash(331); + (***g_414) = (*l_25); + } + else + { + step_hash(333); + return (*g_415); + } + step_hash(341); + if (((unsigned short)((unsigned short)p_24 / (unsigned short)p_24) * (unsigned short)g_10[5])) + { + step_hash(336); + p_22 = func_35((**g_414), (***g_414), (((short)g_2[4][1] << (short)(&p_23 == &l_449)) && ((void*)0 == (*g_414))), p_23); + step_hash(337); + (***g_414) ^= (((*g_415) != (void*)0) | ((void*)0 == &p_22)); + } + else + { + signed char l_538 = 0x77L; + int l_540 = 0L; + int l_547 = 0xDBD5D52FL; + int l_550[9][7]; + int i, j; + for (i = 0; i < 9; i++) + { + for (j = 0; j < 7; j++) + l_550[i][j] = 0xBE8D7E17L; + } + step_hash(339); + ++l_556; + step_hash(340); + (*l_486) = l_561[0]; + } + } + step_hash(350); + for (l_549 = 0; (l_549 > 1); l_549 += 6) + { + unsigned l_565 = 0xF7B238CEL; + step_hash(346); + l_570 |= func_53((l_564 != (void*)0), p_22, func_44(l_565, func_44(((void*)0 == (*g_415)), (*g_414), l_568, l_569, (*g_415)), p_24, (*p_22), p_23)); + step_hash(347); + l_469 ^= (((*p_22) ^ ((((func_76(((unsigned char)0x89L << (unsigned char)((unsigned short)(0x362F67A0L ^ (g_437[0][4] == g_409)) - (unsigned short)l_565)), p_22, l_565, p_24) >= g_2[2][1]) && 0x69351AACL) <= (-1L)) == (-4L))) < p_24); + step_hash(348); + (*g_59) = ((((unsigned short)g_437[1][4] << (unsigned short)15) == g_220) > p_24); + step_hash(349); + (**g_414) = func_40(((void*)0 != &p_23)); + } + step_hash(392); + if ((*p_23)) + { + unsigned char l_586[4][1]; + int *l_605 = &l_467; + int i, j; + for (i = 0; i < 4; i++) + { + for (j = 0; j < 1; j++) + l_586[i][j] = 255UL; + } + step_hash(352); + (*l_449) = ((unsigned short)((unsigned char)253UL * (unsigned char)(g_66 < ((short)l_586[0][0] >> (short)p_24))) << (unsigned short)14); + step_hash(360); + if ((1L || g_133)) + { + step_hash(354); + return p_22; + } + else + { + unsigned short l_587 = 1UL; + int *l_591 = &l_467; + step_hash(356); + l_587 &= (*l_449); + step_hash(357); + (*l_449) &= 0x3EC302EDL; + step_hash(358); + l_588--; + step_hash(359); + (*g_415) = l_591; + } + step_hash(361); + g_606 &= (((unsigned char)func_76(((func_76(p_24, l_594[5][3], ((short)(((g_2[1][1] | func_53(((unsigned char)((int)(*p_23) % (int)(*l_449)) * (unsigned char)((short)g_437[1][2] << (short)(((short)p_24 + (short)p_24) < (+(0xEAL && 0xE8L))))), l_605, (*g_414))) < p_24) >= g_409) - (short)g_409), p_24) | p_24) != (*l_449)), p_23, p_24, g_409) + (unsigned char)0xF4L) > (*l_449)); + } + else + { + int *l_607 = &l_465; + int l_625[7][5] = {{0x6A0D394DL, (-10L), (-1L), 9L, 6L}, {0x6A0D394DL, (-10L), (-1L), 9L, 6L}, {0x6A0D394DL, (-10L), (-1L), 9L, 6L}, {0x6A0D394DL, (-10L), (-1L), 9L, 6L}, {0x6A0D394DL, (-10L), (-1L), 9L, 6L}, {0x6A0D394DL, (-10L), (-1L), 9L, 6L}, {0x6A0D394DL, (-10L), (-1L), 9L, 6L}}; + signed char l_659 = 0x5FL; + int i, j; + step_hash(371); + if ((func_76(g_409, l_607, p_24, g_10[2]) > (g_10[5] & ((void*)0 == (*g_414))))) + { + int l_622 = 4L; + int l_626 = 0x8546984AL; + step_hash(364); + l_608 ^= (*p_23); + step_hash(365); + (**g_414) = p_23; + step_hash(366); + g_624 &= func_30(p_22, (&p_23 != &p_23), (p_24 & ((signed char)func_30(func_35(func_35(p_22, (*p_23), ((unsigned short)l_613 >> (unsigned short)3), func_40((g_2[1][0] == ((short)((signed char)((unsigned short)func_76(((short)g_7 << (short)p_24), l_607, g_62, p_24) * (unsigned short)g_220) + (signed char)(*l_607)) * (short)l_622)))), (*p_22), p_24, p_23), l_623[4], p_24, (**g_414)) / (signed char)g_455)), &l_465); + step_hash(367); + l_627++; + } + else + { + step_hash(369); + (*l_607) &= (***g_414); + step_hash(370); + p_22 = (*g_415); + } + step_hash(379); + if (((unsigned short)((((short)g_437[1][2] * (short)0x257DL) | ((0x05L ^ (((signed char)(((+(((unsigned short)(*l_449) % (unsigned short)func_76(((*p_23) != ((((((unsigned char)((short)(!(-1L)) << (short)g_2[4][2]) >> (unsigned char)p_24) && ((*g_415) == p_23)) < 0x51161027L) ^ 0x1C37L) < p_24)), &l_625[3][1], l_659, p_24)) < g_437[0][4])) >= 0xAFL) | p_24) * (signed char)0x09L) <= 0x85L)) && (*l_449))) >= 1L) >> (unsigned short)(*l_607))) + { + unsigned l_660 = 0UL; + int *l_667 = &g_66; + step_hash(373); + --l_660; + step_hash(374); + l_675 = ((unsigned char)((unsigned char)(func_30(l_667, (((*p_22) | (g_133 ^ (*l_25))) & ((((int)(p_24 & ((((unsigned char)0UL << (unsigned char)p_24) < ((l_672 != ((((short)g_624 + (short)p_24) ^ (*p_23)) != p_24)) <= g_66)) ^ 0x2BL)) - (int)p_24) | p_24) | p_24)), (*l_449), p_23) >= g_606) / (unsigned char)p_24) << (unsigned char)1); + step_hash(375); + (*l_607) = ((int)(*l_25) - (int)(*p_22)); + step_hash(376); + g_678 ^= (~(***g_414)); + } + else + { + step_hash(378); + p_23 = p_22; + } + step_hash(384); + for (l_613 = 0; (l_613 <= 9); l_613 += 1) + { + step_hash(383); + l_607 = p_22; + } + step_hash(391); + for (l_548 = 0; (l_548 <= 10); l_548++) + { + unsigned l_681 = 0xD65F4859L; + int *l_693 = &l_625[4][1]; + step_hash(388); + ++l_681; + step_hash(389); + l_546[5] ^= ((g_606 != p_24) > (!((unsigned char)(65535UL == (((unsigned)((((unsigned short)g_7 >> (unsigned short)2) >= (((unsigned short)(l_692 >= ((((*l_607) < func_53((+(func_53(g_409, func_35(l_693, func_53(((unsigned short)((unsigned short)g_66 + (unsigned short)(-1L)) / (unsigned short)p_24), l_693, (*g_414)), p_24, (*g_415)), (*g_414)) >= (*p_23))), p_23, &l_492[7][4])) || g_7) || (*l_607))) << (unsigned short)p_24) != (*l_693))) & l_698) % (unsigned)(*p_23)) || l_699)) << (unsigned char)p_24))); + step_hash(390); + return (*g_415); + } + } + } + step_hash(394); + l_546[3] &= ((int)(*l_25) % (int)l_702); + step_hash(395); + l_703--; + } + else + { + unsigned l_706 = 0x0ED7A5CCL; + int l_720 = 0x50B138A7L; + unsigned l_742 = 0xBF55A4D5L; + unsigned l_799[3][7] = {{3UL, 3UL, 0xBF759F17L, 3UL, 3UL, 0xBF759F17L, 3UL}, {3UL, 3UL, 0xBF759F17L, 3UL, 3UL, 0xBF759F17L, 3UL}, {3UL, 3UL, 0xBF759F17L, 3UL, 3UL, 0xBF759F17L, 3UL}}; + int i, j; + step_hash(397); + l_706 |= (!(*p_22)); + step_hash(452); + if (((short)(((&l_544 == &l_544) == (65535UL <= ((unsigned short)(((unsigned short)func_53(l_706, p_23, func_44(g_606, &p_22, ((unsigned char)g_66 + (unsigned char)((short)(0xDD11L < l_706) % (short)0x1E4CL)), (**g_415), g_719)) * (unsigned short)g_2[0][1]) & g_10[8]) / (unsigned short)l_706))) <= l_720) >> (short)12)) + { + unsigned char l_726[3]; + int l_743 = 1L; + int i; + for (i = 0; i < 3; i++) + l_726[i] = 0UL; + step_hash(418); + for (l_608 = 0; (l_608 > 25); l_608 += 4) + { + unsigned short l_744 = 0xDCD4L; + step_hash(410); + if (((int)(*p_22) * (int)(g_2[0][1] <= g_62))) + { + signed char l_725 = 0xD0L; + step_hash(403); + l_726[2] ^= (p_24 < (1UL && l_725)); + step_hash(404); + (*p_22) = l_726[2]; + step_hash(405); + (*p_22) &= ((void*)0 == &l_561[0]); + step_hash(406); + if ((*p_22)) + continue; + } + else + { + int l_727 = 0x5260395EL; + step_hash(408); + l_727 ^= (*p_22); + step_hash(409); + return (*g_415); + } + step_hash(415); + for (l_553 = 0; (l_553 <= 1); l_553 += 1) + { + step_hash(414); + return (*g_415); + } + step_hash(416); + (*p_22) = func_30(func_40(g_66), ((unsigned short)p_24 * (unsigned short)g_2[4][1]), (((unsigned char)(0L >= ((((unsigned char)p_24 << (unsigned char)(((unsigned char)((unsigned short)((signed char)(p_24 != (((signed char)p_24 - (signed char)(&g_415 != l_486)) ^ p_24)) + (signed char)255UL) << (unsigned short)l_706) * (unsigned char)g_2[0][1]) == l_742)) & 0x5FL) < p_24)) * (unsigned char)254UL) ^ 0x335FBED0L), (*g_415)); + step_hash(417); + --l_744; + } + } + else + { + int l_758 = 0x9241D4D3L; + int l_777 = 1L; + step_hash(450); + if ((*p_23)) + { + int l_753 = 0x3C817D2BL; + int l_759 = 0x64B3FFBBL; + step_hash(425); + for (l_692 = 0; (l_692 <= 1); l_692 += 1) + { + step_hash(424); + (*p_22) = (*p_23); + } + step_hash(431); + for (g_606 = 0; (g_606 < 41); g_606 += 6) + { + step_hash(429); + (*p_22) = (*p_22); + step_hash(430); + l_759 &= (((*p_23) <= ((((signed char)((((signed char)(((0x0BF5FCB4L <= ((+((g_66 != l_720) || ((249UL >= l_753) > ((*p_23) && (0xE885339AL || ((unsigned char)((unsigned char)l_706 << (unsigned char)g_455) << (unsigned char)2)))))) <= p_24)) == p_24) < g_409) % (signed char)l_758) | 0x3FBC3809L) >= 3UL) * (signed char)0x11L) ^ 0L) ^ p_24)) <= p_24); + } + step_hash(440); + if (((signed char)(p_24 | (((l_762 != ((unsigned short)(1UL ^ ((&p_23 == (*g_414)) >= ((short)func_30(&l_758, ((g_606 | 0xFBL) | p_24), g_7, p_22) >> (short)0))) >> (unsigned short)14)) < l_720) ^ (*l_25))) << (signed char)0)) + { + unsigned char l_770 = 1UL; + step_hash(433); + p_23 = (*g_415); + step_hash(434); + l_770 |= (*p_22); + step_hash(435); + return p_22; + } + else + { + step_hash(437); + (*p_22) ^= (*g_59); + step_hash(438); + (*p_22) ^= ((void*)0 != &g_58[0][0]); + step_hash(439); + (*p_22) |= (!l_753); + } + } + else + { + unsigned l_780 = 4294967295UL; + int *l_792 = &g_2[0][1]; + step_hash(449); + if ((p_24 | (0L <= (*g_59)))) + { + int *l_776 = &l_548; + int l_778 = 0L; + int l_779 = (-1L); + step_hash(443); + (*l_776) |= (((short)((+p_24) & 0x24L) << (short)((short)((-1L) == l_742) * (short)(((p_24 & (((void*)0 != &g_58[7][1]) && ((l_776 != p_23) <= p_24))) || 0xAAF9L) && 0x951C1A1BL))) <= g_62); + step_hash(444); + --l_780; + } + else + { + unsigned l_791 = 4294967292UL; + step_hash(446); + (*p_22) = ((int)l_777 + (int)((p_22 != (void*)0) && 0xF8L)); + step_hash(447); + (*p_22) = func_53(((short)((signed char)5L * (signed char)l_706) % (short)((short)0xB236L - (short)l_791)), func_40((l_792 == p_22)), (*g_414)); + step_hash(448); + return l_792; + } + } + step_hash(451); + (*p_22) = ((p_24 <= (((0xBA3E00EAL < func_76(g_2[0][1], func_40((+(l_720 > l_777))), (((short)(p_24 == (((signed char)(((-5L) == p_24) > g_10[2]) + (signed char)g_66) == 0UL)) >> (short)15) > g_437[1][2]), p_24)) && l_799[0][1]) && p_24)) & l_777); + } + step_hash(453); + (*p_22) = l_454; + } + } + else + { + short l_800[3]; + int *l_827 = &g_409; + int l_830 = 0x12433E2EL; + int l_831 = 1L; + unsigned l_832 = 4294967291UL; + int *l_835 = &l_555; + int l_847 = (-3L); + int l_848 = 0xFB0B6906L; + int l_849 = 0x9BDC1C0FL; + int l_850 = 0x7CDD3E2FL; + int l_855 = 0x82E9A478L; + int l_857 = 0L; + int l_858[9][1] = {{0xD692359CL}, {0xD692359CL}, {0xD692359CL}, {0xD692359CL}, {0xD692359CL}, {0xD692359CL}, {0xD692359CL}, {0xD692359CL}, {0xD692359CL}}; + int *l_922 = &g_62; + int l_951 = 0L; + int *l_968[4]; + int *l_998 = &l_857; + int i, j; + for (i = 0; i < 3; i++) + l_800[i] = 0x112EL; + for (i = 0; i < 4; i++) + l_968[i] = &l_848; + step_hash(484); + if (l_800[0]) + { + short l_807 = (-1L); + short l_813 = 0x4A24L; + int l_828 = 2L; + step_hash(457); + (**g_414) = (void*)0; + step_hash(479); + for (l_568 = (-23); (l_568 != 23); l_568 += 9) + { + int *l_821 = &l_555; + step_hash(476); + for (g_624 = (-10); (g_624 <= 16); g_624++) + { + unsigned char l_814 = 0x8DL; + step_hash(469); + for (g_455 = (-16); (g_455 < 19); g_455 += 1) + { + step_hash(467); + (**g_414) = p_22; + step_hash(468); + l_807 = (*p_22); + } + step_hash(475); + for (l_553 = 6; (l_553 >= 0); l_553 -= 1) + { + int l_822 = 0xE9AB75EEL; + int i; + step_hash(473); + (*l_821) = (((-(short)((int)(((signed char)g_10[l_553] * (signed char)g_7) && p_24) / (int)(~l_813))) || (l_814 && (((unsigned char)((unsigned short)(g_455 >= ((signed char)((g_678 >= g_133) ^ l_822) % (signed char)g_678)) + (unsigned short)(*l_821)) + (unsigned char)g_220) | g_10[l_553]))) && g_606); + step_hash(474); + return p_22; + } + } + step_hash(477); + l_828 |= ((((unsigned short)g_10[5] << (unsigned short)l_807) != ((unsigned short)(l_827 != (void*)0) / (unsigned short)2UL)) | (g_220 | (*l_25))); + step_hash(478); + (*g_415) = (void*)0; + } + step_hash(480); + (*g_414) = &p_22; + } + else + { + int l_829[4][9] = {{0x33D292A3L, (-1L), 0x33D292A3L, (-1L), 0x33D292A3L, (-1L), 0x33D292A3L, (-1L), 0x33D292A3L}, {0x33D292A3L, (-1L), 0x33D292A3L, (-1L), 0x33D292A3L, (-1L), 0x33D292A3L, (-1L), 0x33D292A3L}, {0x33D292A3L, (-1L), 0x33D292A3L, (-1L), 0x33D292A3L, (-1L), 0x33D292A3L, (-1L), 0x33D292A3L}, {0x33D292A3L, (-1L), 0x33D292A3L, (-1L), 0x33D292A3L, (-1L), 0x33D292A3L, (-1L), 0x33D292A3L}}; + int *l_836 = &g_62; + int i, j; + step_hash(482); + --l_832; + step_hash(483); + l_836 = func_35(p_23, (p_24 > p_24), ((**g_415) != ((*p_22) <= (*l_827))), l_835); + } + step_hash(542); + for (l_702 = 14; (l_702 != 53); l_702 += 1) + { + int *l_839 = &g_2[0][1]; + int l_851 = (-2L); + int l_852 = 0L; + int l_853 = 0L; + int l_856[10] = {0x75AA659FL, 0x75AA659FL, (-1L), 0x75AA659FL, 0x75AA659FL, (-1L), 0x75AA659FL, 0x75AA659FL, (-1L), 0x75AA659FL}; + unsigned char l_859[5][5] = {{247UL, 0xCDL, 0x97L, 0x97L, 0xCDL}, {247UL, 0xCDL, 0x97L, 0x97L, 0xCDL}, {247UL, 0xCDL, 0x97L, 0x97L, 0xCDL}, {247UL, 0xCDL, 0x97L, 0x97L, 0xCDL}, {247UL, 0xCDL, 0x97L, 0x97L, 0xCDL}}; + unsigned short l_892 = 65531UL; + unsigned char l_893 = 0xFCL; + unsigned l_910 = 0x14BDD351L; + int i, j; + step_hash(488); + (*l_835) &= (*p_23); + step_hash(489); + (*g_415) = func_35(l_839, (~((int)((*l_839) != ((short)(((p_24 != ((*l_835) >= (g_220 == 0x9E0F2F2AL))) < (*l_839)) >= 0xBE9E4B2BL) << (short)g_437[1][2])) / (int)(*p_23))), p_24, p_22); + step_hash(503); + for (l_555 = (-25); (l_555 < 7); ++l_555) + { + int l_846[9]; + int l_854 = 0x7763E8A1L; + unsigned l_868 = 0x3C9E3B60L; + int i; + for (i = 0; i < 9; i++) + l_846[i] = 0xEE76585EL; + step_hash(493); + l_859[4][0]++; + step_hash(494); + l_846[1] &= (246UL != ((unsigned)(((unsigned char)1UL << (unsigned char)3) || g_455) / (unsigned)(((1UL ^ (g_409 >= ((signed char)(-1L) << (signed char)l_854))) & g_678) || (*l_839)))); + } + step_hash(541); + for (l_832 = 0; (l_832 <= 29); l_832 += 1) + { + unsigned l_879 = 0x4BCA0B18L; + int l_965 = (-8L); + unsigned short l_980 = 65527UL; + int *l_996 = &l_853; + int l_1007 = (-6L); + step_hash(507); + (*l_827) = ((unsigned char)((short)((int)l_879 - (int)((((unsigned)(0x5CL | g_624) / (unsigned)0x094AA171L) || (((short)((unsigned)(+((short)((((unsigned char)((p_24 > (*l_835)) > l_892) + (unsigned char)p_24) || 0x3AL) & 1L) * (short)1L)) - (unsigned)(*l_25)) % (short)p_24) >= p_24)) == 0x9171L)) << (short)10) - (unsigned char)0x9CL); + step_hash(508); + ++l_893; + } + } + } + step_hash(544); + (*g_415) = l_1011; + step_hash(545); + (*l_1011) = ((unsigned char)g_1014[2] % (unsigned char)p_24); + step_hash(546); + (*l_1011) |= (p_22 == (void*)0); + step_hash(547); + return p_23; +} + + + + + + + +static int func_30(int * p_31, unsigned p_32, unsigned char p_33, int * p_34) +{ + int l_426 = 0x7580CC95L; + int **l_431[3]; + int l_442 = 5L; + unsigned l_444 = 0x43DE7F2FL; + int i; + for (i = 0; i < 3; i++) + l_431[i] = &g_59; + step_hash(283); + for (g_409 = 24; (g_409 <= (-7)); --g_409) + { + int *l_430 = &g_62; + int *l_443[5][7] = {{(void*)0, &l_426, (void*)0, &l_426, (void*)0, &l_426, (void*)0}, {(void*)0, &l_426, (void*)0, &l_426, (void*)0, &l_426, (void*)0}, {(void*)0, &l_426, (void*)0, &l_426, (void*)0, &l_426, (void*)0}, {(void*)0, &l_426, (void*)0, &l_426, (void*)0, &l_426, (void*)0}, {(void*)0, &l_426, (void*)0, &l_426, (void*)0, &l_426, (void*)0}}; + int i, j; + step_hash(282); + for (g_7 = 0; (g_7 <= 1); g_7 += 1) + { + int *l_427 = (void*)0; + int *l_428 = (void*)0; + int *l_429 = &g_62; + unsigned char l_432[9][9] = {{0x00L, 0x19L, 0UL, 254UL, 254UL, 0UL, 0x19L, 0x00L, 0x1FL}, {0x00L, 0x19L, 0UL, 254UL, 254UL, 0UL, 0x19L, 0x00L, 0x1FL}, {0x00L, 0x19L, 0UL, 254UL, 254UL, 0UL, 0x19L, 0x00L, 0x1FL}, {0x00L, 0x19L, 0UL, 254UL, 254UL, 0UL, 0x19L, 0x00L, 0x1FL}, {0x00L, 0x19L, 0UL, 254UL, 254UL, 0UL, 0x19L, 0x00L, 0x1FL}, {0x00L, 0x19L, 0UL, 254UL, 254UL, 0UL, 0x19L, 0x00L, 0x1FL}, {0x00L, 0x19L, 0UL, 254UL, 254UL, 0UL, 0x19L, 0x00L, 0x1FL}, {0x00L, 0x19L, 0UL, 254UL, 254UL, 0UL, 0x19L, 0x00L, 0x1FL}, {0x00L, 0x19L, 0UL, 254UL, 254UL, 0UL, 0x19L, 0x00L, 0x1FL}}; + int l_433 = 1L; + int i, j; + step_hash(274); + (*l_429) = l_426; + step_hash(275); + l_433 |= (func_53(p_33, l_430, l_431[1]) >= l_432[2][8]); + step_hash(281); + for (p_32 = 0; (p_32 <= 1); p_32 += 1) + { + step_hash(279); + (**g_414) = func_35(p_34, (p_32 || (-(short)((g_133 <= g_7) ^ (*p_34)))), ((((0x8AL <= (*l_430)) <= 1UL) ^ ((short)g_2[0][1] << (short)1)) > g_437[1][2]), (**g_414)); + step_hash(280); + (**g_414) = func_35(p_31, (g_66 < ((+p_32) || (((unsigned char)(*l_430) >> (unsigned char)5) | (((p_32 >= g_409) && ((p_32 || ((int)l_442 + (int)(l_443[4][3] == (void*)0))) ^ p_32)) <= p_32)))), l_444, p_34); + } + } + } + step_hash(284); + return (*p_31); +} + + + + + + + +static int * func_35(int * p_36, int p_37, unsigned short p_38, int * p_39) +{ + int l_417 = 0x9D583302L; + int *l_418 = &g_66; + int *l_419[5] = {&g_66, &g_133, &g_66, &g_133, &g_66}; + unsigned l_420 = 4294967295UL; + int *l_423 = &g_2[4][0]; + int i; + step_hash(265); + --l_420; + step_hash(266); + return l_423; +} + + + + + + + +static int * func_40(unsigned p_41) +{ + unsigned char l_50[4][7] = {{250UL, 0x59L, 250UL, 0x59L, 250UL, 0x59L, 250UL}, {250UL, 0x59L, 250UL, 0x59L, 250UL, 0x59L, 250UL}, {250UL, 0x59L, 250UL, 0x59L, 250UL, 0x59L, 250UL}, {250UL, 0x59L, 250UL, 0x59L, 250UL, 0x59L, 250UL}}; + int *l_52 = &g_2[4][1]; + int **l_51 = &l_52; + int *l_411 = &g_409; + int i, j; + step_hash(262); + for (g_7 = 13; (g_7 < 25); g_7 += 1) + { + int **l_57 = &l_52; + int ***l_410 = &g_58[4][1]; + step_hash(261); + (*l_410) = func_44(l_50[1][6], l_51, (**l_51), (func_53((((l_57 == g_58[4][0]) | g_2[0][1]) >= 0x09L), (*l_51), l_57) < 1L), (*l_57)); + } + step_hash(263); + return l_411; +} + + + + + + + +static int ** func_44(int p_45, int ** p_46, short p_47, int p_48, int * p_49) +{ + int *l_407 = &g_66; + int *l_408 = &g_409; + step_hash(258); + (*p_46) = l_407; + step_hash(259); + (*l_408) &= ((-1L) & func_53(g_66, (*p_46), &l_407)); + step_hash(260); + return &g_59; +} + + + + + + + +static unsigned char func_53(unsigned p_54, int * p_55, int ** p_56) +{ + int l_67 = 1L; + unsigned l_69 = 4294967286UL; + short l_211 = 0xE09BL; + int l_297[3][4] = {{0x4A8C9D4EL, 7L, (-4L), 7L}, {0x4A8C9D4EL, 7L, (-4L), 7L}, {0x4A8C9D4EL, 7L, (-4L), 7L}}; + int l_299 = 1L; + int *l_323 = &l_67; + unsigned l_328 = 0x6C0256FFL; + int l_386[2][6] = {{0xEBAA8C97L, 0x12C36772L, 0xEBAA8C97L, 0x12C36772L, 0xEBAA8C97L, 0x12C36772L}, {0xEBAA8C97L, 0x12C36772L, 0xEBAA8C97L, 0x12C36772L, 0xEBAA8C97L, 0x12C36772L}}; + int i, j; + step_hash(243); + for (p_54 = 29; (p_54 > 9); p_54--) + { + short l_68 = 0x632EL; + int l_175 = 0L; + int *l_178 = &g_2[0][1]; + int l_283 = 0xF7AED1B3L; + int l_294[10] = {0x03F85559L, 0x18083A38L, 0x9CFFEF3BL, 0x9CFFEF3BL, 0x18083A38L, 0x03F85559L, 0x18083A38L, 0x9CFFEF3BL, 0x9CFFEF3BL, 0x18083A38L}; + int *l_317 = &l_299; + int ***l_362 = &g_58[6][0]; + unsigned char l_376 = 1UL; + unsigned short l_387[1][6] = {{0x61F9L, 65535UL, 0x61F9L, 65535UL, 0x61F9L, 65535UL}}; + int i, j; + step_hash(24); + for (g_62 = (-21); (g_62 == 18); g_62 += 4) + { + int *l_65[3][1]; + int i, j; + for (i = 0; i < 3; i++) + { + for (j = 0; j < 1; j++) + l_65[i][j] = &g_66; + } + step_hash(23); + l_69--; + } + } + step_hash(255); + for (g_133 = 0; (g_133 != (-30)); --g_133) + { + int l_394 = 2L; + int l_395 = (-2L); + int *l_396 = &l_297[2][0]; + int *l_397 = &l_297[2][2]; + int *l_398 = &g_62; + int *l_399 = &l_299; + int *l_400 = (void*)0; + int *l_401 = (void*)0; + int *l_402 = &l_299; + int *l_403[1]; + unsigned char l_404 = 0x81L; + int i; + for (i = 0; i < 1; i++) + l_403[i] = &l_297[2][0]; + step_hash(247); + (*l_323) &= ((*p_56) == (void*)0); + step_hash(252); + for (g_220 = (-25); (g_220 != 22); g_220 += 6) + { + step_hash(251); + (*l_323) ^= l_394; + } + step_hash(253); + --l_404; + step_hash(254); + if ((*g_59)) + break; + } + step_hash(256); + return g_133; +} + + + + + + + +static signed char func_76(int p_77, int * p_78, short p_79, short p_80) +{ + signed char l_93 = 0x80L; + int *l_103 = &g_2[0][1]; + int l_150 = 0x56DFF3C4L; + int l_155 = (-1L); + int l_156 = (-2L); + int l_162 = (-6L); + int l_163[8][2] = {{0x558E2862L, 0x558E2862L}, {0x558E2862L, 0x558E2862L}, {0x558E2862L, 0x558E2862L}, {0x558E2862L, 0x558E2862L}, {0x558E2862L, 0x558E2862L}, {0x558E2862L, 0x558E2862L}, {0x558E2862L, 0x558E2862L}, {0x558E2862L, 0x558E2862L}}; + int i, j; + step_hash(94); + if (((signed char)(((signed char)p_79 % (signed char)((signed char)(g_62 == 0x65D2L) - (signed char)((unsigned short)0x9C83L % (unsigned short)(0x8D667733L | (*g_59))))) == ((unsigned short)(g_10[5] && ((((unsigned)((((void*)0 != p_78) ^ g_10[3]) && g_62) / (unsigned)(*p_78)) & 0UL) & l_93)) * (unsigned short)g_62)) * (signed char)p_80)) + { + int *l_94 = &g_62; + int *l_131 = &g_62; + int l_149 = 0xB89AE2E4L; + int l_158[4][4] = {{(-6L), (-6L), 0L, (-6L)}, {(-6L), (-6L), 0L, (-6L)}, {(-6L), (-6L), 0L, (-6L)}, {(-6L), (-6L), 0L, (-6L)}}; + int **l_170 = &l_94; + int i, j; + step_hash(35); + p_78 = l_94; + step_hash(40); + for (p_77 = 0; (p_77 != 11); p_77 += 6) + { + int **l_97 = &l_94; + step_hash(39); + (*l_97) = l_94; + } + step_hash(89); + if ((((&l_94 != &p_78) != p_79) || ((short)(0x6AL & (-(short)l_93)) << (short)(((signed char)(l_93 ^ (g_7 ^ 1L)) >> (signed char)(((p_79 == 0xF58E71DFL) == (*p_78)) > 3UL)) && g_10[6])))) + { + int **l_104 = (void*)0; + int **l_105 = &l_103; + step_hash(42); + (*l_105) = l_103; + step_hash(43); + (*l_105) = p_78; + } + else + { + int *l_121 = &g_2[0][1]; + signed char l_129 = 0x00L; + unsigned short l_135 = 0x36A8L; + int l_151 = 2L; + int l_154 = 0L; + int l_164 = 0x76EB5C15L; + int l_165 = 0x574CFE09L; + int l_166[7][9] = {{0xB36AF559L, 0x48FA1E8DL, 0x891246E7L, 0x891246E7L, 0x48FA1E8DL, 0xB36AF559L, 0x48FA1E8DL, 0x891246E7L, 0x891246E7L}, {0xB36AF559L, 0x48FA1E8DL, 0x891246E7L, 0x891246E7L, 0x48FA1E8DL, 0xB36AF559L, 0x48FA1E8DL, 0x891246E7L, 0x891246E7L}, {0xB36AF559L, 0x48FA1E8DL, 0x891246E7L, 0x891246E7L, 0x48FA1E8DL, 0xB36AF559L, 0x48FA1E8DL, 0x891246E7L, 0x891246E7L}, {0xB36AF559L, 0x48FA1E8DL, 0x891246E7L, 0x891246E7L, 0x48FA1E8DL, 0xB36AF559L, 0x48FA1E8DL, 0x891246E7L, 0x891246E7L}, {0xB36AF559L, 0x48FA1E8DL, 0x891246E7L, 0x891246E7L, 0x48FA1E8DL, 0xB36AF559L, 0x48FA1E8DL, 0x891246E7L, 0x891246E7L}, {0xB36AF559L, 0x48FA1E8DL, 0x891246E7L, 0x891246E7L, 0x48FA1E8DL, 0xB36AF559L, 0x48FA1E8DL, 0x891246E7L, 0x891246E7L}, {0xB36AF559L, 0x48FA1E8DL, 0x891246E7L, 0x891246E7L, 0x48FA1E8DL, 0xB36AF559L, 0x48FA1E8DL, 0x891246E7L, 0x891246E7L}}; + int i, j; + step_hash(49); + for (p_77 = 0; (p_77 >= (-30)); p_77--) + { + step_hash(48); + return p_77; + } + step_hash(88); + if ((g_7 != g_2[0][1])) + { + unsigned short l_122 = 0x551BL; + int **l_130[7] = {&l_103, &l_103, &l_121, &l_103, &l_103, &l_121, &l_103}; + int i; + step_hash(62); + for (p_79 = 1; (p_79 >= 0); p_79 -= 1) + { + int *l_114 = (void*)0; + int *l_115 = (void*)0; + int *l_116 = (void*)0; + int *l_117 = &g_62; + unsigned l_118 = 0x7064EC29L; + step_hash(54); + (*l_94) = (g_10[0] < ((unsigned short)((unsigned)(p_77 <= (-(unsigned short)(((void*)0 != p_78) && ((g_66 | ((*l_94) < (p_78 != (void*)0))) && ((-(short)((65535UL & g_10[5]) & 0x08L)) && 0x62L))))) % (unsigned)(*l_103)) - (unsigned short)g_62)); + step_hash(55); + l_118--; + step_hash(56); + (*l_94) = ((g_66 || ((void*)0 != l_121)) || (*l_103)); + step_hash(61); + for (l_118 = 0; (l_118 <= 1); l_118 += 1) + { + int i, j; + step_hash(60); + (*p_78) = (((((*l_121) || l_122) < (*l_103)) != (((unsigned char)((int)(((void*)0 != p_78) ^ (p_79 >= ((&g_59 == g_58[(p_79 + 6)][l_118]) >= ((short)l_129 / (short)(*l_94))))) - (int)(*p_78)) * (unsigned char)p_80) || p_77)) > (*l_103)); + } + } + step_hash(63); + l_94 = p_78; + } + else + { + int **l_134 = &l_121; + int l_152 = 0xB9804166L; + int l_157 = 0x8F8D5673L; + int l_161[7][1]; + int i, j; + for (i = 0; i < 7; i++) + { + for (j = 0; j < 1; j++) + l_161[i][j] = (-1L); + } + step_hash(65); + l_103 = l_131; + step_hash(87); + for (g_62 = 1; (g_62 >= 0); g_62 -= 1) + { + int *l_132 = &g_133; + int l_153 = 0L; + int l_159 = 0xCD0C3996L; + unsigned l_167 = 0x1F1B1ED0L; + step_hash(69); + (*l_132) = (-4L); + step_hash(76); + if ((((((((void*)0 == l_103) != (*p_78)) == ((*l_121) & (((void*)0 == l_134) | l_135))) >= 0x1CL) || (&l_103 != &g_59)) | g_7)) + { + step_hash(71); + g_58[2][1] = &g_59; + } + else + { + step_hash(73); + if ((*p_78)) + break; + step_hash(74); + if ((*l_132)) + break; + step_hash(75); + (*l_132) &= (*l_121); + } + step_hash(77); + (*l_132) = ((unsigned char)(*l_132) >> (unsigned char)(~(((unsigned char)((unsigned short)1UL / (unsigned short)8UL) << (unsigned char)(!0xF9L)) <= ((((signed char)0x42L + (signed char)0xD1L) ^ ((signed char)(&p_78 == l_134) >> (signed char)0)) && (*l_103))))); + step_hash(78); + (*l_134) = p_78; + step_hash(86); + for (l_135 = 0; (l_135 <= 1); l_135 += 1) + { + int *l_146 = &g_133; + int *l_147 = &g_133; + int *l_148[8][5] = {{&g_62, &g_2[0][1], &g_66, &g_133, &g_62}, {&g_62, &g_2[0][1], &g_66, &g_133, &g_62}, {&g_62, &g_2[0][1], &g_66, &g_133, &g_62}, {&g_62, &g_2[0][1], &g_66, &g_133, &g_62}, {&g_62, &g_2[0][1], &g_66, &g_133, &g_62}, {&g_62, &g_2[0][1], &g_66, &g_133, &g_62}, {&g_62, &g_2[0][1], &g_66, &g_133, &g_62}, {&g_62, &g_2[0][1], &g_66, &g_133, &g_62}}; + signed char l_160 = 0x89L; + int i, j; + step_hash(82); + (*l_132) &= (*l_131); + step_hash(83); + (*l_134) = l_121; + step_hash(84); + l_167++; + step_hash(85); + (*l_147) = (*p_78); + } + } + } + } + step_hash(90); + (*l_170) = &l_158[0][0]; + } + else + { + int *l_171 = (void*)0; + int **l_172[2]; + int i; + for (i = 0; i < 2; i++) + l_172[i] = &l_103; + step_hash(92); + l_103 = l_171; + step_hash(93); + return g_133; + } + step_hash(95); + p_78 = p_78; + step_hash(96); + return (*l_103); +} + + +void csmith_compute_hash(void) +{ + int i, j; + for (i = 0; i < 5; i++) + { + for (j = 0; j < 3; j++) + { + transparent_crc(g_2[i][j], "g_2[i][j]", print_hash_value); + if (print_hash_value) printf("index = [%d][%d]\n", i, j); + + } + } + transparent_crc(g_7, "g_7", print_hash_value); + for (i = 0; i < 10; i++) + { + transparent_crc(g_10[i], "g_10[i]", print_hash_value); + if (print_hash_value) printf("index = [%d]\n", i); + + } + transparent_crc(g_62, "g_62", print_hash_value); + transparent_crc(g_66, "g_66", print_hash_value); + transparent_crc(g_133, "g_133", print_hash_value); + transparent_crc(g_220, "g_220", print_hash_value); + transparent_crc(g_409, "g_409", print_hash_value); + for (i = 0; i < 2; i++) + { + for (j = 0; j < 5; j++) + { + transparent_crc(g_437[i][j], "g_437[i][j]", print_hash_value); + if (print_hash_value) printf("index = [%d][%d]\n", i, j); + + } + } + transparent_crc(g_455, "g_455", print_hash_value); + transparent_crc(g_606, "g_606", print_hash_value); + transparent_crc(g_624, "g_624", print_hash_value); + transparent_crc(g_678, "g_678", print_hash_value); + transparent_crc(g_939, "g_939", print_hash_value); + for (i = 0; i < 3; i++) + { + transparent_crc(g_1014[i], "g_1014[i]", print_hash_value); + if (print_hash_value) printf("index = [%d]\n", i); + + } + transparent_crc(g_1046, "g_1046", print_hash_value); + transparent_crc(g_1061, "g_1061", print_hash_value); + transparent_crc(g_1156, "g_1156", print_hash_value); +} + +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} + + + +int main (void) +{ + int i, j; + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand108.expect b/src/tests/csmith/rand108.expect new file mode 100644 index 0000000..4952ed5 --- /dev/null +++ b/src/tests/csmith/rand108.expect @@ -0,0 +1,819 @@ +...checksum after hashing g_2[i][j] : F03BF41E +index = [0][0] +...checksum after hashing g_2[i][j] : FD7098B1 +index = [0][1] +...checksum after hashing g_2[i][j] : 9BB9E8FC +index = [0][2] +...checksum after hashing g_2[i][j] : C9A08324 +index = [1][0] +...checksum after hashing g_2[i][j] : FEE82578 +index = [1][1] +...checksum after hashing g_2[i][j] : 7DEB759B +index = [1][2] +...checksum after hashing g_2[i][j] : 5B7E1FA6 +index = [2][0] +...checksum after hashing g_2[i][j] : 4C0B00A5 +index = [2][1] +...checksum after hashing g_2[i][j] : C76FE25B +index = [2][2] +...checksum after hashing g_2[i][j] : A1345808 +index = [3][0] +...checksum after hashing g_2[i][j] : C394495B +index = [3][1] +...checksum after hashing g_2[i][j] : 55433DE4 +index = [3][2] +...checksum after hashing g_2[i][j] : 45C0ED0F +index = [4][0] +...checksum after hashing g_2[i][j] : 4A614FC1 +index = [4][1] +...checksum after hashing g_2[i][j] : 7E9C6EEA +index = [4][2] +...checksum after hashing g_7 : 113A1066 +...checksum after hashing g_10[i] : 5AC71386 +index = [0] +...checksum after hashing g_10[i] : CEE2EB0F +index = [1] +...checksum after hashing g_10[i] : FAF5B76C +index = [2] +...checksum after hashing g_10[i] : 92F74876 +index = [3] +...checksum after hashing g_10[i] : 62944088 +index = [4] +...checksum after hashing g_10[i] : F953BADC +index = [5] +...checksum after hashing g_10[i] : E609DF6A +index = [6] +...checksum after hashing g_10[i] : 5D507FCC +index = [7] +...checksum after hashing g_10[i] : DBE2E86C +index = [8] +...checksum after hashing g_10[i] : BCFDB533 +index = [9] +...checksum after hashing g_62 : B399E186 +...checksum after hashing g_66 : AD34D0DD +...checksum after hashing g_133 : 596274B9 +...checksum after hashing g_220 : 57BAFEF5 +...checksum after hashing g_409 : 2DE635E7 +...checksum after hashing g_437[i][j] : 52F44BD7 +index = [0][0] +...checksum after hashing g_437[i][j] : AB014F19 +index = [0][1] +...checksum after hashing g_437[i][j] : 78CF84FB +index = [0][2] +...checksum after hashing g_437[i][j] : 3C1FA80C +index = [0][3] +...checksum after hashing g_437[i][j] : 98FDC4B +index = [0][4] +...checksum after hashing g_437[i][j] : 7B46327A +index = [1][0] +...checksum after hashing g_437[i][j] : DB618948 +index = [1][1] +...checksum after hashing g_437[i][j] : ABA41C55 +index = [1][2] +...checksum after hashing g_437[i][j] : FB781E70 +index = [1][3] +...checksum after hashing g_437[i][j] : C609EBBE +index = [1][4] +...checksum after hashing g_455 : 6227625D +...checksum after hashing g_606 : F40CA3CD +...checksum after hashing g_624 : 4D532C2B +...checksum after hashing g_678 : FEDB7B1D +...checksum after hashing g_939 : 3DE134C3 +...checksum after hashing g_1014[i] : BC6775EB +index = [0] +...checksum after hashing g_1014[i] : 5FDF99B6 +index = [1] +...checksum after hashing g_1014[i] : D35FF07F +index = [2] +...checksum after hashing g_1046 : CA4D01FE +...checksum after hashing g_1061 : A0D5E638 +...checksum after hashing g_1156 : C2F48646 +before stmt(573): checksum = C2F48646 +...checksum after hashing g_2[i][j] : F03BF41E +index = [0][0] +...checksum after hashing g_2[i][j] : 4AE50962 +index = [0][1] +...checksum after hashing g_2[i][j] : ABA743C +index = [0][2] +...checksum after hashing g_2[i][j] : E7C1DCA7 +index = [1][0] +...checksum after hashing g_2[i][j] : C6D40209 +index = [1][1] +...checksum after hashing g_2[i][j] : C89B2366 +index = [1][2] +...checksum after hashing g_2[i][j] : D377BD2B +index = [2][0] +...checksum after hashing g_2[i][j] : BB655716 +index = [2][1] +...checksum after hashing g_2[i][j] : 79FC1A8C +index = [2][2] +...checksum after hashing g_2[i][j] : D7D5BC12 +index = [3][0] +...checksum after hashing g_2[i][j] : ACD89078 +index = [3][1] +...checksum after hashing g_2[i][j] : E45D4F4B +index = [3][2] +...checksum after hashing g_2[i][j] : 6F9AE4A7 +index = [4][0] +...checksum after hashing g_2[i][j] : 568039AC +index = [4][1] +...checksum after hashing g_2[i][j] : B4C8CB34 +index = [4][2] +...checksum after hashing g_7 : AD64F2B9 +...checksum after hashing g_10[i] : 687931FA +index = [0] +...checksum after hashing g_10[i] : 6653B413 +index = [1] +...checksum after hashing g_10[i] : A20982E5 +index = [2] +...checksum after hashing g_10[i] : FDBFE1CB +index = [3] +...checksum after hashing g_10[i] : BE8809E4 +index = [4] +...checksum after hashing g_10[i] : 9EFA878A +index = [5] +...checksum after hashing g_10[i] : 88CF0A8C +index = [6] +...checksum after hashing g_10[i] : 12ACAA64 +index = [7] +...checksum after hashing g_10[i] : 8615DCED +index = [8] +...checksum after hashing g_10[i] : 845D7312 +index = [9] +...checksum after hashing g_62 : B830C758 +...checksum after hashing g_66 : BF68FA0D +...checksum after hashing g_133 : AF5B6D06 +...checksum after hashing g_220 : 5B06E255 +...checksum after hashing g_409 : 3477DB69 +...checksum after hashing g_437[i][j] : F03F64EE +index = [0][0] +...checksum after hashing g_437[i][j] : 5E535AE +index = [0][1] +...checksum after hashing g_437[i][j] : AA70A759 +index = [0][2] +...checksum after hashing g_437[i][j] : EAF680B4 +index = [0][3] +...checksum after hashing g_437[i][j] : 71B9222 +index = [0][4] +...checksum after hashing g_437[i][j] : B5F94820 +index = [1][0] +...checksum after hashing g_437[i][j] : 3936D6C8 +index = [1][1] +...checksum after hashing g_437[i][j] : 9AE38B24 +index = [1][2] +...checksum after hashing g_437[i][j] : 3E41AE04 +index = [1][3] +...checksum after hashing g_437[i][j] : 28099E0 +index = [1][4] +...checksum after hashing g_455 : 68C88359 +...checksum after hashing g_606 : EA7D8830 +...checksum after hashing g_624 : C16C3E84 +...checksum after hashing g_678 : 48A1E067 +...checksum after hashing g_939 : 3FF7A4EF +...checksum after hashing g_1014[i] : 59060966 +index = [0] +...checksum after hashing g_1014[i] : B1812A75 +index = [1] +...checksum after hashing g_1014[i] : 13354E7B +index = [2] +...checksum after hashing g_1046 : 8E99042E +...checksum after hashing g_1061 : 14AF18D8 +...checksum after hashing g_1156 : B20D7F4D +before stmt(4): checksum = B20D7F4D +...checksum after hashing g_2[i][j] : F03BF41E +index = [0][0] +...checksum after hashing g_2[i][j] : 4AE50962 +index = [0][1] +...checksum after hashing g_2[i][j] : ABA743C +index = [0][2] +...checksum after hashing g_2[i][j] : E7C1DCA7 +index = [1][0] +...checksum after hashing g_2[i][j] : C6D40209 +index = [1][1] +...checksum after hashing g_2[i][j] : C89B2366 +index = [1][2] +...checksum after hashing g_2[i][j] : D377BD2B +index = [2][0] +...checksum after hashing g_2[i][j] : BB655716 +index = [2][1] +...checksum after hashing g_2[i][j] : 79FC1A8C +index = [2][2] +...checksum after hashing g_2[i][j] : D7D5BC12 +index = [3][0] +...checksum after hashing g_2[i][j] : ACD89078 +index = [3][1] +...checksum after hashing g_2[i][j] : E45D4F4B +index = [3][2] +...checksum after hashing g_2[i][j] : 6F9AE4A7 +index = [4][0] +...checksum after hashing g_2[i][j] : 568039AC +index = [4][1] +...checksum after hashing g_2[i][j] : B4C8CB34 +index = [4][2] +...checksum after hashing g_7 : 15D895DC +...checksum after hashing g_10[i] : A4D33164 +index = [0] +...checksum after hashing g_10[i] : FDF6F87C +index = [1] +...checksum after hashing g_10[i] : C611374 +index = [2] +...checksum after hashing g_10[i] : 98D8DA8D +index = [3] +...checksum after hashing g_10[i] : 3FAD6CC3 +index = [4] +...checksum after hashing g_10[i] : 9F4F7A97 +index = [5] +...checksum after hashing g_10[i] : 79150F26 +index = [6] +...checksum after hashing g_10[i] : 87DC7EF1 +index = [7] +...checksum after hashing g_10[i] : 29514EAA +index = [8] +...checksum after hashing g_10[i] : AE754B70 +index = [9] +...checksum after hashing g_62 : 85812B84 +...checksum after hashing g_66 : D6A40600 +...checksum after hashing g_133 : B2CE7ED1 +...checksum after hashing g_220 : 91D56CDA +...checksum after hashing g_409 : BB42F6FC +...checksum after hashing g_437[i][j] : 9502FCCC +index = [0][0] +...checksum after hashing g_437[i][j] : ABEE663A +index = [0][1] +...checksum after hashing g_437[i][j] : 24321667 +index = [0][2] +...checksum after hashing g_437[i][j] : F6D118A1 +index = [0][3] +...checksum after hashing g_437[i][j] : 5D1832ED +index = [0][4] +...checksum after hashing g_437[i][j] : E23C0039 +index = [1][0] +...checksum after hashing g_437[i][j] : 292CF5F9 +index = [1][1] +...checksum after hashing g_437[i][j] : 45E506E6 +index = [1][2] +...checksum after hashing g_437[i][j] : 4BDE6899 +index = [1][3] +...checksum after hashing g_437[i][j] : E3E590D +index = [1][4] +...checksum after hashing g_455 : AE8243E1 +...checksum after hashing g_606 : DB85B80F +...checksum after hashing g_624 : C0F4586C +...checksum after hashing g_678 : D9AF0EA6 +...checksum after hashing g_939 : 4BF15E7A +...checksum after hashing g_1014[i] : 6AF9FC55 +index = [0] +...checksum after hashing g_1014[i] : CCE45065 +index = [1] +...checksum after hashing g_1014[i] : 2C746601 +index = [2] +...checksum after hashing g_1046 : E34100F7 +...checksum after hashing g_1061 : 321814E5 +...checksum after hashing g_1156 : C0DF1BD7 +before stmt(567): checksum = C0DF1BD7 +...checksum after hashing g_2[i][j] : F03BF41E +index = [0][0] +...checksum after hashing g_2[i][j] : 4AE50962 +index = [0][1] +...checksum after hashing g_2[i][j] : ABA743C +index = [0][2] +...checksum after hashing g_2[i][j] : E7C1DCA7 +index = [1][0] +...checksum after hashing g_2[i][j] : C6D40209 +index = [1][1] +...checksum after hashing g_2[i][j] : C89B2366 +index = [1][2] +...checksum after hashing g_2[i][j] : D377BD2B +index = [2][0] +...checksum after hashing g_2[i][j] : BB655716 +index = [2][1] +...checksum after hashing g_2[i][j] : 79FC1A8C +index = [2][2] +...checksum after hashing g_2[i][j] : D7D5BC12 +index = [3][0] +...checksum after hashing g_2[i][j] : ACD89078 +index = [3][1] +...checksum after hashing g_2[i][j] : E45D4F4B +index = [3][2] +...checksum after hashing g_2[i][j] : 6F9AE4A7 +index = [4][0] +...checksum after hashing g_2[i][j] : 568039AC +index = [4][1] +...checksum after hashing g_2[i][j] : B4C8CB34 +index = [4][2] +...checksum after hashing g_7 : 15D895DC +...checksum after hashing g_10[i] : A4D33164 +index = [0] +...checksum after hashing g_10[i] : FDF6F87C +index = [1] +...checksum after hashing g_10[i] : C611374 +index = [2] +...checksum after hashing g_10[i] : 98D8DA8D +index = [3] +...checksum after hashing g_10[i] : 3FAD6CC3 +index = [4] +...checksum after hashing g_10[i] : 9F4F7A97 +index = [5] +...checksum after hashing g_10[i] : 79150F26 +index = [6] +...checksum after hashing g_10[i] : 87DC7EF1 +index = [7] +...checksum after hashing g_10[i] : 29514EAA +index = [8] +...checksum after hashing g_10[i] : AE754B70 +index = [9] +...checksum after hashing g_62 : 85812B84 +...checksum after hashing g_66 : D6A40600 +...checksum after hashing g_133 : B2CE7ED1 +...checksum after hashing g_220 : 91D56CDA +...checksum after hashing g_409 : BB42F6FC +...checksum after hashing g_437[i][j] : 9502FCCC +index = [0][0] +...checksum after hashing g_437[i][j] : ABEE663A +index = [0][1] +...checksum after hashing g_437[i][j] : 24321667 +index = [0][2] +...checksum after hashing g_437[i][j] : F6D118A1 +index = [0][3] +...checksum after hashing g_437[i][j] : 5D1832ED +index = [0][4] +...checksum after hashing g_437[i][j] : E23C0039 +index = [1][0] +...checksum after hashing g_437[i][j] : 292CF5F9 +index = [1][1] +...checksum after hashing g_437[i][j] : 45E506E6 +index = [1][2] +...checksum after hashing g_437[i][j] : 4BDE6899 +index = [1][3] +...checksum after hashing g_437[i][j] : E3E590D +index = [1][4] +...checksum after hashing g_455 : AE8243E1 +...checksum after hashing g_606 : DB85B80F +...checksum after hashing g_624 : C0F4586C +...checksum after hashing g_678 : D9AF0EA6 +...checksum after hashing g_939 : 4BF15E7A +...checksum after hashing g_1014[i] : 6AF9FC55 +index = [0] +...checksum after hashing g_1014[i] : CCE45065 +index = [1] +...checksum after hashing g_1014[i] : 2C746601 +index = [2] +...checksum after hashing g_1046 : E34100F7 +...checksum after hashing g_1061 : 321814E5 +...checksum after hashing g_1156 : C0DF1BD7 +before stmt(6): checksum = C0DF1BD7 +...checksum after hashing g_2[i][j] : F03BF41E +index = [0][0] +...checksum after hashing g_2[i][j] : 4AE50962 +index = [0][1] +...checksum after hashing g_2[i][j] : ABA743C +index = [0][2] +...checksum after hashing g_2[i][j] : E7C1DCA7 +index = [1][0] +...checksum after hashing g_2[i][j] : C6D40209 +index = [1][1] +...checksum after hashing g_2[i][j] : C89B2366 +index = [1][2] +...checksum after hashing g_2[i][j] : D377BD2B +index = [2][0] +...checksum after hashing g_2[i][j] : BB655716 +index = [2][1] +...checksum after hashing g_2[i][j] : 79FC1A8C +index = [2][2] +...checksum after hashing g_2[i][j] : D7D5BC12 +index = [3][0] +...checksum after hashing g_2[i][j] : ACD89078 +index = [3][1] +...checksum after hashing g_2[i][j] : E45D4F4B +index = [3][2] +...checksum after hashing g_2[i][j] : 6F9AE4A7 +index = [4][0] +...checksum after hashing g_2[i][j] : 568039AC +index = [4][1] +...checksum after hashing g_2[i][j] : B4C8CB34 +index = [4][2] +...checksum after hashing g_7 : 15D895DC +...checksum after hashing g_10[i] : A4D33164 +index = [0] +...checksum after hashing g_10[i] : FDF6F87C +index = [1] +...checksum after hashing g_10[i] : C611374 +index = [2] +...checksum after hashing g_10[i] : 98D8DA8D +index = [3] +...checksum after hashing g_10[i] : 3FAD6CC3 +index = [4] +...checksum after hashing g_10[i] : 1102244C +index = [5] +...checksum after hashing g_10[i] : A1B5AD6B +index = [6] +...checksum after hashing g_10[i] : 12519110 +index = [7] +...checksum after hashing g_10[i] : EB647EA7 +index = [8] +...checksum after hashing g_10[i] : AF2F1717 +index = [9] +...checksum after hashing g_62 : 7185B6A2 +...checksum after hashing g_66 : 788A2E40 +...checksum after hashing g_133 : 25EDB677 +...checksum after hashing g_220 : B6AB9C7D +...checksum after hashing g_409 : CA8C4583 +...checksum after hashing g_437[i][j] : 133DB725 +index = [0][0] +...checksum after hashing g_437[i][j] : 20530680 +index = [0][1] +...checksum after hashing g_437[i][j] : 352BF9E4 +index = [0][2] +...checksum after hashing g_437[i][j] : 5A331F03 +index = [0][3] +...checksum after hashing g_437[i][j] : C1D8B4B +index = [0][4] +...checksum after hashing g_437[i][j] : 21A81658 +index = [1][0] +...checksum after hashing g_437[i][j] : A55D6649 +index = [1][1] +...checksum after hashing g_437[i][j] : 75E8C969 +index = [1][2] +...checksum after hashing g_437[i][j] : F7605168 +index = [1][3] +...checksum after hashing g_437[i][j] : A3CF8A41 +index = [1][4] +...checksum after hashing g_455 : 554F20A4 +...checksum after hashing g_606 : 69E5E7EE +...checksum after hashing g_624 : 8945AEBB +...checksum after hashing g_678 : 21BBE629 +...checksum after hashing g_939 : C4F2D474 +...checksum after hashing g_1014[i] : 30AED842 +index = [0] +...checksum after hashing g_1014[i] : 402AA206 +index = [1] +...checksum after hashing g_1014[i] : 2D0AC99 +index = [2] +...checksum after hashing g_1046 : 1130AE08 +...checksum after hashing g_1061 : 5A6CB9F9 +...checksum after hashing g_1156 : 38A685B +before stmt(562): checksum = 38A685B +...checksum after hashing g_2[i][j] : F03BF41E +index = [0][0] +...checksum after hashing g_2[i][j] : 4AE50962 +index = [0][1] +...checksum after hashing g_2[i][j] : ABA743C +index = [0][2] +...checksum after hashing g_2[i][j] : E7C1DCA7 +index = [1][0] +...checksum after hashing g_2[i][j] : C6D40209 +index = [1][1] +...checksum after hashing g_2[i][j] : C89B2366 +index = [1][2] +...checksum after hashing g_2[i][j] : D377BD2B +index = [2][0] +...checksum after hashing g_2[i][j] : BB655716 +index = [2][1] +...checksum after hashing g_2[i][j] : 79FC1A8C +index = [2][2] +...checksum after hashing g_2[i][j] : D7D5BC12 +index = [3][0] +...checksum after hashing g_2[i][j] : ACD89078 +index = [3][1] +...checksum after hashing g_2[i][j] : E45D4F4B +index = [3][2] +...checksum after hashing g_2[i][j] : 6F9AE4A7 +index = [4][0] +...checksum after hashing g_2[i][j] : 568039AC +index = [4][1] +...checksum after hashing g_2[i][j] : B4C8CB34 +index = [4][2] +...checksum after hashing g_7 : 15D895DC +...checksum after hashing g_10[i] : A4D33164 +index = [0] +...checksum after hashing g_10[i] : FDF6F87C +index = [1] +...checksum after hashing g_10[i] : C611374 +index = [2] +...checksum after hashing g_10[i] : 98D8DA8D +index = [3] +...checksum after hashing g_10[i] : 3FAD6CC3 +index = [4] +...checksum after hashing g_10[i] : 1102244C +index = [5] +...checksum after hashing g_10[i] : A1B5AD6B +index = [6] +...checksum after hashing g_10[i] : 12519110 +index = [7] +...checksum after hashing g_10[i] : EB647EA7 +index = [8] +...checksum after hashing g_10[i] : AF2F1717 +index = [9] +...checksum after hashing g_62 : 7185B6A2 +...checksum after hashing g_66 : 788A2E40 +...checksum after hashing g_133 : 25EDB677 +...checksum after hashing g_220 : B6AB9C7D +...checksum after hashing g_409 : CA8C4583 +...checksum after hashing g_437[i][j] : 133DB725 +index = [0][0] +...checksum after hashing g_437[i][j] : 20530680 +index = [0][1] +...checksum after hashing g_437[i][j] : 352BF9E4 +index = [0][2] +...checksum after hashing g_437[i][j] : 5A331F03 +index = [0][3] +...checksum after hashing g_437[i][j] : C1D8B4B +index = [0][4] +...checksum after hashing g_437[i][j] : 21A81658 +index = [1][0] +...checksum after hashing g_437[i][j] : A55D6649 +index = [1][1] +...checksum after hashing g_437[i][j] : 75E8C969 +index = [1][2] +...checksum after hashing g_437[i][j] : F7605168 +index = [1][3] +...checksum after hashing g_437[i][j] : A3CF8A41 +index = [1][4] +...checksum after hashing g_455 : 554F20A4 +...checksum after hashing g_606 : 69E5E7EE +...checksum after hashing g_624 : 8945AEBB +...checksum after hashing g_678 : 21BBE629 +...checksum after hashing g_939 : C4F2D474 +...checksum after hashing g_1014[i] : 30AED842 +index = [0] +...checksum after hashing g_1014[i] : 402AA206 +index = [1] +...checksum after hashing g_1014[i] : 2D0AC99 +index = [2] +...checksum after hashing g_1046 : 1130AE08 +...checksum after hashing g_1061 : 5A6CB9F9 +...checksum after hashing g_1156 : 38A685B +before stmt(10): checksum = 38A685B +...checksum after hashing g_2[i][j] : F03BF41E +index = [0][0] +...checksum after hashing g_2[i][j] : 4AE50962 +index = [0][1] +...checksum after hashing g_2[i][j] : ABA743C +index = [0][2] +...checksum after hashing g_2[i][j] : E7C1DCA7 +index = [1][0] +...checksum after hashing g_2[i][j] : C6D40209 +index = [1][1] +...checksum after hashing g_2[i][j] : C89B2366 +index = [1][2] +...checksum after hashing g_2[i][j] : D377BD2B +index = [2][0] +...checksum after hashing g_2[i][j] : BB655716 +index = [2][1] +...checksum after hashing g_2[i][j] : 79FC1A8C +index = [2][2] +...checksum after hashing g_2[i][j] : D7D5BC12 +index = [3][0] +...checksum after hashing g_2[i][j] : ACD89078 +index = [3][1] +...checksum after hashing g_2[i][j] : E45D4F4B +index = [3][2] +...checksum after hashing g_2[i][j] : 6F9AE4A7 +index = [4][0] +...checksum after hashing g_2[i][j] : 568039AC +index = [4][1] +...checksum after hashing g_2[i][j] : B4C8CB34 +index = [4][2] +...checksum after hashing g_7 : 15D895DC +...checksum after hashing g_10[i] : A4D33164 +index = [0] +...checksum after hashing g_10[i] : FDF6F87C +index = [1] +...checksum after hashing g_10[i] : C611374 +index = [2] +...checksum after hashing g_10[i] : 98D8DA8D +index = [3] +...checksum after hashing g_10[i] : 3FAD6CC3 +index = [4] +...checksum after hashing g_10[i] : 1102244C +index = [5] +...checksum after hashing g_10[i] : A1B5AD6B +index = [6] +...checksum after hashing g_10[i] : 12519110 +index = [7] +...checksum after hashing g_10[i] : EB647EA7 +index = [8] +...checksum after hashing g_10[i] : AF2F1717 +index = [9] +...checksum after hashing g_62 : 7185B6A2 +...checksum after hashing g_66 : 788A2E40 +...checksum after hashing g_133 : 25EDB677 +...checksum after hashing g_220 : B6AB9C7D +...checksum after hashing g_409 : CA8C4583 +...checksum after hashing g_437[i][j] : 133DB725 +index = [0][0] +...checksum after hashing g_437[i][j] : 20530680 +index = [0][1] +...checksum after hashing g_437[i][j] : 352BF9E4 +index = [0][2] +...checksum after hashing g_437[i][j] : 5A331F03 +index = [0][3] +...checksum after hashing g_437[i][j] : C1D8B4B +index = [0][4] +...checksum after hashing g_437[i][j] : 21A81658 +index = [1][0] +...checksum after hashing g_437[i][j] : A55D6649 +index = [1][1] +...checksum after hashing g_437[i][j] : 75E8C969 +index = [1][2] +...checksum after hashing g_437[i][j] : F7605168 +index = [1][3] +...checksum after hashing g_437[i][j] : A3CF8A41 +index = [1][4] +...checksum after hashing g_455 : 554F20A4 +...checksum after hashing g_606 : 69E5E7EE +...checksum after hashing g_624 : 8945AEBB +...checksum after hashing g_678 : 21BBE629 +...checksum after hashing g_939 : C4F2D474 +...checksum after hashing g_1014[i] : 30AED842 +index = [0] +...checksum after hashing g_1014[i] : 402AA206 +index = [1] +...checksum after hashing g_1014[i] : 2D0AC99 +index = [2] +...checksum after hashing g_1046 : 1130AE08 +...checksum after hashing g_1061 : 5A6CB9F9 +...checksum after hashing g_1156 : 38A685B +before stmt(563): checksum = 38A685B +...checksum after hashing g_2[i][j] : F03BF41E +index = [0][0] +...checksum after hashing g_2[i][j] : 4AE50962 +index = [0][1] +...checksum after hashing g_2[i][j] : ABA743C +index = [0][2] +...checksum after hashing g_2[i][j] : E7C1DCA7 +index = [1][0] +...checksum after hashing g_2[i][j] : C6D40209 +index = [1][1] +...checksum after hashing g_2[i][j] : C89B2366 +index = [1][2] +...checksum after hashing g_2[i][j] : D377BD2B +index = [2][0] +...checksum after hashing g_2[i][j] : BB655716 +index = [2][1] +...checksum after hashing g_2[i][j] : 79FC1A8C +index = [2][2] +...checksum after hashing g_2[i][j] : D7D5BC12 +index = [3][0] +...checksum after hashing g_2[i][j] : ACD89078 +index = [3][1] +...checksum after hashing g_2[i][j] : E45D4F4B +index = [3][2] +...checksum after hashing g_2[i][j] : 6F9AE4A7 +index = [4][0] +...checksum after hashing g_2[i][j] : 568039AC +index = [4][1] +...checksum after hashing g_2[i][j] : B4C8CB34 +index = [4][2] +...checksum after hashing g_7 : 15D895DC +...checksum after hashing g_10[i] : A4D33164 +index = [0] +...checksum after hashing g_10[i] : FDF6F87C +index = [1] +...checksum after hashing g_10[i] : C611374 +index = [2] +...checksum after hashing g_10[i] : 98D8DA8D +index = [3] +...checksum after hashing g_10[i] : 3FAD6CC3 +index = [4] +...checksum after hashing g_10[i] : 1102244C +index = [5] +...checksum after hashing g_10[i] : A1B5AD6B +index = [6] +...checksum after hashing g_10[i] : 12519110 +index = [7] +...checksum after hashing g_10[i] : EB647EA7 +index = [8] +...checksum after hashing g_10[i] : AF2F1717 +index = [9] +...checksum after hashing g_62 : 7185B6A2 +...checksum after hashing g_66 : 788A2E40 +...checksum after hashing g_133 : 25EDB677 +...checksum after hashing g_220 : B6AB9C7D +...checksum after hashing g_409 : CA8C4583 +...checksum after hashing g_437[i][j] : 133DB725 +index = [0][0] +...checksum after hashing g_437[i][j] : 20530680 +index = [0][1] +...checksum after hashing g_437[i][j] : 352BF9E4 +index = [0][2] +...checksum after hashing g_437[i][j] : 5A331F03 +index = [0][3] +...checksum after hashing g_437[i][j] : C1D8B4B +index = [0][4] +...checksum after hashing g_437[i][j] : 21A81658 +index = [1][0] +...checksum after hashing g_437[i][j] : A55D6649 +index = [1][1] +...checksum after hashing g_437[i][j] : 75E8C969 +index = [1][2] +...checksum after hashing g_437[i][j] : F7605168 +index = [1][3] +...checksum after hashing g_437[i][j] : A3CF8A41 +index = [1][4] +...checksum after hashing g_455 : 554F20A4 +...checksum after hashing g_606 : 69E5E7EE +...checksum after hashing g_624 : 8945AEBB +...checksum after hashing g_678 : 21BBE629 +...checksum after hashing g_939 : C4F2D474 +...checksum after hashing g_1014[i] : 30AED842 +index = [0] +...checksum after hashing g_1014[i] : 402AA206 +index = [1] +...checksum after hashing g_1014[i] : 2D0AC99 +index = [2] +...checksum after hashing g_1046 : 1130AE08 +...checksum after hashing g_1061 : 5A6CB9F9 +...checksum after hashing g_1156 : 38A685B +before stmt(564): checksum = 38A685B +...checksum after hashing g_2[i][j] : F03BF41E +index = [0][0] +...checksum after hashing g_2[i][j] : 4AE50962 +index = [0][1] +...checksum after hashing g_2[i][j] : ABA743C +index = [0][2] +...checksum after hashing g_2[i][j] : E7C1DCA7 +index = [1][0] +...checksum after hashing g_2[i][j] : C6D40209 +index = [1][1] +...checksum after hashing g_2[i][j] : C89B2366 +index = [1][2] +...checksum after hashing g_2[i][j] : D377BD2B +index = [2][0] +...checksum after hashing g_2[i][j] : BB655716 +index = [2][1] +...checksum after hashing g_2[i][j] : 79FC1A8C +index = [2][2] +...checksum after hashing g_2[i][j] : D7D5BC12 +index = [3][0] +...checksum after hashing g_2[i][j] : ACD89078 +index = [3][1] +...checksum after hashing g_2[i][j] : E45D4F4B +index = [3][2] +...checksum after hashing g_2[i][j] : 6F9AE4A7 +index = [4][0] +...checksum after hashing g_2[i][j] : 568039AC +index = [4][1] +...checksum after hashing g_2[i][j] : B4C8CB34 +index = [4][2] +...checksum after hashing g_7 : 15D895DC +...checksum after hashing g_10[i] : A4D33164 +index = [0] +...checksum after hashing g_10[i] : FDF6F87C +index = [1] +...checksum after hashing g_10[i] : C611374 +index = [2] +...checksum after hashing g_10[i] : 98D8DA8D +index = [3] +...checksum after hashing g_10[i] : 3FAD6CC3 +index = [4] +...checksum after hashing g_10[i] : 1102244C +index = [5] +...checksum after hashing g_10[i] : A1B5AD6B +index = [6] +...checksum after hashing g_10[i] : 12519110 +index = [7] +...checksum after hashing g_10[i] : EB647EA7 +index = [8] +...checksum after hashing g_10[i] : AF2F1717 +index = [9] +...checksum after hashing g_62 : 7185B6A2 +...checksum after hashing g_66 : 788A2E40 +...checksum after hashing g_133 : 25EDB677 +...checksum after hashing g_220 : B6AB9C7D +...checksum after hashing g_409 : CA8C4583 +...checksum after hashing g_437[i][j] : 133DB725 +index = [0][0] +...checksum after hashing g_437[i][j] : 20530680 +index = [0][1] +...checksum after hashing g_437[i][j] : 352BF9E4 +index = [0][2] +...checksum after hashing g_437[i][j] : 5A331F03 +index = [0][3] +...checksum after hashing g_437[i][j] : C1D8B4B +index = [0][4] +...checksum after hashing g_437[i][j] : 21A81658 +index = [1][0] +...checksum after hashing g_437[i][j] : A55D6649 +index = [1][1] +...checksum after hashing g_437[i][j] : 75E8C969 +index = [1][2] +...checksum after hashing g_437[i][j] : F7605168 +index = [1][3] +...checksum after hashing g_437[i][j] : A3CF8A41 +index = [1][4] +...checksum after hashing g_455 : 554F20A4 +...checksum after hashing g_606 : 69E5E7EE +...checksum after hashing g_624 : 8945AEBB +...checksum after hashing g_678 : 21BBE629 +...checksum after hashing g_939 : C4F2D474 +...checksum after hashing g_1014[i] : 30AED842 +index = [0] +...checksum after hashing g_1014[i] : 402AA206 +index = [1] +...checksum after hashing g_1014[i] : 2D0AC99 +index = [2] +...checksum after hashing g_1046 : 1130AE08 +...checksum after hashing g_1061 : 5A6CB9F9 +...checksum after hashing g_1156 : 38A685B +checksum = 38a685b diff --git a/src/tests/csmith/rand109.c b/src/tests/csmith/rand109.c new file mode 100644 index 0000000..0262c95 --- /dev/null +++ b/src/tests/csmith/rand109.c @@ -0,0 +1,108 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static int g_3 = 0xCF5720E8L; +static short g_6 = 1L; +static unsigned short g_7[10] = {0x23AFL, 0x23AFL, 0x23AFL, 0x23AFL, 0x23AFL, 0x23AFL, 0x23AFL, 0x23AFL, 0x23AFL, 0x23AFL}; +static unsigned short func_1(void); +static unsigned short func_1(void) +{ + int *l_2 = &g_3; + int *l_4 = (void*)0; + int *l_5[6]; + int i; + for (i = 0; i < 6; i++) + l_5[i] = &g_3; + step_hash(1); + g_7[7]++; + step_hash(2); + (*l_2) = ((signed char)g_7[7] - (signed char)g_7[7]); + step_hash(3); + return g_6; +} +void csmith_compute_hash(void) +{ + int i; + transparent_crc(g_3, "g_3", print_hash_value); + transparent_crc(g_6, "g_6", print_hash_value); + for (i = 0; i < 10; i++) + { + transparent_crc(g_7[i], "g_7[i]", print_hash_value); + if (print_hash_value) printf("index = [%d]\n", i); + } +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int i; + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand109.expect b/src/tests/csmith/rand109.expect new file mode 100644 index 0000000..dcb64e1 --- /dev/null +++ b/src/tests/csmith/rand109.expect @@ -0,0 +1,92 @@ +...checksum after hashing g_3 : F4E3E499 +...checksum after hashing g_6 : 38D8F801 +...checksum after hashing g_7[i] : 6CCF9C72 +index = [0] +...checksum after hashing g_7[i] : 331EE187 +index = [1] +...checksum after hashing g_7[i] : BD78442A +index = [2] +...checksum after hashing g_7[i] : E46D787F +index = [3] +...checksum after hashing g_7[i] : 10CD945F +index = [4] +...checksum after hashing g_7[i] : 4D09849 +index = [5] +...checksum after hashing g_7[i] : 9D0ED10F +index = [6] +...checksum after hashing g_7[i] : CA52A3D0 +index = [7] +...checksum after hashing g_7[i] : 11602E +index = [8] +...checksum after hashing g_7[i] : 55A41ECB +index = [9] +before stmt(1): checksum = 55A41ECB +...checksum after hashing g_3 : F4E3E499 +...checksum after hashing g_6 : 38D8F801 +...checksum after hashing g_7[i] : 6CCF9C72 +index = [0] +...checksum after hashing g_7[i] : 331EE187 +index = [1] +...checksum after hashing g_7[i] : BD78442A +index = [2] +...checksum after hashing g_7[i] : E46D787F +index = [3] +...checksum after hashing g_7[i] : 10CD945F +index = [4] +...checksum after hashing g_7[i] : 4D09849 +index = [5] +...checksum after hashing g_7[i] : 9D0ED10F +index = [6] +...checksum after hashing g_7[i] : C228E419 +index = [7] +...checksum after hashing g_7[i] : A58A43A9 +index = [8] +...checksum after hashing g_7[i] : 2B286C46 +index = [9] +before stmt(2): checksum = 2B286C46 +...checksum after hashing g_3 : 2144DF1C +...checksum after hashing g_6 : DD9EB80C +...checksum after hashing g_7[i] : 987C371B +index = [0] +...checksum after hashing g_7[i] : D52520F1 +index = [1] +...checksum after hashing g_7[i] : 169AEF68 +index = [2] +...checksum after hashing g_7[i] : 2D11B146 +index = [3] +...checksum after hashing g_7[i] : 62A2C255 +index = [4] +...checksum after hashing g_7[i] : 5F324D57 +index = [5] +...checksum after hashing g_7[i] : 367B1F6A +index = [6] +...checksum after hashing g_7[i] : 46ADAFB1 +index = [7] +...checksum after hashing g_7[i] : FDBB3B55 +index = [8] +...checksum after hashing g_7[i] : 1E9722C5 +index = [9] +before stmt(3): checksum = 1E9722C5 +...checksum after hashing g_3 : 2144DF1C +...checksum after hashing g_6 : DD9EB80C +...checksum after hashing g_7[i] : 987C371B +index = [0] +...checksum after hashing g_7[i] : D52520F1 +index = [1] +...checksum after hashing g_7[i] : 169AEF68 +index = [2] +...checksum after hashing g_7[i] : 2D11B146 +index = [3] +...checksum after hashing g_7[i] : 62A2C255 +index = [4] +...checksum after hashing g_7[i] : 5F324D57 +index = [5] +...checksum after hashing g_7[i] : 367B1F6A +index = [6] +...checksum after hashing g_7[i] : 46ADAFB1 +index = [7] +...checksum after hashing g_7[i] : FDBB3B55 +index = [8] +...checksum after hashing g_7[i] : 1E9722C5 +index = [9] +checksum = 1e9722c5 diff --git a/src/tests/csmith/rand11.c b/src/tests/csmith/rand11.c new file mode 100644 index 0000000..5afafd7 --- /dev/null +++ b/src/tests/csmith/rand11.c @@ -0,0 +1,1304 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static int g_3 = 0xD06CE125L; +static int *g_2 = &g_3; +static int g_38 = 0xF1BD53D2L; +static int g_86 = 0x3070B7B2L; +static unsigned g_98 = 0x95FF7D1DL; +static int **g_156 = (void*)0; +static unsigned short g_425 = 0xE9ACL; +static unsigned short g_523 = 1UL; +static short g_538 = (-1L); +static unsigned g_734 = 0x13C2BE4AL; +static int g_745 = 1L; +static unsigned g_821 = 0x7DC50229L; +static unsigned g_856 = 4294967294UL; +static int g_881 = 0x3A18B297L; +static unsigned char g_913 = 0xE8L; +static int g_993 = 0x880C4392L; +static short func_1(void); +static unsigned func_12(unsigned short p_13); +static short func_16(int * p_17, unsigned p_18, short p_19, int ** p_20); +static unsigned func_33(short p_34); +static int func_39(int p_40, unsigned p_41, int * p_42, int * p_43); +static int func_44(unsigned char p_45, int p_46, unsigned char p_47); +static unsigned short func_50(int p_51, int p_52); +static short func_56(unsigned p_57, int ** p_58, int * p_59); +static int ** func_60(int * p_61, short p_62, unsigned short p_63, int p_64); +static int * func_65(unsigned short p_66, int ** p_67, int p_68, unsigned p_69); +static short func_1(void) +{ + int **l_4 = (void*)0; + step_hash(1); + g_2 = g_2; + step_hash(604); + for (g_3 = 0; (g_3 <= (-20)); g_3--) + { + int *l_11 = &g_3; + int *l_991 = (void*)0; + int *l_992 = &g_993; + } + step_hash(605); + return g_856; +} +static unsigned func_12(unsigned short p_13) +{ + unsigned short l_21 = 0x6CD3L; + int *l_24 = (void*)0; + unsigned l_733 = 0x16980C13L; + int l_751 = 1L; + int l_784 = 0x746624E7L; + int ***l_882 = &g_156; + int *l_934 = (void*)0; + int *l_982 = (void*)0; + int l_988 = 0x50850311L; + step_hash(588); + if ((((signed char)(func_16(&g_3, g_3, ((l_21 == ((signed char)g_3 << (signed char)((((l_24 == &g_3) >= (g_3 || ((unsigned char)((unsigned short)p_13 / (unsigned short)9UL) / (unsigned char)g_3))) ^ 5L) == g_3))) == g_3), &g_2) && (-1L)) >> (signed char)g_538) && 0L)) + { + unsigned l_735 = 1UL; + int l_743 = 7L; + int l_766 = 7L; + int **l_768 = &l_24; + int ***l_769 = &g_156; + short l_927 = 0x12A5L; + int l_965 = 0x6B36D099L; + step_hash(461); + if (((&g_2 != &l_24) == ((int)g_538 / (int)((unsigned short)((unsigned char)(l_24 != &g_86) >> (unsigned char)2) - (unsigned short)(-(unsigned)p_13))))) + { + short l_742 = 6L; + step_hash(436); + if (((short)l_733 - (short)g_734)) + { + int l_744 = 1L; + step_hash(432); + l_735 = (0x6308L <= (g_38 == ((void*)0 != l_24))); + step_hash(433); + l_744 ^= ((unsigned char)p_13 - (unsigned char)((0xCFL > ((signed char)((unsigned char)((((l_735 | g_86) && p_13) > l_742) | (p_13 & p_13)) % (unsigned char)l_743) * (signed char)0L)) < p_13)); + } + else + { + step_hash(435); + l_743 = p_13; + } + step_hash(437); + g_38 &= l_743; + } + else + { + int l_757 = (-1L); + int *l_767 = &g_86; + int ***l_770 = &l_768; + step_hash(458); + for (g_745 = 15; (g_745 != 28); ++g_745) + { + step_hash(454); + for (g_86 = 0; (g_86 >= 6); ++g_86) + { + int l_750 = 0xEBCB6B0AL; + int l_752 = 9L; + step_hash(445); + l_751 &= l_750; + step_hash(446); + l_752 = p_13; + step_hash(453); + for (l_743 = (-30); (l_743 == (-21)); ++l_743) + { + int *l_755 = &g_38; + int *l_756 = &l_752; + step_hash(450); + l_755 = (void*)0; + step_hash(451); + (*l_756) = (~p_13); + step_hash(452); + if (p_13) + continue; + } + } + step_hash(455); + g_86 ^= l_735; + step_hash(456); + l_743 = l_757; + step_hash(457); + if (p_13) + continue; + } + step_hash(459); + (*l_767) &= ((signed char)((l_735 == (p_13 > (g_425 == (((signed char)p_13 % (signed char)(((unsigned char)p_13 >> (unsigned char)l_735) ^ (p_13 == p_13))) & l_743)))) & p_13) >> (signed char)l_766); + step_hash(460); + (**l_770) = func_65(p_13, &g_2, (l_769 == l_770), (1UL <= (g_425 & p_13))); + } + step_hash(462); + l_24 = &l_751; + step_hash(506); + for (p_13 = (-19); (p_13 != 30); p_13 += 7) + { + int *l_775 = &l_743; + int l_786 = 0x1B94D879L; + int **l_832 = (void*)0; + int *l_846 = &l_743; + } + step_hash(579); + if (p_13) + { + int **l_857 = &g_2; + unsigned l_898 = 9UL; + int l_919 = 1L; + step_hash(527); + for (g_523 = 8; (g_523 >= 44); ++g_523) + { + int ***l_852 = &g_156; + step_hash(526); + for (g_538 = 0; (g_538 != (-2)); --g_538) + { + int *l_853 = (void*)0; + } + } + step_hash(553); + if (p_13) + { + step_hash(529); + (**l_768) = (-(int)(p_13 != p_13)); + step_hash(530); + (*l_24) = (((!(*l_24)) ^ g_881) && (l_882 != &g_156)); + } + else + { + int *l_897 = &g_3; + step_hash(532); + (*l_768) = (*l_768); + step_hash(533); + (**l_768) = 0L; + step_hash(538); + if (((signed char)((+p_13) == ((unsigned char)(((((unsigned short)0UL >> (unsigned short)12) <= (&g_86 != (void*)0)) ^ ((unsigned)(func_39((p_13 == ((short)p_13 % (short)((signed char)((((l_857 != (*l_769)) & ((**l_768) && g_881)) < 4UL) > p_13) << (signed char)(**l_768)))), p_13, &g_3, l_897) == g_745) / (unsigned)0x798682BBL)) ^ g_538) * (unsigned char)g_881)) * (signed char)g_856)) + { + step_hash(535); + (**l_768) &= ((g_821 >= (*l_897)) >= l_898); + } + else + { + step_hash(537); + return g_734; + } + step_hash(552); + if (((p_13 >= p_13) | p_13)) + { + int *l_918 = &l_751; + int *l_920 = &l_743; + step_hash(540); + (*l_920) |= ((short)((unsigned short)((short)((unsigned char)g_821 << (unsigned char)(((int)(((g_913 != ((int)((int)func_39((0x35L > p_13), p_13, (*l_768), l_918) / (int)9L) % (int)g_745)) < l_919) || g_523) + (int)p_13) != g_881)) * (short)0UL) << (unsigned short)g_734) >> (short)p_13); + step_hash(541); + (*l_920) ^= (*l_24); + } + else + { + step_hash(543); + (*l_24) = (**l_768); + step_hash(549); + if ((*l_897)) + { + step_hash(545); + return (*l_897); + } + else + { + unsigned l_925 = 0UL; + int *l_926 = (void*)0; + step_hash(547); + (**l_768) = l_925; + step_hash(548); + (*l_857) = l_926; + } + step_hash(550); + (**l_768) |= p_13; + step_hash(551); + (**l_768) = p_13; + } + } + } + else + { + int *l_929 = &g_86; + int *l_938 = &l_784; + int ***l_944 = &g_156; + step_hash(555); + l_927 ^= p_13; + step_hash(571); + if (p_13) + { + int l_928 = (-3L); + int **l_937 = &l_934; + step_hash(567); + if (((~((p_13 < (~l_928)) != ((l_929 == &g_38) || ((short)(((unsigned)0UL * (unsigned)(func_39(p_13, (g_98 > g_913), l_938, (*l_937)) > g_425)) || 2L) << (short)2)))) && 6L)) + { + step_hash(562); + for (g_98 = 0; (g_98 > 38); ++g_98) + { + step_hash(561); + return g_425; + } + step_hash(563); + (**l_768) ^= ((signed char)g_425 + (signed char)p_13); + } + else + { + int ***l_943 = &l_937; + int l_945 = (-1L); + step_hash(565); + (*l_24) = ((*l_24) | (((l_943 == l_944) > l_945) ^ ((unsigned char)((unsigned)0UL + (unsigned)(((short)p_13 + (short)(*l_938)) >= ((g_86 & p_13) == g_881))) - (unsigned char)(*l_24)))); + step_hash(566); + (*l_938) = (*l_938); + } + } + else + { + step_hash(569); + (*l_24) &= (g_856 >= g_734); + step_hash(570); + return g_734; + } + step_hash(578); + if ((((short)g_881 * (short)p_13) <= g_856)) + { + int *l_958 = &l_743; + step_hash(573); + (*l_929) = (p_13 >= (-7L)); + step_hash(574); + (**l_768) = (func_39(((short)(((&g_2 != (*l_944)) < (+(*l_958))) < (+((unsigned short)(0x82L >= ((signed char)l_965 << (signed char)p_13)) * (unsigned short)(g_856 == ((((((*l_929) ^ (-2L)) != p_13) >= p_13) == p_13) || 0x43L))))) >> (short)p_13), g_98, l_958, l_958) ^ g_856); + step_hash(575); + return p_13; + } + else + { + step_hash(577); + g_38 &= func_39(g_734, (**l_768), (*l_768), &g_3); + } + } + } + else + { + int ***l_968 = &g_156; + int l_976 = 0x04754667L; + int *l_977 = &g_86; + step_hash(581); + (*l_977) = (p_13 | ((short)((g_538 | (l_882 != l_968)) == ((g_3 && ((unsigned)((g_98 >= ((signed char)((-(unsigned char)((signed char)((void*)0 != l_882) * (signed char)g_881)) ^ 0L) + (signed char)l_976)) > p_13) + (unsigned)p_13)) >= p_13)) << (short)12)); + step_hash(582); + (*l_882) = (*l_882); + step_hash(587); + for (g_821 = (-25); (g_821 == 5); g_821 += 4) + { + step_hash(586); + l_751 = g_881; + } + } + step_hash(589); + g_2 = &g_86; + step_hash(590); + l_751 ^= (*g_2); + step_hash(601); + for (g_38 = 28; (g_38 > 0); g_38--) + { + int l_987 = 4L; + step_hash(594); + (*l_882) = func_60(&l_987, p_13, (+g_821), l_988); + step_hash(595); + (*g_2) = 0xF91D216FL; + step_hash(600); + for (g_856 = 0; (g_856 > 11); g_856 += 6) + { + step_hash(599); + l_987 = p_13; + } + } + step_hash(602); + return p_13; +} +static short func_16(int * p_17, unsigned p_18, short p_19, int ** p_20) +{ + unsigned char l_35 = 1UL; + int **l_379 = (void*)0; + int *l_380 = &g_38; + signed char l_396 = 0xE3L; + short l_414 = 0x82E2L; + unsigned char l_461 = 0xB8L; + int *l_484 = &g_86; + int l_508 = 0xE1AC01B0L; + int l_578 = 1L; + unsigned short l_597 = 0x878AL; + unsigned char l_638 = 0x70L; + int ***l_643 = &g_156; + int l_680 = 0L; + int *l_695 = &g_3; + signed char l_698 = 0x66L; + unsigned l_709 = 0UL; + unsigned l_714 = 0UL; + int **l_718 = (void*)0; + step_hash(209); + (*l_380) = ((short)((unsigned)func_33((0x23L | l_35)) / (unsigned)(g_3 || ((l_379 == &p_17) <= (-1L)))) << (short)g_3); + step_hash(221); + if (func_39(((*l_380) != func_39(g_86, g_98, &g_3, &g_38)), ((p_18 < (&l_380 == &p_17)) == g_98), l_380, l_380)) + { + step_hash(217); + for (p_19 = (-4); (p_19 >= 22); p_19 += 5) + { + unsigned l_387 = 0UL; + step_hash(214); + (*l_380) = ((unsigned char)((*l_380) ^ 0xCCF848ACL) + (unsigned char)0x6EL); + step_hash(215); + (*l_380) = l_387; + step_hash(216); + return g_86; + } + } + else + { + step_hash(219); + (*p_20) = func_65(g_86, &p_17, (((*p_17) <= (((short)((short)((unsigned char)func_56(p_19, &l_380, &g_38) * (unsigned char)0x87L) - (short)(g_86 < p_18)) >> (short)13) != (*p_17))) | g_3), p_19); + step_hash(220); + (*p_20) = func_65((((short)(&l_379 == (void*)0) << (short)(g_38 <= p_18)) & (((!p_19) ^ 0x7B48L) | (g_3 ^ p_18))), func_60((*p_20), g_98, p_18, p_18), l_396, (*l_380)); + } + step_hash(405); + if (((unsigned char)g_38 * (unsigned char)(65526UL && func_39(((short)(((unsigned short)((*p_17) != func_39(g_86, p_19, p_17, l_380)) / (unsigned short)(*l_380)) < (*l_380)) % (short)p_18), (*l_380), p_17, p_17)))) + { + unsigned l_413 = 1UL; + int l_435 = 0xE4F0868AL; + unsigned char l_517 = 2UL; + step_hash(295); + if ((((short)((unsigned short)(((unsigned short)g_3 * (unsigned short)((int)(-1L) % (int)(~(((void*)0 != &l_380) == ((+0xB1F27604L) < (g_38 && g_98)))))) | 7UL) << (unsigned short)g_38) >> (short)l_413) || l_413)) + { + unsigned short l_419 = 0xB5DCL; + int *l_424 = &g_3; + step_hash(224); + g_425 &= (0x7F213C8FL & (((short)((unsigned short)l_413 >> (unsigned short)(l_419 == ((int)((&g_2 != &p_17) ^ ((unsigned short)func_39((*l_380), g_98, l_424, &g_38) >> (unsigned short)1)) + (int)(*p_17)))) - (short)p_19) && p_19)); + step_hash(238); + for (p_19 = 25; (p_19 < 15); p_19 -= 5) + { + signed char l_436 = 0L; + int l_437 = 0L; + step_hash(228); + if ((*l_424)) + break; + step_hash(237); + if ((*p_17)) + { + int l_432 = 0xB34B1CFBL; + step_hash(230); + l_432 = (((unsigned short)g_3 * (unsigned short)9UL) != ((((signed char)(g_425 ^ g_38) / (signed char)((p_18 < p_19) ^ ((*l_424) & l_432))) < ((unsigned)g_3 - (unsigned)0x47465895L)) || 0x7293L)); + step_hash(231); + (*l_380) = (*p_17); + step_hash(232); + (*l_380) &= l_432; + } + else + { + step_hash(234); + (*l_380) ^= 0x540DDE23L; + step_hash(235); + l_435 &= (*l_380); + step_hash(236); + l_437 = l_436; + } + } + step_hash(239); + return p_18; + } + else + { + unsigned short l_448 = 8UL; + int *l_454 = &l_435; + int l_462 = 0x403AEF32L; + int l_464 = 0x08B37DB9L; + step_hash(272); + for (g_425 = (-2); (g_425 == 26); g_425 += 6) + { + int **l_442 = &g_2; + step_hash(244); + (*l_380) = (g_86 || p_18); + step_hash(270); + if (((unsigned char)(l_442 != (void*)0) >> (unsigned char)((unsigned short)(-(int)(*p_17)) / (unsigned short)((signed char)l_448 % (signed char)((signed char)1L >> (signed char)6))))) + { + unsigned l_453 = 0x2CAB4327L; + int *l_463 = &g_3; + step_hash(253); + if (((signed char)p_18 * (signed char)(g_425 ^ l_453))) + { + step_hash(247); + (*l_380) = (*p_17); + step_hash(248); + (*l_442) = l_454; + step_hash(249); + (*g_2) = ((void*)0 == &p_17); + step_hash(250); + l_464 |= (g_425 == (func_56(((unsigned short)g_425 + (unsigned short)(((signed char)func_39((((short)(**l_442) * (short)p_19) == g_38), (l_461 > 1UL), (*p_20), (*p_20)) / (signed char)p_18) == l_462)), l_442, l_463) || l_413)); + } + else + { + step_hash(252); + (*p_20) = func_65((*l_454), &g_2, (*p_17), ((signed char)l_413 / (signed char)((signed char)((-1L) | (~((unsigned)p_18 - (unsigned)0x334A0F4AL))) >> (signed char)0))); + } + step_hash(259); + for (l_448 = 28; (l_448 >= 18); l_448 -= 2) + { + int l_473 = 0xC80864EDL; + step_hash(257); + (*p_20) = (*p_20); + step_hash(258); + if (l_473) + break; + } + step_hash(265); + for (g_98 = 0; (g_98 > 11); g_98++) + { + step_hash(263); + (*l_454) = ((+((short)p_19 - (short)g_38)) != (((void*)0 == &p_20) ^ (**l_442))); + step_hash(264); + l_464 ^= (**p_20); + } + step_hash(266); + (*g_2) = (~((void*)0 == &l_464)); + } + else + { + unsigned l_483 = 1UL; + step_hash(268); + l_483 ^= (-(int)((unsigned char)p_18 + (unsigned char)((0x403EL <= ((short)p_18 << (short)2)) < l_435))); + step_hash(269); + (*l_454) = ((&l_435 != l_484) | 0UL); + } + step_hash(271); + (*l_454) = (*p_17); + } + step_hash(277); + if (((short)l_435 * (short)((void*)0 != &g_2))) + { + step_hash(274); + (*l_484) &= (*l_380); + } + else + { + int **l_487 = (void*)0; + step_hash(276); + (*l_454) ^= (p_18 < ((&p_17 == l_487) != ((void*)0 != &p_20))); + } + step_hash(278); + (*l_380) ^= 0xDB40869AL; + step_hash(294); + if (((short)p_19 >> (short)(*l_454))) + { + int l_492 = 0x9F55045BL; + step_hash(280); + (*l_484) = ((signed char)((p_19 && (-7L)) ^ l_492) * (signed char)p_18); + } + else + { + unsigned short l_495 = 1UL; + step_hash(293); + for (g_38 = (-14); (g_38 < 10); g_38++) + { + step_hash(285); + l_495 &= 0x0654CC57L; + step_hash(286); + (*l_484) = ((short)p_18 << (short)3); + step_hash(287); + (*l_454) = l_435; + step_hash(292); + for (g_86 = (-14); (g_86 <= 23); g_86 += 5) + { + step_hash(291); + (*l_454) |= (-7L); + } + } + } + } + step_hash(296); + (*p_20) = func_65(l_435, func_60(p_17, l_413, g_86, (l_484 == &g_86)), (((unsigned char)(((short)0x3DE3L + (short)((unsigned short)1UL + (unsigned short)0x2EB6L)) != p_18) >> (unsigned char)2) <= 7L), g_98); + step_hash(340); + for (g_86 = 23; (g_86 == 4); --g_86) + { + int l_526 = (-6L); + unsigned short l_556 = 65535UL; + int **l_564 = &l_484; + step_hash(300); + (**p_20) |= (((p_18 ^ p_19) >= g_86) >= g_425); + step_hash(301); + (*p_20) = (*p_20); + step_hash(302); + (*g_2) ^= ((-1L) != (l_508 ^ 0x480A30C7L)); + step_hash(339); + for (p_18 = 0; (p_18 <= 21); p_18 += 3) + { + int l_522 = (-6L); + int *l_546 = (void*)0; + int *l_565 = &l_435; + } + } + } + else + { + unsigned char l_570 = 4UL; + int *l_581 = &g_38; + unsigned char l_592 = 0x6BL; + unsigned l_621 = 9UL; + unsigned l_666 = 1UL; + step_hash(342); + (*l_380) = (*l_380); + step_hash(365); + if ((*l_484)) + { + step_hash(344); + (*p_20) = &g_86; + step_hash(345); + (*l_484) = (((short)(-7L) * (short)(0xB7725D2CL == (*p_17))) || (0xC6L ^ g_425)); + step_hash(346); + (*l_380) = ((((unsigned short)g_538 + (unsigned short)g_3) <= func_33((0x48001EC9L != l_570))) < g_538); + } + else + { + short l_571 = 0x78A1L; + int *l_582 = &g_3; + int l_618 = 0x74680034L; + step_hash(348); + (*l_484) = l_571; + step_hash(363); + if (func_39((0x808EL <= p_19), ((unsigned char)((unsigned char)((unsigned)l_578 + (unsigned)((*p_17) ^ (*l_380))) / (unsigned char)p_19) << (unsigned char)func_39((l_570 | ((*l_484) != (((short)p_18 / (short)(*l_380)) == (*l_380)))), l_571, l_581, &g_3)), &g_3, l_582)) + { + int l_589 = 0xE61D6F7EL; + int l_598 = (-3L); + step_hash(350); + (*p_20) = func_65(p_19, &g_2, ((short)(&g_156 == &p_20) + (short)((((signed char)(~((*p_17) && (-1L))) + (signed char)((unsigned short)(p_18 | ((((p_18 < p_19) ^ 0xF98FL) & l_589) <= g_3)) * (unsigned short)p_19)) >= 2UL) & g_425)), g_538); + step_hash(351); + l_598 ^= (p_19 & (func_33(l_589) == ((unsigned char)l_592 * (unsigned char)((short)g_425 + (short)((p_18 & ((((void*)0 != &g_3) > ((unsigned short)g_523 % (unsigned short)l_597)) != p_18)) >= 0xECF334D7L))))); + step_hash(352); + (*l_380) = ((short)(0L <= (!g_523)) % (short)((l_598 != ((unsigned short)(*l_581) >> (unsigned short)2)) | ((short)(~g_3) - (short)(p_19 != (((8L && 0x2914B7B7L) && 0xCBL) != 1UL))))); + } + else + { + int *l_605 = (void*)0; + step_hash(360); + if ((l_605 != (void*)0)) + { + signed char l_613 = 3L; + step_hash(355); + (*l_484) = ((-(short)(&p_20 == &p_20)) < ((unsigned short)(p_19 & l_618) - (unsigned short)0UL)); + step_hash(356); + (*l_581) = ((unsigned char)g_523 + (unsigned char)(&g_86 != &g_38)); + step_hash(357); + l_621 = (&l_582 != (void*)0); + } + else + { + int *l_622 = &l_618; + step_hash(359); + (*p_20) = l_622; + } + step_hash(361); + (*l_380) ^= (*p_17); + step_hash(362); + (*l_484) ^= (*l_581); + } + step_hash(364); + (*l_484) |= ((unsigned char)0xBFL >> (unsigned char)((-10L) || p_18)); + } + step_hash(404); + for (p_19 = 0; (p_19 != (-13)); p_19--) + { + unsigned l_631 = 0xB7781D03L; + int *l_632 = &g_3; + unsigned l_633 = 0x9A701622L; + unsigned l_644 = 0xC9DFD282L; + step_hash(385); + if (((unsigned char)(*l_581) - (unsigned char)((signed char)((void*)0 != p_17) << (signed char)((func_39(func_39(l_631, g_3, l_632, func_65((*l_484), &p_17, (*l_632), (*l_632))), p_18, l_581, l_632) >= l_633) && g_98)))) + { + int l_642 = 0xE8C3C605L; + step_hash(382); + if (((0L && ((**p_20) && (p_18 ^ (g_523 == func_33(p_19))))) ^ g_538)) + { + unsigned l_641 = 0x1585EEB9L; + step_hash(371); + (*l_581) ^= (((void*)0 == &p_17) < ((unsigned char)g_523 >> (unsigned char)g_3)); + step_hash(376); + for (l_396 = (-10); (l_396 != 21); ++l_396) + { + unsigned l_649 = 6UL; + step_hash(375); + (*l_380) |= (+(((signed char)(l_641 | (*l_632)) % (signed char)l_649) >= (((unsigned short)((~((short)(p_18 == (!(-1L))) % (short)p_18)) & (*l_632)) - (unsigned short)(~l_641)) != ((unsigned short)((((short)g_86 + (short)0UL) & 8UL) || 0xCEL) + (unsigned short)p_18)))); + } + step_hash(377); + (*l_581) = (((short)((unsigned char)0x9AL / (unsigned char)(-3L)) * (short)g_98) > ((&g_156 == (void*)0) > ((((unsigned char)((short)(&g_156 == (void*)0) % (short)func_39(g_98, p_19, l_581, &g_86)) % (unsigned char)0x72L) < l_666) && 0x04A5L))); + step_hash(378); + (*p_20) = &g_3; + } + else + { + int **l_667 = &l_484; + step_hash(380); + (*p_20) = func_65(p_19, l_667, (*p_17), ((int)(((int)(**l_667) - (int)((short)p_18 << (short)(p_19 <= ((unsigned char)(!((unsigned short)(*l_581) / (unsigned short)(p_19 & (&g_38 != &l_642)))) << (unsigned char)l_642)))) <= (**l_667)) / (int)1UL)); + step_hash(381); + if ((*g_2)) + continue; + } + } + else + { + step_hash(384); + (*l_484) = (**p_20); + } + step_hash(386); + (*l_484) |= 0x190E59D4L; + step_hash(403); + if ((g_98 > (*l_380))) + { + int *l_678 = &g_3; + int *l_679 = &g_86; + step_hash(388); + g_2 = (*p_20); + step_hash(389); + if ((*g_2)) + continue; + step_hash(390); + l_679 = l_678; + } + else + { + unsigned l_691 = 0xA227C0C2L; + short l_694 = 1L; + step_hash(402); + if (((l_680 == func_39(((unsigned char)(*l_484) * (unsigned char)((((int)(*l_581) + (int)((*p_20) == l_632)) >= (**p_20)) ^ (((unsigned short)((unsigned char)((unsigned)g_425 % (unsigned)(((void*)0 == &p_20) || g_86)) % (unsigned char)0x80L) + (unsigned short)(*l_581)) <= 0xBA1A62BAL))), g_3, (*p_20), (*p_20))) >= l_691)) + { + step_hash(393); + if ((*g_2)) + break; + } + else + { + step_hash(401); + for (l_35 = 4; (l_35 <= 53); l_35 += 5) + { + step_hash(398); + (*l_581) ^= ((-1L) | p_18); + step_hash(399); + (*p_20) = (*p_20); + step_hash(400); + return l_694; + } + } + } + } + } + step_hash(427); + if (((~func_39(g_425, (*l_484), l_695, p_17)) >= 0xE6F3L)) + { + unsigned short l_708 = 0x14C5L; + int l_719 = 0xBBFDEA44L; + step_hash(414); + if ((*p_17)) + { + step_hash(408); + l_698 = (0xBD081EE4L || (((&p_20 == &p_20) == ((&g_156 == &p_20) == 0L)) <= p_18)); + step_hash(409); + (*l_484) ^= ((unsigned short)((void*)0 == &g_2) << (unsigned short)3); + } + else + { + int *l_705 = (void*)0; + int l_710 = 0x38DC6A6FL; + step_hash(411); + (*l_380) = ((unsigned short)l_708 % (unsigned short)p_19); + step_hash(412); + l_710 = (*p_17); + step_hash(413); + return p_19; + } + step_hash(415); + l_719 |= (-(unsigned char)((&g_2 == (void*)0) && ((unsigned)l_714 - (unsigned)(g_86 ^ g_425)))); + } + else + { + unsigned l_720 = 4294967295UL; + int l_723 = 0x934DF2BEL; + step_hash(417); + (*l_484) = (*p_17); + step_hash(424); + for (l_461 = 21; (l_461 <= 15); l_461 -= 2) + { + step_hash(421); + (*p_20) = (void*)0; + step_hash(422); + (*l_380) = (((p_18 & (&l_718 == &p_20)) || g_538) >= 0x085AL); + step_hash(423); + (*l_380) = (*l_695); + } + step_hash(425); + l_723 = (0L | p_18); + step_hash(426); + return p_18; + } + step_hash(428); + return (*l_380); +} +static unsigned func_33(short p_34) +{ + unsigned char l_36 = 1UL; + int *l_37 = &g_38; + step_hash(8); + (*l_37) &= l_36; + step_hash(207); + (*l_37) = func_39(func_44((!((short)0x9459L >> (short)func_50((*l_37), (*l_37)))), l_36, g_3), ((((void*)0 == &l_37) | 0x27E4D43CL) && g_3), &g_3, &g_3); + step_hash(208); + return g_86; +} +static int func_39(int p_40, unsigned p_41, int * p_42, int * p_43) +{ + int l_376 = 0xE75B7F2AL; + int *l_377 = (void*)0; + int **l_378 = &l_377; + step_hash(203); + for (g_86 = 0; (g_86 <= 14); ++g_86) + { + int **l_375 = &g_2; + step_hash(202); + (*l_375) = p_42; + } + step_hash(204); + l_376 |= g_3; + step_hash(205); + (*l_378) = l_377; + step_hash(206); + return (*p_42); +} +static int func_44(unsigned char p_45, int p_46, unsigned char p_47) +{ + int *l_100 = &g_38; + short l_117 = 0x03E5L; + short l_171 = 9L; + int l_172 = 0x459814C7L; + int l_178 = (-1L); + int *l_200 = &g_3; + int ***l_251 = &g_156; + int l_270 = 0xE4269A64L; + unsigned char l_274 = 0xE2L; + step_hash(136); + if ((g_3 >= ((((l_100 == l_100) | (((*l_100) < (((signed char)p_47 - (signed char)((*l_100) | p_47)) ^ ((-(unsigned char)(g_86 ^ ((*g_2) > p_46))) || (*l_100)))) <= 3UL)) & p_46) & (*l_100)))) + { + signed char l_118 = 1L; + int **l_136 = &l_100; + int **l_187 = &l_100; + step_hash(121); + if (((short)((g_38 | (2UL < ((unsigned char)p_45 >> (unsigned char)7))) || ((((unsigned)((short)((func_50(((unsigned char)(-(short)(*l_100)) >> (unsigned char)7), p_46) & (((unsigned)l_117 / (unsigned)g_3) >= p_45)) & g_3) << (short)p_46) % (unsigned)l_118) < g_3) < (-2L))) * (short)0x8A88L)) + { + unsigned l_125 = 0UL; + int **l_148 = &l_100; + step_hash(59); + if ((p_45 > ((unsigned short)((unsigned short)g_98 * (unsigned short)(((short)l_125 * (short)l_118) ^ (*l_100))) << (unsigned short)((g_3 > l_118) >= ((signed char)(((unsigned short)(7UL || (*l_100)) << (unsigned short)2) || 0x1B770899L) << (signed char)(*l_100)))))) + { + int **l_130 = &l_100; + step_hash(35); + (*l_130) = &g_38; + } + else + { + int *l_154 = &g_86; + signed char l_155 = (-1L); + step_hash(57); + if (func_50(p_47, (0L < g_98))) + { + unsigned char l_133 = 255UL; + int *l_157 = &g_3; + step_hash(38); + (*l_100) = (*g_2); + step_hash(45); + if ((*l_100)) + { + int **l_137 = &l_100; + int ***l_138 = &l_136; + step_hash(40); + (*l_138) = func_60(&g_38, func_50((*g_2), (*l_100)), (((int)(&g_3 != (void*)0) - (int)g_3) ^ l_133), (((unsigned char)(l_136 == l_137) % (unsigned char)p_46) <= g_3)); + } + else + { + unsigned short l_141 = 65533UL; + int **l_153 = &g_2; + step_hash(42); + (*l_100) ^= (-5L); + step_hash(43); + (*l_136) = (*l_136); + step_hash(44); + (*l_154) = ((short)((l_141 != ((g_38 != 8UL) >= (**l_136))) > g_98) % (short)1UL); + } + } + else + { + unsigned short l_168 = 0xB5CBL; + step_hash(47); + (*l_148) = func_65(p_47, l_148, (*l_100), ((unsigned)(((int)p_46 - (int)((unsigned short)g_3 - (unsigned short)((signed char)g_86 << (signed char)4))) && 0UL) % (unsigned)(p_45 | (((signed char)p_45 >> (signed char)g_3) && 0x32L)))); + step_hash(48); + l_168 ^= ((*g_2) >= g_98); + step_hash(55); + for (g_38 = 19; (g_38 == 7); g_38 -= 6) + { + step_hash(52); + if (l_171) + break; + step_hash(53); + (*l_154) ^= (*g_2); + step_hash(54); + l_172 = ((**l_148) > p_46); + } + step_hash(56); + g_2 = &l_172; + } + step_hash(58); + return p_46; + } + step_hash(60); + return p_46; + } + else + { + unsigned short l_177 = 3UL; + int l_208 = 0x6C9C1765L; + int **l_229 = &l_100; + unsigned short l_240 = 0x4B32L; + step_hash(120); + if ((((signed char)((!func_56(((short)func_56(l_177, &g_2, &g_3) >> (short)10), &l_100, (*l_136))) && (&l_172 == (void*)0)) % (signed char)l_178) <= 0x3A083379L)) + { + int *l_184 = &g_3; + unsigned short l_202 = 65528UL; + unsigned l_253 = 1UL; + step_hash(98); + if (((int)0xD04037D6L - (int)p_46)) + { + short l_188 = (-1L); + int **l_195 = &l_184; + int l_201 = 0xAA1BD0BAL; + step_hash(64); + (*g_2) = (((int)0xEE3E29BDL + (int)(-(unsigned char)(l_184 != l_184))) >= g_86); + step_hash(73); + if ((*l_184)) + { + step_hash(66); + (*g_2) = ((g_86 > (*l_100)) < (**l_187)); + step_hash(67); + (**l_187) ^= l_177; + step_hash(68); + l_201 &= (**l_187); + step_hash(69); + (*g_2) &= p_45; + } + else + { + int **l_207 = &g_2; + step_hash(71); + (**l_136) = l_202; + step_hash(72); + (**l_187) = (((short)(*l_184) / (short)(-10L)) < (((void*)0 != &g_2) > ((short)(*l_100) * (short)g_38))); + } + step_hash(74); + (*l_187) = (*l_195); + step_hash(83); + if ((*g_2)) + { + int *l_213 = &l_172; + step_hash(76); + (*g_2) = (*l_200); + step_hash(77); + l_208 = 0x6410FA4CL; + step_hash(78); + (*g_2) = (((signed char)((65535UL != 65535UL) & (*l_184)) >> (signed char)g_3) | (-6L)); + step_hash(79); + (*g_2) &= (*l_213); + } + else + { + int ***l_228 = &l_195; + step_hash(81); + (*l_187) = func_65(((unsigned char)((unsigned short)(((unsigned short)1UL / (unsigned short)((unsigned short)g_38 << (unsigned short)((unsigned char)g_3 - (unsigned char)((signed char)(((short)((void*)0 == l_228) + (short)((*l_136) != (void*)0)) > ((void*)0 != (*l_228))) + (signed char)0x66L)))) <= g_3) * (unsigned short)g_3) >> (unsigned char)4), l_229, (*g_2), p_46); + step_hash(82); + (*g_2) |= (&l_187 == (void*)0); + } + } + else + { + short l_237 = 0L; + int l_241 = 0x120FEED5L; + step_hash(90); + for (l_117 = (-17); (l_117 > 27); l_117 += 2) + { + int *l_234 = &l_208; + step_hash(88); + (*l_100) &= (+p_46); + step_hash(89); + (*l_234) ^= func_56(((*l_184) && ((short)p_47 >> (short)10)), &g_2, l_184); + } + step_hash(95); + if (p_47) + { + step_hash(92); + (**l_187) = ((short)func_56(p_47, func_60((*l_229), (**l_187), l_237, (*l_100)), func_65(g_98, &g_2, ((unsigned)(0L || (*g_2)) % (unsigned)1UL), g_3)) + (short)0x8686L); + } + else + { + step_hash(94); + (**l_229) &= p_46; + } + step_hash(96); + l_241 = l_240; + step_hash(97); + (**l_229) = (((signed char)(0L > 0x3C60L) % (signed char)(*l_184)) >= g_38); + } + step_hash(117); + for (l_118 = (-13); (l_118 <= (-4)); l_118 += 8) + { + int ***l_248 = (void*)0; + int l_257 = 0xEEB13F11L; + step_hash(102); + if (p_46) + break; + step_hash(107); + for (p_45 = 0; (p_45 >= 23); ++p_45) + { + step_hash(106); + (*g_2) |= ((void*)0 != l_248); + } + step_hash(108); + (*g_2) = (0x42L != 253UL); + step_hash(116); + for (l_208 = 0; (l_208 > (-19)); l_208--) + { + unsigned l_252 = 5UL; + step_hash(112); + (*g_2) = p_47; + step_hash(113); + l_252 |= ((&g_156 != l_251) || g_3); + step_hash(114); + (*l_187) = func_65(((!(l_253 < 0xD6L)) ^ l_252), l_229, (*g_2), (p_46 <= 0L)); + step_hash(115); + (*g_2) = (-(unsigned char)((unsigned)l_257 + (unsigned)((-1L) ^ p_45))); + } + } + } + else + { + step_hash(119); + (**l_187) ^= (1UL && ((*l_229) == (void*)0)); + } + } + } + else + { + unsigned short l_260 = 0x648DL; + int l_261 = 0L; + int **l_265 = &g_2; + step_hash(129); + if (func_50(l_260, p_47)) + { + step_hash(124); + return g_98; + } + else + { + int **l_262 = &l_200; + step_hash(126); + l_261 |= (*g_2); + step_hash(127); + (*l_262) = &l_261; + step_hash(128); + (*l_262) = &l_261; + } + step_hash(135); + for (g_38 = 6; (g_38 > (-14)); g_38 -= 2) + { + step_hash(133); + (*l_200) = (((void*)0 != l_265) && p_47); + step_hash(134); + (*l_200) = ((signed char)p_46 << (signed char)4); + } + } + step_hash(187); + if ((((0xBEL > p_45) != ((short)func_50((*l_100), (((p_46 || (l_270 < g_38)) <= (((signed char)((((void*)0 == &g_3) >= (-(unsigned short)(&g_86 != &l_172))) == g_98) << (signed char)3) < (*l_100))) & g_98)) - (short)g_3)) >= l_274)) + { + signed char l_284 = 0xE7L; + int *l_292 = &g_86; + signed char l_297 = 8L; + unsigned l_304 = 4294967293UL; + step_hash(159); + for (l_274 = 24; (l_274 <= 3); l_274 -= 6) + { + unsigned l_283 = 4294967295UL; + int **l_293 = &g_2; + int l_301 = 0xD5A7869CL; + step_hash(147); + for (p_46 = (-28); (p_46 > (-8)); p_46++) + { + step_hash(144); + (*g_2) &= p_46; + step_hash(145); + l_284 = ((((int)p_45 - (int)(3L || ((signed char)l_283 / (signed char)g_98))) != g_38) == g_98); + step_hash(146); + if (p_47) + break; + } + step_hash(152); + for (l_171 = (-6); (l_171 >= 29); l_171 += 4) + { + int *l_291 = (void*)0; + step_hash(151); + (*l_293) = func_65((((unsigned short)((unsigned short)0xF89DL << (unsigned short)14) - (unsigned short)func_56(g_86, func_60(l_291, l_284, func_56((*l_100), &g_2, l_292), (*l_292)), l_291)) && g_98), l_293, p_47, g_3); + } + step_hash(157); + if ((+(g_98 & p_46))) + { + step_hash(154); + (*l_292) = func_50(p_47, g_86); + } + else + { + int **l_294 = &l_200; + int *l_298 = &l_270; + step_hash(156); + (*l_294) = func_65(((+(0UL || (func_56(p_47, func_60(&l_270, (((void*)0 != l_294) ^ g_38), ((int)(((void*)0 != &g_156) < l_297) - (int)g_3), (**l_293)), l_298) > p_46))) <= 0xB6D0L), l_293, p_47, p_45); + } + step_hash(158); + (*g_2) = ((**l_293) > 0x74A1L); + } + step_hash(184); + if (((unsigned char)0x65L % (unsigned char)l_304)) + { + int l_307 = (-8L); + int **l_308 = &g_2; + step_hash(161); + (*g_2) = func_56(g_86, &g_2, &g_3); + step_hash(166); + if (func_56((((unsigned short)9UL >> (unsigned short)g_38) != l_307), l_308, l_292)) + { + step_hash(163); + (*l_308) = &g_3; + } + else + { + step_hash(165); + (*l_308) = &g_86; + } + step_hash(167); + (*l_292) ^= 1L; + } + else + { + int *l_317 = &l_270; + int l_356 = 0L; + step_hash(175); + if (((short)(&l_292 == &l_292) >> (short)func_56(((signed char)g_98 - (signed char)((signed char)p_46 * (signed char)((0xF631L >= ((short)((void*)0 == &g_2) >> (short)8)) || p_45))), func_60(l_317, g_38, (*l_100), p_47), l_317))) + { + int l_326 = (-1L); + step_hash(170); + (*l_317) = (((unsigned short)((unsigned char)(0xEE44L ^ (((short)(p_47 > ((void*)0 == &l_292)) - (short)((signed char)l_326 - (signed char)((g_86 < ((*l_251) != (void*)0)) > g_86))) & 65535UL)) >> (unsigned char)7) - (unsigned short)p_45) & p_47); + } + else + { + int **l_327 = &l_292; + step_hash(172); + (*l_292) = (*g_2); + step_hash(173); + (*g_2) |= (g_3 <= g_86); + step_hash(174); + (*l_292) = ((unsigned char)((*g_2) | 0x0656D313L) >> (unsigned char)p_45); + } + step_hash(176); + (*l_292) ^= ((0x1CE679D6L != ((unsigned char)(((((unsigned short)g_38 + (unsigned short)(*l_317)) < p_46) | 0L) == ((unsigned short)((signed char)((signed char)(g_98 > 0x2074L) + (signed char)((unsigned char)252UL % (unsigned char)p_47)) % (signed char)p_47) + (unsigned short)1UL)) + (unsigned char)0x43L)) | p_46); + step_hash(177); + g_156 = func_60(func_65((~g_86), &g_2, (*l_292), (*l_317)), g_98, ((unsigned short)((*l_251) != g_156) << (unsigned short)12), ((unsigned short)(g_98 <= p_47) * (unsigned short)0x87B8L)); + step_hash(183); + if (((((short)p_46 << (short)8) <= ((0L & 0xCBL) && (***l_251))) > ((g_38 | g_3) ^ p_45))) + { + step_hash(179); + return g_3; + } + else + { + step_hash(181); + (*g_2) = p_46; + step_hash(182); + l_356 &= ((signed char)0x42L * (signed char)((unsigned char)((short)(((signed char)((*l_317) == (*g_2)) + (signed char)p_45) | ((void*)0 == (*g_156))) >> (short)g_98) << (unsigned char)1)); + } + } + } + else + { + int l_357 = 0x0922B4A9L; + int **l_358 = &g_2; + step_hash(186); + (*l_358) = func_65(l_357, &g_2, p_46, (*l_100)); + } + step_hash(195); + if ((*g_2)) + { + step_hash(189); + g_2 = (void*)0; + step_hash(190); + return p_47; + } + else + { + int *l_359 = &g_38; + int **l_371 = (void*)0; + int **l_372 = &l_100; + step_hash(192); + (*l_359) = p_45; + step_hash(193); + (*l_372) = func_65(g_98, &g_2, p_45, g_38); + step_hash(194); + (*g_2) = p_46; + } + step_hash(196); + (*g_2) |= (-1L); + step_hash(197); + return g_86; +} +static unsigned short func_50(int p_51, int p_52) +{ + int *l_53 = &g_38; + int **l_99 = &g_2; + step_hash(10); + (*l_53) = (*g_2); + step_hash(21); + (*l_53) = (((short)func_56((*l_53), func_60(func_65((p_52 && (p_51 >= ((((unsigned char)(+g_3) * (unsigned char)((unsigned)((short)((int)p_52 + (int)((void*)0 == &g_2)) % (short)(p_51 && 8L)) / (unsigned)(*g_2))) | (*l_53)) < g_38))), &l_53, (*g_2), g_38), (*l_53), (*l_53), g_38), &g_3) * (short)p_52) <= g_3); + step_hash(28); + if (((unsigned short)0xCE30L * (unsigned short)((unsigned char)g_38 - (unsigned char)g_3))) + { + int *l_91 = &g_38; + int **l_92 = &g_2; + step_hash(23); + (*l_92) = l_91; + } + else + { + int **l_93 = (void*)0; + int **l_94 = &g_2; + step_hash(25); + (*g_2) = (*g_2); + step_hash(26); + (*l_94) = l_53; + step_hash(27); + g_98 ^= ((0UL ^ (!func_56(((unsigned short)(-(signed char)(*l_53)) % (unsigned short)p_52), func_60((*l_94), g_3, g_3, g_38), l_53))) != 0x15L); + } + step_hash(29); + (*l_99) = l_53; + step_hash(30); + return p_51; +} +static short func_56(unsigned p_57, int ** p_58, int * p_59) +{ + step_hash(19); + (**p_58) = ((void*)0 != &g_3); + step_hash(20); + return g_86; +} +static int ** func_60(int * p_61, short p_62, unsigned short p_63, int p_64) +{ + step_hash(17); + return &g_2; +} +static int * func_65(unsigned short p_66, int ** p_67, int p_68, unsigned p_69) +{ + int *l_80 = (void*)0; + int *l_85 = &g_86; + step_hash(12); + g_2 = &g_38; + step_hash(13); + l_80 = &g_38; + step_hash(14); + (*l_85) = ((unsigned char)((signed char)p_69 - (signed char)1L) << (unsigned char)6); + step_hash(15); + return (*p_67); +} +void csmith_compute_hash(void) +{ + transparent_crc(g_3, "g_3", print_hash_value); + transparent_crc(g_38, "g_38", print_hash_value); + transparent_crc(g_86, "g_86", print_hash_value); + transparent_crc(g_98, "g_98", print_hash_value); + transparent_crc(g_425, "g_425", print_hash_value); + transparent_crc(g_523, "g_523", print_hash_value); + transparent_crc(g_538, "g_538", print_hash_value); + transparent_crc(g_734, "g_734", print_hash_value); + transparent_crc(g_745, "g_745", print_hash_value); + transparent_crc(g_821, "g_821", print_hash_value); + transparent_crc(g_856, "g_856", print_hash_value); + transparent_crc(g_881, "g_881", print_hash_value); + transparent_crc(g_913, "g_913", print_hash_value); + transparent_crc(g_993, "g_993", print_hash_value); +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand11.expect b/src/tests/csmith/rand11.expect new file mode 100644 index 0000000..47bce0f --- /dev/null +++ b/src/tests/csmith/rand11.expect @@ -0,0 +1,60 @@ +...checksum after hashing g_3 : 5113CCF8 +...checksum after hashing g_38 : FED65D04 +...checksum after hashing g_86 : 39A96FF4 +...checksum after hashing g_98 : A610B3A1 +...checksum after hashing g_425 : C772B82B +...checksum after hashing g_523 : 3D8F7389 +...checksum after hashing g_538 : DD6A18D2 +...checksum after hashing g_734 : 9E47EED3 +...checksum after hashing g_745 : A6EA3425 +...checksum after hashing g_821 : 4869CAB7 +...checksum after hashing g_856 : 97E6E463 +...checksum after hashing g_881 : 62291F88 +...checksum after hashing g_913 : EAE253CD +...checksum after hashing g_993 : CD4DBD8E +before stmt(1): checksum = CD4DBD8E +...checksum after hashing g_3 : 5113CCF8 +...checksum after hashing g_38 : FED65D04 +...checksum after hashing g_86 : 39A96FF4 +...checksum after hashing g_98 : A610B3A1 +...checksum after hashing g_425 : C772B82B +...checksum after hashing g_523 : 3D8F7389 +...checksum after hashing g_538 : DD6A18D2 +...checksum after hashing g_734 : 9E47EED3 +...checksum after hashing g_745 : A6EA3425 +...checksum after hashing g_821 : 4869CAB7 +...checksum after hashing g_856 : 97E6E463 +...checksum after hashing g_881 : 62291F88 +...checksum after hashing g_913 : EAE253CD +...checksum after hashing g_993 : CD4DBD8E +before stmt(604): checksum = CD4DBD8E +...checksum after hashing g_3 : 2144DF1C +...checksum after hashing g_38 : 1C542CED +...checksum after hashing g_86 : 805C1ABC +...checksum after hashing g_98 : 71FC7718 +...checksum after hashing g_425 : DBD27C30 +...checksum after hashing g_523 : 96377D2D +...checksum after hashing g_538 : 78E5E55A +...checksum after hashing g_734 : 11114367 +...checksum after hashing g_745 : 74BC47B8 +...checksum after hashing g_821 : D5C86CED +...checksum after hashing g_856 : D7014826 +...checksum after hashing g_881 : 79623738 +...checksum after hashing g_913 : 5826552D +...checksum after hashing g_993 : 954640EE +before stmt(605): checksum = 954640EE +...checksum after hashing g_3 : 2144DF1C +...checksum after hashing g_38 : 1C542CED +...checksum after hashing g_86 : 805C1ABC +...checksum after hashing g_98 : 71FC7718 +...checksum after hashing g_425 : DBD27C30 +...checksum after hashing g_523 : 96377D2D +...checksum after hashing g_538 : 78E5E55A +...checksum after hashing g_734 : 11114367 +...checksum after hashing g_745 : 74BC47B8 +...checksum after hashing g_821 : D5C86CED +...checksum after hashing g_856 : D7014826 +...checksum after hashing g_881 : 79623738 +...checksum after hashing g_913 : 5826552D +...checksum after hashing g_993 : 954640EE +checksum = 954640ee diff --git a/src/tests/csmith/rand110.c b/src/tests/csmith/rand110.c new file mode 100644 index 0000000..426b028 --- /dev/null +++ b/src/tests/csmith/rand110.c @@ -0,0 +1,1291 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static int g_2 = 0x24A8C6A5L; +static int g_47 = 0xD53D2AE4L; +static unsigned short g_60 = 0x1B9BL; +static signed char g_118 = 0L; +static signed char g_143 = (-4L); +static int *g_149 = &g_2; +static int *g_153 = &g_2; +static signed char g_160 = 1L; +static int g_163 = 0x1E14FE22L; +static int g_168 = 1L; +static short g_169[9] = {0x8E0DL, 0x1F6BL, 0x8E0DL, 0x1F6BL, 0x8E0DL, 0x1F6BL, 0x8E0DL, 0x1F6BL, 0x8E0DL}; +static int g_170 = 0xDB654FA8L; +static short g_171 = 3L; +static short g_180 = 0x4318L; +static short g_181[3] = {0x626EL, 0x626EL, 0x626EL}; +static short g_182 = (-2L); +static signed char g_183 = (-1L); +static unsigned g_184 = 1UL; +static unsigned g_206[1][6] = {{4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL}}; +static int **g_241 = &g_149; +static int ***g_240[6] = {&g_241, &g_241, &g_241, &g_241, &g_241, &g_241}; +static unsigned char g_264[5][6] = {{0xE4L, 0UL, 0xE4L, 0UL, 0xE4L, 0UL}, {0xE4L, 0UL, 0xE4L, 0UL, 0xE4L, 0UL}, {0xE4L, 0UL, 0xE4L, 0UL, 0xE4L, 0UL}, {0xE4L, 0UL, 0xE4L, 0UL, 0xE4L, 0UL}, {0xE4L, 0UL, 0xE4L, 0UL, 0xE4L, 0UL}}; +static unsigned short g_277 = 0xA542L; +static int **g_364[7] = {&g_149, &g_149, &g_149, &g_149, &g_149, &g_149, &g_149}; +static short g_481 = 1L; +static short g_483 = 8L; +static int g_568 = (-1L); +static unsigned g_594 = 4294967295UL; +static short g_609[2][6] = {{0L, 0x7F01L, (-2L), (-2L), 0x7F01L, 0L}, {0L, 0x7F01L, (-2L), (-2L), 0x7F01L, 0L}}; +static short g_622 = 0x51D2L; +static int *g_696 = (void*)0; +static unsigned g_789 = 4294967295UL; +static int *g_862 = (void*)0; +static unsigned g_877 = 5UL; +static short g_908 = 0x9487L; +static int g_1187 = 0xB5F68AEFL; +static unsigned short g_1219[3] = {65526UL, 65526UL, 65526UL}; +static unsigned g_1510 = 0x795E7EECL; +static unsigned char g_1514 = 0x34L; +static short func_1(void); +static int func_5(unsigned char p_6, unsigned char p_7, unsigned p_8, signed char p_9, short p_10); +static int func_19(unsigned p_20, int p_21, unsigned char p_22, unsigned char p_23, signed char p_24); +static unsigned short func_27(unsigned short p_28, unsigned p_29, unsigned p_30); +static unsigned short func_36(unsigned p_37, unsigned p_38, unsigned char p_39, signed char p_40, signed char p_41); +static int * func_65(unsigned p_66, int * p_67, unsigned p_68, int p_69); +static signed char func_80(int * p_81, unsigned char p_82, short p_83, unsigned p_84, int p_85); +static int func_121(unsigned char p_122, short p_123); +static int * func_124(unsigned p_125, int * p_126); +static int func_127(int p_128, unsigned p_129, int * p_130, int * p_131, int * p_132); +static short func_1(void) +{ + unsigned short l_35[2][1]; + unsigned l_1425[7] = {1UL, 1UL, 0UL, 1UL, 1UL, 0UL, 1UL}; + int l_1458[2][2]; + int **l_1463 = (void*)0; + int l_1515 = 0x3003920BL; + unsigned l_1517 = 4294967295UL; + int i, j; + for (i = 0; i < 2; i++) + { + for (j = 0; j < 1; j++) + l_35[i][j] = 0xF8B4L; + } + for (i = 0; i < 2; i++) + { + for (j = 0; j < 2; j++) + l_1458[i][j] = 0xB16A6C64L; + } + step_hash(809); + for (g_2 = 0; (g_2 == 7); g_2 += 8) + { + unsigned l_13 = 0x3EE32743L; + int *l_1449 = &g_163; + int **l_1462 = (void*)0; + int l_1466[10][3] = {{0xC02E53E6L, (-2L), 0x7C201188L}, {0xC02E53E6L, (-2L), 0x7C201188L}, {0xC02E53E6L, (-2L), 0x7C201188L}, {0xC02E53E6L, (-2L), 0x7C201188L}, {0xC02E53E6L, (-2L), 0x7C201188L}, {0xC02E53E6L, (-2L), 0x7C201188L}, {0xC02E53E6L, (-2L), 0x7C201188L}, {0xC02E53E6L, (-2L), 0x7C201188L}, {0xC02E53E6L, (-2L), 0x7C201188L}, {0xC02E53E6L, (-2L), 0x7C201188L}}; + int *l_1513 = &g_168; + short l_1516 = (-9L); + int i, j; + } + step_hash(810); + l_1517++; + step_hash(811); + return g_481; +} +static int func_5(unsigned char p_6, unsigned char p_7, unsigned p_8, signed char p_9, short p_10) +{ + int l_1422 = 0xCD897E88L; + step_hash(744); + l_1422 = (l_1422 && (func_36((g_609[0][2] ^ 1L), g_1219[2], g_264[1][0], g_169[8], g_181[1]) > p_9)); + step_hash(745); + return p_7; +} +static int func_19(unsigned p_20, int p_21, unsigned char p_22, unsigned char p_23, signed char p_24) +{ + unsigned short l_893 = 1UL; + int *l_898 = &g_2; + int l_909 = 0x5BA3F23DL; + short l_911 = 0xA06BL; + int l_912[2][1]; + signed char l_913 = 0xB6L; + int l_946 = (-1L); + int l_953[8] = {1L, 0L, 1L, 0L, 1L, 0L, 1L, 0L}; + int *l_1009 = &l_953[5]; + signed char l_1014 = 0x00L; + int ***l_1054 = &g_241; + int *l_1066 = &l_912[1][0]; + unsigned short l_1077 = 1UL; + int *l_1133 = &l_953[5]; + signed char l_1140 = 0x1DL; + short l_1148 = 0x0BA7L; + int l_1149 = 0L; + int *l_1174[2][3] = {{&g_47, &g_47, (void*)0}, {&g_47, &g_47, (void*)0}}; + short l_1254 = 0x1287L; + short l_1321 = 1L; + int *l_1417[5] = {&l_912[0][0], &l_912[1][0], &l_912[0][0], &l_912[1][0], &l_912[0][0]}; + int i, j; + for (i = 0; i < 2; i++) + { + for (j = 0; j < 1; j++) + l_912[i][j] = 0xC1DF05E8L; + } + step_hash(699); + if ((*l_898)) + { + unsigned l_899 = 0xE477032BL; + int l_900 = 0x41CE44D2L; + step_hash(457); + l_900 = l_899; + step_hash(458); + l_900 = p_21; + step_hash(459); + return p_22; + } + else + { + int *l_905[10][4] = {{(void*)0, &g_168, &g_47, &g_168}, {(void*)0, &g_168, &g_47, &g_168}, {(void*)0, &g_168, &g_47, &g_168}, {(void*)0, &g_168, &g_47, &g_168}, {(void*)0, &g_168, &g_47, &g_168}, {(void*)0, &g_168, &g_47, &g_168}, {(void*)0, &g_168, &g_47, &g_168}, {(void*)0, &g_168, &g_47, &g_168}, {(void*)0, &g_168, &g_47, &g_168}, {(void*)0, &g_168, &g_47, &g_168}}; + int ***l_921 = &g_364[6]; + unsigned l_944 = 4294967295UL; + unsigned char l_987[2][9] = {{1UL, 1UL, 0x70L, 246UL, 0xF6L, 246UL, 0x70L, 1UL, 1UL}, {1UL, 1UL, 0x70L, 246UL, 0xF6L, 246UL, 0x70L, 1UL, 1UL}}; + unsigned l_991 = 4294967295UL; + int *l_992[3][3] = {{&g_168, &g_168, &l_953[3]}, {&g_168, &g_168, &l_953[3]}, {&g_168, &g_168, &l_953[3]}}; + int l_997 = (-1L); + signed char l_1065 = 0x06L; + int l_1073 = 1L; + unsigned short l_1093 = 0x900EL; + int l_1121 = 0L; + int *l_1171 = &l_1121; + int l_1244 = 0x098D35D0L; + short l_1277 = (-10L); + int *l_1322 = (void*)0; + int *l_1336 = &l_1149; + int i, j; + step_hash(523); + if ((((unsigned short)((unsigned short)0xA1A0L >> (unsigned short)13) + (unsigned short)(p_21 == func_80(l_905[9][1], g_143, func_27(g_182, p_21, p_21), p_23, g_789))) == 0xB1A7L)) + { + short l_906[8] = {0x680DL, 0x5615L, 0x680DL, 0x5615L, 0x680DL, 0x5615L, 0x680DL, 0x5615L}; + int l_907 = 0x1E2BE269L; + int l_910 = 0x51D8E82DL; + int l_914[6][2] = {{(-1L), (-1L)}, {(-1L), (-1L)}, {(-1L), (-1L)}, {(-1L), (-1L)}, {(-1L), (-1L)}, {(-1L), (-1L)}}; + short l_915[3]; + unsigned l_916 = 7UL; + int **l_926 = &l_898; + short l_929 = (-1L); + int i, j; + for (i = 0; i < 3; i++) + l_915[i] = 1L; + step_hash(462); + l_916--; + step_hash(468); + for (l_916 = 0; (l_916 < 35); ++l_916) + { + signed char l_930 = 0L; + int l_931 = 0x21B3892EL; + step_hash(466); + p_21 = func_27((((void*)0 != l_921) & (p_24 & (!((signed char)0xF7L / (signed char)((unsigned char)(0xEFL || ((void*)0 == l_926)) % (unsigned char)((unsigned char)251UL + (unsigned char)((void*)0 != &l_898))))))), l_929, l_930); + step_hash(467); + l_931 = (**l_926); + } + step_hash(469); + p_21 = p_22; + } + else + { + unsigned l_940 = 4294967294UL; + int l_949 = 0x2BCA82F7L; + int l_951 = 0x1130121FL; + int l_952 = 0L; + int l_959 = (-1L); + int l_962 = 0x2CC8EA25L; + signed char l_973 = 0L; + int l_974 = 0L; + int *l_986 = &l_953[7]; + int *l_1006[5][4] = {{&l_953[7], (void*)0, &l_997, &l_997}, {&l_953[7], (void*)0, &l_997, &l_997}, {&l_953[7], (void*)0, &l_997, &l_997}, {&l_953[7], (void*)0, &l_997, &l_997}, {&l_953[7], (void*)0, &l_997, &l_997}}; + unsigned char l_1067 = 0UL; + int i, j; + step_hash(499); + for (p_24 = 0; (p_24 >= 0); p_24 -= 1) + { + short l_943 = 0L; + int *l_945 = &g_47; + int l_950 = 0xF2A1F318L; + int l_954 = (-1L); + int l_956 = 0xAA53A08EL; + int l_958 = 4L; + int l_960 = (-4L); + int l_963 = (-4L); + int l_964 = 0x09A47A30L; + int l_965 = (-1L); + int l_967 = 0x6EA205E6L; + int l_970 = (-5L); + int l_971 = 2L; + int l_972 = (-1L); + step_hash(474); + (*g_241) = &p_21; + step_hash(475); + p_21 = (p_24 > (func_80(func_65((((unsigned short)(((**g_241) < p_21) ^ ((signed char)(((unsigned short)((unsigned short)l_940 - (unsigned short)(1UL < p_24)) * (unsigned short)func_36(((*g_153) <= 1L), ((int)((((~((0x775EBC43L > l_943) <= l_944)) || g_163) ^ 0x9965L) >= p_22) / (int)p_21), g_594, g_264[1][5], g_206[0][5])) ^ p_23) << (signed char)p_24)) - (unsigned short)0x95E4L) > (-9L)), l_945, p_22, l_940), l_946, g_143, g_171, p_21) == 0xE8L)); + step_hash(498); + for (l_893 = 0; (l_893 <= 0); l_893 += 1) + { + short l_947[10][2] = {{0x8813L, (-6L)}, {0x8813L, (-6L)}, {0x8813L, (-6L)}, {0x8813L, (-6L)}, {0x8813L, (-6L)}, {0x8813L, (-6L)}, {0x8813L, (-6L)}, {0x8813L, (-6L)}, {0x8813L, (-6L)}, {0x8813L, (-6L)}}; + int l_948[5][6]; + unsigned char l_975 = 1UL; + unsigned short l_978 = 0xEF91L; + int ***l_983 = &g_364[6]; + int l_1000 = 0xD4449F1DL; + int i, j; + for (i = 0; i < 5; i++) + { + for (j = 0; j < 6; j++) + l_948[i][j] = 1L; + } + step_hash(486); + for (g_483 = 0; (g_483 <= 0); g_483 += 1) + { + int l_955 = 0L; + int l_957 = 0xC6F9D72DL; + int l_961 = 0x39950F4EL; + int l_966 = 0x3158F380L; + int l_968 = 0x14F9D0BFL; + int l_969[7]; + int i, j; + for (i = 0; i < 7; i++) + l_969[i] = 0x0B9A8A53L; + step_hash(482); + l_975++; + step_hash(483); + (*l_945) ^= l_912[(g_483 + 1)][p_24]; + step_hash(484); + (**l_921) = &p_21; + step_hash(485); + ++l_978; + } + } + } + step_hash(500); + (*l_1009) = ((((unsigned)((0L || func_80(l_1009, g_206[0][5], func_36(((unsigned short)((((signed char)func_27(((void*)0 == l_921), (*l_986), g_877) / (signed char)(-4L)) > p_24) != (*l_986)) - (unsigned short)1L), p_23, p_22, p_22, g_2), (*l_898), p_22)) <= p_22) % (unsigned)l_1014) | g_622) >= 1L); + step_hash(501); + (*l_1009) = ((short)(((unsigned char)((((unsigned char)((unsigned char)g_481 << (unsigned char)(g_609[1][0] <= p_21)) << (unsigned char)4) ^ ((unsigned short)((unsigned short)(p_23 == (*l_986)) % (unsigned short)((p_24 | ((unsigned short)0xD5E7L * (unsigned short)0xB63CL)) && (*l_898))) * (unsigned short)g_181[1])) != (*l_898)) + (unsigned char)g_181[0]) != 0xA90DL) >> (short)0); + step_hash(522); + for (g_622 = 1; (g_622 >= 0); g_622 -= 1) + { + int ***l_1033 = &g_364[1]; + int l_1068 = 0xA211296BL; + int l_1071[3][2] = {{0x7485DD73L, 0x7485DD73L}, {0x7485DD73L, 0x7485DD73L}, {0x7485DD73L, 0x7485DD73L}}; + int i, j; + step_hash(509); + for (l_973 = 0; (l_973 <= 0); l_973 += 1) + { + int i, j; + step_hash(508); + (*l_1009) &= (l_912[l_973][l_973] ^ (((unsigned char)l_987[l_973][(l_973 + 3)] % (unsigned char)((int)g_206[l_973][l_973] - (int)(g_264[0][0] < (-1L)))) ^ p_21)); + } + step_hash(510); + (*l_1009) = ((((short)(((int)p_20 - (int)(((short)((signed char)(((((unsigned char)((void*)0 == &g_241) * (unsigned char)(l_1054 != l_1054)) > ((short)((unsigned char)((unsigned short)(((short)g_168 << (short)((unsigned short)((((((((p_24 >= (g_908 || g_168)) && (*l_1009)) | p_20) == 0x5820L) <= 65535UL) | 0x0AL) ^ p_20) != 0xB0D3L) << (unsigned short)g_182)) ^ g_609[1][0]) >> (unsigned short)8) - (unsigned char)g_568) + (short)p_22)) & g_789) || l_1067) % (signed char)g_908) << (short)15) | 0xB9D6558CL)) >= g_180) << (short)1) > 255UL) == 0x8C61A88DL); + step_hash(511); + p_21 &= ((void*)0 == &p_21); + step_hash(521); + for (l_952 = 0; (l_952 >= 0); l_952 -= 1) + { + short l_1070 = 0x4F35L; + int l_1072[10][1] = {{1L}, {1L}, {1L}, {1L}, {1L}, {1L}, {1L}, {1L}, {1L}, {1L}}; + int i, j; + step_hash(520); + for (l_959 = 0; (l_959 >= 0); l_959 -= 1) + { + int l_1069 = 0xD387E225L; + unsigned l_1074 = 0xCD55DC8EL; + int i, j; + step_hash(518); + l_1074--; + step_hash(519); + p_21 &= func_36(l_912[l_959][l_959], l_912[(l_959 + 1)][l_959], l_987[l_952][(l_952 + 6)], g_2, p_22); + } + } + } + } + step_hash(572); + for (g_160 = 6; (g_160 >= 0); g_160 -= 1) + { + int l_1082 = 0L; + int *l_1083 = (void*)0; + unsigned char l_1090 = 0xECL; + step_hash(527); + (*l_1009) ^= p_21; + step_hash(528); + (*g_241) = &p_21; + step_hash(529); + if ((*g_153)) + break; + step_hash(565); + if (((((void*)0 != (*l_1054)) && func_80(&p_21, (l_1077 == (p_20 >= p_23)), g_908, p_24, g_184)) & 0x96BEL)) + { + step_hash(531); + return p_22; + } + else + { + short l_1115 = 0xEDC8L; + int *l_1116 = (void*)0; + int l_1122[8] = {1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L}; + int i; + step_hash(563); + if ((((short)g_622 * (short)((0x8FL | (+(0x02L & g_481))) & func_27(((unsigned short)(((void*)0 == &g_364[3]) < ((signed char)g_184 % (signed char)l_1090)) << (unsigned short)12), ((unsigned char)(((g_168 ^ p_24) <= 1L) && 0xD5A2L) >> (unsigned char)7), p_21))) | l_1093)) + { + unsigned l_1096[8] = {1UL, 0x4060C70EL, 1UL, 0x4060C70EL, 1UL, 0x4060C70EL, 1UL, 0x4060C70EL}; + int l_1114 = 0x85F7C919L; + int i; + step_hash(534); + (*l_1009) = (p_23 | p_23); + step_hash(535); + (*g_241) = (**l_1054); + step_hash(540); + for (p_22 = 0; (p_22 <= 5); p_22 += 1) + { + step_hash(539); + (*l_1066) = ((short)0x2F66L >> (short)0); + } + step_hash(548); + for (g_171 = 0; (g_171 <= 1); g_171 += 1) + { + int i, j; + step_hash(544); + l_1096[7]--; + step_hash(545); + if (l_987[g_171][(g_171 + 7)]) + continue; + step_hash(546); + l_1114 |= ((signed char)((short)(((short)((void*)0 != (*l_1054)) * (short)((unsigned short)(((int)p_21 - (int)(g_264[0][4] | (((l_1096[0] == ((short)((short)0xF2D3L << (short)func_80((**l_921), (g_568 && (-(unsigned short)(!0xA78FL))), g_568, g_60, g_568)) * (short)g_264[4][3])) && g_277) >= g_60))) >= 0xE2L) * (unsigned short)p_22)) & p_20) / (short)g_481) / (signed char)p_20); + step_hash(547); + return l_1115; + } + } + else + { + int **l_1119 = (void*)0; + int *l_1120 = &l_997; + step_hash(556); + if (p_22) + { + step_hash(551); + (**l_921) = l_1083; + } + else + { + unsigned l_1123 = 4294967294UL; + int i; + step_hash(553); + l_1123++; + step_hash(554); + (**l_921) = &l_1122[4]; + step_hash(555); + (**g_241) ^= 1L; + } + step_hash(561); + for (g_180 = 0; (g_180 <= 5); g_180 += 1) + { + short l_1128 = 1L; + step_hash(560); + (*l_1120) = (3UL == func_80(l_1120, ((short)l_1128 * (short)g_163), g_206[0][3], func_36(((unsigned char)((unsigned short)((&g_364[6] != (void*)0) || g_168) << (unsigned short)(&g_241 == &g_241)) >> (unsigned char)g_169[8]), p_24, g_206[0][0], g_184, (*l_1009)), g_47)); + } + step_hash(562); + (**l_1054) = &p_21; + } + step_hash(564); + (*l_1066) |= (p_21 <= (4294967291UL < ((g_594 == (((l_1133 == (void*)0) | (-4L)) != ((short)func_80(&p_21, (((int)p_22 % (int)(+p_23)) != p_20), g_264[0][5], p_22, p_23) << (short)6))) | 0L))); + } + step_hash(571); + for (g_568 = 0; (g_568 <= 5); g_568 += 1) + { + int l_1141 = 0x9B094F94L; + step_hash(569); + l_1140 |= (((unsigned char)247UL / (unsigned char)(+p_23)) <= 0x84L); + step_hash(570); + if (l_1141) + continue; + } + } + step_hash(573); + (*g_241) = &p_21; + step_hash(698); + if (((~g_160) > (((unsigned char)func_80((**l_921), p_20, ((short)g_47 * (short)(***l_921)), func_36(g_609[1][0], ((unsigned)0x5DE6CA27L % (unsigned)l_1148), (*l_898), g_609[1][1], g_163), g_206[0][4]) * (unsigned char)l_1149) > p_20))) + { + unsigned char l_1156[10] = {255UL, 0x8DL, 0x62L, 0x62L, 0x8DL, 255UL, 0x8DL, 0x62L, 0x62L, 0x8DL}; + int l_1175 = 1L; + int l_1185 = 9L; + int l_1186[2][9] = {{(-8L), (-8L), 1L, (-8L), (-8L), 1L, (-8L), (-8L), 1L}, {(-8L), (-8L), 1L, (-8L), (-8L), 1L, (-8L), (-8L), 1L}}; + unsigned short l_1188 = 65530UL; + unsigned l_1196[10][2] = {{0xB2840402L, 1UL}, {0xB2840402L, 1UL}, {0xB2840402L, 1UL}, {0xB2840402L, 1UL}, {0xB2840402L, 1UL}, {0xB2840402L, 1UL}, {0xB2840402L, 1UL}, {0xB2840402L, 1UL}, {0xB2840402L, 1UL}, {0xB2840402L, 1UL}}; + int i, j; + step_hash(616); + if (((signed char)((signed char)(***l_1054) >> (signed char)((*l_1054) == (*l_921))) - (signed char)func_36(g_877, ((signed char)(g_609[0][5] < ((((void*)0 == &p_21) >= 4294967286UL) & p_22)) - (signed char)l_1156[9]), g_789, (***l_1054), p_20))) + { + signed char l_1165 = 6L; + int l_1181 = 0xF14441FDL; + int l_1182 = 0L; + int l_1183 = (-7L); + int l_1184[8] = {6L, 2L, 6L, 2L, 6L, 2L, 6L, 2L}; + int **l_1202 = &g_862; + int i; + step_hash(591); + if (((*g_149) & ((unsigned short)((*g_153) == ((unsigned char)p_23 - (unsigned char)(+0x4DL))) % (unsigned short)((unsigned short)((((void*)0 == &g_364[0]) & func_36(((*l_1133) ^ ((unsigned char)(p_24 ^ g_160) >> (unsigned char)l_1165)), l_1156[6], l_1165, p_24, p_23)) != p_22) % (unsigned short)p_21)))) + { + step_hash(581); + for (g_60 = 0; (g_60 <= 1); g_60 += 1) + { + int i; + step_hash(580); + return g_169[(g_60 + 7)]; + } + } + else + { + signed char l_1168 = 0x97L; + unsigned short l_1176[1][8] = {{0x7B16L, 0x6ED2L, 0x7B16L, 0x6ED2L, 0x7B16L, 0x6ED2L, 0x7B16L, 0x6ED2L}}; + int i, j; + step_hash(583); + (*l_1133) &= (((unsigned char)func_121(((***l_1054) <= g_908), l_1168) * (unsigned char)(g_181[0] >= 4UL)) & ((unsigned short)g_877 / (unsigned short)(-1L))); + step_hash(584); + (**g_241) = (&p_21 != l_1171); + step_hash(589); + for (g_877 = 0; (g_877 > 13); g_877 += 1) + { + step_hash(588); + (**l_921) = (**l_921); + } + step_hash(590); + l_1176[0][7]--; + } + step_hash(597); + for (g_183 = (-16); (g_183 >= 20); g_183 += 7) + { + step_hash(595); + (*l_1133) &= 0xC2BE1739L; + step_hash(596); + return p_22; + } + step_hash(598); + l_1188++; + step_hash(613); + for (g_170 = (-15); (g_170 > 25); g_170 += 6) + { + int *l_1195 = &l_1121; + step_hash(602); + if ((**g_241)) + break; + step_hash(611); + if ((l_1182 >= ((unsigned)(~(0x33L >= p_24)) - (unsigned)(*g_149)))) + { + int *l_1197 = &l_1186[1][1]; + step_hash(604); + p_21 = l_1182; + step_hash(605); + (**l_921) = &p_21; + step_hash(606); + (*l_1197) &= (((short)(*l_1133) >> (short)11) >= g_609[0][0]); + step_hash(607); + p_21 &= (((g_160 != (&p_21 == (*g_241))) >= ((((unsigned short)g_143 * (unsigned short)(l_1202 != &l_1195)) == g_483) <= g_594)) && (((short)((!((signed char)((g_789 >= l_1156[2]) | g_181[1]) - (signed char)1UL)) > 1L) / (short)9UL) != l_1185)); + } + else + { + unsigned char l_1207[4][3] = {{0x18L, 0xA8L, 0x18L}, {0x18L, 0xA8L, 0x18L}, {0x18L, 0xA8L, 0x18L}, {0x18L, 0xA8L, 0x18L}}; + int i, j; + step_hash(609); + ++l_1207[0][0]; + step_hash(610); + p_21 |= (p_20 <= (l_921 == &g_364[6])); + } + step_hash(612); + return l_1188; + } + } + else + { + step_hash(615); + (*l_1133) ^= p_21; + } + } + else + { + int *l_1214[5]; + unsigned char l_1248 = 0x6CL; + unsigned short l_1251 = 0x9B75L; + unsigned l_1256 = 0x6A7B2E7CL; + int ***l_1263 = &g_241; + int i; + for (i = 0; i < 5; i++) + l_1214[i] = (void*)0; + step_hash(663); + for (p_20 = 0; (p_20 <= 1); p_20 += 1) + { + int l_1231 = 0x67E08DB2L; + unsigned l_1234 = 0x100EFEDDL; + int l_1255[2][2]; + int ***l_1276[6] = {&g_241, &g_241, (void*)0, &g_241, &g_241, (void*)0}; + int i, j; + for (i = 0; i < 2; i++) + { + for (j = 0; j < 2; j++) + l_1255[i][j] = 0x3B2DDD24L; + } + } + step_hash(696); + for (l_1248 = (-18); (l_1248 != 52); l_1248 += 4) + { + int l_1280[2]; + int *l_1296 = &g_163; + int l_1297[8][6] = {{0xF43FA6C4L, 0xD2FF1DCFL, 0xF43FA6C4L, 0xD2FF1DCFL, 0xF43FA6C4L, 0xD2FF1DCFL}, {0xF43FA6C4L, 0xD2FF1DCFL, 0xF43FA6C4L, 0xD2FF1DCFL, 0xF43FA6C4L, 0xD2FF1DCFL}, {0xF43FA6C4L, 0xD2FF1DCFL, 0xF43FA6C4L, 0xD2FF1DCFL, 0xF43FA6C4L, 0xD2FF1DCFL}, {0xF43FA6C4L, 0xD2FF1DCFL, 0xF43FA6C4L, 0xD2FF1DCFL, 0xF43FA6C4L, 0xD2FF1DCFL}, {0xF43FA6C4L, 0xD2FF1DCFL, 0xF43FA6C4L, 0xD2FF1DCFL, 0xF43FA6C4L, 0xD2FF1DCFL}, {0xF43FA6C4L, 0xD2FF1DCFL, 0xF43FA6C4L, 0xD2FF1DCFL, 0xF43FA6C4L, 0xD2FF1DCFL}, {0xF43FA6C4L, 0xD2FF1DCFL, 0xF43FA6C4L, 0xD2FF1DCFL, 0xF43FA6C4L, 0xD2FF1DCFL}, {0xF43FA6C4L, 0xD2FF1DCFL, 0xF43FA6C4L, 0xD2FF1DCFL, 0xF43FA6C4L, 0xD2FF1DCFL}}; + short l_1303 = 0x685CL; + signed char l_1319 = 0xCDL; + int i, j; + for (i = 0; i < 2; i++) + l_1280[i] = 0x714C9F04L; + step_hash(680); + for (g_180 = 0; (g_180 <= 8); g_180 += 1) + { + unsigned short l_1298 = 0xE5B4L; + step_hash(670); + p_21 = l_1280[0]; + } + step_hash(695); + for (g_168 = 0; (g_168 >= (-13)); g_168 -= 8) + { + unsigned short l_1306 = 0xEB7EL; + unsigned l_1324 = 0UL; + step_hash(684); + (*l_1133) = (+(&p_21 == (**l_1263))); + step_hash(693); + if (func_80((**l_1263), (((&p_21 == &p_21) && (l_1303 == p_23)) >= p_20), ((signed char)((void*)0 != &g_241) >> (signed char)5), l_1306, p_24)) + { + short l_1320[8][3] = {{0xFF61L, 0x5A70L, 0xFF61L}, {0xFF61L, 0x5A70L, 0xFF61L}, {0xFF61L, 0x5A70L, 0xFF61L}, {0xFF61L, 0x5A70L, 0xFF61L}, {0xFF61L, 0x5A70L, 0xFF61L}, {0xFF61L, 0x5A70L, 0xFF61L}, {0xFF61L, 0x5A70L, 0xFF61L}, {0xFF61L, 0x5A70L, 0xFF61L}}; + int *l_1323 = (void*)0; + int i, j; + step_hash(686); + (*l_1066) = (((unsigned)0x4E8CC0BCL % (unsigned)(((((unsigned char)((short)0xE1DBL / (short)g_169[8]) << (unsigned char)3) & (***l_1054)) && l_1324) & (*l_1133))) != p_20); + step_hash(687); + (*l_1133) = (-6L); + step_hash(688); + (*l_1066) = (((signed char)(+(-(short)((unsigned)(((unsigned short)1UL + (unsigned short)0UL) | ((signed char)((((+g_182) || 1L) ^ (***l_1263)) ^ g_184) / (signed char)p_24)) / (unsigned)((unsigned short)g_163 - (unsigned short)(g_118 == p_22))))) + (signed char)g_168) | g_264[4][3]); + step_hash(689); + if (p_21) + break; + } + else + { + unsigned char l_1337 = 0x8DL; + step_hash(691); + (*l_1133) = ((p_20 != func_36((p_20 | (p_24 < p_23)), p_23, p_24, func_80(l_1336, g_180, g_184, g_609[1][0], g_1187), g_169[8])) || g_171); + step_hash(692); + if (l_1337) + break; + } + step_hash(694); + (*l_921) = (void*)0; + } + } + step_hash(697); + (**l_1263) = (**l_1263); + } + } + step_hash(741); + for (p_24 = 4; (p_24 >= 1); p_24 -= 1) + { + signed char l_1338[3]; + int *l_1355 = &l_1149; + int l_1364 = 0xF86B0A32L; + int l_1365 = 0xEAF68E67L; + int l_1370 = 0x28A3F8DCL; + int l_1371 = 0x76B49374L; + int l_1373 = 1L; + int l_1374 = 0x5E9E835CL; + int l_1377[5] = {(-1L), (-9L), (-1L), (-9L), (-1L)}; + short l_1410 = (-2L); + int *l_1418 = &l_909; + short l_1419 = 0x0113L; + int i; + for (i = 0; i < 3; i++) + l_1338[i] = 5L; + } + step_hash(742); + return p_24; +} +static unsigned short func_27(unsigned short p_28, unsigned p_29, unsigned p_30) +{ + short l_76 = (-1L); + int *l_77[9]; + signed char l_891 = 0xCBL; + unsigned l_892[9][3] = {{0x5410DABFL, 0xAE168533L, 0x6EDE564AL}, {0x5410DABFL, 0xAE168533L, 0x6EDE564AL}, {0x5410DABFL, 0xAE168533L, 0x6EDE564AL}, {0x5410DABFL, 0xAE168533L, 0x6EDE564AL}, {0x5410DABFL, 0xAE168533L, 0x6EDE564AL}, {0x5410DABFL, 0xAE168533L, 0x6EDE564AL}, {0x5410DABFL, 0xAE168533L, 0x6EDE564AL}, {0x5410DABFL, 0xAE168533L, 0x6EDE564AL}, {0x5410DABFL, 0xAE168533L, 0x6EDE564AL}}; + int i, j; + for (i = 0; i < 9; i++) + l_77[i] = &g_2; + step_hash(448); + for (p_30 = 0; (p_30 > 40); p_30 += 1) + { + unsigned char l_72 = 0x5AL; + int *l_86 = &g_47; + int l_863 = 0x1C3A6D85L; + int l_864 = 0x41A87B9FL; + int l_865 = 0x60445050L; + short l_866 = 9L; + int l_867 = 0x6801D6FEL; + int l_868 = 6L; + int l_869 = 1L; + int l_870 = 9L; + int l_871 = 5L; + int l_872 = 3L; + int l_873[3][6] = {{5L, 5L, 0x08659854L, (-1L), 0L, (-1L)}, {5L, 5L, 0x08659854L, (-1L), 0L, (-1L)}, {5L, 5L, 0x08659854L, (-1L), 0L, (-1L)}}; + unsigned short l_874 = 0x697AL; + int i, j; + } + step_hash(453); + for (g_170 = 0; (g_170 >= (-9)); --g_170) + { + int *l_882 = (void*)0; + step_hash(452); + (*g_241) = l_882; + } + step_hash(454); + return p_30; +} + + + + + + + +static unsigned short func_36(unsigned p_37, unsigned p_38, unsigned char p_39, signed char p_40, signed char p_41) +{ + int *l_46 = &g_47; + int l_48 = 1L; + int *l_49 = (void*)0; + int *l_50 = &l_48; + int *l_51 = &g_47; + int *l_52 = &g_47; + int *l_53 = &l_48; + int l_54 = (-4L); + int *l_55 = &g_47; + int *l_56 = &l_54; + int *l_57 = &g_47; + int *l_58[5][2] = {{(void*)0, (void*)0}, {(void*)0, (void*)0}, {(void*)0, (void*)0}, {(void*)0, (void*)0}, {(void*)0, (void*)0}}; + int l_59 = 0x236511F0L; + int i, j; + step_hash(6); + --g_60; + step_hash(7); + return (*l_57); +} + + + + + + + +static int * func_65(unsigned p_66, int * p_67, unsigned p_68, int p_69) +{ + unsigned l_283 = 1UL; + int *l_302 = &g_2; + int l_334 = 1L; + int l_343 = (-9L); + int l_344 = 0xD1ED096BL; + int l_347 = 0x8158996BL; + int l_349 = 1L; + int l_350 = 1L; + int l_351 = 0x19A99B7AL; + int l_352[10] = {0x358AF41BL, 0x358AF41BL, 0x033CB161L, 0x358AF41BL, 0x358AF41BL, 0x033CB161L, 0x358AF41BL, 0x358AF41BL, 0x033CB161L, 0x358AF41BL}; + int ***l_386 = &g_364[6]; + unsigned l_417 = 0xCA51754DL; + short l_477 = (-1L); + signed char l_544 = 0x64L; + short l_545 = 0xF955L; + unsigned char l_546 = 1UL; + unsigned char l_570 = 0x51L; + unsigned short l_636[7][2] = {{0UL, 5UL}, {0UL, 5UL}, {0UL, 5UL}, {0UL, 5UL}, {0UL, 5UL}, {0UL, 5UL}, {0UL, 5UL}}; + int *l_672 = &l_344; + int l_713[7] = {0x0D93A79EL, 0x0D93A79EL, 0xD45FC68DL, 0x0D93A79EL, 0x0D93A79EL, 0xD45FC68DL, 0x0D93A79EL}; + signed char l_742 = 0xDEL; + int l_823 = 0xBBF2409EL; + unsigned short l_824 = 0x7FD5L; + int l_841 = 1L; + unsigned l_842 = 4294967286UL; + int *l_845 = (void*)0; + int i, j; + step_hash(274); + for (g_60 = 0; (g_60 != 21); g_60++) + { + int l_292 = 0x75F8133EL; + int *l_305 = &g_163; + int l_332 = 0x81374B14L; + int l_335 = (-1L); + int l_339 = 0x9B219FC2L; + int l_340 = 0x3AF24F68L; + int l_341 = 0x22182E24L; + int l_342 = (-10L); + int l_346 = 0x15A7122BL; + int l_353 = 0x0B4E7AACL; + int ***l_433 = &g_364[6]; + unsigned l_451[9] = {4294967294UL, 4294967288UL, 4294967294UL, 4294967288UL, 4294967294UL, 4294967288UL, 4294967294UL, 4294967288UL, 4294967294UL}; + int l_479 = 0xDACAA398L; + int l_480 = 0L; + int l_482[10][2]; + unsigned l_521[3]; + int *l_539 = &l_347; + int *l_540 = &l_344; + int *l_541 = &l_353; + int *l_542 = &g_163; + int *l_543[3]; + int i, j; + for (i = 0; i < 10; i++) + { + for (j = 0; j < 2; j++) + l_482[i][j] = 0x0A20FAC9L; + } + for (i = 0; i < 3; i++) + l_521[i] = 0x52AF3082L; + for (i = 0; i < 3; i++) + l_543[i] = &l_334; + } + step_hash(281); + for (g_160 = 0; (g_160 == 19); g_160 += 1) + { + signed char l_553 = 0x2DL; + int *l_556[6]; + int i; + for (i = 0; i < 6; i++) + l_556[i] = &l_350; + step_hash(278); + (*p_67) = (((short)l_553 * (short)g_182) <= ((short)0x722FL + (short)(~g_264[0][4]))); + step_hash(279); + (*g_241) = l_556[0]; + step_hash(280); + (*g_149) = (*p_67); + } + step_hash(415); + for (p_69 = 0; (p_69 < 1); p_69++) + { + int *l_559 = &g_163; + unsigned char l_560 = 0x33L; + int l_567 = 9L; + int l_569[3][5] = {{0xCC8681FCL, 0xD8455F49L, 0xCC8681FCL, 0xD8455F49L, 0xCC8681FCL}, {0xCC8681FCL, 0xD8455F49L, 0xCC8681FCL, 0xD8455F49L, 0xCC8681FCL}, {0xCC8681FCL, 0xD8455F49L, 0xCC8681FCL, 0xD8455F49L, 0xCC8681FCL}}; + int l_620 = 2L; + unsigned l_658 = 8UL; + int *l_661 = &l_347; + int *l_671 = &l_349; + unsigned l_714[1]; + unsigned l_764 = 4294967293UL; + int i, j; + for (i = 0; i < 1; i++) + l_714[i] = 1UL; + } + step_hash(423); + if ((*l_672)) + { + int *l_818 = (void*)0; + int *l_819 = &l_334; + int *l_820 = &l_343; + int *l_821 = &l_352[0]; + int *l_822[8][4] = {{&g_168, &l_713[6], &l_713[6], &g_170}, {&g_168, &l_713[6], &l_713[6], &g_170}, {&g_168, &l_713[6], &l_713[6], &g_170}, {&g_168, &l_713[6], &l_713[6], &g_170}, {&g_168, &l_713[6], &l_713[6], &g_170}, {&g_168, &l_713[6], &l_713[6], &g_170}, {&g_168, &l_713[6], &l_713[6], &g_170}, {&g_168, &l_713[6], &l_713[6], &g_170}}; + int i, j; + step_hash(417); + l_824++; + step_hash(418); + (*l_820) = func_36((~((unsigned short)(***l_386) << (unsigned short)8)), p_68, g_160, (~((((&g_364[0] != (void*)0) | ((*g_149) < ((unsigned char)func_36(((short)((short)(((signed char)(*l_821) % (signed char)p_66) != ((0x0DL & g_181[1]) == 1UL)) + (short)p_69) * (short)0xE0D7L), (*l_819), g_264[4][3], p_68, g_568) % (unsigned char)0xC1L))) > g_183) ^ 0xFEC8L)), p_66); + } + else + { + int *l_837 = (void*)0; + int *l_838 = &l_344; + int *l_839[6]; + signed char l_840 = 0xB3L; + int i; + for (i = 0; i < 6; i++) + l_839[i] = &l_334; + step_hash(420); + (*l_672) &= ((void*)0 != l_837); + step_hash(421); + (*p_67) = (*p_67); + step_hash(422); + l_842++; + } + step_hash(424); + return l_845; +} + + + + + + + +static signed char func_80(int * p_81, unsigned char p_82, short p_83, unsigned p_84, int p_85) +{ + int *l_105 = &g_47; + signed char l_117 = 6L; + int l_272[8] = {0x56C0A20DL, 0x56C0A20DL, 0x732B217FL, 0x56C0A20DL, 0x56C0A20DL, 0x732B217FL, 0x56C0A20DL, 0x56C0A20DL}; + int *l_280 = &g_163; + int i; + step_hash(127); + for (p_83 = 0; (p_83 <= (-23)); p_83 -= 4) + { + unsigned char l_108 = 0x9AL; + unsigned l_120[7] = {0x58C9C965L, 0x58C9C965L, 4294967291UL, 0x58C9C965L, 0x58C9C965L, 4294967291UL, 0x58C9C965L}; + int l_267 = 0L; + int *l_268 = &g_170; + int *l_269 = &l_267; + int *l_270 = &g_168; + int *l_271 = &g_163; + int *l_273 = (void*)0; + int *l_274 = &g_168; + int *l_275 = &g_163; + int *l_276[8] = {&l_272[2], &g_168, &l_272[2], &g_168, &l_272[2], &g_168, &l_272[2], &g_168}; + int i; + step_hash(26); + if (((signed char)((signed char)((signed char)g_47 << (signed char)(((unsigned short)g_47 - (unsigned short)(l_105 == p_81)) ^ (l_108 > ((unsigned short)0UL % (unsigned short)(((unsigned short)((unsigned)((unsigned short)(p_83 >= (((void*)0 != p_81) > l_108)) >> (unsigned short)p_84) - (unsigned)g_60) - (unsigned short)p_83) | 0x18L))))) + (signed char)l_117) << (signed char)6)) + { + unsigned l_119[1]; + int i; + for (i = 0; i < 1; i++) + l_119[i] = 0xC5CEC10CL; + step_hash(17); + if (l_108) + break; + step_hash(18); + g_118 &= (7UL != (*l_105)); + step_hash(23); + for (p_82 = 0; (p_82 <= 0); p_82 += 1) + { + int i; + step_hash(22); + if (l_119[p_82]) + break; + } + } + else + { + step_hash(25); + return p_84; + } + step_hash(124); + for (p_84 = 0; (p_84 <= 6); p_84 += 1) + { + int i; + } + step_hash(125); + ++g_277; + step_hash(126); + return p_82; + } + step_hash(128); + (*l_280) |= (&l_272[2] != l_280); + step_hash(129); + (*g_241) = p_81; + step_hash(130); + return (*l_280); +} + + + + + + + +static int func_121(unsigned char p_122, short p_123) +{ + int l_135[10][6]; + int *l_152 = &g_47; + int ***l_262 = (void*)0; + int *l_263[5]; + short l_265 = 0x96ABL; + int l_266 = 0xE223FE2AL; + int i, j; + for (i = 0; i < 10; i++) + { + for (j = 0; j < 6; j++) + l_135[i][j] = 8L; + } + for (i = 0; i < 5; i++) + l_263[i] = &g_170; + step_hash(118); + l_152 = func_124((func_127((((unsigned char)((l_135[4][1] != (1L || ((l_135[4][1] && g_118) || (+((void*)0 == &g_2))))) ^ ((!(0xF5L == ((signed char)((unsigned char)((signed char)(0xD522L ^ 0x96F1L) / (signed char)g_118) >> (unsigned char)p_122) % (signed char)4UL))) >= g_118)) >> (unsigned char)6) == 9L), p_122, &l_135[2][4], &l_135[4][1], &l_135[4][1]) >= p_122), l_152); + step_hash(119); + g_264[4][3] = ((unsigned char)(((&l_152 == &l_152) == ((*l_152) == g_180)) >= ((short)((unsigned)((int)p_123 % (int)p_123) - (unsigned)(&g_241 != l_262)) >> (short)8)) % (unsigned char)func_127(((*g_149) != 0L), g_2, &l_135[7][2], &l_135[5][2], &l_135[9][5])); + step_hash(120); + l_265 = ((void*)0 != (*g_241)); + step_hash(121); + l_266 = (0xC0L == 0xEFL); + step_hash(122); + return p_122; +} + + + + + + + +static int * func_124(unsigned p_125, int * p_126) +{ + int *l_154 = (void*)0; + int l_155 = 0L; + int l_176[9][1] = {{0x9491B29FL}, {0x9491B29FL}, {0x9491B29FL}, {0x9491B29FL}, {0x9491B29FL}, {0x9491B29FL}, {0x9491B29FL}, {0x9491B29FL}, {0x9491B29FL}}; + int l_190[6] = {(-5L), (-5L), 0xC775878EL, (-5L), (-5L), 0xC775878EL}; + int *l_219 = &l_176[6][0]; + int *l_252 = &l_176[6][0]; + int *l_253[1][5] = {{&g_168, &g_168, &g_168, &g_168, &g_168}}; + int i, j; + step_hash(115); + if ((g_143 || (g_47 != g_143))) + { + step_hash(47); + return &g_47; + } + else + { + int l_172 = 0L; + int l_174 = 0xE64C0ED6L; + int l_177[4]; + int i; + for (i = 0; i < 4; i++) + l_177[i] = 0x2EC8A694L; + step_hash(64); + for (g_118 = (-14); (g_118 < 16); g_118 += 9) + { + unsigned char l_161 = 253UL; + int l_175 = (-7L); + int l_178 = (-6L); + int *l_191 = &g_163; + step_hash(62); + for (l_155 = (-30); (l_155 <= 21); l_155++) + { + int l_166 = 7L; + int l_167 = 0x37D4A057L; + int l_173 = 5L; + int l_179 = 0L; + int *l_187 = &g_170; + step_hash(55); + g_160 = (*g_153); + step_hash(60); + if (l_161) + { + int *l_162 = &g_163; + int *l_164 = (void*)0; + int *l_165[8] = {&g_47, &g_47, &g_163, &g_47, &g_47, &g_163, &g_47, &g_47}; + int i; + step_hash(57); + g_184++; + } + else + { + step_hash(59); + return l_187; + } + step_hash(61); + if ((*g_153)) + break; + } + step_hash(63); + (*l_191) = ((signed char)0xAAL - (signed char)(l_190[5] < (p_125 == p_125))); + } + step_hash(114); + if ((g_163 & (g_118 & ((((unsigned char)(g_169[6] < (!l_172)) + (unsigned char)((unsigned short)0UL - (unsigned short)((4294967295UL | (*p_126)) >= (((unsigned short)(((g_168 != l_174) <= p_125) ^ 0x9566L) >> (unsigned short)g_168) == l_177[2])))) <= g_60) != l_177[2])))) + { + int *l_198 = &g_168; + int l_199 = (-4L); + int l_200 = 0x3571D3B0L; + int *l_201 = (void*)0; + int *l_202 = &l_174; + int *l_203 = &l_200; + int *l_204 = &l_155; + int *l_205[5]; + int i; + for (i = 0; i < 5; i++) + l_205[i] = &l_174; + step_hash(66); + ++g_206[0][5]; + step_hash(74); + for (g_182 = 0; (g_182 <= 3); g_182 += 1) + { + int i; + step_hash(70); + l_177[g_182] ^= (*g_153); + step_hash(71); + if (l_177[1]) + break; + step_hash(72); + (*l_198) ^= ((((unsigned short)p_125 - (unsigned short)(((unsigned short)(l_177[1] == (*p_126)) << (unsigned short)1) & p_125)) > ((~((p_125 || g_180) || l_177[3])) == 0UL)) & p_125); + step_hash(73); + if (l_172) + break; + } + step_hash(75); + (*l_202) ^= (*l_204); + } + else + { + int **l_220[3][10] = {{&l_219, &l_219, &g_153, &l_219, &l_219, &g_153, &l_219, &l_219, &g_153, &l_219}, {&l_219, &l_219, &g_153, &l_219, &l_219, &g_153, &l_219, &l_219, &g_153, &l_219}, {&l_219, &l_219, &g_153, &l_219, &l_219, &g_153, &l_219, &l_219, &g_153, &l_219}}; + int i, j; + step_hash(77); + p_126 = &l_177[2]; + step_hash(112); + for (l_174 = 0; (l_174 <= 5); l_174 += 1) + { + int *l_244 = &g_168; + unsigned char l_249 = 255UL; + int i; + step_hash(81); + p_126 = &l_177[3]; + step_hash(82); + if (l_190[l_174]) + break; + step_hash(110); + for (g_118 = 3; (g_118 >= 0); g_118 -= 1) + { + int **l_221 = &l_154; + step_hash(93); + for (g_163 = 1; (g_163 <= 5); g_163 += 1) + { + int ***l_222 = (void*)0; + int ***l_223 = &l_221; + int i; + step_hash(89); + l_219 = &l_177[g_118]; + step_hash(90); + (*l_223) = l_221; + step_hash(91); + l_177[g_118] = (*g_153); + step_hash(92); + if ((*g_149)) + continue; + } + step_hash(100); + for (g_183 = 0; (g_183 <= 0); g_183 += 1) + { + int i, j; + step_hash(97); + (*p_126) = g_169[(g_183 + 5)]; + step_hash(98); + (*l_219) = g_206[g_183][g_118]; + step_hash(99); + return &g_168; + } + step_hash(109); + if ((*p_126)) + { + int *l_226 = (void*)0; + step_hash(102); + (*l_221) = l_226; + step_hash(103); + (*l_244) &= (((((unsigned short)func_127(l_190[l_174], ((short)((unsigned char)(-(unsigned short)((&g_149 != l_220[2][0]) ^ ((g_160 == (*p_126)) >= p_125))) >> (unsigned char)p_125) >> (short)7), (*g_241), p_126, p_126) >> (unsigned short)l_174) <= g_206[0][5]) & g_206[0][5]) & p_125); + step_hash(104); + (*p_126) = (*l_244); + } + else + { + step_hash(106); + (*l_244) |= (*l_219); + step_hash(107); + (*l_219) = ((unsigned short)((unsigned)2UL + (unsigned)0x29A21605L) >> (unsigned short)10); + step_hash(108); + (*p_126) &= l_249; + } + } + step_hash(111); + (*p_126) = ((1L < (((signed char)((**g_241) > (g_181[0] || (0x49L != 251UL))) % (signed char)8L) && (((&g_241 == (void*)0) && ((void*)0 == &p_126)) & p_125))) == p_125); + } + step_hash(113); + l_252 = p_126; + } + } + step_hash(116); + (*g_241) = l_253[0][3]; + step_hash(117); + return (*g_241); +} + + + + + + + +static int func_127(int p_128, unsigned p_129, int * p_130, int * p_131, int * p_132) +{ + int l_142 = 0x4B622C33L; + int l_151[1][1]; + int i, j; + for (i = 0; i < 1; i++) + { + for (j = 0; j < 1; j++) + l_151[i][j] = (-6L); + } + step_hash(32); + (*p_132) = (l_142 >= g_143); + step_hash(38); + for (l_142 = 0; (l_142 < (-19)); l_142 -= 2) + { + unsigned l_148 = 0x50633388L; + int **l_150 = &g_149; + step_hash(36); + (*p_131) &= ((signed char)7L * (signed char)l_148); + step_hash(37); + (*l_150) = g_149; + } + step_hash(43); + for (g_143 = 0; (g_143 <= 0); g_143 += 1) + { + step_hash(42); + return (*p_132); + } + step_hash(44); + return (*g_149); +} + + +void csmith_compute_hash(void) +{ + int i, j; + transparent_crc(g_2, "g_2", print_hash_value); + transparent_crc(g_47, "g_47", print_hash_value); + transparent_crc(g_60, "g_60", print_hash_value); + transparent_crc(g_118, "g_118", print_hash_value); + transparent_crc(g_143, "g_143", print_hash_value); + transparent_crc(g_160, "g_160", print_hash_value); + transparent_crc(g_163, "g_163", print_hash_value); + transparent_crc(g_168, "g_168", print_hash_value); + for (i = 0; i < 9; i++) + { + transparent_crc(g_169[i], "g_169[i]", print_hash_value); + if (print_hash_value) printf("index = [%d]\n", i); + + } + transparent_crc(g_170, "g_170", print_hash_value); + transparent_crc(g_171, "g_171", print_hash_value); + transparent_crc(g_180, "g_180", print_hash_value); + for (i = 0; i < 3; i++) + { + transparent_crc(g_181[i], "g_181[i]", print_hash_value); + if (print_hash_value) printf("index = [%d]\n", i); + + } + transparent_crc(g_182, "g_182", print_hash_value); + transparent_crc(g_183, "g_183", print_hash_value); + transparent_crc(g_184, "g_184", print_hash_value); + for (i = 0; i < 1; i++) + { + for (j = 0; j < 6; j++) + { + transparent_crc(g_206[i][j], "g_206[i][j]", print_hash_value); + if (print_hash_value) printf("index = [%d][%d]\n", i, j); + + } + } + for (i = 0; i < 5; i++) + { + for (j = 0; j < 6; j++) + { + transparent_crc(g_264[i][j], "g_264[i][j]", print_hash_value); + if (print_hash_value) printf("index = [%d][%d]\n", i, j); + + } + } + transparent_crc(g_277, "g_277", print_hash_value); + transparent_crc(g_481, "g_481", print_hash_value); + transparent_crc(g_483, "g_483", print_hash_value); + transparent_crc(g_568, "g_568", print_hash_value); + transparent_crc(g_594, "g_594", print_hash_value); + for (i = 0; i < 2; i++) + { + for (j = 0; j < 6; j++) + { + transparent_crc(g_609[i][j], "g_609[i][j]", print_hash_value); + if (print_hash_value) printf("index = [%d][%d]\n", i, j); + + } + } + transparent_crc(g_622, "g_622", print_hash_value); + transparent_crc(g_789, "g_789", print_hash_value); + transparent_crc(g_877, "g_877", print_hash_value); + transparent_crc(g_908, "g_908", print_hash_value); + transparent_crc(g_1187, "g_1187", print_hash_value); + for (i = 0; i < 3; i++) + { + transparent_crc(g_1219[i], "g_1219[i]", print_hash_value); + if (print_hash_value) printf("index = [%d]\n", i); + + } + transparent_crc(g_1510, "g_1510", print_hash_value); + transparent_crc(g_1514, "g_1514", print_hash_value); +} + +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} + + + +int main (void) +{ + int i, j; + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand110.expect b/src/tests/csmith/rand110.expect new file mode 100644 index 0000000..2c5b093 --- /dev/null +++ b/src/tests/csmith/rand110.expect @@ -0,0 +1,612 @@ +...checksum after hashing g_2 : 940E0EE9 +...checksum after hashing g_47 : 19DAFDCB +...checksum after hashing g_60 : 589AF9F9 +...checksum after hashing g_118 : 8E217538 +...checksum after hashing g_143 : C709120 +...checksum after hashing g_160 : E392F05D +...checksum after hashing g_163 : B653F3B0 +...checksum after hashing g_168 : 809C2344 +...checksum after hashing g_169[i] : 98925251 +index = [0] +...checksum after hashing g_169[i] : 7B332AA4 +index = [1] +...checksum after hashing g_169[i] : 42CCA354 +index = [2] +...checksum after hashing g_169[i] : BAD58861 +index = [3] +...checksum after hashing g_169[i] : 3DE49222 +index = [4] +...checksum after hashing g_169[i] : 4CCF3A81 +index = [5] +...checksum after hashing g_169[i] : C9B25496 +index = [6] +...checksum after hashing g_169[i] : 1DCCC569 +index = [7] +...checksum after hashing g_169[i] : 53A03B0D +index = [8] +...checksum after hashing g_170 : 5DE7DEBE +...checksum after hashing g_171 : 4DAE1903 +...checksum after hashing g_180 : FF9E08AE +...checksum after hashing g_181[i] : D08937F5 +index = [0] +...checksum after hashing g_181[i] : 4DE0A434 +index = [1] +...checksum after hashing g_181[i] : 46C514E9 +index = [2] +...checksum after hashing g_182 : DE295A2A +...checksum after hashing g_183 : 74767BFB +...checksum after hashing g_184 : BE36C53B +...checksum after hashing g_206[i][j] : EA74DB0A +index = [0][0] +...checksum after hashing g_206[i][j] : 1A1272DE +index = [0][1] +...checksum after hashing g_206[i][j] : EB9704C2 +index = [0][2] +...checksum after hashing g_206[i][j] : 2D6A5683 +index = [0][3] +...checksum after hashing g_206[i][j] : B2EF6B70 +index = [0][4] +...checksum after hashing g_206[i][j] : 2CCB4621 +index = [0][5] +...checksum after hashing g_264[i][j] : E16523C +index = [0][0] +...checksum after hashing g_264[i][j] : FA1FA0B +index = [0][1] +...checksum after hashing g_264[i][j] : 30A8E84D +index = [0][2] +...checksum after hashing g_264[i][j] : AFCCD8A9 +index = [0][3] +...checksum after hashing g_264[i][j] : EA861D4F +index = [0][4] +...checksum after hashing g_264[i][j] : DBCB93FF +index = [0][5] +...checksum after hashing g_264[i][j] : 60060CF2 +index = [1][0] +...checksum after hashing g_264[i][j] : 1FD93E8A +index = [1][1] +...checksum after hashing g_264[i][j] : 9BAE415 +index = [1][2] +...checksum after hashing g_264[i][j] : 8F9EFE5B +index = [1][3] +...checksum after hashing g_264[i][j] : 49CAE62F +index = [1][4] +...checksum after hashing g_264[i][j] : 4A6F0A96 +index = [1][5] +...checksum after hashing g_264[i][j] : 9989ED3B +index = [2][0] +...checksum after hashing g_264[i][j] : C4C6EBAD +index = [2][1] +...checksum after hashing g_264[i][j] : 6346818B +index = [2][2] +...checksum after hashing g_264[i][j] : 897347F0 +index = [2][3] +...checksum after hashing g_264[i][j] : 1B9C9520 +index = [2][4] +...checksum after hashing g_264[i][j] : 2D3F06C3 +index = [2][5] +...checksum after hashing g_264[i][j] : 52D4260 +index = [3][0] +...checksum after hashing g_264[i][j] : 393CDFD1 +index = [3][1] +...checksum after hashing g_264[i][j] : 4C925475 +index = [3][2] +...checksum after hashing g_264[i][j] : 2A0DECFD +index = [3][3] +...checksum after hashing g_264[i][j] : C2B85956 +index = [3][4] +...checksum after hashing g_264[i][j] : F5391D71 +index = [3][5] +...checksum after hashing g_264[i][j] : 7C777580 +index = [4][0] +...checksum after hashing g_264[i][j] : A7EA11BA +index = [4][1] +...checksum after hashing g_264[i][j] : FB5143E7 +index = [4][2] +...checksum after hashing g_264[i][j] : 91FFD285 +index = [4][3] +...checksum after hashing g_264[i][j] : 38FFF084 +index = [4][4] +...checksum after hashing g_264[i][j] : 4D9DC84C +index = [4][5] +...checksum after hashing g_277 : 4D163926 +...checksum after hashing g_481 : 23EE1E7E +...checksum after hashing g_483 : 1B320136 +...checksum after hashing g_568 : 4C68AF28 +...checksum after hashing g_594 : 9A138E67 +...checksum after hashing g_609[i][j] : 1D2B1DE4 +index = [0][0] +...checksum after hashing g_609[i][j] : 9EC0E0E8 +index = [0][1] +...checksum after hashing g_609[i][j] : 212748E0 +index = [0][2] +...checksum after hashing g_609[i][j] : 7919A7E1 +index = [0][3] +...checksum after hashing g_609[i][j] : C6789A2C +index = [0][4] +...checksum after hashing g_609[i][j] : AEC566C7 +index = [0][5] +...checksum after hashing g_609[i][j] : 16713D5 +index = [1][0] +...checksum after hashing g_609[i][j] : 94040E60 +index = [1][1] +...checksum after hashing g_609[i][j] : E5F5D0CA +index = [1][2] +...checksum after hashing g_609[i][j] : 6A91A0C7 +index = [1][3] +...checksum after hashing g_609[i][j] : 318A2FD6 +index = [1][4] +...checksum after hashing g_609[i][j] : 81D8487F +index = [1][5] +...checksum after hashing g_622 : 5EEC7A9A +...checksum after hashing g_789 : A7CD3AA +...checksum after hashing g_877 : D8DC82C2 +...checksum after hashing g_908 : 8E866ADB +...checksum after hashing g_1187 : 69DBF098 +...checksum after hashing g_1219[i] : A743DD39 +index = [0] +...checksum after hashing g_1219[i] : A745994F +index = [1] +...checksum after hashing g_1219[i] : C8D8E495 +index = [2] +...checksum after hashing g_1510 : 1648B1FB +...checksum after hashing g_1514 : 782C537 +before stmt(809): checksum = 782C537 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_47 : 95B4A4D5 +...checksum after hashing g_60 : 94414548 +...checksum after hashing g_118 : 17B5C9FC +...checksum after hashing g_143 : A5E58BFB +...checksum after hashing g_160 : A04A8D70 +...checksum after hashing g_163 : 1E16206D +...checksum after hashing g_168 : 8E6E59F3 +...checksum after hashing g_169[i] : 806367CC +index = [0] +...checksum after hashing g_169[i] : 8727C0C +index = [1] +...checksum after hashing g_169[i] : 824C9E7E +index = [2] +...checksum after hashing g_169[i] : F90EEB03 +index = [3] +...checksum after hashing g_169[i] : 6B43D42D +index = [4] +...checksum after hashing g_169[i] : 3F5054A +index = [5] +...checksum after hashing g_169[i] : 84031D44 +index = [6] +...checksum after hashing g_169[i] : 1B69A0E0 +index = [7] +...checksum after hashing g_169[i] : B7FE26EE +index = [8] +...checksum after hashing g_170 : E8C56F0 +...checksum after hashing g_171 : AD28CE17 +...checksum after hashing g_180 : 65F03666 +...checksum after hashing g_181[i] : A62105F5 +index = [0] +...checksum after hashing g_181[i] : B5B77722 +index = [1] +...checksum after hashing g_181[i] : FAE4267E +index = [2] +...checksum after hashing g_182 : 9719588D +...checksum after hashing g_183 : 770841EE +...checksum after hashing g_184 : D8B80712 +...checksum after hashing g_206[i][j] : A4B40838 +index = [0][0] +...checksum after hashing g_206[i][j] : 95617244 +index = [0][1] +...checksum after hashing g_206[i][j] : 407FB186 +index = [0][2] +...checksum after hashing g_206[i][j] : 2D2AA696 +index = [0][3] +...checksum after hashing g_206[i][j] : 9095F008 +index = [0][4] +...checksum after hashing g_206[i][j] : 73B649DB +index = [0][5] +...checksum after hashing g_264[i][j] : 8DD4A81C +index = [0][0] +...checksum after hashing g_264[i][j] : 9ABDC465 +index = [0][1] +...checksum after hashing g_264[i][j] : A3B69A71 +index = [0][2] +...checksum after hashing g_264[i][j] : FF03DEAF +index = [0][3] +...checksum after hashing g_264[i][j] : EC69A454 +index = [0][4] +...checksum after hashing g_264[i][j] : A6D9CCE8 +index = [0][5] +...checksum after hashing g_264[i][j] : 9C68770B +index = [1][0] +...checksum after hashing g_264[i][j] : F3661808 +index = [1][1] +...checksum after hashing g_264[i][j] : B8CBBCD3 +index = [1][2] +...checksum after hashing g_264[i][j] : 3455FB24 +index = [1][3] +...checksum after hashing g_264[i][j] : 8E0F08F +index = [1][4] +...checksum after hashing g_264[i][j] : 711F717F +index = [1][5] +...checksum after hashing g_264[i][j] : F46EF4EA +index = [2][0] +...checksum after hashing g_264[i][j] : 6BE5D560 +index = [2][1] +...checksum after hashing g_264[i][j] : 3154B6D2 +index = [2][2] +...checksum after hashing g_264[i][j] : E3C3B4C6 +index = [2][3] +...checksum after hashing g_264[i][j] : 30FCD92A +index = [2][4] +...checksum after hashing g_264[i][j] : F24300E4 +index = [2][5] +...checksum after hashing g_264[i][j] : A9A350EA +index = [3][0] +...checksum after hashing g_264[i][j] : DE1AA496 +index = [3][1] +...checksum after hashing g_264[i][j] : EF4547BF +index = [3][2] +...checksum after hashing g_264[i][j] : AC3B5E3C +index = [3][3] +...checksum after hashing g_264[i][j] : 47544D2B +index = [3][4] +...checksum after hashing g_264[i][j] : 185AA5D3 +index = [3][5] +...checksum after hashing g_264[i][j] : C033AD07 +index = [4][0] +...checksum after hashing g_264[i][j] : 23C8E16 +index = [4][1] +...checksum after hashing g_264[i][j] : 7B7D2F69 +index = [4][2] +...checksum after hashing g_264[i][j] : 93DC947 +index = [4][3] +...checksum after hashing g_264[i][j] : F3D03422 +index = [4][4] +...checksum after hashing g_264[i][j] : AD91935C +index = [4][5] +...checksum after hashing g_277 : 7159029C +...checksum after hashing g_481 : 219195BC +...checksum after hashing g_483 : 6CBFD7CF +...checksum after hashing g_568 : 7E4EBD1E +...checksum after hashing g_594 : 5BF88CA0 +...checksum after hashing g_609[i][j] : A4DCC734 +index = [0][0] +...checksum after hashing g_609[i][j] : D1CA95C5 +index = [0][1] +...checksum after hashing g_609[i][j] : 3DC92133 +index = [0][2] +...checksum after hashing g_609[i][j] : DE02C314 +index = [0][3] +...checksum after hashing g_609[i][j] : D99AE294 +index = [0][4] +...checksum after hashing g_609[i][j] : CDA1A5C1 +index = [0][5] +...checksum after hashing g_609[i][j] : 62CFFA51 +index = [1][0] +...checksum after hashing g_609[i][j] : E269C220 +index = [1][1] +...checksum after hashing g_609[i][j] : 8F612630 +index = [1][2] +...checksum after hashing g_609[i][j] : 8A499E3E +index = [1][3] +...checksum after hashing g_609[i][j] : DFA130E +index = [1][4] +...checksum after hashing g_609[i][j] : 4F19C08C +index = [1][5] +...checksum after hashing g_622 : 8B248053 +...checksum after hashing g_789 : 4CF0FF3D +...checksum after hashing g_877 : C195D7B9 +...checksum after hashing g_908 : 1D1FFD91 +...checksum after hashing g_1187 : ACAB1519 +...checksum after hashing g_1219[i] : 99BE51E5 +index = [0] +...checksum after hashing g_1219[i] : 439BFFD1 +index = [1] +...checksum after hashing g_1219[i] : 61C10B60 +index = [2] +...checksum after hashing g_1510 : 314472A7 +...checksum after hashing g_1514 : 1C0FA753 +before stmt(810): checksum = 1C0FA753 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_47 : 95B4A4D5 +...checksum after hashing g_60 : 94414548 +...checksum after hashing g_118 : 17B5C9FC +...checksum after hashing g_143 : A5E58BFB +...checksum after hashing g_160 : A04A8D70 +...checksum after hashing g_163 : 1E16206D +...checksum after hashing g_168 : 8E6E59F3 +...checksum after hashing g_169[i] : 806367CC +index = [0] +...checksum after hashing g_169[i] : 8727C0C +index = [1] +...checksum after hashing g_169[i] : 824C9E7E +index = [2] +...checksum after hashing g_169[i] : F90EEB03 +index = [3] +...checksum after hashing g_169[i] : 6B43D42D +index = [4] +...checksum after hashing g_169[i] : 3F5054A +index = [5] +...checksum after hashing g_169[i] : 84031D44 +index = [6] +...checksum after hashing g_169[i] : 1B69A0E0 +index = [7] +...checksum after hashing g_169[i] : B7FE26EE +index = [8] +...checksum after hashing g_170 : E8C56F0 +...checksum after hashing g_171 : AD28CE17 +...checksum after hashing g_180 : 65F03666 +...checksum after hashing g_181[i] : A62105F5 +index = [0] +...checksum after hashing g_181[i] : B5B77722 +index = [1] +...checksum after hashing g_181[i] : FAE4267E +index = [2] +...checksum after hashing g_182 : 9719588D +...checksum after hashing g_183 : 770841EE +...checksum after hashing g_184 : D8B80712 +...checksum after hashing g_206[i][j] : A4B40838 +index = [0][0] +...checksum after hashing g_206[i][j] : 95617244 +index = [0][1] +...checksum after hashing g_206[i][j] : 407FB186 +index = [0][2] +...checksum after hashing g_206[i][j] : 2D2AA696 +index = [0][3] +...checksum after hashing g_206[i][j] : 9095F008 +index = [0][4] +...checksum after hashing g_206[i][j] : 73B649DB +index = [0][5] +...checksum after hashing g_264[i][j] : 8DD4A81C +index = [0][0] +...checksum after hashing g_264[i][j] : 9ABDC465 +index = [0][1] +...checksum after hashing g_264[i][j] : A3B69A71 +index = [0][2] +...checksum after hashing g_264[i][j] : FF03DEAF +index = [0][3] +...checksum after hashing g_264[i][j] : EC69A454 +index = [0][4] +...checksum after hashing g_264[i][j] : A6D9CCE8 +index = [0][5] +...checksum after hashing g_264[i][j] : 9C68770B +index = [1][0] +...checksum after hashing g_264[i][j] : F3661808 +index = [1][1] +...checksum after hashing g_264[i][j] : B8CBBCD3 +index = [1][2] +...checksum after hashing g_264[i][j] : 3455FB24 +index = [1][3] +...checksum after hashing g_264[i][j] : 8E0F08F +index = [1][4] +...checksum after hashing g_264[i][j] : 711F717F +index = [1][5] +...checksum after hashing g_264[i][j] : F46EF4EA +index = [2][0] +...checksum after hashing g_264[i][j] : 6BE5D560 +index = [2][1] +...checksum after hashing g_264[i][j] : 3154B6D2 +index = [2][2] +...checksum after hashing g_264[i][j] : E3C3B4C6 +index = [2][3] +...checksum after hashing g_264[i][j] : 30FCD92A +index = [2][4] +...checksum after hashing g_264[i][j] : F24300E4 +index = [2][5] +...checksum after hashing g_264[i][j] : A9A350EA +index = [3][0] +...checksum after hashing g_264[i][j] : DE1AA496 +index = [3][1] +...checksum after hashing g_264[i][j] : EF4547BF +index = [3][2] +...checksum after hashing g_264[i][j] : AC3B5E3C +index = [3][3] +...checksum after hashing g_264[i][j] : 47544D2B +index = [3][4] +...checksum after hashing g_264[i][j] : 185AA5D3 +index = [3][5] +...checksum after hashing g_264[i][j] : C033AD07 +index = [4][0] +...checksum after hashing g_264[i][j] : 23C8E16 +index = [4][1] +...checksum after hashing g_264[i][j] : 7B7D2F69 +index = [4][2] +...checksum after hashing g_264[i][j] : 93DC947 +index = [4][3] +...checksum after hashing g_264[i][j] : F3D03422 +index = [4][4] +...checksum after hashing g_264[i][j] : AD91935C +index = [4][5] +...checksum after hashing g_277 : 7159029C +...checksum after hashing g_481 : 219195BC +...checksum after hashing g_483 : 6CBFD7CF +...checksum after hashing g_568 : 7E4EBD1E +...checksum after hashing g_594 : 5BF88CA0 +...checksum after hashing g_609[i][j] : A4DCC734 +index = [0][0] +...checksum after hashing g_609[i][j] : D1CA95C5 +index = [0][1] +...checksum after hashing g_609[i][j] : 3DC92133 +index = [0][2] +...checksum after hashing g_609[i][j] : DE02C314 +index = [0][3] +...checksum after hashing g_609[i][j] : D99AE294 +index = [0][4] +...checksum after hashing g_609[i][j] : CDA1A5C1 +index = [0][5] +...checksum after hashing g_609[i][j] : 62CFFA51 +index = [1][0] +...checksum after hashing g_609[i][j] : E269C220 +index = [1][1] +...checksum after hashing g_609[i][j] : 8F612630 +index = [1][2] +...checksum after hashing g_609[i][j] : 8A499E3E +index = [1][3] +...checksum after hashing g_609[i][j] : DFA130E +index = [1][4] +...checksum after hashing g_609[i][j] : 4F19C08C +index = [1][5] +...checksum after hashing g_622 : 8B248053 +...checksum after hashing g_789 : 4CF0FF3D +...checksum after hashing g_877 : C195D7B9 +...checksum after hashing g_908 : 1D1FFD91 +...checksum after hashing g_1187 : ACAB1519 +...checksum after hashing g_1219[i] : 99BE51E5 +index = [0] +...checksum after hashing g_1219[i] : 439BFFD1 +index = [1] +...checksum after hashing g_1219[i] : 61C10B60 +index = [2] +...checksum after hashing g_1510 : 314472A7 +...checksum after hashing g_1514 : 1C0FA753 +before stmt(811): checksum = 1C0FA753 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_47 : 95B4A4D5 +...checksum after hashing g_60 : 94414548 +...checksum after hashing g_118 : 17B5C9FC +...checksum after hashing g_143 : A5E58BFB +...checksum after hashing g_160 : A04A8D70 +...checksum after hashing g_163 : 1E16206D +...checksum after hashing g_168 : 8E6E59F3 +...checksum after hashing g_169[i] : 806367CC +index = [0] +...checksum after hashing g_169[i] : 8727C0C +index = [1] +...checksum after hashing g_169[i] : 824C9E7E +index = [2] +...checksum after hashing g_169[i] : F90EEB03 +index = [3] +...checksum after hashing g_169[i] : 6B43D42D +index = [4] +...checksum after hashing g_169[i] : 3F5054A +index = [5] +...checksum after hashing g_169[i] : 84031D44 +index = [6] +...checksum after hashing g_169[i] : 1B69A0E0 +index = [7] +...checksum after hashing g_169[i] : B7FE26EE +index = [8] +...checksum after hashing g_170 : E8C56F0 +...checksum after hashing g_171 : AD28CE17 +...checksum after hashing g_180 : 65F03666 +...checksum after hashing g_181[i] : A62105F5 +index = [0] +...checksum after hashing g_181[i] : B5B77722 +index = [1] +...checksum after hashing g_181[i] : FAE4267E +index = [2] +...checksum after hashing g_182 : 9719588D +...checksum after hashing g_183 : 770841EE +...checksum after hashing g_184 : D8B80712 +...checksum after hashing g_206[i][j] : A4B40838 +index = [0][0] +...checksum after hashing g_206[i][j] : 95617244 +index = [0][1] +...checksum after hashing g_206[i][j] : 407FB186 +index = [0][2] +...checksum after hashing g_206[i][j] : 2D2AA696 +index = [0][3] +...checksum after hashing g_206[i][j] : 9095F008 +index = [0][4] +...checksum after hashing g_206[i][j] : 73B649DB +index = [0][5] +...checksum after hashing g_264[i][j] : 8DD4A81C +index = [0][0] +...checksum after hashing g_264[i][j] : 9ABDC465 +index = [0][1] +...checksum after hashing g_264[i][j] : A3B69A71 +index = [0][2] +...checksum after hashing g_264[i][j] : FF03DEAF +index = [0][3] +...checksum after hashing g_264[i][j] : EC69A454 +index = [0][4] +...checksum after hashing g_264[i][j] : A6D9CCE8 +index = [0][5] +...checksum after hashing g_264[i][j] : 9C68770B +index = [1][0] +...checksum after hashing g_264[i][j] : F3661808 +index = [1][1] +...checksum after hashing g_264[i][j] : B8CBBCD3 +index = [1][2] +...checksum after hashing g_264[i][j] : 3455FB24 +index = [1][3] +...checksum after hashing g_264[i][j] : 8E0F08F +index = [1][4] +...checksum after hashing g_264[i][j] : 711F717F +index = [1][5] +...checksum after hashing g_264[i][j] : F46EF4EA +index = [2][0] +...checksum after hashing g_264[i][j] : 6BE5D560 +index = [2][1] +...checksum after hashing g_264[i][j] : 3154B6D2 +index = [2][2] +...checksum after hashing g_264[i][j] : E3C3B4C6 +index = [2][3] +...checksum after hashing g_264[i][j] : 30FCD92A +index = [2][4] +...checksum after hashing g_264[i][j] : F24300E4 +index = [2][5] +...checksum after hashing g_264[i][j] : A9A350EA +index = [3][0] +...checksum after hashing g_264[i][j] : DE1AA496 +index = [3][1] +...checksum after hashing g_264[i][j] : EF4547BF +index = [3][2] +...checksum after hashing g_264[i][j] : AC3B5E3C +index = [3][3] +...checksum after hashing g_264[i][j] : 47544D2B +index = [3][4] +...checksum after hashing g_264[i][j] : 185AA5D3 +index = [3][5] +...checksum after hashing g_264[i][j] : C033AD07 +index = [4][0] +...checksum after hashing g_264[i][j] : 23C8E16 +index = [4][1] +...checksum after hashing g_264[i][j] : 7B7D2F69 +index = [4][2] +...checksum after hashing g_264[i][j] : 93DC947 +index = [4][3] +...checksum after hashing g_264[i][j] : F3D03422 +index = [4][4] +...checksum after hashing g_264[i][j] : AD91935C +index = [4][5] +...checksum after hashing g_277 : 7159029C +...checksum after hashing g_481 : 219195BC +...checksum after hashing g_483 : 6CBFD7CF +...checksum after hashing g_568 : 7E4EBD1E +...checksum after hashing g_594 : 5BF88CA0 +...checksum after hashing g_609[i][j] : A4DCC734 +index = [0][0] +...checksum after hashing g_609[i][j] : D1CA95C5 +index = [0][1] +...checksum after hashing g_609[i][j] : 3DC92133 +index = [0][2] +...checksum after hashing g_609[i][j] : DE02C314 +index = [0][3] +...checksum after hashing g_609[i][j] : D99AE294 +index = [0][4] +...checksum after hashing g_609[i][j] : CDA1A5C1 +index = [0][5] +...checksum after hashing g_609[i][j] : 62CFFA51 +index = [1][0] +...checksum after hashing g_609[i][j] : E269C220 +index = [1][1] +...checksum after hashing g_609[i][j] : 8F612630 +index = [1][2] +...checksum after hashing g_609[i][j] : 8A499E3E +index = [1][3] +...checksum after hashing g_609[i][j] : DFA130E +index = [1][4] +...checksum after hashing g_609[i][j] : 4F19C08C +index = [1][5] +...checksum after hashing g_622 : 8B248053 +...checksum after hashing g_789 : 4CF0FF3D +...checksum after hashing g_877 : C195D7B9 +...checksum after hashing g_908 : 1D1FFD91 +...checksum after hashing g_1187 : ACAB1519 +...checksum after hashing g_1219[i] : 99BE51E5 +index = [0] +...checksum after hashing g_1219[i] : 439BFFD1 +index = [1] +...checksum after hashing g_1219[i] : 61C10B60 +index = [2] +...checksum after hashing g_1510 : 314472A7 +...checksum after hashing g_1514 : 1C0FA753 +checksum = 1c0fa753 diff --git a/src/tests/csmith/rand12.c b/src/tests/csmith/rand12.c new file mode 100644 index 0000000..2c7206e --- /dev/null +++ b/src/tests/csmith/rand12.c @@ -0,0 +1,469 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static int g_4 = 0L; +static int g_83 = (-4L); +static unsigned char g_84 = 0x1BL; +static int *g_109 = &g_83; +static int **g_108 = &g_109; +static int g_111 = 1L; +static int g_151 = 0x60E86605L; +static int func_1(void); +static signed char func_5(unsigned char p_6, unsigned p_7, unsigned short p_8, int p_9); +static unsigned func_11(unsigned char p_12, int p_13, unsigned char p_14, unsigned char p_15, unsigned p_16); +static unsigned func_17(short p_18, short p_19, signed char p_20, unsigned p_21, int p_22); +static unsigned short func_23(int p_24, short p_25, signed char p_26, int p_27); +static int * func_30(int * p_31, int * p_32, signed char p_33, int p_34, unsigned p_35); +static unsigned short func_45(int * p_46, unsigned p_47, short p_48); +static int * func_49(signed char p_50, unsigned short p_51, int p_52); +static unsigned func_59(unsigned p_60, unsigned short p_61); +static signed char func_99(unsigned p_100, unsigned char p_101, int ** p_102); +static int func_1(void) +{ + unsigned l_10 = 4294967295UL; + int *l_263 = &g_4; + unsigned l_264 = 0UL; + unsigned short l_275 = 65535UL; + int l_276 = (-1L); + int l_277 = 0x19D2B6AFL; + int l_278 = 0L; + step_hash(141); + (*l_263) = ((unsigned char)g_4 + (unsigned char)func_5(l_10, func_11((3UL != l_10), (l_10 < (0xADF1ADB2L == func_17(l_10, (func_23(g_4, l_10, l_10, l_10) | 1L), g_4, g_4, l_10))), g_4, l_10, l_10), g_4, l_10)); + step_hash(142); + l_264 ^= (*l_263); + step_hash(143); + l_278 ^= ((short)((unsigned char)func_11(((&g_4 == &g_111) & ((*l_263) != (g_151 ^ (*l_263)))), (*l_263), (((short)((((signed char)(&g_109 != &g_109) - (signed char)0L) || l_275) & 0UL) / (short)l_276) & (*l_263)), g_151, l_277) * (unsigned char)0x2EL) * (short)0x87C8L); + step_hash(144); + return (*l_263); +} +static signed char func_5(unsigned char p_6, unsigned p_7, unsigned short p_8, int p_9) +{ + int l_251 = 8L; + int l_262 = (-1L); + step_hash(139); + l_262 = (((unsigned short)((unsigned)0xFD0F9B15L + (unsigned)p_6) * (unsigned short)((unsigned)(l_251 && l_251) + (unsigned)((unsigned)((unsigned short)((signed char)0L * (signed char)p_8) / (unsigned short)func_11(p_6, ((int)(((short)l_251 + (short)(9UL | 7L)) | g_4) % (int)l_251), l_251, l_251, p_9)) - (unsigned)p_7))) >= 4L); + step_hash(140); + return p_8; +} +static unsigned func_11(unsigned char p_12, int p_13, unsigned char p_14, unsigned char p_15, unsigned p_16) +{ + int l_241 = 0xFC9FD4B6L; + int *l_242 = (void*)0; + step_hash(136); + p_13 |= (p_14 < 1L); + step_hash(137); + return p_12; +} +static unsigned func_17(short p_18, short p_19, signed char p_20, unsigned p_21, int p_22) +{ + signed char l_230 = 0L; + int *l_231 = (void*)0; + int *l_232 = (void*)0; + int *l_233 = &g_83; + step_hash(132); + (*l_233) ^= l_230; + step_hash(133); + (*l_233) = (g_84 || g_151); + step_hash(134); + return p_19; +} +static unsigned short func_23(int p_24, short p_25, signed char p_26, int p_27) +{ + int *l_36 = (void*)0; + unsigned l_53 = 1UL; + unsigned char l_54 = 254UL; + int l_197 = 0x6B3F0A27L; + int **l_224 = &l_36; + unsigned l_227 = 0x1EA3EF8AL; + unsigned l_228 = 1UL; + int *l_229 = &g_111; + step_hash(6); + for (p_24 = (-29); (p_24 < 16); p_24++) + { + step_hash(5); + return g_4; + } + step_hash(127); + (*l_224) = func_30(l_36, &g_4, ((((unsigned char)p_24 / (unsigned char)((short)((short)((p_24 ^ (((unsigned short)(func_45(func_49((((void*)0 == &g_4) <= ((void*)0 == &g_4)), l_53, l_54), l_197, g_4) == 5L) % (unsigned short)p_24) | p_24)) && 254UL) * (short)65534UL) * (short)65535UL)) != l_197) < l_54), g_4, p_27); + step_hash(128); + (*l_224) = (*l_224); + step_hash(129); + (*l_229) = ((unsigned short)(l_227 < l_228) << (unsigned short)p_26); + step_hash(130); + return g_111; +} +static int * func_30(int * p_31, int * p_32, signed char p_33, int p_34, unsigned p_35) +{ + unsigned l_206 = 0x2EFCB156L; + int *l_207 = (void*)0; + int *l_208 = (void*)0; + int l_209 = 0xCE538C8CL; + unsigned l_210 = 4294967289UL; + int **l_220 = &l_207; + step_hash(114); + l_209 &= l_206; + step_hash(120); + if (l_210) + { + int *l_211 = (void*)0; + step_hash(116); + return l_211; + } + else + { + int *l_221 = &g_83; + step_hash(118); + (*l_221) = ((*p_32) || (~((signed char)((unsigned short)p_34 * (unsigned short)(-3L)) << (signed char)(((unsigned short)(!((signed char)g_83 >> (signed char)g_111)) >> (unsigned short)10) != (*p_32))))); + step_hash(119); + (*l_221) &= (*p_32); + } + step_hash(125); + for (g_83 = 0; (g_83 != (-21)); g_83 -= 1) + { + step_hash(124); + (*l_220) = p_32; + } + step_hash(126); + return p_31; +} +static unsigned short func_45(int * p_46, unsigned p_47, short p_48) +{ + unsigned short l_198 = 65532UL; + int *l_201 = &g_4; + short l_202 = 0x7024L; + int **l_205 = &l_201; + step_hash(108); + (*p_46) ^= l_198; + step_hash(109); + (*p_46) = (p_47 == ((unsigned short)g_151 * (unsigned short)func_59((func_59(g_83, p_47) == (p_48 < p_48)), (((l_198 <= (l_201 == p_46)) < 0x43L) <= (*l_201))))); + step_hash(110); + (*l_205) = p_46; + step_hash(111); + (**l_205) = func_59((*l_201), (*l_201)); + step_hash(112); + return p_47; +} +static int * func_49(signed char p_50, unsigned short p_51, int p_52) +{ + int *l_76 = &g_4; + int *l_196 = &g_83; + step_hash(104); + if ((((unsigned short)((unsigned char)0x5CL * (unsigned char)((0x4F9AL && g_4) != func_59(((short)g_4 * (short)((unsigned)((unsigned char)(0xB6L & ((signed char)p_52 >> (signed char)4)) * (unsigned char)((&p_52 != &g_4) == (((signed char)((short)((short)((void*)0 != l_76) - (short)65531UL) / (short)g_4) * (signed char)p_50) < g_4))) / (unsigned)g_4)), p_52))) % (unsigned short)p_52) == 0L)) + { + int l_85 = (-4L); + int *l_195 = (void*)0; + step_hash(100); + if ((func_59((*l_76), ((*l_76) != (~func_59(p_52, g_4)))) == l_85)) + { + int **l_86 = (void*)0; + int **l_87 = (void*)0; + int **l_88 = &l_76; + step_hash(13); + (*l_88) = (void*)0; + } + else + { + unsigned short l_107 = 0xABC0L; + int *l_188 = &g_83; + step_hash(96); + (*l_188) = (((signed char)p_50 / (signed char)((signed char)(p_52 & (g_83 <= ((g_4 & ((signed char)((int)(+((((((((signed char)func_99((p_51 <= ((signed char)(0x221FL && (*l_76)) << (signed char)5)), ((unsigned short)g_83 << (unsigned short)((g_83 | l_107) & 1L)), g_108) * (signed char)g_83) && (-5L)) | g_83) ^ (-1L)) || p_52) != g_4) == g_4)) + (int)p_50) >> (signed char)7)) | g_83))) - (signed char)255UL)) | 5L); + step_hash(97); + g_108 = &l_188; + step_hash(98); + (**g_108) = (((unsigned char)p_52 >> (unsigned char)(*l_188)) <= 4294967294UL); + step_hash(99); + (*l_188) &= 0xC00CB0D7L; + } + step_hash(101); + p_52 = (((unsigned short)((l_85 > ((func_59(g_4, ((void*)0 == &p_52)) | ((unsigned)1UL + (unsigned)p_52)) > p_51)) < ((((g_84 < g_4) == g_151) >= l_85) ^ 0x2628C699L)) >> (unsigned short)13) < 0xF3680C6DL); + } + else + { + step_hash(103); + return (*g_108); + } + step_hash(105); + (*l_196) = ((g_83 < p_52) || (-10L)); + step_hash(106); + return l_196; +} +static unsigned func_59(unsigned p_60, unsigned short p_61) +{ + unsigned char l_77 = 0x93L; + int *l_82 = &g_83; + step_hash(9); + (*l_82) ^= (l_77 == (0L == ((signed char)((unsigned)l_77 % (unsigned)p_60) << (signed char)(65535UL >= (g_4 | g_4))))); + step_hash(10); + return g_84; +} +static signed char func_99(unsigned p_100, unsigned char p_101, int ** p_102) +{ + int *l_110 = &g_111; + unsigned l_160 = 4UL; + step_hash(16); + (*p_102) = (void*)0; + step_hash(17); + (*l_110) = ((void*)0 == p_102); + step_hash(94); + for (g_84 = 1; (g_84 <= 46); ++g_84) + { + unsigned l_118 = 0x1E24EB76L; + unsigned l_145 = 4294967295UL; + int **l_149 = &g_109; + unsigned l_152 = 0x14404B11L; + unsigned l_159 = 0xE352C4D3L; + step_hash(21); + (*g_108) = (void*)0; + step_hash(22); + (*g_108) = (void*)0; + step_hash(93); + if (((int)((unsigned short)g_83 << (unsigned short)0) - (int)p_101)) + { + unsigned char l_123 = 0xF2L; + int l_124 = 0x9E214278L; + step_hash(24); + (*p_102) = l_110; + step_hash(25); + l_124 ^= ((l_118 | ((signed char)(-9L) * (signed char)((int)((void*)0 != (*g_108)) / (int)((p_100 || ((l_123 || ((void*)0 == (*p_102))) || (*l_110))) & p_100)))) || p_100); + } + else + { + int *l_140 = &g_83; + step_hash(91); + if ((p_101 && g_4)) + { + unsigned char l_127 = 251UL; + int **l_168 = &g_109; + int l_171 = 0x5E220DBAL; + step_hash(32); + if ((l_118 > ((((*p_102) == (*p_102)) == (!0xA7FA1A71L)) < ((int)0x0F0864F5L % (int)(*l_110))))) + { + step_hash(29); + if (l_118) + break; + } + else + { + step_hash(31); + (*l_110) = l_127; + } + step_hash(65); + if ((((unsigned short)0UL >> (unsigned short)((signed char)(((int)l_127 % (int)((unsigned char)((p_100 < ((p_100 > ((unsigned char)((short)(((((*g_108) == l_140) > g_111) != (*l_140)) && (0x4AL <= g_4)) - (short)p_101) >> (unsigned char)1)) >= 0xCA91F7CAL)) || 0xC7L) % (unsigned char)5UL)) != l_118) + (signed char)g_4)) < l_118)) + { + step_hash(34); + (*l_110) = ((unsigned short)l_127 * (unsigned short)(*l_110)); + step_hash(40); + if (p_100) + { + step_hash(36); + if (g_84) + break; + } + else + { + step_hash(38); + (*l_110) = (+((unsigned char)p_100 * (unsigned char)l_145)); + step_hash(39); + if (g_84) + break; + } + step_hash(49); + if (l_145) + { + unsigned l_146 = 0x2B028A4BL; + int *l_150 = &g_151; + step_hash(42); + if (l_146) + break; + step_hash(43); + (*l_150) |= ((~(g_4 > l_127)) || ((((((((signed char)g_84 << (signed char)0) || (&g_109 != l_149)) >= p_100) || p_100) || ((*p_102) == (*p_102))) < (*l_110)) != g_111)); + step_hash(44); + if (p_100) + continue; + step_hash(45); + if (l_127) + break; + } + else + { + step_hash(47); + g_111 ^= l_152; + step_hash(48); + return p_100; + } + step_hash(54); + for (g_111 = 0; (g_111 < 12); g_111 += 3) + { + int *l_163 = &g_151; + step_hash(53); + (*l_163) = (((unsigned short)l_159 * (unsigned short)0xA4C7L) && (((p_100 | (+l_160)) & ((short)7L >> (short)1)) > ((*p_102) != (*p_102)))); + } + } + else + { + step_hash(56); + (*g_108) = (*g_108); + step_hash(57); + if (p_101) + continue; + step_hash(63); + if (((unsigned)((unsigned char)g_111 >> (unsigned char)6) + (unsigned)p_100)) + { + step_hash(59); + (*p_102) = (*g_108); + } + else + { + step_hash(61); + (*p_102) = (*p_102); + step_hash(62); + (*l_110) ^= ((void*)0 == l_168); + } + step_hash(64); + (*g_108) = (*g_108); + } + step_hash(86); + if (p_100) + { + step_hash(72); + if (((*g_108) != (void*)0)) + { + step_hash(68); + (*l_149) = (void*)0; + step_hash(69); + (*g_108) = (*p_102); + } + else + { + step_hash(71); + (*l_110) ^= p_100; + } + step_hash(73); + l_171 &= ((p_100 != ((unsigned short)0x2B22L + (unsigned short)((0x2ED1L >= 0x0081L) >= (*l_110)))) == g_111); + step_hash(74); + if (l_159) + break; + } + else + { + unsigned short l_184 = 9UL; + step_hash(76); + (*l_110) = ((((*l_110) || ((short)(*l_140) % (short)((l_168 != l_168) && (g_111 > g_84)))) > p_101) > (((short)((short)(*l_110) * (short)((short)((unsigned short)g_83 << (unsigned short)l_184) * (short)l_184)) << (short)4) >= p_101)); + step_hash(77); + (*g_108) = (*p_102); + step_hash(85); + for (p_100 = 0; (p_100 > 1); ++p_100) + { + unsigned short l_187 = 0x55D8L; + step_hash(81); + if (l_187) + break; + step_hash(82); + (*l_110) ^= l_187; + step_hash(83); + if (g_111) + break; + step_hash(84); + return g_83; + } + } + } + else + { + step_hash(88); + (*l_149) = (void*)0; + step_hash(89); + (*l_110) |= (*l_140); + step_hash(90); + if (l_152) + break; + } + step_hash(92); + (*l_110) = (*l_140); + } + } + step_hash(95); + return (*l_110); +} +void csmith_compute_hash(void) +{ + transparent_crc(g_4, "g_4", print_hash_value); + transparent_crc(g_83, "g_83", print_hash_value); + transparent_crc(g_84, "g_84", print_hash_value); + transparent_crc(g_111, "g_111", print_hash_value); + transparent_crc(g_151, "g_151", print_hash_value); +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand12.expect b/src/tests/csmith/rand12.expect new file mode 100644 index 0000000..ea08dd4 --- /dev/null +++ b/src/tests/csmith/rand12.expect @@ -0,0 +1,108 @@ +...checksum after hashing g_4 : 2144DF1C +...checksum after hashing g_83 : A92C5064 +...checksum after hashing g_84 : E89F3184 +...checksum after hashing g_111 : 8662EA2D +...checksum after hashing g_151 : 24E88DA5 +before stmt(141): checksum = 24E88DA5 +...checksum after hashing g_4 : 2144DF1C +...checksum after hashing g_83 : A92C5064 +...checksum after hashing g_84 : E89F3184 +...checksum after hashing g_111 : 8662EA2D +...checksum after hashing g_151 : 24E88DA5 +before stmt(6): checksum = 24E88DA5 +...checksum after hashing g_4 : 2144DF1C +...checksum after hashing g_83 : A92C5064 +...checksum after hashing g_84 : E89F3184 +...checksum after hashing g_111 : 8662EA2D +...checksum after hashing g_151 : 24E88DA5 +before stmt(5): checksum = 24E88DA5 +...checksum after hashing g_4 : 2144DF1C +...checksum after hashing g_83 : A92C5064 +...checksum after hashing g_84 : E89F3184 +...checksum after hashing g_111 : 8662EA2D +...checksum after hashing g_151 : 24E88DA5 +before stmt(132): checksum = 24E88DA5 +...checksum after hashing g_4 : 2144DF1C +...checksum after hashing g_83 : A92C5064 +...checksum after hashing g_84 : E89F3184 +...checksum after hashing g_111 : 8662EA2D +...checksum after hashing g_151 : 24E88DA5 +before stmt(133): checksum = 24E88DA5 +...checksum after hashing g_4 : 2144DF1C +...checksum after hashing g_83 : DD9EB80C +...checksum after hashing g_84 : 3067166F +...checksum after hashing g_111 : EE734D22 +...checksum after hashing g_151 : B00C1C6C +before stmt(134): checksum = B00C1C6C +...checksum after hashing g_4 : 2144DF1C +...checksum after hashing g_83 : DD9EB80C +...checksum after hashing g_84 : 3067166F +...checksum after hashing g_111 : EE734D22 +...checksum after hashing g_151 : B00C1C6C +before stmt(136): checksum = B00C1C6C +...checksum after hashing g_4 : 2144DF1C +...checksum after hashing g_83 : DD9EB80C +...checksum after hashing g_84 : 3067166F +...checksum after hashing g_111 : EE734D22 +...checksum after hashing g_151 : B00C1C6C +before stmt(137): checksum = B00C1C6C +...checksum after hashing g_4 : 2144DF1C +...checksum after hashing g_83 : DD9EB80C +...checksum after hashing g_84 : 3067166F +...checksum after hashing g_111 : EE734D22 +...checksum after hashing g_151 : B00C1C6C +before stmt(139): checksum = B00C1C6C +...checksum after hashing g_4 : 2144DF1C +...checksum after hashing g_83 : DD9EB80C +...checksum after hashing g_84 : 3067166F +...checksum after hashing g_111 : EE734D22 +...checksum after hashing g_151 : B00C1C6C +before stmt(136): checksum = B00C1C6C +...checksum after hashing g_4 : 2144DF1C +...checksum after hashing g_83 : DD9EB80C +...checksum after hashing g_84 : 3067166F +...checksum after hashing g_111 : EE734D22 +...checksum after hashing g_151 : B00C1C6C +before stmt(137): checksum = B00C1C6C +...checksum after hashing g_4 : 2144DF1C +...checksum after hashing g_83 : DD9EB80C +...checksum after hashing g_84 : 3067166F +...checksum after hashing g_111 : EE734D22 +...checksum after hashing g_151 : B00C1C6C +before stmt(140): checksum = B00C1C6C +...checksum after hashing g_4 : 2144DF1C +...checksum after hashing g_83 : DD9EB80C +...checksum after hashing g_84 : 3067166F +...checksum after hashing g_111 : EE734D22 +...checksum after hashing g_151 : B00C1C6C +before stmt(142): checksum = B00C1C6C +...checksum after hashing g_4 : 2144DF1C +...checksum after hashing g_83 : DD9EB80C +...checksum after hashing g_84 : 3067166F +...checksum after hashing g_111 : EE734D22 +...checksum after hashing g_151 : B00C1C6C +before stmt(143): checksum = B00C1C6C +...checksum after hashing g_4 : 2144DF1C +...checksum after hashing g_83 : DD9EB80C +...checksum after hashing g_84 : 3067166F +...checksum after hashing g_111 : EE734D22 +...checksum after hashing g_151 : B00C1C6C +before stmt(136): checksum = B00C1C6C +...checksum after hashing g_4 : 2144DF1C +...checksum after hashing g_83 : DD9EB80C +...checksum after hashing g_84 : 3067166F +...checksum after hashing g_111 : EE734D22 +...checksum after hashing g_151 : B00C1C6C +before stmt(137): checksum = B00C1C6C +...checksum after hashing g_4 : 2144DF1C +...checksum after hashing g_83 : DD9EB80C +...checksum after hashing g_84 : 3067166F +...checksum after hashing g_111 : EE734D22 +...checksum after hashing g_151 : B00C1C6C +before stmt(144): checksum = B00C1C6C +...checksum after hashing g_4 : 2144DF1C +...checksum after hashing g_83 : DD9EB80C +...checksum after hashing g_84 : 3067166F +...checksum after hashing g_111 : EE734D22 +...checksum after hashing g_151 : B00C1C6C +checksum = b00c1c6c diff --git a/src/tests/csmith/rand13.c b/src/tests/csmith/rand13.c new file mode 100644 index 0000000..a9be286 --- /dev/null +++ b/src/tests/csmith/rand13.c @@ -0,0 +1,887 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static int g_2 = 0x31713B91L; +static int g_5 = 0xD4E7937DL; +static unsigned short g_9 = 65530UL; +static int g_84 = 0xE1947684L; +static int g_111 = 0x6E61A645L; +static int *g_112 = (void*)0; +static int **g_239 = &g_112; +static int ***g_238 = &g_239; +static unsigned char g_261 = 0x10L; +static signed char g_270 = 0x8AL; +static unsigned char g_292 = 0x30L; +static int g_326 = 0xA7B0075AL; +static int g_438 = 0L; +static unsigned short g_644 = 0x59A5L; +static unsigned func_1(void); +static int func_12(unsigned char p_13, unsigned p_14, unsigned p_15); +static signed char func_19(short p_20, unsigned p_21, short p_22, unsigned p_23); +static unsigned char func_26(unsigned short p_27, signed char p_28, int p_29, short p_30, int p_31); +static int func_40(int p_41, short p_42, int p_43); +static int func_44(unsigned short p_45, signed char p_46, short p_47); +static int func_51(unsigned p_52, unsigned p_53, unsigned p_54, int p_55, unsigned short p_56); +static signed char func_63(short p_64, unsigned p_65); +static int func_68(int p_69, int p_70, unsigned p_71, unsigned short p_72); +static unsigned char func_77(unsigned p_78, unsigned short p_79, unsigned short p_80); +static unsigned func_1(void) +{ + unsigned char l_8 = 0x59L; + int l_615 = (-8L); + int *l_622 = &g_438; + step_hash(358); + for (g_2 = 0; (g_2 == 20); g_2 += 5) + { + int ***l_614 = (void*)0; + step_hash(4); + if (g_2) + break; + step_hash(357); + for (g_5 = 0; (g_5 == (-24)); g_5 -= 8) + { + step_hash(8); + g_9 = l_8; + } + } + step_hash(359); + (*l_622) &= ((short)((g_84 | l_615) & g_5) * (short)((((unsigned short)0x4B3BL << (unsigned short)5) & (func_26(g_2, l_615, l_615, ((l_615 >= (!(((unsigned short)l_615 >> (unsigned short)g_9) || (-1L)))) > 0x5440E119L), g_111) ^ 0xB3FBB834L)) == l_615)); + step_hash(367); + for (g_261 = 0; (g_261 >= 27); ++g_261) + { + unsigned l_630 = 0x1B430333L; + int l_637 = 4L; + step_hash(363); + l_637 = ((signed char)((-(unsigned)(((short)((*l_622) & (0UL <= 0x0B7B73DEL)) % (short)func_51((g_111 | (g_5 ^ func_26(l_630, ((unsigned char)(l_630 & ((short)func_44(((unsigned char)(&l_615 == (**g_238)) + (unsigned char)g_2), g_326, g_438) / (short)(*l_622))) << (unsigned char)6), l_630, (*l_622), g_261))), (*l_622), g_438, (*l_622), (*l_622))) || (***g_238))) > 0xDFC9L) / (signed char)0x04L); + step_hash(364); + (**g_239) ^= (((int)(~((*l_622) || (((l_637 > ((*g_239) == (*g_239))) < (0L || g_84)) ^ (0xD1L < ((~((unsigned short)((unsigned short)g_644 - (unsigned short)((unsigned char)((unsigned char)0x3AL * (unsigned char)g_292) + (unsigned char)0xBBL)) * (unsigned short)g_292)) != 1UL))))) - (int)4294967295UL) != g_261); + step_hash(365); + if ((*l_622)) + continue; + step_hash(366); + (**g_239) = (*l_622); + } + step_hash(368); + return (*l_622); +} +static int func_12(unsigned char p_13, unsigned p_14, unsigned p_15) +{ + signed char l_18 = (-3L); + unsigned short l_376 = 1UL; + signed char l_377 = 0xB1L; + int l_417 = 0xFF7F0D00L; + int *l_463 = &g_5; + int ***l_517 = &g_239; + step_hash(175); + for (g_9 = (-26); (g_9 < 4); g_9 += 4) + { + short l_48 = 0x7163L; + int l_302 = (-1L); + int *l_349 = &g_326; + unsigned l_356 = 0xFAC3CD31L; + int l_360 = 0x59EE195EL; + step_hash(171); + (*l_349) = (((l_18 | func_19(((unsigned char)func_26(l_18, (((short)(l_18 <= 65526UL) << (short)7) || ((short)(-8L) / (short)((short)p_13 % (short)((int)func_40(func_44(((l_48 == (((int)func_51((~(((signed char)((unsigned short)(l_18 | (((signed char)func_63(g_9, l_18) % (signed char)l_48) > 0xE3D1283DL)) >> (unsigned short)6) * (signed char)p_14) | 0L)), g_9, l_48, g_5, g_261) % (int)g_270) < l_18)) != l_18), g_261, g_9), p_14, l_48) / (int)p_14)))), l_302, g_2, g_2) * (unsigned char)p_15), g_9, p_13, l_18)) && 4294967295UL) != (-1L)); + step_hash(172); + (**g_238) = l_349; + step_hash(173); + (**g_238) = (**g_238); + step_hash(174); + l_360 &= (func_63(((signed char)((signed char)(((void*)0 == &l_349) ^ (l_349 == l_349)) - (signed char)((short)(l_356 >= ((short)(-(unsigned)func_26((l_18 && p_15), g_292, l_18, (*l_349), g_270)) >> (short)l_18)) + (short)g_261)) + (signed char)l_48), g_292) == p_13); + } + step_hash(315); + for (p_13 = 0; (p_13 > 40); p_13 += 8) + { + unsigned short l_365 = 1UL; + int l_382 = 0x0D4FEF44L; + int **l_427 = &g_112; + unsigned l_470 = 0UL; + signed char l_486 = 0x3FL; + unsigned l_535 = 0UL; + step_hash(235); + for (g_292 = 18; (g_292 != 18); g_292 += 4) + { + int l_366 = 0x06FBFCB9L; + int ***l_374 = &g_239; + unsigned short l_375 = 0x2548L; + int *l_378 = &g_111; + int *l_383 = &g_5; + unsigned char l_416 = 0xC4L; + int *l_429 = &g_5; + step_hash(182); + (*l_378) = ((((!(l_365 && (((l_366 & (-(int)p_14)) < (&l_366 == (**g_238))) < (((unsigned char)(func_26(((short)((signed char)func_26(((g_84 != (&g_239 == l_374)) && ((((0xD7B21091L ^ 0L) > 0xAF886D76L) || p_14) || l_375)), p_14, l_18, p_14, l_18) * (signed char)(-1L)) * (short)0x242CL), g_84, l_376, p_14, p_14) >= l_18) + (unsigned char)l_365) > g_261)))) | l_377) | g_9) ^ l_365); + step_hash(183); + (*g_239) = (**l_374); + step_hash(233); + for (g_261 = 0; (g_261 >= 14); ++g_261) + { + int *l_418 = &g_111; + step_hash(199); + if (p_14) + { + short l_381 = 0L; + unsigned l_388 = 8UL; + unsigned l_397 = 0xA45CF1C7L; + step_hash(188); + l_382 ^= ((g_270 != l_365) | l_381); + step_hash(189); + (**g_238) = l_383; + step_hash(190); + if ((***g_238)) + continue; + step_hash(196); + if (((short)((~((short)((((~(l_388 >= g_111)) != (((unsigned short)g_84 << (unsigned short)((signed char)p_13 % (signed char)g_292)) | l_382)) && (((unsigned short)(((unsigned char)255UL * (unsigned char)0UL) && g_111) - (unsigned short)g_292) == 0x86L)) == g_9) << (short)10)) < 0UL) << (short)9)) + { + step_hash(192); + l_382 = func_63(p_13, l_397); + step_hash(193); + if (p_13) + continue; + } + else + { + step_hash(195); + l_417 &= ((0L || ((+((0x3F3E99A6L == func_26(((unsigned char)p_15 % (unsigned char)g_270), ((unsigned short)65535UL * (unsigned short)((unsigned short)((signed char)(((short)((unsigned)1UL - (unsigned)func_44(l_381, ((signed char)((unsigned)((short)0x4357L << (short)(l_416 || 0xCDB3L)) / (unsigned)(*l_383)) % (signed char)(-1L)), g_9)) << (short)7) | g_111) / (signed char)(-10L)) * (unsigned short)l_365)), l_376, p_15, p_14)) > g_261)) != p_14)) == l_376); + } + } + else + { + step_hash(198); + (**g_238) = l_418; + } + step_hash(225); + if (((unsigned short)((unsigned short)((unsigned short)(((((((***l_374) > ((unsigned char)(func_26(p_15, ((***g_238) && ((func_26(g_111, (g_9 == (l_427 != (*l_374))), (g_111 >= p_14), p_13, g_292) != 0x25F0558DL) > p_14)), p_15, p_14, g_84) < 0x9E638077L) << (unsigned char)0)) == 0x2FB5L) || 1UL) | (*l_418)) != p_15) <= g_111) + (unsigned short)g_5) << (unsigned short)g_261) >> (unsigned short)g_2)) + { + short l_433 = 0x0DB7L; + step_hash(208); + if ((***g_238)) + { + int l_428 = 0x8300414EL; + step_hash(202); + if (l_428) + break; + step_hash(203); + return (*g_112); + } + else + { + unsigned l_430 = 0x3B34546DL; + step_hash(205); + (*g_239) = l_429; + step_hash(206); + (*l_418) &= (!l_430); + step_hash(207); + g_438 = ((unsigned short)(func_68((*l_383), ((((l_433 ^ 0xFB50L) != ((unsigned)(+8UL) / (unsigned)(((((signed char)(((*l_418) && 0x9BL) ^ p_15) * (signed char)g_261) <= ((void*)0 != (*g_238))) != (**l_427)) | g_326))) ^ g_270) ^ l_376), p_14, p_15) <= p_14) + (unsigned short)g_326); + } + step_hash(209); + (*l_378) = (**g_239); + step_hash(216); + if (p_15) + { + short l_439 = 0x4ABBL; + step_hash(211); + l_439 = p_13; + } + else + { + unsigned char l_446 = 249UL; + int *l_449 = (void*)0; + step_hash(213); + g_326 ^= (4294967295UL >= ((*g_112) > (0xB6L ^ ((((signed char)(((short)((!(-1L)) || ((unsigned char)(l_446 < ((unsigned short)65528UL * (unsigned short)(***l_374))) - (unsigned char)l_18)) >> (short)12) & 0x1EL) - (signed char)p_14) != 0xB819CB91L) <= g_2)))); + step_hash(214); + (**g_238) = (*g_239); + step_hash(215); + return (**l_427); + } + } + else + { + int l_452 = 0xC51E9E2BL; + step_hash(224); + if ((func_51(func_63(p_13, (*l_418)), g_2, ((unsigned char)(g_292 < ((void*)0 == (*g_238))) << (unsigned char)1), l_452, p_15) == 0xE282847CL)) + { + int *l_453 = &l_366; + step_hash(219); + (*l_453) &= (*g_112); + step_hash(220); + (*l_418) = l_452; + step_hash(221); + (*l_427) = (*g_239); + } + else + { + step_hash(223); + (**l_374) = (**g_238); + } + } + step_hash(226); + (**l_374) = l_418; + step_hash(232); + if (((((unsigned short)((int)(+(**g_239)) - (int)(((void*)0 != (**l_374)) < (((short)(+(p_13 < ((short)g_2 * (short)p_15))) >> (short)8) ^ ((*l_418) != ((-(unsigned)(&l_427 == l_374)) > g_326))))) << (unsigned short)14) >= g_2) == (**l_427))) + { + step_hash(228); + (**g_239) = (1L && ((void*)0 == l_427)); + step_hash(229); + (*g_238) = (*l_374); + } + else + { + step_hash(231); + return (**g_239); + } + } + step_hash(234); + (*l_427) = (**l_374); + } + step_hash(314); + if ((((void*)0 == l_463) >= (p_13 == ((short)((unsigned short)((p_14 != func_26(g_261, func_77(((signed char)((l_470 ^ (((((signed char)1L << (signed char)0) || g_5) != 0x1777L) ^ 1UL)) ^ g_292) - (signed char)0xE4L), p_15, g_292), (*l_463), l_365, g_5)) == g_270) / (unsigned short)1UL) * (short)g_270)))) + { + int l_473 = (-2L); + unsigned short l_495 = 65535UL; + int **l_534 = &g_112; + step_hash(237); + l_473 = p_14; + step_hash(280); + for (l_470 = 11; (l_470 >= 36); l_470++) + { + step_hash(256); + for (g_84 = (-18); (g_84 != (-22)); g_84 -= 9) + { + int *l_483 = &g_111; + step_hash(249); + for (g_111 = 0; (g_111 < (-12)); g_111--) + { + step_hash(247); + if (p_14) + break; + step_hash(248); + (*l_427) = &l_473; + } + step_hash(254); + if ((g_326 | ((65534UL || (g_326 && g_5)) & ((((unsigned short)p_13 << (unsigned short)4) ^ (*l_463)) == (-6L))))) + { + int *l_482 = &l_382; + step_hash(251); + (*l_482) ^= g_438; + } + else + { + step_hash(253); + (*g_239) = (*g_239); + } + step_hash(255); + (*l_483) = p_13; + } + step_hash(257); + (**g_238) = &l_417; + step_hash(269); + for (g_292 = (-26); (g_292 == 24); ++g_292) + { + } + step_hash(279); + for (g_111 = 0; (g_111 <= (-17)); --g_111) + { + step_hash(278); + for (p_15 = 0; (p_15 >= 41); p_15 += 6) + { + } + } + } + step_hash(307); + if ((((((unsigned short)((unsigned short)(!(p_14 | (l_495 && p_15))) >> (unsigned short)15) << (unsigned short)1) == ((func_26(p_15, (*l_463), ((((unsigned short)65529UL % (unsigned short)g_84) == ((int)p_15 / (int)l_473)) || 0x62L), (*l_463), p_13) & 0x018AF709L) & 0L)) & p_15) && p_15)) + { + unsigned l_502 = 4294967294UL; + int *l_514 = (void*)0; + step_hash(288); + for (l_377 = 0; (l_377 > (-9)); l_377 -= 2) + { + int *l_503 = &g_438; + step_hash(285); + (*l_503) = l_502; + step_hash(286); + (*l_503) = ((func_40(func_51((((((signed char)g_5 >> (signed char)3) == func_40(p_14, g_84, p_15)) >= ((p_13 ^ (((signed char)(((unsigned short)(p_13 ^ g_9) * (unsigned short)((signed char)((*l_463) ^ p_15) * (signed char)p_14)) & p_15) >> (signed char)l_502) ^ g_292)) != 0xF3194B1DL)) != 0UL), g_326, g_326, g_438, (*l_503)), l_502, l_473) || (**l_427)) || p_13); + step_hash(287); + return (*l_463); + } + step_hash(289); + l_514 = &l_417; + step_hash(304); + for (g_111 = (-3); (g_111 > 25); g_111 += 1) + { + int l_518 = 1L; + step_hash(293); + l_518 = (1L > (l_517 != &g_239)); + step_hash(302); + if (((int)(~((*l_514) ^ ((short)(*l_463) % (short)func_44((*l_463), func_40(l_473, ((l_518 == ((signed char)((short)(func_26(p_13, (p_15 <= g_261), l_473, g_84, l_495) && g_438) << (short)3) * (signed char)l_518)) ^ 0x1DAAL), g_5), g_5)))) + (int)(*l_514))) + { + step_hash(295); + (*l_514) = p_13; + step_hash(296); + l_473 = func_44(g_292, ((p_14 < ((unsigned short)(*l_514) << (unsigned short)5)) & 0x59FE014BL), ((void*)0 != (*g_238))); + step_hash(297); + (*g_239) = l_514; + } + else + { + step_hash(299); + if (l_518) + break; + step_hash(300); + (*l_514) = (-7L); + step_hash(301); + l_382 |= func_40(((*l_514) > (((0x88811302L < (!(((unsigned short)(**l_427) * (unsigned short)3UL) <= (-2L)))) > (***l_517)) <= p_15)), (*l_514), g_261); + } + step_hash(303); + (*l_514) = (***g_238); + } + } + else + { + step_hash(306); + l_535 ^= (-(short)((unsigned short)g_84 * (unsigned short)((g_2 || (l_534 != (*g_238))) != p_13))); + } + step_hash(308); + return p_14; + } + else + { + unsigned l_538 = 4294967295UL; + int *l_539 = (void*)0; + int *l_540 = &l_417; + step_hash(310); + (*l_540) = ((unsigned short)l_538 * (unsigned short)0x4D10L); + step_hash(311); + (*l_540) = 3L; + step_hash(312); + (*l_540) = ((short)0L + (short)p_14); + step_hash(313); + return p_14; + } + } + step_hash(323); + for (g_326 = 16; (g_326 >= 10); g_326 -= 8) + { + int l_545 = (-1L); + step_hash(319); + l_545 ^= (p_14 ^ 5L); + } + step_hash(354); + if ((8UL < g_326)) + { + step_hash(325); + g_326 = p_13; + } + else + { + int *l_565 = &g_326; + int l_593 = 0L; + step_hash(350); + for (g_9 = (-22); (g_9 == 26); g_9 += 8) + { + unsigned short l_575 = 65535UL; + unsigned l_587 = 0x6BA929C3L; + step_hash(337); + for (l_377 = 12; (l_377 >= (-9)); --l_377) + { + int ***l_563 = (void*)0; + int *l_564 = &g_111; + step_hash(333); + (*l_564) = ((l_563 != (void*)0) | (-2L)); + step_hash(334); + (*l_564) = p_15; + step_hash(335); + (*g_239) = l_565; + step_hash(336); + if ((**g_239)) + break; + } + step_hash(338); + (**l_517) = (*g_239); + step_hash(348); + for (l_377 = 0; (l_377 >= 2); l_377 += 8) + { + unsigned short l_584 = 0x8482L; + step_hash(347); + for (g_270 = 8; (g_270 < (-25)); g_270 -= 6) + { + int *l_570 = (void*)0; + unsigned short l_588 = 0x7F8FL; + step_hash(345); + (*g_239) = l_570; + step_hash(346); + (*l_565) = (((int)((unsigned)(l_575 != func_63(g_438, (+(g_111 != ((int)func_26((p_15 != (((unsigned)((short)((-1L) < func_26(l_584, g_438, ((signed char)(((void*)0 == &l_565) | l_584) >> (signed char)1), p_13, g_2)) % (short)0xA6E9L) - (unsigned)(-8L)) < g_9)), g_111, g_261, g_84, l_587) + (int)p_14))))) - (unsigned)l_588) % (int)0x3880585DL) < g_438); + } + } + step_hash(349); + if (p_15) + break; + } + step_hash(351); + (*l_565) = ((**g_238) == (void*)0); + step_hash(352); + (*l_565) = (!(*l_565)); + step_hash(353); + (*l_565) = ((signed char)(-10L) + (signed char)((signed char)((l_593 > (~(!(1L >= ((signed char)(!((unsigned short)p_14 + (unsigned short)((p_14 || 0xF5L) & ((unsigned short)g_326 / (unsigned short)((short)((g_111 ^ ((unsigned char)((short)(((unsigned char)((unsigned short)((unsigned char)g_2 - (unsigned char)p_13) * (unsigned short)(*l_565)) + (unsigned char)0UL) >= p_14) * (short)g_2) % (unsigned char)g_261)) >= g_5) >> (short)3))))) << (signed char)5))))) & p_15) << (signed char)(*l_565))); + } + step_hash(355); + return (*l_463); +} +static signed char func_19(short p_20, unsigned p_21, short p_22, unsigned p_23) +{ + int *l_331 = &g_111; + int ***l_347 = &g_239; + unsigned short l_348 = 6UL; + step_hash(169); + (*l_331) = ((short)(((signed char)g_9 >> (signed char)((((void*)0 == l_331) <= p_20) | ((unsigned short)((short)func_40((((unsigned short)((-(unsigned char)0xA9L) || (((((signed char)func_51(g_326, g_270, ((unsigned)((unsigned short)((void*)0 == l_347) + (unsigned short)1UL) / (unsigned)l_348), (*l_331), (*l_331)) << (signed char)0) == l_348) | g_5) >= p_21)) - (unsigned short)0x40EEL) >= g_2), g_326, p_23) + (short)p_21) << (unsigned short)g_5))) != 1UL) << (short)15); + step_hash(170); + return (*l_331); +} +static unsigned char func_26(unsigned short p_27, signed char p_28, int p_29, short p_30, int p_31) +{ + unsigned l_303 = 1UL; + int l_304 = (-5L); + int *l_305 = &g_84; + short l_314 = (-7L); + int *l_325 = &g_326; + step_hash(164); + l_304 = l_303; + step_hash(165); + l_305 = (**g_238); + step_hash(166); + (*l_325) &= ((unsigned char)p_28 - (unsigned char)((((unsigned short)g_84 >> (unsigned short)((int)(p_28 > l_314) + (int)l_304)) < p_31) ^ ((int)(g_261 == ((unsigned short)((unsigned char)((unsigned char)((unsigned)((void*)0 != &l_304) - (unsigned)p_31) << (unsigned char)4) - (unsigned char)g_111) << (unsigned short)11)) % (int)(-1L)))); + step_hash(167); + return (*l_325); +} +static int func_40(int p_41, short p_42, int p_43) +{ + int *l_296 = &g_84; + step_hash(148); + (*g_239) = (void*)0; + step_hash(149); + (**g_238) = l_296; + step_hash(161); + for (g_261 = (-12); (g_261 != 9); g_261 += 1) + { + unsigned char l_301 = 0x31L; + step_hash(158); + for (p_43 = 0; (p_43 >= (-18)); p_43--) + { + step_hash(156); + (**g_239) = (p_43 || l_301); + step_hash(157); + (*g_239) = (**g_238); + } + step_hash(159); + (*l_296) = (l_296 == (void*)0); + step_hash(160); + (**g_238) = l_296; + } + step_hash(162); + return p_41; +} +static int func_44(unsigned short p_45, signed char p_46, short p_47) +{ + int *l_287 = &g_111; + int **l_293 = &g_112; + int *l_294 = (void*)0; + int *l_295 = &g_84; + step_hash(143); + (**g_238) = l_287; + step_hash(144); + g_84 |= (*l_287); + step_hash(145); + (*l_295) ^= ((unsigned)((*l_287) && ((*g_238) == (void*)0)) % (unsigned)((int)g_292 * (int)(l_293 == (*g_238)))); + step_hash(146); + return p_47; +} +static int func_51(unsigned p_52, unsigned p_53, unsigned p_54, int p_55, unsigned short p_56) +{ + int l_272 = (-9L); + short l_281 = 1L; + unsigned l_285 = 4294967295UL; + int l_286 = 1L; + step_hash(140); + if ((g_5 != ((unsigned short)func_63((((unsigned short)((unsigned char)0x62L >> (unsigned char)((((short)g_111 / (short)g_270) < (((-(short)l_272) != ((unsigned short)((signed char)p_53 / (signed char)((short)(l_272 >= 0x137C4823L) * (short)(((signed char)l_272 % (signed char)p_53) >= l_281))) / (unsigned short)0x49EFL)) ^ l_281)) < p_56)) / (unsigned short)65535UL) >= g_2), l_281) >> (unsigned short)g_5))) + { + int *l_282 = &g_2; + step_hash(136); + (*g_239) = l_282; + step_hash(137); + l_286 ^= ((short)((!func_63(g_261, func_77(g_5, l_285, p_56))) & (0xC228L && g_270)) >> (short)4); + } + else + { + step_hash(139); + (**g_238) = (*g_239); + } + step_hash(141); + return l_281; +} +static signed char func_63(short p_64, unsigned p_65) +{ + unsigned char l_81 = 0x69L; + int l_127 = 0x5DE23EDEL; + int *l_128 = (void*)0; + int l_249 = 0xBF8092ABL; + int *l_260 = &l_127; + step_hash(110); + for (p_65 = 0; (p_65 != 43); p_65 += 5) + { + unsigned char l_75 = 255UL; + int *l_126 = &g_84; + short l_135 = 1L; + int l_173 = 0x14048F23L; + int **l_182 = &g_112; + short l_198 = 0x77E6L; + step_hash(50); + (*l_126) = (func_68(g_2, g_5, (((int)((((l_75 > p_64) > (-(short)6L)) < func_77((1L > (l_81 <= l_81)), (g_2 | l_75), g_5)) != g_9) / (int)0x9A115EA9L) | 6L), l_81) & 0L); + step_hash(51); + l_127 = p_64; + step_hash(52); + l_128 = &g_5; + step_hash(109); + if ((*l_126)) + { + unsigned l_137 = 7UL; + short l_167 = 0xF393L; + int l_211 = 0x4AB74D0FL; + int *l_212 = &g_5; + step_hash(102); + for (g_84 = (-17); (g_84 > 17); g_84++) + { + unsigned l_136 = 0xE4845943L; + int *l_148 = &g_5; + int l_189 = 0x05F3852FL; + step_hash(79); + if ((*l_128)) + { + int l_143 = (-5L); + step_hash(65); + if (((int)(p_64 != ((unsigned short)((l_135 || (((l_136 || ((void*)0 != &l_128)) || g_9) | (p_65 ^ (-7L)))) > g_2) / (unsigned short)p_65)) / (int)(*l_126))) + { + int *l_138 = &g_111; + step_hash(59); + (*l_138) &= l_137; + step_hash(60); + l_143 = ((0xA0L != g_2) && ((signed char)((-9L) < ((void*)0 != &l_138)) << (signed char)l_136)); + step_hash(61); + (*l_138) &= (p_64 & p_64); + } + else + { + int *l_146 = &g_111; + step_hash(63); + (*l_146) = ((unsigned char)l_143 << (unsigned char)3); + step_hash(64); + (*l_146) = (&g_111 == l_126); + } + step_hash(66); + l_127 ^= (-6L); + step_hash(67); + l_127 = (-1L); + } + else + { + short l_147 = 0L; + int l_150 = 4L; + int *l_170 = (void*)0; + int *l_171 = (void*)0; + int *l_172 = &l_150; + step_hash(75); + if (l_147) + { + int **l_149 = &l_128; + step_hash(70); + (*l_149) = l_148; + step_hash(71); + return (*l_148); + } + else + { + unsigned l_155 = 0x0CDDE2BAL; + int *l_166 = &l_127; + step_hash(73); + l_150 = ((l_147 & g_84) <= g_111); + step_hash(74); + (*l_166) = (0x75E4EBAAL <= ((((unsigned)((unsigned)l_155 - (unsigned)(((unsigned char)(p_64 == (p_65 & ((int)((int)p_65 / (int)((unsigned char)0x41L * (unsigned char)((short)g_111 * (short)g_2))) + (int)(p_65 & g_111)))) - (unsigned char)(-10L)) || 1UL)) / (unsigned)g_84) != 65533UL) || (*l_126))); + } + step_hash(76); + l_167 = (p_65 && g_5); + step_hash(77); + l_127 &= (p_65 || p_64); + step_hash(78); + (*l_172) &= ((signed char)(4294967295UL < l_137) % (signed char)p_64); + } + step_hash(80); + l_173 = (!(g_5 | p_64)); + step_hash(101); + if (((~p_65) < (((unsigned short)g_9 >> (unsigned short)g_9) & ((unsigned char)((signed char)(*l_126) * (signed char)((short)(g_84 >= l_137) - (short)(((void*)0 == l_182) && (((signed char)g_84 % (signed char)0xA8L) ^ g_9)))) + (unsigned char)(*l_148))))) + { + int l_202 = (-3L); + int ***l_208 = &l_182; + step_hash(82); + l_189 = ((unsigned char)((signed char)p_64 * (signed char)(*l_128)) >> (unsigned char)7); + step_hash(88); + for (p_64 = 3; (p_64 <= 15); p_64++) + { + step_hash(86); + g_111 ^= (((short)(((short)((short)g_5 / (short)g_2) * (short)0x6328L) ^ g_2) * (short)(&g_2 == &l_189)) < (g_84 | l_198)); + step_hash(87); + g_111 = p_64; + } + step_hash(97); + if (((signed char)0x40L >> (signed char)p_65)) + { + unsigned char l_201 = 0UL; + int *l_205 = (void*)0; + int *l_206 = &l_173; + step_hash(90); + l_202 = l_201; + step_hash(91); + (*l_206) = ((unsigned short)l_137 >> (unsigned short)12); + step_hash(92); + (*l_206) ^= (*l_128); + step_hash(93); + (*l_206) = ((3L ^ l_167) <= (p_65 && g_2)); + } + else + { + int *l_207 = &g_5; + step_hash(95); + if (g_84) + break; + step_hash(96); + (*l_182) = l_207; + } + step_hash(98); + (*l_208) = &l_126; + } + else + { + step_hash(100); + l_189 ^= ((unsigned short)g_5 / (unsigned short)1UL); + } + } + step_hash(103); + l_211 = (*l_128); + step_hash(104); + (*l_182) = l_212; + } + else + { + int l_213 = 3L; + step_hash(106); + (*l_126) |= l_213; + step_hash(107); + (*l_126) = (((((unsigned)(*l_128) - (unsigned)p_65) & 253UL) | (*l_128)) & (-(unsigned char)l_213)); + step_hash(108); + (*l_126) = ((short)(&l_127 == &g_5) + (short)((*l_126) != (*l_128))); + } + } + step_hash(131); + for (p_64 = 0; (p_64 <= 12); p_64 += 2) + { + int *l_223 = &l_127; + short l_240 = (-1L); + step_hash(114); + (*l_223) ^= ((unsigned char)g_111 << (unsigned char)6); + step_hash(115); + (*l_223) |= g_2; + step_hash(116); + g_112 = &g_2; + step_hash(130); + if (((unsigned short)((unsigned short)(~0xDE8CL) / (unsigned short)((1UL | (((short)p_65 * (short)((signed char)(l_81 && p_65) << (signed char)0)) > (&l_128 != &g_112))) ^ func_68((((short)((unsigned)(*l_223) / (unsigned)((short)((void*)0 == g_238) + (short)g_9)) + (short)7UL) | l_240), (*g_112), p_64, g_5))) * (unsigned short)g_5)) + { + int ***l_250 = (void*)0; + step_hash(118); + l_249 ^= (p_65 ^ ((unsigned char)((unsigned char)((signed char)p_64 / (signed char)(*l_223)) % (unsigned char)p_65) / (unsigned char)(((void*)0 != l_223) & func_77(((signed char)(-6L) + (signed char)p_64), g_2, p_64)))); + step_hash(119); + (*l_223) &= (0x26L >= (l_250 != (void*)0)); + step_hash(120); + (*l_223) = func_77(p_65, g_111, ((short)g_5 >> (short)((unsigned short)(g_9 && p_65) - (unsigned short)(-1L)))); + step_hash(125); + for (p_65 = 0; (p_65 > 43); p_65 += 9) + { + step_hash(124); + (*l_223) ^= (**g_239); + } + } + else + { + int *l_257 = &l_249; + step_hash(127); + (*l_223) ^= (+func_77((5L && g_5), ((*g_238) != (*g_238)), g_111)); + step_hash(128); + (*l_223) = func_77(g_111, p_65, g_5); + step_hash(129); + l_257 = &l_127; + } + } + step_hash(132); + (*l_260) &= ((func_77(g_84, p_65, l_249) == (p_65 ^ ((short)g_9 / (short)g_2))) && 0x54D5C3D9L); + step_hash(133); + return p_65; +} +static int func_68(int p_69, int p_70, unsigned p_71, unsigned short p_72) +{ + int l_119 = 5L; + int *l_122 = &g_84; + unsigned l_123 = 0x7833775BL; + int *l_124 = (void*)0; + int *l_125 = &g_111; + step_hash(45); + (*l_122) = (((signed char)((int)((unsigned short)(p_71 | g_5) >> (unsigned short)13) - (int)func_77(g_111, (g_111 <= l_119), g_84)) % (signed char)((short)l_119 >> (short)5)) | p_72); + step_hash(46); + (*l_122) = func_77((+(*l_122)), g_2, (l_123 ^ (((void*)0 != &p_70) | 0xE9983536L))); + step_hash(47); + l_122 = l_122; + step_hash(48); + (*l_125) &= ((*l_122) > (*l_122)); + step_hash(49); + return p_70; +} +static unsigned char func_77(unsigned p_78, unsigned short p_79, unsigned short p_80) +{ + unsigned char l_82 = 0UL; + int *l_88 = &g_2; + int *l_104 = &g_84; + step_hash(24); + if ((1UL && l_82)) + { + int *l_83 = &g_84; + step_hash(19); + (*l_83) = g_9; + } + else + { + int *l_85 = &g_84; + int **l_89 = &l_88; + step_hash(21); + (*l_85) |= l_82; + step_hash(22); + (*l_85) = ((unsigned)p_79 + (unsigned)g_2); + step_hash(23); + (*l_89) = l_88; + } + step_hash(25); + (*l_104) &= ((unsigned short)((g_9 <= (((short)p_78 % (short)((signed char)(*l_88) * (signed char)p_79)) && g_5)) < ((int)0x036B6A42L / (int)(*l_88))) >> (unsigned short)((short)((unsigned char)(+p_78) / (unsigned char)((short)g_2 * (short)g_5)) % (short)p_79)); + step_hash(42); + if (g_84) + { + step_hash(27); + return g_84; + } + else + { + step_hash(40); + for (p_80 = 16; (p_80 < 44); p_80++) + { + step_hash(32); + if ((*l_104)) + break; + step_hash(33); + (*l_104) = (p_79 <= (-(int)0L)); + step_hash(39); + for (g_84 = (-12); (g_84 <= 10); g_84 += 4) + { + int *l_110 = &g_111; + step_hash(37); + (*l_110) ^= (*l_88); + step_hash(38); + g_112 = &g_111; + } + } + step_hash(41); + l_104 = l_104; + } + step_hash(43); + return (*l_88); +} +void csmith_compute_hash(void) +{ + transparent_crc(g_2, "g_2", print_hash_value); + transparent_crc(g_5, "g_5", print_hash_value); + transparent_crc(g_9, "g_9", print_hash_value); + transparent_crc(g_84, "g_84", print_hash_value); + transparent_crc(g_111, "g_111", print_hash_value); + transparent_crc(g_261, "g_261", print_hash_value); + transparent_crc(g_270, "g_270", print_hash_value); + transparent_crc(g_292, "g_292", print_hash_value); + transparent_crc(g_326, "g_326", print_hash_value); + transparent_crc(g_438, "g_438", print_hash_value); + transparent_crc(g_644, "g_644", print_hash_value); +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand13.expect b/src/tests/csmith/rand13.expect new file mode 100644 index 0000000..ab6b4b5 --- /dev/null +++ b/src/tests/csmith/rand13.expect @@ -0,0 +1,108 @@ +...checksum after hashing g_2 : 6B7C1B21 +...checksum after hashing g_5 : 86D2D8F2 +...checksum after hashing g_9 : 6E27261E +...checksum after hashing g_84 : 2DEA93A6 +...checksum after hashing g_111 : F08C471B +...checksum after hashing g_261 : A91BE603 +...checksum after hashing g_270 : 1AF87C7B +...checksum after hashing g_292 : 11BD03DB +...checksum after hashing g_326 : E404CE6A +...checksum after hashing g_438 : 2DE59054 +...checksum after hashing g_644 : E73658CD +before stmt(358): checksum = E73658CD +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_5 : 93A3D267 +...checksum after hashing g_9 : B2D71E02 +...checksum after hashing g_84 : 8684B0EB +...checksum after hashing g_111 : 1983030B +...checksum after hashing g_261 : D0DFD293 +...checksum after hashing g_270 : 2950B41 +...checksum after hashing g_292 : 1CAAE877 +...checksum after hashing g_326 : 3D3CAFBD +...checksum after hashing g_438 : 37E366E8 +...checksum after hashing g_644 : AAE3F871 +before stmt(359): checksum = AAE3F871 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_5 : 93A3D267 +...checksum after hashing g_9 : B2D71E02 +...checksum after hashing g_84 : 8684B0EB +...checksum after hashing g_111 : 1983030B +...checksum after hashing g_261 : D0DFD293 +...checksum after hashing g_270 : 2950B41 +...checksum after hashing g_292 : 1CAAE877 +...checksum after hashing g_326 : 3D3CAFBD +...checksum after hashing g_438 : 37E366E8 +...checksum after hashing g_644 : AAE3F871 +before stmt(164): checksum = AAE3F871 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_5 : 93A3D267 +...checksum after hashing g_9 : B2D71E02 +...checksum after hashing g_84 : 8684B0EB +...checksum after hashing g_111 : 1983030B +...checksum after hashing g_261 : D0DFD293 +...checksum after hashing g_270 : 2950B41 +...checksum after hashing g_292 : 1CAAE877 +...checksum after hashing g_326 : 3D3CAFBD +...checksum after hashing g_438 : 37E366E8 +...checksum after hashing g_644 : AAE3F871 +before stmt(165): checksum = AAE3F871 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_5 : 93A3D267 +...checksum after hashing g_9 : B2D71E02 +...checksum after hashing g_84 : 8684B0EB +...checksum after hashing g_111 : 1983030B +...checksum after hashing g_261 : D0DFD293 +...checksum after hashing g_270 : 2950B41 +...checksum after hashing g_292 : 1CAAE877 +...checksum after hashing g_326 : 3D3CAFBD +...checksum after hashing g_438 : 37E366E8 +...checksum after hashing g_644 : AAE3F871 +before stmt(166): checksum = AAE3F871 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_5 : 93A3D267 +...checksum after hashing g_9 : B2D71E02 +...checksum after hashing g_84 : 8684B0EB +...checksum after hashing g_111 : 1983030B +...checksum after hashing g_261 : D0DFD293 +...checksum after hashing g_270 : 2950B41 +...checksum after hashing g_292 : 1CAAE877 +...checksum after hashing g_326 : 51B00924 +...checksum after hashing g_438 : F96C1320 +...checksum after hashing g_644 : 8BE7FF10 +before stmt(167): checksum = 8BE7FF10 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_5 : 93A3D267 +...checksum after hashing g_9 : B2D71E02 +...checksum after hashing g_84 : 8684B0EB +...checksum after hashing g_111 : 1983030B +...checksum after hashing g_261 : D0DFD293 +...checksum after hashing g_270 : 2950B41 +...checksum after hashing g_292 : 1CAAE877 +...checksum after hashing g_326 : 51B00924 +...checksum after hashing g_438 : F96C1320 +...checksum after hashing g_644 : 8BE7FF10 +before stmt(367): checksum = 8BE7FF10 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_5 : 93A3D267 +...checksum after hashing g_9 : B2D71E02 +...checksum after hashing g_84 : 8684B0EB +...checksum after hashing g_111 : 1983030B +...checksum after hashing g_261 : 80C6850C +...checksum after hashing g_270 : 7E2E3A6A +...checksum after hashing g_292 : 10B2058B +...checksum after hashing g_326 : B79737BA +...checksum after hashing g_438 : 19AAB805 +...checksum after hashing g_644 : F48C802D +before stmt(368): checksum = F48C802D +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_5 : 93A3D267 +...checksum after hashing g_9 : B2D71E02 +...checksum after hashing g_84 : 8684B0EB +...checksum after hashing g_111 : 1983030B +...checksum after hashing g_261 : 80C6850C +...checksum after hashing g_270 : 7E2E3A6A +...checksum after hashing g_292 : 10B2058B +...checksum after hashing g_326 : B79737BA +...checksum after hashing g_438 : 19AAB805 +...checksum after hashing g_644 : F48C802D +checksum = f48c802d diff --git a/src/tests/csmith/rand14.c b/src/tests/csmith/rand14.c new file mode 100644 index 0000000..d163b0c --- /dev/null +++ b/src/tests/csmith/rand14.c @@ -0,0 +1,473 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static int g_4 = 0L; +static int g_51 = (-3L); +static int *g_67 = &g_4; +static int **g_66 = &g_67; +static signed char g_96 = (-9L); +static int g_98 = 0x977F3D96L; +static int g_183 = 0x97D6553EL; +static int *g_194 = (void*)0; +static int g_225 = (-1L); +static int func_1(void); +static int * func_5(int * p_6, int * p_7, unsigned short p_8); +static int * func_9(int * p_10); +static int * func_11(short p_12, int * p_13, short p_14, unsigned p_15); +static signed char func_16(int * p_17); +static int func_18(int * p_19, unsigned char p_20, int p_21); +static int * func_22(unsigned p_23); +static int * func_27(int * p_28, int * p_29, short p_30, int * p_31, signed char p_32); +static short func_35(int * p_36); +static signed char func_40(unsigned short p_41, short p_42, int p_43, int * p_44); +static int func_1(void) +{ + unsigned short l_2 = 65531UL; + int *l_3 = &g_4; + int l_300 = 0L; + int **l_302 = &g_194; + step_hash(1); + (*l_3) = (0xE7L & l_2); + step_hash(161); + (*l_302) = func_5(func_9(func_11((((-5L) && g_4) < (*l_3)), &g_4, (*l_3), (g_4 && (0x60CBL | (!((*l_3) >= func_16(l_3))))))), &g_4, l_300); + step_hash(162); + (*l_3) = (((*l_3) >= (*l_3)) <= 1L); + step_hash(163); + return (*l_3); +} +static int * func_5(int * p_6, int * p_7, unsigned short p_8) +{ + int **l_301 = &g_194; + step_hash(158); + (*l_301) = p_6; + step_hash(159); + (*l_301) = (void*)0; + step_hash(160); + return p_6; +} +static int * func_9(int * p_10) +{ + int **l_299 = &g_194; + step_hash(153); + (*p_10) = (*p_10); + step_hash(154); + (*p_10) &= 0L; + step_hash(155); + (*p_10) &= ((void*)0 != l_299); + step_hash(156); + return (*l_299); +} +static int * func_11(short p_12, int * p_13, short p_14, unsigned p_15) +{ + unsigned short l_296 = 65535UL; + int l_297 = 1L; + int *l_298 = &g_225; + step_hash(150); + for (p_14 = 0; (p_14 == (-22)); p_14--) + { + step_hash(149); + l_297 = l_296; + } + step_hash(151); + return l_298; +} +static signed char func_16(int * p_17) +{ + unsigned char l_24 = 255UL; + int ***l_166 = &g_66; + unsigned l_167 = 0xDFF48E3CL; + int *l_260 = &g_225; + unsigned l_279 = 0x77DEF9FAL; + int *l_280 = &g_183; + short l_288 = 0L; + int *l_291 = &g_51; + int **l_292 = (void*)0; + int **l_293 = &g_67; + step_hash(135); + (*l_260) = func_18(func_22(l_24), ((short)(l_24 < (l_166 == l_166)) + (short)l_167), l_167); + step_hash(136); + g_67 = l_260; + step_hash(142); + if ((((signed char)g_183 << (signed char)1) & ((unsigned char)g_51 % (unsigned char)((((unsigned char)1UL % (unsigned char)(*l_260)) || (*l_260)) | ((-4L) | ((unsigned)((unsigned char)((unsigned char)((short)(((*p_17) && (((((((g_183 > (((signed char)((short)(*l_260) << (short)l_279) << (signed char)(*l_260)) > 0x7E62A801L)) ^ 65530UL) && (*l_260)) || 0xF591A87AL) >= (*l_260)) >= 246UL) || g_183)) > (*l_260)) >> (short)(*l_260)) >> (unsigned char)7) / (unsigned char)g_51) / (unsigned)0x4F71ED02L)))))) + { + int **l_281 = (void*)0; + int **l_282 = &g_67; + step_hash(138); + (*l_282) = l_280; + } + else + { + int *l_285 = &g_98; + step_hash(140); + (*g_67) |= ((((int)(*l_285) / (int)4UL) == l_288) | (-1L)); + step_hash(141); + (*l_285) = (*g_67); + } + step_hash(143); + (*l_293) = (void*)0; + step_hash(144); + return (*l_280); +} +static int func_18(int * p_19, unsigned char p_20, int p_21) +{ + unsigned l_168 = 0xA4222F61L; + int *l_169 = (void*)0; + int *l_170 = &g_98; + unsigned char l_206 = 9UL; + int *l_256 = (void*)0; + int *l_257 = (void*)0; + int l_258 = 1L; + short l_259 = 0xC056L; + step_hash(76); + (*l_170) = l_168; + step_hash(77); + (*l_170) = (((*l_170) || ((int)((*l_170) != ((short)(*l_170) << (short)p_20)) - (int)(*l_170))) <= p_21); + step_hash(132); + for (g_51 = 9; (g_51 >= 19); g_51++) + { + unsigned short l_181 = 0xED61L; + int *l_182 = &g_183; + unsigned char l_218 = 0UL; + step_hash(81); + (*l_182) ^= (+((*l_170) && (((unsigned char)p_21 * (unsigned char)(0xA1BBDA26L >= ((signed char)(l_181 < p_20) >> (signed char)7))) || g_4))); + step_hash(82); + (*g_66) = (*g_66); + step_hash(131); + if ((*l_182)) + { + signed char l_186 = (-3L); + step_hash(96); + if ((l_186 >= (((unsigned)(!g_98) + (unsigned)((((*l_182) <= ((*l_170) || (p_21 >= (7UL < p_21)))) ^ (l_170 == p_19)) | g_98)) > g_51))) + { + int l_189 = 1L; + step_hash(85); + if (l_189) + break; + step_hash(86); + (*l_182) = ((&p_19 != &p_19) > (g_4 | (g_51 > ((int)l_189 / (int)l_189)))); + step_hash(87); + if (p_21) + break; + step_hash(88); + g_194 = p_19; + } + else + { + step_hash(94); + for (l_168 = (-26); (l_168 > 25); l_168++) + { + step_hash(93); + (*l_182) &= (&p_19 != (void*)0); + } + step_hash(95); + (*l_170) |= ((unsigned short)p_20 >> (unsigned short)3); + } + step_hash(97); + (*l_182) ^= (g_4 <= p_20); + step_hash(104); + for (p_20 = 2; (p_20 == 9); ++p_20) + { + int l_203 = 1L; + step_hash(101); + if (l_186) + break; + step_hash(102); + l_203 = ((unsigned short)0x51ECL * (unsigned short)(-6L)); + step_hash(103); + (*l_182) ^= (p_21 < 1UL); + } + step_hash(105); + (*l_182) = l_186; + } + else + { + signed char l_223 = 0L; + int *l_224 = &g_225; + step_hash(107); + (*l_224) ^= (p_21 < ((signed char)l_206 * (signed char)((unsigned char)((p_20 && (*l_182)) && p_21) * (unsigned char)((signed char)((unsigned char)(-(signed char)(*l_182)) * (unsigned char)(((int)((unsigned)l_218 - (unsigned)((unsigned char)p_21 * (unsigned char)((unsigned char)(!(*l_170)) * (unsigned char)l_223))) % (int)(*l_170)) <= p_21)) / (signed char)(*l_182))))); + step_hash(129); + if ((0x776ED3A1L == ((unsigned)(((short)((*l_182) | ((short)(1UL && (*l_224)) << (short)9)) >> (short)1) <= ((signed char)((p_21 != (p_21 | 0x8512A6EBL)) == g_183) + (signed char)1UL)) / (unsigned)g_96))) + { + int **l_240 = &l_169; + step_hash(109); + (*l_170) = (-1L); + step_hash(118); + for (p_20 = 0; (p_20 > 24); p_20 += 4) + { + unsigned l_241 = 0xACA667C5L; + step_hash(117); + if ((((unsigned short)(0x4616L || p_20) << (unsigned short)8) < (l_240 != &g_194))) + { + step_hash(114); + (*l_170) = (-1L); + } + else + { + step_hash(116); + return l_241; + } + } + step_hash(119); + (*l_170) |= p_20; + step_hash(120); + (*l_182) &= ((unsigned)g_98 - (unsigned)g_51); + } + else + { + int ***l_247 = &g_66; + step_hash(126); + for (g_183 = (-20); (g_183 == (-5)); g_183 += 6) + { + int l_246 = (-5L); + step_hash(125); + if (l_246) + break; + } + step_hash(127); + (*g_66) = (*g_66); + step_hash(128); + (*l_247) = &l_169; + } + step_hash(130); + (*g_66) = p_19; + } + } + step_hash(133); + l_258 ^= ((unsigned char)((unsigned char)((signed char)((unsigned)(&g_194 == &g_194) / (unsigned)(func_40(p_20, (*l_170), p_20, (*g_66)) ^ ((*l_170) < (*l_170)))) / (signed char)g_225) * (unsigned char)p_21) + (unsigned char)g_96); + step_hash(134); + return l_259; +} +static int * func_22(unsigned p_23) +{ + int *l_34 = (void*)0; + step_hash(67); + for (p_23 = 0; (p_23 < 23); p_23++) + { + int *l_33 = &g_4; + int **l_158 = &l_33; + } + step_hash(68); + (*g_66) = l_34; + step_hash(73); + for (g_98 = (-19); (g_98 == (-20)); --g_98) + { + unsigned l_163 = 4294967287UL; + step_hash(72); + l_163 = (g_4 < func_35(l_34)); + } + step_hash(74); + return l_34; +} +static int * func_27(int * p_28, int * p_29, short p_30, int * p_31, signed char p_32) +{ + unsigned char l_69 = 0x72L; + int *l_79 = &g_51; + int *l_145 = &g_98; + step_hash(58); + if (((l_69 <= (-(unsigned short)(((short)l_69 >> (short)((unsigned short)p_32 * (unsigned short)0L)) == (0x727AL == (func_40((g_51 != ((unsigned short)g_51 * (unsigned short)((short)l_69 * (short)g_4))), p_32, g_51, l_79) & p_30))))) | 65530UL)) + { + int *l_84 = &g_4; + int ***l_95 = (void*)0; + signed char l_101 = (-2L); + int *l_129 = &g_98; + step_hash(52); + if ((7L || func_40(g_51, (g_51 && (p_31 != l_79)), (p_32 & ((0x41L & 0L) || ((unsigned short)((int)((void*)0 == &l_79) + (int)1L) >> (unsigned short)11))), l_84))) + { + step_hash(31); + (*g_66) = p_29; + } + else + { + int ***l_94 = &g_66; + step_hash(40); + for (p_32 = 0; (p_32 == (-14)); p_32 -= 1) + { + int ***l_87 = &g_66; + int *l_97 = &g_98; + step_hash(36); + (*l_87) = &p_29; + step_hash(37); + (*l_97) |= ((short)((signed char)(p_30 > (((&p_28 != (void*)0) || ((int)2L - (int)((func_40((l_94 != l_95), g_51, (&g_66 != &g_66), (*g_66)) & l_69) <= g_4))) >= (*g_67))) * (signed char)0xDCL) * (short)g_96); + step_hash(38); + (*l_97) = ((l_84 == (*g_66)) != (g_4 <= (((l_101 | ((signed char)(*l_84) + (signed char)(((short)(((unsigned char)(g_98 | ((short)(((signed char)func_35(p_31) * (signed char)((g_96 != p_30) <= 4294967287UL)) != (*l_97)) / (short)g_4)) >> (unsigned char)5) != (*g_67)) >> (short)p_30) & g_98))) | g_98) > p_30))); + step_hash(39); + return p_31; + } + step_hash(51); + if ((*l_84)) + { + step_hash(46); + for (l_101 = 29; (l_101 != (-27)); --l_101) + { + step_hash(45); + (**l_94) = p_29; + } + } + else + { + unsigned short l_126 = 65535UL; + int *l_127 = (void*)0; + int *l_128 = &g_98; + step_hash(48); + (*l_79) = (**g_66); + step_hash(49); + (*l_128) |= ((signed char)(*l_79) * (signed char)((&p_28 != (*l_94)) >= ((int)((unsigned short)(((int)((unsigned short)(((int)(g_96 != p_32) + (int)0UL) <= g_51) - (unsigned short)p_32) / (int)(***l_94)) | (*l_79)) << (unsigned short)l_126) + (int)(*l_79)))); + step_hash(50); + return (*g_66); + } + } + step_hash(53); + (*g_66) = p_29; + step_hash(54); + (*g_66) = l_79; + step_hash(55); + (*l_129) ^= (**g_66); + } + else + { + unsigned short l_136 = 0xE8F1L; + unsigned l_137 = 4294967293UL; + int *l_140 = &g_98; + step_hash(57); + (*l_140) &= (((unsigned short)((*l_79) >= p_30) >> (unsigned short)(((unsigned char)(*l_79) << (unsigned char)((int)l_136 - (int)g_51)) >= p_32)) | (l_137 == ((unsigned short)p_32 * (unsigned short)((l_136 && p_32) || (*g_67))))); + } + step_hash(59); + (*l_145) ^= (((0x92664082L == (g_4 >= ((unsigned short)(func_40((0x56A42CAAL >= (((*l_79) | (*l_79)) != ((signed char)(&l_79 == &p_29) << (signed char)2))), g_96, g_51, (*g_66)) < 0xC3437DEDL) + (unsigned short)p_30))) <= (*p_28)) && p_30); + step_hash(60); + (*g_66) = p_31; + step_hash(61); + (*l_145) = (((g_96 && ((int)(((unsigned)((((unsigned)0xFA727D4FL - (unsigned)func_35(p_29)) <= g_96) > (((short)g_98 + (short)((short)p_32 >> (short)4)) != ((unsigned short)g_4 * (unsigned short)p_30))) / (unsigned)(*l_145)) && 0L) + (int)(*l_145))) <= 1L) < (*l_145)); + step_hash(62); + return p_29; +} +static short func_35(int * p_36) +{ + unsigned l_45 = 0x0CBBBC25L; + unsigned short l_46 = 0x305AL; + int l_58 = 0x280DDA25L; + int *l_59 = &g_51; + int *l_68 = &l_58; + step_hash(23); + l_58 = ((unsigned)(-(signed char)func_40((l_45 > (l_45 | l_46)), g_4, g_4, p_36)) + (unsigned)l_45); + step_hash(24); + (*l_59) = l_58; + step_hash(25); + (*l_68) ^= ((short)g_51 * (short)(((int)(0xCCL >= 0L) * (int)((void*)0 != g_66)) > (&g_67 == &g_67))); + step_hash(26); + (*l_59) = (&l_58 == p_36); + step_hash(27); + return (*l_59); +} +static signed char func_40(unsigned short p_41, short p_42, int p_43, int * p_44) +{ + short l_49 = 0xD860L; + int **l_54 = (void*)0; + int *l_56 = (void*)0; + int **l_55 = &l_56; + int *l_57 = &g_4; + step_hash(19); + for (p_41 = 6; (p_41 >= 55); p_41 += 7) + { + int *l_50 = &g_51; + step_hash(12); + if (l_49) + break; + step_hash(13); + (*l_50) &= p_42; + step_hash(18); + for (p_43 = 0; (p_43 >= 27); p_43 += 2) + { + step_hash(17); + return g_4; + } + } + step_hash(20); + (*l_55) = (void*)0; + step_hash(21); + (*l_55) = l_57; + step_hash(22); + return g_51; +} +void csmith_compute_hash(void) +{ + transparent_crc(g_4, "g_4", print_hash_value); + transparent_crc(g_51, "g_51", print_hash_value); + transparent_crc(g_96, "g_96", print_hash_value); + transparent_crc(g_98, "g_98", print_hash_value); + transparent_crc(g_183, "g_183", print_hash_value); + transparent_crc(g_225, "g_225", print_hash_value); +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand14.expect b/src/tests/csmith/rand14.expect new file mode 100644 index 0000000..df3494b --- /dev/null +++ b/src/tests/csmith/rand14.expect @@ -0,0 +1,231 @@ +...checksum after hashing g_4 : 2144DF1C +...checksum after hashing g_51 : 11903701 +...checksum after hashing g_96 : B822E988 +...checksum after hashing g_98 : BFC67C1C +...checksum after hashing g_183 : 63947F6D +...checksum after hashing g_225 : A88880B0 +before stmt(1): checksum = A88880B0 +...checksum after hashing g_4 : E58E31CA +...checksum after hashing g_51 : 1CCF1583 +...checksum after hashing g_96 : 87293890 +...checksum after hashing g_98 : F3B2A89D +...checksum after hashing g_183 : 88C88296 +...checksum after hashing g_225 : 6525D83D +before stmt(161): checksum = 6525D83D +...checksum after hashing g_4 : E58E31CA +...checksum after hashing g_51 : 1CCF1583 +...checksum after hashing g_96 : 87293890 +...checksum after hashing g_98 : F3B2A89D +...checksum after hashing g_183 : 88C88296 +...checksum after hashing g_225 : 6525D83D +before stmt(135): checksum = 6525D83D +...checksum after hashing g_4 : E58E31CA +...checksum after hashing g_51 : 1CCF1583 +...checksum after hashing g_96 : 87293890 +...checksum after hashing g_98 : F3B2A89D +...checksum after hashing g_183 : 88C88296 +...checksum after hashing g_225 : 6525D83D +before stmt(67): checksum = 6525D83D +...checksum after hashing g_4 : E58E31CA +...checksum after hashing g_51 : 1CCF1583 +...checksum after hashing g_96 : 87293890 +...checksum after hashing g_98 : F3B2A89D +...checksum after hashing g_183 : 88C88296 +...checksum after hashing g_225 : 6525D83D +before stmt(68): checksum = 6525D83D +...checksum after hashing g_4 : E58E31CA +...checksum after hashing g_51 : 1CCF1583 +...checksum after hashing g_96 : 87293890 +...checksum after hashing g_98 : F3B2A89D +...checksum after hashing g_183 : 88C88296 +...checksum after hashing g_225 : 6525D83D +before stmt(73): checksum = 6525D83D +...checksum after hashing g_4 : E58E31CA +...checksum after hashing g_51 : 1CCF1583 +...checksum after hashing g_96 : 87293890 +...checksum after hashing g_98 : A54DBC0F +...checksum after hashing g_183 : 9582A9A6 +...checksum after hashing g_225 : C88642CB +before stmt(74): checksum = C88642CB +...checksum after hashing g_4 : E58E31CA +...checksum after hashing g_51 : 1CCF1583 +...checksum after hashing g_96 : 87293890 +...checksum after hashing g_98 : A54DBC0F +...checksum after hashing g_183 : 9582A9A6 +...checksum after hashing g_225 : C88642CB +before stmt(76): checksum = C88642CB +...checksum after hashing g_4 : E58E31CA +...checksum after hashing g_51 : 1CCF1583 +...checksum after hashing g_96 : 87293890 +...checksum after hashing g_98 : 4764B392 +...checksum after hashing g_183 : DBB6CB5D +...checksum after hashing g_225 : F8FC5343 +before stmt(77): checksum = F8FC5343 +...checksum after hashing g_4 : E58E31CA +...checksum after hashing g_51 : 1CCF1583 +...checksum after hashing g_96 : 87293890 +...checksum after hashing g_98 : 81E603F8 +...checksum after hashing g_183 : 31C1BF66 +...checksum after hashing g_225 : AC8F0838 +before stmt(132): checksum = AC8F0838 +...checksum after hashing g_4 : E58E31CA +...checksum after hashing g_51 : 1575B261 +...checksum after hashing g_96 : 409E0450 +...checksum after hashing g_98 : 745E9E66 +...checksum after hashing g_183 : 785E2071 +...checksum after hashing g_225 : 6ED7F732 +before stmt(133): checksum = 6ED7F732 +...checksum after hashing g_4 : E58E31CA +...checksum after hashing g_51 : 1575B261 +...checksum after hashing g_96 : 409E0450 +...checksum after hashing g_98 : 745E9E66 +...checksum after hashing g_183 : 785E2071 +...checksum after hashing g_225 : 6ED7F732 +before stmt(19): checksum = 6ED7F732 +...checksum after hashing g_4 : E58E31CA +...checksum after hashing g_51 : 1575B261 +...checksum after hashing g_96 : 409E0450 +...checksum after hashing g_98 : 745E9E66 +...checksum after hashing g_183 : 785E2071 +...checksum after hashing g_225 : 6ED7F732 +before stmt(20): checksum = 6ED7F732 +...checksum after hashing g_4 : E58E31CA +...checksum after hashing g_51 : 1575B261 +...checksum after hashing g_96 : 409E0450 +...checksum after hashing g_98 : 745E9E66 +...checksum after hashing g_183 : 785E2071 +...checksum after hashing g_225 : 6ED7F732 +before stmt(21): checksum = 6ED7F732 +...checksum after hashing g_4 : E58E31CA +...checksum after hashing g_51 : 1575B261 +...checksum after hashing g_96 : 409E0450 +...checksum after hashing g_98 : 745E9E66 +...checksum after hashing g_183 : 785E2071 +...checksum after hashing g_225 : 6ED7F732 +before stmt(22): checksum = 6ED7F732 +...checksum after hashing g_4 : E58E31CA +...checksum after hashing g_51 : 1575B261 +...checksum after hashing g_96 : 409E0450 +...checksum after hashing g_98 : 745E9E66 +...checksum after hashing g_183 : 785E2071 +...checksum after hashing g_225 : 6ED7F732 +before stmt(134): checksum = 6ED7F732 +...checksum after hashing g_4 : E58E31CA +...checksum after hashing g_51 : 1575B261 +...checksum after hashing g_96 : 409E0450 +...checksum after hashing g_98 : 745E9E66 +...checksum after hashing g_183 : 785E2071 +...checksum after hashing g_225 : 71830310 +before stmt(136): checksum = 71830310 +...checksum after hashing g_4 : E58E31CA +...checksum after hashing g_51 : 1575B261 +...checksum after hashing g_96 : 409E0450 +...checksum after hashing g_98 : 745E9E66 +...checksum after hashing g_183 : 785E2071 +...checksum after hashing g_225 : 71830310 +before stmt(142): checksum = 71830310 +...checksum after hashing g_4 : E58E31CA +...checksum after hashing g_51 : 1575B261 +...checksum after hashing g_96 : 409E0450 +...checksum after hashing g_98 : 745E9E66 +...checksum after hashing g_183 : 785E2071 +...checksum after hashing g_225 : 71830310 +before stmt(138): checksum = 71830310 +...checksum after hashing g_4 : E58E31CA +...checksum after hashing g_51 : 1575B261 +...checksum after hashing g_96 : 409E0450 +...checksum after hashing g_98 : 745E9E66 +...checksum after hashing g_183 : 785E2071 +...checksum after hashing g_225 : 71830310 +before stmt(143): checksum = 71830310 +...checksum after hashing g_4 : E58E31CA +...checksum after hashing g_51 : 1575B261 +...checksum after hashing g_96 : 409E0450 +...checksum after hashing g_98 : 745E9E66 +...checksum after hashing g_183 : 785E2071 +...checksum after hashing g_225 : 71830310 +before stmt(144): checksum = 71830310 +...checksum after hashing g_4 : E58E31CA +...checksum after hashing g_51 : 1575B261 +...checksum after hashing g_96 : 409E0450 +...checksum after hashing g_98 : 745E9E66 +...checksum after hashing g_183 : 785E2071 +...checksum after hashing g_225 : 71830310 +before stmt(150): checksum = 71830310 +...checksum after hashing g_4 : E58E31CA +...checksum after hashing g_51 : 1575B261 +...checksum after hashing g_96 : 409E0450 +...checksum after hashing g_98 : 745E9E66 +...checksum after hashing g_183 : 785E2071 +...checksum after hashing g_225 : 71830310 +before stmt(151): checksum = 71830310 +...checksum after hashing g_4 : E58E31CA +...checksum after hashing g_51 : 1575B261 +...checksum after hashing g_96 : 409E0450 +...checksum after hashing g_98 : 745E9E66 +...checksum after hashing g_183 : 785E2071 +...checksum after hashing g_225 : 71830310 +before stmt(153): checksum = 71830310 +...checksum after hashing g_4 : E58E31CA +...checksum after hashing g_51 : 1575B261 +...checksum after hashing g_96 : 409E0450 +...checksum after hashing g_98 : 745E9E66 +...checksum after hashing g_183 : 785E2071 +...checksum after hashing g_225 : 71830310 +before stmt(154): checksum = 71830310 +...checksum after hashing g_4 : E58E31CA +...checksum after hashing g_51 : 1575B261 +...checksum after hashing g_96 : 409E0450 +...checksum after hashing g_98 : 745E9E66 +...checksum after hashing g_183 : 785E2071 +...checksum after hashing g_225 : B06CD7D1 +before stmt(155): checksum = B06CD7D1 +...checksum after hashing g_4 : E58E31CA +...checksum after hashing g_51 : 1575B261 +...checksum after hashing g_96 : 409E0450 +...checksum after hashing g_98 : 745E9E66 +...checksum after hashing g_183 : 785E2071 +...checksum after hashing g_225 : B06CD7D1 +before stmt(156): checksum = B06CD7D1 +...checksum after hashing g_4 : E58E31CA +...checksum after hashing g_51 : 1575B261 +...checksum after hashing g_96 : 409E0450 +...checksum after hashing g_98 : 745E9E66 +...checksum after hashing g_183 : 785E2071 +...checksum after hashing g_225 : B06CD7D1 +before stmt(158): checksum = B06CD7D1 +...checksum after hashing g_4 : E58E31CA +...checksum after hashing g_51 : 1575B261 +...checksum after hashing g_96 : 409E0450 +...checksum after hashing g_98 : 745E9E66 +...checksum after hashing g_183 : 785E2071 +...checksum after hashing g_225 : B06CD7D1 +before stmt(159): checksum = B06CD7D1 +...checksum after hashing g_4 : E58E31CA +...checksum after hashing g_51 : 1575B261 +...checksum after hashing g_96 : 409E0450 +...checksum after hashing g_98 : 745E9E66 +...checksum after hashing g_183 : 785E2071 +...checksum after hashing g_225 : B06CD7D1 +before stmt(160): checksum = B06CD7D1 +...checksum after hashing g_4 : E58E31CA +...checksum after hashing g_51 : 1575B261 +...checksum after hashing g_96 : 409E0450 +...checksum after hashing g_98 : 745E9E66 +...checksum after hashing g_183 : 785E2071 +...checksum after hashing g_225 : B06CD7D1 +before stmt(162): checksum = B06CD7D1 +...checksum after hashing g_4 : 99F8B879 +...checksum after hashing g_51 : D480907D +...checksum after hashing g_96 : E4309927 +...checksum after hashing g_98 : 9642DB76 +...checksum after hashing g_183 : F665E6CC +...checksum after hashing g_225 : FCE4EA7B +before stmt(163): checksum = FCE4EA7B +...checksum after hashing g_4 : 99F8B879 +...checksum after hashing g_51 : D480907D +...checksum after hashing g_96 : E4309927 +...checksum after hashing g_98 : 9642DB76 +...checksum after hashing g_183 : F665E6CC +...checksum after hashing g_225 : FCE4EA7B +checksum = fce4ea7b diff --git a/src/tests/csmith/rand15.c b/src/tests/csmith/rand15.c new file mode 100644 index 0000000..e004d61 --- /dev/null +++ b/src/tests/csmith/rand15.c @@ -0,0 +1,384 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static int g_11 = 0x8F6C74AAL; +static int g_25 = 0xCF81320FL; +static unsigned g_67 = 0x94A98A1BL; +static int *g_76 = &g_11; +static int **g_75 = &g_76; +static short g_106 = 5L; +static int g_156 = (-1L); +static signed char g_349 = 0x18L; +static int g_444 = 0xF7F93694L; +static unsigned g_459 = 1UL; +static int g_498 = (-1L); +static short func_1(void); +static int func_2(unsigned p_3, unsigned char p_4); +static unsigned func_5(signed char p_6); +static signed char func_7(unsigned char p_8, unsigned p_9, short p_10); +static unsigned char func_16(unsigned p_17, int p_18, int p_19, short p_20); +static int * func_28(unsigned char p_29, int * p_30, unsigned char p_31, int p_32, int * p_33); +static unsigned func_40(unsigned p_41, signed char p_42, unsigned short p_43, signed char p_44, int * p_45); +static unsigned char func_50(unsigned char p_51, int * p_52); +static int * func_68(int ** p_69); +static int ** func_70(int p_71, unsigned p_72, short p_73, int ** p_74); +static short func_1(void) +{ + signed char l_14 = 0xBFL; + unsigned char l_15 = 0x44L; + int *l_673 = &g_498; + unsigned l_705 = 4294967295UL; + step_hash(389); + (*l_673) = func_2(((0x86CCE57BL && func_5(func_7(g_11, ((unsigned char)(~(l_14 & ((l_15 | (l_14 | 0x53L)) && func_16(l_15, g_11, g_11, l_15)))) >> (unsigned char)7), g_156))) < g_459), l_15); + step_hash(406); + for (g_498 = 0; (g_498 >= 1); g_498++) + { + signed char l_691 = 0x9FL; + step_hash(405); + for (g_25 = 0; (g_25 >= (-4)); g_25 -= 3) + { + int *l_678 = &g_25; + int **l_679 = &l_673; + unsigned l_702 = 4UL; + step_hash(396); + (*l_679) = l_678; + step_hash(402); + for (g_67 = (-4); (g_67 > 4); g_67 += 4) + { + unsigned short l_686 = 0x0A0FL; + step_hash(400); + g_11 = ((g_25 >= ((short)(((short)l_686 - (short)((signed char)((short)l_691 % (short)(g_25 ^ ((unsigned)0UL + (unsigned)((-5L) ^ (+((int)((unsigned short)((unsigned char)(l_702 >= (func_2(((*l_678) & ((unsigned)(((func_2(g_25, g_156) == 0x26L) >= l_686) > (*l_678)) / (unsigned)g_459)), (*l_673)) >= 1L)) << (unsigned char)5) << (unsigned short)g_349) % (int)l_686)))))) + (signed char)g_444)) & (-10L)) * (short)g_444)) < (*l_673)); + step_hash(401); + l_705 ^= (*l_673); + } + step_hash(403); + if ((*l_678)) + break; + step_hash(404); + g_156 &= 0x2DF3C4D5L; + } + } + step_hash(407); + return (*l_673); +} +static int func_2(unsigned p_3, unsigned char p_4) +{ + step_hash(388); + return g_106; +} +static unsigned func_5(signed char p_6) +{ + int **l_649 = &g_76; + int l_651 = 0L; + int l_656 = 5L; + int l_668 = (-9L); + step_hash(368); + for (g_349 = 0; (g_349 <= 6); ++g_349) + { + int l_648 = 9L; + step_hash(366); + l_648 &= p_6; + step_hash(367); + if (p_6) + break; + } + step_hash(378); + if ((p_6 == (l_649 != (void*)0))) + { + int *l_650 = (void*)0; + int l_654 = 0x15005DFCL; + int *l_655 = &g_156; + step_hash(370); + l_651 &= p_6; + step_hash(371); + (*l_649) = &g_11; + step_hash(372); + (*l_655) &= func_40((((p_6 <= (((1UL == ((short)(((**l_649) & l_654) == 4294967289UL) << (short)(&l_654 == &l_654))) && p_6) > func_40(l_654, p_6, g_67, p_6, l_655))) < g_67) || 0x505505BEL), p_6, p_6, l_656, &l_654); + } + else + { + int **l_661 = &g_76; + int *l_664 = (void*)0; + int *l_665 = (void*)0; + int *l_666 = &g_11; + int ***l_667 = &l_661; + step_hash(374); + (*l_666) ^= (((unsigned char)(0x34L & p_6) - (unsigned char)((signed char)((&l_649 != (void*)0) < ((l_661 == l_649) | ((int)(g_459 | 65535UL) - (int)p_6))) % (signed char)p_6)) == 65535UL); + step_hash(375); + (*l_667) = &l_664; + step_hash(376); + (**l_667) = (*l_649); + step_hash(377); + l_651 = ((void*)0 != (*l_649)); + } + step_hash(379); + l_668 = g_11; + step_hash(385); + for (g_106 = (-29); (g_106 >= (-3)); g_106 += 3) + { + unsigned short l_671 = 65526UL; + int l_672 = (-1L); + step_hash(383); + if (p_6) + break; + step_hash(384); + l_672 ^= l_671; + } + step_hash(386); + return g_67; +} +static signed char func_7(unsigned char p_8, unsigned p_9, short p_10) +{ + short l_577 = 0xB75CL; + int *l_578 = &g_156; + short l_581 = 0xCAE9L; + unsigned short l_586 = 6UL; + signed char l_610 = 0x5DL; + int l_630 = (-4L); + signed char l_645 = 0x7FL; + step_hash(323); + (*l_578) = ((unsigned char)((int)((((signed char)p_8 % (signed char)func_40(g_498, func_40(l_577, (g_349 <= ((l_578 != l_578) | ((unsigned short)l_581 + (unsigned short)((*l_578) ^ ((unsigned short)(~(((signed char)0xD8L - (signed char)l_586) || 0xBEL)) >> (unsigned short)p_8))))), g_459, g_106, l_578), g_459, p_10, l_578)) || (-4L)) >= g_349) % (int)p_8) - (unsigned char)0xAFL); + step_hash(360); + for (l_577 = 0; (l_577 != 21); ++l_577) + { + signed char l_589 = 0L; + unsigned l_592 = 0x9603CDF1L; + int *l_593 = (void*)0; + int l_595 = 0x20560BFFL; + step_hash(327); + l_589 &= (g_459 >= (0xEFB8E0A5L ^ (g_67 > 0x8068L))); + } + step_hash(361); + return l_645; +} +static unsigned char func_16(unsigned p_17, int p_18, int p_19, short p_20) +{ + int *l_34 = &g_11; + int l_58 = 0x469F41AFL; + short l_564 = (-1L); + step_hash(320); + if (g_11) + { + step_hash(3); + return g_11; + } + else + { + int *l_21 = (void*)0; + int *l_22 = (void*)0; + int *l_23 = (void*)0; + int *l_24 = &g_25; + signed char l_545 = 1L; + int **l_566 = &g_76; + unsigned short l_567 = 0x974BL; + int *l_570 = &g_444; + step_hash(5); + (*l_24) |= 0x779A7B44L; + step_hash(317); + for (p_17 = 24; (p_17 <= 16); p_17--) + { + unsigned short l_37 = 0UL; + int l_541 = 0x7544DC15L; + signed char l_544 = 0x06L; + int *l_565 = &g_444; + } + step_hash(318); + (*l_566) = func_28(((*g_76) || p_18), (*g_75), p_18, g_67, l_23); + step_hash(319); + l_58 ^= (p_18 < ((l_567 && (3UL && ((unsigned char)func_40((((void*)0 != l_570) & (0x47L == 6L)), g_67, ((0x7DE2L < 0xF544L) >= g_156), (*l_34), (*l_566)) * (unsigned char)p_18))) > 0x62F0825AL)); + } + step_hash(321); + return (*l_34); +} +static int * func_28(unsigned char p_29, int * p_30, unsigned char p_31, int p_32, int * p_33) +{ + int *l_63 = (void*)0; + int l_64 = 1L; + unsigned l_65 = 6UL; + unsigned short l_66 = 65535UL; + step_hash(17); + g_67 = ((unsigned short)p_29 + (unsigned short)((short)(0x9FBC0AE2L == (func_40((g_11 & (l_64 && 0x796FB6C7L)), g_11, g_25, l_65, &l_64) > l_66)) / (short)g_11)); + step_hash(284); + (*g_75) = func_68(func_70(p_29, g_25, p_29, g_75)); + step_hash(285); + g_75 = &p_30; + step_hash(286); + return p_33; +} +static unsigned func_40(unsigned p_41, signed char p_42, unsigned short p_43, signed char p_44, int * p_45) +{ + int **l_53 = (void*)0; + int **l_54 = (void*)0; + int *l_56 = &g_11; + int **l_55 = &l_56; + short l_57 = 0xE848L; + step_hash(13); + (*l_55) = p_45; + step_hash(14); + g_25 &= (-1L); + step_hash(15); + return l_57; +} +static unsigned char func_50(unsigned char p_51, int * p_52) +{ + step_hash(10); + (*p_52) &= g_11; + step_hash(11); + return p_51; +} +static int * func_68(int ** p_69) +{ + unsigned l_95 = 0xF106BFD3L; + int *l_107 = &g_25; + int l_115 = 0x59CAFAA4L; + unsigned char l_145 = 4UL; + int l_470 = 0x2FED8070L; + int *l_528 = (void*)0; + step_hash(24); + l_95 = (*g_76); + step_hash(195); + for (g_67 = 20; (g_67 <= 9); g_67--) + { + unsigned l_105 = 0x44AAF27CL; + int *l_146 = &l_115; + int l_182 = (-1L); + int l_293 = (-10L); + int l_329 = (-1L); + int *l_370 = &g_25; + } + step_hash(282); + if (((((int)(**p_69) - (int)((unsigned char)g_67 >> (unsigned char)7)) == 8L) != (*l_107))) + { + short l_388 = (-8L); + unsigned char l_408 = 0x63L; + int *l_419 = &l_115; + unsigned l_457 = 0x84777FD0L; + unsigned l_471 = 0x96AF753DL; + unsigned l_481 = 0x24266508L; + step_hash(197); + (*p_69) = &l_115; + step_hash(246); + for (l_115 = 0; (l_115 <= 14); l_115++) + { + signed char l_407 = 0x18L; + int **l_409 = &l_107; + } + step_hash(279); + for (g_444 = (-16); (g_444 <= 0); g_444 += 4) + { + unsigned char l_465 = 250UL; + int *l_472 = &g_156; + } + } + else + { + int l_519 = 0x1A2AE1EEL; + step_hash(281); + (*l_107) = (((int)l_519 - (int)(((unsigned short)(((short)((unsigned short)((0L & g_349) ^ 0x93L) * (unsigned short)(*l_107)) + (short)((signed char)l_519 << (signed char)(g_67 & (-5L)))) ^ (*g_76)) >> (unsigned short)g_106) <= l_519)) && l_519); + } + step_hash(283); + return l_528; +} +static int ** func_70(int p_71, unsigned p_72, short p_73, int ** p_74) +{ + int *l_77 = (void*)0; + int l_78 = 0xA04BB84AL; + int *l_83 = &g_25; + unsigned short l_90 = 0xEC70L; + int *l_93 = &l_78; + int **l_94 = &l_93; + step_hash(19); + l_78 = (p_74 != &g_76); + step_hash(20); + (*l_83) = (g_25 == (p_73 != (g_25 == (p_72 <= p_71)))); + step_hash(21); + (*l_93) ^= ((int)((int)(((((signed char)(p_74 != &l_77) * (signed char)((((((*g_75) != (*g_75)) != l_90) != ((*l_83) || (*g_76))) ^ g_11) <= (((unsigned char)(((**p_74) || p_71) == 5L) << (unsigned char)3) && (*l_83)))) ^ 0x61L) & 0x09C0D0DAL) > p_73) - (int)(*l_83)) / (int)(*g_76)); + step_hash(22); + return p_74; +} +void csmith_compute_hash(void) +{ + transparent_crc(g_11, "g_11", print_hash_value); + transparent_crc(g_25, "g_25", print_hash_value); + transparent_crc(g_67, "g_67", print_hash_value); + transparent_crc(g_106, "g_106", print_hash_value); + transparent_crc(g_156, "g_156", print_hash_value); + transparent_crc(g_349, "g_349", print_hash_value); + transparent_crc(g_444, "g_444", print_hash_value); + transparent_crc(g_459, "g_459", print_hash_value); + transparent_crc(g_498, "g_498", print_hash_value); +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand15.expect b/src/tests/csmith/rand15.expect new file mode 100644 index 0000000..e277e80 --- /dev/null +++ b/src/tests/csmith/rand15.expect @@ -0,0 +1,480 @@ +...checksum after hashing g_11 : E4255CEB +...checksum after hashing g_25 : 5CC76FF4 +...checksum after hashing g_67 : 6EB09092 +...checksum after hashing g_106 : B20F5C16 +...checksum after hashing g_156 : 4DDCEE07 +...checksum after hashing g_349 : AFA2D241 +...checksum after hashing g_444 : A2DAB392 +...checksum after hashing g_459 : AA63E4E +...checksum after hashing g_498 : B249EA1A +before stmt(389): checksum = B249EA1A +...checksum after hashing g_11 : E4255CEB +...checksum after hashing g_25 : 5CC76FF4 +...checksum after hashing g_67 : 6EB09092 +...checksum after hashing g_106 : B20F5C16 +...checksum after hashing g_156 : 4DDCEE07 +...checksum after hashing g_349 : AFA2D241 +...checksum after hashing g_444 : A2DAB392 +...checksum after hashing g_459 : AA63E4E +...checksum after hashing g_498 : B249EA1A +before stmt(320): checksum = B249EA1A +...checksum after hashing g_11 : E4255CEB +...checksum after hashing g_25 : 5CC76FF4 +...checksum after hashing g_67 : 6EB09092 +...checksum after hashing g_106 : B20F5C16 +...checksum after hashing g_156 : 4DDCEE07 +...checksum after hashing g_349 : AFA2D241 +...checksum after hashing g_444 : A2DAB392 +...checksum after hashing g_459 : AA63E4E +...checksum after hashing g_498 : B249EA1A +before stmt(3): checksum = B249EA1A +...checksum after hashing g_11 : E4255CEB +...checksum after hashing g_25 : 5CC76FF4 +...checksum after hashing g_67 : 6EB09092 +...checksum after hashing g_106 : B20F5C16 +...checksum after hashing g_156 : 4DDCEE07 +...checksum after hashing g_349 : AFA2D241 +...checksum after hashing g_444 : A2DAB392 +...checksum after hashing g_459 : AA63E4E +...checksum after hashing g_498 : B249EA1A +before stmt(323): checksum = B249EA1A +...checksum after hashing g_11 : E4255CEB +...checksum after hashing g_25 : 5CC76FF4 +...checksum after hashing g_67 : 6EB09092 +...checksum after hashing g_106 : B20F5C16 +...checksum after hashing g_156 : 4DDCEE07 +...checksum after hashing g_349 : AFA2D241 +...checksum after hashing g_444 : A2DAB392 +...checksum after hashing g_459 : AA63E4E +...checksum after hashing g_498 : B249EA1A +before stmt(13): checksum = B249EA1A +...checksum after hashing g_11 : E4255CEB +...checksum after hashing g_25 : 5CC76FF4 +...checksum after hashing g_67 : 6EB09092 +...checksum after hashing g_106 : B20F5C16 +...checksum after hashing g_156 : 4DDCEE07 +...checksum after hashing g_349 : AFA2D241 +...checksum after hashing g_444 : A2DAB392 +...checksum after hashing g_459 : AA63E4E +...checksum after hashing g_498 : B249EA1A +before stmt(14): checksum = B249EA1A +...checksum after hashing g_11 : E4255CEB +...checksum after hashing g_25 : 5CC76FF4 +...checksum after hashing g_67 : 6EB09092 +...checksum after hashing g_106 : B20F5C16 +...checksum after hashing g_156 : 4DDCEE07 +...checksum after hashing g_349 : AFA2D241 +...checksum after hashing g_444 : A2DAB392 +...checksum after hashing g_459 : AA63E4E +...checksum after hashing g_498 : B249EA1A +before stmt(15): checksum = B249EA1A +...checksum after hashing g_11 : E4255CEB +...checksum after hashing g_25 : 5CC76FF4 +...checksum after hashing g_67 : 6EB09092 +...checksum after hashing g_106 : B20F5C16 +...checksum after hashing g_156 : 4DDCEE07 +...checksum after hashing g_349 : AFA2D241 +...checksum after hashing g_444 : A2DAB392 +...checksum after hashing g_459 : AA63E4E +...checksum after hashing g_498 : B249EA1A +before stmt(13): checksum = B249EA1A +...checksum after hashing g_11 : E4255CEB +...checksum after hashing g_25 : 5CC76FF4 +...checksum after hashing g_67 : 6EB09092 +...checksum after hashing g_106 : B20F5C16 +...checksum after hashing g_156 : 4DDCEE07 +...checksum after hashing g_349 : AFA2D241 +...checksum after hashing g_444 : A2DAB392 +...checksum after hashing g_459 : AA63E4E +...checksum after hashing g_498 : B249EA1A +before stmt(14): checksum = B249EA1A +...checksum after hashing g_11 : E4255CEB +...checksum after hashing g_25 : 5CC76FF4 +...checksum after hashing g_67 : 6EB09092 +...checksum after hashing g_106 : B20F5C16 +...checksum after hashing g_156 : 4DDCEE07 +...checksum after hashing g_349 : AFA2D241 +...checksum after hashing g_444 : A2DAB392 +...checksum after hashing g_459 : AA63E4E +...checksum after hashing g_498 : B249EA1A +before stmt(15): checksum = B249EA1A +...checksum after hashing g_11 : E4255CEB +...checksum after hashing g_25 : 5CC76FF4 +...checksum after hashing g_67 : 6EB09092 +...checksum after hashing g_106 : B20F5C16 +...checksum after hashing g_156 : E0688031 +...checksum after hashing g_349 : 106527FF +...checksum after hashing g_444 : 331DD494 +...checksum after hashing g_459 : 61E65E6C +...checksum after hashing g_498 : DABCB15A +before stmt(360): checksum = DABCB15A +...checksum after hashing g_11 : E4255CEB +...checksum after hashing g_25 : 5CC76FF4 +...checksum after hashing g_67 : 6EB09092 +...checksum after hashing g_106 : B20F5C16 +...checksum after hashing g_156 : E0688031 +...checksum after hashing g_349 : 106527FF +...checksum after hashing g_444 : 331DD494 +...checksum after hashing g_459 : 61E65E6C +...checksum after hashing g_498 : DABCB15A +before stmt(327): checksum = DABCB15A +...checksum after hashing g_11 : E4255CEB +...checksum after hashing g_25 : 5CC76FF4 +...checksum after hashing g_67 : 6EB09092 +...checksum after hashing g_106 : B20F5C16 +...checksum after hashing g_156 : E0688031 +...checksum after hashing g_349 : 106527FF +...checksum after hashing g_444 : 331DD494 +...checksum after hashing g_459 : 61E65E6C +...checksum after hashing g_498 : DABCB15A +before stmt(327): checksum = DABCB15A +...checksum after hashing g_11 : E4255CEB +...checksum after hashing g_25 : 5CC76FF4 +...checksum after hashing g_67 : 6EB09092 +...checksum after hashing g_106 : B20F5C16 +...checksum after hashing g_156 : E0688031 +...checksum after hashing g_349 : 106527FF +...checksum after hashing g_444 : 331DD494 +...checksum after hashing g_459 : 61E65E6C +...checksum after hashing g_498 : DABCB15A +before stmt(327): checksum = DABCB15A +...checksum after hashing g_11 : E4255CEB +...checksum after hashing g_25 : 5CC76FF4 +...checksum after hashing g_67 : 6EB09092 +...checksum after hashing g_106 : B20F5C16 +...checksum after hashing g_156 : E0688031 +...checksum after hashing g_349 : 106527FF +...checksum after hashing g_444 : 331DD494 +...checksum after hashing g_459 : 61E65E6C +...checksum after hashing g_498 : DABCB15A +before stmt(327): checksum = DABCB15A +...checksum after hashing g_11 : E4255CEB +...checksum after hashing g_25 : 5CC76FF4 +...checksum after hashing g_67 : 6EB09092 +...checksum after hashing g_106 : B20F5C16 +...checksum after hashing g_156 : E0688031 +...checksum after hashing g_349 : 106527FF +...checksum after hashing g_444 : 331DD494 +...checksum after hashing g_459 : 61E65E6C +...checksum after hashing g_498 : DABCB15A +before stmt(327): checksum = DABCB15A +...checksum after hashing g_11 : E4255CEB +...checksum after hashing g_25 : 5CC76FF4 +...checksum after hashing g_67 : 6EB09092 +...checksum after hashing g_106 : B20F5C16 +...checksum after hashing g_156 : E0688031 +...checksum after hashing g_349 : 106527FF +...checksum after hashing g_444 : 331DD494 +...checksum after hashing g_459 : 61E65E6C +...checksum after hashing g_498 : DABCB15A +before stmt(327): checksum = DABCB15A +...checksum after hashing g_11 : E4255CEB +...checksum after hashing g_25 : 5CC76FF4 +...checksum after hashing g_67 : 6EB09092 +...checksum after hashing g_106 : B20F5C16 +...checksum after hashing g_156 : E0688031 +...checksum after hashing g_349 : 106527FF +...checksum after hashing g_444 : 331DD494 +...checksum after hashing g_459 : 61E65E6C +...checksum after hashing g_498 : DABCB15A +before stmt(327): checksum = DABCB15A +...checksum after hashing g_11 : E4255CEB +...checksum after hashing g_25 : 5CC76FF4 +...checksum after hashing g_67 : 6EB09092 +...checksum after hashing g_106 : B20F5C16 +...checksum after hashing g_156 : E0688031 +...checksum after hashing g_349 : 106527FF +...checksum after hashing g_444 : 331DD494 +...checksum after hashing g_459 : 61E65E6C +...checksum after hashing g_498 : DABCB15A +before stmt(327): checksum = DABCB15A +...checksum after hashing g_11 : E4255CEB +...checksum after hashing g_25 : 5CC76FF4 +...checksum after hashing g_67 : 6EB09092 +...checksum after hashing g_106 : B20F5C16 +...checksum after hashing g_156 : E0688031 +...checksum after hashing g_349 : 106527FF +...checksum after hashing g_444 : 331DD494 +...checksum after hashing g_459 : 61E65E6C +...checksum after hashing g_498 : DABCB15A +before stmt(327): checksum = DABCB15A +...checksum after hashing g_11 : E4255CEB +...checksum after hashing g_25 : 5CC76FF4 +...checksum after hashing g_67 : 6EB09092 +...checksum after hashing g_106 : B20F5C16 +...checksum after hashing g_156 : E0688031 +...checksum after hashing g_349 : 106527FF +...checksum after hashing g_444 : 331DD494 +...checksum after hashing g_459 : 61E65E6C +...checksum after hashing g_498 : DABCB15A +before stmt(327): checksum = DABCB15A +...checksum after hashing g_11 : E4255CEB +...checksum after hashing g_25 : 5CC76FF4 +...checksum after hashing g_67 : 6EB09092 +...checksum after hashing g_106 : B20F5C16 +...checksum after hashing g_156 : E0688031 +...checksum after hashing g_349 : 106527FF +...checksum after hashing g_444 : 331DD494 +...checksum after hashing g_459 : 61E65E6C +...checksum after hashing g_498 : DABCB15A +before stmt(327): checksum = DABCB15A +...checksum after hashing g_11 : E4255CEB +...checksum after hashing g_25 : 5CC76FF4 +...checksum after hashing g_67 : 6EB09092 +...checksum after hashing g_106 : B20F5C16 +...checksum after hashing g_156 : E0688031 +...checksum after hashing g_349 : 106527FF +...checksum after hashing g_444 : 331DD494 +...checksum after hashing g_459 : 61E65E6C +...checksum after hashing g_498 : DABCB15A +before stmt(327): checksum = DABCB15A +...checksum after hashing g_11 : E4255CEB +...checksum after hashing g_25 : 5CC76FF4 +...checksum after hashing g_67 : 6EB09092 +...checksum after hashing g_106 : B20F5C16 +...checksum after hashing g_156 : E0688031 +...checksum after hashing g_349 : 106527FF +...checksum after hashing g_444 : 331DD494 +...checksum after hashing g_459 : 61E65E6C +...checksum after hashing g_498 : DABCB15A +before stmt(327): checksum = DABCB15A +...checksum after hashing g_11 : E4255CEB +...checksum after hashing g_25 : 5CC76FF4 +...checksum after hashing g_67 : 6EB09092 +...checksum after hashing g_106 : B20F5C16 +...checksum after hashing g_156 : E0688031 +...checksum after hashing g_349 : 106527FF +...checksum after hashing g_444 : 331DD494 +...checksum after hashing g_459 : 61E65E6C +...checksum after hashing g_498 : DABCB15A +before stmt(327): checksum = DABCB15A +...checksum after hashing g_11 : E4255CEB +...checksum after hashing g_25 : 5CC76FF4 +...checksum after hashing g_67 : 6EB09092 +...checksum after hashing g_106 : B20F5C16 +...checksum after hashing g_156 : E0688031 +...checksum after hashing g_349 : 106527FF +...checksum after hashing g_444 : 331DD494 +...checksum after hashing g_459 : 61E65E6C +...checksum after hashing g_498 : DABCB15A +before stmt(327): checksum = DABCB15A +...checksum after hashing g_11 : E4255CEB +...checksum after hashing g_25 : 5CC76FF4 +...checksum after hashing g_67 : 6EB09092 +...checksum after hashing g_106 : B20F5C16 +...checksum after hashing g_156 : E0688031 +...checksum after hashing g_349 : 106527FF +...checksum after hashing g_444 : 331DD494 +...checksum after hashing g_459 : 61E65E6C +...checksum after hashing g_498 : DABCB15A +before stmt(327): checksum = DABCB15A +...checksum after hashing g_11 : E4255CEB +...checksum after hashing g_25 : 5CC76FF4 +...checksum after hashing g_67 : 6EB09092 +...checksum after hashing g_106 : B20F5C16 +...checksum after hashing g_156 : E0688031 +...checksum after hashing g_349 : 106527FF +...checksum after hashing g_444 : 331DD494 +...checksum after hashing g_459 : 61E65E6C +...checksum after hashing g_498 : DABCB15A +before stmt(327): checksum = DABCB15A +...checksum after hashing g_11 : E4255CEB +...checksum after hashing g_25 : 5CC76FF4 +...checksum after hashing g_67 : 6EB09092 +...checksum after hashing g_106 : B20F5C16 +...checksum after hashing g_156 : E0688031 +...checksum after hashing g_349 : 106527FF +...checksum after hashing g_444 : 331DD494 +...checksum after hashing g_459 : 61E65E6C +...checksum after hashing g_498 : DABCB15A +before stmt(327): checksum = DABCB15A +...checksum after hashing g_11 : E4255CEB +...checksum after hashing g_25 : 5CC76FF4 +...checksum after hashing g_67 : 6EB09092 +...checksum after hashing g_106 : B20F5C16 +...checksum after hashing g_156 : E0688031 +...checksum after hashing g_349 : 106527FF +...checksum after hashing g_444 : 331DD494 +...checksum after hashing g_459 : 61E65E6C +...checksum after hashing g_498 : DABCB15A +before stmt(327): checksum = DABCB15A +...checksum after hashing g_11 : E4255CEB +...checksum after hashing g_25 : 5CC76FF4 +...checksum after hashing g_67 : 6EB09092 +...checksum after hashing g_106 : B20F5C16 +...checksum after hashing g_156 : E0688031 +...checksum after hashing g_349 : 106527FF +...checksum after hashing g_444 : 331DD494 +...checksum after hashing g_459 : 61E65E6C +...checksum after hashing g_498 : DABCB15A +before stmt(327): checksum = DABCB15A +...checksum after hashing g_11 : E4255CEB +...checksum after hashing g_25 : 5CC76FF4 +...checksum after hashing g_67 : 6EB09092 +...checksum after hashing g_106 : B20F5C16 +...checksum after hashing g_156 : E0688031 +...checksum after hashing g_349 : 106527FF +...checksum after hashing g_444 : 331DD494 +...checksum after hashing g_459 : 61E65E6C +...checksum after hashing g_498 : DABCB15A +before stmt(327): checksum = DABCB15A +...checksum after hashing g_11 : E4255CEB +...checksum after hashing g_25 : 5CC76FF4 +...checksum after hashing g_67 : 6EB09092 +...checksum after hashing g_106 : B20F5C16 +...checksum after hashing g_156 : E0688031 +...checksum after hashing g_349 : 106527FF +...checksum after hashing g_444 : 331DD494 +...checksum after hashing g_459 : 61E65E6C +...checksum after hashing g_498 : DABCB15A +before stmt(361): checksum = DABCB15A +...checksum after hashing g_11 : E4255CEB +...checksum after hashing g_25 : 5CC76FF4 +...checksum after hashing g_67 : 6EB09092 +...checksum after hashing g_106 : B20F5C16 +...checksum after hashing g_156 : E0688031 +...checksum after hashing g_349 : 106527FF +...checksum after hashing g_444 : 331DD494 +...checksum after hashing g_459 : 61E65E6C +...checksum after hashing g_498 : DABCB15A +before stmt(368): checksum = DABCB15A +...checksum after hashing g_11 : E4255CEB +...checksum after hashing g_25 : 5CC76FF4 +...checksum after hashing g_67 : 6EB09092 +...checksum after hashing g_106 : B20F5C16 +...checksum after hashing g_156 : E0688031 +...checksum after hashing g_349 : 85C8588F +...checksum after hashing g_444 : 9C43FE0A +...checksum after hashing g_459 : 6BF2C56E +...checksum after hashing g_498 : 4F88108B +before stmt(366): checksum = 4F88108B +...checksum after hashing g_11 : E4255CEB +...checksum after hashing g_25 : 5CC76FF4 +...checksum after hashing g_67 : 6EB09092 +...checksum after hashing g_106 : B20F5C16 +...checksum after hashing g_156 : E0688031 +...checksum after hashing g_349 : 85C8588F +...checksum after hashing g_444 : 9C43FE0A +...checksum after hashing g_459 : 6BF2C56E +...checksum after hashing g_498 : 4F88108B +before stmt(367): checksum = 4F88108B +...checksum after hashing g_11 : E4255CEB +...checksum after hashing g_25 : 5CC76FF4 +...checksum after hashing g_67 : 6EB09092 +...checksum after hashing g_106 : B20F5C16 +...checksum after hashing g_156 : E0688031 +...checksum after hashing g_349 : 85C8588F +...checksum after hashing g_444 : 9C43FE0A +...checksum after hashing g_459 : 6BF2C56E +...checksum after hashing g_498 : 4F88108B +before stmt(378): checksum = 4F88108B +...checksum after hashing g_11 : E4255CEB +...checksum after hashing g_25 : 5CC76FF4 +...checksum after hashing g_67 : 6EB09092 +...checksum after hashing g_106 : B20F5C16 +...checksum after hashing g_156 : E0688031 +...checksum after hashing g_349 : 85C8588F +...checksum after hashing g_444 : 9C43FE0A +...checksum after hashing g_459 : 6BF2C56E +...checksum after hashing g_498 : 4F88108B +before stmt(374): checksum = 4F88108B +...checksum after hashing g_11 : E4255CEB +...checksum after hashing g_25 : 5CC76FF4 +...checksum after hashing g_67 : 6EB09092 +...checksum after hashing g_106 : B20F5C16 +...checksum after hashing g_156 : E0688031 +...checksum after hashing g_349 : 85C8588F +...checksum after hashing g_444 : 9C43FE0A +...checksum after hashing g_459 : 6BF2C56E +...checksum after hashing g_498 : 4F88108B +before stmt(375): checksum = 4F88108B +...checksum after hashing g_11 : E4255CEB +...checksum after hashing g_25 : 5CC76FF4 +...checksum after hashing g_67 : 6EB09092 +...checksum after hashing g_106 : B20F5C16 +...checksum after hashing g_156 : E0688031 +...checksum after hashing g_349 : 85C8588F +...checksum after hashing g_444 : 9C43FE0A +...checksum after hashing g_459 : 6BF2C56E +...checksum after hashing g_498 : 4F88108B +before stmt(376): checksum = 4F88108B +...checksum after hashing g_11 : E4255CEB +...checksum after hashing g_25 : 5CC76FF4 +...checksum after hashing g_67 : 6EB09092 +...checksum after hashing g_106 : B20F5C16 +...checksum after hashing g_156 : E0688031 +...checksum after hashing g_349 : 85C8588F +...checksum after hashing g_444 : 9C43FE0A +...checksum after hashing g_459 : 6BF2C56E +...checksum after hashing g_498 : 4F88108B +before stmt(377): checksum = 4F88108B +...checksum after hashing g_11 : E4255CEB +...checksum after hashing g_25 : 5CC76FF4 +...checksum after hashing g_67 : 6EB09092 +...checksum after hashing g_106 : B20F5C16 +...checksum after hashing g_156 : E0688031 +...checksum after hashing g_349 : 85C8588F +...checksum after hashing g_444 : 9C43FE0A +...checksum after hashing g_459 : 6BF2C56E +...checksum after hashing g_498 : 4F88108B +before stmt(379): checksum = 4F88108B +...checksum after hashing g_11 : E4255CEB +...checksum after hashing g_25 : 5CC76FF4 +...checksum after hashing g_67 : 6EB09092 +...checksum after hashing g_106 : B20F5C16 +...checksum after hashing g_156 : E0688031 +...checksum after hashing g_349 : 85C8588F +...checksum after hashing g_444 : 9C43FE0A +...checksum after hashing g_459 : 6BF2C56E +...checksum after hashing g_498 : 4F88108B +before stmt(385): checksum = 4F88108B +...checksum after hashing g_11 : E4255CEB +...checksum after hashing g_25 : 5CC76FF4 +...checksum after hashing g_67 : 6EB09092 +...checksum after hashing g_106 : 41A564E0 +...checksum after hashing g_156 : 19418AA7 +...checksum after hashing g_349 : 9053B672 +...checksum after hashing g_444 : B45B7AE0 +...checksum after hashing g_459 : 83A2E7CD +...checksum after hashing g_498 : 3FF503F0 +before stmt(386): checksum = 3FF503F0 +...checksum after hashing g_11 : E4255CEB +...checksum after hashing g_25 : 5CC76FF4 +...checksum after hashing g_67 : 6EB09092 +...checksum after hashing g_106 : 41A564E0 +...checksum after hashing g_156 : 19418AA7 +...checksum after hashing g_349 : 9053B672 +...checksum after hashing g_444 : B45B7AE0 +...checksum after hashing g_459 : 83A2E7CD +...checksum after hashing g_498 : 3FF503F0 +before stmt(388): checksum = 3FF503F0 +...checksum after hashing g_11 : E4255CEB +...checksum after hashing g_25 : 5CC76FF4 +...checksum after hashing g_67 : 6EB09092 +...checksum after hashing g_106 : 41A564E0 +...checksum after hashing g_156 : 19418AA7 +...checksum after hashing g_349 : 9053B672 +...checksum after hashing g_444 : B45B7AE0 +...checksum after hashing g_459 : 83A2E7CD +...checksum after hashing g_498 : 253AEBD7 +before stmt(406): checksum = 253AEBD7 +...checksum after hashing g_11 : E4255CEB +...checksum after hashing g_25 : 5CC76FF4 +...checksum after hashing g_67 : 6EB09092 +...checksum after hashing g_106 : 41A564E0 +...checksum after hashing g_156 : 19418AA7 +...checksum after hashing g_349 : 9053B672 +...checksum after hashing g_444 : B45B7AE0 +...checksum after hashing g_459 : 83A2E7CD +...checksum after hashing g_498 : E14E2313 +before stmt(407): checksum = E14E2313 +...checksum after hashing g_11 : E4255CEB +...checksum after hashing g_25 : 5CC76FF4 +...checksum after hashing g_67 : 6EB09092 +...checksum after hashing g_106 : 41A564E0 +...checksum after hashing g_156 : 19418AA7 +...checksum after hashing g_349 : 9053B672 +...checksum after hashing g_444 : B45B7AE0 +...checksum after hashing g_459 : 83A2E7CD +...checksum after hashing g_498 : E14E2313 +checksum = e14e2313 diff --git a/src/tests/csmith/rand16.c b/src/tests/csmith/rand16.c new file mode 100644 index 0000000..1ad9730 --- /dev/null +++ b/src/tests/csmith/rand16.c @@ -0,0 +1,748 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static int g_10 = 0x144AD72DL; +static int *g_9 = &g_10; +static int g_79 = 0x0EA8EDF9L; +static int *g_90 = &g_79; +static int **g_89 = &g_90; +static int g_93 = 0xADEE2DE5L; +static unsigned g_119 = 4294967295UL; +static unsigned g_145 = 1UL; +static short g_189 = (-2L); +static int g_283 = 0L; +static int g_400 = (-1L); +static int ***g_507 = &g_89; +static int *g_532 = (void*)0; +static int ***g_545 = &g_89; +static int g_590 = 1L; +static signed char g_625 = 0xD0L; +static unsigned char func_1(void); +static int * func_5(int * p_6, unsigned short p_7, unsigned short p_8); +static unsigned func_17(int p_18); +static int func_19(int * p_20, unsigned p_21, int * p_22); +static int * func_23(unsigned short p_24); +static int func_27(unsigned p_28, signed char p_29, int p_30, unsigned p_31); +static unsigned short func_39(unsigned p_40, unsigned p_41, int * p_42); +static int * func_43(unsigned p_44, int p_45, short p_46); +static unsigned short func_47(unsigned char p_48); +static unsigned short func_59(unsigned short p_60, signed char p_61, signed char p_62); +static unsigned char func_1(void) +{ + unsigned l_2 = 0xEC3D7D49L; + int *l_16 = &g_10; + int ***l_546 = (void*)0; + int *l_592 = &g_93; + int *l_620 = &g_79; + unsigned char l_634 = 0x22L; + unsigned char l_675 = 0UL; + step_hash(335); + if ((~l_2)) + { + unsigned char l_458 = 0xE1L; + int *l_534 = &g_10; + step_hash(254); + for (l_2 = 11; (l_2 < 1); --l_2) + { + int **l_533 = &g_9; + unsigned char l_541 = 0xCCL; + step_hash(240); + (*l_533) = func_5(g_9, ((int)((signed char)(((*g_9) < ((((void*)0 == &g_10) == ((-(short)((void*)0 == l_16)) != (func_17(func_19(func_23(((unsigned char)4UL + (unsigned char)0xD2L)), g_283, &g_283)) && (*g_9)))) & l_458)) & 0x2CL) >> (signed char)6) / (int)(*g_9)), (*l_16)); + step_hash(241); + (*g_89) = (void*)0; + step_hash(242); + (*l_533) = l_534; + step_hash(253); + for (g_10 = 11; (g_10 > (-29)); --g_10) + { + signed char l_538 = 0L; + int *l_544 = &g_79; + step_hash(246); + (*l_544) |= ((-(unsigned)(g_189 != ((0xDFB4BF60L && 0xB5954C98L) | ((l_538 == (~((unsigned short)(((-4L) ^ g_93) == l_541) / (unsigned short)0x15AEL))) & ((signed char)g_189 >> (signed char)(*l_534)))))) > 65533UL); + step_hash(247); + (*l_544) = ((((((0x655FF68BL | func_47(g_283)) != ((g_283 && (((*g_9) || (*l_16)) | (255UL || (g_545 != l_546)))) <= 9UL)) >= g_145) || (*l_16)) | g_119) | 0xED079876L); + step_hash(252); + for (g_119 = 0; (g_119 <= 32); ++g_119) + { + step_hash(251); + (**g_545) = l_534; + } + } + } + } + else + { + signed char l_555 = (-8L); + unsigned l_565 = 0x8F8CECB5L; + int *l_571 = &g_283; + unsigned short l_617 = 65535UL; + step_hash(256); + (***g_507) = 0L; + step_hash(333); + if (((func_47(((unsigned char)0xE5L * (unsigned char)g_10)) == ((signed char)((unsigned char)l_555 << (unsigned char)4) << (signed char)2)) && l_555)) + { + int **l_558 = &l_16; + int *l_589 = &g_10; + int **l_608 = (void*)0; + step_hash(294); + if ((g_283 != ((unsigned)(l_558 != (*g_545)) - (unsigned)(+(((~g_10) == ((unsigned char)func_59(g_79, ((short)(g_79 | ((g_400 & ((unsigned short)(g_119 == (**l_558)) >> (unsigned short)g_119)) == 65529UL)) * (short)(-10L)), (*l_16)) - (unsigned char)l_565)) <= g_119))))) + { + int *l_566 = &g_79; + int ***l_567 = &l_558; + signed char l_570 = 0L; + signed char l_591 = 0x69L; + step_hash(278); + if ((((((**g_507) == (void*)0) > (func_59(g_400, g_10, ((**g_507) == l_566)) ^ ((l_567 != &g_89) < (**l_558)))) != 0x26L) < g_189)) + { + unsigned char l_569 = 0xB7L; + unsigned l_578 = 0UL; + unsigned char l_580 = 0x2AL; + step_hash(266); + if ((*g_9)) + { + int l_568 = 0x38F7327EL; + step_hash(261); + (*l_558) = (void*)0; + step_hash(262); + return l_568; + } + else + { + unsigned short l_579 = 0UL; + step_hash(264); + (***g_507) = l_569; + step_hash(265); + (*l_571) = ((func_17(l_570) || g_189) & (func_19(l_571, ((signed char)(((short)(+((unsigned char)((*l_558) != (void*)0) / (unsigned char)(g_145 & ((g_145 != l_578) || g_283)))) % (short)l_579) < 2UL) << (signed char)1), (**l_567)) >= (**l_558))); + } + step_hash(267); + (**l_558) ^= l_580; + step_hash(268); + (**g_545) = func_5((**l_567), g_283, (*l_566)); + } + else + { + step_hash(270); + (*l_566) = (**g_89); + step_hash(275); + for (g_189 = 0; (g_189 < (-7)); g_189--) + { + step_hash(274); + (*l_16) ^= 9L; + } + step_hash(276); + (*l_558) = func_5((*l_558), ((g_119 != (g_79 & ((((short)((1UL <= func_59(((func_39(((unsigned char)(((unsigned char)0xA2L / (unsigned char)(g_400 || 0xDACDL)) | func_19((*g_89), g_283, l_589)) * (unsigned char)g_93), g_283, (**g_545)) < g_400) && (*l_16)), g_400, g_145)) == g_590) % (short)l_591) < g_93) || 1L))) > 4294967295UL), g_119); + step_hash(277); + l_592 = (**g_545); + } + step_hash(279); + (*l_558) = l_571; + } + else + { + unsigned char l_604 = 0x38L; + step_hash(285); + for (g_10 = 0; (g_10 < 11); g_10 += 5) + { + unsigned char l_595 = 6UL; + step_hash(284); + (*l_571) &= func_47(l_595); + } + step_hash(293); + if ((((((short)((((*l_571) && ((*l_589) | (((unsigned char)((g_10 & ((unsigned short)0x1C84L / (unsigned short)g_145)) <= func_59((**l_558), l_604, g_189)) >> (unsigned char)l_604) > g_283))) ^ g_400) || 0L) % (short)g_119) ^ 0x06E8FD16L) | g_590) & 6L)) + { + step_hash(287); + return l_604; + } + else + { + int *l_605 = &g_10; + step_hash(289); + (*l_16) = (**l_558); + step_hash(290); + (*g_89) = (*g_89); + step_hash(291); + (**g_545) = l_605; + step_hash(292); + (*l_16) = ((unsigned short)(&l_589 == l_608) << (unsigned short)10); + } + } + step_hash(295); + (*l_589) = ((&l_571 == &l_589) <= ((signed char)(g_145 < (0xE1C449C1L <= (((unsigned short)(*l_589) << (unsigned short)5) | ((signed char)(*l_571) << (signed char)6)))) % (signed char)((unsigned char)(0xA6L && l_617) * (unsigned char)g_79))); + } + else + { + unsigned l_648 = 4294967289UL; + int ***l_649 = &g_89; + step_hash(297); + (**g_507) = l_571; + step_hash(332); + if ((***g_507)) + { + int **l_643 = &l_571; + int l_682 = 0x9DA47F2AL; + step_hash(313); + for (g_79 = 0; (g_79 != (-11)); --g_79) + { + unsigned l_630 = 4294967295UL; + step_hash(311); + if (func_19((*g_89), g_10, l_620)) + { + int l_633 = 0xED1435DDL; + step_hash(303); + (**g_545) = (**g_545); + step_hash(304); + (*l_571) = ((signed char)((signed char)0x30L - (signed char)((&g_89 != (void*)0) < g_625)) % (signed char)((int)((unsigned char)(l_630 <= ((signed char)((*l_571) <= ((func_59(l_633, l_630, g_189) >= 0x2AL) == (***g_507))) + (signed char)0UL)) - (unsigned char)g_590) / (int)(***g_545))); + step_hash(305); + (***g_507) = ((l_634 != ((int)func_59((*l_571), g_590, (((+g_79) | (((int)(***g_545) % (int)(((***g_545) > (**g_89)) & ((**g_545) != (*g_89)))) != l_633)) & g_590)) + (int)0xD576A412L)) | g_189); + } + else + { + step_hash(307); + (***g_545) = (&g_89 == &g_89); + step_hash(308); + if ((***g_507)) + continue; + step_hash(309); + (***g_507) = ((signed char)(l_643 != l_643) * (signed char)((unsigned char)l_630 << (unsigned char)1)); + step_hash(310); + (**g_89) |= 0x8FDAC414L; + } + step_hash(312); + return g_400; + } + step_hash(314); + (*g_89) = l_571; + step_hash(328); + if ((!(((unsigned short)(*l_571) >> (unsigned short)l_648) != (((((((l_649 != (void*)0) < (((((unsigned char)((signed char)((unsigned short)(**l_643) * (unsigned short)((~0L) || g_145)) >> (signed char)(+g_119)) * (unsigned char)((signed char)g_145 % (signed char)(-6L))) | 0x94C6A289L) | (*g_90)) > g_625)) & g_625) ^ 1L) < 0x73L) != g_189) <= (**l_643))))) + { + step_hash(316); + (***g_507) = ((signed char)0xCFL >> (signed char)7); + } + else + { + int *l_660 = &g_10; + step_hash(318); + (*g_545) = (*g_545); + step_hash(319); + (*g_89) = l_660; + step_hash(327); + if ((*l_620)) + { + unsigned char l_669 = 0xA3L; + int l_670 = 3L; + step_hash(321); + l_670 |= func_19(l_660, ((short)((int)(func_59(g_145, g_119, (((signed char)((&l_571 != (void*)0) < g_119) << (signed char)(**l_643)) != ((unsigned short)(((**g_545) != (void*)0) != l_669) + (unsigned short)0UL))) <= 0x3891L) % (int)(**l_643)) << (short)5), (**l_649)); + step_hash(322); + (**g_507) = (*l_643); + step_hash(323); + (*l_643) = func_23(l_670); + step_hash(324); + (*l_620) ^= (l_670 | ((void*)0 != &g_89)); + } + else + { + step_hash(326); + return (*l_660); + } + } + step_hash(329); + (*l_620) = ((short)l_648 - (short)(((signed char)l_675 - (signed char)g_93) <= (g_283 ^ ((unsigned char)(&g_89 == (void*)0) >> (unsigned char)((short)((unsigned char)(g_400 && (+(g_189 <= ((*l_16) < 1L)))) << (unsigned char)3) * (short)l_682))))); + } + else + { + int *l_683 = (void*)0; + step_hash(331); + (**g_545) = l_683; + } + } + step_hash(334); + return g_283; + } + step_hash(336); + return g_119; +} +static int * func_5(int * p_6, unsigned short p_7, unsigned short p_8) +{ + unsigned char l_466 = 252UL; + int ***l_506 = &g_89; + short l_526 = (-1L); + step_hash(238); + for (g_10 = 8; (g_10 == 0); g_10 -= 2) + { + int **l_461 = &g_90; + int l_475 = 1L; + int l_523 = (-8L); + short l_524 = 0xB19EL; + int l_525 = 0x2E609269L; + int **l_529 = (void*)0; + int *l_531 = &g_79; + step_hash(234); + if (((p_6 != (void*)0) < ((void*)0 != l_461))) + { + unsigned short l_467 = 65528UL; + int *l_468 = &g_79; + step_hash(221); + (*l_468) = ((unsigned)((g_119 == ((unsigned char)l_466 % (unsigned char)l_467)) | (*p_6)) - (unsigned)(*p_6)); + step_hash(222); + (*l_468) = (((g_79 >= (((unsigned short)((int)(g_93 < (*l_468)) / (int)(l_466 ^ g_400)) << (unsigned short)(((func_59(g_400, p_7, (((unsigned)4294967291UL / (unsigned)(l_475 | p_7)) == (*l_468))) > 0xC4L) >= l_466) <= g_283)) || l_466)) & (*l_468)) <= (*p_6)); + } + else + { + unsigned l_483 = 0x147374AFL; + int *l_484 = &g_283; + int *l_508 = &g_93; + step_hash(231); + for (g_283 = 0; (g_283 <= 12); g_283 += 8) + { + int *l_478 = (void*)0; + int *l_479 = &g_93; + int ***l_482 = &l_461; + step_hash(227); + (*l_479) |= (&g_89 != (void*)0); + step_hash(228); + (**l_482) = func_43(((unsigned char)l_466 << (unsigned char)(&p_6 == &g_90)), (l_482 != &g_89), l_483); + step_hash(229); + if ((*g_90)) + break; + step_hash(230); + (*g_89) = l_484; + } + step_hash(232); + (*l_508) |= (-(int)(((unsigned char)((short)0x2834L + (short)1L) * (unsigned char)((unsigned char)((((l_466 > (0xCB70L && (-6L))) <= p_8) != ((short)((unsigned char)p_7 / (unsigned char)func_59(((int)(((unsigned char)(((short)(*l_484) >> (short)func_47((~((short)((unsigned char)((l_506 == g_507) < p_8) * (unsigned char)(-5L)) + (short)p_8)))) <= g_119) * (unsigned char)p_8) >= (*g_9)) % (int)p_7), p_7, p_7)) << (short)14)) || 0L) + (unsigned char)p_8)) <= (-1L))); + step_hash(233); + (*l_508) = ((*p_6) > (p_8 == (l_466 & ((unsigned char)((unsigned)((unsigned)(((unsigned char)((0xBDL | (((short)((signed char)(+((int)(*g_9) - (int)(*p_6))) % (signed char)p_7) * (short)l_475) >= g_400)) >= l_523) / (unsigned char)p_7) ^ (-2L)) % (unsigned)0xDA1B7B4AL) * (unsigned)0L) >> (unsigned char)l_524)))); + } + step_hash(235); + l_525 = (!0x14E0A851L); + step_hash(236); + l_526 = ((void*)0 == (*g_507)); + step_hash(237); + (*l_531) ^= (((unsigned char)(&p_6 == (*g_507)) >> (unsigned char)0) & ((((*g_507) != l_529) & (((*p_6) < (-(unsigned)((g_400 != ((!(&p_6 != (void*)0)) & (*p_6))) == 0xF3D36BC6L))) <= g_119)) <= g_93)); + } + step_hash(239); + return g_532; +} +static unsigned func_17(int p_18) +{ + short l_356 = 8L; + int ***l_386 = &g_89; + int ***l_401 = &g_89; + unsigned char l_448 = 251UL; + int *l_454 = (void*)0; + int **l_455 = &l_454; + int *l_456 = &g_10; + int l_457 = 0xEE7F6989L; + step_hash(212); + for (g_119 = 0; (g_119 != 30); g_119 += 5) + { + unsigned short l_345 = 0xABD0L; + int *l_353 = &g_79; + int **l_422 = (void*)0; + int l_435 = 0L; + int *l_449 = &l_435; + step_hash(202); + for (p_18 = 0; (p_18 == 7); p_18 += 5) + { + int l_363 = 7L; + unsigned l_364 = 0xBA7C4939L; + int l_402 = 0xACBDA03CL; + unsigned l_415 = 4294967287UL; + short l_438 = (-4L); + int *l_442 = &l_435; + } + step_hash(203); + (*l_353) = (0x72L && 0x05L); + step_hash(204); + (*l_449) |= func_27(g_283, (-(int)(p_18 <= p_18)), (p_18 && func_59(((short)(func_27(((short)(1UL & 0x1428A198L) + (short)p_18), g_283, (*l_353), g_93) && 0UL) * (short)p_18), g_119, g_10)), l_448); + step_hash(211); + for (g_79 = 0; (g_79 >= 11); g_79 += 7) + { + int **l_452 = &g_90; + unsigned short l_453 = 0x6B27L; + step_hash(208); + (*l_452) = &l_435; + step_hash(209); + if ((**g_89)) + break; + step_hash(210); + l_453 ^= (g_119 & p_18); + } + } + step_hash(213); + (*l_455) = l_454; + step_hash(214); + (*l_455) = func_43(g_79, p_18, func_19(l_456, p_18, &g_283)); + step_hash(215); + return l_457; +} +static int func_19(int * p_20, unsigned p_21, int * p_22) +{ + unsigned short l_334 = 0xBC54L; + step_hash(137); + return l_334; +} +static int * func_23(unsigned short p_24) +{ + unsigned l_32 = 2UL; + int *l_92 = &g_93; + int **l_98 = &g_90; + unsigned l_120 = 4294967289UL; + short l_157 = 0x344DL; + int *l_333 = &g_93; + step_hash(35); + (*l_92) |= ((func_27(l_32, (l_32 ^ ((int)((unsigned)(((unsigned short)(func_39(l_32, g_10, func_43(g_10, (*g_9), ((((~0x9FL) && p_24) > (func_47(g_10) == (-8L))) & g_10))) & 65531UL) + (unsigned short)l_32) || l_32) / (unsigned)l_32) - (int)p_24)), l_32, g_10) <= l_32) ^ p_24); + step_hash(36); + (*l_98) = func_43(g_93, ((1UL & g_93) >= (func_39(p_24, (0xDC7CBFABL || (func_39((((short)((short)p_24 << (short)13) >> (short)11) <= 252UL), g_79, l_92) & (*l_92))), l_92) >= (*l_92))), p_24); + step_hash(134); + if (p_24) + { + int *l_99 = (void*)0; + int ***l_127 = &l_98; + unsigned l_132 = 0x823F5DDDL; + unsigned l_220 = 1UL; + int l_227 = 0x16460FD5L; + int ***l_266 = &l_98; + unsigned l_267 = 0x445B51B4L; + step_hash(38); + (*l_98) = (*l_98); + step_hash(49); + if ((&l_92 != &l_92)) + { + int ***l_104 = (void*)0; + int l_107 = 1L; + step_hash(40); + (*l_98) = l_99; + step_hash(45); + for (g_79 = 0; (g_79 < 17); g_79 += 1) + { + step_hash(44); + return (*g_89); + } + step_hash(46); + (*l_92) = ((unsigned char)((l_104 == l_104) | ((signed char)l_107 >> (signed char)7)) * (unsigned char)func_27(g_79, (*l_92), (*l_92), func_59(g_79, ((unsigned short)((((g_79 <= (func_39(((unsigned)((unsigned char)(+l_107) >> (unsigned char)p_24) / (unsigned)p_24), (*l_92), (*l_98)) <= g_79)) <= p_24) || p_24) || (*l_92)) * (unsigned short)0xF9AEL), p_24))); + } + else + { + int ***l_116 = &g_89; + step_hash(48); + (*l_92) = func_47(((func_27(func_47((1UL || 0x104D70CCL)), g_10, ((unsigned char)((((**l_98) > (l_116 != &g_89)) <= (((unsigned short)(func_39(((p_24 >= (g_119 | 0x66L)) > (***l_116)), g_10, l_99) < g_93) - (unsigned short)g_10) >= g_93)) >= 0xBAF6L) / (unsigned char)p_24), l_120) && g_79) ^ p_24)); + } + step_hash(50); + (*l_98) = &g_10; + step_hash(97); + if (func_59((p_24 != (((+((unsigned short)(((short)g_79 / (short)(g_79 || p_24)) < ((-1L) >= func_39(((g_119 > p_24) == ((void*)0 != &g_89)), p_24, (*g_89)))) >> (unsigned short)15)) || (**g_89)) != p_24)), (**l_98), p_24)) + { + int l_146 = (-5L); + step_hash(52); + l_132 &= ((((int)(g_10 == 0xB236L) - (int)(0x6C36115CL > (0x330FL >= (l_127 == (void*)0)))) == (((unsigned short)g_93 / (unsigned short)(+((unsigned char)p_24 * (unsigned char)func_39(((*l_92) < 0L), g_79, (**l_127))))) > (**l_98))) > (*g_90)); + step_hash(53); + (*l_98) = func_43(p_24, (func_47(g_93) | g_119), (func_59(p_24, ((unsigned char)p_24 * (unsigned char)((signed char)((unsigned short)(((unsigned short)((short)0L * (short)1UL) % (unsigned short)((unsigned char)((!(func_59(g_119, g_145, p_24) || l_146)) < p_24) * (unsigned char)g_10)) <= (-5L)) >> (unsigned short)g_10) % (signed char)p_24)), p_24) >= 0xFE4BL)); + } + else + { + unsigned l_150 = 1UL; + int ***l_160 = &l_98; + int *l_273 = &g_79; + step_hash(94); + if ((-(short)((unsigned char)(func_39((l_150 < ((g_119 && (((unsigned short)0x619BL >> (unsigned short)9) < ((signed char)p_24 + (signed char)((signed char)l_157 << (signed char)2)))) < (((signed char)(l_160 == l_127) * (signed char)(-3L)) < ((((unsigned short)((signed char)((signed char)p_24 * (signed char)p_24) - (signed char)(-1L)) / (unsigned short)2L) ^ 0x80L) < g_79)))), g_79, (**l_160)) ^ (*l_92)) % (unsigned char)p_24))) + { + int l_179 = (-2L); + int *l_204 = &g_79; + int ***l_212 = &g_89; + step_hash(74); + if (((unsigned char)((unsigned short)((short)func_27(((((short)(&l_98 == (void*)0) + (short)(((unsigned char)(!p_24) >> (unsigned char)5) & ((void*)0 == &g_9))) & ((void*)0 != (**l_127))) && l_179), (-(int)(((unsigned)p_24 / (unsigned)g_119) ^ g_79)), l_179, g_119) * (short)(-3L)) * (unsigned short)0x7E8BL) << (unsigned char)7)) + { + int *l_185 = &g_79; + step_hash(66); + if ((((((&g_90 != &g_90) > p_24) & ((func_59(((g_145 ^ (p_24 > (func_39(g_145, g_10, l_185) <= 0x71L))) | p_24), g_145, p_24) | p_24) | (*l_92))) > p_24) && l_179)) + { + int *l_186 = &g_79; + step_hash(58); + (*l_92) ^= func_39(g_10, ((*l_160) == &g_90), l_186); + step_hash(59); + (*l_186) = (((short)func_39(p_24, g_189, l_185) + (short)(p_24 ^ ((unsigned char)((g_189 <= func_47(p_24)) == 0x145BL) + (unsigned char)1UL))) == p_24); + step_hash(60); + (*l_185) = ((signed char)func_59(((signed char)((unsigned char)(*l_92) + (unsigned char)((-7L) < ((short)((unsigned)(((short)(l_204 != l_99) % (short)(~g_145)) <= (~g_119)) - (unsigned)((void*)0 != &l_186)) << (short)((unsigned char)1UL >> (unsigned char)g_119)))) << (signed char)g_10), g_119, p_24) + (signed char)0x0DL); + step_hash(61); + (**l_160) = l_204; + } + else + { + int *l_208 = &g_93; + step_hash(63); + (*l_204) |= (-(int)p_24); + step_hash(64); + (*l_92) = p_24; + step_hash(65); + return l_208; + } + } + else + { + int *l_211 = (void*)0; + step_hash(72); + for (g_145 = (-15); (g_145 <= 20); g_145 += 1) + { + step_hash(71); + (**l_127) = l_211; + } + step_hash(73); + return &g_79; + } + step_hash(75); + (**l_160) = func_43((l_212 == &g_89), func_27(func_59((func_59(g_189, (((func_59(p_24, g_10, g_189) & 1L) != ((p_24 || 0x27L) > 0x114BL)) != (***l_160)), g_189) <= 0x66L), g_93, (***l_212)), g_10, (*g_90), (***l_160)), g_93); + step_hash(91); + if ((**g_89)) + { + unsigned char l_215 = 1UL; + int l_228 = 0xEB5C81F1L; + short l_241 = 0L; + step_hash(77); + (**l_127) = (*g_89); + step_hash(78); + l_228 = (g_119 & func_27(l_215, ((unsigned)((***l_212) >= p_24) - (unsigned)((unsigned)(~l_220) / (unsigned)((int)(!(((((signed char)p_24 % (signed char)func_59(((unsigned short)g_119 * (unsigned short)g_119), (g_79 >= 4294967290UL), p_24)) >= l_215) || l_227) != g_189)) - (int)p_24))), (*g_9), (***l_212))); + step_hash(79); + (**l_127) = &l_228; + step_hash(80); + (*l_92) |= func_59(((unsigned char)l_215 >> (unsigned char)(0xD56DL <= p_24)), ((signed char)(1UL <= func_39(g_79, ((((unsigned char)((unsigned)(((short)((short)0x4598L - (short)g_189) * (short)1UL) && 0xFABAL) + (unsigned)l_241) * (unsigned char)g_145) && 1L) < p_24), (**l_212))) * (signed char)(**l_98)), p_24); + } + else + { + unsigned short l_255 = 65535UL; + step_hash(88); + if (func_59(((**l_127) != (*g_89)), g_93, p_24)) + { + int *l_254 = (void*)0; + step_hash(83); + g_93 = (((unsigned short)((signed char)(&g_89 == (void*)0) >> (signed char)7) - (unsigned short)(((unsigned)((248UL ^ (((unsigned short)0xEC67L >> (unsigned short)8) != g_189)) & ((**l_160) == (void*)0)) - (unsigned)((((p_24 | (((signed char)((l_254 != (**l_160)) && 6L) / (signed char)0xF8L) > (***l_127))) < 0x05L) > g_10) != l_255)) < g_93)) < g_10); + step_hash(84); + (*l_98) = (**l_160); + } + else + { + int **l_270 = &g_90; + step_hash(86); + (*l_92) |= ((func_47(p_24) || ((short)(p_24 > func_59(func_59(p_24, (**l_98), ((short)g_145 - (short)((unsigned char)((p_24 || g_119) != ((((unsigned char)((int)((l_266 == l_266) != p_24) + (int)(*g_9)) - (unsigned char)g_145) && l_267) || g_10)) / (unsigned char)p_24))), l_255, p_24)) * (short)0xBDFAL)) == (***l_212)); + step_hash(87); + (*l_92) = ((unsigned short)((*l_266) != (*l_266)) * (unsigned short)(l_270 != &g_90)); + } + step_hash(89); + (*l_92) = ((signed char)((p_24 ^ 0x6BE60168L) < (g_189 | (&g_89 == &g_89))) / (signed char)0xE0L); + step_hash(90); + (*l_273) = func_47((l_273 != (**l_266))); + } + } + else + { + signed char l_274 = 0x76L; + step_hash(93); + (**l_127) = func_43(l_274, func_47((*l_92)), g_10); + } + step_hash(95); + (*l_273) = (func_27(func_27((p_24 ^ ((unsigned short)1UL * (unsigned short)(((short)(-1L) * (short)p_24) < (*l_273)))), p_24, p_24, (((unsigned char)((unsigned char)((*l_92) > func_39(p_24, g_119, &g_93)) * (unsigned char)g_189) << (unsigned char)3) | g_145)), p_24, p_24, g_10) == 0xE1D1L); + step_hash(96); + (*l_92) ^= g_283; + } + } + else + { + unsigned char l_292 = 1UL; + signed char l_295 = (-1L); + int l_300 = (-1L); + int **l_304 = &l_92; + step_hash(99); + (*l_92) = ((int)((unsigned short)(!((unsigned short)func_47(g_10) - (unsigned short)((((unsigned short)l_292 >> (unsigned short)func_59(((short)0xCD33L << (short)4), g_283, l_295)) | p_24) | g_93))) << (unsigned short)l_295) / (int)5UL); + step_hash(109); + for (g_119 = 0; (g_119 >= 2); ++g_119) + { + int *l_301 = &g_79; + step_hash(107); + for (g_93 = 0; (g_93 > (-17)); --g_93) + { + step_hash(106); + l_300 |= (**l_98); + } + step_hash(108); + return l_301; + } + step_hash(132); + for (g_79 = 0; (g_79 > (-11)); g_79 -= 6) + { + short l_315 = 0x1D8DL; + short l_331 = 0xF066L; + } + step_hash(133); + (*l_98) = (void*)0; + } + step_hash(135); + return l_333; +} +static int func_27(unsigned p_28, signed char p_29, int p_30, unsigned p_31) +{ + unsigned l_84 = 4UL; + int **l_86 = &g_9; + int **l_91 = &g_90; + step_hash(23); + l_84 = (*g_9); + step_hash(31); + if (l_84) + { + int *l_85 = &g_79; + int ***l_87 = &l_86; + int *l_88 = &g_79; + step_hash(25); + (*l_85) = l_84; + step_hash(26); + (*l_87) = l_86; + step_hash(27); + l_88 = (*l_86); + step_hash(28); + (*l_85) &= p_31; + } + else + { + step_hash(30); + g_89 = l_86; + } + step_hash(32); + (*l_91) = func_43(p_30, p_30, (**l_86)); + step_hash(33); + (*l_91) = &p_30; + step_hash(34); + return (**l_86); +} +static unsigned short func_39(unsigned p_40, unsigned p_41, int * p_42) +{ + signed char l_83 = 0L; + step_hash(20); + l_83 ^= (*g_9); + step_hash(21); + return p_40; +} +static int * func_43(unsigned p_44, int p_45, short p_46) +{ + int *l_80 = (void*)0; + int **l_81 = &l_80; + int *l_82 = &g_79; + step_hash(15); + (*l_81) = l_80; + step_hash(16); + (*l_81) = &p_45; + step_hash(17); + (*l_82) ^= (p_45 || (*l_80)); + step_hash(18); + return &g_10; +} +static unsigned short func_47(unsigned char p_48) +{ + unsigned short l_63 = 0x5297L; + int l_66 = 0x9B5CEC81L; + int *l_67 = (void*)0; + int *l_68 = &l_66; + unsigned l_77 = 0x3BFA4ACFL; + int *l_78 = &g_79; + step_hash(10); + l_66 = ((((unsigned short)g_10 << (unsigned short)((unsigned short)((unsigned char)(((short)((unsigned short)(0xA6DFE160L < (((void*)0 == &g_10) & func_59(g_10, l_63, g_10))) / (unsigned short)p_48) * (short)0x785EL) <= 248UL) >> (unsigned char)4) - (unsigned short)l_66)) & g_10) <= p_48); + step_hash(11); + (*l_68) &= (l_68 == &l_66); + step_hash(12); + (*l_78) &= (p_48 < ((unsigned)(*l_68) + (unsigned)(((p_48 > ((&l_68 != (void*)0) != ((*g_9) ^ func_59(((unsigned short)((signed char)(*l_68) * (signed char)(((short)(-1L) - (short)func_59((func_59(g_10, p_48, p_48) && l_77), p_48, p_48)) && p_48)) * (unsigned short)p_48), p_48, g_10)))) > 0x10L) | g_10))); + step_hash(13); + return p_48; +} +static unsigned short func_59(unsigned short p_60, signed char p_61, signed char p_62) +{ + int *l_64 = &g_10; + int **l_65 = &l_64; + step_hash(8); + (*l_65) = l_64; + step_hash(9); + return p_61; +} +void csmith_compute_hash(void) +{ + transparent_crc(g_10, "g_10", print_hash_value); + transparent_crc(g_79, "g_79", print_hash_value); + transparent_crc(g_93, "g_93", print_hash_value); + transparent_crc(g_119, "g_119", print_hash_value); + transparent_crc(g_145, "g_145", print_hash_value); + transparent_crc(g_189, "g_189", print_hash_value); + transparent_crc(g_283, "g_283", print_hash_value); + transparent_crc(g_400, "g_400", print_hash_value); + transparent_crc(g_590, "g_590", print_hash_value); + transparent_crc(g_625, "g_625", print_hash_value); +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand16.expect b/src/tests/csmith/rand16.expect new file mode 100644 index 0000000..92d0547 --- /dev/null +++ b/src/tests/csmith/rand16.expect @@ -0,0 +1,44 @@ +...checksum after hashing g_10 : EB96F8B8 +...checksum after hashing g_79 : 89A48C55 +...checksum after hashing g_93 : D219E58F +...checksum after hashing g_119 : 16315139 +...checksum after hashing g_145 : 4B2CF936 +...checksum after hashing g_189 : F029840E +...checksum after hashing g_283 : DE5C7684 +...checksum after hashing g_400 : BADD27FA +...checksum after hashing g_590 : 5203FF1F +...checksum after hashing g_625 : 1F0450A8 +before stmt(335): checksum = 1F0450A8 +...checksum after hashing g_10 : EB96F8B8 +...checksum after hashing g_79 : 89A48C55 +...checksum after hashing g_93 : D219E58F +...checksum after hashing g_119 : 16315139 +...checksum after hashing g_145 : 4B2CF936 +...checksum after hashing g_189 : F029840E +...checksum after hashing g_283 : DE5C7684 +...checksum after hashing g_400 : BADD27FA +...checksum after hashing g_590 : 5203FF1F +...checksum after hashing g_625 : 1F0450A8 +before stmt(254): checksum = 1F0450A8 +...checksum after hashing g_10 : EB96F8B8 +...checksum after hashing g_79 : 89A48C55 +...checksum after hashing g_93 : D219E58F +...checksum after hashing g_119 : 16315139 +...checksum after hashing g_145 : 4B2CF936 +...checksum after hashing g_189 : F029840E +...checksum after hashing g_283 : DE5C7684 +...checksum after hashing g_400 : BADD27FA +...checksum after hashing g_590 : 5203FF1F +...checksum after hashing g_625 : 1F0450A8 +before stmt(336): checksum = 1F0450A8 +...checksum after hashing g_10 : EB96F8B8 +...checksum after hashing g_79 : 89A48C55 +...checksum after hashing g_93 : D219E58F +...checksum after hashing g_119 : 16315139 +...checksum after hashing g_145 : 4B2CF936 +...checksum after hashing g_189 : F029840E +...checksum after hashing g_283 : DE5C7684 +...checksum after hashing g_400 : BADD27FA +...checksum after hashing g_590 : 5203FF1F +...checksum after hashing g_625 : 1F0450A8 +checksum = 1f0450a8 diff --git a/src/tests/csmith/rand17.c b/src/tests/csmith/rand17.c new file mode 100644 index 0000000..ede4ae0 --- /dev/null +++ b/src/tests/csmith/rand17.c @@ -0,0 +1,601 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static int g_2 = 0L; +static unsigned g_93 = 0x0CC19AB5L; +static int **g_94 = (void*)0; +static int g_102 = 0x054F5258L; +static unsigned short g_112 = 0x7C2AL; +static unsigned char g_231 = 0x43L; +static int g_247 = 0xDFD4C6E6L; +static int *g_246 = &g_247; +static signed char g_292 = 0xBBL; +static unsigned g_293 = 4294967286UL; +static int *g_389 = &g_2; +static unsigned g_456 = 0UL; +static unsigned char func_1(void); +static int * func_5(unsigned p_6, int p_7, signed char p_8, signed char p_9, int p_10); +static unsigned short func_15(int * p_16, short p_17, int p_18); +static int * func_19(int * p_20, int * p_21, signed char p_22, signed char p_23, int * p_24); +static int * func_25(unsigned p_26, unsigned char p_27, unsigned p_28, int p_29, int * p_30); +static unsigned char func_31(int * p_32, int p_33, unsigned p_34); +static int * func_35(int * p_36, int p_37, unsigned p_38, int p_39, int * p_40); +static unsigned char func_44(int p_45, int * p_46, unsigned p_47, int p_48, unsigned char p_49); +static signed char func_52(int * p_53, unsigned char p_54, int p_55); +static int func_60(unsigned p_61, short p_62); +static unsigned char func_1(void) +{ + int *l_56 = &g_2; + unsigned char l_665 = 0x7DL; + step_hash(389); + for (g_2 = 0; (g_2 <= (-3)); --g_2) + { + int *l_41 = &g_2; + unsigned short l_192 = 1UL; + int **l_636 = &g_389; + int ***l_666 = &l_636; + int *l_689 = &g_102; + } + step_hash(390); + return (*l_56); +} +static int * func_5(unsigned p_6, int p_7, signed char p_8, signed char p_9, int p_10) +{ + int *l_614 = &g_102; + int ***l_635 = &g_94; + step_hash(325); + (*g_94) = l_614; + step_hash(326); + (**g_94) = p_8; + step_hash(327); + (*l_614) = ((((int)(g_456 <= 0x4429L) + (int)func_44((*l_614), l_614, ((signed char)((signed char)((unsigned char)func_60((g_102 <= ((((int)((unsigned short)p_10 << (unsigned short)((unsigned)(((short)func_31((*g_94), ((((((unsigned short)(*l_614) >> (unsigned short)p_10) == 0x4304EA88L) > 65532UL) < (-1L)) ^ 0xAD7CL), p_10) - (short)(*l_614)) == g_231) % (unsigned)p_6)) % (int)(*l_614)) > g_2) || 0x33L)), (*l_614)) >> (unsigned char)g_293) >> (signed char)g_102) << (signed char)g_2), (*g_246), p_8)) == g_292) == (-6L)); + step_hash(333); + for (p_9 = 0; (p_9 >= 12); p_9 += 1) + { + step_hash(331); + (*l_614) |= (((void*)0 != l_635) ^ p_6); + step_hash(332); + if (p_6) + break; + } + step_hash(334); + return l_614; +} +static unsigned short func_15(int * p_16, short p_17, int p_18) +{ + int **l_545 = &g_246; + int ***l_546 = &g_94; + short l_556 = 0x4226L; + unsigned short l_579 = 65532UL; + int l_583 = 0xD249770CL; + int *l_601 = &g_2; + int *l_605 = &g_102; + step_hash(282); + (*l_546) = l_545; + step_hash(316); + if ((p_18 ^ (1L >= g_2))) + { + step_hash(284); + return p_18; + } + else + { + int l_547 = 0x0B618C88L; + step_hash(303); + if ((g_93 && l_547)) + { + signed char l_553 = 1L; + step_hash(292); + for (g_231 = 0; (g_231 <= 3); ++g_231) + { + int *l_557 = &g_247; + step_hash(290); + (*l_557) = (((unsigned short)(-(unsigned short)(!((func_60(g_2, (l_553 >= ((int)(g_293 <= l_556) / (int)p_18))) && p_17) == 1UL))) - (unsigned short)0xE0C7L) <= 2UL); + step_hash(291); + (*l_557) = (*l_557); + } + } + else + { + unsigned l_564 = 0x37CB6E70L; + int l_569 = 0xC7C855FCL; + int *l_576 = &g_247; + int ***l_577 = &g_94; + step_hash(301); + if (((unsigned char)l_547 / (unsigned char)((unsigned char)((&g_389 != &g_246) <= (+(((short)l_564 * (short)((-5L) && ((int)(*p_16) - (int)((signed char)0x19L >> (signed char)1)))) != p_17))) * (unsigned char)l_564))) + { + int l_573 = 1L; + int ***l_578 = &l_545; + step_hash(295); + l_569 = l_564; + step_hash(296); + (*g_94) = &l_547; + step_hash(297); + (*l_545) = func_35(p_16, ((p_18 || p_17) != (0xCB7D06C7L && ((signed char)(-(unsigned short)((l_573 | ((unsigned char)(l_576 == p_16) - (unsigned char)func_44((((l_577 == l_578) && (-1L)) >= l_547), (*g_94), (**l_545), l_579, p_18))) <= g_292)) >> (signed char)0))), p_17, g_293, &g_247); + } + else + { + unsigned short l_582 = 0x8551L; + step_hash(299); + (*l_576) = (((signed char)func_60((1L >= p_18), l_582) + (signed char)l_547) | (*p_16)); + step_hash(300); + (*l_576) = (*l_576); + } + step_hash(302); + (*l_576) = (*p_16); + } + step_hash(304); + l_583 |= l_547; + step_hash(315); + for (l_547 = (-29); (l_547 >= (-9)); ++l_547) + { + int ***l_586 = &g_94; + int *l_589 = &g_102; + step_hash(308); + g_102 ^= (g_456 <= (l_586 == (void*)0)); + step_hash(313); + for (g_231 = 0; (g_231 != 45); g_231++) + { + step_hash(312); + return g_2; + } + step_hash(314); + (*l_589) ^= l_547; + } + } + step_hash(321); + for (l_579 = 0; (l_579 > 26); ++l_579) + { + unsigned short l_596 = 0x455EL; + int *l_604 = &l_583; + step_hash(320); + (*l_604) &= ((short)((unsigned char)((func_52(func_25(l_596, (3UL != g_112), (((unsigned char)g_292 >> (unsigned char)7) > ((short)func_31(l_601, (*p_16), ((unsigned char)p_17 - (unsigned char)p_17)) / (short)p_17)), l_596, &g_102), p_18, g_93) > g_247) && g_456) << (unsigned char)7) >> (short)15); + } + step_hash(322); + l_583 ^= (func_44((*p_16), l_605, g_112, (((unsigned char)g_112 << (unsigned char)((unsigned char)(((short)(((int)0L + (int)g_292) ^ g_112) - (short)p_18) > 9UL) >> (unsigned char)p_17)) <= (-1L)), (*l_605)) == 0xF7L); + step_hash(323); + return g_102; +} +static int * func_19(int * p_20, int * p_21, signed char p_22, signed char p_23, int * p_24) +{ + int *l_395 = &g_2; + unsigned l_397 = 0x5F113441L; + signed char l_408 = 0x25L; + int ***l_410 = &g_94; + int l_469 = 0xFE263680L; + int l_535 = (-1L); + int **l_539 = (void*)0; + short l_544 = 0xDB0FL; + step_hash(278); + for (g_112 = 17; (g_112 > 53); g_112 += 1) + { + unsigned short l_396 = 6UL; + int ***l_409 = &g_94; + int l_472 = 1L; + step_hash(210); + (*p_24) = (p_23 && (((void*)0 != l_395) < func_31(l_395, ((((~((g_93 | p_23) ^ l_396)) == l_396) < (*l_395)) > l_397), g_231))); + step_hash(277); + for (l_396 = 0; (l_396 <= 51); l_396 += 2) + { + unsigned short l_404 = 0x4DC9L; + int l_426 = 0xEE7531B3L; + int l_495 = 0L; + int **l_500 = (void*)0; + int l_503 = 0xEBE1A27AL; + } + } + step_hash(279); + (*p_24) = func_31(p_24, (*p_21), (((short)((void*)0 == l_539) + (short)(((unsigned char)((&l_539 != (void*)0) >= p_22) + (unsigned char)((unsigned)func_52(func_25(g_112, g_292, (*l_395), (*p_21), p_21), g_456, l_544) + (unsigned)(*p_21))) | p_23)) ^ p_22)); + step_hash(280); + return l_395; +} +static int * func_25(unsigned p_26, unsigned char p_27, unsigned p_28, int p_29, int * p_30) +{ + int *l_392 = &g_102; + step_hash(204); + (*l_392) = (-9L); + step_hash(205); + return &g_2; +} +static unsigned char func_31(int * p_32, int p_33, unsigned p_34) +{ + int **l_390 = (void*)0; + int **l_391 = &g_389; + step_hash(201); + (*l_391) = (void*)0; + step_hash(202); + return g_293; +} +static int * func_35(int * p_36, int p_37, unsigned p_38, int p_39, int * p_40) +{ + int *l_387 = (void*)0; + int **l_388 = &l_387; + step_hash(198); + (*l_388) = l_387; + step_hash(199); + return g_389; +} +static unsigned char func_44(int p_45, int * p_46, unsigned p_47, int p_48, unsigned char p_49) +{ + int l_216 = (-1L); + int ***l_235 = &g_94; + int l_269 = (-5L); + int l_338 = 0x5A139966L; + int l_367 = 0x304D937BL; + int l_382 = (-1L); + step_hash(131); + for (p_49 = (-15); (p_49 >= 44); p_49 += 9) + { + short l_224 = (-1L); + int l_225 = 1L; + int *l_226 = &g_102; + int **l_227 = &l_226; + int l_236 = 0x6DDC0764L; + step_hash(115); + for (p_48 = (-15); (p_48 >= 11); ++p_48) + { + int *l_198 = &g_102; + int **l_197 = &l_198; + unsigned l_217 = 0x7574EA98L; + step_hash(112); + (*l_197) = &p_45; + step_hash(113); + l_225 = ((unsigned char)(-(short)((signed char)(&l_198 == (void*)0) + (signed char)(((int)((unsigned short)func_52(&p_48, p_47, ((signed char)(((signed char)(func_60(g_102, ((signed char)((unsigned short)((*l_198) | l_216) * (unsigned short)((((l_217 || (((int)((unsigned short)(((signed char)l_224 << (signed char)0) & g_2) / (unsigned short)p_49) - (int)4294967292UL) | (*p_46))) <= 255UL) < 8UL) ^ 0xE7L)) * (signed char)p_45)) > g_2) / (signed char)g_2) != 0x1347L) % (signed char)0x73L)) >> (unsigned short)l_224) / (int)g_2) | g_2))) * (unsigned char)g_2); + step_hash(114); + return l_225; + } + step_hash(116); + (*l_226) = g_102; + step_hash(117); + (*l_227) = &p_45; + step_hash(130); + if (((signed char)p_45 >> (signed char)1)) + { + int *l_232 = (void*)0; + short l_237 = 0xE034L; + step_hash(119); + if ((*p_46)) + break; + step_hash(120); + l_237 = (((*p_46) ^ (-(unsigned char)g_231)) && (((((void*)0 == l_232) && func_52(&l_216, ((unsigned short)(g_2 >= (-1L)) * (unsigned short)((l_235 != &g_94) ^ l_236)), (*p_46))) ^ g_2) == p_45)); + } + else + { + int l_242 = 0xB3754A37L; + unsigned l_248 = 0x4BF27C86L; + step_hash(122); + g_102 = (((signed char)((int)(&l_227 == l_235) / (int)g_112) * (signed char)p_47) <= l_242); + step_hash(127); + for (g_102 = 0; (g_102 >= (-23)); g_102 -= 5) + { + int *l_245 = &l_216; + step_hash(126); + g_246 = l_245; + } + step_hash(128); + if (l_248) + break; + step_hash(129); + l_242 = ((unsigned short)p_49 >> (unsigned short)g_102); + } + } + step_hash(132); + p_46 = &p_45; + step_hash(195); + for (l_216 = 0; (l_216 < 17); l_216 += 1) + { + int l_276 = (-8L); + int ***l_319 = &g_94; + short l_335 = 0xFD68L; + unsigned l_339 = 0x0926870BL; + int **l_385 = (void*)0; + int **l_386 = &g_246; + } + step_hash(196); + return p_47; +} +static signed char func_52(int * p_53, unsigned char p_54, int p_55) +{ + short l_57 = 0x7030L; + int l_70 = (-5L); + int l_140 = 0L; + signed char l_153 = 0xCFL; + int *l_159 = &l_140; + step_hash(79); + if (l_57) + { + unsigned l_78 = 0x182BC92CL; + unsigned char l_106 = 0xDFL; + int *l_155 = (void*)0; + int *l_156 = &g_102; + int **l_157 = (void*)0; + int **l_158 = &l_155; + step_hash(73); + for (p_54 = 0; (p_54 > 24); p_54++) + { + short l_69 = (-1L); + short l_90 = 0x3552L; + int *l_108 = &g_102; + int **l_107 = &l_108; + step_hash(32); + if (func_60(p_54, ((unsigned char)(((+g_2) && (((short)(l_69 | g_2) >> (short)(0xAE56L || g_2)) && (l_70 >= ((unsigned short)(&g_2 != &g_2) >> (unsigned short)7)))) < g_2) * (unsigned char)0x94L))) + { + int *l_75 = &g_2; + int **l_74 = &l_75; + step_hash(13); + (*l_74) = &g_2; + step_hash(28); + for (l_70 = 7; (l_70 >= (-10)); l_70 -= 1) + { + signed char l_85 = 0x88L; + step_hash(26); + if ((l_78 > (func_60(l_57, (g_2 && ((((unsigned short)(func_60(((short)1L + (short)l_69), (g_2 >= ((int)l_69 - (int)p_54))) | 7L) % (unsigned short)l_85) && (-1L)) ^ 0xDEL))) <= l_69))) + { + step_hash(18); + g_93 = ((signed char)g_2 - (signed char)(func_60(g_2, g_2) <= ((unsigned)(((~(p_54 != g_2)) || (l_90 < g_2)) | ((int)g_2 / (int)6UL)) - (unsigned)0xC22A6657L))); + step_hash(19); + (*l_74) = &p_55; + step_hash(20); + if ((*p_53)) + continue; + } + else + { + int *l_101 = &g_102; + step_hash(22); + p_55 |= ((void*)0 == g_94); + step_hash(23); + (*l_101) = ((short)(+(&p_55 == (void*)0)) / (short)func_60(((unsigned char)((unsigned short)(l_78 | l_90) << (unsigned short)6) * (unsigned char)(!0x5CL)), g_2)); + step_hash(24); + (*l_101) = (*l_101); + step_hash(25); + (*l_74) = &p_55; + } + step_hash(27); + if ((*p_53)) + continue; + } + step_hash(29); + return g_102; + } + else + { + short l_105 = 0xC9DAL; + step_hash(31); + (*l_108) = ((signed char)l_70 << (signed char)(((p_55 | l_105) >= l_106) & (((void*)0 != l_107) != func_60(p_55, (((short)0x2261L * (short)p_54) > p_54))))); + } + step_hash(72); + if ((0xF7833775L > l_106)) + { + int *l_111 = &g_102; + step_hash(34); + (*l_107) = l_111; + step_hash(35); + g_112 |= (*l_111); + step_hash(36); + (*l_111) = ((int)(*p_53) / (int)0x2CF88EA9L); + step_hash(37); + (*l_108) &= (*p_53); + } + else + { + unsigned short l_119 = 0xEF17L; + unsigned l_143 = 0x075E4EBAL; + step_hash(61); + if (((signed char)1L << (signed char)2)) + { + unsigned char l_122 = 0xC2L; + int *l_144 = &l_140; + step_hash(44); + for (p_55 = 0; (p_55 >= 19); p_55 += 8) + { + step_hash(43); + return p_54; + } + step_hash(51); + if (l_106) + { + step_hash(46); + (**l_107) = (+(*p_53)); + step_hash(47); + l_122 = (((*l_108) >= l_119) && ((unsigned)1UL / (unsigned)l_119)); + step_hash(48); + (*l_108) |= 0xA1A39BFCL; + } + else + { + unsigned l_139 = 4UL; + step_hash(50); + l_140 &= (g_112 != ((unsigned char)((unsigned char)func_60(p_54, l_122) + (unsigned char)((unsigned short)(((unsigned short)((((unsigned char)((unsigned char)((((signed char)func_60(g_112, ((signed char)p_55 >> (signed char)2)) - (signed char)(g_2 ^ l_139)) ^ g_2) > (-1L)) * (unsigned char)0UL) >> (unsigned char)7) ^ g_102) <= l_139) % (unsigned short)0x5E00L) > l_139) / (unsigned short)l_57)) % (unsigned char)g_102)); + } + step_hash(52); + (*l_144) |= (((0L != (0x66FFL && func_60(((short)g_112 << (short)(g_2 && (g_112 && (func_60((+((void*)0 == &p_53)), (0x01L & (g_102 || (**l_107)))) | p_55)))), l_143))) < 0UL) >= l_106); + step_hash(58); + for (l_90 = (-24); (l_90 >= 11); l_90 += 8) + { + step_hash(56); + (*l_107) = (void*)0; + step_hash(57); + return g_2; + } + } + else + { + step_hash(60); + (*l_108) = g_102; + } + step_hash(71); + if ((!((int)g_112 - (int)g_102))) + { + step_hash(63); + return g_112; + } + else + { + unsigned l_154 = 0UL; + step_hash(69); + for (p_55 = 0; (p_55 >= 25); p_55 += 9) + { + step_hash(68); + l_153 ^= ((short)(g_102 > func_60(g_2, l_78)) >> (short)13); + } + step_hash(70); + (**l_107) ^= (l_154 && l_153); + } + } + } + step_hash(74); + (*l_156) |= l_57; + step_hash(75); + (*l_158) = &p_55; + step_hash(76); + (*l_158) = l_159; + } + else + { + step_hash(78); + return p_54; + } + step_hash(103); + for (l_70 = 0; (l_70 > (-30)); --l_70) + { + step_hash(102); + if ((*p_53)) + { + unsigned l_172 = 0x6262BB9AL; + int *l_187 = &g_102; + step_hash(97); + for (l_57 = (-20); (l_57 >= (-29)); --l_57) + { + int *l_169 = &g_102; + unsigned short l_181 = 7UL; + step_hash(87); + (*l_159) = ((((short)g_112 << (short)4) ^ g_93) ^ g_2); + step_hash(94); + for (g_112 = (-18); (g_112 < 25); g_112++) + { + int ***l_168 = &g_94; + int **l_170 = (void*)0; + int **l_171 = &l_169; + step_hash(91); + (*l_168) = g_94; + step_hash(92); + (*l_171) = l_169; + step_hash(93); + (*l_159) = (l_172 < (0xA376L >= ((unsigned)((signed char)0x09L % (signed char)g_2) - (unsigned)0x7E15FDC6L))); + } + step_hash(95); + (*l_159) = (g_112 ^ (((((unsigned char)g_112 + (unsigned char)(((unsigned char)g_2 * (unsigned char)0x50L) && (g_2 > l_181))) < (-(unsigned)((*p_53) && ((signed char)((((l_172 & func_60((((unsigned short)0xE2A0L * (unsigned short)g_93) ^ (*l_169)), p_55)) | (*l_159)) & p_55) | g_93) + (signed char)6UL)))) == 0x8BL) & p_55)); + step_hash(96); + return p_54; + } + step_hash(98); + p_53 = l_187; + } + else + { + int *l_188 = &g_102; + int ***l_191 = &g_94; + step_hash(100); + (*l_188) ^= (*l_159); + step_hash(101); + (*l_159) = (((unsigned short)((&p_55 != &p_55) < p_54) - (unsigned short)((void*)0 != l_191)) || (*l_159)); + } + } + step_hash(104); + return g_93; +} +static int func_60(unsigned p_61, short p_62) +{ + unsigned char l_73 = 0UL; + step_hash(10); + l_73 = p_61; + step_hash(11); + return p_61; +} +void csmith_compute_hash(void) +{ + transparent_crc(g_2, "g_2", print_hash_value); + transparent_crc(g_93, "g_93", print_hash_value); + transparent_crc(g_102, "g_102", print_hash_value); + transparent_crc(g_112, "g_112", print_hash_value); + transparent_crc(g_231, "g_231", print_hash_value); + transparent_crc(g_247, "g_247", print_hash_value); + transparent_crc(g_292, "g_292", print_hash_value); + transparent_crc(g_293, "g_293", print_hash_value); + transparent_crc(g_456, "g_456", print_hash_value); +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand17.expect b/src/tests/csmith/rand17.expect new file mode 100644 index 0000000..1d551c9 --- /dev/null +++ b/src/tests/csmith/rand17.expect @@ -0,0 +1,30 @@ +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_93 : 645DF6C3 +...checksum after hashing g_102 : D7356D18 +...checksum after hashing g_112 : DC04A3B0 +...checksum after hashing g_231 : 85A0DE97 +...checksum after hashing g_247 : 201FEE35 +...checksum after hashing g_292 : 7934EBFA +...checksum after hashing g_293 : 5C684398 +...checksum after hashing g_456 : E495D9BE +before stmt(389): checksum = E495D9BE +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_93 : 645DF6C3 +...checksum after hashing g_102 : D7356D18 +...checksum after hashing g_112 : DC04A3B0 +...checksum after hashing g_231 : 85A0DE97 +...checksum after hashing g_247 : 201FEE35 +...checksum after hashing g_292 : 7934EBFA +...checksum after hashing g_293 : 5C684398 +...checksum after hashing g_456 : E495D9BE +before stmt(390): checksum = E495D9BE +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_93 : 645DF6C3 +...checksum after hashing g_102 : D7356D18 +...checksum after hashing g_112 : DC04A3B0 +...checksum after hashing g_231 : 85A0DE97 +...checksum after hashing g_247 : 201FEE35 +...checksum after hashing g_292 : 7934EBFA +...checksum after hashing g_293 : 5C684398 +...checksum after hashing g_456 : E495D9BE +checksum = e495d9be diff --git a/src/tests/csmith/rand18.c b/src/tests/csmith/rand18.c new file mode 100644 index 0000000..ac7922b --- /dev/null +++ b/src/tests/csmith/rand18.c @@ -0,0 +1,87 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static short func_1(void); +static short func_1(void) +{ + short l_2 = 0xFD41L; + step_hash(1); + return l_2; +} +void csmith_compute_hash(void) +{ +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand18.expect b/src/tests/csmith/rand18.expect new file mode 100644 index 0000000..0b4e62a --- /dev/null +++ b/src/tests/csmith/rand18.expect @@ -0,0 +1,2 @@ +before stmt(1): checksum = 0 +checksum = 0 diff --git a/src/tests/csmith/rand19.c b/src/tests/csmith/rand19.c new file mode 100644 index 0000000..7b48ff3 --- /dev/null +++ b/src/tests/csmith/rand19.c @@ -0,0 +1,871 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static unsigned g_2 = 1UL; +static signed char g_3 = 0xDBL; +static int g_6 = (-1L); +static int g_13 = 4L; +static int g_16 = 0x7E813A3DL; +static int g_75 = 0x8177C418L; +static unsigned g_76 = 0x34605DD8L; +static int g_80 = 0L; +static int *g_156 = &g_75; +static int **g_155 = &g_156; +static int g_202 = 9L; +static int g_211 = (-2L); +static unsigned g_369 = 0UL; +static unsigned short g_463 = 1UL; +static int *g_468 = &g_202; +static unsigned short func_1(void); +static int func_17(unsigned p_18, int * p_19, int * p_20); +static short func_25(int p_26, int * p_27, int * p_28, int * p_29); +static int func_30(int * p_31, int * p_32, unsigned p_33, int * p_34); +static int * func_35(unsigned p_36, unsigned p_37, int * p_38, int * p_39, short p_40); +static unsigned func_43(unsigned short p_44, short p_45); +static unsigned short func_46(int * p_47, unsigned p_48, unsigned p_49, int * p_50, int * p_51); +static int * func_52(int * p_53, unsigned p_54, unsigned short p_55); +static int * func_56(int * p_57, int * p_58); +static int * func_59(signed char p_60, short p_61, unsigned p_62); +static unsigned short func_1(void) +{ + int *l_4 = (void*)0; + int *l_5 = &g_6; + step_hash(1); + g_3 = g_2; + step_hash(2); + (*l_5) = 4L; + step_hash(387); + for (g_3 = (-4); (g_3 > 18); g_3++) + { + int *l_21 = (void*)0; + step_hash(385); + for (g_6 = 28; (g_6 != (-7)); g_6--) + { + step_hash(384); + for (g_2 = 0; (g_2 <= 33); ++g_2) + { + int *l_678 = &g_13; + step_hash(382); + for (g_13 = 0; (g_13 != 29); ++g_13) + { + step_hash(380); + if ((&g_6 == &g_6)) + { + unsigned char l_677 = 0UL; + step_hash(16); + g_16 = (-4L); + step_hash(376); + l_677 = func_17((&g_13 != l_21), &g_13, &g_13); + } + else + { + step_hash(378); + (*g_155) = l_678; + step_hash(379); + (*g_155) = (*g_155); + } + step_hash(381); + return g_6; + } + step_hash(383); + (*g_156) = ((signed char)g_369 >> (signed char)2); + } + } + step_hash(386); + (*g_468) &= (g_75 && (-1L)); + } + step_hash(388); + return g_76; +} +static int func_17(unsigned p_18, int * p_19, int * p_20) +{ + unsigned char l_24 = 9UL; + int *l_370 = &g_13; + int ***l_560 = (void*)0; + int *l_579 = (void*)0; + int l_580 = 1L; + int l_675 = 0x54F31D19L; + step_hash(373); + if ((((short)(l_24 == func_25(func_30(func_35((((short)(-5L) << (short)13) != func_43(func_46(func_52(func_56(p_20, func_59(((void*)0 == p_20), ((unsigned char)1UL >> (unsigned char)2), ((((short)((short)((int)(((signed char)l_24 << (signed char)l_24) >= g_6) / (int)l_24) << (short)p_18) * (short)g_2) < l_24) & 0x05CE4EC6L))), g_202, g_202), p_18, l_24, p_20, &g_6), l_24)), g_3, l_370, p_20, g_6), p_20, p_18, p_19), l_370, p_19, &g_6)) << (short)(*l_370)) ^ 0x9FB1L)) + { + int *l_433 = (void*)0; + short l_444 = 0x7E55L; + signed char l_470 = (-4L); + int l_502 = (-1L); + unsigned short l_542 = 0xCCAEL; + int ***l_588 = (void*)0; + int *l_649 = (void*)0; + step_hash(326); + if ((p_18 || (p_18 | ((&g_156 == (void*)0) > p_18)))) + { + int l_460 = 0L; + int *l_469 = &g_202; + signed char l_471 = 0xD6L; + step_hash(245); + for (g_80 = 0; (g_80 == 21); g_80++) + { + unsigned char l_445 = 7UL; + int l_462 = (-1L); + step_hash(244); + if (((unsigned char)((signed char)((unsigned short)func_43(func_46(func_35(func_46((*g_155), p_18, (p_18 <= (l_444 < 0x05L)), func_35(g_202, g_2, l_433, l_370, p_18), p_20), p_18, p_19, p_19, l_445), p_18, g_80, &g_6, p_20), g_16) / (unsigned short)l_445) - (signed char)1L) * (unsigned char)p_18)) + { + short l_454 = (-1L); + int *l_461 = (void*)0; + step_hash(237); + g_463 = (((signed char)(((signed char)g_13 * (signed char)((+(+((func_30(func_35(g_369, g_13, func_35((((int)(1UL != 0UL) + (int)((unsigned char)l_454 + (unsigned char)((**g_155) && ((int)((~(g_2 | (((signed char)(-(int)func_46((*g_155), g_3, l_454, (*g_155), p_20)) % (signed char)g_211) > p_18))) | 0xC1L) - (int)l_460)))) < 6UL), p_18, p_19, p_19, g_13), &g_202, g_2), l_461, p_18, &g_13) || l_460) <= 0x6FF626B8L))) || 0xBD86L)) < l_462) % (signed char)g_76) || 0xC0L); + step_hash(238); + return (**g_155); + } + else + { + step_hash(240); + (*g_156) &= (&l_433 == &g_156); + step_hash(241); + if (l_460) + break; + step_hash(242); + (*g_156) = (*g_156); + step_hash(243); + if (l_462) + continue; + } + } + step_hash(273); + if (((unsigned short)((g_211 > (((p_18 ^ g_202) != func_46(func_35((*l_370), ((-2L) || ((p_18 != ((unsigned short)(0xF20776D3L != (+func_46(g_468, (((((+0x7CFBFAACL) > (*l_370)) == 4294967295UL) && p_18) <= g_211), p_18, p_20, p_19))) * (unsigned short)1UL)) ^ g_3)), l_469, p_20, p_18), g_369, p_18, p_20, l_469)) < l_470)) & g_6) + (unsigned short)1L)) + { + step_hash(247); + (**g_155) = (*l_469); + step_hash(248); + l_471 &= (func_43(p_18, ((**g_155) > (*l_469))) >= (~g_463)); + step_hash(249); + return (*p_20); + } + else + { + int *l_472 = &g_6; + step_hash(251); + (*g_468) |= (g_369 & ((((+g_75) <= p_18) == p_18) > (g_211 != 65535UL))); + step_hash(252); + (*g_155) = p_20; + step_hash(253); + (*g_155) = l_472; + step_hash(272); + if ((g_6 > g_202)) + { + int *l_473 = &g_6; + int ***l_494 = &g_155; + step_hash(255); + (*g_155) = l_473; + step_hash(262); + if ((((short)(-4L) * (short)((unsigned)((((((unsigned short)g_202 * (unsigned short)(6L | (l_473 == (void*)0))) || (((unsigned short)((short)((int)((*l_370) | (((unsigned short)((&g_156 != &g_468) <= ((p_18 ^ 0xDCL) <= (*l_473))) >> (unsigned short)6) || (*l_473))) - (int)0x4172FA32L) - (short)(*l_473)) / (unsigned short)g_16) | g_2)) || 0x3C011F43L) ^ p_18) <= g_76) + (unsigned)(*g_156))) | g_2)) + { + int *l_495 = &g_202; + step_hash(257); + (*l_469) = (~((short)g_202 % (short)(((signed char)((signed char)(func_46(l_469, func_46(l_469, p_18, g_75, (*g_155), (*g_155)), (l_494 == (void*)0), p_19, l_469) && g_211) + (signed char)0L) / (signed char)p_18) ^ 0x8D2DL))); + step_hash(258); + (*l_495) = ((g_3 && 65529UL) == func_25(p_18, l_495, p_20, l_370)); + step_hash(259); + (*g_468) |= ((unsigned char)0x01L >> (unsigned char)(***l_494)); + } + else + { + step_hash(261); + return (*l_472); + } + step_hash(263); + return (*l_469); + } + else + { + unsigned short l_509 = 65532UL; + int *l_510 = &l_502; + step_hash(265); + (*g_155) = (*g_155); + step_hash(270); + for (g_202 = 6; (g_202 == (-25)); g_202 -= 4) + { + step_hash(269); + l_502 = (g_75 ^ g_3); + } + step_hash(271); + (*l_510) ^= ((*l_472) <= (((signed char)((unsigned)func_43(p_18, ((func_46(p_19, (*l_472), ((unsigned short)func_30(p_20, p_19, (g_369 >= (*l_370)), l_472) << (unsigned short)6), &l_502, l_469) && (*l_370)) | l_509)) - (unsigned)l_509) + (signed char)g_369) && 0UL)); + } + } + } + else + { + unsigned l_513 = 0x2F1BECB8L; + int ***l_525 = &g_155; + step_hash(279); + for (g_75 = 0; (g_75 < 17); g_75++) + { + step_hash(278); + l_513 = (*p_19); + } + step_hash(284); + for (g_463 = (-22); (g_463 == 36); g_463 += 1) + { + unsigned short l_520 = 65535UL; + step_hash(283); + (***l_525) = ((unsigned)(p_19 != p_19) % (unsigned)((unsigned)(((p_18 || (l_520 != ((short)(*l_370) / (short)((unsigned short)(l_525 != (void*)0) + (unsigned short)((*g_155) == (void*)0))))) > 0xAFL) ^ p_18) + (unsigned)0x4915FEB5L)); + } + step_hash(285); + (**g_155) = (**g_155); + step_hash(325); + for (g_76 = 0; (g_76 == 56); g_76 += 9) + { + unsigned l_530 = 4294967295UL; + int **l_538 = &l_370; + short l_562 = (-6L); + step_hash(289); + (**l_525) = (*g_155); + step_hash(300); + for (g_16 = 0; (g_16 <= 29); g_16 += 1) + { + int ***l_535 = &g_155; + step_hash(293); + (*g_156) &= ((*l_370) == g_2); + step_hash(294); + if ((**g_155)) + continue; + step_hash(299); + if ((4294967292UL && (l_530 || ((***l_525) < (p_18 == (***l_525)))))) + { + step_hash(296); + (**l_535) = func_35(((short)g_369 * (short)g_463), ((signed char)p_18 - (signed char)(l_535 == &g_155)), (**l_535), (*g_155), g_13); + } + else + { + step_hash(298); + (***l_535) = (*p_19); + } + } + step_hash(323); + for (g_16 = 24; (g_16 >= (-12)); g_16--) + { + int l_549 = 0xEEA455B8L; + step_hash(310); + if (((void*)0 == l_538)) + { + int l_539 = (-1L); + int *l_543 = &l_502; + step_hash(305); + (*l_543) ^= (func_30(p_20, func_35(g_6, l_539, p_20, (*g_155), ((unsigned char)g_2 << (unsigned char)6)), g_202, func_35(l_542, p_18, p_20, &l_502, g_76)) ^ 0xE2E7167FL); + } + else + { + step_hash(307); + (*g_155) = (*g_155); + step_hash(308); + if ((*p_20)) + continue; + step_hash(309); + (*g_468) &= (*g_156); + } + } + step_hash(324); + l_562 = (((*g_155) == (*g_155)) && g_202); + } + } + step_hash(367); + for (g_369 = 0; (g_369 <= 21); g_369 += 1) + { + unsigned char l_565 = 0UL; + signed char l_576 = 1L; + int ***l_587 = &g_155; + int l_641 = 0L; + step_hash(330); + if (l_565) + break; + step_hash(331); + (*g_468) = func_43(l_444, (p_18 && (((signed char)0x26L << (signed char)4) & ((unsigned)p_18 % (unsigned)(((short)((unsigned char)func_30((*g_155), func_59(l_565, ((unsigned short)l_576 / (unsigned short)((short)0x6319L << (short)g_80)), g_202), p_18, l_579) / (unsigned char)l_576) >> (short)10) & l_580))))); + step_hash(332); + if ((*g_156)) + break; + step_hash(366); + if (((unsigned short)g_80 * (unsigned short)((((unsigned short)65535UL - (unsigned short)(p_18 || (l_587 == &g_155))) < (&g_155 != l_588)) == (-9L)))) + { + unsigned l_595 = 0x2E711793L; + step_hash(334); + (*g_468) = (((((unsigned char)(((int)((void*)0 == &g_155) - (int)((unsigned char)p_18 / (unsigned char)4UL)) > ((-5L) && (l_560 != &g_155))) / (unsigned char)(***l_587)) <= (((p_18 && 0xC5C3L) ^ g_369) >= (***l_587))) <= p_18) ^ l_595); + step_hash(335); + (**l_587) = (*g_155); + } + else + { + unsigned short l_602 = 0xD097L; + int *l_624 = &l_502; + int ***l_633 = &g_155; + step_hash(363); + if (((short)g_369 + (short)(g_369 == ((signed char)(func_46(func_35((g_3 > (~((!g_3) < p_18))), ((short)(&g_468 == &p_20) / (short)((-1L) ^ g_3)), p_20, (*g_155), p_18), g_80, l_602, (*g_155), (*g_155)) | p_18) / (signed char)g_463)))) + { + int *l_617 = &g_13; + step_hash(345); + if (((unsigned)((int)(((*g_468) ^ (((void*)0 != (*g_155)) > (g_202 > ((signed char)p_18 + (signed char)((unsigned char)g_80 >> (unsigned char)7))))) & ((((void*)0 != p_19) | (((short)(l_602 == p_18) % (short)1UL) <= 0xEFAEA218L)) >= 4294967294UL)) + (int)g_211) / (unsigned)g_2)) + { + step_hash(339); + (*g_155) = func_35((((unsigned short)((((((signed char)(func_30((**l_587), func_35(p_18, p_18, l_617, p_20, ((unsigned char)((int)(((~((p_19 == p_20) < 1UL)) < (((unsigned short)(***l_587) * (unsigned short)g_211) || 3UL)) & p_18) % (int)0xC8C507F8L) << (unsigned char)1)), g_13, p_19) >= g_13) << (signed char)g_6) < (*p_20)) & 7L) != p_18) >= g_369) - (unsigned short)1UL) != g_369), g_13, l_624, p_19, (*l_617)); + step_hash(340); + l_641 |= ((unsigned char)((unsigned short)(*l_370) >> (unsigned short)11) - (unsigned char)((signed char)(((void*)0 == l_633) | (65535UL != ((signed char)(((unsigned short)g_80 % (unsigned short)((unsigned char)(***l_587) >> (unsigned char)7)) | ((-(signed char)(*l_370)) == ((*g_155) != p_20))) - (signed char)1L))) + (signed char)p_18)); + step_hash(341); + (***l_633) = (**g_155); + step_hash(342); + return (*p_19); + } + else + { + step_hash(344); + if ((*l_617)) + break; + } + step_hash(346); + (*g_155) = (*g_155); + step_hash(351); + for (l_580 = 0; (l_580 < 2); l_580 += 1) + { + step_hash(350); + return (*p_20); + } + } + else + { + int ***l_646 = &g_155; + step_hash(353); + (*l_624) ^= (**g_155); + step_hash(354); + (*g_468) |= (*p_20); + step_hash(361); + for (p_18 = 0; (p_18 != 40); ++p_18) + { + step_hash(358); + (**l_633) = (*g_155); + step_hash(359); + (*g_468) = (((void*)0 != (*l_646)) > (+p_18)); + step_hash(360); + (**l_646) = l_649; + } + step_hash(362); + (*g_468) = ((int)(*p_19) / (int)0x1F95334AL); + } + step_hash(364); + (**l_633) = p_19; + step_hash(365); + (*l_624) = (g_13 || ((((unsigned char)((unsigned short)(!(***l_587)) >> (unsigned short)(((unsigned char)g_6 * (unsigned char)(&p_19 == &g_156)) >= (((int)(***l_587) + (int)(((signed char)((p_18 <= (!(g_13 == (((signed char)p_18 % (signed char)p_18) < 0UL)))) ^ (*g_156)) / (signed char)p_18) && (***l_633))) <= (-1L)))) % (unsigned char)0x39L) > g_463) < g_6)); + } + } + } + else + { + unsigned l_674 = 1UL; + int l_676 = 0x3066CB41L; + step_hash(369); + l_675 = (((unsigned char)func_43((((-9L) <= (0x4AL != g_211)) || ((short)(((signed char)0L >> (signed char)func_30(p_19, func_59(p_18, (((unsigned char)((signed char)p_18 + (signed char)(p_18 >= g_6)) << (unsigned char)7) <= p_18), g_6), l_674, (*g_155))) && g_76) << (short)l_674)), p_18) - (unsigned char)g_6) ^ l_674); + step_hash(370); + (*g_155) = func_52((*g_155), g_75, p_18); + step_hash(371); + (*g_468) = (0L > ((*g_155) == (*g_155))); + step_hash(372); + l_676 = ((void*)0 == &g_156); + } + step_hash(374); + (*g_155) = (*g_155); + step_hash(375); + return (*g_468); +} +static short func_25(int p_26, int * p_27, int * p_28, int * p_29) +{ + int **l_409 = &g_156; + int *l_410 = &g_6; + int *l_431 = (void*)0; + int *l_432 = &g_211; + step_hash(227); + for (g_80 = 0; (g_80 == (-13)); g_80--) + { + int *l_411 = &g_202; + int *l_412 = &g_202; + step_hash(219); + (*l_411) = ((func_30(p_29, p_27, func_46(func_35(p_26, (p_26 || ((((int)((short)((signed char)g_202 << (signed char)((short)((short)(-3L) + (short)1UL) >> (short)(l_409 == &g_156))) + (short)g_13) + (int)p_26) != g_3) >= 0UL)), l_410, l_411, g_13), p_26, g_3, l_412, l_411), p_28) & p_26) != p_26); + step_hash(226); + for (g_202 = (-19); (g_202 == 27); ++g_202) + { + int *l_415 = &g_75; + step_hash(223); + g_211 = (*l_410); + step_hash(224); + if ((*p_29)) + continue; + step_hash(225); + (*l_415) |= (*p_28); + } + } + step_hash(228); + (*l_409) = &g_75; + step_hash(229); + (*l_432) = ((unsigned char)(((((signed char)(-(unsigned short)(((unsigned char)((signed char)func_43(g_2, g_3) << (signed char)7) << (unsigned char)2) <= (0L != p_26))) % (signed char)0x2AL) == ((unsigned short)((int)((unsigned short)g_2 / (unsigned short)0x5BCDL) / (int)p_26) << (unsigned short)1)) == g_16) & 0L) * (unsigned char)(*l_410)); + step_hash(230); + return g_80; +} +static int func_30(int * p_31, int * p_32, unsigned p_33, int * p_34) +{ + int l_377 = 0x6AA6A8A0L; + int *l_396 = &g_202; + step_hash(213); + (*l_396) = ((signed char)((unsigned short)(l_377 == (((unsigned)(((short)((g_13 <= func_43((+((short)g_76 - (short)((unsigned short)((unsigned short)(p_33 < ((unsigned short)(((short)(((unsigned short)((int)(*p_31) + (int)(+((*p_31) ^ l_377))) % (unsigned short)(p_33 & l_377)) & g_13) << (short)l_377) && l_377) - (unsigned short)65535UL)) >> (unsigned short)0) / (unsigned short)g_2))), p_33)) == l_377) << (short)p_33) <= p_33) / (unsigned)g_16) >= 0L)) - (unsigned short)l_377) / (signed char)0xAFL); + step_hash(214); + return g_16; +} +static int * func_35(unsigned p_36, unsigned p_37, int * p_38, int * p_39, short p_40) +{ + step_hash(211); + return p_38; +} +static unsigned func_43(unsigned short p_44, short p_45) +{ + int *l_360 = &g_75; + int *l_363 = &g_202; + int ***l_366 = &g_155; + step_hash(206); + (*l_363) &= ((unsigned short)((short)((((unsigned short)g_2 % (unsigned short)(g_76 || ((unsigned short)((-4L) ^ (p_45 && (((((((short)((func_46(l_360, ((unsigned short)((*l_360) && (&l_360 == (void*)0)) << (unsigned short)p_44), g_2, l_360, l_360) <= g_3) < p_45) / (short)(-1L)) | 0x6AFEL) < 0xE676L) && p_44) <= 0xF3L) > p_44))) >> (unsigned short)5))) || (*l_360)) | p_44) % (short)0xE91EL) * (unsigned short)g_76); + step_hash(207); + (*l_360) = ((signed char)g_211 * (signed char)(g_80 && ((l_366 == (void*)0) >= (-1L)))); + step_hash(208); + (*l_360) ^= (0xD6L > ((*l_363) <= 65531UL)); + step_hash(209); + return g_369; +} +static unsigned short func_46(int * p_47, unsigned p_48, unsigned p_49, int * p_50, int * p_51) +{ + unsigned l_344 = 1UL; + int *l_345 = &g_75; + step_hash(196); + (*l_345) &= l_344; + step_hash(201); + for (l_344 = 0; (l_344 != 13); ++l_344) + { + step_hash(200); + return g_16; + } + step_hash(202); + (*g_155) = l_345; + step_hash(203); + (*g_156) = ((signed char)p_48 << (signed char)g_80); + step_hash(204); + return p_49; +} +static int * func_52(int * p_53, unsigned p_54, unsigned short p_55) +{ + unsigned char l_222 = 0x73L; + int ***l_226 = &g_155; + signed char l_233 = 1L; + unsigned char l_237 = 0x81L; + int *l_258 = (void*)0; + int l_291 = 0x252602BCL; + step_hash(185); + if ((**g_155)) + { + int ***l_225 = &g_155; + int *l_229 = (void*)0; + int *l_230 = &g_211; + int *l_238 = (void*)0; + step_hash(105); + for (g_202 = 21; (g_202 < (-13)); g_202 -= 2) + { + step_hash(104); + (*g_155) = func_59(l_222, l_222, (p_54 > ((signed char)0x8DL >> (signed char)3))); + } + step_hash(106); + (*l_230) = ((-4L) || ((l_225 != l_226) ^ ((unsigned char)p_54 >> (unsigned char)g_3))); + step_hash(112); + for (g_76 = 0; (g_76 != 10); g_76 += 9) + { + step_hash(110); + if ((*p_53)) + break; + step_hash(111); + (*l_230) |= 0xCD7A3E1DL; + } + step_hash(134); + if ((*g_156)) + { + unsigned char l_234 = 255UL; + step_hash(114); + (*l_230) = 0L; + step_hash(115); + (**l_225) = func_59(l_233, (l_234 >= (*p_53)), l_234); + step_hash(116); + (*l_230) |= (**g_155); + step_hash(128); + for (g_202 = 0; (g_202 < (-21)); g_202 -= 9) + { + unsigned char l_245 = 0xD4L; + step_hash(120); + (*l_230) = l_237; + step_hash(121); + (*l_230) &= ((void*)0 != (*g_155)); + step_hash(122); + (*g_155) = (*g_155); + step_hash(127); + if (((unsigned char)((unsigned short)((unsigned)(l_245 <= 0x75L) / (unsigned)((int)(0xF07E3ED9L < ((short)p_55 >> (short)6)) - (int)(1UL && ((0L <= ((g_202 < l_245) == (*p_53))) <= (-1L))))) << (unsigned short)15) << (unsigned char)p_54)) + { + step_hash(124); + return (*g_155); + } + else + { + step_hash(126); + (*l_230) = 0L; + } + } + } + else + { + step_hash(130); + (**l_226) = (*g_155); + step_hash(131); + (*l_230) &= ((unsigned char)p_54 / (unsigned char)p_55); + step_hash(132); + g_80 = ((***l_225) ^ 0L); + step_hash(133); + (*l_230) = (**g_155); + } + } + else + { + int l_256 = 0xDEFA42DBL; + int **l_257 = &g_156; + signed char l_285 = (-1L); + int *l_330 = &l_256; + step_hash(136); + (*g_156) = ((((*g_155) != (*g_155)) && (255UL | g_6)) | ((((signed char)(((***l_226) || (g_13 ^ (0xF8BBF318L < g_13))) <= 0L) + (signed char)g_16) || l_256) >= 0x9B1839ECL)); + step_hash(183); + if ((l_257 != (void*)0)) + { + int *l_259 = &g_211; + step_hash(138); + (**l_226) = l_258; + step_hash(139); + return l_259; + } + else + { + int l_262 = (-2L); + int l_293 = (-4L); + step_hash(141); + (**l_257) = (*p_53); + step_hash(170); + for (g_80 = 0; (g_80 <= (-19)); g_80 -= 1) + { + unsigned char l_263 = 1UL; + int l_312 = 0L; + } + step_hash(181); + if (((*l_257) != &l_293)) + { + short l_315 = 0xA142L; + unsigned l_320 = 0xA7CE9A38L; + step_hash(172); + (***l_226) = ((int)l_315 % (int)((unsigned short)p_55 + (unsigned short)p_54)); + step_hash(173); + (**g_155) &= 0x1F6031B5L; + step_hash(174); + (**l_257) = (g_202 > (((((int)(*g_156) / (int)l_293) <= 249UL) == (g_80 == l_320)) <= ((unsigned)g_75 - (unsigned)0x3DB380C5L))); + step_hash(175); + (*l_257) = (*g_155); + } + else + { + int l_327 = (-3L); + step_hash(177); + (**l_257) = ((l_262 < (p_54 & p_54)) | (-1L)); + step_hash(178); + (**l_226) = (**l_226); + step_hash(179); + (*g_156) |= (((unsigned char)g_80 / (unsigned char)((unsigned short)(7L || l_327) + (unsigned short)p_54)) >= g_76); + step_hash(180); + (*l_257) = &l_293; + } + step_hash(182); + g_202 ^= (**g_155); + } + step_hash(184); + (*l_330) = (0x6CE235BBL < (((signed char)0x7BL << (signed char)4) ^ g_202)); + } + step_hash(193); + if ((((0L & ((unsigned short)p_54 << (unsigned short)7)) != (((signed char)(&g_155 == l_226) + (signed char)p_54) ^ (0xC489A983L & p_55))) || p_55)) + { + int **l_339 = &l_258; + signed char l_340 = 0x35L; + int *l_341 = (void*)0; + int *l_342 = &g_80; + step_hash(187); + l_340 &= (((unsigned short)g_3 + (unsigned short)g_202) || (l_339 != l_339)); + step_hash(188); + (*l_342) = 0xAC64C0F7L; + step_hash(189); + return p_53; + } + else + { + int *l_343 = &g_75; + step_hash(191); + (*l_343) &= (l_343 == l_343); + step_hash(192); + (**l_226) = &g_6; + } + step_hash(194); + return p_53; +} +static int * func_56(int * p_57, int * p_58) +{ + short l_88 = 0x90AEL; + int *l_91 = &g_75; + signed char l_195 = (-1L); + int **l_214 = &l_91; + step_hash(95); + if (g_3) + { + unsigned char l_84 = 0x82L; + int *l_85 = &g_80; + int *l_144 = &g_80; + short l_157 = 0xEE03L; + step_hash(30); + (*l_85) = l_84; + step_hash(58); + if (((short)l_88 * (short)((short)(l_91 != (void*)0) >> (short)(&g_6 != (void*)0)))) + { + int l_106 = 0xBB87E338L; + step_hash(32); + (*l_91) = (((signed char)((int)((signed char)((unsigned char)((signed char)((signed char)((unsigned short)(p_57 == (void*)0) * (unsigned short)2UL) % (signed char)l_106) + (signed char)g_13) - (unsigned char)(g_2 != l_106)) >> (signed char)((*l_85) >= ((unsigned short)0xF7FCL + (unsigned short)l_106))) - (int)0x628D16E9L) >> (signed char)g_76) < 0x27A4L); + } + else + { + unsigned char l_109 = 8UL; + unsigned l_118 = 1UL; + int **l_139 = (void*)0; + step_hash(34); + (*l_91) = ((p_57 == &g_75) == (((g_76 <= g_13) ^ l_109) || (((unsigned short)g_6 * (unsigned short)(((short)(4L | ((signed char)((((unsigned short)((*p_57) >= g_16) * (unsigned short)g_3) & (*l_91)) && g_80) - (signed char)0xCBL)) >> (short)0) || (*l_91))) && l_118))); + step_hash(39); + if ((((signed char)(((short)l_109 << (short)9) ^ ((short)(((l_109 > (l_109 >= (*l_91))) == (*l_85)) == ((int)(&p_57 != &p_57) + (int)((unsigned char)((unsigned short)(l_118 != (((*l_91) & l_109) || 4UL)) << (unsigned short)11) * (unsigned char)0x4CL))) >> (short)(*l_91))) + (signed char)l_109) & (*l_91))) + { + step_hash(36); + (*l_85) = (-1L); + } + else + { + int **l_131 = &l_91; + step_hash(38); + (*l_131) = p_58; + } + step_hash(57); + for (g_76 = 0; (g_76 < 16); g_76 += 5) + { + int **l_134 = &l_85; + step_hash(43); + (*l_134) = &g_13; + step_hash(55); + for (l_88 = 0; (l_88 != 6); l_88++) + { + step_hash(53); + for (g_75 = 4; (g_75 >= (-3)); g_75 -= 4) + { + step_hash(50); + if ((*p_58)) + break; + step_hash(51); + (*l_134) = p_57; + step_hash(52); + g_80 &= (*p_57); + } + step_hash(54); + (*l_134) = p_58; + } + step_hash(56); + g_75 ^= ((**l_134) < (l_139 == (void*)0)); + } + } + step_hash(59); + (*l_144) = (((unsigned char)(*l_91) * (unsigned char)(*l_91)) <= ((((~((g_76 && ((unsigned)(((*p_58) ^ ((*l_91) && g_6)) != (*l_91)) % (unsigned)(+(&g_6 != (void*)0)))) | 0x14738E28L)) < (*l_85)) ^ (*l_85)) ^ (*l_85))); + step_hash(60); + (*g_156) = ((short)((unsigned short)((unsigned short)(((signed char)(-1L) / (signed char)(*l_91)) ^ ((unsigned char)(g_6 ^ (*l_91)) * (unsigned char)((g_75 <= ((*l_91) & ((*l_91) < (g_155 == &g_156)))) ^ (*l_85)))) + (unsigned short)l_157) + (unsigned short)0x6D70L) / (short)65530UL); + } + else + { + unsigned l_169 = 0x679535C3L; + int *l_188 = &g_75; + step_hash(85); + for (g_80 = 3; (g_80 >= (-15)); g_80 -= 1) + { + short l_164 = 0x69B9L; + short l_174 = 0xCF24L; + int *l_203 = &g_6; + int *l_210 = &g_211; + step_hash(65); + (**g_155) = ((short)((unsigned)(l_164 || (((*l_91) > ((*l_91) > ((*g_156) == (((short)((signed char)l_169 / (signed char)0xF4L) - (short)((short)((unsigned char)l_164 >> (unsigned char)4) % (short)l_174)) <= ((short)(((g_3 && 0xF0L) == l_174) < (*l_91)) << (short)7))))) || l_174)) / (unsigned)l_174) - (short)l_169); + step_hash(82); + if ((*g_156)) + { + int *l_179 = &g_13; + int l_186 = 0xBB3B7CC6L; + step_hash(77); + for (l_88 = 0; (l_88 != 15); l_88 += 6) + { + signed char l_187 = 0x40L; + int *l_197 = &g_80; + signed char l_198 = (-3L); + int *l_201 = &g_202; + step_hash(70); + p_58 = l_179; + } + step_hash(78); + if ((*p_58)) + continue; + step_hash(79); + if ((**g_155)) + break; + } + else + { + step_hash(81); + return l_203; + } + step_hash(83); + if ((**g_155)) + continue; + step_hash(84); + (*l_210) ^= ((7L <= 9UL) > (g_2 == ((unsigned short)65535UL - (unsigned short)((unsigned short)(((((unsigned)(p_57 == (void*)0) - (unsigned)((*l_91) | g_2)) == (((*l_91) ^ g_202) > (*l_203))) != 0x8CAFD7A6L) | (*l_203)) << (unsigned short)g_3)))); + } + step_hash(92); + for (g_80 = (-8); (g_80 > 18); ++g_80) + { + int ***l_215 = &l_214; + step_hash(89); + (*l_215) = l_214; + step_hash(90); + (*l_215) = &l_91; + step_hash(91); + (*l_91) |= (*p_57); + } + step_hash(93); + (*l_214) = func_59((((short)(&p_58 == &p_58) >> (short)0) == (**g_155)), (**l_214), (*l_188)); + step_hash(94); + return (*g_155); + } + step_hash(96); + (*l_214) = func_59(g_16, (*l_91), ((**l_214) ^ ((unsigned char)0xF3L >> (unsigned char)3))); + step_hash(97); + p_57 = (void*)0; + step_hash(98); + return (*g_155); +} +static int * func_59(signed char p_60, short p_61, unsigned p_62) +{ + int l_73 = 1L; + int *l_74 = &g_75; + int *l_77 = (void*)0; + int *l_78 = (void*)0; + int *l_79 = &g_80; + step_hash(19); + (*l_74) = l_73; + step_hash(20); + g_76 |= (*l_74); + step_hash(21); + (*l_79) &= (*l_74); + step_hash(26); + for (g_16 = 2; (g_16 > 28); g_16 += 7) + { + int **l_83 = &l_77; + step_hash(25); + (*l_83) = l_78; + } + step_hash(27); + return &g_13; +} +void csmith_compute_hash(void) +{ + transparent_crc(g_2, "g_2", print_hash_value); + transparent_crc(g_3, "g_3", print_hash_value); + transparent_crc(g_6, "g_6", print_hash_value); + transparent_crc(g_13, "g_13", print_hash_value); + transparent_crc(g_16, "g_16", print_hash_value); + transparent_crc(g_75, "g_75", print_hash_value); + transparent_crc(g_76, "g_76", print_hash_value); + transparent_crc(g_80, "g_80", print_hash_value); + transparent_crc(g_202, "g_202", print_hash_value); + transparent_crc(g_211, "g_211", print_hash_value); + transparent_crc(g_369, "g_369", print_hash_value); + transparent_crc(g_463, "g_463", print_hash_value); +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand19.expect b/src/tests/csmith/rand19.expect new file mode 100644 index 0000000..6fe8427 --- /dev/null +++ b/src/tests/csmith/rand19.expect @@ -0,0 +1,65 @@ +...checksum after hashing g_2 : 99F8B879 +...checksum after hashing g_3 : 5863C77D +...checksum after hashing g_6 : D92AE6D9 +...checksum after hashing g_13 : C871B412 +...checksum after hashing g_16 : 400A1FA +...checksum after hashing g_75 : EE82C7FA +...checksum after hashing g_76 : D1B52F2B +...checksum after hashing g_80 : D004E41 +...checksum after hashing g_202 : 7B5173B9 +...checksum after hashing g_211 : 15F98B22 +...checksum after hashing g_369 : 6EBCF2D7 +...checksum after hashing g_463 : 7641330C +before stmt(1): checksum = 7641330C +...checksum after hashing g_2 : 99F8B879 +...checksum after hashing g_3 : 1134B892 +...checksum after hashing g_6 : F261AA7D +...checksum after hashing g_13 : CCC9216A +...checksum after hashing g_16 : 7A22B33B +...checksum after hashing g_75 : 2FDE239C +...checksum after hashing g_76 : 9B7E1FF6 +...checksum after hashing g_80 : 43526C9E +...checksum after hashing g_202 : 27461BB9 +...checksum after hashing g_211 : 346388F3 +...checksum after hashing g_369 : 35D5E0BC +...checksum after hashing g_463 : CD426C82 +before stmt(2): checksum = CD426C82 +...checksum after hashing g_2 : 99F8B879 +...checksum after hashing g_3 : 1134B892 +...checksum after hashing g_6 : A3B81DC9 +...checksum after hashing g_13 : D25E0F06 +...checksum after hashing g_16 : FD0EB1D4 +...checksum after hashing g_75 : E8ABDBB1 +...checksum after hashing g_76 : 25B990DD +...checksum after hashing g_80 : 766AC71E +...checksum after hashing g_202 : 5E1E67DB +...checksum after hashing g_211 : A31C388B +...checksum after hashing g_369 : 98CCF501 +...checksum after hashing g_463 : BD0ED13 +before stmt(387): checksum = BD0ED13 +...checksum after hashing g_2 : 99F8B879 +...checksum after hashing g_3 : 658650FA +...checksum after hashing g_6 : 7B403A22 +...checksum after hashing g_13 : BA4FA809 +...checksum after hashing g_16 : 69EA201D +...checksum after hashing g_75 : D24FC94F +...checksum after hashing g_76 : A0BC690D +...checksum after hashing g_80 : A8EB532 +...checksum after hashing g_202 : 802EC09C +...checksum after hashing g_211 : C7C5DACA +...checksum after hashing g_369 : B271580 +...checksum after hashing g_463 : 235B0434 +before stmt(388): checksum = 235B0434 +...checksum after hashing g_2 : 99F8B879 +...checksum after hashing g_3 : 658650FA +...checksum after hashing g_6 : 7B403A22 +...checksum after hashing g_13 : BA4FA809 +...checksum after hashing g_16 : 69EA201D +...checksum after hashing g_75 : D24FC94F +...checksum after hashing g_76 : A0BC690D +...checksum after hashing g_80 : A8EB532 +...checksum after hashing g_202 : 802EC09C +...checksum after hashing g_211 : C7C5DACA +...checksum after hashing g_369 : B271580 +...checksum after hashing g_463 : 235B0434 +checksum = 235b0434 diff --git a/src/tests/csmith/rand2.c b/src/tests/csmith/rand2.c new file mode 100644 index 0000000..b419363 --- /dev/null +++ b/src/tests/csmith/rand2.c @@ -0,0 +1,963 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static signed char g_8 = 0x75L; +static signed char g_22 = (-1L); +static int g_64 = 1L; +static int *g_68 = &g_64; +static int **g_67 = &g_68; +static int g_75 = 0L; +static int g_91 = 0xDAF140B3L; +static int g_105 = 0x2C2F6A78L; +static int *g_104 = &g_105; +static int **g_103 = &g_104; +static int ***g_102 = &g_103; +static int *g_143 = &g_75; +static int g_179 = 0x23E01F0FL; +static int g_354 = 0x902B26BEL; +static int g_385 = 0xD7647D74L; +static int ***g_397 = &g_103; +static unsigned char g_432 = 8UL; +static int g_606 = 0xA1DD7417L; +static int g_624 = 1L; +static short g_652 = 0L; +static short func_1(void); +static int func_2(short p_3, unsigned p_4, unsigned p_5, unsigned char p_6, short p_7); +static unsigned func_9(unsigned p_10); +static unsigned func_15(unsigned p_16, unsigned p_17, unsigned short p_18, int p_19, unsigned short p_20); +static short func_26(int p_27); +static unsigned func_33(int p_34, unsigned p_35); +static unsigned char func_38(short p_39); +static int func_52(unsigned short p_53, unsigned short p_54); +static int * func_55(short p_56, int * p_57, unsigned p_58); +static unsigned short func_59(int * p_60, int * p_61, int * p_62); +static short func_1(void) +{ + unsigned char l_215 = 255UL; + int ***l_274 = &g_103; + int *l_306 = (void*)0; + int l_307 = 0x5F59F456L; + short l_332 = 2L; + int l_337 = 2L; + unsigned l_353 = 0xE6E42AD6L; + int l_386 = 0x0ADE143DL; + int l_398 = 0x15C698CBL; + unsigned short l_454 = 65528UL; + unsigned short l_468 = 65532UL; + int l_495 = 0x89C1980AL; + unsigned l_525 = 0UL; + int *l_582 = &g_91; + int ***l_625 = &g_103; + unsigned short l_715 = 65535UL; + signed char l_718 = 1L; + int *l_719 = (void*)0; + step_hash(486); + if (func_2(g_8, ((func_9(g_8) > 0L) <= ((signed char)0x22L + (signed char)func_15(func_38((func_26((((((unsigned)g_91 + (unsigned)5L) & ((unsigned short)(0UL || ((signed char)(&g_67 == (void*)0) / (signed char)l_215)) % (unsigned short)0x169CL)) && g_91) | l_215)) == g_75)), g_179, g_22, l_215, l_215))), g_179, g_22, l_215)) + { + int ***l_249 = &g_103; + short l_305 = 0x6832L; + step_hash(235); + for (g_64 = 17; (g_64 == 27); ++g_64) + { + unsigned char l_236 = 0x59L; + step_hash(188); + (**g_103) = (((unsigned char)func_9(((short)0x0A95L << (short)(!l_215))) << (unsigned char)5) != ((func_26(l_236) | ((unsigned char)(l_215 ^ ((unsigned)l_236 + (unsigned)g_22)) * (unsigned char)g_8)) == g_91)); + step_hash(233); + for (g_91 = 0; (g_91 == (-10)); g_91 -= 9) + { + unsigned l_259 = 6UL; + unsigned char l_280 = 0xDDL; + step_hash(201); + for (g_75 = 0; (g_75 < 22); g_75++) + { + unsigned char l_250 = 0x0DL; + step_hash(195); + (**g_103) = (((signed char)g_8 % (signed char)((unsigned char)(l_249 != &g_67) + (unsigned char)g_22)) >= (func_26(l_250) <= ((unsigned short)((short)l_236 >> (short)(~((unsigned)((int)(-1L) - (int)((g_179 <= l_259) || 0x90L)) + (unsigned)(**g_67)))) << (unsigned short)1))); + step_hash(200); + for (l_250 = 0; (l_250 != 10); l_250 += 2) + { + step_hash(199); + (**g_103) = l_250; + } + } + step_hash(232); + if (((signed char)((unsigned char)((short)(g_91 || ((unsigned short)l_259 >> (unsigned short)((int)l_236 - (int)(((short)((*g_102) == (*g_102)) << (short)3) != g_179)))) >> (short)6) - (unsigned char)func_26(l_215)) * (signed char)((l_274 != l_274) | g_91))) + { + short l_277 = (-1L); + step_hash(203); + (**l_274) = (*g_103); + step_hash(210); + for (g_105 = (-2); (g_105 >= (-26)); --g_105) + { + step_hash(207); + (*g_143) = (*g_143); + step_hash(208); + if (l_277) + continue; + step_hash(209); + (*g_143) = ((void*)0 == (**g_102)); + } + } + else + { + int *l_281 = &g_179; + step_hash(212); + (*l_281) &= ((short)l_280 % (short)func_26(g_75)); + step_hash(220); + for (g_75 = 0; (g_75 <= 20); g_75++) + { + signed char l_284 = 0xCFL; + step_hash(216); + if ((***l_274)) + break; + step_hash(217); + (**g_103) = ((void*)0 == (**g_102)); + step_hash(218); + (**l_249) = l_281; + step_hash(219); + (***l_274) = ((0xE833L ^ l_259) ^ l_284); + } + step_hash(226); + for (l_215 = 0; (l_215 <= 39); l_215 += 2) + { + int l_287 = 0x03CA480CL; + step_hash(224); + l_287 = func_9(func_26(g_179)); + step_hash(225); + return l_287; + } + step_hash(231); + for (l_259 = 14; (l_259 < 6); l_259--) + { + step_hash(230); + (***l_249) = ((void*)0 != (*g_102)); + } + } + } + step_hash(234); + if (l_236) + continue; + } + step_hash(236); + (*g_68) &= (***l_274); + step_hash(276); + for (g_8 = (-16); (g_8 > (-23)); g_8 -= 9) + { + int *l_294 = &g_75; + int l_352 = 0xAB85A483L; + step_hash(240); + if ((*g_104)) + break; + } + } + else + { + signed char l_367 = 0xC7L; + unsigned l_374 = 4294967293UL; + int l_414 = 1L; + int ***l_467 = &g_67; + unsigned char l_536 = 0UL; + int l_630 = 9L; + int *l_635 = &l_414; + step_hash(326); + for (g_91 = (-15); (g_91 <= 14); g_91++) + { + unsigned char l_361 = 1UL; + int l_375 = 0x321761CEL; + step_hash(281); + (***l_274) &= (**g_67); + step_hash(282); + (*g_67) = (*g_67); + step_hash(290); + for (l_332 = 0; (l_332 > 24); l_332 += 1) + { + step_hash(286); + (*g_104) = func_9(((short)g_179 % (short)(g_91 | g_8))); + step_hash(287); + if (l_361) + break; + step_hash(288); + (**g_103) ^= (*g_68); + step_hash(289); + (*g_143) ^= (**g_103); + } + step_hash(325); + for (l_337 = (-18); (l_337 >= (-24)); l_337 -= 1) + { + unsigned short l_366 = 0x0276L; + int *l_369 = &g_64; + int *l_396 = (void*)0; + step_hash(306); + if (((unsigned short)g_354 / (unsigned short)0x91B3L)) + { + short l_368 = 0x22A9L; + step_hash(302); + if ((((!0x69265085L) == (((-1L) ^ (func_26((***l_274)) <= l_366)) == l_367)) <= (*g_143))) + { + step_hash(296); + (**g_103) |= 1L; + step_hash(297); + (***g_102) &= (*g_143); + step_hash(298); + (**l_274) = (*g_103); + } + else + { + step_hash(300); + if ((**g_103)) + break; + step_hash(301); + if ((**g_103)) + continue; + } + step_hash(303); + l_368 = (-1L); + } + else + { + step_hash(305); + (*g_104) &= (&g_103 != &g_103); + } + step_hash(307); + (*g_67) = l_369; + step_hash(323); + if ((((l_361 == 0xE2196DACL) < ((unsigned short)func_15(g_75, ((unsigned short)1UL * (unsigned short)l_361), (***l_274), func_15(l_374, (*l_369), g_64, (**g_67), g_8), g_75) << (unsigned short)g_354)) > l_375)) + { + int ***l_382 = &g_67; + step_hash(309); + (*g_68) = func_59((*g_67), (**l_274), (*g_103)); + step_hash(310); + (*l_369) = l_375; + step_hash(311); + l_386 &= ((((int)((unsigned short)((short)(!func_15(g_64, ((!((func_26((l_382 == (void*)0)) || 0x3D97L) | (((short)((((func_9((g_75 & (!g_8))) <= (g_91 == 0x28L)) > (*l_369)) & 0xFC06L) | g_64) / (short)g_75) >= (*g_68)))) ^ 0UL), g_91, (*l_369), l_374)) % (short)g_91) << (unsigned short)4) % (int)g_385) && 0xCF0B019CL) && (*l_369)); + } + else + { + short l_388 = 4L; + int *l_395 = (void*)0; + step_hash(322); + if (((void*)0 != (*l_274))) + { + int l_399 = 0x3ABCC576L; + step_hash(314); + (*g_104) = ((!0xCF50B0D8L) != g_8); + step_hash(315); + (**g_103) = (((-(unsigned char)l_388) ^ func_15((~(((unsigned)((unsigned short)(255UL || ((short)func_59(l_395, (*g_67), l_396) * (short)(g_397 != &g_103))) >> (unsigned short)2) / (unsigned)l_398) != l_388)), l_399, l_375, (*g_143), l_367)) && (-1L)); + step_hash(316); + (*l_369) = (g_64 ^ func_26(g_179)); + step_hash(317); + (**g_103) = 0xD4551E3BL; + } + else + { + step_hash(319); + if ((***l_274)) + break; + step_hash(320); + (**g_102) = (**g_397); + step_hash(321); + (***g_397) = l_375; + } + } + step_hash(324); + (**l_274) = (**g_397); + } + } + step_hash(327); + l_414 ^= (func_15(((signed char)((!((short)((signed char)0x24L % (signed char)0x62L) - (short)65535UL)) == ((short)((int)(((*g_68) > (g_105 | g_385)) | (+((int)0L - (int)((signed char)g_385 >> (signed char)((*g_67) == (**g_397)))))) + (int)l_367) >> (short)9)) % (signed char)g_354), g_91, g_22, (***l_274), g_385) && (-9L)); + step_hash(428); + if ((((unsigned char)(!0x54L) << (unsigned char)7) < g_385)) + { + short l_419 = 0L; + unsigned l_429 = 0xD1FFF403L; + step_hash(329); + (*g_143) &= (~(g_105 || (l_414 && ((unsigned short)(l_419 <= ((*g_397) != (*g_397))) % (unsigned short)l_419)))); + step_hash(365); + for (g_75 = 0; (g_75 == 19); ++g_75) + { + unsigned short l_426 = 0xE9E5L; + step_hash(333); + (**g_67) &= ((***l_274) == g_22); + step_hash(344); + for (l_353 = 2; (l_353 > 14); l_353++) + { + step_hash(343); + for (g_22 = 0; (g_22 == (-7)); g_22 -= 3) + { + step_hash(340); + if (l_419) + break; + step_hash(341); + (**g_103) = (l_426 || g_179); + step_hash(342); + if ((*g_68)) + break; + } + } + step_hash(363); + for (g_91 = 0; (g_91 != (-13)); --g_91) + { + } + step_hash(364); + return l_374; + } + } + else + { + int **l_441 = &l_306; + int l_481 = 0x5F1969B3L; + unsigned short l_522 = 65534UL; + step_hash(405); + for (g_105 = 0; (g_105 <= 8); g_105 += 5) + { + int ***l_440 = (void*)0; + step_hash(370); + if ((*g_143)) + break; + step_hash(375); + for (g_432 = 0; (g_432 <= 8); ++g_432) + { + unsigned l_437 = 0x70CEF403L; + step_hash(374); + return l_437; + } + step_hash(393); + for (g_354 = 26; (g_354 != 0); g_354--) + { + step_hash(385); + if (((void*)0 == l_440)) + { + step_hash(380); + (*g_102) = l_441; + step_hash(381); + if (l_374) + break; + } + else + { + step_hash(383); + (**g_102) = (**g_102); + step_hash(384); + if ((**g_67)) + break; + } + step_hash(386); + (**g_67) = ((int)0L % (int)(func_9(g_385) & ((((**g_67) == ((*g_397) == l_441)) < ((short)0L * (short)0UL)) & 0xB8L))); + step_hash(392); + for (g_91 = 0; (g_91 > (-22)); --g_91) + { + signed char l_448 = 0x54L; + step_hash(390); + (**g_67) = (((((g_8 != l_448) >= 0x7247L) > g_75) == l_374) >= ((l_448 > g_64) > func_9(l_414))); + step_hash(391); + (*g_143) &= (**g_67); + } + } + step_hash(404); + for (l_215 = 21; (l_215 != 57); ++l_215) + { + int **l_451 = &g_143; + int l_455 = 0L; + unsigned l_456 = 4294967295UL; + step_hash(397); + l_451 = (void*)0; + step_hash(403); + for (g_432 = 0; (g_432 <= 49); g_432++) + { + step_hash(401); + (**g_102) = (**g_397); + step_hash(402); + l_414 &= (((((((**g_102) != (*g_103)) < l_454) && ((0x607B733AL <= (g_91 & (g_105 <= ((g_385 == g_91) & (((void*)0 != (**l_274)) == g_354))))) >= l_455)) <= l_456) <= 8L) && 0x4682L); + } + } + } + step_hash(406); + (*g_143) = (*g_143); + step_hash(426); + for (l_337 = 0; (l_337 > (-24)); l_337 -= 7) + { + int l_478 = (-6L); + int ***l_484 = (void*)0; + int **l_513 = &l_306; + int *l_523 = &g_385; + signed char l_524 = 0L; + step_hash(422); + if (((unsigned short)(0xB0L == (((short)(65535UL && g_22) * (short)((unsigned)((((short)func_59((**l_467), (*l_441), (*l_441)) >> (short)6) & g_354) == g_179) - (unsigned)g_179)) == 65535UL)) - (unsigned short)g_22)) + { + unsigned short l_469 = 0UL; + step_hash(411); + (*g_68) ^= (g_432 > l_469); + step_hash(412); + (*g_143) = ((signed char)((short)(((unsigned)g_8 - (unsigned)((signed char)0x10L - (signed char)l_478)) > ((((signed char)(!(l_481 > 0x9DF3D125L)) >> (signed char)4) || ((***l_467) | 0xF792E4AFL)) == g_22)) >> (short)g_354) >> (signed char)g_91); + step_hash(417); + if (l_478) + { + step_hash(414); + (**g_67) = ((short)5L + (short)(l_484 != (void*)0)); + } + else + { + step_hash(416); + (**l_274) = (*g_103); + } + } + else + { + int *l_496 = &g_179; + step_hash(419); + if ((*g_143)) + break; + step_hash(420); + (*l_496) ^= (((unsigned)((0x287AL & (!((*g_102) == (void*)0))) | g_354) % (unsigned)((unsigned short)(((unsigned short)func_52(((short)g_385 << (short)((unsigned short)((***l_467) & (g_354 && func_26(l_495))) % (unsigned short)0xFA3FL)), g_354) / (unsigned short)g_432) != (-1L)) / (unsigned short)g_385)) && (***l_467)); + step_hash(421); + (***l_467) = ((short)((int)1L + (int)((unsigned char)(g_64 || 1UL) * (unsigned char)(((int)((unsigned char)(*l_496) >> (unsigned char)1) % (int)func_9(l_481)) && ((unsigned char)(1L <= (((signed char)0xACL << (signed char)2) == ((g_91 >= g_385) > (*g_143)))) - (unsigned char)0xC9L)))) << (short)4); + } + step_hash(423); + (*l_523) |= (((((-1L) || g_64) ^ func_9(g_75)) & ((int)(l_513 != (void*)0) - (int)((unsigned short)g_64 << (unsigned short)3))) & ((unsigned short)((unsigned short)((*g_143) >= ((func_26(((int)(-6L) - (int)(**g_67))) && l_481) || g_8)) - (unsigned short)l_522) * (unsigned short)65531UL)); + step_hash(424); + if (l_524) + continue; + step_hash(425); + if (l_525) + continue; + } + step_hash(427); + (*g_143) |= ((unsigned short)g_354 + (unsigned short)((***l_467) | 0x17L)); + } + step_hash(485); + for (l_307 = (-13); (l_307 == 9); l_307 += 2) + { + unsigned char l_530 = 0xEFL; + int *l_531 = &l_414; + int *l_583 = &g_91; + signed char l_588 = 0xA1L; + unsigned l_653 = 0x61509602L; + int l_661 = (-2L); + int *l_662 = (void*)0; + step_hash(432); + (*g_67) = func_55(((l_530 == (*g_143)) != func_9(g_91)), l_531, g_432); + step_hash(484); + if (((signed char)(***l_467) >> (signed char)4)) + { + unsigned short l_548 = 0x409CL; + int **l_571 = &g_68; + step_hash(447); + for (l_215 = 0; (l_215 != 51); l_215++) + { + int l_549 = 0x5597FE77L; + step_hash(437); + (**g_67) &= l_536; + step_hash(438); + if ((**g_67)) + continue; + step_hash(445); + if (((unsigned)((0xBDL != (func_2(((unsigned short)g_385 + (unsigned short)0xC4A6L), (+(((unsigned short)func_15((((int)(-(short)g_354) - (int)(***l_467)) == (*l_531)), (!((short)((**g_67) & 0xE84D8DF7L) * (short)g_105)), (*l_531), (*g_143), (***l_467)) * (unsigned short)l_548) == (*g_143))), l_549, g_432, g_385) <= g_105)) || 0x77E1L) + (unsigned)g_105)) + { + unsigned char l_554 = 254UL; + int **l_567 = &l_531; + int **l_568 = (void*)0; + step_hash(440); + (*g_143) |= (((((((unsigned short)(*l_531) % (unsigned short)l_554) | (0x610EL >= ((unsigned short)(&l_549 == (**g_102)) / (unsigned short)l_548))) == l_549) < (!l_549)) == (g_179 != 0x6775L)) > (**g_67)); + step_hash(441); + (*l_531) ^= l_549; + step_hash(442); + (**l_567) = (((short)((unsigned char)((unsigned char)0x0DL << (unsigned char)2) / (unsigned char)((unsigned short)l_554 + (unsigned short)((((unsigned short)((func_52(g_105, l_549) != (*l_531)) != (0xB4E2088BL != (l_567 != l_568))) / (unsigned short)65533UL) != 0x88L) <= 0x7C48L))) >> (short)6) || g_105); + } + else + { + step_hash(444); + (*g_68) = (*l_531); + } + step_hash(446); + (***l_467) = (((signed char)(&l_531 != (*g_102)) >> (signed char)3) >= (l_571 == l_571)); + } + step_hash(448); + (*l_531) = (&l_531 == (*g_102)); + step_hash(466); + for (g_354 = (-5); (g_354 < (-15)); g_354 -= 8) + { + int ***l_605 = &g_67; + } + } + else + { + int l_654 = 0x98395975L; + int **l_657 = (void*)0; + step_hash(468); + (*l_582) |= ((short)0x4546L % (short)func_15((((signed char)g_105 - (signed char)((unsigned short)((unsigned short)(((((short)((((void*)0 != (*l_274)) | (((unsigned char)((g_432 & (**g_67)) || ((unsigned char)((short)0x9D88L >> (short)0) * (unsigned char)(***l_467))) - (unsigned char)g_624) != g_385)) >= 0x417BL) << (short)g_652) > (-1L)) >= 1L) == g_179) + (unsigned short)l_653) + (unsigned short)l_654)) ^ g_606), g_652, l_654, (*l_635), l_654)); + step_hash(482); + if ((*g_68)) + { + int *l_658 = (void*)0; + int l_702 = (-1L); + step_hash(476); + for (g_22 = 18; (g_22 >= 7); g_22--) + { + unsigned char l_663 = 0UL; + signed char l_696 = 0xE6L; + int *l_697 = &l_386; + step_hash(473); + (**l_274) = l_662; + step_hash(474); + (*l_635) = ((((!func_15(g_179, l_663, (-(signed char)(((((int)l_663 % (int)(l_663 & (-(unsigned)(g_624 || 0L)))) <= (*l_635)) && (***l_467)) < ((signed char)func_26((g_354 && g_105)) % (signed char)g_91))), l_663, g_91)) & g_22) >= l_663) >= g_385); + step_hash(475); + (*g_143) = ((unsigned)4294967287UL - (unsigned)(((0xCF2E55F8L | ((signed char)(((unsigned char)((short)(func_2(((signed char)(((signed char)(func_59((**g_102), l_697, l_658) > (*g_143)) + (signed char)(*l_531)) != 0UL) >> (signed char)7), g_606, g_354, (*l_635), g_606) == (*l_582)) % (short)g_652) % (unsigned char)g_606) >= 2UL) << (signed char)g_91)) < g_606) == g_385)); + } + step_hash(477); + (***l_467) = (g_652 <= (0x1E857C9BL && func_26((*l_531)))); + step_hash(478); + if ((*g_68)) + continue; + step_hash(479); + (*g_143) = ((g_105 < ((unsigned char)g_75 << (unsigned char)7)) & (func_9((g_91 < func_59((**g_102), l_658, (**l_625)))) > l_702)); + } + else + { + step_hash(481); + return g_91; + } + step_hash(483); + (***l_467) = func_26((*l_635)); + } + } + } + step_hash(487); + (*l_582) = ((unsigned char)(g_624 <= ((unsigned short)((*g_143) != ((int)(*l_582) - (int)((**g_102) == (void*)0))) >> (unsigned short)((short)((g_179 <= ((((short)(*l_582) >> (short)10) && ((1UL < (0xFFE4L || 0x1725L)) == g_91)) <= l_715)) != g_64) << (short)15))) - (unsigned char)0UL); + step_hash(488); + (*l_582) = ((short)(&g_103 == l_274) * (short)l_718); + step_hash(489); + (**g_102) = (**g_397); + step_hash(490); + return g_354; +} +static int func_2(short p_3, unsigned p_4, unsigned p_5, unsigned char p_6, short p_7) +{ + unsigned l_216 = 1UL; + unsigned l_228 = 0UL; + int l_229 = 0x4C012C7DL; + step_hash(181); + if (p_3) + { + step_hash(163); + l_216 |= p_7; + } + else + { + step_hash(179); + if ((**g_67)) + { + step_hash(171); + for (p_7 = 6; (p_7 == (-27)); p_7 -= 1) + { + int *l_223 = (void*)0; + } + step_hash(172); + (**g_67) |= ((-5L) | ((unsigned char)248UL << (unsigned char)7)); + } + else + { + step_hash(178); + for (p_7 = 0; (p_7 > (-14)); p_7 -= 6) + { + step_hash(177); + (*g_143) &= (p_4 > g_8); + } + } + step_hash(180); + (**g_67) = ((p_6 > (g_179 ^ 0xF879L)) & p_7); + } + step_hash(182); + l_229 = (l_216 != l_228); + step_hash(183); + return p_5; +} +static unsigned func_9(unsigned p_10) +{ + unsigned l_25 = 1UL; + int l_204 = (-4L); + step_hash(159); + for (p_10 = (-6); (p_10 != 23); p_10++) + { + unsigned char l_21 = 0x06L; + int *l_202 = &g_105; + } + step_hash(160); + return l_25; +} +static unsigned func_15(unsigned p_16, unsigned p_17, unsigned short p_18, int p_19, unsigned short p_20) +{ + unsigned short l_184 = 0x159BL; + int *l_193 = &g_105; + step_hash(145); + (**g_67) = (((int)l_184 - (int)l_184) > (l_184 | (((signed char)p_19 >> (signed char)((short)g_64 * (short)(p_16 == l_184))) < (0x52L >= 3UL)))); + step_hash(146); + l_193 = l_193; + step_hash(147); + return g_64; +} +static short func_26(int p_27) +{ + short l_32 = 0xAB5CL; + step_hash(137); + for (p_27 = 0; (p_27 < (-23)); --p_27) + { + int *l_176 = (void*)0; + int *l_177 = (void*)0; + int *l_178 = &g_179; + } + step_hash(142); + for (g_105 = 0; (g_105 >= (-2)); --g_105) + { + step_hash(141); + return g_22; + } + step_hash(143); + return g_22; +} +static unsigned func_33(int p_34, unsigned p_35) +{ + int l_113 = 0x8A2FD92DL; + unsigned char l_128 = 0xD5L; + int l_133 = 0L; + int l_135 = (-1L); + int *l_140 = &l_135; + unsigned l_150 = 0x6180BEB1L; + int *l_173 = &g_91; + step_hash(134); + if (((unsigned char)func_38(p_34) << (unsigned char)g_8)) + { + int l_115 = 0xB600A8D5L; + int *l_139 = (void*)0; + step_hash(121); + if ((((void*)0 != (**g_102)) <= ((unsigned short)(((*g_102) == (void*)0) >= ((short)p_35 << (short)p_35)) % (unsigned short)((unsigned short)l_113 << (unsigned short)8)))) + { + int *l_114 = &g_105; + unsigned l_134 = 0x483285BFL; + step_hash(77); + l_115 &= func_59(func_55(g_22, (*g_67), g_64), (*g_103), l_114); + step_hash(87); + if (((signed char)(1L <= ((unsigned)((unsigned char)l_115 << (unsigned char)6) % (unsigned)func_38((*l_114)))) * (signed char)0xF8L)) + { + step_hash(79); + l_135 |= (((unsigned short)(((p_34 && ((g_8 < (((unsigned)0x416FBB8AL / (unsigned)g_22) ^ (g_75 || (((unsigned char)p_34 - (unsigned char)l_128) < ((((unsigned short)((signed char)(+l_133) << (signed char)func_38(l_134)) + (unsigned short)p_34) < 0x71L) || g_8))))) || (**g_103))) > p_35) || p_35) >> (unsigned short)g_8) | g_8); + } + else + { + unsigned l_138 = 0x03BCFB6DL; + step_hash(85); + if (((signed char)(l_138 || g_75) - (signed char)func_59(&p_34, l_139, (*g_67)))) + { + step_hash(82); + return l_113; + } + else + { + step_hash(84); + l_140 = (void*)0; + } + step_hash(86); + (*g_67) = &p_34; + } + step_hash(88); + return p_35; + } + else + { + int *l_156 = &g_105; + step_hash(90); + (***g_102) ^= p_35; + step_hash(118); + for (g_75 = 0; (g_75 != (-24)); g_75 -= 8) + { + unsigned char l_167 = 0UL; + step_hash(94); + (*g_67) = g_143; + step_hash(95); + (**g_102) = (*g_103); + step_hash(117); + if (((unsigned char)(((~p_34) < ((p_35 || g_64) || ((short)p_35 << (short)1))) || g_64) >> (unsigned char)6)) + { + step_hash(101); + for (p_34 = 7; (p_34 >= 3); p_34--) + { + step_hash(100); + (*l_140) ^= (g_75 >= p_35); + } + step_hash(102); + (**g_103) = p_34; + step_hash(103); + (**g_103) ^= (-3L); + step_hash(104); + (*g_104) = ((l_150 & (!((250UL & func_59((*g_103), (**g_102), (*g_67))) < p_35))) | (250UL < p_34)); + } + else + { + unsigned short l_153 = 65535UL; + int l_162 = 0x0DF5CE33L; + step_hash(110); + if (((short)l_153 << (short)((short)g_105 % (short)func_59(&p_34, l_156, (*g_67))))) + { + unsigned short l_157 = 0x7298L; + step_hash(107); + return l_157; + } + else + { + step_hash(109); + (*l_140) = 2L; + } + step_hash(115); + for (l_115 = 0; (l_115 < (-16)); l_115 -= 8) + { + step_hash(114); + (*g_102) = (*g_102); + } + step_hash(116); + (*l_156) = ((l_162 && ((((unsigned char)p_35 / (unsigned char)((short)g_64 % (short)(*l_140))) != l_162) > (*l_156))) == l_167); + } + } + step_hash(119); + (*l_156) = (((signed char)func_52(g_22, (*l_156)) - (signed char)p_35) || 0x12L); + step_hash(120); + (*g_104) ^= (*l_140); + } + step_hash(122); + (**g_103) = l_115; + step_hash(123); + return g_75; + } + else + { + step_hash(125); + (**g_67) ^= p_34; + step_hash(132); + for (l_150 = (-28); (l_150 > 29); l_150++) + { + int *l_172 = (void*)0; + step_hash(129); + (*g_103) = l_172; + step_hash(130); + l_172 = func_55(p_35, l_173, g_91); + step_hash(131); + (*l_172) = ((unsigned short)p_34 << (unsigned short)3); + } + step_hash(133); + (*g_143) = p_34; + } + step_hash(135); + return g_8; +} +static unsigned char func_38(short p_39) +{ + signed char l_49 = 0x30L; + step_hash(15); + for (p_39 = (-30); (p_39 <= 26); p_39 += 1) + { + unsigned short l_42 = 1UL; + step_hash(14); + if (l_42) + break; + } + step_hash(73); + if (((unsigned short)(((0UL || ((signed char)((((unsigned short)l_49 >> (unsigned short)l_49) != (((int)func_52(p_39, g_8) / (int)((unsigned short)((void*)0 != g_102) << (unsigned short)g_105)) <= (**g_103))) > (-1L)) % (signed char)0x19L)) & l_49) >= l_49) * (unsigned short)g_22)) + { + int l_106 = 0L; + step_hash(69); + (**g_103) &= (*g_68); + step_hash(70); + l_106 = (!(**g_67)); + } + else + { + step_hash(72); + return g_105; + } + step_hash(74); + return p_39; +} +static int func_52(unsigned short p_53, unsigned short p_54) +{ + int *l_63 = &g_64; + int **l_92 = &l_63; + step_hash(58); + (*l_92) = func_55((((p_53 == p_54) != (~g_8)) || (((func_59(l_63, &g_64, &g_64) || ((unsigned)g_64 - (unsigned)(0x3A5CL != g_8))) < g_8) == 0L)), l_63, g_22); + step_hash(66); + for (g_64 = (-12); (g_64 > (-29)); --g_64) + { + int *l_99 = &g_91; + step_hash(62); + (*l_92) = (*g_67); + step_hash(63); + (*l_99) = ((int)((signed char)(0x3FD17753L || (p_53 == ((*l_92) == (*g_67)))) >> (signed char)0) - (int)p_54); + step_hash(64); + if ((**g_67)) + continue; + step_hash(65); + (*l_99) |= 0x449D4C0FL; + } + step_hash(67); + return (**l_92); +} +static int * func_55(short p_56, int * p_57, unsigned p_58) +{ + signed char l_80 = 0xB2L; + unsigned l_88 = 0UL; + step_hash(56); + for (g_64 = 0; (g_64 <= (-15)); g_64 -= 8) + { + int *l_74 = &g_75; + step_hash(28); + (*l_74) = (*g_68); + step_hash(39); + if ((0x3BL == (0xA2B52F10L >= (*p_57)))) + { + unsigned short l_81 = 6UL; + step_hash(36); + for (p_56 = 27; (p_56 >= (-27)); --p_56) + { + step_hash(33); + l_81 ^= ((signed char)l_80 >> (signed char)2); + step_hash(34); + p_57 = p_57; + step_hash(35); + (*g_67) = (*g_67); + } + } + else + { + step_hash(38); + (*g_67) = p_57; + } + step_hash(54); + for (p_58 = 0; (p_58 <= 14); p_58++) + { + step_hash(53); + for (g_75 = 0; (g_75 >= 13); g_75 += 2) + { + unsigned char l_89 = 3UL; + int *l_90 = &g_91; + step_hash(50); + if (((signed char)(l_88 | (l_89 ^ (1L & (-1L)))) >> (signed char)7)) + { + step_hash(47); + (*g_67) = (*g_67); + } + else + { + step_hash(49); + return p_57; + } + step_hash(51); + (*l_90) = 0x5A2D5357L; + step_hash(52); + g_91 = ((*l_90) ^ g_64); + } + } + step_hash(55); + (*g_67) = p_57; + } + step_hash(57); + return (*g_67); +} +static unsigned short func_59(int * p_60, int * p_61, int * p_62) +{ + step_hash(22); + for (g_64 = 6; (g_64 <= (-28)); g_64 -= 7) + { + int ***l_69 = &g_67; + step_hash(21); + (*l_69) = g_67; + } + step_hash(23); + return g_64; +} +void csmith_compute_hash(void) +{ + transparent_crc(g_8, "g_8", print_hash_value); + transparent_crc(g_22, "g_22", print_hash_value); + transparent_crc(g_64, "g_64", print_hash_value); + transparent_crc(g_75, "g_75", print_hash_value); + transparent_crc(g_91, "g_91", print_hash_value); + transparent_crc(g_105, "g_105", print_hash_value); + transparent_crc(g_179, "g_179", print_hash_value); + transparent_crc(g_354, "g_354", print_hash_value); + transparent_crc(g_385, "g_385", print_hash_value); + transparent_crc(g_432, "g_432", print_hash_value); + transparent_crc(g_606, "g_606", print_hash_value); + transparent_crc(g_624, "g_624", print_hash_value); + transparent_crc(g_652, "g_652", print_hash_value); +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand2.expect b/src/tests/csmith/rand2.expect new file mode 100644 index 0000000..24d8f5b --- /dev/null +++ b/src/tests/csmith/rand2.expect @@ -0,0 +1,1148 @@ +...checksum after hashing g_8 : 7DA58FB2 +...checksum after hashing g_22 : 5F29607E +...checksum after hashing g_64 : E55D7778 +...checksum after hashing g_75 : 1041C54 +...checksum after hashing g_91 : 77806FED +...checksum after hashing g_105 : 7837243B +...checksum after hashing g_179 : 44F3613F +...checksum after hashing g_354 : C92BCCDD +...checksum after hashing g_385 : 5855731D +...checksum after hashing g_432 : B248DE6F +...checksum after hashing g_606 : D3A8B058 +...checksum after hashing g_624 : 2B1BD4AB +...checksum after hashing g_652 : 3424EE2E +before stmt(486): checksum = 3424EE2E +...checksum after hashing g_8 : 7DA58FB2 +...checksum after hashing g_22 : 5F29607E +...checksum after hashing g_64 : E55D7778 +...checksum after hashing g_75 : 1041C54 +...checksum after hashing g_91 : 77806FED +...checksum after hashing g_105 : 7837243B +...checksum after hashing g_179 : 44F3613F +...checksum after hashing g_354 : C92BCCDD +...checksum after hashing g_385 : 5855731D +...checksum after hashing g_432 : B248DE6F +...checksum after hashing g_606 : D3A8B058 +...checksum after hashing g_624 : 2B1BD4AB +...checksum after hashing g_652 : 3424EE2E +before stmt(159): checksum = 3424EE2E +...checksum after hashing g_8 : 7DA58FB2 +...checksum after hashing g_22 : 5F29607E +...checksum after hashing g_64 : E55D7778 +...checksum after hashing g_75 : 1041C54 +...checksum after hashing g_91 : 77806FED +...checksum after hashing g_105 : 7837243B +...checksum after hashing g_179 : 44F3613F +...checksum after hashing g_354 : C92BCCDD +...checksum after hashing g_385 : 5855731D +...checksum after hashing g_432 : B248DE6F +...checksum after hashing g_606 : D3A8B058 +...checksum after hashing g_624 : 2B1BD4AB +...checksum after hashing g_652 : 3424EE2E +before stmt(160): checksum = 3424EE2E +...checksum after hashing g_8 : 7DA58FB2 +...checksum after hashing g_22 : 5F29607E +...checksum after hashing g_64 : E55D7778 +...checksum after hashing g_75 : 1041C54 +...checksum after hashing g_91 : 77806FED +...checksum after hashing g_105 : 7837243B +...checksum after hashing g_179 : 44F3613F +...checksum after hashing g_354 : C92BCCDD +...checksum after hashing g_385 : 5855731D +...checksum after hashing g_432 : B248DE6F +...checksum after hashing g_606 : D3A8B058 +...checksum after hashing g_624 : 2B1BD4AB +...checksum after hashing g_652 : 3424EE2E +before stmt(137): checksum = 3424EE2E +...checksum after hashing g_8 : 7DA58FB2 +...checksum after hashing g_22 : 5F29607E +...checksum after hashing g_64 : E55D7778 +...checksum after hashing g_75 : 1041C54 +...checksum after hashing g_91 : 77806FED +...checksum after hashing g_105 : 7837243B +...checksum after hashing g_179 : 44F3613F +...checksum after hashing g_354 : C92BCCDD +...checksum after hashing g_385 : 5855731D +...checksum after hashing g_432 : B248DE6F +...checksum after hashing g_606 : D3A8B058 +...checksum after hashing g_624 : 2B1BD4AB +...checksum after hashing g_652 : 3424EE2E +before stmt(142): checksum = 3424EE2E +...checksum after hashing g_8 : 7DA58FB2 +...checksum after hashing g_22 : 5F29607E +...checksum after hashing g_64 : E55D7778 +...checksum after hashing g_75 : 1041C54 +...checksum after hashing g_91 : 77806FED +...checksum after hashing g_105 : B338B630 +...checksum after hashing g_179 : E64B8D57 +...checksum after hashing g_354 : 8385DC81 +...checksum after hashing g_385 : 6325599E +...checksum after hashing g_432 : E64A945E +...checksum after hashing g_606 : B802D0E5 +...checksum after hashing g_624 : 25C657F +...checksum after hashing g_652 : A4041569 +before stmt(141): checksum = A4041569 +...checksum after hashing g_8 : 7DA58FB2 +...checksum after hashing g_22 : 5F29607E +...checksum after hashing g_64 : E55D7778 +...checksum after hashing g_75 : 1041C54 +...checksum after hashing g_91 : 77806FED +...checksum after hashing g_105 : B338B630 +...checksum after hashing g_179 : E64B8D57 +...checksum after hashing g_354 : 8385DC81 +...checksum after hashing g_385 : 6325599E +...checksum after hashing g_432 : E64A945E +...checksum after hashing g_606 : B802D0E5 +...checksum after hashing g_624 : 25C657F +...checksum after hashing g_652 : A4041569 +before stmt(15): checksum = A4041569 +...checksum after hashing g_8 : 7DA58FB2 +...checksum after hashing g_22 : 5F29607E +...checksum after hashing g_64 : E55D7778 +...checksum after hashing g_75 : 1041C54 +...checksum after hashing g_91 : 77806FED +...checksum after hashing g_105 : B338B630 +...checksum after hashing g_179 : E64B8D57 +...checksum after hashing g_354 : 8385DC81 +...checksum after hashing g_385 : 6325599E +...checksum after hashing g_432 : E64A945E +...checksum after hashing g_606 : B802D0E5 +...checksum after hashing g_624 : 25C657F +...checksum after hashing g_652 : A4041569 +before stmt(14): checksum = A4041569 +...checksum after hashing g_8 : 7DA58FB2 +...checksum after hashing g_22 : 5F29607E +...checksum after hashing g_64 : E55D7778 +...checksum after hashing g_75 : 1041C54 +...checksum after hashing g_91 : 77806FED +...checksum after hashing g_105 : B338B630 +...checksum after hashing g_179 : E64B8D57 +...checksum after hashing g_354 : 8385DC81 +...checksum after hashing g_385 : 6325599E +...checksum after hashing g_432 : E64A945E +...checksum after hashing g_606 : B802D0E5 +...checksum after hashing g_624 : 25C657F +...checksum after hashing g_652 : A4041569 +before stmt(73): checksum = A4041569 +...checksum after hashing g_8 : 7DA58FB2 +...checksum after hashing g_22 : 5F29607E +...checksum after hashing g_64 : E55D7778 +...checksum after hashing g_75 : 1041C54 +...checksum after hashing g_91 : 77806FED +...checksum after hashing g_105 : B338B630 +...checksum after hashing g_179 : E64B8D57 +...checksum after hashing g_354 : 8385DC81 +...checksum after hashing g_385 : 6325599E +...checksum after hashing g_432 : E64A945E +...checksum after hashing g_606 : B802D0E5 +...checksum after hashing g_624 : 25C657F +...checksum after hashing g_652 : A4041569 +before stmt(58): checksum = A4041569 +...checksum after hashing g_8 : 7DA58FB2 +...checksum after hashing g_22 : 5F29607E +...checksum after hashing g_64 : E55D7778 +...checksum after hashing g_75 : 1041C54 +...checksum after hashing g_91 : 77806FED +...checksum after hashing g_105 : B338B630 +...checksum after hashing g_179 : E64B8D57 +...checksum after hashing g_354 : 8385DC81 +...checksum after hashing g_385 : 6325599E +...checksum after hashing g_432 : E64A945E +...checksum after hashing g_606 : B802D0E5 +...checksum after hashing g_624 : 25C657F +...checksum after hashing g_652 : A4041569 +before stmt(56): checksum = A4041569 +...checksum after hashing g_8 : 7DA58FB2 +...checksum after hashing g_22 : 5F29607E +...checksum after hashing g_64 : 5DE1101D +...checksum after hashing g_75 : CDAE1CCA +...checksum after hashing g_91 : EC252382 +...checksum after hashing g_105 : 1D5027A1 +...checksum after hashing g_179 : 832CB611 +...checksum after hashing g_354 : 2A0B9A6 +...checksum after hashing g_385 : 6290A483 +...checksum after hashing g_432 : 179091F4 +...checksum after hashing g_606 : 2D720470 +...checksum after hashing g_624 : AD18F738 +...checksum after hashing g_652 : 8E2C2D0B +before stmt(57): checksum = 8E2C2D0B +...checksum after hashing g_8 : 7DA58FB2 +...checksum after hashing g_22 : 5F29607E +...checksum after hashing g_64 : 5DE1101D +...checksum after hashing g_75 : CDAE1CCA +...checksum after hashing g_91 : EC252382 +...checksum after hashing g_105 : 1D5027A1 +...checksum after hashing g_179 : 832CB611 +...checksum after hashing g_354 : 2A0B9A6 +...checksum after hashing g_385 : 6290A483 +...checksum after hashing g_432 : 179091F4 +...checksum after hashing g_606 : 2D720470 +...checksum after hashing g_624 : AD18F738 +...checksum after hashing g_652 : 8E2C2D0B +before stmt(66): checksum = 8E2C2D0B +...checksum after hashing g_8 : 7DA58FB2 +...checksum after hashing g_22 : 5F29607E +...checksum after hashing g_64 : 545BB7FF +...checksum after hashing g_75 : A19200A +...checksum after hashing g_91 : 199DBE1C +...checksum after hashing g_105 : 54CFB8B6 +...checksum after hashing g_179 : 4174491B +...checksum after hashing g_354 : D48D19EF +...checksum after hashing g_385 : 126EC35A +...checksum after hashing g_432 : DB6E074D +...checksum after hashing g_606 : AC7B838A +...checksum after hashing g_624 : EBC40401 +...checksum after hashing g_652 : 6BF391F +before stmt(62): checksum = 6BF391F +...checksum after hashing g_8 : 7DA58FB2 +...checksum after hashing g_22 : 5F29607E +...checksum after hashing g_64 : 545BB7FF +...checksum after hashing g_75 : A19200A +...checksum after hashing g_91 : 199DBE1C +...checksum after hashing g_105 : 54CFB8B6 +...checksum after hashing g_179 : 4174491B +...checksum after hashing g_354 : D48D19EF +...checksum after hashing g_385 : 126EC35A +...checksum after hashing g_432 : DB6E074D +...checksum after hashing g_606 : AC7B838A +...checksum after hashing g_624 : EBC40401 +...checksum after hashing g_652 : 6BF391F +before stmt(63): checksum = 6BF391F +...checksum after hashing g_8 : 7DA58FB2 +...checksum after hashing g_22 : 5F29607E +...checksum after hashing g_64 : 545BB7FF +...checksum after hashing g_75 : A19200A +...checksum after hashing g_91 : AA50160F +...checksum after hashing g_105 : ED34072A +...checksum after hashing g_179 : 3D159D74 +...checksum after hashing g_354 : 181D04A7 +...checksum after hashing g_385 : BBA3872A +...checksum after hashing g_432 : 169C3082 +...checksum after hashing g_606 : 602EB3FD +...checksum after hashing g_624 : 6C595E3E +...checksum after hashing g_652 : 78EF985A +before stmt(64): checksum = 78EF985A +...checksum after hashing g_8 : 7DA58FB2 +...checksum after hashing g_22 : 5F29607E +...checksum after hashing g_64 : C98C8F46 +...checksum after hashing g_75 : DC2913 +...checksum after hashing g_91 : DEC8FF80 +...checksum after hashing g_105 : 10CDFF5F +...checksum after hashing g_179 : DC513BE7 +...checksum after hashing g_354 : 290533D0 +...checksum after hashing g_385 : BFAA7479 +...checksum after hashing g_432 : AE092217 +...checksum after hashing g_606 : 3C9E9094 +...checksum after hashing g_624 : 9664AD69 +...checksum after hashing g_652 : AE373174 +before stmt(62): checksum = AE373174 +...checksum after hashing g_8 : 7DA58FB2 +...checksum after hashing g_22 : 5F29607E +...checksum after hashing g_64 : C98C8F46 +...checksum after hashing g_75 : DC2913 +...checksum after hashing g_91 : DEC8FF80 +...checksum after hashing g_105 : 10CDFF5F +...checksum after hashing g_179 : DC513BE7 +...checksum after hashing g_354 : 290533D0 +...checksum after hashing g_385 : BFAA7479 +...checksum after hashing g_432 : AE092217 +...checksum after hashing g_606 : 3C9E9094 +...checksum after hashing g_624 : 9664AD69 +...checksum after hashing g_652 : AE373174 +before stmt(63): checksum = AE373174 +...checksum after hashing g_8 : 7DA58FB2 +...checksum after hashing g_22 : 5F29607E +...checksum after hashing g_64 : C98C8F46 +...checksum after hashing g_75 : DC2913 +...checksum after hashing g_91 : DEC8FF80 +...checksum after hashing g_105 : 10CDFF5F +...checksum after hashing g_179 : DC513BE7 +...checksum after hashing g_354 : 290533D0 +...checksum after hashing g_385 : BFAA7479 +...checksum after hashing g_432 : AE092217 +...checksum after hashing g_606 : 3C9E9094 +...checksum after hashing g_624 : 9664AD69 +...checksum after hashing g_652 : AE373174 +before stmt(64): checksum = AE373174 +...checksum after hashing g_8 : 7DA58FB2 +...checksum after hashing g_22 : 5F29607E +...checksum after hashing g_64 : 7130E823 +...checksum after hashing g_75 : CC76298D +...checksum after hashing g_91 : 456DB3EF +...checksum after hashing g_105 : BEA56ECE +...checksum after hashing g_179 : B93600A1 +...checksum after hashing g_354 : A82056F7 +...checksum after hashing g_385 : BE1F8964 +...checksum after hashing g_432 : 5FD327BD +...checksum after hashing g_606 : A9EE4401 +...checksum after hashing g_624 : 39203F2E +...checksum after hashing g_652 : 841F0916 +before stmt(62): checksum = 841F0916 +...checksum after hashing g_8 : 7DA58FB2 +...checksum after hashing g_22 : 5F29607E +...checksum after hashing g_64 : 7130E823 +...checksum after hashing g_75 : CC76298D +...checksum after hashing g_91 : 456DB3EF +...checksum after hashing g_105 : BEA56ECE +...checksum after hashing g_179 : B93600A1 +...checksum after hashing g_354 : A82056F7 +...checksum after hashing g_385 : BE1F8964 +...checksum after hashing g_432 : 5FD327BD +...checksum after hashing g_606 : A9EE4401 +...checksum after hashing g_624 : 39203F2E +...checksum after hashing g_652 : 841F0916 +before stmt(63): checksum = 841F0916 +...checksum after hashing g_8 : 7DA58FB2 +...checksum after hashing g_22 : 5F29607E +...checksum after hashing g_64 : 7130E823 +...checksum after hashing g_75 : CC76298D +...checksum after hashing g_91 : 456DB3EF +...checksum after hashing g_105 : BEA56ECE +...checksum after hashing g_179 : B93600A1 +...checksum after hashing g_354 : A82056F7 +...checksum after hashing g_385 : BE1F8964 +...checksum after hashing g_432 : 5FD327BD +...checksum after hashing g_606 : A9EE4401 +...checksum after hashing g_624 : 39203F2E +...checksum after hashing g_652 : 841F0916 +before stmt(64): checksum = 841F0916 +...checksum after hashing g_8 : 7DA58FB2 +...checksum after hashing g_22 : 5F29607E +...checksum after hashing g_64 : 638547CD +...checksum after hashing g_75 : 42F92E6E +...checksum after hashing g_91 : 32F3611F +...checksum after hashing g_105 : 976DDA3C +...checksum after hashing g_179 : 169F4D6B +...checksum after hashing g_354 : F03EFFDF +...checksum after hashing g_385 : BCC18E43 +...checksum after hashing g_432 : 96CC2F02 +...checksum after hashing g_606 : CD0E3FFF +...checksum after hashing g_624 : 139C8FA6 +...checksum after hashing g_652 : FA6741B0 +before stmt(62): checksum = FA6741B0 +...checksum after hashing g_8 : 7DA58FB2 +...checksum after hashing g_22 : 5F29607E +...checksum after hashing g_64 : 638547CD +...checksum after hashing g_75 : 42F92E6E +...checksum after hashing g_91 : 32F3611F +...checksum after hashing g_105 : 976DDA3C +...checksum after hashing g_179 : 169F4D6B +...checksum after hashing g_354 : F03EFFDF +...checksum after hashing g_385 : BCC18E43 +...checksum after hashing g_432 : 96CC2F02 +...checksum after hashing g_606 : CD0E3FFF +...checksum after hashing g_624 : 139C8FA6 +...checksum after hashing g_652 : FA6741B0 +before stmt(63): checksum = FA6741B0 +...checksum after hashing g_8 : 7DA58FB2 +...checksum after hashing g_22 : 5F29607E +...checksum after hashing g_64 : 638547CD +...checksum after hashing g_75 : 42F92E6E +...checksum after hashing g_91 : 32F3611F +...checksum after hashing g_105 : 976DDA3C +...checksum after hashing g_179 : 169F4D6B +...checksum after hashing g_354 : F03EFFDF +...checksum after hashing g_385 : BCC18E43 +...checksum after hashing g_432 : 96CC2F02 +...checksum after hashing g_606 : CD0E3FFF +...checksum after hashing g_624 : 139C8FA6 +...checksum after hashing g_652 : FA6741B0 +before stmt(64): checksum = FA6741B0 +...checksum after hashing g_8 : 7DA58FB2 +...checksum after hashing g_22 : 5F29607E +...checksum after hashing g_64 : DB3920A8 +...checksum after hashing g_75 : 8E532EF0 +...checksum after hashing g_91 : A9562D70 +...checksum after hashing g_105 : 39054BAD +...checksum after hashing g_179 : 73F8762D +...checksum after hashing g_354 : 711B9AF8 +...checksum after hashing g_385 : BD74735E +...checksum after hashing g_432 : 67162AA8 +...checksum after hashing g_606 : 587EEB6A +...checksum after hashing g_624 : BCD81DE1 +...checksum after hashing g_652 : D04F79D2 +before stmt(62): checksum = D04F79D2 +...checksum after hashing g_8 : 7DA58FB2 +...checksum after hashing g_22 : 5F29607E +...checksum after hashing g_64 : DB3920A8 +...checksum after hashing g_75 : 8E532EF0 +...checksum after hashing g_91 : A9562D70 +...checksum after hashing g_105 : 39054BAD +...checksum after hashing g_179 : 73F8762D +...checksum after hashing g_354 : 711B9AF8 +...checksum after hashing g_385 : BD74735E +...checksum after hashing g_432 : 67162AA8 +...checksum after hashing g_606 : 587EEB6A +...checksum after hashing g_624 : BCD81DE1 +...checksum after hashing g_652 : D04F79D2 +before stmt(63): checksum = D04F79D2 +...checksum after hashing g_8 : 7DA58FB2 +...checksum after hashing g_22 : 5F29607E +...checksum after hashing g_64 : DB3920A8 +...checksum after hashing g_75 : 8E532EF0 +...checksum after hashing g_91 : A9562D70 +...checksum after hashing g_105 : 39054BAD +...checksum after hashing g_179 : 73F8762D +...checksum after hashing g_354 : 711B9AF8 +...checksum after hashing g_385 : BD74735E +...checksum after hashing g_432 : 67162AA8 +...checksum after hashing g_606 : 587EEB6A +...checksum after hashing g_624 : BCD81DE1 +...checksum after hashing g_652 : D04F79D2 +before stmt(64): checksum = D04F79D2 +...checksum after hashing g_8 : 7DA58FB2 +...checksum after hashing g_22 : 5F29607E +...checksum after hashing g_64 : D3436761 +...checksum after hashing g_75 : 2BC80D77 +...checksum after hashing g_91 : D7DA5FFD +...checksum after hashing g_105 : 51C81209 +...checksum after hashing g_179 : EFA1AD29 +...checksum after hashing g_354 : ED65EE0C +...checksum after hashing g_385 : AF8DB935 +...checksum after hashing g_432 : 21CE6280 +...checksum after hashing g_606 : 952F1B71 +...checksum after hashing g_624 : C8716CB7 +...checksum after hashing g_652 : 43B7994E +before stmt(62): checksum = 43B7994E +...checksum after hashing g_8 : 7DA58FB2 +...checksum after hashing g_22 : 5F29607E +...checksum after hashing g_64 : D3436761 +...checksum after hashing g_75 : 2BC80D77 +...checksum after hashing g_91 : D7DA5FFD +...checksum after hashing g_105 : 51C81209 +...checksum after hashing g_179 : EFA1AD29 +...checksum after hashing g_354 : ED65EE0C +...checksum after hashing g_385 : AF8DB935 +...checksum after hashing g_432 : 21CE6280 +...checksum after hashing g_606 : 952F1B71 +...checksum after hashing g_624 : C8716CB7 +...checksum after hashing g_652 : 43B7994E +before stmt(63): checksum = 43B7994E +...checksum after hashing g_8 : 7DA58FB2 +...checksum after hashing g_22 : 5F29607E +...checksum after hashing g_64 : D3436761 +...checksum after hashing g_75 : 2BC80D77 +...checksum after hashing g_91 : D7DA5FFD +...checksum after hashing g_105 : 51C81209 +...checksum after hashing g_179 : EFA1AD29 +...checksum after hashing g_354 : ED65EE0C +...checksum after hashing g_385 : AF8DB935 +...checksum after hashing g_432 : 21CE6280 +...checksum after hashing g_606 : 952F1B71 +...checksum after hashing g_624 : C8716CB7 +...checksum after hashing g_652 : 43B7994E +before stmt(64): checksum = 43B7994E +...checksum after hashing g_8 : 7DA58FB2 +...checksum after hashing g_22 : 5F29607E +...checksum after hashing g_64 : 6BFF0004 +...checksum after hashing g_75 : E7620DE9 +...checksum after hashing g_91 : 4C7F1392 +...checksum after hashing g_105 : FFA08398 +...checksum after hashing g_179 : 8AC6966F +...checksum after hashing g_354 : 6C408B2B +...checksum after hashing g_385 : AE384428 +...checksum after hashing g_432 : D014672A +...checksum after hashing g_606 : 5FCFE4 +...checksum after hashing g_624 : 6735FEF0 +...checksum after hashing g_652 : 699FA12C +before stmt(62): checksum = 699FA12C +...checksum after hashing g_8 : 7DA58FB2 +...checksum after hashing g_22 : 5F29607E +...checksum after hashing g_64 : 6BFF0004 +...checksum after hashing g_75 : E7620DE9 +...checksum after hashing g_91 : 4C7F1392 +...checksum after hashing g_105 : FFA08398 +...checksum after hashing g_179 : 8AC6966F +...checksum after hashing g_354 : 6C408B2B +...checksum after hashing g_385 : AE384428 +...checksum after hashing g_432 : D014672A +...checksum after hashing g_606 : 5FCFE4 +...checksum after hashing g_624 : 6735FEF0 +...checksum after hashing g_652 : 699FA12C +before stmt(63): checksum = 699FA12C +...checksum after hashing g_8 : 7DA58FB2 +...checksum after hashing g_22 : 5F29607E +...checksum after hashing g_64 : 6BFF0004 +...checksum after hashing g_75 : E7620DE9 +...checksum after hashing g_91 : 4C7F1392 +...checksum after hashing g_105 : FFA08398 +...checksum after hashing g_179 : 8AC6966F +...checksum after hashing g_354 : 6C408B2B +...checksum after hashing g_385 : AE384428 +...checksum after hashing g_432 : D014672A +...checksum after hashing g_606 : 5FCFE4 +...checksum after hashing g_624 : 6735FEF0 +...checksum after hashing g_652 : 699FA12C +before stmt(64): checksum = 699FA12C +...checksum after hashing g_8 : 7DA58FB2 +...checksum after hashing g_22 : 5F29607E +...checksum after hashing g_64 : 794AAFEA +...checksum after hashing g_75 : 69ED0A0A +...checksum after hashing g_91 : 3BE1C162 +...checksum after hashing g_105 : D668376A +...checksum after hashing g_179 : 256FDBA5 +...checksum after hashing g_354 : 345E2203 +...checksum after hashing g_385 : ACE6430F +...checksum after hashing g_432 : 190B6F95 +...checksum after hashing g_606 : 64BFB41A +...checksum after hashing g_624 : 4D894E78 +...checksum after hashing g_652 : 17E7E98A +before stmt(62): checksum = 17E7E98A +...checksum after hashing g_8 : 7DA58FB2 +...checksum after hashing g_22 : 5F29607E +...checksum after hashing g_64 : 794AAFEA +...checksum after hashing g_75 : 69ED0A0A +...checksum after hashing g_91 : 3BE1C162 +...checksum after hashing g_105 : D668376A +...checksum after hashing g_179 : 256FDBA5 +...checksum after hashing g_354 : 345E2203 +...checksum after hashing g_385 : ACE6430F +...checksum after hashing g_432 : 190B6F95 +...checksum after hashing g_606 : 64BFB41A +...checksum after hashing g_624 : 4D894E78 +...checksum after hashing g_652 : 17E7E98A +before stmt(63): checksum = 17E7E98A +...checksum after hashing g_8 : 7DA58FB2 +...checksum after hashing g_22 : 5F29607E +...checksum after hashing g_64 : 794AAFEA +...checksum after hashing g_75 : 69ED0A0A +...checksum after hashing g_91 : 3BE1C162 +...checksum after hashing g_105 : D668376A +...checksum after hashing g_179 : 256FDBA5 +...checksum after hashing g_354 : 345E2203 +...checksum after hashing g_385 : ACE6430F +...checksum after hashing g_432 : 190B6F95 +...checksum after hashing g_606 : 64BFB41A +...checksum after hashing g_624 : 4D894E78 +...checksum after hashing g_652 : 17E7E98A +before stmt(64): checksum = 17E7E98A +...checksum after hashing g_8 : 7DA58FB2 +...checksum after hashing g_22 : 5F29607E +...checksum after hashing g_64 : C1F6C88F +...checksum after hashing g_75 : A5470A94 +...checksum after hashing g_91 : A0448D0D +...checksum after hashing g_105 : 7800A6FB +...checksum after hashing g_179 : 4008E0E3 +...checksum after hashing g_354 : B57B4724 +...checksum after hashing g_385 : AD53BE12 +...checksum after hashing g_432 : E8D16A3F +...checksum after hashing g_606 : F1CF608F +...checksum after hashing g_624 : E2CDDC3F +...checksum after hashing g_652 : 3DCFD1E8 +before stmt(62): checksum = 3DCFD1E8 +...checksum after hashing g_8 : 7DA58FB2 +...checksum after hashing g_22 : 5F29607E +...checksum after hashing g_64 : C1F6C88F +...checksum after hashing g_75 : A5470A94 +...checksum after hashing g_91 : A0448D0D +...checksum after hashing g_105 : 7800A6FB +...checksum after hashing g_179 : 4008E0E3 +...checksum after hashing g_354 : B57B4724 +...checksum after hashing g_385 : AD53BE12 +...checksum after hashing g_432 : E8D16A3F +...checksum after hashing g_606 : F1CF608F +...checksum after hashing g_624 : E2CDDC3F +...checksum after hashing g_652 : 3DCFD1E8 +before stmt(63): checksum = 3DCFD1E8 +...checksum after hashing g_8 : 7DA58FB2 +...checksum after hashing g_22 : 5F29607E +...checksum after hashing g_64 : C1F6C88F +...checksum after hashing g_75 : A5470A94 +...checksum after hashing g_91 : A0448D0D +...checksum after hashing g_105 : 7800A6FB +...checksum after hashing g_179 : 4008E0E3 +...checksum after hashing g_354 : B57B4724 +...checksum after hashing g_385 : AD53BE12 +...checksum after hashing g_432 : E8D16A3F +...checksum after hashing g_606 : F1CF608F +...checksum after hashing g_624 : E2CDDC3F +...checksum after hashing g_652 : 3DCFD1E8 +before stmt(64): checksum = 3DCFD1E8 +...checksum after hashing g_8 : 7DA58FB2 +...checksum after hashing g_22 : 5F29607E +...checksum after hashing g_64 : 5C21F036 +...checksum after hashing g_75 : AF82038D +...checksum after hashing g_91 : D4DC6482 +...checksum after hashing g_105 : 85F95E8E +...checksum after hashing g_179 : A14C4670 +...checksum after hashing g_354 : 84637053 +...checksum after hashing g_385 : A95A4D41 +...checksum after hashing g_432 : 504478AA +...checksum after hashing g_606 : AD7F43E6 +...checksum after hashing g_624 : 18F02F68 +...checksum after hashing g_652 : EB1778C6 +before stmt(62): checksum = EB1778C6 +...checksum after hashing g_8 : 7DA58FB2 +...checksum after hashing g_22 : 5F29607E +...checksum after hashing g_64 : 5C21F036 +...checksum after hashing g_75 : AF82038D +...checksum after hashing g_91 : D4DC6482 +...checksum after hashing g_105 : 85F95E8E +...checksum after hashing g_179 : A14C4670 +...checksum after hashing g_354 : 84637053 +...checksum after hashing g_385 : A95A4D41 +...checksum after hashing g_432 : 504478AA +...checksum after hashing g_606 : AD7F43E6 +...checksum after hashing g_624 : 18F02F68 +...checksum after hashing g_652 : EB1778C6 +before stmt(63): checksum = EB1778C6 +...checksum after hashing g_8 : 7DA58FB2 +...checksum after hashing g_22 : 5F29607E +...checksum after hashing g_64 : 5C21F036 +...checksum after hashing g_75 : AF82038D +...checksum after hashing g_91 : D4DC6482 +...checksum after hashing g_105 : 85F95E8E +...checksum after hashing g_179 : A14C4670 +...checksum after hashing g_354 : 84637053 +...checksum after hashing g_385 : A95A4D41 +...checksum after hashing g_432 : 504478AA +...checksum after hashing g_606 : AD7F43E6 +...checksum after hashing g_624 : 18F02F68 +...checksum after hashing g_652 : EB1778C6 +before stmt(64): checksum = EB1778C6 +...checksum after hashing g_8 : 7DA58FB2 +...checksum after hashing g_22 : 5F29607E +...checksum after hashing g_64 : E49D9753 +...checksum after hashing g_75 : 63280313 +...checksum after hashing g_91 : 4F7928ED +...checksum after hashing g_105 : 2B91CF1F +...checksum after hashing g_179 : C42B7D36 +...checksum after hashing g_354 : 5461574 +...checksum after hashing g_385 : A8EFB05C +...checksum after hashing g_432 : A19E7D00 +...checksum after hashing g_606 : 380F9773 +...checksum after hashing g_624 : B7B4BD2F +...checksum after hashing g_652 : C13F40A4 +before stmt(62): checksum = C13F40A4 +...checksum after hashing g_8 : 7DA58FB2 +...checksum after hashing g_22 : 5F29607E +...checksum after hashing g_64 : E49D9753 +...checksum after hashing g_75 : 63280313 +...checksum after hashing g_91 : 4F7928ED +...checksum after hashing g_105 : 2B91CF1F +...checksum after hashing g_179 : C42B7D36 +...checksum after hashing g_354 : 5461574 +...checksum after hashing g_385 : A8EFB05C +...checksum after hashing g_432 : A19E7D00 +...checksum after hashing g_606 : 380F9773 +...checksum after hashing g_624 : B7B4BD2F +...checksum after hashing g_652 : C13F40A4 +before stmt(63): checksum = C13F40A4 +...checksum after hashing g_8 : 7DA58FB2 +...checksum after hashing g_22 : 5F29607E +...checksum after hashing g_64 : E49D9753 +...checksum after hashing g_75 : 63280313 +...checksum after hashing g_91 : 4F7928ED +...checksum after hashing g_105 : 2B91CF1F +...checksum after hashing g_179 : C42B7D36 +...checksum after hashing g_354 : 5461574 +...checksum after hashing g_385 : A8EFB05C +...checksum after hashing g_432 : A19E7D00 +...checksum after hashing g_606 : 380F9773 +...checksum after hashing g_624 : B7B4BD2F +...checksum after hashing g_652 : C13F40A4 +before stmt(64): checksum = C13F40A4 +...checksum after hashing g_8 : 7DA58FB2 +...checksum after hashing g_22 : 5F29607E +...checksum after hashing g_64 : F62838BD +...checksum after hashing g_75 : EDA704F0 +...checksum after hashing g_91 : 38E7FA1D +...checksum after hashing g_105 : 2597BED +...checksum after hashing g_179 : 6B8230FC +...checksum after hashing g_354 : 5D58BC5C +...checksum after hashing g_385 : AA31B77B +...checksum after hashing g_432 : 688175BF +...checksum after hashing g_606 : 5CEFEC8D +...checksum after hashing g_624 : 9D080DA7 +...checksum after hashing g_652 : BF470802 +before stmt(62): checksum = BF470802 +...checksum after hashing g_8 : 7DA58FB2 +...checksum after hashing g_22 : 5F29607E +...checksum after hashing g_64 : F62838BD +...checksum after hashing g_75 : EDA704F0 +...checksum after hashing g_91 : 38E7FA1D +...checksum after hashing g_105 : 2597BED +...checksum after hashing g_179 : 6B8230FC +...checksum after hashing g_354 : 5D58BC5C +...checksum after hashing g_385 : AA31B77B +...checksum after hashing g_432 : 688175BF +...checksum after hashing g_606 : 5CEFEC8D +...checksum after hashing g_624 : 9D080DA7 +...checksum after hashing g_652 : BF470802 +before stmt(63): checksum = BF470802 +...checksum after hashing g_8 : 7DA58FB2 +...checksum after hashing g_22 : 5F29607E +...checksum after hashing g_64 : F62838BD +...checksum after hashing g_75 : EDA704F0 +...checksum after hashing g_91 : 38E7FA1D +...checksum after hashing g_105 : 2597BED +...checksum after hashing g_179 : 6B8230FC +...checksum after hashing g_354 : 5D58BC5C +...checksum after hashing g_385 : AA31B77B +...checksum after hashing g_432 : 688175BF +...checksum after hashing g_606 : 5CEFEC8D +...checksum after hashing g_624 : 9D080DA7 +...checksum after hashing g_652 : BF470802 +before stmt(64): checksum = BF470802 +...checksum after hashing g_8 : 7DA58FB2 +...checksum after hashing g_22 : 5F29607E +...checksum after hashing g_64 : 4E945FD8 +...checksum after hashing g_75 : 210D046E +...checksum after hashing g_91 : A342B672 +...checksum after hashing g_105 : AC31EA7C +...checksum after hashing g_179 : EE50BBA +...checksum after hashing g_354 : DC7DD97B +...checksum after hashing g_385 : AB844A66 +...checksum after hashing g_432 : 995B7015 +...checksum after hashing g_606 : C99F3818 +...checksum after hashing g_624 : 324C9FE0 +...checksum after hashing g_652 : 956F3060 +before stmt(62): checksum = 956F3060 +...checksum after hashing g_8 : 7DA58FB2 +...checksum after hashing g_22 : 5F29607E +...checksum after hashing g_64 : 4E945FD8 +...checksum after hashing g_75 : 210D046E +...checksum after hashing g_91 : A342B672 +...checksum after hashing g_105 : AC31EA7C +...checksum after hashing g_179 : EE50BBA +...checksum after hashing g_354 : DC7DD97B +...checksum after hashing g_385 : AB844A66 +...checksum after hashing g_432 : 995B7015 +...checksum after hashing g_606 : C99F3818 +...checksum after hashing g_624 : 324C9FE0 +...checksum after hashing g_652 : 956F3060 +before stmt(63): checksum = 956F3060 +...checksum after hashing g_8 : 7DA58FB2 +...checksum after hashing g_22 : 5F29607E +...checksum after hashing g_64 : 4E945FD8 +...checksum after hashing g_75 : 210D046E +...checksum after hashing g_91 : A342B672 +...checksum after hashing g_105 : AC31EA7C +...checksum after hashing g_179 : EE50BBA +...checksum after hashing g_354 : DC7DD97B +...checksum after hashing g_385 : AB844A66 +...checksum after hashing g_432 : 995B7015 +...checksum after hashing g_606 : C99F3818 +...checksum after hashing g_624 : 324C9FE0 +...checksum after hashing g_652 : 956F3060 +before stmt(64): checksum = 956F3060 +...checksum after hashing g_8 : 7DA58FB2 +...checksum after hashing g_22 : 5F29607E +...checksum after hashing g_64 : 16F74F8E +...checksum after hashing g_75 : F82D16C2 +...checksum after hashing g_91 : D1D62903 +...checksum after hashing g_105 : 22DB8D46 +...checksum after hashing g_179 : 727A7B9B +...checksum after hashing g_354 : 3F68D2B2 +...checksum after hashing g_385 : A22251DD +...checksum after hashing g_432 : C2DA56D4 +...checksum after hashing g_606 : E58FAA5F +...checksum after hashing g_624 : B202ED48 +...checksum after hashing g_652 : C9875C1F +before stmt(62): checksum = C9875C1F +...checksum after hashing g_8 : 7DA58FB2 +...checksum after hashing g_22 : 5F29607E +...checksum after hashing g_64 : 16F74F8E +...checksum after hashing g_75 : F82D16C2 +...checksum after hashing g_91 : D1D62903 +...checksum after hashing g_105 : 22DB8D46 +...checksum after hashing g_179 : 727A7B9B +...checksum after hashing g_354 : 3F68D2B2 +...checksum after hashing g_385 : A22251DD +...checksum after hashing g_432 : C2DA56D4 +...checksum after hashing g_606 : E58FAA5F +...checksum after hashing g_624 : B202ED48 +...checksum after hashing g_652 : C9875C1F +before stmt(63): checksum = C9875C1F +...checksum after hashing g_8 : 7DA58FB2 +...checksum after hashing g_22 : 5F29607E +...checksum after hashing g_64 : 16F74F8E +...checksum after hashing g_75 : F82D16C2 +...checksum after hashing g_91 : D1D62903 +...checksum after hashing g_105 : 22DB8D46 +...checksum after hashing g_179 : 727A7B9B +...checksum after hashing g_354 : 3F68D2B2 +...checksum after hashing g_385 : A22251DD +...checksum after hashing g_432 : C2DA56D4 +...checksum after hashing g_606 : E58FAA5F +...checksum after hashing g_624 : B202ED48 +...checksum after hashing g_652 : C9875C1F +before stmt(64): checksum = C9875C1F +...checksum after hashing g_8 : 7DA58FB2 +...checksum after hashing g_22 : 5F29607E +...checksum after hashing g_64 : AE4B28EB +...checksum after hashing g_75 : 3487165C +...checksum after hashing g_91 : 4A73656C +...checksum after hashing g_105 : 8CB31CD7 +...checksum after hashing g_179 : 171D40DD +...checksum after hashing g_354 : BE4DB795 +...checksum after hashing g_385 : A397ACC0 +...checksum after hashing g_432 : 3300537E +...checksum after hashing g_606 : 70FF7ECA +...checksum after hashing g_624 : 1D467F0F +...checksum after hashing g_652 : E3AF647D +before stmt(62): checksum = E3AF647D +...checksum after hashing g_8 : 7DA58FB2 +...checksum after hashing g_22 : 5F29607E +...checksum after hashing g_64 : AE4B28EB +...checksum after hashing g_75 : 3487165C +...checksum after hashing g_91 : 4A73656C +...checksum after hashing g_105 : 8CB31CD7 +...checksum after hashing g_179 : 171D40DD +...checksum after hashing g_354 : BE4DB795 +...checksum after hashing g_385 : A397ACC0 +...checksum after hashing g_432 : 3300537E +...checksum after hashing g_606 : 70FF7ECA +...checksum after hashing g_624 : 1D467F0F +...checksum after hashing g_652 : E3AF647D +before stmt(63): checksum = E3AF647D +...checksum after hashing g_8 : 7DA58FB2 +...checksum after hashing g_22 : 5F29607E +...checksum after hashing g_64 : AE4B28EB +...checksum after hashing g_75 : 3487165C +...checksum after hashing g_91 : 4A73656C +...checksum after hashing g_105 : 8CB31CD7 +...checksum after hashing g_179 : 171D40DD +...checksum after hashing g_354 : BE4DB795 +...checksum after hashing g_385 : A397ACC0 +...checksum after hashing g_432 : 3300537E +...checksum after hashing g_606 : 70FF7ECA +...checksum after hashing g_624 : 1D467F0F +...checksum after hashing g_652 : E3AF647D +before stmt(64): checksum = E3AF647D +...checksum after hashing g_8 : 7DA58FB2 +...checksum after hashing g_22 : 5F29607E +...checksum after hashing g_64 : BCFE8705 +...checksum after hashing g_75 : BA0811BF +...checksum after hashing g_91 : 3DEDB79C +...checksum after hashing g_105 : A57BA825 +...checksum after hashing g_179 : B8B40D17 +...checksum after hashing g_354 : E6531EBD +...checksum after hashing g_385 : A149ABE7 +...checksum after hashing g_432 : FA1F5BC1 +...checksum after hashing g_606 : 141F0534 +...checksum after hashing g_624 : 37FACF87 +...checksum after hashing g_652 : 9DD72CDB +before stmt(62): checksum = 9DD72CDB +...checksum after hashing g_8 : 7DA58FB2 +...checksum after hashing g_22 : 5F29607E +...checksum after hashing g_64 : BCFE8705 +...checksum after hashing g_75 : BA0811BF +...checksum after hashing g_91 : 3DEDB79C +...checksum after hashing g_105 : A57BA825 +...checksum after hashing g_179 : B8B40D17 +...checksum after hashing g_354 : E6531EBD +...checksum after hashing g_385 : A149ABE7 +...checksum after hashing g_432 : FA1F5BC1 +...checksum after hashing g_606 : 141F0534 +...checksum after hashing g_624 : 37FACF87 +...checksum after hashing g_652 : 9DD72CDB +before stmt(63): checksum = 9DD72CDB +...checksum after hashing g_8 : 7DA58FB2 +...checksum after hashing g_22 : 5F29607E +...checksum after hashing g_64 : BCFE8705 +...checksum after hashing g_75 : BA0811BF +...checksum after hashing g_91 : 3DEDB79C +...checksum after hashing g_105 : A57BA825 +...checksum after hashing g_179 : B8B40D17 +...checksum after hashing g_354 : E6531EBD +...checksum after hashing g_385 : A149ABE7 +...checksum after hashing g_432 : FA1F5BC1 +...checksum after hashing g_606 : 141F0534 +...checksum after hashing g_624 : 37FACF87 +...checksum after hashing g_652 : 9DD72CDB +before stmt(64): checksum = 9DD72CDB +...checksum after hashing g_8 : 7DA58FB2 +...checksum after hashing g_22 : 5F29607E +...checksum after hashing g_64 : 442E060 +...checksum after hashing g_75 : 76A21121 +...checksum after hashing g_91 : A648FBF3 +...checksum after hashing g_105 : B1339B4 +...checksum after hashing g_179 : DDD33651 +...checksum after hashing g_354 : 67767B9A +...checksum after hashing g_385 : A0FC56FA +...checksum after hashing g_432 : BC55E6B +...checksum after hashing g_606 : 816FD1A1 +...checksum after hashing g_624 : 98BE5DC0 +...checksum after hashing g_652 : B7FF14B9 +before stmt(62): checksum = B7FF14B9 +...checksum after hashing g_8 : 7DA58FB2 +...checksum after hashing g_22 : 5F29607E +...checksum after hashing g_64 : 442E060 +...checksum after hashing g_75 : 76A21121 +...checksum after hashing g_91 : A648FBF3 +...checksum after hashing g_105 : B1339B4 +...checksum after hashing g_179 : DDD33651 +...checksum after hashing g_354 : 67767B9A +...checksum after hashing g_385 : A0FC56FA +...checksum after hashing g_432 : BC55E6B +...checksum after hashing g_606 : 816FD1A1 +...checksum after hashing g_624 : 98BE5DC0 +...checksum after hashing g_652 : B7FF14B9 +before stmt(63): checksum = B7FF14B9 +...checksum after hashing g_8 : 7DA58FB2 +...checksum after hashing g_22 : 5F29607E +...checksum after hashing g_64 : 442E060 +...checksum after hashing g_75 : 76A21121 +...checksum after hashing g_91 : A648FBF3 +...checksum after hashing g_105 : B1339B4 +...checksum after hashing g_179 : DDD33651 +...checksum after hashing g_354 : 67767B9A +...checksum after hashing g_385 : A0FC56FA +...checksum after hashing g_432 : BC55E6B +...checksum after hashing g_606 : 816FD1A1 +...checksum after hashing g_624 : 98BE5DC0 +...checksum after hashing g_652 : B7FF14B9 +before stmt(64): checksum = B7FF14B9 +...checksum after hashing g_8 : 7DA58FB2 +...checksum after hashing g_22 : 5F29607E +...checksum after hashing g_64 : 9995D8D9 +...checksum after hashing g_75 : 7C671838 +...checksum after hashing g_91 : D2D0127C +...checksum after hashing g_105 : F6EAC1C1 +...checksum after hashing g_179 : 3C9790C2 +...checksum after hashing g_354 : 566E4CED +...checksum after hashing g_385 : A4F5A5A9 +...checksum after hashing g_432 : B3504CFE +...checksum after hashing g_606 : DDDFF2C8 +...checksum after hashing g_624 : 6283AE97 +...checksum after hashing g_652 : 6127BD97 +before stmt(67): checksum = 6127BD97 +...checksum after hashing g_8 : 7DA58FB2 +...checksum after hashing g_22 : 5F29607E +...checksum after hashing g_64 : 9995D8D9 +...checksum after hashing g_75 : 7C671838 +...checksum after hashing g_91 : D2D0127C +...checksum after hashing g_105 : F6EAC1C1 +...checksum after hashing g_179 : 3C9790C2 +...checksum after hashing g_354 : 566E4CED +...checksum after hashing g_385 : A4F5A5A9 +...checksum after hashing g_432 : B3504CFE +...checksum after hashing g_606 : DDDFF2C8 +...checksum after hashing g_624 : 6283AE97 +...checksum after hashing g_652 : 6127BD97 +before stmt(72): checksum = 6127BD97 +...checksum after hashing g_8 : 7DA58FB2 +...checksum after hashing g_22 : 5F29607E +...checksum after hashing g_64 : 9995D8D9 +...checksum after hashing g_75 : 7C671838 +...checksum after hashing g_91 : D2D0127C +...checksum after hashing g_105 : F6EAC1C1 +...checksum after hashing g_179 : 3C9790C2 +...checksum after hashing g_354 : 566E4CED +...checksum after hashing g_385 : A4F5A5A9 +...checksum after hashing g_432 : B3504CFE +...checksum after hashing g_606 : DDDFF2C8 +...checksum after hashing g_624 : 6283AE97 +...checksum after hashing g_652 : 6127BD97 +before stmt(145): checksum = 6127BD97 +...checksum after hashing g_8 : 7DA58FB2 +...checksum after hashing g_22 : 5F29607E +...checksum after hashing g_64 : 5DE1101D +...checksum after hashing g_75 : CDAE1CCA +...checksum after hashing g_91 : 5FE88B91 +...checksum after hashing g_105 : A4AB983D +...checksum after hashing g_179 : FF4D627E +...checksum after hashing g_354 : CE30A4EE +...checksum after hashing g_385 : CB5DE0F3 +...checksum after hashing g_432 : DA62A63B +...checksum after hashing g_606 : E1273407 +...checksum after hashing g_624 : 2A85AD07 +...checksum after hashing g_652 : F07C8C4E +before stmt(146): checksum = F07C8C4E +...checksum after hashing g_8 : 7DA58FB2 +...checksum after hashing g_22 : 5F29607E +...checksum after hashing g_64 : 5DE1101D +...checksum after hashing g_75 : CDAE1CCA +...checksum after hashing g_91 : 5FE88B91 +...checksum after hashing g_105 : A4AB983D +...checksum after hashing g_179 : FF4D627E +...checksum after hashing g_354 : CE30A4EE +...checksum after hashing g_385 : CB5DE0F3 +...checksum after hashing g_432 : DA62A63B +...checksum after hashing g_606 : E1273407 +...checksum after hashing g_624 : 2A85AD07 +...checksum after hashing g_652 : F07C8C4E +before stmt(147): checksum = F07C8C4E +...checksum after hashing g_8 : 7DA58FB2 +...checksum after hashing g_22 : 5F29607E +...checksum after hashing g_64 : 5DE1101D +...checksum after hashing g_75 : CDAE1CCA +...checksum after hashing g_91 : 5FE88B91 +...checksum after hashing g_105 : A4AB983D +...checksum after hashing g_179 : FF4D627E +...checksum after hashing g_354 : CE30A4EE +...checksum after hashing g_385 : CB5DE0F3 +...checksum after hashing g_432 : DA62A63B +...checksum after hashing g_606 : E1273407 +...checksum after hashing g_624 : 2A85AD07 +...checksum after hashing g_652 : F07C8C4E +before stmt(181): checksum = F07C8C4E +...checksum after hashing g_8 : 7DA58FB2 +...checksum after hashing g_22 : 5F29607E +...checksum after hashing g_64 : 5DE1101D +...checksum after hashing g_75 : CDAE1CCA +...checksum after hashing g_91 : 5FE88B91 +...checksum after hashing g_105 : A4AB983D +...checksum after hashing g_179 : FF4D627E +...checksum after hashing g_354 : CE30A4EE +...checksum after hashing g_385 : CB5DE0F3 +...checksum after hashing g_432 : DA62A63B +...checksum after hashing g_606 : E1273407 +...checksum after hashing g_624 : 2A85AD07 +...checksum after hashing g_652 : F07C8C4E +before stmt(163): checksum = F07C8C4E +...checksum after hashing g_8 : 7DA58FB2 +...checksum after hashing g_22 : 5F29607E +...checksum after hashing g_64 : 5DE1101D +...checksum after hashing g_75 : CDAE1CCA +...checksum after hashing g_91 : 5FE88B91 +...checksum after hashing g_105 : A4AB983D +...checksum after hashing g_179 : FF4D627E +...checksum after hashing g_354 : CE30A4EE +...checksum after hashing g_385 : CB5DE0F3 +...checksum after hashing g_432 : DA62A63B +...checksum after hashing g_606 : E1273407 +...checksum after hashing g_624 : 2A85AD07 +...checksum after hashing g_652 : F07C8C4E +before stmt(182): checksum = F07C8C4E +...checksum after hashing g_8 : 7DA58FB2 +...checksum after hashing g_22 : 5F29607E +...checksum after hashing g_64 : 5DE1101D +...checksum after hashing g_75 : CDAE1CCA +...checksum after hashing g_91 : 5FE88B91 +...checksum after hashing g_105 : A4AB983D +...checksum after hashing g_179 : FF4D627E +...checksum after hashing g_354 : CE30A4EE +...checksum after hashing g_385 : CB5DE0F3 +...checksum after hashing g_432 : DA62A63B +...checksum after hashing g_606 : E1273407 +...checksum after hashing g_624 : 2A85AD07 +...checksum after hashing g_652 : F07C8C4E +before stmt(183): checksum = F07C8C4E +...checksum after hashing g_8 : 7DA58FB2 +...checksum after hashing g_22 : 5F29607E +...checksum after hashing g_64 : 5DE1101D +...checksum after hashing g_75 : CDAE1CCA +...checksum after hashing g_91 : 5FE88B91 +...checksum after hashing g_105 : A4AB983D +...checksum after hashing g_179 : FF4D627E +...checksum after hashing g_354 : CE30A4EE +...checksum after hashing g_385 : CB5DE0F3 +...checksum after hashing g_432 : DA62A63B +...checksum after hashing g_606 : E1273407 +...checksum after hashing g_624 : 2A85AD07 +...checksum after hashing g_652 : F07C8C4E +before stmt(235): checksum = F07C8C4E +...checksum after hashing g_8 : 7DA58FB2 +...checksum after hashing g_22 : 5F29607E +...checksum after hashing g_64 : B54420E7 +...checksum after hashing g_75 : 7DBF2D7F +...checksum after hashing g_91 : C8552A02 +...checksum after hashing g_105 : ECE43732 +...checksum after hashing g_179 : 7AECF21D +...checksum after hashing g_354 : 307EBEF4 +...checksum after hashing g_385 : D1B7CC3E +...checksum after hashing g_432 : 36E1CD78 +...checksum after hashing g_606 : 951682CE +...checksum after hashing g_624 : 71263CBE +...checksum after hashing g_652 : 154438CF +before stmt(236): checksum = 154438CF +...checksum after hashing g_8 : 7DA58FB2 +...checksum after hashing g_22 : 5F29607E +...checksum after hashing g_64 : 5DE1101D +...checksum after hashing g_75 : CDAE1CCA +...checksum after hashing g_91 : 5FE88B91 +...checksum after hashing g_105 : A4AB983D +...checksum after hashing g_179 : FF4D627E +...checksum after hashing g_354 : CE30A4EE +...checksum after hashing g_385 : CB5DE0F3 +...checksum after hashing g_432 : DA62A63B +...checksum after hashing g_606 : E1273407 +...checksum after hashing g_624 : 2A85AD07 +...checksum after hashing g_652 : F07C8C4E +before stmt(276): checksum = F07C8C4E +...checksum after hashing g_8 : A79CEFA9 +...checksum after hashing g_22 : F864CDB0 +...checksum after hashing g_64 : 17B64018 +...checksum after hashing g_75 : F53FA155 +...checksum after hashing g_91 : 371514E5 +...checksum after hashing g_105 : 54C226A1 +...checksum after hashing g_179 : CE99CD8A +...checksum after hashing g_354 : A19A3F62 +...checksum after hashing g_385 : 147196CB +...checksum after hashing g_432 : 90DCC67C +...checksum after hashing g_606 : 437CB41B +...checksum after hashing g_624 : B0E818FB +...checksum after hashing g_652 : 3FD0761A +before stmt(240): checksum = 3FD0761A +...checksum after hashing g_8 : 6A52808F +...checksum after hashing g_22 : 8E1AF582 +...checksum after hashing g_64 : 6F36446B +...checksum after hashing g_75 : EEE167BE +...checksum after hashing g_91 : 36971953 +...checksum after hashing g_105 : 1AB16EEB +...checksum after hashing g_179 : D1CFEF09 +...checksum after hashing g_354 : 456431E +...checksum after hashing g_385 : A980D7FE +...checksum after hashing g_432 : 9E0636D5 +...checksum after hashing g_606 : 5AB491D6 +...checksum after hashing g_624 : 6D015FAD +...checksum after hashing g_652 : D3BD5BED +before stmt(487): checksum = D3BD5BED +...checksum after hashing g_8 : 6A52808F +...checksum after hashing g_22 : 8E1AF582 +...checksum after hashing g_64 : 6F36446B +...checksum after hashing g_75 : EEE167BE +...checksum after hashing g_91 : 291A51A7 +...checksum after hashing g_105 : 6E19D890 +...checksum after hashing g_179 : 9D94C9F2 +...checksum after hashing g_354 : 4FD461CE +...checksum after hashing g_385 : 5CA69E38 +...checksum after hashing g_432 : BC62B4F7 +...checksum after hashing g_606 : 66CFD6CA +...checksum after hashing g_624 : E1BFF075 +...checksum after hashing g_652 : 7C319CFB +before stmt(488): checksum = 7C319CFB +...checksum after hashing g_8 : 6A52808F +...checksum after hashing g_22 : 8E1AF582 +...checksum after hashing g_64 : 6F36446B +...checksum after hashing g_75 : EEE167BE +...checksum after hashing g_91 : 291A51A7 +...checksum after hashing g_105 : 6E19D890 +...checksum after hashing g_179 : 9D94C9F2 +...checksum after hashing g_354 : 4FD461CE +...checksum after hashing g_385 : 5CA69E38 +...checksum after hashing g_432 : BC62B4F7 +...checksum after hashing g_606 : 66CFD6CA +...checksum after hashing g_624 : E1BFF075 +...checksum after hashing g_652 : 7C319CFB +before stmt(489): checksum = 7C319CFB +...checksum after hashing g_8 : 6A52808F +...checksum after hashing g_22 : 8E1AF582 +...checksum after hashing g_64 : 6F36446B +...checksum after hashing g_75 : EEE167BE +...checksum after hashing g_91 : 291A51A7 +...checksum after hashing g_105 : 6E19D890 +...checksum after hashing g_179 : 9D94C9F2 +...checksum after hashing g_354 : 4FD461CE +...checksum after hashing g_385 : 5CA69E38 +...checksum after hashing g_432 : BC62B4F7 +...checksum after hashing g_606 : 66CFD6CA +...checksum after hashing g_624 : E1BFF075 +...checksum after hashing g_652 : 7C319CFB +before stmt(490): checksum = 7C319CFB +...checksum after hashing g_8 : 6A52808F +...checksum after hashing g_22 : 8E1AF582 +...checksum after hashing g_64 : 6F36446B +...checksum after hashing g_75 : EEE167BE +...checksum after hashing g_91 : 291A51A7 +...checksum after hashing g_105 : 6E19D890 +...checksum after hashing g_179 : 9D94C9F2 +...checksum after hashing g_354 : 4FD461CE +...checksum after hashing g_385 : 5CA69E38 +...checksum after hashing g_432 : BC62B4F7 +...checksum after hashing g_606 : 66CFD6CA +...checksum after hashing g_624 : E1BFF075 +...checksum after hashing g_652 : 7C319CFB +checksum = 7c319cfb diff --git a/src/tests/csmith/rand20.c b/src/tests/csmith/rand20.c new file mode 100644 index 0000000..d048953 --- /dev/null +++ b/src/tests/csmith/rand20.c @@ -0,0 +1,473 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static int g_2 = (-5L); +static int g_66 = 0x5B6062CFL; +static int *g_106 = &g_2; +static int **g_105 = &g_106; +static unsigned char func_1(void); +static int func_7(signed char p_8, int p_9, unsigned p_10); +static signed char func_11(unsigned p_12, unsigned p_13); +static unsigned func_14(int p_15, int p_16, short p_17); +static int * func_19(int * p_20, int * p_21, int * p_22, int * p_23); +static int * func_25(signed char p_26, unsigned char p_27, unsigned char p_28, unsigned short p_29, signed char p_30); +static short func_33(short p_34, int p_35, int * p_36, signed char p_37, int * p_38); +static unsigned short func_51(int * p_52, unsigned p_53, unsigned char p_54); +static int * func_55(int p_56); +static short func_59(int * p_60); +static unsigned char func_1(void) +{ + unsigned l_18 = 0UL; + int *l_167 = &g_2; + signed char l_305 = 7L; + short l_310 = 0x5A42L; + int *l_311 = &g_66; + step_hash(156); + for (g_2 = 10; (g_2 <= (-6)); g_2 -= 9) + { + unsigned short l_149 = 65527UL; + int l_298 = (-2L); + int *l_301 = &g_66; + int ***l_304 = (void*)0; + } + step_hash(157); + (*l_311) |= (((void*)0 == &g_106) <= ((unsigned short)((signed char)((void*)0 != &g_105) + (signed char)l_310) / (unsigned short)(*l_167))); + step_hash(158); + (*g_105) = (void*)0; + step_hash(159); + return (*l_167); +} +static int func_7(signed char p_8, int p_9, unsigned p_10) +{ + int l_170 = 0x5EEE56F2L; + int l_179 = 0L; + int *l_180 = &l_170; + step_hash(81); + g_66 ^= p_9; + step_hash(146); + if (((unsigned short)l_170 + (unsigned short)0x87EFL)) + { + int *l_171 = &l_170; + step_hash(83); + (*l_171) = (p_9 != 0x6EL); + step_hash(88); + for (l_170 = (-30); (l_170 != 26); ++l_170) + { + int *l_174 = &g_66; + step_hash(87); + (*l_174) ^= l_170; + } + } + else + { + int *l_175 = &g_66; + int *l_210 = &g_2; + int ***l_261 = &g_105; + unsigned short l_295 = 3UL; + step_hash(95); + if (p_9) + { + int l_178 = 0x3BCE19DEL; + step_hash(91); + l_180 = func_25(((int)l_178 + (int)(2L && (func_51(func_19(&l_170, &l_178, l_175, func_55((l_175 == (void*)0))), g_2, l_170) | 1L))), l_179, p_8, l_178, p_10); + step_hash(92); + return (*l_180); + } + else + { + int l_181 = (-8L); + step_hash(94); + (*l_175) ^= l_181; + } + step_hash(143); + if ((((unsigned char)0x5FL << (unsigned char)5) && ((*l_175) < 0xC3L))) + { + unsigned char l_184 = 1UL; + int **l_235 = &l_210; + step_hash(97); + (*l_175) = (((((g_2 || g_2) != l_184) == ((-8L) != ((unsigned short)(((1UL == g_2) != ((signed char)(((unsigned short)func_11((((unsigned)p_9 - (unsigned)(func_59((*g_105)) && l_184)) >= (*l_175)), g_2) * (unsigned short)g_2) || p_10) / (signed char)p_8)) && l_184) % (unsigned short)g_2))) <= (-1L)) ^ g_2); + step_hash(140); + if (((signed char)p_10 * (signed char)p_8)) + { + unsigned short l_199 = 3UL; + step_hash(103); + for (l_184 = 15; (l_184 <= 35); ++l_184) + { + int ***l_197 = (void*)0; + int ***l_198 = &g_105; + step_hash(102); + (*l_198) = &g_106; + } + step_hash(104); + (*g_105) = func_25((l_199 & p_8), ((+(-(int)((*l_175) || p_10))) < (*l_180)), ((g_2 >= 65534UL) > g_2), l_184, g_2); + step_hash(105); + l_175 = &l_170; + } + else + { + unsigned short l_201 = 0xF001L; + int *l_221 = (void*)0; + signed char l_294 = 0x85L; + step_hash(112); + if (l_201) + { + unsigned l_224 = 1UL; + step_hash(108); + (*l_180) = p_10; + step_hash(109); + (*l_175) = (((int)(((unsigned char)(((short)g_66 - (short)((unsigned short)func_51(l_210, ((signed char)((signed char)((unsigned)((short)((unsigned char)((*l_180) <= func_59(l_221)) << (unsigned char)1) << (short)2) + (unsigned)(g_66 || g_66)) + (signed char)g_2) * (signed char)((((signed char)(g_66 == 4L) >> (signed char)1) != (*l_180)) && 255UL)), l_224) >> (unsigned short)12)) | 0x6DC5B995L) + (unsigned char)g_66) > 0x240DL) + (int)l_184) >= 0x1803L); + } + else + { + unsigned char l_225 = 0UL; + short l_234 = 1L; + step_hash(111); + (*l_175) = (**l_235); + } + step_hash(139); + if (((*l_175) & ((((unsigned short)((signed char)(-4L) >> (signed char)((unsigned short)((signed char)((int)(-(unsigned)((~(((((unsigned char)(((*l_210) <= (0x5BE0L | ((short)((signed char)(65533UL && ((unsigned char)(((((unsigned)0UL - (unsigned)func_59((*g_105))) | ((signed char)func_59(func_19(l_210, (*g_105), l_221, &l_170)) - (signed char)1L)) <= p_10) == 1L) % (unsigned char)246UL)) + (signed char)0L) + (short)2UL))) ^ p_8) * (unsigned char)0x20L) < 0x85775876L) >= p_8) != (*l_180))) > 0xE881L)) - (int)0xD568A418L) % (signed char)g_2) % (unsigned short)(*l_175))) % (unsigned short)(**l_235)) && p_8) > p_9))) + { + int **l_262 = &g_106; + int l_269 = (-7L); + step_hash(114); + (*l_180) &= (-5L); + step_hash(121); + if ((((void*)0 == l_261) <= p_8)) + { + step_hash(116); + (*l_175) = (g_66 & func_59(&l_170)); + step_hash(117); + (*l_261) = l_262; + step_hash(118); + (*l_175) = p_10; + } + else + { + step_hash(120); + (*g_105) = (**l_261); + } + step_hash(128); + if (p_8) + { + short l_280 = (-1L); + step_hash(123); + (*l_180) &= p_8; + step_hash(124); + (*l_180) = ((unsigned short)((unsigned short)g_2 % (unsigned short)g_2) * (unsigned short)((((signed char)l_269 << (signed char)6) | ((short)p_8 >> (short)((!((short)((int)(+((int)((void*)0 != &g_106) % (int)p_8)) + (int)(p_10 == ((!((unsigned short)l_280 / (unsigned short)g_66)) ^ p_9))) >> (short)p_10)) == p_9))) <= 0x316CF6D4L)); + step_hash(125); + return l_280; + } + else + { + int *l_281 = &l_269; + step_hash(127); + l_281 = (*l_235); + } + step_hash(129); + (*l_180) = 0x73A35D59L; + } + else + { + unsigned short l_287 = 6UL; + int l_288 = 0L; + int **l_291 = &l_221; + step_hash(131); + (*l_175) = p_9; + step_hash(137); + if ((*l_180)) + { + int *l_286 = &l_170; + step_hash(133); + l_288 |= ((unsigned short)((((signed char)g_66 * (signed char)6UL) != func_59(func_19(l_286, func_19((*g_105), l_286, &l_170, func_19((*g_105), func_19(func_19((*l_235), func_19((*g_105), l_221, (*l_235), (*g_105)), (*l_235), l_286), l_221, &l_170, l_286), l_286, (*g_105))), (*l_235), (**l_261)))) == p_9) * (unsigned short)l_287); + step_hash(134); + (**l_261) = func_25(p_8, g_66, ((unsigned char)((&g_106 == l_291) && ((short)((**l_235) <= (0x8FL != (1UL <= p_9))) << (short)func_59((*g_105)))) >> (unsigned char)l_294), (**l_235), (*l_286)); + } + else + { + step_hash(136); + (*l_180) = ((l_295 == p_8) >= 4294967291UL); + } + step_hash(138); + return p_9; + } + } + } + else + { + step_hash(142); + return p_9; + } + step_hash(144); + (*l_180) = ((short)(*l_180) << (short)8); + step_hash(145); + (**l_261) = (*g_105); + } + step_hash(147); + return p_8; +} +static signed char func_11(unsigned p_12, unsigned p_13) +{ + int *l_150 = &g_66; + int l_151 = 0L; + unsigned l_154 = 0x209CDE0CL; + int **l_161 = &l_150; + int *l_162 = &l_151; + step_hash(76); + l_150 = (void*)0; + step_hash(77); + l_151 = 0xA18BD6C3L; + step_hash(78); + l_162 = func_55(((((unsigned char)(func_51((*g_105), ((l_151 != l_154) | ((short)((unsigned)((unsigned short)func_59(func_25(g_66, (l_161 != &l_150), g_2, g_66, p_13)) * (unsigned short)g_2) / (unsigned)p_12) + (short)p_13)), p_13) < 0xB808L) * (unsigned char)2L) && p_12) < 0UL)); + step_hash(79); + return p_13; +} +static unsigned func_14(int p_15, int p_16, short p_17) +{ + int *l_24 = (void*)0; + int l_45 = 0x6A3F1540L; + step_hash(73); + (*g_105) = func_19(l_24, &g_2, func_25(g_2, (((~(+0xB15E314AL)) ^ ((short)(func_33(((int)p_15 / (int)p_16), (((signed char)p_17 - (signed char)((signed char)3L * (signed char)(g_2 < p_17))) || l_45), &g_2, p_17, &l_45) & 1L) + (short)p_17)) < p_16), g_2, p_16, p_16), l_24); + step_hash(74); + return g_2; +} +static int * func_19(int * p_20, int * p_21, int * p_22, int * p_23) +{ + signed char l_147 = 0x10L; + int l_148 = (-2L); + step_hash(71); + l_148 = l_147; + step_hash(72); + return p_23; +} +static int * func_25(signed char p_26, unsigned char p_27, unsigned char p_28, unsigned short p_29, signed char p_30) +{ + int *l_141 = &g_66; + int *l_146 = &g_66; + step_hash(66); + (*l_141) = p_30; + step_hash(67); + (*l_141) = ((short)(*l_141) << (short)(func_51(l_141, func_51(l_141, g_66, (*l_141)), p_27) ^ (&l_141 == &l_141))); + step_hash(68); + (*l_146) = ((!(((((void*)0 != l_141) > ((short)g_66 * (short)((((*l_141) != func_59(l_141)) < func_59(l_146)) || 0xEAL))) != 0UL) == p_28)) & (-2L)); + step_hash(69); + return l_141; +} +static short func_33(short p_34, int p_35, int * p_36, signed char p_37, int * p_38) +{ + int *l_50 = (void*)0; + int *l_67 = &g_2; + unsigned short l_77 = 0x7135L; + unsigned short l_96 = 6UL; + int l_133 = 0x6E60FB7EL; + unsigned l_140 = 4294967295UL; + step_hash(61); + if (((short)((short)(g_2 ^ (l_50 != &p_35)) % (short)func_51(func_55(((short)func_59(l_50) >> (short)8)), ((l_67 != &p_35) < (((unsigned char)(((unsigned char)(*l_67) % (unsigned char)0xB0L) <= 0xE9L) << (unsigned char)0) | g_2)), g_2)) >> (short)p_34)) + { + int **l_72 = &l_50; + step_hash(15); + (*l_72) = func_55((*p_36)); + step_hash(16); + (*p_38) = (0xB1L ^ g_66); + } + else + { + int **l_73 = &l_67; + step_hash(18); + (*l_73) = &g_66; + step_hash(59); + if (((int)0x3965B818L + (int)0x61CAE467L)) + { + int *l_76 = &g_2; + int l_86 = 2L; + step_hash(55); + if (((*l_67) > (func_51(l_76, p_34, func_59(&g_2)) && 0L))) + { + step_hash(21); + l_77 ^= ((void*)0 != &l_50); + step_hash(22); + (*l_73) = &p_35; + } + else + { + int *l_92 = &g_2; + unsigned char l_130 = 250UL; + step_hash(37); + if ((1UL ^ g_2)) + { + signed char l_87 = 0x96L; + int *l_95 = &g_66; + step_hash(25); + (**l_73) = func_51(func_55((**l_73)), (g_2 || 0xBFBDL), g_2); + step_hash(32); + if (((unsigned char)(((unsigned short)((short)(((unsigned short)(l_86 > (((l_87 < (((unsigned char)p_35 * (unsigned char)func_51(&g_2, ((signed char)p_35 * (signed char)(l_67 != l_92)), ((short)(p_34 > (l_95 != &p_35)) + (short)0x2D05L))) ^ p_35)) != (*l_92)) >= 1L)) - (unsigned short)0x2D1EL) || g_66) << (short)p_35) + (unsigned short)4UL) < p_35) << (unsigned char)p_37)) + { + step_hash(27); + (*p_38) = (((*l_95) != (*l_92)) != (p_35 < g_66)); + step_hash(28); + (*l_73) = func_55(l_96); + } + else + { + step_hash(30); + g_66 = ((unsigned short)(func_51((*l_73), p_34, ((int)((unsigned short)func_59(l_92) * (unsigned short)((signed char)0xFFL + (signed char)0x51L)) - (int)(func_59(l_67) ^ (**l_73)))) & (**l_73)) % (unsigned short)0xDF38L); + step_hash(31); + (*g_105) = func_55(((void*)0 == g_105)); + } + step_hash(33); + (*p_38) = (*g_106); + } + else + { + step_hash(35); + (*p_38) = ((short)(p_35 < func_51((*l_73), g_2, p_37)) << (short)3); + step_hash(36); + (*p_38) &= (*l_76); + } + step_hash(54); + for (g_66 = 0; (g_66 <= (-15)); --g_66) + { + step_hash(47); + for (p_37 = 12; (p_37 <= 20); p_37 += 9) + { + int **l_113 = &l_67; + step_hash(44); + (*g_105) = &p_35; + step_hash(45); + (*p_38) &= (**g_105); + step_hash(46); + (**g_105) = ((l_113 == (void*)0) <= ((int)((unsigned short)(*l_92) / (unsigned short)((signed char)(-3L) + (signed char)(p_37 & (*l_76)))) / (int)((unsigned short)((signed char)(((void*)0 == l_92) & ((unsigned)6UL - (unsigned)2L)) - (signed char)0xC0L) * (unsigned short)(**l_73)))); + } + step_hash(48); + (*p_38) = (func_59((*g_105)) || ((((unsigned)((unsigned char)((void*)0 != &p_35) >> (unsigned char)(func_51((*g_105), p_35, g_2) != p_37)) - (unsigned)4294967293UL) ^ g_66) || g_66)); + step_hash(53); + if ((*l_76)) + { + step_hash(50); + return l_130; + } + else + { + step_hash(52); + return (**l_73); + } + } + } + } + else + { + step_hash(57); + (*g_105) = &p_35; + step_hash(58); + (*p_38) = ((short)((void*)0 == &g_106) >> (short)5); + } + step_hash(60); + (*l_73) = func_55((&g_106 == &g_106)); + } + step_hash(62); + l_133 |= (*l_67); + step_hash(63); + (*p_38) = ((unsigned char)(p_37 != ((((*g_105) != (*g_105)) > ((unsigned char)g_66 - (unsigned char)func_59((*g_105)))) >= (g_66 != ((unsigned short)(&l_50 != (void*)0) >> (unsigned short)l_140)))) / (unsigned char)p_37); + step_hash(64); + return g_2; +} +static unsigned short func_51(int * p_52, unsigned p_53, unsigned char p_54) +{ + step_hash(13); + return g_66; +} +static int * func_55(int p_56) +{ + int *l_65 = &g_66; + step_hash(10); + (*l_65) = (((unsigned)(g_2 | g_2) + (unsigned)0x2406C49AL) >= g_2); + step_hash(11); + return &g_2; +} +static short func_59(int * p_60) +{ + int *l_62 = &g_2; + int **l_61 = &l_62; + step_hash(7); + (*l_61) = (void*)0; + step_hash(8); + return g_2; +} +void csmith_compute_hash(void) +{ + transparent_crc(g_2, "g_2", print_hash_value); + transparent_crc(g_66, "g_66", print_hash_value); +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand20.expect b/src/tests/csmith/rand20.expect new file mode 100644 index 0000000..488ffff --- /dev/null +++ b/src/tests/csmith/rand20.expect @@ -0,0 +1,15 @@ +...checksum after hashing g_2 : 709D68A8 +...checksum after hashing g_66 : 878CF3C0 +before stmt(156): checksum = 878CF3C0 +...checksum after hashing g_2 : 4EF93F78 +...checksum after hashing g_66 : 8DBC164 +before stmt(157): checksum = 8DBC164 +...checksum after hashing g_2 : 4EF93F78 +...checksum after hashing g_66 : 8DBC164 +before stmt(158): checksum = 8DBC164 +...checksum after hashing g_2 : 4EF93F78 +...checksum after hashing g_66 : 8DBC164 +before stmt(159): checksum = 8DBC164 +...checksum after hashing g_2 : 4EF93F78 +...checksum after hashing g_66 : 8DBC164 +checksum = 8dbc164 diff --git a/src/tests/csmith/rand21.c b/src/tests/csmith/rand21.c new file mode 100644 index 0000000..0b1eb07 --- /dev/null +++ b/src/tests/csmith/rand21.c @@ -0,0 +1,382 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static int g_3 = 0x860B4FFBL; +static int **g_29 = (void*)0; +static int g_40 = 0xEC560449L; +static int g_45 = 0x8EF34EA8L; +static int *g_89 = &g_45; +static int **g_88 = &g_89; +static unsigned short g_93 = 0x79AAL; +static int g_208 = 0x9EA24B92L; +static unsigned g_275 = 1UL; +static int *g_330 = &g_3; +static signed char func_1(void); +static int * func_6(int ** p_7, int * p_8, unsigned p_9); +static int ** func_11(int ** p_12, int ** p_13, int ** p_14, short p_15); +static int ** func_16(int * p_17, int p_18, int ** p_19, signed char p_20, int * p_21); +static unsigned func_22(int ** p_23); +static int ** func_24(unsigned char p_25, int * p_26); +static int * func_32(int * p_33, int * p_34, unsigned p_35, unsigned char p_36, int ** p_37); +static int * func_38(int p_39); +static int ** func_46(unsigned char p_47, int ** p_48, int ** p_49, int ** p_50); +static unsigned short func_53(unsigned p_54, int ** p_55); +static signed char func_1(void) +{ + int *l_2 = &g_3; + int **l_4 = (void*)0; + int **l_5 = &l_2; + int l_27 = 1L; + unsigned l_319 = 0UL; + short l_320 = (-6L); + step_hash(1); + (*l_5) = l_2; + step_hash(5); + (*l_5) = func_6(&l_2, &g_3, (*l_2)); + step_hash(204); + (*l_5) = func_6(func_11(func_16(func_6(&l_2, func_6(&l_2, func_6(&l_2, &g_3, func_22(func_24(l_27, &g_3))), g_40), l_319), g_208, &l_2, l_320, (*l_5)), &g_89, &l_2, g_93), (*l_5), g_275); + step_hash(205); + (*l_5) = func_6(func_11(&l_2, &g_89, &g_89, g_275), g_330, g_40); + step_hash(206); + return (**l_5); +} +static int * func_6(int ** p_7, int * p_8, unsigned p_9) +{ + int *l_10 = &g_3; + step_hash(3); + (**p_7) = 0x2086BD08L; + step_hash(4); + return l_10; +} +static int ** func_11(int ** p_12, int ** p_13, int ** p_14, short p_15) +{ + int *l_328 = &g_208; + int **l_329 = &l_328; + step_hash(200); + (*g_88) = l_328; + step_hash(201); + g_45 ^= (*g_89); + step_hash(202); + (*l_328) &= ((l_329 != &l_328) >= p_15); + step_hash(203); + return &g_89; +} +static int ** func_16(int * p_17, int p_18, int ** p_19, signed char p_20, int * p_21) +{ + signed char l_323 = 0x46L; + int **l_327 = &g_89; + step_hash(190); + (**g_88) |= ((signed char)g_275 + (signed char)(-5L)); + step_hash(191); + (*p_21) = l_323; + step_hash(197); + for (g_40 = (-11); (g_40 >= 15); g_40 += 5) + { + short l_326 = 0x881BL; + step_hash(195); + (**g_88) &= (*p_17); + step_hash(196); + (**g_88) = (~l_326); + } + step_hash(198); + return l_327; +} +static unsigned func_22(int ** p_23) +{ + int *l_31 = &g_3; + int **l_30 = &l_31; + int l_244 = 1L; + int l_270 = 0x2A5BE70DL; + step_hash(127); + (*l_30) = func_6(l_30, (*l_30), (**l_30)); + step_hash(128); + (*g_89) = 0L; + step_hash(187); + for (l_244 = 0; (l_244 <= (-23)); l_244 -= 4) + { + int **l_250 = &g_89; + int **l_294 = &l_31; + int *l_313 = &g_208; + } + step_hash(188); + return (*l_31); +} +static int ** func_24(unsigned char p_25, int * p_26) +{ + int *l_28 = &g_3; + step_hash(7); + (*p_26) = ((l_28 != &g_3) != g_3); + step_hash(8); + return g_29; +} +static int * func_32(int * p_33, int * p_34, unsigned p_35, unsigned char p_36, int ** p_37) +{ + unsigned char l_152 = 247UL; + int ***l_160 = &g_29; + int *l_223 = &g_208; + unsigned l_229 = 6UL; + short l_230 = 0x560BL; + int l_240 = 0xCCFC83ECL; + step_hash(78); + (**g_88) = 6L; + step_hash(125); + if (((short)g_93 * (short)(~g_45))) + { + signed char l_161 = (-10L); + int *l_162 = &g_45; + int *l_242 = &g_208; + step_hash(120); + for (g_93 = 0; (g_93 >= 45); ++g_93) + { + int l_157 = (-9L); + int **l_171 = (void*)0; + signed char l_224 = 0L; + int l_241 = 1L; + step_hash(83); + l_162 = func_38(((signed char)((short)((*p_34) && (0xF94CC8AAL > ((**g_88) <= ((unsigned char)((unsigned short)g_93 / (unsigned short)((l_152 & ((short)(((unsigned)0x40699D30L + (unsigned)(l_157 ^ 0L)) >= ((short)(l_160 != (void*)0) + (short)(-7L))) * (short)p_35)) || (-4L))) % (unsigned char)l_161)))) + (short)0xA078L) << (signed char)7)); + step_hash(84); + (*p_34) = ((short)(((unsigned)p_36 % (unsigned)(((((unsigned short)(((func_53(((unsigned char)g_45 * (unsigned char)l_157), (*l_160)) && (((void*)0 != &g_29) < func_53(p_35, l_171))) > g_93) != 0x41L) >> (unsigned short)g_93) <= 1L) & g_93) || 0x92L)) | p_35) >> (short)11); + step_hash(85); + (*g_89) = (-(int)(*g_89)); + step_hash(119); + if (func_53((((1UL ^ ((*g_89) >= (p_35 <= ((unsigned short)(p_35 != p_35) << (unsigned short)((signed char)g_93 >> (signed char)2))))) == ((unsigned short)((((p_35 > (**g_88)) >= ((((unsigned short)((g_93 <= p_35) & (*l_162)) << (unsigned short)g_45) && (-6L)) < l_157)) >= g_45) && g_93) - (unsigned short)0x5D93L)) > (*l_162)), &g_89)) + { + unsigned l_183 = 0UL; + step_hash(94); + if ((*g_89)) + { + int l_198 = 0x073E8D0CL; + step_hash(88); + (*l_162) = (((unsigned short)(g_40 && l_183) + (unsigned short)g_40) == (((((unsigned short)((unsigned char)(*l_162) - (unsigned char)g_93) - (unsigned short)(((int)0x5F9BFDDAL - (int)(*l_162)) >= 6UL)) > g_40) > p_35) || p_35)); + step_hash(89); + (*g_88) = func_38(g_45); + step_hash(90); + (*p_34) = ((unsigned char)((signed char)((unsigned short)0xD123L >> (unsigned short)2) % (signed char)((unsigned short)l_198 << (unsigned short)((unsigned char)247UL - (unsigned char)(((unsigned short)(((((unsigned char)((*g_89) | (g_45 >= (~p_36))) >> (unsigned char)g_40) && (((unsigned)0xAD3C435FL + (unsigned)g_45) ^ g_93)) >= l_183) | 0x3FF94C2EL) - (unsigned short)0x7A49L) || (*g_89))))) >> (unsigned char)g_40); + } + else + { + int *l_207 = &g_208; + step_hash(92); + (*l_207) ^= (*p_34); + step_hash(93); + (*p_34) = ((short)(func_53(((void*)0 != (*g_88)), l_171) != (((signed char)g_93 * (signed char)p_35) == g_208)) >> (short)1); + } + step_hash(95); + (**g_88) = ((((unsigned char)((unsigned char)g_208 / (unsigned char)(*l_162)) - (unsigned char)g_45) <= ((((unsigned char)g_208 % (unsigned char)g_93) != l_183) == p_35)) < (g_208 == (l_171 == (void*)0))); + step_hash(96); + (*g_88) = (*g_88); + } + else + { + signed char l_226 = 0x13L; + step_hash(98); + l_223 = (*g_88); + step_hash(105); + if ((**g_88)) + { + step_hash(100); + if ((**g_88)) + break; + step_hash(101); + l_224 = func_53((*l_162), l_171); + } + else + { + step_hash(103); + (*g_88) = func_38((-(unsigned short)(0x19A3L == (-2L)))); + step_hash(104); + return p_33; + } + step_hash(117); + if ((*p_34)) + { + step_hash(107); + l_226 |= (*p_34); + step_hash(108); + (*l_223) |= 0xC5693882L; + } + else + { + step_hash(116); + for (l_226 = (-16); (l_226 >= 5); l_226 += 5) + { + step_hash(113); + if (l_229) + break; + step_hash(114); + l_230 = ((func_53(p_36, &g_89) >= (!g_93)) == g_208); + step_hash(115); + if ((*p_34)) + continue; + } + } + step_hash(118); + l_241 ^= (p_35 || (((*l_223) >= ((unsigned short)(((short)((p_36 >= 7UL) == (g_40 > ((**g_88) >= ((*p_34) || ((-(signed char)((((signed char)((unsigned)p_36 - (unsigned)((g_40 >= g_40) & p_35)) - (signed char)l_240) && 0x15239632L) || g_208)) == (**g_88)))))) << (short)8) | g_45) >> (unsigned short)0)) != (*l_162))); + } + } + step_hash(121); + (*l_242) ^= (*l_162); + step_hash(122); + (*l_242) &= (*g_89); + } + else + { + int *l_243 = &g_45; + step_hash(124); + return l_243; + } + step_hash(126); + return (*g_88); +} +static int * func_38(int p_39) +{ + int *l_43 = (void*)0; + int *l_44 = &g_45; + int **l_56 = (void*)0; + int ***l_138 = (void*)0; + int **l_139 = &l_43; + step_hash(11); + (*l_44) ^= (0x015B01D9L < ((short)g_40 << (short)0)); + step_hash(75); + l_139 = func_46(((short)p_39 % (short)func_53(p_39, l_56)), &l_44, g_29, &l_44); + step_hash(76); + return (*l_139); +} +static int ** func_46(unsigned char p_47, int ** p_48, int ** p_49, int ** p_50) +{ + int *l_132 = &g_45; + int l_137 = (-6L); + step_hash(73); + l_137 &= (((void*)0 != l_132) == (((unsigned char)p_47 + (unsigned char)(*l_132)) || ((*l_132) != g_93))); + step_hash(74); + return &g_89; +} +static unsigned short func_53(unsigned p_54, int ** p_55) +{ + int *l_58 = &g_45; + int **l_57 = &l_58; + int ***l_59 = (void*)0; + int ***l_60 = &l_57; + int l_77 = 1L; + int *l_130 = &l_77; + step_hash(13); + (*l_60) = l_57; + step_hash(63); + for (g_40 = (-26); (g_40 != 12); g_40++) + { + int *l_65 = &g_45; + int ***l_122 = &g_88; + step_hash(61); + for (g_45 = 0; (g_45 == 7); ++g_45) + { + int l_76 = 0xD28A2181L; + int *l_84 = &g_45; + step_hash(20); + (**l_60) = l_65; + } + step_hash(62); + if ((*l_65)) + break; + } + step_hash(70); + if ((l_130 == (*g_88))) + { + step_hash(65); + (**l_60) = (void*)0; + step_hash(66); + (*l_57) = (*l_57); + } + else + { + int *l_131 = (void*)0; + step_hash(68); + (*g_88) = (**l_60); + step_hash(69); + (*l_57) = l_131; + } + step_hash(71); + return g_40; +} +void csmith_compute_hash(void) +{ + transparent_crc(g_3, "g_3", print_hash_value); + transparent_crc(g_40, "g_40", print_hash_value); + transparent_crc(g_45, "g_45", print_hash_value); + transparent_crc(g_93, "g_93", print_hash_value); + transparent_crc(g_208, "g_208", print_hash_value); + transparent_crc(g_275, "g_275", print_hash_value); +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand21.expect b/src/tests/csmith/rand21.expect new file mode 100644 index 0000000..41507a6 --- /dev/null +++ b/src/tests/csmith/rand21.expect @@ -0,0 +1,266 @@ +...checksum after hashing g_3 : ECCA7B99 +...checksum after hashing g_40 : 85498CFE +...checksum after hashing g_45 : D4F152F6 +...checksum after hashing g_93 : 189E0036 +...checksum after hashing g_208 : E8AA6C85 +...checksum after hashing g_275 : F88BF21D +before stmt(1): checksum = F88BF21D +...checksum after hashing g_3 : ECCA7B99 +...checksum after hashing g_40 : 85498CFE +...checksum after hashing g_45 : D4F152F6 +...checksum after hashing g_93 : 189E0036 +...checksum after hashing g_208 : E8AA6C85 +...checksum after hashing g_275 : F88BF21D +before stmt(5): checksum = F88BF21D +...checksum after hashing g_3 : ECCA7B99 +...checksum after hashing g_40 : 85498CFE +...checksum after hashing g_45 : D4F152F6 +...checksum after hashing g_93 : 189E0036 +...checksum after hashing g_208 : E8AA6C85 +...checksum after hashing g_275 : F88BF21D +before stmt(3): checksum = F88BF21D +...checksum after hashing g_3 : 7FC185B5 +...checksum after hashing g_40 : 5A05D997 +...checksum after hashing g_45 : B208C968 +...checksum after hashing g_93 : D5E85F29 +...checksum after hashing g_208 : 1B8022BC +...checksum after hashing g_275 : 44738A72 +before stmt(4): checksum = 44738A72 +...checksum after hashing g_3 : 7FC185B5 +...checksum after hashing g_40 : 5A05D997 +...checksum after hashing g_45 : B208C968 +...checksum after hashing g_93 : D5E85F29 +...checksum after hashing g_208 : 1B8022BC +...checksum after hashing g_275 : 44738A72 +before stmt(204): checksum = 44738A72 +...checksum after hashing g_3 : 7FC185B5 +...checksum after hashing g_40 : 5A05D997 +...checksum after hashing g_45 : B208C968 +...checksum after hashing g_93 : D5E85F29 +...checksum after hashing g_208 : 1B8022BC +...checksum after hashing g_275 : 44738A72 +before stmt(7): checksum = 44738A72 +...checksum after hashing g_3 : 99F8B879 +...checksum after hashing g_40 : DC0341D +...checksum after hashing g_45 : D2543B98 +...checksum after hashing g_93 : BE729D30 +...checksum after hashing g_208 : F574A2C7 +...checksum after hashing g_275 : 2E1A5DA9 +before stmt(8): checksum = 2E1A5DA9 +...checksum after hashing g_3 : 99F8B879 +...checksum after hashing g_40 : DC0341D +...checksum after hashing g_45 : D2543B98 +...checksum after hashing g_93 : BE729D30 +...checksum after hashing g_208 : F574A2C7 +...checksum after hashing g_275 : 2E1A5DA9 +before stmt(127): checksum = 2E1A5DA9 +...checksum after hashing g_3 : 99F8B879 +...checksum after hashing g_40 : DC0341D +...checksum after hashing g_45 : D2543B98 +...checksum after hashing g_93 : BE729D30 +...checksum after hashing g_208 : F574A2C7 +...checksum after hashing g_275 : 2E1A5DA9 +before stmt(3): checksum = 2E1A5DA9 +...checksum after hashing g_3 : 7FC185B5 +...checksum after hashing g_40 : 5A05D997 +...checksum after hashing g_45 : B208C968 +...checksum after hashing g_93 : D5E85F29 +...checksum after hashing g_208 : 1B8022BC +...checksum after hashing g_275 : 44738A72 +before stmt(4): checksum = 44738A72 +...checksum after hashing g_3 : 7FC185B5 +...checksum after hashing g_40 : 5A05D997 +...checksum after hashing g_45 : B208C968 +...checksum after hashing g_93 : D5E85F29 +...checksum after hashing g_208 : 1B8022BC +...checksum after hashing g_275 : 44738A72 +before stmt(128): checksum = 44738A72 +...checksum after hashing g_3 : 7FC185B5 +...checksum after hashing g_40 : 5A05D997 +...checksum after hashing g_45 : 75424411 +...checksum after hashing g_93 : 25A4C870 +...checksum after hashing g_208 : B4A83EF4 +...checksum after hashing g_275 : 14DBB067 +before stmt(187): checksum = 14DBB067 +...checksum after hashing g_3 : 7FC185B5 +...checksum after hashing g_40 : 5A05D997 +...checksum after hashing g_45 : 75424411 +...checksum after hashing g_93 : 25A4C870 +...checksum after hashing g_208 : B4A83EF4 +...checksum after hashing g_275 : 14DBB067 +before stmt(188): checksum = 14DBB067 +...checksum after hashing g_3 : 7FC185B5 +...checksum after hashing g_40 : 5A05D997 +...checksum after hashing g_45 : 75424411 +...checksum after hashing g_93 : 25A4C870 +...checksum after hashing g_208 : B4A83EF4 +...checksum after hashing g_275 : 14DBB067 +before stmt(3): checksum = 14DBB067 +...checksum after hashing g_3 : 7FC185B5 +...checksum after hashing g_40 : 5A05D997 +...checksum after hashing g_45 : 75424411 +...checksum after hashing g_93 : 25A4C870 +...checksum after hashing g_208 : B4A83EF4 +...checksum after hashing g_275 : 14DBB067 +before stmt(4): checksum = 14DBB067 +...checksum after hashing g_3 : 7FC185B5 +...checksum after hashing g_40 : 5A05D997 +...checksum after hashing g_45 : 75424411 +...checksum after hashing g_93 : 25A4C870 +...checksum after hashing g_208 : B4A83EF4 +...checksum after hashing g_275 : 14DBB067 +before stmt(3): checksum = 14DBB067 +...checksum after hashing g_3 : 7FC185B5 +...checksum after hashing g_40 : 5A05D997 +...checksum after hashing g_45 : 75424411 +...checksum after hashing g_93 : 25A4C870 +...checksum after hashing g_208 : B4A83EF4 +...checksum after hashing g_275 : 14DBB067 +before stmt(4): checksum = 14DBB067 +...checksum after hashing g_3 : 7FC185B5 +...checksum after hashing g_40 : 5A05D997 +...checksum after hashing g_45 : 75424411 +...checksum after hashing g_93 : 25A4C870 +...checksum after hashing g_208 : B4A83EF4 +...checksum after hashing g_275 : 14DBB067 +before stmt(3): checksum = 14DBB067 +...checksum after hashing g_3 : 7FC185B5 +...checksum after hashing g_40 : 5A05D997 +...checksum after hashing g_45 : 75424411 +...checksum after hashing g_93 : 25A4C870 +...checksum after hashing g_208 : B4A83EF4 +...checksum after hashing g_275 : 14DBB067 +before stmt(4): checksum = 14DBB067 +...checksum after hashing g_3 : 7FC185B5 +...checksum after hashing g_40 : 5A05D997 +...checksum after hashing g_45 : 75424411 +...checksum after hashing g_93 : 25A4C870 +...checksum after hashing g_208 : B4A83EF4 +...checksum after hashing g_275 : 14DBB067 +before stmt(190): checksum = 14DBB067 +...checksum after hashing g_3 : 7FC185B5 +...checksum after hashing g_40 : 5A05D997 +...checksum after hashing g_45 : B94CCB1C +...checksum after hashing g_93 : 31F6EF05 +...checksum after hashing g_208 : 471CD594 +...checksum after hashing g_275 : 2E57B03F +before stmt(191): checksum = 2E57B03F +...checksum after hashing g_3 : 9F3BD8FD +...checksum after hashing g_40 : 2E98FFE9 +...checksum after hashing g_45 : 9DEB6793 +...checksum after hashing g_93 : 89EB2393 +...checksum after hashing g_208 : 7D54536A +...checksum after hashing g_275 : 53FAAA26 +before stmt(197): checksum = 53FAAA26 +...checksum after hashing g_3 : 9F3BD8FD +...checksum after hashing g_40 : 3BD6D484 +...checksum after hashing g_45 : 6398672C +...checksum after hashing g_93 : 92ED8871 +...checksum after hashing g_208 : 8300632 +...checksum after hashing g_275 : 16CA4A20 +before stmt(198): checksum = 16CA4A20 +...checksum after hashing g_3 : 9F3BD8FD +...checksum after hashing g_40 : 3BD6D484 +...checksum after hashing g_45 : 6398672C +...checksum after hashing g_93 : 92ED8871 +...checksum after hashing g_208 : 8300632 +...checksum after hashing g_275 : 16CA4A20 +before stmt(200): checksum = 16CA4A20 +...checksum after hashing g_3 : 9F3BD8FD +...checksum after hashing g_40 : 3BD6D484 +...checksum after hashing g_45 : 6398672C +...checksum after hashing g_93 : 92ED8871 +...checksum after hashing g_208 : 8300632 +...checksum after hashing g_275 : 16CA4A20 +before stmt(201): checksum = 16CA4A20 +...checksum after hashing g_3 : 9F3BD8FD +...checksum after hashing g_40 : 3BD6D484 +...checksum after hashing g_45 : 83984C0A +...checksum after hashing g_93 : 83A633EA +...checksum after hashing g_208 : D247C75A +...checksum after hashing g_275 : 7E4DBD40 +before stmt(202): checksum = 7E4DBD40 +...checksum after hashing g_3 : 9F3BD8FD +...checksum after hashing g_40 : 3BD6D484 +...checksum after hashing g_45 : 83984C0A +...checksum after hashing g_93 : 83A633EA +...checksum after hashing g_208 : 3247EC7C +...checksum after hashing g_275 : 6F0606DB +before stmt(203): checksum = 6F0606DB +...checksum after hashing g_3 : 9F3BD8FD +...checksum after hashing g_40 : 3BD6D484 +...checksum after hashing g_45 : 83984C0A +...checksum after hashing g_93 : 83A633EA +...checksum after hashing g_208 : 3247EC7C +...checksum after hashing g_275 : 6F0606DB +before stmt(3): checksum = 6F0606DB +...checksum after hashing g_3 : 9F3BD8FD +...checksum after hashing g_40 : 3BD6D484 +...checksum after hashing g_45 : 83984C0A +...checksum after hashing g_93 : 83A633EA +...checksum after hashing g_208 : 6CC2B6D5 +...checksum after hashing g_275 : F469EBCF +before stmt(4): checksum = F469EBCF +...checksum after hashing g_3 : 9F3BD8FD +...checksum after hashing g_40 : 3BD6D484 +...checksum after hashing g_45 : 83984C0A +...checksum after hashing g_93 : 83A633EA +...checksum after hashing g_208 : 6CC2B6D5 +...checksum after hashing g_275 : F469EBCF +before stmt(205): checksum = F469EBCF +...checksum after hashing g_3 : 9F3BD8FD +...checksum after hashing g_40 : 3BD6D484 +...checksum after hashing g_45 : 83984C0A +...checksum after hashing g_93 : 83A633EA +...checksum after hashing g_208 : 6CC2B6D5 +...checksum after hashing g_275 : F469EBCF +before stmt(200): checksum = F469EBCF +...checksum after hashing g_3 : 9F3BD8FD +...checksum after hashing g_40 : 3BD6D484 +...checksum after hashing g_45 : 83984C0A +...checksum after hashing g_93 : 83A633EA +...checksum after hashing g_208 : 6CC2B6D5 +...checksum after hashing g_275 : F469EBCF +before stmt(201): checksum = F469EBCF +...checksum after hashing g_3 : 9F3BD8FD +...checksum after hashing g_40 : 3BD6D484 +...checksum after hashing g_45 : DD1D16A3 +...checksum after hashing g_93 : 18C9DEFE +...checksum after hashing g_208 : 973B084A +...checksum after hashing g_275 : 319BB847 +before stmt(202): checksum = 319BB847 +...checksum after hashing g_3 : 9F3BD8FD +...checksum after hashing g_40 : 3BD6D484 +...checksum after hashing g_45 : DD1D16A3 +...checksum after hashing g_93 : 18C9DEFE +...checksum after hashing g_208 : C9BE52E3 +...checksum after hashing g_275 : AAF45553 +before stmt(203): checksum = AAF45553 +...checksum after hashing g_3 : 9F3BD8FD +...checksum after hashing g_40 : 3BD6D484 +...checksum after hashing g_45 : DD1D16A3 +...checksum after hashing g_93 : 18C9DEFE +...checksum after hashing g_208 : C9BE52E3 +...checksum after hashing g_275 : AAF45553 +before stmt(3): checksum = AAF45553 +...checksum after hashing g_3 : 9F3BD8FD +...checksum after hashing g_40 : 3BD6D484 +...checksum after hashing g_45 : DD1D16A3 +...checksum after hashing g_93 : 18C9DEFE +...checksum after hashing g_208 : 973B084A +...checksum after hashing g_275 : 319BB847 +before stmt(4): checksum = 319BB847 +...checksum after hashing g_3 : 9F3BD8FD +...checksum after hashing g_40 : 3BD6D484 +...checksum after hashing g_45 : DD1D16A3 +...checksum after hashing g_93 : 18C9DEFE +...checksum after hashing g_208 : 973B084A +...checksum after hashing g_275 : 319BB847 +before stmt(206): checksum = 319BB847 +...checksum after hashing g_3 : 9F3BD8FD +...checksum after hashing g_40 : 3BD6D484 +...checksum after hashing g_45 : DD1D16A3 +...checksum after hashing g_93 : 18C9DEFE +...checksum after hashing g_208 : 973B084A +...checksum after hashing g_275 : 319BB847 +checksum = 319bb847 diff --git a/src/tests/csmith/rand22.c b/src/tests/csmith/rand22.c new file mode 100644 index 0000000..3998af2 --- /dev/null +++ b/src/tests/csmith/rand22.c @@ -0,0 +1,88 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static unsigned short g_2 = 0xB55BL; +static unsigned char func_1(void); +static unsigned char func_1(void) +{ + step_hash(1); + return g_2; +} +void csmith_compute_hash(void) +{ + transparent_crc(g_2, "g_2", print_hash_value); +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand22.expect b/src/tests/csmith/rand22.expect new file mode 100644 index 0000000..eb3472c --- /dev/null +++ b/src/tests/csmith/rand22.expect @@ -0,0 +1,4 @@ +...checksum after hashing g_2 : FEDD6B44 +before stmt(1): checksum = FEDD6B44 +...checksum after hashing g_2 : FEDD6B44 +checksum = fedd6b44 diff --git a/src/tests/csmith/rand23.c b/src/tests/csmith/rand23.c new file mode 100644 index 0000000..807a3fe --- /dev/null +++ b/src/tests/csmith/rand23.c @@ -0,0 +1,323 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static int g_3 = 0xC213532FL; +static int g_14 = 0x652D0DA0L; +static int g_23 = (-1L); +static int *g_31 = &g_23; +static int **g_30 = &g_31; +static int g_114 = 1L; +static int g_144 = 0xA3224D42L; +static unsigned char func_1(void); +static short func_6(int p_7); +static unsigned short func_19(unsigned p_20, unsigned p_21, int ** p_22); +static int func_24(int ** p_25, unsigned short p_26, int ** p_27, unsigned p_28, int p_29); +static unsigned short func_32(int p_33, short p_34); +static int func_35(int ** p_36); +static int * func_38(int * p_39, int p_40, unsigned p_41, int ** p_42, int * p_43); +static int func_44(int p_45, unsigned p_46, short p_47, int * p_48); +static int func_50(unsigned short p_51, int p_52, signed char p_53, unsigned p_54, unsigned p_55); +static int func_57(int p_58, unsigned short p_59, unsigned short p_60); +static unsigned char func_1(void) +{ + int *l_2 = &g_3; + step_hash(1); + (*l_2) &= (-1L); + step_hash(2); + (*l_2) = 0L; + step_hash(94); + (*l_2) = (g_3 && ((short)((func_6(g_3) > func_19(g_23, g_23, &l_2)) < g_144) + (short)((unsigned short)(g_30 != g_30) * (unsigned short)g_144))); + step_hash(95); + return (*l_2); +} +static short func_6(int p_7) +{ + step_hash(17); + for (p_7 = 0; (p_7 > 7); p_7 += 1) + { + step_hash(11); + for (g_3 = 0; (g_3 > 4); g_3++) + { + int *l_12 = (void*)0; + int *l_13 = &g_14; + step_hash(10); + (*l_13) &= g_3; + } + step_hash(16); + for (g_14 = 0; (g_14 <= 23); g_14 += 8) + { + int *l_18 = &g_3; + int **l_17 = &l_18; + step_hash(15); + l_17 = l_17; + } + } + step_hash(18); + return g_3; +} +static unsigned short func_19(unsigned p_20, unsigned p_21, int ** p_22) +{ + int **l_37 = &g_31; + unsigned l_145 = 4294967288UL; + int *l_154 = &g_114; + step_hash(91); + (*l_154) = func_24(g_30, func_32(func_35(l_37), p_20), g_30, ((signed char)(!(func_32(g_144, g_144) > g_144)) - (signed char)g_144), l_145); + step_hash(92); + (*l_37) = (*g_30); + step_hash(93); + return (*l_154); +} +static int func_24(int ** p_25, unsigned short p_26, int ** p_27, unsigned p_28, int p_29) +{ + unsigned l_146 = 4294967287UL; + int *l_147 = (void*)0; + int *l_148 = (void*)0; + int *l_149 = &g_23; + step_hash(88); + (*l_149) = (l_146 | p_28); + step_hash(89); + (*l_149) = ((signed char)((short)0x2614L / (short)0x9486L) >> (signed char)((*p_27) == l_149)); + step_hash(90); + return p_29; +} +static unsigned short func_32(int p_33, short p_34) +{ + unsigned l_141 = 3UL; + step_hash(85); + l_141 &= p_34; + step_hash(86); + return l_141; +} +static int func_35(int ** p_36) +{ + unsigned char l_49 = 0xC9L; + int *l_134 = &g_114; + unsigned char l_139 = 2UL; + int *l_140 = &g_114; + step_hash(79); + (*g_30) = func_38((*g_30), func_44(l_49, g_23, l_49, (*g_30)), (l_49 ^ (-1L)), &g_31, (*g_30)); + step_hash(80); + l_134 = func_38(l_134, (*l_134), ((unsigned short)(((signed char)(*l_134) * (signed char)g_23) | ((0UL >= (&g_31 != p_36)) < ((&l_134 == (void*)0) < g_114))) << (unsigned short)(*l_134)), &g_31, (*p_36)); + step_hash(81); + (*p_36) = (*p_36); + step_hash(82); + (*l_140) |= l_49; + step_hash(83); + return (*l_140); +} +static int * func_38(int * p_39, int p_40, unsigned p_41, int ** p_42, int * p_43) +{ + int l_128 = 0x0A102B46L; + int **l_130 = &g_31; + step_hash(77); + for (g_23 = (-30); (g_23 >= 11); g_23 += 1) + { + step_hash(70); + (*g_30) = (*p_42); + step_hash(76); + if ((*p_39)) + { + int **l_129 = &g_31; + int *l_131 = (void*)0; + int *l_132 = &g_114; + step_hash(72); + (*l_132) |= (l_128 == (l_129 != l_130)); + } + else + { + int l_133 = 0x91863936L; + step_hash(74); + l_133 |= (g_23 < g_114); + step_hash(75); + (*p_42) = (void*)0; + } + } + step_hash(78); + return (*p_42); +} +static int func_44(int p_45, unsigned p_46, short p_47, int * p_48) +{ + unsigned l_56 = 0xF3352FB2L; + unsigned l_67 = 0x199F2DC8L; + unsigned short l_72 = 0x92A4L; + unsigned char l_88 = 0xD9L; + int l_104 = (-7L); + unsigned char l_112 = 252UL; + step_hash(22); + (**g_30) = (*p_48); + step_hash(38); + if (func_50(l_56, func_57(((unsigned char)0xD7L << (unsigned char)0), ((unsigned char)((unsigned short)l_67 * (unsigned short)((unsigned)((int)l_72 % (int)l_56) % (unsigned)(*p_48))) >> (unsigned char)(0L <= l_56)), p_46), l_67, p_47, g_23)) + { + step_hash(30); + return (*p_48); + } + else + { + unsigned short l_89 = 0x0D0CL; + step_hash(32); + (*p_48) = 0x387DD7D5L; + step_hash(37); + for (l_72 = 0; (l_72 <= 10); ++l_72) + { + int l_90 = 0x59E6156CL; + step_hash(36); + (*p_48) = func_57(((unsigned short)((unsigned short)(l_72 != g_23) / (unsigned short)(+((unsigned char)((g_23 | ((func_57((*p_48), ((!((((((0xC961L <= 0xDA97L) == func_57(((signed char)p_46 - (signed char)(func_57(((signed char)(0x9C23L != (((*g_30) == (void*)0) > 0x26L)) - (signed char)l_88), g_23, l_89) >= (-1L))), l_56, p_47)) <= p_47) > p_46) || 0UL) == 0xDFC4L)) || g_23), l_88) && l_89) && l_89)) == l_88) >> (unsigned char)p_45))) * (unsigned short)g_23), l_90, l_90); + } + } + step_hash(64); + if (((*p_48) < (((short)g_23 - (short)((((unsigned char)(((-(unsigned)((g_23 == (l_67 != func_50(p_45, ((signed char)l_72 / (signed char)((unsigned short)((!func_50(l_72, ((unsigned char)(l_88 || 0x5EFFL) - (unsigned char)l_104), p_46, l_72, p_47)) == 0x10CAL) << (unsigned short)8)), p_46, g_23, l_67))) && g_23)) <= g_23) != (*g_31)) << (unsigned char)4) && g_23) || g_23)) || 0UL))) + { + unsigned l_119 = 0x64957343L; + step_hash(53); + if ((*g_31)) + { + int *l_106 = (void*)0; + int **l_105 = &l_106; + step_hash(41); + (*l_105) = (*g_30); + step_hash(42); + l_104 |= (-(short)g_23); + } + else + { + int *l_108 = (void*)0; + step_hash(44); + (**g_30) = (g_23 <= ((p_48 == l_108) | 0xD1L)); + step_hash(45); + (*p_48) = (l_108 == (void*)0); + step_hash(52); + for (l_72 = (-27); (l_72 == 59); l_72 += 9) + { + int **l_111 = &l_108; + int *l_113 = &g_114; + step_hash(49); + (*l_111) = (void*)0; + step_hash(50); + (*l_113) ^= func_50(l_112, (*p_48), p_46, g_23, l_104); + step_hash(51); + (*p_48) = ((unsigned char)0x05L >> (unsigned char)((!(-5L)) == ((unsigned char)func_57((**g_30), l_119, ((int)(*g_31) - (int)p_45)) - (unsigned char)func_50(g_114, (*p_48), g_23, l_72, l_67)))); + } + } + step_hash(54); + (*g_31) = (*p_48); + } + else + { + step_hash(56); + p_48 = (void*)0; + step_hash(63); + for (l_72 = 13; (l_72 < 16); l_72++) + { + int *l_124 = &g_23; + int **l_125 = &l_124; + step_hash(60); + if ((**g_30)) + break; + step_hash(61); + l_124 = p_48; + step_hash(62); + (*l_125) = (*g_30); + } + } + step_hash(65); + return l_88; +} +static int func_50(unsigned short p_51, int p_52, signed char p_53, unsigned p_54, unsigned p_55) +{ + int *l_75 = &g_23; + step_hash(27); + l_75 = (*g_30); + step_hash(28); + return p_55; +} +static int func_57(int p_58, unsigned short p_59, unsigned short p_60) +{ + int *l_74 = (void*)0; + int **l_73 = &l_74; + step_hash(24); + (*l_73) = (*g_30); + step_hash(25); + return (**l_73); +} +void csmith_compute_hash(void) +{ + transparent_crc(g_3, "g_3", print_hash_value); + transparent_crc(g_14, "g_14", print_hash_value); + transparent_crc(g_23, "g_23", print_hash_value); + transparent_crc(g_114, "g_114", print_hash_value); + transparent_crc(g_144, "g_144", print_hash_value); +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand23.expect b/src/tests/csmith/rand23.expect new file mode 100644 index 0000000..18d6d25 --- /dev/null +++ b/src/tests/csmith/rand23.expect @@ -0,0 +1,30 @@ +...checksum after hashing g_3 : A36A1293 +...checksum after hashing g_14 : 199FD259 +...checksum after hashing g_23 : 5545609C +...checksum after hashing g_114 : B0B6337E +...checksum after hashing g_144 : 5445D39F +before stmt(1): checksum = 5445D39F +...checksum after hashing g_3 : A36A1293 +...checksum after hashing g_14 : 199FD259 +...checksum after hashing g_23 : 5545609C +...checksum after hashing g_114 : B0B6337E +...checksum after hashing g_144 : 5445D39F +before stmt(2): checksum = 5445D39F +...checksum after hashing g_3 : 2144DF1C +...checksum after hashing g_14 : 3D639A07 +...checksum after hashing g_23 : 84148E15 +...checksum after hashing g_114 : D1EFB932 +...checksum after hashing g_144 : 38E91D9F +before stmt(94): checksum = 38E91D9F +...checksum after hashing g_3 : 2144DF1C +...checksum after hashing g_14 : 3D639A07 +...checksum after hashing g_23 : 84148E15 +...checksum after hashing g_114 : D1EFB932 +...checksum after hashing g_144 : 38E91D9F +before stmt(95): checksum = 38E91D9F +...checksum after hashing g_3 : 2144DF1C +...checksum after hashing g_14 : 3D639A07 +...checksum after hashing g_23 : 84148E15 +...checksum after hashing g_114 : D1EFB932 +...checksum after hashing g_144 : 38E91D9F +checksum = 38e91d9f diff --git a/src/tests/csmith/rand24.c b/src/tests/csmith/rand24.c new file mode 100644 index 0000000..3cbe665 --- /dev/null +++ b/src/tests/csmith/rand24.c @@ -0,0 +1,1195 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static signed char g_4 = 0x4FL; +static int g_22 = (-6L); +static int g_43 = (-1L); +static int *g_84 = &g_22; +static int **g_83 = &g_84; +static int g_105 = 0x228C8C4EL; +static int **g_111 = (void*)0; +static int **g_139 = &g_84; +static int g_210 = 1L; +static int g_308 = 1L; +static int *g_320 = &g_43; +static unsigned g_446 = 0x5E74854BL; +static int *g_462 = &g_22; +static int *g_506 = &g_105; +static short g_752 = 0x68D4L; +static int ***g_879 = &g_111; +static short g_936 = 6L; +static int *g_937 = &g_105; +static short g_1133 = (-9L); +static signed char g_1153 = 1L; +static int g_1160 = 9L; +static unsigned func_1(void); +static int func_5(short p_6, unsigned p_7, short p_8, unsigned p_9); +static short func_13(int p_14, signed char p_15, int p_16); +static short func_30(unsigned p_31); +static short func_47(int ** p_48, signed char p_49, int ** p_50, short p_51); +static int ** func_54(int ** p_55, int * p_56, unsigned char p_57, int p_58, int p_59); +static int ** func_60(int * p_61, int ** p_62, unsigned short p_63, int * p_64, unsigned short p_65); +static int * func_66(signed char p_67, int ** p_68, int ** p_69); +static unsigned char func_74(int ** p_75, unsigned char p_76, int *** p_77); +static int ** func_78(int ** p_79, short p_80, int *** p_81, unsigned p_82); +static unsigned func_1(void) +{ + unsigned short l_10 = 0x6E7FL; + int *l_1159 = &g_1160; + step_hash(654); + (*l_1159) ^= ((signed char)g_4 / (signed char)(g_4 ^ ((-1L) >= (func_5(l_10, ((short)func_13(g_4, g_4, g_4) << (short)((void*)0 == &g_139)), l_10, l_10) < 4294967295UL)))); + step_hash(655); + return g_43; +} +static int func_5(short p_6, unsigned p_7, short p_8, unsigned p_9) +{ + int *l_1158 = &g_22; + step_hash(652); + (*g_83) = l_1158; + step_hash(653); + return p_8; +} +static short func_13(int p_14, signed char p_15, int p_16) +{ + unsigned l_20 = 0x6AB2AEE5L; + int *l_21 = &g_22; + int **l_913 = (void*)0; + int l_931 = 9L; + int *l_950 = &g_210; + unsigned l_970 = 0x775A189CL; + int *l_1043 = &l_931; + int ***l_1049 = (void*)0; + step_hash(6); + for (p_14 = 14; (p_14 >= (-9)); p_14 -= 3) + { + unsigned char l_19 = 7UL; + step_hash(5); + return l_19; + } + step_hash(7); + (*l_21) ^= l_20; + step_hash(8); + (*l_21) = (*l_21); + step_hash(649); + if (((-(unsigned short)(((unsigned short)((short)((unsigned short)(l_21 == (void*)0) * (unsigned short)(func_30((p_14 >= p_16)) & (((((0x4BEE6A9DL != p_16) > g_752) >= (l_20 == g_4)) == p_15) >= 0L))) << (short)1) - (unsigned short)p_14) <= p_16)) >= p_15)) + { + int *l_838 = &g_22; + unsigned l_873 = 0x44F583B3L; + step_hash(517); + if (p_16) + { + int **l_848 = &l_838; + int *l_874 = &g_22; + signed char l_883 = 0L; + int *l_898 = &g_210; + step_hash(463); + for (l_20 = 0; (l_20 < 50); l_20++) + { + int l_837 = 0x260BA5A2L; + step_hash(460); + (*l_21) = l_837; + step_hash(461); + (*g_462) &= (g_308 > ((1L ^ g_4) >= g_446)); + step_hash(462); + (*g_83) = l_838; + } + step_hash(514); + if (((unsigned short)g_752 * (unsigned short)(&g_320 != (void*)0))) + { + int **l_845 = &g_320; + int *l_849 = &g_43; + step_hash(465); + (*l_849) ^= ((signed char)p_15 << (signed char)((((g_105 < (*g_462)) == ((signed char)((void*)0 == l_845) / (signed char)1L)) > 0x5305L) & ((unsigned short)(0L == (l_845 == l_848)) / (unsigned short)p_15))); + step_hash(466); + (*l_849) |= ((**l_848) ^ ((p_14 > 0x1EL) && (((int)p_15 % (int)p_16) & ((unsigned char)(!(*l_838)) << (unsigned char)2)))); + step_hash(467); + (*l_838) = p_16; + step_hash(491); + for (p_14 = 0; (p_14 < 10); p_14 += 1) + { + int l_864 = 0xB6BDF3CAL; + int **l_880 = &g_320; + short l_890 = 0L; + step_hash(471); + (*l_845) = (void*)0; + step_hash(478); + if (((~(p_14 < ((*l_21) ^ 0xE7A5L))) ^ (*l_21))) + { + unsigned l_865 = 4294967288UL; + step_hash(473); + p_16 = ((int)((signed char)(((signed char)((unsigned)(!(0xD6L == (l_864 & l_865))) / (unsigned)(**l_848)) - (signed char)(&g_462 == (void*)0)) > (**l_848)) / (signed char)p_15) - (int)0xDEC67F50L); + step_hash(474); + if (l_865) + continue; + step_hash(475); + if (p_15) + continue; + } + else + { + unsigned l_866 = 0x68482710L; + step_hash(477); + if (l_866) + break; + } + step_hash(489); + if (((int)((signed char)0x7DL << (signed char)0) + (int)(**l_848))) + { + unsigned short l_881 = 1UL; + int l_882 = 0x2E96267DL; + step_hash(480); + l_882 |= ((unsigned char)(&g_462 == (void*)0) - (unsigned char)((p_14 || (*l_21)) > (*l_838))); + step_hash(481); + if (p_15) + break; + step_hash(482); + (*g_139) = &p_14; + step_hash(483); + return g_43; + } + else + { + short l_897 = 0x19A3L; + step_hash(485); + (*l_849) ^= 0L; + step_hash(486); + p_16 ^= (l_883 && (&l_845 != &l_848)); + step_hash(487); + (*g_139) = l_838; + step_hash(488); + (*l_838) = (*g_84); + } + step_hash(490); + (**l_848) = p_16; + } + } + else + { + int *l_899 = &g_105; + int ***l_906 = &g_111; + step_hash(493); + l_899 = l_898; + step_hash(494); + (*l_848) = l_838; + step_hash(512); + for (l_20 = 15; (l_20 <= 30); l_20 += 1) + { + int **l_912 = &l_874; + step_hash(498); + if ((*l_899)) + break; + step_hash(499); + (*l_838) |= 0x1978A630L; + step_hash(506); + for (p_15 = 0; (p_15 <= (-13)); --p_15) + { + unsigned char l_907 = 0xB3L; + step_hash(503); + (*l_899) &= ((l_907 & (**l_848)) == g_446); + step_hash(504); + (*l_848) = &p_16; + step_hash(505); + (*g_462) &= (*l_838); + } + step_hash(511); + for (l_883 = 0; (l_883 <= 26); l_883 += 1) + { + int *l_926 = &g_105; + step_hash(510); + p_14 = ((short)((short)p_14 * (short)(((short)p_16 - (short)((*l_899) != (p_15 || ((p_14 ^ (((void*)0 == l_21) || (~((unsigned short)(p_15 | p_16) + (unsigned short)0x1ECBL)))) > (*l_21))))) < 0xE5L)) * (short)65535UL); + } + } + step_hash(513); + (*l_848) = (void*)0; + } + } + else + { + step_hash(516); + (*g_462) = ((+(0xE2L < (+p_14))) | ((*l_838) <= 1UL)); + } + step_hash(522); + for (p_15 = 0; (p_15 >= 3); p_15 += 7) + { + step_hash(521); + p_14 |= ((signed char)(p_15 | p_15) % (signed char)(~l_931)); + } + step_hash(523); + (*g_139) = l_838; + step_hash(524); + (*g_83) = g_937; + } + else + { + unsigned l_938 = 0xA6DF25F7L; + int ***l_940 = &g_83; + int *l_967 = &g_210; + signed char l_986 = 8L; + int l_1002 = 0x4DF677A3L; + unsigned l_1005 = 4294967295UL; + signed char l_1022 = 0x9AL; + unsigned l_1045 = 1UL; + int **l_1105 = &g_84; + int **l_1130 = &l_1043; + short l_1147 = (-1L); + step_hash(572); + if (l_938) + { + int **l_939 = &g_84; + int l_949 = 0L; + step_hash(527); + (*l_21) = p_16; + step_hash(557); + if (p_15) + { + int *l_943 = &g_105; + step_hash(533); + for (p_15 = 0; (p_15 >= (-13)); p_15--) + { + step_hash(532); + l_939 = (void*)0; + } + step_hash(534); + (*g_83) = l_943; + step_hash(547); + for (g_308 = 0; (g_308 >= 28); g_308 += 1) + { + int *l_948 = &l_931; + step_hash(538); + (**l_940) = &p_16; + step_hash(546); + for (p_15 = 0; (p_15 == (-19)); p_15 -= 1) + { + step_hash(542); + (*g_462) ^= p_16; + step_hash(543); + (*g_83) = l_948; + step_hash(544); + (*g_139) = &p_14; + step_hash(545); + (*g_139) = (void*)0; + } + } + } + else + { + short l_955 = 0x2641L; + step_hash(549); + (*l_21) = (~(*g_937)); + step_hash(550); + (*l_950) ^= p_14; + step_hash(551); + (*l_21) &= ((p_16 && (((signed char)g_105 * (signed char)0UL) ^ ((unsigned)((unsigned char)l_955 + (unsigned char)p_14) / (unsigned)((signed char)g_210 + (signed char)g_446)))) > p_15); + step_hash(556); + for (g_22 = 20; (g_22 > (-28)); g_22--) + { + int **l_966 = (void*)0; + step_hash(555); + l_966 = l_939; + } + } + step_hash(558); + (*l_21) ^= (*l_950); + step_hash(559); + (*g_83) = (void*)0; + } + else + { + int ***l_989 = &l_913; + step_hash(561); + (*g_139) = l_967; + step_hash(569); + if ((g_446 | ((-3L) ^ 0UL))) + { + int l_971 = 0x6445514DL; + int **l_974 = &g_84; + step_hash(563); + (*g_462) = ((l_971 || ((g_210 | l_971) == (*l_967))) ^ ((unsigned short)g_4 % (unsigned short)func_74(l_974, ((void*)0 != &p_16), &l_974))); + step_hash(564); + (*g_462) &= ((short)((unsigned short)p_15 >> (unsigned short)2) >> (short)13); + } + else + { + int l_981 = 7L; + unsigned char l_990 = 0UL; + int ***l_995 = &g_139; + step_hash(566); + (***l_940) ^= (((int)p_16 % (int)l_981) ^ ((int)((unsigned char)((g_105 & l_986) && ((0UL & p_16) | ((unsigned char)g_22 - (unsigned char)(l_989 != l_989)))) * (unsigned char)l_990) - (int)0x019B49C3L)); + step_hash(567); + (*g_937) = 0x8FE6FA11L; + step_hash(568); + (*g_937) = ((unsigned char)(p_16 != ((short)(g_4 && (&g_111 == (void*)0)) - (short)1L)) << (unsigned char)func_74((*l_989), g_210, l_995)); + } + step_hash(570); + (*g_83) = (*g_83); + step_hash(571); + (*l_21) = ((int)p_14 + (int)p_14); + } + step_hash(643); + for (l_938 = 0; (l_938 != 33); l_938 += 3) + { + unsigned short l_1037 = 65528UL; + int **l_1046 = &l_950; + short l_1091 = 1L; + } + step_hash(648); + for (p_14 = 0; (p_14 == 14); ++p_14) + { + unsigned short l_1157 = 3UL; + step_hash(647); + return l_1157; + } + } + step_hash(650); + return g_4; +} +static short func_30(unsigned p_31) +{ + unsigned l_44 = 0x19C2B2E5L; + int *l_203 = (void*)0; + int ***l_265 = &g_83; + int l_266 = (-1L); + int l_275 = 0xC5E8B852L; + signed char l_330 = 0xECL; + int **l_337 = &l_203; + int *l_366 = &l_266; + int **l_430 = &l_366; + int **l_532 = &g_320; + unsigned char l_637 = 0UL; + unsigned char l_686 = 1UL; + unsigned char l_696 = 255UL; + step_hash(239); + if (((int)g_4 + (int)((short)0x32E2L % (short)(g_4 || (p_31 & p_31))))) + { + step_hash(21); + for (g_22 = 0; (g_22 == 15); g_22 += 2) + { + int *l_41 = (void*)0; + int **l_40 = &l_41; + step_hash(19); + for (p_31 = (-9); (p_31 >= 18); p_31 += 8) + { + int ***l_42 = &l_40; + step_hash(17); + (*l_42) = l_40; + step_hash(18); + g_43 |= g_4; + } + step_hash(20); + l_44 = g_43; + } + step_hash(22); + return l_44; + } + else + { + unsigned l_53 = 0x359A7032L; + int *l_96 = &g_22; + int **l_95 = &l_96; + int ***l_94 = &l_95; + int l_231 = 0x082C358FL; + unsigned char l_234 = 0x84L; + unsigned l_245 = 1UL; + unsigned l_298 = 0xD62F63DBL; + unsigned short l_304 = 1UL; + step_hash(238); + for (g_22 = (-14); (g_22 >= 2); g_22 += 3) + { + int **l_52 = (void*)0; + short l_200 = 0x97FDL; + int *l_272 = (void*)0; + unsigned l_300 = 4294967295UL; + int *l_316 = (void*)0; + int *l_317 = &l_275; + unsigned l_331 = 0x68BDD198L; + } + } + step_hash(240); + (*l_366) &= ((signed char)(p_31 ^ p_31) - (signed char)((***l_265) != ((signed char)((unsigned char)(((***l_265) && (g_43 ^ ((unsigned char)p_31 / (unsigned char)(((unsigned short)p_31 >> (unsigned short)((short)((unsigned)(((unsigned short)(g_43 < g_105) + (unsigned short)p_31) > 0x2750865FL) % (unsigned)p_31) + (short)g_308)) | 0x2741L)))) < g_43) / (unsigned char)255UL) << (signed char)3))); + step_hash(336); + if (((unsigned short)(0x995FL | g_105) * (unsigned short)(((signed char)0x2FL - (signed char)g_210) != g_43))) + { + step_hash(242); + (*g_83) = (**l_265); + } + else + { + int *l_371 = &g_22; + short l_435 = 0x1B91L; + int ***l_449 = &g_139; + step_hash(275); + if (((*l_265) == (void*)0)) + { + int l_390 = 0x48FA1405L; + signed char l_391 = (-1L); + step_hash(245); + (**l_265) = (*g_139); + step_hash(246); + l_371 = func_66(g_4, &g_320, (*l_265)); + step_hash(247); + (*g_83) = (*g_83); + } + else + { + unsigned char l_404 = 250UL; + int **l_407 = &l_203; + int **l_423 = (void*)0; + int *l_454 = &l_266; + step_hash(267); + if (((*l_371) && (((*l_371) < (&g_320 == (void*)0)) != p_31))) + { + unsigned char l_406 = 5UL; + int l_414 = 1L; + int ***l_440 = &l_423; + step_hash(256); + for (l_266 = 0; (l_266 == 2); l_266++) + { + int l_405 = 1L; + step_hash(253); + (**l_265) = (*g_139); + } + step_hash(257); + (*g_320) = ((signed char)((p_31 > ((short)(&g_111 == &l_407) / (short)p_31)) >= g_105) + (signed char)p_31); + step_hash(258); + (*g_320) = (((65535UL & (~((unsigned)(~((unsigned char)((int)func_47(&g_320, p_31, l_430, g_308) * (int)(&l_414 == (void*)0)) * (unsigned char)(((*l_371) < (*l_371)) > p_31))) + (unsigned)3L))) & p_31) >= 1L); + step_hash(259); + l_414 = func_47(l_407, ((p_31 > ((0x96A58D8CL || ((short)func_47(&g_320, (((short)((*l_371) | p_31) + (short)((l_435 > g_43) != 0xC6L)) != p_31), &g_320, g_210) >> (short)g_308)) ^ 2UL)) < g_22), &l_371, g_308); + } + else + { + int **l_445 = &l_203; + step_hash(265); + for (l_266 = 0; (l_266 < 24); l_266++) + { + step_hash(264); + (**g_83) = ((unsigned char)((l_445 != (void*)0) > (1UL & g_446)) / (unsigned char)0x9CL); + } + step_hash(266); + (**g_83) = ((unsigned)0x95DDFB32L - (unsigned)((l_449 == (void*)0) < g_22)); + } + step_hash(268); + (**l_449) = (*l_430); + step_hash(273); + for (l_435 = 0; (l_435 <= (-22)); --l_435) + { + int *l_452 = (void*)0; + int *l_453 = &g_210; + step_hash(272); + (*l_453) ^= (*l_366); + } + step_hash(274); + (*l_454) |= (*g_320); + } + step_hash(334); + if ((p_31 | p_31)) + { + signed char l_457 = (-1L); + int l_479 = (-1L); + int l_490 = 0x6BD2E50EL; + short l_491 = 0x67CBL; + int **l_502 = &l_366; + step_hash(307); + for (l_275 = 0; (l_275 <= (-9)); --l_275) + { + unsigned l_458 = 4UL; + int **l_461 = &l_203; + short l_478 = 0x00F8L; + step_hash(280); + if (l_457) + break; + } + step_hash(308); + l_479 = ((int)((void*)0 == (*l_265)) % (int)4294967294UL); + step_hash(309); + (*g_462) ^= func_47(func_54(&g_84, (*l_337), p_31, ((short)((*l_449) != (*l_265)) >> (short)p_31), p_31), g_446, l_502, g_308); + } + else + { + int **l_505 = &l_371; + int l_550 = 0x114C46B2L; + step_hash(332); + if (((int)(l_505 == &g_462) - (int)(4L < (g_308 ^ 0UL)))) + { + signed char l_522 = 0x57L; + int l_525 = 7L; + int ***l_531 = &l_337; + step_hash(312); + g_506 = (*g_139); + step_hash(325); + for (g_43 = 0; (g_43 < 5); g_43 += 5) + { + int **l_509 = &g_84; + step_hash(324); + if (func_47(l_509, (~(-1L)), l_509, ((signed char)p_31 << (signed char)0))) + { + step_hash(317); + if (p_31) + break; + step_hash(318); + l_525 |= ((**l_505) <= (((unsigned)((unsigned)p_31 + (unsigned)((signed char)((unsigned char)((((signed char)p_31 >> (signed char)6) < p_31) | (-6L)) / (unsigned char)l_522) >> (signed char)0)) - (unsigned)0L) > ((signed char)p_31 << (signed char)1))); + } + else + { + int l_526 = (-1L); + step_hash(320); + (*g_462) = l_526; + step_hash(321); + if ((**l_505)) + break; + step_hash(322); + (*l_366) &= ((unsigned char)1UL / (unsigned char)(0x06F7L & ((+g_446) && ((&g_506 != (void*)0) || (+((*l_430) != (*l_337))))))); + step_hash(323); + (*l_337) = (*g_83); + } + } + step_hash(326); + (**l_430) = (((short)((g_43 || ((!p_31) < (0x2CL < g_105))) > g_22) + (short)1UL) | p_31); + step_hash(327); + (*l_337) = (**l_449); + } + else + { + short l_539 = 0L; + int **l_549 = &g_462; + step_hash(329); + l_550 &= ((signed char)((short)((short)l_539 - (short)((short)((-(short)((short)(1UL != ((0x85L >= ((unsigned char)((unsigned short)(**l_532) << (unsigned short)(*l_366)) - (unsigned char)g_446)) >= p_31)) >> (short)0)) == g_4) - (short)p_31)) >> (short)6) << (signed char)p_31); + step_hash(330); + (*g_506) |= (*g_462); + step_hash(331); + return p_31; + } + step_hash(333); + l_550 &= ((signed char)((signed char)((unsigned char)((signed char)(!(p_31 | ((p_31 && func_47((*l_265), p_31, &g_506, ((unsigned char)((unsigned char)((((signed char)0x0BL >> (signed char)6) == (((*g_83) == (*l_505)) | ((-(int)(((p_31 & 248UL) > 8UL) <= (**l_532))) >= (**l_505)))) & 0x01C2B71EL) * (unsigned char)0x14L) >> (unsigned char)g_308))) >= 6UL))) * (signed char)p_31) % (unsigned char)g_43) >> (signed char)g_22) << (signed char)g_446); + } + step_hash(335); + (*g_462) ^= ((int)((unsigned)0UL % (unsigned)((unsigned)(func_47(&g_320, ((g_105 > p_31) ^ (((short)p_31 >> (short)11) != ((*g_83) == (**l_449)))), (*l_265), g_210) > 0UL) % (unsigned)p_31)) % (int)g_446); + } + step_hash(453); + if (((&g_139 != (void*)0) <= (((short)((+(((0x7E00L >= ((&l_532 != (void*)0) | (((g_210 != p_31) <= g_446) || 0x908CFF1AL))) & 0x4AF7L) > 0xDEL)) || p_31) / (short)(**l_532)) <= g_308))) + { + int l_580 = 8L; + int **l_585 = &g_506; + short l_588 = 6L; + int l_638 = 8L; + int l_710 = 0xFC046B83L; + step_hash(338); + l_580 &= ((signed char)(!p_31) << (signed char)(((void*)0 == &g_462) > (!(**l_532)))); + step_hash(403); + if (((unsigned)l_580 % (unsigned)((short)func_47((*l_265), p_31, func_60((*l_337), l_585, ((((**l_532) ^ ((0xC2L || g_446) < (((g_210 == 246UL) <= g_105) ^ 0L))) >= p_31) ^ l_588), (*l_337), g_210), g_105) << (short)10))) + { + int l_589 = 0xE6702D9FL; + int l_590 = 9L; + int ***l_601 = (void*)0; + step_hash(340); + l_590 |= l_589; + step_hash(349); + for (g_308 = 21; (g_308 >= (-1)); g_308--) + { + step_hash(348); + for (g_210 = 0; (g_210 != (-8)); g_210 -= 1) + { + int ***l_602 = &l_337; + step_hash(347); + (*g_462) = ((~((short)(p_31 != p_31) >> (short)10)) > ((*g_462) ^ ((unsigned)(((((unsigned char)(p_31 || ((l_601 != l_602) == 0x2C0FL)) << (unsigned char)g_4) >= p_31) < 0x9D9F0F6EL) <= 0x68L) / (unsigned)p_31))); + } + } + step_hash(350); + return g_22; + } + else + { + unsigned l_609 = 0x2C7CA220L; + int **l_616 = &g_320; + step_hash(401); + if (((p_31 != ((signed char)(p_31 <= (((signed char)(g_43 && (3L || (p_31 < g_210))) - (signed char)l_609) == ((unsigned)((p_31 <= ((short)(((short)(g_105 | 0L) - (short)1L) ^ (**l_616)) % (short)p_31)) == g_105) - (unsigned)p_31))) * (signed char)0x61L)) != g_210)) + { + int ***l_630 = &l_585; + step_hash(373); + if (p_31) + { + int **l_636 = (void*)0; + step_hash(354); + (*g_320) = ((signed char)p_31 * (signed char)(0x29C4L & p_31)); + step_hash(361); + if ((**l_616)) + { + step_hash(356); + (*g_320) = (**l_616); + step_hash(357); + (*g_462) = (((((signed char)func_47((*l_265), g_308, l_616, (-(unsigned char)((unsigned short)((signed char)p_31 << (signed char)1) % (unsigned short)((signed char)(&l_430 != &g_83) + (signed char)(&l_616 != l_630))))) - (signed char)p_31) | 0x8C98L) || g_446) == p_31); + } + else + { + int *l_631 = &g_105; + step_hash(359); + (*l_532) = l_631; + step_hash(360); + (**l_532) ^= (g_446 || ((int)(+((void*)0 != (*l_630))) / (int)((short)g_308 << (short)((*l_265) == &g_320)))); + } + step_hash(368); + if (p_31) + { + step_hash(363); + (*l_616) = (*g_139); + } + else + { + int **l_647 = &g_462; + int l_648 = 0xF871930BL; + step_hash(365); + (**l_630) = (*g_139); + step_hash(366); + (**l_265) = (*l_585); + step_hash(367); + l_648 &= func_47(l_636, g_308, func_54((*l_265), (**l_630), ((unsigned short)((short)g_22 << (short)4) * (unsigned short)((signed char)p_31 + (signed char)((unsigned char)(((g_4 > 0x5092AF5EL) > (**l_647)) != p_31) << (unsigned char)g_308))), p_31, p_31), (**l_647)); + } + } + else + { + signed char l_649 = 0xF9L; + step_hash(370); + (*g_139) = (**l_630); + step_hash(371); + l_649 = (&g_320 != (void*)0); + step_hash(372); + (*l_337) = (*g_139); + } + step_hash(380); + for (l_44 = 0; (l_44 >= 55); ++l_44) + { + int *l_652 = &g_210; + step_hash(377); + (**l_630) = l_652; + step_hash(378); + (**l_585) = (-(unsigned char)p_31); + step_hash(379); + if ((***l_630)) + break; + } + } + else + { + unsigned short l_666 = 0x0190L; + int **l_695 = (void*)0; + step_hash(398); + for (l_266 = 0; (l_266 == (-6)); --l_266) + { + int l_697 = 0xA2A8F651L; + } + step_hash(399); + l_710 ^= ((4294967295UL && ((unsigned char)(p_31 ^ p_31) + (unsigned char)((unsigned short)((unsigned short)((signed char)p_31 << (signed char)5) >> (unsigned short)(((signed char)((-10L) != l_588) / (signed char)((signed char)g_446 >> (signed char)2)) | ((((*g_139) == (void*)0) != 0x8E0AA272L) == 0x8364L))) - (unsigned short)g_43))) || g_308); + step_hash(400); + (*g_320) = (p_31 | ((void*)0 != l_585)); + } + step_hash(402); + return g_43; + } + } + else + { + int *l_711 = &g_22; + int ***l_718 = &g_111; + unsigned l_719 = 0x8713BA92L; + int l_800 = 0L; + step_hash(405); + (*l_430) = l_711; + step_hash(406); + (*g_139) = (*g_83); + step_hash(407); + (*g_462) |= ((!((unsigned short)((unsigned short)p_31 * (unsigned short)g_210) * (unsigned short)((+(((unsigned short)((&g_111 == l_718) != ((void*)0 != &g_83)) + (unsigned short)0x3BBEL) > (-5L))) != p_31))) ^ l_719); + step_hash(452); + for (g_210 = 0; (g_210 > (-13)); g_210 -= 7) + { + int l_749 = 1L; + int *l_765 = &l_275; + short l_818 = 0x2A4EL; + int ***l_833 = &g_139; + step_hash(451); + for (l_637 = 0; (l_637 < 24); l_637 += 5) + { + unsigned l_750 = 0x383A0A6AL; + int ***l_751 = &l_532; + unsigned l_753 = 2UL; + unsigned short l_762 = 4UL; + step_hash(448); + if (((signed char)((signed char)((unsigned)((unsigned short)((unsigned short)p_31 * (unsigned short)((*l_265) != (*l_265))) << (unsigned short)1) - (unsigned)((unsigned short)0xF0DAL + (unsigned short)0x965DL)) * (signed char)0x09L) << (signed char)0)) + { + int **l_748 = (void*)0; + int *l_756 = &g_22; + step_hash(423); + if (((int)((short)(((int)0L - (int)((g_308 != (247UL & ((((signed char)p_31 + (signed char)p_31) == p_31) >= p_31))) >= 1L)) != g_752) / (short)9L) + (int)l_753)) + { + int l_759 = 0x362D7EC4L; + step_hash(416); + (*l_337) = (*g_139); + step_hash(417); + (*g_83) = (*g_139); + step_hash(418); + (**l_532) = (*l_366); + } + else + { + unsigned l_766 = 4UL; + step_hash(420); + (*g_139) = (*g_139); + step_hash(421); + (*l_756) = (*g_320); + step_hash(422); + (*g_320) ^= (7UL != (+(((signed char)g_210 + (signed char)(0xAC429852L > p_31)) ^ p_31))); + } + step_hash(424); + (*g_83) = (void*)0; + } + else + { + short l_780 = (-2L); + int **l_801 = &g_320; + int l_816 = 1L; + unsigned char l_834 = 0xFBL; + step_hash(431); + if (p_31) + { + int ***l_779 = &g_111; + step_hash(427); + (*g_320) = ((unsigned short)p_31 + (unsigned short)(((((*g_462) | (**l_430)) != (g_308 < ((*l_711) > p_31))) && l_780) > 1UL)); + step_hash(428); + return g_105; + } + else + { + unsigned l_781 = 0UL; + step_hash(430); + (**l_430) &= l_781; + } + step_hash(440); + if (((((unsigned)(((unsigned char)(((int)(~(-1L)) % (int)(**l_430)) || ((unsigned short)((signed char)((unsigned char)((signed char)((l_718 == (void*)0) | (((short)0x8A04L % (short)((*l_711) | 7L)) == 3L)) * (signed char)0xCEL) - (unsigned char)(-1L)) * (signed char)g_308) >> (unsigned short)(*l_765))) * (unsigned char)g_22) <= (***l_751)) / (unsigned)g_22) != (*l_765)) ^ p_31)) + { + int **l_804 = (void*)0; + step_hash(433); + (*l_430) = (**l_751); + step_hash(434); + if (p_31) + continue; + step_hash(435); + (**l_801) = ((unsigned short)((void*)0 != l_804) << (unsigned short)(**l_430)); + } + else + { + short l_807 = (-4L); + int ***l_817 = &g_83; + step_hash(437); + (*g_320) = ((unsigned short)(l_807 < (~p_31)) / (unsigned short)((short)(p_31 > (0x6537L > (((unsigned short)((+(((***l_751) || p_31) > ((unsigned short)l_816 >> (unsigned short)g_105))) < (l_817 != &l_801)) % (unsigned short)l_818) || 0L))) % (short)(*l_711))); + step_hash(438); + if (p_31) + break; + step_hash(439); + return p_31; + } + step_hash(441); + (*l_751) = &g_462; + step_hash(447); + for (l_44 = 0; (l_44 != 59); l_44++) + { + step_hash(445); + l_834 |= ((signed char)((unsigned char)(((short)p_31 * (short)(+((*l_765) <= ((g_22 <= ((unsigned char)((void*)0 == &g_84) << (unsigned char)0)) != (p_31 > (((unsigned char)((g_43 >= (-1L)) ^ g_105) - (unsigned char)(-1L)) && p_31)))))) | p_31) % (unsigned char)p_31) << (signed char)4); + step_hash(446); + (**l_833) = (*g_83); + } + } + step_hash(449); + if (p_31) + continue; + step_hash(450); + return (***l_751); + } + } + } + step_hash(454); + return g_22; +} +static short func_47(int ** p_48, signed char p_49, int ** p_50, short p_51) +{ + int **l_211 = &g_84; + unsigned short l_212 = 0x423DL; + int l_221 = 9L; + step_hash(146); + (*p_50) = (*g_139); + step_hash(147); + l_221 ^= (l_212 != p_51); + step_hash(162); + for (g_210 = (-15); (g_210 >= (-14)); g_210 += 5) + { + short l_229 = (-10L); + int l_230 = 0xB9702AB0L; + step_hash(161); + for (p_51 = 0; (p_51 == (-14)); --p_51) + { + unsigned char l_228 = 255UL; + step_hash(158); + for (g_105 = 17; (g_105 < 9); g_105 -= 5) + { + step_hash(157); + (*l_211) = (*p_50); + } + step_hash(159); + l_230 = (((1UL == (!l_228)) ^ l_229) >= 0xE3192B74L); + step_hash(160); + l_221 = (((&p_48 != (void*)0) >= ((g_210 >= p_49) && l_228)) ^ l_229); + } + } + step_hash(163); + (*l_211) = (*l_211); + step_hash(164); + return g_4; +} +static int ** func_54(int ** p_55, int * p_56, unsigned char p_57, int p_58, int p_59) +{ + step_hash(142); + for (g_105 = 0; (g_105 >= (-17)); --g_105) + { + step_hash(141); + for (p_58 = 10; (p_58 == (-7)); --p_58) + { + int *l_208 = &g_43; + int *l_209 = &g_210; + step_hash(139); + (*p_55) = l_208; + step_hash(140); + (*l_209) &= (*g_84); + } + } + step_hash(143); + (*g_139) = (*p_55); + step_hash(144); + return &g_84; +} +static int ** func_60(int * p_61, int ** p_62, unsigned short p_63, int * p_64, unsigned short p_65) +{ + int **l_201 = (void*)0; + int **l_202 = &g_84; + step_hash(130); + (*p_62) = (*p_62); + step_hash(131); + return l_202; +} +static int * func_66(signed char p_67, int ** p_68, int ** p_69) +{ + int l_112 = 0xADFF6575L; + int l_113 = 0xE7F8E482L; + int ***l_122 = &g_111; + short l_179 = 0xE59AL; + int *l_199 = &g_105; + step_hash(60); + l_113 |= (!l_112); + step_hash(127); + for (p_67 = 10; (p_67 > 29); ++p_67) + { + int l_116 = 0xC3E4F79CL; + int **l_121 = &g_84; + int l_123 = 0L; + int **l_160 = (void*)0; + step_hash(126); + if (((l_112 <= (l_116 == 7L)) > ((p_69 == (void*)0) && ((unsigned short)(((unsigned short)(**l_121) + (unsigned short)p_67) >= 1L) << (unsigned short)g_4)))) + { + int *l_124 = &g_22; + step_hash(65); + l_123 |= ((*g_84) & (**l_121)); + step_hash(66); + (*l_121) = l_124; + } + else + { + int l_127 = (-5L); + int *l_133 = &g_105; + int ***l_165 = (void*)0; + short l_196 = 0xF759L; + step_hash(113); + if (((short)(((*l_121) == &g_43) && 0x1765L) * (short)((((*l_121) != &g_22) == p_67) >= (**l_121)))) + { + int l_134 = 2L; + step_hash(69); + l_127 ^= 1L; + step_hash(80); + for (l_127 = 0; (l_127 > (-22)); --l_127) + { + step_hash(78); + if ((((signed char)(-1L) / (signed char)0x0AL) != (-(unsigned)p_67))) + { + step_hash(74); + return l_133; + } + else + { + step_hash(76); + (*l_133) = (g_4 > (*l_133)); + step_hash(77); + (*l_121) = (void*)0; + } + step_hash(79); + (*l_133) = ((p_67 != 65528UL) != l_134); + } + step_hash(81); + (*l_133) &= 0x87D55B84L; + } + else + { + unsigned short l_153 = 0x0210L; + int **l_178 = &l_133; + step_hash(88); + for (g_43 = 9; (g_43 != (-10)); --g_43) + { + signed char l_140 = 6L; + int l_141 = 4L; + step_hash(86); + l_141 &= (0x2FL < (((unsigned short)65531UL + (unsigned short)p_67) == func_74(g_139, l_140, &g_139))); + step_hash(87); + if ((*l_133)) + break; + } + step_hash(112); + if (((signed char)((0xCB140037L > (*g_84)) <= ((unsigned char)((unsigned short)((unsigned char)(~((signed char)(((**l_121) > (((-(unsigned short)(l_153 != (*l_133))) & ((((((short)(**l_121) + (short)((signed char)g_22 % (signed char)p_67)) & (&p_68 == &g_83)) & 0xE8F3L) < p_67) == (*g_84))) == p_67)) <= p_67) >> (signed char)0)) / (unsigned char)g_43) * (unsigned short)p_67) + (unsigned char)g_4)) + (signed char)250UL)) + { + unsigned char l_177 = 255UL; + step_hash(96); + if (((int)p_67 % (int)2L)) + { + step_hash(91); + (*l_133) ^= ((&g_84 == (void*)0) ^ ((void*)0 == &g_84)); + } + else + { + step_hash(93); + (*l_122) = l_178; + step_hash(94); + l_179 = (!0x1F273F2FL); + step_hash(95); + (**g_111) |= (-2L); + } + step_hash(97); + (*l_133) = ((int)((short)((*g_139) == (*l_178)) * (short)(((signed char)(p_67 ^ g_105) << (signed char)5) & p_67)) * (int)(((unsigned)(p_67 | ((short)(**l_178) / (short)(**l_121))) / (unsigned)(-2L)) == (*l_133))); + } + else + { + short l_195 = 0x316CL; + step_hash(106); + for (g_105 = 15; (g_105 < 12); --g_105) + { + unsigned short l_192 = 0x843EL; + int *l_193 = &l_112; + step_hash(102); + l_192 = (**g_139); + step_hash(103); + (*l_193) &= (**l_121); + step_hash(104); + (*l_193) = (*l_133); + step_hash(105); + (*l_122) = (void*)0; + } + step_hash(111); + if ((**g_139)) + { + int *l_194 = &g_43; + step_hash(108); + l_195 = ((void*)0 == l_194); + } + else + { + step_hash(110); + (*l_133) = (**l_178); + } + } + } + step_hash(114); + l_196 = l_179; + step_hash(124); + if ((&g_111 == l_165)) + { + short l_197 = 3L; + step_hash(116); + if (l_179) + break; + step_hash(121); + if ((!l_197)) + { + step_hash(118); + (*l_121) = (*l_121); + } + else + { + step_hash(120); + if (p_67) + break; + } + } + else + { + unsigned short l_198 = 1UL; + step_hash(123); + if (l_198) + break; + } + step_hash(125); + (*l_121) = l_133; + } + } + step_hash(128); + return l_199; +} +static unsigned char func_74(int ** p_75, unsigned char p_76, int *** p_77) +{ + unsigned l_100 = 9UL; + int l_101 = 0x17EDEBCDL; + int *l_108 = (void*)0; + int *l_109 = &g_105; + unsigned short l_110 = 65535UL; + step_hash(55); + if ((*g_84)) + { + step_hash(45); + for (p_76 = 17; (p_76 == 2); p_76 -= 8) + { + int *l_99 = &g_22; + step_hash(42); + (**p_77) = l_99; + step_hash(43); + l_101 = l_100; + step_hash(44); + if ((*g_84)) + break; + } + step_hash(46); + (**p_77) = (**p_77); + step_hash(47); + (**p_77) = &g_43; + } + else + { + step_hash(53); + for (l_101 = 0; (l_101 > 11); l_101 += 7) + { + int *l_104 = &g_105; + step_hash(52); + (*l_104) |= 0xD5260469L; + } + step_hash(54); + l_101 = ((unsigned char)g_4 * (unsigned char)p_76); + } + step_hash(56); + (*l_109) = ((l_100 <= (((void*)0 != &p_75) || 0x647B0CB4L)) < g_22); + step_hash(57); + (*l_109) = (*l_109); + step_hash(58); + return l_110; +} +static int ** func_78(int ** p_79, short p_80, int *** p_81, unsigned p_82) +{ + int **l_87 = (void*)0; + signed char l_88 = 1L; + unsigned l_90 = 0x4C0DD78FL; + int l_91 = 0L; + int l_92 = (-1L); + int *l_93 = &l_91; + step_hash(33); + for (p_80 = 14; (p_80 >= (-8)); --p_80) + { + step_hash(31); + (*p_81) = l_87; + step_hash(32); + (*p_79) = &g_22; + } + step_hash(34); + l_91 ^= ((l_88 && ((((void*)0 != &g_84) < (-6L)) && p_80)) >= (-(unsigned char)l_90)); + step_hash(35); + (*l_93) = l_92; + step_hash(36); + return (*p_81); +} +void csmith_compute_hash(void) +{ + transparent_crc(g_4, "g_4", print_hash_value); + transparent_crc(g_22, "g_22", print_hash_value); + transparent_crc(g_43, "g_43", print_hash_value); + transparent_crc(g_105, "g_105", print_hash_value); + transparent_crc(g_210, "g_210", print_hash_value); + transparent_crc(g_308, "g_308", print_hash_value); + transparent_crc(g_446, "g_446", print_hash_value); + transparent_crc(g_752, "g_752", print_hash_value); + transparent_crc(g_936, "g_936", print_hash_value); + transparent_crc(g_1133, "g_1133", print_hash_value); + transparent_crc(g_1153, "g_1153", print_hash_value); + transparent_crc(g_1160, "g_1160", print_hash_value); +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand24.expect b/src/tests/csmith/rand24.expect new file mode 100644 index 0000000..9074eae --- /dev/null +++ b/src/tests/csmith/rand24.expect @@ -0,0 +1,91 @@ +...checksum after hashing g_4 : E2339777 +...checksum after hashing g_22 : 7CFADFF9 +...checksum after hashing g_43 : 35A4E0FF +...checksum after hashing g_105 : 1BC9EFCA +...checksum after hashing g_210 : B2EB846D +...checksum after hashing g_308 : 2E6DDC7C +...checksum after hashing g_446 : E4D0D21F +...checksum after hashing g_752 : 6E9E2EA3 +...checksum after hashing g_936 : 2CEAB60A +...checksum after hashing g_1133 : 26CC253 +...checksum after hashing g_1153 : F52D1F9C +...checksum after hashing g_1160 : 515D76BB +before stmt(654): checksum = 515D76BB +...checksum after hashing g_4 : E2339777 +...checksum after hashing g_22 : 7CFADFF9 +...checksum after hashing g_43 : 35A4E0FF +...checksum after hashing g_105 : 1BC9EFCA +...checksum after hashing g_210 : B2EB846D +...checksum after hashing g_308 : 2E6DDC7C +...checksum after hashing g_446 : E4D0D21F +...checksum after hashing g_752 : 6E9E2EA3 +...checksum after hashing g_936 : 2CEAB60A +...checksum after hashing g_1133 : 26CC253 +...checksum after hashing g_1153 : F52D1F9C +...checksum after hashing g_1160 : 515D76BB +before stmt(6): checksum = 515D76BB +...checksum after hashing g_4 : E2339777 +...checksum after hashing g_22 : 7CFADFF9 +...checksum after hashing g_43 : 35A4E0FF +...checksum after hashing g_105 : 1BC9EFCA +...checksum after hashing g_210 : B2EB846D +...checksum after hashing g_308 : 2E6DDC7C +...checksum after hashing g_446 : E4D0D21F +...checksum after hashing g_752 : 6E9E2EA3 +...checksum after hashing g_936 : 2CEAB60A +...checksum after hashing g_1133 : 26CC253 +...checksum after hashing g_1153 : F52D1F9C +...checksum after hashing g_1160 : 515D76BB +before stmt(5): checksum = 515D76BB +...checksum after hashing g_4 : E2339777 +...checksum after hashing g_22 : 7CFADFF9 +...checksum after hashing g_43 : 35A4E0FF +...checksum after hashing g_105 : 1BC9EFCA +...checksum after hashing g_210 : B2EB846D +...checksum after hashing g_308 : 2E6DDC7C +...checksum after hashing g_446 : E4D0D21F +...checksum after hashing g_752 : 6E9E2EA3 +...checksum after hashing g_936 : 2CEAB60A +...checksum after hashing g_1133 : 26CC253 +...checksum after hashing g_1153 : F52D1F9C +...checksum after hashing g_1160 : 515D76BB +before stmt(652): checksum = 515D76BB +...checksum after hashing g_4 : E2339777 +...checksum after hashing g_22 : 7CFADFF9 +...checksum after hashing g_43 : 35A4E0FF +...checksum after hashing g_105 : 1BC9EFCA +...checksum after hashing g_210 : B2EB846D +...checksum after hashing g_308 : 2E6DDC7C +...checksum after hashing g_446 : E4D0D21F +...checksum after hashing g_752 : 6E9E2EA3 +...checksum after hashing g_936 : 2CEAB60A +...checksum after hashing g_1133 : 26CC253 +...checksum after hashing g_1153 : F52D1F9C +...checksum after hashing g_1160 : 515D76BB +before stmt(653): checksum = 515D76BB +...checksum after hashing g_4 : E2339777 +...checksum after hashing g_22 : 7CFADFF9 +...checksum after hashing g_43 : 35A4E0FF +...checksum after hashing g_105 : 1BC9EFCA +...checksum after hashing g_210 : B2EB846D +...checksum after hashing g_308 : 2E6DDC7C +...checksum after hashing g_446 : E4D0D21F +...checksum after hashing g_752 : 6E9E2EA3 +...checksum after hashing g_936 : 2CEAB60A +...checksum after hashing g_1133 : 26CC253 +...checksum after hashing g_1153 : F52D1F9C +...checksum after hashing g_1160 : E9E111DE +before stmt(655): checksum = E9E111DE +...checksum after hashing g_4 : E2339777 +...checksum after hashing g_22 : 7CFADFF9 +...checksum after hashing g_43 : 35A4E0FF +...checksum after hashing g_105 : 1BC9EFCA +...checksum after hashing g_210 : B2EB846D +...checksum after hashing g_308 : 2E6DDC7C +...checksum after hashing g_446 : E4D0D21F +...checksum after hashing g_752 : 6E9E2EA3 +...checksum after hashing g_936 : 2CEAB60A +...checksum after hashing g_1133 : 26CC253 +...checksum after hashing g_1153 : F52D1F9C +...checksum after hashing g_1160 : E9E111DE +checksum = e9e111de diff --git a/src/tests/csmith/rand25.c b/src/tests/csmith/rand25.c new file mode 100644 index 0000000..e1d3ea3 --- /dev/null +++ b/src/tests/csmith/rand25.c @@ -0,0 +1,442 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static unsigned g_4 = 1UL; +static int g_87 = 0x236C2177L; +static unsigned char g_101 = 252UL; +static int **g_133 = (void*)0; +static int g_186 = 1L; +static int *g_242 = (void*)0; +static int **g_241 = &g_242; +static int g_247 = (-9L); +static int *g_311 = &g_87; +static int g_322 = 0x6B9971ADL; +static short func_1(void); +static unsigned short func_13(int p_14); +static short func_22(unsigned char p_23, signed char p_24, unsigned p_25); +static unsigned short func_30(signed char p_31, unsigned char p_32, unsigned char p_33, short p_34); +static unsigned func_44(short p_45, unsigned p_46); +static short func_47(unsigned char p_48, unsigned p_49, short p_50, unsigned char p_51, short p_52); +static unsigned func_57(unsigned char p_58, unsigned p_59); +static int func_73(unsigned short p_74, unsigned p_75, int p_76, signed char p_77, unsigned char p_78); +static int * func_81(int * p_82); +static int * func_83(int * p_84, int * p_85); +static short func_1(void) +{ + unsigned short l_26 = 0xF839L; + step_hash(184); + (*g_311) = ((short)((g_4 >= (((unsigned char)g_4 >> (unsigned char)2) == ((0x0444L && ((signed char)0xFEL / (signed char)((int)((unsigned short)func_13(g_4) * (unsigned short)((short)((unsigned char)(~((0x90611BC3L != g_4) & ((((short)func_22(l_26, g_4, g_4) - (short)l_26) | g_4) <= l_26))) >> (unsigned char)6) * (short)0x1FA6L)) - (int)l_26))) != l_26))) ^ g_247) * (short)g_247); + step_hash(185); + return g_101; +} +static unsigned short func_13(int p_14) +{ + unsigned char l_15 = 0x58L; + step_hash(2); + return l_15; +} +static short func_22(unsigned char p_23, signed char p_24, unsigned p_25) +{ + short l_29 = 0x4CA7L; + int *l_339 = &g_87; + int ***l_342 = &g_133; + int *l_345 = &g_322; + signed char l_390 = 0xFBL; + int *l_393 = (void*)0; + int *l_394 = (void*)0; + step_hash(145); + (*g_311) = ((signed char)l_29 + (signed char)func_13((func_30(g_4, l_29, (((unsigned char)g_4 % (unsigned char)((unsigned short)((short)((l_29 > 0xB8CFF26AL) ^ g_4) + (short)((func_13(g_4) & 0xC5AD058BL) || p_24)) * (unsigned short)0x2F23L)) & 1L), l_29) | g_247))); + step_hash(177); + for (p_25 = 3; (p_25 != 23); p_25 += 5) + { + signed char l_343 = (-7L); + int *l_344 = &g_247; + int *l_351 = &g_87; + int l_378 = 0x9B3B63D6L; + step_hash(149); + (*g_311) = (((((unsigned short)(0UL >= ((int)((unsigned char)((unsigned)g_87 + (unsigned)func_13(((int)((unsigned)func_13(((l_339 != l_339) < ((unsigned)((*l_339) & ((void*)0 != l_342)) % (unsigned)l_343))) / (unsigned)p_25) - (int)0xEFD678DBL))) / (unsigned char)p_24) / (int)0x38A90558L)) - (unsigned short)l_343) <= 0L) <= p_24) > 0x492FC4D6L); + step_hash(150); + (*g_241) = l_345; + step_hash(176); + for (g_101 = (-1); (g_101 > 24); g_101 += 6) + { + int *l_348 = &g_186; + unsigned char l_358 = 0xDFL; + int ***l_359 = &g_241; + int l_364 = 0xF82136C5L; + unsigned char l_388 = 2UL; + step_hash(154); + (*l_339) = p_23; + step_hash(155); + l_348 = l_344; + step_hash(156); + (*l_345) = ((((unsigned)g_247 / (unsigned)0x0BBCD69BL) || 0xE1L) < 0xB6DCFAA1L); + } + } + step_hash(182); + for (g_186 = 0; (g_186 == (-28)); --g_186) + { + step_hash(181); + (*l_339) = (l_393 == l_394); + } + step_hash(183); + return g_322; +} +static unsigned short func_30(signed char p_31, unsigned char p_32, unsigned char p_33, short p_34) +{ + int l_43 = 0x633933B8L; + int *l_321 = &g_322; + step_hash(142); + (*l_321) ^= ((unsigned char)(p_33 || (l_43 > func_44(func_47(p_34, l_43, g_4, l_43, p_34), g_247))) % (unsigned char)g_4); + step_hash(143); + (*g_241) = &l_43; + step_hash(144); + return g_4; +} +static unsigned func_44(short p_45, unsigned p_46) +{ + int *l_318 = &g_186; + int l_319 = 0L; + unsigned l_320 = 0x3B00657DL; + step_hash(137); + (*g_242) &= p_45; + step_hash(138); + l_318 = l_318; + step_hash(139); + (**g_241) = (0x00B7L < (0xDE41467EL >= (*l_318))); + step_hash(140); + (*g_311) = l_319; + step_hash(141); + return l_320; +} +static short func_47(unsigned char p_48, unsigned p_49, short p_50, unsigned char p_51, short p_52) +{ + signed char l_64 = 0x6BL; + int l_315 = 0xE94F4A13L; + step_hash(134); + if ((((((short)((((signed char)(func_57(p_51, ((signed char)g_4 + (signed char)((short)l_64 * (short)((l_64 == (+((unsigned)((unsigned char)((short)((unsigned char)func_13(func_73(g_4, ((+(((unsigned short)65535UL * (unsigned short)func_13(l_64)) == p_51)) && l_64), g_4, g_4, l_64)) << (unsigned char)g_247) << (short)l_64) / (unsigned char)g_4) / (unsigned)l_64))) ^ g_247)))) <= 0x6A5DDA62L) * (signed char)1L) == g_247) | 0x567F5F9CL) * (short)0x01ADL) != g_247) & l_64) > p_52)) + { + step_hash(130); + (*g_311) = ((4294967289UL == g_4) < func_57(g_247, p_49)); + step_hash(131); + (*g_311) = func_57(p_48, l_315); + } + else + { + step_hash(133); + (*g_242) ^= ((signed char)0xFDL - (signed char)l_315); + } + step_hash(135); + return l_64; +} +static unsigned func_57(unsigned char p_58, unsigned p_59) +{ + unsigned short l_312 = 0x013EL; + step_hash(128); + return l_312; +} +static int func_73(unsigned short p_74, unsigned p_75, int p_76, signed char p_77, unsigned char p_78) +{ + int *l_86 = &g_87; + step_hash(125); + (*g_241) = func_81(func_83(l_86, l_86)); + step_hash(126); + return (*g_311); +} +static int * func_81(int * p_82) +{ + int l_176 = 6L; + int *l_181 = &g_87; + int *l_310 = &l_176; + step_hash(81); + for (g_87 = 0; (g_87 == (-14)); g_87 -= 4) + { + signed char l_188 = 0x9DL; + int *l_190 = &l_176; + unsigned l_191 = 0x60A43F84L; + step_hash(70); + for (g_101 = 19; (g_101 < 30); ++g_101) + { + signed char l_184 = 0x11L; + int l_189 = 0x99DD4A88L; + step_hash(62); + if (l_176) + break; + step_hash(68); + for (l_176 = (-23); (l_176 >= 5); l_176++) + { + int *l_185 = &g_186; + int **l_187 = &l_181; + step_hash(66); + (*l_185) = ((int)((0xFBL && g_87) && func_13(((void*)0 != l_181))) - (int)((unsigned short)l_184 << (unsigned short)7)); + step_hash(67); + (*l_187) = (void*)0; + } + step_hash(69); + l_189 = l_188; + } + step_hash(71); + (*l_190) = 8L; + step_hash(79); + if ((*p_82)) + { + step_hash(73); + if (g_87) + break; + } + else + { + int **l_192 = &l_181; + step_hash(75); + (*l_190) = (*p_82); + step_hash(76); + (*l_190) |= l_191; + step_hash(77); + (*l_192) = p_82; + step_hash(78); + return &g_186; + } + step_hash(80); + (*l_190) = 9L; + } + step_hash(82); + (*p_82) &= l_176; + step_hash(90); + for (g_186 = 0; (g_186 != (-4)); --g_186) + { + int l_199 = 0xB6223421L; + step_hash(86); + if (g_4) + break; + step_hash(87); + (*p_82) = (((short)(func_13((g_101 >= ((unsigned short)(l_199 < ((g_4 && ((short)(((short)l_199 >> (short)14) == ((signed char)l_199 * (signed char)g_87)) / (short)((((short)(func_13(l_199) <= (((unsigned char)(+((((signed char)(l_199 != l_199) / (signed char)g_186) && g_101) > l_199)) * (unsigned char)l_199) & (*p_82))) % (short)8UL) & g_101) | l_199))) < g_186)) / (unsigned short)0x001AL))) == 4294967295UL) << (short)2) < 1UL); + step_hash(88); + (*p_82) = ((signed char)0x93L - (signed char)l_176); + step_hash(89); + if ((*p_82)) + break; + } + step_hash(123); + for (g_101 = 0; (g_101 >= 20); g_101 += 1) + { + unsigned char l_248 = 0xAEL; + int l_259 = 0xE881EA7AL; + unsigned l_260 = 1UL; + step_hash(121); + for (g_87 = (-7); (g_87 != (-7)); g_87 += 7) + { + unsigned l_232 = 1UL; + int *l_249 = &g_186; + } + step_hash(122); + (*g_241) = (void*)0; + } + step_hash(124); + return g_311; +} +static int * func_83(int * p_84, int * p_85) +{ + int l_90 = 0xEC7E1EFCL; + short l_99 = 1L; + unsigned char l_112 = 249UL; + unsigned l_113 = 0x16C3B14AL; + int *l_135 = &l_90; + int **l_134 = &l_135; + step_hash(52); + if (((unsigned char)(&g_87 == (void*)0) % (unsigned char)l_90)) + { + int *l_92 = &l_90; + int **l_91 = &l_92; + int l_100 = 0L; + step_hash(9); + (*l_91) = (void*)0; + step_hash(10); + (*p_85) = (func_13(((((short)((unsigned short)g_4 % (unsigned short)((unsigned short)g_4 - (unsigned short)l_99)) - (short)l_100) || g_87) <= g_101)) > (func_13(((((short)(((signed char)(+(((unsigned char)(((unsigned char)(l_99 ^ ((signed char)0x89L + (signed char)g_101)) - (unsigned char)l_99) < g_4) * (unsigned char)l_99) <= l_112)) - (signed char)g_4) > (*p_84)) << (short)5) > g_101) <= l_112)) < 0x8E5B495AL)); + step_hash(11); + (*l_91) = &l_90; + step_hash(12); + return p_85; + } + else + { + unsigned short l_117 = 1UL; + int *l_130 = &g_87; + step_hash(18); + if ((*p_85)) + { + int l_114 = (-4L); + step_hash(15); + (*p_85) = (func_13((g_87 && l_113)) <= l_114); + } + else + { + signed char l_124 = (-10L); + int *l_125 = &g_87; + step_hash(17); + l_90 = ((int)(l_117 ^ ((*p_85) || ((signed char)l_112 % (signed char)(((l_117 && ((((((unsigned)l_124 - (unsigned)(((((l_125 == (void*)0) || ((unsigned short)l_113 >> (unsigned short)7)) == func_13((l_112 && g_4))) >= g_87) == 1L)) > 0L) < (*l_125)) <= l_117) >= g_4)) & 0x1DFF66F6L) & 2L)))) + (int)g_87); + } + step_hash(49); + if (l_117) + { + int *l_128 = &g_87; + int **l_129 = &l_128; + step_hash(20); + (*l_129) = l_128; + step_hash(21); + return l_130; + } + else + { + unsigned short l_136 = 0x2D78L; + int **l_158 = &l_130; + int ***l_159 = &g_133; + step_hash(35); + if ((*p_84)) + { + unsigned short l_139 = 0x40FDL; + step_hash(24); + (*l_130) = ((g_133 == l_134) == (((~func_13((*p_84))) ^ (-2L)) < 2L)); + step_hash(25); + (*l_130) = (*p_84); + step_hash(26); + (*p_84) = (l_136 && ((unsigned char)((*l_130) | l_136) + (unsigned char)(l_139 || ((unsigned short)0x8C87L * (unsigned short)((((short)(**l_134) >> (short)((l_136 ^ (((0xDE5CCA7CL >= (*p_85)) <= (*l_130)) ^ 0L)) != l_136)) && l_136) > l_139))))); + step_hash(32); + if ((+g_4)) + { + int l_154 = 0x43366FBBL; + step_hash(28); + (*l_134) = (*l_134); + step_hash(29); + (*l_135) = (((unsigned short)(((((((void*)0 != g_133) >= ((short)((short)1L / (short)(*l_130)) >> (short)6)) | (((unsigned)(((unsigned short)(*l_130) + (unsigned short)(g_101 | (*l_135))) >= ((*l_130) | 4UL)) % (unsigned)g_87) | 65535UL)) || g_101) >= (*l_130)) < l_154) + (unsigned short)0x13BBL) < 0x31L); + } + else + { + step_hash(31); + (**l_134) |= g_87; + } + } + else + { + step_hash(34); + return p_84; + } + step_hash(42); + for (g_101 = 0; (g_101 != 32); ++g_101) + { + signed char l_157 = 0x86L; + step_hash(39); + (*l_130) |= l_136; + step_hash(40); + (*l_134) = p_85; + step_hash(41); + (**l_134) &= (l_157 == func_13(func_13(((void*)0 == &p_84)))); + } + step_hash(43); + (*l_159) = l_158; + step_hash(48); + if (((**g_133) & (((unsigned short)(**l_158) >> (unsigned short)(*l_130)) > (((signed char)((unsigned char)((((unsigned short)((signed char)g_87 >> (signed char)(*l_130)) >> (unsigned short)g_101) ^ g_101) <= 0xCE8EB294L) / (unsigned char)1L) + (signed char)(*l_130)) >= (**l_134))))) + { + unsigned char l_170 = 251UL; + step_hash(45); + (**l_134) = l_170; + } + else + { + int *l_171 = &g_87; + step_hash(47); + return l_171; + } + } + step_hash(50); + (*g_133) = (void*)0; + step_hash(51); + (*p_85) = (*p_85); + } + step_hash(53); + (*l_134) = (*l_134); + step_hash(54); + return p_85; +} +void csmith_compute_hash(void) +{ + transparent_crc(g_4, "g_4", print_hash_value); + transparent_crc(g_87, "g_87", print_hash_value); + transparent_crc(g_101, "g_101", print_hash_value); + transparent_crc(g_186, "g_186", print_hash_value); + transparent_crc(g_247, "g_247", print_hash_value); + transparent_crc(g_322, "g_322", print_hash_value); +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand25.expect b/src/tests/csmith/rand25.expect new file mode 100644 index 0000000..869c62d --- /dev/null +++ b/src/tests/csmith/rand25.expect @@ -0,0 +1,315 @@ +...checksum after hashing g_4 : 99F8B879 +...checksum after hashing g_87 : DC03EDC +...checksum after hashing g_101 : 1AC8134B +...checksum after hashing g_186 : 35CCDE50 +...checksum after hashing g_247 : 47AD9CE9 +...checksum after hashing g_322 : 1DFACC91 +before stmt(184): checksum = 1DFACC91 +...checksum after hashing g_4 : 99F8B879 +...checksum after hashing g_87 : DC03EDC +...checksum after hashing g_101 : 1AC8134B +...checksum after hashing g_186 : 35CCDE50 +...checksum after hashing g_247 : 47AD9CE9 +...checksum after hashing g_322 : 1DFACC91 +before stmt(2): checksum = 1DFACC91 +...checksum after hashing g_4 : 99F8B879 +...checksum after hashing g_87 : DC03EDC +...checksum after hashing g_101 : 1AC8134B +...checksum after hashing g_186 : 35CCDE50 +...checksum after hashing g_247 : 47AD9CE9 +...checksum after hashing g_322 : 1DFACC91 +before stmt(145): checksum = 1DFACC91 +...checksum after hashing g_4 : 99F8B879 +...checksum after hashing g_87 : DC03EDC +...checksum after hashing g_101 : 1AC8134B +...checksum after hashing g_186 : 35CCDE50 +...checksum after hashing g_247 : 47AD9CE9 +...checksum after hashing g_322 : 1DFACC91 +before stmt(2): checksum = 1DFACC91 +...checksum after hashing g_4 : 99F8B879 +...checksum after hashing g_87 : DC03EDC +...checksum after hashing g_101 : 1AC8134B +...checksum after hashing g_186 : 35CCDE50 +...checksum after hashing g_247 : 47AD9CE9 +...checksum after hashing g_322 : 1DFACC91 +before stmt(142): checksum = 1DFACC91 +...checksum after hashing g_4 : 99F8B879 +...checksum after hashing g_87 : DC03EDC +...checksum after hashing g_101 : 1AC8134B +...checksum after hashing g_186 : 35CCDE50 +...checksum after hashing g_247 : 47AD9CE9 +...checksum after hashing g_322 : 1DFACC91 +before stmt(143): checksum = 1DFACC91 +...checksum after hashing g_4 : 99F8B879 +...checksum after hashing g_87 : DC03EDC +...checksum after hashing g_101 : 1AC8134B +...checksum after hashing g_186 : 35CCDE50 +...checksum after hashing g_247 : 47AD9CE9 +...checksum after hashing g_322 : 1DFACC91 +before stmt(144): checksum = 1DFACC91 +...checksum after hashing g_4 : 99F8B879 +...checksum after hashing g_87 : DC03EDC +...checksum after hashing g_101 : 1AC8134B +...checksum after hashing g_186 : 35CCDE50 +...checksum after hashing g_247 : 47AD9CE9 +...checksum after hashing g_322 : 1DFACC91 +before stmt(2): checksum = 1DFACC91 +...checksum after hashing g_4 : 99F8B879 +...checksum after hashing g_87 : 7733FF14 +...checksum after hashing g_101 : B61D0389 +...checksum after hashing g_186 : D6818534 +...checksum after hashing g_247 : EFD4BF66 +...checksum after hashing g_322 : B43B7B20 +before stmt(177): checksum = B43B7B20 +...checksum after hashing g_4 : 99F8B879 +...checksum after hashing g_87 : 7733FF14 +...checksum after hashing g_101 : B61D0389 +...checksum after hashing g_186 : D6818534 +...checksum after hashing g_247 : EFD4BF66 +...checksum after hashing g_322 : B43B7B20 +before stmt(149): checksum = B43B7B20 +...checksum after hashing g_4 : 99F8B879 +...checksum after hashing g_87 : 7733FF14 +...checksum after hashing g_101 : B61D0389 +...checksum after hashing g_186 : D6818534 +...checksum after hashing g_247 : EFD4BF66 +...checksum after hashing g_322 : B43B7B20 +before stmt(2): checksum = B43B7B20 +...checksum after hashing g_4 : 99F8B879 +...checksum after hashing g_87 : 7733FF14 +...checksum after hashing g_101 : B61D0389 +...checksum after hashing g_186 : D6818534 +...checksum after hashing g_247 : EFD4BF66 +...checksum after hashing g_322 : B43B7B20 +before stmt(2): checksum = B43B7B20 +...checksum after hashing g_4 : 99F8B879 +...checksum after hashing g_87 : A988DFF7 +...checksum after hashing g_101 : 2CC0231F +...checksum after hashing g_186 : 52ABBCA4 +...checksum after hashing g_247 : FC900BCC +...checksum after hashing g_322 : 44111F52 +before stmt(150): checksum = 44111F52 +...checksum after hashing g_4 : 99F8B879 +...checksum after hashing g_87 : A988DFF7 +...checksum after hashing g_101 : 2CC0231F +...checksum after hashing g_186 : 52ABBCA4 +...checksum after hashing g_247 : FC900BCC +...checksum after hashing g_322 : 44111F52 +before stmt(176): checksum = 44111F52 +...checksum after hashing g_4 : 99F8B879 +...checksum after hashing g_87 : A988DFF7 +...checksum after hashing g_101 : 3E758CF1 +...checksum after hashing g_186 : DC24BB47 +...checksum after hashing g_247 : 8B0ED93C +...checksum after hashing g_322 : 6DD9ABA0 +before stmt(154): checksum = 6DD9ABA0 +...checksum after hashing g_4 : 99F8B879 +...checksum after hashing g_87 : 24AB68DC +...checksum after hashing g_101 : A4F7C4A7 +...checksum after hashing g_186 : 55A4B7D2 +...checksum after hashing g_247 : A76D9201 +...checksum after hashing g_322 : 6F5FBD7A +before stmt(155): checksum = 6F5FBD7A +...checksum after hashing g_4 : 99F8B879 +...checksum after hashing g_87 : 24AB68DC +...checksum after hashing g_101 : A4F7C4A7 +...checksum after hashing g_186 : 55A4B7D2 +...checksum after hashing g_247 : A76D9201 +...checksum after hashing g_322 : 6F5FBD7A +before stmt(156): checksum = 6F5FBD7A +...checksum after hashing g_4 : 99F8B879 +...checksum after hashing g_87 : 24AB68DC +...checksum after hashing g_101 : 4D2C3264 +...checksum after hashing g_186 : 3B0FBF50 +...checksum after hashing g_247 : 9D79474 +...checksum after hashing g_322 : 301A74E2 +before stmt(149): checksum = 301A74E2 +...checksum after hashing g_4 : 99F8B879 +...checksum after hashing g_87 : 24AB68DC +...checksum after hashing g_101 : 4D2C3264 +...checksum after hashing g_186 : 3B0FBF50 +...checksum after hashing g_247 : 9D79474 +...checksum after hashing g_322 : 301A74E2 +before stmt(2): checksum = 301A74E2 +...checksum after hashing g_4 : 99F8B879 +...checksum after hashing g_87 : 24AB68DC +...checksum after hashing g_101 : 4D2C3264 +...checksum after hashing g_186 : 3B0FBF50 +...checksum after hashing g_247 : 9D79474 +...checksum after hashing g_322 : 301A74E2 +before stmt(2): checksum = 301A74E2 +...checksum after hashing g_4 : 99F8B879 +...checksum after hashing g_87 : A988DFF7 +...checksum after hashing g_101 : D7AE7A32 +...checksum after hashing g_186 : B28FB3C5 +...checksum after hashing g_247 : 25B4DF49 +...checksum after hashing g_322 : 329C6238 +before stmt(150): checksum = 329C6238 +...checksum after hashing g_4 : 99F8B879 +...checksum after hashing g_87 : A988DFF7 +...checksum after hashing g_101 : D7AE7A32 +...checksum after hashing g_186 : B28FB3C5 +...checksum after hashing g_247 : 25B4DF49 +...checksum after hashing g_322 : 329C6238 +before stmt(176): checksum = 329C6238 +...checksum after hashing g_4 : 99F8B879 +...checksum after hashing g_87 : A988DFF7 +...checksum after hashing g_101 : 3E758CF1 +...checksum after hashing g_186 : DC24BB47 +...checksum after hashing g_247 : 8B0ED93C +...checksum after hashing g_322 : 45B486F9 +before stmt(154): checksum = 45B486F9 +...checksum after hashing g_4 : 99F8B879 +...checksum after hashing g_87 : 24AB68DC +...checksum after hashing g_101 : A4F7C4A7 +...checksum after hashing g_186 : 55A4B7D2 +...checksum after hashing g_247 : A76D9201 +...checksum after hashing g_322 : 47329023 +before stmt(155): checksum = 47329023 +...checksum after hashing g_4 : 99F8B879 +...checksum after hashing g_87 : 24AB68DC +...checksum after hashing g_101 : A4F7C4A7 +...checksum after hashing g_186 : 55A4B7D2 +...checksum after hashing g_247 : A76D9201 +...checksum after hashing g_322 : 47329023 +before stmt(156): checksum = 47329023 +...checksum after hashing g_4 : 99F8B879 +...checksum after hashing g_87 : 24AB68DC +...checksum after hashing g_101 : 4D2C3264 +...checksum after hashing g_186 : 3B0FBF50 +...checksum after hashing g_247 : 9D79474 +...checksum after hashing g_322 : 301A74E2 +before stmt(149): checksum = 301A74E2 +...checksum after hashing g_4 : 99F8B879 +...checksum after hashing g_87 : 24AB68DC +...checksum after hashing g_101 : 4D2C3264 +...checksum after hashing g_186 : 3B0FBF50 +...checksum after hashing g_247 : 9D79474 +...checksum after hashing g_322 : 301A74E2 +before stmt(2): checksum = 301A74E2 +...checksum after hashing g_4 : 99F8B879 +...checksum after hashing g_87 : 24AB68DC +...checksum after hashing g_101 : 4D2C3264 +...checksum after hashing g_186 : 3B0FBF50 +...checksum after hashing g_247 : 9D79474 +...checksum after hashing g_322 : 301A74E2 +before stmt(2): checksum = 301A74E2 +...checksum after hashing g_4 : 99F8B879 +...checksum after hashing g_87 : A988DFF7 +...checksum after hashing g_101 : D7AE7A32 +...checksum after hashing g_186 : B28FB3C5 +...checksum after hashing g_247 : 25B4DF49 +...checksum after hashing g_322 : 329C6238 +before stmt(150): checksum = 329C6238 +...checksum after hashing g_4 : 99F8B879 +...checksum after hashing g_87 : A988DFF7 +...checksum after hashing g_101 : D7AE7A32 +...checksum after hashing g_186 : B28FB3C5 +...checksum after hashing g_247 : 25B4DF49 +...checksum after hashing g_322 : 329C6238 +before stmt(176): checksum = 329C6238 +...checksum after hashing g_4 : 99F8B879 +...checksum after hashing g_87 : A988DFF7 +...checksum after hashing g_101 : 3E758CF1 +...checksum after hashing g_186 : DC24BB47 +...checksum after hashing g_247 : 8B0ED93C +...checksum after hashing g_322 : 45B486F9 +before stmt(154): checksum = 45B486F9 +...checksum after hashing g_4 : 99F8B879 +...checksum after hashing g_87 : 24AB68DC +...checksum after hashing g_101 : A4F7C4A7 +...checksum after hashing g_186 : 55A4B7D2 +...checksum after hashing g_247 : A76D9201 +...checksum after hashing g_322 : 47329023 +before stmt(155): checksum = 47329023 +...checksum after hashing g_4 : 99F8B879 +...checksum after hashing g_87 : 24AB68DC +...checksum after hashing g_101 : A4F7C4A7 +...checksum after hashing g_186 : 55A4B7D2 +...checksum after hashing g_247 : A76D9201 +...checksum after hashing g_322 : 47329023 +before stmt(156): checksum = 47329023 +...checksum after hashing g_4 : 99F8B879 +...checksum after hashing g_87 : 24AB68DC +...checksum after hashing g_101 : 4D2C3264 +...checksum after hashing g_186 : 3B0FBF50 +...checksum after hashing g_247 : 9D79474 +...checksum after hashing g_322 : 301A74E2 +before stmt(149): checksum = 301A74E2 +...checksum after hashing g_4 : 99F8B879 +...checksum after hashing g_87 : 24AB68DC +...checksum after hashing g_101 : 4D2C3264 +...checksum after hashing g_186 : 3B0FBF50 +...checksum after hashing g_247 : 9D79474 +...checksum after hashing g_322 : 301A74E2 +before stmt(2): checksum = 301A74E2 +...checksum after hashing g_4 : 99F8B879 +...checksum after hashing g_87 : 24AB68DC +...checksum after hashing g_101 : 4D2C3264 +...checksum after hashing g_186 : 3B0FBF50 +...checksum after hashing g_247 : 9D79474 +...checksum after hashing g_322 : 301A74E2 +before stmt(2): checksum = 301A74E2 +...checksum after hashing g_4 : 99F8B879 +...checksum after hashing g_87 : A988DFF7 +...checksum after hashing g_101 : D7AE7A32 +...checksum after hashing g_186 : B28FB3C5 +...checksum after hashing g_247 : 25B4DF49 +...checksum after hashing g_322 : 329C6238 +before stmt(150): checksum = 329C6238 +...checksum after hashing g_4 : 99F8B879 +...checksum after hashing g_87 : A988DFF7 +...checksum after hashing g_101 : D7AE7A32 +...checksum after hashing g_186 : B28FB3C5 +...checksum after hashing g_247 : 25B4DF49 +...checksum after hashing g_322 : 329C6238 +before stmt(176): checksum = 329C6238 +...checksum after hashing g_4 : 99F8B879 +...checksum after hashing g_87 : A988DFF7 +...checksum after hashing g_101 : 3E758CF1 +...checksum after hashing g_186 : DC24BB47 +...checksum after hashing g_247 : 8B0ED93C +...checksum after hashing g_322 : 45B486F9 +before stmt(154): checksum = 45B486F9 +...checksum after hashing g_4 : 99F8B879 +...checksum after hashing g_87 : 24AB68DC +...checksum after hashing g_101 : A4F7C4A7 +...checksum after hashing g_186 : 55A4B7D2 +...checksum after hashing g_247 : A76D9201 +...checksum after hashing g_322 : 47329023 +before stmt(155): checksum = 47329023 +...checksum after hashing g_4 : 99F8B879 +...checksum after hashing g_87 : 24AB68DC +...checksum after hashing g_101 : A4F7C4A7 +...checksum after hashing g_186 : 55A4B7D2 +...checksum after hashing g_247 : A76D9201 +...checksum after hashing g_322 : 47329023 +before stmt(156): checksum = 47329023 +...checksum after hashing g_4 : 99F8B879 +...checksum after hashing g_87 : 24AB68DC +...checksum after hashing g_101 : 4D2C3264 +...checksum after hashing g_186 : 3B0FBF50 +...checksum after hashing g_247 : 9D79474 +...checksum after hashing g_322 : 301A74E2 +before stmt(182): checksum = 301A74E2 +...checksum after hashing g_4 : 99F8B879 +...checksum after hashing g_87 : 24AB68DC +...checksum after hashing g_101 : 4D2C3264 +...checksum after hashing g_186 : 83B3D835 +...checksum after hashing g_247 : C57D94EA +...checksum after hashing g_322 : ABBF388D +before stmt(183): checksum = ABBF388D +...checksum after hashing g_4 : 99F8B879 +...checksum after hashing g_87 : D383031 +...checksum after hashing g_101 : 1348953C +...checksum after hashing g_186 : DC7F66CD +...checksum after hashing g_247 : D5F4AD9F +...checksum after hashing g_322 : 2B12855A +before stmt(185): checksum = 2B12855A +...checksum after hashing g_4 : 99F8B879 +...checksum after hashing g_87 : D383031 +...checksum after hashing g_101 : 1348953C +...checksum after hashing g_186 : DC7F66CD +...checksum after hashing g_247 : D5F4AD9F +...checksum after hashing g_322 : 2B12855A +checksum = 2b12855a diff --git a/src/tests/csmith/rand26.c b/src/tests/csmith/rand26.c new file mode 100644 index 0000000..21101fb --- /dev/null +++ b/src/tests/csmith/rand26.c @@ -0,0 +1,101 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static int g_2 = 1L; +static int *g_9 = &g_2; +static int **g_8 = &g_9; +static signed char func_1(void); +static signed char func_1(void) +{ + step_hash(5); + for (g_2 = 0; (g_2 > (-6)); g_2 -= 1) + { + int *l_5 = &g_2; + int **l_6 = (void*)0; + int **l_7 = &l_5; + step_hash(4); + (*l_7) = l_5; + } + step_hash(6); + (**g_8) = (g_8 != &g_9); + step_hash(7); + return g_2; +} +void csmith_compute_hash(void) +{ + transparent_crc(g_2, "g_2", print_hash_value); +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand26.expect b/src/tests/csmith/rand26.expect new file mode 100644 index 0000000..8148335 --- /dev/null +++ b/src/tests/csmith/rand26.expect @@ -0,0 +1,20 @@ +...checksum after hashing g_2 : 99F8B879 +before stmt(5): checksum = 99F8B879 +...checksum after hashing g_2 : 2144DF1C +before stmt(4): checksum = 2144DF1C +...checksum after hashing g_2 : FFFFFFFF +before stmt(4): checksum = FFFFFFFF +...checksum after hashing g_2 : 4743989A +before stmt(4): checksum = 4743989A +...checksum after hashing g_2 : 55F63774 +before stmt(4): checksum = 55F63774 +...checksum after hashing g_2 : ED4A5011 +before stmt(4): checksum = ED4A5011 +...checksum after hashing g_2 : 709D68A8 +before stmt(4): checksum = 709D68A8 +...checksum after hashing g_2 : C8210FCD +before stmt(6): checksum = C8210FCD +...checksum after hashing g_2 : 2144DF1C +before stmt(7): checksum = 2144DF1C +...checksum after hashing g_2 : 2144DF1C +checksum = 2144df1c diff --git a/src/tests/csmith/rand27.c b/src/tests/csmith/rand27.c new file mode 100644 index 0000000..1538fcc --- /dev/null +++ b/src/tests/csmith/rand27.c @@ -0,0 +1,248 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static unsigned char g_9 = 0xAAL; +static int g_63 = 0x8400B8F3L; +static int *g_62 = &g_63; +static int **g_154 = &g_62; +static int ***g_153 = &g_154; +static int g_232 = 0x812E1121L; +static short func_1(void); +static short func_4(unsigned char p_5, short p_6, signed char p_7, int p_8); +static signed char func_12(unsigned p_13, unsigned short p_14, int p_15); +static unsigned func_20(unsigned char p_21, unsigned char p_22, int p_23, unsigned char p_24); +static unsigned func_25(unsigned short p_26, signed char p_27, unsigned p_28, unsigned p_29); +static unsigned short func_32(unsigned short p_33); +static unsigned short func_38(unsigned short p_39, unsigned p_40, unsigned p_41, int p_42); +static int func_45(int p_46, int p_47, unsigned p_48, unsigned p_49); +static unsigned func_51(short p_52, short p_53); +static short func_56(int p_57, unsigned short p_58); +static short func_1(void) +{ + unsigned char l_16 = 0x7CL; + int ***l_227 = &g_154; + unsigned l_228 = 4UL; + unsigned char l_229 = 0UL; + short l_230 = 0xDE1BL; + int *l_231 = &g_232; + step_hash(113); + l_229 &= ((0UL && ((((signed char)(func_4(g_9, ((signed char)func_12(g_9, l_16, g_9) * (signed char)g_9), ((((void*)0 != l_227) <= l_16) != l_16), l_228) & g_9) << (signed char)g_9) | 0xADL) >= 0xB327L)) < l_228); + step_hash(114); + (*l_231) ^= (((((g_63 >= g_63) & 0x74C3L) >= ((((void*)0 == (*g_154)) >= func_32(func_20(g_63, func_32(g_9), l_230, g_9))) < (-1L))) & (***l_227)) > 9UL); + step_hash(115); + return g_232; +} +static short func_4(unsigned char p_5, short p_6, signed char p_7, int p_8) +{ + step_hash(110); + (*g_154) = (**g_153); + step_hash(111); + (***g_153) &= 0xB0F42965L; + step_hash(112); + return g_9; +} +static signed char func_12(unsigned p_13, unsigned short p_14, int p_15) +{ + signed char l_17 = 0x6EL; + int *l_207 = &g_63; + step_hash(107); + if (((l_17 < ((int)0x3051EBF0L % (int)func_20((func_25(((unsigned short)func_32(g_9) + (unsigned short)((short)(~((((unsigned char)(func_38(p_15, ((short)g_9 >> (short)(l_17 & 0x1718BC69L)), g_9, l_17) ^ p_13) / (unsigned char)0xA5L) && l_17) <= 0x74ABL)) * (short)0x1B3DL)), l_17, p_13, l_17) < 0x7F559297L), g_9, l_17, p_13))) < p_15)) + { + int ***l_205 = &g_154; + int l_206 = 4L; + step_hash(95); + (**g_154) = p_14; + step_hash(96); + l_206 &= (((short)0L % (short)g_63) != ((void*)0 == l_205)); + step_hash(97); + l_207 = (**g_153); + step_hash(98); + (*l_207) = (p_13 >= ((unsigned short)p_13 + (unsigned short)((*l_207) == ((unsigned short)((int)((short)((unsigned short)(((-1L) && (*l_207)) && 1UL) << (unsigned short)((((unsigned char)((int)(((0x53C7L == 0xA15FL) != ((signed char)0x1AL - (signed char)(***l_205))) && (***l_205)) - (int)0L) * (unsigned char)8L) & 0UL) | g_63)) % (short)p_14) - (int)g_9) / (unsigned short)g_9)))); + } + else + { + int l_224 = 3L; + int l_225 = 0x5B180E96L; + step_hash(100); + l_225 = (l_224 || p_13); + step_hash(106); + if (l_224) + { + short l_226 = (-1L); + step_hash(102); + (*l_207) = l_226; + } + else + { + step_hash(104); + (*g_62) = (p_15 & p_15); + step_hash(105); + return g_9; + } + } + step_hash(108); + return (*l_207); +} +static unsigned func_20(unsigned char p_21, unsigned char p_22, int p_23, unsigned char p_24) +{ + int l_98 = 0x56207CCBL; + step_hash(92); + for (p_24 = (-10); (p_24 <= 50); p_24 += 9) + { + unsigned short l_97 = 4UL; + int **l_102 = &g_62; + int ***l_101 = &l_102; + unsigned short l_141 = 0x77CCL; + int l_155 = 0x3AF947C6L; + } + step_hash(93); + return l_98; +} +static unsigned func_25(unsigned short p_26, signed char p_27, unsigned p_28, unsigned p_29) +{ + int *l_86 = &g_63; + int **l_88 = &l_86; + int ***l_87 = &l_88; + step_hash(23); + l_86 = &g_63; + step_hash(24); + (*l_87) = &l_86; + step_hash(25); + return (*l_86); +} +static unsigned short func_32(unsigned short p_33) +{ + step_hash(3); + return g_9; +} +static unsigned short func_38(unsigned short p_39, unsigned p_40, unsigned p_41, int p_42) +{ + short l_50 = (-7L); + unsigned l_61 = 0x4F509E13L; + int l_82 = 0x75E0AD58L; + int **l_83 = (void*)0; + int **l_84 = (void*)0; + int *l_85 = &g_63; + step_hash(18); + l_82 &= func_45(func_32(l_50), l_50, l_50, func_51(p_39, ((signed char)(0x8FC7L <= func_56(g_9, ((g_9 | ((unsigned short)p_41 / (unsigned short)l_61)) < g_9))) / (signed char)(-5L)))); + step_hash(19); + l_85 = &l_82; + step_hash(20); + (*l_85) &= (*g_62); + step_hash(21); + return p_39; +} +static int func_45(int p_46, int p_47, unsigned p_48, unsigned p_49) +{ + int **l_76 = &g_62; + short l_79 = (-2L); + step_hash(14); + (*l_76) = &g_63; + step_hash(15); + (*l_76) = &g_63; + step_hash(16); + (**l_76) = ((signed char)l_79 * (signed char)(+((short)(**l_76) << (short)10))); + step_hash(17); + return p_46; +} +static unsigned func_51(short p_52, short p_53) +{ + int *l_65 = (void*)0; + int l_75 = 0x07F7A796L; + step_hash(9); + l_65 = &g_63; + step_hash(10); + (*l_65) ^= p_53; + step_hash(11); + l_75 &= ((-(signed char)((signed char)((unsigned char)func_32(p_52) + (unsigned char)((((unsigned)0xBA832A49L % (unsigned)0x64ADB5D2L) > ((unsigned short)((&g_63 == l_65) < ((0x2A1DD6B9L <= (*g_62)) ^ func_32(p_52))) % (unsigned short)(*l_65))) & p_53)) << (signed char)g_63)) < (*l_65)); + step_hash(12); + return g_63; +} +static short func_56(int p_57, unsigned short p_58) +{ + int **l_64 = &g_62; + step_hash(6); + (*l_64) = g_62; + step_hash(7); + return g_63; +} +void csmith_compute_hash(void) +{ + transparent_crc(g_9, "g_9", print_hash_value); + transparent_crc(g_63, "g_63", print_hash_value); + transparent_crc(g_232, "g_232", print_hash_value); +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand27.expect b/src/tests/csmith/rand27.expect new file mode 100644 index 0000000..b7093bb --- /dev/null +++ b/src/tests/csmith/rand27.expect @@ -0,0 +1,32 @@ +...checksum after hashing g_9 : 392267D +...checksum after hashing g_63 : EBE475F5 +...checksum after hashing g_232 : 5BDE25AC +before stmt(113): checksum = 5BDE25AC +...checksum after hashing g_9 : 392267D +...checksum after hashing g_63 : EBE475F5 +...checksum after hashing g_232 : 5BDE25AC +before stmt(114): checksum = 5BDE25AC +...checksum after hashing g_9 : 392267D +...checksum after hashing g_63 : EBE475F5 +...checksum after hashing g_232 : 5BDE25AC +before stmt(3): checksum = 5BDE25AC +...checksum after hashing g_9 : 392267D +...checksum after hashing g_63 : EBE475F5 +...checksum after hashing g_232 : 5BDE25AC +before stmt(92): checksum = 5BDE25AC +...checksum after hashing g_9 : 392267D +...checksum after hashing g_63 : EBE475F5 +...checksum after hashing g_232 : 5BDE25AC +before stmt(93): checksum = 5BDE25AC +...checksum after hashing g_9 : 392267D +...checksum after hashing g_63 : EBE475F5 +...checksum after hashing g_232 : 5BDE25AC +before stmt(3): checksum = 5BDE25AC +...checksum after hashing g_9 : 392267D +...checksum after hashing g_63 : EBE475F5 +...checksum after hashing g_232 : 5BDE25AC +before stmt(115): checksum = 5BDE25AC +...checksum after hashing g_9 : 392267D +...checksum after hashing g_63 : EBE475F5 +...checksum after hashing g_232 : 5BDE25AC +checksum = 5bde25ac diff --git a/src/tests/csmith/rand28.c b/src/tests/csmith/rand28.c new file mode 100644 index 0000000..8ec22ef --- /dev/null +++ b/src/tests/csmith/rand28.c @@ -0,0 +1,769 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static int g_2 = (-1L); +static int **g_50 = (void*)0; +static int g_58 = (-4L); +static signed char g_149 = (-1L); +static int *g_197 = &g_58; +static int g_232 = 1L; +static int g_263 = (-1L); +static int *g_280 = &g_2; +static int ***g_568 = (void*)0; +static int g_585 = 0xF8CFA4ABL; +static unsigned func_1(void); +static unsigned short func_7(int p_8); +static int func_9(short p_10, unsigned p_11, unsigned p_12, unsigned p_13, unsigned short p_14); +static unsigned func_16(unsigned char p_17, unsigned char p_18); +static int func_21(signed char p_22, unsigned p_23); +static signed char func_27(signed char p_28); +static int * func_32(int * p_33, int ** p_34, int * p_35, int ** p_36, unsigned short p_37); +static int * func_38(int p_39, int * p_40, unsigned p_41, int ** p_42); +static int * func_43(unsigned p_44, unsigned short p_45); +static unsigned short func_51(int * p_52, int * p_53, int * p_54, int * p_55, unsigned short p_56); +static unsigned func_1(void) +{ + unsigned l_590 = 1UL; + int ***l_593 = &g_50; + int *l_610 = &g_58; + int *l_616 = &g_232; + step_hash(375); + for (g_2 = (-13); (g_2 > (-9)); g_2 += 2) + { + unsigned char l_15 = 8UL; + int l_24 = (-1L); + int *l_584 = &g_585; + int ***l_596 = &g_50; + int l_602 = 0xFAFA2276L; + signed char l_605 = 0L; + int *l_607 = &g_58; + int *l_613 = (void*)0; + } + step_hash(376); + return (*l_610); +} +static unsigned short func_7(int p_8) +{ + int ***l_571 = (void*)0; + signed char l_576 = 0x0BL; + int l_577 = (-1L); + int *l_578 = &l_577; + short l_579 = 0xC392L; + step_hash(338); + l_577 |= ((signed char)(((unsigned short)(!g_232) >> (unsigned short)4) == (g_568 != &g_50)) * (signed char)(((func_9(p_8, ((signed char)((void*)0 == l_571) - (signed char)(p_8 | (g_149 < (((short)p_8 << (short)p_8) | p_8)))), p_8, g_232, g_2) < 1L) || l_576) && p_8)); + step_hash(339); + (*l_578) &= (-2L); + step_hash(340); + (*l_578) = l_579; + step_hash(345); + for (g_232 = 0; (g_232 <= (-15)); g_232 -= 6) + { + step_hash(344); + (*l_578) ^= ((unsigned short)8UL >> (unsigned short)0); + } + step_hash(346); + return g_232; +} +static int func_9(short p_10, unsigned p_11, unsigned p_12, unsigned p_13, unsigned short p_14) +{ + step_hash(336); + return g_2; +} +static unsigned func_16(unsigned char p_17, unsigned char p_18) +{ + int *l_523 = &g_58; + step_hash(322); + l_523 = l_523; + step_hash(323); + g_232 |= (*l_523); + step_hash(334); + if ((p_17 ^ (((unsigned char)(((unsigned)(*l_523) / (unsigned)p_17) & ((unsigned short)(p_18 < g_232) << (unsigned short)((unsigned short)((*l_523) == (g_149 >= ((signed char)(((int)((short)(func_51(l_523, l_523, &g_2, l_523, p_17) | g_58) * (short)(*l_523)) - (int)0x5ACF4406L) < 1L) >> (signed char)0))) % (unsigned short)g_2))) / (unsigned char)g_263) <= p_17))) + { + unsigned l_538 = 0x7B8C2826L; + int *l_550 = &g_58; + int ***l_558 = &g_50; + step_hash(325); + (*l_523) = l_538; + step_hash(330); + if (((unsigned short)g_149 << (unsigned short)5)) + { + int ***l_557 = (void*)0; + int l_559 = 0xEA661446L; + step_hash(327); + (*l_550) = ((unsigned char)(((-1L) != ((signed char)((unsigned short)(*l_550) * (unsigned short)0x8EC4L) - (signed char)p_18)) <= l_559) + (unsigned char)p_17); + } + else + { + int *l_560 = &g_263; + int **l_561 = &l_550; + step_hash(329); + (*l_561) = l_560; + } + step_hash(331); + return p_18; + } + else + { + step_hash(333); + return g_2; + } +} +static int func_21(signed char p_22, unsigned p_23) +{ + int *l_248 = &g_232; + int *l_259 = &g_58; + signed char l_296 = (-10L); + int *l_353 = &g_2; + short l_363 = (-3L); + int **l_364 = &l_259; + int l_371 = 0x30767012L; + short l_380 = 0x4607L; + unsigned l_406 = 0x5528EACBL; + unsigned l_411 = 0x6C442C3BL; + int l_460 = (-9L); + int **l_481 = &g_197; + step_hash(181); + for (p_23 = 0; (p_23 == 24); p_23++) + { + int *l_249 = &g_232; + int ***l_258 = &g_50; + int **l_293 = &g_280; + } + step_hash(210); + if ((((((unsigned char)g_58 + (unsigned char)g_2) > 0L) || p_22) != l_296)) + { + short l_298 = 0x4A64L; + int *l_331 = &g_58; + step_hash(206); + if ((*l_248)) + { + int *l_297 = &g_263; + int **l_307 = (void*)0; + int **l_308 = (void*)0; + int **l_309 = &g_280; + step_hash(184); + (*l_309) = func_32(l_297, &g_280, &g_58, &l_297, p_22); + step_hash(202); + for (g_232 = 12; (g_232 >= 7); g_232 -= 8) + { + int l_316 = 0L; + int *l_332 = (void*)0; + step_hash(201); + if ((g_58 ^ (*l_259))) + { + int *l_329 = &g_58; + step_hash(193); + for (g_263 = (-13); (g_263 < (-3)); ++g_263) + { + int *l_330 = &g_232; + step_hash(192); + (*l_259) = ((short)l_316 * (short)((unsigned short)func_51((*l_309), l_248, &g_2, &g_232, (*l_248)) / (unsigned short)p_23)); + } + step_hash(194); + l_332 = &l_316; + step_hash(195); + (*l_329) = ((-1L) && (*l_332)); + } + else + { + int *l_333 = &l_316; + step_hash(197); + l_333 = l_248; + step_hash(198); + if (p_22) + continue; + step_hash(199); + if (p_22) + continue; + step_hash(200); + l_316 |= (0x7D9984E9L && ((unsigned short)(((short)((((((unsigned char)251UL << (unsigned char)6) && 1UL) < ((unsigned)(p_22 & ((0x0B31L <= (+p_22)) >= func_51((*l_309), l_333, l_331, &g_2, p_23))) % (unsigned)p_22)) | p_22) && 0x6EC9L) - (short)(*l_259)) > 248UL) / (unsigned short)(*l_259))); + } + } + } + else + { + step_hash(204); + l_331 = l_331; + step_hash(205); + (*l_248) = ((~(g_232 || (p_23 < ((void*)0 != l_259)))) ^ ((*l_331) != p_23)); + } + step_hash(207); + (*g_197) = (((unsigned char)(*l_248) << (unsigned char)g_58) > (((void*)0 != l_248) <= ((((((short)g_232 + (short)g_232) <= (*l_331)) | ((unsigned)g_2 - (unsigned)(*l_259))) > 0L) == (-1L)))); + } + else + { + step_hash(209); + (*l_248) = (-(unsigned)(~0xADD14F1AL)); + } + step_hash(318); + if ((((signed char)((((unsigned char)(*l_248) >> (unsigned char)(g_58 < 0UL)) ^ 0x4957L) > ((func_51(l_248, l_259, l_248, l_353, g_149) | g_2) <= g_2)) >> (signed char)g_2) || p_23)) + { + int *l_362 = &g_2; + unsigned short l_377 = 0xD1A0L; + step_hash(212); + (*l_364) = func_32(l_248, l_364, l_362, &l_248, (*l_362)); + step_hash(213); + (*l_248) = ((8L < (l_362 == (void*)0)) > (((signed char)(*l_362) + (signed char)(((short)((unsigned char)l_371 >> (unsigned char)3) % (short)(-(short)(((*l_362) >= ((unsigned short)(((int)(((&g_197 != &g_280) == (**l_364)) >= 1UL) % (int)0x7B2F358DL) == p_22) << (unsigned short)4)) && 0x35L))) > l_377)) <= p_22)); + step_hash(214); + l_380 &= (((((signed char)g_149 >> (signed char)7) ^ g_58) >= (+((void*)0 != l_362))) < p_23); + step_hash(215); + (*l_364) = func_38((g_2 || (((unsigned short)(!((((unsigned char)((unsigned char)(p_23 | ((void*)0 != &l_362)) / (unsigned char)(p_23 ^ p_23)) * (unsigned char)((p_23 ^ g_58) <= p_23)) != g_263) > p_23)) / (unsigned short)0x006DL) & p_22)), l_362, p_22, &l_353); + } + else + { + unsigned short l_397 = 1UL; + int *l_413 = &g_58; + int l_414 = 1L; + int *l_415 = &l_371; + int *l_416 = (void*)0; + int **l_478 = (void*)0; + int *l_479 = (void*)0; + step_hash(217); + (*l_248) ^= (*l_259); + step_hash(229); + for (g_232 = 2; (g_232 != 18); g_232++) + { + step_hash(221); + (**l_364) |= p_23; + step_hash(228); + for (p_23 = 0; (p_23 == 24); p_23 += 4) + { + int l_393 = 0x67CB0065L; + int *l_394 = &l_371; + step_hash(225); + (**l_364) &= 0xB77967D7L; + step_hash(226); + (*l_394) ^= ((unsigned short)(*l_259) << (unsigned short)((*l_248) < l_393)); + step_hash(227); + (*l_364) = &g_58; + } + } + step_hash(317); + if ((*g_197)) + { + int *l_412 = &g_2; + int ***l_446 = &l_364; + step_hash(231); + l_397 = p_23; + step_hash(232); + l_414 &= ((signed char)0x70L * (signed char)((signed char)((unsigned char)(+p_22) * (unsigned char)(((short)l_406 % (short)(((signed char)g_232 - (signed char)(2L || 0x9639L)) ^ ((short)((p_23 >= func_51(&g_263, l_412, l_413, l_413, (*l_353))) || 0L) % (short)g_2))) & 0x35L)) * (signed char)g_263)); + step_hash(292); + if ((*l_248)) + { + int **l_421 = &l_412; + int l_453 = (-9L); + step_hash(267); + if (p_23) + { + step_hash(235); + (*l_413) = 1L; + step_hash(246); + if (func_51(l_415, (*l_364), (*l_364), (*l_364), g_2)) + { + step_hash(237); + (**l_364) = (**l_364); + step_hash(238); + (*l_364) = l_416; + step_hash(239); + (*l_415) ^= ((unsigned short)func_51(&l_414, (*l_364), func_38(((signed char)((void*)0 == l_421) - (signed char)1UL), &l_414, ((signed char)1L + (signed char)(((*l_421) != (*l_364)) || p_22)), &l_353), &l_414, (*l_412)) + (unsigned short)p_23); + step_hash(240); + (*l_364) = (void*)0; + } + else + { + int ***l_424 = (void*)0; + int ***l_425 = &l_364; + step_hash(242); + (**l_364) = ((void*)0 == (*l_421)); + step_hash(243); + (*l_425) = l_421; + step_hash(244); + (*l_259) = (p_23 != (p_22 | (((signed char)((short)((*g_280) < g_263) << (short)(&l_248 == &l_259)) << (signed char)0) < (0x0FC0L == 0x5321L)))); + step_hash(245); + g_263 &= (g_58 || ((~((unsigned char)(0xEBABB2D7L && ((-(unsigned char)p_22) && g_232)) / (unsigned char)((unsigned short)g_232 >> (unsigned short)10))) > p_22)); + } + } + else + { + signed char l_441 = 8L; + int *l_442 = &g_2; + int *l_467 = &g_58; + step_hash(255); + for (l_363 = 0; (l_363 == (-29)); --l_363) + { + signed char l_443 = (-6L); + step_hash(251); + (*l_248) = (4L != ((void*)0 != &g_280)); + step_hash(252); + (*l_413) = (&g_197 != (void*)0); + step_hash(253); + (*l_415) |= (*l_413); + step_hash(254); + (*l_248) |= ((short)(p_22 | ((signed char)(func_51(&l_414, &g_58, l_442, (*l_421), l_443) && 0xBA4620ADL) % (signed char)6L)) / (short)g_58); + } + step_hash(265); + if (func_51(func_38(((signed char)(l_446 == (void*)0) + (signed char)p_22), (**l_446), ((g_58 < g_149) <= 0xB00DE351L), &l_248), (**l_446), &g_58, (*l_421), (*l_442))) + { + short l_447 = 0x578FL; + int *l_452 = &l_414; + step_hash(257); + (*l_248) = l_447; + step_hash(258); + (*l_415) &= ((*g_197) < ((unsigned)((func_51(l_442, (*l_364), func_32((*l_421), l_421, (**l_446), l_421, p_22), (*l_364), (*l_452)) > l_453) && 0x57L) - (unsigned)(*g_280))); + step_hash(259); + g_197 = (*l_364); + } + else + { + step_hash(261); + (**l_364) = ((short)(p_22 ^ (+((int)(*l_442) + (int)((signed char)g_58 - (signed char)g_149)))) - (short)65533UL); + step_hash(262); + (*l_413) = 0x70DE6C0FL; + step_hash(263); + (*l_259) |= ((*g_280) || (0x461B6927L > l_460)); + step_hash(264); + (***l_446) = ((unsigned)(p_22 <= (((unsigned char)func_51(&g_2, l_442, (*l_421), (**l_446), (((unsigned short)((l_467 == (**l_446)) & p_22) << (unsigned short)((p_23 & 1UL) != p_23)) & 0x617B7643L)) - (unsigned char)g_149) <= p_22)) % (unsigned)0xFB529590L); + } + step_hash(266); + (*l_364) = (**l_446); + } + step_hash(272); + if ((g_58 < (p_23 > (p_22 >= 4294967286UL)))) + { + int **l_468 = &l_413; + step_hash(269); + (*l_446) = l_468; + } + else + { + int *l_471 = &g_58; + step_hash(271); + (*l_415) ^= ((unsigned char)(g_232 >= g_232) * (unsigned char)func_51(&g_263, (**l_446), l_471, (**l_446), p_23)); + } + step_hash(273); + (*l_248) = 1L; + } + else + { + int *l_472 = &l_414; + int *l_483 = &l_414; + step_hash(275); + l_472 = (*l_364); + step_hash(291); + for (l_406 = 0; (l_406 == 42); l_406 += 4) + { + int *l_477 = &l_414; + step_hash(285); + for (g_58 = 0; (g_58 != 4); g_58 += 1) + { + unsigned l_480 = 6UL; + int *l_482 = &l_414; + step_hash(282); + g_197 = (*l_364); + step_hash(283); + (*l_248) = func_51((*l_364), l_479, func_38((*g_197), &l_414, l_480, l_481), l_482, g_58); + step_hash(284); + (*l_364) = l_483; + } + step_hash(290); + for (l_460 = 25; (l_460 <= (-8)); --l_460) + { + step_hash(289); + (*l_477) = p_22; + } + } + } + } + else + { + int *l_499 = (void*)0; + int l_508 = (-1L); + step_hash(294); + (**l_481) |= (g_232 > g_232); + step_hash(295); + (*l_415) = (((signed char)g_232 << (signed char)1) != 0x302BL); + step_hash(315); + for (p_22 = 8; (p_22 == 14); p_22++) + { + int *l_497 = &g_232; + signed char l_509 = 0x2EL; + step_hash(313); + for (l_363 = 18; (l_363 == 3); --l_363) + { + unsigned short l_492 = 0x25CFL; + step_hash(302); + (**l_481) ^= l_492; + step_hash(310); + for (l_371 = (-6); (l_371 != (-1)); l_371++) + { + int *l_498 = &l_414; + step_hash(306); + (*l_413) ^= (p_22 & p_22); + step_hash(307); + (*l_498) ^= ((0xE5L && ((short)func_51(l_497, l_498, l_499, l_498, l_492) >> (short)p_22)) == g_232); + step_hash(308); + (**l_481) = ((unsigned char)((((l_492 > g_2) || (l_497 != l_497)) <= (((g_263 != (g_232 < (0x08L > (((int)(g_149 >= p_22) + (int)l_508) | g_2)))) & (*l_497)) <= 0x6FL)) > (*g_197)) % (unsigned char)0xCEL); + step_hash(309); + (*l_364) = l_498; + } + step_hash(311); + if (l_509) + continue; + step_hash(312); + if ((*g_280)) + break; + } + step_hash(314); + (*l_481) = &l_508; + } + step_hash(316); + (*l_481) = (*l_481); + } + } + step_hash(319); + g_58 &= (*l_353); + step_hash(320); + return (*g_280); +} +static signed char func_27(signed char p_28) +{ + int **l_29 = (void*)0; + int *l_31 = &g_2; + int **l_30 = &l_31; + int l_235 = 0xC0EB3422L; + step_hash(5); + (*l_30) = (void*)0; + step_hash(136); + (*l_30) = func_32(func_38(p_28, func_43(((p_28 & ((unsigned char)((unsigned short)(g_50 == &l_31) + (unsigned short)func_51((*l_30), (*l_30), (*l_30), &g_2, p_28)) + (unsigned char)p_28)) == p_28), g_2), p_28, &l_31), l_30, &g_2, &g_197, p_28); + step_hash(137); + l_235 ^= p_28; + step_hash(138); + (*g_197) = ((short)((unsigned short)((*l_30) != (void*)0) % (unsigned short)((p_28 || (&g_197 != (void*)0)) & 65526UL)) % (short)g_2); + step_hash(139); + return (**l_30); +} +static int * func_32(int * p_33, int ** p_34, int * p_35, int ** p_36, unsigned short p_37) +{ + int *l_233 = &g_2; + int *l_234 = &g_2; + step_hash(133); + g_232 ^= (func_51(&g_2, l_233, (*p_34), l_234, p_37) <= 0x94L); + step_hash(134); + (*p_34) = (*p_36); + step_hash(135); + return l_233; +} +static int * func_38(int p_39, int * p_40, unsigned p_41, int ** p_42) +{ + int *l_231 = &g_232; + step_hash(129); + (*l_231) |= (*g_197); + step_hash(130); + (*p_42) = (*p_42); + step_hash(131); + return (*p_42); +} +static int * func_43(unsigned p_44, unsigned short p_45) +{ + signed char l_63 = 0x79L; + int *l_72 = &g_58; + int *l_78 = &g_58; + int *l_118 = &g_58; + unsigned char l_123 = 0xE1L; + unsigned l_156 = 0x28D9C3D7L; + step_hash(11); + (*l_72) = ((unsigned char)((unsigned short)(l_63 != ((unsigned short)p_44 % (unsigned short)((unsigned)(~((unsigned char)0x03L >> (unsigned char)1)) + (unsigned)(((-1L) > ((int)(p_44 < (4294967294UL != p_44)) % (int)0xF6679856L)) & 9UL)))) + (unsigned short)p_44) >> (unsigned char)l_63); + step_hash(124); + if (((void*)0 != &g_2)) + { + int **l_76 = &l_72; + int l_77 = 0L; + short l_86 = 0xE086L; + int *l_94 = &g_58; + unsigned l_120 = 0x3E316ED2L; + step_hash(24); + for (g_58 = (-30); (g_58 != 19); ++g_58) + { + int **l_75 = (void*)0; + step_hash(23); + if ((l_75 != l_76)) + { + step_hash(17); + l_72 = (void*)0; + step_hash(18); + l_77 ^= func_51(l_72, &g_2, l_72, (*l_76), g_58); + step_hash(19); + l_78 = l_78; + step_hash(20); + (*l_76) = l_78; + } + else + { + step_hash(22); + return &g_2; + } + } + step_hash(73); + if ((func_51((*l_76), (*l_76), l_78, l_78, ((signed char)func_51(l_78, (*l_76), l_72, &g_58, g_58) - (signed char)p_44)) & p_44)) + { + int l_95 = 1L; + int l_119 = (-8L); + step_hash(42); + for (l_63 = 16; (l_63 > 16); l_63 += 4) + { + step_hash(41); + if (p_45) + { + int l_83 = 1L; + step_hash(30); + (**l_76) ^= p_45; + step_hash(31); + l_86 = (l_83 | (((short)p_45 * (short)(p_45 ^ func_51((*l_76), &l_83, &l_83, (*l_76), g_58))) == p_45)); + step_hash(36); + for (p_45 = (-8); (p_45 >= 23); p_45 += 1) + { + step_hash(35); + (*l_76) = (void*)0; + } + step_hash(37); + return l_72; + } + else + { + int *l_89 = &l_77; + step_hash(39); + (*l_89) &= g_58; + step_hash(40); + if ((*l_72)) + break; + } + } + step_hash(56); + if (g_58) + { + unsigned char l_90 = 255UL; + step_hash(44); + (*l_72) = l_90; + step_hash(45); + (*l_76) = &g_58; + step_hash(46); + (*l_76) = (void*)0; + } + else + { + int *l_91 = &g_2; + int *l_100 = &g_58; + step_hash(48); + l_72 = l_91; + step_hash(49); + (*l_94) = (((unsigned char)254UL % (unsigned char)g_58) <= func_51((*l_76), l_91, &g_2, l_94, l_95)); + step_hash(54); + for (l_77 = 0; (l_77 > (-22)); l_77 -= 5) + { + int *l_101 = &l_77; + step_hash(53); + (*l_100) = ((short)(func_51(l_78, l_100, l_91, l_91, (func_51(l_101, l_100, l_72, l_100, ((unsigned)(((signed char)0xA1L / (signed char)g_2) | 255UL) - (unsigned)p_45)) && (*l_100))) & p_45) / (short)g_58); + } + step_hash(55); + (*l_78) ^= p_44; + } + step_hash(57); + l_119 = ((unsigned char)((((int)((unsigned char)((unsigned char)((unsigned short)((void*)0 != g_50) / (unsigned short)g_2) << (unsigned char)((int)((func_51(l_72, l_118, l_118, l_72, (*l_78)) || p_44) | g_2) - (int)l_95)) / (unsigned char)0x0BL) + (int)4294967294UL) || 0xCCL) < (-2L)) >> (unsigned char)l_95); + } + else + { + short l_121 = 0xB233L; + int *l_126 = &g_58; + step_hash(72); + if (l_120) + { + int *l_122 = &l_77; + int *l_129 = &g_2; + step_hash(60); + (*l_76) = l_72; + step_hash(61); + (*l_122) ^= (((l_121 >= 1UL) < g_58) || g_2); + step_hash(62); + (*l_122) &= ((((p_44 < l_123) <= (((short)0x3792L * (short)l_121) > ((0x0DBEA549L >= ((-8L) && ((l_126 != l_122) && (*l_72)))) >= g_58))) == 252UL) ^ 1UL); + step_hash(68); + for (l_120 = 0; (l_120 < 56); l_120 += 2) + { + step_hash(66); + (*l_126) = (p_45 < g_2); + step_hash(67); + (*l_76) = l_129; + } + } + else + { + step_hash(70); + (*l_78) ^= (0xD077L < p_45); + step_hash(71); + (*l_76) = (*l_76); + } + } + step_hash(74); + (*l_94) ^= ((unsigned char)0UL >> (unsigned char)3); + } + else + { + int *l_139 = (void*)0; + int *l_148 = &g_58; + unsigned l_202 = 4294967293UL; + step_hash(123); + for (p_44 = 0; (p_44 != 44); ++p_44) + { + int *l_138 = &g_2; + short l_161 = 0x451BL; + int **l_224 = &l_78; + step_hash(79); + g_149 |= (((((unsigned char)(((signed char)(func_51(l_138, l_139, l_139, l_78, ((unsigned)((unsigned char)((unsigned short)((unsigned char)func_51(l_148, l_148, l_118, l_138, g_2) >> (unsigned char)3) * (unsigned short)g_2) + (unsigned char)p_45) - (unsigned)0x0E7D168DL)) || g_58) >> (signed char)4) | 65535UL) << (unsigned char)5) >= g_58) > g_58) & (*l_148)); + step_hash(108); + if (((func_51(l_148, l_148, l_78, l_118, p_44) | ((((((signed char)((unsigned char)(((unsigned char)(246UL | (*l_78)) >> (unsigned char)0) > ((g_149 != (*l_138)) > (*l_148))) >> (unsigned char)g_58) + (signed char)(-10L)) == l_156) != 1UL) || (*l_138)) | p_45)) != 255UL)) + { + unsigned l_164 = 0x0DB9FFA4L; + short l_172 = 0x2394L; + int l_173 = 1L; + int **l_190 = &l_139; + step_hash(103); + for (l_123 = 0; (l_123 < 44); l_123++) + { + int *l_169 = (void*)0; + } + step_hash(104); + (*l_148) ^= p_44; + } + else + { + step_hash(106); + (*l_78) = ((!g_149) || 0L); + step_hash(107); + (*l_118) = (*l_138); + } + step_hash(121); + for (p_45 = (-26); (p_45 != 32); p_45 += 8) + { + int *l_193 = &g_2; + int ***l_194 = &g_50; + step_hash(112); + (*l_118) = (func_51(l_118, &g_58, l_148, l_193, (*l_193)) || (func_51(l_138, l_139, l_148, l_193, (*l_72)) < p_45)); + step_hash(113); + (*l_194) = &l_138; + step_hash(114); + l_202 = (((((unsigned short)func_51(l_72, (*g_50), g_197, l_138, (((short)(*l_138) << (short)2) ^ ((int)0x70531B4AL - (int)g_58))) >> (unsigned short)(g_2 || 0x9095L)) || (*g_197)) == 0x3E1635C7L) || g_2); + step_hash(120); + for (l_63 = (-23); (l_63 == 29); l_63 += 1) + { + int *l_221 = &g_2; + int *l_222 = &g_58; + int l_223 = 0x2AF5FF99L; + step_hash(118); + (*g_50) = l_138; + step_hash(119); + l_223 &= (((unsigned char)((short)((short)(((unsigned short)(((unsigned short)((unsigned char)g_2 / (unsigned char)((unsigned)((signed char)((*l_118) < (p_44 == ((void*)0 == l_221))) >> (signed char)0) % (unsigned)func_51(l_118, l_138, (*g_50), l_222, p_45))) * (unsigned short)p_44) < p_45) % (unsigned short)0x59C8L) && 4294967293UL) * (short)(***l_194)) >> (short)g_149) % (unsigned char)p_44) == g_58); + } + } + step_hash(122); + (*l_224) = l_72; + } + } + step_hash(125); + l_118 = l_118; + step_hash(126); + (*g_197) |= ((signed char)((unsigned char)(0L == ((p_45 <= 4294967295UL) ^ (((short)p_44 << (short)5) == p_44))) - (unsigned char)(l_72 != l_72)) + (signed char)((void*)0 != l_118)); + step_hash(127); + return &g_2; +} +static unsigned short func_51(int * p_52, int * p_53, int * p_54, int * p_55, unsigned short p_56) +{ + int *l_57 = &g_58; + step_hash(7); + l_57 = &g_2; + step_hash(8); + l_57 = p_53; + step_hash(9); + return g_58; +} +void csmith_compute_hash(void) +{ + transparent_crc(g_2, "g_2", print_hash_value); + transparent_crc(g_58, "g_58", print_hash_value); + transparent_crc(g_149, "g_149", print_hash_value); + transparent_crc(g_232, "g_232", print_hash_value); + transparent_crc(g_263, "g_263", print_hash_value); + transparent_crc(g_585, "g_585", print_hash_value); +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand28.expect b/src/tests/csmith/rand28.expect new file mode 100644 index 0000000..516452e --- /dev/null +++ b/src/tests/csmith/rand28.expect @@ -0,0 +1,21 @@ +...checksum after hashing g_2 : FFFFFFFF +...checksum after hashing g_58 : 33F170F2 +...checksum after hashing g_149 : 3516F869 +...checksum after hashing g_232 : 2E2A536C +...checksum after hashing g_263 : 5348E64A +...checksum after hashing g_585 : 95FD403 +before stmt(375): checksum = 95FD403 +...checksum after hashing g_2 : B5294047 +...checksum after hashing g_58 : 645E65BD +...checksum after hashing g_149 : 301CB5E8 +...checksum after hashing g_232 : 890880A4 +...checksum after hashing g_263 : 807EDBA1 +...checksum after hashing g_585 : B25476E2 +before stmt(376): checksum = B25476E2 +...checksum after hashing g_2 : B5294047 +...checksum after hashing g_58 : 645E65BD +...checksum after hashing g_149 : 301CB5E8 +...checksum after hashing g_232 : 890880A4 +...checksum after hashing g_263 : 807EDBA1 +...checksum after hashing g_585 : B25476E2 +checksum = b25476e2 diff --git a/src/tests/csmith/rand29.c b/src/tests/csmith/rand29.c new file mode 100644 index 0000000..79c531d --- /dev/null +++ b/src/tests/csmith/rand29.c @@ -0,0 +1,1103 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static signed char g_6 = 0xACL; +static int g_48 = 0L; +static int *g_47 = &g_48; +static int g_74 = 0L; +static short g_111 = 0x01C9L; +static int **g_158 = &g_47; +static int ***g_157 = &g_158; +static unsigned g_236 = 0x61C8C171L; +static int g_428 = 0L; +static unsigned g_429 = 1UL; +static signed char g_565 = (-1L); +static unsigned g_567 = 0UL; +static int *g_658 = (void*)0; +static int *g_804 = &g_48; +static short func_1(void); +static unsigned func_18(short p_19, unsigned char p_20, int p_21); +static unsigned short func_22(unsigned p_23); +static unsigned short func_26(signed char p_27, signed char p_28); +static signed char func_29(unsigned char p_30, unsigned char p_31, unsigned short p_32, int p_33, signed char p_34); +static int * func_36(signed char p_37, int * p_38, signed char p_39, int * p_40, int * p_41); +static int * func_42(int * p_43, int p_44, unsigned p_45, int * p_46); +static int * func_54(int * p_55); +static int * func_56(int * p_57); +static int * func_58(unsigned p_59, unsigned short p_60, unsigned short p_61, unsigned short p_62, int * p_63); +static short func_1(void) +{ + unsigned l_15 = 0x0D193E05L; + unsigned char l_35 = 0x38L; + int l_803 = (-1L); + int l_807 = (-6L); + int *l_808 = &g_48; + step_hash(560); + l_803 ^= ((int)(((short)g_6 << (short)(((int)(+((signed char)0xF0L >> (signed char)3)) + (int)(g_6 != ((unsigned short)(~(g_6 < ((short)l_15 * (short)(1UL || ((signed char)(func_18((65534UL & func_22(((unsigned short)func_26(func_29((l_15 > (g_6 < g_6)), l_35, l_35, g_6, l_35), g_565) << (unsigned short)g_428))), g_567, l_35) != 0L) - (signed char)g_6))))) / (unsigned short)l_15))) ^ l_15)) <= 0xC2L) % (int)l_15); + step_hash(561); + g_804 = &l_803; + step_hash(562); + l_807 &= (func_26(g_111, l_803) && ((l_35 < l_35) != (&l_803 != &l_803))); + step_hash(563); + l_808 = &l_803; + step_hash(564); + return g_236; +} +static unsigned func_18(short p_19, unsigned char p_20, int p_21) +{ + int *l_701 = &g_74; + unsigned short l_735 = 65535UL; + int l_744 = 0x6E4522F5L; + unsigned char l_799 = 0xD5L; + step_hash(479); + (*l_701) = func_22(p_21); + step_hash(558); + for (g_567 = 0; (g_567 >= 8); g_567 += 6) + { + int *l_704 = &g_48; + int l_741 = 0xCB3C2ED5L; + short l_763 = (-1L); + int l_789 = (-9L); + int l_794 = 0x8BBC5121L; + } + step_hash(559); + return g_567; +} +static unsigned short func_22(unsigned p_23) +{ + signed char l_693 = 0x39L; + int *l_700 = &g_48; + step_hash(475); + l_693 = ((unsigned)p_23 - (unsigned)0x71ED8943L); + step_hash(476); + (*l_700) ^= (((g_565 != ((unsigned short)(g_111 > 0x07B7L) / (unsigned short)((unsigned char)p_23 >> (unsigned char)5))) > (l_700 == l_700)) == 0x08E1C68EL); + step_hash(477); + return (*l_700); +} +static unsigned short func_26(signed char p_27, signed char p_28) +{ + int *l_672 = &g_74; + int ***l_682 = &g_158; + int **l_683 = (void*)0; + int **l_684 = &g_47; + step_hash(469); + if (p_27) + { + int **l_673 = &l_672; + step_hash(463); + (*l_673) = l_672; + step_hash(464); + return p_28; + } + else + { + int l_674 = 7L; + int l_677 = 0x05A10D9DL; + step_hash(466); + (*l_672) = l_674; + step_hash(467); + (*l_672) = (*l_672); + step_hash(468); + g_48 &= (*l_672); + } + step_hash(470); + (*l_672) |= ((void*)0 == l_682); + step_hash(471); + (*l_684) = l_672; + step_hash(472); + (**l_684) = ((unsigned short)((unsigned short)0x18E0L << (unsigned short)5) + (unsigned short)((*g_47) != (*l_672))); + step_hash(473); + return p_27; +} +static signed char func_29(unsigned char p_30, unsigned char p_31, unsigned short p_32, int p_33, signed char p_34) +{ + int l_51 = (-7L); + int l_68 = 0L; + unsigned char l_69 = 0UL; + int **l_649 = &g_47; + int *l_670 = (void*)0; + int l_671 = 0x7E1E53B8L; + step_hash(450); + (*l_649) = func_36(g_6, func_42(g_47, p_34, ((unsigned)(l_51 != ((unsigned char)l_51 * (unsigned char)9UL)) / (unsigned)0x09B95520L), func_54(func_56(func_58(p_34, ((signed char)((unsigned char)(l_68 || l_51) >> (unsigned char)l_68) - (signed char)p_30), l_69, l_68, &g_48)))), l_51, (**g_157), &l_51); + step_hash(458); + if ((((short)((unsigned char)((g_74 && ((unsigned short)0x3A7AL >> (unsigned short)0)) <= p_31) / (unsigned char)(**l_649)) % (short)((**l_649) & p_32)) || (l_649 == (void*)0))) + { + int *l_659 = (void*)0; + step_hash(452); + (*g_47) = ((int)p_30 % (int)((*g_47) && (**l_649))); + step_hash(453); + l_659 = func_56(g_658); + } + else + { + unsigned char l_660 = 255UL; + int ***l_665 = &l_649; + step_hash(455); + (*g_47) = ((!l_660) && (l_660 | ((signed char)((signed char)g_6 + (signed char)(((g_74 <= ((void*)0 != l_665)) != 0x2A82DE67L) || (0UL != p_30))) << (signed char)(***l_665)))); + step_hash(456); + (**l_665) = func_42((**l_665), p_32, g_48, (*l_649)); + step_hash(457); + (**l_665) = (**l_665); + } + step_hash(459); + l_671 ^= (0xEA93L == ((**l_649) >= ((((short)((unsigned)g_428 / (unsigned)p_33) << (short)(**l_649)) | (((*l_649) == (void*)0) == 0xFDL)) & ((*g_47) ^ 0xC1FCB659L)))); + step_hash(460); + return p_30; +} +static int * func_36(signed char p_37, int * p_38, signed char p_39, int * p_40, int * p_41) +{ + int *l_217 = &g_48; + int ***l_302 = (void*)0; + unsigned l_463 = 2UL; + unsigned l_483 = 0xA31BF185L; + int l_484 = 0x817C311DL; + int *l_648 = &l_484; + step_hash(272); + if ((*p_41)) + { + short l_226 = (-9L); + int *l_230 = &g_74; + int **l_263 = &l_230; + unsigned char l_342 = 0xD2L; + unsigned short l_372 = 0x41FBL; + step_hash(72); + (**g_157) = func_54(p_40); + step_hash(151); + if ((*g_47)) + { + step_hash(74); + (***g_157) &= (*p_41); + step_hash(75); + (*p_41) |= ((void*)0 == p_40); + } + else + { + unsigned short l_227 = 1UL; + int *l_280 = &g_74; + step_hash(96); + for (g_74 = 0; (g_74 >= (-20)); g_74 -= 7) + { + short l_223 = 0L; + step_hash(80); + (*p_40) ^= 1L; + step_hash(81); + (*g_158) = l_217; + step_hash(89); + for (p_37 = (-22); (p_37 <= (-26)); p_37 -= 5) + { + signed char l_220 = 0x45L; + step_hash(85); + (***g_157) = (**g_158); + step_hash(86); + (*p_40) = l_220; + step_hash(87); + (*p_40) = (&l_217 != &p_41); + step_hash(88); + if ((***g_157)) + continue; + } + step_hash(95); + for (p_37 = (-24); (p_37 == (-15)); p_37++) + { + step_hash(93); + (*p_40) &= l_223; + } + } + step_hash(150); + if ((l_227 >= (((g_74 == ((((p_39 ^ (!p_39)) > l_226) > ((int)(p_40 == l_230) - (int)0L)) || ((signed char)((((void*)0 != &g_158) && 2L) == p_37) / (signed char)(*l_217)))) < g_111) <= (*l_230)))) + { + step_hash(105); + for (g_111 = (-28); (g_111 >= (-8)); g_111++) + { + int *l_235 = &g_74; + step_hash(101); + (**g_157) = l_235; + step_hash(102); + (*p_40) &= (*g_47); + step_hash(103); + (*p_41) = (-4L); + step_hash(104); + (*l_235) = (***g_157); + } + } + else + { + short l_243 = 0x1E81L; + int *l_260 = &g_74; + step_hash(107); + (*p_38) ^= g_236; + step_hash(148); + if (((unsigned char)(p_39 ^ ((signed char)0x51L / (signed char)(((((unsigned short)p_39 % (unsigned short)l_243) & p_39) || (((unsigned short)((+((unsigned)((g_236 && ((unsigned char)(*l_217) / (unsigned char)((unsigned short)(((int)((short)p_39 >> (short)l_227) - (int)0x9F4295DAL) != (*l_230)) >> (unsigned short)p_39))) != g_74) % (unsigned)0x837247A2L)) && g_74) % (unsigned short)g_111) > l_227)) | l_243))) << (unsigned char)0)) + { + step_hash(113); + if ((g_74 != g_74)) + { + step_hash(110); + return p_38; + } + else + { + int **l_256 = &l_217; + step_hash(112); + (*g_157) = l_256; + } + step_hash(121); + if ((p_37 < (*l_217))) + { + int *l_257 = &g_74; + step_hash(115); + l_257 = (void*)0; + step_hash(116); + (*g_158) = l_230; + } + else + { + step_hash(118); + (*p_41) &= ((int)(*l_217) - (int)g_48); + step_hash(119); + l_260 = (void*)0; + step_hash(120); + (**g_157) = p_38; + } + } + else + { + int l_273 = (-8L); + step_hash(131); + if ((*p_38)) + { + step_hash(124); + (*l_230) ^= ((unsigned char)(g_236 >= g_111) << (unsigned char)4); + step_hash(125); + (*g_158) = func_56((*g_158)); + step_hash(126); + (**l_263) |= (l_263 != (void*)0); + step_hash(127); + (*p_40) = (*p_38); + } + else + { + int ***l_268 = &l_263; + step_hash(129); + (*p_41) ^= (***g_157); + step_hash(130); + (*l_230) = ((unsigned char)253UL - (unsigned char)(((short)(l_268 != &l_263) >> (short)g_236) < 0x22A0L)); + } + step_hash(139); + for (g_48 = 0; (g_48 <= 17); g_48 += 1) + { + unsigned l_271 = 0xDCA30394L; + int *l_272 = &g_48; + step_hash(135); + if ((***g_157)) + break; + step_hash(136); + if (l_271) + break; + step_hash(137); + (*l_263) = func_56(l_272); + step_hash(138); + (*p_38) = l_273; + } + step_hash(140); + (*p_41) |= ((short)(g_48 <= (((!((unsigned char)p_37 % (unsigned char)(**l_263))) < g_236) & p_37)) >> (short)7); + step_hash(147); + for (p_37 = 19; (p_37 < (-25)); p_37--) + { + signed char l_289 = (-1L); + step_hash(144); + l_280 = l_280; + step_hash(145); + (*l_260) = ((short)g_236 << (short)(((short)((unsigned short)((signed char)l_289 >> (signed char)3) / (unsigned short)(~((*p_38) || ((short)g_48 >> (short)8)))) * (short)(*l_260)) & (g_48 ^ (*l_230)))); + step_hash(146); + (***g_157) = ((short)(g_6 < ((short)g_74 % (short)p_39)) * (short)((void*)0 != (*g_157))); + } + } + step_hash(149); + (*p_41) ^= (*g_47); + } + } + step_hash(152); + (*p_41) |= ((unsigned char)(0x31L || g_6) * (unsigned char)((((((int)((signed char)(l_302 != &l_263) - (signed char)((*l_230) > (**g_158))) - (int)0x91A108BFL) <= ((signed char)(g_6 == 1UL) >> (signed char)g_236)) | p_37) < g_48) ^ g_6)); + step_hash(267); + if ((((unsigned char)(*l_230) - (unsigned char)((unsigned short)p_39 >> (unsigned short)14)) ^ ((**l_263) > g_236))) + { + int ***l_331 = (void*)0; + step_hash(184); + if (((((signed char)p_39 << (signed char)4) && (*p_41)) ^ (g_48 > 7UL))) + { + step_hash(159); + for (g_48 = (-17); (g_48 >= 17); g_48++) + { + step_hash(158); + return p_41; + } + } + else + { + unsigned short l_317 = 65529UL; + int l_337 = 0x1D226D04L; + step_hash(168); + for (g_48 = 0; (g_48 == 9); g_48++) + { + step_hash(164); + if ((*g_47)) + break; + step_hash(165); + (**g_157) = func_56(p_41); + step_hash(166); + (*p_41) = (((short)g_48 << (short)g_48) && (!g_6)); + step_hash(167); + l_317 = (**g_158); + } + step_hash(181); + if ((0x9FL > l_317)) + { + short l_332 = (-1L); + step_hash(170); + (*p_38) = (((unsigned short)0x9D31L * (unsigned short)p_37) && (g_111 < p_37)); + step_hash(178); + if ((*g_47)) + { + int l_326 = 0x8965CC1DL; + step_hash(172); + (**g_157) = p_38; + step_hash(173); + (*p_40) = ((unsigned char)((unsigned short)(((int)(l_326 & g_6) + (int)l_317) <= ((unsigned short)(((unsigned short)g_111 * (unsigned short)p_37) | ((g_236 || ((void*)0 != l_331)) <= ((void*)0 != &g_158))) % (unsigned short)p_37)) - (unsigned short)l_332) - (unsigned char)(*l_230)); + step_hash(174); + (**g_157) = p_41; + step_hash(175); + (*p_38) &= ((short)(~((short)(p_37 == g_111) >> (short)((((((short)(-6L) >> (short)1) && g_236) && ((short)(4294967295UL >= ((*p_40) | ((void*)0 != p_40))) % (short)p_39)) | g_111) ^ 0UL))) / (short)0x798EL); + } + else + { + step_hash(177); + (*l_263) = p_41; + } + } + else + { + step_hash(180); + (*l_263) = (void*)0; + } + step_hash(182); + (*p_40) = (p_39 >= (*g_47)); + step_hash(183); + (*p_41) ^= (*p_38); + } + step_hash(185); + (**g_158) |= ((p_39 == (-(short)0x36CEL)) >= 0x41E0L); + } + else + { + unsigned l_356 = 0x5AACB81CL; + int l_361 = 0x09BE1A63L; + int l_424 = 0x90647940L; + step_hash(187); + l_356 ^= (*p_38); + step_hash(197); + if ((p_41 == (**g_157))) + { + int *l_359 = (void*)0; + step_hash(189); + (***g_157) = ((unsigned char)(p_38 != l_359) * (unsigned char)(((*g_157) == (void*)0) <= p_37)); + } + else + { + step_hash(195); + if ((*p_38)) + { + int *l_360 = &g_74; + step_hash(192); + return l_360; + } + else + { + step_hash(194); + (*l_263) = (*l_263); + } + step_hash(196); + (*l_230) = (**g_158); + } + step_hash(261); + if ((*p_40)) + { + unsigned short l_362 = 0xDF17L; + unsigned l_365 = 4294967295UL; + int *l_368 = &l_361; + step_hash(199); + l_361 = l_356; + step_hash(200); + (*p_41) = l_362; + step_hash(211); + if ((g_74 ^ (&p_40 != &p_38))) + { + step_hash(202); + (*l_217) ^= 1L; + step_hash(203); + (**g_157) = (*g_158); + } + else + { + step_hash(205); + (**g_157) = (void*)0; + step_hash(210); + if (((unsigned short)l_365 % (unsigned short)((signed char)0x7DL + (signed char)g_236))) + { + step_hash(207); + return p_38; + } + else + { + step_hash(209); + (*g_158) = (*g_158); + } + } + step_hash(212); + (*g_158) = &l_361; + } + else + { + int *l_369 = &l_361; + int l_393 = 5L; + short l_412 = 0L; + int ***l_423 = &g_158; + signed char l_437 = 0xB2L; + step_hash(227); + if ((*p_41)) + { + step_hash(215); + return p_40; + } + else + { + unsigned l_383 = 3UL; + step_hash(217); + l_383 ^= (g_236 != ((unsigned)(((g_74 != (((l_372 != (*l_230)) && (*l_369)) < ((unsigned short)((signed char)(g_48 != (*l_230)) << (signed char)g_111) << (unsigned short)((short)((unsigned char)((unsigned)((*p_38) & (*g_47)) + (unsigned)(*p_40)) % (unsigned char)4UL) % (short)5L)))) >= l_356) ^ 1UL) - (unsigned)g_74)); + step_hash(225); + for (l_383 = 0; (l_383 >= 39); l_383 += 1) + { + int l_392 = 0x1CEDEFB3L; + step_hash(221); + (*l_263) = func_56((**g_157)); + step_hash(222); + (**g_158) = ((short)(~((signed char)p_39 << (signed char)((((short)((~(g_111 == l_392)) > 2UL) << (short)13) < g_236) > l_393))) % (short)g_48); + step_hash(223); + (**g_158) = (g_48 >= (p_37 ^ (((((unsigned)g_48 + (unsigned)0x8D20E8FBL) && ((signed char)((p_39 == g_236) >= ((int)((short)(((unsigned char)((signed char)(((unsigned char)g_48 % (unsigned char)((short)((unsigned short)p_39 << (unsigned short)g_48) * (short)g_236)) <= g_111) % (signed char)g_111) + (unsigned char)g_111) > p_39) * (short)g_6) + (int)(**l_263))) + (signed char)0xFCL)) >= l_361) > p_37))); + step_hash(224); + (***g_157) |= l_412; + } + step_hash(226); + (**g_157) = &l_361; + } + step_hash(228); + (*p_38) = (*l_369); + step_hash(229); + l_424 &= ((((short)g_236 / (short)(((signed char)0x16L + (signed char)((signed char)((unsigned short)(~g_48) >> (unsigned short)((&l_369 != &l_230) || ((*p_41) >= ((int)((&g_158 == l_423) < (**l_263)) + (int)l_356)))) - (signed char)g_111)) | (***l_423))) == p_39) <= g_6); + step_hash(260); + if ((g_236 <= 65535UL)) + { + step_hash(231); + (*p_38) = (*p_38); + step_hash(232); + p_40 = (**g_157); + step_hash(238); + if (((*g_157) != (void*)0)) + { + unsigned l_425 = 0x6AB84D60L; + step_hash(234); + (**g_158) = (~(l_425 <= (+(((+(p_39 != ((unsigned char)g_428 + (unsigned char)p_37))) != p_37) > ((void*)0 != (*g_157)))))); + } + else + { + step_hash(236); + g_429 &= (***g_157); + step_hash(237); + (**g_158) = (((p_39 <= ((*g_157) != (void*)0)) >= p_39) <= (((unsigned char)p_37 << (unsigned char)2) <= 1UL)); + } + } + else + { + unsigned l_432 = 4294967295UL; + step_hash(246); + if ((l_432 > ((short)((((int)l_432 / (int)l_437) > (-(signed char)0xC5L)) == (-(int)(g_74 >= (p_39 >= (**l_263))))) << (short)g_236))) + { + int *l_448 = &g_48; + unsigned short l_449 = 65533UL; + step_hash(241); + (*l_230) = 0xF60620FBL; + step_hash(242); + (***g_157) = ((int)((***l_423) || ((short)((((unsigned)(((unsigned char)((l_448 != p_40) != g_236) << (unsigned char)((*l_369) < ((((p_37 ^ p_39) && ((-1L) && (((void*)0 != p_41) >= p_37))) == g_48) != g_74))) != l_449) % (unsigned)0x352B3691L) == g_48) & (*g_47)) << (short)g_48)) - (int)p_37); + } + else + { + step_hash(244); + (**l_423) = p_41; + step_hash(245); + (*l_369) |= (!l_432); + } + step_hash(251); + for (g_236 = 7; (g_236 >= 37); g_236 += 3) + { + step_hash(250); + (**g_157) = &l_424; + } + step_hash(259); + for (l_432 = 0; (l_432 < 45); l_432 += 3) + { + int *l_456 = (void*)0; + int l_457 = 6L; + step_hash(255); + (*l_263) = (**g_157); + step_hash(256); + (*l_369) = ((short)g_6 % (short)0x7335L); + step_hash(257); + l_456 = func_56((*g_158)); + step_hash(258); + l_457 ^= (~(*p_40)); + } + } + } + step_hash(266); + for (p_37 = (-4); (p_37 != 7); p_37++) + { + short l_462 = 0xE1AAL; + step_hash(265); + (*p_40) |= ((unsigned)g_428 / (unsigned)((p_40 == &l_361) && (l_462 < l_462))); + } + } + } + else + { + unsigned short l_478 = 1UL; + step_hash(269); + (*p_38) ^= (***g_157); + step_hash(270); + l_463 &= (*g_47); + step_hash(271); + (*p_41) ^= (((p_39 ^ ((*g_47) & (((((short)((unsigned short)0xB452L * (unsigned short)(~((unsigned short)(g_429 ^ (((short)(((unsigned char)((unsigned char)((short)l_478 << (short)l_478) / (unsigned char)((unsigned char)(g_74 | (((unsigned char)g_111 << (unsigned char)2) | l_478)) * (unsigned char)0xE2L)) * (unsigned char)l_483) != p_37) / (short)1UL) >= g_48)) << (unsigned short)p_39))) - (short)1L) >= g_6) | g_428) ^ 3UL))) != g_429) < g_6); + } + step_hash(352); + if (l_463) + { + unsigned short l_485 = 65534UL; + step_hash(274); + l_484 ^= (*p_38); + step_hash(275); + (*p_38) = (((*g_157) != (void*)0) != 0x6CL); + step_hash(276); + l_485 |= (*p_41); + } + else + { + unsigned l_488 = 0x38209BB8L; + int l_526 = 0x0A336BF2L; + int *l_539 = &g_74; + step_hash(344); + if ((*p_41)) + { + unsigned char l_501 = 0x83L; + int *l_507 = (void*)0; + step_hash(309); + for (g_111 = (-30); (g_111 == (-13)); g_111 += 1) + { + unsigned l_489 = 9UL; + step_hash(282); + l_489 ^= l_488; + } + step_hash(310); + (*p_38) = ((short)l_488 * (short)(((+((unsigned char)p_37 / (unsigned char)(l_488 ^ ((int)(*p_38) % (int)((int)(l_488 > (0xECL | (p_37 | ((unsigned short)(0x631DL ^ g_429) + (unsigned short)p_39)))) + (int)4294967295UL))))) == g_6) && g_74)); + step_hash(311); + (*g_158) = p_38; + step_hash(312); + l_526 |= (*p_41); + } + else + { + unsigned char l_531 = 0x50L; + int l_532 = 0xFDA686F1L; + int ***l_547 = (void*)0; + short l_548 = 1L; + step_hash(314); + l_532 = (g_111 ^ ((unsigned short)((unsigned char)p_37 / (unsigned char)l_531) << (unsigned short)3)); + step_hash(315); + (*p_41) = 0xF508F959L; + step_hash(342); + for (g_429 = 0; (g_429 > 11); ++g_429) + { + short l_535 = 0xCBCFL; + step_hash(340); + if ((l_535 < p_37)) + { + step_hash(327); + for (g_111 = (-8); (g_111 <= 5); g_111++) + { + signed char l_538 = (-1L); + step_hash(323); + (*p_38) = 0L; + step_hash(324); + (*p_38) = (0L & 1UL); + step_hash(325); + l_538 = 1L; + step_hash(326); + (*p_38) |= (-6L); + } + step_hash(328); + l_539 = &g_74; + step_hash(329); + return p_38; + } + else + { + signed char l_540 = (-3L); + step_hash(331); + if (l_540) + break; + step_hash(338); + for (l_484 = 11; (l_484 > (-23)); l_484 -= 9) + { + step_hash(335); + (*p_41) = (*p_41); + step_hash(336); + (*g_157) = (*g_157); + step_hash(337); + if ((*p_38)) + break; + } + step_hash(339); + (*l_539) |= 3L; + } + step_hash(341); + l_539 = &l_532; + } + step_hash(343); + l_548 = ((short)(((unsigned)p_39 - (unsigned)((*l_539) || p_39)) ^ (~(&g_158 != l_547))) / (short)((0xBDL | ((*l_539) == (*p_41))) ^ g_429)); + } + step_hash(349); + for (l_484 = 0; (l_484 <= 25); l_484 += 6) + { + short l_566 = 1L; + int *l_568 = (void*)0; + step_hash(348); + (**g_157) = p_41; + } + step_hash(350); + (**g_157) = p_38; + step_hash(351); + return p_41; + } + step_hash(353); + (*p_41) = ((signed char)0xFEL * (signed char)((((*p_41) <= p_39) == (+(((signed char)(9UL && ((((short)((signed char)(g_6 | ((signed char)(p_37 != (p_37 && (((unsigned char)g_236 % (unsigned char)((unsigned char)((unsigned char)p_37 / (unsigned char)g_48) * (unsigned char)g_74)) & g_6))) >> (signed char)p_37)) / (signed char)g_48) * (short)g_429) > p_39) | g_236)) + (signed char)0x9DL) >= (*p_38)))) && g_429)); + step_hash(448); + if ((~l_483)) + { + short l_593 = (-1L); + unsigned char l_596 = 0xD8L; + int ***l_597 = &g_158; + int *l_611 = &g_48; + step_hash(355); + (**g_157) = (void*)0; + step_hash(425); + if (((unsigned short)((unsigned)((unsigned short)p_37 * (unsigned short)(((unsigned char)(0x28L != 0x82L) >> (unsigned char)2) & ((l_593 | p_39) != ((signed char)p_37 << (signed char)4)))) - (unsigned)0xA47B8098L) << (unsigned short)(&l_484 == (void*)0))) + { + int *l_598 = &g_48; + step_hash(362); + if ((l_596 == (l_597 != (void*)0))) + { + step_hash(358); + return l_598; + } + else + { + step_hash(360); + (**l_597) = p_38; + step_hash(361); + (*g_158) = (void*)0; + } + step_hash(363); + (*l_598) = 0xEF358BECL; + } + else + { + unsigned l_599 = 4294967295UL; + int l_614 = 1L; + step_hash(365); + (*p_41) &= l_599; + step_hash(405); + if ((p_37 <= 0x82L)) + { + int *l_602 = &g_74; + step_hash(371); + for (g_429 = 29; (g_429 == 60); g_429 += 2) + { + step_hash(370); + return l_602; + } + step_hash(372); + return l_602; + } + else + { + int l_605 = 0xBAE9B3C3L; + step_hash(385); + for (l_599 = 0; (l_599 > 43); ++l_599) + { + step_hash(377); + if ((*p_41)) + break; + step_hash(378); + (*p_38) = l_605; + step_hash(379); + (*g_157) = (*l_597); + step_hash(384); + for (g_429 = 0; (g_429 > 21); g_429++) + { + int *l_608 = &g_48; + step_hash(383); + return l_608; + } + } + step_hash(386); + (*p_41) |= ((&g_158 == l_302) && 0xA2L); + step_hash(404); + for (l_483 = (-30); (l_483 < 19); l_483++) + { + unsigned short l_617 = 65526UL; + unsigned char l_618 = 1UL; + step_hash(390); + (*g_158) = l_611; + step_hash(395); + for (p_37 = 0; (p_37 >= (-21)); p_37--) + { + step_hash(394); + (*l_611) = (*l_611); + } + step_hash(396); + l_614 = g_565; + step_hash(403); + for (g_236 = 0; (g_236 == 56); g_236++) + { + step_hash(400); + if (l_617) + break; + step_hash(401); + (*p_38) ^= l_617; + step_hash(402); + (*p_41) = l_618; + } + } + } + step_hash(424); + for (p_39 = 0; (p_39 <= (-8)); p_39--) + { + unsigned short l_622 = 0x8DE9L; + step_hash(423); + if ((&p_41 == (*g_157))) + { + step_hash(410); + (**l_597) = &l_614; + } + else + { + int *l_621 = (void*)0; + step_hash(412); + (**l_597) = l_621; + step_hash(413); + (*l_611) ^= l_622; + step_hash(421); + for (l_483 = 0; (l_483 != 14); l_483 += 7) + { + int *l_633 = (void*)0; + step_hash(417); + (*p_38) = ((unsigned short)((unsigned short)((short)((((((unsigned char)((l_633 == (void*)0) == (((unsigned short)((*p_41) >= (0x76B3L | ((unsigned)g_111 / (unsigned)0x27EE7266L))) >> (unsigned short)13) | 0xA82EL)) >> (unsigned char)(((unsigned char)(&l_484 == (void*)0) + (unsigned char)1UL) > l_599)) | 0x0386C42FL) && (-6L)) != g_6) != p_37) / (short)g_236) >> (unsigned short)2) * (unsigned short)p_37); + step_hash(418); + if ((*l_611)) + continue; + step_hash(419); + if ((*p_41)) + continue; + step_hash(420); + return p_41; + } + step_hash(422); + if (l_622) + break; + } + } + } + step_hash(426); + (**g_157) = (void*)0; + } + else + { + int l_645 = (-1L); + step_hash(446); + for (l_463 = 0; (l_463 >= 13); l_463 += 3) + { + int **l_644 = &l_217; + step_hash(437); + for (g_111 = 2; (g_111 == 26); g_111 += 1) + { + step_hash(434); + if ((*p_41)) + break; + step_hash(435); + l_644 = (*g_157); + step_hash(436); + if (l_645) + break; + } + step_hash(444); + for (p_37 = 23; (p_37 > 16); p_37--) + { + step_hash(441); + (*p_41) &= (-1L); + step_hash(442); + (*p_41) &= ((-4L) <= g_111); + step_hash(443); + (**g_157) = p_41; + } + step_hash(445); + return p_41; + } + step_hash(447); + (*g_158) = l_648; + } + step_hash(449); + return p_41; +} +static int * func_42(int * p_43, int p_44, unsigned p_45, int * p_46) +{ + int *l_214 = &g_74; + step_hash(68); + (*g_47) = 0x5BF8BA2EL; + step_hash(69); + return l_214; +} +static int * func_54(int * p_55) +{ + unsigned char l_98 = 248UL; + int **l_130 = &g_47; + int l_150 = (-3L); + int l_211 = 0x6D60A08BL; + int *l_213 = &g_74; + int **l_212 = &l_213; + step_hash(63); + if ((g_48 && 1L)) + { + signed char l_97 = 1L; + step_hash(16); + (*g_47) = (4294967289UL ^ l_97); + step_hash(17); + (*g_47) |= l_98; + } + else + { + short l_101 = 0x4853L; + int l_169 = 0xB14249AAL; + unsigned char l_180 = 2UL; + int ***l_192 = &g_158; + step_hash(19); + (*g_47) = (*p_55); + step_hash(31); + for (g_74 = (-10); (g_74 >= 23); ++g_74) + { + step_hash(23); + l_101 &= (*p_55); + step_hash(28); + for (g_48 = 0; (g_48 >= 19); g_48 += 1) + { + step_hash(27); + if ((*p_55)) + break; + } + step_hash(29); + if ((*p_55)) + continue; + step_hash(30); + return p_55; + } + step_hash(62); + if (((0x90L ^ (0UL != (l_101 ^ g_74))) && (~(*p_55)))) + { + int *l_104 = &g_74; + signed char l_133 = (-3L); + step_hash(33); + (*l_104) = (g_48 != (l_104 != p_55)); + step_hash(50); + if (((int)(*p_55) - (int)((((unsigned char)g_6 / (unsigned char)((unsigned short)g_111 % (unsigned short)((&g_47 == (void*)0) && (*l_104)))) != g_6) | (*l_104)))) + { + int **l_112 = &l_104; + step_hash(35); + (*l_112) = func_56(&g_74); + } + else + { + int l_127 = 0L; + step_hash(48); + for (g_74 = (-28); (g_74 != 10); g_74++) + { + short l_149 = 1L; + step_hash(46); + for (g_48 = (-25); (g_48 != (-19)); g_48++) + { + int **l_118 = &g_47; + int ***l_117 = &l_118; + int **l_119 = (void*)0; + int **l_120 = &l_104; + step_hash(43); + (*l_117) = &g_47; + step_hash(44); + (*l_120) = func_56(&g_74); + step_hash(45); + l_133 = ((unsigned short)0x83D4L * (unsigned short)(((unsigned short)((short)(l_127 & (((void*)0 != &g_47) ^ (l_130 != (void*)0))) >> (short)12) + (unsigned short)((!((*l_104) == 1L)) < ((((int)l_101 % (int)0x17FA172CL) <= l_127) && 9UL))) < l_101)); + } + step_hash(47); + l_150 &= ((-1L) >= (((short)((int)(~(+(((int)((-(short)((unsigned char)l_127 - (unsigned char)((unsigned char)(**l_130) + (unsigned char)(l_101 | g_111)))) && (**l_130)) + (int)((short)((short)g_111 - (short)l_149) >> (short)2)) >= (*g_47)))) % (int)(*l_104)) + (short)65535UL) > g_48)); + } + step_hash(49); + l_169 ^= ((signed char)((signed char)(0x8BD6L | (((signed char)((g_157 != &g_158) ^ ((signed char)(((short)g_74 << (short)((unsigned)0x05BDF17FL + (unsigned)(***g_157))) >= (&l_104 == &p_55)) >> (signed char)0)) >> (signed char)(((unsigned short)((short)g_111 - (short)(**l_130)) >> (unsigned short)g_74) ^ g_6)) || 0x4013L)) + (signed char)g_6) - (signed char)g_48); + } + step_hash(51); + l_150 &= ((((short)l_101 >> (short)l_169) > 0x33BC337EL) != (((signed char)((0L > (**l_130)) <= ((signed char)((unsigned)(**l_130) / (unsigned)(((0x6D41FC1BL >= g_74) == ((signed char)((1L && (**l_130)) >= 0x23L) * (signed char)0x6AL)) & g_48)) - (signed char)g_74)) % (signed char)2UL) < l_180)); + step_hash(56); + for (l_180 = 17; (l_180 <= 59); l_180 += 1) + { + step_hash(55); + return l_104; + } + } + else + { + unsigned char l_189 = 0UL; + int *l_209 = (void*)0; + int *l_210 = &l_150; + step_hash(58); + (*g_47) = ((unsigned char)(((**l_130) == (+l_101)) ^ (l_169 == (**l_130))) << (unsigned char)((((signed char)((unsigned char)g_74 + (unsigned char)l_189) << (signed char)0) > ((((l_101 > l_169) > (&l_130 == l_192)) & g_48) > (***l_192))) != l_189)); + step_hash(59); + (***g_157) = (***g_157); + step_hash(60); + l_169 ^= (*g_47); + step_hash(61); + (*l_210) |= ((signed char)(0x58F93B69L != ((***l_192) <= ((short)(((unsigned char)(1L & (**l_130)) - (unsigned char)((unsigned char)(0xD213L != (**l_130)) << (unsigned char)3)) < g_74) % (short)((signed char)((signed char)((signed char)((unsigned)l_189 - (unsigned)((**l_130) & 65535UL)) - (signed char)2L) - (signed char)(***l_192)) >> (signed char)(***l_192))))) % (signed char)l_189); + } + } + step_hash(64); + l_211 &= ((p_55 != (*l_130)) != (**g_158)); + step_hash(65); + (*l_212) = func_58((**l_130), g_111, (**l_130), (**l_130), func_56(func_56(p_55))); + step_hash(66); + return (*g_158); +} +static int * func_56(int * p_57) +{ + step_hash(13); + return p_57; +} +static int * func_58(unsigned p_59, unsigned short p_60, unsigned short p_61, unsigned short p_62, int * p_63) +{ + int *l_72 = (void*)0; + int l_84 = 0x102D1F73L; + step_hash(10); + for (p_62 = (-15); (p_62 != 20); p_62 += 5) + { + int *l_73 = &g_74; + int **l_75 = &l_72; + step_hash(6); + (*l_73) &= ((*g_47) || ((void*)0 == l_72)); + step_hash(7); + (*l_75) = l_72; + step_hash(8); + (*l_73) = ((unsigned short)((signed char)((unsigned char)g_48 - (unsigned char)p_59) / (signed char)((unsigned short)l_84 + (unsigned short)((unsigned short)((unsigned short)((unsigned char)g_74 << (unsigned char)6) - (unsigned short)((int)(g_6 & (-1L)) / (int)((int)(-5L) + (int)g_6))) << (unsigned short)(&p_63 == (void*)0)))) * (unsigned short)l_84); + step_hash(9); + (*p_63) &= (0x59L ^ ((short)0L << (short)10)); + } + step_hash(11); + return p_63; +} +void csmith_compute_hash(void) +{ + transparent_crc(g_6, "g_6", print_hash_value); + transparent_crc(g_48, "g_48", print_hash_value); + transparent_crc(g_74, "g_74", print_hash_value); + transparent_crc(g_111, "g_111", print_hash_value); + transparent_crc(g_236, "g_236", print_hash_value); + transparent_crc(g_428, "g_428", print_hash_value); + transparent_crc(g_429, "g_429", print_hash_value); + transparent_crc(g_565, "g_565", print_hash_value); + transparent_crc(g_567, "g_567", print_hash_value); +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand29.expect b/src/tests/csmith/rand29.expect new file mode 100644 index 0000000..bddb6b4 --- /dev/null +++ b/src/tests/csmith/rand29.expect @@ -0,0 +1,90 @@ +...checksum after hashing g_6 : 26475FB3 +...checksum after hashing g_48 : 24560BDA +...checksum after hashing g_74 : B41A7703 +...checksum after hashing g_111 : 14E948D2 +...checksum after hashing g_236 : 3C8ED9A8 +...checksum after hashing g_428 : A1AC290B +...checksum after hashing g_429 : DA06228C +...checksum after hashing g_565 : 53E5F8BE +...checksum after hashing g_567 : B655C33A +before stmt(560): checksum = B655C33A +...checksum after hashing g_6 : 26475FB3 +...checksum after hashing g_48 : 24560BDA +...checksum after hashing g_74 : B41A7703 +...checksum after hashing g_111 : 14E948D2 +...checksum after hashing g_236 : 3C8ED9A8 +...checksum after hashing g_428 : A1AC290B +...checksum after hashing g_429 : DA06228C +...checksum after hashing g_565 : 53E5F8BE +...checksum after hashing g_567 : B655C33A +before stmt(561): checksum = B655C33A +...checksum after hashing g_6 : 26475FB3 +...checksum after hashing g_48 : 24560BDA +...checksum after hashing g_74 : B41A7703 +...checksum after hashing g_111 : 14E948D2 +...checksum after hashing g_236 : 3C8ED9A8 +...checksum after hashing g_428 : A1AC290B +...checksum after hashing g_429 : DA06228C +...checksum after hashing g_565 : 53E5F8BE +...checksum after hashing g_567 : B655C33A +before stmt(562): checksum = B655C33A +...checksum after hashing g_6 : 26475FB3 +...checksum after hashing g_48 : 24560BDA +...checksum after hashing g_74 : B41A7703 +...checksum after hashing g_111 : 14E948D2 +...checksum after hashing g_236 : 3C8ED9A8 +...checksum after hashing g_428 : A1AC290B +...checksum after hashing g_429 : DA06228C +...checksum after hashing g_565 : 53E5F8BE +...checksum after hashing g_567 : B655C33A +before stmt(469): checksum = B655C33A +...checksum after hashing g_6 : 26475FB3 +...checksum after hashing g_48 : 24560BDA +...checksum after hashing g_74 : B41A7703 +...checksum after hashing g_111 : 14E948D2 +...checksum after hashing g_236 : 3C8ED9A8 +...checksum after hashing g_428 : A1AC290B +...checksum after hashing g_429 : DA06228C +...checksum after hashing g_565 : 53E5F8BE +...checksum after hashing g_567 : B655C33A +before stmt(463): checksum = B655C33A +...checksum after hashing g_6 : 26475FB3 +...checksum after hashing g_48 : 24560BDA +...checksum after hashing g_74 : B41A7703 +...checksum after hashing g_111 : 14E948D2 +...checksum after hashing g_236 : 3C8ED9A8 +...checksum after hashing g_428 : A1AC290B +...checksum after hashing g_429 : DA06228C +...checksum after hashing g_565 : 53E5F8BE +...checksum after hashing g_567 : B655C33A +before stmt(464): checksum = B655C33A +...checksum after hashing g_6 : 26475FB3 +...checksum after hashing g_48 : 24560BDA +...checksum after hashing g_74 : B41A7703 +...checksum after hashing g_111 : 14E948D2 +...checksum after hashing g_236 : 3C8ED9A8 +...checksum after hashing g_428 : A1AC290B +...checksum after hashing g_429 : DA06228C +...checksum after hashing g_565 : 53E5F8BE +...checksum after hashing g_567 : B655C33A +before stmt(563): checksum = B655C33A +...checksum after hashing g_6 : 26475FB3 +...checksum after hashing g_48 : 24560BDA +...checksum after hashing g_74 : B41A7703 +...checksum after hashing g_111 : 14E948D2 +...checksum after hashing g_236 : 3C8ED9A8 +...checksum after hashing g_428 : A1AC290B +...checksum after hashing g_429 : DA06228C +...checksum after hashing g_565 : 53E5F8BE +...checksum after hashing g_567 : B655C33A +before stmt(564): checksum = B655C33A +...checksum after hashing g_6 : 26475FB3 +...checksum after hashing g_48 : 24560BDA +...checksum after hashing g_74 : B41A7703 +...checksum after hashing g_111 : 14E948D2 +...checksum after hashing g_236 : 3C8ED9A8 +...checksum after hashing g_428 : A1AC290B +...checksum after hashing g_429 : DA06228C +...checksum after hashing g_565 : 53E5F8BE +...checksum after hashing g_567 : B655C33A +checksum = b655c33a diff --git a/src/tests/csmith/rand3.c b/src/tests/csmith/rand3.c new file mode 100644 index 0000000..c910aa8 --- /dev/null +++ b/src/tests/csmith/rand3.c @@ -0,0 +1,766 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static int g_7 = 0x386CCE57L; +static int *g_6 = &g_7; +static unsigned g_28 = 4294967290UL; +static int g_70 = 0x6A74B4FBL; +static int *g_104 = &g_7; +static int **g_204 = &g_104; +static int ***g_203 = &g_204; +static unsigned short g_248 = 0x570AL; +static int g_271 = 1L; +static int g_312 = 0x0E0531CCL; +static int *g_329 = &g_7; +static signed char func_1(void); +static int * func_2(int * p_3, unsigned short p_4, unsigned p_5); +static signed char func_8(int * p_9, signed char p_10); +static int * func_11(int * p_12); +static int * func_13(int * p_14, int p_15); +static int * func_16(unsigned p_17, short p_18); +static int * func_21(signed char p_22); +static int * func_33(unsigned p_34, int p_35, unsigned p_36, int p_37, int ** p_38); +static unsigned char func_41(short p_42, int * p_43, int * p_44, int * p_45, int ** p_46); +static short func_47(int * p_48); +static signed char func_1(void) +{ + signed char l_330 = 0L; + int **l_506 = (void*)0; + int **l_507 = &g_6; + step_hash(335); + (*l_507) = func_2(g_6, (func_8(func_11(func_13(func_16(g_7, g_7), l_330)), g_248) ^ g_248), g_248); + step_hash(336); + (**l_507) = (-5L); + step_hash(337); + return (**l_507); +} +static int * func_2(int * p_3, unsigned short p_4, unsigned p_5) +{ + int l_504 = 0x44675D09L; + int **l_505 = &g_329; + step_hash(332); + (**g_203) = func_33(((unsigned char)(p_5 ^ (*p_3)) * (unsigned char)((((unsigned)(((((short)((void*)0 == &g_204) * (short)(((void*)0 == &p_3) == l_504)) <= (~((&l_504 == (void*)0) & g_70))) && l_504) ^ 0UL) % (unsigned)0x16825E04L) != l_504) & (*g_6))), l_504, l_504, l_504, l_505); + step_hash(333); + (*g_104) = (*p_3); + step_hash(334); + return (*g_204); +} +static signed char func_8(int * p_9, signed char p_10) +{ + int ***l_353 = &g_204; + int *l_358 = &g_312; + int *l_365 = &g_312; + unsigned l_401 = 0x9AA9D4D8L; + signed char l_414 = 0x8EL; + int l_439 = 0L; + step_hash(245); + (*l_358) |= (((unsigned char)(((signed char)((signed char)(((signed char)(+(((signed char)((int)p_10 + (int)(l_353 != &g_204)) << (signed char)7) || (((0UL >= ((signed char)g_7 + (signed char)g_248)) && (0x5DL == (l_353 == (void*)0))) > p_10))) - (signed char)1L) || g_7) % (signed char)g_28) << (signed char)g_70) | g_271) * (unsigned char)0UL) == 5L); + step_hash(313); + if ((((short)((*l_358) && ((**l_353) != (**g_203))) * (short)(*l_358)) != (((unsigned short)((unsigned)((*l_358) >= p_10) + (unsigned)((*l_353) != (void*)0)) << (unsigned short)10) ^ ((void*)0 != l_353)))) + { + int *l_366 = &g_312; + int l_369 = 0L; + step_hash(247); + (*g_329) ^= (*l_366); + step_hash(248); + (*l_365) &= ((unsigned short)l_369 - (unsigned short)p_10); + } + else + { + short l_374 = 0x101EL; + int *l_377 = (void*)0; + int *l_420 = &g_7; + int *l_430 = &g_312; + int l_456 = 1L; + unsigned short l_462 = 0x80F5L; + step_hash(266); + if (((short)((signed char)(!l_374) << (signed char)(g_248 | g_312)) * (short)7UL)) + { + int *l_378 = (void*)0; + step_hash(251); + (*g_204) = l_377; + step_hash(252); + (*g_329) |= (g_271 & (((p_10 <= (((short)0x2AB5L << (short)((void*)0 == (*g_203))) & g_271)) || (((unsigned)((unsigned short)(g_248 != (g_248 || g_271)) / (unsigned short)g_312) / (unsigned)0x4928AC87L) ^ 0xDBL)) < p_10)); + } + else + { + step_hash(263); + for (g_70 = (-17); (g_70 < 21); g_70 += 7) + { + step_hash(261); + for (g_7 = 0; (g_7 < 29); ++g_7) + { + step_hash(260); + (**l_353) = func_21(g_271); + } + step_hash(262); + (*g_6) = ((g_271 | (g_248 == ((unsigned char)((unsigned)4294967295UL % (unsigned)((short)g_312 << (short)(&p_9 != (*g_203)))) / (unsigned char)((unsigned short)p_10 << (unsigned short)9)))) >= p_10); + } + step_hash(264); + (**g_203) = func_21(p_10); + step_hash(265); + (*g_329) &= (((*g_203) != (*g_203)) != (0x33CBL & g_312)); + } + step_hash(267); + (*g_6) ^= ((unsigned char)p_10 - (unsigned char)(*l_365)); + step_hash(311); + if (((0x3EL ^ (0x7861L != (*l_365))) || (*l_358))) + { + unsigned l_413 = 4294967289UL; + int *l_419 = &g_312; + step_hash(269); + (*l_365) = ((unsigned)((unsigned char)0UL - (unsigned char)g_271) % (unsigned)(-(int)(((int)func_41(g_28, l_419, l_420, l_420, &l_419) / (int)l_413) < 4294967288UL))); + } + else + { + int *l_427 = (void*)0; + int l_428 = (-1L); + unsigned l_429 = 0x62E70A77L; + step_hash(271); + (*g_329) = ((short)((((unsigned char)(p_10 || ((signed char)(0x15214DAFL == g_271) << (signed char)6)) >> (unsigned char)((*l_365) | p_10)) < l_428) | l_429) + (short)l_428); + step_hash(272); + (*g_203) = (*g_203); + step_hash(309); + if (p_10) + { + int **l_435 = &l_377; + step_hash(274); + (*g_6) = ((signed char)g_248 * (signed char)((*g_203) != l_435)); + step_hash(275); + l_439 ^= (((((0xC75A7728L | (-(unsigned short)((((*l_358) && ((*l_358) ^ g_7)) != ((short)p_10 >> (short)9)) < (g_28 != ((&g_204 != (void*)0) || 0x9597B686L))))) == p_10) > g_7) != g_312) || g_248); + } + else + { + unsigned char l_444 = 1UL; + int *l_476 = &g_7; + step_hash(287); + if (((unsigned short)((*g_204) != p_9) % (unsigned short)g_271)) + { + step_hash(278); + (*g_204) = (*g_204); + } + else + { + step_hash(285); + for (l_439 = 0; (l_439 > (-6)); l_439 -= 4) + { + step_hash(283); + (*l_358) = (3L >= (l_444 < ((signed char)(-(int)(*g_329)) / (signed char)5L))); + step_hash(284); + if (p_10) + break; + } + step_hash(286); + (*g_204) = (*g_204); + } + step_hash(288); + (*l_430) |= ((unsigned char)(~(((unsigned short)l_444 << (unsigned short)1) & 0x83L)) + (unsigned char)p_10); + step_hash(307); + for (l_374 = 0; (l_374 <= 26); l_374 += 1) + { + int l_454 = 3L; + int *l_455 = (void*)0; + int **l_457 = (void*)0; + int l_475 = 0x3296AF75L; + } + step_hash(308); + (*g_6) = (*l_365); + } + step_hash(310); + (*l_358) = (*g_329); + } + step_hash(312); + (**l_353) = (*g_204); + } + step_hash(314); + (*l_358) = ((short)p_10 - (short)(g_271 <= ((unsigned short)((*l_358) || 1L) * (unsigned short)0x4600L))); + step_hash(329); + if ((((signed char)((void*)0 == &g_204) * (signed char)(*l_365)) && (*l_358))) + { + step_hash(322); + for (g_70 = 0; (g_70 < 27); ++g_70) + { + int l_492 = 9L; + step_hash(319); + p_9 = (**l_353); + step_hash(320); + l_492 = ((signed char)(((0x40L & ((l_492 > g_7) <= p_10)) ^ (((short)p_10 >> (short)(0xC281L == ((void*)0 == (*l_353)))) == (-1L))) > p_10) >> (signed char)g_271); + step_hash(321); + (*l_358) = 0xF185857AL; + } + } + else + { + step_hash(328); + for (l_414 = 0; (l_414 >= 1); l_414 += 1) + { + int *l_497 = &g_7; + step_hash(327); + l_497 = func_11(p_9); + } + } + step_hash(330); + return p_10; +} +static int * func_11(int * p_12) +{ + unsigned char l_339 = 0x1BL; + int l_340 = 0x343EB088L; + step_hash(240); + (*g_329) ^= 0xCA18A4ECL; + step_hash(241); + l_340 = ((l_339 <= l_339) ^ g_271); + step_hash(242); + (*g_203) = &g_104; + step_hash(243); + return (**g_203); +} +static int * func_13(int * p_14, int p_15) +{ + unsigned char l_335 = 0x35L; + int *l_338 = (void*)0; + step_hash(236); + (*p_14) = (*p_14); + step_hash(237); + p_14 = &p_15; + step_hash(238); + return l_338; +} +static int * func_16(unsigned p_17, short p_18) +{ + int *l_20 = &g_7; + int **l_19 = &l_20; + step_hash(2); + (*l_19) = &g_7; + step_hash(6); + (*l_19) = func_21(p_17); + step_hash(233); + if ((((0x7C629C4DL >= g_7) && ((signed char)((&l_20 != (void*)0) >= (*l_20)) << (signed char)7)) && (*l_20))) + { + step_hash(13); + for (p_18 = 26; (p_18 == (-23)); p_18 -= 1) + { + step_hash(11); + (*g_6) = (-1L); + step_hash(12); + (*g_6) &= 0x8BC698DCL; + } + } + else + { + int l_39 = 1L; + int **l_272 = &g_6; + step_hash(231); + g_329 = func_33(l_39, (-(int)(func_41(func_47(func_21(((short)l_39 >> (short)(g_28 > g_28)))), (*l_19), &l_39, (*l_19), l_272) | g_248)), g_248, g_248, &l_20); + step_hash(232); + (*l_19) = func_21(p_17); + } + step_hash(234); + return &g_7; +} +static int * func_21(signed char p_22) +{ + signed char l_27 = 0x0EL; + step_hash(4); + g_28 ^= (0x6EEAL | (((signed char)p_22 * (signed char)(0xDACDL <= (((signed char)g_7 >> (signed char)7) | g_7))) | (+l_27))); + step_hash(5); + return &g_7; +} +static int * func_33(unsigned p_34, int p_35, unsigned p_36, int p_37, int ** p_38) +{ + int *l_296 = &g_7; + step_hash(216); + for (p_36 = 0; (p_36 > 59); p_36 += 2) + { + int *l_297 = &g_70; + step_hash(187); + (*g_6) = (p_34 > g_271); + step_hash(215); + for (g_70 = 0; (g_70 >= 4); ++g_70) + { + int *l_278 = &g_7; + step_hash(191); + l_278 = (*p_38); + step_hash(213); + for (g_28 = 0; (g_28 != 7); g_28 += 6) + { + short l_284 = 0L; + int *l_313 = &g_70; + } + step_hash(214); + return l_296; + } + } + step_hash(229); + if (((unsigned short)func_41((g_312 > ((*p_38) != (void*)0)), (*p_38), (*p_38), (*p_38), p_38) + (unsigned short)0x89B6L)) + { + int *l_320 = (void*)0; + step_hash(218); + (*p_38) = func_21((*l_296)); + step_hash(219); + (**p_38) = (((unsigned short)((int)(*l_296) + (int)(((unsigned short)((unsigned char)p_35 + (unsigned char)g_70) + (unsigned short)(+p_35)) < p_37)) * (unsigned short)g_7) || p_36); + step_hash(220); + (**p_38) &= (-(unsigned char)255UL); + } + else + { + step_hash(228); + for (p_34 = 0; (p_34 > 19); ++p_34) + { + int *l_328 = &g_70; + step_hash(225); + (*p_38) = (*p_38); + step_hash(226); + (**p_38) = (*l_296); + step_hash(227); + return l_328; + } + } + step_hash(230); + return l_296; +} +static unsigned char func_41(short p_42, int * p_43, int * p_44, int * p_45, int ** p_46) +{ + int *l_273 = (void*)0; + step_hash(178); + (**p_46) = 0x1734EC99L; + step_hash(179); + (*p_45) = 0x222683E6L; + step_hash(180); + l_273 = (*p_46); + step_hash(181); + (*g_6) = (*p_43); + step_hash(182); + return (*l_273); +} +static short func_47(int * p_48) +{ + int **l_53 = &g_6; + unsigned char l_54 = 9UL; + unsigned l_127 = 0UL; + unsigned char l_199 = 0xEDL; + int l_249 = 0L; + step_hash(175); + if (((short)(+(4294967290UL ^ (l_53 != (void*)0))) - (short)l_54)) + { + signed char l_57 = 0xFDL; + step_hash(17); + (*p_48) = ((unsigned char)l_57 * (unsigned char)(**l_53)); + step_hash(18); + (*p_48) = ((unsigned char)((l_57 == 0x9FL) < ((unsigned char)l_57 / (unsigned char)l_57)) * (unsigned char)0x49L); + } + else + { + int l_67 = 1L; + int **l_77 = &g_6; + int l_82 = 0L; + unsigned l_103 = 0xBB1179EFL; + int l_166 = (-6L); + step_hash(172); + if ((*p_48)) + { + unsigned short l_88 = 0xA040L; + int *l_107 = &l_82; + int ***l_182 = &l_77; + unsigned l_197 = 0x6AE705E6L; + step_hash(21); + (*p_48) = (((void*)0 != &g_7) || (&p_48 != l_53)); + step_hash(84); + if ((**l_53)) + { + unsigned short l_66 = 65535UL; + step_hash(36); + for (g_7 = 0; (g_7 != (-16)); g_7 -= 3) + { + unsigned l_87 = 0UL; + step_hash(26); + l_66 = (g_7 == ((unsigned short)g_28 - (unsigned short)g_7)); + step_hash(34); + if (l_67) + { + int *l_68 = (void*)0; + int *l_69 = &g_70; + step_hash(28); + (*l_69) = (*g_6); + } + else + { + short l_71 = 0x0716L; + int **l_72 = (void*)0; + int *l_74 = &g_7; + int **l_73 = &l_74; + step_hash(30); + (*l_73) = func_21(l_71); + step_hash(31); + if ((*g_6)) + continue; + step_hash(32); + l_82 ^= (((unsigned short)((l_77 == l_53) >= ((unsigned short)((*g_6) == ((unsigned short)(((*p_48) && g_28) != (&p_48 != &p_48)) >> (unsigned short)12)) * (unsigned short)(**l_77))) - (unsigned short)(g_7 & g_70)) ^ (-1L)); + step_hash(33); + (*l_73) = func_21(g_28); + } + step_hash(35); + l_88 = ((unsigned)((unsigned short)(**l_53) / (unsigned short)l_87) + (unsigned)l_66); + } + step_hash(53); + if ((((&g_6 != (void*)0) <= (0x5C30L | ((g_7 & ((**l_53) > ((+8L) & ((((**l_77) != 0x4896B3C8L) && (0UL & (**l_53))) > 246UL)))) || g_7))) && 4294967286UL)) + { + unsigned l_94 = 4294967292UL; + step_hash(43); + for (l_66 = 0; (l_66 < 34); l_66 += 5) + { + int *l_93 = &l_82; + step_hash(41); + (*l_93) |= (*p_48); + step_hash(42); + (*g_6) = (l_94 && (0x7B54C1CEL || ((signed char)(((((*l_93) & g_28) ^ (**l_77)) | ((0xA6L == (**l_53)) & g_28)) >= (+((unsigned short)((l_88 | l_94) != g_28) << (unsigned short)8))) - (signed char)1UL))); + } + step_hash(48); + for (g_28 = (-27); (g_28 != 29); g_28 += 6) + { + step_hash(47); + return g_7; + } + } + else + { + short l_120 = 0x31D7L; + int l_128 = (-3L); + step_hash(50); + g_104 = func_21((g_7 <= ((unsigned short)l_66 / (unsigned short)l_103))); + step_hash(51); + (*g_104) &= (((unsigned)(l_107 != &g_70) - (unsigned)0UL) == 0x34387970L); + step_hash(52); + l_128 |= (g_28 && (((**l_77) ^ (((unsigned char)((short)((int)((unsigned short)(((unsigned short)(l_120 ^ (((unsigned short)l_66 * (unsigned short)((((signed char)g_28 * (signed char)((signed char)0x42L * (signed char)((**l_77) < (**l_53)))) && ((&g_70 != p_48) | l_120)) & 0xAD9A11D3L)) ^ g_7)) / (unsigned short)g_7) <= (**l_77)) + (unsigned short)l_127) - (int)(-8L)) - (short)(**l_77)) % (unsigned char)g_70) != 0xF8L)) != (*g_104))); + } + step_hash(54); + (**l_53) &= l_66; + } + else + { + short l_133 = (-7L); + int *l_136 = &g_70; + step_hash(56); + (*p_48) = ((unsigned short)g_70 << (unsigned short)2); + step_hash(57); + g_104 = func_21((*l_107)); + step_hash(82); + if (((signed char)l_133 >> (signed char)((signed char)(l_136 != (void*)0) << (signed char)5))) + { + unsigned char l_147 = 0x6DL; + int ***l_174 = &l_53; + step_hash(65); + for (l_103 = (-2); (l_103 <= 34); ++l_103) + { + int **l_152 = &l_136; + step_hash(62); + (*l_107) ^= (((short)1L << (short)((unsigned char)((unsigned short)((**l_53) ^ (((((signed char)l_147 % (signed char)0x77L) <= g_70) > ((void*)0 != &p_48)) < g_28)) * (unsigned short)(((unsigned char)(((unsigned char)g_28 >> (unsigned char)g_28) & g_28) - (unsigned char)(*l_136)) && g_70)) << (unsigned char)g_28)) > 0xDFL); + step_hash(63); + (*l_152) = func_21((**l_53)); + step_hash(64); + g_104 = (void*)0; + } + step_hash(76); + if ((*g_6)) + { + unsigned short l_159 = 0UL; + step_hash(67); + (*l_107) ^= ((short)g_70 << (short)11); + step_hash(68); + p_48 = func_21(((signed char)(**l_53) + (signed char)(*l_107))); + step_hash(69); + (*l_136) = ((unsigned short)(((void*)0 != l_107) >= (**l_53)) % (unsigned short)(**l_77)); + step_hash(70); + (*l_136) = (((l_159 < g_28) <= (g_70 ^ (((unsigned char)l_147 * (unsigned char)((unsigned)((signed char)g_70 << (signed char)3) + (unsigned)(l_166 != (251UL ^ (**l_53))))) <= l_159))) < l_159); + } + else + { + int *l_169 = &g_70; + int **l_170 = (void*)0; + int **l_171 = &g_104; + step_hash(72); + p_48 = func_21(((short)0x1A9CL << (short)7)); + step_hash(73); + (*l_171) = l_169; + step_hash(74); + (*l_171) = &g_70; + step_hash(75); + (*l_136) = (g_7 & (((signed char)(**l_53) >> (signed char)(*l_136)) & (*l_136))); + } + step_hash(77); + (*l_174) = &l_136; + } + else + { + unsigned l_179 = 0x8C224E53L; + int *l_183 = &l_166; + step_hash(79); + p_48 = &g_70; + step_hash(80); + (*g_104) &= 0x4CD87840L; + step_hash(81); + (*l_183) ^= ((short)((((unsigned short)l_179 % (unsigned short)(((signed char)(*l_107) * (signed char)(**l_53)) && (*p_48))) && 0xF9L) & ((void*)0 == l_182)) << (short)0); + } + step_hash(83); + p_48 = p_48; + } + step_hash(85); + (*g_6) = (-9L); + step_hash(93); + if (((signed char)(***l_182) % (signed char)(~0x4CL))) + { + unsigned short l_186 = 0x9C59L; + step_hash(87); + (*l_107) &= (*p_48); + step_hash(88); + g_70 ^= ((((**l_77) | ((***l_182) | l_186)) < ((short)1L >> (short)g_7)) == (0xE5D6L < ((***l_182) != ((unsigned short)(((unsigned short)(((signed char)((*g_6) && ((unsigned)l_186 + (unsigned)g_28)) / (signed char)(***l_182)) || 0xFCL) * (unsigned short)l_197) != (**l_77)) << (unsigned short)12)))); + } + else + { + step_hash(90); + (*l_107) |= (*g_6); + step_hash(91); + (*l_107) = (*p_48); + step_hash(92); + l_199 ^= (g_28 & (-(int)(***l_182))); + } + } + else + { + int **l_200 = &g_104; + int l_213 = 0x7B67C161L; + int *l_251 = &g_70; + step_hash(95); + (*l_200) = p_48; + step_hash(96); + (**l_77) = ((short)g_7 >> (short)6); + step_hash(171); + if (((void*)0 != p_48)) + { + int l_207 = 1L; + int l_232 = 3L; + step_hash(98); + (*g_204) = func_21((g_203 == &g_204)); + step_hash(103); + for (l_54 = 18; (l_54 == 29); l_54 += 1) + { + step_hash(102); + return l_207; + } + step_hash(136); + if ((**l_200)) + { + int *l_212 = (void*)0; + step_hash(112); + if ((g_7 ^ ((**l_53) | ((unsigned short)g_70 - (unsigned short)((int)(*p_48) + (int)(**l_77)))))) + { + step_hash(106); + (*l_200) = l_212; + step_hash(107); + (*g_203) = &p_48; + step_hash(108); + l_212 = (void*)0; + } + else + { + step_hash(110); + (***g_203) = (**l_77); + step_hash(111); + return (**l_77); + } + step_hash(113); + (**g_204) = (**g_204); + step_hash(114); + (**g_203) = func_21(g_28); + step_hash(122); + if ((((void*)0 != &g_204) && g_28)) + { + unsigned l_214 = 0UL; + unsigned short l_221 = 0xE24DL; + step_hash(116); + l_213 &= (*g_6); + step_hash(117); + l_214 &= (**l_77); + step_hash(118); + (***g_203) &= (p_48 == l_212); + step_hash(119); + (*p_48) = (g_7 && ((((unsigned short)((((unsigned short)(((g_70 == l_207) > ((unsigned short)((p_48 == p_48) == ((l_207 > 0x346EL) & l_207)) + (unsigned short)l_221)) != 0xEBL) >> (unsigned short)g_7) || 4UL) ^ (**l_53)) - (unsigned short)l_221) == g_70) > g_7)); + } + else + { + step_hash(121); + (**l_53) = (&g_204 == (void*)0); + } + } + else + { + step_hash(128); + for (g_70 = 0; (g_70 <= 4); g_70 += 2) + { + step_hash(127); + (*l_200) = func_21(g_70); + } + step_hash(129); + (***g_203) = (**l_200); + step_hash(135); + for (l_166 = 29; (l_166 > (-11)); l_166--) + { + unsigned l_230 = 4294967292UL; + int *l_231 = &l_213; + step_hash(133); + (*l_231) &= ((int)((short)l_230 >> (short)((*p_48) & 0x11894CECL)) / (int)0xAF6FDADEL); + step_hash(134); + (*l_231) &= (**g_204); + } + } + step_hash(137); + l_232 ^= 0x9798A6DBL; + } + else + { + unsigned short l_235 = 0x387BL; + int ***l_250 = &l_200; + step_hash(143); + for (l_166 = 0; (l_166 == 12); l_166 += 5) + { + step_hash(142); + return l_235; + } + step_hash(154); + for (g_28 = (-6); (g_28 == 54); g_28 += 4) + { + step_hash(151); + for (l_54 = (-19); (l_54 < 7); l_54++) + { + step_hash(150); + (**g_203) = (*g_204); + } + step_hash(152); + (**g_204) = (*g_104); + step_hash(153); + return g_28; + } + step_hash(159); + for (g_7 = (-24); (g_7 >= 17); g_7++) + { + step_hash(158); + l_249 = ((unsigned short)((signed char)(((short)(**l_200) * (short)g_248) ^ g_7) << (signed char)0) >> (unsigned short)7); + } + step_hash(170); + if (((void*)0 != l_250)) + { + step_hash(167); + if ((*p_48)) + { + step_hash(162); + (*g_6) = (!(*g_104)); + } + else + { + step_hash(164); + (***l_250) = 0L; + step_hash(165); + (*g_6) = (**l_77); + step_hash(166); + l_251 = func_21((***l_250)); + } + } + else + { + unsigned char l_258 = 0x66L; + step_hash(169); + (*g_104) = ((unsigned char)((**l_77) < (p_48 == p_48)) * (unsigned char)((*p_48) == ((signed char)g_70 + (signed char)(((short)((**l_77) && l_258) + (short)g_28) > ((signed char)((((g_70 | 0x60L) > (*p_48)) | (*p_48)) | (**l_53)) + (signed char)0x22L))))); + } + } + } + step_hash(173); + l_249 ^= ((((unsigned short)((*g_203) != l_77) % (unsigned short)((short)((int)((*p_48) < ((*p_48) || 7L)) - (int)(g_248 <= (0L && ((unsigned char)(p_48 == p_48) >> (unsigned char)g_7)))) / (short)(**l_77))) ^ (*g_6)) > (**l_77)); + step_hash(174); + g_271 &= (!(*p_48)); + } + step_hash(176); + return l_249; +} +void csmith_compute_hash(void) +{ + transparent_crc(g_7, "g_7", print_hash_value); + transparent_crc(g_28, "g_28", print_hash_value); + transparent_crc(g_70, "g_70", print_hash_value); + transparent_crc(g_248, "g_248", print_hash_value); + transparent_crc(g_271, "g_271", print_hash_value); + transparent_crc(g_312, "g_312", print_hash_value); +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand3.expect b/src/tests/csmith/rand3.expect new file mode 100644 index 0000000..1eda848 --- /dev/null +++ b/src/tests/csmith/rand3.expect @@ -0,0 +1,483 @@ +...checksum after hashing g_7 : DE5CF78 +...checksum after hashing g_28 : A1E12DD7 +...checksum after hashing g_70 : 39E22982 +...checksum after hashing g_248 : 648B1DF4 +...checksum after hashing g_271 : 16AAED6B +...checksum after hashing g_312 : 4F980A84 +before stmt(335): checksum = 4F980A84 +...checksum after hashing g_7 : DE5CF78 +...checksum after hashing g_28 : A1E12DD7 +...checksum after hashing g_70 : 39E22982 +...checksum after hashing g_248 : 648B1DF4 +...checksum after hashing g_271 : 16AAED6B +...checksum after hashing g_312 : 4F980A84 +before stmt(2): checksum = 4F980A84 +...checksum after hashing g_7 : DE5CF78 +...checksum after hashing g_28 : A1E12DD7 +...checksum after hashing g_70 : 39E22982 +...checksum after hashing g_248 : 648B1DF4 +...checksum after hashing g_271 : 16AAED6B +...checksum after hashing g_312 : 4F980A84 +before stmt(6): checksum = 4F980A84 +...checksum after hashing g_7 : DE5CF78 +...checksum after hashing g_28 : A1E12DD7 +...checksum after hashing g_70 : 39E22982 +...checksum after hashing g_248 : 648B1DF4 +...checksum after hashing g_271 : 16AAED6B +...checksum after hashing g_312 : 4F980A84 +before stmt(4): checksum = 4F980A84 +...checksum after hashing g_7 : DE5CF78 +...checksum after hashing g_28 : 3DADCD0C +...checksum after hashing g_70 : C42018DC +...checksum after hashing g_248 : 5030D1AF +...checksum after hashing g_271 : B496892A +...checksum after hashing g_312 : 68C5ED1B +before stmt(5): checksum = 68C5ED1B +...checksum after hashing g_7 : DE5CF78 +...checksum after hashing g_28 : 3DADCD0C +...checksum after hashing g_70 : C42018DC +...checksum after hashing g_248 : 5030D1AF +...checksum after hashing g_271 : B496892A +...checksum after hashing g_312 : 68C5ED1B +before stmt(233): checksum = 68C5ED1B +...checksum after hashing g_7 : DE5CF78 +...checksum after hashing g_28 : 3DADCD0C +...checksum after hashing g_70 : C42018DC +...checksum after hashing g_248 : 5030D1AF +...checksum after hashing g_271 : B496892A +...checksum after hashing g_312 : 68C5ED1B +before stmt(231): checksum = 68C5ED1B +...checksum after hashing g_7 : DE5CF78 +...checksum after hashing g_28 : 3DADCD0C +...checksum after hashing g_70 : C42018DC +...checksum after hashing g_248 : 5030D1AF +...checksum after hashing g_271 : B496892A +...checksum after hashing g_312 : 68C5ED1B +before stmt(4): checksum = 68C5ED1B +...checksum after hashing g_7 : DE5CF78 +...checksum after hashing g_28 : F1F87A48 +...checksum after hashing g_70 : 455918A9 +...checksum after hashing g_248 : 6893F008 +...checksum after hashing g_271 : F08DD3F5 +...checksum after hashing g_312 : AF5EA1A1 +before stmt(5): checksum = AF5EA1A1 +...checksum after hashing g_7 : DE5CF78 +...checksum after hashing g_28 : F1F87A48 +...checksum after hashing g_70 : 455918A9 +...checksum after hashing g_248 : 6893F008 +...checksum after hashing g_271 : F08DD3F5 +...checksum after hashing g_312 : AF5EA1A1 +before stmt(175): checksum = AF5EA1A1 +...checksum after hashing g_7 : DE5CF78 +...checksum after hashing g_28 : F1F87A48 +...checksum after hashing g_70 : 455918A9 +...checksum after hashing g_248 : 6893F008 +...checksum after hashing g_271 : F08DD3F5 +...checksum after hashing g_312 : AF5EA1A1 +before stmt(17): checksum = AF5EA1A1 +...checksum after hashing g_7 : 1A54A2E1 +...checksum after hashing g_28 : FB2962B +...checksum after hashing g_70 : 9CA11114 +...checksum after hashing g_248 : AB305C05 +...checksum after hashing g_271 : 55C2D30C +...checksum after hashing g_312 : 856DFC21 +before stmt(18): checksum = 856DFC21 +...checksum after hashing g_7 : C758C8AB +...checksum after hashing g_28 : EA8C81E1 +...checksum after hashing g_70 : D9DA709 +...checksum after hashing g_248 : 3C6B8BC8 +...checksum after hashing g_271 : 6E07441A +...checksum after hashing g_312 : FC59038 +before stmt(176): checksum = FC59038 +...checksum after hashing g_7 : C758C8AB +...checksum after hashing g_28 : EA8C81E1 +...checksum after hashing g_70 : D9DA709 +...checksum after hashing g_248 : 3C6B8BC8 +...checksum after hashing g_271 : 6E07441A +...checksum after hashing g_312 : FC59038 +before stmt(178): checksum = FC59038 +...checksum after hashing g_7 : 790D2EC6 +...checksum after hashing g_28 : 65BA35B7 +...checksum after hashing g_70 : D5B7AE7F +...checksum after hashing g_248 : 9A8DD9C9 +...checksum after hashing g_271 : 8E128B16 +...checksum after hashing g_312 : 485FFA91 +before stmt(179): checksum = 485FFA91 +...checksum after hashing g_7 : 279DA6E1 +...checksum after hashing g_28 : 4AEB1EE1 +...checksum after hashing g_70 : 7B8064C +...checksum after hashing g_248 : 403D2D69 +...checksum after hashing g_271 : F377DC6D +...checksum after hashing g_312 : ABAC775A +before stmt(180): checksum = ABAC775A +...checksum after hashing g_7 : 279DA6E1 +...checksum after hashing g_28 : 4AEB1EE1 +...checksum after hashing g_70 : 7B8064C +...checksum after hashing g_248 : 403D2D69 +...checksum after hashing g_271 : F377DC6D +...checksum after hashing g_312 : ABAC775A +before stmt(181): checksum = ABAC775A +...checksum after hashing g_7 : 279DA6E1 +...checksum after hashing g_28 : 4AEB1EE1 +...checksum after hashing g_70 : 7B8064C +...checksum after hashing g_248 : 403D2D69 +...checksum after hashing g_271 : F377DC6D +...checksum after hashing g_312 : ABAC775A +before stmt(182): checksum = ABAC775A +...checksum after hashing g_7 : 279DA6E1 +...checksum after hashing g_28 : 4AEB1EE1 +...checksum after hashing g_70 : 7B8064C +...checksum after hashing g_248 : 403D2D69 +...checksum after hashing g_271 : F377DC6D +...checksum after hashing g_312 : ABAC775A +before stmt(216): checksum = ABAC775A +...checksum after hashing g_7 : 279DA6E1 +...checksum after hashing g_28 : 4AEB1EE1 +...checksum after hashing g_70 : 7B8064C +...checksum after hashing g_248 : 403D2D69 +...checksum after hashing g_271 : F377DC6D +...checksum after hashing g_312 : ABAC775A +before stmt(229): checksum = ABAC775A +...checksum after hashing g_7 : 279DA6E1 +...checksum after hashing g_28 : 4AEB1EE1 +...checksum after hashing g_70 : 7B8064C +...checksum after hashing g_248 : 403D2D69 +...checksum after hashing g_271 : F377DC6D +...checksum after hashing g_312 : ABAC775A +before stmt(178): checksum = ABAC775A +...checksum after hashing g_7 : 790D2EC6 +...checksum after hashing g_28 : 65BA35B7 +...checksum after hashing g_70 : D5B7AE7F +...checksum after hashing g_248 : 9A8DD9C9 +...checksum after hashing g_271 : 8E128B16 +...checksum after hashing g_312 : 485FFA91 +before stmt(179): checksum = 485FFA91 +...checksum after hashing g_7 : 279DA6E1 +...checksum after hashing g_28 : 4AEB1EE1 +...checksum after hashing g_70 : 7B8064C +...checksum after hashing g_248 : 403D2D69 +...checksum after hashing g_271 : F377DC6D +...checksum after hashing g_312 : ABAC775A +before stmt(180): checksum = ABAC775A +...checksum after hashing g_7 : 279DA6E1 +...checksum after hashing g_28 : 4AEB1EE1 +...checksum after hashing g_70 : 7B8064C +...checksum after hashing g_248 : 403D2D69 +...checksum after hashing g_271 : F377DC6D +...checksum after hashing g_312 : ABAC775A +before stmt(181): checksum = ABAC775A +...checksum after hashing g_7 : 279DA6E1 +...checksum after hashing g_28 : 4AEB1EE1 +...checksum after hashing g_70 : 7B8064C +...checksum after hashing g_248 : 403D2D69 +...checksum after hashing g_271 : F377DC6D +...checksum after hashing g_312 : ABAC775A +before stmt(182): checksum = ABAC775A +...checksum after hashing g_7 : 279DA6E1 +...checksum after hashing g_28 : 4AEB1EE1 +...checksum after hashing g_70 : 7B8064C +...checksum after hashing g_248 : 403D2D69 +...checksum after hashing g_271 : F377DC6D +...checksum after hashing g_312 : ABAC775A +before stmt(218): checksum = ABAC775A +...checksum after hashing g_7 : 279DA6E1 +...checksum after hashing g_28 : 4AEB1EE1 +...checksum after hashing g_70 : 7B8064C +...checksum after hashing g_248 : 403D2D69 +...checksum after hashing g_271 : F377DC6D +...checksum after hashing g_312 : ABAC775A +before stmt(4): checksum = ABAC775A +...checksum after hashing g_7 : 279DA6E1 +...checksum after hashing g_28 : 3E02CEC0 +...checksum after hashing g_70 : 4A6B06A7 +...checksum after hashing g_248 : E33B40A1 +...checksum after hashing g_271 : 19041723 +...checksum after hashing g_312 : 95000A6 +before stmt(5): checksum = 95000A6 +...checksum after hashing g_7 : 279DA6E1 +...checksum after hashing g_28 : 3E02CEC0 +...checksum after hashing g_70 : 4A6B06A7 +...checksum after hashing g_248 : E33B40A1 +...checksum after hashing g_271 : 19041723 +...checksum after hashing g_312 : 95000A6 +before stmt(219): checksum = 95000A6 +...checksum after hashing g_7 : 99F8B879 +...checksum after hashing g_28 : 641D8898 +...checksum after hashing g_70 : 762166EC +...checksum after hashing g_248 : C2008FB5 +...checksum after hashing g_271 : 2C57F9F0 +...checksum after hashing g_312 : 59E821CF +before stmt(220): checksum = 59E821CF +...checksum after hashing g_7 : 99F8B879 +...checksum after hashing g_28 : 641D8898 +...checksum after hashing g_70 : 762166EC +...checksum after hashing g_248 : C2008FB5 +...checksum after hashing g_271 : 2C57F9F0 +...checksum after hashing g_312 : 59E821CF +before stmt(230): checksum = 59E821CF +...checksum after hashing g_7 : 99F8B879 +...checksum after hashing g_28 : 641D8898 +...checksum after hashing g_70 : 762166EC +...checksum after hashing g_248 : C2008FB5 +...checksum after hashing g_271 : 2C57F9F0 +...checksum after hashing g_312 : 59E821CF +before stmt(232): checksum = 59E821CF +...checksum after hashing g_7 : 99F8B879 +...checksum after hashing g_28 : 641D8898 +...checksum after hashing g_70 : 762166EC +...checksum after hashing g_248 : C2008FB5 +...checksum after hashing g_271 : 2C57F9F0 +...checksum after hashing g_312 : 59E821CF +before stmt(4): checksum = 59E821CF +...checksum after hashing g_7 : 99F8B879 +...checksum after hashing g_28 : 10F458B9 +...checksum after hashing g_70 : 3BF26607 +...checksum after hashing g_248 : 6106E27D +...checksum after hashing g_271 : C62432BE +...checksum after hashing g_312 : FB145633 +before stmt(5): checksum = FB145633 +...checksum after hashing g_7 : 99F8B879 +...checksum after hashing g_28 : 10F458B9 +...checksum after hashing g_70 : 3BF26607 +...checksum after hashing g_248 : 6106E27D +...checksum after hashing g_271 : C62432BE +...checksum after hashing g_312 : FB145633 +before stmt(234): checksum = FB145633 +...checksum after hashing g_7 : 99F8B879 +...checksum after hashing g_28 : 10F458B9 +...checksum after hashing g_70 : 3BF26607 +...checksum after hashing g_248 : 6106E27D +...checksum after hashing g_271 : C62432BE +...checksum after hashing g_312 : FB145633 +before stmt(236): checksum = FB145633 +...checksum after hashing g_7 : 99F8B879 +...checksum after hashing g_28 : 10F458B9 +...checksum after hashing g_70 : 3BF26607 +...checksum after hashing g_248 : 6106E27D +...checksum after hashing g_271 : C62432BE +...checksum after hashing g_312 : FB145633 +before stmt(237): checksum = FB145633 +...checksum after hashing g_7 : 99F8B879 +...checksum after hashing g_28 : 10F458B9 +...checksum after hashing g_70 : 3BF26607 +...checksum after hashing g_248 : 6106E27D +...checksum after hashing g_271 : C62432BE +...checksum after hashing g_312 : FB145633 +before stmt(238): checksum = FB145633 +...checksum after hashing g_7 : 99F8B879 +...checksum after hashing g_28 : 10F458B9 +...checksum after hashing g_70 : 3BF26607 +...checksum after hashing g_248 : 6106E27D +...checksum after hashing g_271 : C62432BE +...checksum after hashing g_312 : FB145633 +before stmt(240): checksum = FB145633 +...checksum after hashing g_7 : 228A00B2 +...checksum after hashing g_28 : 3B4FEF66 +...checksum after hashing g_70 : 2E59A96E +...checksum after hashing g_248 : 9DF50A40 +...checksum after hashing g_271 : E80E9F93 +...checksum after hashing g_312 : CB512E04 +before stmt(241): checksum = CB512E04 +...checksum after hashing g_7 : 228A00B2 +...checksum after hashing g_28 : 3B4FEF66 +...checksum after hashing g_70 : 2E59A96E +...checksum after hashing g_248 : 9DF50A40 +...checksum after hashing g_271 : E80E9F93 +...checksum after hashing g_312 : CB512E04 +before stmt(242): checksum = CB512E04 +...checksum after hashing g_7 : 228A00B2 +...checksum after hashing g_28 : 3B4FEF66 +...checksum after hashing g_70 : 2E59A96E +...checksum after hashing g_248 : 9DF50A40 +...checksum after hashing g_271 : E80E9F93 +...checksum after hashing g_312 : CB512E04 +before stmt(243): checksum = CB512E04 +...checksum after hashing g_7 : 228A00B2 +...checksum after hashing g_28 : 3B4FEF66 +...checksum after hashing g_70 : 2E59A96E +...checksum after hashing g_248 : 9DF50A40 +...checksum after hashing g_271 : E80E9F93 +...checksum after hashing g_312 : CB512E04 +before stmt(245): checksum = CB512E04 +...checksum after hashing g_7 : 228A00B2 +...checksum after hashing g_28 : 3B4FEF66 +...checksum after hashing g_70 : 2E59A96E +...checksum after hashing g_248 : 9DF50A40 +...checksum after hashing g_271 : E80E9F93 +...checksum after hashing g_312 : CB512E04 +before stmt(313): checksum = CB512E04 +...checksum after hashing g_7 : 228A00B2 +...checksum after hashing g_28 : 3B4FEF66 +...checksum after hashing g_70 : 2E59A96E +...checksum after hashing g_248 : 9DF50A40 +...checksum after hashing g_271 : E80E9F93 +...checksum after hashing g_312 : CB512E04 +before stmt(247): checksum = CB512E04 +...checksum after hashing g_7 : A17707E9 +...checksum after hashing g_28 : F7AF3C2A +...checksum after hashing g_70 : BCF8B8F5 +...checksum after hashing g_248 : 434DDA62 +...checksum after hashing g_271 : 22CB1675 +...checksum after hashing g_312 : 1B9D184A +before stmt(248): checksum = 1B9D184A +...checksum after hashing g_7 : A17707E9 +...checksum after hashing g_28 : F7AF3C2A +...checksum after hashing g_70 : BCF8B8F5 +...checksum after hashing g_248 : 434DDA62 +...checksum after hashing g_271 : 22CB1675 +...checksum after hashing g_312 : DE2930A5 +before stmt(314): checksum = DE2930A5 +...checksum after hashing g_7 : A17707E9 +...checksum after hashing g_28 : F7AF3C2A +...checksum after hashing g_70 : BCF8B8F5 +...checksum after hashing g_248 : 434DDA62 +...checksum after hashing g_271 : 22CB1675 +...checksum after hashing g_312 : E568509B +before stmt(329): checksum = E568509B +...checksum after hashing g_7 : A17707E9 +...checksum after hashing g_28 : F7AF3C2A +...checksum after hashing g_70 : BCF8B8F5 +...checksum after hashing g_248 : 434DDA62 +...checksum after hashing g_271 : 22CB1675 +...checksum after hashing g_312 : E568509B +before stmt(328): checksum = E568509B +...checksum after hashing g_7 : A17707E9 +...checksum after hashing g_28 : F7AF3C2A +...checksum after hashing g_70 : BCF8B8F5 +...checksum after hashing g_248 : 434DDA62 +...checksum after hashing g_271 : 22CB1675 +...checksum after hashing g_312 : E568509B +before stmt(330): checksum = E568509B +...checksum after hashing g_7 : A17707E9 +...checksum after hashing g_28 : F7AF3C2A +...checksum after hashing g_70 : BCF8B8F5 +...checksum after hashing g_248 : 434DDA62 +...checksum after hashing g_271 : 22CB1675 +...checksum after hashing g_312 : E568509B +before stmt(332): checksum = E568509B +...checksum after hashing g_7 : A17707E9 +...checksum after hashing g_28 : F7AF3C2A +...checksum after hashing g_70 : BCF8B8F5 +...checksum after hashing g_248 : 434DDA62 +...checksum after hashing g_271 : 22CB1675 +...checksum after hashing g_312 : E568509B +before stmt(216): checksum = E568509B +...checksum after hashing g_7 : A17707E9 +...checksum after hashing g_28 : F7AF3C2A +...checksum after hashing g_70 : BCF8B8F5 +...checksum after hashing g_248 : 434DDA62 +...checksum after hashing g_271 : 22CB1675 +...checksum after hashing g_312 : E568509B +before stmt(229): checksum = E568509B +...checksum after hashing g_7 : A17707E9 +...checksum after hashing g_28 : F7AF3C2A +...checksum after hashing g_70 : BCF8B8F5 +...checksum after hashing g_248 : 434DDA62 +...checksum after hashing g_271 : 22CB1675 +...checksum after hashing g_312 : E568509B +before stmt(178): checksum = E568509B +...checksum after hashing g_7 : 790D2EC6 +...checksum after hashing g_28 : 65BA35B7 +...checksum after hashing g_70 : D5B7AE7F +...checksum after hashing g_248 : 9A8DD9C9 +...checksum after hashing g_271 : 8E128B16 +...checksum after hashing g_312 : B6AAB240 +before stmt(179): checksum = B6AAB240 +...checksum after hashing g_7 : 279DA6E1 +...checksum after hashing g_28 : 4AEB1EE1 +...checksum after hashing g_70 : 7B8064C +...checksum after hashing g_248 : 403D2D69 +...checksum after hashing g_271 : F377DC6D +...checksum after hashing g_312 : 55593F8B +before stmt(180): checksum = 55593F8B +...checksum after hashing g_7 : 279DA6E1 +...checksum after hashing g_28 : 4AEB1EE1 +...checksum after hashing g_70 : 7B8064C +...checksum after hashing g_248 : 403D2D69 +...checksum after hashing g_271 : F377DC6D +...checksum after hashing g_312 : 55593F8B +before stmt(181): checksum = 55593F8B +...checksum after hashing g_7 : 279DA6E1 +...checksum after hashing g_28 : 4AEB1EE1 +...checksum after hashing g_70 : 7B8064C +...checksum after hashing g_248 : 403D2D69 +...checksum after hashing g_271 : F377DC6D +...checksum after hashing g_312 : 55593F8B +before stmt(182): checksum = 55593F8B +...checksum after hashing g_7 : 279DA6E1 +...checksum after hashing g_28 : 4AEB1EE1 +...checksum after hashing g_70 : 7B8064C +...checksum after hashing g_248 : 403D2D69 +...checksum after hashing g_271 : F377DC6D +...checksum after hashing g_312 : 55593F8B +before stmt(218): checksum = 55593F8B +...checksum after hashing g_7 : 279DA6E1 +...checksum after hashing g_28 : 4AEB1EE1 +...checksum after hashing g_70 : 7B8064C +...checksum after hashing g_248 : 403D2D69 +...checksum after hashing g_271 : F377DC6D +...checksum after hashing g_312 : 55593F8B +before stmt(4): checksum = 55593F8B +...checksum after hashing g_7 : 279DA6E1 +...checksum after hashing g_28 : 3E02CEC0 +...checksum after hashing g_70 : 4A6B06A7 +...checksum after hashing g_248 : E33B40A1 +...checksum after hashing g_271 : 19041723 +...checksum after hashing g_312 : F7A54877 +before stmt(5): checksum = F7A54877 +...checksum after hashing g_7 : 279DA6E1 +...checksum after hashing g_28 : 3E02CEC0 +...checksum after hashing g_70 : 4A6B06A7 +...checksum after hashing g_248 : E33B40A1 +...checksum after hashing g_271 : 19041723 +...checksum after hashing g_312 : F7A54877 +before stmt(219): checksum = F7A54877 +...checksum after hashing g_7 : 99F8B879 +...checksum after hashing g_28 : 641D8898 +...checksum after hashing g_70 : 762166EC +...checksum after hashing g_248 : C2008FB5 +...checksum after hashing g_271 : 2C57F9F0 +...checksum after hashing g_312 : A71D691E +before stmt(220): checksum = A71D691E +...checksum after hashing g_7 : 99F8B879 +...checksum after hashing g_28 : 641D8898 +...checksum after hashing g_70 : 762166EC +...checksum after hashing g_248 : C2008FB5 +...checksum after hashing g_271 : 2C57F9F0 +...checksum after hashing g_312 : A71D691E +before stmt(230): checksum = A71D691E +...checksum after hashing g_7 : 99F8B879 +...checksum after hashing g_28 : 641D8898 +...checksum after hashing g_70 : 762166EC +...checksum after hashing g_248 : C2008FB5 +...checksum after hashing g_271 : 2C57F9F0 +...checksum after hashing g_312 : A71D691E +before stmt(333): checksum = A71D691E +...checksum after hashing g_7 : 99F8B879 +...checksum after hashing g_28 : 641D8898 +...checksum after hashing g_70 : 762166EC +...checksum after hashing g_248 : C2008FB5 +...checksum after hashing g_271 : 2C57F9F0 +...checksum after hashing g_312 : A71D691E +before stmt(334): checksum = A71D691E +...checksum after hashing g_7 : 99F8B879 +...checksum after hashing g_28 : 641D8898 +...checksum after hashing g_70 : 762166EC +...checksum after hashing g_248 : C2008FB5 +...checksum after hashing g_271 : 2C57F9F0 +...checksum after hashing g_312 : A71D691E +before stmt(336): checksum = A71D691E +...checksum after hashing g_7 : 709D68A8 +...checksum after hashing g_28 : B620A66A +...checksum after hashing g_70 : 6AA8286C +...checksum after hashing g_248 : AB1DE609 +...checksum after hashing g_271 : F7F74D9D +...checksum after hashing g_312 : 1300A7B9 +before stmt(337): checksum = 1300A7B9 +...checksum after hashing g_7 : 709D68A8 +...checksum after hashing g_28 : B620A66A +...checksum after hashing g_70 : 6AA8286C +...checksum after hashing g_248 : AB1DE609 +...checksum after hashing g_271 : F7F74D9D +...checksum after hashing g_312 : 1300A7B9 +checksum = 1300a7b9 diff --git a/src/tests/csmith/rand30.c b/src/tests/csmith/rand30.c new file mode 100644 index 0000000..b3f1489 --- /dev/null +++ b/src/tests/csmith/rand30.c @@ -0,0 +1,95 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static int g_5 = (-8L); +static unsigned short g_6 = 0UL; +static unsigned func_1(void); +static unsigned func_1(void) +{ + unsigned l_2 = 4UL; + int *l_3 = (void*)0; + int *l_4 = &g_5; + step_hash(1); + (*l_4) &= l_2; + step_hash(2); + return g_6; +} +void csmith_compute_hash(void) +{ + transparent_crc(g_5, "g_5", print_hash_value); + transparent_crc(g_6, "g_6", print_hash_value); +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand30.expect b/src/tests/csmith/rand30.expect new file mode 100644 index 0000000..50d299d --- /dev/null +++ b/src/tests/csmith/rand30.expect @@ -0,0 +1,9 @@ +...checksum after hashing g_5 : 6228C746 +...checksum after hashing g_6 : F53AF6E6 +before stmt(1): checksum = F53AF6E6 +...checksum after hashing g_5 : 2144DF1C +...checksum after hashing g_6 : 6522DF69 +before stmt(2): checksum = 6522DF69 +...checksum after hashing g_5 : 2144DF1C +...checksum after hashing g_6 : 6522DF69 +checksum = 6522df69 diff --git a/src/tests/csmith/rand31.c b/src/tests/csmith/rand31.c new file mode 100644 index 0000000..4cbd4c3 --- /dev/null +++ b/src/tests/csmith/rand31.c @@ -0,0 +1,88 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static unsigned char g_2 = 247UL; +static unsigned char func_1(void); +static unsigned char func_1(void) +{ + step_hash(1); + return g_2; +} +void csmith_compute_hash(void) +{ + transparent_crc(g_2, "g_2", print_hash_value); +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand31.expect b/src/tests/csmith/rand31.expect new file mode 100644 index 0000000..be544c5 --- /dev/null +++ b/src/tests/csmith/rand31.expect @@ -0,0 +1,4 @@ +...checksum after hashing g_2 : 3AF5F102 +before stmt(1): checksum = 3AF5F102 +...checksum after hashing g_2 : 3AF5F102 +checksum = 3af5f102 diff --git a/src/tests/csmith/rand32.c b/src/tests/csmith/rand32.c new file mode 100644 index 0000000..73bf7e7 --- /dev/null +++ b/src/tests/csmith/rand32.c @@ -0,0 +1,103 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static int g_2 = 0xB110C93BL; +static int *g_6 = &g_2; +static int g_8 = 0xEBB0CB8CL; +static int func_1(void); +static int func_1(void) +{ + int *l_7 = &g_8; + step_hash(5); + for (g_2 = 0; (g_2 <= 4); g_2 += 3) + { + short l_5 = 0x98A5L; + step_hash(4); + return l_5; + } + step_hash(6); + g_6 = (void*)0; + step_hash(7); + (*l_7) |= g_2; + step_hash(8); + return g_8; +} +void csmith_compute_hash(void) +{ + transparent_crc(g_2, "g_2", print_hash_value); + transparent_crc(g_8, "g_8", print_hash_value); +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand32.expect b/src/tests/csmith/rand32.expect new file mode 100644 index 0000000..e0c635e --- /dev/null +++ b/src/tests/csmith/rand32.expect @@ -0,0 +1,9 @@ +...checksum after hashing g_2 : 6EB49C38 +...checksum after hashing g_8 : 23198C4F +before stmt(5): checksum = 23198C4F +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_8 : 8C4A3A03 +before stmt(4): checksum = 8C4A3A03 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_8 : 8C4A3A03 +checksum = 8c4a3a03 diff --git a/src/tests/csmith/rand33.c b/src/tests/csmith/rand33.c new file mode 100644 index 0000000..4800e7d --- /dev/null +++ b/src/tests/csmith/rand33.c @@ -0,0 +1,99 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static int g_13 = 0xF0BC5021L; +static int g_15 = (-3L); +static unsigned short func_1(void); +static unsigned short func_1(void) +{ + short l_11 = (-9L); + int *l_12 = &g_13; + int *l_14 = &g_15; + step_hash(1); + (*l_12) &= ((short)((unsigned short)0xFE22L * (unsigned short)((unsigned)(-(unsigned)((signed char)(l_11 || 5UL) << (signed char)2)) % (unsigned)l_11)) / (short)l_11); + step_hash(2); + (*l_14) &= g_13; + step_hash(3); + (*l_12) = (*l_14); + step_hash(4); + return (*l_14); +} +void csmith_compute_hash(void) +{ + transparent_crc(g_13, "g_13", print_hash_value); + transparent_crc(g_15, "g_15", print_hash_value); +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand33.expect b/src/tests/csmith/rand33.expect new file mode 100644 index 0000000..1a61e97 --- /dev/null +++ b/src/tests/csmith/rand33.expect @@ -0,0 +1,15 @@ +...checksum after hashing g_13 : A0BB2A5F +...checksum after hashing g_15 : 22A53F2D +before stmt(1): checksum = 22A53F2D +...checksum after hashing g_13 : 99F8B879 +...checksum after hashing g_15 : DD3A379F +before stmt(2): checksum = DD3A379F +...checksum after hashing g_13 : 99F8B879 +...checksum after hashing g_15 : 1134B892 +before stmt(3): checksum = 1134B892 +...checksum after hashing g_13 : 99F8B879 +...checksum after hashing g_15 : 1134B892 +before stmt(4): checksum = 1134B892 +...checksum after hashing g_13 : 99F8B879 +...checksum after hashing g_15 : 1134B892 +checksum = 1134b892 diff --git a/src/tests/csmith/rand34.c b/src/tests/csmith/rand34.c new file mode 100644 index 0000000..fe20c76 --- /dev/null +++ b/src/tests/csmith/rand34.c @@ -0,0 +1,92 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static int g_4 = 0xF4A8B108L; +static unsigned func_1(void); +static unsigned func_1(void) +{ + int *l_3 = (void*)0; + int **l_2 = &l_3; + step_hash(1); + (*l_2) = (void*)0; + step_hash(2); + return g_4; +} +void csmith_compute_hash(void) +{ + transparent_crc(g_4, "g_4", print_hash_value); +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand34.expect b/src/tests/csmith/rand34.expect new file mode 100644 index 0000000..131741d --- /dev/null +++ b/src/tests/csmith/rand34.expect @@ -0,0 +1,6 @@ +...checksum after hashing g_4 : FC626330 +before stmt(1): checksum = FC626330 +...checksum after hashing g_4 : FC626330 +before stmt(2): checksum = FC626330 +...checksum after hashing g_4 : FC626330 +checksum = fc626330 diff --git a/src/tests/csmith/rand35.c b/src/tests/csmith/rand35.c new file mode 100644 index 0000000..10a2d7f --- /dev/null +++ b/src/tests/csmith/rand35.c @@ -0,0 +1,859 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static int g_2 = (-9L); +static int g_98 = 0xCAD959FCL; +static short g_130 = 0xC386L; +static int *g_143 = &g_98; +static int **g_142 = &g_143; +static int g_208 = 0x3B782AFEL; +static int **g_258 = &g_143; +static int g_272 = (-1L); +static unsigned short g_295 = 65534UL; +static int g_316 = 0L; +static unsigned short g_321 = 0xFED3L; +static int g_464 = 0x371B4ADBL; +static int g_503 = 0L; +static unsigned short g_532 = 0x2DD5L; +static int **g_540 = (void*)0; +static int *g_560 = &g_503; +static int g_634 = 0L; +static int *g_641 = &g_634; +static int func_1(void); +static signed char func_5(unsigned p_6, int p_7, unsigned short p_8, unsigned short p_9, unsigned short p_10); +static short func_18(short p_19, int p_20, int p_21, unsigned p_22, int p_23); +static unsigned func_39(int * p_40, unsigned char p_41); +static int * func_42(int p_43, int * p_44, short p_45, int * p_46); +static int * func_59(int * p_60, unsigned char p_61, short p_62); +static int * func_63(int * p_64, unsigned short p_65, int * p_66, unsigned short p_67); +static int * func_68(int * p_69, int * p_70, unsigned p_71, unsigned p_72); +static unsigned func_73(unsigned p_74, int * p_75); +static unsigned func_78(unsigned p_79, int p_80, int * p_81); +static int func_1(void) +{ + unsigned short l_24 = 9UL; + int ***l_561 = &g_540; + int l_570 = (-1L); + unsigned l_594 = 0x1B8BC197L; + unsigned l_623 = 1UL; + unsigned short l_624 = 1UL; + unsigned l_627 = 3UL; + int *l_628 = &g_316; + int *l_643 = (void*)0; + step_hash(392); + for (g_2 = 0; (g_2 < (-6)); --g_2) + { + unsigned short l_11 = 2UL; + int l_34 = (-5L); + int *l_562 = &g_503; + int ***l_569 = &g_258; + int *l_593 = &g_503; + short l_595 = (-5L); + int l_608 = 0L; + } + step_hash(393); + (*g_142) = (*g_258); + step_hash(423); + if ((func_5(g_321, (&g_142 == l_561), func_18(l_24, (((func_5(g_532, l_623, g_503, l_624, ((signed char)g_532 - (signed char)g_321)) == g_98) != 1UL) <= 0xFAL), g_532, g_464, l_627), l_570, g_464) & 0L)) + { + int *l_629 = &g_98; + int l_630 = (-8L); + step_hash(395); + (**g_258) = (*g_143); + step_hash(396); + (*g_258) = func_68(func_68(l_628, (*g_142), (*l_628), g_272), l_629, g_532, g_98); + step_hash(397); + return l_630; + } + else + { + unsigned l_638 = 1UL; + int *l_640 = (void*)0; + signed char l_642 = 0xCDL; + step_hash(419); + if ((+(*l_628))) + { + int *l_631 = &g_272; + step_hash(400); + (**g_258) |= (func_39(l_631, g_130) ^ ((&g_142 == (void*)0) != (((unsigned char)(!(g_634 || (0L || (0x1A553514L || (*l_631))))) * (unsigned char)g_503) > 65535UL))); + step_hash(401); + (*g_143) = (**g_142); + } + else + { + unsigned char l_635 = 253UL; + step_hash(417); + if ((g_272 >= l_635)) + { + step_hash(404); + return l_635; + } + else + { + step_hash(416); + if ((*g_560)) + { + step_hash(407); + (*g_142) = (*g_258); + } + else + { + step_hash(415); + for (l_627 = (-1); (l_627 == 33); ++l_627) + { + int *l_639 = &g_316; + step_hash(412); + (*g_560) &= l_638; + step_hash(413); + (*g_560) = (*g_560); + step_hash(414); + (*g_258) = l_639; + } + } + } + step_hash(418); + (*l_561) = &g_143; + } + step_hash(420); + g_641 = l_640; + step_hash(421); + (*g_258) = l_640; + step_hash(422); + (*g_142) = (*g_258); + } + step_hash(424); + return (*l_628); +} +static signed char func_5(unsigned p_6, int p_7, unsigned short p_8, unsigned short p_9, unsigned short p_10) +{ + signed char l_55 = 0x63L; + int *l_56 = &g_2; + step_hash(350); + for (p_6 = 0; (p_6 == 11); p_6++) + { + unsigned l_47 = 4294967295UL; + int *l_50 = &g_2; + int l_559 = (-1L); + } + step_hash(351); + return g_464; +} +static short func_18(short p_19, int p_20, int p_21, unsigned p_22, int p_23) +{ + int *l_33 = &g_2; + step_hash(5); + l_33 = l_33; + step_hash(6); + return g_2; +} +static unsigned func_39(int * p_40, unsigned char p_41) +{ + short l_558 = 9L; + step_hash(346); + for (g_464 = 19; (g_464 <= (-12)); g_464 -= 9) + { + int l_557 = 0xBD2DCFC4L; + step_hash(345); + return l_557; + } + step_hash(347); + return l_558; +} +static int * func_42(int p_43, int * p_44, short p_45, int * p_46) +{ + int *l_281 = &g_2; + short l_507 = 1L; + int l_513 = 0L; + int l_530 = 0L; + int ***l_552 = &g_540; + step_hash(306); + for (p_45 = 0; (p_45 == (-2)); p_45--) + { + int *l_466 = &g_2; + } + step_hash(313); + for (g_295 = 0; (g_295 > 48); ++g_295) + { + int *l_510 = &g_464; + step_hash(310); + (*g_142) = (void*)0; + step_hash(311); + (*l_510) = (~((*l_281) > ((-9L) <= ((unsigned)0x83769389L - (unsigned)p_45)))); + step_hash(312); + (*l_510) ^= ((unsigned)0xFDEF52C4L - (unsigned)g_208); + } + step_hash(314); + l_513 &= (*l_281); + step_hash(339); + if ((*p_44)) + { + short l_516 = (-1L); + int ***l_529 = &g_142; + unsigned char l_531 = 0UL; + int l_539 = 0x4A4D87DEL; + short l_546 = 1L; + step_hash(316); + l_513 ^= ((unsigned)l_516 - (unsigned)((unsigned short)(0x7797L | ((short)((g_98 | g_316) ^ (func_18(((unsigned)((int)0x36D6C550L / (int)(((g_272 && ((signed char)((unsigned short)(l_529 != l_529) * (unsigned short)p_45) - (signed char)g_130)) != 0x00L) ^ l_530)) + (unsigned)1UL), (*l_281), p_45, g_503, l_531) || g_532)) / (short)0x2A97L)) >> (unsigned short)2)); + step_hash(317); + l_513 = (g_208 <= (0x56L != (*l_281))); + step_hash(328); + for (p_45 = (-30); (p_45 == 9); ++p_45) + { + step_hash(327); + for (g_464 = 0; (g_464 >= 20); ++g_464) + { + signed char l_545 = 1L; + int *l_547 = &g_208; + step_hash(324); + (*g_142) = &l_513; + step_hash(325); + (*g_258) = p_44; + step_hash(326); + (*l_547) = ((((((short)0xC692L / (short)l_539) == (((g_540 == &g_143) <= (*p_46)) && (((!((unsigned)((((signed char)(0x5D0BEA25L | ((((p_46 != p_46) == (((&g_540 == (void*)0) | p_45) > g_316)) && p_43) && 0x42L)) * (signed char)l_545) && p_43) && (*p_44)) % (unsigned)l_546)) == p_43) | 0xFDB945C7L))) == 0L) < g_532) | 0xFFL); + } + } + step_hash(329); + return p_46; + } + else + { + int *l_548 = &g_208; + step_hash(331); + (*g_258) = func_59(l_548, p_45, (*l_548)); + step_hash(338); + for (g_208 = 28; (g_208 > (-21)); g_208 -= 3) + { + int ***l_551 = &g_142; + step_hash(335); + (*g_143) = (*p_46); + step_hash(336); + if ((*p_44)) + break; + step_hash(337); + (*g_142) = func_59(func_59(p_44, p_45, (((l_551 != l_552) & ((short)p_43 * (short)g_130)) > p_45)), g_272, p_45); + } + } + step_hash(340); + return p_46; +} +static int * func_59(int * p_60, unsigned char p_61, short p_62) +{ + int *l_504 = &g_316; + step_hash(302); + (*g_142) = (*g_258); + step_hash(303); + return l_504; +} +static int * func_63(int * p_64, unsigned short p_65, int * p_66, unsigned short p_67) +{ + int *l_467 = &g_208; + int ***l_487 = &g_142; + step_hash(265); + (*l_467) = (*p_66); + step_hash(299); + for (g_208 = 0; (g_208 == (-11)); g_208--) + { + int *l_472 = &g_272; + int l_473 = 8L; + } + step_hash(300); + return (*g_258); +} +static int * func_68(int * p_69, int * p_70, unsigned p_71, unsigned p_72) +{ + int *l_463 = &g_2; + int l_465 = (-4L); + step_hash(260); + g_464 ^= ((signed char)0L * (signed char)func_73((-(signed char)g_208), l_463)); + step_hash(261); + l_465 = ((void*)0 == &g_143); + step_hash(262); + (*g_142) = p_69; + step_hash(263); + return l_463; +} +static unsigned func_73(unsigned p_74, int * p_75) +{ + unsigned l_283 = 0xEDBE4E10L; + int l_294 = 0x8A34B86BL; + short l_302 = 0L; + unsigned char l_367 = 0xA5L; + int *l_370 = (void*)0; + int *l_380 = (void*)0; + int *l_381 = &g_316; + int l_388 = 0x101206E4L; + int l_438 = 0xCA283457L; + unsigned l_459 = 3UL; + step_hash(216); + if ((*p_75)) + { + unsigned char l_303 = 0UL; + int **l_326 = &g_143; + signed char l_354 = (-5L); + step_hash(196); + if ((0UL | (p_74 | ((unsigned short)((unsigned short)(func_18(g_98, g_2, (((unsigned)(+(((void*)0 != &l_294) < 0x47A8L)) / (unsigned)p_74) > l_302), l_303, (*p_75)) > l_303) / (unsigned short)p_74) - (unsigned short)p_74)))) + { + int *l_313 = (void*)0; + step_hash(156); + for (l_303 = (-16); (l_303 == 35); l_303 += 9) + { + int *l_306 = (void*)0; + int *l_307 = (void*)0; + int *l_308 = &g_208; + step_hash(149); + (*l_308) = (*p_75); + step_hash(150); + (*l_308) |= g_98; + step_hash(155); + for (g_208 = 0; (g_208 != 24); g_208 += 8) + { + step_hash(154); + (*g_142) = p_75; + } + } + } + else + { + unsigned short l_322 = 9UL; + step_hash(177); + for (g_316 = (-13); (g_316 != 6); g_316 += 6) + { + int *l_325 = &g_272; + int **l_336 = &l_325; + step_hash(161); + g_321 ^= l_303; + step_hash(176); + if (l_322) + { + int *l_323 = (void*)0; + int *l_324 = &g_272; + step_hash(163); + l_294 = (*p_75); + step_hash(164); + (*l_324) = (*p_75); + step_hash(165); + (*g_142) = l_325; + } + else + { + step_hash(167); + g_142 = l_326; + step_hash(175); + if ((((signed char)((&g_143 == &p_75) > g_98) * (signed char)l_322) != (l_302 || (*p_75)))) + { + unsigned l_331 = 8UL; + int *l_343 = (void*)0; + step_hash(169); + (*l_325) = (*p_75); + step_hash(170); + l_294 ^= 6L; + step_hash(171); + (*l_325) = (((unsigned char)l_331 - (unsigned char)((short)((signed char)g_295 / (signed char)g_316) << (short)((&p_75 == l_336) < (~((unsigned short)((signed char)func_18((+g_316), (g_98 < ((unsigned char)(l_343 == (void*)0) >> (unsigned char)g_130)), g_321, g_272, l_302) << (signed char)7) >> (unsigned short)p_74))))) != l_283); + } + else + { + step_hash(173); + (*l_336) = p_75; + step_hash(174); + if ((*p_75)) + break; + } + } + } + step_hash(178); + l_354 = (func_18(l_322, (((unsigned short)p_74 - (unsigned short)p_74) && ((unsigned short)((((p_74 && (((((signed char)((g_2 < p_74) == 1UL) * (signed char)((unsigned char)((unsigned)g_272 + (unsigned)((0L ^ g_98) > 0x62L)) >> (unsigned char)g_130)) & l_322) <= l_283) == g_98)) && l_294) != 0xF62EL) == (*p_75)) >> (unsigned short)l_294)), p_74, p_74, (*p_75)) == l_302); + step_hash(195); + for (g_272 = 0; (g_272 != (-10)); g_272 -= 6) + { + int *l_359 = (void*)0; + int *l_360 = &g_316; + step_hash(182); + if ((*p_75)) + break; + step_hash(183); + l_294 ^= 0L; + step_hash(184); + (*l_360) = (((short)p_74 * (short)0x57AAL) | l_294); + step_hash(194); + for (l_303 = 0; (l_303 != 31); l_303 += 6) + { + step_hash(193); + for (l_354 = 0; (l_354 > (-14)); --l_354) + { + step_hash(191); + (*l_360) ^= (p_75 != p_75); + step_hash(192); + (*l_326) = p_75; + } + } + } + } + step_hash(203); + for (g_130 = 3; (g_130 > 29); g_130 += 3) + { + short l_368 = 0x0AF9L; + int ***l_369 = &l_326; + step_hash(200); + l_294 &= func_18(g_2, g_2, (&p_75 != &p_75), l_367, (*p_75)); + step_hash(201); + l_368 &= (*p_75); + step_hash(202); + (*l_369) = &p_75; + } + step_hash(204); + (*g_258) = l_370; + step_hash(205); + (*l_326) = p_75; + } + else + { + int *l_371 = &l_294; + step_hash(207); + (*l_371) = (0x08FE410DL > g_98); + step_hash(214); + for (g_321 = 0; (g_321 != 4); ++g_321) + { + unsigned short l_378 = 65534UL; + int ***l_379 = (void*)0; + step_hash(211); + (*l_371) = ((~(((((short)((((short)l_378 % (short)g_272) <= (((void*)0 == l_379) == ((*p_75) && 0xE4177E30L))) >= (p_74 && (*l_371))) >> (short)14) & p_74) == p_74) || p_74)) | 0xE166L); + step_hash(212); + (*l_371) &= 0x9EFFC97FL; + step_hash(213); + return p_74; + } + step_hash(215); + p_75 = l_371; + } + step_hash(217); + (*l_381) &= (*p_75); + step_hash(256); + if ((((unsigned)(p_75 != &l_294) / (unsigned)g_130) && 0x948DL)) + { + int **l_394 = &l_370; + unsigned l_452 = 0xA5CA3130L; + step_hash(252); + if (((g_295 == p_74) != (g_208 == 0xC7D3L))) + { + int **l_395 = &l_380; + int l_453 = 0x505894CCL; + step_hash(226); + for (p_74 = (-3); (p_74 > 15); p_74 += 9) + { + unsigned char l_391 = 0x47L; + short l_396 = 0xFD82L; + step_hash(223); + (*l_381) &= l_396; + step_hash(224); + if ((*p_75)) + break; + step_hash(225); + return g_295; + } + step_hash(249); + for (g_130 = 0; (g_130 == (-22)); g_130 -= 2) + { + signed char l_415 = (-10L); + int l_426 = 0x696564DBL; + unsigned l_437 = 6UL; + step_hash(234); + for (g_208 = 0; (g_208 >= (-16)); g_208--) + { + step_hash(233); + return p_74; + } + step_hash(247); + for (g_208 = 0; (g_208 != 9); g_208 += 1) + { + int **l_409 = &l_381; + step_hash(244); + for (g_295 = 0; (g_295 == 51); g_295++) + { + int ***l_414 = &l_395; + step_hash(241); + (*l_381) |= (*p_75); + step_hash(242); + (*l_381) = (((0xA4F5L >= g_316) == (((unsigned short)0xD928L << (unsigned short)2) > (func_18(p_74, ((short)(((void*)0 == l_409) != (((short)((signed char)(l_414 == &l_395) * (signed char)p_74) >> (short)p_74) && g_321)) - (short)g_2), p_74, p_74, l_415) && 0x7C60L))) && p_74); + step_hash(243); + (*l_381) = (-1L); + } + step_hash(245); + l_438 ^= ((short)(((unsigned char)(!(func_18(g_272, g_295, g_98, ((unsigned char)((unsigned short)(0x06L > ((((unsigned char)l_426 << (unsigned char)((((((short)((unsigned short)(((short)(((void*)0 != p_75) >= 0UL) + (short)(func_18((~((short)((signed char)((void*)0 == p_75) << (signed char)3) << (short)9)), (**l_409), g_2, g_208, (*p_75)) <= (*p_75))) ^ l_437) / (unsigned short)(*l_381)) << (short)g_295) || 0xA8B326D2L) >= (-7L)) <= g_272) == p_74)) && p_74) ^ g_295)) * (unsigned short)0L) >> (unsigned char)g_321), (*l_381)) != 0xEE4BL)) % (unsigned char)p_74) < (*l_381)) + (short)(*l_381)); + step_hash(246); + (*l_381) = (**l_409); + } + step_hash(248); + (*l_381) = ((signed char)((*p_75) < func_18(p_74, ((short)((signed char)(p_74 | g_98) * (signed char)(func_18(((signed char)g_2 >> (signed char)((unsigned char)(-(unsigned)g_208) % (unsigned char)(1L ^ ((((unsigned char)p_74 % (unsigned char)func_18(p_74, p_74, g_98, p_74, l_452)) ^ 1L) ^ 65532UL)))), p_74, g_130, p_74, l_453) | 0xDF6AL)) % (short)(-1L)), g_316, p_74, l_415)) * (signed char)g_208); + } + } + else + { + int ***l_454 = &g_142; + step_hash(251); + (*l_381) = (l_454 != &g_258); + } + step_hash(253); + return p_74; + } + else + { + step_hash(255); + (*l_381) ^= (*p_75); + } + step_hash(257); + (*l_381) = ((((p_74 ^ (&l_438 == &l_294)) <= 0UL) || ((((unsigned char)(((unsigned short)(((&l_294 != (void*)0) || 0xACD0L) != ((p_74 < ((p_74 || g_321) | 1UL)) || 1UL)) * (unsigned short)p_74) < 2UL) + (unsigned char)0x53L) != 1UL) > 0x8A50L)) != l_459); + step_hash(258); + return p_74; +} +static unsigned func_78(unsigned p_79, int p_80, int * p_81) +{ + signed char l_82 = 0x71L; + int *l_96 = (void*)0; + int l_237 = 1L; + unsigned l_240 = 0x7D8C89FAL; + short l_247 = (-9L); + int *l_249 = &g_98; + unsigned l_270 = 3UL; + unsigned char l_279 = 0UL; + unsigned short l_280 = 1UL; + step_hash(132); + if ((l_82 && (l_82 && func_18(((unsigned short)(p_79 > ((unsigned short)p_79 << (unsigned short)p_79)) + (unsigned short)((short)((-(signed char)(g_2 <= ((+(((unsigned short)(l_82 == ((short)(func_18(((unsigned char)l_82 / (unsigned char)(((&g_2 == l_96) >= p_79) | l_82)), g_2, p_79, g_2, g_2) == p_79) + (short)g_2)) / (unsigned short)l_82) || g_2)) <= (*p_81)))) < l_82) + (short)g_2)), p_79, g_2, l_82, g_2)))) + { + int *l_97 = &g_98; + unsigned char l_108 = 7UL; + step_hash(17); + (*l_97) &= (*p_81); + step_hash(84); + if ((((signed char)g_2 + (signed char)((short)0xDA12L * (short)1UL)) == func_18(((unsigned)p_79 / (unsigned)(func_18((p_80 | func_18((0xDE40C593L <= ((unsigned short)(-(unsigned)(l_96 != p_81)) << (unsigned short)12)), p_79, (*l_97), (*l_97), (*p_81))), g_2, p_80, l_108, (*l_97)) & (*l_97))), g_98, g_98, g_2, g_98))) + { + int **l_109 = &l_97; + step_hash(19); + (*l_109) = l_96; + } + else + { + unsigned short l_129 = 0xC734L; + int l_155 = 0xE556C3ABL; + short l_156 = 9L; + step_hash(21); + g_98 = ((-(unsigned short)func_18((1L & func_18(g_2, p_80, (0x1E10L || p_80), (*l_97), g_98)), (*l_97), (*l_97), p_79, g_2)) == 65533UL); + step_hash(53); + if ((func_18(p_79, g_2, (~g_98), g_98, (*p_81)) != p_80)) + { + int **l_111 = &l_96; + unsigned char l_154 = 8UL; + step_hash(23); + (*l_97) = g_2; + step_hash(24); + (*l_111) = (void*)0; + step_hash(50); + if (g_2) + { + int l_128 = (-1L); + step_hash(26); + (*l_97) = ((int)(&g_98 != (void*)0) / (int)p_79); + step_hash(34); + for (p_80 = 0; (p_80 <= (-28)); p_80 -= 6) + { + step_hash(30); + (*l_111) = p_81; + step_hash(31); + (*l_97) = func_18((((signed char)0xB8L / (signed char)((signed char)((unsigned char)p_80 << (unsigned char)(g_2 | (((void*)0 == &p_81) || g_98))) << (signed char)6)) || ((unsigned char)func_18(((void*)0 != &l_97), g_98, p_80, g_2, (*p_81)) - (unsigned char)(*l_96))), p_80, (**l_111), p_80, g_98); + step_hash(32); + if ((*l_96)) + continue; + step_hash(33); + p_81 = l_96; + } + step_hash(35); + g_130 ^= func_18(p_80, func_18(((unsigned short)(0x3626L < p_79) % (unsigned short)((unsigned short)func_18((0x42L >= l_128), (func_18(((*p_81) | (&g_2 == (void*)0)), p_79, l_128, l_129, (*p_81)) == 0xF828L), g_98, p_80, g_2) << (unsigned short)12)), p_79, g_98, l_129, g_2), p_80, g_2, (*p_81)); + } + else + { + step_hash(37); + (*l_97) |= g_130; + step_hash(43); + for (p_80 = 0; (p_80 < (-19)); p_80--) + { + short l_135 = 0xB0D1L; + step_hash(41); + (*l_97) = ((unsigned char)(l_135 > p_80) >> (unsigned char)6); + step_hash(42); + (*l_111) = &g_98; + } + step_hash(48); + for (p_79 = 0; (p_79 < 11); ++p_79) + { + step_hash(47); + (*g_143) &= (g_130 > ((unsigned char)(g_2 | ((void*)0 == g_142)) << (unsigned char)l_129)); + } + step_hash(49); + l_155 = (p_79 < (((unsigned short)1UL >> (unsigned short)p_79) <= (((signed char)0x21L - (signed char)((unsigned)(p_79 < func_18((~((void*)0 != p_81)), ((signed char)(-4L) % (signed char)func_18(g_2, g_130, p_79, p_79, l_154)), g_2, p_80, (*p_81))) / (unsigned)0xB083140AL)) != (**g_142)))); + } + } + else + { + step_hash(52); + (*g_142) = l_96; + } + step_hash(83); + if (l_156) + { + step_hash(55); + (*g_142) = l_97; + step_hash(56); + l_155 ^= func_18(g_130, p_79, p_79, (p_80 && (g_130 != p_79)), ((short)0x874AL << (short)((+g_98) ^ ((*g_143) & 1L)))); + step_hash(65); + if ((p_80 == ((unsigned short)(((unsigned short)g_130 * (unsigned short)g_2) < (*p_81)) - (unsigned short)(0xE3L < g_98)))) + { + int *l_163 = &l_155; + step_hash(58); + (*g_143) = ((void*)0 == (*g_142)); + step_hash(59); + (*l_163) &= (*g_143); + step_hash(60); + (*g_142) = p_81; + } + else + { + int *l_164 = &l_155; + step_hash(62); + (*l_164) |= (**g_142); + step_hash(63); + (*g_142) = (*g_142); + step_hash(64); + return p_79; + } + } + else + { + int *l_189 = &l_155; + step_hash(67); + (*l_97) ^= ((int)(g_130 ^ p_79) - (int)0x466F024EL); + step_hash(68); + l_155 = ((signed char)0L >> (signed char)p_79); + step_hash(82); + if ((*p_81)) + { + step_hash(70); + (*l_97) = 0x5938EECFL; + step_hash(71); + (*g_142) = (*g_142); + } + else + { + int *l_169 = (void*)0; + step_hash(73); + (*g_142) = l_169; + step_hash(81); + for (l_108 = 0; (l_108 != 56); ++l_108) + { + int *l_172 = &g_98; + int l_190 = (-10L); + step_hash(77); + (*g_142) = l_172; + step_hash(78); + l_190 &= ((&g_143 != &g_143) | ((unsigned short)((signed char)(((func_18(g_130, g_130, ((short)((signed char)0x99L * (signed char)246UL) + (short)((int)(*g_143) / (int)(((short)(((unsigned char)255UL - (unsigned char)(((short)((void*)0 != l_189) << (short)(*l_97)) ^ (*l_172))) && 0x40L) % (short)0x4892L) | p_80))), (*l_189), (*l_97)) < 1L) != g_130) < p_80) >> (signed char)p_79) - (unsigned short)g_98)); + step_hash(79); + (*l_189) ^= func_18((g_2 <= g_98), ((int)func_18(p_80, ((short)0xA9D0L / (short)p_79), g_2, g_2, ((*p_81) == (((unsigned short)(p_80 != 0x3979L) * (unsigned short)0x5CF5L) && (-6L)))) % (int)(*p_81)), p_80, p_79, (*l_172)); + step_hash(80); + (*g_142) = p_81; + } + } + } + } + } + else + { + int l_226 = 1L; + step_hash(92); + if ((**g_142)) + { + unsigned l_197 = 7UL; + step_hash(87); + (*g_142) = (*g_142); + step_hash(88); + return l_197; + } + else + { + int *l_198 = &g_98; + step_hash(90); + (*g_142) = l_96; + step_hash(91); + (*l_198) |= (-6L); + } + step_hash(131); + for (l_82 = 10; (l_82 < (-22)); l_82--) + { + unsigned char l_235 = 255UL; + int l_248 = 0x1267525AL; + step_hash(110); + for (g_98 = 6; (g_98 >= (-12)); --g_98) + { + step_hash(103); + for (p_79 = 4; (p_79 == 7); p_79++) + { + int *l_207 = &g_208; + step_hash(102); + (*l_207) &= ((unsigned)p_79 / (unsigned)1L); + } + step_hash(109); + for (p_80 = 0; (p_80 >= (-10)); p_80 -= 9) + { + step_hash(107); + (*g_142) = (*g_142); + step_hash(108); + (*g_142) = (*g_142); + } + } + step_hash(128); + for (p_80 = 0; (p_80 < (-8)); --p_80) + { + int *l_213 = &g_208; + int *l_236 = &g_2; + step_hash(114); + (*g_142) = (void*)0; + step_hash(115); + (*l_213) &= 0x22FE7AF7L; + step_hash(126); + for (p_79 = 1; (p_79 > 46); p_79++) + { + step_hash(125); + if ((0x96L != p_80)) + { + step_hash(120); + (*l_213) = (((((signed char)((((unsigned char)(g_2 > (0x5CEDL > p_79)) - (unsigned char)(((unsigned short)p_79 << (unsigned short)11) && g_2)) ^ g_98) || ((signed char)p_79 / (signed char)(+p_79))) * (signed char)((unsigned char)(p_81 == l_213) << (unsigned char)l_226)) > (*l_213)) && g_130) > p_79); + step_hash(121); + (*g_142) = (*g_142); + step_hash(122); + return g_98; + } + else + { + step_hash(124); + return p_80; + } + } + step_hash(127); + l_237 = ((short)((signed char)((~(((unsigned short)func_18(g_208, g_208, ((signed char)func_18(p_80, g_2, l_235, (+((g_208 < 0UL) | (l_236 == p_81))), (*l_213)) << (signed char)4), (*l_213), (*l_213)) << (unsigned short)0) == g_130)) >= g_130) + (signed char)(*l_213)) - (short)p_80); + } + step_hash(129); + l_226 = ((g_130 | g_98) || ((unsigned char)l_240 << (unsigned char)g_98)); + step_hash(130); + l_248 = ((unsigned)(0x76L && ((int)l_235 - (int)func_18(p_80, p_80, l_235, func_18(l_235, ((((unsigned short)((func_18(l_226, func_18(l_235, l_247, p_79, g_208, (*p_81)), p_79, l_235, (*p_81)) || g_2) | 0xE22B5BEAL) % (unsigned short)p_80) <= l_226) && g_98), p_80, p_79, (*p_81)), (*p_81)))) % (unsigned)0x8C5722BDL); + } + } + step_hash(133); + (*l_249) = (&l_96 == &g_143); + step_hash(134); + (*g_142) = &l_237; + step_hash(141); + if ((0xBB3DL ^ func_18(((((unsigned short)((unsigned short)(p_79 != (0x74175C3EL >= (&l_237 == (void*)0))) * (unsigned short)(*l_249)) + (unsigned short)func_18(p_80, ((unsigned short)((&p_81 == g_258) < 0UL) - (unsigned short)p_79), p_80, p_79, (**g_258))) || (*l_249)) == 0x43L), (*l_249), p_80, (*l_249), (*p_81)))) + { + step_hash(136); + (*g_142) = (void*)0; + step_hash(137); + (*g_258) = (*g_258); + } + else + { + int l_263 = 0x40654149L; + int *l_271 = &g_272; + step_hash(139); + (*l_271) &= ((signed char)((unsigned short)(func_18((l_263 || (-5L)), (((unsigned short)((unsigned)(((signed char)(~(65535UL != l_263)) % (signed char)func_18(((*g_142) != (*g_258)), g_98, (*l_249), g_208, l_263)) != g_98) + (unsigned)l_263) * (unsigned short)l_270) || g_2), p_79, g_2, (**g_258)) && 255UL) >> (unsigned short)l_263) << (signed char)p_79); + step_hash(140); + l_280 ^= ((~((((unsigned)func_18((g_98 <= g_130), (*l_249), g_208, ((*l_249) >= ((*l_249) & ((unsigned)g_208 % (unsigned)g_272))), (((short)(-1L) / (short)l_279) && p_79)) + (unsigned)0xF5E0A40FL) == (-4L)) < g_208)) | (**g_258)); + } + step_hash(142); + return p_80; +} +void csmith_compute_hash(void) +{ + transparent_crc(g_2, "g_2", print_hash_value); + transparent_crc(g_98, "g_98", print_hash_value); + transparent_crc(g_130, "g_130", print_hash_value); + transparent_crc(g_208, "g_208", print_hash_value); + transparent_crc(g_272, "g_272", print_hash_value); + transparent_crc(g_295, "g_295", print_hash_value); + transparent_crc(g_316, "g_316", print_hash_value); + transparent_crc(g_321, "g_321", print_hash_value); + transparent_crc(g_464, "g_464", print_hash_value); + transparent_crc(g_503, "g_503", print_hash_value); + transparent_crc(g_532, "g_532", print_hash_value); + transparent_crc(g_634, "g_634", print_hash_value); +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand35.expect b/src/tests/csmith/rand35.expect new file mode 100644 index 0000000..6a38d29 --- /dev/null +++ b/src/tests/csmith/rand35.expect @@ -0,0 +1,247 @@ +...checksum after hashing g_2 : 3A4BD710 +...checksum after hashing g_98 : A88C0D92 +...checksum after hashing g_130 : 94134AFC +...checksum after hashing g_208 : 3FAD0A2 +...checksum after hashing g_272 : E24E43CC +...checksum after hashing g_295 : 97DC099D +...checksum after hashing g_316 : 2259511E +...checksum after hashing g_321 : C95E5463 +...checksum after hashing g_464 : 38315348 +...checksum after hashing g_503 : FF41800B +...checksum after hashing g_532 : F20F4E4C +...checksum after hashing g_634 : 5EA917AC +before stmt(392): checksum = 5EA917AC +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_98 : E1B436B1 +...checksum after hashing g_130 : 16350592 +...checksum after hashing g_208 : 63ADFB47 +...checksum after hashing g_272 : 8FBFF10C +...checksum after hashing g_295 : 19EF00FC +...checksum after hashing g_316 : 507931E0 +...checksum after hashing g_321 : CCBFCA65 +...checksum after hashing g_464 : DDD8AF4C +...checksum after hashing g_503 : 9321C3BA +...checksum after hashing g_532 : 4E412FE +...checksum after hashing g_634 : 65203B67 +before stmt(393): checksum = 65203B67 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_98 : E1B436B1 +...checksum after hashing g_130 : 16350592 +...checksum after hashing g_208 : 63ADFB47 +...checksum after hashing g_272 : 8FBFF10C +...checksum after hashing g_295 : 19EF00FC +...checksum after hashing g_316 : 507931E0 +...checksum after hashing g_321 : CCBFCA65 +...checksum after hashing g_464 : DDD8AF4C +...checksum after hashing g_503 : 9321C3BA +...checksum after hashing g_532 : 4E412FE +...checksum after hashing g_634 : 65203B67 +before stmt(423): checksum = 65203B67 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_98 : E1B436B1 +...checksum after hashing g_130 : 16350592 +...checksum after hashing g_208 : 63ADFB47 +...checksum after hashing g_272 : 8FBFF10C +...checksum after hashing g_295 : 19EF00FC +...checksum after hashing g_316 : 507931E0 +...checksum after hashing g_321 : CCBFCA65 +...checksum after hashing g_464 : DDD8AF4C +...checksum after hashing g_503 : 9321C3BA +...checksum after hashing g_532 : 4E412FE +...checksum after hashing g_634 : 65203B67 +before stmt(350): checksum = 65203B67 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_98 : E1B436B1 +...checksum after hashing g_130 : 16350592 +...checksum after hashing g_208 : 63ADFB47 +...checksum after hashing g_272 : 8FBFF10C +...checksum after hashing g_295 : 19EF00FC +...checksum after hashing g_316 : 507931E0 +...checksum after hashing g_321 : CCBFCA65 +...checksum after hashing g_464 : DDD8AF4C +...checksum after hashing g_503 : 9321C3BA +...checksum after hashing g_532 : 4E412FE +...checksum after hashing g_634 : 65203B67 +before stmt(351): checksum = 65203B67 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_98 : E1B436B1 +...checksum after hashing g_130 : 16350592 +...checksum after hashing g_208 : 63ADFB47 +...checksum after hashing g_272 : 8FBFF10C +...checksum after hashing g_295 : 19EF00FC +...checksum after hashing g_316 : 507931E0 +...checksum after hashing g_321 : CCBFCA65 +...checksum after hashing g_464 : DDD8AF4C +...checksum after hashing g_503 : 9321C3BA +...checksum after hashing g_532 : 4E412FE +...checksum after hashing g_634 : 65203B67 +before stmt(5): checksum = 65203B67 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_98 : E1B436B1 +...checksum after hashing g_130 : 16350592 +...checksum after hashing g_208 : 63ADFB47 +...checksum after hashing g_272 : 8FBFF10C +...checksum after hashing g_295 : 19EF00FC +...checksum after hashing g_316 : 507931E0 +...checksum after hashing g_321 : CCBFCA65 +...checksum after hashing g_464 : DDD8AF4C +...checksum after hashing g_503 : 9321C3BA +...checksum after hashing g_532 : 4E412FE +...checksum after hashing g_634 : 65203B67 +before stmt(6): checksum = 65203B67 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_98 : E1B436B1 +...checksum after hashing g_130 : 16350592 +...checksum after hashing g_208 : 63ADFB47 +...checksum after hashing g_272 : 8FBFF10C +...checksum after hashing g_295 : 19EF00FC +...checksum after hashing g_316 : 507931E0 +...checksum after hashing g_321 : CCBFCA65 +...checksum after hashing g_464 : DDD8AF4C +...checksum after hashing g_503 : 9321C3BA +...checksum after hashing g_532 : 4E412FE +...checksum after hashing g_634 : 65203B67 +before stmt(350): checksum = 65203B67 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_98 : E1B436B1 +...checksum after hashing g_130 : 16350592 +...checksum after hashing g_208 : 63ADFB47 +...checksum after hashing g_272 : 8FBFF10C +...checksum after hashing g_295 : 19EF00FC +...checksum after hashing g_316 : 507931E0 +...checksum after hashing g_321 : CCBFCA65 +...checksum after hashing g_464 : DDD8AF4C +...checksum after hashing g_503 : 9321C3BA +...checksum after hashing g_532 : 4E412FE +...checksum after hashing g_634 : 65203B67 +before stmt(351): checksum = 65203B67 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_98 : E1B436B1 +...checksum after hashing g_130 : 16350592 +...checksum after hashing g_208 : 63ADFB47 +...checksum after hashing g_272 : 8FBFF10C +...checksum after hashing g_295 : 19EF00FC +...checksum after hashing g_316 : 507931E0 +...checksum after hashing g_321 : CCBFCA65 +...checksum after hashing g_464 : DDD8AF4C +...checksum after hashing g_503 : 9321C3BA +...checksum after hashing g_532 : 4E412FE +...checksum after hashing g_634 : 65203B67 +before stmt(419): checksum = 65203B67 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_98 : E1B436B1 +...checksum after hashing g_130 : 16350592 +...checksum after hashing g_208 : 63ADFB47 +...checksum after hashing g_272 : 8FBFF10C +...checksum after hashing g_295 : 19EF00FC +...checksum after hashing g_316 : 507931E0 +...checksum after hashing g_321 : CCBFCA65 +...checksum after hashing g_464 : DDD8AF4C +...checksum after hashing g_503 : 9321C3BA +...checksum after hashing g_532 : 4E412FE +...checksum after hashing g_634 : 65203B67 +before stmt(417): checksum = 65203B67 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_98 : E1B436B1 +...checksum after hashing g_130 : 16350592 +...checksum after hashing g_208 : 63ADFB47 +...checksum after hashing g_272 : 8FBFF10C +...checksum after hashing g_295 : 19EF00FC +...checksum after hashing g_316 : 507931E0 +...checksum after hashing g_321 : CCBFCA65 +...checksum after hashing g_464 : DDD8AF4C +...checksum after hashing g_503 : 9321C3BA +...checksum after hashing g_532 : 4E412FE +...checksum after hashing g_634 : 65203B67 +before stmt(416): checksum = 65203B67 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_98 : E1B436B1 +...checksum after hashing g_130 : 16350592 +...checksum after hashing g_208 : 63ADFB47 +...checksum after hashing g_272 : 8FBFF10C +...checksum after hashing g_295 : 19EF00FC +...checksum after hashing g_316 : 507931E0 +...checksum after hashing g_321 : CCBFCA65 +...checksum after hashing g_464 : DDD8AF4C +...checksum after hashing g_503 : 9321C3BA +...checksum after hashing g_532 : 4E412FE +...checksum after hashing g_634 : 65203B67 +before stmt(415): checksum = 65203B67 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_98 : E1B436B1 +...checksum after hashing g_130 : 16350592 +...checksum after hashing g_208 : 63ADFB47 +...checksum after hashing g_272 : 8FBFF10C +...checksum after hashing g_295 : 19EF00FC +...checksum after hashing g_316 : 507931E0 +...checksum after hashing g_321 : CCBFCA65 +...checksum after hashing g_464 : DDD8AF4C +...checksum after hashing g_503 : 9321C3BA +...checksum after hashing g_532 : 4E412FE +...checksum after hashing g_634 : 65203B67 +before stmt(418): checksum = 65203B67 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_98 : E1B436B1 +...checksum after hashing g_130 : 16350592 +...checksum after hashing g_208 : 63ADFB47 +...checksum after hashing g_272 : 8FBFF10C +...checksum after hashing g_295 : 19EF00FC +...checksum after hashing g_316 : 507931E0 +...checksum after hashing g_321 : CCBFCA65 +...checksum after hashing g_464 : DDD8AF4C +...checksum after hashing g_503 : 9321C3BA +...checksum after hashing g_532 : 4E412FE +...checksum after hashing g_634 : 65203B67 +before stmt(420): checksum = 65203B67 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_98 : E1B436B1 +...checksum after hashing g_130 : 16350592 +...checksum after hashing g_208 : 63ADFB47 +...checksum after hashing g_272 : 8FBFF10C +...checksum after hashing g_295 : 19EF00FC +...checksum after hashing g_316 : 507931E0 +...checksum after hashing g_321 : CCBFCA65 +...checksum after hashing g_464 : DDD8AF4C +...checksum after hashing g_503 : 9321C3BA +...checksum after hashing g_532 : 4E412FE +...checksum after hashing g_634 : 65203B67 +before stmt(421): checksum = 65203B67 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_98 : E1B436B1 +...checksum after hashing g_130 : 16350592 +...checksum after hashing g_208 : 63ADFB47 +...checksum after hashing g_272 : 8FBFF10C +...checksum after hashing g_295 : 19EF00FC +...checksum after hashing g_316 : 507931E0 +...checksum after hashing g_321 : CCBFCA65 +...checksum after hashing g_464 : DDD8AF4C +...checksum after hashing g_503 : 9321C3BA +...checksum after hashing g_532 : 4E412FE +...checksum after hashing g_634 : 65203B67 +before stmt(422): checksum = 65203B67 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_98 : E1B436B1 +...checksum after hashing g_130 : 16350592 +...checksum after hashing g_208 : 63ADFB47 +...checksum after hashing g_272 : 8FBFF10C +...checksum after hashing g_295 : 19EF00FC +...checksum after hashing g_316 : 507931E0 +...checksum after hashing g_321 : CCBFCA65 +...checksum after hashing g_464 : DDD8AF4C +...checksum after hashing g_503 : 9321C3BA +...checksum after hashing g_532 : 4E412FE +...checksum after hashing g_634 : 65203B67 +before stmt(424): checksum = 65203B67 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_98 : E1B436B1 +...checksum after hashing g_130 : 16350592 +...checksum after hashing g_208 : 63ADFB47 +...checksum after hashing g_272 : 8FBFF10C +...checksum after hashing g_295 : 19EF00FC +...checksum after hashing g_316 : 507931E0 +...checksum after hashing g_321 : CCBFCA65 +...checksum after hashing g_464 : DDD8AF4C +...checksum after hashing g_503 : 9321C3BA +...checksum after hashing g_532 : 4E412FE +...checksum after hashing g_634 : 65203B67 +checksum = 65203b67 diff --git a/src/tests/csmith/rand36.c b/src/tests/csmith/rand36.c new file mode 100644 index 0000000..e1ba1e4 --- /dev/null +++ b/src/tests/csmith/rand36.c @@ -0,0 +1,822 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static int g_2 = 1L; +static int g_81 = (-1L); +static int g_84 = (-5L); +static int g_90 = (-1L); +static int **g_99 = (void*)0; +static unsigned g_135 = 3UL; +static unsigned short g_148 = 65534UL; +static int g_350 = 0x03ED47F7L; +static int g_491 = 5L; +static unsigned char g_515 = 0x49L; +static int *g_552 = &g_84; +static int **g_551 = &g_552; +static int *g_626 = &g_84; +static signed char g_636 = (-9L); +static short func_1(void); +static unsigned func_12(int p_13, int p_14); +static signed char func_22(int p_23, int p_24, int p_25, int ** p_26); +static int func_27(unsigned p_28); +static short func_35(int p_36); +static int * func_37(unsigned p_38, unsigned char p_39, int p_40, int * p_41, unsigned char p_42); +static unsigned func_43(int * p_44, unsigned short p_45, int p_46); +static signed char func_64(int * p_65, int * p_66); +static int * func_67(unsigned p_68, short p_69, unsigned char p_70, int p_71, int p_72); +static unsigned char func_77(int ** p_78); +static short func_1(void) +{ + signed char l_19 = (-1L); + signed char l_29 = 0x7FL; + int l_559 = 0L; + int *l_573 = &l_559; + int *l_574 = &g_2; + unsigned l_582 = 0xAF454D57L; + unsigned l_598 = 4294967295UL; + unsigned char l_602 = 1UL; + unsigned short l_607 = 1UL; + int l_649 = (-1L); + step_hash(330); + for (g_2 = 0; (g_2 <= (-9)); g_2 -= 2) + { + int *l_6 = (void*)0; + int **l_5 = &l_6; + int *l_567 = &g_81; + signed char l_575 = (-1L); + step_hash(4); + (*l_5) = &g_2; + } + step_hash(384); + for (l_559 = 1; (l_559 > 18); l_559 += 1) + { + int *l_588 = &g_2; + unsigned char l_590 = 1UL; + int ***l_624 = &g_551; + } + step_hash(385); + l_573 = &l_559; + step_hash(386); + (*g_551) = func_67(g_90, ((short)g_90 << (short)8), (*l_573), (*l_574), g_2); + step_hash(387); + return g_135; +} +static unsigned func_12(int p_13, int p_14) +{ + step_hash(300); + (**g_551) = (((unsigned char)p_14 * (unsigned char)4L) || g_491); + step_hash(306); + for (g_84 = (-15); (g_84 < 13); g_84 += 4) + { + int *l_564 = (void*)0; + int *l_565 = (void*)0; + int *l_566 = &g_81; + step_hash(304); + (*l_566) &= 0x63194C8EL; + step_hash(305); + (*g_551) = &p_14; + } + step_hash(307); + return g_350; +} +static signed char func_22(int p_23, int p_24, int p_25, int ** p_26) +{ + unsigned char l_529 = 255UL; + int *l_530 = &g_81; + int l_553 = (-1L); + step_hash(259); + (*l_530) = ((unsigned short)65527UL << (unsigned short)((unsigned char)((unsigned char)p_25 >> (unsigned char)l_529) << (unsigned char)(!g_135))); + step_hash(297); + if ((l_530 != (void*)0)) + { + unsigned short l_535 = 0x6D27L; + int l_536 = 0L; + step_hash(261); + p_23 ^= ((int)((unsigned short)l_535 >> (unsigned short)g_84) + (int)(*l_530)); + step_hash(262); + l_536 = 0x8102B237L; + } + else + { + unsigned short l_539 = 6UL; + int *l_554 = &g_491; + step_hash(288); + if (((unsigned)g_90 / (unsigned)g_2)) + { + step_hash(265); + return l_539; + } + else + { + int *l_549 = &g_2; + step_hash(287); + for (p_24 = 14; (p_24 <= 25); p_24++) + { + int **l_542 = &l_530; + int ***l_543 = (void*)0; + int ***l_544 = &l_542; + step_hash(270); + (*l_544) = l_542; + step_hash(271); + (*l_542) = l_530; + step_hash(285); + for (p_25 = 19; (p_25 > 29); p_25 += 6) + { + int **l_550 = (void*)0; + step_hash(282); + for (g_148 = 0; (g_148 == 3); g_148 += 6) + { + step_hash(278); + (**l_544) = l_549; + step_hash(279); + if ((**p_26)) + break; + step_hash(280); + (*g_552) |= (l_550 == g_551); + step_hash(281); + p_23 ^= (&g_552 == (void*)0); + } + step_hash(283); + l_553 = (*l_549); + step_hash(284); + (*g_552) ^= (**p_26); + } + step_hash(286); + (**l_544) = l_554; + } + } + step_hash(289); + (**g_551) ^= (*l_530); + step_hash(295); + for (g_135 = 20; (g_135 < 26); ++g_135) + { + step_hash(293); + (*p_26) = (*g_551); + step_hash(294); + (*g_551) = (*p_26); + } + step_hash(296); + (*l_554) = (*l_530); + } + step_hash(298); + return g_84; +} +static int func_27(unsigned p_28) +{ + int l_30 = (-1L); + int *l_517 = &g_81; + int **l_516 = &l_517; + step_hash(256); + if (l_30) + { + unsigned l_489 = 5UL; + int *l_490 = &g_491; + unsigned short l_495 = 0UL; + signed char l_506 = (-1L); + int *l_511 = (void*)0; + int l_512 = (-8L); + step_hash(244); + (*l_490) ^= (((signed char)(((short)func_35(p_28) * (short)((8UL <= (-1L)) == l_30)) != ((short)(((short)(-10L) - (short)(((unsigned short)((((l_30 < ((unsigned short)(1UL > ((1UL == l_489) | p_28)) << (unsigned short)6)) > g_2) && 0UL) || 0x9FB52959L) / (unsigned short)p_28) | p_28)) <= l_30) * (short)l_30)) / (signed char)g_2) & 1UL); + step_hash(251); + for (g_491 = (-10); (g_491 <= (-27)); g_491 -= 5) + { + int *l_494 = &l_30; + step_hash(248); + (*l_494) |= p_28; + step_hash(249); + if (p_28) + break; + step_hash(250); + if (l_495) + break; + } + step_hash(252); + l_512 ^= ((unsigned char)((unsigned short)((int)p_28 % (int)((unsigned short)((unsigned)l_506 + (unsigned)((unsigned short)(g_350 <= l_30) * (unsigned short)(-1L))) * (unsigned short)((g_491 > ((*l_490) >= ((short)p_28 % (short)g_81))) ^ p_28))) - (unsigned short)3UL) << (unsigned char)5); + step_hash(253); + (*l_490) &= (((~(&l_512 != &l_512)) | (((((((unsigned short)(p_28 ^ p_28) >> (unsigned short)8) <= p_28) == (g_2 ^ func_64(&g_90, func_37(p_28, l_30, p_28, &l_30, p_28)))) == p_28) || g_515) ^ p_28)) <= 0x60L); + } + else + { + int ***l_518 = &l_516; + step_hash(255); + (*l_518) = l_516; + } + step_hash(257); + return (**l_516); +} +static short func_35(int p_36) +{ + short l_462 = 1L; + int *l_463 = (void*)0; + unsigned l_464 = 0xFC0DC315L; + int **l_475 = &l_463; + int *l_478 = &g_90; + step_hash(241); + (*l_475) = func_37(func_43(&g_2, g_2, g_2), l_462, l_462, l_463, l_464); + step_hash(242); + (*l_478) = ((unsigned short)65535UL >> (unsigned short)func_77(&l_463)); + step_hash(243); + return g_90; +} +static int * func_37(unsigned p_38, unsigned char p_39, int p_40, int * p_41, unsigned char p_42) +{ + int l_469 = 0xF47E50A9L; + int l_470 = (-2L); + step_hash(233); + l_470 ^= ((unsigned char)g_81 + (unsigned char)(p_42 | ((signed char)p_42 << (signed char)l_469))); + step_hash(239); + for (g_81 = 15; (g_81 < 15); g_81 += 1) + { + int *l_473 = (void*)0; + int *l_474 = &g_84; + step_hash(237); + (*l_474) = 0xA357E05EL; + step_hash(238); + if (g_135) + break; + } + step_hash(240); + return &g_90; +} +static unsigned func_43(int * p_44, unsigned short p_45, int p_46) +{ + short l_104 = 0xA5B8L; + int l_159 = 0L; + int *l_189 = (void*)0; + int **l_188 = &l_189; + int *l_192 = (void*)0; + unsigned l_213 = 8UL; + signed char l_240 = (-1L); + int *l_241 = &l_159; + signed char l_242 = 0x67L; + unsigned l_246 = 4294967295UL; + unsigned l_321 = 0x9AC3D867L; + unsigned short l_329 = 0x9F58L; + signed char l_440 = 5L; + step_hash(114); + for (p_46 = 21; (p_46 == (-5)); p_46 -= 3) + { + signed char l_55 = (-1L); + int *l_141 = &g_2; + int **l_140 = &l_141; + int **l_174 = &l_141; + unsigned short l_212 = 5UL; + unsigned char l_227 = 0x57L; + int l_239 = 1L; + step_hash(112); + if ((*p_44)) + { + int *l_80 = &g_2; + int **l_79 = &l_80; + unsigned char l_103 = 253UL; + signed char l_207 = 0L; + signed char l_214 = 0x8AL; + int *l_223 = &g_84; + step_hash(95); + if (g_2) + { + int *l_60 = (void*)0; + int l_61 = 0L; + step_hash(14); + l_61 = (+((0xD50FA8FAL & ((unsigned short)g_2 % (unsigned short)((short)(~((unsigned short)0xC4B0L / (unsigned short)(l_55 && (((signed char)g_2 * (signed char)(g_2 <= 6L)) | (0xB3L | ((unsigned char)((void*)0 == &p_46) - (unsigned char)g_2)))))) + (short)0x079DL))) & p_46)); + step_hash(53); + g_135 |= (((unsigned short)((4294967295UL < (func_64(func_67(((unsigned short)(((signed char)g_2 % (signed char)func_77(l_79)) ^ ((unsigned char)(!((&l_60 != g_99) || (-(int)(65528UL | p_45)))) >> (unsigned char)((short)(g_2 >= l_103) * (short)g_2))) * (unsigned short)l_55), l_55, g_2, l_104, p_46), &g_2) == p_46)) & p_46) * (unsigned short)l_55) && 0xA18A5C64L); + step_hash(54); + g_148 |= ((int)((unsigned)0UL / (unsigned)func_77(l_140)) - (int)(g_2 > ((int)(!((((unsigned)g_135 % (unsigned)(p_46 & g_135)) <= l_103) | ((((unsigned)4294967295UL - (unsigned)(*p_44)) == 0x9F135B39L) > 1L))) - (int)p_46))); + step_hash(55); + return g_148; + } + else + { + int **l_149 = &l_80; + int l_197 = (-1L); + step_hash(73); + if (g_81) + { + int *l_150 = (void*)0; + int *l_151 = &g_81; + int *l_158 = (void*)0; + step_hash(58); + (*l_151) = (&p_44 == l_149); + step_hash(59); + l_159 = (((void*)0 == &l_150) == (((short)g_148 - (short)((unsigned char)((unsigned short)((void*)0 == l_158) / (unsigned short)0xD275L) - (unsigned char)(((&p_44 == g_99) | (**l_149)) == g_84))) == g_81)); + step_hash(60); + (*l_151) ^= ((signed char)((unsigned char)((void*)0 == &l_150) % (unsigned char)9L) - (signed char)(((void*)0 == &p_46) == (&l_141 != g_99))); + } + else + { + int l_175 = 0xD4A5CD31L; + step_hash(69); + if (((((0x67L <= l_159) | (((signed char)((unsigned char)1UL % (unsigned char)((signed char)(((int)0xCA1BE135L / (int)((int)0xBB088A05L - (int)p_45)) < (*l_141)) % (signed char)l_175)) << (signed char)5) > 1L)) && g_148) > 1UL)) + { + step_hash(63); + if ((*p_44)) + break; + step_hash(64); + (*l_149) = (void*)0; + step_hash(65); + (*l_140) = (void*)0; + } + else + { + int l_182 = 0xB87C57D7L; + int ***l_183 = &g_99; + step_hash(67); + l_182 ^= ((short)(((*l_80) || ((unsigned char)((unsigned short)65526UL >> (unsigned short)10) / (unsigned char)247UL)) == 0x2B13B08BL) * (short)p_45); + step_hash(68); + (*l_183) = &p_44; + } + step_hash(70); + g_84 = (((unsigned char)(~l_175) / (unsigned char)l_175) && (l_188 == g_99)); + step_hash(71); + (*l_174) = func_67((func_77(&l_80) >= ((signed char)(l_192 != &p_46) / (signed char)g_148)), (~g_135), (&g_2 != (*l_188)), g_2, l_175); + step_hash(72); + (*l_140) = &p_46; + } + step_hash(94); + for (g_135 = 0; (g_135 >= 5); ++g_135) + { + int l_215 = 0xBB184844L; + step_hash(83); + for (l_55 = 0; (l_55 >= (-27)); l_55--) + { + int *l_198 = &l_159; + step_hash(80); + l_197 &= 4L; + step_hash(81); + (*l_198) = (-1L); + step_hash(82); + l_215 = ((int)(g_90 ^ 0x477EL) - (int)(*p_44)); + } + } + } + step_hash(103); + if (l_227) + { + step_hash(97); + (*l_223) = (*p_44); + step_hash(98); + if ((*p_44)) + continue; + step_hash(99); + (*l_188) = &p_46; + step_hash(100); + (*l_140) = (void*)0; + } + else + { + step_hash(102); + return p_45; + } + } + else + { + short l_232 = 1L; + int *l_238 = &l_159; + step_hash(109); + if ((((((!(0x2AD3L <= ((((signed char)((short)l_232 % (short)p_45) >> (signed char)((0xDBL <= (*l_141)) <= ((p_45 || (((((signed char)((unsigned char)((p_46 == p_45) || g_2) / (unsigned char)0xFFL) >> (signed char)(**l_174)) > 6L) > p_46) && 0xDEL)) >= l_232))) <= (*p_44)) != g_2))) > p_45) < p_46) == g_81) | p_46)) + { + step_hash(106); + return g_81; + } + else + { + int *l_237 = &g_84; + step_hash(108); + (*l_237) = (**l_140); + } + step_hash(110); + (*l_238) |= 0xF0672DA4L; + step_hash(111); + l_240 &= l_239; + } + step_hash(113); + if ((*p_44)) + break; + } + step_hash(115); + (*l_241) &= (*p_44); + step_hash(230); + if (((func_77(&l_241) | (&l_188 == (void*)0)) || l_242)) + { + int ***l_243 = &g_99; + int *l_249 = &g_90; + step_hash(117); + (*l_243) = &p_44; + step_hash(118); + p_46 = 0xD7AE1D0CL; + step_hash(119); + (*l_249) = (0xDAL | ((unsigned short)func_64(&p_46, func_67(p_46, g_81, g_90, l_246, ((int)(**g_99) % (int)0x185DD034L))) * (unsigned short)(***l_243))); + step_hash(149); + if (((short)((unsigned char)0x2EL >> (unsigned char)((int)(6UL & ((&p_44 != &p_44) | ((unsigned char)p_45 * (unsigned char)((((void*)0 == l_243) != (**g_99)) && ((short)(func_64(func_67((((***l_243) || (*l_249)) >= p_45), p_46, (***l_243), p_46, p_46), (*g_99)) & g_2) * (short)0xCB06L))))) % (int)g_148)) >> (short)14)) + { + unsigned short l_274 = 0x0E7BL; + int **l_275 = &l_241; + step_hash(121); + (**l_243) = func_67(g_148, ((unsigned short)p_45 % (unsigned short)g_135), ((short)((signed char)p_46 / (signed char)((unsigned short)((+255UL) | ((***l_243) != ((short)(((short)(g_84 && ((***l_243) && (((signed char)(g_2 < 0UL) / (signed char)l_274) & (*p_44)))) + (short)g_81) != p_46) + (short)g_90))) >> (unsigned short)g_81)) - (short)g_81), p_45, g_2); + step_hash(145); + if (((g_135 >= func_77(l_275)) && (*p_44))) + { + step_hash(123); + (**g_99) = (func_77(l_275) && p_45); + } + else + { + step_hash(129); + for (g_84 = 0; (g_84 <= 7); ++g_84) + { + step_hash(128); + (*l_249) = (*l_249); + } + step_hash(130); + (*p_44) = (*p_44); + step_hash(131); + (*l_249) = (-1L); + step_hash(144); + for (g_148 = (-1); (g_148 > 36); g_148 += 3) + { + unsigned l_280 = 4294967294UL; + step_hash(135); + (*l_249) ^= ((((*p_44) ^ (*p_44)) > p_46) ^ p_46); + step_hash(136); + (*p_44) = l_280; + step_hash(137); + (**g_99) ^= ((((void*)0 == (**l_243)) > (!g_135)) | p_45); + step_hash(143); + for (l_159 = (-30); (l_159 == 11); ++l_159) + { + int *l_285 = (void*)0; + } + } + } + } + else + { + int l_286 = 1L; + step_hash(147); + l_286 = (*l_249); + step_hash(148); + (**l_243) = (*l_188); + } + } + else + { + int ***l_307 = &g_99; + int ***l_308 = &g_99; + int *l_316 = (void*)0; + int *l_317 = (void*)0; + int *l_318 = &g_84; + unsigned l_346 = 0x5093E27FL; + signed char l_354 = (-8L); + int l_385 = 8L; + step_hash(157); + if (((short)p_45 - (short)g_148)) + { + signed char l_297 = 1L; + signed char l_298 = (-3L); + int *l_311 = &g_81; + unsigned short l_312 = 65526UL; + step_hash(152); + l_312 &= ((p_46 ^ g_148) == ((signed char)(((((signed char)((signed char)(!((short)l_297 + (short)l_298)) + (signed char)((signed char)((signed char)((signed char)p_46 * (signed char)((((unsigned)(l_307 != l_308) - (unsigned)((short)p_45 >> (short)5)) || (+func_64(l_311, l_311))) | g_135)) * (signed char)g_84) * (signed char)0UL)) >> (signed char)p_46) & g_148) > p_46) == 0x61L) >> (signed char)p_45)); + step_hash(153); + (*l_311) = (*p_44); + step_hash(154); + p_46 = (p_45 < ((&g_99 != (void*)0) <= ((short)func_77(&p_44) >> (short)p_46))); + } + else + { + int *l_315 = &g_81; + step_hash(156); + (*l_188) = func_67((p_46 >= 0x30L), p_46, g_2, p_46, func_64(l_315, &g_81)); + } + step_hash(158); + (*l_318) ^= g_148; + step_hash(229); + if (((unsigned char)((&p_46 == (void*)0) ^ (l_321 > (*l_318))) << (unsigned char)p_46)) + { + int **l_322 = &l_241; + unsigned short l_342 = 65532UL; + int **l_409 = &l_317; + step_hash(160); + (*l_322) = func_67(g_135, (func_77(l_322) != g_2), g_148, (g_99 == (void*)0), g_148); + step_hash(216); + if ((p_45 && (0L <= func_77(&p_44)))) + { + unsigned l_332 = 0x13221460L; + step_hash(162); + (*l_188) = func_67(((short)0x5A51L >> (short)p_45), p_45, (*l_241), g_84, (**l_322)); + step_hash(169); + for (l_104 = 0; (l_104 > 5); l_104 += 7) + { + int l_339 = (-7L); + step_hash(166); + (*l_188) = func_67(((void*)0 == l_307), (g_135 >= ((short)((unsigned char)p_45 >> (unsigned char)(+l_339)) >> (short)1)), ((short)p_46 / (short)g_90), (l_339 && l_342), g_135); + step_hash(167); + (*l_189) &= ((void*)0 == (*l_188)); + step_hash(168); + return l_332; + } + step_hash(170); + return p_46; + } + else + { + int *l_345 = &g_81; + int ***l_349 = &l_322; + unsigned l_366 = 0xA46068BCL; + unsigned short l_384 = 0x0369L; + step_hash(177); + for (l_242 = (-3); (l_242 >= (-24)); l_242--) + { + step_hash(175); + p_44 = l_345; + step_hash(176); + return l_346; + } + step_hash(178); + (*l_322) = (void*)0; + step_hash(214); + if ((((unsigned short)(((*l_345) | (!(*l_345))) < ((*l_188) == (void*)0)) * (unsigned short)(&g_99 != l_349)) & ((p_45 >= (!g_81)) ^ g_350))) + { + int **l_351 = &l_192; + int *l_388 = &l_159; + step_hash(186); + if ((g_99 != l_351)) + { + unsigned l_352 = 0x1642C3FEL; + step_hash(181); + (*l_345) ^= l_352; + } + else + { + int l_353 = 0x2D6E2AB5L; + step_hash(183); + l_353 = 0L; + step_hash(184); + (*l_188) = func_67((0x63L || (func_77(l_322) < 0x43L)), g_135, p_45, ((void*)0 != l_322), (g_2 || 0x38A7L)); + step_hash(185); + return p_45; + } + step_hash(193); + if (g_350) + { + unsigned l_357 = 3UL; + int l_367 = 1L; + step_hash(188); + (*l_318) = ((l_354 | ((short)(p_45 <= (&p_44 != &p_44)) / (short)l_357)) == ((unsigned char)func_77(&p_44) << (unsigned char)g_350)); + step_hash(189); + l_366 ^= ((signed char)(p_46 ^ ((unsigned char)p_46 + (unsigned char)((&p_44 != &p_44) <= 0x26L))) * (signed char)((unsigned short)g_84 * (unsigned short)((void*)0 != &p_46))); + step_hash(190); + (*l_318) = l_367; + } + else + { + step_hash(192); + (*l_345) = (((((short)((0x7AL != ((unsigned char)((((void*)0 != g_99) ^ ((unsigned short)((unsigned char)((signed char)g_81 >> (signed char)((unsigned char)g_81 + (unsigned char)g_84)) + (unsigned char)0xCFL) / (unsigned short)((short)(((signed char)p_46 << (signed char)g_90) || g_350) >> (short)l_384))) == g_350) + (unsigned char)g_84)) != 0x2EE7L) >> (short)4) > p_45) || l_385) > p_46); + } + step_hash(200); + if (g_90) + { + int l_399 = (-4L); + int *l_402 = (void*)0; + step_hash(195); + l_402 = func_67(((unsigned short)(func_64(l_388, func_67((((unsigned short)(((short)(((unsigned short)(((unsigned char)((*l_351) == (void*)0) * (unsigned char)(((short)(!l_399) * (short)(*l_345)) | p_46)) != (l_399 <= (((void*)0 == (**l_349)) >= 1UL))) << (unsigned short)p_45) && 0xF9L) - (short)g_90) >= (*l_345)) - (unsigned short)p_46) | p_45), p_46, (*l_318), g_148, p_46)) | g_350) % (unsigned short)g_2), p_45, g_350, g_148, g_148); + } + else + { + step_hash(197); + (*l_318) = ((signed char)((signed char)(l_307 != (void*)0) / (signed char)p_46) / (signed char)((((unsigned short)1UL * (unsigned short)(!g_135)) >= (l_409 == &p_44)) || ((short)g_2 * (short)(p_45 >= 0xC9L)))); + step_hash(198); + (*l_388) = g_135; + step_hash(199); + (*l_409) = func_67(g_148, (*l_388), g_2, g_90, (*l_345)); + } + step_hash(201); + (*l_388) ^= (&l_351 == &l_322); + } + else + { + signed char l_419 = 0x3CL; + int l_420 = 6L; + step_hash(210); + for (g_350 = 0; (g_350 == (-14)); g_350--) + { + int ***l_416 = &l_409; + step_hash(206); + if (g_148) + break; + step_hash(207); + (*l_188) = (void*)0; + step_hash(208); + (**l_416) = func_67(p_45, ((signed char)p_46 * (signed char)g_90), g_350, (0UL > (((void*)0 != l_416) & ((unsigned char)((((*l_318) & 0x28L) | g_350) == 249UL) >> (unsigned char)3))), l_419); + step_hash(209); + l_420 |= (***l_416); + } + step_hash(211); + g_90 = (((unsigned)p_46 - (unsigned)p_45) || (g_2 & ((g_90 | ((-(unsigned short)((unsigned char)(g_350 | (((short)p_46 * (short)((void*)0 != &p_44)) >= p_46)) >> (unsigned char)g_90)) && g_135)) & p_46))); + step_hash(212); + p_46 |= ((g_99 == (*l_349)) < ((p_45 == (&g_99 == l_349)) ^ (((0UL && (-1L)) != ((signed char)g_2 - (signed char)func_77(&p_44))) || (*l_318)))); + step_hash(213); + (*l_318) &= ((int)g_148 - (int)(*l_345)); + } + step_hash(215); + (*l_322) = func_67(g_2, (p_45 <= ((unsigned short)((short)p_45 / (short)func_77(&p_44)) << (unsigned short)4)), ((unsigned)3UL + (unsigned)0xFEA2F73BL), g_148, p_46); + } + step_hash(217); + l_440 &= (**l_322); + } + else + { + unsigned l_444 = 0xF325F3E0L; + step_hash(226); + if ((+p_46)) + { + signed char l_441 = 9L; + step_hash(220); + (*l_188) = func_67(l_441, (((+g_81) < g_84) | (1UL == (((((unsigned short)(&p_46 != &p_46) << (unsigned short)8) ^ g_350) > (g_148 | (0x010AL | l_444))) > 0xFEAAL))), l_441, g_350, l_441); + step_hash(221); + (*l_318) = g_84; + } + else + { + int *l_453 = (void*)0; + step_hash(223); + (*l_318) ^= ((short)(-5L) << (short)((void*)0 == &p_44)); + step_hash(224); + (*l_318) = (((unsigned short)((unsigned short)(((unsigned short)(g_90 && l_444) + (unsigned short)0x1FB6L) <= g_90) >> (unsigned short)5) * (unsigned short)1UL) || g_81); + step_hash(225); + p_44 = &p_46; + } + step_hash(227); + g_81 ^= ((signed char)((((unsigned short)g_148 >> (unsigned short)((unsigned)4294967293UL + (unsigned)g_350)) ^ 7UL) || (g_2 > g_2)) >> (signed char)4); + step_hash(228); + (*l_188) = &p_46; + } + } + step_hash(231); + return g_2; +} +static signed char func_64(int * p_65, int * p_66) +{ + int *l_122 = &g_90; + step_hash(48); + l_122 = l_122; + step_hash(49); + (*l_122) = (((signed char)g_2 * (signed char)(*l_122)) & ((((signed char)(*l_122) >> (signed char)g_81) > ((short)g_2 / (short)((unsigned short)((((signed char)((l_122 == (void*)0) & 0xBD1CL) / (signed char)(-5L)) ^ (*p_65)) != (*l_122)) * (unsigned short)(*l_122)))) >= g_81)); + step_hash(50); + l_122 = p_65; + step_hash(51); + (*l_122) = (*p_66); + step_hash(52); + return g_81; +} +static int * func_67(unsigned p_68, short p_69, unsigned char p_70, int p_71, int p_72) +{ + unsigned char l_107 = 1UL; + int *l_115 = (void*)0; + int **l_114 = &l_115; + int *l_116 = &g_81; + int l_121 = 0L; + step_hash(43); + for (p_68 = 0; (p_68 == 41); p_68 += 4) + { + int *l_108 = &g_81; + step_hash(41); + (*l_108) |= l_107; + step_hash(42); + if (l_107) + break; + } + step_hash(44); + (*l_116) = (((unsigned short)p_71 - (unsigned short)(((-(signed char)(0x5961L >= 1UL)) & ((p_69 <= (l_107 > ((short)l_107 % (short)func_77(l_114)))) < g_2)) >= 7UL)) | p_69); + step_hash(45); + (*l_116) = (g_84 || (((&l_115 == &l_115) | ((unsigned short)(g_2 == (+((&l_116 != &l_115) >= 0xE342BA51L))) * (unsigned short)(((unsigned)0xA3AFD543L - (unsigned)p_71) == (*l_116)))) < l_121)); + step_hash(46); + return &g_84; +} +static unsigned char func_77(int ** p_78) +{ + int l_96 = 0x0E43DA7DL; + step_hash(34); + for (g_81 = (-15); (g_81 < 8); ++g_81) + { + int l_87 = (-2L); + step_hash(26); + for (g_84 = 0; (g_84 > (-18)); g_84 -= 1) + { + int *l_88 = (void*)0; + int *l_89 = &g_90; + step_hash(22); + (*p_78) = &g_84; + step_hash(23); + (*p_78) = (void*)0; + step_hash(24); + (*l_89) &= (!l_87); + step_hash(25); + (*l_89) = ((*l_89) <= (((unsigned char)(*l_89) << (unsigned char)0) < l_87)); + } + step_hash(27); + if (g_84) + break; + step_hash(32); + for (g_84 = (-23); (g_84 < 1); g_84 += 6) + { + int *l_95 = &g_90; + step_hash(31); + (*l_95) = l_87; + } + step_hash(33); + (*p_78) = (*p_78); + } + step_hash(35); + (*p_78) = (*p_78); + step_hash(36); + return l_96; +} +void csmith_compute_hash(void) +{ + transparent_crc(g_2, "g_2", print_hash_value); + transparent_crc(g_81, "g_81", print_hash_value); + transparent_crc(g_84, "g_84", print_hash_value); + transparent_crc(g_90, "g_90", print_hash_value); + transparent_crc(g_135, "g_135", print_hash_value); + transparent_crc(g_148, "g_148", print_hash_value); + transparent_crc(g_350, "g_350", print_hash_value); + transparent_crc(g_491, "g_491", print_hash_value); + transparent_crc(g_515, "g_515", print_hash_value); + transparent_crc(g_636, "g_636", print_hash_value); +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand36.expect b/src/tests/csmith/rand36.expect new file mode 100644 index 0000000..cf63a10 --- /dev/null +++ b/src/tests/csmith/rand36.expect @@ -0,0 +1,957 @@ +...checksum after hashing g_2 : 99F8B879 +...checksum after hashing g_81 : 7733FF14 +...checksum after hashing g_84 : 2B741D22 +...checksum after hashing g_90 : 6D5EDDB +...checksum after hashing g_135 : 76B299F6 +...checksum after hashing g_148 : C73F5852 +...checksum after hashing g_350 : 638C7352 +...checksum after hashing g_491 : 62A4D9AB +...checksum after hashing g_515 : B6BD2189 +...checksum after hashing g_636 : E0FCC43A +before stmt(330): checksum = E0FCC43A +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : BB99FF8A +...checksum after hashing g_84 : B0D1514D +...checksum after hashing g_90 : A8BD7C4A +...checksum after hashing g_135 : 13D5A2B0 +...checksum after hashing g_148 : 461A3D75 +...checksum after hashing g_350 : 62398E4F +...checksum after hashing g_491 : 937EDC01 +...checksum after hashing g_515 : 23CDF51C +...checksum after hashing g_636 : 4FB8567D +before stmt(384): checksum = 4FB8567D +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : BB99FF8A +...checksum after hashing g_84 : B0D1514D +...checksum after hashing g_90 : A8BD7C4A +...checksum after hashing g_135 : 13D5A2B0 +...checksum after hashing g_148 : 461A3D75 +...checksum after hashing g_350 : 62398E4F +...checksum after hashing g_491 : 937EDC01 +...checksum after hashing g_515 : 23CDF51C +...checksum after hashing g_636 : 4FB8567D +before stmt(385): checksum = 4FB8567D +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : BB99FF8A +...checksum after hashing g_84 : B0D1514D +...checksum after hashing g_90 : A8BD7C4A +...checksum after hashing g_135 : 13D5A2B0 +...checksum after hashing g_148 : 461A3D75 +...checksum after hashing g_350 : 62398E4F +...checksum after hashing g_491 : 937EDC01 +...checksum after hashing g_515 : 23CDF51C +...checksum after hashing g_636 : 4FB8567D +before stmt(386): checksum = 4FB8567D +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : BB99FF8A +...checksum after hashing g_84 : B0D1514D +...checksum after hashing g_90 : A8BD7C4A +...checksum after hashing g_135 : 13D5A2B0 +...checksum after hashing g_148 : 461A3D75 +...checksum after hashing g_350 : 62398E4F +...checksum after hashing g_491 : 937EDC01 +...checksum after hashing g_515 : 23CDF51C +...checksum after hashing g_636 : 4FB8567D +before stmt(43): checksum = 4FB8567D +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : BB99FF8A +...checksum after hashing g_84 : B0D1514D +...checksum after hashing g_90 : A8BD7C4A +...checksum after hashing g_135 : 13D5A2B0 +...checksum after hashing g_148 : 461A3D75 +...checksum after hashing g_350 : 62398E4F +...checksum after hashing g_491 : 937EDC01 +...checksum after hashing g_515 : 23CDF51C +...checksum after hashing g_636 : 4FB8567D +before stmt(44): checksum = 4FB8567D +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : BB99FF8A +...checksum after hashing g_84 : B0D1514D +...checksum after hashing g_90 : A8BD7C4A +...checksum after hashing g_135 : 13D5A2B0 +...checksum after hashing g_148 : 461A3D75 +...checksum after hashing g_350 : 62398E4F +...checksum after hashing g_491 : 937EDC01 +...checksum after hashing g_515 : 23CDF51C +...checksum after hashing g_636 : 4FB8567D +before stmt(34): checksum = 4FB8567D +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : 5B4688B9 +...checksum after hashing g_84 : A55B437F +...checksum after hashing g_90 : 418CAF54 +...checksum after hashing g_135 : 3357541B +...checksum after hashing g_148 : 5FE27612 +...checksum after hashing g_350 : 9E0A1 +...checksum after hashing g_491 : 9B6D3AA7 +...checksum after hashing g_515 : 8996D677 +...checksum after hashing g_636 : F6D810AF +before stmt(26): checksum = F6D810AF +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : 5B4688B9 +...checksum after hashing g_84 : F482F4CB +...checksum after hashing g_90 : 5F1B8138 +...checksum after hashing g_135 : B47B56F4 +...checksum after hashing g_148 : 98978E3F +...checksum after hashing g_350 : BECE6F8A +...checksum after hashing g_491 : AE559127 +...checksum after hashing g_515 : F0CEAA15 +...checksum after hashing g_636 : 61A7A0D7 +before stmt(22): checksum = 61A7A0D7 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : 5B4688B9 +...checksum after hashing g_84 : F482F4CB +...checksum after hashing g_90 : 5F1B8138 +...checksum after hashing g_135 : B47B56F4 +...checksum after hashing g_148 : 98978E3F +...checksum after hashing g_350 : BECE6F8A +...checksum after hashing g_491 : AE559127 +...checksum after hashing g_515 : F0CEAA15 +...checksum after hashing g_636 : 61A7A0D7 +before stmt(23): checksum = 61A7A0D7 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : 5B4688B9 +...checksum after hashing g_84 : F482F4CB +...checksum after hashing g_90 : 5F1B8138 +...checksum after hashing g_135 : B47B56F4 +...checksum after hashing g_148 : 98978E3F +...checksum after hashing g_350 : BECE6F8A +...checksum after hashing g_491 : AE559127 +...checksum after hashing g_515 : F0CEAA15 +...checksum after hashing g_636 : 61A7A0D7 +before stmt(24): checksum = 61A7A0D7 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : 5B4688B9 +...checksum after hashing g_84 : F482F4CB +...checksum after hashing g_90 : 81A0A1DB +...checksum after hashing g_135 : 2EA67662 +...checksum after hashing g_148 : 1CBDB7AF +...checksum after hashing g_350 : AD8ADB20 +...checksum after hashing g_491 : 5E7FF555 +...checksum after hashing g_515 : ACF09FCA +...checksum after hashing g_636 : 1E2828C1 +before stmt(25): checksum = 1E2828C1 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : 5B4688B9 +...checksum after hashing g_84 : 2A39D428 +...checksum after hashing g_90 : A3C1E628 +...checksum after hashing g_135 : 66264F6C +...checksum after hashing g_148 : 945C4F6A +...checksum after hashing g_350 : F3C82EC3 +...checksum after hashing g_491 : 6726FBCC +...checksum after hashing g_515 : 525A72FB +...checksum after hashing g_636 : F9687F8E +before stmt(22): checksum = F9687F8E +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : 5B4688B9 +...checksum after hashing g_84 : 2A39D428 +...checksum after hashing g_90 : A3C1E628 +...checksum after hashing g_135 : 66264F6C +...checksum after hashing g_148 : 945C4F6A +...checksum after hashing g_350 : F3C82EC3 +...checksum after hashing g_491 : 6726FBCC +...checksum after hashing g_515 : 525A72FB +...checksum after hashing g_636 : F9687F8E +before stmt(23): checksum = F9687F8E +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : 5B4688B9 +...checksum after hashing g_84 : 2A39D428 +...checksum after hashing g_90 : A3C1E628 +...checksum after hashing g_135 : 66264F6C +...checksum after hashing g_148 : 945C4F6A +...checksum after hashing g_350 : F3C82EC3 +...checksum after hashing g_491 : 6726FBCC +...checksum after hashing g_515 : 525A72FB +...checksum after hashing g_636 : F9687F8E +before stmt(24): checksum = F9687F8E +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : 5B4688B9 +...checksum after hashing g_84 : 2A39D428 +...checksum after hashing g_90 : 1B7D814D +...checksum after hashing g_135 : AA8C4FF2 +...checksum after hashing g_148 : FF90305 +...checksum after hashing g_350 : 5DA0BF52 +...checksum after hashing g_491 : 241C08A +...checksum after hashing g_515 : D37F17DC +...checksum after hashing g_636 : F8DD8293 +before stmt(25): checksum = F8DD8293 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : 5B4688B9 +...checksum after hashing g_84 : 9285B34D +...checksum after hashing g_90 : 6F6BE6B6 +...checksum after hashing g_135 : FD830303 +...checksum after hashing g_148 : 3A34DEFB +...checksum after hashing g_350 : 96AF1585 +...checksum after hashing g_491 : E6039EEB +...checksum after hashing g_515 : 53EF8FE6 +...checksum after hashing g_636 : 8B27A24 +before stmt(22): checksum = 8B27A24 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : 5B4688B9 +...checksum after hashing g_84 : 9285B34D +...checksum after hashing g_90 : 6F6BE6B6 +...checksum after hashing g_135 : FD830303 +...checksum after hashing g_148 : 3A34DEFB +...checksum after hashing g_350 : 96AF1585 +...checksum after hashing g_491 : E6039EEB +...checksum after hashing g_515 : 53EF8FE6 +...checksum after hashing g_636 : 8B27A24 +before stmt(23): checksum = 8B27A24 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : 5B4688B9 +...checksum after hashing g_84 : 9285B34D +...checksum after hashing g_90 : 6F6BE6B6 +...checksum after hashing g_135 : FD830303 +...checksum after hashing g_148 : 3A34DEFB +...checksum after hashing g_350 : 96AF1585 +...checksum after hashing g_491 : E6039EEB +...checksum after hashing g_515 : 53EF8FE6 +...checksum after hashing g_636 : 8B27A24 +before stmt(24): checksum = 8B27A24 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : 5B4688B9 +...checksum after hashing g_84 : 9285B34D +...checksum after hashing g_90 : D7D781D3 +...checksum after hashing g_135 : 3129039D +...checksum after hashing g_148 : A1919294 +...checksum after hashing g_350 : 38C78414 +...checksum after hashing g_491 : 8364A5AD +...checksum after hashing g_515 : D2CAEAC1 +...checksum after hashing g_636 : 9078739 +before stmt(25): checksum = 9078739 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : 5B4688B9 +...checksum after hashing g_84 : 80301CA3 +...checksum after hashing g_90 : E1E4E155 +...checksum after hashing g_135 : 8A1DD1F3 +...checksum after hashing g_148 : 13FC6A09 +...checksum after hashing g_350 : 3906584F +...checksum after hashing g_491 : BE1D37C3 +...checksum after hashing g_515 : 513188C1 +...checksum after hashing g_636 : C1AD729B +before stmt(22): checksum = C1AD729B +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : 5B4688B9 +...checksum after hashing g_84 : 80301CA3 +...checksum after hashing g_90 : E1E4E155 +...checksum after hashing g_135 : 8A1DD1F3 +...checksum after hashing g_148 : 13FC6A09 +...checksum after hashing g_350 : 3906584F +...checksum after hashing g_491 : BE1D37C3 +...checksum after hashing g_515 : 513188C1 +...checksum after hashing g_636 : C1AD729B +before stmt(23): checksum = C1AD729B +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : 5B4688B9 +...checksum after hashing g_84 : 80301CA3 +...checksum after hashing g_90 : E1E4E155 +...checksum after hashing g_135 : 8A1DD1F3 +...checksum after hashing g_148 : 13FC6A09 +...checksum after hashing g_350 : 3906584F +...checksum after hashing g_491 : BE1D37C3 +...checksum after hashing g_515 : 513188C1 +...checksum after hashing g_636 : C1AD729B +before stmt(24): checksum = C1AD729B +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : 5B4688B9 +...checksum after hashing g_84 : 80301CA3 +...checksum after hashing g_90 : 59588630 +...checksum after hashing g_135 : 46B7D16D +...checksum after hashing g_148 : 88592666 +...checksum after hashing g_350 : 976EC9DE +...checksum after hashing g_491 : DB7A0C85 +...checksum after hashing g_515 : D014EDE6 +...checksum after hashing g_636 : C0188F86 +before stmt(25): checksum = C0188F86 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : 5B4688B9 +...checksum after hashing g_84 : 388C7BC6 +...checksum after hashing g_90 : 2D4EE1CB +...checksum after hashing g_135 : 11B89D9C +...checksum after hashing g_148 : BD94FB98 +...checksum after hashing g_350 : 5C616309 +...checksum after hashing g_491 : 3F3852E4 +...checksum after hashing g_515 : 508475DC +...checksum after hashing g_636 : 30777731 +before stmt(22): checksum = 30777731 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : 5B4688B9 +...checksum after hashing g_84 : 388C7BC6 +...checksum after hashing g_90 : 2D4EE1CB +...checksum after hashing g_135 : 11B89D9C +...checksum after hashing g_148 : BD94FB98 +...checksum after hashing g_350 : 5C616309 +...checksum after hashing g_491 : 3F3852E4 +...checksum after hashing g_515 : 508475DC +...checksum after hashing g_636 : 30777731 +before stmt(23): checksum = 30777731 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : 5B4688B9 +...checksum after hashing g_84 : 388C7BC6 +...checksum after hashing g_90 : 2D4EE1CB +...checksum after hashing g_135 : 11B89D9C +...checksum after hashing g_148 : BD94FB98 +...checksum after hashing g_350 : 5C616309 +...checksum after hashing g_491 : 3F3852E4 +...checksum after hashing g_515 : 508475DC +...checksum after hashing g_636 : 30777731 +before stmt(24): checksum = 30777731 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : 5B4688B9 +...checksum after hashing g_84 : 388C7BC6 +...checksum after hashing g_90 : 95F286AE +...checksum after hashing g_135 : DD129D02 +...checksum after hashing g_148 : 2631B7F7 +...checksum after hashing g_350 : F209F298 +...checksum after hashing g_491 : 5A5F69A2 +...checksum after hashing g_515 : D1A110FB +...checksum after hashing g_636 : 31C28A2C +before stmt(25): checksum = 31C28A2C +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : 5B4688B9 +...checksum after hashing g_84 : A55B437F +...checksum after hashing g_90 : 278BE8D2 +...checksum after hashing g_135 : 65207413 +...checksum after hashing g_148 : 406D03ED +...checksum after hashing g_350 : BD25C59A +...checksum after hashing g_491 : E206593 +...checksum after hashing g_515 : 548D868F +...checksum after hashing g_636 : 88E265A4 +before stmt(22): checksum = 88E265A4 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : 5B4688B9 +...checksum after hashing g_84 : A55B437F +...checksum after hashing g_90 : 278BE8D2 +...checksum after hashing g_135 : 65207413 +...checksum after hashing g_148 : 406D03ED +...checksum after hashing g_350 : BD25C59A +...checksum after hashing g_491 : E206593 +...checksum after hashing g_515 : 548D868F +...checksum after hashing g_636 : 88E265A4 +before stmt(23): checksum = 88E265A4 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : 5B4688B9 +...checksum after hashing g_84 : A55B437F +...checksum after hashing g_90 : 278BE8D2 +...checksum after hashing g_135 : 65207413 +...checksum after hashing g_148 : 406D03ED +...checksum after hashing g_350 : BD25C59A +...checksum after hashing g_491 : E206593 +...checksum after hashing g_515 : 548D868F +...checksum after hashing g_636 : 88E265A4 +before stmt(24): checksum = 88E265A4 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : 5B4688B9 +...checksum after hashing g_84 : A55B437F +...checksum after hashing g_90 : 9F378FB7 +...checksum after hashing g_135 : A98A748D +...checksum after hashing g_148 : DBC84F82 +...checksum after hashing g_350 : 134D540B +...checksum after hashing g_491 : 6B475ED5 +...checksum after hashing g_515 : D5A8E3A8 +...checksum after hashing g_636 : 895798B9 +before stmt(25): checksum = 895798B9 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : 5B4688B9 +...checksum after hashing g_84 : 1DE7241A +...checksum after hashing g_90 : EB21E84C +...checksum after hashing g_135 : FE85387C +...checksum after hashing g_148 : EE05927C +...checksum after hashing g_350 : D842FEDC +...checksum after hashing g_491 : 8F0500B4 +...checksum after hashing g_515 : 55387B92 +...checksum after hashing g_636 : 7938600E +before stmt(22): checksum = 7938600E +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : 5B4688B9 +...checksum after hashing g_84 : 1DE7241A +...checksum after hashing g_90 : EB21E84C +...checksum after hashing g_135 : FE85387C +...checksum after hashing g_148 : EE05927C +...checksum after hashing g_350 : D842FEDC +...checksum after hashing g_491 : 8F0500B4 +...checksum after hashing g_515 : 55387B92 +...checksum after hashing g_636 : 7938600E +before stmt(23): checksum = 7938600E +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : 5B4688B9 +...checksum after hashing g_84 : 1DE7241A +...checksum after hashing g_90 : EB21E84C +...checksum after hashing g_135 : FE85387C +...checksum after hashing g_148 : EE05927C +...checksum after hashing g_350 : D842FEDC +...checksum after hashing g_491 : 8F0500B4 +...checksum after hashing g_515 : 55387B92 +...checksum after hashing g_636 : 7938600E +before stmt(24): checksum = 7938600E +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : 5B4688B9 +...checksum after hashing g_84 : 1DE7241A +...checksum after hashing g_90 : 539D8F29 +...checksum after hashing g_135 : 322F38E2 +...checksum after hashing g_148 : 75A0DE13 +...checksum after hashing g_350 : 762A6F4D +...checksum after hashing g_491 : EA623BF2 +...checksum after hashing g_515 : D41D1EB5 +...checksum after hashing g_636 : 788D9D13 +before stmt(25): checksum = 788D9D13 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : 5B4688B9 +...checksum after hashing g_84 : F528BF4 +...checksum after hashing g_90 : 65AEEFAF +...checksum after hashing g_135 : 891BEA8C +...checksum after hashing g_148 : C7CD268E +...checksum after hashing g_350 : 77EBB316 +...checksum after hashing g_491 : D71BA99C +...checksum after hashing g_515 : 57E67CB5 +...checksum after hashing g_636 : B02768B1 +before stmt(22): checksum = B02768B1 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : 5B4688B9 +...checksum after hashing g_84 : F528BF4 +...checksum after hashing g_90 : 65AEEFAF +...checksum after hashing g_135 : 891BEA8C +...checksum after hashing g_148 : C7CD268E +...checksum after hashing g_350 : 77EBB316 +...checksum after hashing g_491 : D71BA99C +...checksum after hashing g_515 : 57E67CB5 +...checksum after hashing g_636 : B02768B1 +before stmt(23): checksum = B02768B1 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : 5B4688B9 +...checksum after hashing g_84 : F528BF4 +...checksum after hashing g_90 : 65AEEFAF +...checksum after hashing g_135 : 891BEA8C +...checksum after hashing g_148 : C7CD268E +...checksum after hashing g_350 : 77EBB316 +...checksum after hashing g_491 : D71BA99C +...checksum after hashing g_515 : 57E67CB5 +...checksum after hashing g_636 : B02768B1 +before stmt(24): checksum = B02768B1 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : 5B4688B9 +...checksum after hashing g_84 : F528BF4 +...checksum after hashing g_90 : DD1288CA +...checksum after hashing g_135 : 45B1EA12 +...checksum after hashing g_148 : 5C686AE1 +...checksum after hashing g_350 : D9832287 +...checksum after hashing g_491 : B27C92DA +...checksum after hashing g_515 : D6C31992 +...checksum after hashing g_636 : B19295AC +before stmt(25): checksum = B19295AC +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : 5B4688B9 +...checksum after hashing g_84 : B7EEEC91 +...checksum after hashing g_90 : A904EF31 +...checksum after hashing g_135 : 12BEA6E3 +...checksum after hashing g_148 : 69A5B71F +...checksum after hashing g_350 : 128C8850 +...checksum after hashing g_491 : 563ECCBB +...checksum after hashing g_515 : 565381A8 +...checksum after hashing g_636 : 41FD6D1B +before stmt(22): checksum = 41FD6D1B +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : 5B4688B9 +...checksum after hashing g_84 : B7EEEC91 +...checksum after hashing g_90 : A904EF31 +...checksum after hashing g_135 : 12BEA6E3 +...checksum after hashing g_148 : 69A5B71F +...checksum after hashing g_350 : 128C8850 +...checksum after hashing g_491 : 563ECCBB +...checksum after hashing g_515 : 565381A8 +...checksum after hashing g_636 : 41FD6D1B +before stmt(23): checksum = 41FD6D1B +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : 5B4688B9 +...checksum after hashing g_84 : B7EEEC91 +...checksum after hashing g_90 : A904EF31 +...checksum after hashing g_135 : 12BEA6E3 +...checksum after hashing g_148 : 69A5B71F +...checksum after hashing g_350 : 128C8850 +...checksum after hashing g_491 : 563ECCBB +...checksum after hashing g_515 : 565381A8 +...checksum after hashing g_636 : 41FD6D1B +before stmt(24): checksum = 41FD6D1B +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : 5B4688B9 +...checksum after hashing g_84 : B7EEEC91 +...checksum after hashing g_90 : 11B88854 +...checksum after hashing g_135 : DE14A67D +...checksum after hashing g_148 : F200FB70 +...checksum after hashing g_350 : BCE419C1 +...checksum after hashing g_491 : 3359F7FD +...checksum after hashing g_515 : D776E48F +...checksum after hashing g_636 : 40489006 +before stmt(25): checksum = 40489006 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : 5B4688B9 +...checksum after hashing g_84 : EF8DFCC7 +...checksum after hashing g_90 : 7024FD9D +...checksum after hashing g_135 : 602A3992 +...checksum after hashing g_148 : E74FD025 +...checksum after hashing g_350 : 6E13F871 +...checksum after hashing g_491 : B52BC772 +...checksum after hashing g_515 : 5FF59A13 +...checksum after hashing g_636 : 1A7C4BDA +before stmt(22): checksum = 1A7C4BDA +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : 5B4688B9 +...checksum after hashing g_84 : EF8DFCC7 +...checksum after hashing g_90 : 7024FD9D +...checksum after hashing g_135 : 602A3992 +...checksum after hashing g_148 : E74FD025 +...checksum after hashing g_350 : 6E13F871 +...checksum after hashing g_491 : B52BC772 +...checksum after hashing g_515 : 5FF59A13 +...checksum after hashing g_636 : 1A7C4BDA +before stmt(23): checksum = 1A7C4BDA +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : 5B4688B9 +...checksum after hashing g_84 : EF8DFCC7 +...checksum after hashing g_90 : 7024FD9D +...checksum after hashing g_135 : 602A3992 +...checksum after hashing g_148 : E74FD025 +...checksum after hashing g_350 : 6E13F871 +...checksum after hashing g_491 : B52BC772 +...checksum after hashing g_515 : 5FF59A13 +...checksum after hashing g_636 : 1A7C4BDA +before stmt(24): checksum = 1A7C4BDA +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : 5B4688B9 +...checksum after hashing g_84 : EF8DFCC7 +...checksum after hashing g_90 : C8989AF8 +...checksum after hashing g_135 : AC80390C +...checksum after hashing g_148 : 7CEA9C4A +...checksum after hashing g_350 : C07B69E0 +...checksum after hashing g_491 : D04CFC34 +...checksum after hashing g_515 : DED0FF34 +...checksum after hashing g_636 : 1BC9B6C7 +before stmt(25): checksum = 1BC9B6C7 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : 5B4688B9 +...checksum after hashing g_84 : 57319BA2 +...checksum after hashing g_90 : BC8EFD03 +...checksum after hashing g_135 : FB8F75FD +...checksum after hashing g_148 : 492741B4 +...checksum after hashing g_350 : B74C337 +...checksum after hashing g_491 : 340EA255 +...checksum after hashing g_515 : 5E40670E +...checksum after hashing g_636 : EBA64E70 +before stmt(22): checksum = EBA64E70 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : 5B4688B9 +...checksum after hashing g_84 : 57319BA2 +...checksum after hashing g_90 : BC8EFD03 +...checksum after hashing g_135 : FB8F75FD +...checksum after hashing g_148 : 492741B4 +...checksum after hashing g_350 : B74C337 +...checksum after hashing g_491 : 340EA255 +...checksum after hashing g_515 : 5E40670E +...checksum after hashing g_636 : EBA64E70 +before stmt(23): checksum = EBA64E70 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : 5B4688B9 +...checksum after hashing g_84 : 57319BA2 +...checksum after hashing g_90 : BC8EFD03 +...checksum after hashing g_135 : FB8F75FD +...checksum after hashing g_148 : 492741B4 +...checksum after hashing g_350 : B74C337 +...checksum after hashing g_491 : 340EA255 +...checksum after hashing g_515 : 5E40670E +...checksum after hashing g_636 : EBA64E70 +before stmt(24): checksum = EBA64E70 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : 5B4688B9 +...checksum after hashing g_84 : 57319BA2 +...checksum after hashing g_90 : 4329A66 +...checksum after hashing g_135 : 37257563 +...checksum after hashing g_148 : D2820DDB +...checksum after hashing g_350 : A51C52A6 +...checksum after hashing g_491 : 51699913 +...checksum after hashing g_515 : DF650229 +...checksum after hashing g_636 : EA13B36D +before stmt(25): checksum = EA13B36D +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : 5B4688B9 +...checksum after hashing g_84 : 4584344C +...checksum after hashing g_90 : 3201FAE0 +...checksum after hashing g_135 : 8C11A70D +...checksum after hashing g_148 : 60EFF546 +...checksum after hashing g_350 : A4DD8EFD +...checksum after hashing g_491 : 6C100B7D +...checksum after hashing g_515 : 5C9E6029 +...checksum after hashing g_636 : 22B946CF +before stmt(22): checksum = 22B946CF +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : 5B4688B9 +...checksum after hashing g_84 : 4584344C +...checksum after hashing g_90 : 3201FAE0 +...checksum after hashing g_135 : 8C11A70D +...checksum after hashing g_148 : 60EFF546 +...checksum after hashing g_350 : A4DD8EFD +...checksum after hashing g_491 : 6C100B7D +...checksum after hashing g_515 : 5C9E6029 +...checksum after hashing g_636 : 22B946CF +before stmt(23): checksum = 22B946CF +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : 5B4688B9 +...checksum after hashing g_84 : 4584344C +...checksum after hashing g_90 : 3201FAE0 +...checksum after hashing g_135 : 8C11A70D +...checksum after hashing g_148 : 60EFF546 +...checksum after hashing g_350 : A4DD8EFD +...checksum after hashing g_491 : 6C100B7D +...checksum after hashing g_515 : 5C9E6029 +...checksum after hashing g_636 : 22B946CF +before stmt(24): checksum = 22B946CF +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : 5B4688B9 +...checksum after hashing g_84 : 4584344C +...checksum after hashing g_90 : 8ABD9D85 +...checksum after hashing g_135 : 40BBA793 +...checksum after hashing g_148 : FB4AB929 +...checksum after hashing g_350 : AB51F6C +...checksum after hashing g_491 : 977303B +...checksum after hashing g_515 : DDBB050E +...checksum after hashing g_636 : 230CBBD2 +before stmt(25): checksum = 230CBBD2 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : 5B4688B9 +...checksum after hashing g_84 : FD385329 +...checksum after hashing g_90 : FEABFA7E +...checksum after hashing g_135 : 17B4EB62 +...checksum after hashing g_148 : CE8764D7 +...checksum after hashing g_350 : C1BAB5BB +...checksum after hashing g_491 : ED356E5A +...checksum after hashing g_515 : 5D2B9D34 +...checksum after hashing g_636 : D3634365 +before stmt(22): checksum = D3634365 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : 5B4688B9 +...checksum after hashing g_84 : FD385329 +...checksum after hashing g_90 : FEABFA7E +...checksum after hashing g_135 : 17B4EB62 +...checksum after hashing g_148 : CE8764D7 +...checksum after hashing g_350 : C1BAB5BB +...checksum after hashing g_491 : ED356E5A +...checksum after hashing g_515 : 5D2B9D34 +...checksum after hashing g_636 : D3634365 +before stmt(23): checksum = D3634365 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : 5B4688B9 +...checksum after hashing g_84 : FD385329 +...checksum after hashing g_90 : FEABFA7E +...checksum after hashing g_135 : 17B4EB62 +...checksum after hashing g_148 : CE8764D7 +...checksum after hashing g_350 : C1BAB5BB +...checksum after hashing g_491 : ED356E5A +...checksum after hashing g_515 : 5D2B9D34 +...checksum after hashing g_636 : D3634365 +before stmt(24): checksum = D3634365 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : 5B4688B9 +...checksum after hashing g_84 : FD385329 +...checksum after hashing g_90 : 46179D1B +...checksum after hashing g_135 : DB1EEBFC +...checksum after hashing g_148 : 552228B8 +...checksum after hashing g_350 : 6FD2242A +...checksum after hashing g_491 : 8852551C +...checksum after hashing g_515 : DC0EF813 +...checksum after hashing g_636 : D2D6BE78 +before stmt(25): checksum = D2D6BE78 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : 5B4688B9 +...checksum after hashing g_84 : 60EF6B90 +...checksum after hashing g_90 : F46EF367 +...checksum after hashing g_135 : 632C02ED +...checksum after hashing g_148 : 337E9CA2 +...checksum after hashing g_350 : 20FE1328 +...checksum after hashing g_491 : DC2D592D +...checksum after hashing g_515 : 59226E67 +...checksum after hashing g_636 : 6BF651F0 +before stmt(22): checksum = 6BF651F0 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : 5B4688B9 +...checksum after hashing g_84 : 60EF6B90 +...checksum after hashing g_90 : F46EF367 +...checksum after hashing g_135 : 632C02ED +...checksum after hashing g_148 : 337E9CA2 +...checksum after hashing g_350 : 20FE1328 +...checksum after hashing g_491 : DC2D592D +...checksum after hashing g_515 : 59226E67 +...checksum after hashing g_636 : 6BF651F0 +before stmt(23): checksum = 6BF651F0 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : 5B4688B9 +...checksum after hashing g_84 : 60EF6B90 +...checksum after hashing g_90 : F46EF367 +...checksum after hashing g_135 : 632C02ED +...checksum after hashing g_148 : 337E9CA2 +...checksum after hashing g_350 : 20FE1328 +...checksum after hashing g_491 : DC2D592D +...checksum after hashing g_515 : 59226E67 +...checksum after hashing g_636 : 6BF651F0 +before stmt(24): checksum = 6BF651F0 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : 5B4688B9 +...checksum after hashing g_84 : 60EF6B90 +...checksum after hashing g_90 : 4CD29402 +...checksum after hashing g_135 : AF860273 +...checksum after hashing g_148 : A8DBD0CD +...checksum after hashing g_350 : 8E9682B9 +...checksum after hashing g_491 : B94A626B +...checksum after hashing g_515 : D8070B40 +...checksum after hashing g_636 : 6A43ACED +before stmt(25): checksum = 6A43ACED +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : 5B4688B9 +...checksum after hashing g_84 : D8530CF5 +...checksum after hashing g_90 : 38C4F3F9 +...checksum after hashing g_135 : F8894E82 +...checksum after hashing g_148 : 9D160D33 +...checksum after hashing g_350 : 4599286E +...checksum after hashing g_491 : 5D083C0A +...checksum after hashing g_515 : 5897937A +...checksum after hashing g_636 : 9A2C545A +before stmt(22): checksum = 9A2C545A +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : 5B4688B9 +...checksum after hashing g_84 : D8530CF5 +...checksum after hashing g_90 : 38C4F3F9 +...checksum after hashing g_135 : F8894E82 +...checksum after hashing g_148 : 9D160D33 +...checksum after hashing g_350 : 4599286E +...checksum after hashing g_491 : 5D083C0A +...checksum after hashing g_515 : 5897937A +...checksum after hashing g_636 : 9A2C545A +before stmt(23): checksum = 9A2C545A +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : 5B4688B9 +...checksum after hashing g_84 : D8530CF5 +...checksum after hashing g_90 : 38C4F3F9 +...checksum after hashing g_135 : F8894E82 +...checksum after hashing g_148 : 9D160D33 +...checksum after hashing g_350 : 4599286E +...checksum after hashing g_491 : 5D083C0A +...checksum after hashing g_515 : 5897937A +...checksum after hashing g_636 : 9A2C545A +before stmt(24): checksum = 9A2C545A +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : 5B4688B9 +...checksum after hashing g_84 : D8530CF5 +...checksum after hashing g_90 : 8078949C +...checksum after hashing g_135 : 34234E1C +...checksum after hashing g_148 : 6B3415C +...checksum after hashing g_350 : EBF1B9FF +...checksum after hashing g_491 : 386F074C +...checksum after hashing g_515 : D9B2F65D +...checksum after hashing g_636 : 9B99A947 +before stmt(25): checksum = 9B99A947 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : 5B4688B9 +...checksum after hashing g_84 : CAE6A31B +...checksum after hashing g_90 : B64BF41A +...checksum after hashing g_135 : 8F179C72 +...checksum after hashing g_148 : B4DEB9C1 +...checksum after hashing g_350 : EA3065A4 +...checksum after hashing g_491 : 5169522 +...checksum after hashing g_515 : 5A49945D +...checksum after hashing g_636 : 53335CE5 +before stmt(22): checksum = 53335CE5 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : 5B4688B9 +...checksum after hashing g_84 : CAE6A31B +...checksum after hashing g_90 : B64BF41A +...checksum after hashing g_135 : 8F179C72 +...checksum after hashing g_148 : B4DEB9C1 +...checksum after hashing g_350 : EA3065A4 +...checksum after hashing g_491 : 5169522 +...checksum after hashing g_515 : 5A49945D +...checksum after hashing g_636 : 53335CE5 +before stmt(23): checksum = 53335CE5 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : 5B4688B9 +...checksum after hashing g_84 : CAE6A31B +...checksum after hashing g_90 : B64BF41A +...checksum after hashing g_135 : 8F179C72 +...checksum after hashing g_148 : B4DEB9C1 +...checksum after hashing g_350 : EA3065A4 +...checksum after hashing g_491 : 5169522 +...checksum after hashing g_515 : 5A49945D +...checksum after hashing g_636 : 53335CE5 +before stmt(24): checksum = 53335CE5 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : 5B4688B9 +...checksum after hashing g_84 : CAE6A31B +...checksum after hashing g_90 : EF7937F +...checksum after hashing g_135 : 43BD9CEC +...checksum after hashing g_148 : 2F7BF5AE +...checksum after hashing g_350 : 4458F435 +...checksum after hashing g_491 : 6071AE64 +...checksum after hashing g_515 : DB6CF17A +...checksum after hashing g_636 : 5286A1F8 +before stmt(25): checksum = 5286A1F8 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : 5B4688B9 +...checksum after hashing g_84 : 725AC47E +...checksum after hashing g_90 : 7AE1F484 +...checksum after hashing g_135 : 14B2D01D +...checksum after hashing g_148 : 1AB62850 +...checksum after hashing g_350 : 8F575EE2 +...checksum after hashing g_491 : 8433F005 +...checksum after hashing g_515 : 5BFC6940 +...checksum after hashing g_636 : A2E9594F +before stmt(22): checksum = A2E9594F +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : 5B4688B9 +...checksum after hashing g_84 : 725AC47E +...checksum after hashing g_90 : 7AE1F484 +...checksum after hashing g_135 : 14B2D01D +...checksum after hashing g_148 : 1AB62850 +...checksum after hashing g_350 : 8F575EE2 +...checksum after hashing g_491 : 8433F005 +...checksum after hashing g_515 : 5BFC6940 +...checksum after hashing g_636 : A2E9594F +before stmt(23): checksum = A2E9594F +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : 5B4688B9 +...checksum after hashing g_84 : 725AC47E +...checksum after hashing g_90 : 7AE1F484 +...checksum after hashing g_135 : 14B2D01D +...checksum after hashing g_148 : 1AB62850 +...checksum after hashing g_350 : 8F575EE2 +...checksum after hashing g_491 : 8433F005 +...checksum after hashing g_515 : 5BFC6940 +...checksum after hashing g_636 : A2E9594F +before stmt(24): checksum = A2E9594F +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : 5B4688B9 +...checksum after hashing g_84 : 725AC47E +...checksum after hashing g_90 : C25D93E1 +...checksum after hashing g_135 : D818D083 +...checksum after hashing g_148 : 8113643F +...checksum after hashing g_350 : 213FCF73 +...checksum after hashing g_491 : E154CB43 +...checksum after hashing g_515 : DAD90C67 +...checksum after hashing g_636 : A35CA452 +before stmt(25): checksum = A35CA452 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : 5B4688B9 +...checksum after hashing g_84 : 7A2083B7 +...checksum after hashing g_90 : DF7AD703 +...checksum after hashing g_135 : 6A3EA290 +...checksum after hashing g_148 : 727B71F4 +...checksum after hashing g_350 : 130E85E6 +...checksum after hashing g_491 : 184D84F1 +...checksum after hashing g_515 : 4905A32B +...checksum after hashing g_636 : E4311167 +before stmt(22): checksum = E4311167 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : 5B4688B9 +...checksum after hashing g_84 : 7A2083B7 +...checksum after hashing g_90 : DF7AD703 +...checksum after hashing g_135 : 6A3EA290 +...checksum after hashing g_148 : 727B71F4 +...checksum after hashing g_350 : 130E85E6 +...checksum after hashing g_491 : 184D84F1 +...checksum after hashing g_515 : 4905A32B +...checksum after hashing g_636 : E4311167 +before stmt(23): checksum = E4311167 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : 5B4688B9 +...checksum after hashing g_84 : 7A2083B7 +...checksum after hashing g_90 : DF7AD703 +...checksum after hashing g_135 : 6A3EA290 +...checksum after hashing g_148 : 727B71F4 +...checksum after hashing g_350 : 130E85E6 +...checksum after hashing g_491 : 184D84F1 +...checksum after hashing g_515 : 4905A32B +...checksum after hashing g_636 : E4311167 +before stmt(24): checksum = E4311167 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : 5B4688B9 +...checksum after hashing g_84 : 7A2083B7 +...checksum after hashing g_90 : 67C6B066 +...checksum after hashing g_135 : A694A20E +...checksum after hashing g_148 : E9DE3D9B +...checksum after hashing g_350 : BD661477 +...checksum after hashing g_491 : 7D2ABFB7 +...checksum after hashing g_515 : C820C60C +...checksum after hashing g_636 : E584EC7A +before stmt(25): checksum = E584EC7A +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : 5B4688B9 +...checksum after hashing g_84 : C29CE4D2 +...checksum after hashing g_90 : 13D0D79D +...checksum after hashing g_135 : F19BEEFF +...checksum after hashing g_148 : DC13E065 +...checksum after hashing g_350 : 7669BEA0 +...checksum after hashing g_491 : 9968E1D6 +...checksum after hashing g_515 : 48B05E36 +...checksum after hashing g_636 : 15EB14CD +before stmt(27): checksum = 15EB14CD +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : 5B4688B9 +...checksum after hashing g_84 : C29CE4D2 +...checksum after hashing g_90 : 13D0D79D +...checksum after hashing g_135 : F19BEEFF +...checksum after hashing g_148 : DC13E065 +...checksum after hashing g_350 : 7669BEA0 +...checksum after hashing g_491 : 9968E1D6 +...checksum after hashing g_515 : 48B05E36 +...checksum after hashing g_636 : 15EB14CD +before stmt(35): checksum = 15EB14CD +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : 5B4688B9 +...checksum after hashing g_84 : C29CE4D2 +...checksum after hashing g_90 : 13D0D79D +...checksum after hashing g_135 : F19BEEFF +...checksum after hashing g_148 : DC13E065 +...checksum after hashing g_350 : 7669BEA0 +...checksum after hashing g_491 : 9968E1D6 +...checksum after hashing g_515 : 48B05E36 +...checksum after hashing g_636 : 15EB14CD +before stmt(36): checksum = 15EB14CD +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : 659CF97B +...checksum after hashing g_84 : F15DF006 +...checksum after hashing g_90 : CCF875E6 +...checksum after hashing g_135 : DC682183 +...checksum after hashing g_148 : 1D47C037 +...checksum after hashing g_350 : 1D94551F +...checksum after hashing g_491 : 2BCA77B +...checksum after hashing g_515 : 12F244B +...checksum after hashing g_636 : 2C01EEEB +before stmt(45): checksum = 2C01EEEB +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : DD9EB80C +...checksum after hashing g_84 : 8161D6E8 +...checksum after hashing g_90 : E56E717C +...checksum after hashing g_135 : 6C353D6F +...checksum after hashing g_148 : 50A6F436 +...checksum after hashing g_350 : C94280B6 +...checksum after hashing g_491 : EF41727B +...checksum after hashing g_515 : F5C4D2A5 +...checksum after hashing g_636 : ACB2CBA0 +before stmt(46): checksum = ACB2CBA0 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : DD9EB80C +...checksum after hashing g_84 : 8161D6E8 +...checksum after hashing g_90 : E56E717C +...checksum after hashing g_135 : 6C353D6F +...checksum after hashing g_148 : 50A6F436 +...checksum after hashing g_350 : C94280B6 +...checksum after hashing g_491 : EF41727B +...checksum after hashing g_515 : F5C4D2A5 +...checksum after hashing g_636 : ACB2CBA0 +before stmt(387): checksum = ACB2CBA0 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_81 : DD9EB80C +...checksum after hashing g_84 : 8161D6E8 +...checksum after hashing g_90 : E56E717C +...checksum after hashing g_135 : 6C353D6F +...checksum after hashing g_148 : 50A6F436 +...checksum after hashing g_350 : C94280B6 +...checksum after hashing g_491 : EF41727B +...checksum after hashing g_515 : F5C4D2A5 +...checksum after hashing g_636 : ACB2CBA0 +checksum = acb2cba0 diff --git a/src/tests/csmith/rand37.c b/src/tests/csmith/rand37.c new file mode 100644 index 0000000..117141e --- /dev/null +++ b/src/tests/csmith/rand37.c @@ -0,0 +1,92 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static int g_3 = (-1L); +static int *g_2 = &g_3; +static unsigned short func_1(void); +static unsigned short func_1(void) +{ + int l_4 = 0L; + step_hash(1); + g_2 = g_2; + step_hash(2); + return l_4; +} +void csmith_compute_hash(void) +{ + transparent_crc(g_3, "g_3", print_hash_value); +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand37.expect b/src/tests/csmith/rand37.expect new file mode 100644 index 0000000..c235dcf --- /dev/null +++ b/src/tests/csmith/rand37.expect @@ -0,0 +1,6 @@ +...checksum after hashing g_3 : FFFFFFFF +before stmt(1): checksum = FFFFFFFF +...checksum after hashing g_3 : FFFFFFFF +before stmt(2): checksum = FFFFFFFF +...checksum after hashing g_3 : FFFFFFFF +checksum = ffffffff diff --git a/src/tests/csmith/rand38.c b/src/tests/csmith/rand38.c new file mode 100644 index 0000000..1211485 --- /dev/null +++ b/src/tests/csmith/rand38.c @@ -0,0 +1,715 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static short g_2 = 0xD8C4L; +static int g_17 = 9L; +static int g_19 = 0L; +static int g_29 = 0xFB8EB5EAL; +static int g_46 = 0xE22955D4L; +static int g_104 = 1L; +static int *g_120 = &g_19; +static int g_157 = (-6L); +static int **g_163 = &g_120; +static int ***g_162 = &g_163; +static int g_400 = 0xCC20AF46L; +static unsigned short g_455 = 0x7FD7L; +static int func_1(void); +static unsigned func_3(unsigned short p_4, int p_5, int p_6, short p_7, int p_8); +static signed char func_14(int p_15); +static unsigned char func_30(int * p_31, int * p_32, int * p_33); +static int func_34(int * p_35); +static unsigned char func_51(int * p_52, short p_53); +static int * func_54(int p_55); +static int func_58(int p_59, unsigned short p_60, short p_61, unsigned char p_62); +static unsigned func_63(unsigned short p_64); +static unsigned func_68(unsigned p_69, int p_70); +static int func_1(void) +{ + int l_9 = 0xB023ED15L; + step_hash(324); + if ((g_2 ^ func_3(l_9, g_2, ((unsigned char)((unsigned char)0xCCL + (unsigned char)func_14(g_2)) >> (unsigned char)1), ((void*)0 == &l_9), g_2))) + { + unsigned l_505 = 4294967287UL; + int *l_506 = &g_157; + int l_509 = 0x0705C01AL; + step_hash(318); + (**g_162) = (void*)0; + step_hash(319); + (*l_506) = l_505; + step_hash(320); + (*l_506) ^= (((int)l_509 + (int)l_9) && ((void*)0 != &l_9)); + step_hash(321); + return g_29; + } + else + { + step_hash(323); + return l_9; + } +} +static unsigned func_3(unsigned short p_4, int p_5, int p_6, short p_7, int p_8) +{ + int *l_18 = &g_19; + step_hash(5); + (*l_18) &= func_14(g_2); + step_hash(6); + (*l_18) |= g_2; + step_hash(315); + for (p_7 = 0; (p_7 < (-7)); p_7--) + { + int *l_24 = &g_17; + } + step_hash(316); + return g_455; +} +static signed char func_14(int p_15) +{ + int *l_16 = &g_17; + step_hash(2); + (*l_16) = g_2; + step_hash(3); + return p_15; +} +static unsigned char func_30(int * p_31, int * p_32, int * p_33) +{ + int *l_421 = &g_19; + int **l_422 = &g_120; + int l_476 = 8L; + step_hash(262); + (*p_33) = func_34(p_32); + step_hash(263); + (*l_422) = l_421; + step_hash(299); + if ((*g_120)) + { + unsigned l_425 = 0x73403350L; + short l_426 = 1L; + int *l_433 = &g_19; + step_hash(265); + (*l_422) = (void*)0; + step_hash(296); + for (g_46 = (-7); (g_46 > 22); ++g_46) + { + step_hash(295); + if (((((*l_422) == (void*)0) && g_2) && (l_425 <= g_46))) + { + short l_438 = 0x5082L; + step_hash(286); + if ((((((signed char)g_157 << (signed char)7) ^ (!((unsigned short)((0xE2219880L & (0xFACAL ^ (&l_421 == (*g_162)))) && 255UL) >> (unsigned short)(p_31 != l_433)))) <= ((unsigned short)((short)g_400 - (short)g_400) + (unsigned short)3L)) != (-1L))) + { + step_hash(271); + (*p_33) ^= l_438; + } + else + { + short l_443 = 0x710CL; + int *l_467 = &g_19; + step_hash(279); + if ((*p_33)) + { + int *l_454 = (void*)0; + int *l_456 = (void*)0; + int *l_457 = &g_157; + step_hash(274); + (*l_457) |= (0xA3F8L < ((unsigned char)(((unsigned)l_443 + (unsigned)((signed char)(((unsigned short)(((short)((unsigned short)(*l_421) * (unsigned short)g_2) % (short)(*l_433)) <= g_104) << (unsigned short)(*l_433)) > (*l_421)) << (signed char)2)) == l_438) >> (unsigned char)7)); + } + else + { + int l_460 = 0L; + step_hash(276); + (*l_433) = ((signed char)func_68(l_460, (((((*l_421) != (*l_433)) && (0x193AL ^ g_29)) < 0x03B8L) <= ((l_438 > (((unsigned char)((signed char)g_2 >> (signed char)3) >> (unsigned char)6) >= ((0x9FCC4D1DL | (*p_32)) <= (-1L)))) <= (*p_32)))) + (signed char)255UL); + step_hash(277); + (*l_422) = l_467; + step_hash(278); + (*l_467) = func_68((((signed char)g_46 - (signed char)l_460) > ((unsigned char)2UL + (unsigned char)0xA2L)), g_157); + } + step_hash(280); + if ((*p_32)) + break; + step_hash(285); + for (g_104 = 4; (g_104 >= (-18)); g_104 -= 9) + { + step_hash(284); + (*l_467) = (*p_32); + } + } + step_hash(287); + (*p_32) = 1L; + step_hash(288); + return (*l_433); + } + else + { + step_hash(294); + for (g_400 = (-1); (g_400 <= (-25)); g_400 -= 1) + { + step_hash(293); + (*l_422) = l_433; + } + } + } + } + else + { + step_hash(298); + (*l_422) = p_32; + } + step_hash(300); + l_476 &= (*l_421); + step_hash(301); + return (*l_421); +} +static int func_34(int * p_35) +{ + unsigned l_40 = 1UL; + int *l_45 = &g_46; + int **l_420 = &l_45; + step_hash(13); + (*l_45) |= ((unsigned char)(((signed char)(0x29L ^ (l_40 == ((signed char)l_40 % (signed char)((g_2 ^ 0xE7L) & g_19)))) + (signed char)0L) == (((unsigned short)l_40 << (unsigned short)11) ^ 4294967295UL)) * (unsigned char)l_40); + step_hash(258); + (*l_45) = ((signed char)((*l_45) >= (((signed char)(l_45 != &g_46) * (signed char)((*l_45) > 0x38L)) >= (func_51(func_54(((*l_45) < ((unsigned short)g_2 * (unsigned short)(l_45 != (void*)0)))), (*l_45)) | (*l_45)))) / (signed char)(*l_45)); + step_hash(259); + (*l_420) = l_45; + step_hash(260); + (*p_35) = (*p_35); + step_hash(261); + return (*l_45); +} +static unsigned char func_51(int * p_52, short p_53) +{ + int l_412 = 9L; + int l_419 = 0L; + step_hash(256); + (*p_52) = (((unsigned short)((unsigned short)g_2 + (unsigned short)g_104) >> (unsigned short)((*p_52) | (g_29 ^ (((signed char)(0x799D50B9L > ((unsigned)g_2 - (unsigned)((unsigned char)g_2 << (unsigned char)l_412))) >> (signed char)3) & ((((unsigned short)((unsigned short)(func_68((!((unsigned char)p_53 >> (unsigned char)3)), g_29) ^ g_400) + (unsigned short)p_53) - (unsigned short)l_419) & l_412) && (*p_52)))))) > 0xE00FFC98L); + step_hash(257); + return l_419; +} +static int * func_54(int p_55) +{ + int l_67 = 0x83830386L; + int *l_399 = &g_400; + int *l_401 = &l_67; + step_hash(253); + (*l_399) ^= func_58(p_55, p_55, (0UL && func_63(((signed char)(0x1773L != (l_67 != (((l_67 ^ func_68(p_55, ((g_19 || l_67) <= g_19))) == l_67) ^ p_55))) >> (signed char)g_29))), g_29); + step_hash(254); + return &g_157; +} +static int func_58(int p_59, unsigned short p_60, short p_61, unsigned char p_62) +{ + unsigned l_236 = 4294967292UL; + int *l_248 = &g_46; + int ***l_275 = &g_163; + short l_325 = 0L; + unsigned short l_341 = 0UL; + short l_382 = 0x6704L; + unsigned l_397 = 4294967289UL; + signed char l_398 = 0x04L; + step_hash(246); + if (((short)(!((void*)0 == &g_163)) >> (short)((signed char)((signed char)g_29 >> (signed char)3) + (signed char)((unsigned char)(!9UL) * (unsigned char)(p_60 < p_60))))) + { + int l_229 = 1L; + int *l_237 = &g_19; + int ***l_312 = &g_163; + int *l_345 = &g_46; + unsigned l_348 = 4294967288UL; + signed char l_393 = 7L; + step_hash(150); + (*g_163) = (void*)0; + step_hash(151); + (*l_237) = (((g_19 > l_229) && ((int)(p_60 <= (0xC4L | ((short)((g_46 == ((signed char)3L << (signed char)4)) && l_236) >> (short)3))) - (int)g_157)) <= p_62); + step_hash(241); + if (p_59) + { + unsigned l_242 = 0x01F52533L; + int l_243 = 0xDCEFBE5DL; + int l_274 = 0x55B6F9C3L; + unsigned l_324 = 0x219075D6L; + int l_334 = 0xAC1F8926L; + step_hash(190); + if ((l_236 <= (p_61 <= ((short)p_59 % (short)((short)((-3L) <= (l_242 == (p_60 > (g_29 >= l_243)))) + (short)((short)g_157 << (short)(*l_237))))))) + { + int *l_257 = &l_243; + step_hash(165); + if (((signed char)((void*)0 == l_248) << (signed char)4)) + { + int l_270 = 0xFEA6540CL; + step_hash(161); + if (((unsigned char)(g_157 > func_68(((((short)(-4L) % (short)(-8L)) > p_61) & (p_60 && ((unsigned short)((short)func_68(l_242, g_2) * (short)p_60) / (unsigned short)0xC439L))), p_62)) << (unsigned char)5)) + { + step_hash(156); + l_257 = (void*)0; + } + else + { + step_hash(158); + l_270 = (p_60 > ((unsigned short)((unsigned)((0xA791L || (0xC4C37C85L <= ((*l_248) == (((short)((signed char)((short)((0x36B34544L != p_60) && ((void*)0 != l_237)) << (short)p_61) >> (signed char)g_19) >> (short)g_104) < 65535UL)))) <= g_157) - (unsigned)l_242) % (unsigned short)0x6309L)); + step_hash(159); + (**g_162) = (**g_162); + step_hash(160); + (*g_163) = (void*)0; + } + step_hash(162); + l_243 &= (0xC2L < 0xEEL); + } + else + { + short l_271 = 1L; + step_hash(164); + (*l_257) = func_68(l_271, ((void*)0 != (*g_162))); + } + step_hash(166); + (*g_163) = &p_59; + } + else + { + short l_304 = 1L; + unsigned l_311 = 1UL; + unsigned char l_329 = 2UL; + step_hash(187); + if ((((unsigned short)func_68(g_19, l_274) + (unsigned short)(l_242 > ((void*)0 == l_275))) || ((-(signed char)((unsigned short)((unsigned char)(-(short)(func_68((*l_248), (((*l_248) | ((&p_59 != &p_59) != g_46)) ^ g_19)) & p_59)) >> (unsigned char)0) * (unsigned short)(*l_248))) > g_29))) + { + short l_290 = 5L; + step_hash(169); + (**g_162) = &l_243; + step_hash(177); + if (func_63(g_19)) + { + unsigned l_286 = 0xC75E0464L; + int **l_287 = &l_237; + step_hash(171); + (**g_162) = (*g_163); + step_hash(172); + (*l_237) = ((signed char)0L / (signed char)(g_29 || (((signed char)((((((-1L) ^ (g_104 & g_29)) > func_68(l_286, ((*l_275) == l_287))) | 0L) != 0x9F7B5380L) ^ 0xABL) << (signed char)7) && l_274))); + } + else + { + signed char l_303 = 0xCFL; + step_hash(174); + (*l_237) = ((unsigned)(l_290 & (l_290 >= g_157)) + (unsigned)0L); + step_hash(175); + p_59 &= (((short)(g_2 & (((short)0x04D9L * (short)l_243) >= ((signed char)(*l_237) * (signed char)0L))) >> (short)l_311) && (((void*)0 != l_312) && l_304)); + step_hash(176); + (**l_312) = &p_59; + } + step_hash(182); + for (g_157 = (-1); (g_157 < 19); ++g_157) + { + step_hash(181); + return p_59; + } + } + else + { + unsigned l_323 = 4294967288UL; + step_hash(184); + (**l_275) = (**l_275); + step_hash(185); + (**g_162) = (*g_163); + step_hash(186); + (*l_237) = ((!(*l_237)) | p_60); + } + step_hash(188); + l_334 ^= (((unsigned char)(g_2 ^ (-6L)) - (unsigned char)(((g_104 < (l_312 == &g_163)) & ((unsigned char)0xCFL << (unsigned char)(l_243 ^ (-1L)))) & (((((0x2F378EE9L <= g_2) >= p_60) < g_157) != 0xCD65DFEDL) || p_61))) < p_59); + step_hash(189); + (**l_312) = (*g_163); + } + step_hash(197); + for (g_104 = 0; (g_104 == (-19)); g_104--) + { + step_hash(194); + (*l_237) ^= (p_61 < 4294967295UL); + step_hash(195); + (*l_237) = (&g_163 != l_312); + step_hash(196); + if ((*l_237)) + break; + } + step_hash(198); + (*l_237) = (((signed char)p_59 - (signed char)p_59) != ((short)(g_29 || l_341) - (short)g_19)); + step_hash(199); + l_334 ^= (l_312 != (void*)0); + } + else + { + int l_344 = 0x36BC50D1L; + int **l_371 = &g_120; + step_hash(201); + (*l_237) = (*l_248); + step_hash(202); + (**l_312) = &p_59; + step_hash(239); + if ((((((unsigned char)func_68(((0xB46EA5D3L <= func_63(l_344)) >= (8L | (l_248 == l_345))), g_29) >> (unsigned char)((unsigned char)p_60 * (unsigned char)0UL)) != l_348) & p_60) | g_29)) + { + int *l_364 = &g_104; + step_hash(216); + for (g_19 = (-25); (g_19 != 22); g_19++) + { + short l_363 = 0x0BF7L; + step_hash(207); + p_59 = 0x9EE725D3L; + step_hash(214); + for (p_59 = 27; (p_59 <= (-7)); --p_59) + { + step_hash(211); + g_104 &= (0x491A405FL > (((((unsigned short)((unsigned short)((65526UL || p_60) == (p_62 >= ((signed char)g_157 + (signed char)p_60))) * (unsigned short)0x66BBL) / (unsigned short)((unsigned char)0x32L / (unsigned char)((unsigned char)0x34L * (unsigned char)l_363))) & g_2) <= 1L) ^ 0xA7A2C9F2L)); + step_hash(212); + if (l_344) + break; + step_hash(213); + (**l_275) = l_364; + } + step_hash(215); + (*l_364) ^= (p_62 != (l_344 != ((unsigned char)0x46L + (unsigned char)(*l_248)))); + } + } + else + { + int **l_372 = &g_120; + step_hash(237); + if ((((int)((unsigned char)(~((func_68((l_371 != l_372), func_68((*l_248), p_62)) > ((((unsigned short)(((void*)0 != (*g_163)) ^ p_62) / (unsigned short)3UL) == (*l_248)) != p_62)) > p_60)) >> (unsigned char)1) - (int)g_46) ^ p_59)) + { + step_hash(219); + return p_59; + } + else + { + int l_377 = (-9L); + step_hash(225); + for (l_236 = 13; (l_236 == 37); ++l_236) + { + step_hash(224); + (*l_275) = (void*)0; + } + step_hash(231); + if (p_59) + { + step_hash(227); + p_59 &= (0x37BDL ^ l_377); + step_hash(228); + (*l_237) = p_62; + } + else + { + step_hash(230); + (*l_372) = &p_59; + } + step_hash(236); + for (l_341 = 19; (l_341 == 60); l_341 += 9) + { + step_hash(235); + (*l_237) ^= ((unsigned char)l_382 << (unsigned char)1); + } + } + step_hash(238); + (*l_237) ^= p_61; + } + step_hash(240); + (*l_237) &= (!((short)(((short)g_29 / (short)(-1L)) & (((p_59 ^ (l_371 == l_371)) && p_61) || (*l_248))) - (short)((void*)0 == &g_163))); + } + step_hash(242); + p_59 ^= ((g_19 & ((*l_345) || (&g_163 != (void*)0))) <= (g_29 ^ (((unsigned)(((((short)(+(p_62 <= ((*l_237) && ((short)g_104 * (short)g_29)))) * (short)g_46) || g_2) != p_62) & g_29) % (unsigned)l_393) & (*l_237)))); + } + else + { + int *l_394 = &g_104; + step_hash(244); + (*g_163) = l_394; + step_hash(245); + (**l_275) = (**g_162); + } + step_hash(251); + for (l_325 = 0; (l_325 < 0); l_325 += 2) + { + step_hash(250); + return l_397; + } + step_hash(252); + return l_398; +} +static unsigned func_63(unsigned short p_64) +{ + int l_82 = 0x3B667D15L; + int *l_90 = &g_46; + int **l_89 = &l_90; + int l_172 = 1L; + signed char l_191 = 0xF4L; + int *l_220 = &g_157; + step_hash(144); + if (p_64) + { + int *l_88 = &g_46; + int **l_87 = &l_88; + int ***l_156 = &l_87; + step_hash(89); + if (p_64) + { + int *l_91 = &g_19; + int *l_121 = &g_104; + step_hash(29); + (*l_91) = ((unsigned char)(l_82 != ((g_29 | ((int)(p_64 <= g_2) - (int)(p_64 & 6L))) != 0x81945549L)) + (unsigned char)(1L & (((int)(l_87 == l_89) - (int)(*l_90)) ^ 4UL))); + step_hash(74); + for (p_64 = 28; (p_64 != 35); p_64 += 4) + { + int *l_97 = (void*)0; + int *l_107 = &g_104; + } + step_hash(85); + for (p_64 = 0; (p_64 == 16); p_64++) + { + step_hash(78); + (*l_89) = &g_46; + step_hash(83); + for (g_104 = (-2); (g_104 > (-9)); g_104 -= 8) + { + signed char l_142 = 0x13L; + step_hash(82); + return l_142; + } + step_hash(84); + (*l_121) = ((((signed char)((unsigned short)((*g_120) && 0L) << (unsigned short)p_64) * (signed char)((*l_87) == (void*)0)) != ((*l_121) == p_64)) > g_29); + } + step_hash(86); + (*l_121) = (*l_91); + } + else + { + unsigned l_151 = 0UL; + step_hash(88); + (*g_120) = (((unsigned char)func_68(g_29, p_64) << (unsigned char)((((signed char)((l_151 ^ (0xD196261EL == g_104)) < (**l_89)) >> (signed char)((int)p_64 / (int)g_46)) | 0UL) >= g_46)) & (-6L)); + } + step_hash(90); + (*g_120) = 0x92F5982EL; + step_hash(91); + (*g_120) = func_68(((p_64 == ((short)(((l_156 == &l_89) > (p_64 || func_68(g_29, g_157))) < (0xCE3F75E0L != (*l_88))) << (short)g_2)) | p_64), p_64); + step_hash(92); + (*g_120) = (((short)(((((signed char)g_104 * (signed char)func_68((***l_156), (*l_90))) >= (&l_89 == g_162)) != (*l_88)) || ((unsigned)((signed char)((unsigned short)((*l_90) ^ g_104) * (unsigned short)(*l_88)) - (signed char)p_64) + (unsigned)(***g_162))) % (short)0xFDADL) < g_29); + } + else + { + unsigned l_171 = 2UL; + int *l_175 = &l_172; + int **l_198 = &g_120; + step_hash(143); + if ((**l_89)) + { + int *l_170 = &g_19; + step_hash(95); + l_171 ^= (((*g_162) != (*g_162)) >= ((void*)0 != l_170)); + step_hash(96); + (*l_170) &= p_64; + step_hash(97); + (*l_89) = l_170; + step_hash(98); + l_172 &= (p_64 & (*l_170)); + } + else + { + int l_182 = 1L; + int *l_210 = &l_182; + step_hash(100); + (**g_163) = l_171; + step_hash(142); + if ((**g_163)) + { + int l_183 = 5L; + int *l_211 = (void*)0; + step_hash(107); + for (g_19 = 27; (g_19 == (-24)); --g_19) + { + step_hash(105); + (*l_89) = l_175; + step_hash(106); + if ((*l_90)) + continue; + } + step_hash(122); + for (l_171 = (-20); (l_171 >= 22); l_171 += 1) + { + step_hash(115); + for (l_82 = (-30); (l_82 < 9); l_82 += 2) + { + step_hash(114); + (**g_162) = (*g_163); + } + step_hash(120); + for (p_64 = (-12); (p_64 != 28); p_64 += 7) + { + unsigned l_184 = 4294967291UL; + step_hash(119); + l_184 = func_68(l_182, l_183); + } + step_hash(121); + if ((***g_162)) + continue; + } + step_hash(138); + if ((0x7010L || (func_68(((unsigned)func_68(g_29, ((signed char)l_182 * (signed char)(((unsigned short)p_64 % (unsigned short)l_191) ^ p_64))) + (unsigned)(&l_90 == &l_175)), g_157) || 0x61F4025DL))) + { + step_hash(124); + (***g_162) ^= (&l_183 != (*l_89)); + step_hash(125); + (*l_89) = (void*)0; + } + else + { + signed char l_196 = 1L; + int *l_197 = &l_183; + step_hash(135); + if ((((short)(*l_175) + (short)((short)((void*)0 != &g_163) % (short)func_68(l_196, (l_197 == &l_183)))) < (g_2 > p_64))) + { + step_hash(128); + l_198 = (*g_162); + step_hash(129); + (**g_162) = (void*)0; + step_hash(130); + (*l_175) = func_68((((**l_89) ^ (0x1392L || ((signed char)((int)l_183 - (int)0xEACE3552L) / (signed char)p_64))) > ((short)((((signed char)(((signed char)p_64 << (signed char)6) ^ (g_157 ^ 0x0E80L)) + (signed char)g_2) >= g_29) ^ (*l_197)) / (short)0x8B09L)), (*l_90)); + } + else + { + int *l_209 = &l_182; + step_hash(132); + (***g_162) = 0x286D0CB5L; + step_hash(133); + l_209 = (**g_162); + step_hash(134); + l_182 &= (**g_163); + } + step_hash(136); + (*l_197) |= (0xA926L >= p_64); + step_hash(137); + l_210 = (*l_198); + } + step_hash(139); + l_211 = (*g_163); + } + else + { + step_hash(141); + (***g_162) = (func_68(g_29, (*l_90)) | p_64); + } + } + } + step_hash(145); + (*l_220) &= ((p_64 || 0x27BBL) & ((signed char)func_68(func_68(g_19, p_64), (((int)((unsigned char)(p_64 && ((unsigned short)p_64 - (unsigned short)((*l_89) != (void*)0))) * (unsigned char)p_64) - (int)0x53D3BC77L) & g_104)) + (signed char)g_29)); + step_hash(146); + (*l_220) = p_64; + step_hash(147); + return g_2; +} +static unsigned func_68(unsigned p_69, int p_70) +{ + unsigned char l_73 = 0x18L; + int *l_78 = &g_19; + short l_79 = 0xC660L; + step_hash(24); + if (((unsigned)g_2 + (unsigned)l_73)) + { + int l_74 = 0xB4074358L; + int *l_75 = &g_19; + step_hash(17); + (*l_75) ^= (l_74 < (+g_2)); + step_hash(18); + (*l_75) |= p_70; + } + else + { + int *l_77 = &g_19; + int **l_76 = &l_77; + step_hash(20); + (*l_76) = &g_19; + step_hash(21); + (**l_76) &= (p_69 & g_46); + step_hash(22); + (*l_76) = l_78; + step_hash(23); + (*l_78) &= 0xB2C1D3A0L; + } + step_hash(25); + return l_79; +} +void csmith_compute_hash(void) +{ + transparent_crc(g_2, "g_2", print_hash_value); + transparent_crc(g_17, "g_17", print_hash_value); + transparent_crc(g_19, "g_19", print_hash_value); + transparent_crc(g_29, "g_29", print_hash_value); + transparent_crc(g_46, "g_46", print_hash_value); + transparent_crc(g_104, "g_104", print_hash_value); + transparent_crc(g_157, "g_157", print_hash_value); + transparent_crc(g_400, "g_400", print_hash_value); + transparent_crc(g_455, "g_455", print_hash_value); +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand38.expect b/src/tests/csmith/rand38.expect new file mode 100644 index 0000000..410f4e1 --- /dev/null +++ b/src/tests/csmith/rand38.expect @@ -0,0 +1,140 @@ +...checksum after hashing g_2 : E5D7D03A +...checksum after hashing g_17 : 504AF84C +...checksum after hashing g_19 : 2AACEC8A +...checksum after hashing g_29 : 2F699942 +...checksum after hashing g_46 : 3476FF48 +...checksum after hashing g_104 : 2111D683 +...checksum after hashing g_157 : A1796CD4 +...checksum after hashing g_400 : FD9E25D2 +...checksum after hashing g_455 : 5B7FAD7D +before stmt(324): checksum = 5B7FAD7D +...checksum after hashing g_2 : E5D7D03A +...checksum after hashing g_17 : 504AF84C +...checksum after hashing g_19 : 2AACEC8A +...checksum after hashing g_29 : 2F699942 +...checksum after hashing g_46 : 3476FF48 +...checksum after hashing g_104 : 2111D683 +...checksum after hashing g_157 : A1796CD4 +...checksum after hashing g_400 : FD9E25D2 +...checksum after hashing g_455 : 5B7FAD7D +before stmt(2): checksum = 5B7FAD7D +...checksum after hashing g_2 : E5D7D03A +...checksum after hashing g_17 : E9D1B8E0 +...checksum after hashing g_19 : 7D839F0E +...checksum after hashing g_29 : FCF6921D +...checksum after hashing g_46 : 424E1AE6 +...checksum after hashing g_104 : 8D75C20C +...checksum after hashing g_157 : D19D8075 +...checksum after hashing g_400 : C2A635A2 +...checksum after hashing g_455 : 8D9F3F57 +before stmt(3): checksum = 8D9F3F57 +...checksum after hashing g_2 : E5D7D03A +...checksum after hashing g_17 : E9D1B8E0 +...checksum after hashing g_19 : 7D839F0E +...checksum after hashing g_29 : FCF6921D +...checksum after hashing g_46 : 424E1AE6 +...checksum after hashing g_104 : 8D75C20C +...checksum after hashing g_157 : D19D8075 +...checksum after hashing g_400 : C2A635A2 +...checksum after hashing g_455 : 8D9F3F57 +before stmt(5): checksum = 8D9F3F57 +...checksum after hashing g_2 : E5D7D03A +...checksum after hashing g_17 : E9D1B8E0 +...checksum after hashing g_19 : 7D839F0E +...checksum after hashing g_29 : FCF6921D +...checksum after hashing g_46 : 424E1AE6 +...checksum after hashing g_104 : 8D75C20C +...checksum after hashing g_157 : D19D8075 +...checksum after hashing g_400 : C2A635A2 +...checksum after hashing g_455 : 8D9F3F57 +before stmt(2): checksum = 8D9F3F57 +...checksum after hashing g_2 : E5D7D03A +...checksum after hashing g_17 : E9D1B8E0 +...checksum after hashing g_19 : 7D839F0E +...checksum after hashing g_29 : FCF6921D +...checksum after hashing g_46 : 424E1AE6 +...checksum after hashing g_104 : 8D75C20C +...checksum after hashing g_157 : D19D8075 +...checksum after hashing g_400 : C2A635A2 +...checksum after hashing g_455 : 8D9F3F57 +before stmt(3): checksum = 8D9F3F57 +...checksum after hashing g_2 : E5D7D03A +...checksum after hashing g_17 : E9D1B8E0 +...checksum after hashing g_19 : 7D839F0E +...checksum after hashing g_29 : FCF6921D +...checksum after hashing g_46 : 424E1AE6 +...checksum after hashing g_104 : 8D75C20C +...checksum after hashing g_157 : D19D8075 +...checksum after hashing g_400 : C2A635A2 +...checksum after hashing g_455 : 8D9F3F57 +before stmt(6): checksum = 8D9F3F57 +...checksum after hashing g_2 : E5D7D03A +...checksum after hashing g_17 : E9D1B8E0 +...checksum after hashing g_19 : B9109028 +...checksum after hashing g_29 : B496FAB2 +...checksum after hashing g_46 : C782B28 +...checksum after hashing g_104 : 2636297C +...checksum after hashing g_157 : 8545790E +...checksum after hashing g_400 : E16A809A +...checksum after hashing g_455 : BEBD3AD2 +before stmt(315): checksum = BEBD3AD2 +...checksum after hashing g_2 : E5D7D03A +...checksum after hashing g_17 : E9D1B8E0 +...checksum after hashing g_19 : B9109028 +...checksum after hashing g_29 : B496FAB2 +...checksum after hashing g_46 : C782B28 +...checksum after hashing g_104 : 2636297C +...checksum after hashing g_157 : 8545790E +...checksum after hashing g_400 : E16A809A +...checksum after hashing g_455 : BEBD3AD2 +before stmt(316): checksum = BEBD3AD2 +...checksum after hashing g_2 : E5D7D03A +...checksum after hashing g_17 : E9D1B8E0 +...checksum after hashing g_19 : B9109028 +...checksum after hashing g_29 : B496FAB2 +...checksum after hashing g_46 : C782B28 +...checksum after hashing g_104 : 2636297C +...checksum after hashing g_157 : 8545790E +...checksum after hashing g_400 : E16A809A +...checksum after hashing g_455 : BEBD3AD2 +before stmt(318): checksum = BEBD3AD2 +...checksum after hashing g_2 : E5D7D03A +...checksum after hashing g_17 : E9D1B8E0 +...checksum after hashing g_19 : B9109028 +...checksum after hashing g_29 : B496FAB2 +...checksum after hashing g_46 : C782B28 +...checksum after hashing g_104 : 2636297C +...checksum after hashing g_157 : 8545790E +...checksum after hashing g_400 : E16A809A +...checksum after hashing g_455 : BEBD3AD2 +before stmt(319): checksum = BEBD3AD2 +...checksum after hashing g_2 : E5D7D03A +...checksum after hashing g_17 : E9D1B8E0 +...checksum after hashing g_19 : B9109028 +...checksum after hashing g_29 : B496FAB2 +...checksum after hashing g_46 : C782B28 +...checksum after hashing g_104 : 2636297C +...checksum after hashing g_157 : 772FA1D3 +...checksum after hashing g_400 : 7A6F954B +...checksum after hashing g_455 : 20123B3C +before stmt(320): checksum = 20123B3C +...checksum after hashing g_2 : E5D7D03A +...checksum after hashing g_17 : E9D1B8E0 +...checksum after hashing g_19 : B9109028 +...checksum after hashing g_29 : B496FAB2 +...checksum after hashing g_46 : C782B28 +...checksum after hashing g_104 : 2636297C +...checksum after hashing g_157 : CF93C6B6 +...checksum after hashing g_400 : B6C595D5 +...checksum after hashing g_455 : BBB77753 +before stmt(321): checksum = BBB77753 +...checksum after hashing g_2 : E5D7D03A +...checksum after hashing g_17 : E9D1B8E0 +...checksum after hashing g_19 : B9109028 +...checksum after hashing g_29 : B496FAB2 +...checksum after hashing g_46 : C782B28 +...checksum after hashing g_104 : 2636297C +...checksum after hashing g_157 : CF93C6B6 +...checksum after hashing g_400 : B6C595D5 +...checksum after hashing g_455 : BBB77753 +checksum = bbb77753 diff --git a/src/tests/csmith/rand39.c b/src/tests/csmith/rand39.c new file mode 100644 index 0000000..8a0bfa7 --- /dev/null +++ b/src/tests/csmith/rand39.c @@ -0,0 +1,586 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static unsigned g_16 = 4294967286UL; +static int g_69 = 0L; +static signed char g_75 = 0xD5L; +static int g_96 = 1L; +static int *g_106 = &g_69; +static int **g_105 = &g_106; +static int *g_216 = &g_69; +static int g_262 = (-6L); +static int g_423 = 0x26FEDE40L; +static int g_801 = 0xDEFB6F4AL; +static unsigned short func_1(void); +static short func_2(unsigned short p_3, unsigned p_4, int p_5, int p_6, unsigned char p_7); +static int func_11(unsigned p_12, short p_13, int p_14, unsigned p_15); +static unsigned short func_23(unsigned p_24); +static short func_25(signed char p_26, int p_27, int p_28, signed char p_29, signed char p_30); +static unsigned func_33(signed char p_34, unsigned p_35); +static int func_36(unsigned p_37, unsigned char p_38); +static short func_40(unsigned char p_41, signed char p_42, unsigned short p_43, unsigned short p_44, unsigned p_45); +static int * func_53(int * p_54); +static int * func_55(short p_56, int p_57, int p_58); +static unsigned short func_1(void) +{ + signed char l_10 = 0x49L; + int l_39 = 0L; + int *l_800 = &g_801; + unsigned l_802 = 4294967293UL; + step_hash(474); + (*l_800) ^= (func_2(((unsigned char)(l_10 && func_11(l_10, g_16, ((signed char)g_16 << (signed char)6), ((signed char)(((short)(-1L) + (short)func_23(((g_16 || func_25((((int)(!0x817D1DC6L) + (int)func_33((1UL == func_36(l_39, g_16)), g_423)) || 0xBF6DL), g_423, g_423, g_423, g_16)) > g_16))) && 0x3AL) + (signed char)g_16))) + (unsigned char)l_10), l_39, g_16, l_39, g_16) == 65533UL); + step_hash(475); + return l_802; +} +static short func_2(unsigned short p_3, unsigned p_4, int p_5, int p_6, unsigned char p_7) +{ + signed char l_778 = (-2L); + int l_791 = (-8L); + step_hash(471); + for (g_16 = 0; (g_16 >= 4); g_16 += 7) + { + int *l_780 = &g_262; + step_hash(463); + (*g_105) = &p_5; + step_hash(468); + for (p_6 = 5; (p_6 == (-2)); --p_6) + { + int *l_779 = &g_96; + step_hash(467); + (*l_779) = (l_778 | 0L); + } + step_hash(469); + (*l_780) = (-2L); + step_hash(470); + (*l_780) = ((unsigned short)(g_75 | ((int)p_6 - (int)g_96)) + (unsigned short)g_69); + } + step_hash(472); + p_5 = l_778; + step_hash(473); + return p_5; +} +static int func_11(unsigned p_12, short p_13, int p_14, unsigned p_15) +{ + int l_773 = 0x9F0AFEDCL; + step_hash(458); + return l_773; +} +static unsigned short func_23(unsigned p_24) +{ + int l_768 = (-6L); + int *l_769 = (void*)0; + int *l_770 = (void*)0; + int *l_771 = (void*)0; + int *l_772 = &g_96; + step_hash(454); + (*l_772) = l_768; + step_hash(455); + (*l_772) ^= p_24; + step_hash(456); + return g_423; +} +static short func_25(signed char p_26, int p_27, int p_28, signed char p_29, signed char p_30) +{ + int l_594 = (-3L); + int *l_601 = (void*)0; + int *l_626 = &g_96; + unsigned l_650 = 4294967286UL; + unsigned short l_679 = 0x30BDL; + int ***l_700 = &g_105; + int *l_744 = (void*)0; + step_hash(343); + (*g_216) |= (((l_594 || (p_26 && ((short)((short)((signed char)l_594 * (signed char)g_96) << (short)8) >> (short)7))) != ((void*)0 == l_601)) & 255UL); + step_hash(349); + if ((**g_105)) + { + int **l_602 = &g_106; + step_hash(345); + (**g_105) = ((void*)0 == l_602); + step_hash(346); + (*g_216) = 0x12E89829L; + } + else + { + step_hash(348); + return p_29; + } + step_hash(383); + if (p_29) + { + int l_610 = (-3L); + step_hash(351); + (*g_216) = p_26; + step_hash(369); + for (g_75 = 27; (g_75 == 24); g_75 -= 7) + { + int ***l_611 = &g_105; + step_hash(355); + if (p_28) + break; + } + } + else + { + unsigned short l_616 = 0x130DL; + step_hash(376); + for (p_30 = 0; (p_30 < 6); p_30 += 6) + { + } + step_hash(382); + if ((l_616 != 0L)) + { + int l_623 = 0xD56A67A9L; + step_hash(378); + (*g_216) = ((0x7D15100DL == ((signed char)l_623 >> (signed char)2)) == ((*g_216) ^ ((signed char)(p_29 | g_75) + (signed char)p_29))); + } + else + { + step_hash(380); + (*g_105) = l_601; + step_hash(381); + (*g_105) = (*g_105); + } + } + step_hash(451); + if (((g_16 ^ ((void*)0 == l_626)) > ((unsigned short)((unsigned)(((unsigned char)(p_28 > p_26) - (unsigned char)(((*l_626) < 0x5440L) & ((unsigned char)((-1L) ^ (((g_423 ^ p_30) & p_29) || 0x9EEFL)) >> (unsigned char)7))) < 0xA4L) / (unsigned)p_28) >> (unsigned short)5))) + { + int *l_635 = &g_423; + step_hash(385); + (*g_105) = l_635; + step_hash(386); + (*g_105) = l_635; + } + else + { + signed char l_636 = 9L; + unsigned short l_649 = 0x763DL; + int ***l_699 = (void*)0; + int l_701 = 1L; + int **l_715 = &g_216; + signed char l_751 = 0x96L; + int **l_762 = &l_601; + step_hash(388); + l_636 &= p_27; + step_hash(389); + (*g_105) = (*g_105); + step_hash(449); + if (((signed char)((short)((unsigned char)g_16 + (unsigned char)(((-1L) ^ func_33(((((((short)((void*)0 != &g_216) >> (short)((unsigned char)((*l_626) >= ((short)func_33(g_262, g_16) + (short)(l_649 == g_16))) >> (unsigned char)5)) == 0x7EL) || 0x8AE71177L) ^ g_262) <= (*l_626)), p_28)) < g_69)) / (short)l_650) >> (signed char)l_636)) + { + step_hash(400); + for (g_423 = 0; (g_423 > 12); g_423++) + { + int *l_655 = (void*)0; + step_hash(398); + for (p_27 = 19; (p_27 < (-8)); p_27 -= 1) + { + step_hash(397); + (*g_105) = l_655; + } + step_hash(399); + (*l_626) |= (g_423 < ((g_75 > (!((-5L) <= 6UL))) || p_26)); + } + step_hash(405); + for (l_649 = (-4); (l_649 >= 33); ++l_649) + { + step_hash(404); + return p_29; + } + } + else + { + unsigned l_678 = 1UL; + int l_680 = 0xF87A307DL; + int **l_716 = &l_626; + step_hash(412); + for (p_29 = 12; (p_29 > (-26)); --p_29) + { + step_hash(410); + (*l_626) = (((g_262 >= ((unsigned short)65535UL << (unsigned short)7)) > l_636) != g_262); + step_hash(411); + (*l_626) &= (g_75 == ((void*)0 != (*g_105))); + } + step_hash(413); + l_680 &= ((unsigned char)p_27 / (unsigned char)(-10L)); + step_hash(447); + if (((unsigned char)p_26 >> (unsigned char)4)) + { + short l_717 = 1L; + short l_720 = 1L; + step_hash(415); + (*l_626) = (((((unsigned char)p_29 + (unsigned char)(((int)((short)(((-(unsigned char)((signed char)((signed char)(((unsigned)p_30 % (unsigned)((l_715 != l_716) & p_30)) || (l_717 ^ (((-1L) >= (p_29 <= 0x06L)) || l_717))) % (signed char)0xB1L) % (signed char)l_717)) < l_720) < 0L) * (short)p_29) % (int)l_720) <= g_423)) <= g_16) != g_16) && p_29); + step_hash(420); + for (g_262 = (-9); (g_262 > (-7)); g_262 += 2) + { + step_hash(419); + (*l_715) = (*g_105); + } + } + else + { + unsigned l_739 = 8UL; + int *l_740 = &g_69; + step_hash(443); + if ((((signed char)0xB4L - (signed char)(&g_106 != (*l_700))) ^ g_75)) + { + unsigned char l_727 = 0x3CL; + unsigned char l_736 = 0x19L; + step_hash(423); + (**l_700) = (*l_716); + step_hash(424); + (*l_715) = (*g_105); + step_hash(429); + for (g_423 = 0; (g_423 < (-28)); g_423 -= 8) + { + step_hash(428); + return l_727; + } + step_hash(430); + (***l_700) = (((signed char)0x72L - (signed char)p_28) < ((signed char)p_28 * (signed char)(((unsigned char)((((g_69 ^ (**g_105)) & (((unsigned)0UL % (unsigned)l_736) == ((p_29 != ((signed char)l_739 + (signed char)g_69)) == 0x7799L))) == 246UL) != p_30) * (unsigned char)p_29) <= 0x0CL))); + } + else + { + step_hash(436); + if (p_26) + { + step_hash(433); + (**l_700) = (*g_105); + } + else + { + step_hash(435); + (*l_716) = (*l_715); + } + step_hash(442); + for (p_26 = 17; (p_26 <= (-7)); p_26 -= 5) + { + short l_743 = 0x98FFL; + step_hash(440); + (**l_700) = l_740; + step_hash(441); + if (l_743) + continue; + } + } + step_hash(444); + (*g_105) = l_744; + step_hash(445); + (*g_105) = (*g_105); + step_hash(446); + (*l_740) = ((unsigned char)(!((!((void*)0 == &l_740)) != 0x3845L)) << (unsigned char)4); + } + step_hash(448); + l_701 = (~((unsigned char)((unsigned)((g_423 > g_16) != g_75) / (unsigned)func_33((l_751 ^ (((unsigned short)((((unsigned char)255UL << (unsigned char)g_69) || ((int)(-1L) + (int)4294967290UL)) | (((p_26 != p_26) & p_28) >= 4UL)) - (unsigned short)g_75) >= g_16)), p_29)) + (unsigned char)0x57L)); + } + step_hash(450); + g_69 = ((p_26 < (((unsigned char)255UL + (unsigned char)g_262) && (func_33(((void*)0 != l_762), (((unsigned)(-(short)g_96) % (unsigned)7L) == func_33(p_27, ((unsigned short)g_262 + (unsigned short)p_27)))) < g_75))) || g_262); + } + step_hash(452); + return g_96; +} +static unsigned func_33(signed char p_34, unsigned p_35) +{ + int ***l_593 = &g_105; + step_hash(340); + (*l_593) = &g_216; + step_hash(341); + return g_16; +} +static int func_36(unsigned p_37, unsigned char p_38) +{ + unsigned char l_46 = 0xEBL; + int l_268 = (-8L); + int **l_274 = &g_106; + int **l_294 = &g_106; + short l_304 = 0x7A3FL; + short l_335 = 0xFA44L; + int l_437 = 0xB7EF2194L; + unsigned l_563 = 4294967287UL; + signed char l_575 = 0xB5L; + step_hash(152); + if ((func_40(l_46, (g_16 && (-1L)), (((unsigned char)g_16 * (unsigned char)(((int)0x5C3421ADL - (int)(((int)(l_46 != l_46) - (int)g_16) & (g_16 && 0x5EL))) > l_46)) || p_38), g_16, p_38) & p_37)) + { + int *l_263 = &g_262; + step_hash(134); + (*g_105) = l_263; + step_hash(135); + (*l_263) ^= p_38; + step_hash(136); + (**g_105) = ((int)((unsigned short)0x0710L / (unsigned short)1UL) % (int)(*g_106)); + step_hash(137); + l_268 ^= (*g_106); + } + else + { + unsigned l_285 = 8UL; + int l_295 = (-2L); + step_hash(139); + (*g_105) = &l_268; + step_hash(145); + for (l_268 = 0; (l_268 < 3); ++l_268) + { + short l_271 = (-8L); + step_hash(143); + (*g_216) = l_271; + step_hash(144); + (*g_105) = (*g_105); + } + step_hash(146); + l_295 &= ((unsigned)(l_274 == (void*)0) - (unsigned)(+((signed char)((short)0xF413L - (short)(g_75 == ((-4L) <= ((unsigned char)(**l_274) % (unsigned char)((((signed char)l_285 + (signed char)((short)(((short)(g_69 ^ ((unsigned short)((unsigned short)((~(l_274 == l_294)) || (-1L)) - (unsigned short)0x3486L) << (unsigned short)6)) % (short)65529UL) != g_262) << (short)5)) >= 0x1DA3L) | g_262))))) >> (signed char)6))); + step_hash(151); + for (g_75 = 0; (g_75 > (-5)); g_75 -= 6) + { + step_hash(150); + (*l_274) = func_53(&l_295); + } + } + step_hash(153); + (*l_294) = (void*)0; + step_hash(258); + for (l_46 = 0; (l_46 == 12); ++l_46) + { + signed char l_303 = (-6L); + int l_305 = 0x8757D178L; + int ***l_343 = &l_294; + int *l_354 = (void*)0; + } + step_hash(337); + for (g_75 = 0; (g_75 == 21); g_75 += 3) + { + unsigned l_509 = 0UL; + int *l_514 = (void*)0; + int l_540 = 0xDF32F65BL; + unsigned l_548 = 1UL; + unsigned l_551 = 0x09FD417FL; + signed char l_583 = (-10L); + } + step_hash(338); + return p_37; +} +static short func_40(unsigned char p_41, signed char p_42, unsigned short p_43, unsigned short p_44, unsigned p_45) +{ + int l_61 = 1L; + unsigned char l_66 = 0x26L; + int l_67 = 5L; + unsigned char l_174 = 1UL; + int **l_241 = &g_216; + step_hash(33); + (*g_105) = func_53(func_55((((p_44 < ((((short)l_61 * (short)((signed char)((signed char)(!(g_16 ^ g_16)) + (signed char)(l_61 == (l_61 && l_66))) << (signed char)4)) | l_61) >= g_16)) == l_67) & l_61), g_16, l_61)); + step_hash(131); + for (g_96 = 0; (g_96 <= 17); g_96++) + { + int **l_147 = &g_106; + int l_221 = 0x325B7F87L; + int ***l_222 = &g_105; + int *l_227 = (void*)0; + unsigned l_240 = 0x1A5ED94EL; + step_hash(62); + for (p_45 = 5; (p_45 == 57); p_45 += 4) + { + signed char l_122 = (-9L); + int l_123 = 0x728EF6BEL; + int *l_155 = &l_123; + step_hash(40); + l_123 ^= (((unsigned)((g_75 == (-6L)) || l_122) % (unsigned)(g_75 & p_43)) < p_42); + step_hash(41); + (*g_105) = &l_61; + step_hash(60); + for (l_66 = 0; (l_66 >= 31); l_66++) + { + int l_136 = 1L; + step_hash(57); + for (p_42 = 0; (p_42 > (-20)); --p_42) + { + unsigned char l_135 = 0xC0L; + int **l_137 = &g_106; + step_hash(48); + l_136 ^= ((**g_105) ^ ((p_42 >= p_44) & ((signed char)(((unsigned short)(-(unsigned char)((signed char)((l_135 | 0L) ^ (p_41 > 0x259BBF2BL)) / (signed char)g_96)) >> (unsigned short)11) & p_45) * (signed char)0xA3L))); + step_hash(55); + if (((((void*)0 != l_137) == l_67) <= ((**g_105) != ((signed char)(-6L) - (signed char)l_123)))) + { + unsigned l_146 = 0xD03AD187L; + step_hash(50); + (**g_105) = (((void*)0 != &g_106) < p_41); + step_hash(51); + (**l_137) = (((p_44 && (g_69 >= ((**l_137) > ((((unsigned)g_16 - (unsigned)l_123) && (((p_44 == g_96) <= ((unsigned)((*g_105) != (*g_105)) + (unsigned)0x345E11D1L)) == p_42)) >= l_61)))) && l_146) > 1UL); + } + else + { + int ***l_148 = &l_137; + step_hash(53); + (*l_148) = l_147; + step_hash(54); + (**l_147) ^= ((unsigned char)((unsigned char)g_75 - (unsigned char)1UL) + (unsigned char)((((signed char)((*g_105) != (void*)0) * (signed char)p_45) & (((void*)0 != l_155) != ((unsigned short)((unsigned short)((short)((void*)0 != &g_106) >> (short)g_96) >> (unsigned short)7) / (unsigned short)65535UL))) > 0xB3L)); + } + step_hash(56); + (**l_137) = p_45; + } + step_hash(58); + if ((**g_105)) + break; + step_hash(59); + if ((*g_106)) + break; + } + step_hash(61); + (**l_147) = (l_67 | (*l_155)); + } + } + step_hash(132); + return g_16; +} +static int * func_53(int * p_54) +{ + signed char l_74 = 0x12L; + int *l_76 = &g_69; + step_hash(30); + if (((((unsigned short)0x25ACL >> (unsigned short)(p_54 == (void*)0)) && (((unsigned char)(l_74 >= (g_75 | l_74)) << (unsigned char)g_75) != (l_76 == (void*)0))) | (*l_76))) + { + int l_77 = 0xC8D67996L; + int *l_89 = &g_69; + step_hash(20); + if ((*l_76)) + { + unsigned l_88 = 0x704422F2L; + int l_94 = 1L; + step_hash(15); + if (((l_77 > ((short)(((unsigned short)(((p_54 != &g_69) > 0x8620L) >= l_77) % (unsigned short)((unsigned char)(((unsigned short)1UL / (unsigned short)((unsigned char)(g_16 & ((l_88 == g_16) < l_77)) + (unsigned char)l_88)) ^ 0UL) / (unsigned char)(-1L))) < 0L) % (short)0x3969L)) >= 246UL)) + { + step_hash(10); + (*l_76) |= ((void*)0 != l_89); + } + else + { + int **l_90 = (void*)0; + int l_93 = 0x59A4365CL; + step_hash(12); + p_54 = &g_69; + step_hash(13); + (*l_89) = ((unsigned char)(*l_89) >> (unsigned char)6); + step_hash(14); + l_94 ^= (g_69 & l_93); + } + } + else + { + int *l_95 = &g_96; + step_hash(17); + (*l_95) &= (*l_89); + step_hash(18); + (*l_76) = (-(int)0xAE665256L); + step_hash(19); + (*l_95) = (*p_54); + } + } + else + { + int l_115 = (-1L); + step_hash(22); + g_96 |= g_69; + step_hash(27); + for (g_69 = 28; (g_69 > 26); g_69--) + { + step_hash(26); + return p_54; + } + step_hash(28); + (*p_54) = (((short)(-(signed char)((signed char)(((g_105 != (void*)0) & ((short)(g_96 ^ (*l_76)) >> (short)1)) != ((signed char)0L - (signed char)((int)(*g_106) - (int)((unsigned short)65531UL >> (unsigned short)11)))) % (signed char)(*l_76))) / (short)1UL) && 6UL); + step_hash(29); + (*l_76) &= l_115; + } + step_hash(31); + (*g_105) = l_76; + step_hash(32); + return l_76; +} +static int * func_55(short p_56, int p_57, int p_58) +{ + int *l_68 = &g_69; + step_hash(4); + (*l_68) = (-1L); + step_hash(5); + return l_68; +} +void csmith_compute_hash(void) +{ + transparent_crc(g_16, "g_16", print_hash_value); + transparent_crc(g_69, "g_69", print_hash_value); + transparent_crc(g_75, "g_75", print_hash_value); + transparent_crc(g_96, "g_96", print_hash_value); + transparent_crc(g_262, "g_262", print_hash_value); + transparent_crc(g_423, "g_423", print_hash_value); + transparent_crc(g_801, "g_801", print_hash_value); +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand39.expect b/src/tests/csmith/rand39.expect new file mode 100644 index 0000000..50dd354 --- /dev/null +++ b/src/tests/csmith/rand39.expect @@ -0,0 +1,80 @@ +...checksum after hashing g_16 : 82F7B075 +...checksum after hashing g_69 : E0B0E4D4 +...checksum after hashing g_75 : 7362AAD7 +...checksum after hashing g_96 : 6853C84C +...checksum after hashing g_262 : 54A0C84D +...checksum after hashing g_423 : 51B6B8C9 +...checksum after hashing g_801 : 6EBE4A85 +before stmt(474): checksum = 6EBE4A85 +...checksum after hashing g_16 : 82F7B075 +...checksum after hashing g_69 : E0B0E4D4 +...checksum after hashing g_75 : 7362AAD7 +...checksum after hashing g_96 : 6853C84C +...checksum after hashing g_262 : 54A0C84D +...checksum after hashing g_423 : 51B6B8C9 +...checksum after hashing g_801 : 6EBE4A85 +before stmt(454): checksum = 6EBE4A85 +...checksum after hashing g_16 : 82F7B075 +...checksum after hashing g_69 : E0B0E4D4 +...checksum after hashing g_75 : 7362AAD7 +...checksum after hashing g_96 : 398A7FF8 +...checksum after hashing g_262 : 4A37E621 +...checksum after hashing g_423 : D69ABA26 +...checksum after hashing g_801 : A9CBB2A8 +before stmt(455): checksum = A9CBB2A8 +...checksum after hashing g_16 : 82F7B075 +...checksum after hashing g_69 : E0B0E4D4 +...checksum after hashing g_75 : 7362AAD7 +...checksum after hashing g_96 : 398A7FF8 +...checksum after hashing g_262 : 4A37E621 +...checksum after hashing g_423 : D69ABA26 +...checksum after hashing g_801 : A9CBB2A8 +before stmt(456): checksum = A9CBB2A8 +...checksum after hashing g_16 : 82F7B075 +...checksum after hashing g_69 : E0B0E4D4 +...checksum after hashing g_75 : 7362AAD7 +...checksum after hashing g_96 : 398A7FF8 +...checksum after hashing g_262 : 4A37E621 +...checksum after hashing g_423 : D69ABA26 +...checksum after hashing g_801 : A9CBB2A8 +before stmt(458): checksum = A9CBB2A8 +...checksum after hashing g_16 : 82F7B075 +...checksum after hashing g_69 : E0B0E4D4 +...checksum after hashing g_75 : 7362AAD7 +...checksum after hashing g_96 : 398A7FF8 +...checksum after hashing g_262 : 4A37E621 +...checksum after hashing g_423 : D69ABA26 +...checksum after hashing g_801 : A9CBB2A8 +before stmt(471): checksum = A9CBB2A8 +...checksum after hashing g_16 : 2144DF1C +...checksum after hashing g_69 : 6522DF69 +...checksum after hashing g_75 : 6AE1A9D6 +...checksum after hashing g_96 : F7B5C58C +...checksum after hashing g_262 : 42A16FA7 +...checksum after hashing g_423 : D98CD660 +...checksum after hashing g_801 : DA5E2F4B +before stmt(472): checksum = DA5E2F4B +...checksum after hashing g_16 : 2144DF1C +...checksum after hashing g_69 : 6522DF69 +...checksum after hashing g_75 : 6AE1A9D6 +...checksum after hashing g_96 : F7B5C58C +...checksum after hashing g_262 : 42A16FA7 +...checksum after hashing g_423 : D98CD660 +...checksum after hashing g_801 : DA5E2F4B +before stmt(473): checksum = DA5E2F4B +...checksum after hashing g_16 : 2144DF1C +...checksum after hashing g_69 : 6522DF69 +...checksum after hashing g_75 : 6AE1A9D6 +...checksum after hashing g_96 : F7B5C58C +...checksum after hashing g_262 : 42A16FA7 +...checksum after hashing g_423 : D98CD660 +...checksum after hashing g_801 : DA5E2F4B +before stmt(475): checksum = DA5E2F4B +...checksum after hashing g_16 : 2144DF1C +...checksum after hashing g_69 : 6522DF69 +...checksum after hashing g_75 : 6AE1A9D6 +...checksum after hashing g_96 : F7B5C58C +...checksum after hashing g_262 : 42A16FA7 +...checksum after hashing g_423 : D98CD660 +...checksum after hashing g_801 : DA5E2F4B +checksum = da5e2f4b diff --git a/src/tests/csmith/rand4.c b/src/tests/csmith/rand4.c new file mode 100644 index 0000000..1f19c2b --- /dev/null +++ b/src/tests/csmith/rand4.c @@ -0,0 +1,88 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static unsigned g_2 = 0x713B9102L; +static unsigned short func_1(void); +static unsigned short func_1(void) +{ + step_hash(1); + return g_2; +} +void csmith_compute_hash(void) +{ + transparent_crc(g_2, "g_2", print_hash_value); +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand4.expect b/src/tests/csmith/rand4.expect new file mode 100644 index 0000000..8f38e09 --- /dev/null +++ b/src/tests/csmith/rand4.expect @@ -0,0 +1,4 @@ +...checksum after hashing g_2 : 6C2C6BC2 +before stmt(1): checksum = 6C2C6BC2 +...checksum after hashing g_2 : 6C2C6BC2 +checksum = 6c2c6bc2 diff --git a/src/tests/csmith/rand40.c b/src/tests/csmith/rand40.c new file mode 100644 index 0000000..7204079 --- /dev/null +++ b/src/tests/csmith/rand40.c @@ -0,0 +1,716 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static int g_2 = 0xAC64A684L; +static int *g_84 = &g_2; +static int **g_83 = &g_84; +static short g_106 = 1L; +static short g_121 = (-1L); +static int g_149 = 0xDBDFE5E7L; +static int g_152 = (-6L); +static unsigned g_153 = 1UL; +static short g_159 = 4L; +static int g_160 = 0xE9BBC179L; +static int g_194 = 0x7ECFBF85L; +static int g_385 = 1L; +static int func_1(void); +static int * func_7(int * p_8, short p_9, int * p_10, int * p_11); +static int * func_13(signed char p_14, int * p_15, int p_16, unsigned p_17); +static int * func_19(signed char p_20, int * p_21, unsigned short p_22); +static int * func_23(int * p_24, unsigned p_25, unsigned short p_26, signed char p_27, int * p_28); +static signed char func_31(int * p_32); +static int * func_33(int * p_34, short p_35, short p_36, unsigned p_37, unsigned p_38); +static int * func_40(unsigned p_41, int p_42, int p_43, signed char p_44); +static unsigned char func_48(int p_49, int p_50); +static unsigned func_55(int p_56, unsigned p_57, int p_58); +static int func_1(void) +{ + unsigned l_18 = 0xB72B21A3L; + int *l_39 = (void*)0; + int l_482 = 1L; + step_hash(5); + for (g_2 = 0; (g_2 >= 23); g_2 += 1) + { + step_hash(4); + return g_2; + } + step_hash(405); + for (g_2 = 16; (g_2 > (-6)); g_2 -= 4) + { + int *l_12 = &g_2; + int **l_473 = (void*)0; + int **l_474 = &l_39; + unsigned short l_483 = 0UL; + } + step_hash(406); + return g_385; +} +static int * func_7(int * p_8, short p_9, int * p_10, int * p_11) +{ + int ***l_459 = (void*)0; + int **l_463 = &g_84; + step_hash(388); + for (p_9 = 0; (p_9 <= (-1)); p_9 -= 5) + { + int ***l_460 = &g_83; + step_hash(385); + (*p_11) &= ((0xEFBCL != p_9) && 0x8FL); + step_hash(386); + (*p_11) = (*p_11); + step_hash(387); + (*p_11) ^= (l_459 != l_460); + } + step_hash(389); + (*l_463) = func_19(((int)(&g_84 == l_463) + (int)(*p_8)), &g_385, (((((void*)0 != l_463) > p_9) != (&g_83 == (void*)0)) && g_153)); + step_hash(395); + for (p_9 = 18; (p_9 <= (-23)); --p_9) + { + int *l_466 = &g_194; + step_hash(393); + (*p_11) = ((((g_106 || p_9) ^ 65535UL) && 0xDDC4F765L) > p_9); + step_hash(394); + (*l_466) = (*p_11); + } + step_hash(396); + return p_10; +} +static int * func_13(signed char p_14, int * p_15, int p_16, unsigned p_17) +{ + int *l_456 = &g_385; + step_hash(380); + return l_456; +} +static int * func_19(signed char p_20, int * p_21, unsigned short p_22) +{ + int *l_455 = &g_194; + step_hash(377); + l_455 = l_455; + step_hash(378); + return &g_2; +} +static int * func_23(int * p_24, unsigned p_25, unsigned short p_26, signed char p_27, int * p_28) +{ + int l_323 = (-1L); + int *l_344 = &g_194; + int ***l_388 = &g_83; + int l_397 = 5L; + int ***l_415 = (void*)0; + int *l_454 = &g_385; + step_hash(324); + if ((p_26 || (((((unsigned char)func_48(l_323, ((short)g_160 * (short)g_194)) >> (unsigned char)6) & g_149) | (g_160 ^ ((signed char)g_160 + (signed char)g_160))) > l_323))) + { + int *l_328 = &g_194; + int ***l_329 = (void*)0; + int ***l_330 = (void*)0; + int l_331 = 6L; + unsigned l_341 = 0x533FD097L; + short l_373 = 0x9551L; + step_hash(237); + (*l_328) &= (*p_24); + step_hash(238); + g_83 = &p_28; + step_hash(297); + if ((*p_28)) + { + unsigned short l_338 = 0UL; + step_hash(240); + (*g_83) = func_33((*g_83), l_331, g_149, (((int)(((int)(((unsigned short)(((((l_338 | (l_323 || ((unsigned short)p_26 + (unsigned short)(l_323 && (*l_328))))) != (((void*)0 == p_28) > g_121)) == p_27) < 0x322C7234L) && l_341) >> (unsigned short)p_27) > 0x7B33L) / (int)l_338) <= p_26) + (int)p_26) > 0UL), g_2); + step_hash(245); + for (l_323 = 6; (l_323 == 4); l_323 -= 1) + { + step_hash(244); + return l_344; + } + step_hash(246); + (*l_344) = (-1L); + step_hash(247); + (*l_344) = (*l_344); + } + else + { + int *l_350 = &g_194; + step_hash(296); + for (g_159 = (-15); (g_159 >= (-23)); --g_159) + { + int ***l_354 = &g_83; + step_hash(289); + for (p_25 = 0; (p_25 != 60); p_25++) + { + int *l_349 = &g_194; + int ***l_357 = &g_83; + int l_362 = 0x00DD4813L; + } + step_hash(295); + if ((*p_24)) + { + int *l_384 = &g_385; + step_hash(291); + (*l_384) &= ((short)(func_48((*g_84), ((!func_31(p_24)) >= (*p_24))) > ((short)p_25 / (short)((((0x83L <= p_26) & (*l_344)) & p_27) && (***l_354)))) * (short)0xDB12L); + step_hash(292); + (**l_354) = l_344; + } + else + { + step_hash(294); + (*l_354) = &p_28; + } + } + } + step_hash(298); + (*l_344) = (*p_24); + } + else + { + int l_405 = 9L; + step_hash(315); + if ((*g_84)) + { + signed char l_400 = 2L; + step_hash(312); + if ((p_25 >= p_27)) + { + int *l_401 = (void*)0; + step_hash(302); + (**l_388) = l_401; + step_hash(307); + for (p_27 = 0; (p_27 > (-2)); --p_27) + { + step_hash(306); + return p_24; + } + step_hash(308); + return (**l_388); + } + else + { + int *l_404 = &g_2; + step_hash(310); + (**l_388) = p_24; + step_hash(311); + (*g_83) = l_404; + } + } + else + { + step_hash(314); + return p_24; + } + step_hash(316); + (*l_344) = l_405; + step_hash(323); + for (g_121 = 12; (g_121 >= 28); ++g_121) + { + int l_408 = (-1L); + int **l_413 = &l_344; + step_hash(320); + l_408 |= (*l_344); + step_hash(321); + l_408 &= ((unsigned short)((~((g_121 && (!p_25)) < 0xD8C2L)) | (((int)(((&g_84 == l_413) <= (((void*)0 == (*g_83)) <= (-(unsigned short)((void*)0 == l_415)))) || 0x3F51L) % (int)l_405) >= g_194)) >> (unsigned short)p_26); + step_hash(322); + return (*g_83); + } + } + step_hash(373); + if ((p_26 != g_2)) + { + step_hash(326); + return p_28; + } + else + { + short l_443 = 0x4421L; + int **l_444 = &l_344; + step_hash(372); + for (p_26 = 4; (p_26 != 49); p_26 += 3) + { + step_hash(348); + for (g_153 = 12; (g_153 > 16); g_153++) + { + step_hash(347); + for (g_121 = 24; (g_121 != (-5)); --g_121) + { + unsigned l_426 = 0x1E380211L; + step_hash(345); + if (((unsigned)(&g_83 == (void*)0) % (unsigned)(*p_28))) + { + int *l_424 = &g_2; + step_hash(338); + (**l_388) = l_424; + step_hash(339); + if ((*g_84)) + break; + } + else + { + int *l_425 = &g_385; + step_hash(341); + (*g_83) = l_425; + step_hash(342); + l_426 ^= (((***l_388) || (*p_28)) > (*g_84)); + step_hash(343); + p_24 = p_28; + step_hash(344); + (*g_83) = (*g_83); + } + step_hash(346); + return p_28; + } + } + step_hash(366); + if ((p_25 == (-4L))) + { + step_hash(350); + return p_28; + } + else + { + unsigned char l_433 = 6UL; + step_hash(359); + for (g_160 = 0; (g_160 < 9); g_160 += 1) + { + short l_429 = 0xDBBFL; + int l_432 = 1L; + step_hash(355); + (*l_344) = l_429; + step_hash(356); + l_432 = ((short)p_25 + (short)(g_149 <= 0x8BL)); + } + step_hash(364); + for (g_159 = (-14); (g_159 <= (-16)); g_159 -= 6) + { + int l_442 = 0x337ED4D8L; + int l_445 = 0x9D4DC154L; + step_hash(363); + l_445 |= (g_153 < (((((void*)0 != &g_83) & (l_442 == ((l_443 && (&p_24 != (*l_388))) | ((l_444 == &p_28) <= g_2)))) | (*l_344)) == (**l_444))); + } + step_hash(365); + (**l_444) &= (((unsigned short)g_121 * (unsigned short)g_149) & p_25); + } + step_hash(371); + for (p_25 = 0; (p_25 <= 12); p_25 += 4) + { + step_hash(370); + return p_28; + } + } + } + step_hash(374); + (*l_344) = ((unsigned char)g_159 << (unsigned char)((signed char)g_153 / (signed char)func_31(p_28))); + step_hash(375); + return l_454; +} +static signed char func_31(int * p_32) +{ + unsigned char l_310 = 0x09L; + int ***l_313 = &g_83; + int l_320 = 4L; + step_hash(233); + l_320 ^= ((signed char)((((signed char)l_310 / (signed char)((signed char)(l_313 == l_313) % (signed char)(***l_313))) & (((((unsigned char)((((~(***l_313)) && ((signed char)func_48(((void*)0 != (*l_313)), ((int)(***l_313) + (int)(***l_313))) >> (signed char)1)) & (***l_313)) == (***l_313)) - (unsigned char)(-7L)) >= 0x0F07L) && (*g_84)) == g_149)) && (***l_313)) + (signed char)g_153); + step_hash(234); + return (***l_313); +} +static int * func_33(int * p_34, short p_35, short p_36, unsigned p_37, unsigned p_38) +{ + short l_47 = 0x38F7L; + step_hash(230); + (*g_83) = func_40((((unsigned char)(g_2 >= l_47) * (unsigned char)func_48(l_47, l_47)) || l_47), func_48((((unsigned short)g_121 >> (unsigned short)1) >= ((unsigned short)l_47 * (unsigned short)l_47)), g_106), l_47, l_47); + step_hash(231); + return p_34; +} +static int * func_40(unsigned p_41, int p_42, int p_43, signed char p_44) +{ + int l_303 = (-1L); + step_hash(228); + for (g_106 = (-12); (g_106 <= (-23)); g_106 -= 9) + { + step_hash(225); + if ((*g_84)) + break; + step_hash(226); + l_303 ^= p_41; + step_hash(227); + (*g_83) = (*g_83); + } + step_hash(229); + return (*g_83); +} +static unsigned char func_48(int p_49, int p_50) +{ + int l_59 = (-1L); + int **l_179 = &g_84; + int *l_181 = &g_2; + int l_235 = 0x7E4DE94CL; + int *l_236 = &l_235; + unsigned l_287 = 0UL; + step_hash(174); + for (p_49 = 0; (p_49 != 16); p_49 += 6) + { + int l_66 = 0xE1552B9CL; + int **l_207 = &g_84; + } + step_hash(175); + (*l_236) &= ((**g_83) != p_49); + step_hash(219); + for (l_235 = 0; (l_235 >= 28); ++l_235) + { + int l_239 = 0xA1477951L; + unsigned l_244 = 4294967295UL; + int ***l_260 = &g_83; + int l_293 = 0xC2EF21BAL; + } + step_hash(220); + return p_49; +} +static unsigned func_55(int p_56, unsigned p_57, int p_58) +{ + unsigned char l_69 = 0x06L; + int l_76 = 0x21817887L; + int **l_105 = &g_84; + unsigned l_158 = 0xBBF80E55L; + int l_178 = (-7L); + step_hash(127); + if (l_69) + { + int **l_70 = (void*)0; + int ***l_71 = &l_70; + step_hash(16); + (*l_71) = l_70; + step_hash(17); + l_76 &= ((unsigned char)((unsigned char)l_69 >> (unsigned char)3) / (unsigned char)p_58); + } + else + { + int *l_78 = &g_2; + int **l_77 = &l_78; + signed char l_99 = (-1L); + int l_101 = 0xB22F2C88L; + step_hash(19); + (*l_77) = &g_2; + step_hash(20); + p_58 = p_56; + step_hash(125); + if (p_58) + { + int *l_79 = (void*)0; + step_hash(22); + l_79 = &l_76; + } + else + { + int l_82 = 0x6066FA41L; + int ***l_100 = &g_83; + unsigned l_146 = 0UL; + step_hash(101); + if (((short)l_82 - (short)((g_2 & (4294967293UL == ((void*)0 != g_83))) >= 9L))) + { + unsigned l_87 = 0x40C50340L; + step_hash(25); + (*g_83) = &p_58; + step_hash(40); + for (p_58 = 0; (p_58 != 3); p_58 += 8) + { + int *l_88 = (void*)0; + int *l_89 = &l_76; + step_hash(37); + if ((g_2 != 1UL)) + { + step_hash(30); + p_56 = l_87; + step_hash(31); + (*l_77) = (void*)0; + step_hash(32); + (*l_77) = &p_56; + step_hash(33); + (**l_77) = 0x86219E20L; + } + else + { + step_hash(35); + (*g_83) = (void*)0; + step_hash(36); + if (p_56) + continue; + } + step_hash(38); + (*l_89) |= (l_88 != (*g_83)); + step_hash(39); + (*l_89) = l_82; + } + } + else + { + unsigned short l_96 = 65526UL; + int **l_104 = &l_78; + int l_124 = 0L; + unsigned l_128 = 0x38C19694L; + step_hash(77); + if ((p_56 ^ (((signed char)(((&g_83 == &g_83) && (p_56 > ((void*)0 == &g_83))) != p_58) % (signed char)0xE7L) >= ((((unsigned char)l_82 >> (unsigned char)p_58) == l_96) & g_2)))) + { + step_hash(43); + (*g_83) = (*g_83); + step_hash(50); + for (p_57 = 7; (p_57 >= 33); p_57 += 6) + { + step_hash(47); + if ((**g_83)) + break; + step_hash(48); + (*g_83) = (*g_83); + step_hash(49); + l_99 = (*g_84); + } + } + else + { + step_hash(60); + if ((l_100 != (void*)0)) + { + int *l_102 = &l_101; + step_hash(53); + l_101 = (&g_84 == (*l_100)); + step_hash(54); + p_58 = (**g_83); + step_hash(55); + (*l_102) ^= p_56; + } + else + { + step_hash(57); + (*g_83) = (*l_77); + step_hash(58); + (*g_83) = &p_58; + step_hash(59); + (**l_100) = (*g_83); + } + step_hash(61); + g_106 &= (-(int)(l_104 == l_105)); + step_hash(68); + for (p_57 = 0; (p_57 == 58); p_57 += 2) + { + int *l_111 = (void*)0; + int *l_112 = &l_82; + step_hash(65); + (*l_112) |= ((unsigned)p_56 % (unsigned)(**g_83)); + step_hash(66); + (*l_77) = &p_56; + step_hash(67); + return p_58; + } + step_hash(76); + if (((((unsigned char)p_57 * (unsigned char)((unsigned char)g_2 << (unsigned char)((**l_104) ^ p_56))) || ((+((unsigned char)p_57 / (unsigned char)(+p_57))) > ((unsigned char)p_57 + (unsigned char)p_57))) <= (&g_84 != (void*)0))) + { + step_hash(70); + g_121 |= (*g_84); + } + else + { + step_hash(72); + (*l_104) = (void*)0; + step_hash(73); + (**l_100) = (*g_83); + step_hash(74); + (*l_77) = (void*)0; + step_hash(75); + p_58 = 0x6C9F35CDL; + } + } + step_hash(78); + p_56 = ((p_58 != ((**l_105) ^ ((p_56 != 4294967295UL) <= (((((-1L) & ((unsigned char)(***l_100) + (unsigned char)1UL)) == p_57) <= g_2) < l_124)))) == p_56); + step_hash(99); + if (p_56) + { + signed char l_138 = 0x6EL; + int *l_154 = (void*)0; + int *l_155 = &l_76; + step_hash(88); + if ((**g_83)) + { + int *l_125 = &l_82; + step_hash(81); + (*l_125) = (***l_100); + step_hash(82); + p_56 |= (!(((short)(l_128 != (&l_125 == l_105)) + (short)0xCA51L) != g_121)); + step_hash(83); + (*l_105) = (*g_83); + } + else + { + unsigned char l_133 = 249UL; + int *l_141 = &l_82; + step_hash(85); + (*l_141) = (g_121 <= (((unsigned short)g_2 * (unsigned short)g_2) > (g_121 <= ((((unsigned short)(***l_100) + (unsigned short)l_133) || ((signed char)((short)l_138 >> (short)(((((short)p_56 % (short)(p_57 || (**l_105))) == p_56) || 3UL) <= 0xE9E5L)) * (signed char)0xE4L)) >= 0xC0L)))); + step_hash(86); + (*l_141) = ((*g_83) != (void*)0); + step_hash(87); + return p_56; + } + step_hash(89); + p_58 = ((unsigned char)p_56 << (unsigned char)(~((unsigned short)((l_146 >= p_56) | ((unsigned char)g_121 >> (unsigned char)6)) * (unsigned short)g_149))); + step_hash(95); + for (l_99 = 0; (l_99 <= (-14)); l_99 -= 2) + { + step_hash(93); + g_152 = (**g_83); + step_hash(94); + g_153 = p_57; + } + step_hash(96); + (*l_155) |= p_58; + } + else + { + step_hash(98); + (*l_77) = (**l_100); + } + step_hash(100); + (*l_105) = (*l_105); + } + step_hash(102); + g_159 &= ((-7L) | (l_76 && (((g_152 && ((unsigned)(0xFAL | g_149) - (unsigned)(&g_84 == l_105))) & (0L == ((p_56 | g_152) | l_158))) == 0xE0F15406L))); + step_hash(123); + if ((g_153 < 0xBFC5L)) + { + int *l_161 = &l_76; + step_hash(104); + (*l_161) = g_160; + step_hash(120); + if (p_56) + { + unsigned l_162 = 0xD81DF02EL; + int **l_166 = &g_84; + step_hash(114); + if (l_162) + { + unsigned l_163 = 0xB9073E8DL; + step_hash(107); + l_163 = (g_2 < (g_149 <= 0x376BL)); + step_hash(108); + p_58 = 0x74B8878BL; + step_hash(109); + (*l_161) &= l_162; + } + else + { + step_hash(111); + (**l_100) = (void*)0; + step_hash(112); + l_76 |= ((p_58 & (&l_77 == &g_83)) ^ (g_149 < p_56)); + step_hash(113); + return g_121; + } + step_hash(115); + (*l_161) = 1L; + step_hash(116); + (*l_161) = ((short)((void*)0 == l_166) / (short)g_160); + } + else + { + step_hash(118); + (*l_77) = (void*)0; + step_hash(119); + p_56 = ((unsigned)g_159 + (unsigned)(g_149 > 0UL)); + } + } + else + { + step_hash(122); + return g_2; + } + step_hash(124); + p_58 = ((unsigned char)251UL * (unsigned char)(g_160 ^ p_57)); + } + step_hash(126); + (*g_83) = (*g_83); + } + step_hash(128); + l_178 |= (l_158 >= (((int)((short)(-1L) - (short)0xC43AL) % (int)(((p_56 | (p_57 || ((!((unsigned char)(l_105 != l_105) / (unsigned char)p_58)) & (-(unsigned)g_160)))) <= 0xC57F21A0L) & g_106)) | l_76)); + step_hash(129); + return g_2; +} +void csmith_compute_hash(void) +{ + transparent_crc(g_2, "g_2", print_hash_value); + transparent_crc(g_106, "g_106", print_hash_value); + transparent_crc(g_121, "g_121", print_hash_value); + transparent_crc(g_149, "g_149", print_hash_value); + transparent_crc(g_152, "g_152", print_hash_value); + transparent_crc(g_153, "g_153", print_hash_value); + transparent_crc(g_159, "g_159", print_hash_value); + transparent_crc(g_160, "g_160", print_hash_value); + transparent_crc(g_194, "g_194", print_hash_value); + transparent_crc(g_385, "g_385", print_hash_value); +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand40.expect b/src/tests/csmith/rand40.expect new file mode 100644 index 0000000..9985289 --- /dev/null +++ b/src/tests/csmith/rand40.expect @@ -0,0 +1,44 @@ +...checksum after hashing g_2 : 407B9EC2 +...checksum after hashing g_106 : 826EAA3 +...checksum after hashing g_121 : C9511774 +...checksum after hashing g_149 : 6E48F265 +...checksum after hashing g_152 : E0332610 +...checksum after hashing g_153 : A14052FC +...checksum after hashing g_159 : 5C06C7F1 +...checksum after hashing g_160 : E744AA8C +...checksum after hashing g_194 : 17059B6D +...checksum after hashing g_385 : 5F56B134 +before stmt(5): checksum = 5F56B134 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_106 : DD9EB80C +...checksum after hashing g_121 : 69C4E612 +...checksum after hashing g_149 : 1EE39EEA +...checksum after hashing g_152 : 932A627 +...checksum after hashing g_153 : ED44E2F9 +...checksum after hashing g_159 : B580016C +...checksum after hashing g_160 : 89431C16 +...checksum after hashing g_194 : E160C297 +...checksum after hashing g_385 : 99B49A03 +before stmt(405): checksum = 99B49A03 +...checksum after hashing g_2 : 6228C746 +...checksum after hashing g_106 : 4D869183 +...checksum after hashing g_121 : 9976360D +...checksum after hashing g_149 : F05ED235 +...checksum after hashing g_152 : 185C64C6 +...checksum after hashing g_153 : 8062E051 +...checksum after hashing g_159 : CE067A29 +...checksum after hashing g_160 : D723A4D1 +...checksum after hashing g_194 : 2899ACD4 +...checksum after hashing g_385 : 759AAB1A +before stmt(406): checksum = 759AAB1A +...checksum after hashing g_2 : 6228C746 +...checksum after hashing g_106 : 4D869183 +...checksum after hashing g_121 : 9976360D +...checksum after hashing g_149 : F05ED235 +...checksum after hashing g_152 : 185C64C6 +...checksum after hashing g_153 : 8062E051 +...checksum after hashing g_159 : CE067A29 +...checksum after hashing g_160 : D723A4D1 +...checksum after hashing g_194 : 2899ACD4 +...checksum after hashing g_385 : 759AAB1A +checksum = 759aab1a diff --git a/src/tests/csmith/rand41.c b/src/tests/csmith/rand41.c new file mode 100644 index 0000000..ec8febc --- /dev/null +++ b/src/tests/csmith/rand41.c @@ -0,0 +1,488 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static int g_2 = 0x02E91A04L; +static int g_39 = 0x11D7FEAEL; +static int g_101 = 0x93E9FC65L; +static int g_103 = 2L; +static int *g_111 = &g_103; +static unsigned g_123 = 1UL; +static unsigned short g_124 = 1UL; +static int g_147 = 0xD83CB06CL; +static int **g_225 = &g_111; +static int ***g_224 = &g_225; +static short g_346 = 0x9234L; +static signed char g_408 = (-3L); +static signed char func_1(void); +static int func_5(signed char p_6); +static signed char func_7(short p_8, unsigned p_9, short p_10, short p_11, unsigned p_12); +static unsigned short func_18(int p_19, unsigned p_20, short p_21); +static unsigned short func_22(unsigned char p_23, unsigned p_24, signed char p_25, unsigned short p_26, int p_27); +static unsigned func_28(unsigned char p_29, int p_30, unsigned char p_31, int p_32, int p_33); +static signed char func_50(int * p_51, unsigned p_52, int * p_53); +static int * func_54(short p_55, int p_56, signed char p_57); +static short func_58(unsigned p_59, int * p_60, int * p_61, signed char p_62, signed char p_63); +static int * func_64(int * p_65, int * p_66); +static signed char func_1(void) +{ + int l_13 = 1L; + unsigned l_15 = 0x1B68DEE2L; + short l_495 = 0x97BDL; + step_hash(339); + for (g_2 = 0; (g_2 > 17); g_2 += 8) + { + signed char l_14 = 0x5BL; + int *l_494 = &g_101; + } + step_hash(340); + (**g_224) = (**g_224); + step_hash(341); + (***g_224) = l_495; + step_hash(342); + (**g_224) = (void*)0; + step_hash(343); + return g_103; +} +static int func_5(signed char p_6) +{ + unsigned short l_189 = 0x205CL; + int *l_194 = &g_147; + unsigned char l_235 = 2UL; + int l_313 = 0L; + int l_337 = (-5L); + unsigned char l_347 = 251UL; + signed char l_365 = 0L; + unsigned short l_426 = 0x50D2L; + step_hash(160); + if (((l_189 | ((unsigned short)g_39 - (unsigned short)(((short)p_6 * (short)p_6) >= l_189))) == (l_189 <= ((l_189 >= 0xDEL) < ((l_194 == (void*)0) < p_6))))) + { + int *l_201 = &g_101; + int ***l_202 = (void*)0; + step_hash(131); + for (l_189 = 5; (l_189 != 37); l_189++) + { + int **l_204 = &l_194; + int ***l_203 = &l_204; + } + step_hash(132); + (*l_201) &= (l_201 == (void*)0); + step_hash(133); + (*l_194) |= (g_39 || (p_6 != (*l_201))); + step_hash(139); + for (g_101 = 0; (g_101 != 11); ++g_101) + { + unsigned l_207 = 0xD011C8EEL; + step_hash(137); + if (p_6) + break; + step_hash(138); + return l_207; + } + } + else + { + unsigned char l_219 = 3UL; + short l_230 = 0x0EF9L; + step_hash(141); + (*g_111) = 0xBCE4B171L; + step_hash(158); + for (g_123 = 0; (g_123 == 37); g_123++) + { + short l_210 = 0x1FFEL; + int **l_223 = &l_194; + int ***l_222 = &l_223; + step_hash(145); + (*g_111) &= l_210; + step_hash(146); + (*g_111) = (*g_111); + } + step_hash(159); + return l_219; + } + step_hash(161); + (*l_194) = (0xDD79L != l_235); + step_hash(220); + if (func_28(((short)((short)((*g_111) & (((((short)(*l_194) * (short)p_6) || ((p_6 ^ ((signed char)(((short)(&l_194 == (void*)0) + (short)(0xC7DE1C95L ^ (p_6 < (0x37L & p_6)))) & p_6) << (signed char)4)) | p_6)) < 0xAA28L) == g_2)) << (short)7) + (short)p_6), g_123, (*l_194), (***g_224), (*l_194))) + { + signed char l_256 = 0x00L; + unsigned l_274 = 0xEE7E9482L; + int *l_278 = &g_2; + step_hash(163); + (*g_225) = (*g_225); + step_hash(170); + for (g_124 = (-2); (g_124 == 43); ++g_124) + { + unsigned short l_261 = 0x6382L; + int *l_262 = &g_101; + int ***l_263 = &g_225; + step_hash(167); + l_262 = func_54(((int)(func_18((**g_225), ((unsigned short)0UL >> (unsigned short)4), ((signed char)(l_256 && ((signed char)(*l_194) >> (signed char)0)) + (signed char)g_2)) >= p_6) + (int)p_6), ((signed char)p_6 / (signed char)l_261), p_6); + step_hash(168); + (*l_262) |= 0xEE1ACB92L; + step_hash(169); + (*l_262) ^= ((void*)0 != l_263); + } + step_hash(212); + for (l_189 = 11; (l_189 != 2); l_189 -= 5) + { + int l_270 = 0L; + int *l_271 = (void*)0; + } + step_hash(217); + for (l_337 = 9; (l_337 != 25); l_337++) + { + step_hash(216); + (*g_225) = l_278; + } + } + else + { + step_hash(219); + return (***g_224); + } + step_hash(336); + for (g_101 = 0; (g_101 == (-26)); g_101--) + { + int *l_351 = &g_103; + int ***l_382 = (void*)0; + int l_399 = 0x55EF8A00L; + int **l_428 = &l_194; + unsigned l_453 = 0x6CB1C423L; + unsigned char l_465 = 255UL; + int l_486 = 0x4206CAF5L; + } + step_hash(337); + return (*l_194); +} +static signed char func_7(short p_8, unsigned p_9, short p_10, short p_11, unsigned p_12) +{ + step_hash(122); + for (p_8 = 7; (p_8 == (-25)); p_8 -= 9) + { + int **l_186 = &g_111; + step_hash(115); + (*l_186) = func_54(g_103, p_12, g_2); + step_hash(121); + for (p_9 = 0; (p_9 < 22); p_9++) + { + step_hash(119); + (**l_186) &= ((-2L) | 0x4936DCCDL); + step_hash(120); + (*l_186) = (*l_186); + } + } + step_hash(123); + return p_12; +} +static unsigned short func_18(int p_19, unsigned p_20, short p_21) +{ + unsigned l_171 = 4294967295UL; + int *l_176 = &g_39; + step_hash(64); + (*g_111) = p_20; + step_hash(109); + for (g_147 = 0; (g_147 < 18); g_147 += 2) + { + int **l_151 = &g_111; + int ***l_152 = &l_151; + step_hash(68); + (*l_152) = l_151; + step_hash(69); + (**l_151) = ((unsigned short)0x4B0DL << (unsigned short)10); + step_hash(108); + for (g_103 = 16; (g_103 == (-16)); g_103 -= 3) + { + int ***l_166 = &l_151; + step_hash(77); + for (p_19 = 0; (p_19 > 27); p_19 += 1) + { + step_hash(76); + return g_39; + } + step_hash(82); + for (p_20 = 0; (p_20 >= 42); p_20 += 7) + { + step_hash(81); + return (***l_152); + } + step_hash(107); + for (p_21 = 0; (p_21 < 2); p_21 += 5) + { + int *l_175 = &g_103; + int *l_183 = &g_101; + step_hash(96); + if ((*g_111)) + { + int *l_168 = (void*)0; + step_hash(92); + for (p_19 = 0; (p_19 != 8); ++p_19) + { + int *l_165 = &g_101; + int ***l_167 = &l_151; + step_hash(90); + (*l_165) = 0x18C20207L; + step_hash(91); + (*l_165) = (l_166 == l_167); + } + step_hash(93); + p_19 = p_21; + } + else + { + step_hash(95); + (*l_151) = (**l_152); + } + step_hash(104); + if (((g_103 >= ((((unsigned)((void*)0 == &g_111) + (unsigned)0xBE10E358L) != (((***l_166) >= g_101) | g_147)) > (l_171 != ((signed char)g_103 - (signed char)0x6CL)))) != l_171)) + { + int *l_174 = (void*)0; + step_hash(98); + (**l_152) = &p_19; + step_hash(99); + (**l_166) = (**l_152); + step_hash(100); + (**l_152) = l_174; + step_hash(101); + (*l_151) = l_175; + } + else + { + step_hash(103); + if ((*g_111)) + break; + } + step_hash(105); + l_176 = func_54(p_21, ((((0x6493B66AL && p_19) > (*l_175)) && ((l_171 | p_20) >= (((void*)0 == l_166) && g_39))) >= l_171), p_19); + step_hash(106); + (*l_183) &= (255UL || (p_19 | ((int)((short)(g_2 >= ((signed char)(**l_151) - (signed char)0xC1L)) + (short)p_20) + (int)(1L < (***l_166))))); + } + } + } + step_hash(110); + return p_21; +} +static unsigned short func_22(unsigned char p_23, unsigned p_24, signed char p_25, unsigned short p_26, int p_27) +{ + signed char l_143 = 0x1BL; + int *l_146 = &g_147; + int **l_148 = &l_146; + step_hash(60); + (*l_146) &= ((unsigned char)func_28(p_24, l_143, l_143, l_143, (((((((unsigned short)g_39 / (unsigned short)p_24) == l_143) != (l_143 != p_27)) && p_23) || 4UL) || p_27)) + (unsigned char)g_2); + step_hash(61); + (*l_148) = l_146; + step_hash(62); + return (*l_146); +} +static unsigned func_28(unsigned char p_29, int p_30, unsigned char p_31, int p_32, int p_33) +{ + int *l_36 = (void*)0; + int *l_37 = (void*)0; + int *l_38 = &g_39; + int l_130 = 0L; + int l_135 = 0x0093E2C0L; + int l_138 = (-4L); + int *l_140 = &l_135; + step_hash(5); + (*l_38) &= ((unsigned short)p_31 << (unsigned short)9); + step_hash(55); + for (p_31 = (-1); (p_31 >= 19); p_31 += 9) + { + int *l_67 = (void*)0; + int *l_139 = &g_101; + step_hash(46); + for (p_29 = 0; (p_29 != 59); p_29 += 1) + { + int *l_77 = &g_2; + step_hash(45); + (*l_38) = ((short)0x2D50L >> (short)((signed char)((unsigned char)(func_50(func_54(func_58(p_33, func_64(&g_2, l_67), l_77, g_2, (((unsigned)((unsigned short)(&g_2 != (void*)0) << (unsigned short)(*l_77)) % (unsigned)p_30) && p_31)), p_29, (*l_77)), g_2, &g_2) ^ g_2) + (unsigned char)0UL) << (signed char)g_2)); + } + step_hash(53); + for (g_124 = 0; (g_124 > 30); g_124++) + { + unsigned l_127 = 0x45EF5D7AL; + step_hash(50); + g_101 &= (*g_111); + step_hash(51); + p_32 ^= (l_127 && (l_127 ^ ((int)l_130 % (int)3L))); + step_hash(52); + (*l_38) = 1L; + } + step_hash(54); + (*l_139) ^= (((((int)((short)(*l_38) >> (short)15) - (int)((g_39 | l_135) > ((unsigned)l_138 + (unsigned)(l_67 == &g_39)))) > ((*g_111) | p_33)) | p_31) < p_32); + } + step_hash(56); + (*g_111) = (*g_111); + step_hash(57); + (*l_140) ^= (*g_111); + step_hash(58); + return p_32; +} +static signed char func_50(int * p_51, unsigned p_52, int * p_53) +{ + int *l_110 = &g_39; + unsigned l_122 = 5UL; + step_hash(40); + g_111 = func_54((l_110 == &g_39), g_39, (*l_110)); + step_hash(41); + g_123 |= ((int)(&g_111 == (void*)0) + (int)((unsigned short)(((*l_110) ^ (0x7FL || ((((g_101 >= ((unsigned short)(((*p_51) > g_39) < ((((unsigned short)((signed char)0x4EL + (signed char)(&l_110 == (void*)0)) + (unsigned short)(*l_110)) >= (*l_110)) ^ (*l_110))) >> (unsigned short)9)) <= g_103) ^ 0L) != g_101))) ^ (*l_110)) + (unsigned short)l_122)); + step_hash(42); + (*g_111) &= 0xE1F03B47L; + step_hash(43); + g_124 = (-9L); + step_hash(44); + return g_39; +} +static int * func_54(short p_55, int p_56, signed char p_57) +{ + short l_108 = (-8L); + int *l_109 = &g_39; + step_hash(37); + (*l_109) &= (l_108 ^ l_108); + step_hash(38); + return l_109; +} +static short func_58(unsigned p_59, int * p_60, int * p_61, signed char p_62, signed char p_63) +{ + signed char l_82 = 0x17L; + int *l_87 = &g_39; + int *l_92 = &g_39; + step_hash(21); + if (((l_82 && 0x5C02AC6AL) | (((signed char)0xA3L * (signed char)((*p_60) ^ (((unsigned char)(65535UL || (l_87 == (void*)0)) >> (unsigned char)((((unsigned short)p_62 >> (unsigned short)((unsigned short)(0xFD00L < 0xDF93L) >> (unsigned short)5)) != g_39) <= p_62)) ^ g_2))) | (*l_87)))) + { + int **l_93 = &l_87; + step_hash(18); + (*l_93) = l_92; + } + else + { + int *l_94 = &g_2; + int **l_95 = &l_94; + step_hash(20); + (*l_95) = func_64(func_64(&g_39, l_92), l_94); + } + step_hash(34); + if (((*p_61) && ((short)g_39 / (short)p_63))) + { + int *l_104 = &g_103; + step_hash(28); + for (g_39 = 0; (g_39 != (-14)); g_39--) + { + int *l_100 = &g_101; + int *l_102 = &g_103; + step_hash(26); + (*l_100) = (*p_61); + step_hash(27); + (*l_102) &= ((*l_100) < (*p_61)); + } + step_hash(29); + (*l_104) &= g_39; + step_hash(30); + (*l_104) &= ((signed char)g_101 + (signed char)(*l_92)); + } + else + { + int **l_107 = &l_92; + step_hash(32); + (*l_107) = func_64(&g_101, &g_39); + step_hash(33); + return g_39; + } + step_hash(35); + return (*l_87); +} +static int * func_64(int * p_65, int * p_66) +{ + int *l_70 = &g_39; + step_hash(13); + g_39 = ((short)((void*)0 == l_70) + (short)((unsigned short)g_2 + (unsigned short)((short)(((short)(*l_70) % (short)0x4AEDL) > ((*l_70) != 1UL)) * (short)(*l_70)))); + step_hash(14); + (*l_70) = 0x8DB06862L; + step_hash(15); + return l_70; +} +void csmith_compute_hash(void) +{ + transparent_crc(g_2, "g_2", print_hash_value); + transparent_crc(g_39, "g_39", print_hash_value); + transparent_crc(g_101, "g_101", print_hash_value); + transparent_crc(g_103, "g_103", print_hash_value); + transparent_crc(g_123, "g_123", print_hash_value); + transparent_crc(g_124, "g_124", print_hash_value); + transparent_crc(g_147, "g_147", print_hash_value); + transparent_crc(g_346, "g_346", print_hash_value); + transparent_crc(g_408, "g_408", print_hash_value); +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand41.expect b/src/tests/csmith/rand41.expect new file mode 100644 index 0000000..6f2aa9a --- /dev/null +++ b/src/tests/csmith/rand41.expect @@ -0,0 +1,60 @@ +...checksum after hashing g_2 : DE254764 +...checksum after hashing g_39 : DF6A48FF +...checksum after hashing g_101 : 5E2A4E23 +...checksum after hashing g_103 : A0760756 +...checksum after hashing g_123 : DD62831A +...checksum after hashing g_124 : EA860D17 +...checksum after hashing g_147 : 86018270 +...checksum after hashing g_346 : 8AF2B6AD +...checksum after hashing g_408 : C39D0F +before stmt(339): checksum = C39D0F +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_39 : D3059CAF +...checksum after hashing g_101 : F474E72E +...checksum after hashing g_103 : 968E8348 +...checksum after hashing g_123 : 9847EEC6 +...checksum after hashing g_124 : 284E36BD +...checksum after hashing g_147 : FAA08FBA +...checksum after hashing g_346 : 75759B23 +...checksum after hashing g_408 : 641068B5 +before stmt(340): checksum = 641068B5 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_39 : D3059CAF +...checksum after hashing g_101 : F474E72E +...checksum after hashing g_103 : 968E8348 +...checksum after hashing g_123 : 9847EEC6 +...checksum after hashing g_124 : 284E36BD +...checksum after hashing g_147 : FAA08FBA +...checksum after hashing g_346 : 75759B23 +...checksum after hashing g_408 : 641068B5 +before stmt(341): checksum = 641068B5 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_39 : D3059CAF +...checksum after hashing g_101 : F474E72E +...checksum after hashing g_103 : 95E5610E +...checksum after hashing g_123 : 935E0E3F +...checksum after hashing g_124 : 7610CFA0 +...checksum after hashing g_147 : 4A2D448E +...checksum after hashing g_346 : D28AD8FE +...checksum after hashing g_408 : 1964F151 +before stmt(342): checksum = 1964F151 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_39 : D3059CAF +...checksum after hashing g_101 : F474E72E +...checksum after hashing g_103 : 95E5610E +...checksum after hashing g_123 : 935E0E3F +...checksum after hashing g_124 : 7610CFA0 +...checksum after hashing g_147 : 4A2D448E +...checksum after hashing g_346 : D28AD8FE +...checksum after hashing g_408 : 1964F151 +before stmt(343): checksum = 1964F151 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_39 : D3059CAF +...checksum after hashing g_101 : F474E72E +...checksum after hashing g_103 : 95E5610E +...checksum after hashing g_123 : 935E0E3F +...checksum after hashing g_124 : 7610CFA0 +...checksum after hashing g_147 : 4A2D448E +...checksum after hashing g_346 : D28AD8FE +...checksum after hashing g_408 : 1964F151 +checksum = 1964f151 diff --git a/src/tests/csmith/rand42.c b/src/tests/csmith/rand42.c new file mode 100644 index 0000000..f24ce13 --- /dev/null +++ b/src/tests/csmith/rand42.c @@ -0,0 +1,1086 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static int g_2 = 0x31713B91L; +static int g_70 = 0L; +static int g_114 = (-3L); +static short g_127 = 0x8F01L; +static int *g_190 = &g_70; +static int **g_189 = &g_190; +static short g_222 = 1L; +static short g_236 = 0x5D6AL; +static int g_255 = 0x459854DCL; +static int g_324 = 1L; +static int g_423 = 0x1AE0DA59L; +static int g_523 = 0xE8411E5FL; +static int g_611 = 0xA96E05F3L; +static int func_1(void); +static unsigned short func_8(unsigned p_9, unsigned p_10); +static int func_15(int p_16, unsigned p_17, short p_18); +static int * func_19(short p_20); +static short func_21(unsigned p_22, int * p_23, int * p_24, int * p_25); +static int * func_27(int * p_28, int * p_29, unsigned short p_30); +static int * func_32(unsigned p_33, int p_34); +static short func_37(unsigned p_38, unsigned short p_39); +static short func_42(int * p_43, int * p_44, int * p_45, short p_46); +static int * func_47(int * p_48, signed char p_49, int p_50, int * p_51, unsigned p_52); +static int func_1(void) +{ + unsigned short l_5 = 65533UL; + int l_696 = 0L; + step_hash(446); + for (g_2 = 24; (g_2 != 2); --g_2) + { + int ***l_695 = (void*)0; + int l_697 = 0x70686054L; + int *l_701 = &g_70; + } + step_hash(447); + return (**g_189); +} +static unsigned short func_8(unsigned p_9, unsigned p_10) +{ + int *l_698 = &g_70; + step_hash(440); + (*l_698) &= 1L; + step_hash(441); + (*l_698) = p_10; + step_hash(442); + g_255 |= ((unsigned char)func_37(g_423, (*l_698)) + (unsigned char)(g_127 < (l_698 != (void*)0))); + step_hash(443); + (*g_189) = (void*)0; + step_hash(444); + return (*l_698); +} +static int func_15(int p_16, unsigned p_17, short p_18) +{ + int l_26 = 0x6A056EBFL; + int *l_31 = &l_26; + int **l_692 = &l_31; + step_hash(437); + (*l_692) = func_19(func_21(l_26, func_27(l_31, func_32((p_18 & ((((((short)func_37(p_18, p_18) * (short)(func_42(&l_26, &l_26, func_47(&l_26, (*l_31), g_2, &g_2, g_2), p_18) >= g_2)) & 0x3EBFL) >= p_16) == p_16) || 0xC5L)), p_18), g_324), &l_26, &l_26)); + step_hash(438); + return (*l_31); +} +static int * func_19(short p_20) +{ + int *l_539 = &g_523; + int **l_540 = (void*)0; + short l_560 = 0xD87FL; + int *l_610 = &g_255; + unsigned l_644 = 4294967295UL; + signed char l_649 = 0xCDL; + short l_671 = 1L; + int *l_688 = (void*)0; + int *l_691 = &g_70; + step_hash(434); + if ((-(unsigned short)((short)0xC308L << (short)3))) + { + unsigned l_502 = 0x615C0B61L; + int l_536 = 0x11A5F4C0L; + int **l_558 = &l_539; + unsigned l_643 = 0x835232A8L; + step_hash(362); + if (l_502) + { + int l_505 = 1L; + step_hash(293); + for (g_70 = 0; (g_70 < (-30)); g_70--) + { + int *l_527 = &g_2; + step_hash(279); + if (p_20) + { + int *l_522 = &g_523; + step_hash(274); + if (l_505) + break; + step_hash(275); + (*l_522) &= func_37(((short)((unsigned)(((unsigned short)func_37(g_2, func_37(((unsigned char)func_37((((unsigned char)((short)g_2 * (short)((unsigned)g_324 % (unsigned)(~((int)((void*)0 != &g_189) / (int)p_20)))) / (unsigned char)g_70) < ((&l_505 == (void*)0) > l_502)), p_20) << (unsigned char)3), g_255)) << (unsigned short)0) == 0x12F58740L) - (unsigned)p_20) % (short)p_20), l_505); + step_hash(276); + if (p_20) + continue; + } + else + { + int *l_524 = &g_2; + step_hash(278); + (*g_189) = l_524; + } + step_hash(285); + for (g_127 = 0; (g_127 < (-1)); g_127 -= 2) + { + step_hash(283); + l_505 |= (((void*)0 == l_527) <= p_20); + step_hash(284); + l_536 &= ((unsigned char)((signed char)g_255 << (signed char)(func_37(g_127, g_222) | ((g_2 == 0xD3FC8E0EL) == ((((int)(p_20 == ((unsigned char)p_20 + (unsigned char)g_127)) - (int)0xB468D8FBL) <= 0UL) || g_2)))) * (unsigned char)0x57L); + } + step_hash(291); + for (g_236 = 0; (g_236 >= (-1)); g_236--) + { + step_hash(289); + (*g_189) = l_539; + step_hash(290); + (**g_189) |= (*l_527); + } + step_hash(292); + if (p_20) + continue; + } + } + else + { + signed char l_575 = 1L; + int *l_578 = &l_536; + int *l_603 = &g_255; + step_hash(334); + if ((!(l_536 == g_222))) + { + signed char l_550 = 0x00L; + step_hash(296); + (*l_539) |= (l_540 == &g_190); + step_hash(320); + if (((int)((((8L < 0x8551E7B2L) && g_523) != l_502) & func_37(g_70, g_2)) - (int)p_20)) + { + short l_551 = 0x9E22L; + step_hash(302); + for (g_222 = 0; (g_222 == 8); g_222++) + { + unsigned char l_545 = 0x6FL; + step_hash(301); + if (l_545) + break; + } + step_hash(307); + for (g_255 = 0; (g_255 == (-5)); g_255--) + { + step_hash(306); + g_189 = &g_190; + } + step_hash(308); + (*l_539) |= p_20; + step_hash(309); + l_551 ^= ((signed char)l_550 << (signed char)1); + } + else + { + unsigned char l_553 = 0xCFL; + int *l_561 = &l_536; + step_hash(318); + if (l_536) + { + int **l_552 = &l_539; + step_hash(312); + (**l_552) |= (l_552 != &g_190); + step_hash(313); + (*g_189) = &g_255; + step_hash(314); + (**g_189) &= 0x172036FAL; + step_hash(315); + (*l_552) = (*g_189); + } + else + { + int *l_559 = &g_523; + step_hash(317); + l_561 = func_47(func_47(&l_536, (l_553 != (+g_324)), ((short)(g_255 < ((short)0x5ED9L / (short)func_37((p_20 && (l_558 != l_558)), (**l_558)))) >> (short)2), l_559, g_324), p_20, l_560, (*l_558), p_20); + } + step_hash(319); + (*l_558) = l_561; + } + } + else + { + unsigned l_567 = 0xA64CBDEEL; + int *l_579 = &l_536; + step_hash(326); + for (g_114 = 17; (g_114 == (-21)); --g_114) + { + unsigned l_566 = 0xEEEE2712L; + int *l_574 = (void*)0; + step_hash(325); + l_575 = ((((int)(p_20 > (((0x44B3BA55L | (0UL & (l_566 == l_567))) & g_236) != (-3L))) - (int)0x4A0DFCC9L) && 0xEAL) & p_20); + } + step_hash(331); + for (g_70 = 15; (g_70 != (-14)); g_70 -= 2) + { + step_hash(330); + return &g_255; + } + step_hash(332); + (*l_558) = l_579; + step_hash(333); + (*l_539) |= ((unsigned char)0UL % (unsigned char)p_20); + } + step_hash(356); + for (g_423 = 6; (g_423 < 19); g_423 += 7) + { + int *l_591 = &g_523; + step_hash(348); + for (l_536 = 13; (l_536 <= (-23)); l_536 -= 2) + { + int *l_602 = (void*)0; + step_hash(346); + if (func_37((&g_190 == &g_190), p_20)) + { + int l_588 = 0x53571585L; + step_hash(342); + l_588 = ((unsigned char)((1UL == (p_20 == func_37(g_222, (l_588 ^ l_588)))) || (((unsigned char)2UL / (unsigned char)(+p_20)) <= g_114)) << (unsigned char)7); + step_hash(343); + l_578 = l_602; + } + else + { + step_hash(345); + (*l_558) = l_603; + } + step_hash(347); + if (p_20) + break; + } + } + step_hash(361); + for (p_20 = 0; (p_20 == 6); ++p_20) + { + step_hash(360); + (*l_610) = (**l_558); + } + } + step_hash(397); + for (p_20 = (-18); (p_20 <= (-10)); p_20 += 6) + { + int *l_624 = (void*)0; + int **l_631 = (void*)0; + step_hash(395); + for (g_324 = 0; (g_324 == 4); g_324 += 7) + { + int *l_630 = &g_2; + int *l_645 = &g_523; + step_hash(380); + for (g_236 = 0; (g_236 >= (-3)); --g_236) + { + int **l_629 = &l_539; + step_hash(376); + for (g_423 = (-7); (g_423 == (-28)); g_423 -= 8) + { + step_hash(375); + (*l_558) = l_624; + } + step_hash(377); + (*l_610) ^= ((signed char)0L << (signed char)6); + step_hash(378); + (*l_610) &= ((0xFBE3L == (((unsigned char)((l_629 == (void*)0) || p_20) << (unsigned char)g_70) && g_2)) != g_324); + step_hash(379); + l_631 = &l_610; + } + step_hash(392); + for (g_127 = 0; (g_127 >= 15); g_127 += 8) + { + unsigned short l_634 = 0x4870L; + step_hash(384); + (*l_610) &= 9L; + step_hash(385); + if (l_634) + break; + step_hash(391); + if (((unsigned short)(+(2UL >= ((signed char)func_37(((short)((void*)0 != l_630) >> (short)8), (p_20 < p_20)) << (signed char)g_127))) >> (unsigned short)((int)l_643 + (int)l_644))) + { + step_hash(387); + (*g_189) = l_645; + } + else + { + unsigned l_646 = 4294967295UL; + step_hash(389); + (*l_610) = 0x363AA618L; + step_hash(390); + l_646 = (*l_610); + } + } + step_hash(393); + (*l_645) &= (&l_624 != &g_190); + step_hash(394); + if (g_236) + continue; + } + step_hash(396); + if ((*l_610)) + break; + } + step_hash(398); + g_70 ^= 0xFD87D1DAL; + } + else + { + int **l_654 = (void*)0; + int *l_659 = &g_2; + short l_689 = 0L; + step_hash(432); + if (((unsigned)g_523 + (unsigned)(~(l_649 != ((signed char)((unsigned char)(func_37((g_2 ^ ((void*)0 == l_654)), (+((p_20 || (-5L)) < p_20))) && p_20) / (unsigned char)p_20) << (signed char)p_20))))) + { + unsigned l_655 = 0xD482ACB0L; + int *l_658 = &g_255; + step_hash(401); + l_655 ^= g_423; + step_hash(402); + (*l_539) = g_236; + step_hash(408); + if ((((unsigned short)(g_523 != (*l_659)) << (unsigned short)0) || (-6L))) + { + step_hash(404); + (*g_189) = &g_2; + step_hash(405); + (*l_658) = ((p_20 == ((unsigned)g_127 / (unsigned)1UL)) <= g_70); + } + else + { + int *l_670 = &g_70; + step_hash(407); + return l_670; + } + step_hash(415); + if ((**g_189)) + { + step_hash(410); + (*g_189) = func_47((*g_189), (&l_654 != &l_540), p_20, (*g_189), g_523); + } + else + { + step_hash(412); + (*l_658) = p_20; + step_hash(413); + (*g_189) = (void*)0; + step_hash(414); + l_671 &= ((*l_658) & (*l_658)); + } + } + else + { + int *l_683 = &g_70; + step_hash(430); + for (g_423 = 11; (g_423 == (-3)); g_423 -= 1) + { + int *l_686 = &g_2; + step_hash(426); + for (p_20 = (-30); (p_20 <= 16); p_20++) + { + int *l_687 = &g_2; + int ***l_690 = &l_654; + step_hash(423); + (*l_683) = ((short)((unsigned)(-(int)(3UL > ((signed char)(*l_610) % (signed char)((signed char)(*l_686) >> (signed char)l_689)))) % (unsigned)(*l_539)) - (short)(-2L)); + step_hash(424); + (*l_683) = p_20; + step_hash(425); + g_523 &= ((l_690 != (void*)0) >= (*l_686)); + } + step_hash(427); + (*g_189) = l_659; + step_hash(428); + (*l_610) |= (*l_683); + step_hash(429); + if (p_20) + continue; + } + step_hash(431); + return l_659; + } + step_hash(433); + return l_691; + } + step_hash(435); + (*l_610) = p_20; + step_hash(436); + return l_610; +} +static short func_21(unsigned p_22, int * p_23, int * p_24, int * p_25) +{ + int l_475 = 0x49BB3FBAL; + int ***l_496 = &g_189; + step_hash(259); + for (p_22 = 23; (p_22 >= 44); p_22++) + { + step_hash(256); + g_70 ^= g_114; + step_hash(257); + if ((*p_25)) + continue; + step_hash(258); + (*p_25) = (g_423 != l_475); + } + step_hash(265); + if ((*p_25)) + { + unsigned l_488 = 1UL; + int ***l_495 = (void*)0; + step_hash(261); + l_475 = ((unsigned short)(!((short)(((short)(0x6FF82A61L == ((void*)0 == p_25)) >> (short)13) < ((signed char)((((((l_475 == l_475) ^ p_22) < l_475) != ((signed char)((unsigned short)0UL + (unsigned short)0UL) + (signed char)g_255)) >= g_2) <= 4294967294UL) * (signed char)p_22)) / (short)l_488)) + (unsigned short)p_22); + step_hash(262); + (*p_24) = (g_255 >= ((unsigned char)g_255 * (unsigned char)(((+(g_70 > ((short)0xB0FCL << (short)(l_495 != l_496)))) & (&g_190 != &p_23)) == ((unsigned char)l_488 >> (unsigned char)p_22)))); + } + else + { + step_hash(264); + (*g_189) = (void*)0; + } + step_hash(266); + return p_22; +} +static int * func_27(int * p_28, int * p_29, unsigned short p_30) +{ + int *l_466 = &g_2; + unsigned l_467 = 0xEA905F1CL; + int *l_468 = &g_70; + step_hash(242); + (*l_468) = ((*p_28) <= (*p_29)); + step_hash(250); + for (g_236 = (-25); (g_236 >= (-16)); g_236 += 1) + { + unsigned l_471 = 4294967291UL; + int *l_472 = (void*)0; + step_hash(246); + (*l_468) = l_471; + step_hash(247); + if ((*l_468)) + break; + step_hash(248); + (*l_468) |= (g_114 ^ p_30); + step_hash(249); + return l_472; + } + step_hash(251); + return l_468; +} +static int * func_32(unsigned p_33, int p_34) +{ + int *l_372 = &g_255; + int l_383 = (-3L); + int ***l_439 = &g_189; + int ***l_453 = (void*)0; + step_hash(238); + for (p_33 = 0; (p_33 >= 28); p_33 += 1) + { + unsigned char l_373 = 3UL; + int ***l_375 = &g_189; + int *l_464 = &g_70; + step_hash(232); + for (g_70 = 0; (g_70 == 3); g_70++) + { + int ***l_374 = &g_189; + unsigned char l_386 = 0xB8L; + unsigned l_390 = 1UL; + signed char l_436 = 1L; + short l_437 = 0xF58FL; + unsigned l_448 = 0xE52FAC2CL; + step_hash(199); + l_372 = &p_34; + step_hash(231); + if (l_373) + { + int **l_380 = &l_372; + step_hash(201); + l_383 |= ((l_374 != l_375) | (((signed char)(0xC744L & func_37((p_33 > ((int)(l_380 == (void*)0) / (int)p_34)), ((short)g_236 % (short)65535UL))) << (signed char)g_236) & 247UL)); + } + else + { + unsigned l_389 = 4294967295UL; + int *l_391 = &g_2; + int ***l_415 = &g_189; + int *l_438 = &g_255; + step_hash(223); + if (((&g_190 == &g_190) >= ((unsigned short)l_386 - (unsigned short)(((void*)0 == &g_190) ^ (((((-6L) ^ 0x05BA0CF0L) && (l_386 | (l_389 < 2UL))) | l_390) & g_2))))) + { + step_hash(204); + return l_391; + } + else + { + unsigned l_403 = 0x3491E8C4L; + int *l_418 = &g_255; + unsigned l_429 = 0UL; + step_hash(212); + for (p_34 = 0; (p_34 < 4); p_34 += 2) + { + int **l_396 = &g_190; + int *l_404 = &l_383; + step_hash(209); + (*g_189) = &p_34; + step_hash(210); + (*l_404) = ((signed char)(((((void*)0 != l_396) ^ ((int)func_37(((short)0x7E04L >> (short)5), p_33) / (int)g_2)) <= ((**g_189) & 0x32C8177FL)) && func_37(((unsigned char)p_34 >> (unsigned char)g_70), g_324)) + (signed char)l_403); + step_hash(211); + (**l_374) = func_47(func_47((*g_189), g_222, ((signed char)((signed char)((signed char)(1UL || (((signed char)(*l_372) - (signed char)(((unsigned char)((*l_372) <= ((void*)0 != l_415)) - (unsigned char)((short)l_403 / (short)func_37((**l_396), p_34))) > p_34)) <= (-1L))) * (signed char)g_114) * (signed char)3L) * (signed char)p_34), l_418, (***l_375)), (***l_375), g_114, (*g_189), p_33); + } + step_hash(213); + (*l_372) = ((signed char)(p_34 && ((short)p_33 % (short)65529UL)) >> (signed char)6); + step_hash(221); + if (p_33) + { + step_hash(215); + (*l_418) = (g_423 > (!g_423)); + step_hash(216); + if (g_114) + continue; + } + else + { + unsigned char l_424 = 247UL; + step_hash(218); + (*l_372) &= l_424; + step_hash(219); + l_383 |= ((signed char)((short)g_222 >> (short)(g_324 > p_34)) >> (signed char)6); + step_hash(220); + (*l_418) = l_429; + } + step_hash(222); + (*l_418) &= (*l_372); + } + step_hash(229); + for (g_423 = 0; (g_423 == 0); ++g_423) + { + step_hash(227); + (**l_415) = func_47(func_47(&g_2, ((unsigned char)((*l_374) == &g_190) / (unsigned char)0x21L), p_33, func_47(&g_2, func_37(((unsigned char)func_37((((!(0xFBL || (!g_236))) || func_37(g_236, p_33)) | l_436), l_437) >> (unsigned char)4), g_70), (*l_372), &g_255, p_33), g_255), (*l_372), p_34, l_438, p_33); + step_hash(228); + if ((*g_190)) + continue; + } + step_hash(230); + (*l_438) = ((func_37((l_439 == (void*)0), p_34) || (l_373 < ((unsigned short)(!((~(((short)func_37((func_37((*l_391), ((((unsigned short)(((*l_415) == (void*)0) ^ ((unsigned short)func_37(p_34, (*l_372)) / (unsigned short)0x541BL)) << (unsigned short)p_34) | (*l_391)) | p_33)) ^ g_255), p_33) * (short)l_448) && (*l_438))) > g_2)) - (unsigned short)0x979EL))) ^ g_255); + } + } + step_hash(237); + if ((((signed char)g_114 >> (signed char)2) ^ func_37(func_37(p_34, ((signed char)((l_439 == l_453) || g_423) - (signed char)(l_453 == l_375))), ((((int)((signed char)g_255 >> (signed char)2) - (int)0x1952FADDL) ^ g_324) && g_114)))) + { + step_hash(234); + (*l_372) |= ((unsigned short)((short)(4294967295UL || g_236) - (short)g_2) << (unsigned short)14); + } + else + { + int *l_465 = &g_70; + step_hash(236); + (*l_465) = ((signed char)p_34 * (signed char)0x01L); + } + } + step_hash(239); + (*l_372) ^= g_222; + step_hash(240); + return &g_2; +} +static short func_37(unsigned p_38, unsigned short p_39) +{ + int l_40 = 0x1AA2910AL; + int l_41 = 0x47030FC3L; + step_hash(6); + l_41 ^= l_40; + step_hash(7); + return p_39; +} +static short func_42(int * p_43, int * p_44, int * p_45, short p_46) +{ + unsigned char l_64 = 255UL; + signed char l_98 = 0x7EL; + int l_164 = 0xCA327EC8L; + signed char l_235 = 0x15L; + int **l_237 = &g_190; + int l_276 = (-1L); + int l_290 = 0L; + unsigned l_349 = 0x68300D3CL; + unsigned char l_352 = 0x1AL; + int *l_353 = &g_255; + unsigned short l_367 = 0x3511L; + step_hash(180); + if (g_2) + { + signed char l_65 = 5L; + signed char l_68 = 0L; + int *l_69 = &g_70; + int *l_90 = (void*)0; + step_hash(14); + (*l_69) |= ((signed char)((short)((short)((int)((unsigned short)l_64 << (unsigned short)p_46) % (int)p_46) / (short)(+func_37(((-3L) < ((l_65 ^ 0x16FEL) != p_46)), (p_46 >= ((unsigned short)l_68 >> (unsigned short)4))))) + (short)g_2) / (signed char)l_65); + step_hash(22); + for (l_68 = (-24); (l_68 != (-28)); --l_68) + { + int **l_73 = &l_69; + step_hash(18); + (*l_73) = (void*)0; + step_hash(19); + if ((*p_44)) + break; + step_hash(20); + g_70 = (-1L); + step_hash(21); + g_70 = func_37(p_46, p_46); + } + step_hash(54); + if (l_64) + { + int *l_74 = (void*)0; + int *l_75 = &g_70; + step_hash(24); + (*l_75) = 0x3EA6DE45L; + } + else + { + int *l_79 = &g_2; + int l_100 = (-4L); + step_hash(53); + if (func_37(func_37(g_2, g_2), p_46)) + { + signed char l_76 = 7L; + int *l_83 = &g_70; + int **l_84 = &l_79; + step_hash(27); + (*l_83) ^= (((0x50E4L == (l_76 ^ (p_46 > (((signed char)(func_37(g_2, (l_79 == &g_70)) <= (((unsigned short)(*l_79) << (unsigned short)7) == (-(unsigned char)l_64))) * (signed char)0xFCL) != 4UL)))) & g_2) & (*l_79)); + step_hash(28); + (*l_84) = func_47(p_44, l_64, (*l_79), p_45, g_2); + step_hash(29); + return g_2; + } + else + { + int *l_89 = &g_2; + unsigned l_103 = 4294967289UL; + signed char l_140 = 0xF2L; + step_hash(31); + g_70 = ((short)g_70 / (short)0x8DDFL); + step_hash(38); + for (p_46 = 13; (p_46 == 29); p_46 += 6) + { + int *l_95 = &g_70; + int **l_99 = &l_69; + step_hash(35); + (*l_99) = func_47(l_89, p_46, ((void*)0 != l_90), func_47(func_47(&g_70, g_70, ((unsigned short)((((unsigned)((void*)0 == l_95) % (unsigned)(((int)func_37(g_70, (*l_79)) / (int)g_70) | p_46)) > (*l_79)) ^ g_70) / (unsigned short)l_98), &g_2, g_70), p_46, p_46, p_44, l_98), g_2); + step_hash(36); + l_103 ^= ((g_70 & ((((void*)0 == &g_70) || (0xDE23EDE1L > l_100)) != ((short)func_37((&g_2 != (*l_99)), (*l_69)) >> (short)p_46))) <= p_46); + step_hash(37); + (*l_95) |= (((short)(-1L) << (short)p_46) != ((l_89 == l_69) == (((signed char)func_37((*l_79), (**l_99)) << (signed char)5) <= p_46))); + } + step_hash(51); + for (p_46 = 0; (p_46 <= 16); p_46++) + { + unsigned l_125 = 0xEF93A2F2L; + step_hash(50); + if (((p_46 <= ((*l_79) > (&p_45 == &p_44))) & (l_89 != (void*)0))) + { + signed char l_112 = 0x48L; + int **l_113 = &l_69; + step_hash(43); + (*l_113) = func_47(func_47(p_43, g_2, p_46, l_89, ((void*)0 != p_44)), ((unsigned char)(0x5E00L ^ (l_112 != (*l_79))) % (unsigned char)p_46), g_70, &g_70, g_70); + step_hash(44); + g_114 ^= func_37(p_46, g_70); + step_hash(45); + return p_46; + } + else + { + signed char l_126 = 1L; + int *l_139 = &g_70; + step_hash(47); + g_127 ^= (g_114 && ((unsigned)((((void*)0 == p_43) && g_114) == g_114) % (unsigned)((unsigned)(func_37(((short)(func_37((((int)0x2C06FE3AL % (int)((int)0x2F63B645L - (int)((g_2 != g_114) == g_2))) || l_125), g_70) & g_2) * (short)65528UL), l_126) || 7L) - (unsigned)0xAC53A074L))); + step_hash(48); + (*l_139) = (((unsigned char)(p_46 && ((short)((signed char)(func_37(p_46, ((unsigned char)(-(int)(func_37((1L & 0xEBA2L), ((((signed char)1L / (signed char)g_2) <= g_70) >= (l_69 != (void*)0))) > 0x6C79135EL)) - (unsigned char)g_114)) & p_46) % (signed char)l_126) >> (short)9)) / (unsigned char)0x74L) >= g_70); + step_hash(49); + return g_127; + } + } + step_hash(52); + l_140 = (*p_45); + } + } + } + else + { + unsigned l_141 = 0x97844A5BL; + int *l_149 = (void*)0; + int **l_148 = &l_149; + signed char l_192 = 0x32L; + signed char l_289 = 0x36L; + unsigned l_301 = 0xA247C74DL; + int l_320 = 0xCBF4361AL; + unsigned char l_325 = 0xAEL; + step_hash(146); + if (l_141) + { + int l_147 = 0L; + unsigned short l_178 = 0x5B4EL; + int **l_191 = &l_149; + step_hash(57); + g_70 = (+((l_141 && g_114) > ((p_46 == (((int)(*p_43) % (int)g_114) || 0L)) ^ ((short)0x152AL + (short)((((-(unsigned)l_147) | (((&p_44 != l_148) == 1L) | 0x7DL)) > (*p_43)) >= l_64))))); + step_hash(75); + for (l_141 = 16; (l_141 >= 4); --l_141) + { + unsigned short l_152 = 1UL; + unsigned short l_165 = 65526UL; + unsigned l_172 = 0x5D02E7AFL; + int *l_176 = &g_2; + step_hash(74); + if (l_152) + { + unsigned short l_163 = 1UL; + unsigned l_169 = 4UL; + step_hash(68); + for (p_46 = 5; (p_46 == (-5)); p_46 -= 1) + { + int *l_166 = &g_70; + step_hash(65); + g_70 = ((short)g_2 * (short)((signed char)p_46 * (signed char)(((3L > (0x093C7B1CL | ((((unsigned)func_37(((l_147 != 0xCBL) != l_163), g_127) + (unsigned)4294967289UL) != l_164) > l_98))) || g_127) > l_165))); + step_hash(66); + (*l_166) = (*p_44); + step_hash(67); + (*l_148) = func_47(func_47((*l_148), g_70, ((unsigned)p_46 / (unsigned)(p_46 && l_169)), l_166, p_46), p_46, p_46, &g_70, l_98); + } + step_hash(69); + (*l_148) = func_47(&l_147, (g_114 ^ ((unsigned short)func_37(l_172, g_70) << (unsigned short)3)), (l_169 || 0x4516985CL), p_45, l_147); + } + else + { + int *l_177 = (void*)0; + step_hash(71); + g_70 = func_37(g_70, g_127); + step_hash(72); + l_147 = (-(unsigned char)((unsigned short)((void*)0 == l_176) >> (unsigned short)((&g_70 == l_177) && (l_178 <= (0x1BL > ((((short)((signed char)p_46 - (signed char)((5L >= (((func_37(((((signed char)l_178 % (signed char)g_127) == 0x01L) < 7L), (*l_176)) | 0L) & 0UL) < g_2)) < (-10L))) % (short)0x00BEL) < g_127) != p_46)))))); + step_hash(73); + (*g_190) = (&l_177 != g_189); + } + } + step_hash(76); + l_192 ^= (l_191 == (void*)0); + } + else + { + unsigned char l_196 = 254UL; + int **l_227 = (void*)0; + unsigned char l_228 = 0xBAL; + step_hash(78); + (*g_190) = (g_114 || ((-9L) & g_114)); + step_hash(96); + if ((**g_189)) + { + int **l_195 = &g_190; + step_hash(80); + l_196 &= ((unsigned)0x201DAD36L + (unsigned)(&g_190 == l_195)); + } + else + { + unsigned char l_205 = 0xAAL; + step_hash(82); + (**g_189) = (**g_189); + step_hash(83); + (*g_189) = &l_164; + step_hash(95); + for (p_46 = 0; (p_46 > 17); p_46 += 1) + { + unsigned l_213 = 4294967295UL; + step_hash(87); + (*g_190) ^= ((unsigned short)(((unsigned short)func_37(((short)0x5CEDL * (short)(l_205 >= g_114)), (-(unsigned)(!(0xFD4CL != p_46)))) / (unsigned short)0x7108L) || g_2) >> (unsigned short)(func_37(g_70, g_114) && g_70)); + step_hash(88); + (**g_189) &= ((int)((unsigned char)l_196 * (unsigned char)253UL) % (int)(*p_43)); + step_hash(89); + if ((*p_43)) + continue; + step_hash(94); + for (l_141 = 1; (l_141 != 48); l_141 += 1) + { + step_hash(93); + return l_213; + } + } + } + step_hash(145); + if ((((unsigned short)(g_70 && func_37(func_37(((unsigned short)((~(((((int)(1UL && (1UL & ((((*g_190) | ((**g_189) == (((unsigned)(g_114 || ((((*l_148) != (*g_189)) == l_98) != 4294967294UL)) + (unsigned)l_196) == 0L))) | l_196) > g_2))) - (int)l_196) ^ 1L) && g_2) && (*p_43))) == 0xFE1FC20EL) >> (unsigned short)g_127), g_127), l_196)) << (unsigned short)g_222) <= (*g_190))) + { + unsigned l_229 = 4294967291UL; + step_hash(98); + (*g_189) = (*l_148); + step_hash(99); + l_228 |= ((short)(((func_37(((unsigned short)(1L && (func_37((func_37(g_114, ((g_70 <= 1UL) == 0x71L)) ^ 0xE5L), (l_196 ^ ((void*)0 != l_227))) & g_70)) >> (unsigned short)4), g_222) > g_2) != p_46) | 5UL) >> (short)8); + step_hash(117); + if (l_229) + { + unsigned l_230 = 0x9EDA7472L; + step_hash(101); + l_230 = (*p_44); + step_hash(108); + for (g_222 = (-22); (g_222 >= (-10)); g_222 += 4) + { + int *l_233 = (void*)0; + int *l_234 = &l_164; + step_hash(105); + if (g_70) + break; + step_hash(106); + if (l_229) + continue; + step_hash(107); + (*l_234) = l_64; + } + } + else + { + step_hash(110); + (*g_189) = p_45; + step_hash(116); + if (func_37(((g_222 ^ l_235) == 0L), p_46)) + { + step_hash(112); + g_70 &= ((*g_189) != (void*)0); + step_hash(113); + g_236 = (0x36C7L && p_46); + } + else + { + int ***l_238 = &l_227; + step_hash(115); + (*l_238) = l_237; + } + } + step_hash(128); + if (l_98) + { + unsigned char l_241 = 0xB7L; + int l_250 = 0xDFA9741CL; + int l_251 = (-10L); + step_hash(123); + for (g_127 = (-20); (g_127 > (-7)); ++g_127) + { + step_hash(122); + return l_241; + } + step_hash(124); + (*g_189) = func_47(func_47((*g_189), g_114, ((short)(~((((unsigned short)p_46 / (unsigned short)((unsigned char)p_46 - (unsigned char)((short)p_46 - (short)(0L && ((l_229 <= (func_37(func_37(g_127, g_127), g_114) & l_229)) | l_229))))) != p_46) < l_250)) >> (short)p_46), p_45, g_127), g_114, l_250, (*l_237), l_251); + step_hash(125); + l_251 &= l_229; + } + else + { + unsigned short l_252 = 0x2728L; + step_hash(127); + return l_252; + } + } + else + { + unsigned l_253 = 0x7F2AF577L; + int l_262 = 1L; + step_hash(142); + if ((*g_190)) + { + int *l_254 = &g_255; + step_hash(131); + (**g_189) = (g_2 & (-2L)); + step_hash(132); + (**g_189) = l_253; + step_hash(133); + (*l_254) &= (**g_189); + step_hash(139); + if ((**g_189)) + { + step_hash(135); + (*l_237) = func_47(p_45, p_46, g_255, (*g_189), p_46); + } + else + { + int ***l_256 = &l_237; + step_hash(137); + (*l_256) = &p_43; + step_hash(138); + (*l_237) = (void*)0; + } + } + else + { + signed char l_259 = 0x1EL; + step_hash(141); + (*g_190) |= ((1UL && (p_46 > 0xFD68L)) == ((((unsigned short)g_2 >> (unsigned short)l_259) != ((short)(func_37(p_46, g_222) && (((0x870BL != p_46) & g_127) | 4L)) - (short)g_222)) && 0x5AEAL)); + } + step_hash(143); + l_262 &= (p_46 & g_114); + step_hash(144); + l_262 = ((unsigned short)((int)func_37(g_222, p_46) / (int)((signed char)((unsigned short)(&p_43 == &g_190) * (unsigned short)l_253) * (signed char)(((-(unsigned short)(((*p_44) & l_262) != l_262)) < p_46) || 0L))) >> (unsigned short)g_222); + } + } + step_hash(147); + (*l_148) = func_47((*l_237), ((unsigned short)(p_46 >= ((short)l_276 << (short)((((signed char)(p_46 < ((unsigned char)((unsigned short)((unsigned short)p_46 + (unsigned short)((short)p_46 / (short)((unsigned char)((((&l_237 == (void*)0) ^ 0x70L) || g_255) ^ p_46) / (unsigned char)(-4L)))) + (unsigned short)0xB961L) * (unsigned char)p_46)) + (signed char)g_114) <= p_46) ^ g_70))) + (unsigned short)0x57FCL), l_289, (*g_189), p_46); + step_hash(148); + (*l_237) = p_43; + step_hash(179); + if ((*p_45)) + { + int *l_291 = (void*)0; + int *l_292 = &g_70; + step_hash(150); + (*l_292) |= l_290; + } + else + { + signed char l_295 = (-1L); + int *l_319 = &g_255; + unsigned l_330 = 0xE2BE75F2L; + step_hash(152); + (*l_148) = (*g_189); + step_hash(176); + for (l_289 = 0; (l_289 == 4); l_289++) + { + signed char l_296 = (-5L); + step_hash(156); + (*g_189) = func_47(func_47((*g_189), ((g_114 > ((l_295 >= l_296) || ((void*)0 != (*g_189)))) ^ (~((unsigned char)0x2FL * (unsigned char)((((unsigned short)g_70 >> (unsigned short)14) >= ((l_301 ^ (*p_44)) == 1L)) < 7L)))), g_70, p_44, l_296), g_70, g_114, (*g_189), p_46); + step_hash(173); + for (l_290 = 0; (l_290 < 24); l_290 += 3) + { + unsigned l_318 = 0xAFC33171L; + step_hash(166); + if ((*g_190)) + { + step_hash(161); + l_319 = func_47((*g_189), p_46, ((unsigned char)((signed char)(((signed char)((int)1L + (int)0xBF95CD84L) << (signed char)(func_37((((signed char)((unsigned short)((unsigned short)l_318 * (unsigned short)((void*)0 != &g_190)) - (unsigned short)g_127) - (signed char)(((void*)0 == p_44) >= p_46)) && 8L), p_46) | 0xDF84B9FBL)) <= l_296) % (signed char)g_2) + (unsigned char)g_2), p_44, p_46); + step_hash(162); + return g_222; + } + else + { + step_hash(164); + l_320 = (&g_190 != &g_190); + step_hash(165); + (*l_319) = (-(unsigned short)65526UL); + } + step_hash(167); + (*l_319) = ((short)g_324 * (short)(!(p_46 ^ (l_325 == 7L)))); + step_hash(172); + for (l_98 = (-23); (l_98 != (-10)); ++l_98) + { + step_hash(171); + l_330 = ((signed char)g_324 + (signed char)g_127); + } + } + step_hash(174); + (*l_319) = (0xC0L < (((short)(0x92L >= ((short)((short)((unsigned short)l_296 * (unsigned short)g_114) + (short)((unsigned)((int)((unsigned char)((*g_189) != p_43) - (unsigned char)((short)((((signed char)(0x445BE591L <= p_46) * (signed char)0xE9L) > (*l_319)) < p_46) - (short)0x37B5L)) - (int)(**g_189)) / (unsigned)0x8C589242L)) + (short)0x46E4L)) << (short)6) | g_127)); + step_hash(175); + (*l_319) = l_349; + } + step_hash(177); + g_70 = ((unsigned char)g_114 + (unsigned char)(*l_319)); + step_hash(178); + (*l_319) = (*p_45); + } + } + step_hash(181); + (*l_353) = l_352; + step_hash(182); + (*g_189) = (*g_189); + step_hash(190); + if ((((signed char)g_236 - (signed char)g_255) != (p_44 != (*g_189)))) + { + unsigned char l_364 = 0xD0L; + step_hash(184); + (*l_353) &= func_37(((signed char)(0x90L || ((unsigned short)((unsigned short)((((signed char)((4294967293UL < g_236) ^ p_46) * (signed char)((*p_44) < l_364)) <= 1L) || ((func_37(g_127, func_37(g_222, l_364)) > g_70) || (*p_44))) << (unsigned short)2) >> (unsigned short)l_364)) + (signed char)1L), l_364); + step_hash(185); + l_367 ^= ((unsigned char)p_46 >> (unsigned char)5); + } + else + { + step_hash(187); + (*l_237) = (*l_237); + step_hash(188); + (*l_353) ^= (-1L); + step_hash(189); + (*l_353) |= 0xF09B2C3DL; + } + step_hash(191); + return (*l_353); +} +static int * func_47(int * p_48, signed char p_49, int p_50, int * p_51, unsigned p_52) +{ + unsigned l_53 = 1UL; + step_hash(9); + p_51 = &g_2; + step_hash(10); + l_53 &= func_37(p_49, g_2); + step_hash(11); + return p_51; +} +void csmith_compute_hash(void) +{ + transparent_crc(g_2, "g_2", print_hash_value); + transparent_crc(g_70, "g_70", print_hash_value); + transparent_crc(g_114, "g_114", print_hash_value); + transparent_crc(g_127, "g_127", print_hash_value); + transparent_crc(g_222, "g_222", print_hash_value); + transparent_crc(g_236, "g_236", print_hash_value); + transparent_crc(g_255, "g_255", print_hash_value); + transparent_crc(g_324, "g_324", print_hash_value); + transparent_crc(g_423, "g_423", print_hash_value); + transparent_crc(g_523, "g_523", print_hash_value); + transparent_crc(g_611, "g_611", print_hash_value); +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand42.expect b/src/tests/csmith/rand42.expect new file mode 100644 index 0000000..540adc7 --- /dev/null +++ b/src/tests/csmith/rand42.expect @@ -0,0 +1,36 @@ +...checksum after hashing g_2 : 6B7C1B21 +...checksum after hashing g_70 : 7053D5FC +...checksum after hashing g_114 : D397161B +...checksum after hashing g_127 : 73DE66D4 +...checksum after hashing g_222 : AA23E932 +...checksum after hashing g_236 : 6500930A +...checksum after hashing g_255 : 346D9946 +...checksum after hashing g_324 : 24A2DDB8 +...checksum after hashing g_423 : 49E6DFE8 +...checksum after hashing g_523 : 711BEC18 +...checksum after hashing g_611 : 5C49255F +before stmt(446): checksum = 5C49255F +...checksum after hashing g_2 : 8B4D1797 +...checksum after hashing g_70 : 2707D814 +...checksum after hashing g_114 : E35CB098 +...checksum after hashing g_127 : 5F1060FA +...checksum after hashing g_222 : 89E2DBAE +...checksum after hashing g_236 : C5FF6B95 +...checksum after hashing g_255 : 2F6B1446 +...checksum after hashing g_324 : 11703B01 +...checksum after hashing g_423 : 614E1154 +...checksum after hashing g_523 : EEE5386B +...checksum after hashing g_611 : 45CCF527 +before stmt(447): checksum = 45CCF527 +...checksum after hashing g_2 : 8B4D1797 +...checksum after hashing g_70 : 2707D814 +...checksum after hashing g_114 : E35CB098 +...checksum after hashing g_127 : 5F1060FA +...checksum after hashing g_222 : 89E2DBAE +...checksum after hashing g_236 : C5FF6B95 +...checksum after hashing g_255 : 2F6B1446 +...checksum after hashing g_324 : 11703B01 +...checksum after hashing g_423 : 614E1154 +...checksum after hashing g_523 : EEE5386B +...checksum after hashing g_611 : 45CCF527 +checksum = 45ccf527 diff --git a/src/tests/csmith/rand43.c b/src/tests/csmith/rand43.c new file mode 100644 index 0000000..5ad6b43 --- /dev/null +++ b/src/tests/csmith/rand43.c @@ -0,0 +1,763 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static int g_2 = 0x5F70AD6FL; +static int g_6 = (-1L); +static int g_21 = 2L; +static int g_73 = 0x617092FFL; +static signed char g_83 = (-8L); +static int **g_86 = (void*)0; +static int g_100 = (-4L); +static int g_133 = (-6L); +static unsigned char g_151 = 0xDAL; +static int g_185 = 0xBFB62ABAL; +static int *g_214 = &g_133; +static int **g_365 = (void*)0; +static int **g_418 = &g_214; +static unsigned g_430 = 4294967295UL; +static int *g_491 = (void*)0; +static int **g_493 = &g_214; +static signed char g_574 = (-10L); +static signed char g_601 = (-10L); +static int *g_641 = &g_73; +static unsigned short g_654 = 0x41D6L; +static unsigned char func_1(void); +static int func_11(int * p_12, unsigned p_13, signed char p_14, int * p_15); +static int ** func_22(unsigned p_23, signed char p_24, int * p_25, short p_26); +static int * func_29(unsigned short p_30, int * p_31, int * p_32); +static unsigned short func_33(short p_34, unsigned p_35, int ** p_36, int ** p_37); +static short func_40(int p_41, int p_42, int * p_43, unsigned char p_44); +static int func_45(short p_46, unsigned p_47, int * p_48, unsigned char p_49); +static int func_50(short p_51, int * p_52, int p_53); +static unsigned short func_56(int * p_57, unsigned p_58, int p_59, int p_60); +static int * func_61(int ** p_62); +static unsigned char func_1(void) +{ + int *l_3 = (void*)0; + int *l_4 = (void*)0; + int *l_5 = &g_6; + int ***l_515 = &g_86; + int l_516 = 0x82FF2273L; + int l_575 = 0xCDC44E88L; + int *l_588 = &g_6; + unsigned char l_604 = 2UL; + unsigned l_611 = 0x573E6FE5L; + unsigned l_633 = 0x17D35668L; + int l_634 = 0xFB5EEB36L; + unsigned l_664 = 0UL; + unsigned short l_678 = 0x7DA6L; + unsigned short l_689 = 65529UL; + step_hash(1); + (*l_5) &= g_2; + step_hash(445); + for (g_2 = 0; (g_2 > (-3)); g_2--) + { + int **l_9 = (void*)0; + int **l_10 = &l_4; + unsigned l_540 = 1UL; + int l_547 = 0x3FB1A51AL; + unsigned l_582 = 4294967294UL; + int **l_583 = &g_214; + signed char l_668 = 0xFEL; + step_hash(5); + (*l_10) = (void*)0; + } + step_hash(446); + (*g_418) = (*g_418); + step_hash(447); + return g_430; +} +static int func_11(int * p_12, unsigned p_13, signed char p_14, int * p_15) +{ + unsigned char l_27 = 0xC1L; + int *l_367 = (void*)0; + int **l_366 = &l_367; + step_hash(338); + for (g_6 = 23; (g_6 == (-27)); g_6 -= 3) + { + unsigned char l_28 = 1UL; + int ***l_492 = (void*)0; + step_hash(15); + for (p_13 = 0; (p_13 < 46); p_13 += 6) + { + int *l_20 = &g_21; + step_hash(13); + (*l_20) = (*p_12); + step_hash(14); + (*l_20) = 0xB8B78ACCL; + } + } + step_hash(339); + return (*p_12); +} +static int ** func_22(unsigned p_23, signed char p_24, int * p_25, short p_26) +{ + int **l_389 = &g_214; + int l_429 = 0x1670AD50L; + int **l_431 = &g_214; + step_hash(332); + if (((~(l_389 != &p_25)) | ((unsigned char)((unsigned short)((((signed char)(-1L) >> (signed char)4) && 249UL) <= 0x97L) << (unsigned short)14) / (unsigned char)(func_56(p_25, p_23, g_83, g_133) & 0xCEL)))) + { + signed char l_398 = (-7L); + unsigned l_420 = 0x699DD6A4L; + int *l_421 = (void*)0; + int l_462 = 6L; + step_hash(316); + if (l_398) + { + int *l_405 = &g_185; + int **l_419 = &l_405; + unsigned l_426 = 4294967290UL; + unsigned short l_437 = 0x130DL; + int l_438 = 0x562DD2E4L; + int *l_439 = &g_6; + step_hash(285); + (*l_405) = (l_398 > ((signed char)((short)((~(l_398 ^ l_398)) | 0x2C2EL) * (short)((signed char)(((l_405 != (*l_389)) || (*l_405)) >= g_73) * (signed char)func_45(g_73, p_26, l_405, g_185))) >> (signed char)p_24)); + step_hash(286); + g_133 = (((signed char)((unsigned short)(((unsigned)(&g_86 == &g_86) + (unsigned)l_398) | ((unsigned char)((void*)0 == &g_214) >> (unsigned char)0)) - (unsigned short)2UL) % (signed char)(*l_405)) || 0xF6L); + step_hash(313); + if (((signed char)(g_6 | ((l_389 != (void*)0) && ((p_23 | (0xC5L < (func_33(g_133, (((int)0xBB2A3691L % (int)p_24) && g_73), g_418, l_419) && g_6))) || l_420))) >> (signed char)p_24)) + { + step_hash(288); + (*l_389) = l_421; + } + else + { + int ***l_422 = (void*)0; + int ***l_423 = &g_86; + int l_461 = 1L; + step_hash(290); + (*l_423) = &g_214; + step_hash(291); + (*l_419) = (**l_423); + step_hash(311); + if ((g_430 != 0L)) + { + int *l_434 = &g_100; + step_hash(300); + if (p_24) + { + step_hash(294); + (*l_423) = l_389; + } + else + { + unsigned l_432 = 0x1E9944D6L; + step_hash(296); + (*l_419) = (*l_419); + step_hash(297); + (*l_419) = func_61(l_431); + step_hash(298); + l_432 |= (*g_214); + step_hash(299); + (**l_431) ^= func_33(g_6, (-(unsigned)p_23), &g_214, &g_214); + } + step_hash(301); + (*l_434) ^= 0x455675CCL; + } + else + { + unsigned l_440 = 0xF9B96A1AL; + step_hash(310); + for (l_398 = 0; (l_398 < 28); l_398 += 6) + { + int *l_449 = (void*)0; + int *l_450 = &g_21; + step_hash(306); + l_438 &= l_437; + step_hash(307); + g_73 &= l_440; + step_hash(308); + (**l_423) = (*g_418); + step_hash(309); + (*l_450) = ((int)((short)func_56(p_25, g_6, ((unsigned short)((p_26 || (4294967287UL | p_24)) > g_6) / (unsigned short)((short)(&g_214 != &g_214) << (short)g_6)), p_23) << (short)g_21) + (int)p_23); + } + } + step_hash(312); + l_461 = (g_2 <= ((short)((p_23 <= p_24) > ((!(((signed char)((signed char)((!(((unsigned char)g_185 % (unsigned char)g_2) & p_24)) == p_23) / (signed char)g_73) >> (signed char)1) == p_24)) == p_26)) << (short)2)); + } + } + else + { + step_hash(315); + l_462 ^= ((l_398 > (p_24 < g_83)) > l_420); + } + } + else + { + unsigned char l_463 = 0UL; + int *l_464 = &g_21; + step_hash(318); + (*l_464) = (l_463 == 0L); + step_hash(319); + (*l_464) = p_23; + step_hash(331); + if (((unsigned short)(+p_23) >> (unsigned short)p_26)) + { + step_hash(321); + (*l_464) = ((-7L) | (((g_73 & g_6) | ((p_23 & func_33(g_185, ((unsigned char)((((unsigned short)g_21 * (unsigned short)((unsigned short)((signed char)((short)p_23 >> (short)11) - (signed char)0L) >> (unsigned short)7)) & ((-(unsigned)((unsigned char)p_23 << (unsigned char)5)) & g_73)) != 9L) - (unsigned char)(*l_464)), &g_214, l_431)) != 0x0BL)) != p_26)); + step_hash(328); + for (g_430 = 0; (g_430 >= 15); g_430 += 2) + { + int *l_482 = &g_185; + step_hash(325); + (*l_482) ^= (*l_464); + step_hash(326); + p_25 = (void*)0; + step_hash(327); + (*l_482) ^= (*l_464); + } + } + else + { + step_hash(330); + (*g_418) = (*g_418); + } + } + step_hash(333); + l_429 ^= ((signed char)(0xEEB07A1AL && ((unsigned char)(((short)(-7L) + (short)((signed char)(p_24 <= g_133) + (signed char)(&l_389 != &l_389))) <= ((void*)0 != (*l_389))) << (unsigned char)6)) % (signed char)func_56(g_491, p_26, p_23, p_26)); + step_hash(334); + (*g_418) = (*l_431); + step_hash(335); + (*l_389) = func_61(&g_214); + step_hash(336); + return l_389; +} +static int * func_29(unsigned short p_30, int * p_31, int * p_32) +{ + int **l_368 = &g_214; + unsigned char l_383 = 6UL; + int *l_388 = &g_73; + step_hash(279); + if ((*p_31)) + { + step_hash(253); + (*l_368) = func_61(l_368); + } + else + { + int *l_369 = (void*)0; + step_hash(255); + (*l_368) = l_369; + step_hash(278); + for (g_151 = 15; (g_151 <= 42); ++g_151) + { + int *l_380 = (void*)0; + step_hash(277); + if (g_185) + { + step_hash(260); + return p_31; + } + else + { + int l_374 = 0x0096045BL; + int *l_382 = &g_133; + step_hash(275); + for (g_185 = 0; (g_185 > (-29)); g_185 -= 1) + { + int *l_375 = (void*)0; + int l_379 = 0xA4210C70L; + } + step_hash(276); + (*l_382) ^= (*p_32); + } + } + } + step_hash(280); + (*l_388) = func_56((*l_368), l_383, (((unsigned char)p_30 * (unsigned char)0x6AL) & (0UL > 0xA7L)), p_30); + step_hash(281); + return (*l_368); +} +static unsigned short func_33(short p_34, unsigned p_35, int ** p_36, int ** p_37) +{ + step_hash(250); + return g_73; +} +static short func_40(int p_41, int p_42, int * p_43, unsigned char p_44) +{ + unsigned short l_85 = 0xDCDEL; + int *l_91 = &g_21; + int **l_90 = &l_91; + int *l_92 = &g_6; + unsigned l_101 = 0UL; + int l_134 = 0x68C1B86BL; + int *l_331 = &g_21; + step_hash(45); + if (l_85) + { + step_hash(41); + (*p_43) = g_73; + step_hash(42); + (*p_43) = 0xB81468F3L; + } + else + { + step_hash(44); + return g_73; + } + step_hash(46); + (*p_43) = (g_86 != g_86); + step_hash(247); + if ((*p_43)) + { + int *l_89 = &g_73; + int l_130 = 0xC8C67737L; + unsigned l_175 = 4294967295UL; + int **l_259 = &l_89; + step_hash(48); + (*l_89) ^= ((unsigned)g_21 % (unsigned)0x64EB7F04L); + step_hash(86); + if ((*l_89)) + { + step_hash(50); + return l_85; + } + else + { + int l_98 = (-1L); + int *l_102 = &g_73; + step_hash(58); + if (((void*)0 != l_90)) + { + signed char l_97 = 0xC4L; + int *l_99 = &g_100; + step_hash(53); + (*l_90) = l_92; + step_hash(54); + (*p_43) &= (*l_89); + step_hash(55); + (*l_99) |= (p_44 || ((signed char)((p_44 && ((&p_43 != &p_43) <= ((signed char)(func_50((*l_89), p_43, l_97) != (!l_98)) % (signed char)l_98))) ^ (**l_90)) % (signed char)l_98)); + } + else + { + step_hash(57); + return l_101; + } + step_hash(64); + if ((l_102 != (*l_90))) + { + unsigned l_109 = 4294967295UL; + step_hash(60); + (*l_89) = (g_6 != ((((((short)1L << (short)((short)g_6 >> (short)((-1L) == (((-6L) ^ (*l_89)) <= ((int)(((void*)0 != &p_43) < (*p_43)) / (int)(*p_43)))))) && (*l_92)) > 0x1EA71B31L) & g_6) > l_109)); + } + else + { + int ***l_110 = &g_86; + step_hash(62); + (*l_110) = g_86; + step_hash(63); + p_43 = func_61(&l_89); + } + step_hash(84); + if (g_2) + { + step_hash(71); + for (p_42 = 0; (p_42 > 2); ++p_42) + { + step_hash(69); + (*l_90) = &g_21; + step_hash(70); + (*l_90) = p_43; + } + step_hash(72); + (*l_102) = p_41; + step_hash(78); + for (l_85 = 9; (l_85 == 44); l_85++) + { + step_hash(76); + (*l_89) = ((~1L) || ((short)(0xC9E8L ^ (*l_102)) + (short)g_2)); + step_hash(77); + (*l_89) = ((int)g_6 - (int)p_44); + } + } + else + { + int l_127 = 0xBFD0B78AL; + int *l_128 = &g_21; + step_hash(80); + (*l_89) = (*l_92); + step_hash(81); + (*l_128) = ((*l_92) != ((unsigned)((unsigned)((unsigned)(g_6 >= ((int)(g_6 & (func_45((0x5BL == ((g_21 >= (func_56(p_43, p_44, g_6, g_73) >= l_127)) || 0UL)), g_2, l_128, g_6) < g_100)) / (int)(*l_128))) / (unsigned)0xFB7EBE1DL) % (unsigned)0xCCD07CA3L) % (unsigned)g_2)); + step_hash(82); + (*l_102) = (*l_128); + step_hash(83); + l_130 = (g_73 ^ (-(unsigned)((*l_128) == g_21))); + } + step_hash(85); + (*l_102) ^= ((unsigned short)g_21 << (unsigned short)15); + } + step_hash(200); + if ((g_133 ^ func_56(p_43, func_56((*l_90), l_134, (g_133 & ((signed char)p_44 + (signed char)p_42)), p_42), g_21, p_42))) + { + int l_139 = 0x616C39CFL; + int *l_158 = &l_130; + short l_223 = 0L; + step_hash(88); + (*l_90) = func_61(&l_91); + step_hash(123); + if (p_41) + { + signed char l_144 = 4L; + int *l_152 = (void*)0; + int l_199 = 0x01D5F7C6L; + step_hash(95); + for (p_41 = 0; (p_41 < (-27)); --p_41) + { + step_hash(93); + (*l_90) = p_43; + step_hash(94); + if ((*l_89)) + break; + } + step_hash(96); + (*l_89) &= l_139; + step_hash(117); + for (l_130 = 0; (l_130 == 20); l_130 += 5) + { + unsigned l_147 = 4294967289UL; + int l_150 = 0xCE84173BL; + int **l_174 = &l_89; + step_hash(105); + if (((((short)p_42 << (short)0) | l_144) & func_56(func_61(&p_43), p_41, ((short)(l_147 ^ 0x2DL) + (short)((signed char)(l_150 != l_144) + (signed char)g_83)), g_133))) + { + step_hash(101); + (*p_43) |= l_139; + step_hash(102); + (*l_89) = g_151; + } + else + { + step_hash(104); + (*l_90) = l_152; + } + step_hash(106); + (*l_89) = 0x4001E8EAL; + step_hash(107); + (*l_89) |= (-(int)((p_42 || p_44) < ((short)(*l_92) << (short)2))); + step_hash(116); + if (((unsigned char)func_50((func_56(l_158, ((void*)0 != g_86), ((unsigned short)l_147 << (unsigned short)((((int)(p_41 == (*l_158)) + (int)(((int)g_151 + (int)((0x03L > ((void*)0 == (*l_90))) ^ g_83)) != g_73)) ^ 255UL) | 0L)), g_73) | (*p_43)), p_43, g_21) << (unsigned char)g_100)) + { + step_hash(109); + (*l_90) = func_61(&p_43); + step_hash(110); + if ((*p_43)) + break; + } + else + { + int *l_169 = &g_100; + int *l_176 = (void*)0; + int *l_177 = (void*)0; + int *l_178 = &g_133; + step_hash(112); + (*l_178) &= func_56(p_43, ((signed char)((((((signed char)(((((l_169 != (void*)0) > 0xC119431DL) & (g_100 < ((unsigned short)((signed char)(g_73 <= ((((l_174 == (void*)0) <= l_175) | g_21) <= (*p_43))) * (signed char)255UL) >> (unsigned short)g_21))) & 2L) <= 0xA9A3L) + (signed char)p_41) & (*l_158)) & (*l_158)) == p_41) < p_44) - (signed char)1UL), g_6, (*l_89)); + step_hash(113); + (*l_178) |= func_45(((short)((short)(p_44 > g_151) + (short)func_56(l_158, ((signed char)p_41 / (signed char)p_42), g_185, g_21)) >> (short)g_21), (*l_158), l_158, g_83); + step_hash(114); + (*l_178) ^= ((signed char)(((func_50(g_6, p_43, (p_42 == ((((unsigned short)((((func_56(l_158, p_42, ((254UL | ((p_41 < ((unsigned short)((*l_158) == (((signed char)((signed char)((signed char)(((-(short)func_45(g_73, p_44, &g_73, (*l_169))) > 255UL) ^ p_44) % (signed char)g_73) >> (signed char)2) - (signed char)(-10L)) >= (*l_158))) >> (unsigned short)g_73)) >= 0xBFL)) & 0xCF18L), p_44) || g_83) != 0L) | g_100) ^ l_199) / (unsigned short)(-1L)) == g_6) <= p_42))) | p_41) >= p_44) >= p_42) >> (signed char)0); + step_hash(115); + p_43 = l_158; + } + } + } + else + { + int l_206 = 7L; + int **l_213 = (void*)0; + step_hash(119); + (*l_89) = ((((unsigned char)255UL / (unsigned char)((unsigned char)((unsigned char)(*l_158) << (unsigned char)6) - (unsigned char)l_206)) ^ (p_43 != &l_130)) != ((g_6 | ((0UL < (((short)(&p_43 != &p_43) << (short)4) < (*l_89))) | g_73)) > p_41)); + step_hash(120); + g_185 |= (*l_89); + step_hash(121); + g_214 = &g_21; + step_hash(122); + (*l_90) = p_43; + } + step_hash(152); + for (g_151 = (-8); (g_151 < 19); g_151 += 7) + { + int *l_221 = &g_100; + step_hash(127); + (*l_158) &= (*l_89); + step_hash(128); + p_43 = (void*)0; + step_hash(129); + g_214 = func_61(&p_43); + step_hash(151); + for (p_41 = 0; (p_41 <= 15); ++p_41) + { + int *l_230 = &g_73; + step_hash(139); + for (l_101 = 23; (l_101 >= 38); l_101 += 3) + { + unsigned l_222 = 0UL; + step_hash(136); + (*l_90) = l_221; + step_hash(137); + (*l_90) = func_61(&l_221); + step_hash(138); + (*p_43) ^= l_222; + } + step_hash(140); + (*l_158) |= (*p_43); + step_hash(141); + if ((*l_89)) + break; + step_hash(150); + if (l_223) + { + unsigned l_235 = 0xA20A0228L; + step_hash(143); + (*l_221) = ((signed char)((short)((65532UL || ((int)((func_56(p_43, func_56(l_230, ((int)(p_44 ^ g_73) - (int)9L), g_73, ((signed char)l_235 << (signed char)((((unsigned short)65530UL << (unsigned short)g_83) <= (*l_89)) | g_151))), g_151, l_175) >= p_41) && (*l_221)) % (int)g_2)) ^ (*p_43)) << (short)p_41) + (signed char)1UL); + step_hash(144); + (*l_158) = (*p_43); + step_hash(145); + (*l_90) = (void*)0; + step_hash(146); + (*p_43) = 0xEC8503F6L; + } + else + { + step_hash(148); + (*l_158) &= 0x4E080E16L; + step_hash(149); + (*l_158) ^= (*l_221); + } + } + } + } + else + { + int l_242 = 0x8FC63146L; + int ***l_291 = &l_90; + step_hash(154); + (*g_214) ^= 0x3FE045DEL; + step_hash(198); + if (((signed char)func_56(p_43, ((unsigned short)(l_242 < (func_56(func_61(&g_214), p_42, ((short)((int)p_41 % (int)g_83) - (short)(g_133 < (g_133 >= g_6))), g_133) || p_42)) - (unsigned short)65535UL), p_42, g_133) + (signed char)g_133)) + { + int *l_249 = &g_133; + step_hash(156); + (*l_249) &= (g_6 >= (l_242 | (func_56(&l_130, (*l_92), (*l_89), p_44) != p_44))); + step_hash(157); + l_242 |= 0xD457A838L; + step_hash(158); + (*g_214) &= (*l_92); + } + else + { + int l_264 = 0x5AFF450AL; + int l_265 = 0xE78FCAF2L; + int l_307 = (-1L); + step_hash(160); + (*g_214) |= (-8L); + step_hash(161); + (*g_214) &= (-4L); + step_hash(182); + for (g_100 = 27; (g_100 <= (-13)); g_100 -= 9) + { + short l_258 = 0x3CCFL; + int l_266 = 0x3B1FCE4BL; + int ***l_274 = (void*)0; + } + step_hash(197); + for (g_133 = 0; (g_133 <= 14); g_133 += 2) + { + short l_285 = 0L; + step_hash(195); + if ((*l_89)) + { + int *l_286 = &g_100; + step_hash(187); + if ((*l_89)) + break; + step_hash(188); + (*l_286) &= ((signed char)((unsigned)((unsigned char)(**l_259) - (unsigned char)((void*)0 != &g_214)) + (unsigned)(**l_259)) * (signed char)func_45(((l_285 == 0x3C99L) || (*l_92)), g_6, &g_185, p_44)); + step_hash(189); + (*l_286) &= (p_44 > (*g_214)); + step_hash(190); + (*l_89) = ((void*)0 != l_291); + } + else + { + int *l_302 = &l_242; + step_hash(192); + (*l_89) = (**l_259); + step_hash(193); + (*g_214) = ((int)((unsigned)0UL - (unsigned)l_285) / (int)0x16205D54L); + step_hash(194); + (*g_214) = ((unsigned char)g_73 * (unsigned char)(p_44 ^ (func_45(l_264, (func_45(((unsigned short)((short)(+((unsigned short)((unsigned char)((*l_89) & (((g_21 || ((p_44 >= 0xDDDDL) >= (((unsigned char)((void*)0 == &l_90) << (unsigned char)7) == g_21))) ^ 0x89C775E3L) < 0xD65FL)) >> (unsigned char)p_42) * (unsigned short)g_151)) + (short)0x3B07L) + (unsigned short)l_285), l_285, &l_307, g_151) != g_185), l_302, p_44) != p_44))); + } + step_hash(196); + (*g_214) = (*l_89); + } + } + step_hash(199); + (*g_214) = (0x9C7FL <= (((unsigned char)((*l_92) | p_42) % (unsigned char)(**l_259)) || g_83)); + } + step_hash(201); + (**l_259) = (-1L); + } + else + { + int l_336 = 0L; + int *l_351 = &g_6; + unsigned short l_362 = 65534UL; + step_hash(245); + for (p_41 = (-17); (p_41 < (-7)); p_41 += 4) + { + unsigned short l_330 = 65535UL; + int l_333 = 0x139A6BB7L; + step_hash(244); + for (g_83 = (-10); (g_83 == (-29)); g_83 -= 6) + { + int **l_339 = &l_91; + int l_350 = (-7L); + } + } + step_hash(246); + (*l_90) = func_61(&g_214); + } + step_hash(248); + return g_73; +} +static int func_45(short p_46, unsigned p_47, int * p_48, unsigned char p_49) +{ + step_hash(38); + return (*p_48); +} +static int func_50(short p_51, int * p_52, int p_53) +{ + int *l_64 = &g_21; + int **l_63 = &l_64; + step_hash(34); + (*p_52) = (0x197CL || func_56(func_61(l_63), p_51, p_51, ((short)(g_6 == ((signed char)((g_6 & (l_63 == (void*)0)) & g_6) - (signed char)0UL)) << (short)g_2))); + step_hash(35); + (**l_63) = g_21; + step_hash(36); + return (**l_63); +} +static unsigned short func_56(int * p_57, unsigned p_58, int p_59, int p_60) +{ + int l_82 = 7L; + int *l_84 = &g_73; + step_hash(32); + (*l_84) = ((short)(&g_21 == &g_73) >> (short)((+((short)g_21 * (short)0x0D3DL)) <= (l_82 && g_83))); + step_hash(33); + return g_21; +} +static int * func_61(int ** p_62) +{ + int *l_65 = (void*)0; + step_hash(18); + (*p_62) = l_65; + step_hash(19); + (*p_62) = &g_21; + step_hash(24); + for (g_21 = 0; (g_21 > (-15)); --g_21) + { + step_hash(23); + return l_65; + } + step_hash(29); + for (g_21 = 0; (g_21 < (-24)); --g_21) + { + short l_70 = (-6L); + int *l_71 = (void*)0; + int *l_72 = &g_73; + step_hash(28); + (*l_72) &= l_70; + } + step_hash(30); + return (*p_62); +} +void csmith_compute_hash(void) +{ + transparent_crc(g_2, "g_2", print_hash_value); + transparent_crc(g_6, "g_6", print_hash_value); + transparent_crc(g_21, "g_21", print_hash_value); + transparent_crc(g_73, "g_73", print_hash_value); + transparent_crc(g_83, "g_83", print_hash_value); + transparent_crc(g_100, "g_100", print_hash_value); + transparent_crc(g_133, "g_133", print_hash_value); + transparent_crc(g_151, "g_151", print_hash_value); + transparent_crc(g_185, "g_185", print_hash_value); + transparent_crc(g_430, "g_430", print_hash_value); + transparent_crc(g_574, "g_574", print_hash_value); + transparent_crc(g_601, "g_601", print_hash_value); + transparent_crc(g_654, "g_654", print_hash_value); +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand43.expect b/src/tests/csmith/rand43.expect new file mode 100644 index 0000000..df65c39 --- /dev/null +++ b/src/tests/csmith/rand43.expect @@ -0,0 +1,112 @@ +...checksum after hashing g_2 : 474AC3E9 +...checksum after hashing g_6 : 254FAAE8 +...checksum after hashing g_21 : 708C217B +...checksum after hashing g_73 : 56DE307A +...checksum after hashing g_83 : DF727E7E +...checksum after hashing g_100 : 33A016D5 +...checksum after hashing g_133 : D0D7445B +...checksum after hashing g_151 : 4B98AA52 +...checksum after hashing g_185 : 626D9262 +...checksum after hashing g_430 : E3A8B977 +...checksum after hashing g_574 : E14D68EC +...checksum after hashing g_601 : CA4037CB +...checksum after hashing g_654 : 58832017 +before stmt(1): checksum = 58832017 +...checksum after hashing g_2 : 474AC3E9 +...checksum after hashing g_6 : 9DFA96FE +...checksum after hashing g_21 : 7487548F +...checksum after hashing g_73 : E97906E3 +...checksum after hashing g_83 : 8544CD41 +...checksum after hashing g_100 : 5E5297F4 +...checksum after hashing g_133 : 3D27636D +...checksum after hashing g_151 : 69DD2232 +...checksum after hashing g_185 : EE03D5FD +...checksum after hashing g_430 : 6C2E5AE2 +...checksum after hashing g_574 : D0A9B6FF +...checksum after hashing g_601 : 6437E152 +...checksum after hashing g_654 : 40DFA665 +before stmt(445): checksum = 40DFA665 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_6 : 32CC39C +...checksum after hashing g_21 : 4F0A5B86 +...checksum after hashing g_73 : A00B0176 +...checksum after hashing g_83 : 189C2812 +...checksum after hashing g_100 : EF9C851D +...checksum after hashing g_133 : 60ED631B +...checksum after hashing g_151 : 346CFFF +...checksum after hashing g_185 : F4CC7B42 +...checksum after hashing g_430 : 4BD946BF +...checksum after hashing g_574 : 205F985 +...checksum after hashing g_601 : 711C2B4A +...checksum after hashing g_654 : 52E7D301 +before stmt(5): checksum = 52E7D301 +...checksum after hashing g_2 : FFFFFFFF +...checksum after hashing g_6 : 99F1E30A +...checksum after hashing g_21 : CB206216 +...checksum after hashing g_73 : B34FB5DC +...checksum after hashing g_83 : E8B64C60 +...checksum after hashing g_100 : B3A2B0C2 +...checksum after hashing g_133 : 1F62EB0D +...checksum after hashing g_151 : E5B365AD +...checksum after hashing g_185 : 61853668 +...checksum after hashing g_430 : 5DCA84F1 +...checksum after hashing g_574 : 7EDE6066 +...checksum after hashing g_601 : 7C6B6720 +...checksum after hashing g_654 : 6133234E +before stmt(5): checksum = 6133234E +...checksum after hashing g_2 : 4743989A +...checksum after hashing g_6 : 555BE394 +...checksum after hashing g_21 : 50852E79 +...checksum after hashing g_73 : 1D27244D +...checksum after hashing g_83 : 8DD17726 +...checksum after hashing g_100 : 3287D5E5 +...checksum after hashing g_133 : 1ED71610 +...checksum after hashing g_151 : 14696007 +...checksum after hashing g_185 : F4F5E2FD +...checksum after hashing g_430 : F28E16B6 +...checksum after hashing g_574 : 54F65804 +...checksum after hashing g_601 : 41DA8BFC +...checksum after hashing g_654 : 8FFDF43 +before stmt(5): checksum = 8FFDF43 +...checksum after hashing g_2 : 55F63774 +...checksum after hashing g_6 : DBD4E477 +...checksum after hashing g_21 : 271BFC89 +...checksum after hashing g_73 : 34EF90BF +...checksum after hashing g_83 : 22783AEC +...checksum after hashing g_100 : 6A997CCD +...checksum after hashing g_133 : 1C091137 +...checksum after hashing g_151 : DD7668B8 +...checksum after hashing g_185 : 90159903 +...checksum after hashing g_430 : D832A63E +...checksum after hashing g_574 : 2A8E10A2 +...checksum after hashing g_601 : 708BE98 +...checksum after hashing g_654 : B2AADB54 +before stmt(446): checksum = B2AADB54 +...checksum after hashing g_2 : 55F63774 +...checksum after hashing g_6 : DBD4E477 +...checksum after hashing g_21 : 271BFC89 +...checksum after hashing g_73 : 34EF90BF +...checksum after hashing g_83 : 22783AEC +...checksum after hashing g_100 : 6A997CCD +...checksum after hashing g_133 : 1C091137 +...checksum after hashing g_151 : DD7668B8 +...checksum after hashing g_185 : 90159903 +...checksum after hashing g_430 : D832A63E +...checksum after hashing g_574 : 2A8E10A2 +...checksum after hashing g_601 : 708BE98 +...checksum after hashing g_654 : B2AADB54 +before stmt(447): checksum = B2AADB54 +...checksum after hashing g_2 : 55F63774 +...checksum after hashing g_6 : DBD4E477 +...checksum after hashing g_21 : 271BFC89 +...checksum after hashing g_73 : 34EF90BF +...checksum after hashing g_83 : 22783AEC +...checksum after hashing g_100 : 6A997CCD +...checksum after hashing g_133 : 1C091137 +...checksum after hashing g_151 : DD7668B8 +...checksum after hashing g_185 : 90159903 +...checksum after hashing g_430 : D832A63E +...checksum after hashing g_574 : 2A8E10A2 +...checksum after hashing g_601 : 708BE98 +...checksum after hashing g_654 : B2AADB54 +checksum = b2aadb54 diff --git a/src/tests/csmith/rand44.c b/src/tests/csmith/rand44.c new file mode 100644 index 0000000..c510d63 --- /dev/null +++ b/src/tests/csmith/rand44.c @@ -0,0 +1,565 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static int g_2 = (-4L); +static int *g_40 = &g_2; +static int **g_39 = &g_40; +static int g_63 = 0x7BDE5156L; +static int g_95 = 0xE1600452L; +static unsigned g_176 = 4294967295UL; +static unsigned g_221 = 0xAC3D2276L; +static unsigned char g_277 = 0xF2L; +static int g_300 = 0x6D31335AL; +static unsigned short g_359 = 0x618FL; +static int g_367 = 0xDD253935L; +static unsigned short g_374 = 0xDBE7L; +static int g_403 = (-10L); +static unsigned short g_449 = 0xDF23L; +static unsigned char g_507 = 0x61L; +static unsigned func_1(void); +static int func_7(int p_8, unsigned p_9, unsigned p_10, int p_11, unsigned p_12); +static int func_13(unsigned short p_14, unsigned short p_15, int p_16, int p_17, unsigned char p_18); +static signed char func_23(unsigned char p_24, int p_25); +static unsigned short func_31(int p_32, unsigned short p_33); +static int func_36(int p_37, int ** p_38); +static signed char func_41(int p_42, int p_43, unsigned char p_44, int ** p_45, short p_46); +static unsigned char func_55(int p_56, short p_57, short p_58, short p_59, int p_60); +static int * func_64(int ** p_65, int p_66, int p_67, int ** p_68, short p_69); +static int * func_75(int p_76, int ** p_77); +static unsigned func_1(void) +{ + unsigned l_6 = 7UL; + unsigned char l_466 = 7UL; + int *l_472 = &g_367; + int ***l_479 = &g_39; + int l_491 = 0x95FC5889L; + step_hash(294); + for (g_2 = 0; (g_2 > 24); g_2 += 1) + { + short l_28 = (-10L); + int *l_431 = (void*)0; + unsigned char l_456 = 0xD1L; + int ***l_467 = &g_39; + signed char l_511 = (-8L); + } + step_hash(295); + (**g_39) ^= ((**l_479) != (**l_479)); + step_hash(296); + return g_63; +} +static int func_7(int p_8, unsigned p_9, unsigned p_10, int p_11, unsigned p_12) +{ + int l_420 = 0x0AC639BBL; + int ***l_425 = (void*)0; + step_hash(232); + if (p_8) + { + int *l_408 = &g_63; + step_hash(223); + (*l_408) &= 0x88A73BF4L; + step_hash(228); + for (g_277 = 0; (g_277 <= 5); ++g_277) + { + signed char l_411 = 0xC0L; + step_hash(227); + return l_411; + } + } + else + { + unsigned char l_423 = 0UL; + int ***l_424 = &g_39; + int *l_428 = &g_367; + step_hash(230); + (*l_428) ^= ((signed char)p_12 / (signed char)((short)(((short)((signed char)l_420 / (signed char)(((short)l_423 * (short)p_11) | (l_423 | ((+(l_424 == l_425)) < ((((unsigned short)g_2 * (unsigned short)((void*)0 == &p_8)) & g_221) || p_9))))) << (short)3) == g_374) >> (short)15)); + step_hash(231); + (*l_428) |= (((void*)0 == &g_40) || ((g_277 | p_10) > (((void*)0 == l_425) ^ p_9))); + } + step_hash(233); + return g_367; +} +static int func_13(unsigned short p_14, unsigned short p_15, int p_16, int p_17, unsigned char p_18) +{ + signed char l_344 = 0x3FL; + int *l_392 = &g_63; + step_hash(219); + for (p_14 = 0; (p_14 < 25); p_14++) + { + int **l_345 = &g_40; + short l_346 = 0L; + int *l_354 = &g_2; + short l_400 = 0xE9ACL; + step_hash(174); + g_63 = (((signed char)(4294967295UL | (((short)(((unsigned)((short)((p_15 <= g_95) <= ((-8L) >= 0xAA05L)) - (short)l_344) - (unsigned)(*g_40)) == p_18) << (short)l_346) && 0x3855L)) * (signed char)(**l_345)) ^ l_344); + step_hash(217); + for (g_221 = 0; (g_221 >= 46); g_221++) + { + unsigned l_349 = 1UL; + int **l_380 = (void*)0; + int *l_393 = &g_95; + step_hash(216); + if (l_349) + { + step_hash(193); + for (l_349 = 6; (l_349 <= 19); l_349 += 6) + { + int l_365 = (-2L); + step_hash(186); + for (p_17 = 7; (p_17 == (-29)); p_17 -= 2) + { + step_hash(185); + (*l_345) = l_354; + } + step_hash(192); + for (g_277 = 0; (g_277 > 17); g_277++) + { + int *l_360 = &g_63; + int *l_366 = &g_367; + step_hash(190); + (*l_366) ^= ((g_359 & (((l_360 != (void*)0) >= func_23(l_349, ((signed char)p_18 * (signed char)g_300))) <= ((int)((l_349 || g_2) & g_2) + (int)0x1F6F16E7L))) != l_365); + step_hash(191); + if (p_15) + continue; + } + } + } + else + { + step_hash(195); + (*l_345) = &p_16; + step_hash(215); + for (p_17 = 0; (p_17 >= 11); p_17++) + { + unsigned char l_372 = 0x82L; + int *l_383 = (void*)0; + step_hash(205); + for (g_367 = 0; (g_367 != 9); ++g_367) + { + unsigned l_381 = 0UL; + int l_382 = 0x43FA7BD6L; + step_hash(202); + l_382 = ((l_372 & 0xDDL) == (-(unsigned char)(g_63 >= 0x1894L))); + step_hash(203); + (**l_345) = (((func_55(g_2, g_367, g_300, l_344, g_300) || ((void*)0 != l_383)) != (((signed char)(p_15 ^ l_381) * (signed char)p_16) < 0xE245L)) >= p_16); + step_hash(204); + return l_344; + } + step_hash(206); + (*l_392) |= (((short)((unsigned char)((p_18 > ((short)(**l_345) - (short)g_221)) <= (l_392 == l_393)) + (unsigned char)g_367) + (short)((unsigned)((void*)0 != &p_16) - (unsigned)((signed char)p_18 / (signed char)1L))) != g_2); + step_hash(207); + (*l_345) = l_392; + step_hash(214); + if (g_403) + { + step_hash(209); + (*l_393) = (((unsigned char)(7L > ((int)(**l_345) / (int)(*l_392))) % (unsigned char)(*l_392)) && p_16); + step_hash(210); + (*l_393) = p_15; + step_hash(211); + (*l_345) = &p_16; + } + else + { + step_hash(213); + (*l_345) = &p_16; + } + } + } + } + step_hash(218); + (*l_392) |= (-2L); + } + step_hash(220); + return (*l_392); +} +static signed char func_23(unsigned char p_24, int p_25) +{ + int **l_313 = &g_40; + int *l_329 = &g_63; + step_hash(165); + if ((*g_40)) + { + unsigned l_316 = 7UL; + int *l_317 = &g_63; + step_hash(154); + (*l_317) = ((unsigned char)l_316 >> (unsigned char)2); + } + else + { + int *l_318 = &g_63; + unsigned char l_323 = 0x56L; + step_hash(164); + if ((&g_40 != (void*)0)) + { + step_hash(157); + (*l_313) = &g_63; + step_hash(158); + (*l_313) = l_318; + } + else + { + int l_319 = (-1L); + int **l_328 = &l_318; + step_hash(160); + (*l_318) &= (p_24 < 65534UL); + step_hash(161); + (*l_313) = l_318; + step_hash(162); + (*l_318) = l_319; + step_hash(163); + (*l_328) = (*l_313); + } + } + step_hash(166); + (*l_313) = (*l_313); + step_hash(167); + (*l_329) &= 8L; + step_hash(168); + g_95 &= ((*l_329) || ((unsigned char)0xE9L << (unsigned char)(((*l_329) != p_24) != (g_63 | ((unsigned char)255UL >> (unsigned char)(&l_313 == (void*)0)))))); + step_hash(169); + return g_63; +} +static unsigned short func_31(int p_32, unsigned short p_33) +{ + int *l_35 = (void*)0; + int **l_34 = &l_35; + unsigned l_226 = 0x5A92DE46L; + signed char l_309 = 0L; + int l_312 = 0xEA69420AL; + step_hash(5); + (*l_34) = (void*)0; + step_hash(145); + if (func_36(g_2, g_39)) + { + unsigned char l_196 = 0x45L; + step_hash(99); + if (((unsigned char)(p_33 && g_95) / (unsigned char)l_196)) + { + int l_199 = 0xB0BF173BL; + step_hash(90); + for (g_176 = 0; (g_176 >= 25); g_176 += 1) + { + step_hash(89); + return l_199; + } + step_hash(91); + (*l_34) = (void*)0; + } + else + { + int **l_209 = &g_40; + step_hash(97); + for (l_196 = 0; (l_196 > 51); ++l_196) + { + unsigned l_206 = 4294967295UL; + int l_210 = (-4L); + step_hash(96); + l_210 = ((((unsigned short)g_176 / (unsigned short)(g_176 || (~((signed char)(l_206 || ((short)(-1L) >> (short)(&g_40 != l_209))) * (signed char)(l_209 == &l_35))))) ^ p_32) >= 0x12L); + } + step_hash(98); + return g_95; + } + } + else + { + int ***l_211 = &l_34; + int *l_212 = &g_95; + short l_220 = 1L; + step_hash(101); + (*l_211) = &l_35; + step_hash(102); + (*l_212) = 0x001B998DL; + step_hash(144); + for (g_95 = 0; (g_95 >= (-3)); g_95 -= 8) + { + int *l_215 = &g_63; + step_hash(106); + g_63 |= (&l_34 == &l_34); + step_hash(107); + (*l_215) &= (&g_39 != &g_39); + step_hash(108); + (*l_215) &= (g_2 < g_95); + } + } + step_hash(150); + if (p_33) + { + int l_305 = 0L; + int **l_306 = &l_35; + int l_310 = 0x284332C9L; + step_hash(147); + g_95 |= ((unsigned)((short)p_32 / (short)0xD74CL) / (unsigned)l_310); + } + else + { + unsigned l_311 = 2UL; + step_hash(149); + l_312 ^= (((((p_32 || ((((5L > l_311) || (&l_35 == &g_40)) >= l_311) & l_311)) && g_221) == l_311) | 0xBDD3L) < 1L); + } + step_hash(151); + return p_33; +} +static int func_36(int p_37, int ** p_38) +{ + unsigned l_61 = 0UL; + int *l_107 = &g_95; + unsigned short l_167 = 0UL; + int *l_177 = &g_95; + unsigned l_185 = 4294967293UL; + step_hash(81); + if (((func_41((((signed char)((void*)0 != p_38) << (signed char)((unsigned short)((signed char)((unsigned char)func_55(g_2, p_37, l_61, p_37, (l_61 <= (0xC1C73B01L >= (0xF851L && l_61)))) >> (unsigned char)g_2) * (signed char)l_61) + (unsigned short)0x1C25L)) & l_61), g_2, g_2, &g_40, p_37) < 0x2FL) != l_61)) + { + int **l_88 = &g_40; + int *l_89 = &g_63; + step_hash(25); + for (p_37 = 0; (p_37 >= (-19)); p_37--) + { + step_hash(24); + l_88 = p_38; + } + step_hash(26); + (*l_89) = l_61; + } + else + { + signed char l_92 = 0xB2L; + int **l_96 = &g_40; + unsigned char l_113 = 0x49L; + int *l_146 = &g_2; + int l_148 = (-3L); + int l_155 = 3L; + step_hash(28); + (*p_38) = (*g_39); + step_hash(29); + g_95 &= func_55((p_37 || func_41((**p_38), (((unsigned short)((p_37 >= l_92) || l_61) - (unsigned short)(0xF1L <= ((unsigned short)((-1L) & (&g_40 != (void*)0)) >> (unsigned short)g_2))) & (**p_38)), l_92, &g_40, p_37)), p_37, p_37, g_2, g_2); + step_hash(80); + if (((l_92 == ((g_63 & p_37) > l_61)) == g_63)) + { + signed char l_116 = (-1L); + int *l_133 = (void*)0; + int l_156 = (-10L); + unsigned l_172 = 4294967295UL; + signed char l_175 = 0x41L; + step_hash(68); + if (((void*)0 == l_96)) + { + unsigned char l_110 = 255UL; + int l_118 = (-1L); + int *l_126 = &g_63; + int l_130 = 0x845370BFL; + step_hash(62); + if (((signed char)(-8L) - (signed char)((unsigned short)((l_61 >= g_95) == p_37) + (unsigned short)((unsigned short)((short)func_55((g_2 != ((unsigned)((void*)0 != l_107) / (unsigned)func_41((**p_38), func_55(((signed char)(0xECD02AC2L == 4294967295UL) << (signed char)3), p_37, p_37, p_37, (**l_96)), g_95, p_38, g_95))), g_2, g_2, p_37, l_110) % (short)5L) / (unsigned short)0x812EL)))) + { + unsigned l_117 = 0x86D35063L; + step_hash(33); + (*l_107) ^= (-1L); + step_hash(40); + if ((l_110 == ((**l_96) <= (l_113 != (!func_55(g_95, (func_55(func_55((**l_96), p_37, g_2, g_95, ((func_55((((*g_39) != (*g_39)) | 0UL), l_116, g_95, l_117, l_116) > g_95) > p_37)), g_95, (**l_96), g_2, l_118) >= (**p_38)), g_95, p_37, (**l_96))))))) + { + step_hash(35); + (*l_107) = (l_117 || (l_116 & (l_118 <= (func_41(l_117, ((short)((*g_39) == (void*)0) >> (short)(+p_37)), p_37, p_38, (**l_96)) || p_37)))); + } + else + { + step_hash(37); + (*l_107) |= (*g_40); + step_hash(38); + (*g_39) = (*g_39); + step_hash(39); + (*l_107) = 0xB11E678BL; + } + } + else + { + int *l_123 = &g_95; + unsigned short l_129 = 0x92F2L; + step_hash(42); + (*p_38) = func_75(func_41((**l_96), ((0x3AL ^ p_37) || (((short)func_55((*l_107), (l_123 != (*g_39)), ((short)(func_55(((l_126 == (void*)0) == ((unsigned short)(+(+func_55((*l_126), (*l_123), p_37, p_37, l_129))) + (unsigned short)g_95)), g_2, p_37, g_95, p_37) ^ 1UL) >> (short)p_37), l_116, g_2) % (short)p_37) || g_63)), l_130, p_38, g_2), g_39); + step_hash(49); + for (l_92 = (-4); (l_92 != (-13)); --l_92) + { + } + step_hash(55); + for (l_110 = (-10); (l_110 > 7); ++l_110) + { + step_hash(53); + (*l_123) |= (func_55((p_38 == (void*)0), (**l_96), p_37, p_37, g_2) & (((l_96 != l_96) | 65529UL) == 0xC8L)); + step_hash(54); + if ((*l_123)) + break; + } + step_hash(61); + for (g_95 = 24; (g_95 != 20); g_95 -= 9) + { + int **l_147 = (void*)0; + step_hash(59); + (*l_126) ^= l_148; + step_hash(60); + (*g_39) = func_64(&g_40, ((((((unsigned)p_37 - (unsigned)0xC86C8505L) == (p_37 | (g_95 >= (7UL != g_63)))) && ((signed char)0x13L / (signed char)(-1L))) != (*l_107)) ^ p_37), (**g_39), &g_40, (*l_123)); + } + } + step_hash(63); + (*l_107) |= (**g_39); + step_hash(64); + l_133 = func_75(p_37, &g_40); + step_hash(65); + l_156 |= func_55(func_55(g_95, g_2, (*l_126), (p_37 < ((signed char)(g_2 <= g_95) >> (signed char)(((void*)0 == &l_146) | (*l_133)))), g_95), p_37, l_155, p_37, p_37); + } + else + { + step_hash(67); + (*l_107) = (((signed char)((**l_96) || ((short)0x2ABAL >> (short)14)) * (signed char)p_37) && (p_38 != &g_40)); + } + step_hash(69); + (*l_107) = (((short)p_37 * (short)((((signed char)(((int)l_167 - (int)(*l_107)) > (g_95 || ((unsigned char)(((int)(*g_40) - (int)(*g_40)) < g_63) * (unsigned char)((l_172 > ((signed char)(**l_96) % (signed char)0x6DL)) ^ l_175)))) << (signed char)g_2) >= g_176) || p_37)) && g_2); + step_hash(70); + (*l_107) = (p_37 ^ func_55(p_37, (*l_107), (*l_146), g_95, g_95)); + } + else + { + step_hash(72); + (*g_39) = l_177; + step_hash(73); + (*g_39) = (*l_96); + step_hash(78); + for (l_148 = 0; (l_148 < (-4)); l_148--) + { + int ***l_180 = &g_39; + step_hash(77); + (*l_180) = (void*)0; + } + step_hash(79); + (*l_96) = (*p_38); + } + } + step_hash(82); + (*l_177) = (*g_40); + step_hash(83); + return (*g_40); +} +static signed char func_41(int p_42, int p_43, unsigned char p_44, int ** p_45, short p_46) +{ + int l_74 = 0x07675E6DL; + int *l_85 = (void*)0; + step_hash(18); + l_85 = func_64(p_45, (*g_40), (((signed char)((void*)0 == p_45) + (signed char)(g_2 != ((unsigned char)g_2 / (unsigned char)func_55(p_42, p_43, g_2, l_74, p_44)))) >= (*g_40)), &g_40, p_42); + step_hash(19); + return g_2; +} +static unsigned char func_55(int p_56, short p_57, short p_58, short p_59, int p_60) +{ + int *l_62 = &g_63; + step_hash(8); + (*l_62) = 0x8592840CL; + step_hash(9); + return g_2; +} +static int * func_64(int ** p_65, int p_66, int p_67, int ** p_68, short p_69) +{ + step_hash(16); + (*p_68) = func_75((((*p_65) != (void*)0) & 0x02L), p_68); + step_hash(17); + return (*p_68); +} +static int * func_75(int p_76, int ** p_77) +{ + unsigned l_82 = 4294967295UL; + int **l_83 = &g_40; + int *l_84 = &g_63; + step_hash(13); + (*l_84) |= (g_2 <= ((unsigned short)(p_76 && ((short)g_2 + (short)(l_82 | (((void*)0 != &g_40) != 0x3044B131L)))) % (unsigned short)((p_76 < (l_83 != l_83)) | (**l_83)))); + step_hash(14); + p_77 = &l_84; + step_hash(15); + return (*g_39); +} +void csmith_compute_hash(void) +{ + transparent_crc(g_2, "g_2", print_hash_value); + transparent_crc(g_63, "g_63", print_hash_value); + transparent_crc(g_95, "g_95", print_hash_value); + transparent_crc(g_176, "g_176", print_hash_value); + transparent_crc(g_221, "g_221", print_hash_value); + transparent_crc(g_277, "g_277", print_hash_value); + transparent_crc(g_300, "g_300", print_hash_value); + transparent_crc(g_359, "g_359", print_hash_value); + transparent_crc(g_367, "g_367", print_hash_value); + transparent_crc(g_374, "g_374", print_hash_value); + transparent_crc(g_403, "g_403", print_hash_value); + transparent_crc(g_449, "g_449", print_hash_value); + transparent_crc(g_507, "g_507", print_hash_value); +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand44.expect b/src/tests/csmith/rand44.expect new file mode 100644 index 0000000..3bf8fbe --- /dev/null +++ b/src/tests/csmith/rand44.expect @@ -0,0 +1,56 @@ +...checksum after hashing g_2 : ED4A5011 +...checksum after hashing g_63 : 2A04ACC0 +...checksum after hashing g_95 : EC414F70 +...checksum after hashing g_176 : AFD84589 +...checksum after hashing g_221 : 8D9525B +...checksum after hashing g_277 : 203E8529 +...checksum after hashing g_300 : 16E8732E +...checksum after hashing g_359 : A9421AD7 +...checksum after hashing g_367 : 1AEDE653 +...checksum after hashing g_374 : 895504C9 +...checksum after hashing g_403 : DD132BB0 +...checksum after hashing g_449 : A5F1A5A1 +...checksum after hashing g_507 : 23A1290A +before stmt(294): checksum = 23A1290A +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_63 : 3E568BB5 +...checksum after hashing g_95 : 1FF5A410 +...checksum after hashing g_176 : 955445D1 +...checksum after hashing g_221 : 575A7BE3 +...checksum after hashing g_277 : 241E19DE +...checksum after hashing g_300 : 6BB9FC1F +...checksum after hashing g_359 : 86A8B83A +...checksum after hashing g_367 : EB44D087 +...checksum after hashing g_374 : B5FA760F +...checksum after hashing g_403 : DFB0FAF5 +...checksum after hashing g_449 : EE54DCAF +...checksum after hashing g_507 : AA20DD52 +before stmt(295): checksum = AA20DD52 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_63 : 3E568BB5 +...checksum after hashing g_95 : 1FF5A410 +...checksum after hashing g_176 : 955445D1 +...checksum after hashing g_221 : 575A7BE3 +...checksum after hashing g_277 : 241E19DE +...checksum after hashing g_300 : 6BB9FC1F +...checksum after hashing g_359 : 86A8B83A +...checksum after hashing g_367 : EB44D087 +...checksum after hashing g_374 : B5FA760F +...checksum after hashing g_403 : DFB0FAF5 +...checksum after hashing g_449 : EE54DCAF +...checksum after hashing g_507 : AA20DD52 +before stmt(296): checksum = AA20DD52 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_63 : 3E568BB5 +...checksum after hashing g_95 : 1FF5A410 +...checksum after hashing g_176 : 955445D1 +...checksum after hashing g_221 : 575A7BE3 +...checksum after hashing g_277 : 241E19DE +...checksum after hashing g_300 : 6BB9FC1F +...checksum after hashing g_359 : 86A8B83A +...checksum after hashing g_367 : EB44D087 +...checksum after hashing g_374 : B5FA760F +...checksum after hashing g_403 : DFB0FAF5 +...checksum after hashing g_449 : EE54DCAF +...checksum after hashing g_507 : AA20DD52 +checksum = aa20dd52 diff --git a/src/tests/csmith/rand45.c b/src/tests/csmith/rand45.c new file mode 100644 index 0000000..3e92f7b --- /dev/null +++ b/src/tests/csmith/rand45.c @@ -0,0 +1,87 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static unsigned short func_1(void); +static unsigned short func_1(void) +{ + unsigned char l_2 = 0xF6L; + step_hash(1); + return l_2; +} +void csmith_compute_hash(void) +{ +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand45.expect b/src/tests/csmith/rand45.expect new file mode 100644 index 0000000..0b4e62a --- /dev/null +++ b/src/tests/csmith/rand45.expect @@ -0,0 +1,2 @@ +before stmt(1): checksum = 0 +checksum = 0 diff --git a/src/tests/csmith/rand46.c b/src/tests/csmith/rand46.c new file mode 100644 index 0000000..233b62e --- /dev/null +++ b/src/tests/csmith/rand46.c @@ -0,0 +1,88 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static unsigned short g_2 = 0x48BBL; +static signed char func_1(void); +static signed char func_1(void) +{ + step_hash(1); + return g_2; +} +void csmith_compute_hash(void) +{ + transparent_crc(g_2, "g_2", print_hash_value); +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand46.expect b/src/tests/csmith/rand46.expect new file mode 100644 index 0000000..48dcb80 --- /dev/null +++ b/src/tests/csmith/rand46.expect @@ -0,0 +1,4 @@ +...checksum after hashing g_2 : 95BECAFF +before stmt(1): checksum = 95BECAFF +...checksum after hashing g_2 : 95BECAFF +checksum = 95becaff diff --git a/src/tests/csmith/rand47.c b/src/tests/csmith/rand47.c new file mode 100644 index 0000000..2696f64 --- /dev/null +++ b/src/tests/csmith/rand47.c @@ -0,0 +1,873 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static short g_2 = (-6L); +static int g_42 = 0x3E997306L; +static int g_69 = 0xCB0BE945L; +static int *g_80 = &g_69; +static unsigned g_113 = 4294967295UL; +static short g_121 = 0x8E28L; +static int g_138 = (-1L); +static int ***g_209 = (void*)0; +static unsigned g_373 = 0xC3130D0CL; +static int g_382 = 0L; +static unsigned short g_428 = 65528UL; +static int func_1(void); +static short func_6(signed char p_7, unsigned p_8, signed char p_9, int p_10, unsigned char p_11); +static unsigned func_14(signed char p_15, int p_16, unsigned char p_17, unsigned p_18, int p_19); +static unsigned func_22(unsigned char p_23); +static int func_28(short p_29, unsigned p_30, unsigned p_31, unsigned p_32, unsigned p_33); +static signed char func_36(signed char p_37, short p_38, unsigned p_39); +static int * func_45(int * p_46, unsigned p_47, short p_48, int * p_49, int * p_50); +static int * func_51(int p_52, unsigned short p_53); +static unsigned short func_55(int * p_56, signed char p_57); +static int * func_62(int * p_63); +static int func_1(void) +{ + unsigned l_3 = 9UL; + unsigned l_323 = 4294967288UL; + int l_623 = 0x083D2658L; + int l_626 = 0xA52EACE0L; + int **l_636 = &g_80; + int ***l_635 = &l_636; + unsigned char l_669 = 255UL; + unsigned char l_670 = 255UL; + signed char l_712 = 1L; + signed char l_726 = 0x97L; + step_hash(389); + if ((g_2 | (l_3 & 0x5D09L))) + { + unsigned l_40 = 0xAE8B0121L; + unsigned char l_639 = 248UL; + short l_642 = 0x4475L; + unsigned l_643 = 0x64BFA7E0L; + step_hash(340); + l_623 = ((short)func_6(g_2, (~(((short)(0xC7L ^ g_2) * (short)(g_2 >= func_14(((int)0L - (int)func_22((((unsigned short)0xC9FAL << (unsigned short)((int)func_28(g_2, ((signed char)func_36(l_40, l_40, g_2) - (signed char)l_40), l_3, g_2, g_2) + (int)l_3)) >= 1L))), g_69, g_121, g_138, l_323))) >= g_2)), g_2, g_2, g_382) << (short)g_2); + step_hash(341); + g_80 = func_62(&g_382); + step_hash(342); + (***l_635) &= (l_642 & g_69); + } + else + { + int l_648 = (-1L); + int *l_690 = &g_138; + step_hash(344); + (**l_635) = (**l_635); + step_hash(345); + (*g_80) = (*g_80); + step_hash(346); + (*l_636) = &g_69; + step_hash(388); + if ((*g_80)) + { + unsigned short l_661 = 6UL; + int **l_691 = &g_80; + step_hash(368); + if ((*g_80)) + { + unsigned short l_657 = 9UL; + step_hash(362); + for (g_2 = 0; (g_2 > 25); g_2 += 1) + { + unsigned l_660 = 5UL; + step_hash(358); + if (((short)l_648 >> (short)4)) + { + int *l_649 = &g_382; + step_hash(353); + (*l_649) |= (***l_635); + step_hash(354); + return (*l_649); + } + else + { + unsigned l_656 = 0xB949E8AFL; + step_hash(356); + l_660 &= (((unsigned short)g_138 + (unsigned short)((unsigned char)func_36(((unsigned)l_656 - (unsigned)(+l_657)), l_648, g_428) << (unsigned char)(**l_636))) || (((signed char)l_656 % (signed char)g_373) >= (-1L))); + step_hash(357); + (*g_80) = ((0L <= l_648) < (g_2 == g_113)); + } + step_hash(359); + (**l_636) ^= func_36(l_661, (0xD8L & ((unsigned short)((void*)0 == (**l_635)) << (unsigned short)g_428)), g_428); + step_hash(360); + (**l_636) ^= ((~l_661) ^ 0xF27B2259L); + step_hash(361); + (*g_80) = ((func_28(g_121, g_42, func_28(l_661, ((((unsigned char)7UL - (unsigned char)((g_382 <= (-(short)(0xB4D5L < (((((short)(l_648 >= (0x1E2BL > l_648)) + (short)(-1L)) & g_42) & 0x0D8BF615L) < g_69)))) >= 0UL)) < (-2L)) >= l_669), g_121, l_670, g_121), l_661, g_2) > 0xB9B15962L) == 0x23L); + } + step_hash(363); + (**l_636) = (***l_635); + step_hash(364); + (**l_636) = (-1L); + } + else + { + int l_687 = 0L; + int *l_688 = (void*)0; + int *l_689 = &l_623; + step_hash(366); + (*l_689) = ((signed char)((unsigned short)(~((signed char)((unsigned)(((-8L) == 0x093DL) >= ((int)((short)((int)(func_14(g_69, l_648, ((0x0C14L < g_121) >= ((**l_636) >= (g_69 || (((unsigned short)l_661 * (unsigned short)g_113) >= 0x36L)))), l_687, (***l_635)) < l_687) + (int)l_687) >> (short)9) % (int)g_2)) / (unsigned)l_661) + (signed char)0x46L)) << (unsigned short)11) << (signed char)g_2); + step_hash(367); + l_690 = &l_648; + } + step_hash(369); + (*l_690) ^= 7L; + step_hash(370); + (*l_635) = l_691; + } + else + { + int l_701 = 0xB1E129D2L; + step_hash(382); + for (l_623 = (-15); (l_623 != (-6)); l_623 += 4) + { + unsigned l_700 = 4294967295UL; + unsigned l_713 = 0x4B13D8B8L; + unsigned l_714 = 0x72B9D6EFL; + step_hash(380); + for (l_3 = (-18); (l_3 >= 16); l_3 += 5) + { + step_hash(378); + (***l_635) = (((short)((0x5EL ^ (~func_28((***l_635), g_373, (((int)0x03F6749BL / (int)l_700) < g_428), func_28(g_2, (***l_635), g_113, g_428, g_382), g_42))) != 0UL) + (short)0x13E5L) & l_700); + step_hash(379); + return l_701; + } + step_hash(381); + (*l_636) = &g_382; + } + step_hash(387); + for (g_2 = 0; (g_2 == (-13)); --g_2) + { + unsigned l_719 = 5UL; + } + } + } + step_hash(390); + (*l_636) = func_62(&g_382); + step_hash(391); + (**l_635) = &g_69; + step_hash(392); + (*g_80) = (***l_635); + step_hash(393); + return (*g_80); +} +static short func_6(signed char p_7, unsigned p_8, signed char p_9, int p_10, unsigned char p_11) +{ + unsigned l_607 = 0UL; + int l_608 = (-2L); + int **l_622 = &g_80; + step_hash(330); + l_608 = l_607; + step_hash(337); + for (g_138 = 27; (g_138 > 12); g_138 -= 3) + { + int *l_611 = (void*)0; + int *l_612 = &g_382; + int **l_613 = &g_80; + step_hash(334); + (*l_612) = (func_22(p_11) & (l_611 == l_611)); + step_hash(335); + l_608 = l_608; + step_hash(336); + (*l_613) = &l_608; + } + step_hash(338); + (*l_622) = &l_608; + step_hash(339); + return g_138; +} +static unsigned func_14(signed char p_15, int p_16, unsigned char p_17, unsigned p_18, int p_19) +{ + int *l_324 = &g_42; + int **l_325 = &l_324; + int *l_471 = &g_138; + int l_513 = 0x234A3B4DL; + unsigned l_538 = 4294967291UL; + short l_548 = (-1L); + unsigned short l_573 = 5UL; + short l_595 = 4L; + int *l_606 = &l_513; + step_hash(205); + (*l_325) = l_324; + step_hash(206); + (*l_325) = func_62((*l_325)); + step_hash(326); + if (p_17) + { + int *l_326 = &g_42; + step_hash(208); + (*l_325) = l_326; + } + else + { + unsigned char l_337 = 0x61L; + int ***l_350 = &l_325; + int l_404 = 0xC915508FL; + int **l_421 = (void*)0; + unsigned l_512 = 0x895EBCA2L; + step_hash(324); + if (((int)((func_28((0L > 0x8B248997L), ((-1L) && p_17), (((unsigned short)((((unsigned char)p_16 + (unsigned char)(((unsigned char)((signed char)l_337 + (signed char)g_121) * (unsigned char)((void*)0 != g_209)) > l_337)) > (*l_324)) != g_138) * (unsigned short)g_69) && (*l_324)), g_113, (*l_324)) == 0x34D4L) >= g_113) % (int)0xFB75AE65L)) + { + unsigned l_346 = 0xACBDBD75L; + int ***l_351 = &l_325; + int l_356 = 0L; + int l_383 = 1L; + int ***l_399 = &l_325; + step_hash(215); + for (l_337 = 9; (l_337 >= 2); --l_337) + { + signed char l_347 = 0x5CL; + step_hash(214); + l_347 |= ((~((int)((((*l_324) == (&g_69 == &g_138)) || ((*l_324) != func_22(((signed char)(func_28((**l_325), g_69, ((l_346 | 255UL) || (65535UL < g_121)), g_2, p_18) & 4L) << (signed char)1)))) == p_19) % (int)p_17)) != p_16); + } + step_hash(216); + l_356 &= (((p_19 < ((unsigned char)(l_350 != l_351) / (unsigned char)((int)(((signed char)(((func_36(p_18, g_121, ((**l_351) != (void*)0)) != g_138) > 0xA281A0A5L) | 0xF0L) * (signed char)p_17) <= (-6L)) % (int)p_16))) & 0xC3FCL) >= p_19); + step_hash(217); + (***l_350) = (((*l_324) ^ (((signed char)(***l_350) * (signed char)g_42) & g_113)) == (((short)func_28(((***l_350) & 4294967287UL), func_22(g_42), (p_16 || g_138), (***l_351), g_113) - (short)p_19) > 0x6B9E0243L)); + step_hash(276); + if (((void*)0 != &g_69)) + { + unsigned short l_381 = 0x7206L; + int **l_388 = &g_80; + int *l_441 = &g_138; + step_hash(231); + if ((((unsigned short)(~((unsigned short)(((int)((*l_325) != (void*)0) % (int)p_18) ^ ((void*)0 != g_209)) * (unsigned short)((void*)0 != &l_324))) % (unsigned short)g_113) >= ((signed char)((unsigned char)g_113 - (unsigned char)g_373) + (signed char)p_16))) + { + short l_374 = 0x81CEL; + step_hash(220); + l_374 &= p_18; + step_hash(221); + (**l_325) = ((unsigned char)(((int)(***l_351) / (int)p_18) && ((((!(((*l_350) != (*l_351)) ^ (*g_80))) & 65535UL) < func_28(((unsigned)p_19 % (unsigned)l_381), g_382, l_383, g_113, g_121)) || g_138)) / (unsigned char)0xD1L); + step_hash(222); + (***l_350) = p_17; + step_hash(228); + if (p_16) + { + step_hash(224); + (***l_351) = (*g_80); + step_hash(225); + (*l_324) = (p_18 | g_2); + } + else + { + step_hash(227); + (***l_351) = ((unsigned)((unsigned)(l_388 == &g_80) + (unsigned)((int)((***l_350) && ((unsigned char)(((unsigned char)func_22(g_121) << (unsigned char)((short)(0xA330L | p_16) * (short)((unsigned char)(g_373 || p_15) + (unsigned char)g_2))) > g_69) % (unsigned char)g_113)) + (int)(*g_80))) / (unsigned)(*l_324)); + } + } + else + { + step_hash(230); + (**l_388) &= p_16; + } + step_hash(232); + (*l_325) = func_51(func_55((*l_325), g_69), g_2); + step_hash(233); + (*l_324) = (((void*)0 == l_399) || ((unsigned short)(*l_324) >> (unsigned short)((unsigned char)255UL << (unsigned char)1))); + step_hash(255); + if (((**l_350) != (*l_325))) + { + step_hash(235); + (*l_325) = (**l_350); + step_hash(236); + (*l_324) = g_121; + step_hash(237); + (*l_388) = (*l_325); + } + else + { + int *l_468 = &g_69; + step_hash(239); + (***l_351) = func_22(((((l_381 ^ ((unsigned char)(((unsigned char)(((unsigned)((g_2 & ((!p_19) <= ((unsigned char)0x28L / (unsigned char)((signed char)((unsigned char)l_381 << (unsigned char)3) % (signed char)((unsigned short)(***l_399) / (unsigned short)((signed char)g_113 - (signed char)0xD9L)))))) < (l_421 != (void*)0)) - (unsigned)0x56AD2E30L) & g_69) + (unsigned char)9L) == p_17) + (unsigned char)0xF6L)) >= g_2) & 1UL) != p_19)); + step_hash(240); + g_428 |= ((int)(+(p_15 >= g_382)) - (int)((unsigned short)65532UL + (unsigned short)((((**l_325) != p_17) < func_28(((short)6L << (short)15), (*l_324), (0x814FC1EBL ^ 0x2D3A3C20L), g_121, p_19)) >= (***l_350)))); + step_hash(246); + if ((((unsigned char)p_16 << (unsigned char)(0xC6D1B6C7L | ((*l_324) || 4294967295UL))) == 0x33L)) + { + step_hash(242); + (*l_324) |= (-3L); + } + else + { + short l_446 = (-1L); + unsigned l_465 = 0xF928766DL; + step_hash(244); + (**l_399) = (*l_325); + step_hash(245); + (***l_350) = ((unsigned char)(p_17 && ((unsigned short)((g_428 & (0L > (***l_350))) || func_36(((unsigned)((signed char)((unsigned)(***l_351) - (unsigned)((!g_113) && p_19)) / (signed char)p_16) + (unsigned)2UL), g_428, p_15)) >> (unsigned short)3)) << (unsigned char)l_465); + } + step_hash(254); + for (p_18 = (-17); (p_18 <= 20); ++p_18) + { + step_hash(250); + (*l_325) = (*l_325); + step_hash(251); + (*l_388) = l_468; + step_hash(252); + if ((**l_325)) + continue; + step_hash(253); + (**l_325) = ((void*)0 != &l_421); + } + } + } + else + { + unsigned l_469 = 1UL; + int ***l_470 = &l_421; + step_hash(272); + if ((((g_121 == l_469) > 4294967286UL) & (((l_351 != l_470) <= func_55((*l_325), (***l_350))) & p_15))) + { + step_hash(258); + (**l_350) = func_62(l_471); + step_hash(259); + (**l_399) = (*l_325); + step_hash(260); + (*g_80) = (*g_80); + step_hash(261); + (***l_399) = 0x2A5CB463L; + } + else + { + unsigned l_501 = 0xCA6EFA3AL; + step_hash(268); + for (p_17 = 0; (p_17 < 47); p_17 += 1) + { + step_hash(266); + (**l_399) = (void*)0; + step_hash(267); + (*g_80) = ((unsigned short)p_18 / (unsigned short)(((short)(((int)((((signed char)(-(short)g_382) * (signed char)((unsigned char)0x7CL / (unsigned char)p_18)) > 0x8CL) || ((int)((p_15 ^ ((((unsigned)(~g_382) + (unsigned)g_138) < 0xAEF25888L) > 0xB22DE3F5L)) >= p_15) % (int)p_17)) + (int)0x8A12F214L) > g_373) % (short)p_15) | p_15)); + } + step_hash(269); + (**l_351) = func_51(((unsigned char)((signed char)(((*l_351) == &g_80) >= 0L) - (signed char)p_16) >> (unsigned char)(g_382 <= ((unsigned char)((unsigned char)8UL >> (unsigned char)7) << (unsigned char)(0xAD775760L <= ((((((unsigned char)(&l_325 != (void*)0) >> (unsigned char)p_18) >= p_16) == g_69) != l_501) >= p_18))))), g_382); + step_hash(270); + (***l_399) = ((unsigned char)((unsigned)((*l_471) && (g_382 & g_121)) + (unsigned)1L) / (unsigned char)(((((unsigned short)(((unsigned short)p_18 >> (unsigned short)(4UL != (***l_350))) >= ((short)g_382 << (short)11)) >> (unsigned short)(g_69 && p_18)) && 9UL) >= 0x07D0L) && l_512)); + step_hash(271); + (*l_471) ^= l_513; + } + step_hash(273); + (**l_350) = (**l_350); + step_hash(274); + l_356 ^= ((***l_350) <= ((g_121 == ((unsigned short)(***l_399) * (unsigned short)(g_42 && (&g_80 == (void*)0)))) == 0xD6L)); + step_hash(275); + (***l_351) &= p_16; + } + } + else + { + unsigned char l_516 = 0xDAL; + int l_556 = 0x293081E0L; + int ***l_582 = &l_421; + step_hash(322); + if (l_516) + { + int **l_517 = &l_324; + step_hash(279); + (*l_325) = func_62((*l_325)); + step_hash(280); + (**l_325) = (((l_517 != &l_324) ^ ((unsigned short)l_516 * (unsigned short)(((g_428 >= p_15) <= (-(unsigned char)(((void*)0 != g_209) > 0L))) > ((p_17 > p_16) <= (**l_517))))) || 0xA8BAL); + step_hash(299); + for (g_373 = 16; (g_373 > 38); ++g_373) + { + step_hash(290); + for (l_337 = 0; (l_337 != 33); ++l_337) + { + int *l_533 = &l_404; + step_hash(287); + (*l_533) = ((signed char)(l_516 == ((int)(*g_80) + (int)p_17)) + (signed char)((int)(*g_80) - (int)((void*)0 != l_533))); + step_hash(288); + (*l_471) = (p_17 != (g_69 != ((*l_471) || ((short)((p_17 != ((int)0L + (int)p_15)) == (l_538 | 0x24L)) << (short)7)))); + step_hash(289); + if ((*l_533)) + continue; + } + step_hash(291); + if ((*g_80)) + break; + step_hash(292); + (**l_325) = p_19; + step_hash(298); + for (g_138 = (-11); (g_138 <= (-26)); g_138--) + { + short l_541 = 0L; + step_hash(296); + l_541 |= l_516; + step_hash(297); + (**l_325) ^= ((short)0x8BAEL << (short)0); + } + } + step_hash(319); + if (((func_28(g_113, ((unsigned short)((p_16 > ((unsigned char)(p_16 || (((*g_80) || ((0L != g_428) >= (func_28((g_113 | ((*l_325) != (*l_325))), p_19, g_113, g_42, l_548) | l_516))) >= g_428)) * (unsigned char)1L)) < g_428) >> (unsigned short)8), (*l_471), p_17, p_15) >= 8L) == (***l_350))) + { + int *l_555 = &g_42; + step_hash(301); + (*g_80) |= (g_2 && (-(signed char)((unsigned short)0xAC75L - (unsigned short)((unsigned short)(func_28((func_22(l_516) ^ (*l_324)), p_16, (~0xD5DE0121L), (g_428 != ((l_516 && 0xA14F01B3L) >= 1L)), p_15) >= p_19) << (unsigned short)4)))); + step_hash(309); + if ((*g_80)) + { + int *l_554 = &g_382; + step_hash(303); + (*l_517) = l_554; + } + else + { + step_hash(305); + (*l_325) = (void*)0; + step_hash(306); + (*g_80) = (&g_382 != l_555); + step_hash(307); + l_556 ^= l_516; + step_hash(308); + (*l_555) = ((l_556 > ((unsigned char)((signed char)g_113 / (signed char)g_69) / (unsigned char)(~((((short)p_19 + (short)(((((signed char)(-1L) % (signed char)((((signed char)((unsigned)4294967290UL / (unsigned)(g_113 && ((p_16 != (((g_69 ^ g_121) == l_573) < 1L)) != g_428))) - (signed char)p_18) == p_17) || l_556)) > 0x31F5AF7DL) ^ g_2) & g_138)) | 0xC41BL) && g_428)))) != g_113); + } + step_hash(310); + (*l_471) ^= (*g_80); + step_hash(311); + (*g_80) = p_15; + } + else + { + step_hash(318); + for (g_42 = 0; (g_42 >= (-26)); g_42 -= 2) + { + step_hash(316); + (*l_471) |= (*g_80); + step_hash(317); + (*l_517) = (*l_325); + } + } + } + else + { + step_hash(321); + (**l_350) = (*l_325); + } + step_hash(323); + (*g_80) = (0x92931734L | (((signed char)func_22((0x8FL != (((((short)(l_582 != g_209) << (short)((7L <= ((signed char)((p_18 || p_19) != (((unsigned)g_138 + (unsigned)((signed char)(0x6E20L || g_2) * (signed char)g_428)) <= 0x996522A8L)) >> (signed char)p_19)) & g_373)) < g_69) | g_2) & g_373))) % (signed char)g_138) <= 1L)); + } + step_hash(325); + l_513 &= ((unsigned char)((unsigned char)((unsigned)l_595 - (unsigned)g_373) * (unsigned char)(*l_471)) * (unsigned char)((int)((unsigned)((g_209 == (void*)0) > (((signed char)p_17 / (signed char)func_28(((signed char)func_22(g_42) >> (signed char)5), ((signed char)l_337 << (signed char)(*l_471)), p_18, g_138, p_15)) < p_15)) - (unsigned)p_17) % (int)g_428)); + } + step_hash(327); + (*l_606) |= ((4294967286UL > g_2) && g_138); + step_hash(328); + return p_16; +} +static unsigned func_22(unsigned char p_23) +{ + int l_220 = 0L; + int l_295 = 0xF0E4EAF2L; + unsigned l_321 = 0x5C0CC7F1L; + int l_322 = 0x068102F2L; + step_hash(202); + for (p_23 = 0; (p_23 < 41); ++p_23) + { + unsigned l_216 = 0x05AE8A67L; + unsigned char l_225 = 8UL; + int *l_226 = &l_220; + int *l_294 = &g_138; + unsigned l_296 = 3UL; + } + step_hash(203); + return l_220; +} +static int func_28(short p_29, unsigned p_30, unsigned p_31, unsigned p_32, unsigned p_33) +{ + int l_54 = (-6L); + int *l_208 = &l_54; + int **l_207 = &l_208; + int ***l_206 = &l_207; + int *l_211 = &l_54; + step_hash(155); + for (p_29 = (-24); (p_29 == (-4)); p_29++) + { + short l_210 = 0xAC2EL; + int *l_212 = &l_54; + } + step_hash(156); + (*l_207) = (**l_206); + step_hash(157); + return p_30; +} +static signed char func_36(signed char p_37, short p_38, unsigned p_39) +{ + int *l_41 = &g_42; + step_hash(3); + (*l_41) |= g_2; + step_hash(4); + return g_2; +} +static int * func_45(int * p_46, unsigned p_47, short p_48, int * p_49, int * p_50) +{ + int *l_213 = &g_69; + step_hash(151); + l_213 = p_50; + step_hash(152); + return p_46; +} +static int * func_51(int p_52, unsigned short p_53) +{ + unsigned l_83 = 7UL; + int **l_84 = &g_80; + int ***l_85 = &l_84; + unsigned l_118 = 0xF253ABC1L; + step_hash(31); + l_83 |= (*g_80); + step_hash(32); + (*l_85) = l_84; + step_hash(148); + if ((*g_80)) + { + unsigned short l_96 = 0x5E6BL; + step_hash(62); + for (g_69 = 0; (g_69 < (-16)); g_69 -= 3) + { + unsigned char l_97 = 0xA4L; + int **l_108 = (void*)0; + int *l_140 = (void*)0; + step_hash(61); + if ((((+p_53) | g_69) > ((unsigned short)((unsigned char)((!((unsigned char)((unsigned short)(0xB133D7BFL <= (func_36(func_36(((void*)0 == (*l_85)), l_96, p_53), l_96, g_2) < l_97)) << (unsigned short)5) * (unsigned char)(-10L))) < p_52) - (unsigned char)p_52) / (unsigned short)6UL))) + { + int *l_98 = &g_42; + step_hash(38); + (**l_85) = func_62(l_98); + step_hash(39); + (*l_98) = (*g_80); + step_hash(46); + if ((&p_52 != (void*)0)) + { + int **l_99 = &l_98; + step_hash(41); + p_52 = ((*l_85) != l_99); + step_hash(42); + g_113 |= ((func_36(l_97, (0UL & ((signed char)((((unsigned char)((unsigned)(&g_80 == (void*)0) - (unsigned)0UL) + (unsigned char)((p_52 | ((unsigned short)((void*)0 != l_108) * (unsigned short)(((unsigned)(((unsigned char)(*l_98) + (unsigned char)g_69) & 0xBFL) / (unsigned)(**l_99)) & l_96))) ^ l_96)) < p_52) != 0x3FL) >> (signed char)(**l_99))), g_2) >= p_53) & 0x46L); + step_hash(43); + if (p_52) + continue; + } + else + { + step_hash(45); + g_121 |= (func_36(g_69, g_2, g_69) != ((unsigned)((short)(&g_69 != (void*)0) * (short)(!l_118)) % (unsigned)((unsigned char)p_53 << (unsigned char)(p_52 <= p_52)))); + } + } + else + { + unsigned short l_134 = 0x4740L; + step_hash(59); + if (((**l_85) == &g_42)) + { + int *l_139 = &g_42; + step_hash(55); + for (p_53 = 0; (p_53 > 46); ++p_53) + { + int *l_135 = (void*)0; + int *l_136 = (void*)0; + int *l_137 = &g_138; + } + } + else + { + step_hash(57); + (**l_85) = &g_138; + step_hash(58); + l_140 = &g_69; + } + step_hash(60); + return &g_69; + } + } + step_hash(63); + (*l_84) = func_62(func_62(&p_52)); + } + else + { + unsigned short l_158 = 65533UL; + int ***l_201 = &l_84; + step_hash(65); + (***l_85) = ((unsigned short)((void*)0 == &g_138) << (unsigned short)12); + step_hash(145); + if ((***l_85)) + { + unsigned char l_143 = 0x70L; + int **l_144 = (void*)0; + step_hash(138); + if ((*g_80)) + { + short l_163 = 0x98C0L; + step_hash(99); + if (func_36(l_143, (g_121 ^ (func_55(func_62(&g_42), p_53) ^ g_138)), (p_52 && (l_144 != l_144)))) + { + unsigned l_166 = 0x92CE2759L; + step_hash(74); + if (((short)func_36((**l_84), func_36((-(unsigned char)((short)g_2 * (short)(((signed char)func_36(((signed char)(p_53 && ((int)((unsigned short)(func_36((g_69 == (func_36(p_52, g_69, l_158) > ((unsigned char)3UL + (unsigned char)g_138))), g_138, l_158) < g_138) % (unsigned short)0x626FL) + (int)(-2L))) * (signed char)p_52), p_53, p_52) + (signed char)g_121) & 4294967293UL))), p_52, p_52), g_113) * (short)g_2)) + { + step_hash(70); + (*l_84) = &p_52; + } + else + { + step_hash(72); + (**l_84) = ((-1L) >= 4UL); + step_hash(73); + (*g_80) ^= ((short)(l_163 | g_42) << (short)4); + } + step_hash(81); + for (l_158 = (-27); (l_158 > 42); l_158 += 7) + { + step_hash(78); + (***l_85) = p_53; + step_hash(79); + (**l_84) |= 0L; + step_hash(80); + l_166 &= (*g_80); + } + step_hash(82); + (*g_80) = (l_163 & (-(int)p_53)); + } + else + { + step_hash(90); + for (g_113 = 0; (g_113 == 20); g_113++) + { + int *l_174 = &g_138; + step_hash(87); + (*l_174) = func_36((func_55(&g_138, p_53) <= ((signed char)p_53 << (signed char)(!p_52))), p_52, ((unsigned short)65535UL >> (unsigned short)p_52)); + step_hash(88); + (**l_85) = &p_52; + step_hash(89); + return &g_138; + } + step_hash(96); + for (l_143 = 1; (l_143 <= 60); l_143 += 6) + { + int *l_177 = &g_138; + step_hash(94); + (*l_177) ^= ((***l_85) >= g_121); + step_hash(95); + (**l_84) |= p_52; + } + step_hash(97); + p_52 = (g_69 & ((unsigned)0x60892C68L - (unsigned)g_138)); + step_hash(98); + (*l_84) = func_62(&g_138); + } + step_hash(100); + (*l_84) = (*l_84); + step_hash(105); + for (l_163 = 13; (l_163 <= 16); l_163 += 5) + { + step_hash(104); + (**l_85) = func_62((**l_85)); + } + } + else + { + short l_184 = 1L; + step_hash(115); + if (((signed char)(!l_184) >> (signed char)l_158)) + { + step_hash(108); + (*g_80) = p_52; + step_hash(109); + (*g_80) ^= 0L; + step_hash(110); + (*l_84) = func_62(&g_69); + } + else + { + int *l_185 = &g_69; + step_hash(112); + (*l_84) = &p_52; + step_hash(113); + (*l_84) = l_185; + step_hash(114); + return &g_69; + } + step_hash(120); + for (g_42 = 0; (g_42 >= 16); g_42++) + { + step_hash(119); + return &g_69; + } + step_hash(137); + for (p_53 = 0; (p_53 <= 19); p_53 += 1) + { + step_hash(124); + (***l_85) |= (&p_52 == &g_138); + step_hash(130); + for (l_158 = 0; (l_158 == 32); ++l_158) + { + step_hash(128); + (*g_80) = (*g_80); + step_hash(129); + return &g_42; + } + step_hash(136); + for (g_138 = 8; (g_138 >= (-13)); --g_138) + { + step_hash(134); + (**l_85) = &g_69; + step_hash(135); + (**l_84) = (((signed char)((((unsigned short)0UL << (unsigned short)11) || 0x7DBCL) & (+g_69)) << (signed char)6) || 0x3D9FL); + } + } + } + step_hash(139); + (**l_85) = &p_52; + step_hash(140); + g_80 = &p_52; + step_hash(141); + return &g_69; + } + else + { + unsigned l_200 = 0x55D9A899L; + step_hash(143); + (***l_85) = (((int)(-1L) + (int)((((*g_80) == p_52) & (p_53 ^ (g_121 & 1UL))) | g_113)) ^ (~(-7L))); + step_hash(144); + (***l_201) = (l_200 ^ ((l_201 != (void*)0) != p_52)); + } + step_hash(146); + (***l_85) &= p_53; + step_hash(147); + (***l_201) = 0x3F1312D1L; + } + step_hash(149); + return &g_138; +} +static unsigned short func_55(int * p_56, signed char p_57) +{ + int l_72 = 0x4179B2C3L; + int **l_81 = &g_80; + signed char l_82 = 0L; + step_hash(27); + if (((int)g_2 % (int)((int)g_2 % (int)(*p_56)))) + { + int *l_67 = (void*)0; + int **l_66 = &l_67; + int *l_68 = &g_69; + step_hash(15); + (*l_66) = func_62(&g_42); + step_hash(16); + (*l_68) ^= (*p_56); + step_hash(17); + (*l_66) = func_62(func_62((*l_66))); + step_hash(18); + (**l_66) &= 0xB3B3333DL; + } + else + { + int *l_75 = &g_69; + int **l_76 = (void*)0; + int **l_77 = &l_75; + step_hash(20); + (*l_75) |= ((unsigned char)(p_57 | func_36((l_72 & 0x8D11L), l_72, ((short)l_72 >> (short)3))) + (unsigned char)0x53L); + step_hash(21); + (*l_77) = func_62(p_56); + step_hash(26); + for (p_57 = 0; (p_57 < (-6)); p_57 -= 7) + { + step_hash(25); + return g_69; + } + } + step_hash(28); + (*l_81) = g_80; + step_hash(29); + return l_82; +} +static int * func_62(int * p_63) +{ + step_hash(12); + (*p_63) = (*p_63); + step_hash(13); + (*p_63) = ((int)(0x6FL == (0x74L != ((void*)0 != p_63))) / (int)0x29B4CCC4L); + step_hash(14); + return &g_42; +} +void csmith_compute_hash(void) +{ + transparent_crc(g_2, "g_2", print_hash_value); + transparent_crc(g_42, "g_42", print_hash_value); + transparent_crc(g_69, "g_69", print_hash_value); + transparent_crc(g_113, "g_113", print_hash_value); + transparent_crc(g_121, "g_121", print_hash_value); + transparent_crc(g_138, "g_138", print_hash_value); + transparent_crc(g_373, "g_373", print_hash_value); + transparent_crc(g_382, "g_382", print_hash_value); + transparent_crc(g_428, "g_428", print_hash_value); +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand47.expect b/src/tests/csmith/rand47.expect new file mode 100644 index 0000000..be37b91 --- /dev/null +++ b/src/tests/csmith/rand47.expect @@ -0,0 +1,600 @@ +...checksum after hashing g_2 : C8210FCD +...checksum after hashing g_42 : A52154B6 +...checksum after hashing g_69 : BD708B61 +...checksum after hashing g_113 : BEA2D3F +...checksum after hashing g_121 : BAD18312 +...checksum after hashing g_138 : 550B6BFE +...checksum after hashing g_373 : DA06188A +...checksum after hashing g_382 : 81C9E7C7 +...checksum after hashing g_428 : 1BBE1A92 +before stmt(389): checksum = 1BBE1A92 +...checksum after hashing g_2 : C8210FCD +...checksum after hashing g_42 : A52154B6 +...checksum after hashing g_69 : BD708B61 +...checksum after hashing g_113 : BEA2D3F +...checksum after hashing g_121 : BAD18312 +...checksum after hashing g_138 : 550B6BFE +...checksum after hashing g_373 : DA06188A +...checksum after hashing g_382 : 81C9E7C7 +...checksum after hashing g_428 : 1BBE1A92 +before stmt(340): checksum = 1BBE1A92 +...checksum after hashing g_2 : C8210FCD +...checksum after hashing g_42 : A52154B6 +...checksum after hashing g_69 : BD708B61 +...checksum after hashing g_113 : BEA2D3F +...checksum after hashing g_121 : BAD18312 +...checksum after hashing g_138 : 550B6BFE +...checksum after hashing g_373 : DA06188A +...checksum after hashing g_382 : 81C9E7C7 +...checksum after hashing g_428 : 1BBE1A92 +before stmt(3): checksum = 1BBE1A92 +...checksum after hashing g_2 : C8210FCD +...checksum after hashing g_42 : D118B61D +...checksum after hashing g_69 : D4902934 +...checksum after hashing g_113 : 47D571B1 +...checksum after hashing g_121 : F545B249 +...checksum after hashing g_138 : 9FE07FE5 +...checksum after hashing g_373 : 800AC231 +...checksum after hashing g_382 : ECAF695C +...checksum after hashing g_428 : 9AF09B79 +before stmt(4): checksum = 9AF09B79 +...checksum after hashing g_2 : C8210FCD +...checksum after hashing g_42 : D118B61D +...checksum after hashing g_69 : D4902934 +...checksum after hashing g_113 : 47D571B1 +...checksum after hashing g_121 : F545B249 +...checksum after hashing g_138 : 9FE07FE5 +...checksum after hashing g_373 : 800AC231 +...checksum after hashing g_382 : ECAF695C +...checksum after hashing g_428 : 9AF09B79 +before stmt(155): checksum = 9AF09B79 +...checksum after hashing g_2 : C8210FCD +...checksum after hashing g_42 : D118B61D +...checksum after hashing g_69 : D4902934 +...checksum after hashing g_113 : 47D571B1 +...checksum after hashing g_121 : F545B249 +...checksum after hashing g_138 : 9FE07FE5 +...checksum after hashing g_373 : 800AC231 +...checksum after hashing g_382 : ECAF695C +...checksum after hashing g_428 : 9AF09B79 +before stmt(156): checksum = 9AF09B79 +...checksum after hashing g_2 : C8210FCD +...checksum after hashing g_42 : D118B61D +...checksum after hashing g_69 : D4902934 +...checksum after hashing g_113 : 47D571B1 +...checksum after hashing g_121 : F545B249 +...checksum after hashing g_138 : 9FE07FE5 +...checksum after hashing g_373 : 800AC231 +...checksum after hashing g_382 : ECAF695C +...checksum after hashing g_428 : 9AF09B79 +before stmt(157): checksum = 9AF09B79 +...checksum after hashing g_2 : C8210FCD +...checksum after hashing g_42 : D118B61D +...checksum after hashing g_69 : D4902934 +...checksum after hashing g_113 : 47D571B1 +...checksum after hashing g_121 : F545B249 +...checksum after hashing g_138 : 9FE07FE5 +...checksum after hashing g_373 : 800AC231 +...checksum after hashing g_382 : ECAF695C +...checksum after hashing g_428 : 9AF09B79 +before stmt(202): checksum = 9AF09B79 +...checksum after hashing g_2 : C8210FCD +...checksum after hashing g_42 : D118B61D +...checksum after hashing g_69 : D4902934 +...checksum after hashing g_113 : 47D571B1 +...checksum after hashing g_121 : F545B249 +...checksum after hashing g_138 : 9FE07FE5 +...checksum after hashing g_373 : 800AC231 +...checksum after hashing g_382 : ECAF695C +...checksum after hashing g_428 : 9AF09B79 +before stmt(203): checksum = 9AF09B79 +...checksum after hashing g_2 : C8210FCD +...checksum after hashing g_42 : D118B61D +...checksum after hashing g_69 : D4902934 +...checksum after hashing g_113 : 47D571B1 +...checksum after hashing g_121 : F545B249 +...checksum after hashing g_138 : 9FE07FE5 +...checksum after hashing g_373 : 800AC231 +...checksum after hashing g_382 : ECAF695C +...checksum after hashing g_428 : 9AF09B79 +before stmt(205): checksum = 9AF09B79 +...checksum after hashing g_2 : C8210FCD +...checksum after hashing g_42 : D118B61D +...checksum after hashing g_69 : D4902934 +...checksum after hashing g_113 : 47D571B1 +...checksum after hashing g_121 : F545B249 +...checksum after hashing g_138 : 9FE07FE5 +...checksum after hashing g_373 : 800AC231 +...checksum after hashing g_382 : ECAF695C +...checksum after hashing g_428 : 9AF09B79 +before stmt(206): checksum = 9AF09B79 +...checksum after hashing g_2 : C8210FCD +...checksum after hashing g_42 : D118B61D +...checksum after hashing g_69 : D4902934 +...checksum after hashing g_113 : 47D571B1 +...checksum after hashing g_121 : F545B249 +...checksum after hashing g_138 : 9FE07FE5 +...checksum after hashing g_373 : 800AC231 +...checksum after hashing g_382 : ECAF695C +...checksum after hashing g_428 : 9AF09B79 +before stmt(12): checksum = 9AF09B79 +...checksum after hashing g_2 : C8210FCD +...checksum after hashing g_42 : D118B61D +...checksum after hashing g_69 : D4902934 +...checksum after hashing g_113 : 47D571B1 +...checksum after hashing g_121 : F545B249 +...checksum after hashing g_138 : 9FE07FE5 +...checksum after hashing g_373 : 800AC231 +...checksum after hashing g_382 : ECAF695C +...checksum after hashing g_428 : 9AF09B79 +before stmt(13): checksum = 9AF09B79 +...checksum after hashing g_2 : C8210FCD +...checksum after hashing g_42 : B71FF19B +...checksum after hashing g_69 : 82E7093C +...checksum after hashing g_113 : 585A044E +...checksum after hashing g_121 : 48699772 +...checksum after hashing g_138 : AAD20D1 +...checksum after hashing g_373 : 5D1192C9 +...checksum after hashing g_382 : 92951C57 +...checksum after hashing g_428 : 8DDF3481 +before stmt(14): checksum = 8DDF3481 +...checksum after hashing g_2 : C8210FCD +...checksum after hashing g_42 : B71FF19B +...checksum after hashing g_69 : 82E7093C +...checksum after hashing g_113 : 585A044E +...checksum after hashing g_121 : 48699772 +...checksum after hashing g_138 : AAD20D1 +...checksum after hashing g_373 : 5D1192C9 +...checksum after hashing g_382 : 92951C57 +...checksum after hashing g_428 : 8DDF3481 +before stmt(326): checksum = 8DDF3481 +...checksum after hashing g_2 : C8210FCD +...checksum after hashing g_42 : B71FF19B +...checksum after hashing g_69 : 82E7093C +...checksum after hashing g_113 : 585A044E +...checksum after hashing g_121 : 48699772 +...checksum after hashing g_138 : AAD20D1 +...checksum after hashing g_373 : 5D1192C9 +...checksum after hashing g_382 : 92951C57 +...checksum after hashing g_428 : 8DDF3481 +before stmt(208): checksum = 8DDF3481 +...checksum after hashing g_2 : C8210FCD +...checksum after hashing g_42 : B71FF19B +...checksum after hashing g_69 : 82E7093C +...checksum after hashing g_113 : 585A044E +...checksum after hashing g_121 : 48699772 +...checksum after hashing g_138 : AAD20D1 +...checksum after hashing g_373 : 5D1192C9 +...checksum after hashing g_382 : 92951C57 +...checksum after hashing g_428 : 8DDF3481 +before stmt(327): checksum = 8DDF3481 +...checksum after hashing g_2 : C8210FCD +...checksum after hashing g_42 : B71FF19B +...checksum after hashing g_69 : 82E7093C +...checksum after hashing g_113 : 585A044E +...checksum after hashing g_121 : 48699772 +...checksum after hashing g_138 : AAD20D1 +...checksum after hashing g_373 : 5D1192C9 +...checksum after hashing g_382 : 92951C57 +...checksum after hashing g_428 : 8DDF3481 +before stmt(328): checksum = 8DDF3481 +...checksum after hashing g_2 : C8210FCD +...checksum after hashing g_42 : B71FF19B +...checksum after hashing g_69 : 82E7093C +...checksum after hashing g_113 : 585A044E +...checksum after hashing g_121 : 48699772 +...checksum after hashing g_138 : AAD20D1 +...checksum after hashing g_373 : 5D1192C9 +...checksum after hashing g_382 : 92951C57 +...checksum after hashing g_428 : 8DDF3481 +before stmt(330): checksum = 8DDF3481 +...checksum after hashing g_2 : C8210FCD +...checksum after hashing g_42 : B71FF19B +...checksum after hashing g_69 : 82E7093C +...checksum after hashing g_113 : 585A044E +...checksum after hashing g_121 : 48699772 +...checksum after hashing g_138 : AAD20D1 +...checksum after hashing g_373 : 5D1192C9 +...checksum after hashing g_382 : 92951C57 +...checksum after hashing g_428 : 8DDF3481 +before stmt(337): checksum = 8DDF3481 +...checksum after hashing g_2 : C8210FCD +...checksum after hashing g_42 : B71FF19B +...checksum after hashing g_69 : 82E7093C +...checksum after hashing g_113 : 585A044E +...checksum after hashing g_121 : 48699772 +...checksum after hashing g_138 : 530ED0AC +...checksum after hashing g_373 : E61D9F22 +...checksum after hashing g_382 : 6B356C35 +...checksum after hashing g_428 : 22679508 +before stmt(334): checksum = 22679508 +...checksum after hashing g_2 : C8210FCD +...checksum after hashing g_42 : B71FF19B +...checksum after hashing g_69 : 82E7093C +...checksum after hashing g_113 : 585A044E +...checksum after hashing g_121 : 48699772 +...checksum after hashing g_138 : 530ED0AC +...checksum after hashing g_373 : E61D9F22 +...checksum after hashing g_382 : 6B356C35 +...checksum after hashing g_428 : 22679508 +before stmt(202): checksum = 22679508 +...checksum after hashing g_2 : C8210FCD +...checksum after hashing g_42 : B71FF19B +...checksum after hashing g_69 : 82E7093C +...checksum after hashing g_113 : 585A044E +...checksum after hashing g_121 : 48699772 +...checksum after hashing g_138 : 530ED0AC +...checksum after hashing g_373 : E61D9F22 +...checksum after hashing g_382 : 6B356C35 +...checksum after hashing g_428 : 22679508 +before stmt(203): checksum = 22679508 +...checksum after hashing g_2 : C8210FCD +...checksum after hashing g_42 : B71FF19B +...checksum after hashing g_69 : 82E7093C +...checksum after hashing g_113 : 585A044E +...checksum after hashing g_121 : 48699772 +...checksum after hashing g_138 : 530ED0AC +...checksum after hashing g_373 : E61D9F22 +...checksum after hashing g_382 : 6B356C35 +...checksum after hashing g_428 : 22679508 +before stmt(335): checksum = 22679508 +...checksum after hashing g_2 : C8210FCD +...checksum after hashing g_42 : B71FF19B +...checksum after hashing g_69 : 82E7093C +...checksum after hashing g_113 : 585A044E +...checksum after hashing g_121 : 48699772 +...checksum after hashing g_138 : 530ED0AC +...checksum after hashing g_373 : E61D9F22 +...checksum after hashing g_382 : 6B356C35 +...checksum after hashing g_428 : 22679508 +before stmt(336): checksum = 22679508 +...checksum after hashing g_2 : C8210FCD +...checksum after hashing g_42 : B71FF19B +...checksum after hashing g_69 : 82E7093C +...checksum after hashing g_113 : 585A044E +...checksum after hashing g_121 : 48699772 +...checksum after hashing g_138 : 41BB7F42 +...checksum after hashing g_373 : 689298C1 +...checksum after hashing g_382 : 1CABBEC5 +...checksum after hashing g_428 : BAF21FA +before stmt(334): checksum = BAF21FA +...checksum after hashing g_2 : C8210FCD +...checksum after hashing g_42 : B71FF19B +...checksum after hashing g_69 : 82E7093C +...checksum after hashing g_113 : 585A044E +...checksum after hashing g_121 : 48699772 +...checksum after hashing g_138 : 41BB7F42 +...checksum after hashing g_373 : 689298C1 +...checksum after hashing g_382 : 1CABBEC5 +...checksum after hashing g_428 : BAF21FA +before stmt(202): checksum = BAF21FA +...checksum after hashing g_2 : C8210FCD +...checksum after hashing g_42 : B71FF19B +...checksum after hashing g_69 : 82E7093C +...checksum after hashing g_113 : 585A044E +...checksum after hashing g_121 : 48699772 +...checksum after hashing g_138 : 41BB7F42 +...checksum after hashing g_373 : 689298C1 +...checksum after hashing g_382 : 1CABBEC5 +...checksum after hashing g_428 : BAF21FA +before stmt(203): checksum = BAF21FA +...checksum after hashing g_2 : C8210FCD +...checksum after hashing g_42 : B71FF19B +...checksum after hashing g_69 : 82E7093C +...checksum after hashing g_113 : 585A044E +...checksum after hashing g_121 : 48699772 +...checksum after hashing g_138 : 41BB7F42 +...checksum after hashing g_373 : 689298C1 +...checksum after hashing g_382 : 1CABBEC5 +...checksum after hashing g_428 : BAF21FA +before stmt(335): checksum = BAF21FA +...checksum after hashing g_2 : C8210FCD +...checksum after hashing g_42 : B71FF19B +...checksum after hashing g_69 : 82E7093C +...checksum after hashing g_113 : 585A044E +...checksum after hashing g_121 : 48699772 +...checksum after hashing g_138 : 41BB7F42 +...checksum after hashing g_373 : 689298C1 +...checksum after hashing g_382 : 1CABBEC5 +...checksum after hashing g_428 : BAF21FA +before stmt(336): checksum = BAF21FA +...checksum after hashing g_2 : C8210FCD +...checksum after hashing g_42 : B71FF19B +...checksum after hashing g_69 : 82E7093C +...checksum after hashing g_113 : 585A044E +...checksum after hashing g_121 : 48699772 +...checksum after hashing g_138 : B3D1A79F +...checksum after hashing g_373 : F3978D10 +...checksum after hashing g_382 : 8204BF2B +...checksum after hashing g_428 : 2E563A3 +before stmt(334): checksum = 2E563A3 +...checksum after hashing g_2 : C8210FCD +...checksum after hashing g_42 : B71FF19B +...checksum after hashing g_69 : 82E7093C +...checksum after hashing g_113 : 585A044E +...checksum after hashing g_121 : 48699772 +...checksum after hashing g_138 : B3D1A79F +...checksum after hashing g_373 : F3978D10 +...checksum after hashing g_382 : 8204BF2B +...checksum after hashing g_428 : 2E563A3 +before stmt(202): checksum = 2E563A3 +...checksum after hashing g_2 : C8210FCD +...checksum after hashing g_42 : B71FF19B +...checksum after hashing g_69 : 82E7093C +...checksum after hashing g_113 : 585A044E +...checksum after hashing g_121 : 48699772 +...checksum after hashing g_138 : B3D1A79F +...checksum after hashing g_373 : F3978D10 +...checksum after hashing g_382 : 8204BF2B +...checksum after hashing g_428 : 2E563A3 +before stmt(203): checksum = 2E563A3 +...checksum after hashing g_2 : C8210FCD +...checksum after hashing g_42 : B71FF19B +...checksum after hashing g_69 : 82E7093C +...checksum after hashing g_113 : 585A044E +...checksum after hashing g_121 : 48699772 +...checksum after hashing g_138 : B3D1A79F +...checksum after hashing g_373 : F3978D10 +...checksum after hashing g_382 : 8204BF2B +...checksum after hashing g_428 : 2E563A3 +before stmt(335): checksum = 2E563A3 +...checksum after hashing g_2 : C8210FCD +...checksum after hashing g_42 : B71FF19B +...checksum after hashing g_69 : 82E7093C +...checksum after hashing g_113 : 585A044E +...checksum after hashing g_121 : 48699772 +...checksum after hashing g_138 : B3D1A79F +...checksum after hashing g_373 : F3978D10 +...checksum after hashing g_382 : 8204BF2B +...checksum after hashing g_428 : 2E563A3 +before stmt(336): checksum = 2E563A3 +...checksum after hashing g_2 : C8210FCD +...checksum after hashing g_42 : B71FF19B +...checksum after hashing g_69 : 82E7093C +...checksum after hashing g_113 : 585A044E +...checksum after hashing g_121 : 48699772 +...checksum after hashing g_138 : 2E069F26 +...checksum after hashing g_373 : F9528409 +...checksum after hashing g_382 : F69C56A4 +...checksum after hashing g_428 : FF1C9BD6 +before stmt(334): checksum = FF1C9BD6 +...checksum after hashing g_2 : C8210FCD +...checksum after hashing g_42 : B71FF19B +...checksum after hashing g_69 : 82E7093C +...checksum after hashing g_113 : 585A044E +...checksum after hashing g_121 : 48699772 +...checksum after hashing g_138 : 2E069F26 +...checksum after hashing g_373 : F9528409 +...checksum after hashing g_382 : F69C56A4 +...checksum after hashing g_428 : FF1C9BD6 +before stmt(202): checksum = FF1C9BD6 +...checksum after hashing g_2 : C8210FCD +...checksum after hashing g_42 : B71FF19B +...checksum after hashing g_69 : 82E7093C +...checksum after hashing g_113 : 585A044E +...checksum after hashing g_121 : 48699772 +...checksum after hashing g_138 : 2E069F26 +...checksum after hashing g_373 : F9528409 +...checksum after hashing g_382 : F69C56A4 +...checksum after hashing g_428 : FF1C9BD6 +before stmt(203): checksum = FF1C9BD6 +...checksum after hashing g_2 : C8210FCD +...checksum after hashing g_42 : B71FF19B +...checksum after hashing g_69 : 82E7093C +...checksum after hashing g_113 : 585A044E +...checksum after hashing g_121 : 48699772 +...checksum after hashing g_138 : 2E069F26 +...checksum after hashing g_373 : F9528409 +...checksum after hashing g_382 : F69C56A4 +...checksum after hashing g_428 : FF1C9BD6 +before stmt(335): checksum = FF1C9BD6 +...checksum after hashing g_2 : C8210FCD +...checksum after hashing g_42 : B71FF19B +...checksum after hashing g_69 : 82E7093C +...checksum after hashing g_113 : 585A044E +...checksum after hashing g_121 : 48699772 +...checksum after hashing g_138 : 2E069F26 +...checksum after hashing g_373 : F9528409 +...checksum after hashing g_382 : F69C56A4 +...checksum after hashing g_428 : FF1C9BD6 +before stmt(336): checksum = FF1C9BD6 +...checksum after hashing g_2 : C8210FCD +...checksum after hashing g_42 : B71FF19B +...checksum after hashing g_69 : 82E7093C +...checksum after hashing g_113 : 585A044E +...checksum after hashing g_121 : 48699772 +...checksum after hashing g_138 : 8C751064 +...checksum after hashing g_373 : 1EECA0F3 +...checksum after hashing g_382 : 642BBAB6 +...checksum after hashing g_428 : 1071E711 +before stmt(334): checksum = 1071E711 +...checksum after hashing g_2 : C8210FCD +...checksum after hashing g_42 : B71FF19B +...checksum after hashing g_69 : 82E7093C +...checksum after hashing g_113 : 585A044E +...checksum after hashing g_121 : 48699772 +...checksum after hashing g_138 : 8C751064 +...checksum after hashing g_373 : 1EECA0F3 +...checksum after hashing g_382 : 642BBAB6 +...checksum after hashing g_428 : 1071E711 +before stmt(202): checksum = 1071E711 +...checksum after hashing g_2 : C8210FCD +...checksum after hashing g_42 : B71FF19B +...checksum after hashing g_69 : 82E7093C +...checksum after hashing g_113 : 585A044E +...checksum after hashing g_121 : 48699772 +...checksum after hashing g_138 : 8C751064 +...checksum after hashing g_373 : 1EECA0F3 +...checksum after hashing g_382 : 642BBAB6 +...checksum after hashing g_428 : 1071E711 +before stmt(203): checksum = 1071E711 +...checksum after hashing g_2 : C8210FCD +...checksum after hashing g_42 : B71FF19B +...checksum after hashing g_69 : 82E7093C +...checksum after hashing g_113 : 585A044E +...checksum after hashing g_121 : 48699772 +...checksum after hashing g_138 : 8C751064 +...checksum after hashing g_373 : 1EECA0F3 +...checksum after hashing g_382 : 642BBAB6 +...checksum after hashing g_428 : 1071E711 +before stmt(335): checksum = 1071E711 +...checksum after hashing g_2 : C8210FCD +...checksum after hashing g_42 : B71FF19B +...checksum after hashing g_69 : 82E7093C +...checksum after hashing g_113 : 585A044E +...checksum after hashing g_121 : 48699772 +...checksum after hashing g_138 : 8C751064 +...checksum after hashing g_373 : 1EECA0F3 +...checksum after hashing g_382 : 642BBAB6 +...checksum after hashing g_428 : 1071E711 +before stmt(336): checksum = 1071E711 +...checksum after hashing g_2 : C8210FCD +...checksum after hashing g_42 : B71FF19B +...checksum after hashing g_69 : 82E7093C +...checksum after hashing g_113 : 585A044E +...checksum after hashing g_121 : 48699772 +...checksum after hashing g_138 : 9EC0BF8A +...checksum after hashing g_373 : 9063A710 +...checksum after hashing g_382 : 13B56846 +...checksum after hashing g_428 : 39B953E3 +before stmt(338): checksum = 39B953E3 +...checksum after hashing g_2 : C8210FCD +...checksum after hashing g_42 : B71FF19B +...checksum after hashing g_69 : 82E7093C +...checksum after hashing g_113 : 585A044E +...checksum after hashing g_121 : 48699772 +...checksum after hashing g_138 : 9EC0BF8A +...checksum after hashing g_373 : 9063A710 +...checksum after hashing g_382 : 13B56846 +...checksum after hashing g_428 : 39B953E3 +before stmt(339): checksum = 39B953E3 +...checksum after hashing g_2 : C8210FCD +...checksum after hashing g_42 : B71FF19B +...checksum after hashing g_69 : 82E7093C +...checksum after hashing g_113 : 585A044E +...checksum after hashing g_121 : 48699772 +...checksum after hashing g_138 : 9EC0BF8A +...checksum after hashing g_373 : 9063A710 +...checksum after hashing g_382 : 13B56846 +...checksum after hashing g_428 : 39B953E3 +before stmt(341): checksum = 39B953E3 +...checksum after hashing g_2 : C8210FCD +...checksum after hashing g_42 : B71FF19B +...checksum after hashing g_69 : 82E7093C +...checksum after hashing g_113 : 585A044E +...checksum after hashing g_121 : 48699772 +...checksum after hashing g_138 : 9EC0BF8A +...checksum after hashing g_373 : 9063A710 +...checksum after hashing g_382 : 13B56846 +...checksum after hashing g_428 : 39B953E3 +before stmt(12): checksum = 39B953E3 +...checksum after hashing g_2 : C8210FCD +...checksum after hashing g_42 : B71FF19B +...checksum after hashing g_69 : 82E7093C +...checksum after hashing g_113 : 585A044E +...checksum after hashing g_121 : 48699772 +...checksum after hashing g_138 : 9EC0BF8A +...checksum after hashing g_373 : 9063A710 +...checksum after hashing g_382 : 13B56846 +...checksum after hashing g_428 : 39B953E3 +before stmt(13): checksum = 39B953E3 +...checksum after hashing g_2 : C8210FCD +...checksum after hashing g_42 : B71FF19B +...checksum after hashing g_69 : 82E7093C +...checksum after hashing g_113 : 585A044E +...checksum after hashing g_121 : 48699772 +...checksum after hashing g_138 : 9EC0BF8A +...checksum after hashing g_373 : 9063A710 +...checksum after hashing g_382 : 13B56846 +...checksum after hashing g_428 : 39B953E3 +before stmt(14): checksum = 39B953E3 +...checksum after hashing g_2 : C8210FCD +...checksum after hashing g_42 : B71FF19B +...checksum after hashing g_69 : 82E7093C +...checksum after hashing g_113 : 585A044E +...checksum after hashing g_121 : 48699772 +...checksum after hashing g_138 : 9EC0BF8A +...checksum after hashing g_373 : 9063A710 +...checksum after hashing g_382 : 13B56846 +...checksum after hashing g_428 : 39B953E3 +before stmt(342): checksum = 39B953E3 +...checksum after hashing g_2 : C8210FCD +...checksum after hashing g_42 : B71FF19B +...checksum after hashing g_69 : 82E7093C +...checksum after hashing g_113 : 585A044E +...checksum after hashing g_121 : 48699772 +...checksum after hashing g_138 : 9EC0BF8A +...checksum after hashing g_373 : 9063A710 +...checksum after hashing g_382 : 13B56846 +...checksum after hashing g_428 : 39B953E3 +before stmt(390): checksum = 39B953E3 +...checksum after hashing g_2 : C8210FCD +...checksum after hashing g_42 : B71FF19B +...checksum after hashing g_69 : 82E7093C +...checksum after hashing g_113 : 585A044E +...checksum after hashing g_121 : 48699772 +...checksum after hashing g_138 : 9EC0BF8A +...checksum after hashing g_373 : 9063A710 +...checksum after hashing g_382 : 13B56846 +...checksum after hashing g_428 : 39B953E3 +before stmt(12): checksum = 39B953E3 +...checksum after hashing g_2 : C8210FCD +...checksum after hashing g_42 : B71FF19B +...checksum after hashing g_69 : 82E7093C +...checksum after hashing g_113 : 585A044E +...checksum after hashing g_121 : 48699772 +...checksum after hashing g_138 : 9EC0BF8A +...checksum after hashing g_373 : 9063A710 +...checksum after hashing g_382 : 13B56846 +...checksum after hashing g_428 : 39B953E3 +before stmt(13): checksum = 39B953E3 +...checksum after hashing g_2 : C8210FCD +...checksum after hashing g_42 : B71FF19B +...checksum after hashing g_69 : 82E7093C +...checksum after hashing g_113 : 585A044E +...checksum after hashing g_121 : 48699772 +...checksum after hashing g_138 : 9EC0BF8A +...checksum after hashing g_373 : 9063A710 +...checksum after hashing g_382 : 13B56846 +...checksum after hashing g_428 : 39B953E3 +before stmt(14): checksum = 39B953E3 +...checksum after hashing g_2 : C8210FCD +...checksum after hashing g_42 : B71FF19B +...checksum after hashing g_69 : 82E7093C +...checksum after hashing g_113 : 585A044E +...checksum after hashing g_121 : 48699772 +...checksum after hashing g_138 : 9EC0BF8A +...checksum after hashing g_373 : 9063A710 +...checksum after hashing g_382 : 13B56846 +...checksum after hashing g_428 : 39B953E3 +before stmt(391): checksum = 39B953E3 +...checksum after hashing g_2 : C8210FCD +...checksum after hashing g_42 : B71FF19B +...checksum after hashing g_69 : 82E7093C +...checksum after hashing g_113 : 585A044E +...checksum after hashing g_121 : 48699772 +...checksum after hashing g_138 : 9EC0BF8A +...checksum after hashing g_373 : 9063A710 +...checksum after hashing g_382 : 13B56846 +...checksum after hashing g_428 : 39B953E3 +before stmt(392): checksum = 39B953E3 +...checksum after hashing g_2 : C8210FCD +...checksum after hashing g_42 : B71FF19B +...checksum after hashing g_69 : 82E7093C +...checksum after hashing g_113 : 585A044E +...checksum after hashing g_121 : 48699772 +...checksum after hashing g_138 : 9EC0BF8A +...checksum after hashing g_373 : 9063A710 +...checksum after hashing g_382 : 13B56846 +...checksum after hashing g_428 : 39B953E3 +before stmt(393): checksum = 39B953E3 +...checksum after hashing g_2 : C8210FCD +...checksum after hashing g_42 : B71FF19B +...checksum after hashing g_69 : 82E7093C +...checksum after hashing g_113 : 585A044E +...checksum after hashing g_121 : 48699772 +...checksum after hashing g_138 : 9EC0BF8A +...checksum after hashing g_373 : 9063A710 +...checksum after hashing g_382 : 13B56846 +...checksum after hashing g_428 : 39B953E3 +checksum = 39b953e3 diff --git a/src/tests/csmith/rand48.c b/src/tests/csmith/rand48.c new file mode 100644 index 0000000..1e25c98 --- /dev/null +++ b/src/tests/csmith/rand48.c @@ -0,0 +1,88 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static unsigned g_2 = 0x3B26BDDEL; +static int func_1(void); +static int func_1(void) +{ + step_hash(1); + return g_2; +} +void csmith_compute_hash(void) +{ + transparent_crc(g_2, "g_2", print_hash_value); +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand48.expect b/src/tests/csmith/rand48.expect new file mode 100644 index 0000000..424e0f9 --- /dev/null +++ b/src/tests/csmith/rand48.expect @@ -0,0 +1,4 @@ +...checksum after hashing g_2 : 589C16F5 +before stmt(1): checksum = 589C16F5 +...checksum after hashing g_2 : 589C16F5 +checksum = 589c16f5 diff --git a/src/tests/csmith/rand49.c b/src/tests/csmith/rand49.c new file mode 100644 index 0000000..38d9beb --- /dev/null +++ b/src/tests/csmith/rand49.c @@ -0,0 +1,540 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static int g_2 = 0xC03342EBL; +static int g_77 = (-1L); +static signed char g_82 = (-1L); +static int g_84 = 0xA7276463L; +static int g_103 = 0x168F1D39L; +static int *g_121 = &g_2; +static int **g_120 = &g_121; +static unsigned short g_209 = 0x8AF1L; +static unsigned char g_225 = 255UL; +static unsigned g_228 = 0x37CC862BL; +static int g_255 = 0xE45A5366L; +static signed char func_1(void); +static unsigned func_8(int p_9, unsigned p_10); +static unsigned short func_13(signed char p_14, short p_15, unsigned char p_16, short p_17); +static unsigned char func_19(int p_20, unsigned p_21); +static short func_24(unsigned char p_25, short p_26, int p_27, int p_28, unsigned char p_29); +static unsigned func_48(unsigned p_49, unsigned char p_50, unsigned p_51, int p_52); +static unsigned func_53(short p_54, unsigned p_55, int p_56); +static unsigned short func_59(int p_60, signed char p_61, unsigned p_62, int p_63); +static unsigned func_64(unsigned char p_65); +static int func_68(unsigned short p_69, int p_70, int p_71, unsigned char p_72); +static signed char func_1(void) +{ + unsigned l_18 = 0xBBD0A708L; + int l_178 = 0x51062BF1L; + int l_322 = 0x6DBBD370L; + short l_323 = (-6L); + step_hash(238); + for (g_2 = 0; (g_2 <= 10); ++g_2) + { + signed char l_5 = (-9L); + int **l_328 = &g_121; + int *l_329 = &l_322; + } + step_hash(239); + return l_323; +} +static unsigned func_8(int p_9, unsigned p_10) +{ + int l_316 = 0x993A821AL; + unsigned short l_317 = 0UL; + unsigned l_320 = 4294967286UL; + int *l_321 = &g_255; + step_hash(215); + (*g_120) = &p_9; + step_hash(225); + for (g_82 = 0; (g_82 != 21); ++g_82) + { + step_hash(224); + for (p_10 = (-14); (p_10 > 3); p_10 += 1) + { + step_hash(222); + (*g_120) = &p_9; + step_hash(223); + return g_77; + } + } + step_hash(226); + (*l_321) = ((p_10 < l_316) ^ (func_13(l_316, g_82, l_317, (((((short)(p_10 ^ g_82) >> (short)5) > l_316) >= (p_9 && l_317)) <= p_10)) == l_320)); + step_hash(227); + return g_77; +} +static unsigned short func_13(signed char p_14, short p_15, unsigned char p_16, short p_17) +{ + short l_210 = (-5L); + int *l_211 = (void*)0; + int *l_212 = &g_77; + int ***l_309 = &g_120; + step_hash(118); + (*l_212) = (l_210 < p_14); + step_hash(211); + for (p_16 = 0; (p_16 <= 27); p_16 += 9) + { + int l_217 = 0x805B927CL; + short l_233 = (-8L); + int l_282 = (-5L); + step_hash(166); + if (p_17) + { + step_hash(123); + l_217 &= ((signed char)p_16 * (signed char)g_77); + step_hash(124); + (*l_212) = (g_84 != p_14); + } + else + { + unsigned short l_222 = 0x4FC1L; + int l_230 = 0L; + int l_245 = (-1L); + short l_265 = 0x163CL; + step_hash(134); + if (((unsigned char)p_17 % (unsigned char)((g_82 || (~((unsigned)(p_17 || l_222) + (unsigned)((void*)0 != &l_217)))) & func_64(p_14)))) + { + int l_229 = 0L; + step_hash(127); + l_230 ^= (((unsigned short)func_24((g_225 || (0xF7L != ((unsigned char)p_17 + (unsigned char)func_59(g_77, g_228, (&l_217 != (void*)0), (*l_212))))), l_217, l_217, g_77, p_16) - (unsigned short)1L) == l_229); + step_hash(128); + (*g_120) = &l_217; + step_hash(129); + (*g_120) = l_211; + step_hash(130); + l_229 = (((unsigned)p_16 / (unsigned)p_17) >= l_233); + } + else + { + step_hash(132); + if (l_217) + break; + step_hash(133); + return p_14; + } + step_hash(164); + for (g_77 = (-23); (g_77 < 22); ++g_77) + { + unsigned short l_244 = 0x34F9L; + int **l_280 = (void*)0; + step_hash(138); + l_217 = ((short)(((signed char)((((unsigned)((unsigned char)l_244 / (unsigned char)g_103) + (unsigned)l_245) == (*l_212)) && g_103) << (signed char)p_15) != ((int)((&g_121 == (void*)0) <= ((p_17 ^ 0x35L) >= g_77)) % (int)(-1L))) >> (short)1); + step_hash(162); + for (g_228 = 0; (g_228 > 32); g_228 += 7) + { + int **l_261 = &l_211; + short l_262 = 0x2008L; + unsigned l_263 = 0x41802645L; + int l_264 = 0x1A2FFDF3L; + step_hash(146); + for (p_14 = 0; (p_14 == 20); p_14++) + { + step_hash(145); + (*g_120) = (*g_120); + } + step_hash(152); + for (p_14 = 10; (p_14 < (-28)); p_14--) + { + int *l_254 = &g_2; + int *l_256 = &g_84; + step_hash(150); + (*g_120) = l_254; + step_hash(151); + (*l_256) = (!(!g_255)); + } + step_hash(153); + l_264 = ((func_64((*l_212)) <= g_84) || ((signed char)g_225 << (signed char)func_59((((int)(&l_217 != (void*)0) + (int)(l_261 == &l_212)) == (l_262 > 0xE5L)), g_77, g_82, l_263))); + step_hash(161); + if ((l_265 < ((+((((-(unsigned short)((unsigned short)((unsigned)(func_64(g_255) < ((unsigned char)((unsigned)0x1511DFD7L - (unsigned)p_14) << (unsigned char)((short)(g_209 < ((short)l_233 + (short)(&g_121 == &g_121))) << (short)g_2))) / (unsigned)l_217) - (unsigned short)p_14)) == (*l_212)) != 4294967290UL) | (-1L))) > 0x9590L))) + { + unsigned l_279 = 0xF72D5D3AL; + step_hash(155); + (*g_120) = (*g_120); + step_hash(156); + l_279 |= l_245; + step_hash(157); + return p_14; + } + else + { + int ***l_281 = &l_261; + step_hash(159); + (*l_281) = l_280; + step_hash(160); + return l_233; + } + } + step_hash(163); + l_230 = l_282; + } + step_hash(165); + return l_245; + } + step_hash(210); + for (l_210 = 0; (l_210 == (-28)); l_210--) + { + short l_290 = 9L; + int l_298 = 0x5D891B15L; + step_hash(196); + for (g_228 = 6; (g_228 > 14); g_228 += 7) + { + int *l_289 = &g_2; + step_hash(173); + (*g_120) = &l_217; + step_hash(174); + (*g_120) = (*g_120); + step_hash(194); + for (g_82 = 0; (g_82 < (-15)); g_82 -= 1) + { + unsigned l_293 = 0x0E9AD63DL; + int *l_301 = &l_217; + } + step_hash(195); + (**l_309) = (*g_120); + } + step_hash(202); + for (g_84 = 0; (g_84 <= (-14)); g_84 -= 1) + { + step_hash(200); + (*g_120) = &l_298; + step_hash(201); + if (p_14) + break; + } + step_hash(209); + if (l_217) + { + step_hash(204); + (*l_212) &= 0x74C5E4DCL; + step_hash(205); + return g_225; + } + else + { + step_hash(207); + (**l_309) = &l_282; + step_hash(208); + (**l_309) = (**l_309); + } + } + } + step_hash(212); + (*g_120) = l_212; + step_hash(213); + return g_2; +} +static unsigned char func_19(int p_20, unsigned p_21) +{ + int *l_208 = &g_84; + step_hash(115); + for (g_103 = 19; (g_103 <= 10); g_103 -= 7) + { + int *l_207 = &g_84; + step_hash(113); + l_208 = l_207; + step_hash(114); + (*g_120) = l_207; + } + step_hash(116); + return g_209; +} +static short func_24(unsigned char p_25, short p_26, int p_27, int p_28, unsigned char p_29) +{ + unsigned l_193 = 0xF16E3D7EL; + unsigned l_202 = 0x66428892L; + int *l_203 = (void*)0; + int *l_204 = &g_103; + step_hash(106); + (*l_204) &= (g_84 & ((unsigned short)((signed char)((unsigned char)g_77 + (unsigned char)g_2) + (signed char)(((((unsigned short)(((l_193 & ((g_82 <= p_25) >= p_27)) ^ p_28) != g_2) << (unsigned short)l_193) > g_2) == l_202) & 2UL)) << (unsigned short)l_193)); + step_hash(107); + (*l_204) &= p_27; + step_hash(108); + return g_103; +} +static unsigned func_48(unsigned p_49, unsigned char p_50, unsigned p_51, int p_52) +{ + unsigned l_183 = 4294967291UL; + unsigned short l_186 = 0xFCA4L; + int *l_187 = &g_77; + step_hash(102); + if ((((unsigned short)((short)0xAC06L >> (short)3) / (unsigned short)(l_183 ^ p_49)) >= ((unsigned short)func_59(p_49, l_186, p_50, (p_50 <= ((func_68(l_186, g_103, l_183, l_186) | 0x0038BE24L) || p_52))) >> (unsigned short)p_50))) + { + step_hash(92); + (*g_120) = l_187; + } + else + { + step_hash(98); + for (p_51 = 0; (p_51 > 42); p_51++) + { + step_hash(97); + return g_2; + } + step_hash(99); + (*l_187) = p_52; + step_hash(100); + (*g_120) = &g_77; + step_hash(101); + (*g_121) = (*g_121); + } + step_hash(103); + (*g_120) = (void*)0; + step_hash(104); + return g_2; +} +static unsigned func_53(short p_54, unsigned p_55, int p_56) +{ + int *l_119 = &g_77; + int **l_118 = &l_119; + signed char l_171 = (-7L); + step_hash(37); + (*l_118) = &g_84; + step_hash(88); + if (((0xE0L > p_55) && (func_68((g_120 != &l_119), func_68(((void*)0 == (*g_120)), p_54, (((unsigned short)((unsigned short)(((*l_119) < g_84) || g_82) * (unsigned short)g_2) << (unsigned short)g_77) != p_56), p_55), g_103, p_55) >= 0x94L))) + { + signed char l_147 = 0x73L; + int *l_170 = (void*)0; + step_hash(52); + for (g_82 = 0; (g_82 < 7); g_82 += 6) + { + unsigned char l_128 = 6UL; + step_hash(42); + if (l_128) + break; + step_hash(51); + for (p_55 = (-19); (p_55 <= 56); p_55 += 6) + { + step_hash(50); + for (l_128 = 0; (l_128 >= 30); l_128 += 1) + { + step_hash(49); + return g_103; + } + } + } + step_hash(77); + for (g_103 = 9; (g_103 == 21); g_103 += 7) + { + short l_141 = (-1L); + int l_142 = (-8L); + step_hash(56); + l_142 ^= ((((short)((short)((unsigned short)l_141 * (unsigned short)(((&l_119 != &l_119) && 2L) <= func_68((g_103 != 0xA75CL), p_54, p_54, p_56))) >> (short)p_56) << (short)15) >= 0x7660C929L) || p_54); + step_hash(57); + (*l_119) = p_56; + step_hash(76); + if (p_55) + { + int l_151 = 1L; + unsigned short l_163 = 65535UL; + int *l_164 = (void*)0; + int *l_165 = &l_142; + step_hash(71); + for (p_54 = 19; (p_54 < 14); p_54--) + { + unsigned l_154 = 0x171667F3L; + int *l_155 = &g_77; + int *l_156 = &l_142; + step_hash(67); + for (p_55 = (-3); (p_55 != 45); p_55 += 5) + { + int l_148 = 0x09E68FEEL; + step_hash(65); + p_56 ^= l_147; + step_hash(66); + return l_148; + } + step_hash(68); + p_56 = (((p_55 >= ((((g_82 && g_77) > g_84) || 0xCEF6A3D7L) && ((unsigned char)func_68(l_151, p_56, p_54, (0x52BCL < 0x8EE5L)) * (unsigned char)0x2AL))) <= (*g_121)) ^ g_2); + step_hash(69); + (*l_155) ^= ((unsigned short)(**l_118) << (unsigned short)(l_154 == g_2)); + step_hash(70); + (*l_156) ^= (p_56 >= func_68(l_141, (p_55 | g_82), l_147, l_151)); + } + step_hash(72); + (*g_120) = &p_56; + step_hash(73); + (*l_165) &= ((short)func_68(((short)1L * (short)((short)(~g_2) * (short)p_54)), l_163, ((((l_147 <= (p_56 && func_68(p_54, p_55, p_54, g_2))) && 1L) & p_54) > 1UL), p_55) << (short)p_54); + } + else + { + step_hash(75); + if (p_56) + break; + } + } + step_hash(83); + for (p_54 = 0; (p_54 != (-1)); p_54 -= 8) + { + } + step_hash(84); + (*g_120) = l_170; + } + else + { + short l_176 = (-9L); + int l_177 = 0xDADA64CFL; + step_hash(86); + (*l_118) = (void*)0; + step_hash(87); + l_177 = (l_171 > ((g_84 | ((~p_56) < p_54)) < ((unsigned char)g_77 / (unsigned char)(func_64((+((((**g_120) <= ((unsigned char)g_77 % (unsigned char)func_64(l_176))) < p_55) != l_176))) && 0xA06A2A82L)))); + } + step_hash(89); + return p_55; +} +static unsigned short func_59(int p_60, signed char p_61, unsigned p_62, int p_63) +{ + unsigned short l_109 = 9UL; + int *l_110 = &g_84; + unsigned l_115 = 4294967295UL; + int **l_117 = &l_110; + step_hash(25); + (*l_110) = (((signed char)0x68L * (signed char)p_61) & ((unsigned short)(p_62 && (l_109 != 255UL)) * (unsigned short)(((p_62 ^ func_64(g_103)) & 0xD3C1L) < l_109))); + step_hash(33); + for (g_84 = 27; (g_84 <= (-27)); g_84--) + { + unsigned l_113 = 4294967295UL; + int *l_114 = &g_103; + int **l_116 = &l_110; + step_hash(29); + (*l_114) = (~l_113); + step_hash(30); + if (p_62) + continue; + step_hash(31); + if (l_115) + break; + step_hash(32); + (*l_116) = &g_77; + } + step_hash(34); + (*l_117) = &g_84; + step_hash(35); + return g_77; +} +static unsigned func_64(unsigned char p_65) +{ + signed char l_87 = 0x6FL; + signed char l_90 = 0L; + int l_91 = (-1L); + int *l_102 = &g_103; + step_hash(21); + l_91 &= (((l_87 > p_65) < ((unsigned char)(+g_84) >> (unsigned char)4)) < (g_2 && (l_90 && 0UL))); + step_hash(22); + (*l_102) &= ((((&l_91 == (void*)0) <= l_87) & (((((unsigned)g_84 % (unsigned)((unsigned)0x57DCCC76L / (unsigned)((short)((signed char)(l_91 & (g_77 || l_91)) - (signed char)0xA1L) >> (short)5))) != 0UL) || p_65) ^ 0x5FL)) || l_90); + step_hash(23); + return p_65; +} +static int func_68(unsigned short p_69, int p_70, int p_71, unsigned char p_72) +{ + int *l_76 = &g_77; + int l_86 = 1L; + step_hash(17); + for (p_69 = 0; (p_69 == 44); p_69 += 8) + { + unsigned short l_85 = 7UL; + step_hash(9); + l_76 = (void*)0; + step_hash(15); + for (g_77 = 0; (g_77 == (-3)); g_77--) + { + int *l_83 = &g_84; + step_hash(13); + g_82 |= ((int)p_69 - (int)g_77); + step_hash(14); + (*l_83) = g_2; + } + step_hash(16); + if (l_85) + continue; + } + step_hash(18); + l_86 = l_86; + step_hash(19); + return g_82; +} +void csmith_compute_hash(void) +{ + transparent_crc(g_2, "g_2", print_hash_value); + transparent_crc(g_77, "g_77", print_hash_value); + transparent_crc(g_82, "g_82", print_hash_value); + transparent_crc(g_84, "g_84", print_hash_value); + transparent_crc(g_103, "g_103", print_hash_value); + transparent_crc(g_209, "g_209", print_hash_value); + transparent_crc(g_225, "g_225", print_hash_value); + transparent_crc(g_228, "g_228", print_hash_value); + transparent_crc(g_255, "g_255", print_hash_value); +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand49.expect b/src/tests/csmith/rand49.expect new file mode 100644 index 0000000..2cc21b3 --- /dev/null +++ b/src/tests/csmith/rand49.expect @@ -0,0 +1,30 @@ +...checksum after hashing g_2 : 3C2BE70B +...checksum after hashing g_77 : DD4C3F35 +...checksum after hashing g_82 : B393FBA1 +...checksum after hashing g_84 : 913CB99D +...checksum after hashing g_103 : 81084F0A +...checksum after hashing g_209 : B52123AF +...checksum after hashing g_225 : E7D67AE7 +...checksum after hashing g_228 : 97FF2C19 +...checksum after hashing g_255 : 57C92891 +before stmt(238): checksum = 57C92891 +...checksum after hashing g_2 : F645581D +...checksum after hashing g_77 : E6F3E3DC +...checksum after hashing g_82 : 4E216214 +...checksum after hashing g_84 : 5CADC6D1 +...checksum after hashing g_103 : 82E882B4 +...checksum after hashing g_209 : 168CBD43 +...checksum after hashing g_225 : D884216B +...checksum after hashing g_228 : 6E72F620 +...checksum after hashing g_255 : 10B883E2 +before stmt(239): checksum = 10B883E2 +...checksum after hashing g_2 : F645581D +...checksum after hashing g_77 : E6F3E3DC +...checksum after hashing g_82 : 4E216214 +...checksum after hashing g_84 : 5CADC6D1 +...checksum after hashing g_103 : 82E882B4 +...checksum after hashing g_209 : 168CBD43 +...checksum after hashing g_225 : D884216B +...checksum after hashing g_228 : 6E72F620 +...checksum after hashing g_255 : 10B883E2 +checksum = 10b883e2 diff --git a/src/tests/csmith/rand5.c b/src/tests/csmith/rand5.c new file mode 100644 index 0000000..a88b5dc --- /dev/null +++ b/src/tests/csmith/rand5.c @@ -0,0 +1,87 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static signed char func_1(void); +static signed char func_1(void) +{ + unsigned l_2 = 0xAC204E2DL; + step_hash(1); + return l_2; +} +void csmith_compute_hash(void) +{ +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand5.expect b/src/tests/csmith/rand5.expect new file mode 100644 index 0000000..0b4e62a --- /dev/null +++ b/src/tests/csmith/rand5.expect @@ -0,0 +1,2 @@ +before stmt(1): checksum = 0 +checksum = 0 diff --git a/src/tests/csmith/rand50.c b/src/tests/csmith/rand50.c new file mode 100644 index 0000000..81d8892 --- /dev/null +++ b/src/tests/csmith/rand50.c @@ -0,0 +1,1559 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static unsigned g_18 = 0xB5934215L; +static int g_41 = 0x04CD021AL; +static int g_80 = 0x123EBAA2L; +static short g_94 = 0L; +static int g_146 = 0xC6E3A6DCL; +static unsigned short g_149 = 65532UL; +static int g_167 = 0xAB27A36CL; +static int *g_196 = (void*)0; +static int **g_195 = &g_196; +static short g_221 = 0x9111L; +static unsigned char g_232 = 0UL; +static int g_318 = 0xDB17C0C1L; +static signed char g_324 = 1L; +static unsigned g_328 = 0x3DB9FBB9L; +static unsigned char g_370 = 0x71L; +static int g_486 = (-1L); +static int g_490 = (-8L); +static int g_495 = 0xA50CEE03L; +static unsigned g_560 = 0x6B8B8FC5L; +static signed char g_607 = 0x22L; +static int g_611 = (-1L); +static unsigned g_629 = 1UL; +static int g_729 = 1L; +static unsigned short g_877 = 0x5E3EL; +static unsigned short g_1086 = 0UL; +static int g_1223 = 0xD047683CL; +static unsigned g_1237 = 4294967292UL; +static int func_1(void); +static int func_2(unsigned short p_3, unsigned short p_4, signed char p_5, signed char p_6); +static unsigned short func_7(int p_8, unsigned short p_9); +static int func_10(unsigned short p_11, unsigned p_12, short p_13); +static short func_19(unsigned p_20, int p_21, unsigned p_22, int p_23, short p_24); +static signed char func_26(unsigned char p_27, unsigned p_28); +static unsigned char func_31(int p_32); +static unsigned char func_37(unsigned short p_38); +static signed char func_49(unsigned p_50, unsigned p_51, int p_52, unsigned short p_53, unsigned short p_54); +static unsigned func_58(unsigned char p_59); +static int func_1(void) +{ + unsigned l_25 = 0xB74C38B6L; + int l_420 = 1L; + unsigned short l_880 = 65535UL; + int *l_1250 = &g_495; + step_hash(307); + (*l_1250) = func_2(func_7(func_10(((unsigned short)((short)g_18 % (short)func_19(l_25, ((func_26((((unsigned char)(((((((l_25 || func_31(g_18)) >= l_25) > ((unsigned short)((g_18 || g_221) > g_318) + (unsigned short)l_25)) < l_25) & g_221) || l_25) == g_18) / (unsigned char)l_25) && g_318), l_25) ^ l_420) > l_25), l_420, g_167, g_167)) - (unsigned short)l_420), g_324, l_25), g_167), l_420, l_880, l_25); + step_hash(308); + return g_167; +} +static int func_2(unsigned short p_3, unsigned short p_4, signed char p_5, signed char p_6) +{ + unsigned short l_949 = 65535UL; + int *l_952 = &g_80; + unsigned char l_966 = 0x68L; + int l_1012 = 0x7F196D99L; + int l_1081 = 0x534D0B4FL; + int l_1196 = 0xBD8F0B1BL; + int l_1214 = (-1L); + int l_1219 = 0xAD8BA143L; + int l_1227 = (-10L); + int l_1233 = 0x060EC55AL; + step_hash(304); + if (((((g_729 != 4294967295UL) | ((short)p_3 << (short)3)) != (-3L)) >= 65534UL)) + { + int *l_885 = (void*)0; + int l_921 = 3L; + int l_925 = 0x468D8FB6L; + step_hash(243); + for (g_149 = 0; (g_149 == 27); g_149++) + { + int *l_886 = &g_41; + int *l_887 = &g_80; + int *l_888 = &g_495; + int *l_889 = &g_486; + int *l_890 = &g_41; + int l_891 = 1L; + int *l_892 = (void*)0; + int *l_893 = (void*)0; + int *l_894 = &g_729; + int *l_895 = (void*)0; + int *l_896 = &g_41; + int *l_897 = (void*)0; + int l_898 = 5L; + int *l_899 = &g_80; + int *l_900 = &g_80; + int *l_901 = &g_495; + int *l_902 = &g_495; + int *l_903 = &g_80; + int *l_904 = (void*)0; + int *l_905 = &g_486; + int *l_906 = &g_729; + int *l_907 = (void*)0; + int *l_908 = (void*)0; + int l_909 = 0xE66FB2EEL; + int *l_910 = &l_891; + int *l_911 = &g_486; + int *l_912 = &l_909; + int *l_913 = &g_729; + int *l_914 = &g_41; + int *l_915 = &l_891; + int *l_916 = &l_898; + int *l_917 = &g_495; + int *l_918 = (void*)0; + int *l_919 = &l_898; + int *l_920 = &l_898; + int *l_922 = &l_898; + int *l_923 = &l_921; + int l_924 = 0x37298482L; + int *l_926 = &g_486; + int *l_927 = &g_729; + int *l_928 = (void*)0; + int *l_929 = &g_729; + int *l_930 = &g_41; + int *l_931 = &l_898; + int *l_932 = &l_924; + int *l_933 = &g_80; + int *l_934 = (void*)0; + int *l_935 = &l_891; + int *l_936 = &g_80; + int *l_937 = (void*)0; + int *l_938 = &l_924; + int *l_939 = &l_898; + int *l_940 = &g_495; + int *l_941 = (void*)0; + int *l_942 = &l_925; + int *l_943 = &g_486; + int *l_944 = &l_898; + int *l_945 = &g_729; + int *l_946 = &l_921; + int *l_947 = (void*)0; + int *l_948 = &g_486; + step_hash(241); + (*g_195) = l_885; + step_hash(242); + --l_949; + } + step_hash(244); + l_952 = &l_925; + } + else + { + unsigned short l_965 = 0x33D4L; + unsigned short l_969 = 0x1797L; + int l_1031 = (-4L); + unsigned char l_1116 = 255UL; + int l_1150 = 1L; + int l_1208 = 3L; + int l_1212 = 0L; + int *l_1247 = &l_1233; + step_hash(281); + if ((((signed char)((short)p_3 << (short)13) + (signed char)((l_966 && p_4) | g_167)) == (-1L))) + { + unsigned char l_1000 = 0xAAL; + int *l_1003 = &g_80; + int *l_1004 = &g_729; + int *l_1005 = (void*)0; + int *l_1006 = &g_486; + int *l_1007 = &g_80; + int *l_1008 = (void*)0; + int *l_1009 = &g_80; + int *l_1010 = &g_729; + int *l_1011 = &g_80; + int *l_1013 = (void*)0; + int *l_1014 = &l_1012; + int *l_1015 = &g_80; + int *l_1016 = &g_495; + int *l_1017 = &g_495; + int *l_1018 = &g_486; + int *l_1019 = &g_729; + int *l_1020 = &l_1012; + int *l_1021 = &g_729; + int *l_1022 = &g_41; + int *l_1023 = &g_80; + int *l_1024 = &g_495; + int l_1025 = 0x9DE32E2BL; + int *l_1026 = &l_1025; + int *l_1027 = &g_486; + int *l_1028 = (void*)0; + int *l_1029 = &g_486; + int *l_1030 = &l_1025; + int *l_1032 = &l_1025; + int *l_1033 = &l_1012; + int *l_1034 = &g_80; + int *l_1035 = (void*)0; + int *l_1036 = &l_1031; + int *l_1037 = &l_1012; + int *l_1038 = &l_1012; + int *l_1039 = (void*)0; + int *l_1040 = &g_495; + int *l_1041 = (void*)0; + int *l_1042 = &l_1031; + int *l_1043 = &g_80; + int *l_1044 = &l_1031; + int *l_1045 = &l_1031; + int *l_1046 = &g_80; + int *l_1047 = &g_486; + int *l_1048 = (void*)0; + int *l_1049 = &l_1025; + int *l_1050 = &l_1031; + int *l_1051 = &l_1012; + int *l_1052 = &l_1012; + int *l_1053 = &g_729; + int *l_1054 = &l_1012; + int *l_1055 = &g_41; + int *l_1056 = &g_729; + int *l_1057 = &l_1012; + int *l_1058 = &g_729; + int *l_1059 = (void*)0; + int *l_1060 = &g_80; + int *l_1061 = (void*)0; + int *l_1062 = &l_1025; + int *l_1063 = &g_41; + int *l_1064 = (void*)0; + int *l_1065 = &l_1031; + int *l_1066 = (void*)0; + int *l_1067 = &g_729; + int *l_1068 = &l_1012; + int *l_1069 = (void*)0; + int *l_1070 = &g_486; + int l_1071 = (-3L); + int *l_1072 = &l_1071; + int *l_1073 = (void*)0; + int *l_1074 = &l_1071; + int *l_1075 = (void*)0; + int l_1076 = (-1L); + int *l_1077 = &g_41; + int l_1078 = 0L; + int *l_1079 = &g_41; + int *l_1080 = &g_495; + int *l_1082 = &g_41; + int *l_1083 = (void*)0; + int *l_1084 = &g_729; + int *l_1085 = &g_495; + step_hash(252); + for (p_4 = (-5); (p_4 == 2); p_4 += 7) + { + int *l_972 = &g_729; + int *l_973 = &g_41; + int *l_974 = &g_80; + int *l_975 = &g_80; + int *l_976 = &g_486; + int *l_977 = (void*)0; + int *l_978 = &g_486; + int *l_979 = &g_80; + int *l_980 = &g_729; + int *l_981 = &g_41; + int *l_982 = &g_80; + int *l_983 = &g_495; + int *l_984 = &g_729; + int *l_985 = &g_41; + int *l_986 = (void*)0; + int *l_987 = (void*)0; + int *l_988 = &g_486; + int l_989 = 0xED973582L; + int *l_990 = (void*)0; + int *l_991 = &g_41; + int *l_992 = &g_729; + int l_993 = 0x29844B3BL; + int *l_994 = &g_486; + int *l_995 = &l_989; + int *l_996 = &g_495; + int *l_997 = &g_486; + int *l_998 = &l_993; + int *l_999 = &g_486; + step_hash(250); + l_969--; + step_hash(251); + ++l_1000; + } + step_hash(253); + g_1086--; + } + else + { + int ***l_1095 = &g_195; + step_hash(274); + if ((!(+((unsigned short)(((((int)((signed char)(&g_195 != l_1095) << (signed char)g_729) / (int)((unsigned)((unsigned)(((signed char)g_94 * (signed char)p_5) >= (*l_952)) + (unsigned)p_3) - (unsigned)func_26((*l_952), ((void*)0 == &l_1031)))) && p_6) || l_1031) ^ p_3) - (unsigned short)g_1086)))) + { + short l_1106 = 0xC628L; + unsigned short l_1119 = 9UL; + step_hash(271); + for (l_1012 = 0; (l_1012 >= (-6)); l_1012--) + { + unsigned short l_1107 = 0x9C79L; + unsigned l_1114 = 1UL; + int l_1115 = (-1L); + step_hash(265); + for (p_3 = 0; (p_3 <= 35); p_3 += 3) + { + step_hash(262); + l_1107++; + step_hash(263); + if (p_3) + continue; + step_hash(264); + l_1115 |= ((signed char)((short)l_1114 >> (short)4) >> (signed char)3); + } + step_hash(270); + if ((g_221 ^ func_19(((p_6 > 5UL) && ((l_1116 <= (*l_952)) | ((short)p_6 * (short)((void*)0 != &g_195)))), ((l_1106 != p_5) <= p_5), g_729, l_1114, p_6))) + { + step_hash(267); + return l_1115; + } + else + { + step_hash(269); + return l_1119; + } + } + } + else + { + step_hash(273); + return p_3; + } + step_hash(275); + (*g_195) = &l_1031; + step_hash(280); + for (g_146 = 8; (g_146 < (-12)); g_146--) + { + step_hash(279); + if ((**g_195)) + break; + } + } + step_hash(294); + if (func_26((*l_952), p_5)) + { + step_hash(283); + (*l_952) = p_3; + } + else + { + int *l_1122 = &g_41; + int *l_1123 = &l_1012; + int *l_1124 = &g_41; + int *l_1125 = &l_1031; + int *l_1126 = &l_1081; + int *l_1127 = &l_1081; + int *l_1128 = (void*)0; + int *l_1129 = &l_1012; + int *l_1130 = &l_1012; + int *l_1131 = &l_1081; + int *l_1132 = &g_729; + int *l_1133 = &g_80; + int *l_1134 = &l_1081; + int *l_1135 = (void*)0; + int *l_1136 = &g_495; + int *l_1137 = &g_41; + int *l_1138 = &l_1081; + int *l_1139 = &l_1031; + int *l_1140 = (void*)0; + int *l_1141 = (void*)0; + int *l_1142 = &l_1081; + int *l_1143 = &g_486; + int *l_1144 = &l_1081; + int *l_1145 = &g_41; + int *l_1146 = &g_486; + int *l_1147 = &g_80; + int *l_1148 = &g_495; + int *l_1149 = &g_486; + int *l_1151 = &l_1031; + int *l_1152 = &l_1012; + int *l_1153 = (void*)0; + int *l_1154 = &g_41; + int *l_1155 = &g_729; + int *l_1156 = (void*)0; + int *l_1157 = &g_729; + int *l_1158 = &g_729; + int *l_1159 = &l_1031; + int *l_1160 = &g_495; + int *l_1161 = &l_1081; + int *l_1162 = &g_486; + int *l_1163 = &l_1031; + int *l_1164 = &g_495; + int *l_1165 = &g_495; + int *l_1166 = &l_1081; + int *l_1167 = &l_1031; + int *l_1168 = &l_1031; + int *l_1169 = (void*)0; + int *l_1170 = &g_41; + int *l_1171 = &g_41; + int *l_1172 = &l_1150; + int *l_1173 = &g_486; + int *l_1174 = &l_1081; + int *l_1175 = &l_1031; + int *l_1176 = &l_1012; + int *l_1177 = (void*)0; + int *l_1178 = &l_1031; + int *l_1179 = &l_1031; + int *l_1180 = (void*)0; + int *l_1181 = &l_1031; + int *l_1182 = &g_495; + int *l_1183 = &l_1081; + int *l_1184 = &l_1150; + int *l_1185 = &g_495; + int *l_1186 = &l_1012; + int *l_1187 = &g_729; + int *l_1188 = &g_80; + int *l_1189 = &l_1081; + int *l_1190 = (void*)0; + int *l_1191 = (void*)0; + int *l_1192 = &l_1012; + int *l_1193 = &l_1081; + int *l_1194 = &l_1031; + int *l_1195 = &g_495; + int *l_1197 = &l_1150; + int *l_1198 = (void*)0; + int *l_1199 = &g_729; + int *l_1200 = (void*)0; + int *l_1201 = (void*)0; + int *l_1202 = &g_729; + int *l_1203 = &l_1012; + int *l_1204 = &l_1196; + int *l_1205 = &l_1081; + int *l_1206 = &g_729; + int *l_1207 = &g_486; + int *l_1209 = &g_729; + int *l_1210 = &l_1150; + int *l_1211 = (void*)0; + int *l_1213 = &l_1081; + int *l_1215 = &l_1150; + int l_1216 = (-5L); + int *l_1217 = &l_1196; + int *l_1218 = &g_495; + int *l_1220 = &g_486; + int *l_1221 = &g_729; + int *l_1222 = &l_1219; + int *l_1224 = &l_1208; + int *l_1225 = (void*)0; + int *l_1226 = (void*)0; + int l_1228 = 0x27B19BAEL; + int *l_1229 = &l_1212; + int *l_1230 = &l_1081; + int *l_1231 = (void*)0; + int *l_1232 = &l_1081; + int *l_1234 = &l_1031; + int *l_1235 = &g_1223; + int *l_1236 = &l_1196; + step_hash(285); + ++g_1237; + step_hash(286); + (*l_1172) = (&l_1134 == &g_196); + step_hash(292); + for (l_1196 = 5; (l_1196 > 3); l_1196 -= 8) + { + step_hash(290); + if (p_5) + break; + step_hash(291); + (*l_1165) |= ((unsigned short)(*l_952) % (unsigned short)(p_5 | func_26(g_232, g_1223))); + } + step_hash(293); + (*l_1133) = 9L; + } + step_hash(302); + for (g_486 = 0; (g_486 >= 20); g_486 += 9) + { + unsigned l_1246 = 0x13D87127L; + step_hash(298); + (*g_195) = &l_1214; + step_hash(299); + (*g_195) = (*g_195); + step_hash(300); + (*l_952) = l_1246; + step_hash(301); + if ((**g_195)) + continue; + } + step_hash(303); + (*l_1247) |= (*l_952); + } + step_hash(305); + g_495 |= ((short)l_1219 / (short)g_729); + step_hash(306); + return l_1081; +} +static unsigned short func_7(int p_8, unsigned short p_9) +{ + unsigned char l_685 = 0UL; + int *l_686 = &g_80; + unsigned short l_707 = 0x7B14L; + step_hash(179); + (*l_686) |= (l_685 <= 0x4D46L); + step_hash(233); + for (g_370 = (-13); (g_370 < 53); ++g_370) + { + unsigned l_698 = 0xCD548416L; + int **l_722 = &g_196; + int l_752 = (-6L); + unsigned l_787 = 9UL; + unsigned l_803 = 4294967295UL; + int l_804 = 0xB39E4F21L; + int l_848 = 8L; + int l_850 = 0xC45FE556L; + int l_854 = 1L; + int l_857 = 0x34626FBBL; + step_hash(193); + for (g_146 = 14; (g_146 > 29); g_146 += 1) + { + int ***l_691 = &g_195; + step_hash(191); + if (((((void*)0 != &g_196) > (((void*)0 == l_691) ^ ((int)((short)(((~p_8) ^ (((signed char)((void*)0 != l_691) % (signed char)func_19((p_9 || (func_58(p_8) == 1UL)), g_232, p_9, g_18, g_18)) < l_698)) ^ g_495) >> (short)4) % (int)l_698))) != 9L)) + { + int *l_699 = (void*)0; + int *l_700 = (void*)0; + int *l_701 = (void*)0; + int *l_702 = &g_495; + int *l_703 = &g_495; + int *l_704 = &g_41; + int *l_705 = (void*)0; + int *l_706 = (void*)0; + step_hash(187); + l_707++; + step_hash(188); + (*l_686) = ((unsigned short)p_8 >> (unsigned short)5); + } + else + { + step_hash(190); + (**l_691) = &p_8; + } + step_hash(192); + return p_8; + } + step_hash(232); + if (((short)(((unsigned)(((signed char)p_8 / (signed char)p_8) == (&l_686 == &l_686)) % (unsigned)((unsigned short)(((((signed char)p_8 >> (signed char)5) && ((&g_196 != l_722) == ((unsigned char)p_8 * (unsigned char)((unsigned short)((unsigned char)(p_9 ^ (*l_686)) << (unsigned char)g_729) >> (unsigned short)2)))) || 3UL) >= 1UL) * (unsigned short)(*l_686))) != g_560) / (short)g_490)) + { + int **l_730 = &l_686; + int ***l_731 = &l_722; + step_hash(195); + if (p_8) + break; + step_hash(196); + (*g_195) = &p_8; + step_hash(197); + (*l_731) = l_730; + step_hash(198); + (**l_730) = (**g_195); + } + else + { + unsigned short l_760 = 0UL; + int ***l_816 = &l_722; + signed char l_819 = 5L; + int l_849 = 0xD4B72E8FL; + step_hash(200); + (*l_686) &= 9L; + step_hash(230); + if ((!(-9L))) + { + int l_738 = 0x0AEAE064L; + step_hash(217); + if (((int)((short)g_486 * (short)(((*l_686) >= (func_19(l_738, g_318, p_9, g_221, g_729) || (&l_722 == &l_722))) ^ p_8)) - (int)4294967288UL)) + { + unsigned l_751 = 0UL; + int *l_753 = &g_495; + step_hash(203); + if (p_8) + break; + step_hash(204); + l_752 |= (((signed char)((unsigned)((0xC9FC870BL >= (p_8 & ((short)(((((unsigned)4294967295UL - (unsigned)(~p_9)) <= ((unsigned char)(g_495 | ((~g_94) > ((signed char)(g_370 && 4UL) % (signed char)p_8))) * (unsigned char)(-1L))) || (-1L)) && (*l_686)) >> (short)g_318))) ^ (*l_686)) - (unsigned)1UL) - (signed char)0x26L) & l_751); + step_hash(205); + (*g_195) = l_753; + } + else + { + int *l_763 = &g_41; + int *l_764 = (void*)0; + int *l_765 = &g_729; + int *l_766 = &g_729; + int *l_767 = &g_729; + int *l_768 = &g_41; + int *l_769 = (void*)0; + int *l_770 = &g_495; + int *l_771 = &g_41; + int *l_772 = &l_752; + int *l_773 = &g_729; + int *l_774 = (void*)0; + int *l_775 = &l_752; + int *l_776 = &g_41; + int *l_777 = (void*)0; + int *l_778 = &l_752; + int *l_779 = &l_752; + int *l_780 = &l_752; + int *l_781 = &g_486; + int *l_782 = &g_486; + int *l_783 = &l_752; + int *l_784 = &g_729; + int *l_785 = &g_41; + int *l_786 = (void*)0; + step_hash(207); + (*l_686) = 0x8AF709B0L; + step_hash(214); + for (p_9 = 0; (p_9 <= 55); p_9++) + { + int *l_756 = &g_729; + int *l_757 = &g_80; + int *l_758 = &g_486; + int *l_759 = &g_486; + step_hash(211); + l_760--; + step_hash(212); + if (l_760) + break; + step_hash(213); + (*l_686) = 1L; + } + step_hash(215); + ++l_787; + step_hash(216); + (*l_686) = (((signed char)0x70L * (signed char)(0xABAA88EEL <= 0xF1821C2EL)) ^ l_760); + } + } + else + { + signed char l_794 = 9L; + unsigned l_810 = 1UL; + int l_817 = (-1L); + int *l_818 = &g_41; + int *l_820 = &g_495; + int *l_821 = &g_486; + int *l_822 = &l_817; + int *l_823 = &g_486; + int *l_824 = &l_817; + int *l_825 = &l_752; + int *l_826 = &g_41; + int *l_827 = &g_495; + int *l_828 = &l_752; + int *l_829 = &g_486; + int *l_830 = (void*)0; + int *l_831 = &l_752; + int *l_832 = &g_80; + int *l_833 = &g_80; + int *l_834 = &g_486; + int *l_835 = &g_80; + int *l_836 = &g_729; + int l_837 = 0L; + int *l_838 = &g_41; + int *l_839 = (void*)0; + int *l_840 = (void*)0; + int *l_841 = (void*)0; + int *l_842 = &g_495; + int *l_843 = &l_837; + int *l_844 = &g_41; + int *l_845 = &l_837; + int *l_846 = &l_817; + int *l_847 = &g_729; + int *l_851 = &l_752; + int *l_852 = &l_850; + int *l_853 = &l_837; + int *l_855 = (void*)0; + int *l_856 = &g_495; + int *l_858 = &l_817; + int *l_859 = &g_41; + int *l_860 = &g_80; + int *l_861 = &l_854; + int *l_862 = (void*)0; + int *l_863 = &l_849; + int *l_864 = &l_850; + int *l_865 = &l_752; + int *l_866 = (void*)0; + int *l_867 = &g_80; + int *l_868 = (void*)0; + int *l_869 = &g_41; + int *l_870 = &g_41; + int *l_871 = &g_729; + int *l_872 = &l_837; + int *l_873 = &l_857; + int *l_874 = &l_850; + int *l_875 = &g_495; + int *l_876 = &l_848; + step_hash(228); + if (((int)(0UL || (p_9 && (l_794 | (+((((unsigned short)(((int)p_9 % (int)p_9) <= func_58(((unsigned)g_611 + (unsigned)p_8))) % (unsigned short)((short)g_729 / (short)g_324)) & l_803) < l_804))))) + (int)g_328)) + { + int l_809 = (-8L); + int *l_811 = &l_752; + step_hash(220); + (*l_811) &= ((signed char)(g_80 && ((int)(func_19((p_8 == func_19(p_8, p_9, p_8, p_9, (0xEA905F1CL & l_809))), g_490, g_560, l_810, p_9) ^ l_810) + (int)p_9)) / (signed char)g_18); + step_hash(221); + (*l_811) = g_370; + } + else + { + step_hash(227); + if (((short)0L << (short)(g_629 && ((short)(l_816 == (void*)0) * (short)0x6388L)))) + { + step_hash(224); + if (p_8) + break; + } + else + { + step_hash(226); + return g_324; + } + } + step_hash(229); + g_877--; + } + step_hash(231); + if (p_8) + continue; + } + } + step_hash(234); + (*g_195) = &p_8; + step_hash(235); + return g_80; +} +static int func_10(unsigned short p_11, unsigned p_12, short p_13) +{ + int *l_423 = &g_41; + int l_595 = 0xC2DE7882L; + signed char l_610 = 0xD8L; + int l_621 = (-1L); + unsigned short l_684 = 1UL; + step_hash(124); + (*l_423) = p_12; + step_hash(129); + for (g_318 = (-17); (g_318 >= 26); ++g_318) + { + step_hash(128); + (*l_423) = 0x9F95F825L; + } + step_hash(176); + if (g_94) + { + signed char l_430 = 0xB7L; + int ***l_443 = &g_195; + unsigned short l_448 = 0xAA6FL; + int l_466 = 0xA7C000D3L; + int l_531 = 0xBC0E26F0L; + step_hash(131); + (*l_423) = p_13; + step_hash(163); + for (p_11 = 0; (p_11 == 32); p_11++) + { + int *l_431 = (void*)0; + int l_457 = 0x2E2D7C1BL; + step_hash(139); + for (g_149 = 0; (g_149 == 16); g_149 += 5) + { + step_hash(138); + return l_430; + } + step_hash(140); + (*g_195) = l_431; + step_hash(162); + if (p_11) + { + signed char l_445 = 0x32L; + int l_451 = 0x095FD899L; + unsigned l_500 = 1UL; + step_hash(150); + for (p_13 = 0; (p_13 == (-23)); p_13 -= 8) + { + unsigned l_442 = 0x24AF7A4CL; + step_hash(149); + for (g_149 = 0; (g_149 == 20); g_149++) + { + int l_444 = 0xCA409319L; + step_hash(148); + (*l_423) = (((unsigned char)((unsigned char)p_13 >> (unsigned char)((l_442 >= (*l_423)) >= ((void*)0 != l_443))) - (unsigned char)((((func_49(func_49(g_94, (*l_423), ((g_232 > (((l_444 && 4294967295UL) & l_444) > p_13)) | p_11), p_13, g_328), p_13, p_11, g_146, p_12) > 0xA325L) || p_12) == p_13) > g_318)) | l_445); + } + } + step_hash(158); + for (g_318 = 24; (g_318 <= (-12)); g_318 -= 2) + { + int *l_449 = &g_41; + int *l_450 = &g_41; + int *l_452 = &l_451; + int *l_453 = &l_451; + int *l_454 = &l_451; + int *l_455 = &l_451; + int *l_456 = &g_41; + int *l_458 = &g_80; + int *l_459 = &g_80; + int *l_460 = &g_80; + int *l_461 = &g_41; + int *l_462 = &l_451; + int *l_463 = &g_80; + int *l_464 = (void*)0; + int *l_465 = &g_80; + int *l_467 = &g_80; + int *l_468 = &g_80; + int *l_469 = &l_451; + int *l_470 = &l_466; + int *l_471 = &g_41; + int *l_472 = &l_451; + int *l_473 = (void*)0; + int *l_474 = &g_80; + int *l_475 = &l_457; + int *l_476 = &l_457; + int *l_477 = &l_457; + int *l_478 = &g_80; + int *l_479 = (void*)0; + int *l_480 = &l_451; + int *l_481 = &g_41; + int *l_482 = &l_466; + int *l_483 = &g_41; + int *l_484 = &g_80; + int *l_485 = &g_80; + int *l_487 = (void*)0; + int *l_488 = &g_41; + int *l_489 = &l_466; + int *l_491 = &l_457; + int *l_492 = &l_466; + int *l_493 = &g_486; + int *l_494 = &l_466; + int *l_496 = &l_466; + int *l_497 = (void*)0; + int *l_498 = (void*)0; + int *l_499 = &g_41; + step_hash(154); + l_448 &= (*l_423); + step_hash(155); + l_500--; + } + } + else + { + signed char l_505 = 0L; + int *l_506 = &l_457; + int *l_507 = &l_466; + int *l_508 = &g_41; + int *l_509 = (void*)0; + int *l_510 = &l_457; + int *l_511 = &g_486; + int *l_512 = &g_41; + int *l_513 = &g_486; + int l_514 = 0x7C74476EL; + int *l_515 = &l_514; + int *l_516 = &g_495; + int *l_517 = (void*)0; + int *l_518 = (void*)0; + int l_519 = (-1L); + int *l_520 = &l_457; + int *l_521 = &l_466; + int *l_522 = &g_80; + int *l_523 = &g_80; + int *l_524 = (void*)0; + int *l_525 = &l_514; + int *l_526 = &l_514; + int *l_527 = (void*)0; + int *l_528 = (void*)0; + int *l_529 = &l_457; + int l_530 = 0xCB991EF0L; + int *l_532 = &g_486; + int *l_533 = &l_519; + int *l_534 = &l_457; + int *l_535 = (void*)0; + int *l_536 = (void*)0; + int *l_537 = (void*)0; + int *l_538 = &l_530; + int *l_539 = &g_486; + int *l_540 = (void*)0; + int *l_541 = &g_41; + int *l_542 = &g_80; + int *l_543 = &g_495; + int *l_544 = (void*)0; + int *l_545 = &g_80; + int *l_546 = &l_530; + int *l_547 = &l_457; + int *l_548 = &l_531; + int *l_549 = &l_519; + int *l_550 = &l_530; + int *l_551 = &l_519; + int *l_552 = &l_457; + int *l_553 = (void*)0; + int *l_554 = &l_530; + int *l_555 = &g_486; + int *l_556 = &l_457; + int *l_557 = &g_80; + int *l_558 = (void*)0; + int *l_559 = &g_486; + step_hash(160); + --g_560; + step_hash(161); + (*g_195) = l_423; + } + } + } + else + { + unsigned short l_566 = 65530UL; + int l_575 = (-1L); + int *l_632 = (void*)0; + int *l_633 = &g_486; + int *l_634 = &l_595; + int *l_635 = &g_41; + int *l_636 = &l_575; + int *l_637 = &g_486; + int *l_638 = &g_486; + int *l_639 = &l_575; + int *l_640 = &g_495; + int *l_641 = &g_495; + int *l_642 = &g_80; + int *l_643 = &l_621; + int *l_644 = &g_80; + int *l_645 = &l_575; + int *l_646 = &g_41; + int *l_647 = &l_621; + int *l_648 = (void*)0; + int *l_649 = &g_495; + int *l_650 = (void*)0; + int *l_651 = &g_495; + int *l_652 = &g_80; + int *l_653 = &g_41; + int *l_654 = &g_486; + int *l_655 = &g_495; + int *l_656 = &l_595; + int *l_657 = (void*)0; + int *l_658 = &g_486; + int *l_659 = (void*)0; + int *l_660 = &g_41; + int *l_661 = &g_41; + int *l_662 = &l_595; + int l_663 = 0L; + int *l_664 = &g_486; + int *l_665 = &g_495; + int *l_666 = &l_595; + int *l_667 = &l_595; + int l_668 = (-7L); + int *l_669 = &g_495; + int *l_670 = &l_621; + int *l_671 = &l_595; + int *l_672 = &l_575; + int *l_673 = &l_621; + int *l_674 = &l_663; + int *l_675 = &l_668; + int *l_676 = &g_80; + int *l_677 = (void*)0; + int *l_678 = &l_663; + unsigned short l_679 = 1UL; + step_hash(172); + for (g_146 = 0; (g_146 > (-25)); g_146 -= 3) + { + int *l_565 = (void*)0; + int *l_576 = &g_80; + int *l_577 = &g_41; + int *l_578 = &g_80; + int *l_579 = &g_495; + int l_580 = 1L; + int *l_581 = &l_580; + int l_582 = 7L; + int *l_583 = &g_80; + int *l_584 = &l_580; + int *l_585 = &g_495; + int l_586 = 8L; + int *l_587 = &g_486; + int *l_588 = &g_41; + int l_589 = (-2L); + int *l_590 = (void*)0; + int l_591 = 0x32A05A1AL; + int *l_592 = &l_582; + int *l_593 = &l_575; + int *l_594 = &l_591; + int *l_596 = &l_580; + int *l_597 = &g_486; + int *l_598 = &g_41; + int *l_599 = &l_589; + int *l_600 = &g_41; + int *l_601 = &l_580; + int *l_602 = &l_580; + int *l_603 = (void*)0; + int *l_604 = &l_580; + int l_605 = 0x1F4DC901L; + int *l_606 = &g_486; + int *l_608 = &l_582; + int *l_609 = &l_605; + int *l_612 = &l_605; + int *l_613 = &l_586; + int *l_614 = &l_586; + int *l_615 = &l_580; + int *l_616 = &g_486; + int *l_617 = &l_586; + int *l_618 = &l_582; + int *l_619 = &l_575; + int *l_620 = &l_605; + int *l_622 = (void*)0; + int l_623 = 0x4C25B71DL; + int *l_624 = &g_41; + int *l_625 = &g_486; + int *l_626 = &g_80; + int *l_627 = &l_589; + int *l_628 = (void*)0; + step_hash(168); + (*g_195) = l_565; + step_hash(169); + l_575 = ((~(func_58(l_566) ^ p_13)) && ((short)func_26((((void*)0 == l_423) ^ (g_486 < ((unsigned short)p_13 + (unsigned short)(p_11 <= (((signed char)((unsigned char)l_566 >> (unsigned char)g_221) >> (signed char)(*l_423)) ^ g_560))))), g_324) % (short)p_12)); + step_hash(170); + --g_629; + step_hash(171); + if (p_11) + break; + } + step_hash(173); + --l_679; + step_hash(174); + (*l_635) ^= ((short)((g_495 < p_11) == l_684) / (short)65535UL); + step_hash(175); + (*g_195) = &l_595; + } + step_hash(177); + return (*l_423); +} +static short func_19(unsigned p_20, int p_21, unsigned p_22, int p_23, short p_24) +{ + int l_421 = (-9L); + int *l_422 = &g_41; + step_hash(121); + (*l_422) = g_80; + step_hash(122); + return (*l_422); +} +static signed char func_26(unsigned char p_27, unsigned p_28) +{ + int *l_385 = &g_41; + int *l_386 = &g_80; + int *l_387 = &g_80; + int l_388 = 2L; + int *l_389 = &l_388; + int *l_390 = (void*)0; + int l_391 = 0xDC86E61BL; + int *l_392 = (void*)0; + int *l_393 = (void*)0; + int *l_394 = &g_80; + int *l_395 = (void*)0; + int l_396 = 1L; + int *l_397 = &l_391; + int *l_398 = &l_396; + int *l_399 = &g_80; + int *l_400 = &l_391; + int *l_401 = &l_388; + int *l_402 = &g_41; + int l_403 = 0xBD49ADAAL; + int l_404 = 0x51E0D0E8L; + int *l_405 = &l_388; + int *l_406 = &g_41; + int *l_407 = &l_404; + int *l_408 = &l_404; + int *l_409 = &g_80; + int *l_410 = &l_403; + int *l_411 = (void*)0; + int *l_412 = (void*)0; + int *l_413 = &l_404; + int *l_414 = &l_404; + int l_415 = (-7L); + int l_416 = 0L; + unsigned char l_417 = 0xF7L; + step_hash(118); + --l_417; + step_hash(119); + return g_318; +} +static unsigned char func_31(int p_32) +{ + unsigned l_340 = 0x974D9EF0L; + int l_345 = 0xB4D028B1L; + unsigned char l_373 = 0xC1L; + int **l_377 = &g_196; + int ***l_382 = &l_377; + step_hash(108); + if (((signed char)((((short)p_32 >> (short)(g_18 < func_37(g_18))) & (g_221 > 0x89A3L)) != ((g_167 != ((((unsigned short)g_146 - (unsigned short)l_340) != 0xE7EE258AL) != g_167)) && 0x39L)) >> (signed char)2)) + { + int *l_341 = &g_80; + int *l_342 = &g_80; + int *l_343 = (void*)0; + int *l_344 = (void*)0; + int *l_346 = &g_80; + int *l_347 = &g_80; + int *l_348 = &g_41; + int *l_349 = &l_345; + int *l_350 = (void*)0; + int *l_351 = &g_41; + int *l_352 = &l_345; + int *l_353 = &g_41; + int *l_354 = &g_41; + int *l_355 = &g_80; + int l_356 = 0x6801FEF5L; + int *l_357 = &l_345; + int *l_358 = &g_80; + int *l_359 = &g_80; + int *l_360 = (void*)0; + int *l_361 = &g_41; + int *l_362 = (void*)0; + int *l_363 = &l_345; + int *l_364 = &g_41; + int *l_365 = &g_80; + int *l_366 = (void*)0; + int *l_367 = &g_41; + int *l_368 = &l_345; + int *l_369 = &g_41; + step_hash(101); + g_370--; + step_hash(102); + ++l_373; + step_hash(103); + (*g_195) = &g_80; + } + else + { + int **l_376 = &g_196; + int *l_378 = &g_80; + step_hash(105); + (*l_378) ^= ((l_376 != l_377) | p_32); + step_hash(106); + (*l_377) = &l_345; + step_hash(107); + (*l_377) = (*g_195); + } + step_hash(114); + for (g_146 = 14; (g_146 >= 12); --g_146) + { + unsigned l_381 = 0x0E3E12D5L; + step_hash(112); + (*g_195) = (*g_195); + step_hash(113); + if (l_381) + continue; + } + step_hash(115); + (*l_382) = l_377; + step_hash(116); + return p_32; +} +static unsigned char func_37(unsigned short p_38) +{ + int l_238 = 0xFEDCC949L; + int **l_281 = &g_196; + unsigned short l_284 = 0UL; + int *l_285 = &l_238; + step_hash(81); + for (p_38 = 0; (p_38 <= 30); p_38++) + { + signed char l_44 = (-3L); + int l_235 = (-10L); + step_hash(79); + for (g_41 = 8; (g_41 <= (-5)); g_41 -= 8) + { + unsigned l_55 = 0xD08E1597L; + unsigned l_239 = 4294967295UL; + int **l_260 = &g_196; + int l_273 = (-1L); + step_hash(65); + if (((l_44 > ((unsigned)(((signed char)(0x13L == func_49(l_55, ((unsigned char)(p_38 > func_58(p_38)) + (unsigned char)g_167), (0x4E54L && g_18), p_38, g_146)) / (signed char)p_38) < g_41) % (unsigned)4294967289UL)) && p_38)) + { + int *l_236 = &g_80; + int *l_237 = &l_235; + step_hash(57); + l_239++; + step_hash(62); + for (l_44 = (-6); (l_44 < 19); l_44 += 1) + { + step_hash(61); + return p_38; + } + } + else + { + step_hash(64); + return p_38; + } + step_hash(66); + g_80 = l_239; + step_hash(77); + if (((short)l_44 + (short)func_49(p_38, l_44, ((short)(func_49(l_238, p_38, ((func_58(func_49(((*g_195) != (void*)0), p_38, p_38, p_38, g_149)) | (-1L)) >= l_55), l_235, g_221) & 1L) << (short)l_55), l_55, p_38))) + { + unsigned l_258 = 0x0E433B6EL; + int *l_259 = &g_80; + step_hash(68); + (*l_259) = ((unsigned short)(0xB4B6L <= (l_55 == ((unsigned short)g_41 << (unsigned short)((unsigned short)(g_149 && ((signed char)p_38 % (signed char)l_55)) / (unsigned short)(func_49(((unsigned char)((p_38 >= ((-1L) & l_238)) <= p_38) + (unsigned char)p_38), l_258, p_38, l_238, l_235) && 1UL))))) >> (unsigned short)g_41); + step_hash(69); + (*g_195) = &l_238; + } + else + { + unsigned short l_271 = 0x2BA5L; + step_hash(76); + if ((((void*)0 == l_260) <= g_149)) + { + int *l_272 = (void*)0; + int l_274 = (-1L); + step_hash(72); + l_273 &= ((unsigned)(g_167 && ((unsigned)0x56CD8495L / (unsigned)((unsigned char)((unsigned char)((unsigned char)((p_38 ^ (func_58(p_38) >= (&g_196 == &g_196))) != 1UL) - (unsigned char)((void*)0 == (*l_260))) + (unsigned char)p_38) + (unsigned char)l_271))) - (unsigned)p_38); + step_hash(73); + l_274 = p_38; + } + else + { + step_hash(75); + if (p_38) + break; + } + } + step_hash(78); + return l_238; + } + step_hash(80); + if (p_38) + break; + } + step_hash(82); + (*l_285) = ((short)func_58(l_238) - (short)(((unsigned short)(&l_238 != (void*)0) / (unsigned short)p_38) <= (((signed char)l_238 / (signed char)(((l_281 != &g_196) >= ((unsigned)((g_18 && 65535UL) || 0x7A35014FL) % (unsigned)l_284)) & g_146)) | p_38))); + step_hash(97); + for (l_284 = 0; (l_284 <= 42); l_284 += 8) + { + unsigned short l_288 = 0UL; + int *l_291 = (void*)0; + int *l_292 = &l_238; + int *l_293 = (void*)0; + int *l_294 = &g_41; + int *l_295 = &g_80; + int *l_296 = &g_80; + int *l_297 = &g_41; + int *l_298 = &g_41; + int *l_299 = &g_80; + int *l_300 = &g_80; + int *l_301 = &g_41; + int *l_302 = &g_80; + int *l_303 = &g_41; + int *l_304 = &g_80; + int *l_305 = &g_41; + int *l_306 = &g_80; + int *l_307 = &l_238; + int *l_308 = &l_238; + int *l_309 = (void*)0; + int *l_310 = &l_238; + int *l_311 = &g_80; + int *l_312 = (void*)0; + int *l_313 = &g_80; + int *l_314 = &g_80; + int *l_315 = &l_238; + int *l_316 = &g_41; + int *l_317 = &l_238; + int *l_319 = &g_41; + int *l_320 = &g_80; + int *l_321 = (void*)0; + int *l_322 = (void*)0; + int *l_323 = &g_41; + int *l_325 = &g_80; + int *l_326 = &g_41; + int *l_327 = &g_41; + step_hash(86); + --l_288; + step_hash(87); + --g_328; + step_hash(96); + for (g_94 = 0; (g_94 <= (-16)); --g_94) + { + step_hash(95); + for (g_80 = 0; (g_80 == (-30)); g_80--) + { + unsigned l_335 = 0xD1283D66L; + step_hash(94); + if (l_335) + break; + } + } + } + step_hash(98); + (*l_285) &= (func_58(p_38) < 0L); + step_hash(99); + return p_38; +} +static signed char func_49(unsigned p_50, unsigned p_51, int p_52, unsigned short p_53, unsigned short p_54) +{ + int *l_182 = &g_41; + int **l_181 = &l_182; + short l_220 = 0x7E15L; + int l_227 = 0xFC398B08L; + step_hash(54); + if ((((unsigned short)(-(unsigned)((unsigned short)(p_51 ^ (0xE403142CL | (l_181 == (void*)0))) % (unsigned short)0x5E4EL)) << (unsigned short)(*l_182)) && ((signed char)p_54 / (signed char)(**l_181)))) + { + int **l_197 = &l_182; + signed char l_198 = 0xC9L; + int l_199 = 5L; + step_hash(51); + if (((((g_167 ^ (((unsigned char)(0x5F8E08A2L & ((int)((signed char)(((unsigned short)((short)(g_195 != l_197) >> (short)3) * (unsigned short)(((**l_197) || l_198) <= (g_18 ^ (((**l_197) | (g_18 ^ g_149)) >= p_54)))) > 1L) << (signed char)7) / (int)p_50)) + (unsigned char)(**l_197)) || p_51)) && (*l_182)) && g_149) || (**l_197))) + { + step_hash(47); + return p_51; + } + else + { + step_hash(49); + l_199 &= 0L; + step_hash(50); + return (**l_197); + } + } + else + { + int *l_200 = &g_80; + int *l_201 = &g_80; + int *l_202 = &g_80; + int *l_203 = &g_80; + int *l_204 = (void*)0; + int *l_205 = &g_80; + int *l_206 = &g_80; + int *l_207 = &g_80; + int *l_208 = &g_80; + int *l_209 = &g_80; + int *l_210 = &g_80; + int *l_211 = &g_80; + int *l_212 = &g_80; + int *l_213 = &g_80; + int *l_214 = &g_80; + int *l_215 = &g_80; + int *l_216 = (void*)0; + int *l_217 = &g_80; + int *l_218 = &g_80; + int *l_219 = (void*)0; + int *l_222 = &g_80; + int *l_223 = &g_80; + int *l_224 = (void*)0; + int *l_225 = &g_80; + int *l_226 = &g_80; + int l_228 = 9L; + int *l_229 = (void*)0; + int *l_230 = &l_228; + int *l_231 = &l_228; + step_hash(53); + ++g_232; + } + step_hash(55); + return g_146; +} +static unsigned func_58(unsigned char p_59) +{ + short l_84 = (-3L); + unsigned l_138 = 0x2A8B70F5L; + int *l_161 = (void*)0; + int *l_162 = &g_80; + int l_172 = 0x43DE26F3L; + signed char l_175 = 0L; + step_hash(40); + for (p_59 = (-4); (p_59 > 46); p_59 += 4) + { + short l_74 = 0x84A5L; + int l_98 = 2L; + int l_107 = 0x37A4C668L; + int l_132 = 0L; + int *l_160 = &l_98; + step_hash(39); + if ((((((signed char)(((signed char)((((unsigned char)0xF9L * (unsigned char)((short)g_41 - (short)65535UL)) | (p_59 != 2L)) || (g_41 == p_59)) * (signed char)((signed char)(9L == ((short)(0UL == p_59) * (short)0xC3CBL)) % (signed char)9L)) & 0x851CL) % (signed char)g_41) >= g_41) ^ p_59) ^ 0xBADF38E7L)) + { + step_hash(14); + if (l_74) + break; + } + else + { + int *l_76 = (void*)0; + int **l_75 = &l_76; + int l_81 = (-2L); + int l_88 = 0xA9D242ECL; + int l_90 = 0x2E93B6ABL; + int l_114 = 0x4F583EF4L; + int l_137 = (-8L); + int *l_141 = &l_132; + int *l_142 = (void*)0; + int *l_143 = &l_81; + int *l_144 = &l_81; + int *l_145 = &l_137; + int *l_147 = &l_98; + int *l_148 = (void*)0; + step_hash(16); + (*l_75) = (void*)0; + step_hash(23); + for (l_74 = (-28); (l_74 <= (-21)); l_74 += 6) + { + int *l_79 = &g_80; + int *l_82 = &l_81; + int *l_83 = &l_81; + int *l_85 = &g_80; + int *l_86 = &l_81; + int *l_87 = &g_80; + int *l_89 = &g_80; + int *l_91 = &l_88; + int *l_92 = &g_80; + int *l_93 = &l_90; + int *l_95 = &l_88; + int *l_96 = &l_88; + int *l_97 = &g_80; + int l_99 = (-1L); + int *l_100 = &l_81; + int *l_101 = &l_81; + int *l_102 = &g_80; + int *l_103 = &l_98; + int *l_104 = &l_90; + int *l_105 = (void*)0; + int *l_106 = &l_90; + int *l_108 = &g_80; + int *l_109 = (void*)0; + int *l_110 = (void*)0; + int *l_111 = &g_80; + int *l_112 = &l_99; + int *l_113 = &l_88; + int *l_115 = &l_99; + int *l_116 = (void*)0; + int *l_117 = &l_99; + int l_118 = 0x6BB23DF4L; + int *l_119 = &l_98; + int *l_120 = &l_98; + int *l_121 = &l_107; + int *l_122 = &l_88; + int *l_123 = &l_107; + int *l_124 = (void*)0; + int *l_125 = &l_107; + int *l_126 = (void*)0; + int *l_127 = &l_118; + int *l_128 = &l_99; + int *l_129 = &l_118; + int *l_130 = &l_99; + int *l_131 = &l_98; + int *l_133 = &l_114; + int *l_134 = (void*)0; + int *l_135 = &l_81; + int l_136 = 0xF110B0F3L; + step_hash(20); + (*l_79) = g_41; + step_hash(21); + (*l_79) |= ((+0x33457209L) > (g_18 > l_74)); + step_hash(22); + --l_138; + } + step_hash(24); + ++g_149; + step_hash(38); + for (g_94 = 0; (g_94 == (-12)); --g_94) + { + step_hash(32); + for (l_137 = 0; (l_137 != 20); l_137 += 3) + { + step_hash(31); + (*l_147) = ((unsigned short)g_18 >> (unsigned short)15); + } + step_hash(37); + for (l_88 = 10; (l_88 <= (-20)); l_88 -= 6) + { + step_hash(36); + l_160 = &l_132; + } + } + } + } + step_hash(41); + (*l_162) ^= l_84; + step_hash(42); + (*l_162) = ((signed char)(((unsigned short)(((0UL <= ((g_167 <= 1L) == g_41)) < (((unsigned char)((p_59 || ((unsigned char)l_172 - (unsigned char)((p_59 != ((unsigned char)g_18 << (unsigned char)7)) > 0L))) <= g_18) * (unsigned char)g_167) < (-7L))) || (*l_162)) * (unsigned short)g_18) <= 0xBFA59640L) / (signed char)p_59); + step_hash(43); + return l_175; +} +void csmith_compute_hash(void) +{ + transparent_crc(g_18, "g_18", print_hash_value); + transparent_crc(g_41, "g_41", print_hash_value); + transparent_crc(g_80, "g_80", print_hash_value); + transparent_crc(g_94, "g_94", print_hash_value); + transparent_crc(g_146, "g_146", print_hash_value); + transparent_crc(g_149, "g_149", print_hash_value); + transparent_crc(g_167, "g_167", print_hash_value); + transparent_crc(g_221, "g_221", print_hash_value); + transparent_crc(g_232, "g_232", print_hash_value); + transparent_crc(g_318, "g_318", print_hash_value); + transparent_crc(g_324, "g_324", print_hash_value); + transparent_crc(g_328, "g_328", print_hash_value); + transparent_crc(g_370, "g_370", print_hash_value); + transparent_crc(g_486, "g_486", print_hash_value); + transparent_crc(g_490, "g_490", print_hash_value); + transparent_crc(g_495, "g_495", print_hash_value); + transparent_crc(g_560, "g_560", print_hash_value); + transparent_crc(g_607, "g_607", print_hash_value); + transparent_crc(g_611, "g_611", print_hash_value); + transparent_crc(g_629, "g_629", print_hash_value); + transparent_crc(g_729, "g_729", print_hash_value); + transparent_crc(g_877, "g_877", print_hash_value); + transparent_crc(g_1086, "g_1086", print_hash_value); + transparent_crc(g_1223, "g_1223", print_hash_value); + transparent_crc(g_1237, "g_1237", print_hash_value); +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand50.expect b/src/tests/csmith/rand50.expect new file mode 100644 index 0000000..8f385d1 --- /dev/null +++ b/src/tests/csmith/rand50.expect @@ -0,0 +1,1742 @@ +...checksum after hashing g_18 : D4FABFC5 +...checksum after hashing g_41 : 84216970 +...checksum after hashing g_80 : F6E01D88 +...checksum after hashing g_94 : 17F7D52E +...checksum after hashing g_146 : 84E6E22E +...checksum after hashing g_149 : 5B168D7E +...checksum after hashing g_167 : 9267DE4C +...checksum after hashing g_221 : E97EDF69 +...checksum after hashing g_232 : 89D51B3C +...checksum after hashing g_318 : A83D4EA3 +...checksum after hashing g_324 : EC7CD3C +...checksum after hashing g_328 : D5493559 +...checksum after hashing g_370 : B160ADA1 +...checksum after hashing g_486 : 213A711 +...checksum after hashing g_490 : D95B9CE7 +...checksum after hashing g_495 : 836543C9 +...checksum after hashing g_560 : 9D0BBBA8 +...checksum after hashing g_607 : 7E1AE80 +...checksum after hashing g_611 : 18416EA0 +...checksum after hashing g_629 : 6CD4A144 +...checksum after hashing g_729 : F4646D2C +...checksum after hashing g_877 : 46388367 +...checksum after hashing g_1086 : ECE6ED21 +...checksum after hashing g_1223 : FCBA781A +...checksum after hashing g_1237 : 222D2607 +before stmt(307): checksum = 222D2607 +...checksum after hashing g_18 : D4FABFC5 +...checksum after hashing g_41 : 84216970 +...checksum after hashing g_80 : F6E01D88 +...checksum after hashing g_94 : 17F7D52E +...checksum after hashing g_146 : 84E6E22E +...checksum after hashing g_149 : 5B168D7E +...checksum after hashing g_167 : 9267DE4C +...checksum after hashing g_221 : E97EDF69 +...checksum after hashing g_232 : 89D51B3C +...checksum after hashing g_318 : A83D4EA3 +...checksum after hashing g_324 : EC7CD3C +...checksum after hashing g_328 : D5493559 +...checksum after hashing g_370 : B160ADA1 +...checksum after hashing g_486 : 213A711 +...checksum after hashing g_490 : D95B9CE7 +...checksum after hashing g_495 : 836543C9 +...checksum after hashing g_560 : 9D0BBBA8 +...checksum after hashing g_607 : 7E1AE80 +...checksum after hashing g_611 : 18416EA0 +...checksum after hashing g_629 : 6CD4A144 +...checksum after hashing g_729 : F4646D2C +...checksum after hashing g_877 : 46388367 +...checksum after hashing g_1086 : ECE6ED21 +...checksum after hashing g_1223 : FCBA781A +...checksum after hashing g_1237 : 222D2607 +before stmt(118): checksum = 222D2607 +...checksum after hashing g_18 : D4FABFC5 +...checksum after hashing g_41 : 84216970 +...checksum after hashing g_80 : F6E01D88 +...checksum after hashing g_94 : 17F7D52E +...checksum after hashing g_146 : 84E6E22E +...checksum after hashing g_149 : 5B168D7E +...checksum after hashing g_167 : 9267DE4C +...checksum after hashing g_221 : E97EDF69 +...checksum after hashing g_232 : 89D51B3C +...checksum after hashing g_318 : A83D4EA3 +...checksum after hashing g_324 : EC7CD3C +...checksum after hashing g_328 : D5493559 +...checksum after hashing g_370 : B160ADA1 +...checksum after hashing g_486 : 213A711 +...checksum after hashing g_490 : D95B9CE7 +...checksum after hashing g_495 : 836543C9 +...checksum after hashing g_560 : 9D0BBBA8 +...checksum after hashing g_607 : 7E1AE80 +...checksum after hashing g_611 : 18416EA0 +...checksum after hashing g_629 : 6CD4A144 +...checksum after hashing g_729 : F4646D2C +...checksum after hashing g_877 : 46388367 +...checksum after hashing g_1086 : ECE6ED21 +...checksum after hashing g_1223 : FCBA781A +...checksum after hashing g_1237 : 222D2607 +before stmt(119): checksum = 222D2607 +...checksum after hashing g_18 : D4FABFC5 +...checksum after hashing g_41 : 84216970 +...checksum after hashing g_80 : F6E01D88 +...checksum after hashing g_94 : 17F7D52E +...checksum after hashing g_146 : 84E6E22E +...checksum after hashing g_149 : 5B168D7E +...checksum after hashing g_167 : 9267DE4C +...checksum after hashing g_221 : E97EDF69 +...checksum after hashing g_232 : 89D51B3C +...checksum after hashing g_318 : A83D4EA3 +...checksum after hashing g_324 : EC7CD3C +...checksum after hashing g_328 : D5493559 +...checksum after hashing g_370 : B160ADA1 +...checksum after hashing g_486 : 213A711 +...checksum after hashing g_490 : D95B9CE7 +...checksum after hashing g_495 : 836543C9 +...checksum after hashing g_560 : 9D0BBBA8 +...checksum after hashing g_607 : 7E1AE80 +...checksum after hashing g_611 : 18416EA0 +...checksum after hashing g_629 : 6CD4A144 +...checksum after hashing g_729 : F4646D2C +...checksum after hashing g_877 : 46388367 +...checksum after hashing g_1086 : ECE6ED21 +...checksum after hashing g_1223 : FCBA781A +...checksum after hashing g_1237 : 222D2607 +before stmt(121): checksum = 222D2607 +...checksum after hashing g_18 : D4FABFC5 +...checksum after hashing g_41 : 5CEFA782 +...checksum after hashing g_80 : 9CCFD8C8 +...checksum after hashing g_94 : A4FC6993 +...checksum after hashing g_146 : 162648E0 +...checksum after hashing g_149 : CC90E9DB +...checksum after hashing g_167 : A4BE6DAD +...checksum after hashing g_221 : DFE552B2 +...checksum after hashing g_232 : CC626B3F +...checksum after hashing g_318 : 434B047D +...checksum after hashing g_324 : FBFCEE00 +...checksum after hashing g_328 : A4DA6352 +...checksum after hashing g_370 : 733EE0D1 +...checksum after hashing g_486 : 403CCA58 +...checksum after hashing g_490 : F586CBF2 +...checksum after hashing g_495 : 8B1F0BE0 +...checksum after hashing g_560 : E5B39E2A +...checksum after hashing g_607 : CF58985 +...checksum after hashing g_611 : ABE1C02A +...checksum after hashing g_629 : C1B9D9AE +...checksum after hashing g_729 : 6F703F27 +...checksum after hashing g_877 : B7726321 +...checksum after hashing g_1086 : 3B575F65 +...checksum after hashing g_1223 : CB7F4580 +...checksum after hashing g_1237 : D253D700 +before stmt(122): checksum = D253D700 +...checksum after hashing g_18 : D4FABFC5 +...checksum after hashing g_41 : 5CEFA782 +...checksum after hashing g_80 : 9CCFD8C8 +...checksum after hashing g_94 : A4FC6993 +...checksum after hashing g_146 : 162648E0 +...checksum after hashing g_149 : CC90E9DB +...checksum after hashing g_167 : A4BE6DAD +...checksum after hashing g_221 : DFE552B2 +...checksum after hashing g_232 : CC626B3F +...checksum after hashing g_318 : 434B047D +...checksum after hashing g_324 : FBFCEE00 +...checksum after hashing g_328 : A4DA6352 +...checksum after hashing g_370 : 733EE0D1 +...checksum after hashing g_486 : 403CCA58 +...checksum after hashing g_490 : F586CBF2 +...checksum after hashing g_495 : 8B1F0BE0 +...checksum after hashing g_560 : E5B39E2A +...checksum after hashing g_607 : CF58985 +...checksum after hashing g_611 : ABE1C02A +...checksum after hashing g_629 : C1B9D9AE +...checksum after hashing g_729 : 6F703F27 +...checksum after hashing g_877 : B7726321 +...checksum after hashing g_1086 : 3B575F65 +...checksum after hashing g_1223 : CB7F4580 +...checksum after hashing g_1237 : D253D700 +before stmt(124): checksum = D253D700 +...checksum after hashing g_18 : D4FABFC5 +...checksum after hashing g_41 : 7984009A +...checksum after hashing g_80 : 18588A76 +...checksum after hashing g_94 : E2BCF100 +...checksum after hashing g_146 : 25154442 +...checksum after hashing g_149 : 6953C517 +...checksum after hashing g_167 : EF19507D +...checksum after hashing g_221 : D54A2FDE +...checksum after hashing g_232 : 28F191BF +...checksum after hashing g_318 : EB4ABBF8 +...checksum after hashing g_324 : 2E6F0BBF +...checksum after hashing g_328 : E237D057 +...checksum after hashing g_370 : F79739AE +...checksum after hashing g_486 : 642834B4 +...checksum after hashing g_490 : C4D8582C +...checksum after hashing g_495 : C727B303 +...checksum after hashing g_560 : 82C16E14 +...checksum after hashing g_607 : 671A9A48 +...checksum after hashing g_611 : 3220BC2B +...checksum after hashing g_629 : 7FDCE210 +...checksum after hashing g_729 : 8EB00D96 +...checksum after hashing g_877 : 29A47E80 +...checksum after hashing g_1086 : 1AABCDFC +...checksum after hashing g_1223 : 1C039DF +...checksum after hashing g_1237 : 43AC019 +before stmt(129): checksum = 43AC019 +...checksum after hashing g_18 : D4FABFC5 +...checksum after hashing g_41 : 7984009A +...checksum after hashing g_80 : 18588A76 +...checksum after hashing g_94 : E2BCF100 +...checksum after hashing g_146 : 25154442 +...checksum after hashing g_149 : 6953C517 +...checksum after hashing g_167 : EF19507D +...checksum after hashing g_221 : D54A2FDE +...checksum after hashing g_232 : 28F191BF +...checksum after hashing g_318 : 2E345C6D +...checksum after hashing g_324 : 52EEBE4B +...checksum after hashing g_328 : 538DF941 +...checksum after hashing g_370 : 173589AA +...checksum after hashing g_486 : 122F61E0 +...checksum after hashing g_490 : 1CE76E4C +...checksum after hashing g_495 : C31ADF8 +...checksum after hashing g_560 : D530DF27 +...checksum after hashing g_607 : B9B04D8B +...checksum after hashing g_611 : EB9D75C6 +...checksum after hashing g_629 : 6BD36CBF +...checksum after hashing g_729 : ED51FAFD +...checksum after hashing g_877 : E6D69998 +...checksum after hashing g_1086 : 3579B0FC +...checksum after hashing g_1223 : 45365818 +...checksum after hashing g_1237 : 95E27403 +before stmt(176): checksum = 95E27403 +...checksum after hashing g_18 : D4FABFC5 +...checksum after hashing g_41 : 7984009A +...checksum after hashing g_80 : 18588A76 +...checksum after hashing g_94 : E2BCF100 +...checksum after hashing g_146 : 25154442 +...checksum after hashing g_149 : 6953C517 +...checksum after hashing g_167 : EF19507D +...checksum after hashing g_221 : D54A2FDE +...checksum after hashing g_232 : 28F191BF +...checksum after hashing g_318 : 2E345C6D +...checksum after hashing g_324 : 52EEBE4B +...checksum after hashing g_328 : 538DF941 +...checksum after hashing g_370 : 173589AA +...checksum after hashing g_486 : 122F61E0 +...checksum after hashing g_490 : 1CE76E4C +...checksum after hashing g_495 : C31ADF8 +...checksum after hashing g_560 : D530DF27 +...checksum after hashing g_607 : B9B04D8B +...checksum after hashing g_611 : EB9D75C6 +...checksum after hashing g_629 : 6BD36CBF +...checksum after hashing g_729 : ED51FAFD +...checksum after hashing g_877 : E6D69998 +...checksum after hashing g_1086 : 3579B0FC +...checksum after hashing g_1223 : 45365818 +...checksum after hashing g_1237 : 95E27403 +before stmt(172): checksum = 95E27403 +...checksum after hashing g_18 : D4FABFC5 +...checksum after hashing g_41 : 7984009A +...checksum after hashing g_80 : 18588A76 +...checksum after hashing g_94 : E2BCF100 +...checksum after hashing g_146 : 9336A41B +...checksum after hashing g_149 : EA1F3447 +...checksum after hashing g_167 : B86F94AB +...checksum after hashing g_221 : CCB9ED20 +...checksum after hashing g_232 : 8799A8BB +...checksum after hashing g_318 : 61A14AF3 +...checksum after hashing g_324 : FD8FD540 +...checksum after hashing g_328 : FA81BE1E +...checksum after hashing g_370 : F231595B +...checksum after hashing g_486 : 1570F6E1 +...checksum after hashing g_490 : FF407364 +...checksum after hashing g_495 : A50C83E6 +...checksum after hashing g_560 : 92C7C793 +...checksum after hashing g_607 : 8AD0C5C7 +...checksum after hashing g_611 : F54D2CA +...checksum after hashing g_629 : 406DD284 +...checksum after hashing g_729 : D3412C31 +...checksum after hashing g_877 : D8EA8E5E +...checksum after hashing g_1086 : CDA4D087 +...checksum after hashing g_1223 : 362F75D9 +...checksum after hashing g_1237 : 398AA14D +before stmt(168): checksum = 398AA14D +...checksum after hashing g_18 : D4FABFC5 +...checksum after hashing g_41 : 7984009A +...checksum after hashing g_80 : 18588A76 +...checksum after hashing g_94 : E2BCF100 +...checksum after hashing g_146 : 9336A41B +...checksum after hashing g_149 : EA1F3447 +...checksum after hashing g_167 : B86F94AB +...checksum after hashing g_221 : CCB9ED20 +...checksum after hashing g_232 : 8799A8BB +...checksum after hashing g_318 : 61A14AF3 +...checksum after hashing g_324 : FD8FD540 +...checksum after hashing g_328 : FA81BE1E +...checksum after hashing g_370 : F231595B +...checksum after hashing g_486 : 1570F6E1 +...checksum after hashing g_490 : FF407364 +...checksum after hashing g_495 : A50C83E6 +...checksum after hashing g_560 : 92C7C793 +...checksum after hashing g_607 : 8AD0C5C7 +...checksum after hashing g_611 : F54D2CA +...checksum after hashing g_629 : 406DD284 +...checksum after hashing g_729 : D3412C31 +...checksum after hashing g_877 : D8EA8E5E +...checksum after hashing g_1086 : CDA4D087 +...checksum after hashing g_1223 : 362F75D9 +...checksum after hashing g_1237 : 398AA14D +before stmt(169): checksum = 398AA14D +...checksum after hashing g_18 : D4FABFC5 +...checksum after hashing g_41 : 7984009A +...checksum after hashing g_80 : 18588A76 +...checksum after hashing g_94 : E2BCF100 +...checksum after hashing g_146 : 9336A41B +...checksum after hashing g_149 : EA1F3447 +...checksum after hashing g_167 : B86F94AB +...checksum after hashing g_221 : CCB9ED20 +...checksum after hashing g_232 : 8799A8BB +...checksum after hashing g_318 : 61A14AF3 +...checksum after hashing g_324 : FD8FD540 +...checksum after hashing g_328 : FA81BE1E +...checksum after hashing g_370 : F231595B +...checksum after hashing g_486 : 1570F6E1 +...checksum after hashing g_490 : FF407364 +...checksum after hashing g_495 : A50C83E6 +...checksum after hashing g_560 : 92C7C793 +...checksum after hashing g_607 : 8AD0C5C7 +...checksum after hashing g_611 : F54D2CA +...checksum after hashing g_629 : 406DD284 +...checksum after hashing g_729 : D3412C31 +...checksum after hashing g_877 : D8EA8E5E +...checksum after hashing g_1086 : CDA4D087 +...checksum after hashing g_1223 : 362F75D9 +...checksum after hashing g_1237 : 398AA14D +before stmt(40): checksum = 398AA14D +...checksum after hashing g_18 : D4FABFC5 +...checksum after hashing g_41 : 7984009A +...checksum after hashing g_80 : 18588A76 +...checksum after hashing g_94 : E2BCF100 +...checksum after hashing g_146 : 9336A41B +...checksum after hashing g_149 : EA1F3447 +...checksum after hashing g_167 : B86F94AB +...checksum after hashing g_221 : CCB9ED20 +...checksum after hashing g_232 : 8799A8BB +...checksum after hashing g_318 : 61A14AF3 +...checksum after hashing g_324 : FD8FD540 +...checksum after hashing g_328 : FA81BE1E +...checksum after hashing g_370 : F231595B +...checksum after hashing g_486 : 1570F6E1 +...checksum after hashing g_490 : FF407364 +...checksum after hashing g_495 : A50C83E6 +...checksum after hashing g_560 : 92C7C793 +...checksum after hashing g_607 : 8AD0C5C7 +...checksum after hashing g_611 : F54D2CA +...checksum after hashing g_629 : 406DD284 +...checksum after hashing g_729 : D3412C31 +...checksum after hashing g_877 : D8EA8E5E +...checksum after hashing g_1086 : CDA4D087 +...checksum after hashing g_1223 : 362F75D9 +...checksum after hashing g_1237 : 398AA14D +before stmt(39): checksum = 398AA14D +...checksum after hashing g_18 : D4FABFC5 +...checksum after hashing g_41 : 7984009A +...checksum after hashing g_80 : 18588A76 +...checksum after hashing g_94 : E2BCF100 +...checksum after hashing g_146 : 9336A41B +...checksum after hashing g_149 : EA1F3447 +...checksum after hashing g_167 : B86F94AB +...checksum after hashing g_221 : CCB9ED20 +...checksum after hashing g_232 : 8799A8BB +...checksum after hashing g_318 : 61A14AF3 +...checksum after hashing g_324 : FD8FD540 +...checksum after hashing g_328 : FA81BE1E +...checksum after hashing g_370 : F231595B +...checksum after hashing g_486 : 1570F6E1 +...checksum after hashing g_490 : FF407364 +...checksum after hashing g_495 : A50C83E6 +...checksum after hashing g_560 : 92C7C793 +...checksum after hashing g_607 : 8AD0C5C7 +...checksum after hashing g_611 : F54D2CA +...checksum after hashing g_629 : 406DD284 +...checksum after hashing g_729 : D3412C31 +...checksum after hashing g_877 : D8EA8E5E +...checksum after hashing g_1086 : CDA4D087 +...checksum after hashing g_1223 : 362F75D9 +...checksum after hashing g_1237 : 398AA14D +before stmt(14): checksum = 398AA14D +...checksum after hashing g_18 : D4FABFC5 +...checksum after hashing g_41 : 7984009A +...checksum after hashing g_80 : 18588A76 +...checksum after hashing g_94 : E2BCF100 +...checksum after hashing g_146 : 9336A41B +...checksum after hashing g_149 : EA1F3447 +...checksum after hashing g_167 : B86F94AB +...checksum after hashing g_221 : CCB9ED20 +...checksum after hashing g_232 : 8799A8BB +...checksum after hashing g_318 : 61A14AF3 +...checksum after hashing g_324 : FD8FD540 +...checksum after hashing g_328 : FA81BE1E +...checksum after hashing g_370 : F231595B +...checksum after hashing g_486 : 1570F6E1 +...checksum after hashing g_490 : FF407364 +...checksum after hashing g_495 : A50C83E6 +...checksum after hashing g_560 : 92C7C793 +...checksum after hashing g_607 : 8AD0C5C7 +...checksum after hashing g_611 : F54D2CA +...checksum after hashing g_629 : 406DD284 +...checksum after hashing g_729 : D3412C31 +...checksum after hashing g_877 : D8EA8E5E +...checksum after hashing g_1086 : CDA4D087 +...checksum after hashing g_1223 : 362F75D9 +...checksum after hashing g_1237 : 398AA14D +before stmt(41): checksum = 398AA14D +...checksum after hashing g_18 : D4FABFC5 +...checksum after hashing g_41 : 7984009A +...checksum after hashing g_80 : 6CEA621E +...checksum after hashing g_94 : 3A44D6EB +...checksum after hashing g_146 : FB270314 +...checksum after hashing g_149 : 7EFBA58E +...checksum after hashing g_167 : 828B8655 +...checksum after hashing g_221 : 49BC14F0 +...checksum after hashing g_232 : FB7DDA97 +...checksum after hashing g_318 : BF91EDB4 +...checksum after hashing g_324 : 99563701 +...checksum after hashing g_328 : 696A5E9F +...checksum after hashing g_370 : DABAB07C +...checksum after hashing g_486 : 63646333 +...checksum after hashing g_490 : 1F0D7B31 +...checksum after hashing g_495 : B211FEFE +...checksum after hashing g_560 : 27FCAA3B +...checksum after hashing g_607 : C5B90465 +...checksum after hashing g_611 : 2A0773DC +...checksum after hashing g_629 : 37373740 +...checksum after hashing g_729 : B72166A +...checksum after hashing g_877 : 9179596D +...checksum after hashing g_1086 : F2908490 +...checksum after hashing g_1223 : 9D184259 +...checksum after hashing g_1237 : 24F43E37 +before stmt(42): checksum = 24F43E37 +...checksum after hashing g_18 : D4FABFC5 +...checksum after hashing g_41 : 7984009A +...checksum after hashing g_80 : 858F4A0B +...checksum after hashing g_94 : AA81A320 +...checksum after hashing g_146 : 4ED370E7 +...checksum after hashing g_149 : 7744A974 +...checksum after hashing g_167 : 78CB8321 +...checksum after hashing g_221 : 63BB5D7 +...checksum after hashing g_232 : 8C8328CA +...checksum after hashing g_318 : 74E8B5D9 +...checksum after hashing g_324 : C0FEBE50 +...checksum after hashing g_328 : 8056C9E6 +...checksum after hashing g_370 : 9EF4D23C +...checksum after hashing g_486 : AC68C342 +...checksum after hashing g_490 : B2987185 +...checksum after hashing g_495 : 89C703EF +...checksum after hashing g_560 : 142CF1FF +...checksum after hashing g_607 : 6297186C +...checksum after hashing g_611 : 1865925 +...checksum after hashing g_629 : 77A7FD11 +...checksum after hashing g_729 : E366A6B1 +...checksum after hashing g_877 : 250D24FA +...checksum after hashing g_1086 : 9716DE9 +...checksum after hashing g_1223 : 4016AF59 +...checksum after hashing g_1237 : E32FFE23 +before stmt(43): checksum = E32FFE23 +...checksum after hashing g_18 : D4FABFC5 +...checksum after hashing g_41 : 7984009A +...checksum after hashing g_80 : 858F4A0B +...checksum after hashing g_94 : AA81A320 +...checksum after hashing g_146 : 4ED370E7 +...checksum after hashing g_149 : 7744A974 +...checksum after hashing g_167 : 78CB8321 +...checksum after hashing g_221 : 63BB5D7 +...checksum after hashing g_232 : 8C8328CA +...checksum after hashing g_318 : 74E8B5D9 +...checksum after hashing g_324 : C0FEBE50 +...checksum after hashing g_328 : 8056C9E6 +...checksum after hashing g_370 : 9EF4D23C +...checksum after hashing g_486 : AC68C342 +...checksum after hashing g_490 : B2987185 +...checksum after hashing g_495 : 89C703EF +...checksum after hashing g_560 : 142CF1FF +...checksum after hashing g_607 : 6297186C +...checksum after hashing g_611 : 1865925 +...checksum after hashing g_629 : 77A7FD11 +...checksum after hashing g_729 : E366A6B1 +...checksum after hashing g_877 : 250D24FA +...checksum after hashing g_1086 : 9716DE9 +...checksum after hashing g_1223 : 4016AF59 +...checksum after hashing g_1237 : E32FFE23 +before stmt(118): checksum = E32FFE23 +...checksum after hashing g_18 : D4FABFC5 +...checksum after hashing g_41 : 7984009A +...checksum after hashing g_80 : 858F4A0B +...checksum after hashing g_94 : AA81A320 +...checksum after hashing g_146 : 4ED370E7 +...checksum after hashing g_149 : 7744A974 +...checksum after hashing g_167 : 78CB8321 +...checksum after hashing g_221 : 63BB5D7 +...checksum after hashing g_232 : 8C8328CA +...checksum after hashing g_318 : 74E8B5D9 +...checksum after hashing g_324 : C0FEBE50 +...checksum after hashing g_328 : 8056C9E6 +...checksum after hashing g_370 : 9EF4D23C +...checksum after hashing g_486 : AC68C342 +...checksum after hashing g_490 : B2987185 +...checksum after hashing g_495 : 89C703EF +...checksum after hashing g_560 : 142CF1FF +...checksum after hashing g_607 : 6297186C +...checksum after hashing g_611 : 1865925 +...checksum after hashing g_629 : 77A7FD11 +...checksum after hashing g_729 : E366A6B1 +...checksum after hashing g_877 : 250D24FA +...checksum after hashing g_1086 : 9716DE9 +...checksum after hashing g_1223 : 4016AF59 +...checksum after hashing g_1237 : E32FFE23 +before stmt(119): checksum = E32FFE23 +...checksum after hashing g_18 : D4FABFC5 +...checksum after hashing g_41 : 7984009A +...checksum after hashing g_80 : 858F4A0B +...checksum after hashing g_94 : AA81A320 +...checksum after hashing g_146 : 4ED370E7 +...checksum after hashing g_149 : 7744A974 +...checksum after hashing g_167 : 78CB8321 +...checksum after hashing g_221 : 63BB5D7 +...checksum after hashing g_232 : 8C8328CA +...checksum after hashing g_318 : 74E8B5D9 +...checksum after hashing g_324 : C0FEBE50 +...checksum after hashing g_328 : 8056C9E6 +...checksum after hashing g_370 : 9EF4D23C +...checksum after hashing g_486 : AC68C342 +...checksum after hashing g_490 : B2987185 +...checksum after hashing g_495 : 89C703EF +...checksum after hashing g_560 : 142CF1FF +...checksum after hashing g_607 : 6297186C +...checksum after hashing g_611 : 1865925 +...checksum after hashing g_629 : 77A7FD11 +...checksum after hashing g_729 : E366A6B1 +...checksum after hashing g_877 : 250D24FA +...checksum after hashing g_1086 : 9716DE9 +...checksum after hashing g_1223 : 4016AF59 +...checksum after hashing g_1237 : E32FFE23 +before stmt(170): checksum = E32FFE23 +...checksum after hashing g_18 : D4FABFC5 +...checksum after hashing g_41 : 7984009A +...checksum after hashing g_80 : 858F4A0B +...checksum after hashing g_94 : AA81A320 +...checksum after hashing g_146 : 4ED370E7 +...checksum after hashing g_149 : 7744A974 +...checksum after hashing g_167 : 78CB8321 +...checksum after hashing g_221 : 63BB5D7 +...checksum after hashing g_232 : 8C8328CA +...checksum after hashing g_318 : 74E8B5D9 +...checksum after hashing g_324 : C0FEBE50 +...checksum after hashing g_328 : 8056C9E6 +...checksum after hashing g_370 : 9EF4D23C +...checksum after hashing g_486 : AC68C342 +...checksum after hashing g_490 : B2987185 +...checksum after hashing g_495 : 89C703EF +...checksum after hashing g_560 : 142CF1FF +...checksum after hashing g_607 : 6297186C +...checksum after hashing g_611 : 1865925 +...checksum after hashing g_629 : CF1B9A74 +...checksum after hashing g_729 : 2FCCA62F +...checksum after hashing g_877 : BEA86895 +...checksum after hashing g_1086 : A719FC78 +...checksum after hashing g_1223 : 2571941F +...checksum after hashing g_1237 : 620A9B04 +before stmt(171): checksum = 620A9B04 +...checksum after hashing g_18 : D4FABFC5 +...checksum after hashing g_41 : 7984009A +...checksum after hashing g_80 : 858F4A0B +...checksum after hashing g_94 : AA81A320 +...checksum after hashing g_146 : 4ED370E7 +...checksum after hashing g_149 : 7744A974 +...checksum after hashing g_167 : 78CB8321 +...checksum after hashing g_221 : 63BB5D7 +...checksum after hashing g_232 : 8C8328CA +...checksum after hashing g_318 : 74E8B5D9 +...checksum after hashing g_324 : C0FEBE50 +...checksum after hashing g_328 : 8056C9E6 +...checksum after hashing g_370 : 9EF4D23C +...checksum after hashing g_486 : AC68C342 +...checksum after hashing g_490 : B2987185 +...checksum after hashing g_495 : 89C703EF +...checksum after hashing g_560 : 142CF1FF +...checksum after hashing g_607 : 6297186C +...checksum after hashing g_611 : 1865925 +...checksum after hashing g_629 : CF1B9A74 +...checksum after hashing g_729 : 2FCCA62F +...checksum after hashing g_877 : BEA86895 +...checksum after hashing g_1086 : A719FC78 +...checksum after hashing g_1223 : 2571941F +...checksum after hashing g_1237 : 620A9B04 +before stmt(173): checksum = 620A9B04 +...checksum after hashing g_18 : D4FABFC5 +...checksum after hashing g_41 : 7984009A +...checksum after hashing g_80 : 858F4A0B +...checksum after hashing g_94 : AA81A320 +...checksum after hashing g_146 : 4ED370E7 +...checksum after hashing g_149 : 7744A974 +...checksum after hashing g_167 : 78CB8321 +...checksum after hashing g_221 : 63BB5D7 +...checksum after hashing g_232 : 8C8328CA +...checksum after hashing g_318 : 74E8B5D9 +...checksum after hashing g_324 : C0FEBE50 +...checksum after hashing g_328 : 8056C9E6 +...checksum after hashing g_370 : 9EF4D23C +...checksum after hashing g_486 : AC68C342 +...checksum after hashing g_490 : B2987185 +...checksum after hashing g_495 : 89C703EF +...checksum after hashing g_560 : 142CF1FF +...checksum after hashing g_607 : 6297186C +...checksum after hashing g_611 : 1865925 +...checksum after hashing g_629 : CF1B9A74 +...checksum after hashing g_729 : 2FCCA62F +...checksum after hashing g_877 : BEA86895 +...checksum after hashing g_1086 : A719FC78 +...checksum after hashing g_1223 : 2571941F +...checksum after hashing g_1237 : 620A9B04 +before stmt(174): checksum = 620A9B04 +...checksum after hashing g_18 : D4FABFC5 +...checksum after hashing g_41 : A73F2079 +...checksum after hashing g_80 : 1F526A9D +...checksum after hashing g_94 : 2EAB9AB0 +...checksum after hashing g_146 : 5D97C44D +...checksum after hashing g_149 : 876ECD06 +...checksum after hashing g_167 : 24F5B6FE +...checksum after hashing g_221 : 79B43DC1 +...checksum after hashing g_232 : 6A768298 +...checksum after hashing g_318 : E1A1F8F3 +...checksum after hashing g_324 : D6ED7C1E +...checksum after hashing g_328 : FC8D5005 +...checksum after hashing g_370 : 93839E56 +...checksum after hashing g_486 : 9FBC330D +...checksum after hashing g_490 : 9EAF2B33 +...checksum after hashing g_495 : 722A7518 +...checksum after hashing g_560 : 9E5E6D36 +...checksum after hashing g_607 : 8DBF893E +...checksum after hashing g_611 : F1BB1D88 +...checksum after hashing g_629 : D0DCC412 +...checksum after hashing g_729 : 5E104136 +...checksum after hashing g_877 : 359B7D1C +...checksum after hashing g_1086 : A3A45BCA +...checksum after hashing g_1223 : 183B4D07 +...checksum after hashing g_1237 : 27010155 +before stmt(175): checksum = 27010155 +...checksum after hashing g_18 : D4FABFC5 +...checksum after hashing g_41 : A73F2079 +...checksum after hashing g_80 : 1F526A9D +...checksum after hashing g_94 : 2EAB9AB0 +...checksum after hashing g_146 : 5D97C44D +...checksum after hashing g_149 : 876ECD06 +...checksum after hashing g_167 : 24F5B6FE +...checksum after hashing g_221 : 79B43DC1 +...checksum after hashing g_232 : 6A768298 +...checksum after hashing g_318 : E1A1F8F3 +...checksum after hashing g_324 : D6ED7C1E +...checksum after hashing g_328 : FC8D5005 +...checksum after hashing g_370 : 93839E56 +...checksum after hashing g_486 : 9FBC330D +...checksum after hashing g_490 : 9EAF2B33 +...checksum after hashing g_495 : 722A7518 +...checksum after hashing g_560 : 9E5E6D36 +...checksum after hashing g_607 : 8DBF893E +...checksum after hashing g_611 : F1BB1D88 +...checksum after hashing g_629 : D0DCC412 +...checksum after hashing g_729 : 5E104136 +...checksum after hashing g_877 : 359B7D1C +...checksum after hashing g_1086 : A3A45BCA +...checksum after hashing g_1223 : 183B4D07 +...checksum after hashing g_1237 : 27010155 +before stmt(177): checksum = 27010155 +...checksum after hashing g_18 : D4FABFC5 +...checksum after hashing g_41 : A73F2079 +...checksum after hashing g_80 : 1F526A9D +...checksum after hashing g_94 : 2EAB9AB0 +...checksum after hashing g_146 : 5D97C44D +...checksum after hashing g_149 : 876ECD06 +...checksum after hashing g_167 : 24F5B6FE +...checksum after hashing g_221 : 79B43DC1 +...checksum after hashing g_232 : 6A768298 +...checksum after hashing g_318 : E1A1F8F3 +...checksum after hashing g_324 : D6ED7C1E +...checksum after hashing g_328 : FC8D5005 +...checksum after hashing g_370 : 93839E56 +...checksum after hashing g_486 : 9FBC330D +...checksum after hashing g_490 : 9EAF2B33 +...checksum after hashing g_495 : 722A7518 +...checksum after hashing g_560 : 9E5E6D36 +...checksum after hashing g_607 : 8DBF893E +...checksum after hashing g_611 : F1BB1D88 +...checksum after hashing g_629 : D0DCC412 +...checksum after hashing g_729 : 5E104136 +...checksum after hashing g_877 : 359B7D1C +...checksum after hashing g_1086 : A3A45BCA +...checksum after hashing g_1223 : 183B4D07 +...checksum after hashing g_1237 : 27010155 +before stmt(179): checksum = 27010155 +...checksum after hashing g_18 : D4FABFC5 +...checksum after hashing g_41 : A73F2079 +...checksum after hashing g_80 : A7EE0DF8 +...checksum after hashing g_94 : E2019A2E +...checksum after hashing g_146 : C6328822 +...checksum after hashing g_149 : 29065C97 +...checksum after hashing g_167 : 41928DB8 +...checksum after hashing g_221 : F89158E6 +...checksum after hashing g_232 : 6BC37F85 +...checksum after hashing g_318 : 107BFD59 +...checksum after hashing g_324 : 439DA88B +...checksum after hashing g_328 : 53C9C242 +...checksum after hashing g_370 : B9ABA634 +...checksum after hashing g_486 : A20DDFD1 +...checksum after hashing g_490 : F763D73E +...checksum after hashing g_495 : 6FBF66CF +...checksum after hashing g_560 : 548DE3B9 +...checksum after hashing g_607 : 28AA4AB +...checksum after hashing g_611 : 948685AA +...checksum after hashing g_629 : 7ED79786 +...checksum after hashing g_729 : D052F008 +...checksum after hashing g_877 : 29BCE509 +...checksum after hashing g_1086 : F9A7FB05 +...checksum after hashing g_1223 : 4FFE051E +...checksum after hashing g_1237 : 371B2264 +before stmt(233): checksum = 371B2264 +...checksum after hashing g_18 : D4FABFC5 +...checksum after hashing g_41 : A73F2079 +...checksum after hashing g_80 : A7EE0DF8 +...checksum after hashing g_94 : E2019A2E +...checksum after hashing g_146 : C6328822 +...checksum after hashing g_149 : 29065C97 +...checksum after hashing g_167 : 41928DB8 +...checksum after hashing g_221 : F89158E6 +...checksum after hashing g_232 : 6BC37F85 +...checksum after hashing g_318 : 107BFD59 +...checksum after hashing g_324 : 439DA88B +...checksum after hashing g_328 : 53C9C242 +...checksum after hashing g_370 : FEFBD884 +...checksum after hashing g_486 : B3135D76 +...checksum after hashing g_490 : 7B9F2641 +...checksum after hashing g_495 : B4E2AE58 +...checksum after hashing g_560 : F5B2D519 +...checksum after hashing g_607 : 96089DCE +...checksum after hashing g_611 : 4D13F110 +...checksum after hashing g_629 : ACD9EDDB +...checksum after hashing g_729 : 460D5487 +...checksum after hashing g_877 : 66B8C132 +...checksum after hashing g_1086 : 63C6F39C +...checksum after hashing g_1223 : ED99DA34 +...checksum after hashing g_1237 : 6C252097 +before stmt(234): checksum = 6C252097 +...checksum after hashing g_18 : D4FABFC5 +...checksum after hashing g_41 : A73F2079 +...checksum after hashing g_80 : A7EE0DF8 +...checksum after hashing g_94 : E2019A2E +...checksum after hashing g_146 : C6328822 +...checksum after hashing g_149 : 29065C97 +...checksum after hashing g_167 : 41928DB8 +...checksum after hashing g_221 : F89158E6 +...checksum after hashing g_232 : 6BC37F85 +...checksum after hashing g_318 : 107BFD59 +...checksum after hashing g_324 : 439DA88B +...checksum after hashing g_328 : 53C9C242 +...checksum after hashing g_370 : FEFBD884 +...checksum after hashing g_486 : B3135D76 +...checksum after hashing g_490 : 7B9F2641 +...checksum after hashing g_495 : B4E2AE58 +...checksum after hashing g_560 : F5B2D519 +...checksum after hashing g_607 : 96089DCE +...checksum after hashing g_611 : 4D13F110 +...checksum after hashing g_629 : ACD9EDDB +...checksum after hashing g_729 : 460D5487 +...checksum after hashing g_877 : 66B8C132 +...checksum after hashing g_1086 : 63C6F39C +...checksum after hashing g_1223 : ED99DA34 +...checksum after hashing g_1237 : 6C252097 +before stmt(235): checksum = 6C252097 +...checksum after hashing g_18 : D4FABFC5 +...checksum after hashing g_41 : A73F2079 +...checksum after hashing g_80 : A7EE0DF8 +...checksum after hashing g_94 : E2019A2E +...checksum after hashing g_146 : C6328822 +...checksum after hashing g_149 : 29065C97 +...checksum after hashing g_167 : 41928DB8 +...checksum after hashing g_221 : F89158E6 +...checksum after hashing g_232 : 6BC37F85 +...checksum after hashing g_318 : 107BFD59 +...checksum after hashing g_324 : 439DA88B +...checksum after hashing g_328 : 53C9C242 +...checksum after hashing g_370 : FEFBD884 +...checksum after hashing g_486 : B3135D76 +...checksum after hashing g_490 : 7B9F2641 +...checksum after hashing g_495 : B4E2AE58 +...checksum after hashing g_560 : F5B2D519 +...checksum after hashing g_607 : 96089DCE +...checksum after hashing g_611 : 4D13F110 +...checksum after hashing g_629 : ACD9EDDB +...checksum after hashing g_729 : 460D5487 +...checksum after hashing g_877 : 66B8C132 +...checksum after hashing g_1086 : 63C6F39C +...checksum after hashing g_1223 : ED99DA34 +...checksum after hashing g_1237 : 6C252097 +before stmt(304): checksum = 6C252097 +...checksum after hashing g_18 : D4FABFC5 +...checksum after hashing g_41 : A73F2079 +...checksum after hashing g_80 : A7EE0DF8 +...checksum after hashing g_94 : E2019A2E +...checksum after hashing g_146 : C6328822 +...checksum after hashing g_149 : 29065C97 +...checksum after hashing g_167 : 41928DB8 +...checksum after hashing g_221 : F89158E6 +...checksum after hashing g_232 : 6BC37F85 +...checksum after hashing g_318 : 107BFD59 +...checksum after hashing g_324 : 439DA88B +...checksum after hashing g_328 : 53C9C242 +...checksum after hashing g_370 : FEFBD884 +...checksum after hashing g_486 : B3135D76 +...checksum after hashing g_490 : 7B9F2641 +...checksum after hashing g_495 : B4E2AE58 +...checksum after hashing g_560 : F5B2D519 +...checksum after hashing g_607 : 96089DCE +...checksum after hashing g_611 : 4D13F110 +...checksum after hashing g_629 : ACD9EDDB +...checksum after hashing g_729 : 460D5487 +...checksum after hashing g_877 : 66B8C132 +...checksum after hashing g_1086 : 63C6F39C +...checksum after hashing g_1223 : ED99DA34 +...checksum after hashing g_1237 : 6C252097 +before stmt(281): checksum = 6C252097 +...checksum after hashing g_18 : D4FABFC5 +...checksum after hashing g_41 : A73F2079 +...checksum after hashing g_80 : A7EE0DF8 +...checksum after hashing g_94 : E2019A2E +...checksum after hashing g_146 : C6328822 +...checksum after hashing g_149 : 29065C97 +...checksum after hashing g_167 : 41928DB8 +...checksum after hashing g_221 : F89158E6 +...checksum after hashing g_232 : 6BC37F85 +...checksum after hashing g_318 : 107BFD59 +...checksum after hashing g_324 : 439DA88B +...checksum after hashing g_328 : 53C9C242 +...checksum after hashing g_370 : FEFBD884 +...checksum after hashing g_486 : B3135D76 +...checksum after hashing g_490 : 7B9F2641 +...checksum after hashing g_495 : B4E2AE58 +...checksum after hashing g_560 : F5B2D519 +...checksum after hashing g_607 : 96089DCE +...checksum after hashing g_611 : 4D13F110 +...checksum after hashing g_629 : ACD9EDDB +...checksum after hashing g_729 : 460D5487 +...checksum after hashing g_877 : 66B8C132 +...checksum after hashing g_1086 : 63C6F39C +...checksum after hashing g_1223 : ED99DA34 +...checksum after hashing g_1237 : 6C252097 +before stmt(274): checksum = 6C252097 +...checksum after hashing g_18 : D4FABFC5 +...checksum after hashing g_41 : A73F2079 +...checksum after hashing g_80 : A7EE0DF8 +...checksum after hashing g_94 : E2019A2E +...checksum after hashing g_146 : C6328822 +...checksum after hashing g_149 : 29065C97 +...checksum after hashing g_167 : 41928DB8 +...checksum after hashing g_221 : F89158E6 +...checksum after hashing g_232 : 6BC37F85 +...checksum after hashing g_318 : 107BFD59 +...checksum after hashing g_324 : 439DA88B +...checksum after hashing g_328 : 53C9C242 +...checksum after hashing g_370 : FEFBD884 +...checksum after hashing g_486 : B3135D76 +...checksum after hashing g_490 : 7B9F2641 +...checksum after hashing g_495 : B4E2AE58 +...checksum after hashing g_560 : F5B2D519 +...checksum after hashing g_607 : 96089DCE +...checksum after hashing g_611 : 4D13F110 +...checksum after hashing g_629 : ACD9EDDB +...checksum after hashing g_729 : 460D5487 +...checksum after hashing g_877 : 66B8C132 +...checksum after hashing g_1086 : 63C6F39C +...checksum after hashing g_1223 : ED99DA34 +...checksum after hashing g_1237 : 6C252097 +before stmt(118): checksum = 6C252097 +...checksum after hashing g_18 : D4FABFC5 +...checksum after hashing g_41 : A73F2079 +...checksum after hashing g_80 : A7EE0DF8 +...checksum after hashing g_94 : E2019A2E +...checksum after hashing g_146 : C6328822 +...checksum after hashing g_149 : 29065C97 +...checksum after hashing g_167 : 41928DB8 +...checksum after hashing g_221 : F89158E6 +...checksum after hashing g_232 : 6BC37F85 +...checksum after hashing g_318 : 107BFD59 +...checksum after hashing g_324 : 439DA88B +...checksum after hashing g_328 : 53C9C242 +...checksum after hashing g_370 : FEFBD884 +...checksum after hashing g_486 : B3135D76 +...checksum after hashing g_490 : 7B9F2641 +...checksum after hashing g_495 : B4E2AE58 +...checksum after hashing g_560 : F5B2D519 +...checksum after hashing g_607 : 96089DCE +...checksum after hashing g_611 : 4D13F110 +...checksum after hashing g_629 : ACD9EDDB +...checksum after hashing g_729 : 460D5487 +...checksum after hashing g_877 : 66B8C132 +...checksum after hashing g_1086 : 63C6F39C +...checksum after hashing g_1223 : ED99DA34 +...checksum after hashing g_1237 : 6C252097 +before stmt(119): checksum = 6C252097 +...checksum after hashing g_18 : D4FABFC5 +...checksum after hashing g_41 : A73F2079 +...checksum after hashing g_80 : A7EE0DF8 +...checksum after hashing g_94 : E2019A2E +...checksum after hashing g_146 : C6328822 +...checksum after hashing g_149 : 29065C97 +...checksum after hashing g_167 : 41928DB8 +...checksum after hashing g_221 : F89158E6 +...checksum after hashing g_232 : 6BC37F85 +...checksum after hashing g_318 : 107BFD59 +...checksum after hashing g_324 : 439DA88B +...checksum after hashing g_328 : 53C9C242 +...checksum after hashing g_370 : FEFBD884 +...checksum after hashing g_486 : B3135D76 +...checksum after hashing g_490 : 7B9F2641 +...checksum after hashing g_495 : B4E2AE58 +...checksum after hashing g_560 : F5B2D519 +...checksum after hashing g_607 : 96089DCE +...checksum after hashing g_611 : 4D13F110 +...checksum after hashing g_629 : ACD9EDDB +...checksum after hashing g_729 : 460D5487 +...checksum after hashing g_877 : 66B8C132 +...checksum after hashing g_1086 : 63C6F39C +...checksum after hashing g_1223 : ED99DA34 +...checksum after hashing g_1237 : 6C252097 +before stmt(271): checksum = 6C252097 +...checksum after hashing g_18 : D4FABFC5 +...checksum after hashing g_41 : A73F2079 +...checksum after hashing g_80 : A7EE0DF8 +...checksum after hashing g_94 : E2019A2E +...checksum after hashing g_146 : C6328822 +...checksum after hashing g_149 : 29065C97 +...checksum after hashing g_167 : 41928DB8 +...checksum after hashing g_221 : F89158E6 +...checksum after hashing g_232 : 6BC37F85 +...checksum after hashing g_318 : 107BFD59 +...checksum after hashing g_324 : 439DA88B +...checksum after hashing g_328 : 53C9C242 +...checksum after hashing g_370 : FEFBD884 +...checksum after hashing g_486 : B3135D76 +...checksum after hashing g_490 : 7B9F2641 +...checksum after hashing g_495 : B4E2AE58 +...checksum after hashing g_560 : F5B2D519 +...checksum after hashing g_607 : 96089DCE +...checksum after hashing g_611 : 4D13F110 +...checksum after hashing g_629 : ACD9EDDB +...checksum after hashing g_729 : 460D5487 +...checksum after hashing g_877 : 66B8C132 +...checksum after hashing g_1086 : 63C6F39C +...checksum after hashing g_1223 : ED99DA34 +...checksum after hashing g_1237 : 6C252097 +before stmt(265): checksum = 6C252097 +...checksum after hashing g_18 : D4FABFC5 +...checksum after hashing g_41 : A73F2079 +...checksum after hashing g_80 : A7EE0DF8 +...checksum after hashing g_94 : E2019A2E +...checksum after hashing g_146 : C6328822 +...checksum after hashing g_149 : 29065C97 +...checksum after hashing g_167 : 41928DB8 +...checksum after hashing g_221 : F89158E6 +...checksum after hashing g_232 : 6BC37F85 +...checksum after hashing g_318 : 107BFD59 +...checksum after hashing g_324 : 439DA88B +...checksum after hashing g_328 : 53C9C242 +...checksum after hashing g_370 : FEFBD884 +...checksum after hashing g_486 : B3135D76 +...checksum after hashing g_490 : 7B9F2641 +...checksum after hashing g_495 : B4E2AE58 +...checksum after hashing g_560 : F5B2D519 +...checksum after hashing g_607 : 96089DCE +...checksum after hashing g_611 : 4D13F110 +...checksum after hashing g_629 : ACD9EDDB +...checksum after hashing g_729 : 460D5487 +...checksum after hashing g_877 : 66B8C132 +...checksum after hashing g_1086 : 63C6F39C +...checksum after hashing g_1223 : ED99DA34 +...checksum after hashing g_1237 : 6C252097 +before stmt(262): checksum = 6C252097 +...checksum after hashing g_18 : D4FABFC5 +...checksum after hashing g_41 : A73F2079 +...checksum after hashing g_80 : A7EE0DF8 +...checksum after hashing g_94 : E2019A2E +...checksum after hashing g_146 : C6328822 +...checksum after hashing g_149 : 29065C97 +...checksum after hashing g_167 : 41928DB8 +...checksum after hashing g_221 : F89158E6 +...checksum after hashing g_232 : 6BC37F85 +...checksum after hashing g_318 : 107BFD59 +...checksum after hashing g_324 : 439DA88B +...checksum after hashing g_328 : 53C9C242 +...checksum after hashing g_370 : FEFBD884 +...checksum after hashing g_486 : B3135D76 +...checksum after hashing g_490 : 7B9F2641 +...checksum after hashing g_495 : B4E2AE58 +...checksum after hashing g_560 : F5B2D519 +...checksum after hashing g_607 : 96089DCE +...checksum after hashing g_611 : 4D13F110 +...checksum after hashing g_629 : ACD9EDDB +...checksum after hashing g_729 : 460D5487 +...checksum after hashing g_877 : 66B8C132 +...checksum after hashing g_1086 : 63C6F39C +...checksum after hashing g_1223 : ED99DA34 +...checksum after hashing g_1237 : 6C252097 +before stmt(263): checksum = 6C252097 +...checksum after hashing g_18 : D4FABFC5 +...checksum after hashing g_41 : A73F2079 +...checksum after hashing g_80 : A7EE0DF8 +...checksum after hashing g_94 : E2019A2E +...checksum after hashing g_146 : C6328822 +...checksum after hashing g_149 : 29065C97 +...checksum after hashing g_167 : 41928DB8 +...checksum after hashing g_221 : F89158E6 +...checksum after hashing g_232 : 6BC37F85 +...checksum after hashing g_318 : 107BFD59 +...checksum after hashing g_324 : 439DA88B +...checksum after hashing g_328 : 53C9C242 +...checksum after hashing g_370 : FEFBD884 +...checksum after hashing g_486 : B3135D76 +...checksum after hashing g_490 : 7B9F2641 +...checksum after hashing g_495 : B4E2AE58 +...checksum after hashing g_560 : F5B2D519 +...checksum after hashing g_607 : 96089DCE +...checksum after hashing g_611 : 4D13F110 +...checksum after hashing g_629 : ACD9EDDB +...checksum after hashing g_729 : 460D5487 +...checksum after hashing g_877 : 66B8C132 +...checksum after hashing g_1086 : 63C6F39C +...checksum after hashing g_1223 : ED99DA34 +...checksum after hashing g_1237 : 6C252097 +before stmt(264): checksum = 6C252097 +...checksum after hashing g_18 : D4FABFC5 +...checksum after hashing g_41 : A73F2079 +...checksum after hashing g_80 : A7EE0DF8 +...checksum after hashing g_94 : E2019A2E +...checksum after hashing g_146 : C6328822 +...checksum after hashing g_149 : 29065C97 +...checksum after hashing g_167 : 41928DB8 +...checksum after hashing g_221 : F89158E6 +...checksum after hashing g_232 : 6BC37F85 +...checksum after hashing g_318 : 107BFD59 +...checksum after hashing g_324 : 439DA88B +...checksum after hashing g_328 : 53C9C242 +...checksum after hashing g_370 : FEFBD884 +...checksum after hashing g_486 : B3135D76 +...checksum after hashing g_490 : 7B9F2641 +...checksum after hashing g_495 : B4E2AE58 +...checksum after hashing g_560 : F5B2D519 +...checksum after hashing g_607 : 96089DCE +...checksum after hashing g_611 : 4D13F110 +...checksum after hashing g_629 : ACD9EDDB +...checksum after hashing g_729 : 460D5487 +...checksum after hashing g_877 : 66B8C132 +...checksum after hashing g_1086 : 63C6F39C +...checksum after hashing g_1223 : ED99DA34 +...checksum after hashing g_1237 : 6C252097 +before stmt(262): checksum = 6C252097 +...checksum after hashing g_18 : D4FABFC5 +...checksum after hashing g_41 : A73F2079 +...checksum after hashing g_80 : A7EE0DF8 +...checksum after hashing g_94 : E2019A2E +...checksum after hashing g_146 : C6328822 +...checksum after hashing g_149 : 29065C97 +...checksum after hashing g_167 : 41928DB8 +...checksum after hashing g_221 : F89158E6 +...checksum after hashing g_232 : 6BC37F85 +...checksum after hashing g_318 : 107BFD59 +...checksum after hashing g_324 : 439DA88B +...checksum after hashing g_328 : 53C9C242 +...checksum after hashing g_370 : FEFBD884 +...checksum after hashing g_486 : B3135D76 +...checksum after hashing g_490 : 7B9F2641 +...checksum after hashing g_495 : B4E2AE58 +...checksum after hashing g_560 : F5B2D519 +...checksum after hashing g_607 : 96089DCE +...checksum after hashing g_611 : 4D13F110 +...checksum after hashing g_629 : ACD9EDDB +...checksum after hashing g_729 : 460D5487 +...checksum after hashing g_877 : 66B8C132 +...checksum after hashing g_1086 : 63C6F39C +...checksum after hashing g_1223 : ED99DA34 +...checksum after hashing g_1237 : 6C252097 +before stmt(263): checksum = 6C252097 +...checksum after hashing g_18 : D4FABFC5 +...checksum after hashing g_41 : A73F2079 +...checksum after hashing g_80 : A7EE0DF8 +...checksum after hashing g_94 : E2019A2E +...checksum after hashing g_146 : C6328822 +...checksum after hashing g_149 : 29065C97 +...checksum after hashing g_167 : 41928DB8 +...checksum after hashing g_221 : F89158E6 +...checksum after hashing g_232 : 6BC37F85 +...checksum after hashing g_318 : 107BFD59 +...checksum after hashing g_324 : 439DA88B +...checksum after hashing g_328 : 53C9C242 +...checksum after hashing g_370 : FEFBD884 +...checksum after hashing g_486 : B3135D76 +...checksum after hashing g_490 : 7B9F2641 +...checksum after hashing g_495 : B4E2AE58 +...checksum after hashing g_560 : F5B2D519 +...checksum after hashing g_607 : 96089DCE +...checksum after hashing g_611 : 4D13F110 +...checksum after hashing g_629 : ACD9EDDB +...checksum after hashing g_729 : 460D5487 +...checksum after hashing g_877 : 66B8C132 +...checksum after hashing g_1086 : 63C6F39C +...checksum after hashing g_1223 : ED99DA34 +...checksum after hashing g_1237 : 6C252097 +before stmt(262): checksum = 6C252097 +...checksum after hashing g_18 : D4FABFC5 +...checksum after hashing g_41 : A73F2079 +...checksum after hashing g_80 : A7EE0DF8 +...checksum after hashing g_94 : E2019A2E +...checksum after hashing g_146 : C6328822 +...checksum after hashing g_149 : 29065C97 +...checksum after hashing g_167 : 41928DB8 +...checksum after hashing g_221 : F89158E6 +...checksum after hashing g_232 : 6BC37F85 +...checksum after hashing g_318 : 107BFD59 +...checksum after hashing g_324 : 439DA88B +...checksum after hashing g_328 : 53C9C242 +...checksum after hashing g_370 : FEFBD884 +...checksum after hashing g_486 : B3135D76 +...checksum after hashing g_490 : 7B9F2641 +...checksum after hashing g_495 : B4E2AE58 +...checksum after hashing g_560 : F5B2D519 +...checksum after hashing g_607 : 96089DCE +...checksum after hashing g_611 : 4D13F110 +...checksum after hashing g_629 : ACD9EDDB +...checksum after hashing g_729 : 460D5487 +...checksum after hashing g_877 : 66B8C132 +...checksum after hashing g_1086 : 63C6F39C +...checksum after hashing g_1223 : ED99DA34 +...checksum after hashing g_1237 : 6C252097 +before stmt(263): checksum = 6C252097 +...checksum after hashing g_18 : D4FABFC5 +...checksum after hashing g_41 : A73F2079 +...checksum after hashing g_80 : A7EE0DF8 +...checksum after hashing g_94 : E2019A2E +...checksum after hashing g_146 : C6328822 +...checksum after hashing g_149 : 29065C97 +...checksum after hashing g_167 : 41928DB8 +...checksum after hashing g_221 : F89158E6 +...checksum after hashing g_232 : 6BC37F85 +...checksum after hashing g_318 : 107BFD59 +...checksum after hashing g_324 : 439DA88B +...checksum after hashing g_328 : 53C9C242 +...checksum after hashing g_370 : FEFBD884 +...checksum after hashing g_486 : B3135D76 +...checksum after hashing g_490 : 7B9F2641 +...checksum after hashing g_495 : B4E2AE58 +...checksum after hashing g_560 : F5B2D519 +...checksum after hashing g_607 : 96089DCE +...checksum after hashing g_611 : 4D13F110 +...checksum after hashing g_629 : ACD9EDDB +...checksum after hashing g_729 : 460D5487 +...checksum after hashing g_877 : 66B8C132 +...checksum after hashing g_1086 : 63C6F39C +...checksum after hashing g_1223 : ED99DA34 +...checksum after hashing g_1237 : 6C252097 +before stmt(262): checksum = 6C252097 +...checksum after hashing g_18 : D4FABFC5 +...checksum after hashing g_41 : A73F2079 +...checksum after hashing g_80 : A7EE0DF8 +...checksum after hashing g_94 : E2019A2E +...checksum after hashing g_146 : C6328822 +...checksum after hashing g_149 : 29065C97 +...checksum after hashing g_167 : 41928DB8 +...checksum after hashing g_221 : F89158E6 +...checksum after hashing g_232 : 6BC37F85 +...checksum after hashing g_318 : 107BFD59 +...checksum after hashing g_324 : 439DA88B +...checksum after hashing g_328 : 53C9C242 +...checksum after hashing g_370 : FEFBD884 +...checksum after hashing g_486 : B3135D76 +...checksum after hashing g_490 : 7B9F2641 +...checksum after hashing g_495 : B4E2AE58 +...checksum after hashing g_560 : F5B2D519 +...checksum after hashing g_607 : 96089DCE +...checksum after hashing g_611 : 4D13F110 +...checksum after hashing g_629 : ACD9EDDB +...checksum after hashing g_729 : 460D5487 +...checksum after hashing g_877 : 66B8C132 +...checksum after hashing g_1086 : 63C6F39C +...checksum after hashing g_1223 : ED99DA34 +...checksum after hashing g_1237 : 6C252097 +before stmt(263): checksum = 6C252097 +...checksum after hashing g_18 : D4FABFC5 +...checksum after hashing g_41 : A73F2079 +...checksum after hashing g_80 : A7EE0DF8 +...checksum after hashing g_94 : E2019A2E +...checksum after hashing g_146 : C6328822 +...checksum after hashing g_149 : 29065C97 +...checksum after hashing g_167 : 41928DB8 +...checksum after hashing g_221 : F89158E6 +...checksum after hashing g_232 : 6BC37F85 +...checksum after hashing g_318 : 107BFD59 +...checksum after hashing g_324 : 439DA88B +...checksum after hashing g_328 : 53C9C242 +...checksum after hashing g_370 : FEFBD884 +...checksum after hashing g_486 : B3135D76 +...checksum after hashing g_490 : 7B9F2641 +...checksum after hashing g_495 : B4E2AE58 +...checksum after hashing g_560 : F5B2D519 +...checksum after hashing g_607 : 96089DCE +...checksum after hashing g_611 : 4D13F110 +...checksum after hashing g_629 : ACD9EDDB +...checksum after hashing g_729 : 460D5487 +...checksum after hashing g_877 : 66B8C132 +...checksum after hashing g_1086 : 63C6F39C +...checksum after hashing g_1223 : ED99DA34 +...checksum after hashing g_1237 : 6C252097 +before stmt(262): checksum = 6C252097 +...checksum after hashing g_18 : D4FABFC5 +...checksum after hashing g_41 : A73F2079 +...checksum after hashing g_80 : A7EE0DF8 +...checksum after hashing g_94 : E2019A2E +...checksum after hashing g_146 : C6328822 +...checksum after hashing g_149 : 29065C97 +...checksum after hashing g_167 : 41928DB8 +...checksum after hashing g_221 : F89158E6 +...checksum after hashing g_232 : 6BC37F85 +...checksum after hashing g_318 : 107BFD59 +...checksum after hashing g_324 : 439DA88B +...checksum after hashing g_328 : 53C9C242 +...checksum after hashing g_370 : FEFBD884 +...checksum after hashing g_486 : B3135D76 +...checksum after hashing g_490 : 7B9F2641 +...checksum after hashing g_495 : B4E2AE58 +...checksum after hashing g_560 : F5B2D519 +...checksum after hashing g_607 : 96089DCE +...checksum after hashing g_611 : 4D13F110 +...checksum after hashing g_629 : ACD9EDDB +...checksum after hashing g_729 : 460D5487 +...checksum after hashing g_877 : 66B8C132 +...checksum after hashing g_1086 : 63C6F39C +...checksum after hashing g_1223 : ED99DA34 +...checksum after hashing g_1237 : 6C252097 +before stmt(263): checksum = 6C252097 +...checksum after hashing g_18 : D4FABFC5 +...checksum after hashing g_41 : A73F2079 +...checksum after hashing g_80 : A7EE0DF8 +...checksum after hashing g_94 : E2019A2E +...checksum after hashing g_146 : C6328822 +...checksum after hashing g_149 : 29065C97 +...checksum after hashing g_167 : 41928DB8 +...checksum after hashing g_221 : F89158E6 +...checksum after hashing g_232 : 6BC37F85 +...checksum after hashing g_318 : 107BFD59 +...checksum after hashing g_324 : 439DA88B +...checksum after hashing g_328 : 53C9C242 +...checksum after hashing g_370 : FEFBD884 +...checksum after hashing g_486 : B3135D76 +...checksum after hashing g_490 : 7B9F2641 +...checksum after hashing g_495 : B4E2AE58 +...checksum after hashing g_560 : F5B2D519 +...checksum after hashing g_607 : 96089DCE +...checksum after hashing g_611 : 4D13F110 +...checksum after hashing g_629 : ACD9EDDB +...checksum after hashing g_729 : 460D5487 +...checksum after hashing g_877 : 66B8C132 +...checksum after hashing g_1086 : 63C6F39C +...checksum after hashing g_1223 : ED99DA34 +...checksum after hashing g_1237 : 6C252097 +before stmt(262): checksum = 6C252097 +...checksum after hashing g_18 : D4FABFC5 +...checksum after hashing g_41 : A73F2079 +...checksum after hashing g_80 : A7EE0DF8 +...checksum after hashing g_94 : E2019A2E +...checksum after hashing g_146 : C6328822 +...checksum after hashing g_149 : 29065C97 +...checksum after hashing g_167 : 41928DB8 +...checksum after hashing g_221 : F89158E6 +...checksum after hashing g_232 : 6BC37F85 +...checksum after hashing g_318 : 107BFD59 +...checksum after hashing g_324 : 439DA88B +...checksum after hashing g_328 : 53C9C242 +...checksum after hashing g_370 : FEFBD884 +...checksum after hashing g_486 : B3135D76 +...checksum after hashing g_490 : 7B9F2641 +...checksum after hashing g_495 : B4E2AE58 +...checksum after hashing g_560 : F5B2D519 +...checksum after hashing g_607 : 96089DCE +...checksum after hashing g_611 : 4D13F110 +...checksum after hashing g_629 : ACD9EDDB +...checksum after hashing g_729 : 460D5487 +...checksum after hashing g_877 : 66B8C132 +...checksum after hashing g_1086 : 63C6F39C +...checksum after hashing g_1223 : ED99DA34 +...checksum after hashing g_1237 : 6C252097 +before stmt(263): checksum = 6C252097 +...checksum after hashing g_18 : D4FABFC5 +...checksum after hashing g_41 : A73F2079 +...checksum after hashing g_80 : A7EE0DF8 +...checksum after hashing g_94 : E2019A2E +...checksum after hashing g_146 : C6328822 +...checksum after hashing g_149 : 29065C97 +...checksum after hashing g_167 : 41928DB8 +...checksum after hashing g_221 : F89158E6 +...checksum after hashing g_232 : 6BC37F85 +...checksum after hashing g_318 : 107BFD59 +...checksum after hashing g_324 : 439DA88B +...checksum after hashing g_328 : 53C9C242 +...checksum after hashing g_370 : FEFBD884 +...checksum after hashing g_486 : B3135D76 +...checksum after hashing g_490 : 7B9F2641 +...checksum after hashing g_495 : B4E2AE58 +...checksum after hashing g_560 : F5B2D519 +...checksum after hashing g_607 : 96089DCE +...checksum after hashing g_611 : 4D13F110 +...checksum after hashing g_629 : ACD9EDDB +...checksum after hashing g_729 : 460D5487 +...checksum after hashing g_877 : 66B8C132 +...checksum after hashing g_1086 : 63C6F39C +...checksum after hashing g_1223 : ED99DA34 +...checksum after hashing g_1237 : 6C252097 +before stmt(262): checksum = 6C252097 +...checksum after hashing g_18 : D4FABFC5 +...checksum after hashing g_41 : A73F2079 +...checksum after hashing g_80 : A7EE0DF8 +...checksum after hashing g_94 : E2019A2E +...checksum after hashing g_146 : C6328822 +...checksum after hashing g_149 : 29065C97 +...checksum after hashing g_167 : 41928DB8 +...checksum after hashing g_221 : F89158E6 +...checksum after hashing g_232 : 6BC37F85 +...checksum after hashing g_318 : 107BFD59 +...checksum after hashing g_324 : 439DA88B +...checksum after hashing g_328 : 53C9C242 +...checksum after hashing g_370 : FEFBD884 +...checksum after hashing g_486 : B3135D76 +...checksum after hashing g_490 : 7B9F2641 +...checksum after hashing g_495 : B4E2AE58 +...checksum after hashing g_560 : F5B2D519 +...checksum after hashing g_607 : 96089DCE +...checksum after hashing g_611 : 4D13F110 +...checksum after hashing g_629 : ACD9EDDB +...checksum after hashing g_729 : 460D5487 +...checksum after hashing g_877 : 66B8C132 +...checksum after hashing g_1086 : 63C6F39C +...checksum after hashing g_1223 : ED99DA34 +...checksum after hashing g_1237 : 6C252097 +before stmt(263): checksum = 6C252097 +...checksum after hashing g_18 : D4FABFC5 +...checksum after hashing g_41 : A73F2079 +...checksum after hashing g_80 : A7EE0DF8 +...checksum after hashing g_94 : E2019A2E +...checksum after hashing g_146 : C6328822 +...checksum after hashing g_149 : 29065C97 +...checksum after hashing g_167 : 41928DB8 +...checksum after hashing g_221 : F89158E6 +...checksum after hashing g_232 : 6BC37F85 +...checksum after hashing g_318 : 107BFD59 +...checksum after hashing g_324 : 439DA88B +...checksum after hashing g_328 : 53C9C242 +...checksum after hashing g_370 : FEFBD884 +...checksum after hashing g_486 : B3135D76 +...checksum after hashing g_490 : 7B9F2641 +...checksum after hashing g_495 : B4E2AE58 +...checksum after hashing g_560 : F5B2D519 +...checksum after hashing g_607 : 96089DCE +...checksum after hashing g_611 : 4D13F110 +...checksum after hashing g_629 : ACD9EDDB +...checksum after hashing g_729 : 460D5487 +...checksum after hashing g_877 : 66B8C132 +...checksum after hashing g_1086 : 63C6F39C +...checksum after hashing g_1223 : ED99DA34 +...checksum after hashing g_1237 : 6C252097 +before stmt(262): checksum = 6C252097 +...checksum after hashing g_18 : D4FABFC5 +...checksum after hashing g_41 : A73F2079 +...checksum after hashing g_80 : A7EE0DF8 +...checksum after hashing g_94 : E2019A2E +...checksum after hashing g_146 : C6328822 +...checksum after hashing g_149 : 29065C97 +...checksum after hashing g_167 : 41928DB8 +...checksum after hashing g_221 : F89158E6 +...checksum after hashing g_232 : 6BC37F85 +...checksum after hashing g_318 : 107BFD59 +...checksum after hashing g_324 : 439DA88B +...checksum after hashing g_328 : 53C9C242 +...checksum after hashing g_370 : FEFBD884 +...checksum after hashing g_486 : B3135D76 +...checksum after hashing g_490 : 7B9F2641 +...checksum after hashing g_495 : B4E2AE58 +...checksum after hashing g_560 : F5B2D519 +...checksum after hashing g_607 : 96089DCE +...checksum after hashing g_611 : 4D13F110 +...checksum after hashing g_629 : ACD9EDDB +...checksum after hashing g_729 : 460D5487 +...checksum after hashing g_877 : 66B8C132 +...checksum after hashing g_1086 : 63C6F39C +...checksum after hashing g_1223 : ED99DA34 +...checksum after hashing g_1237 : 6C252097 +before stmt(263): checksum = 6C252097 +...checksum after hashing g_18 : D4FABFC5 +...checksum after hashing g_41 : A73F2079 +...checksum after hashing g_80 : A7EE0DF8 +...checksum after hashing g_94 : E2019A2E +...checksum after hashing g_146 : C6328822 +...checksum after hashing g_149 : 29065C97 +...checksum after hashing g_167 : 41928DB8 +...checksum after hashing g_221 : F89158E6 +...checksum after hashing g_232 : 6BC37F85 +...checksum after hashing g_318 : 107BFD59 +...checksum after hashing g_324 : 439DA88B +...checksum after hashing g_328 : 53C9C242 +...checksum after hashing g_370 : FEFBD884 +...checksum after hashing g_486 : B3135D76 +...checksum after hashing g_490 : 7B9F2641 +...checksum after hashing g_495 : B4E2AE58 +...checksum after hashing g_560 : F5B2D519 +...checksum after hashing g_607 : 96089DCE +...checksum after hashing g_611 : 4D13F110 +...checksum after hashing g_629 : ACD9EDDB +...checksum after hashing g_729 : 460D5487 +...checksum after hashing g_877 : 66B8C132 +...checksum after hashing g_1086 : 63C6F39C +...checksum after hashing g_1223 : ED99DA34 +...checksum after hashing g_1237 : 6C252097 +before stmt(262): checksum = 6C252097 +...checksum after hashing g_18 : D4FABFC5 +...checksum after hashing g_41 : A73F2079 +...checksum after hashing g_80 : A7EE0DF8 +...checksum after hashing g_94 : E2019A2E +...checksum after hashing g_146 : C6328822 +...checksum after hashing g_149 : 29065C97 +...checksum after hashing g_167 : 41928DB8 +...checksum after hashing g_221 : F89158E6 +...checksum after hashing g_232 : 6BC37F85 +...checksum after hashing g_318 : 107BFD59 +...checksum after hashing g_324 : 439DA88B +...checksum after hashing g_328 : 53C9C242 +...checksum after hashing g_370 : FEFBD884 +...checksum after hashing g_486 : B3135D76 +...checksum after hashing g_490 : 7B9F2641 +...checksum after hashing g_495 : B4E2AE58 +...checksum after hashing g_560 : F5B2D519 +...checksum after hashing g_607 : 96089DCE +...checksum after hashing g_611 : 4D13F110 +...checksum after hashing g_629 : ACD9EDDB +...checksum after hashing g_729 : 460D5487 +...checksum after hashing g_877 : 66B8C132 +...checksum after hashing g_1086 : 63C6F39C +...checksum after hashing g_1223 : ED99DA34 +...checksum after hashing g_1237 : 6C252097 +before stmt(263): checksum = 6C252097 +...checksum after hashing g_18 : D4FABFC5 +...checksum after hashing g_41 : A73F2079 +...checksum after hashing g_80 : A7EE0DF8 +...checksum after hashing g_94 : E2019A2E +...checksum after hashing g_146 : C6328822 +...checksum after hashing g_149 : 29065C97 +...checksum after hashing g_167 : 41928DB8 +...checksum after hashing g_221 : F89158E6 +...checksum after hashing g_232 : 6BC37F85 +...checksum after hashing g_318 : 107BFD59 +...checksum after hashing g_324 : 439DA88B +...checksum after hashing g_328 : 53C9C242 +...checksum after hashing g_370 : FEFBD884 +...checksum after hashing g_486 : B3135D76 +...checksum after hashing g_490 : 7B9F2641 +...checksum after hashing g_495 : B4E2AE58 +...checksum after hashing g_560 : F5B2D519 +...checksum after hashing g_607 : 96089DCE +...checksum after hashing g_611 : 4D13F110 +...checksum after hashing g_629 : ACD9EDDB +...checksum after hashing g_729 : 460D5487 +...checksum after hashing g_877 : 66B8C132 +...checksum after hashing g_1086 : 63C6F39C +...checksum after hashing g_1223 : ED99DA34 +...checksum after hashing g_1237 : 6C252097 +before stmt(262): checksum = 6C252097 +...checksum after hashing g_18 : D4FABFC5 +...checksum after hashing g_41 : A73F2079 +...checksum after hashing g_80 : A7EE0DF8 +...checksum after hashing g_94 : E2019A2E +...checksum after hashing g_146 : C6328822 +...checksum after hashing g_149 : 29065C97 +...checksum after hashing g_167 : 41928DB8 +...checksum after hashing g_221 : F89158E6 +...checksum after hashing g_232 : 6BC37F85 +...checksum after hashing g_318 : 107BFD59 +...checksum after hashing g_324 : 439DA88B +...checksum after hashing g_328 : 53C9C242 +...checksum after hashing g_370 : FEFBD884 +...checksum after hashing g_486 : B3135D76 +...checksum after hashing g_490 : 7B9F2641 +...checksum after hashing g_495 : B4E2AE58 +...checksum after hashing g_560 : F5B2D519 +...checksum after hashing g_607 : 96089DCE +...checksum after hashing g_611 : 4D13F110 +...checksum after hashing g_629 : ACD9EDDB +...checksum after hashing g_729 : 460D5487 +...checksum after hashing g_877 : 66B8C132 +...checksum after hashing g_1086 : 63C6F39C +...checksum after hashing g_1223 : ED99DA34 +...checksum after hashing g_1237 : 6C252097 +before stmt(263): checksum = 6C252097 +...checksum after hashing g_18 : D4FABFC5 +...checksum after hashing g_41 : A73F2079 +...checksum after hashing g_80 : A7EE0DF8 +...checksum after hashing g_94 : E2019A2E +...checksum after hashing g_146 : C6328822 +...checksum after hashing g_149 : 29065C97 +...checksum after hashing g_167 : 41928DB8 +...checksum after hashing g_221 : F89158E6 +...checksum after hashing g_232 : 6BC37F85 +...checksum after hashing g_318 : 107BFD59 +...checksum after hashing g_324 : 439DA88B +...checksum after hashing g_328 : 53C9C242 +...checksum after hashing g_370 : FEFBD884 +...checksum after hashing g_486 : B3135D76 +...checksum after hashing g_490 : 7B9F2641 +...checksum after hashing g_495 : B4E2AE58 +...checksum after hashing g_560 : F5B2D519 +...checksum after hashing g_607 : 96089DCE +...checksum after hashing g_611 : 4D13F110 +...checksum after hashing g_629 : ACD9EDDB +...checksum after hashing g_729 : 460D5487 +...checksum after hashing g_877 : 66B8C132 +...checksum after hashing g_1086 : 63C6F39C +...checksum after hashing g_1223 : ED99DA34 +...checksum after hashing g_1237 : 6C252097 +before stmt(262): checksum = 6C252097 +...checksum after hashing g_18 : D4FABFC5 +...checksum after hashing g_41 : A73F2079 +...checksum after hashing g_80 : A7EE0DF8 +...checksum after hashing g_94 : E2019A2E +...checksum after hashing g_146 : C6328822 +...checksum after hashing g_149 : 29065C97 +...checksum after hashing g_167 : 41928DB8 +...checksum after hashing g_221 : F89158E6 +...checksum after hashing g_232 : 6BC37F85 +...checksum after hashing g_318 : 107BFD59 +...checksum after hashing g_324 : 439DA88B +...checksum after hashing g_328 : 53C9C242 +...checksum after hashing g_370 : FEFBD884 +...checksum after hashing g_486 : B3135D76 +...checksum after hashing g_490 : 7B9F2641 +...checksum after hashing g_495 : B4E2AE58 +...checksum after hashing g_560 : F5B2D519 +...checksum after hashing g_607 : 96089DCE +...checksum after hashing g_611 : 4D13F110 +...checksum after hashing g_629 : ACD9EDDB +...checksum after hashing g_729 : 460D5487 +...checksum after hashing g_877 : 66B8C132 +...checksum after hashing g_1086 : 63C6F39C +...checksum after hashing g_1223 : ED99DA34 +...checksum after hashing g_1237 : 6C252097 +before stmt(263): checksum = 6C252097 +...checksum after hashing g_18 : D4FABFC5 +...checksum after hashing g_41 : A73F2079 +...checksum after hashing g_80 : A7EE0DF8 +...checksum after hashing g_94 : E2019A2E +...checksum after hashing g_146 : C6328822 +...checksum after hashing g_149 : 29065C97 +...checksum after hashing g_167 : 41928DB8 +...checksum after hashing g_221 : F89158E6 +...checksum after hashing g_232 : 6BC37F85 +...checksum after hashing g_318 : 107BFD59 +...checksum after hashing g_324 : 439DA88B +...checksum after hashing g_328 : 53C9C242 +...checksum after hashing g_370 : FEFBD884 +...checksum after hashing g_486 : B3135D76 +...checksum after hashing g_490 : 7B9F2641 +...checksum after hashing g_495 : B4E2AE58 +...checksum after hashing g_560 : F5B2D519 +...checksum after hashing g_607 : 96089DCE +...checksum after hashing g_611 : 4D13F110 +...checksum after hashing g_629 : ACD9EDDB +...checksum after hashing g_729 : 460D5487 +...checksum after hashing g_877 : 66B8C132 +...checksum after hashing g_1086 : 63C6F39C +...checksum after hashing g_1223 : ED99DA34 +...checksum after hashing g_1237 : 6C252097 +before stmt(262): checksum = 6C252097 +...checksum after hashing g_18 : D4FABFC5 +...checksum after hashing g_41 : A73F2079 +...checksum after hashing g_80 : A7EE0DF8 +...checksum after hashing g_94 : E2019A2E +...checksum after hashing g_146 : C6328822 +...checksum after hashing g_149 : 29065C97 +...checksum after hashing g_167 : 41928DB8 +...checksum after hashing g_221 : F89158E6 +...checksum after hashing g_232 : 6BC37F85 +...checksum after hashing g_318 : 107BFD59 +...checksum after hashing g_324 : 439DA88B +...checksum after hashing g_328 : 53C9C242 +...checksum after hashing g_370 : FEFBD884 +...checksum after hashing g_486 : B3135D76 +...checksum after hashing g_490 : 7B9F2641 +...checksum after hashing g_495 : B4E2AE58 +...checksum after hashing g_560 : F5B2D519 +...checksum after hashing g_607 : 96089DCE +...checksum after hashing g_611 : 4D13F110 +...checksum after hashing g_629 : ACD9EDDB +...checksum after hashing g_729 : 460D5487 +...checksum after hashing g_877 : 66B8C132 +...checksum after hashing g_1086 : 63C6F39C +...checksum after hashing g_1223 : ED99DA34 +...checksum after hashing g_1237 : 6C252097 +before stmt(263): checksum = 6C252097 +...checksum after hashing g_18 : D4FABFC5 +...checksum after hashing g_41 : A73F2079 +...checksum after hashing g_80 : A7EE0DF8 +...checksum after hashing g_94 : E2019A2E +...checksum after hashing g_146 : C6328822 +...checksum after hashing g_149 : 29065C97 +...checksum after hashing g_167 : 41928DB8 +...checksum after hashing g_221 : F89158E6 +...checksum after hashing g_232 : 6BC37F85 +...checksum after hashing g_318 : 107BFD59 +...checksum after hashing g_324 : 439DA88B +...checksum after hashing g_328 : 53C9C242 +...checksum after hashing g_370 : FEFBD884 +...checksum after hashing g_486 : B3135D76 +...checksum after hashing g_490 : 7B9F2641 +...checksum after hashing g_495 : B4E2AE58 +...checksum after hashing g_560 : F5B2D519 +...checksum after hashing g_607 : 96089DCE +...checksum after hashing g_611 : 4D13F110 +...checksum after hashing g_629 : ACD9EDDB +...checksum after hashing g_729 : 460D5487 +...checksum after hashing g_877 : 66B8C132 +...checksum after hashing g_1086 : 63C6F39C +...checksum after hashing g_1223 : ED99DA34 +...checksum after hashing g_1237 : 6C252097 +before stmt(270): checksum = 6C252097 +...checksum after hashing g_18 : D4FABFC5 +...checksum after hashing g_41 : A73F2079 +...checksum after hashing g_80 : A7EE0DF8 +...checksum after hashing g_94 : E2019A2E +...checksum after hashing g_146 : C6328822 +...checksum after hashing g_149 : 29065C97 +...checksum after hashing g_167 : 41928DB8 +...checksum after hashing g_221 : F89158E6 +...checksum after hashing g_232 : 6BC37F85 +...checksum after hashing g_318 : 107BFD59 +...checksum after hashing g_324 : 439DA88B +...checksum after hashing g_328 : 53C9C242 +...checksum after hashing g_370 : FEFBD884 +...checksum after hashing g_486 : B3135D76 +...checksum after hashing g_490 : 7B9F2641 +...checksum after hashing g_495 : B4E2AE58 +...checksum after hashing g_560 : F5B2D519 +...checksum after hashing g_607 : 96089DCE +...checksum after hashing g_611 : 4D13F110 +...checksum after hashing g_629 : ACD9EDDB +...checksum after hashing g_729 : 460D5487 +...checksum after hashing g_877 : 66B8C132 +...checksum after hashing g_1086 : 63C6F39C +...checksum after hashing g_1223 : ED99DA34 +...checksum after hashing g_1237 : 6C252097 +before stmt(121): checksum = 6C252097 +...checksum after hashing g_18 : D4FABFC5 +...checksum after hashing g_41 : 7984009A +...checksum after hashing g_80 : 3D332D6E +...checksum after hashing g_94 : 662BA3BE +...checksum after hashing g_146 : D5763C88 +...checksum after hashing g_149 : D92C38E5 +...checksum after hashing g_167 : 1DACB867 +...checksum after hashing g_221 : 871ED0F0 +...checksum after hashing g_232 : 8D36D5D7 +...checksum after hashing g_318 : 8532B073 +...checksum after hashing g_324 : 558E6AC5 +...checksum after hashing g_328 : 2F125BA1 +...checksum after hashing g_370 : F38C94EE +...checksum after hashing g_486 : 80C7AD39 +...checksum after hashing g_490 : 57A87CF7 +...checksum after hashing g_495 : 4F0FD8AF +...checksum after hashing g_560 : 7FC049D0 +...checksum after hashing g_607 : 79200C9C +...checksum after hashing g_611 : BD2EB5BD +...checksum after hashing g_629 : B31EB3BD +...checksum after hashing g_729 : 37D1B39E +...checksum after hashing g_877 : ED8BD4BB +...checksum after hashing g_1086 : 677B542E +...checksum after hashing g_1223 : D0D3032C +...checksum after hashing g_1237 : 292EBAC6 +before stmt(122): checksum = 292EBAC6 +...checksum after hashing g_18 : D4FABFC5 +...checksum after hashing g_41 : 7984009A +...checksum after hashing g_80 : 3D332D6E +...checksum after hashing g_94 : 662BA3BE +...checksum after hashing g_146 : D5763C88 +...checksum after hashing g_149 : D92C38E5 +...checksum after hashing g_167 : 1DACB867 +...checksum after hashing g_221 : 871ED0F0 +...checksum after hashing g_232 : 8D36D5D7 +...checksum after hashing g_318 : 8532B073 +...checksum after hashing g_324 : 558E6AC5 +...checksum after hashing g_328 : 2F125BA1 +...checksum after hashing g_370 : F38C94EE +...checksum after hashing g_486 : 80C7AD39 +...checksum after hashing g_490 : 57A87CF7 +...checksum after hashing g_495 : 4F0FD8AF +...checksum after hashing g_560 : 7FC049D0 +...checksum after hashing g_607 : 79200C9C +...checksum after hashing g_611 : BD2EB5BD +...checksum after hashing g_629 : B31EB3BD +...checksum after hashing g_729 : 37D1B39E +...checksum after hashing g_877 : ED8BD4BB +...checksum after hashing g_1086 : 677B542E +...checksum after hashing g_1223 : D0D3032C +...checksum after hashing g_1237 : 292EBAC6 +before stmt(267): checksum = 292EBAC6 +...checksum after hashing g_18 : D4FABFC5 +...checksum after hashing g_41 : 7984009A +...checksum after hashing g_80 : 3D332D6E +...checksum after hashing g_94 : 662BA3BE +...checksum after hashing g_146 : D5763C88 +...checksum after hashing g_149 : D92C38E5 +...checksum after hashing g_167 : 1DACB867 +...checksum after hashing g_221 : 871ED0F0 +...checksum after hashing g_232 : 8D36D5D7 +...checksum after hashing g_318 : 8532B073 +...checksum after hashing g_324 : 558E6AC5 +...checksum after hashing g_328 : 2F125BA1 +...checksum after hashing g_370 : F38C94EE +...checksum after hashing g_486 : 80C7AD39 +...checksum after hashing g_490 : 57A87CF7 +...checksum after hashing g_495 : 2A74B263 +...checksum after hashing g_560 : F7086372 +...checksum after hashing g_607 : 4BD84870 +...checksum after hashing g_611 : 42A65414 +...checksum after hashing g_629 : F505A26B +...checksum after hashing g_729 : 1F83B3A3 +...checksum after hashing g_877 : 52F263EB +...checksum after hashing g_1086 : C944DFBB +...checksum after hashing g_1223 : DE9D4208 +...checksum after hashing g_1237 : FE642AD4 +before stmt(308): checksum = FE642AD4 +...checksum after hashing g_18 : D4FABFC5 +...checksum after hashing g_41 : 7984009A +...checksum after hashing g_80 : 3D332D6E +...checksum after hashing g_94 : 662BA3BE +...checksum after hashing g_146 : D5763C88 +...checksum after hashing g_149 : D92C38E5 +...checksum after hashing g_167 : 1DACB867 +...checksum after hashing g_221 : 871ED0F0 +...checksum after hashing g_232 : 8D36D5D7 +...checksum after hashing g_318 : 8532B073 +...checksum after hashing g_324 : 558E6AC5 +...checksum after hashing g_328 : 2F125BA1 +...checksum after hashing g_370 : F38C94EE +...checksum after hashing g_486 : 80C7AD39 +...checksum after hashing g_490 : 57A87CF7 +...checksum after hashing g_495 : 2A74B263 +...checksum after hashing g_560 : F7086372 +...checksum after hashing g_607 : 4BD84870 +...checksum after hashing g_611 : 42A65414 +...checksum after hashing g_629 : F505A26B +...checksum after hashing g_729 : 1F83B3A3 +...checksum after hashing g_877 : 52F263EB +...checksum after hashing g_1086 : C944DFBB +...checksum after hashing g_1223 : DE9D4208 +...checksum after hashing g_1237 : FE642AD4 +checksum = fe642ad4 diff --git a/src/tests/csmith/rand51.c b/src/tests/csmith/rand51.c new file mode 100644 index 0000000..76228f0 --- /dev/null +++ b/src/tests/csmith/rand51.c @@ -0,0 +1,114 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static int g_4 = 1L; +static unsigned char g_23 = 0x1FL; +static signed char func_1(void); +static signed char func_1(void) +{ + short l_2 = (-1L); + int *l_3 = &g_4; + int *l_5 = &g_4; + int *l_6 = &g_4; + int *l_7 = &g_4; + int *l_8 = &g_4; + int *l_9 = &g_4; + int *l_10 = (void*)0; + int *l_11 = &g_4; + int *l_12 = &g_4; + int *l_13 = &g_4; + int *l_14 = &g_4; + int *l_15 = &g_4; + int *l_16 = &g_4; + int *l_17 = (void*)0; + int *l_18 = &g_4; + int l_19 = 0x3809D010L; + int *l_20 = &g_4; + int *l_21 = (void*)0; + int *l_22 = &g_4; + step_hash(1); + (*l_3) = l_2; + step_hash(2); + g_23--; + step_hash(3); + return (*l_16); +} +void csmith_compute_hash(void) +{ + transparent_crc(g_4, "g_4", print_hash_value); + transparent_crc(g_23, "g_23", print_hash_value); +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand51.expect b/src/tests/csmith/rand51.expect new file mode 100644 index 0000000..66cff23 --- /dev/null +++ b/src/tests/csmith/rand51.expect @@ -0,0 +1,12 @@ +...checksum after hashing g_4 : 99F8B879 +...checksum after hashing g_23 : A1F2983E +before stmt(1): checksum = A1F2983E +...checksum after hashing g_4 : FFFFFFFF +...checksum after hashing g_23 : F785B836 +before stmt(2): checksum = F785B836 +...checksum after hashing g_4 : FFFFFFFF +...checksum after hashing g_23 : 4F39DF53 +before stmt(3): checksum = 4F39DF53 +...checksum after hashing g_4 : FFFFFFFF +...checksum after hashing g_23 : 4F39DF53 +checksum = 4f39df53 diff --git a/src/tests/csmith/rand52.c b/src/tests/csmith/rand52.c new file mode 100644 index 0000000..334113d --- /dev/null +++ b/src/tests/csmith/rand52.c @@ -0,0 +1,2707 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static signed char g_8 = 0xDFL; +static int g_38 = 0x3703ACB6L; +static int *g_63 = &g_38; +static int **g_62 = &g_63; +static int g_78 = 0xDFDCBC33L; +static int g_91 = 0L; +static signed char g_106 = 0xCDL; +static int g_112 = 3L; +static short g_124 = 0xA618L; +static signed char g_141 = 0x89L; +static unsigned g_187 = 4294967291UL; +static signed char g_193 = 0xC0L; +static short g_195 = 0xA419L; +static signed char g_269 = 0xA4L; +static unsigned g_291 = 0xCD422BFBL; +static unsigned g_306 = 4294967295UL; +static int g_313 = (-1L); +static int g_447 = 0x37805436L; +static signed char g_450 = 1L; +static unsigned g_461 = 4294967294UL; +static unsigned char g_588 = 0UL; +static unsigned g_646 = 0x29D25AE4L; +static int *g_649 = (void*)0; +static unsigned short g_748 = 0xBA87L; +static int g_847 = (-1L); +static int g_874 = (-1L); +static short g_913 = (-1L); +static int g_924 = 0xDF94836FL; +static short g_949 = 0x546AL; +static int g_975 = 0x3C0BBB50L; +static int g_1000 = 0L; +static unsigned short g_1023 = 1UL; +static int g_1268 = 1L; +static unsigned short g_1272 = 65535UL; +static unsigned short g_1521 = 6UL; +static unsigned g_1588 = 1UL; +static signed char g_1755 = 0xB1L; +static unsigned g_1787 = 5UL; +static unsigned short g_1952 = 0UL; +static int g_2108 = 0xC2AD2BFEL; +static short g_2121 = (-1L); +static int g_2172 = (-9L); +static int g_2177 = 0x4BE1DBD2L; +static unsigned short g_2214 = 0xEA3AL; +static int g_2337 = (-1L); +static int *g_2343 = &g_874; +static unsigned short g_2345 = 0x168BL; +static int *g_2355 = (void*)0; +static int g_2371 = 0L; +static unsigned short g_2526 = 0UL; +static unsigned g_2739 = 0UL; +static signed char g_2756 = (-1L); +static unsigned func_1(void); +static short func_11(unsigned p_12, unsigned p_13); +static unsigned func_14(unsigned p_15, unsigned char p_16, int p_17, int p_18); +static unsigned func_19(signed char p_20, unsigned p_21); +static int func_23(unsigned p_24, int p_25); +static unsigned func_26(short p_27); +static signed char func_30(short p_31, signed char p_32, unsigned p_33, unsigned p_34); +static signed char func_39(int * p_40, int * p_41, int * p_42, int p_43); +static int * func_44(int * p_45, int * p_46, int * p_47, unsigned p_48); +static int * func_49(signed char p_50, int p_51); +static unsigned func_1(void) +{ + unsigned l_2 = 4294967288UL; + int l_3 = (-8L); + int l_2708 = 0xD55D1535L; + unsigned l_2715 = 0x1A45F09DL; + unsigned l_2717 = 4294967295UL; + int *l_2745 = &g_874; + unsigned l_2777 = 0x5F113AC8L; + step_hash(1); + l_3 |= l_2; + step_hash(505); + for (l_2 = 23; (l_2 > 34); l_2 += 1) + { + short l_35 = 0x709BL; + unsigned char l_36 = 0x4EL; + signed char l_2716 = 0x60L; + int l_2735 = 0x9943B0BEL; + int l_2744 = (-1L); + step_hash(461); + for (l_3 = (-16); (l_3 != (-5)); l_3 += 7) + { + int l_22 = (-1L); + unsigned l_1616 = 0xB93E3C53L; + int l_2701 = (-7L); + } + step_hash(503); + if (((((unsigned)(((*g_2343) || func_23(g_461, ((unsigned short)l_2708 << (unsigned short)12))) == (((unsigned)g_112 + (unsigned)((unsigned char)0x58L % (unsigned char)func_23((+((unsigned short)((l_2715 ^ (&l_3 != &l_3)) > l_2716) * (unsigned short)0x927DL)), l_2717))) ^ l_2)) / (unsigned)0x26DC01D5L) & (*g_63)) < g_1952)) + { + short l_2720 = 0L; + int *l_2723 = (void*)0; + unsigned char l_2761 = 252UL; + step_hash(481); + for (g_78 = 0; (g_78 > 19); ++g_78) + { + signed char l_2726 = 0xD3L; + step_hash(466); + (**g_62) = l_2720; + step_hash(479); + for (g_874 = (-3); (g_874 >= (-2)); g_874++) + { + int l_2734 = 0xC950660BL; + step_hash(478); + if (func_26(((-1L) > ((void*)0 == l_2723)))) + { + int **l_2727 = &g_649; + step_hash(471); + (*l_2727) = func_49(((short)(func_23(l_2726, (**g_62)) || g_112) >> (short)g_2345), g_112); + step_hash(472); + (**l_2727) = (*g_63); + } + else + { + unsigned l_2730 = 3UL; + int l_2736 = (-1L); + step_hash(474); + (**g_62) = (g_2526 < 6L); + step_hash(475); + (*g_62) = (*g_62); + step_hash(476); + l_2736 &= (((int)((g_874 || l_2730) < ((((int)func_26((-(unsigned short)func_23(g_748, (*g_63)))) % (int)l_2734) <= func_23(l_2726, (g_874 | g_187))) & l_2716)) % (int)g_124) != l_2735); + step_hash(477); + if ((**g_62)) + continue; + } + } + step_hash(480); + (**g_62) = l_2716; + } + step_hash(500); + if (((*g_2343) != ((int)l_2708 + (int)g_2739))) + { + step_hash(483); + return g_949; + } + else + { + unsigned char l_2753 = 255UL; + int **l_2762 = (void*)0; + int **l_2763 = (void*)0; + int **l_2764 = &g_2343; + step_hash(485); + (*g_2343) = (*g_2343); + step_hash(498); + for (g_447 = 22; (g_447 == 14); g_447 -= 9) + { + int l_2748 = 0xAD84CB3CL; + step_hash(496); + for (g_874 = (-25); (g_874 <= 10); g_874 += 1) + { + step_hash(492); + (*g_62) = (*g_62); + } + step_hash(497); + (*l_2745) = ((unsigned short)(~(l_2748 <= (((&g_2355 == &g_63) < (((short)(&g_649 == (void*)0) - (short)(((unsigned char)(l_2753 >= ((signed char)g_588 << (signed char)0)) - (unsigned char)g_112) && l_2744)) > g_2756)) <= 0xFD2DL))) >> (unsigned short)12); + } + step_hash(499); + (*l_2764) = func_49(l_2716, (((signed char)((short)l_2761 * (short)g_2177) << (signed char)3) < (g_2108 & ((l_2762 != &g_2343) > func_26(g_1787))))); + } + } + else + { + unsigned l_2775 = 8UL; + int **l_2776 = &l_2745; + step_hash(502); + (*l_2776) = func_49((((*g_63) & ((*g_62) != (*g_62))) ^ func_14((((unsigned char)0UL + (unsigned char)0xDAL) > (((unsigned char)((*l_2745) != ((short)g_2172 + (short)((unsigned char)(((unsigned)4294967295UL - (unsigned)(l_2775 && l_2775)) ^ g_588) + (unsigned char)(*l_2745)))) >> (unsigned char)3) ^ (-3L))), g_195, (*l_2745), l_2735)), g_291); + } + step_hash(504); + return l_2735; + } + step_hash(506); + return l_2777; +} +static short func_11(unsigned p_12, unsigned p_13) +{ + int l_2531 = (-9L); + int l_2574 = 0x1C13BC1DL; + int l_2591 = (-2L); + int l_2607 = 0L; + int l_2612 = (-6L); + unsigned l_2629 = 8UL; + unsigned short l_2665 = 0xD46FL; + step_hash(453); + for (g_847 = 0; (g_847 == 13); ++g_847) + { + int **l_2540 = &g_649; + int *l_2545 = &g_78; + int l_2557 = 0x84CF6A0AL; + int l_2565 = 6L; + int l_2585 = (-1L); + int l_2626 = 0x0F6F8F4EL; + step_hash(407); + l_2531 = 0xB593045BL; + step_hash(408); + (*g_2343) = p_12; + step_hash(409); + (*l_2545) &= (65535UL >= ((short)(&g_62 == (void*)0) * (short)((unsigned short)((short)(((short)((&g_2355 != &g_63) < ((l_2540 != (void*)0) > (func_23(l_2531, ((((unsigned short)func_14(((int)p_12 - (int)g_1521), p_12, p_13, l_2531) >> (unsigned short)11) & 0L) && g_1521)) ^ p_12))) - (short)p_12) > g_975) - (short)0xAB24L) * (unsigned short)g_450))); + step_hash(452); + if (p_12) + { + int *l_2546 = &g_447; + int *l_2549 = &g_313; + int *l_2550 = &g_112; + int *l_2551 = &g_2337; + int *l_2552 = (void*)0; + int *l_2553 = &g_38; + int *l_2554 = &g_975; + int *l_2555 = &g_38; + int *l_2556 = (void*)0; + int *l_2558 = (void*)0; + int *l_2559 = &g_38; + int *l_2560 = &g_1268; + int *l_2561 = &g_313; + int *l_2562 = &g_1268; + int *l_2563 = &g_874; + int *l_2564 = &g_38; + int *l_2566 = &g_2337; + int *l_2567 = &g_975; + int *l_2568 = &l_2557; + int *l_2569 = &g_1268; + int *l_2570 = &g_91; + int *l_2571 = &l_2565; + int *l_2572 = &g_38; + int *l_2573 = &l_2531; + int *l_2575 = &g_1268; + int *l_2576 = &g_112; + int *l_2577 = &g_447; + int *l_2578 = &l_2557; + int *l_2579 = &g_112; + int l_2580 = 0x26557C6EL; + int *l_2581 = &g_447; + int *l_2582 = &g_975; + int *l_2583 = (void*)0; + int *l_2584 = &l_2531; + int *l_2586 = &g_112; + int *l_2587 = (void*)0; + int *l_2588 = &g_447; + int *l_2589 = &g_91; + int l_2590 = 0L; + int *l_2592 = (void*)0; + int *l_2593 = &g_91; + int *l_2594 = &l_2580; + int *l_2595 = &l_2531; + int *l_2596 = (void*)0; + int *l_2597 = &l_2531; + int *l_2598 = &l_2580; + int *l_2599 = &g_313; + int *l_2600 = &g_975; + int *l_2601 = &g_447; + int l_2602 = 0xC4258538L; + int *l_2603 = &g_91; + int *l_2604 = &g_112; + int *l_2605 = &g_1268; + int *l_2606 = &g_112; + int *l_2608 = &g_447; + int *l_2609 = &l_2580; + int *l_2610 = &g_447; + int *l_2611 = &l_2607; + int *l_2613 = &g_1268; + int *l_2614 = &g_112; + int l_2615 = 1L; + int *l_2616 = &g_1268; + int *l_2617 = &g_112; + int *l_2618 = &g_38; + int *l_2619 = &g_2371; + int *l_2620 = &g_2371; + int *l_2621 = &g_447; + int *l_2622 = &g_112; + int *l_2623 = &g_91; + int *l_2624 = &l_2585; + int *l_2625 = &g_975; + int *l_2627 = (void*)0; + int l_2628 = 0x40769EE7L; + step_hash(411); + (*l_2546) ^= p_13; + step_hash(412); + (*g_2343) &= p_13; + step_hash(413); + if (p_12) + break; + step_hash(414); + --l_2629; + } + else + { + signed char l_2637 = 1L; + int l_2644 = 2L; + int l_2654 = 1L; + int l_2662 = (-6L); + short l_2680 = (-1L); + int l_2681 = 0x45E7B68FL; + step_hash(421); + for (g_8 = 0; (g_8 < (-16)); g_8 -= 1) + { + unsigned l_2634 = 0x015F55DDL; + step_hash(419); + --l_2634; + step_hash(420); + if (l_2637) + continue; + } + step_hash(427); + if (l_2574) + { + int *l_2638 = &g_2371; + step_hash(423); + l_2638 = &g_975; + } + else + { + step_hash(425); + (*g_2343) = p_12; + step_hash(426); + (*l_2540) = &g_975; + } + step_hash(432); + for (g_2108 = 0; (g_2108 < (-15)); g_2108--) + { + step_hash(431); + return l_2637; + } + step_hash(451); + if ((l_2629 != (!((short)g_1023 + (short)65531UL)))) + { + short l_2643 = 0x5EA8L; + int *l_2645 = &l_2557; + int *l_2646 = &l_2557; + int *l_2647 = &l_2626; + int *l_2648 = &l_2531; + int *l_2649 = &l_2531; + int *l_2650 = &g_874; + int *l_2651 = &g_313; + int *l_2652 = &g_1268; + int *l_2653 = &g_38; + int *l_2655 = &l_2644; + int *l_2656 = &l_2557; + int *l_2657 = &l_2591; + int *l_2658 = &g_313; + int *l_2659 = &g_78; + int *l_2660 = (void*)0; + int *l_2661 = &g_975; + int *l_2663 = &l_2662; + int *l_2664 = &l_2574; + signed char l_2670 = 6L; + int *l_2682 = &l_2662; + int *l_2683 = (void*)0; + int *l_2684 = &g_313; + int *l_2685 = (void*)0; + int *l_2686 = &l_2591; + int *l_2687 = &g_112; + int *l_2688 = &g_2371; + int *l_2689 = &g_1268; + int *l_2690 = &l_2557; + int *l_2691 = &g_975; + int *l_2692 = &l_2626; + int *l_2693 = &g_447; + int *l_2694 = (void*)0; + int *l_2695 = &l_2607; + int *l_2696 = (void*)0; + int *l_2697 = (void*)0; + unsigned short l_2698 = 65532UL; + step_hash(434); + --l_2665; + step_hash(446); + for (l_2565 = 0; (l_2565 < (-13)); --l_2565) + { + unsigned char l_2671 = 0x29L; + int **l_2676 = &g_2355; + step_hash(438); + l_2654 ^= l_2670; + step_hash(439); + l_2671++; + step_hash(445); + for (g_124 = 4; (g_124 < 10); ++g_124) + { + int **l_2677 = &l_2657; + step_hash(443); + (*l_2653) &= ((((l_2676 != (void*)0) <= g_1000) | ((g_450 >= ((void*)0 == l_2677)) != (((unsigned)(&l_2540 != &l_2540) * (unsigned)(p_13 >= l_2607)) < 0x7A4F9116L))) != 65527UL); + step_hash(444); + l_2654 |= (g_78 != 0x78B2L); + } + } + step_hash(447); + l_2698++; + } + else + { + step_hash(449); + if (p_12) + break; + step_hash(450); + return p_13; + } + } + } + step_hash(454); + return p_12; +} +static unsigned func_14(unsigned p_15, unsigned char p_16, int p_17, int p_18) +{ + int *l_2372 = (void*)0; + int *l_2373 = &g_2371; + int *l_2374 = &g_975; + int *l_2375 = (void*)0; + int *l_2376 = &g_2337; + int *l_2377 = &g_78; + int *l_2378 = &g_78; + int *l_2379 = &g_78; + int *l_2380 = &g_2371; + int *l_2381 = (void*)0; + int *l_2382 = (void*)0; + int *l_2383 = &g_874; + int *l_2384 = &g_112; + int *l_2385 = &g_38; + int *l_2386 = &g_2371; + int *l_2387 = &g_1268; + int *l_2388 = &g_313; + int *l_2389 = &g_2337; + int *l_2390 = &g_2371; + int *l_2391 = (void*)0; + int *l_2392 = (void*)0; + int *l_2393 = &g_78; + int *l_2394 = &g_78; + int *l_2395 = &g_874; + int l_2396 = 0xE95978A0L; + int *l_2397 = (void*)0; + int l_2398 = (-3L); + int l_2399 = 0x970480E5L; + int *l_2400 = (void*)0; + int *l_2401 = &g_874; + int *l_2402 = &l_2399; + int *l_2403 = &g_112; + int *l_2404 = (void*)0; + int *l_2405 = &g_447; + int *l_2406 = &g_1268; + int *l_2407 = &g_2337; + int *l_2408 = &l_2398; + int l_2409 = 0x53398A78L; + int *l_2410 = &g_91; + int *l_2411 = &g_1268; + int *l_2412 = &l_2396; + int *l_2413 = &g_91; + int *l_2414 = &g_313; + int *l_2415 = &g_2337; + int *l_2416 = &g_1268; + int *l_2417 = &g_874; + int *l_2418 = &g_112; + int l_2419 = 1L; + int *l_2420 = &g_38; + int *l_2421 = (void*)0; + int *l_2422 = &g_91; + int *l_2423 = &g_874; + int l_2424 = (-10L); + int *l_2425 = &g_38; + int *l_2426 = &g_2337; + int *l_2427 = &g_2337; + int *l_2428 = &g_2337; + int *l_2429 = (void*)0; + int *l_2430 = &g_1268; + int *l_2431 = &g_78; + int *l_2432 = (void*)0; + int l_2433 = 0x50EDE960L; + int *l_2434 = &g_447; + int *l_2435 = &l_2398; + int *l_2436 = &l_2398; + int *l_2437 = &g_112; + int *l_2438 = &g_313; + int l_2439 = 0x10FDBCCBL; + int *l_2440 = (void*)0; + int *l_2441 = &l_2439; + int l_2442 = 1L; + int *l_2443 = &l_2419; + int *l_2444 = &l_2399; + int *l_2445 = &l_2409; + int l_2446 = 0xE47385B4L; + int l_2447 = 0x7AE64C24L; + int *l_2448 = &g_78; + int *l_2449 = (void*)0; + int *l_2450 = &g_975; + int *l_2451 = &l_2419; + int l_2452 = (-1L); + int *l_2453 = (void*)0; + int *l_2454 = &l_2399; + int *l_2455 = &l_2439; + int *l_2456 = &l_2446; + int *l_2457 = &g_1268; + int *l_2458 = &l_2398; + int *l_2459 = &l_2409; + int *l_2460 = (void*)0; + int *l_2461 = &l_2447; + int *l_2462 = &l_2398; + int *l_2463 = &g_975; + int *l_2464 = &g_975; + int *l_2465 = &l_2439; + int *l_2466 = &l_2398; + int *l_2467 = &l_2452; + int *l_2468 = &g_1268; + int *l_2469 = &g_975; + int *l_2470 = (void*)0; + int l_2471 = 0L; + int *l_2472 = &g_2337; + int *l_2473 = &g_447; + int *l_2474 = (void*)0; + int *l_2475 = &g_38; + int *l_2476 = &l_2446; + int *l_2477 = &l_2471; + int *l_2478 = &l_2396; + int *l_2479 = &g_78; + int *l_2480 = (void*)0; + int *l_2481 = (void*)0; + int *l_2482 = &g_112; + int *l_2483 = &g_112; + int l_2484 = (-6L); + int *l_2485 = &l_2398; + int *l_2486 = &l_2442; + int *l_2487 = &g_38; + int l_2488 = 0x943C57C5L; + int *l_2489 = &l_2399; + int *l_2490 = (void*)0; + int *l_2491 = &l_2409; + int *l_2492 = &g_78; + int *l_2493 = &l_2433; + int *l_2494 = &g_2337; + int *l_2495 = &g_975; + int *l_2496 = &g_874; + int *l_2497 = &l_2471; + int l_2498 = 6L; + int l_2499 = (-6L); + int *l_2500 = &g_1268; + int *l_2501 = &l_2419; + int *l_2502 = (void*)0; + int l_2503 = 0xFC73E23FL; + int *l_2504 = (void*)0; + int *l_2505 = (void*)0; + int *l_2506 = &g_1268; + int *l_2507 = (void*)0; + int *l_2508 = &l_2452; + int *l_2509 = &l_2398; + int *l_2510 = &g_2337; + int l_2511 = (-1L); + int *l_2512 = &g_2337; + int l_2513 = 0x379CEAE6L; + int *l_2514 = (void*)0; + int *l_2515 = &l_2439; + int l_2516 = 0x6507C12CL; + int *l_2517 = (void*)0; + int *l_2518 = (void*)0; + int *l_2519 = &g_313; + int *l_2520 = (void*)0; + int *l_2521 = (void*)0; + int *l_2522 = &l_2511; + int *l_2523 = &g_447; + int *l_2524 = &g_78; + int *l_2525 = &g_2371; + step_hash(400); + (*g_2343) = p_16; + step_hash(401); + g_2526++; + step_hash(402); + return g_588; +} +static unsigned func_19(signed char p_20, unsigned p_21) +{ + short l_1785 = 0x6DD0L; + int l_1786 = 0x4CF5C13EL; + int l_1828 = 0L; + int l_1914 = 8L; + int **l_1960 = (void*)0; + int l_2015 = 0xF9B41EA6L; + int l_2027 = 1L; + int l_2044 = 0x9DF30B3FL; + int l_2073 = 0xED7A27C3L; + int l_2103 = 0xBBE9C045L; + int l_2132 = 0x9C83C5FBL; + int l_2152 = 0x446C5D5BL; + int l_2164 = (-1L); + int l_2195 = 0xA80F20C7L; + int *l_2246 = &g_112; + unsigned short l_2314 = 1UL; + step_hash(326); + g_1787 ^= ((short)(((unsigned)g_193 + (unsigned)(((-(signed char)(((((signed char)g_913 - (signed char)((signed char)func_26(g_193) + (signed char)((((!p_21) != p_20) != g_313) && g_291))) || ((((unsigned short)((unsigned char)(((void*)0 == &g_62) | 4294967295UL) >> (unsigned char)g_313) * (unsigned short)1L) <= 0xA6L) & l_1785)) ^ p_20) == l_1785)) | l_1786) | g_1272)) != p_20) % (short)l_1786); + step_hash(327); + g_1268 |= l_1785; + step_hash(328); + g_112 &= ((((!(l_1785 | 247UL)) | p_21) <= (((g_193 <= 0xF1L) != l_1786) | g_1268)) >= 0L); + step_hash(397); + if ((((unsigned short)g_461 << (unsigned short)((short)p_21 % (short)(0x77DAL || (p_20 < 1L)))) != (g_269 | l_1785))) + { + int *l_1794 = &g_38; + int l_1798 = (-9L); + int l_1838 = 0L; + int l_1840 = 0xCEF7006BL; + int l_1854 = 0xF2F2D123L; + int l_1908 = 0x5C40A123L; + int l_1916 = 0L; + int l_1920 = (-8L); + int l_1929 = 0xFDFA5658L; + int l_1943 = 1L; + signed char l_2034 = 0xF1L; + step_hash(351); + if (p_20) + { + int l_1795 = 0xF06A783AL; + int *l_1796 = &g_874; + int *l_1797 = &g_874; + int *l_1799 = &g_313; + int *l_1800 = &l_1798; + int *l_1801 = &g_874; + int *l_1802 = &g_313; + int *l_1803 = &g_975; + int *l_1804 = (void*)0; + int *l_1805 = &g_975; + int *l_1806 = &g_38; + int *l_1807 = (void*)0; + int *l_1808 = &g_1268; + int *l_1809 = &g_91; + int *l_1810 = &l_1798; + int *l_1811 = (void*)0; + int *l_1812 = &g_1268; + int *l_1813 = &g_1268; + int *l_1814 = (void*)0; + int *l_1815 = (void*)0; + int *l_1816 = &g_1268; + int *l_1817 = &g_112; + int *l_1818 = (void*)0; + int *l_1819 = &g_112; + int *l_1820 = &g_78; + int *l_1821 = &g_874; + int *l_1822 = &g_112; + int *l_1823 = &g_975; + int *l_1824 = &g_874; + int *l_1825 = &l_1798; + int *l_1826 = &g_1268; + int *l_1827 = &g_38; + int *l_1829 = &g_447; + int *l_1830 = &g_313; + int *l_1831 = &l_1798; + int *l_1832 = &g_78; + int *l_1833 = &g_91; + int *l_1834 = &g_1268; + int *l_1835 = &l_1828; + int *l_1836 = &g_78; + int *l_1837 = &g_91; + int *l_1839 = &g_874; + int *l_1841 = &g_112; + int *l_1842 = &g_78; + int *l_1843 = &l_1786; + int *l_1844 = &g_112; + int *l_1845 = &g_112; + int l_1846 = (-1L); + int *l_1847 = &g_91; + int *l_1848 = &l_1846; + int *l_1849 = &l_1846; + int *l_1850 = &g_78; + int *l_1851 = &g_112; + int *l_1852 = (void*)0; + int *l_1853 = &g_1268; + int *l_1855 = &g_1268; + int *l_1856 = &g_38; + int *l_1857 = &g_78; + int *l_1858 = (void*)0; + int *l_1859 = &g_91; + int *l_1860 = &l_1786; + int *l_1861 = &g_1268; + int l_1862 = 0xEB1CF757L; + int *l_1863 = (void*)0; + int *l_1864 = (void*)0; + int *l_1865 = &l_1798; + int *l_1866 = &l_1838; + int *l_1867 = (void*)0; + int *l_1868 = &l_1854; + int *l_1869 = &g_313; + int *l_1870 = &g_447; + int *l_1871 = &l_1838; + int *l_1872 = &g_112; + int *l_1873 = &l_1798; + int *l_1874 = &l_1838; + int *l_1875 = &g_313; + int *l_1876 = (void*)0; + int *l_1877 = &g_112; + int *l_1878 = &g_91; + int *l_1879 = &g_112; + int *l_1880 = (void*)0; + int *l_1881 = (void*)0; + int *l_1882 = &g_112; + int *l_1883 = &g_112; + int *l_1884 = &l_1862; + int *l_1885 = (void*)0; + int *l_1886 = &l_1840; + int *l_1887 = &g_975; + int *l_1888 = &l_1846; + int *l_1889 = &l_1838; + int *l_1890 = &g_447; + int *l_1891 = &g_112; + int *l_1892 = &g_91; + int *l_1893 = &l_1854; + int *l_1894 = &g_313; + int *l_1895 = &g_1268; + int *l_1896 = &l_1798; + int *l_1897 = (void*)0; + int *l_1898 = &g_1268; + int *l_1899 = (void*)0; + int *l_1900 = &l_1846; + int *l_1901 = &g_38; + int *l_1902 = &g_447; + int *l_1903 = &g_112; + int *l_1904 = &g_1268; + int *l_1905 = &l_1862; + int *l_1906 = (void*)0; + int *l_1907 = &l_1798; + int *l_1909 = &l_1846; + int *l_1910 = &g_874; + int *l_1911 = (void*)0; + int *l_1912 = &g_313; + int *l_1913 = &l_1840; + int *l_1915 = (void*)0; + int *l_1917 = &l_1838; + int *l_1918 = &l_1914; + int *l_1919 = &g_975; + int *l_1921 = &l_1828; + int *l_1922 = &l_1914; + int *l_1923 = &l_1862; + int *l_1924 = &g_78; + int *l_1925 = &g_874; + int *l_1926 = &g_1268; + int l_1927 = (-1L); + int *l_1928 = &g_447; + int *l_1930 = &g_91; + int *l_1931 = (void*)0; + int *l_1932 = &l_1914; + int *l_1933 = &g_313; + int *l_1934 = &l_1927; + int *l_1935 = &l_1840; + int *l_1936 = &l_1914; + int *l_1937 = &l_1914; + int *l_1938 = &g_91; + int *l_1939 = &l_1798; + int *l_1940 = (void*)0; + int *l_1941 = (void*)0; + int *l_1942 = &l_1920; + int *l_1944 = &l_1914; + int *l_1945 = &l_1854; + int *l_1946 = (void*)0; + int *l_1947 = &g_78; + int *l_1948 = &g_38; + int *l_1949 = &g_91; + int *l_1950 = &g_313; + int *l_1951 = &l_1854; + step_hash(331); + (*g_62) = l_1794; + step_hash(332); + g_1952--; + step_hash(333); + return l_1914; + } + else + { + unsigned l_1959 = 4294967295UL; + int l_2005 = 0x164F9F2EL; + int l_2028 = (-1L); + int l_2154 = 0x45401014L; + int l_2175 = 7L; + int l_2188 = 0L; + step_hash(341); + if (((short)((int)p_21 + (int)(~((((p_20 || 0x0FF2L) ^ l_1959) > (l_1960 == l_1960)) < (((unsigned char)(0xD69EL && (((signed char)((int)p_20 / (int)(((void*)0 == &g_63) & (-1L))) / (signed char)g_195) <= g_447)) << (unsigned char)0) <= (*l_1794))))) - (short)g_748)) + { + step_hash(336); + (*l_1794) = ((unsigned short)65530UL - (unsigned short)l_1959); + step_hash(337); + (*g_62) = (void*)0; + } + else + { + int *l_1969 = &g_1268; + int *l_1970 = &g_975; + int *l_1971 = (void*)0; + int *l_1972 = (void*)0; + int *l_1973 = &g_447; + int *l_1974 = &l_1798; + int *l_1975 = &l_1798; + int *l_1976 = &l_1943; + int *l_1977 = &l_1920; + int *l_1978 = &g_1268; + int *l_1979 = &l_1908; + int *l_1980 = &l_1908; + int *l_1981 = (void*)0; + int *l_1982 = &g_874; + int l_1983 = 0xECAE33FAL; + int *l_1984 = &l_1920; + int *l_1985 = &l_1983; + int *l_1986 = &l_1828; + int *l_1987 = &g_112; + int *l_1988 = (void*)0; + int *l_1989 = (void*)0; + int *l_1990 = &l_1929; + int *l_1991 = &l_1914; + int *l_1992 = (void*)0; + int *l_1993 = &g_447; + int *l_1994 = &g_1268; + int *l_1995 = &g_313; + int *l_1996 = &l_1840; + int *l_1997 = &g_447; + int *l_1998 = &l_1929; + int *l_1999 = &g_91; + int *l_2000 = &l_1914; + int *l_2001 = &g_112; + int *l_2002 = &g_78; + int l_2003 = 7L; + int *l_2004 = (void*)0; + int *l_2006 = &g_91; + int *l_2007 = &g_874; + int *l_2008 = (void*)0; + int *l_2009 = &l_1916; + int *l_2010 = (void*)0; + int *l_2011 = &l_1983; + int *l_2012 = &l_1914; + int *l_2013 = (void*)0; + int *l_2014 = &g_91; + int *l_2016 = &l_1929; + int *l_2017 = &l_2005; + int *l_2018 = (void*)0; + int *l_2019 = &l_1838; + int *l_2020 = &g_112; + int *l_2021 = &l_1798; + int *l_2022 = &l_2003; + int *l_2023 = &l_2015; + int *l_2024 = &g_447; + int *l_2025 = &g_1268; + int *l_2026 = &g_1268; + int *l_2029 = (void*)0; + int *l_2030 = &l_2028; + int *l_2031 = &l_1840; + int *l_2032 = &g_1268; + int *l_2033 = &g_91; + int *l_2035 = &l_1943; + int *l_2036 = &l_2027; + int *l_2037 = &l_2027; + int *l_2038 = &g_313; + int *l_2039 = &g_78; + int *l_2040 = &g_313; + int *l_2041 = &g_112; + int *l_2042 = &l_1854; + int *l_2043 = &l_1838; + int *l_2045 = &l_1908; + int *l_2046 = &l_1828; + int *l_2047 = (void*)0; + int *l_2048 = &g_91; + int *l_2049 = &l_2044; + int *l_2050 = (void*)0; + int *l_2051 = (void*)0; + int *l_2052 = &l_2044; + int *l_2053 = (void*)0; + int *l_2054 = (void*)0; + int *l_2055 = &l_1908; + int *l_2056 = &l_1908; + int *l_2057 = (void*)0; + int *l_2058 = &l_1838; + int *l_2059 = &g_975; + int *l_2060 = &l_1840; + int *l_2061 = &l_1929; + int *l_2062 = (void*)0; + int *l_2063 = &g_78; + int *l_2064 = &l_2015; + int *l_2065 = &g_91; + int *l_2066 = (void*)0; + int *l_2067 = &l_1828; + int *l_2068 = &l_1983; + int *l_2069 = &g_112; + int *l_2070 = &l_2005; + int *l_2071 = &l_2044; + int *l_2072 = &g_1268; + int l_2074 = 0x6BC4AC65L; + int l_2075 = 0xE5E40892L; + int *l_2076 = &l_1916; + int *l_2077 = (void*)0; + int *l_2078 = &l_1828; + int *l_2079 = &l_1920; + int l_2080 = (-1L); + int *l_2081 = (void*)0; + int *l_2082 = (void*)0; + int *l_2083 = &l_2073; + int *l_2084 = (void*)0; + int *l_2085 = &l_1929; + int *l_2086 = &g_38; + int *l_2087 = &l_1798; + int *l_2088 = &g_91; + int *l_2089 = &l_1920; + int *l_2090 = &l_2027; + int *l_2091 = &g_975; + int *l_2092 = &l_1916; + int *l_2093 = &g_38; + int *l_2094 = (void*)0; + int *l_2095 = &l_2015; + int *l_2096 = (void*)0; + int *l_2097 = &l_2080; + int *l_2098 = &l_1916; + int *l_2099 = &l_1929; + int *l_2100 = &l_1916; + int *l_2101 = &l_1828; + int *l_2102 = &l_2028; + int *l_2104 = &l_1983; + int *l_2105 = &g_91; + int *l_2106 = &l_2015; + int *l_2107 = &l_2075; + int *l_2109 = &g_91; + int *l_2110 = &l_1908; + int *l_2111 = &l_2015; + int *l_2112 = &g_1268; + int *l_2113 = (void*)0; + int *l_2114 = &g_874; + int *l_2115 = &l_2074; + int *l_2116 = &l_2080; + int *l_2117 = (void*)0; + int *l_2118 = &l_2075; + int *l_2119 = &l_1914; + int *l_2120 = &l_1908; + int *l_2122 = &l_1908; + int *l_2123 = &l_2003; + int l_2124 = 0x44449917L; + int *l_2125 = (void*)0; + int *l_2126 = (void*)0; + int *l_2127 = (void*)0; + int *l_2128 = &g_38; + int *l_2129 = (void*)0; + int *l_2130 = (void*)0; + int *l_2131 = &l_1798; + int *l_2133 = &l_2044; + int *l_2134 = &l_1916; + int *l_2135 = (void*)0; + int *l_2136 = &l_1854; + int *l_2137 = &l_2003; + int *l_2138 = &l_1798; + int *l_2139 = (void*)0; + int *l_2140 = &l_1854; + int *l_2141 = (void*)0; + int *l_2142 = &l_1838; + int *l_2143 = &l_1929; + int l_2144 = 0x351472BAL; + int *l_2145 = &l_1840; + int *l_2146 = (void*)0; + int *l_2147 = &l_1828; + int *l_2148 = (void*)0; + int *l_2149 = &l_1828; + int *l_2150 = &l_1920; + int *l_2151 = &g_78; + int *l_2153 = (void*)0; + int *l_2155 = &g_975; + int *l_2156 = &g_447; + int *l_2157 = &l_1914; + int *l_2158 = &l_1828; + int *l_2159 = &l_2027; + int *l_2160 = &l_1798; + int *l_2161 = (void*)0; + int *l_2162 = &l_1798; + int *l_2163 = (void*)0; + int *l_2165 = &l_1914; + int *l_2166 = &g_112; + int *l_2167 = &g_447; + int *l_2168 = (void*)0; + int *l_2169 = (void*)0; + int *l_2170 = &l_1916; + int *l_2171 = &l_2074; + int *l_2173 = &l_1840; + int *l_2174 = &l_2073; + int l_2176 = 0xCD97870BL; + int *l_2178 = &l_1854; + int l_2179 = 0x28C26E92L; + int *l_2180 = (void*)0; + int *l_2181 = &l_2176; + int *l_2182 = &g_1268; + int *l_2183 = &g_975; + int *l_2184 = &l_1914; + int *l_2185 = &l_2154; + int *l_2186 = &l_1929; + int l_2187 = 0L; + int *l_2189 = &l_2075; + int *l_2190 = &l_2152; + int *l_2191 = &g_38; + int *l_2192 = &l_1983; + int *l_2193 = &l_2176; + int *l_2194 = &l_2144; + int *l_2196 = &l_2152; + int *l_2197 = (void*)0; + int *l_2198 = &l_2027; + int *l_2199 = &l_2188; + int *l_2200 = &g_78; + int *l_2201 = &l_1854; + int *l_2202 = &l_1786; + int *l_2203 = &g_313; + int *l_2204 = &l_1983; + int *l_2205 = &l_2195; + int *l_2206 = &g_313; + int *l_2207 = &l_1854; + int *l_2208 = &g_975; + int *l_2209 = &g_874; + int *l_2210 = &l_1916; + int *l_2211 = &l_2044; + int *l_2212 = (void*)0; + int l_2213 = (-1L); + step_hash(339); + g_2214++; + step_hash(340); + return p_21; + } + step_hash(342); + (*g_62) = (void*)0; + step_hash(349); + if ((((func_26((p_21 >= 0xD5F3L)) > 6UL) > (p_21 & ((unsigned short)((unsigned short)g_106 / (unsigned short)g_187) << (unsigned short)6))) > ((unsigned char)((((p_21 < (+((g_1023 ^ g_141) <= g_913))) > g_1952) <= p_20) || (-4L)) * (unsigned char)0xCBL))) + { + int **l_2227 = &g_63; + step_hash(344); + l_2154 |= (((short)((unsigned char)(l_2227 == l_1960) * (unsigned char)l_2005) * (short)((unsigned)((void*)0 == &g_63) - (unsigned)p_21)) && ((*l_2227) == (void*)0)); + step_hash(345); + (*l_1794) &= p_20; + } + else + { + step_hash(347); + (*l_1794) ^= 0xE4E887A4L; + step_hash(348); + (*g_62) = l_2246; + } + step_hash(350); + (*l_2246) = (*l_1794); + } + step_hash(352); + (*l_1794) |= ((unsigned char)(&g_63 != &g_649) << (unsigned char)1); + } + else + { + unsigned char l_2249 = 255UL; + int *l_2250 = &g_975; + int l_2266 = 0x1E63A185L; + int l_2291 = (-8L); + int ***l_2326 = &g_62; + int l_2346 = (-6L); + step_hash(396); + if (l_2249) + { + step_hash(355); + (*g_62) = l_2250; + step_hash(356); + return g_306; + } + else + { + unsigned l_2251 = 0x57F1481FL; + int *l_2339 = &g_78; + step_hash(393); + if (l_2251) + { + unsigned short l_2254 = 0xB6DCL; + int l_2255 = 8L; + step_hash(359); + l_2255 = ((g_2177 == 0x43L) | ((unsigned short)l_2254 >> (unsigned short)11)); + step_hash(373); + for (l_2027 = 20; (l_2027 <= (-27)); l_2027 -= 7) + { + int *l_2319 = &l_2255; + step_hash(363); + (*g_62) = &l_2255; + step_hash(371); + for (l_2254 = 9; (l_2254 != 24); ++l_2254) + { + signed char l_2260 = 0x10L; + int *l_2261 = &l_2073; + int *l_2262 = (void*)0; + int *l_2263 = &g_38; + int *l_2264 = &l_2164; + int *l_2265 = &g_112; + int *l_2267 = &l_2132; + int *l_2268 = (void*)0; + int *l_2269 = &g_78; + int *l_2270 = &g_91; + int *l_2271 = &l_2195; + int *l_2272 = &l_2164; + int *l_2273 = &l_2152; + int *l_2274 = &g_78; + int *l_2275 = &g_874; + int *l_2276 = &l_2073; + int *l_2277 = &g_874; + int *l_2278 = &l_2073; + int *l_2279 = &l_2195; + int *l_2280 = &l_2164; + int *l_2281 = &g_313; + int *l_2282 = &l_1914; + int *l_2283 = (void*)0; + int *l_2284 = (void*)0; + int *l_2285 = &l_2152; + int *l_2286 = &g_78; + int *l_2287 = &l_2266; + int *l_2288 = &l_2152; + int *l_2289 = &l_2195; + int *l_2290 = (void*)0; + int *l_2292 = &g_313; + int *l_2293 = &g_91; + int *l_2294 = &g_313; + int l_2295 = 0L; + int *l_2296 = (void*)0; + int *l_2297 = &g_91; + int *l_2298 = &l_2015; + int *l_2299 = &l_2164; + int *l_2300 = &g_91; + int *l_2301 = (void*)0; + int *l_2302 = &l_2015; + int *l_2303 = &g_112; + int *l_2304 = &l_2015; + int *l_2305 = &g_1268; + int *l_2306 = &l_2073; + int *l_2307 = &g_447; + int *l_2308 = &l_2164; + int *l_2309 = &g_975; + int *l_2310 = &g_112; + int *l_2311 = &l_2044; + int *l_2312 = (void*)0; + int *l_2313 = &g_874; + step_hash(367); + --l_2314; + step_hash(368); + (*l_2279) = (*l_2274); + step_hash(369); + (*l_2304) = ((int)p_20 / (int)(g_949 || ((l_2319 != (void*)0) | func_26(g_1952)))); + step_hash(370); + (*g_62) = &l_2295; + } + step_hash(372); + return g_112; + } + step_hash(374); + (*l_2246) = p_20; + step_hash(375); + (*l_2246) = ((-1L) != g_1588); + } + else + { + int **l_2338 = &g_649; + unsigned short l_2344 = 0xFCB5L; + step_hash(392); + if (l_2251) + { + int *l_2342 = (void*)0; + step_hash(378); + (*l_2339) |= (((p_20 && g_269) < 0x891BL) <= l_2344); + step_hash(379); + (*g_2343) &= 8L; + step_hash(380); + (*l_2339) = ((*l_2339) || g_1787); + step_hash(387); + if ((((*l_2339) <= 0x067AF8A0L) < ((g_2345 ^ (l_2338 == (void*)0)) && (*l_2339)))) + { + int **l_2347 = &g_2343; + step_hash(382); + (*l_2338) = (void*)0; + step_hash(383); + (*g_2343) = l_2346; + step_hash(384); + (*l_2250) = (l_2347 == &g_2343); + } + else + { + signed char l_2350 = 0L; + step_hash(386); + (*g_2343) = ((unsigned short)(l_2350 == (g_112 <= ((func_23(p_20, ((unsigned short)0x23FDL * (unsigned short)(&g_62 != (void*)0))) == p_20) <= ((short)(p_21 <= 5L) * (short)0L)))) << (unsigned short)2); + } + } + else + { + signed char l_2366 = 0x6DL; + step_hash(389); + (*l_2246) ^= (*l_2339); + step_hash(390); + (*l_2246) &= ((signed char)((signed char)((int)func_26(p_20) + (int)p_21) << (signed char)((short)(g_193 == ((signed char)g_447 + (signed char)func_23(p_20, (0xB8L != (g_2214 > 0UL))))) - (short)1L)) << (signed char)g_874); + step_hash(391); + (*l_2246) &= p_21; + } + } + step_hash(394); + (*g_2343) = ((unsigned)0xF3EAABB4L / (unsigned)p_21); + step_hash(395); + return g_447; + } + } + step_hash(398); + return g_193; +} +static int func_23(unsigned p_24, int p_25) +{ + int *l_1696 = (void*)0; + int *l_1697 = (void*)0; + int *l_1698 = &g_38; + int *l_1699 = &g_78; + int *l_1700 = (void*)0; + int *l_1701 = &g_874; + int *l_1702 = &g_78; + int *l_1703 = (void*)0; + int *l_1704 = &g_112; + int *l_1705 = &g_874; + int l_1706 = 1L; + int *l_1707 = (void*)0; + int *l_1708 = &g_874; + int l_1709 = 0x2225CEEFL; + int *l_1710 = &l_1706; + int *l_1711 = &g_313; + int *l_1712 = &g_975; + int *l_1713 = &g_112; + int *l_1714 = (void*)0; + int l_1715 = (-1L); + int *l_1716 = &g_874; + int *l_1717 = &g_447; + int l_1718 = 0x72AE58BEL; + int *l_1719 = &g_91; + int *l_1720 = &g_313; + int *l_1721 = &l_1718; + int *l_1722 = &l_1709; + int *l_1723 = &g_1268; + int l_1724 = 0xCFFCECFFL; + int *l_1725 = (void*)0; + int *l_1726 = &g_874; + int *l_1727 = &g_112; + int l_1728 = 1L; + int *l_1729 = (void*)0; + int *l_1730 = &g_874; + int *l_1731 = (void*)0; + int *l_1732 = &l_1724; + int *l_1733 = &l_1728; + int l_1734 = 0x90AD4A59L; + int *l_1735 = &l_1734; + int *l_1736 = &l_1706; + int *l_1737 = &g_313; + int *l_1738 = &g_975; + int *l_1739 = &g_112; + int *l_1740 = (void*)0; + int *l_1741 = &l_1715; + int *l_1742 = &g_78; + int *l_1743 = (void*)0; + int *l_1744 = &g_1268; + int *l_1745 = (void*)0; + int *l_1746 = &g_38; + int l_1747 = 1L; + int *l_1748 = &g_78; + int *l_1749 = &l_1706; + int *l_1750 = &g_874; + int l_1751 = 1L; + int *l_1752 = &l_1728; + int l_1753 = (-1L); + int *l_1754 = (void*)0; + int *l_1756 = &l_1747; + int l_1757 = (-7L); + int *l_1758 = &l_1747; + int *l_1759 = &g_78; + int *l_1760 = &l_1753; + int *l_1761 = &g_447; + int *l_1762 = &g_91; + int l_1763 = 0xECA5873BL; + int *l_1764 = (void*)0; + int *l_1765 = &l_1724; + int *l_1766 = &l_1724; + int *l_1767 = (void*)0; + unsigned char l_1768 = 0x6DL; + int l_1771 = (-8L); + step_hash(323); + ++l_1768; + step_hash(324); + return l_1771; +} +static unsigned func_26(short p_27) +{ + int *l_1617 = &g_447; + int *l_1618 = &g_38; + int *l_1619 = &g_91; + int l_1620 = 0x34B0ED82L; + int *l_1621 = &g_313; + int *l_1622 = &l_1620; + int *l_1623 = &g_874; + int l_1624 = 0x35B31D0AL; + int *l_1625 = (void*)0; + int *l_1626 = &g_447; + int *l_1627 = &g_38; + int *l_1628 = &g_313; + int *l_1629 = (void*)0; + int *l_1630 = &g_112; + int l_1631 = (-5L); + int *l_1632 = &g_447; + int *l_1633 = &g_38; + int *l_1634 = &g_975; + int *l_1635 = &l_1624; + int *l_1636 = &l_1631; + int *l_1637 = (void*)0; + int *l_1638 = &g_38; + int *l_1639 = &g_447; + int *l_1640 = &g_91; + int *l_1641 = &g_38; + int *l_1642 = &g_1268; + int *l_1643 = &g_447; + int *l_1644 = &g_78; + int *l_1645 = &g_975; + int *l_1646 = (void*)0; + int *l_1647 = &g_38; + int *l_1648 = &l_1631; + int *l_1649 = &g_38; + int *l_1650 = &g_1268; + int *l_1651 = (void*)0; + int *l_1652 = (void*)0; + int l_1653 = 0xC50A1FC0L; + int l_1654 = 0x899786E7L; + int l_1655 = 5L; + int *l_1656 = &l_1655; + int *l_1657 = &g_91; + int *l_1658 = &g_1268; + int *l_1659 = &l_1624; + int *l_1660 = &g_447; + int *l_1661 = (void*)0; + int *l_1662 = (void*)0; + int *l_1663 = (void*)0; + int l_1664 = 7L; + int *l_1665 = &g_874; + int *l_1666 = &l_1654; + int l_1667 = 0x0AC199CFL; + int *l_1668 = &l_1664; + int *l_1669 = &g_91; + int *l_1670 = &l_1667; + int l_1671 = 1L; + int *l_1672 = &g_78; + int *l_1673 = &g_874; + int *l_1674 = &g_313; + int *l_1675 = &l_1654; + int *l_1676 = (void*)0; + int *l_1677 = &g_91; + int *l_1678 = (void*)0; + int *l_1679 = &g_447; + int *l_1680 = &l_1620; + int *l_1681 = (void*)0; + int *l_1682 = &g_874; + int l_1683 = 0xF5A689DBL; + int *l_1684 = &g_112; + int *l_1685 = &g_91; + int *l_1686 = (void*)0; + int l_1687 = 0L; + int *l_1688 = &l_1653; + int *l_1689 = &l_1624; + int l_1690 = (-2L); + int *l_1691 = &g_38; + int *l_1692 = &l_1655; + unsigned l_1693 = 0x6014BBEBL; + step_hash(319); + l_1617 = l_1617; + step_hash(320); + l_1693--; + step_hash(321); + return p_27; +} +static signed char func_30(short p_31, signed char p_32, unsigned p_33, unsigned p_34) +{ + int *l_37 = &g_38; + int *l_312 = &g_313; + short l_324 = (-9L); + int l_377 = 0x1FB11325L; + int l_435 = 0xFD5C622FL; + unsigned l_464 = 4294967287UL; + short l_477 = 1L; + signed char l_507 = 8L; + int l_738 = 4L; + int l_820 = 0x95F14F36L; + int l_838 = 0x6F619C15L; + int l_863 = 0xBD58EF1EL; + int l_869 = 5L; + int l_892 = 0xC601C56FL; + int l_939 = 0L; + int l_946 = 0x7D5EA36CL; + int l_1004 = 2L; + int ***l_1034 = &g_62; + unsigned l_1040 = 0xFF05AF4FL; + step_hash(9); + (*l_37) = 0xCCCAEA0AL; + step_hash(118); + (*l_312) &= (0x2737AE9FL > ((func_39(func_44(l_37, l_37, func_49(g_8, p_34), ((l_37 != (void*)0) != ((unsigned)((0xC3L ^ p_32) | 0x16L) + (unsigned)g_8))), g_63, g_63, p_34) < g_269) < g_8)); + step_hash(316); + if (((unsigned)p_33 % (unsigned)p_34)) + { + int *l_318 = &g_78; + int l_335 = 0xA393618BL; + int l_336 = 0x4594A1EEL; + int l_346 = 7L; + int l_390 = (-6L); + int l_451 = 1L; + int ***l_472 = &g_62; + step_hash(152); + for (p_32 = 0; (p_32 >= (-13)); --p_32) + { + int *l_323 = (void*)0; + unsigned l_329 = 0x3A785BCAL; + int l_350 = 1L; + unsigned l_481 = 0x93085737L; + step_hash(123); + (*g_62) = l_318; + step_hash(124); + (*l_37) = (-3L); + step_hash(151); + if (((short)(0x62001A86L && ((signed char)p_34 >> (signed char)(g_38 < ((short)(p_34 < ((signed char)p_33 + (signed char)g_8)) >> (short)8)))) - (short)l_329)) + { + unsigned l_334 = 4294967295UL; + int l_371 = 0xDAA66EDBL; + int l_402 = 0x24A4F3CDL; + int l_407 = 1L; + step_hash(126); + (*g_62) = (void*)0; + step_hash(142); + if (((((unsigned char)255UL * (unsigned char)g_8) != (((+(g_306 <= l_329)) | ((signed char)(*l_318) * (signed char)g_187)) && ((g_195 >= l_334) < p_33))) < p_31)) + { + int *l_337 = &g_91; + int *l_338 = &g_78; + int *l_339 = &g_38; + int *l_340 = &l_335; + int *l_341 = &g_78; + int *l_342 = (void*)0; + int *l_343 = &g_112; + int *l_344 = &g_91; + int *l_345 = &g_91; + int *l_347 = (void*)0; + int *l_348 = &g_91; + int *l_349 = &l_336; + int *l_351 = &l_335; + int *l_352 = &g_313; + int *l_353 = &l_335; + int *l_354 = &g_112; + int *l_355 = &l_350; + int *l_356 = &g_313; + int *l_357 = &l_350; + int *l_358 = &g_313; + int *l_359 = &g_78; + int *l_360 = &g_38; + int *l_361 = &g_38; + int *l_362 = &l_346; + int *l_363 = &l_335; + int *l_364 = &g_91; + int *l_365 = &g_112; + int *l_366 = &g_38; + int *l_367 = (void*)0; + int *l_368 = (void*)0; + int *l_369 = &l_336; + int *l_370 = (void*)0; + int *l_372 = &l_350; + int *l_373 = &g_112; + int *l_374 = &g_91; + int *l_375 = &l_350; + int *l_376 = &g_78; + int *l_378 = &g_313; + int *l_379 = (void*)0; + int *l_380 = &l_336; + int *l_381 = &g_91; + int *l_382 = &l_336; + int *l_383 = &g_112; + int *l_384 = (void*)0; + int *l_385 = &g_38; + int *l_386 = (void*)0; + int *l_387 = &l_371; + int *l_388 = &g_112; + int *l_389 = &l_371; + int *l_391 = &g_91; + int *l_392 = &l_390; + int *l_393 = (void*)0; + int *l_394 = &g_38; + int *l_395 = &g_91; + int *l_396 = &g_112; + int *l_397 = &l_377; + int *l_398 = &g_38; + int *l_399 = &l_335; + int *l_400 = &g_313; + int *l_401 = &g_313; + int *l_403 = &l_336; + int *l_404 = (void*)0; + int *l_405 = &l_346; + int *l_406 = &g_313; + int *l_408 = (void*)0; + int *l_409 = &l_335; + int *l_410 = &g_38; + int *l_411 = &l_336; + int *l_412 = &l_336; + int *l_413 = (void*)0; + int *l_414 = &l_390; + int *l_415 = &l_335; + int *l_416 = &g_112; + int *l_417 = (void*)0; + int *l_418 = &l_377; + int *l_419 = (void*)0; + int *l_420 = &g_78; + int *l_421 = &l_346; + int *l_422 = &l_402; + int *l_423 = &l_346; + int *l_424 = &l_407; + int *l_425 = &l_350; + int *l_426 = &l_407; + int *l_427 = &l_377; + int *l_428 = &l_407; + int *l_429 = &l_407; + int *l_430 = &l_390; + int *l_431 = &l_350; + int *l_432 = &l_377; + int *l_433 = &l_336; + int *l_434 = &g_38; + int *l_436 = &g_91; + int *l_437 = &l_335; + int *l_438 = (void*)0; + int *l_439 = &l_335; + int *l_440 = &g_38; + int *l_441 = &l_346; + int *l_442 = (void*)0; + int *l_443 = &l_377; + int *l_444 = &l_402; + int *l_445 = &l_390; + int *l_446 = &g_313; + int *l_448 = &l_336; + int *l_449 = &l_377; + int *l_452 = &g_91; + int *l_453 = &l_402; + int *l_454 = &l_377; + int *l_455 = &g_38; + int *l_456 = &g_78; + int *l_457 = &l_350; + int *l_458 = (void*)0; + int *l_459 = (void*)0; + int *l_460 = &g_313; + step_hash(128); + (*g_62) = (*g_62); + step_hash(129); + (*l_312) = (*l_318); + step_hash(130); + g_461++; + step_hash(131); + if (p_31) + continue; + } + else + { + step_hash(133); + (*g_62) = func_44(&l_377, func_44((*g_62), (*g_62), (*g_62), l_464), (*g_62), ((void*)0 != &l_407)); + step_hash(140); + for (l_402 = (-11); (l_402 > (-14)); l_402--) + { + step_hash(137); + if (l_334) + break; + step_hash(138); + if (p_34) + break; + step_hash(139); + return g_91; + } + step_hash(141); + (*l_312) ^= (-(int)(g_106 || ((signed char)(0x1679L != g_187) * (signed char)0xFCL))); + } + } + else + { + int *l_476 = &l_451; + int *l_478 = &l_377; + int *l_479 = &l_350; + int *l_480 = &l_435; + step_hash(144); + (*g_63) = p_32; + step_hash(149); + for (g_187 = 0; (g_187 == 52); g_187 += 7) + { + int ***l_473 = &g_62; + step_hash(148); + (*l_312) = ((p_31 && (l_472 == l_473)) < ((unsigned short)((***l_472) & (&l_350 != (**l_473))) % (unsigned short)g_112)); + } + step_hash(150); + l_481++; + } + } + step_hash(153); + return p_33; + } + else + { + int *l_486 = &g_447; + int l_557 = 2L; + int l_687 = 0xA76A31EEL; + int l_723 = 1L; + int l_726 = 0x3068C0FAL; + int l_930 = 9L; + int l_959 = 0x73950678L; + int l_988 = 0xDF22B542L; + unsigned l_1078 = 1UL; + unsigned short l_1136 = 0x0BD9L; + unsigned short l_1593 = 0x2EABL; + int ***l_1613 = &g_62; + step_hash(310); + if (((unsigned char)func_39(l_486, func_44(func_44(l_486, func_49(p_32, g_461), &l_435, ((signed char)p_33 - (signed char)((unsigned short)g_306 >> (unsigned short)1))), &g_91, &l_435, p_34), &l_435, g_193) >> (unsigned char)(*l_486))) + { + unsigned char l_515 = 0x93L; + int *l_518 = &l_377; + int l_567 = 0x7BE39CE7L; + int l_579 = 0x29176534L; + int l_732 = 0xBC64B8D9L; + int l_737 = 1L; + int l_741 = 0x073FC81AL; + step_hash(179); + if ((*l_37)) + { + int *l_491 = &g_447; + int *l_492 = &l_435; + int *l_493 = &g_38; + int *l_494 = &g_112; + int *l_495 = (void*)0; + int *l_496 = &l_435; + int *l_497 = &l_377; + int *l_498 = &g_313; + int *l_499 = &l_435; + int *l_500 = &g_447; + int *l_501 = (void*)0; + int *l_502 = (void*)0; + int *l_503 = &g_91; + int *l_504 = (void*)0; + int l_505 = 0L; + int *l_506 = (void*)0; + int *l_508 = &g_112; + int *l_509 = &l_435; + int *l_510 = &g_447; + int *l_511 = (void*)0; + int *l_512 = (void*)0; + int *l_513 = &g_112; + int *l_514 = &l_377; + step_hash(157); + (*l_312) = ((g_461 & g_269) == p_31); + step_hash(158); + l_515--; + step_hash(159); + (*g_62) = l_518; + } + else + { + int **l_527 = &l_486; + int l_542 = 1L; + int l_586 = 0xFB2388B4L; + int *l_751 = &l_738; + int *l_752 = &l_579; + int *l_753 = &l_435; + int *l_754 = &l_732; + int *l_755 = &g_313; + int *l_756 = &g_112; + int *l_757 = &l_586; + int *l_758 = (void*)0; + int *l_759 = &l_726; + int *l_760 = &l_726; + int *l_761 = &l_557; + int *l_762 = &l_741; + int *l_763 = &l_741; + int *l_764 = &l_741; + int *l_765 = &l_738; + int *l_766 = (void*)0; + int *l_767 = (void*)0; + int *l_768 = &g_38; + int *l_769 = &l_377; + int *l_770 = &l_579; + int *l_771 = &l_726; + int *l_772 = &l_738; + int *l_773 = (void*)0; + int *l_774 = &l_737; + int *l_775 = &l_738; + int *l_776 = &l_737; + int *l_777 = &g_447; + int *l_778 = (void*)0; + int *l_779 = &g_38; + int *l_780 = &g_112; + int *l_781 = (void*)0; + int *l_782 = (void*)0; + int *l_783 = (void*)0; + int *l_784 = &l_542; + int *l_785 = &l_732; + int *l_786 = (void*)0; + int *l_787 = &l_557; + int *l_788 = &g_38; + int *l_789 = &l_723; + int *l_790 = (void*)0; + int *l_791 = &l_567; + int *l_792 = &g_78; + int *l_793 = &g_313; + int *l_794 = &l_586; + int *l_795 = &l_542; + int *l_796 = &l_726; + int *l_797 = &g_38; + int *l_798 = &l_579; + int *l_799 = (void*)0; + int *l_800 = &g_313; + int *l_801 = (void*)0; + int *l_802 = (void*)0; + int *l_803 = &l_732; + int *l_804 = &l_732; + int *l_805 = &l_586; + int *l_806 = &l_557; + int *l_807 = &l_542; + int *l_808 = &l_579; + int *l_809 = (void*)0; + int *l_810 = &l_567; + int *l_811 = &l_737; + int *l_812 = &l_741; + int *l_813 = (void*)0; + int *l_814 = &l_687; + int *l_815 = &l_586; + int l_816 = 0xF1872BA1L; + int *l_817 = (void*)0; + int *l_818 = &l_567; + int *l_819 = &g_78; + int *l_821 = &l_542; + int *l_822 = &l_741; + int l_823 = (-7L); + int *l_824 = (void*)0; + int *l_825 = &l_823; + int *l_826 = &l_579; + int *l_827 = &l_435; + int *l_828 = &l_567; + int *l_829 = &l_737; + int *l_830 = &l_738; + int *l_831 = &l_567; + int *l_832 = (void*)0; + int *l_833 = (void*)0; + int *l_834 = (void*)0; + int *l_835 = &l_741; + int *l_836 = &l_816; + int *l_837 = (void*)0; + int *l_839 = &l_723; + int *l_840 = (void*)0; + int *l_841 = &l_816; + int *l_842 = &l_567; + int *l_843 = &g_91; + int *l_844 = &l_542; + int *l_845 = &l_377; + int *l_846 = (void*)0; + int *l_848 = &l_377; + int *l_849 = &g_313; + int *l_850 = &l_687; + int *l_851 = (void*)0; + int *l_852 = (void*)0; + int *l_853 = (void*)0; + int *l_854 = (void*)0; + int *l_855 = &g_447; + int *l_856 = &l_542; + int *l_857 = &g_447; + int *l_858 = &l_741; + int *l_859 = &g_78; + int *l_860 = &l_737; + int l_861 = 0xEBB0A384L; + int *l_862 = (void*)0; + int *l_864 = &l_687; + int *l_865 = &l_737; + int *l_866 = (void*)0; + int *l_867 = &l_738; + int *l_868 = (void*)0; + int *l_870 = &l_737; + int *l_871 = (void*)0; + int *l_872 = (void*)0; + int *l_873 = (void*)0; + int *l_875 = &g_78; + int *l_876 = &l_823; + int *l_877 = &l_869; + int *l_878 = &l_542; + int *l_879 = &g_78; + int *l_880 = &l_557; + int *l_881 = &l_838; + int *l_882 = &g_91; + int l_883 = 0L; + int *l_884 = &l_557; + int *l_885 = &l_586; + int *l_886 = &l_883; + int *l_887 = &g_78; + int *l_888 = &g_38; + int *l_889 = &l_820; + int *l_890 = &g_112; + int *l_891 = &l_863; + int *l_893 = &l_738; + int *l_894 = &l_586; + int *l_895 = (void*)0; + int *l_896 = &l_567; + int *l_897 = &l_542; + int *l_898 = &l_869; + int *l_899 = &g_874; + int *l_900 = &l_892; + int *l_901 = (void*)0; + int *l_902 = (void*)0; + int *l_903 = &l_732; + int *l_904 = &l_435; + int *l_905 = &l_861; + int *l_906 = (void*)0; + int *l_907 = &g_38; + int l_908 = (-10L); + int *l_909 = &l_908; + int *l_910 = &g_874; + int *l_911 = &l_861; + int *l_912 = &g_313; + int *l_914 = &l_823; + int *l_915 = &g_313; + int *l_916 = &l_861; + int *l_917 = (void*)0; + int *l_918 = &g_313; + int *l_919 = (void*)0; + int l_920 = (-1L); + int *l_921 = &l_567; + int *l_922 = &l_435; + int *l_923 = &l_883; + int *l_925 = &g_91; + int *l_926 = &l_687; + int *l_927 = &l_377; + int *l_928 = &l_820; + int *l_929 = &l_567; + int *l_931 = &l_823; + int *l_932 = &g_313; + int *l_933 = &g_78; + int *l_934 = &g_447; + int *l_935 = &l_908; + int *l_936 = &l_377; + int *l_937 = &l_732; + int *l_938 = &l_435; + int *l_940 = &l_557; + int *l_941 = &l_377; + int *l_942 = &l_723; + int *l_943 = &l_723; + int *l_944 = &l_738; + int *l_945 = &g_447; + int *l_947 = &g_313; + int *l_948 = &l_737; + int *l_950 = &l_737; + int *l_951 = &l_816; + int *l_952 = &l_687; + int *l_953 = &g_874; + int *l_954 = &l_741; + int *l_955 = &l_687; + int *l_956 = &l_892; + int *l_957 = &l_723; + int *l_958 = &g_313; + int *l_960 = &l_816; + int *l_961 = &l_820; + int *l_962 = &l_946; + int *l_963 = &l_732; + int *l_964 = &l_377; + int *l_965 = &l_883; + int *l_966 = &l_557; + int *l_967 = &g_874; + int *l_968 = &l_732; + int *l_969 = (void*)0; + int *l_970 = &l_687; + int *l_971 = (void*)0; + int *l_972 = &l_435; + int *l_973 = &l_930; + int *l_974 = &l_557; + int *l_976 = &l_863; + int *l_977 = &l_869; + int *l_978 = (void*)0; + int *l_979 = &l_687; + int *l_980 = &g_447; + int *l_981 = &g_112; + int *l_982 = &l_892; + int *l_983 = &l_883; + int *l_984 = &l_542; + int *l_985 = &l_883; + int *l_986 = &l_732; + int *l_987 = &l_687; + int l_989 = 7L; + int *l_990 = &l_883; + int *l_991 = &l_737; + int *l_992 = &l_820; + int *l_993 = &g_313; + int *l_994 = &l_741; + int *l_995 = &g_975; + int *l_996 = &l_567; + int *l_997 = (void*)0; + int *l_998 = &l_988; + int *l_999 = &l_738; + int *l_1001 = &l_579; + int *l_1002 = &l_586; + int *l_1003 = &l_687; + int *l_1005 = &l_557; + int *l_1006 = &l_687; + int *l_1007 = (void*)0; + int *l_1008 = &g_313; + int *l_1009 = &g_91; + int *l_1010 = &l_687; + int *l_1011 = &l_435; + int *l_1012 = &l_586; + int *l_1013 = &l_567; + int *l_1014 = &l_892; + int *l_1015 = &l_863; + int *l_1016 = &l_988; + int *l_1017 = &l_908; + int *l_1018 = &l_586; + int *l_1019 = &l_908; + int *l_1020 = &l_820; + int *l_1021 = &l_732; + int *l_1022 = &l_816; + step_hash(172); + if (((unsigned char)((~((unsigned short)(((short)(p_34 ^ g_447) * (short)(((unsigned short)(*l_312) + (unsigned short)((void*)0 == l_527)) && 0x6FBFL)) <= ((int)(((unsigned short)(p_34 && ((*l_518) >= ((0UL ^ (*l_518)) < (*l_518)))) - (unsigned short)(*l_312)) < p_31) % (int)(**g_62))) / (unsigned short)p_31)) ^ g_112) >> (unsigned char)0)) + { + int *l_534 = (void*)0; + int l_537 = 0x3B3F70EDL; + step_hash(169); + for (g_91 = 0; (g_91 <= (-28)); g_91 -= 4) + { + int *l_535 = &g_447; + int *l_536 = &l_435; + int *l_538 = &g_38; + int l_539 = 0xE367F9ACL; + int *l_540 = &g_313; + int *l_541 = &l_539; + int *l_543 = &g_112; + int *l_544 = &g_38; + int *l_545 = &g_447; + int *l_546 = &l_435; + int *l_547 = &l_539; + int *l_548 = (void*)0; + int *l_549 = &g_447; + int *l_550 = &l_542; + int *l_551 = &g_38; + int *l_552 = &l_377; + int *l_553 = &l_377; + int *l_554 = &l_539; + int *l_555 = &g_38; + int *l_556 = &g_38; + int *l_558 = &l_377; + int *l_559 = &l_542; + int *l_560 = &l_557; + int *l_561 = (void*)0; + int l_562 = 0xE840700BL; + int *l_563 = &l_562; + int *l_564 = &l_539; + int *l_565 = &l_562; + int *l_566 = &l_539; + int *l_568 = &g_38; + int *l_569 = &l_539; + int *l_570 = &g_447; + int *l_571 = (void*)0; + int *l_572 = &l_562; + int *l_573 = &l_539; + int l_574 = 0x0240F325L; + int *l_575 = (void*)0; + int *l_576 = &l_567; + int *l_577 = (void*)0; + int *l_578 = &l_567; + int *l_580 = (void*)0; + int l_581 = 0x1C68F026L; + int *l_582 = (void*)0; + int *l_583 = &g_38; + int *l_584 = &l_377; + int *l_585 = &l_435; + int *l_587 = (void*)0; + step_hash(165); + (*g_62) = func_44(l_534, (*l_527), l_518, g_450); + step_hash(166); + (*l_486) = (+p_33); + step_hash(167); + ++g_588; + step_hash(168); + (*l_546) ^= ((short)g_78 * (short)((signed char)(*l_559) + (signed char)((int)0L % (int)g_106))); + } + } + else + { + int *l_597 = &g_91; + int *l_598 = &l_579; + int *l_599 = &g_91; + int *l_600 = (void*)0; + int *l_601 = &l_586; + int *l_602 = &l_579; + int *l_603 = &l_586; + int *l_604 = (void*)0; + int *l_605 = &l_542; + int *l_606 = (void*)0; + int *l_607 = &l_586; + int *l_608 = &g_313; + int *l_609 = &l_586; + int *l_610 = &l_435; + int *l_611 = &g_38; + int *l_612 = &l_567; + int *l_613 = &l_567; + int *l_614 = &g_91; + int *l_615 = (void*)0; + int *l_616 = (void*)0; + int *l_617 = &g_447; + int *l_618 = (void*)0; + int *l_619 = &g_38; + int *l_620 = (void*)0; + int *l_621 = &g_78; + int *l_622 = &g_78; + int *l_623 = &l_579; + int l_624 = 0x8CB365A6L; + int *l_625 = (void*)0; + int *l_626 = (void*)0; + int *l_627 = &l_557; + int *l_628 = (void*)0; + int *l_629 = &g_38; + int *l_630 = &g_447; + int *l_631 = &l_624; + int *l_632 = &l_377; + int *l_633 = &g_38; + int *l_634 = &l_435; + int *l_635 = &l_542; + int *l_636 = &g_38; + int *l_637 = (void*)0; + int l_638 = 0L; + int *l_639 = &l_579; + int *l_640 = &l_377; + int *l_641 = &g_78; + int *l_642 = &l_624; + int *l_643 = &g_38; + int *l_644 = &g_447; + int *l_645 = &g_447; + step_hash(171); + g_646++; + } + step_hash(177); + if (((&l_377 != g_649) ^ g_195)) + { + step_hash(174); + (*l_527) = (*g_62); + } + else + { + int *l_650 = &l_435; + int *l_651 = &l_435; + int *l_652 = &g_313; + int *l_653 = &l_557; + int *l_654 = &g_313; + int *l_655 = &g_447; + int *l_656 = &l_377; + int *l_657 = (void*)0; + int *l_658 = &l_542; + int *l_659 = (void*)0; + int *l_660 = &g_38; + int *l_661 = &l_579; + int *l_662 = &g_112; + int *l_663 = &g_78; + int *l_664 = &l_567; + int *l_665 = (void*)0; + int *l_666 = &g_447; + int *l_667 = &g_313; + int *l_668 = &g_91; + int *l_669 = &l_579; + int *l_670 = &l_567; + int *l_671 = &g_447; + int *l_672 = (void*)0; + int *l_673 = &g_91; + int *l_674 = (void*)0; + int *l_675 = &g_313; + int *l_676 = &l_435; + int *l_677 = &l_557; + int *l_678 = &g_78; + int *l_679 = &l_435; + int l_680 = (-8L); + int *l_681 = (void*)0; + int *l_682 = (void*)0; + int *l_683 = &l_377; + int *l_684 = &l_435; + int *l_685 = (void*)0; + int *l_686 = &l_680; + int *l_688 = &l_557; + int *l_689 = &l_542; + int *l_690 = &l_542; + int *l_691 = (void*)0; + int *l_692 = (void*)0; + int *l_693 = &l_435; + int *l_694 = (void*)0; + int *l_695 = &g_91; + int *l_696 = &g_78; + int *l_697 = &g_38; + int *l_698 = &l_687; + int *l_699 = &g_313; + int *l_700 = &g_91; + int *l_701 = (void*)0; + int *l_702 = &l_557; + int *l_703 = &l_377; + int *l_704 = &l_435; + int *l_705 = &l_579; + int *l_706 = (void*)0; + int *l_707 = &l_586; + int *l_708 = &l_567; + int *l_709 = &g_38; + int *l_710 = &l_435; + int *l_711 = &l_435; + int *l_712 = (void*)0; + int *l_713 = &l_680; + int *l_714 = &l_542; + int l_715 = 0xC4FD2FFAL; + int *l_716 = &g_447; + int *l_717 = (void*)0; + int *l_718 = &l_567; + int *l_719 = &l_557; + int *l_720 = (void*)0; + int *l_721 = &g_78; + int *l_722 = &l_715; + int *l_724 = &g_38; + int *l_725 = &l_723; + int *l_727 = (void*)0; + int *l_728 = &g_78; + int *l_729 = (void*)0; + int *l_730 = &g_38; + int *l_731 = &g_313; + int *l_733 = &l_542; + int *l_734 = &g_91; + int *l_735 = (void*)0; + int l_736 = 0x2AF359DAL; + int *l_739 = &l_680; + int *l_740 = &l_738; + int *l_742 = &l_542; + int *l_743 = (void*)0; + int *l_744 = &l_377; + int *l_745 = &l_435; + int *l_746 = &g_112; + int *l_747 = (void*)0; + step_hash(176); + g_748++; + } + step_hash(178); + ++g_1023; + } + step_hash(180); + (*l_518) ^= (-1L); + step_hash(181); + (*l_312) &= ((unsigned short)((signed char)1L - (signed char)(((short)((int)(func_39((*g_62), func_44((*g_62), (*g_62), (*g_62), (*l_486)), &l_930, (*l_518)) < 0xEAL) - (int)p_33) - (short)p_31) < (-3L))) >> (unsigned short)14); + step_hash(195); + if ((l_1034 != &g_62)) + { + int *l_1037 = &l_567; + step_hash(183); + (*l_312) ^= (((signed char)((((void*)0 == &g_62) && func_39(l_1037, (**l_1034), (**l_1034), ((g_193 | (*g_63)) != ((*l_518) != (((unsigned short)65534UL >> (unsigned short)12) <= g_187))))) || 254UL) % (signed char)p_34) != 0xD5L); + step_hash(184); + return g_913; + } + else + { + int **l_1051 = &l_312; + unsigned short l_1073 = 0UL; + step_hash(191); + if ((l_1040 != (((short)g_874 * (short)p_34) | 1UL))) + { + int *l_1052 = &l_687; + int *l_1053 = &g_38; + int l_1054 = 0xDD4222DEL; + int *l_1055 = &l_820; + int *l_1056 = &l_1004; + int *l_1057 = &l_687; + int *l_1058 = &l_1054; + int *l_1059 = &l_892; + int *l_1060 = &l_738; + int *l_1061 = &l_863; + int *l_1062 = &l_737; + int *l_1063 = &g_874; + int *l_1064 = &l_930; + int *l_1065 = &l_930; + int *l_1066 = &l_435; + int *l_1067 = &g_313; + int *l_1068 = &l_863; + int *l_1069 = (void*)0; + int *l_1070 = &l_1004; + int *l_1071 = (void*)0; + int l_1072 = 5L; + step_hash(187); + --l_1073; + step_hash(188); + l_518 = (void*)0; + } + else + { + step_hash(190); + return g_313; + } + step_hash(192); + (*l_37) = 0xC9470A19L; + step_hash(193); + (**l_1051) ^= (func_39((*g_62), (**l_1034), &l_988, p_32) <= ((signed char)0x5BL << (signed char)g_461)); + step_hash(194); + (**l_1051) ^= ((g_112 || p_34) >= ((g_38 || l_1078) != p_34)); + } + } + else + { + int *l_1085 = &l_738; + int l_1087 = (-7L); + int l_1117 = 0xE0EEE7F0L; + int l_1256 = 5L; + unsigned char l_1325 = 0x73L; + int l_1549 = 0xA3022905L; + int l_1552 = 0x8B5EAA5FL; + step_hash(197); + (*g_62) = (*g_62); + step_hash(236); + for (l_892 = 0; (l_892 < (-18)); l_892--) + { + int *l_1084 = &l_930; + int l_1086 = (-1L); + int l_1097 = 2L; + int l_1109 = 1L; + int l_1259 = 0xD71E673BL; + int l_1267 = 0xA3C2F25FL; + } + step_hash(268); + for (g_106 = 0; (g_106 <= (-22)); g_106 -= 8) + { + int l_1343 = 0xBCD1A088L; + step_hash(255); + for (l_435 = (-24); (l_435 < 24); l_435++) + { + int l_1334 = 2L; + step_hash(243); + l_1334 = p_32; + step_hash(244); + (**l_1034) = (**l_1034); + step_hash(249); + for (l_892 = 0; (l_892 <= 14); l_892 += 1) + { + step_hash(248); + return g_874; + } + step_hash(254); + for (g_748 = 0; (g_748 <= 42); g_748++) + { + step_hash(253); + return l_1334; + } + } + step_hash(256); + (**l_1034) = (**l_1034); + step_hash(267); + for (g_78 = 0; (g_78 > (-28)); --g_78) + { + int *l_1346 = &g_38; + step_hash(266); + for (l_726 = 0; (l_726 > 11); l_726++) + { + int l_1344 = 1L; + int l_1345 = 0x7FDC5D3EL; + step_hash(263); + l_1343 &= (-1L); + step_hash(264); + if (l_1344) + continue; + step_hash(265); + l_1346 = func_49(l_1343, l_1345); + } + } + } + step_hash(309); + for (g_313 = 27; (g_313 >= (-19)); --g_313) + { + signed char l_1349 = 1L; + int l_1417 = 0xF20C56E5L; + int l_1446 = 0x6FC39C69L; + int l_1505 = 0xD14B63FBL; + int l_1582 = (-1L); + int l_1585 = (-3L); + short l_1608 = 0x8948L; + } + } + step_hash(315); + for (g_112 = 21; (g_112 < (-9)); --g_112) + { + step_hash(314); + (*l_37) = 0xDC1E1DE9L; + } + } + step_hash(317); + return (*l_37); +} +static signed char func_39(int * p_40, int * p_41, int * p_42, int p_43) +{ + unsigned short l_85 = 1UL; + int l_132 = 0xE5685F08L; + int l_143 = 1L; + int ***l_154 = (void*)0; + int l_273 = 9L; + int l_279 = (-6L); + int **l_309 = (void*)0; + step_hash(25); + for (g_38 = 0; (g_38 >= (-11)); g_38 -= 2) + { + int *l_81 = &g_78; + int *l_82 = &g_78; + int *l_83 = &g_78; + int *l_84 = &g_78; + step_hash(22); + --l_85; + step_hash(23); + (*l_82) = (8L < g_8); + step_hash(24); + (*g_62) = func_44((*g_62), func_44((*g_62), (*g_62), p_40, g_38), l_81, p_43); + } + step_hash(116); + for (g_38 = 0; (g_38 <= 20); g_38 += 2) + { + int *l_90 = &g_78; + int l_92 = 0x6FEDEA8FL; + int *l_93 = &l_92; + int *l_94 = &g_91; + int *l_95 = &g_91; + int *l_96 = (void*)0; + int *l_97 = &l_92; + int *l_98 = (void*)0; + int *l_99 = (void*)0; + int *l_100 = &g_91; + int *l_101 = &g_78; + int *l_102 = (void*)0; + int *l_103 = &l_92; + int *l_104 = &l_92; + int *l_105 = &l_92; + int *l_107 = &l_92; + int *l_108 = &g_78; + int *l_109 = &g_91; + int *l_110 = &l_92; + int *l_111 = &g_78; + int *l_113 = &l_92; + int *l_114 = &l_92; + int *l_115 = &g_91; + int *l_116 = &g_78; + int *l_117 = &l_92; + int *l_118 = &g_91; + int *l_119 = &g_78; + int *l_120 = &g_78; + int *l_121 = &g_91; + int l_122 = (-7L); + int *l_123 = &g_78; + int *l_125 = &l_122; + int *l_126 = &l_92; + int *l_127 = &l_122; + int *l_128 = &g_112; + int *l_129 = &g_112; + int *l_130 = &g_112; + int *l_131 = (void*)0; + int *l_133 = &l_132; + int *l_134 = &l_132; + int *l_135 = &g_91; + int *l_136 = &l_132; + int *l_137 = &l_122; + int *l_138 = &g_91; + int *l_139 = &l_132; + int *l_140 = &l_132; + int *l_142 = (void*)0; + int *l_144 = (void*)0; + int *l_145 = &l_92; + int *l_146 = &g_91; + unsigned l_147 = 0x0045B34FL; + int l_183 = (-1L); + step_hash(29); + --l_147; + step_hash(115); + if ((((signed char)(((-1L) == p_43) | ((short)(l_154 != (void*)0) << (short)10)) >> (signed char)g_106) == (((short)((unsigned short)((g_8 | g_8) >= (*l_111)) << (unsigned short)(+(*l_105))) >> (short)g_106) && (*p_42)))) + { + unsigned l_159 = 0x429F1C2FL; + int l_188 = 0xE94C9196L; + int l_194 = 0L; + unsigned l_196 = 0xD39EDE03L; + step_hash(31); + l_159--; + step_hash(75); + for (g_106 = 19; (g_106 > (-16)); g_106 -= 4) + { + int *l_168 = &g_78; + int ***l_219 = &g_62; + step_hash(39); + for (p_43 = (-17); (p_43 != 2); p_43 += 6) + { + step_hash(38); + (*g_62) = (*g_62); + } + step_hash(58); + if (((signed char)(l_168 == (*g_62)) + (signed char)((**g_62) == ((unsigned)((unsigned short)((((signed char)l_159 >> (signed char)3) ^ p_43) | ((signed char)((short)(*l_103) - (short)((*p_42) < ((unsigned char)(((unsigned char)l_183 * (unsigned char)((*l_168) && p_43)) || l_159) << (unsigned char)4))) >> (signed char)4)) >> (unsigned short)3) + (unsigned)p_43)))) + { + unsigned char l_189 = 249UL; + int l_207 = 3L; + step_hash(48); + if (((unsigned short)((-(signed char)p_43) ^ (l_159 > g_141)) >> (unsigned short)((&g_63 == &p_41) == g_106))) + { + step_hash(42); + g_187 = l_159; + } + else + { + int l_192 = 0xB5784CD6L; + step_hash(44); + --l_189; + step_hash(45); + l_196--; + step_hash(46); + if ((*p_42)) + continue; + step_hash(47); + (*l_97) |= (-2L); + } + step_hash(55); + for (l_85 = 0; (l_85 > 11); ++l_85) + { + unsigned l_208 = 0x304AAC6DL; + step_hash(52); + (*g_62) = p_41; + step_hash(53); + (*l_130) = ((unsigned char)(!249UL) + (unsigned char)(((((signed char)((((short)(((g_8 || (((*l_168) && (((((!(*l_138)) >= p_43) || p_43) >= (p_42 != (*g_62))) & 0L)) != (*p_42))) || p_43) != 65526UL) >> (short)9) <= 255UL) <= 0x90E32AAFL) / (signed char)l_188) > 0x4900L) <= g_124) < p_43)); + step_hash(54); + l_208++; + } + } + else + { + step_hash(57); + return (*l_168); + } + step_hash(59); + (*l_95) = (0xBCL < ((g_38 || ((unsigned char)((unsigned char)g_38 * (unsigned char)g_8) % (unsigned char)g_141)) && p_43)); + step_hash(74); + if ((l_188 > (0xAB31L >= g_195))) + { + unsigned l_222 = 0x90A817FAL; + step_hash(61); + (*l_138) = ((unsigned char)(0UL & 0x3693L) + (unsigned char)((unsigned)p_43 - (unsigned)(l_219 != &g_62))); + step_hash(62); + (**l_219) = (*g_62); + step_hash(70); + if (((((unsigned short)0x0601L << (unsigned short)(***l_219)) != g_195) == p_43)) + { + step_hash(64); + if ((*p_41)) + break; + step_hash(65); + p_40 = (*g_62); + step_hash(66); + (*l_129) = (*p_41); + step_hash(67); + (*l_95) ^= (**g_62); + } + else + { + step_hash(69); + (*l_101) = l_222; + } + step_hash(71); + (*l_133) ^= (g_193 >= 0xC0L); + } + else + { + step_hash(73); + (*l_104) |= (*g_63); + } + } + step_hash(76); + (*l_136) = ((signed char)((short)((unsigned char)255UL << (unsigned char)((signed char)((signed char)(*l_125) << (signed char)2) >> (signed char)5)) - (short)(p_43 > ((int)((unsigned short)p_43 << (unsigned short)4) % (int)(p_43 & (g_91 > (((void*)0 == &l_97) != p_43)))))) + (signed char)0x3AL); + step_hash(108); + if ((**g_62)) + { + step_hash(78); + (*l_134) = (*g_63); + step_hash(79); + return g_112; + } + else + { + int l_251 = 1L; + int l_286 = 0xF4B66F68L; + step_hash(105); + if ((**g_62)) + { + step_hash(92); + if (((short)((signed char)(*l_118) + (signed char)(g_187 || g_91)) << (short)4)) + { + step_hash(83); + if ((**g_62)) + break; + step_hash(84); + (*l_123) = ((signed char)((p_43 | g_91) < ((unsigned char)g_195 << (unsigned char)((signed char)g_78 << (signed char)6))) - (signed char)((void*)0 != l_154)); + step_hash(85); + if ((*p_42)) + break; + step_hash(86); + (*g_62) = p_41; + } + else + { + step_hash(88); + (*l_127) &= ((unsigned)(&g_63 != (void*)0) / (unsigned)(-5L)); + step_hash(89); + (*g_62) = (*g_62); + step_hash(90); + (*g_62) = p_42; + step_hash(91); + (*l_107) |= l_251; + } + } + else + { + signed char l_260 = 1L; + int **l_263 = &l_140; + signed char l_268 = (-1L); + step_hash(94); + l_260 |= ((((unsigned short)((unsigned short)((signed char)p_43 >> (signed char)2) << (unsigned short)4) - (unsigned short)((*p_40) == (p_43 <= (*g_63)))) ^ (255UL <= ((void*)0 != p_40))) <= ((short)((*g_63) | (l_251 ^ p_43)) << (short)p_43)); + step_hash(104); + if (((unsigned short)(&p_42 != l_263) << (unsigned short)3)) + { + unsigned char l_264 = 0xC5L; + int l_267 = 0x79B7C538L; + int *l_270 = (void*)0; + int *l_271 = &l_143; + int *l_272 = (void*)0; + int *l_274 = &l_122; + int *l_275 = (void*)0; + int *l_276 = &l_143; + int *l_277 = &l_92; + int *l_278 = &l_143; + int *l_280 = (void*)0; + int *l_281 = &l_279; + int *l_282 = &l_194; + int *l_283 = &l_132; + int *l_284 = &g_78; + int *l_285 = &l_122; + int *l_287 = &l_286; + int *l_288 = &l_132; + int *l_289 = &l_286; + int *l_290 = &l_286; + step_hash(96); + (*l_120) = 1L; + step_hash(97); + l_264++; + step_hash(98); + (*l_145) &= (*g_63); + step_hash(99); + g_291++; + } + else + { + int ***l_296 = (void*)0; + int l_299 = 0x85A720D6L; + step_hash(101); + (*l_125) = ((p_43 | (p_43 > (((unsigned short)((void*)0 == l_296) * (unsigned short)(((unsigned short)(**l_263) * (unsigned short)g_291) < l_299)) < ((unsigned short)p_43 >> (unsigned short)7)))) == ((short)((short)((*g_62) != (*g_62)) << (short)8) << (short)0)); + step_hash(102); + g_306--; + step_hash(103); + return g_187; + } + } + step_hash(106); + l_309 = &g_63; + step_hash(107); + (*l_309) = (*g_62); + } + } + else + { + step_hash(114); + for (g_187 = 20; (g_187 == 59); g_187++) + { + step_hash(113); + return g_91; + } + } + } + step_hash(117); + return p_43; +} +static int * func_44(int * p_45, int * p_46, int * p_47, unsigned p_48) +{ + int ***l_75 = (void*)0; + int *l_76 = (void*)0; + int *l_77 = &g_78; + step_hash(16); + (*l_77) |= ((short)(p_48 & ((!(-1L)) == g_8)) * (short)(-(int)(1UL >= ((signed char)(g_8 < p_48) >> (signed char)((unsigned char)((void*)0 != l_75) + (unsigned char)g_38))))); + step_hash(17); + return (*g_62); +} +static int * func_49(signed char p_50, int p_51) +{ + int l_52 = 0x9A75015EL; + int l_61 = 1L; + int ***l_64 = (void*)0; + int ***l_65 = &g_62; + step_hash(11); + l_61 ^= (l_52 ^ (((signed char)g_38 + (signed char)g_8) == (((unsigned char)l_52 % (unsigned char)l_52) <= ((unsigned short)g_8 * (unsigned short)((((unsigned char)(l_52 | (0x3CL & (p_51 > 0xE7L))) >> (unsigned char)4) > 0x0C01L) & 0L))))); + step_hash(12); + (*l_65) = g_62; + step_hash(13); + (***l_65) = (*g_63); + step_hash(14); + return (*g_62); +} +void csmith_compute_hash(void) +{ + transparent_crc(g_8, "g_8", print_hash_value); + transparent_crc(g_38, "g_38", print_hash_value); + transparent_crc(g_78, "g_78", print_hash_value); + transparent_crc(g_91, "g_91", print_hash_value); + transparent_crc(g_106, "g_106", print_hash_value); + transparent_crc(g_112, "g_112", print_hash_value); + transparent_crc(g_124, "g_124", print_hash_value); + transparent_crc(g_141, "g_141", print_hash_value); + transparent_crc(g_187, "g_187", print_hash_value); + transparent_crc(g_193, "g_193", print_hash_value); + transparent_crc(g_195, "g_195", print_hash_value); + transparent_crc(g_269, "g_269", print_hash_value); + transparent_crc(g_291, "g_291", print_hash_value); + transparent_crc(g_306, "g_306", print_hash_value); + transparent_crc(g_313, "g_313", print_hash_value); + transparent_crc(g_447, "g_447", print_hash_value); + transparent_crc(g_450, "g_450", print_hash_value); + transparent_crc(g_461, "g_461", print_hash_value); + transparent_crc(g_588, "g_588", print_hash_value); + transparent_crc(g_646, "g_646", print_hash_value); + transparent_crc(g_748, "g_748", print_hash_value); + transparent_crc(g_847, "g_847", print_hash_value); + transparent_crc(g_874, "g_874", print_hash_value); + transparent_crc(g_913, "g_913", print_hash_value); + transparent_crc(g_924, "g_924", print_hash_value); + transparent_crc(g_949, "g_949", print_hash_value); + transparent_crc(g_975, "g_975", print_hash_value); + transparent_crc(g_1000, "g_1000", print_hash_value); + transparent_crc(g_1023, "g_1023", print_hash_value); + transparent_crc(g_1268, "g_1268", print_hash_value); + transparent_crc(g_1272, "g_1272", print_hash_value); + transparent_crc(g_1521, "g_1521", print_hash_value); + transparent_crc(g_1588, "g_1588", print_hash_value); + transparent_crc(g_1755, "g_1755", print_hash_value); + transparent_crc(g_1787, "g_1787", print_hash_value); + transparent_crc(g_1952, "g_1952", print_hash_value); + transparent_crc(g_2108, "g_2108", print_hash_value); + transparent_crc(g_2121, "g_2121", print_hash_value); + transparent_crc(g_2172, "g_2172", print_hash_value); + transparent_crc(g_2177, "g_2177", print_hash_value); + transparent_crc(g_2214, "g_2214", print_hash_value); + transparent_crc(g_2337, "g_2337", print_hash_value); + transparent_crc(g_2345, "g_2345", print_hash_value); + transparent_crc(g_2371, "g_2371", print_hash_value); + transparent_crc(g_2526, "g_2526", print_hash_value); + transparent_crc(g_2739, "g_2739", print_hash_value); + transparent_crc(g_2756, "g_2756", print_hash_value); +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand52.expect b/src/tests/csmith/rand52.expect new file mode 100644 index 0000000..5fea8de --- /dev/null +++ b/src/tests/csmith/rand52.expect @@ -0,0 +1,192 @@ +...checksum after hashing g_8 : 5FCD50C1 +...checksum after hashing g_38 : 7D62DE27 +...checksum after hashing g_78 : F7F24168 +...checksum after hashing g_91 : ABDD0387 +...checksum after hashing g_106 : A2873E3C +...checksum after hashing g_112 : EBE33339 +...checksum after hashing g_124 : 3EBFE47C +...checksum after hashing g_141 : 9C95C83B +...checksum after hashing g_187 : 3D8471C0 +...checksum after hashing g_193 : 734EEA37 +...checksum after hashing g_195 : 27DF729 +...checksum after hashing g_269 : FADD942A +...checksum after hashing g_291 : 3FCA8B17 +...checksum after hashing g_306 : 58227641 +...checksum after hashing g_313 : 4E294BA3 +...checksum after hashing g_447 : EABCE4FF +...checksum after hashing g_450 : E1B92C26 +...checksum after hashing g_461 : 114710E3 +...checksum after hashing g_588 : 2C206B8A +...checksum after hashing g_646 : 89F4A73B +...checksum after hashing g_748 : 86AA0120 +...checksum after hashing g_847 : E3C4880 +...checksum after hashing g_874 : F864C144 +...checksum after hashing g_913 : C913186F +...checksum after hashing g_924 : 501433D0 +...checksum after hashing g_949 : 5BD62AE6 +...checksum after hashing g_975 : 2CC5334 +...checksum after hashing g_1000 : B9B6D96D +...checksum after hashing g_1023 : D2CE9B0E +...checksum after hashing g_1268 : B5C5D163 +...checksum after hashing g_1272 : E9878EE2 +...checksum after hashing g_1521 : 3EE66BA9 +...checksum after hashing g_1588 : 245C83F6 +...checksum after hashing g_1755 : EE47CADA +...checksum after hashing g_1787 : 3BC173F8 +...checksum after hashing g_1952 : 57CB3876 +...checksum after hashing g_2108 : A40BF70B +...checksum after hashing g_2121 : AA3AA391 +...checksum after hashing g_2172 : F7232667 +...checksum after hashing g_2177 : 8DEFCB5C +...checksum after hashing g_2214 : 4C694BAA +...checksum after hashing g_2337 : 6AB3B9EA +...checksum after hashing g_2345 : 1275201A +...checksum after hashing g_2371 : 875CD2FC +...checksum after hashing g_2526 : 62B9386 +...checksum after hashing g_2739 : 8930680E +...checksum after hashing g_2756 : 12C61F23 +before stmt(1): checksum = 12C61F23 +...checksum after hashing g_8 : 5FCD50C1 +...checksum after hashing g_38 : 7D62DE27 +...checksum after hashing g_78 : F7F24168 +...checksum after hashing g_91 : ABDD0387 +...checksum after hashing g_106 : A2873E3C +...checksum after hashing g_112 : EBE33339 +...checksum after hashing g_124 : 3EBFE47C +...checksum after hashing g_141 : 9C95C83B +...checksum after hashing g_187 : 3D8471C0 +...checksum after hashing g_193 : 734EEA37 +...checksum after hashing g_195 : 27DF729 +...checksum after hashing g_269 : FADD942A +...checksum after hashing g_291 : 3FCA8B17 +...checksum after hashing g_306 : 58227641 +...checksum after hashing g_313 : 4E294BA3 +...checksum after hashing g_447 : EABCE4FF +...checksum after hashing g_450 : E1B92C26 +...checksum after hashing g_461 : 114710E3 +...checksum after hashing g_588 : 2C206B8A +...checksum after hashing g_646 : 89F4A73B +...checksum after hashing g_748 : 86AA0120 +...checksum after hashing g_847 : E3C4880 +...checksum after hashing g_874 : F864C144 +...checksum after hashing g_913 : C913186F +...checksum after hashing g_924 : 501433D0 +...checksum after hashing g_949 : 5BD62AE6 +...checksum after hashing g_975 : 2CC5334 +...checksum after hashing g_1000 : B9B6D96D +...checksum after hashing g_1023 : D2CE9B0E +...checksum after hashing g_1268 : B5C5D163 +...checksum after hashing g_1272 : E9878EE2 +...checksum after hashing g_1521 : 3EE66BA9 +...checksum after hashing g_1588 : 245C83F6 +...checksum after hashing g_1755 : EE47CADA +...checksum after hashing g_1787 : 3BC173F8 +...checksum after hashing g_1952 : 57CB3876 +...checksum after hashing g_2108 : A40BF70B +...checksum after hashing g_2121 : AA3AA391 +...checksum after hashing g_2172 : F7232667 +...checksum after hashing g_2177 : 8DEFCB5C +...checksum after hashing g_2214 : 4C694BAA +...checksum after hashing g_2337 : 6AB3B9EA +...checksum after hashing g_2345 : 1275201A +...checksum after hashing g_2371 : 875CD2FC +...checksum after hashing g_2526 : 62B9386 +...checksum after hashing g_2739 : 8930680E +...checksum after hashing g_2756 : 12C61F23 +before stmt(505): checksum = 12C61F23 +...checksum after hashing g_8 : 5FCD50C1 +...checksum after hashing g_38 : 7D62DE27 +...checksum after hashing g_78 : F7F24168 +...checksum after hashing g_91 : ABDD0387 +...checksum after hashing g_106 : A2873E3C +...checksum after hashing g_112 : EBE33339 +...checksum after hashing g_124 : 3EBFE47C +...checksum after hashing g_141 : 9C95C83B +...checksum after hashing g_187 : 3D8471C0 +...checksum after hashing g_193 : 734EEA37 +...checksum after hashing g_195 : 27DF729 +...checksum after hashing g_269 : FADD942A +...checksum after hashing g_291 : 3FCA8B17 +...checksum after hashing g_306 : 58227641 +...checksum after hashing g_313 : 4E294BA3 +...checksum after hashing g_447 : EABCE4FF +...checksum after hashing g_450 : E1B92C26 +...checksum after hashing g_461 : 114710E3 +...checksum after hashing g_588 : 2C206B8A +...checksum after hashing g_646 : 89F4A73B +...checksum after hashing g_748 : 86AA0120 +...checksum after hashing g_847 : E3C4880 +...checksum after hashing g_874 : F864C144 +...checksum after hashing g_913 : C913186F +...checksum after hashing g_924 : 501433D0 +...checksum after hashing g_949 : 5BD62AE6 +...checksum after hashing g_975 : 2CC5334 +...checksum after hashing g_1000 : B9B6D96D +...checksum after hashing g_1023 : D2CE9B0E +...checksum after hashing g_1268 : B5C5D163 +...checksum after hashing g_1272 : E9878EE2 +...checksum after hashing g_1521 : 3EE66BA9 +...checksum after hashing g_1588 : 245C83F6 +...checksum after hashing g_1755 : EE47CADA +...checksum after hashing g_1787 : 3BC173F8 +...checksum after hashing g_1952 : 57CB3876 +...checksum after hashing g_2108 : A40BF70B +...checksum after hashing g_2121 : AA3AA391 +...checksum after hashing g_2172 : F7232667 +...checksum after hashing g_2177 : 8DEFCB5C +...checksum after hashing g_2214 : 4C694BAA +...checksum after hashing g_2337 : 6AB3B9EA +...checksum after hashing g_2345 : 1275201A +...checksum after hashing g_2371 : 875CD2FC +...checksum after hashing g_2526 : 62B9386 +...checksum after hashing g_2739 : 8930680E +...checksum after hashing g_2756 : 12C61F23 +before stmt(506): checksum = 12C61F23 +...checksum after hashing g_8 : 5FCD50C1 +...checksum after hashing g_38 : 7D62DE27 +...checksum after hashing g_78 : F7F24168 +...checksum after hashing g_91 : ABDD0387 +...checksum after hashing g_106 : A2873E3C +...checksum after hashing g_112 : EBE33339 +...checksum after hashing g_124 : 3EBFE47C +...checksum after hashing g_141 : 9C95C83B +...checksum after hashing g_187 : 3D8471C0 +...checksum after hashing g_193 : 734EEA37 +...checksum after hashing g_195 : 27DF729 +...checksum after hashing g_269 : FADD942A +...checksum after hashing g_291 : 3FCA8B17 +...checksum after hashing g_306 : 58227641 +...checksum after hashing g_313 : 4E294BA3 +...checksum after hashing g_447 : EABCE4FF +...checksum after hashing g_450 : E1B92C26 +...checksum after hashing g_461 : 114710E3 +...checksum after hashing g_588 : 2C206B8A +...checksum after hashing g_646 : 89F4A73B +...checksum after hashing g_748 : 86AA0120 +...checksum after hashing g_847 : E3C4880 +...checksum after hashing g_874 : F864C144 +...checksum after hashing g_913 : C913186F +...checksum after hashing g_924 : 501433D0 +...checksum after hashing g_949 : 5BD62AE6 +...checksum after hashing g_975 : 2CC5334 +...checksum after hashing g_1000 : B9B6D96D +...checksum after hashing g_1023 : D2CE9B0E +...checksum after hashing g_1268 : B5C5D163 +...checksum after hashing g_1272 : E9878EE2 +...checksum after hashing g_1521 : 3EE66BA9 +...checksum after hashing g_1588 : 245C83F6 +...checksum after hashing g_1755 : EE47CADA +...checksum after hashing g_1787 : 3BC173F8 +...checksum after hashing g_1952 : 57CB3876 +...checksum after hashing g_2108 : A40BF70B +...checksum after hashing g_2121 : AA3AA391 +...checksum after hashing g_2172 : F7232667 +...checksum after hashing g_2177 : 8DEFCB5C +...checksum after hashing g_2214 : 4C694BAA +...checksum after hashing g_2337 : 6AB3B9EA +...checksum after hashing g_2345 : 1275201A +...checksum after hashing g_2371 : 875CD2FC +...checksum after hashing g_2526 : 62B9386 +...checksum after hashing g_2739 : 8930680E +...checksum after hashing g_2756 : 12C61F23 +checksum = 12c61f23 diff --git a/src/tests/csmith/rand53.c b/src/tests/csmith/rand53.c new file mode 100644 index 0000000..062a830 --- /dev/null +++ b/src/tests/csmith/rand53.c @@ -0,0 +1,87 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static unsigned short func_1(void); +static unsigned short func_1(void) +{ + short l_2 = 1L; + step_hash(1); + return l_2; +} +void csmith_compute_hash(void) +{ +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand53.expect b/src/tests/csmith/rand53.expect new file mode 100644 index 0000000..0b4e62a --- /dev/null +++ b/src/tests/csmith/rand53.expect @@ -0,0 +1,2 @@ +before stmt(1): checksum = 0 +checksum = 0 diff --git a/src/tests/csmith/rand54.c b/src/tests/csmith/rand54.c new file mode 100644 index 0000000..666d8a6 --- /dev/null +++ b/src/tests/csmith/rand54.c @@ -0,0 +1,108 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static int g_3 = 0xB9102071L; +static signed char g_5 = 0xB2L; +static unsigned char g_6[5] = {248UL, 0UL, 248UL, 0UL, 248UL}; +static int func_1(void); +static int func_1(void) +{ + int *l_2 = &g_3; + int *l_4[4][1]; + int i, j; + for (i = 0; i < 4; i++) + { + for (j = 0; j < 1; j++) + l_4[i][j] = &g_3; + } + step_hash(1); + g_6[1]++; + step_hash(2); + return g_6[0]; +} +void csmith_compute_hash(void) +{ + int i; + transparent_crc(g_3, "g_3", print_hash_value); + transparent_crc(g_5, "g_5", print_hash_value); + for (i = 0; i < 5; i++) + { + transparent_crc(g_6[i], "g_6[i]", print_hash_value); + if (print_hash_value) printf("index = [%d]\n", i); + } +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int i; + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand54.expect b/src/tests/csmith/rand54.expect new file mode 100644 index 0000000..f764e5f --- /dev/null +++ b/src/tests/csmith/rand54.expect @@ -0,0 +1,39 @@ +...checksum after hashing g_3 : 32F5477C +...checksum after hashing g_5 : 63A1BF06 +...checksum after hashing g_6[i] : EA58BAEF +index = [0] +...checksum after hashing g_6[i] : 552C298E +index = [1] +...checksum after hashing g_6[i] : 7ABC93E6 +index = [2] +...checksum after hashing g_6[i] : D5A5BEC7 +index = [3] +...checksum after hashing g_6[i] : 63058A06 +index = [4] +before stmt(1): checksum = 63058A06 +...checksum after hashing g_3 : 32F5477C +...checksum after hashing g_5 : 63A1BF06 +...checksum after hashing g_6[i] : EA58BAEF +index = [0] +...checksum after hashing g_6[i] : ED904EEB +index = [1] +...checksum after hashing g_6[i] : B6169378 +index = [2] +...checksum after hashing g_6[i] : 4E00F2A8 +index = [3] +...checksum after hashing g_6[i] : CD6D1B97 +index = [4] +before stmt(2): checksum = CD6D1B97 +...checksum after hashing g_3 : 32F5477C +...checksum after hashing g_5 : 63A1BF06 +...checksum after hashing g_6[i] : EA58BAEF +index = [0] +...checksum after hashing g_6[i] : ED904EEB +index = [1] +...checksum after hashing g_6[i] : B6169378 +index = [2] +...checksum after hashing g_6[i] : 4E00F2A8 +index = [3] +...checksum after hashing g_6[i] : CD6D1B97 +index = [4] +checksum = cd6d1b97 diff --git a/src/tests/csmith/rand55.c b/src/tests/csmith/rand55.c new file mode 100644 index 0000000..92ea888 --- /dev/null +++ b/src/tests/csmith/rand55.c @@ -0,0 +1,87 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static int func_1(void); +static int func_1(void) +{ + unsigned char l_2 = 0UL; + step_hash(1); + return l_2; +} +void csmith_compute_hash(void) +{ +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand55.expect b/src/tests/csmith/rand55.expect new file mode 100644 index 0000000..0b4e62a --- /dev/null +++ b/src/tests/csmith/rand55.expect @@ -0,0 +1,2 @@ +before stmt(1): checksum = 0 +checksum = 0 diff --git a/src/tests/csmith/rand56.c b/src/tests/csmith/rand56.c new file mode 100644 index 0000000..fc1cedf --- /dev/null +++ b/src/tests/csmith/rand56.c @@ -0,0 +1,104 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static int g_3 = 0x99AC7894L; +static unsigned short g_13 = 0x6957L; +static unsigned char func_1(void); +static unsigned char func_1(void) +{ + int *l_2 = &g_3; + int *l_4 = &g_3; + int *l_5 = &g_3; + int *l_6 = &g_3; + int l_7 = 1L; + int *l_8 = &l_7; + int *l_9 = &g_3; + int *l_10 = &l_7; + int *l_11 = &g_3; + int *l_12[4] = {&g_3, &l_7, &g_3, &l_7}; + unsigned l_16 = 0UL; + int i; + step_hash(1); + --g_13; + step_hash(2); + return l_16; +} +void csmith_compute_hash(void) +{ + transparent_crc(g_3, "g_3", print_hash_value); + transparent_crc(g_13, "g_13", print_hash_value); +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand56.expect b/src/tests/csmith/rand56.expect new file mode 100644 index 0000000..0bf1237 --- /dev/null +++ b/src/tests/csmith/rand56.expect @@ -0,0 +1,9 @@ +...checksum after hashing g_3 : C2E54802 +...checksum after hashing g_13 : B27BA86E +before stmt(1): checksum = B27BA86E +...checksum after hashing g_3 : C2E54802 +...checksum after hashing g_13 : AC7CF0B +before stmt(2): checksum = AC7CF0B +...checksum after hashing g_3 : C2E54802 +...checksum after hashing g_13 : AC7CF0B +checksum = ac7cf0b diff --git a/src/tests/csmith/rand57.c b/src/tests/csmith/rand57.c new file mode 100644 index 0000000..d1f9ee1 --- /dev/null +++ b/src/tests/csmith/rand57.c @@ -0,0 +1,92 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static int g_4 = 0xE2236432L; +static unsigned short func_1(void); +static unsigned short func_1(void) +{ + int *l_2 = (void*)0; + int *l_3 = &g_4; + step_hash(1); + (*l_3) = (-1L); + step_hash(2); + return g_4; +} +void csmith_compute_hash(void) +{ + transparent_crc(g_4, "g_4", print_hash_value); +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand57.expect b/src/tests/csmith/rand57.expect new file mode 100644 index 0000000..4f9cb34 --- /dev/null +++ b/src/tests/csmith/rand57.expect @@ -0,0 +1,6 @@ +...checksum after hashing g_4 : C41578FF +before stmt(1): checksum = C41578FF +...checksum after hashing g_4 : FFFFFFFF +before stmt(2): checksum = FFFFFFFF +...checksum after hashing g_4 : FFFFFFFF +checksum = ffffffff diff --git a/src/tests/csmith/rand58.c b/src/tests/csmith/rand58.c new file mode 100644 index 0000000..c0312e4 --- /dev/null +++ b/src/tests/csmith/rand58.c @@ -0,0 +1,97 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static int g_3 = 0x75DCEC3DL; +static unsigned short g_7 = 8UL; +static unsigned char func_1(void); +static unsigned char func_1(void) +{ + int *l_2 = &g_3; + int *l_4 = (void*)0; + int *l_5 = &g_3; + int *l_6[6] = {(void*)0, &g_3, (void*)0, &g_3, (void*)0, &g_3}; + int i; + step_hash(1); + ++g_7; + step_hash(2); + return g_3; +} +void csmith_compute_hash(void) +{ + transparent_crc(g_3, "g_3", print_hash_value); + transparent_crc(g_7, "g_7", print_hash_value); +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand58.expect b/src/tests/csmith/rand58.expect new file mode 100644 index 0000000..c09fd7e --- /dev/null +++ b/src/tests/csmith/rand58.expect @@ -0,0 +1,9 @@ +...checksum after hashing g_3 : 8E1FD904 +...checksum after hashing g_7 : 2E90CEA2 +before stmt(1): checksum = 2E90CEA2 +...checksum after hashing g_3 : 8E1FD904 +...checksum after hashing g_7 : 962CA9C7 +before stmt(2): checksum = 962CA9C7 +...checksum after hashing g_3 : 8E1FD904 +...checksum after hashing g_7 : 962CA9C7 +checksum = 962ca9c7 diff --git a/src/tests/csmith/rand59.c b/src/tests/csmith/rand59.c new file mode 100644 index 0000000..a9f5875 --- /dev/null +++ b/src/tests/csmith/rand59.c @@ -0,0 +1,98 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static int g_6[1] = {1L}; +static unsigned short func_1(void); +static unsigned short func_1(void) +{ + unsigned l_13 = 8UL; + unsigned l_16 = 7UL; + step_hash(1); + g_6[0] = ((((int)0L + (int)(((signed char)g_6[0] >> (signed char)((unsigned char)g_6[0] << (unsigned char)((((short)l_13 * (short)((signed char)0x6FL >> (signed char)0)) ^ l_16) && (l_13 >= (65529UL < l_16))))) > 2UL)) >= 1L) == g_6[0]); + step_hash(2); + return g_6[0]; +} +void csmith_compute_hash(void) +{ + int i; + for (i = 0; i < 1; i++) + { + transparent_crc(g_6[i], "g_6[i]", print_hash_value); + if (print_hash_value) printf("index = [%d]\n", i); + } +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int i; + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand59.expect b/src/tests/csmith/rand59.expect new file mode 100644 index 0000000..37751f5 --- /dev/null +++ b/src/tests/csmith/rand59.expect @@ -0,0 +1,9 @@ +...checksum after hashing g_6[i] : 99F8B879 +index = [0] +before stmt(1): checksum = 99F8B879 +...checksum after hashing g_6[i] : 2144DF1C +index = [0] +before stmt(2): checksum = 2144DF1C +...checksum after hashing g_6[i] : 2144DF1C +index = [0] +checksum = 2144df1c diff --git a/src/tests/csmith/rand6.c b/src/tests/csmith/rand6.c new file mode 100644 index 0000000..3ee409e --- /dev/null +++ b/src/tests/csmith/rand6.c @@ -0,0 +1,1186 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static int g_3 = 1L; +static int g_53 = 0xD3709E8EL; +static int g_83 = 5L; +static unsigned g_124 = 0xCD3E82D7L; +static int *g_133 = &g_83; +static int **g_194 = &g_133; +static int ***g_193 = &g_194; +static int *g_238 = (void*)0; +static int g_634 = 0xCF32BF1DL; +static int *g_652 = &g_3; +static int g_661 = (-1L); +static int *g_694 = (void*)0; +static unsigned short g_741 = 0x7AD6L; +static unsigned func_1(void); +static signed char func_8(int * p_9, unsigned p_10, int p_11, unsigned p_12); +static unsigned short func_15(short p_16, int * p_17); +static unsigned char func_18(signed char p_19); +static int * func_24(int p_25); +static short func_34(int * p_35, int p_36); +static short func_41(unsigned short p_42); +static short func_54(int * p_55); +static unsigned func_61(signed char p_62, int * p_63, int p_64, int * p_65, unsigned short p_66); +static int func_67(unsigned p_68, int p_69, int * p_70, int * p_71, unsigned char p_72); +static unsigned func_1(void) +{ + int *l_2 = &g_3; + unsigned short l_742 = 65535UL; + int *l_752 = &g_661; + step_hash(1); + (*l_2) = (-7L); + step_hash(506); + if ((((g_3 != g_3) && ((int)((unsigned short)(0xCDL && func_8(l_2, g_3, g_3, g_3)) << (unsigned short)7) - (int)((g_741 < g_741) & g_741))) == 0x5B947408L)) + { + step_hash(502); + l_742 &= (*l_2); + } + else + { + unsigned short l_751 = 0xBC5CL; + unsigned l_753 = 0xB242BADEL; + step_hash(504); + (*l_752) = func_61(((short)0L * (short)g_83), l_2, (((signed char)g_741 * (signed char)(*l_2)) != (0x4268L ^ ((short)(g_3 > ((((unsigned char)252UL + (unsigned char)l_751) <= (*l_2)) < l_751)) % (short)(*l_2)))), l_752, l_753); + step_hash(505); + (*g_194) = l_752; + } + step_hash(507); + (*l_752) &= (*l_2); + step_hash(508); + return (*l_2); +} +static signed char func_8(int * p_9, unsigned p_10, int p_11, unsigned p_12) +{ + int *l_633 = &g_634; + unsigned l_646 = 0x29B64416L; + int *l_664 = (void*)0; + int *l_676 = &g_83; + int l_692 = (-3L); + unsigned short l_739 = 0x3A21L; + step_hash(497); + if (((unsigned short)func_15(g_3, p_9) * (unsigned short)(((void*)0 == l_633) != ((short)(((((unsigned short)((unsigned short)((func_54(&g_634) ^ (((signed char)1L % (signed char)g_634) || 0xA81BL)) < (*l_633)) - (unsigned short)g_634) >> (unsigned short)(*l_633)) < (*l_633)) != g_634) ^ 4L) % (short)g_634)))) + { + int l_643 = 0x58FB8444L; + int l_686 = 5L; + unsigned char l_695 = 0UL; + int l_732 = (-1L); + step_hash(417); + (*g_194) = (void*)0; + step_hash(436); + if (l_643) + { + int l_647 = 1L; + int *l_662 = &g_661; + step_hash(419); + (**g_193) = l_633; + step_hash(431); + for (p_10 = 0; (p_10 > 15); p_10 += 1) + { + int *l_660 = &g_661; + step_hash(428); + for (l_647 = 0; (l_647 >= (-28)); l_647 -= 5) + { + unsigned l_655 = 0xEE5FB410L; + step_hash(426); + (**g_193) = g_652; + step_hash(427); + (*g_133) = (((((signed char)g_634 / (signed char)g_53) > l_655) >= (p_9 != p_9)) | l_655); + } + } + step_hash(432); + p_9 = (**g_193); + step_hash(433); + (*l_662) &= (**g_194); + } + else + { + step_hash(435); + (*g_652) = 0xA606B940L; + } + step_hash(475); + if ((*p_9)) + { + short l_663 = 0x85ECL; + step_hash(438); + (*l_633) |= ((void*)0 == &p_9); + step_hash(439); + (*g_194) = l_664; + step_hash(440); + return l_643; + } + else + { + unsigned char l_671 = 255UL; + unsigned l_691 = 0UL; + int l_705 = (-3L); + step_hash(459); + for (p_12 = 0; (p_12 < 23); ++p_12) + { + unsigned char l_683 = 0x35L; + int l_684 = 0x565244B3L; + step_hash(458); + if (((signed char)(+((((short)l_671 / (short)0x425CL) > (((void*)0 == p_9) >= 0UL)) ^ ((int)(l_664 == (**g_193)) / (int)(((signed char)p_12 << (signed char)5) & g_53)))) >> (signed char)6)) + { + int l_685 = 0xC37D6EB4L; + step_hash(446); + (*g_194) = l_676; + step_hash(451); + for (g_3 = 0; (g_3 != (-10)); g_3 -= 8) + { + step_hash(450); + (*g_194) = p_9; + } + step_hash(452); + l_686 = ((signed char)((((signed char)(((l_683 != l_684) >= p_11) >= g_634) >> (signed char)(func_41(l_685) && (p_12 == l_685))) || g_124) <= l_643) * (signed char)g_661); + step_hash(453); + (**g_193) = func_24(p_12); + } + else + { + int *l_693 = &g_634; + step_hash(455); + (*l_693) = ((signed char)((g_634 || (g_83 != ((*g_194) == (**g_193)))) < func_61(l_691, p_9, (!l_692), l_693, l_671)) / (signed char)g_83); + step_hash(456); + (*p_9) = func_61((*l_693), (**g_193), (((*l_633) | (g_3 >= func_54(g_694))) != l_695), p_9, p_10); + step_hash(457); + if ((*l_676)) + break; + } + } + step_hash(466); + for (l_671 = (-11); (l_671 == 20); l_671++) + { + int *l_698 = (void*)0; + step_hash(463); + (*g_194) = l_698; + step_hash(464); + (*g_652) |= (&l_698 == (*g_193)); + step_hash(465); + if ((*l_676)) + break; + } + step_hash(467); + (*g_652) |= 0xD0C9EE20L; + step_hash(474); + if (((unsigned char)(0xFA462446L >= (((unsigned char)((4294967289UL < (*l_633)) || ((short)0x351CL / (short)l_691)) / (unsigned char)(4294967288UL && ((void*)0 != p_9))) || p_12)) % (unsigned char)g_661)) + { + step_hash(469); + (*g_194) = &l_692; + step_hash(470); + l_705 &= func_18(g_53); + } + else + { + unsigned l_708 = 0x1C9458B4L; + step_hash(472); + (*l_676) ^= (((unsigned short)g_124 % (unsigned short)g_3) < (*l_633)); + step_hash(473); + (*p_9) = l_708; + } + } + step_hash(490); + if (func_41(g_124)) + { + signed char l_711 = 0x30L; + int *l_712 = &g_3; + step_hash(477); + (*l_676) ^= (((((unsigned short)g_634 - (unsigned short)(l_711 && g_661)) > 1UL) <= l_643) && 0x77D33AFDL); + step_hash(478); + (*p_9) = (((unsigned)l_695 - (unsigned)(*l_712)) ^ ((*l_676) > ((((((unsigned char)((unsigned)g_83 - (unsigned)((&l_664 != (void*)0) >= g_634)) % (unsigned char)(*l_676)) | (*l_712)) != (*p_9)) >= 255UL) != g_124))); + } + else + { + step_hash(486); + if ((*p_9)) + { + step_hash(481); + (**g_193) = (void*)0; + step_hash(482); + (*g_652) ^= l_695; + } + else + { + unsigned short l_723 = 65535UL; + step_hash(484); + (*l_676) = (*p_9); + step_hash(485); + (*l_633) = l_723; + } + step_hash(487); + (*g_652) = ((g_53 ^ (&g_194 == (void*)0)) != 0x7EACL); + step_hash(488); + (*g_652) = ((unsigned char)l_732 << (unsigned char)5); + step_hash(489); + (*g_652) = (+(*p_9)); + } + } + else + { + int *l_737 = &g_3; + unsigned l_738 = 7UL; + step_hash(496); + if (((+(((p_10 >= (((p_11 | (0xD6L && ((short)0xA820L * (short)((short)func_61(p_11, p_9, (*p_9), l_737, l_738) % (short)(*l_737))))) == 0xD2A164DEL) && p_10)) & g_53) || (*l_737))) & l_739)) + { + step_hash(493); + (*g_194) = l_737; + } + else + { + unsigned l_740 = 0UL; + step_hash(495); + return l_740; + } + } + step_hash(498); + (**g_193) = (*g_194); + step_hash(499); + (*p_9) = (*p_9); + step_hash(500); + return p_12; +} +static unsigned short func_15(short p_16, int * p_17) +{ + int l_20 = 0L; + unsigned l_305 = 7UL; + int l_347 = (-6L); + int *l_433 = &g_3; + unsigned l_452 = 0xD706E587L; + int ***l_470 = &g_194; + int l_485 = (-1L); + unsigned short l_555 = 0xE4DAL; + signed char l_614 = 0x0EL; + step_hash(343); + if ((func_18(l_20) || ((unsigned)l_20 % (unsigned)(2L ^ ((((~(((&p_17 == (void*)0) | (*p_17)) > p_16)) | ((((g_3 ^ p_16) & g_3) || g_83) && g_83)) ^ l_305) == l_305))))) + { + int **l_308 = &g_238; + signed char l_336 = 0x37L; + int *l_358 = &l_347; + step_hash(226); + for (l_20 = 17; (l_20 != (-8)); l_20--) + { + int *l_309 = (void*)0; + step_hash(191); + l_308 = (void*)0; + step_hash(192); + (**g_193) = l_309; + step_hash(224); + if (func_41(g_53)) + { + unsigned short l_310 = 0x6A10L; + int *l_334 = &g_53; + step_hash(194); + if (l_310) + break; + step_hash(199); + for (g_53 = (-14); (g_53 == 2); g_53 += 1) + { + step_hash(198); + if ((*p_17)) + break; + } + step_hash(218); + if (((~g_83) <= (((int)((g_53 <= 0UL) >= ((short)((*g_193) == (void*)0) - (short)((!((int)(l_305 >= ((signed char)p_16 * (signed char)0x3EL)) % (int)p_16)) <= g_124))) / (int)0x8F1FB9C7L) > p_16))) + { + unsigned l_330 = 4UL; + step_hash(201); + (*p_17) = ((signed char)g_3 * (signed char)p_16); + step_hash(208); + if ((*p_17)) + { + step_hash(203); + (**g_193) = p_17; + } + else + { + int *l_327 = &g_83; + step_hash(205); + (*l_327) ^= ((0x60527778L <= ((*g_193) == (void*)0)) < ((signed char)g_3 >> (signed char)7)); + step_hash(206); + (*l_327) |= (*p_17); + step_hash(207); + (*p_17) ^= ((unsigned char)248UL - (unsigned char)0L); + } + step_hash(209); + (*p_17) ^= l_330; + } + else + { + short l_331 = 0x48D7L; + int l_332 = (-1L); + step_hash(211); + l_332 = (l_331 | func_41(l_310)); + step_hash(217); + if ((0x50ECL && l_20)) + { + int *l_333 = &g_53; + step_hash(213); + (**g_193) = p_17; + step_hash(214); + (*p_17) = func_54(l_333); + } + else + { + step_hash(216); + (*g_194) = l_334; + } + } + } + else + { + step_hash(220); + (*p_17) |= func_54((**g_193)); + step_hash(221); + (*p_17) = l_305; + step_hash(222); + (*p_17) ^= (-(unsigned short)l_336); + step_hash(223); + (**g_193) = (*g_194); + } + step_hash(225); + (*p_17) |= 0L; + } + step_hash(251); + if (((((short)(((-4L) | ((unsigned short)((short)((unsigned short)((unsigned char)g_83 * (unsigned char)l_347) % (unsigned short)(+func_54(&l_20))) << (short)10) * (unsigned short)(l_305 != l_20))) > (((int)func_61(((1L != p_16) < 0L), p_17, (*p_17), (*g_194), g_3) % (int)g_83) == 1UL)) + (short)l_305) ^ g_53) && l_347)) + { + unsigned char l_386 = 0xDCL; + step_hash(228); + (*p_17) ^= ((unsigned char)((signed char)((void*)0 != (**g_193)) << (signed char)7) << (unsigned char)4); + step_hash(241); + if (((unsigned char)((short)((**g_193) != l_358) >> (short)7) - (unsigned char)(!func_41(((short)(p_16 | ((*l_358) != (((unsigned short)((unsigned char)(((signed char)((unsigned short)(-(unsigned short)g_124) + (unsigned short)(g_83 & (*p_17))) * (signed char)((unsigned char)((short)((int)func_54((*g_194)) - (int)0L) << (short)14) + (unsigned char)g_124)) ^ 0L) / (unsigned char)0x5EL) * (unsigned short)g_3) <= p_16))) % (short)(-8L)))))) + { + step_hash(230); + (*p_17) &= ((((signed char)(&p_17 == (*g_193)) * (signed char)p_16) || ((signed char)((((((short)(0x18A5L != (*l_358)) * (short)g_53) > l_386) && (l_386 ^ ((int)((unsigned char)((unsigned char)p_16 / (unsigned char)g_53) * (unsigned char)0x84L) + (int)p_16))) < 0x6AL) != g_124) * (signed char)(*l_358))) ^ 0xDA77L); + } + else + { + int *l_395 = &g_83; + step_hash(232); + (*l_358) = (*p_17); + step_hash(238); + for (l_386 = (-21); (l_386 != 42); ++l_386) + { + step_hash(236); + (*g_194) = l_395; + step_hash(237); + if ((*l_395)) + break; + } + step_hash(239); + (*p_17) = (((unsigned char)0x4EL * (unsigned char)((unsigned short)g_83 + (unsigned short)(func_61(func_54((**g_193)), (*g_194), (*p_17), p_17, func_61(p_16, l_395, (*p_17), p_17, g_124)) >= 1UL))) >= 0xC9A4L); + step_hash(240); + (*g_194) = (*g_194); + } + step_hash(242); + (*l_358) &= ((*g_194) != (void*)0); + step_hash(248); + for (l_336 = (-4); (l_336 != 8); l_336 += 5) + { + step_hash(246); + (**g_193) = (**g_193); + step_hash(247); + (*l_358) &= ((unsigned short)p_16 * (unsigned short)(((*p_17) < (4UL | ((short)((unsigned char)((unsigned char)(p_16 ^ ((signed char)p_16 << (signed char)0)) << (unsigned char)0) * (unsigned char)((((unsigned short)((short)0xB507L - (short)((signed char)((void*)0 != &l_308) / (signed char)g_83)) << (unsigned short)g_83) && g_53) & (*p_17))) << (short)6))) | (*p_17))); + } + } + else + { + step_hash(250); + (*l_358) &= (*p_17); + } + step_hash(252); + (*p_17) = (*p_17); + } + else + { + int *l_422 = &l_347; + int l_427 = 0x6EE753C9L; + int ***l_471 = (void*)0; + int l_521 = 0L; + step_hash(335); + if (((((unsigned char)func_41(p_16) + (unsigned char)p_16) & ((signed char)((func_54(l_422) & (((short)g_3 % (short)((signed char)func_54((**g_193)) + (signed char)((*p_17) <= 0x6D7F5B29L))) > 1UL)) && l_427) / (signed char)0x19L)) & l_347)) + { + unsigned l_428 = 0x3D3AF03EL; + step_hash(255); + (*l_422) ^= (((~(p_16 < l_428)) > g_83) > g_124); + step_hash(279); + if (((unsigned char)(p_16 <= l_428) * (unsigned char)func_54(l_433))) + { + step_hash(257); + (*g_193) = (*g_193); + step_hash(258); + (*l_422) = (*l_433); + step_hash(264); + for (l_305 = 0; (l_305 >= 7); l_305 += 4) + { + unsigned char l_436 = 0x08L; + step_hash(262); + (*p_17) |= (-1L); + step_hash(263); + if (l_436) + continue; + } + step_hash(265); + (*l_433) |= (((void*)0 == (**g_193)) <= 0UL); + } + else + { + step_hash(275); + for (l_305 = (-7); (l_305 == 13); ++l_305) + { + step_hash(274); + for (l_428 = 9; (l_428 != 32); l_428++) + { + step_hash(273); + return p_16; + } + } + step_hash(276); + (*l_422) &= (1L & ((unsigned short)((*p_17) < ((short)0xF551L + (short)l_428)) << (unsigned short)15)); + step_hash(277); + (*l_433) ^= (0x4C91L != l_428); + step_hash(278); + (*l_422) = (*p_17); + } + step_hash(280); + (*g_194) = (**g_193); + } + else + { + unsigned short l_447 = 3UL; + int ***l_462 = &g_194; + int l_476 = 0x77425FA9L; + step_hash(331); + if ((l_447 & (*l_422))) + { + unsigned char l_469 = 0x51L; + int ***l_474 = &g_194; + int l_475 = 0xC5D40D41L; + step_hash(297); + for (g_53 = (-26); (g_53 != 6); g_53 += 8) + { + unsigned char l_455 = 0x38L; + int *l_463 = (void*)0; + int l_464 = 0x7E35E3FCL; + step_hash(291); + for (l_20 = 0; (l_20 <= (-15)); --l_20) + { + step_hash(289); + (**g_193) = (**g_193); + step_hash(290); + l_452 ^= (*p_17); + } + step_hash(296); + if (((short)(l_455 | ((unsigned short)((unsigned)4294967295UL / (unsigned)(*l_433)) - (unsigned short)(*l_433))) / (short)(*l_433))) + { + step_hash(293); + return g_3; + } + else + { + step_hash(295); + return l_464; + } + } + step_hash(298); + l_476 |= (((((unsigned short)0xD9B8L >> (unsigned short)((unsigned)l_469 / (unsigned)l_469)) > (((l_470 != l_471) && g_3) | ((short)p_16 >> (short)p_16))) & func_61((((&g_194 != l_474) & (-1L)) | l_469), (*g_194), (*l_433), p_17, l_475)) ^ p_16); + step_hash(312); + if (((signed char)func_41(((l_476 | 0xD7L) <= ((void*)0 == l_470))) << (signed char)2)) + { + int l_496 = (-1L); + step_hash(300); + (*p_17) = ((short)g_124 << (short)((short)p_16 * (short)(((short)l_485 >> (short)10) > (g_53 == 0x039EL)))); + step_hash(301); + (*l_433) = (*p_17); + step_hash(302); + (*p_17) = ((*l_422) >= ((g_124 && ((l_471 != l_474) == 65528UL)) <= p_16)); + step_hash(303); + (*l_433) = (*p_17); + } + else + { + unsigned char l_505 = 254UL; + step_hash(311); + if ((*p_17)) + { + step_hash(306); + p_17 = p_17; + step_hash(307); + (**g_193) = p_17; + } + else + { + unsigned short l_512 = 0UL; + step_hash(309); + g_83 ^= ((unsigned)((((p_16 & (((unsigned short)g_3 - (unsigned short)g_53) ^ ((unsigned short)p_16 - (unsigned short)func_54((**l_470))))) <= ((short)l_505 % (short)((short)(((short)0L << (short)((signed char)(p_16 || g_124) % (signed char)p_16)) <= g_124) * (short)p_16))) > g_3) <= l_512) % (unsigned)l_505); + step_hash(310); + (*l_433) = (((((signed char)((short)0xF6F1L << (short)15) << (signed char)p_16) || 0x03L) <= ((short)((unsigned char)(l_521 & p_16) / (unsigned char)(-6L)) << (short)p_16)) >= (*l_433)); + } + } + } + else + { + unsigned l_528 = 0x281D47B4L; + int *l_529 = &g_83; + step_hash(327); + for (l_485 = 2; (l_485 <= 17); l_485++) + { + int *l_524 = &g_3; + int ***l_527 = &g_194; + step_hash(317); + p_17 = (void*)0; + step_hash(318); + if (p_16) + break; + step_hash(326); + if (p_16) + { + step_hash(320); + (**l_462) = (*g_194); + step_hash(321); + (*l_433) = (l_527 != l_470); + } + else + { + step_hash(323); + (*l_422) |= p_16; + step_hash(324); + (*l_433) &= l_528; + step_hash(325); + (*l_433) = (p_16 <= 1UL); + } + } + step_hash(328); + (**l_470) = l_529; + step_hash(329); + (**g_193) = (void*)0; + step_hash(330); + (*g_194) = p_17; + } + step_hash(332); + (*g_194) = (**l_470); + step_hash(333); + (**l_470) = (*g_194); + step_hash(334); + (**l_462) = p_17; + } + step_hash(336); + (*l_422) = (-(unsigned char)((short)((unsigned char)(&p_17 != (void*)0) / (unsigned char)(((unsigned short)0UL >> (unsigned short)(l_471 != (void*)0)) | p_16)) << (short)1)); + step_hash(337); + (*l_433) = (*l_433); + step_hash(342); + for (l_452 = 15; (l_452 != 6); l_452 -= 1) + { + step_hash(341); + (*l_433) = (*l_422); + } + } + step_hash(344); + (**l_470) = p_17; + step_hash(413); + for (g_83 = 0; (g_83 > (-26)); g_83 -= 8) + { + int *l_541 = &g_83; + step_hash(348); + (*g_194) = l_541; + step_hash(412); + for (l_347 = 0; (l_347 > (-7)); --l_347) + { + int l_556 = 0L; + int *l_585 = (void*)0; + unsigned short l_586 = 0x217CL; + int ***l_593 = (void*)0; + unsigned short l_627 = 0xEC1CL; + int *l_632 = &l_347; + step_hash(390); + if (func_54((**l_470))) + { + unsigned l_569 = 0UL; + step_hash(364); + for (l_20 = 12; (l_20 >= 3); l_20 -= 8) + { + int **l_552 = (void*)0; + step_hash(356); + (*l_433) = ((unsigned char)p_16 + (unsigned char)g_53); + step_hash(361); + for (g_3 = (-1); (g_3 != (-24)); --g_3) + { + step_hash(360); + g_53 = (p_16 ^ p_16); + } + step_hash(362); + (*l_433) = (**g_194); + step_hash(363); + (*l_433) &= ((((int)(l_552 != l_552) % (int)p_16) == ((unsigned short)2UL << (unsigned short)6)) <= l_555); + } + step_hash(365); + (**g_193) = (**l_470); + step_hash(371); + if ((((252UL < 0L) ^ l_556) == ((-(unsigned)((unsigned short)((short)(***l_470) >> (short)4) * (unsigned short)((((func_54(&l_556) || ((unsigned char)(p_16 != ((unsigned short)((unsigned)0x33D65060L / (unsigned)(***g_193)) << (unsigned short)1)) >> (unsigned char)4)) != 2L) & (***g_193)) && (*l_541)))) >= 0xE431F0F9L))) + { + unsigned short l_568 = 0xA9D6L; + step_hash(367); + (*l_433) = (***g_193); + step_hash(368); + (*l_433) &= l_568; + } + else + { + step_hash(370); + l_569 ^= (-6L); + } + step_hash(372); + (*l_433) = ((((0x8DA1DDBEL ^ ((int)func_61(((((short)func_61((~0x87L), (*g_194), (((unsigned short)((unsigned char)((int)((short)((g_3 <= 4UL) & (-(unsigned short)0x452EL)) * (short)p_16) - (int)(((signed char)(*l_541) % (signed char)(((*l_433) | 65535UL) ^ 4294967295UL)) & l_569)) % (unsigned char)g_83) % (unsigned short)0x1AA9L) < 0UL), l_541, p_16) % (short)4UL) > 0xC3D6L) >= g_53), l_585, p_16, l_541, g_124) + (int)(-1L))) == 9UL) | l_586) ^ 0xC72EL); + } + else + { + int *l_592 = &l_347; + step_hash(389); + for (l_556 = (-20); (l_556 != 5); ++l_556) + { + short l_591 = 0x4FA7L; + int *l_610 = &l_556; + step_hash(381); + for (l_305 = (-28); (l_305 < 54); ++l_305) + { + step_hash(380); + l_591 ^= ((void*)0 == &p_17); + } + step_hash(382); + (**g_193) = l_592; + step_hash(388); + if ((((p_16 & ((((void*)0 != l_593) > (!(((unsigned char)(((unsigned char)((unsigned short)65535UL + (unsigned short)((unsigned short)(((void*)0 != (*g_194)) == (0x8737L >= (((signed char)((unsigned short)(p_16 && func_61(((signed char)(p_16 > 0xFCL) << (signed char)4), l_610, p_16, p_17, (*l_433))) % (unsigned short)p_16) * (signed char)g_124) != g_3))) + (unsigned short)p_16)) * (unsigned char)(*l_592)) > (*l_433)) << (unsigned char)(*l_610)) <= g_83))) >= (*l_541))) >= 250UL) || g_124)) + { + int *l_611 = &l_20; + step_hash(384); + (*l_611) &= func_61((((***l_470) >= p_16) | func_54((**l_470))), (**l_470), (!(*l_541)), l_610, (*l_541)); + step_hash(385); + (*l_433) = ((signed char)g_83 * (signed char)g_124); + } + else + { + step_hash(387); + return l_614; + } + } + } + step_hash(409); + if (func_61((***l_470), p_17, p_16, (**g_193), (-(unsigned)7UL))) + { + int *l_616 = &l_20; + int ***l_617 = &g_194; + unsigned char l_629 = 0x50L; + step_hash(392); + l_541 = l_616; + step_hash(393); + if ((*l_616)) + break; + step_hash(401); + if ((0L >= ((void*)0 == l_617))) + { + int ***l_622 = &g_194; + step_hash(395); + (*l_541) = ((((short)(((unsigned char)(l_622 == l_622) >> (unsigned char)((signed char)((*g_193) != &p_17) << (signed char)7)) & ((unsigned short)(l_627 != func_54(p_17)) + (unsigned short)(func_54((*g_194)) >= (***l_622)))) - (short)0xC4F2L) & p_16) < g_83); + } + else + { + int *l_628 = &g_53; + step_hash(397); + (*g_194) = l_628; + step_hash(398); + if (l_629) + break; + step_hash(399); + (*l_433) = 0x21F01897L; + step_hash(400); + (**l_470) = (**g_193); + } + } + else + { + step_hash(407); + for (p_16 = 18; (p_16 == 18); ++p_16) + { + step_hash(406); + g_53 = (((void*)0 != &p_17) >= (!0x57L)); + } + step_hash(408); + (**g_193) = l_632; + } + step_hash(410); + (*l_433) = (*l_541); + step_hash(411); + return p_16; + } + } + step_hash(414); + (*g_194) = (**g_193); + step_hash(415); + return p_16; +} +static unsigned char func_18(signed char p_19) +{ + unsigned char l_23 = 0x58L; + int l_26 = 1L; + int **l_301 = &g_238; + int *l_302 = &g_83; + step_hash(9); + for (g_3 = 12; (g_3 != 0); g_3--) + { + step_hash(8); + if (l_23) + break; + } + step_hash(183); + (**g_193) = func_24(l_26); + step_hash(184); + (*l_302) = ((signed char)(l_301 != (void*)0) + (signed char)((p_19 | 4294967295UL) >= ((+g_3) >= p_19))); + step_hash(185); + (*l_302) = (~(+((**g_193) == (*l_301)))); + step_hash(186); + return (*l_302); +} +static int * func_24(int p_25) +{ + unsigned char l_33 = 0x02L; + int l_218 = (-1L); + int ***l_225 = &g_194; + unsigned char l_234 = 0x00L; + int *l_297 = (void*)0; + int *l_298 = &l_218; + step_hash(180); + if ((((unsigned char)(((short)p_25 << (short)12) != (+g_3)) % (unsigned char)((unsigned short)l_33 >> (unsigned short)func_34(&g_3, ((short)((short)0x4F4CL * (short)func_41((((g_3 & ((signed char)l_33 % (signed char)p_25)) ^ ((unsigned char)((unsigned short)(((-8L) != 0UL) == g_3) << (unsigned short)3) << (unsigned char)g_3)) == l_33))) / (short)p_25)))) < g_3)) + { + int *l_214 = &g_53; + int ***l_217 = &g_194; + step_hash(110); + (*l_214) = (((unsigned)(p_25 < p_25) + (unsigned)(65527UL <= l_33)) != ((signed char)((p_25 < (l_214 == (void*)0)) <= ((unsigned short)(l_217 != (void*)0) - (unsigned short)p_25)) * (signed char)p_25)); + step_hash(111); + l_218 = ((**l_217) == (void*)0); + step_hash(176); + if (l_33) + { + int ***l_224 = (void*)0; + step_hash(133); + if (p_25) + { + int *l_219 = &l_218; + step_hash(129); + if ((&l_218 == l_219)) + { + int *l_235 = &g_53; + step_hash(123); + if (((((unsigned char)(((unsigned char)p_25 * (unsigned char)0x28L) | (p_25 == (((((6L && (p_25 > g_124)) <= ((**l_217) == (*g_194))) < ((l_224 != l_225) || 0L)) ^ g_83) > 0L))) / (unsigned char)g_83) || p_25) ^ g_3)) + { + step_hash(116); + (*l_214) = (((unsigned short)p_25 - (unsigned short)((*l_225) != (*g_193))) <= (4294967295UL >= g_53)); + step_hash(117); + (*l_214) ^= p_25; + } + else + { + step_hash(119); + (**l_217) = l_219; + step_hash(120); + (**g_194) = (*g_133); + step_hash(121); + (***l_217) = (***g_193); + step_hash(122); + (*g_133) = (func_61((((unsigned)p_25 + (unsigned)1L) >= (((short)((signed char)l_234 * (signed char)g_83) << (short)2) >= 0x115AL)), (*g_194), (***l_225), l_235, g_53) ^ (***l_225)); + } + step_hash(124); + l_219 = l_235; + step_hash(125); + (*l_219) = ((unsigned short)((4294967295UL == p_25) && 0L) - (unsigned short)0x4BD2L); + step_hash(126); + (**g_193) = g_238; + } + else + { + step_hash(128); + (*l_219) ^= ((unsigned char)(p_25 >= (-8L)) >> (unsigned char)2); + } + step_hash(130); + g_83 &= ((*l_219) == g_124); + } + else + { + step_hash(132); + return (*g_194); + } + } + else + { + unsigned short l_243 = 9UL; + int *l_244 = &g_53; + unsigned l_283 = 0xFF36FFF5L; + step_hash(175); + if ((g_53 | (((short)l_243 % (short)65529UL) ^ (*l_214)))) + { + int **l_268 = &l_244; + step_hash(136); + (*g_194) = l_244; + step_hash(137); + (***g_193) = ((***l_225) == 1UL); + step_hash(156); + if ((***g_193)) + { + int ***l_251 = &g_194; + step_hash(144); + for (g_124 = 0; (g_124 != 36); g_124++) + { + step_hash(142); + (**g_194) |= 0xEB8BAC61L; + step_hash(143); + (***l_217) = ((void*)0 != l_251); + } + step_hash(150); + for (l_218 = (-18); (l_218 == 25); l_218++) + { + step_hash(148); + (***g_193) = (-3L); + step_hash(149); + (**l_217) = (**l_225); + } + step_hash(151); + (**l_268) = ((short)0x68F2L * (short)((unsigned char)(0x59070625L ^ (g_83 | p_25)) - (unsigned char)((int)(-3L) - (int)((unsigned short)((short)g_3 << (short)g_53) % (unsigned short)((short)((short)(((void*)0 == l_268) != 0x86A66762L) - (short)(*l_244)) << (short)(***l_225)))))); + step_hash(152); + (**l_217) = (*g_194); + } + else + { + unsigned l_277 = 4UL; + step_hash(154); + (*l_214) = ((func_61(g_3, (**l_217), (g_53 < (p_25 ^ 0UL)), (**g_193), g_83) == g_53) != p_25); + step_hash(155); + (*l_244) &= ((signed char)p_25 + (signed char)((short)((signed char)((unsigned short)l_277 >> (unsigned short)3) << (signed char)3) >> (short)2)); + } + } + else + { + int ***l_280 = &g_194; + int l_284 = 3L; + step_hash(158); + l_284 &= ((unsigned short)(((*l_225) != (*g_193)) || ((~((p_25 || ((void*)0 != l_280)) | func_61((p_25 ^ ((short)func_61(g_3, (**l_217), (l_283 <= g_3), (**l_280), p_25) >> (short)14)), (*g_194), (*l_244), (**g_193), (*l_244)))) != p_25)) % (unsigned short)(*l_214)); + step_hash(173); + for (l_33 = (-16); (l_33 >= 8); l_33 += 6) + { + step_hash(166); + for (g_3 = 0; (g_3 != (-13)); g_3--) + { + unsigned short l_289 = 8UL; + step_hash(165); + (*l_214) = l_289; + } + step_hash(172); + if (p_25) + { + step_hash(168); + (*l_214) = ((**l_280) == (*g_194)); + step_hash(169); + (*l_214) &= 0xDA774B31L; + } + else + { + step_hash(171); + (**g_193) = (**l_280); + } + } + step_hash(174); + (*l_244) ^= p_25; + } + } + step_hash(177); + (*l_214) ^= 1L; + } + else + { + step_hash(179); + (**g_193) = (*g_194); + } + step_hash(181); + (*l_298) = ((unsigned char)p_25 + (unsigned char)func_54((**g_193))); + step_hash(182); + return (**g_193); +} +static short func_34(int * p_35, int p_36) +{ + int l_88 = 0x09715B7DL; + unsigned short l_93 = 0xF5EEL; + int *l_102 = &g_83; + signed char l_115 = 0xDCL; + int *l_118 = &g_83; + unsigned l_125 = 0x60C92991L; + int *l_134 = &g_83; + int **l_139 = &l_102; + short l_156 = 1L; + unsigned char l_190 = 0UL; + step_hash(32); + (*l_102) = ((unsigned char)((func_54(p_35) != l_88) ^ ((int)((unsigned char)l_93 << (unsigned char)((unsigned char)((((func_61(((unsigned char)((unsigned short)(~0x7968L) % (unsigned short)((unsigned short)g_83 << (unsigned short)1)) << (unsigned char)3), &g_83, l_88, p_35, l_93) != l_93) || 255UL) < p_36) ^ 0xCEL) / (unsigned char)0xB1L)) + (int)p_36)) >> (unsigned char)3); + step_hash(73); + if (g_83) + { + int **l_103 = &l_102; + unsigned l_116 = 4294967291UL; + int *l_123 = &g_3; + int *l_128 = &l_88; + step_hash(34); + (*l_103) = &g_83; + step_hash(42); + if ((((signed char)(((&p_35 == l_103) & (*l_102)) & g_83) << (signed char)5) & func_61(((g_53 || ((short)(g_3 > (*l_102)) << (short)(**l_103))) < (5L && (*l_102))), &l_88, (*p_35), (*l_103), (**l_103)))) + { + short l_108 = 0x85BBL; + step_hash(36); + (*l_103) = &l_88; + step_hash(37); + return l_108; + } + else + { + int *l_117 = &g_53; + step_hash(39); + (*l_102) = func_41((((int)((unsigned)(((unsigned char)g_53 * (unsigned char)6UL) || l_115) + (unsigned)(func_54(&l_88) != func_67((l_116 >= p_36), p_36, l_117, p_35, (**l_103)))) % (int)(-8L)) ^ g_3)); + step_hash(40); + l_118 = p_35; + step_hash(41); + g_124 |= (((int)((*l_103) == l_123) % (int)g_3) > ((((((*l_117) < func_67(p_36, ((**l_103) & ((~func_54((*l_103))) & p_36)), p_35, &g_83, g_3)) ^ g_53) >= p_36) ^ (-8L)) == (*p_35))); + } + step_hash(68); + if (l_125) + { + step_hash(48); + for (l_116 = 0; (l_116 >= 38); l_116 += 2) + { + step_hash(47); + (*l_102) ^= (l_128 == p_35); + } + step_hash(49); + (*l_103) = &g_83; + step_hash(58); + for (g_124 = (-14); (g_124 > 7); ++g_124) + { + step_hash(57); + for (l_116 = 22; (l_116 == 58); ++l_116) + { + step_hash(56); + if ((*p_35)) + break; + } + } + step_hash(59); + g_133 = (void*)0; + } + else + { + step_hash(66); + if (((*l_103) != l_134)) + { + int ***l_135 = &l_103; + step_hash(62); + p_35 = p_35; + step_hash(63); + (*l_135) = &g_133; + } + else + { + step_hash(65); + (*l_103) = (void*)0; + } + step_hash(67); + return (*l_134); + } + } + else + { + int *l_138 = &g_53; + step_hash(70); + (*l_102) ^= ((unsigned short)(l_138 == (void*)0) % (unsigned short)p_36); + step_hash(71); + g_53 ^= (*g_133); + step_hash(72); + return g_124; + } + step_hash(74); + (*l_139) = &l_88; + step_hash(107); + if ((*l_118)) + { + int l_145 = 0xE211E8D5L; + int l_171 = (-8L); + int *l_192 = &l_171; + int ***l_195 = &g_194; + step_hash(91); + for (p_36 = (-20); (p_36 == 28); p_36 += 3) + { + signed char l_153 = 0xC5L; + int *l_157 = &g_53; + } + step_hash(92); + (*l_139) = &g_3; + step_hash(103); + for (l_145 = 0; (l_145 <= (-15)); --l_145) + { + unsigned short l_191 = 0UL; + int l_209 = 0x7FFFD43EL; + step_hash(101); + if (((+((unsigned char)((((unsigned char)(((unsigned short)(255UL || ((unsigned)(*l_118) - (unsigned)func_41((((((short)p_36 + (short)(~(((short)g_53 + (short)g_53) | g_53))) <= ((void*)0 == &g_133)) || ((unsigned)((unsigned char)g_3 - (unsigned char)p_36) / (unsigned)(*p_35))) && l_190)))) - (unsigned short)0x0311L) ^ l_145) / (unsigned char)0x08L) ^ l_191) & 9L) + (unsigned char)g_3)) | 0x91350E28L)) + { + step_hash(97); + l_192 = &g_53; + step_hash(98); + (*l_134) &= (g_193 != l_195); + } + else + { + unsigned l_208 = 4294967289UL; + step_hash(100); + l_209 = ((unsigned)0x2ACCF633L - (unsigned)(((p_36 <= ((short)0x4944L + (short)(((((unsigned char)(&g_194 == &l_139) * (unsigned char)((short)(-9L) % (short)p_36)) ^ (((short)((!(g_53 & ((short)(((g_124 >= (*p_35)) > p_36) != l_191) >> (short)8))) != p_36) + (short)p_36) & 4UL)) < l_208) >= (*l_192)))) ^ 0L) & l_208)); + } + step_hash(102); + (*l_139) = (*g_194); + } + } + else + { + step_hash(105); + (*l_134) ^= ((**l_139) ^ (*p_35)); + step_hash(106); + (*l_102) &= (*p_35); + } + step_hash(108); + return p_36; +} +static short func_41(unsigned short p_42) +{ + int *l_51 = (void*)0; + int *l_52 = &g_53; + step_hash(12); + (*l_52) = 0x3BE41B0CL; + step_hash(29); + (*l_52) = (func_54(&g_3) | ((((g_53 != func_54(l_51)) >= ((*l_52) > ((unsigned short)((&g_53 == (void*)0) || ((unsigned)func_61((func_67((*l_52), g_3, l_52, l_52, (*l_52)) ^ g_53), &g_53, (*l_52), l_52, g_53) - (unsigned)g_53)) << (unsigned short)10))) > 0xE3L) & 4UL)); + step_hash(30); + return p_42; +} +static short func_54(int * p_55) +{ + unsigned l_56 = 1UL; + step_hash(14); + return l_56; +} +static unsigned func_61(signed char p_62, int * p_63, int p_64, int * p_65, unsigned short p_66) +{ + int **l_85 = (void*)0; + int ***l_84 = &l_85; + step_hash(27); + (*l_84) = (void*)0; + step_hash(28); + return g_3; +} +static int func_67(unsigned p_68, int p_69, int * p_70, int * p_71, unsigned char p_72) +{ + unsigned l_78 = 0x5E5AB8BFL; + int *l_82 = &g_83; + step_hash(23); + for (p_68 = 0; (p_68 < 7); ++p_68) + { + int l_75 = 6L; + int *l_79 = &l_75; + step_hash(19); + l_75 = ((&g_53 != &g_53) | 0L); + step_hash(20); + l_75 = ((g_3 & (l_75 <= p_72)) | l_78); + step_hash(21); + (*l_79) &= func_54(&l_75); + step_hash(22); + if ((*p_70)) + break; + } + step_hash(24); + (*l_82) = ((signed char)l_78 + (signed char)l_78); + step_hash(25); + return (*p_71); +} +void csmith_compute_hash(void) +{ + transparent_crc(g_3, "g_3", print_hash_value); + transparent_crc(g_53, "g_53", print_hash_value); + transparent_crc(g_83, "g_83", print_hash_value); + transparent_crc(g_124, "g_124", print_hash_value); + transparent_crc(g_634, "g_634", print_hash_value); + transparent_crc(g_661, "g_661", print_hash_value); + transparent_crc(g_741, "g_741", print_hash_value); +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand6.expect b/src/tests/csmith/rand6.expect new file mode 100644 index 0000000..378e562 --- /dev/null +++ b/src/tests/csmith/rand6.expect @@ -0,0 +1,72 @@ +...checksum after hashing g_3 : 99F8B879 +...checksum after hashing g_53 : 6366719D +...checksum after hashing g_83 : EB9FE8F3 +...checksum after hashing g_124 : 2E45A1D6 +...checksum after hashing g_634 : 21C305BE +...checksum after hashing g_661 : A827906E +...checksum after hashing g_741 : 5F3F75A0 +before stmt(1): checksum = 5F3F75A0 +...checksum after hashing g_3 : DA94A023 +...checksum after hashing g_53 : F37E5812 +...checksum after hashing g_83 : 1B2D38EC +...checksum after hashing g_124 : C0F8ED09 +...checksum after hashing g_634 : 30ADC75F +...checksum after hashing g_661 : C50192C6 +...checksum after hashing g_741 : 24B90EE5 +before stmt(506): checksum = 24B90EE5 +...checksum after hashing g_3 : DA94A023 +...checksum after hashing g_53 : F37E5812 +...checksum after hashing g_83 : 1B2D38EC +...checksum after hashing g_124 : C0F8ED09 +...checksum after hashing g_634 : 30ADC75F +...checksum after hashing g_661 : C50192C6 +...checksum after hashing g_741 : 24B90EE5 +before stmt(504): checksum = 24B90EE5 +...checksum after hashing g_3 : DA94A023 +...checksum after hashing g_53 : F37E5812 +...checksum after hashing g_83 : 1B2D38EC +...checksum after hashing g_124 : C0F8ED09 +...checksum after hashing g_634 : 30ADC75F +...checksum after hashing g_661 : C50192C6 +...checksum after hashing g_741 : 24B90EE5 +before stmt(27): checksum = 24B90EE5 +...checksum after hashing g_3 : DA94A023 +...checksum after hashing g_53 : F37E5812 +...checksum after hashing g_83 : 1B2D38EC +...checksum after hashing g_124 : C0F8ED09 +...checksum after hashing g_634 : 30ADC75F +...checksum after hashing g_661 : C50192C6 +...checksum after hashing g_741 : 24B90EE5 +before stmt(28): checksum = 24B90EE5 +...checksum after hashing g_3 : DA94A023 +...checksum after hashing g_53 : F37E5812 +...checksum after hashing g_83 : 1B2D38EC +...checksum after hashing g_124 : C0F8ED09 +...checksum after hashing g_634 : 30ADC75F +...checksum after hashing g_661 : E06ACD1A +...checksum after hashing g_741 : E2D60762 +before stmt(505): checksum = E2D60762 +...checksum after hashing g_3 : DA94A023 +...checksum after hashing g_53 : F37E5812 +...checksum after hashing g_83 : 1B2D38EC +...checksum after hashing g_124 : C0F8ED09 +...checksum after hashing g_634 : 30ADC75F +...checksum after hashing g_661 : E06ACD1A +...checksum after hashing g_741 : E2D60762 +before stmt(507): checksum = E2D60762 +...checksum after hashing g_3 : DA94A023 +...checksum after hashing g_53 : F37E5812 +...checksum after hashing g_83 : 1B2D38EC +...checksum after hashing g_124 : C0F8ED09 +...checksum after hashing g_634 : 30ADC75F +...checksum after hashing g_661 : E06ACD1A +...checksum after hashing g_741 : E2D60762 +before stmt(508): checksum = E2D60762 +...checksum after hashing g_3 : DA94A023 +...checksum after hashing g_53 : F37E5812 +...checksum after hashing g_83 : 1B2D38EC +...checksum after hashing g_124 : C0F8ED09 +...checksum after hashing g_634 : 30ADC75F +...checksum after hashing g_661 : E06ACD1A +...checksum after hashing g_741 : E2D60762 +checksum = e2d60762 diff --git a/src/tests/csmith/rand60.c b/src/tests/csmith/rand60.c new file mode 100644 index 0000000..c1bf0b9 --- /dev/null +++ b/src/tests/csmith/rand60.c @@ -0,0 +1,113 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static int g_2 = 0L; +static int g_5[6][7] = {{0x19AC196AL, 7L, 0xA12B57E8L, 7L, 0x19AC196AL, 7L, 0xA12B57E8L}, {0x19AC196AL, 7L, 0xA12B57E8L, 7L, 0x19AC196AL, 7L, 0xA12B57E8L}, {0x19AC196AL, 7L, 0xA12B57E8L, 7L, 0x19AC196AL, 7L, 0xA12B57E8L}, {0x19AC196AL, 7L, 0xA12B57E8L, 7L, 0x19AC196AL, 7L, 0xA12B57E8L}, {0x19AC196AL, 7L, 0xA12B57E8L, 7L, 0x19AC196AL, 7L, 0xA12B57E8L}, {0x19AC196AL, 7L, 0xA12B57E8L, 7L, 0x19AC196AL, 7L, 0xA12B57E8L}}; +static int g_11 = 0xF0B101AAL; +static unsigned short func_1(void); +static unsigned short func_1(void) +{ + signed char l_12 = 0x33L; + step_hash(9); + for (g_2 = 16; (g_2 <= (-11)); g_2--) + { + step_hash(8); + for (g_5[0][1] = 0; (g_5[0][1] == 18); g_5[0][1] += 4) + { + int *l_10 = &g_11; + step_hash(7); + (*l_10) = ((signed char)g_5[0][1] << (signed char)7); + } + } + step_hash(10); + return l_12; +} +void csmith_compute_hash(void) +{ + int i, j; + transparent_crc(g_2, "g_2", print_hash_value); + for (i = 0; i < 6; i++) + { + for (j = 0; j < 7; j++) + { + transparent_crc(g_5[i][j], "g_5[i][j]", print_hash_value); + if (print_hash_value) printf("index = [%d][%d]\n", i, j); + } + } + transparent_crc(g_11, "g_11", print_hash_value); +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int i, j; + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand60.expect b/src/tests/csmith/rand60.expect new file mode 100644 index 0000000..048b9df --- /dev/null +++ b/src/tests/csmith/rand60.expect @@ -0,0 +1,261 @@ +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_5[i][j] : 44970BD4 +index = [0][0] +...checksum after hashing g_5[i][j] : 5641BFDE +index = [0][1] +...checksum after hashing g_5[i][j] : EF3E1DEB +index = [0][2] +...checksum after hashing g_5[i][j] : D863F52B +index = [0][3] +...checksum after hashing g_5[i][j] : 215F027 +index = [0][4] +...checksum after hashing g_5[i][j] : ED0984CA +index = [0][5] +...checksum after hashing g_5[i][j] : 7C68785B +index = [0][6] +...checksum after hashing g_5[i][j] : B2886652 +index = [1][0] +...checksum after hashing g_5[i][j] : 47F857FD +index = [1][1] +...checksum after hashing g_5[i][j] : A5FFA920 +index = [1][2] +...checksum after hashing g_5[i][j] : FF908461 +index = [1][3] +...checksum after hashing g_5[i][j] : 39144D0C +index = [1][4] +...checksum after hashing g_5[i][j] : FFAC19D3 +index = [1][5] +...checksum after hashing g_5[i][j] : 847B7209 +index = [1][6] +...checksum after hashing g_5[i][j] : C921F11 +index = [2][0] +...checksum after hashing g_5[i][j] : 98D97A1 +index = [2][1] +...checksum after hashing g_5[i][j] : 76A76E5E +index = [2][2] +...checksum after hashing g_5[i][j] : 8D288739 +index = [2][3] +...checksum after hashing g_5[i][j] : A7FCE0B8 +index = [2][4] +...checksum after hashing g_5[i][j] : 3D0CC98A +index = [2][5] +...checksum after hashing g_5[i][j] : 649A1864 +index = [2][6] +...checksum after hashing g_5[i][j] : 67F15EEC +index = [3][0] +...checksum after hashing g_5[i][j] : 98693E98 +index = [3][1] +...checksum after hashing g_5[i][j] : 90372AA0 +index = [3][2] +...checksum after hashing g_5[i][j] : A42A0EE6 +index = [3][3] +...checksum after hashing g_5[i][j] : 47AB9396 +index = [3][4] +...checksum after hashing g_5[i][j] : 7EA6EE65 +index = [3][5] +...checksum after hashing g_5[i][j] : 6CB95D26 +index = [3][6] +...checksum after hashing g_5[i][j] : 90CF7E22 +index = [4][0] +...checksum after hashing g_5[i][j] : 54AA9D8F +index = [4][1] +...checksum after hashing g_5[i][j] : F4C2ACA9 +index = [4][2] +...checksum after hashing g_5[i][j] : 1F8E96E7 +index = [4][3] +...checksum after hashing g_5[i][j] : 9ACF0E52 +index = [4][4] +...checksum after hashing g_5[i][j] : 8BB1BC5D +index = [4][5] +...checksum after hashing g_5[i][j] : FE4AF5B3 +index = [4][6] +...checksum after hashing g_5[i][j] : ECAA237A +index = [5][0] +...checksum after hashing g_5[i][j] : 7F4EA5D4 +index = [5][1] +...checksum after hashing g_5[i][j] : 54185F8A +index = [5][2] +...checksum after hashing g_5[i][j] : B78AD5C3 +index = [5][3] +...checksum after hashing g_5[i][j] : 7B22EB7C +index = [5][4] +...checksum after hashing g_5[i][j] : 58A82954 +index = [5][5] +...checksum after hashing g_5[i][j] : FC40EA54 +index = [5][6] +...checksum after hashing g_11 : E65B1D1E +before stmt(9): checksum = E65B1D1E +...checksum after hashing g_2 : 715D8883 +...checksum after hashing g_5[i][j] : 382C3AFF +index = [0][0] +...checksum after hashing g_5[i][j] : 5A595222 +index = [0][1] +...checksum after hashing g_5[i][j] : 9192375 +index = [0][2] +...checksum after hashing g_5[i][j] : 38A55E0E +index = [0][3] +...checksum after hashing g_5[i][j] : 7D7E8F1A +index = [0][4] +...checksum after hashing g_5[i][j] : F656551A +index = [0][5] +...checksum after hashing g_5[i][j] : 613116B2 +index = [0][6] +...checksum after hashing g_5[i][j] : 53C9040E +index = [1][0] +...checksum after hashing g_5[i][j] : B31F5403 +index = [1][1] +...checksum after hashing g_5[i][j] : 6AEF25C3 +index = [1][2] +...checksum after hashing g_5[i][j] : 926C4523 +index = [1][3] +...checksum after hashing g_5[i][j] : 136E9299 +index = [1][4] +...checksum after hashing g_5[i][j] : FD8C22E2 +index = [1][5] +...checksum after hashing g_5[i][j] : 9F58A232 +index = [1][6] +...checksum after hashing g_5[i][j] : 92FDEB0C +index = [2][0] +...checksum after hashing g_5[i][j] : ECE10AC4 +index = [2][1] +...checksum after hashing g_5[i][j] : 96BC7090 +index = [2][2] +...checksum after hashing g_5[i][j] : 43EB994 +index = [2][3] +...checksum after hashing g_5[i][j] : BEF467A9 +index = [2][4] +...checksum after hashing g_5[i][j] : 9D61D6BD +index = [2][5] +...checksum after hashing g_5[i][j] : 18998A33 +index = [2][6] +...checksum after hashing g_5[i][j] : BD226BBD +index = [3][0] +...checksum after hashing g_5[i][j] : 56BDC32 +index = [3][1] +...checksum after hashing g_5[i][j] : A40F5A74 +index = [3][2] +...checksum after hashing g_5[i][j] : 6FC60036 +index = [3][3] +...checksum after hashing g_5[i][j] : 951CA0DD +index = [3][4] +...checksum after hashing g_5[i][j] : D7C7E117 +index = [3][5] +...checksum after hashing g_5[i][j] : 753F33A6 +index = [3][6] +...checksum after hashing g_5[i][j] : 366DB93E +index = [4][0] +...checksum after hashing g_5[i][j] : 79012DDB +index = [4][1] +...checksum after hashing g_5[i][j] : 7DDFF31B +index = [4][2] +...checksum after hashing g_5[i][j] : A41D2EE3 +index = [4][3] +...checksum after hashing g_5[i][j] : D83F8570 +index = [4][4] +...checksum after hashing g_5[i][j] : E084EE88 +index = [4][5] +...checksum after hashing g_5[i][j] : F8A93CA0 +index = [4][6] +...checksum after hashing g_5[i][j] : AC4873DE +index = [5][0] +...checksum after hashing g_5[i][j] : CB6FD5C8 +index = [5][1] +...checksum after hashing g_5[i][j] : 5AB5BD8B +index = [5][2] +...checksum after hashing g_5[i][j] : 594159CB +index = [5][3] +...checksum after hashing g_5[i][j] : 3905E08D +index = [5][4] +...checksum after hashing g_5[i][j] : 283025AE +index = [5][5] +...checksum after hashing g_5[i][j] : F51C94DD +index = [5][6] +...checksum after hashing g_11 : 47B70B09 +before stmt(10): checksum = 47B70B09 +...checksum after hashing g_2 : 715D8883 +...checksum after hashing g_5[i][j] : 382C3AFF +index = [0][0] +...checksum after hashing g_5[i][j] : 5A595222 +index = [0][1] +...checksum after hashing g_5[i][j] : 9192375 +index = [0][2] +...checksum after hashing g_5[i][j] : 38A55E0E +index = [0][3] +...checksum after hashing g_5[i][j] : 7D7E8F1A +index = [0][4] +...checksum after hashing g_5[i][j] : F656551A +index = [0][5] +...checksum after hashing g_5[i][j] : 613116B2 +index = [0][6] +...checksum after hashing g_5[i][j] : 53C9040E +index = [1][0] +...checksum after hashing g_5[i][j] : B31F5403 +index = [1][1] +...checksum after hashing g_5[i][j] : 6AEF25C3 +index = [1][2] +...checksum after hashing g_5[i][j] : 926C4523 +index = [1][3] +...checksum after hashing g_5[i][j] : 136E9299 +index = [1][4] +...checksum after hashing g_5[i][j] : FD8C22E2 +index = [1][5] +...checksum after hashing g_5[i][j] : 9F58A232 +index = [1][6] +...checksum after hashing g_5[i][j] : 92FDEB0C +index = [2][0] +...checksum after hashing g_5[i][j] : ECE10AC4 +index = [2][1] +...checksum after hashing g_5[i][j] : 96BC7090 +index = [2][2] +...checksum after hashing g_5[i][j] : 43EB994 +index = [2][3] +...checksum after hashing g_5[i][j] : BEF467A9 +index = [2][4] +...checksum after hashing g_5[i][j] : 9D61D6BD +index = [2][5] +...checksum after hashing g_5[i][j] : 18998A33 +index = [2][6] +...checksum after hashing g_5[i][j] : BD226BBD +index = [3][0] +...checksum after hashing g_5[i][j] : 56BDC32 +index = [3][1] +...checksum after hashing g_5[i][j] : A40F5A74 +index = [3][2] +...checksum after hashing g_5[i][j] : 6FC60036 +index = [3][3] +...checksum after hashing g_5[i][j] : 951CA0DD +index = [3][4] +...checksum after hashing g_5[i][j] : D7C7E117 +index = [3][5] +...checksum after hashing g_5[i][j] : 753F33A6 +index = [3][6] +...checksum after hashing g_5[i][j] : 366DB93E +index = [4][0] +...checksum after hashing g_5[i][j] : 79012DDB +index = [4][1] +...checksum after hashing g_5[i][j] : 7DDFF31B +index = [4][2] +...checksum after hashing g_5[i][j] : A41D2EE3 +index = [4][3] +...checksum after hashing g_5[i][j] : D83F8570 +index = [4][4] +...checksum after hashing g_5[i][j] : E084EE88 +index = [4][5] +...checksum after hashing g_5[i][j] : F8A93CA0 +index = [4][6] +...checksum after hashing g_5[i][j] : AC4873DE +index = [5][0] +...checksum after hashing g_5[i][j] : CB6FD5C8 +index = [5][1] +...checksum after hashing g_5[i][j] : 5AB5BD8B +index = [5][2] +...checksum after hashing g_5[i][j] : 594159CB +index = [5][3] +...checksum after hashing g_5[i][j] : 3905E08D +index = [5][4] +...checksum after hashing g_5[i][j] : 283025AE +index = [5][5] +...checksum after hashing g_5[i][j] : F51C94DD +index = [5][6] +...checksum after hashing g_11 : 47B70B09 +checksum = 47b70b09 diff --git a/src/tests/csmith/rand61.c b/src/tests/csmith/rand61.c new file mode 100644 index 0000000..1ebec48 --- /dev/null +++ b/src/tests/csmith/rand61.c @@ -0,0 +1,112 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static short g_4[9][1] = {{0xF394L}, {0xF394L}, {0xF394L}, {0xF394L}, {0xF394L}, {0xF394L}, {0xF394L}, {0xF394L}, {0xF394L}}; +static int *g_6 = (void*)0; +static int g_8 = 3L; +static unsigned char func_1(void); +static int * func_2(unsigned p_3); +static unsigned char func_1(void) +{ + int *l_7 = &g_8; + step_hash(4); + l_7 = func_2(((-6L) < g_4[1][0])); + step_hash(5); + return g_8; +} +static int * func_2(unsigned p_3) +{ + int l_5 = 0L; + step_hash(2); + l_5 &= p_3; + step_hash(3); + return g_6; +} +void csmith_compute_hash(void) +{ + int i, j; + for (i = 0; i < 9; i++) + { + for (j = 0; j < 1; j++) + { + transparent_crc(g_4[i][j], "g_4[i][j]", print_hash_value); + if (print_hash_value) printf("index = [%d][%d]\n", i, j); + } + } + transparent_crc(g_8, "g_8", print_hash_value); +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int i, j; + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand61.expect b/src/tests/csmith/rand61.expect new file mode 100644 index 0000000..571f7cd --- /dev/null +++ b/src/tests/csmith/rand61.expect @@ -0,0 +1,100 @@ +...checksum after hashing g_4[i][j] : 1AC27699 +index = [0][0] +...checksum after hashing g_4[i][j] : 8E5880E3 +index = [1][0] +...checksum after hashing g_4[i][j] : 475FFAB4 +index = [2][0] +...checksum after hashing g_4[i][j] : E51ACCFA +index = [3][0] +...checksum after hashing g_4[i][j] : BE10352 +index = [4][0] +...checksum after hashing g_4[i][j] : A93714CC +index = [5][0] +...checksum after hashing g_4[i][j] : 27B97F3 +index = [6][0] +...checksum after hashing g_4[i][j] : 5488A0B4 +index = [7][0] +...checksum after hashing g_4[i][j] : CEF6759A +index = [8][0] +...checksum after hashing g_8 : 8D0C7205 +before stmt(4): checksum = 8D0C7205 +...checksum after hashing g_4[i][j] : 1AC27699 +index = [0][0] +...checksum after hashing g_4[i][j] : 8E5880E3 +index = [1][0] +...checksum after hashing g_4[i][j] : 475FFAB4 +index = [2][0] +...checksum after hashing g_4[i][j] : E51ACCFA +index = [3][0] +...checksum after hashing g_4[i][j] : BE10352 +index = [4][0] +...checksum after hashing g_4[i][j] : A93714CC +index = [5][0] +...checksum after hashing g_4[i][j] : 27B97F3 +index = [6][0] +...checksum after hashing g_4[i][j] : 5488A0B4 +index = [7][0] +...checksum after hashing g_4[i][j] : CEF6759A +index = [8][0] +...checksum after hashing g_8 : 8D0C7205 +before stmt(2): checksum = 8D0C7205 +...checksum after hashing g_4[i][j] : 1AC27699 +index = [0][0] +...checksum after hashing g_4[i][j] : 8E5880E3 +index = [1][0] +...checksum after hashing g_4[i][j] : 475FFAB4 +index = [2][0] +...checksum after hashing g_4[i][j] : E51ACCFA +index = [3][0] +...checksum after hashing g_4[i][j] : BE10352 +index = [4][0] +...checksum after hashing g_4[i][j] : A93714CC +index = [5][0] +...checksum after hashing g_4[i][j] : 27B97F3 +index = [6][0] +...checksum after hashing g_4[i][j] : 5488A0B4 +index = [7][0] +...checksum after hashing g_4[i][j] : CEF6759A +index = [8][0] +...checksum after hashing g_8 : 8D0C7205 +before stmt(3): checksum = 8D0C7205 +...checksum after hashing g_4[i][j] : 1AC27699 +index = [0][0] +...checksum after hashing g_4[i][j] : 8E5880E3 +index = [1][0] +...checksum after hashing g_4[i][j] : 475FFAB4 +index = [2][0] +...checksum after hashing g_4[i][j] : E51ACCFA +index = [3][0] +...checksum after hashing g_4[i][j] : BE10352 +index = [4][0] +...checksum after hashing g_4[i][j] : A93714CC +index = [5][0] +...checksum after hashing g_4[i][j] : 27B97F3 +index = [6][0] +...checksum after hashing g_4[i][j] : 5488A0B4 +index = [7][0] +...checksum after hashing g_4[i][j] : CEF6759A +index = [8][0] +...checksum after hashing g_8 : 8D0C7205 +before stmt(5): checksum = 8D0C7205 +...checksum after hashing g_4[i][j] : 1AC27699 +index = [0][0] +...checksum after hashing g_4[i][j] : 8E5880E3 +index = [1][0] +...checksum after hashing g_4[i][j] : 475FFAB4 +index = [2][0] +...checksum after hashing g_4[i][j] : E51ACCFA +index = [3][0] +...checksum after hashing g_4[i][j] : BE10352 +index = [4][0] +...checksum after hashing g_4[i][j] : A93714CC +index = [5][0] +...checksum after hashing g_4[i][j] : 27B97F3 +index = [6][0] +...checksum after hashing g_4[i][j] : 5488A0B4 +index = [7][0] +...checksum after hashing g_4[i][j] : CEF6759A +index = [8][0] +...checksum after hashing g_8 : 8D0C7205 +checksum = 8d0c7205 diff --git a/src/tests/csmith/rand62.c b/src/tests/csmith/rand62.c new file mode 100644 index 0000000..baa798a --- /dev/null +++ b/src/tests/csmith/rand62.c @@ -0,0 +1,103 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static int g_3 = 0xFD5464B5L; +static signed char g_9 = 0x06L; +static unsigned g_10 = 4294967290UL; +static unsigned char func_1(void); +static unsigned char func_1(void) +{ + int *l_2 = &g_3; + int *l_4 = &g_3; + int l_5[4]; + int *l_6 = &l_5[2]; + int *l_7 = &l_5[1]; + int *l_8[4] = {&l_5[3], &g_3, &l_5[3], &g_3}; + int i; + for (i = 0; i < 4; i++) + l_5[i] = 0x44182BD7L; + step_hash(1); + ++g_10; + step_hash(2); + return g_9; +} +void csmith_compute_hash(void) +{ + transparent_crc(g_3, "g_3", print_hash_value); + transparent_crc(g_9, "g_9", print_hash_value); + transparent_crc(g_10, "g_10", print_hash_value); +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand62.expect b/src/tests/csmith/rand62.expect new file mode 100644 index 0000000..d5b1bc0 --- /dev/null +++ b/src/tests/csmith/rand62.expect @@ -0,0 +1,12 @@ +...checksum after hashing g_3 : 59ED14B9 +...checksum after hashing g_9 : 861DEE8D +...checksum after hashing g_10 : 8FD9D688 +before stmt(1): checksum = 8FD9D688 +...checksum after hashing g_3 : 59ED14B9 +...checksum after hashing g_9 : 861DEE8D +...checksum after hashing g_10 : 3765B1ED +before stmt(2): checksum = 3765B1ED +...checksum after hashing g_3 : 59ED14B9 +...checksum after hashing g_9 : 861DEE8D +...checksum after hashing g_10 : 3765B1ED +checksum = 3765b1ed diff --git a/src/tests/csmith/rand63.c b/src/tests/csmith/rand63.c new file mode 100644 index 0000000..1ee09cc --- /dev/null +++ b/src/tests/csmith/rand63.c @@ -0,0 +1,88 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static short g_2 = 1L; +static int func_1(void); +static int func_1(void) +{ + step_hash(1); + return g_2; +} +void csmith_compute_hash(void) +{ + transparent_crc(g_2, "g_2", print_hash_value); +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand63.expect b/src/tests/csmith/rand63.expect new file mode 100644 index 0000000..7fdedd5 --- /dev/null +++ b/src/tests/csmith/rand63.expect @@ -0,0 +1,4 @@ +...checksum after hashing g_2 : 99F8B879 +before stmt(1): checksum = 99F8B879 +...checksum after hashing g_2 : 99F8B879 +checksum = 99f8b879 diff --git a/src/tests/csmith/rand64.c b/src/tests/csmith/rand64.c new file mode 100644 index 0000000..423f272 --- /dev/null +++ b/src/tests/csmith/rand64.c @@ -0,0 +1,92 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static int g_3 = 1L; +static int *g_2 = &g_3; +static unsigned char func_1(void); +static unsigned char func_1(void) +{ + int **l_4 = &g_2; + step_hash(1); + (*l_4) = g_2; + step_hash(2); + return (**l_4); +} +void csmith_compute_hash(void) +{ + transparent_crc(g_3, "g_3", print_hash_value); +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand64.expect b/src/tests/csmith/rand64.expect new file mode 100644 index 0000000..f8cdaea --- /dev/null +++ b/src/tests/csmith/rand64.expect @@ -0,0 +1,6 @@ +...checksum after hashing g_3 : 99F8B879 +before stmt(1): checksum = 99F8B879 +...checksum after hashing g_3 : 99F8B879 +before stmt(2): checksum = 99F8B879 +...checksum after hashing g_3 : 99F8B879 +checksum = 99f8b879 diff --git a/src/tests/csmith/rand65.c b/src/tests/csmith/rand65.c new file mode 100644 index 0000000..55268e8 --- /dev/null +++ b/src/tests/csmith/rand65.c @@ -0,0 +1,93 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static short g_2 = 0x5DCEL; +static int g_4 = 0x90C4D8E5L; +static unsigned char func_1(void); +static unsigned char func_1(void) +{ + int *l_3 = &g_4; + step_hash(1); + (*l_3) &= g_2; + step_hash(2); + return g_2; +} +void csmith_compute_hash(void) +{ + transparent_crc(g_2, "g_2", print_hash_value); + transparent_crc(g_4, "g_4", print_hash_value); +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand65.expect b/src/tests/csmith/rand65.expect new file mode 100644 index 0000000..ca386c4 --- /dev/null +++ b/src/tests/csmith/rand65.expect @@ -0,0 +1,9 @@ +...checksum after hashing g_2 : D3B2FBCA +...checksum after hashing g_4 : 75AE5697 +before stmt(1): checksum = 75AE5697 +...checksum after hashing g_2 : D3B2FBCA +...checksum after hashing g_4 : D38C0442 +before stmt(2): checksum = D38C0442 +...checksum after hashing g_2 : D3B2FBCA +...checksum after hashing g_4 : D38C0442 +checksum = d38c0442 diff --git a/src/tests/csmith/rand66.c b/src/tests/csmith/rand66.c new file mode 100644 index 0000000..29e18d6 --- /dev/null +++ b/src/tests/csmith/rand66.c @@ -0,0 +1,108 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static int g_2[8][10] = {{(-1L), 0x5021C3A2L, 0x2A276893L, 0xF7A73D2DL, (-3L), (-5L), (-3L), 0xF7A73D2DL, 0x2A276893L, 0x5021C3A2L}, {(-1L), 0x5021C3A2L, 0x2A276893L, 0xF7A73D2DL, (-3L), (-5L), (-3L), 0xF7A73D2DL, 0x2A276893L, 0x5021C3A2L}, {(-1L), 0x5021C3A2L, 0x2A276893L, 0xF7A73D2DL, (-3L), (-5L), (-3L), 0xF7A73D2DL, 0x2A276893L, 0x5021C3A2L}, {(-1L), 0x5021C3A2L, 0x2A276893L, 0xF7A73D2DL, (-3L), (-5L), (-3L), 0xF7A73D2DL, 0x2A276893L, 0x5021C3A2L}, {(-1L), 0x5021C3A2L, 0x2A276893L, 0xF7A73D2DL, (-3L), (-5L), (-3L), 0xF7A73D2DL, 0x2A276893L, 0x5021C3A2L}, {(-1L), 0x5021C3A2L, 0x2A276893L, 0xF7A73D2DL, (-3L), (-5L), (-3L), 0xF7A73D2DL, 0x2A276893L, 0x5021C3A2L}, {(-1L), 0x5021C3A2L, 0x2A276893L, 0xF7A73D2DL, (-3L), (-5L), (-3L), 0xF7A73D2DL, 0x2A276893L, 0x5021C3A2L}, {(-1L), 0x5021C3A2L, 0x2A276893L, 0xF7A73D2DL, (-3L), (-5L), (-3L), 0xF7A73D2DL, 0x2A276893L, 0x5021C3A2L}}; +static unsigned short func_1(void); +static unsigned short func_1(void) +{ + short l_7 = 0xD564L; + step_hash(6); + for (g_2[2][0] = 13; (g_2[2][0] < 8); g_2[2][0] -= 2) + { + int *l_6 = &g_2[2][0]; + int **l_5 = &l_6; + step_hash(4); + (*l_5) = &g_2[2][0]; + step_hash(5); + return l_7; + } + step_hash(7); + return l_7; +} +void csmith_compute_hash(void) +{ + int i, j; + for (i = 0; i < 8; i++) + { + for (j = 0; j < 10; j++) + { + transparent_crc(g_2[i][j], "g_2[i][j]", print_hash_value); + if (print_hash_value) printf("index = [%d][%d]\n", i, j); + } + } +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int i, j; + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand66.expect b/src/tests/csmith/rand66.expect new file mode 100644 index 0000000..8d3fc0f --- /dev/null +++ b/src/tests/csmith/rand66.expect @@ -0,0 +1,483 @@ +...checksum after hashing g_2[i][j] : FFFFFFFF +index = [0][0] +...checksum after hashing g_2[i][j] : 6C80427F +index = [0][1] +...checksum after hashing g_2[i][j] : F6CE2C21 +index = [0][2] +...checksum after hashing g_2[i][j] : B54E499B +index = [0][3] +...checksum after hashing g_2[i][j] : 950DC216 +index = [0][4] +...checksum after hashing g_2[i][j] : A20F3B43 +index = [0][5] +...checksum after hashing g_2[i][j] : 4B2914DD +index = [0][6] +...checksum after hashing g_2[i][j] : F769FEB6 +index = [0][7] +...checksum after hashing g_2[i][j] : D9AE88B0 +index = [0][8] +...checksum after hashing g_2[i][j] : 8FE49D29 +index = [0][9] +...checksum after hashing g_2[i][j] : 901B9CB1 +index = [1][0] +...checksum after hashing g_2[i][j] : BAC55229 +index = [1][1] +...checksum after hashing g_2[i][j] : E630138E +index = [1][2] +...checksum after hashing g_2[i][j] : 18F93E32 +index = [1][3] +...checksum after hashing g_2[i][j] : F7330D66 +index = [1][4] +...checksum after hashing g_2[i][j] : B1BA51AB +index = [1][5] +...checksum after hashing g_2[i][j] : AE28DF +index = [1][6] +...checksum after hashing g_2[i][j] : E5DDBC5D +index = [1][7] +...checksum after hashing g_2[i][j] : D8DE0DD3 +index = [1][8] +...checksum after hashing g_2[i][j] : 19B155CF +index = [1][9] +...checksum after hashing g_2[i][j] : 2213DACD +index = [2][0] +...checksum after hashing g_2[i][j] : 28DE4D7 +index = [2][1] +...checksum after hashing g_2[i][j] : BC400E0B +index = [2][2] +...checksum after hashing g_2[i][j] : 72018904 +index = [2][3] +...checksum after hashing g_2[i][j] : 9360A17D +index = [2][4] +...checksum after hashing g_2[i][j] : 3D898EE7 +index = [2][5] +...checksum after hashing g_2[i][j] : 47DC176C +index = [2][6] +...checksum after hashing g_2[i][j] : 309C30C3 +index = [2][7] +...checksum after hashing g_2[i][j] : 72B521BF +index = [2][8] +...checksum after hashing g_2[i][j] : E91C5A6A +index = [2][9] +...checksum after hashing g_2[i][j] : F5EE447F +index = [3][0] +...checksum after hashing g_2[i][j] : FBDE2FBB +index = [3][1] +...checksum after hashing g_2[i][j] : 5BD7B3E +index = [3][2] +...checksum after hashing g_2[i][j] : F461BFF4 +index = [3][3] +...checksum after hashing g_2[i][j] : 54C6634A +index = [3][4] +...checksum after hashing g_2[i][j] : 3F0340AD +index = [3][5] +...checksum after hashing g_2[i][j] : 7260592 +index = [3][6] +...checksum after hashing g_2[i][j] : D1086EEE +index = [3][7] +...checksum after hashing g_2[i][j] : 84EFC816 +index = [3][8] +...checksum after hashing g_2[i][j] : 6BC6053D +index = [3][9] +...checksum after hashing g_2[i][j] : BCB5D570 +index = [4][0] +...checksum after hashing g_2[i][j] : 9239081 +index = [4][1] +...checksum after hashing g_2[i][j] : A688D616 +index = [4][2] +...checksum after hashing g_2[i][j] : ADA9C6F2 +index = [4][3] +...checksum after hashing g_2[i][j] : 3B19DB5F +index = [4][4] +...checksum after hashing g_2[i][j] : 4824EDB1 +index = [4][5] +...checksum after hashing g_2[i][j] : D8ED757C +index = [4][6] +...checksum after hashing g_2[i][j] : 8D3BF175 +index = [4][7] +...checksum after hashing g_2[i][j] : 8E572991 +index = [4][8] +...checksum after hashing g_2[i][j] : 7FA1FC86 +index = [4][9] +...checksum after hashing g_2[i][j] : FCB57DA9 +index = [5][0] +...checksum after hashing g_2[i][j] : F3C82BDA +index = [5][1] +...checksum after hashing g_2[i][j] : 936D7E61 +index = [5][2] +...checksum after hashing g_2[i][j] : F9909185 +index = [5][3] +...checksum after hashing g_2[i][j] : C6806318 +index = [5][4] +...checksum after hashing g_2[i][j] : E6259D6F +index = [5][5] +...checksum after hashing g_2[i][j] : 62E26C28 +index = [5][6] +...checksum after hashing g_2[i][j] : 768FB722 +index = [5][7] +...checksum after hashing g_2[i][j] : 65CAFD0 +index = [5][8] +...checksum after hashing g_2[i][j] : B9267635 +index = [5][9] +...checksum after hashing g_2[i][j] : 19156B82 +index = [6][0] +...checksum after hashing g_2[i][j] : E2377639 +index = [6][1] +...checksum after hashing g_2[i][j] : CA57F0D4 +index = [6][2] +...checksum after hashing g_2[i][j] : F892E8E +index = [6][3] +...checksum after hashing g_2[i][j] : 105DA305 +index = [6][4] +...checksum after hashing g_2[i][j] : 8EDF48DE +index = [6][5] +...checksum after hashing g_2[i][j] : E1545251 +index = [6][6] +...checksum after hashing g_2[i][j] : 88634B0A +index = [6][7] +...checksum after hashing g_2[i][j] : 77CAC14E +index = [6][8] +...checksum after hashing g_2[i][j] : A6E96ABE +index = [6][9] +...checksum after hashing g_2[i][j] : F71BC6D8 +index = [7][0] +...checksum after hashing g_2[i][j] : 4E16B53D +index = [7][1] +...checksum after hashing g_2[i][j] : 8523B5BA +index = [7][2] +...checksum after hashing g_2[i][j] : F110166 +index = [7][3] +...checksum after hashing g_2[i][j] : 891FCB1D +index = [7][4] +...checksum after hashing g_2[i][j] : 162AAB51 +index = [7][5] +...checksum after hashing g_2[i][j] : 68D5944B +index = [7][6] +...checksum after hashing g_2[i][j] : 9419848D +index = [7][7] +...checksum after hashing g_2[i][j] : 5C665382 +index = [7][8] +...checksum after hashing g_2[i][j] : CAEB5D3B +index = [7][9] +before stmt(6): checksum = CAEB5D3B +...checksum after hashing g_2[i][j] : FFFFFFFF +index = [0][0] +...checksum after hashing g_2[i][j] : 6C80427F +index = [0][1] +...checksum after hashing g_2[i][j] : F6CE2C21 +index = [0][2] +...checksum after hashing g_2[i][j] : B54E499B +index = [0][3] +...checksum after hashing g_2[i][j] : 950DC216 +index = [0][4] +...checksum after hashing g_2[i][j] : A20F3B43 +index = [0][5] +...checksum after hashing g_2[i][j] : 4B2914DD +index = [0][6] +...checksum after hashing g_2[i][j] : F769FEB6 +index = [0][7] +...checksum after hashing g_2[i][j] : D9AE88B0 +index = [0][8] +...checksum after hashing g_2[i][j] : 8FE49D29 +index = [0][9] +...checksum after hashing g_2[i][j] : 901B9CB1 +index = [1][0] +...checksum after hashing g_2[i][j] : BAC55229 +index = [1][1] +...checksum after hashing g_2[i][j] : E630138E +index = [1][2] +...checksum after hashing g_2[i][j] : 18F93E32 +index = [1][3] +...checksum after hashing g_2[i][j] : F7330D66 +index = [1][4] +...checksum after hashing g_2[i][j] : B1BA51AB +index = [1][5] +...checksum after hashing g_2[i][j] : AE28DF +index = [1][6] +...checksum after hashing g_2[i][j] : E5DDBC5D +index = [1][7] +...checksum after hashing g_2[i][j] : D8DE0DD3 +index = [1][8] +...checksum after hashing g_2[i][j] : 19B155CF +index = [1][9] +...checksum after hashing g_2[i][j] : EC222F3 +index = [2][0] +...checksum after hashing g_2[i][j] : 355D190 +index = [2][1] +...checksum after hashing g_2[i][j] : A6C53675 +index = [2][2] +...checksum after hashing g_2[i][j] : 680F7FF7 +index = [2][3] +...checksum after hashing g_2[i][j] : D51BC3A2 +index = [2][4] +...checksum after hashing g_2[i][j] : 5B997CFE +index = [2][5] +...checksum after hashing g_2[i][j] : 329E7EFB +index = [2][6] +...checksum after hashing g_2[i][j] : B52DB145 +index = [2][7] +...checksum after hashing g_2[i][j] : 3A7C51B9 +index = [2][8] +...checksum after hashing g_2[i][j] : FAB9C843 +index = [2][9] +...checksum after hashing g_2[i][j] : 818DC127 +index = [3][0] +...checksum after hashing g_2[i][j] : B215CDC +index = [3][1] +...checksum after hashing g_2[i][j] : DB626DE3 +index = [3][2] +...checksum after hashing g_2[i][j] : 5F3F2771 +index = [3][3] +...checksum after hashing g_2[i][j] : 187DC6B1 +index = [3][4] +...checksum after hashing g_2[i][j] : C98C3448 +index = [3][5] +...checksum after hashing g_2[i][j] : 5DBAA7B9 +index = [3][6] +...checksum after hashing g_2[i][j] : 2A8DB223 +index = [3][7] +...checksum after hashing g_2[i][j] : E8C07503 +index = [3][8] +...checksum after hashing g_2[i][j] : 979FDACD +index = [3][9] +...checksum after hashing g_2[i][j] : 6374E9F0 +index = [4][0] +...checksum after hashing g_2[i][j] : D861304 +index = [4][1] +...checksum after hashing g_2[i][j] : 4B61B973 +index = [4][2] +...checksum after hashing g_2[i][j] : B3DD9BBE +index = [4][3] +...checksum after hashing g_2[i][j] : 3FE300A8 +index = [4][4] +...checksum after hashing g_2[i][j] : 3B77D450 +index = [4][5] +...checksum after hashing g_2[i][j] : C50EA32F +index = [4][6] +...checksum after hashing g_2[i][j] : CBD2D44D +index = [4][7] +...checksum after hashing g_2[i][j] : 954DD1D4 +index = [4][8] +...checksum after hashing g_2[i][j] : 52F445D6 +index = [4][9] +...checksum after hashing g_2[i][j] : 7F2442F0 +index = [5][0] +...checksum after hashing g_2[i][j] : 7611A09E +index = [5][1] +...checksum after hashing g_2[i][j] : A7534C93 +index = [5][2] +...checksum after hashing g_2[i][j] : 9261919F +index = [5][3] +...checksum after hashing g_2[i][j] : 2EE3BCCF +index = [5][4] +...checksum after hashing g_2[i][j] : 3B723C6C +index = [5][5] +...checksum after hashing g_2[i][j] : A575916B +index = [5][6] +...checksum after hashing g_2[i][j] : 7932EBBC +index = [5][7] +...checksum after hashing g_2[i][j] : FFB123F7 +index = [5][8] +...checksum after hashing g_2[i][j] : 435DC44F +index = [5][9] +...checksum after hashing g_2[i][j] : 4AEEBA3B +index = [6][0] +...checksum after hashing g_2[i][j] : B2C1016 +index = [6][1] +...checksum after hashing g_2[i][j] : EBC6968 +index = [6][2] +...checksum after hashing g_2[i][j] : 8B6C705D +index = [6][3] +...checksum after hashing g_2[i][j] : 8B42F658 +index = [6][4] +...checksum after hashing g_2[i][j] : 774837A8 +index = [6][5] +...checksum after hashing g_2[i][j] : ACCD419 +index = [6][6] +...checksum after hashing g_2[i][j] : BD3B6708 +index = [6][7] +...checksum after hashing g_2[i][j] : C845A53E +index = [6][8] +...checksum after hashing g_2[i][j] : 65CD8347 +index = [6][9] +...checksum after hashing g_2[i][j] : 59C30676 +index = [7][0] +...checksum after hashing g_2[i][j] : A828CB3 +index = [7][1] +...checksum after hashing g_2[i][j] : C783603A +index = [7][2] +...checksum after hashing g_2[i][j] : 5FDFDCD3 +index = [7][3] +...checksum after hashing g_2[i][j] : 18F078E2 +index = [7][4] +...checksum after hashing g_2[i][j] : 51D9A118 +index = [7][5] +...checksum after hashing g_2[i][j] : 54776067 +index = [7][6] +...checksum after hashing g_2[i][j] : 7F6EEDEB +index = [7][7] +...checksum after hashing g_2[i][j] : 528BDF33 +index = [7][8] +...checksum after hashing g_2[i][j] : 8B623686 +index = [7][9] +before stmt(7): checksum = 8B623686 +...checksum after hashing g_2[i][j] : FFFFFFFF +index = [0][0] +...checksum after hashing g_2[i][j] : 6C80427F +index = [0][1] +...checksum after hashing g_2[i][j] : F6CE2C21 +index = [0][2] +...checksum after hashing g_2[i][j] : B54E499B +index = [0][3] +...checksum after hashing g_2[i][j] : 950DC216 +index = [0][4] +...checksum after hashing g_2[i][j] : A20F3B43 +index = [0][5] +...checksum after hashing g_2[i][j] : 4B2914DD +index = [0][6] +...checksum after hashing g_2[i][j] : F769FEB6 +index = [0][7] +...checksum after hashing g_2[i][j] : D9AE88B0 +index = [0][8] +...checksum after hashing g_2[i][j] : 8FE49D29 +index = [0][9] +...checksum after hashing g_2[i][j] : 901B9CB1 +index = [1][0] +...checksum after hashing g_2[i][j] : BAC55229 +index = [1][1] +...checksum after hashing g_2[i][j] : E630138E +index = [1][2] +...checksum after hashing g_2[i][j] : 18F93E32 +index = [1][3] +...checksum after hashing g_2[i][j] : F7330D66 +index = [1][4] +...checksum after hashing g_2[i][j] : B1BA51AB +index = [1][5] +...checksum after hashing g_2[i][j] : AE28DF +index = [1][6] +...checksum after hashing g_2[i][j] : E5DDBC5D +index = [1][7] +...checksum after hashing g_2[i][j] : D8DE0DD3 +index = [1][8] +...checksum after hashing g_2[i][j] : 19B155CF +index = [1][9] +...checksum after hashing g_2[i][j] : EC222F3 +index = [2][0] +...checksum after hashing g_2[i][j] : 355D190 +index = [2][1] +...checksum after hashing g_2[i][j] : A6C53675 +index = [2][2] +...checksum after hashing g_2[i][j] : 680F7FF7 +index = [2][3] +...checksum after hashing g_2[i][j] : D51BC3A2 +index = [2][4] +...checksum after hashing g_2[i][j] : 5B997CFE +index = [2][5] +...checksum after hashing g_2[i][j] : 329E7EFB +index = [2][6] +...checksum after hashing g_2[i][j] : B52DB145 +index = [2][7] +...checksum after hashing g_2[i][j] : 3A7C51B9 +index = [2][8] +...checksum after hashing g_2[i][j] : FAB9C843 +index = [2][9] +...checksum after hashing g_2[i][j] : 818DC127 +index = [3][0] +...checksum after hashing g_2[i][j] : B215CDC +index = [3][1] +...checksum after hashing g_2[i][j] : DB626DE3 +index = [3][2] +...checksum after hashing g_2[i][j] : 5F3F2771 +index = [3][3] +...checksum after hashing g_2[i][j] : 187DC6B1 +index = [3][4] +...checksum after hashing g_2[i][j] : C98C3448 +index = [3][5] +...checksum after hashing g_2[i][j] : 5DBAA7B9 +index = [3][6] +...checksum after hashing g_2[i][j] : 2A8DB223 +index = [3][7] +...checksum after hashing g_2[i][j] : E8C07503 +index = [3][8] +...checksum after hashing g_2[i][j] : 979FDACD +index = [3][9] +...checksum after hashing g_2[i][j] : 6374E9F0 +index = [4][0] +...checksum after hashing g_2[i][j] : D861304 +index = [4][1] +...checksum after hashing g_2[i][j] : 4B61B973 +index = [4][2] +...checksum after hashing g_2[i][j] : B3DD9BBE +index = [4][3] +...checksum after hashing g_2[i][j] : 3FE300A8 +index = [4][4] +...checksum after hashing g_2[i][j] : 3B77D450 +index = [4][5] +...checksum after hashing g_2[i][j] : C50EA32F +index = [4][6] +...checksum after hashing g_2[i][j] : CBD2D44D +index = [4][7] +...checksum after hashing g_2[i][j] : 954DD1D4 +index = [4][8] +...checksum after hashing g_2[i][j] : 52F445D6 +index = [4][9] +...checksum after hashing g_2[i][j] : 7F2442F0 +index = [5][0] +...checksum after hashing g_2[i][j] : 7611A09E +index = [5][1] +...checksum after hashing g_2[i][j] : A7534C93 +index = [5][2] +...checksum after hashing g_2[i][j] : 9261919F +index = [5][3] +...checksum after hashing g_2[i][j] : 2EE3BCCF +index = [5][4] +...checksum after hashing g_2[i][j] : 3B723C6C +index = [5][5] +...checksum after hashing g_2[i][j] : A575916B +index = [5][6] +...checksum after hashing g_2[i][j] : 7932EBBC +index = [5][7] +...checksum after hashing g_2[i][j] : FFB123F7 +index = [5][8] +...checksum after hashing g_2[i][j] : 435DC44F +index = [5][9] +...checksum after hashing g_2[i][j] : 4AEEBA3B +index = [6][0] +...checksum after hashing g_2[i][j] : B2C1016 +index = [6][1] +...checksum after hashing g_2[i][j] : EBC6968 +index = [6][2] +...checksum after hashing g_2[i][j] : 8B6C705D +index = [6][3] +...checksum after hashing g_2[i][j] : 8B42F658 +index = [6][4] +...checksum after hashing g_2[i][j] : 774837A8 +index = [6][5] +...checksum after hashing g_2[i][j] : ACCD419 +index = [6][6] +...checksum after hashing g_2[i][j] : BD3B6708 +index = [6][7] +...checksum after hashing g_2[i][j] : C845A53E +index = [6][8] +...checksum after hashing g_2[i][j] : 65CD8347 +index = [6][9] +...checksum after hashing g_2[i][j] : 59C30676 +index = [7][0] +...checksum after hashing g_2[i][j] : A828CB3 +index = [7][1] +...checksum after hashing g_2[i][j] : C783603A +index = [7][2] +...checksum after hashing g_2[i][j] : 5FDFDCD3 +index = [7][3] +...checksum after hashing g_2[i][j] : 18F078E2 +index = [7][4] +...checksum after hashing g_2[i][j] : 51D9A118 +index = [7][5] +...checksum after hashing g_2[i][j] : 54776067 +index = [7][6] +...checksum after hashing g_2[i][j] : 7F6EEDEB +index = [7][7] +...checksum after hashing g_2[i][j] : 528BDF33 +index = [7][8] +...checksum after hashing g_2[i][j] : 8B623686 +index = [7][9] +checksum = 8b623686 diff --git a/src/tests/csmith/rand67.c b/src/tests/csmith/rand67.c new file mode 100644 index 0000000..2f64312 --- /dev/null +++ b/src/tests/csmith/rand67.c @@ -0,0 +1,88 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static unsigned g_2 = 0xB9B55BB2L; +static short func_1(void); +static short func_1(void) +{ + step_hash(1); + return g_2; +} +void csmith_compute_hash(void) +{ + transparent_crc(g_2, "g_2", print_hash_value); +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand67.expect b/src/tests/csmith/rand67.expect new file mode 100644 index 0000000..823b09d --- /dev/null +++ b/src/tests/csmith/rand67.expect @@ -0,0 +1,4 @@ +...checksum after hashing g_2 : DDD9C989 +before stmt(1): checksum = DDD9C989 +...checksum after hashing g_2 : DDD9C989 +checksum = ddd9c989 diff --git a/src/tests/csmith/rand68.c b/src/tests/csmith/rand68.c new file mode 100644 index 0000000..dbfe573 --- /dev/null +++ b/src/tests/csmith/rand68.c @@ -0,0 +1,96 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static int g_2 = (-5L); +static short func_1(void); +static short func_1(void) +{ + step_hash(5); + for (g_2 = 0; (g_2 != (-21)); g_2 -= 7) + { + step_hash(4); + return g_2; + } + step_hash(6); + g_2 = (4294967295UL != g_2); + step_hash(7); + return g_2; +} +void csmith_compute_hash(void) +{ + transparent_crc(g_2, "g_2", print_hash_value); +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand68.expect b/src/tests/csmith/rand68.expect new file mode 100644 index 0000000..ca146f8 --- /dev/null +++ b/src/tests/csmith/rand68.expect @@ -0,0 +1,6 @@ +...checksum after hashing g_2 : 709D68A8 +before stmt(5): checksum = 709D68A8 +...checksum after hashing g_2 : 2144DF1C +before stmt(4): checksum = 2144DF1C +...checksum after hashing g_2 : 2144DF1C +checksum = 2144df1c diff --git a/src/tests/csmith/rand69.c b/src/tests/csmith/rand69.c new file mode 100644 index 0000000..b108e0f --- /dev/null +++ b/src/tests/csmith/rand69.c @@ -0,0 +1,87 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static unsigned func_1(void); +static unsigned func_1(void) +{ + int l_2 = (-1L); + step_hash(1); + return l_2; +} +void csmith_compute_hash(void) +{ +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand69.expect b/src/tests/csmith/rand69.expect new file mode 100644 index 0000000..0b4e62a --- /dev/null +++ b/src/tests/csmith/rand69.expect @@ -0,0 +1,2 @@ +before stmt(1): checksum = 0 +checksum = 0 diff --git a/src/tests/csmith/rand7.c b/src/tests/csmith/rand7.c new file mode 100644 index 0000000..916852f --- /dev/null +++ b/src/tests/csmith/rand7.c @@ -0,0 +1,93 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static signed char g_2 = 0x75L; +static int g_4 = 0x7D490C4DL; +static int func_1(void); +static int func_1(void) +{ + int *l_3 = &g_4; + step_hash(1); + (*l_3) = g_2; + step_hash(2); + return g_2; +} +void csmith_compute_hash(void) +{ + transparent_crc(g_2, "g_2", print_hash_value); + transparent_crc(g_4, "g_4", print_hash_value); +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand7.expect b/src/tests/csmith/rand7.expect new file mode 100644 index 0000000..75258b5 --- /dev/null +++ b/src/tests/csmith/rand7.expect @@ -0,0 +1,9 @@ +...checksum after hashing g_2 : 7DA58FB2 +...checksum after hashing g_4 : EEF9C0D4 +before stmt(1): checksum = EEF9C0D4 +...checksum after hashing g_2 : 7DA58FB2 +...checksum after hashing g_4 : DD731033 +before stmt(2): checksum = DD731033 +...checksum after hashing g_2 : 7DA58FB2 +...checksum after hashing g_4 : DD731033 +checksum = dd731033 diff --git a/src/tests/csmith/rand70.c b/src/tests/csmith/rand70.c new file mode 100644 index 0000000..d31e049 --- /dev/null +++ b/src/tests/csmith/rand70.c @@ -0,0 +1,99 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static int g_3 = 0xF93905C8L; +static short func_1(void); +static short func_1(void) +{ + int *l_2 = &g_3; + step_hash(1); + (*l_2) = 1L; + step_hash(6); + for (g_3 = (-10); (g_3 <= (-12)); g_3 -= 8) + { + step_hash(5); + return (*l_2); + } + step_hash(7); + g_3 = g_3; + step_hash(8); + return g_3; +} +void csmith_compute_hash(void) +{ + transparent_crc(g_3, "g_3", print_hash_value); +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand70.expect b/src/tests/csmith/rand70.expect new file mode 100644 index 0000000..d45c73f --- /dev/null +++ b/src/tests/csmith/rand70.expect @@ -0,0 +1,10 @@ +...checksum after hashing g_3 : 5E931C1C +before stmt(1): checksum = 5E931C1C +...checksum after hashing g_3 : 99F8B879 +before stmt(6): checksum = 99F8B879 +...checksum after hashing g_3 : 82F7B075 +before stmt(7): checksum = 82F7B075 +...checksum after hashing g_3 : 82F7B075 +before stmt(8): checksum = 82F7B075 +...checksum after hashing g_3 : 82F7B075 +checksum = 82f7b075 diff --git a/src/tests/csmith/rand71.c b/src/tests/csmith/rand71.c new file mode 100644 index 0000000..24fa39f --- /dev/null +++ b/src/tests/csmith/rand71.c @@ -0,0 +1,88 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static unsigned short g_2 = 0xB9F9L; +static unsigned short func_1(void); +static unsigned short func_1(void) +{ + step_hash(1); + return g_2; +} +void csmith_compute_hash(void) +{ + transparent_crc(g_2, "g_2", print_hash_value); +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand71.expect b/src/tests/csmith/rand71.expect new file mode 100644 index 0000000..d5fd190 --- /dev/null +++ b/src/tests/csmith/rand71.expect @@ -0,0 +1,4 @@ +...checksum after hashing g_2 : 10A543AE +before stmt(1): checksum = 10A543AE +...checksum after hashing g_2 : 10A543AE +checksum = 10a543ae diff --git a/src/tests/csmith/rand72.c b/src/tests/csmith/rand72.c new file mode 100644 index 0000000..854434e --- /dev/null +++ b/src/tests/csmith/rand72.c @@ -0,0 +1,92 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static int g_4 = 1L; +static int func_1(void); +static int func_1(void) +{ + int *l_3 = &g_4; + int **l_2 = &l_3; + step_hash(1); + (*l_2) = (void*)0; + step_hash(2); + return g_4; +} +void csmith_compute_hash(void) +{ + transparent_crc(g_4, "g_4", print_hash_value); +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand72.expect b/src/tests/csmith/rand72.expect new file mode 100644 index 0000000..2221324 --- /dev/null +++ b/src/tests/csmith/rand72.expect @@ -0,0 +1,6 @@ +...checksum after hashing g_4 : 99F8B879 +before stmt(1): checksum = 99F8B879 +...checksum after hashing g_4 : 99F8B879 +before stmt(2): checksum = 99F8B879 +...checksum after hashing g_4 : 99F8B879 +checksum = 99f8b879 diff --git a/src/tests/csmith/rand73.c b/src/tests/csmith/rand73.c new file mode 100644 index 0000000..97cf81b --- /dev/null +++ b/src/tests/csmith/rand73.c @@ -0,0 +1,116 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static int g_4 = 0L; +static int g_14 = 0x8ACC4B7CL; +static unsigned short g_15 = 65531UL; +static unsigned char func_1(void); +static unsigned char func_1(void) +{ + int *l_2 = (void*)0; + int *l_3 = &g_4; + int *l_5 = (void*)0; + int l_6[6] = {0L, 0L, 0L, 0L, 0L, 0L}; + int *l_7 = &g_4; + int *l_8 = &l_6[4]; + int *l_9 = &l_6[2]; + int *l_10 = (void*)0; + int *l_11 = &l_6[1]; + int *l_12 = &l_6[5]; + int *l_13[4][9]; + unsigned l_18 = 5UL; + int i, j; + for (i = 0; i < 4; i++) + { + for (j = 0; j < 9; j++) + l_13[i][j] = &l_6[2]; + } + step_hash(1); + g_15--; + step_hash(2); + (*l_7) ^= g_14; + step_hash(3); + (*l_7) = l_18; + step_hash(4); + return g_15; +} +void csmith_compute_hash(void) +{ + transparent_crc(g_4, "g_4", print_hash_value); + transparent_crc(g_14, "g_14", print_hash_value); + transparent_crc(g_15, "g_15", print_hash_value); +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand73.expect b/src/tests/csmith/rand73.expect new file mode 100644 index 0000000..6a66de8 --- /dev/null +++ b/src/tests/csmith/rand73.expect @@ -0,0 +1,20 @@ +...checksum after hashing g_4 : 2144DF1C +...checksum after hashing g_14 : 52265010 +...checksum after hashing g_15 : B4A5B084 +before stmt(1): checksum = B4A5B084 +...checksum after hashing g_4 : 2144DF1C +...checksum after hashing g_14 : 52265010 +...checksum after hashing g_15 : C19D7E1 +before stmt(2): checksum = C19D7E1 +...checksum after hashing g_4 : 16405065 +...checksum after hashing g_14 : 72A983B0 +...checksum after hashing g_15 : 49C8E1C1 +before stmt(3): checksum = 49C8E1C1 +...checksum after hashing g_4 : 169A2F2E +...checksum after hashing g_14 : 1AC65E74 +...checksum after hashing g_15 : 94BAA0F1 +before stmt(4): checksum = 94BAA0F1 +...checksum after hashing g_4 : 169A2F2E +...checksum after hashing g_14 : 1AC65E74 +...checksum after hashing g_15 : 94BAA0F1 +checksum = 94baa0f1 diff --git a/src/tests/csmith/rand74.c b/src/tests/csmith/rand74.c new file mode 100644 index 0000000..67652d1 --- /dev/null +++ b/src/tests/csmith/rand74.c @@ -0,0 +1,88 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static signed char g_2 = 0x03L; +static signed char func_1(void); +static signed char func_1(void) +{ + step_hash(1); + return g_2; +} +void csmith_compute_hash(void) +{ + transparent_crc(g_2, "g_2", print_hash_value); +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand74.expect b/src/tests/csmith/rand74.expect new file mode 100644 index 0000000..7ebc06d --- /dev/null +++ b/src/tests/csmith/rand74.expect @@ -0,0 +1,4 @@ +...checksum after hashing g_2 : 33F170F2 +before stmt(1): checksum = 33F170F2 +...checksum after hashing g_2 : 33F170F2 +checksum = 33f170f2 diff --git a/src/tests/csmith/rand75.c b/src/tests/csmith/rand75.c new file mode 100644 index 0000000..35801c7 --- /dev/null +++ b/src/tests/csmith/rand75.c @@ -0,0 +1,112 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static int g_3 = (-5L); +static unsigned short g_17 = 0x57D6L; +static unsigned short func_1(void); +static unsigned short func_1(void) +{ + int *l_2 = &g_3; + int *l_4 = &g_3; + int *l_5 = &g_3; + int *l_6 = &g_3; + int *l_7 = (void*)0; + int *l_8 = &g_3; + int *l_9 = &g_3; + int l_10 = 0xBF2B2994L; + int *l_11 = &l_10; + int *l_12 = &l_10; + int *l_13 = (void*)0; + int *l_14 = &l_10; + int *l_15 = &g_3; + int *l_16[3][4]; + int i, j; + for (i = 0; i < 3; i++) + { + for (j = 0; j < 4; j++) + l_16[i][j] = (void*)0; + } + step_hash(1); + ++g_17; + step_hash(2); + return g_17; +} +void csmith_compute_hash(void) +{ + transparent_crc(g_3, "g_3", print_hash_value); + transparent_crc(g_17, "g_17", print_hash_value); +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand75.expect b/src/tests/csmith/rand75.expect new file mode 100644 index 0000000..913bc2c --- /dev/null +++ b/src/tests/csmith/rand75.expect @@ -0,0 +1,9 @@ +...checksum after hashing g_3 : 709D68A8 +...checksum after hashing g_17 : 11792F75 +before stmt(1): checksum = 11792F75 +...checksum after hashing g_3 : 709D68A8 +...checksum after hashing g_17 : A9C54810 +before stmt(2): checksum = A9C54810 +...checksum after hashing g_3 : 709D68A8 +...checksum after hashing g_17 : A9C54810 +checksum = a9c54810 diff --git a/src/tests/csmith/rand76.c b/src/tests/csmith/rand76.c new file mode 100644 index 0000000..bf77339 --- /dev/null +++ b/src/tests/csmith/rand76.c @@ -0,0 +1,95 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static unsigned g_2 = 0x1F9C28ADL; +static int g_4 = (-4L); +static unsigned func_1(void); +static unsigned func_1(void) +{ + int *l_3 = &g_4; + step_hash(1); + (*l_3) |= g_2; + step_hash(2); + (*l_3) = (g_4 <= (0x4F2887CFL && (*l_3))); + step_hash(3); + return g_4; +} +void csmith_compute_hash(void) +{ + transparent_crc(g_2, "g_2", print_hash_value); + transparent_crc(g_4, "g_4", print_hash_value); +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand76.expect b/src/tests/csmith/rand76.expect new file mode 100644 index 0000000..6468047 --- /dev/null +++ b/src/tests/csmith/rand76.expect @@ -0,0 +1,12 @@ +...checksum after hashing g_2 : F8E7C17F +...checksum after hashing g_4 : EC2203A9 +before stmt(1): checksum = EC2203A9 +...checksum after hashing g_2 : F8E7C17F +...checksum after hashing g_4 : 549E64CC +before stmt(2): checksum = 549E64CC +...checksum after hashing g_2 : F8E7C17F +...checksum after hashing g_4 : 9890EBC1 +before stmt(3): checksum = 9890EBC1 +...checksum after hashing g_2 : F8E7C17F +...checksum after hashing g_4 : 9890EBC1 +checksum = 9890ebc1 diff --git a/src/tests/csmith/rand77.c b/src/tests/csmith/rand77.c new file mode 100644 index 0000000..8bdd43f --- /dev/null +++ b/src/tests/csmith/rand77.c @@ -0,0 +1,88 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static int g_2 = 0x0624039BL; +static short func_1(void); +static short func_1(void) +{ + step_hash(1); + return g_2; +} +void csmith_compute_hash(void) +{ + transparent_crc(g_2, "g_2", print_hash_value); +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand77.expect b/src/tests/csmith/rand77.expect new file mode 100644 index 0000000..33c2224 --- /dev/null +++ b/src/tests/csmith/rand77.expect @@ -0,0 +1,4 @@ +...checksum after hashing g_2 : 51C84373 +before stmt(1): checksum = 51C84373 +...checksum after hashing g_2 : 51C84373 +checksum = 51c84373 diff --git a/src/tests/csmith/rand78.c b/src/tests/csmith/rand78.c new file mode 100644 index 0000000..8a60f59 --- /dev/null +++ b/src/tests/csmith/rand78.c @@ -0,0 +1,90 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static signed char func_1(void); +static signed char func_1(void) +{ + int l_2[8]; + int i; + for (i = 0; i < 8; i++) + l_2[i] = 0L; + step_hash(1); + return l_2[1]; +} +void csmith_compute_hash(void) +{ +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand78.expect b/src/tests/csmith/rand78.expect new file mode 100644 index 0000000..0b4e62a --- /dev/null +++ b/src/tests/csmith/rand78.expect @@ -0,0 +1,2 @@ +before stmt(1): checksum = 0 +checksum = 0 diff --git a/src/tests/csmith/rand79.c b/src/tests/csmith/rand79.c new file mode 100644 index 0000000..3a7277d --- /dev/null +++ b/src/tests/csmith/rand79.c @@ -0,0 +1,94 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static int g_2 = 0L; +static unsigned func_1(void); +static unsigned func_1(void) +{ + step_hash(5); + for (g_2 = (-5); (g_2 != (-7)); g_2--) + { + step_hash(4); + return g_2; + } + step_hash(6); + return g_2; +} +void csmith_compute_hash(void) +{ + transparent_crc(g_2, "g_2", print_hash_value); +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand79.expect b/src/tests/csmith/rand79.expect new file mode 100644 index 0000000..7ddb333 --- /dev/null +++ b/src/tests/csmith/rand79.expect @@ -0,0 +1,6 @@ +...checksum after hashing g_2 : 2144DF1C +before stmt(5): checksum = 2144DF1C +...checksum after hashing g_2 : 709D68A8 +before stmt(4): checksum = 709D68A8 +...checksum after hashing g_2 : 709D68A8 +checksum = 709d68a8 diff --git a/src/tests/csmith/rand8.c b/src/tests/csmith/rand8.c new file mode 100644 index 0000000..11df203 --- /dev/null +++ b/src/tests/csmith/rand8.c @@ -0,0 +1,991 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static int g_10 = 0x147B80BEL; +static int g_12 = 0xCFD1F2E9L; +static int g_92 = 3L; +static int *g_98 = (void*)0; +static int **g_97 = &g_98; +static int g_101 = 1L; +static unsigned g_106 = 0UL; +static unsigned short g_260 = 0xAD4DL; +static signed char g_448 = 0x03L; +static unsigned g_722 = 0UL; +static int g_837 = (-10L); +static int *g_849 = &g_92; +static unsigned func_1(void); +static short func_4(short p_5); +static int func_16(int p_17); +static int func_18(short p_19, int p_20, int * p_21, int * p_22); +static int func_24(short p_25, unsigned short p_26, unsigned short p_27, int * p_28); +static int * func_31(unsigned char p_32, short p_33, int * p_34, int * p_35); +static int func_47(signed char p_48, unsigned p_49, unsigned short p_50, unsigned p_51, unsigned short p_52); +static int * func_54(int * p_55, signed char p_56, unsigned p_57, int * p_58); +static int * func_60(unsigned char p_61, unsigned short p_62, int * p_63, unsigned char p_64, int * p_65); +static short func_66(unsigned short p_67, unsigned p_68); +static unsigned func_1(void) +{ + int l_6 = 0x961C0F80L; + int *l_816 = &g_10; + unsigned short l_822 = 0xECFCL; + int *l_872 = (void*)0; + int ***l_873 = &g_97; + unsigned char l_874 = 0x76L; + step_hash(468); + (*l_816) = ((0x0BB743D8L | (+((short)func_4(l_6) * (short)((l_6 | g_722) | (&g_97 != &g_97))))) || l_6); + step_hash(522); + for (g_10 = 0; (g_10 > (-8)); g_10 -= 3) + { + int l_856 = 0x5C93BEA6L; + step_hash(472); + (*g_97) = (void*)0; + step_hash(520); + for (g_722 = 0; (g_722 >= 1); ++g_722) + { + unsigned char l_821 = 0x44L; + int **l_823 = &g_98; + unsigned l_870 = 5UL; + step_hash(476); + g_12 &= l_821; + step_hash(477); + l_822 &= (0xB683L >= (-6L)); + step_hash(519); + if ((*l_816)) + { + int *l_824 = &g_92; + int l_838 = 0xCF1E05A3L; + step_hash(479); + (*l_824) |= (l_823 == (void*)0); + step_hash(484); + for (g_92 = 0; (g_92 != (-9)); g_92--) + { + step_hash(483); + return g_260; + } + step_hash(492); + if ((*l_824)) + { + int *l_835 = (void*)0; + int *l_836 = &g_837; + step_hash(486); + (*l_836) ^= (~(((signed char)func_18(g_106, func_24(((short)(((*l_824) & (*l_824)) | ((signed char)(func_18(g_10, (*l_824), (*g_97), l_816) <= 0x535DL) % (signed char)1L)) >> (short)0), g_101, g_10, &g_101), l_835, l_816) + (signed char)g_10) ^ 0UL)); + step_hash(487); + if ((**g_97)) + continue; + step_hash(488); + l_838 |= (**g_97); + step_hash(489); + (*l_836) = (*l_816); + } + else + { + unsigned char l_841 = 0x2BL; + int *l_842 = &l_838; + step_hash(491); + (*l_842) &= ((short)(*l_816) / (short)func_16(func_18(g_260, (func_66(l_841, (*l_824)) && 0xE1F8L), l_816, l_816))); + } + step_hash(493); + return g_106; + } + else + { + int l_848 = 3L; + int *l_850 = &g_12; + step_hash(495); + (*l_823) = func_60((((-(signed char)(((unsigned char)((unsigned)0UL % (unsigned)(*l_816)) >> (unsigned char)(&l_816 != l_823)) ^ (0x80B5L & (!5L)))) >= (func_18(g_106, l_848, g_849, (*g_97)) | (-1L))) || (*l_816)), g_448, l_850, g_448, l_850); + step_hash(517); + for (l_822 = 0; (l_822 >= 7); ++l_822) + { + int *l_854 = (void*)0; + int *l_871 = &g_12; + } + step_hash(518); + (*g_849) = (g_837 & ((**g_97) < 0L)); + } + } + step_hash(521); + (*g_849) |= l_856; + } + step_hash(523); + (*g_97) = (*g_97); + step_hash(524); + l_874 &= ((*l_816) ^ (g_448 == (l_873 != &g_97))); + step_hash(525); + return g_92; +} +static short func_4(short p_5) +{ + int **l_800 = &g_98; + int l_807 = 0x86715221L; + int *l_813 = (void*)0; + int *l_814 = (void*)0; + int *l_815 = &g_101; + step_hash(8); + for (p_5 = 0; (p_5 > (-3)); p_5 -= 3) + { + int *l_9 = &g_10; + int *l_11 = &g_12; + step_hash(5); + (*l_9) ^= 0L; + step_hash(6); + (*l_11) ^= g_10; + step_hash(7); + (*l_9) |= 0xE7ED6F18L; + } + step_hash(465); + for (g_10 = 0; (g_10 == 7); g_10++) + { + int l_15 = 1L; + step_hash(457); + l_15 = (g_10 < ((l_15 && 0xF7L) && func_16(g_12))); + step_hash(464); + for (g_12 = (-29); (g_12 >= 13); g_12 += 1) + { + int *l_808 = &l_15; + int *l_812 = &l_807; + step_hash(461); + (*l_808) = (((void*)0 == l_800) ^ ((1L <= (((unsigned char)g_101 * (unsigned char)(((short)((unsigned char)((0x0CL && ((+(l_807 >= 0x7EF004AEL)) <= p_5)) ^ (g_12 > g_92)) << (unsigned char)g_101) * (short)g_722) <= 0x43DC0BA7L)) < 0x8DL)) >= g_12)); + step_hash(462); + (*l_812) &= (((-(unsigned)(3L < 0x34L)) || ((*l_808) || (p_5 ^ g_106))) <= (func_24(((unsigned)((*l_808) != (&l_800 == &l_800)) % (unsigned)0x7C744603L), g_10, g_101, (*l_800)) > 0x30B2E415L)); + step_hash(463); + if (p_5) + continue; + } + } + step_hash(466); + (*l_815) |= p_5; + step_hash(467); + return (*l_815); +} +static int func_16(int p_17) +{ + int *l_23 = &g_12; + int ***l_796 = &g_97; + step_hash(454); + (*l_23) = (func_18((~(((((void*)0 == l_23) > func_24((*l_23), p_17, p_17, &g_12)) ^ ((void*)0 != l_796)) | p_17)), p_17, (**l_796), (**l_796)) || p_17); + step_hash(455); + (*l_23) = (*l_23); + step_hash(456); + return p_17; +} +static int func_18(short p_19, int p_20, int * p_21, int * p_22) +{ + int *l_797 = &g_92; + step_hash(452); + (*g_97) = l_797; + step_hash(453); + return (*g_98); +} +static int func_24(short p_25, unsigned short p_26, unsigned short p_27, int * p_28) +{ + unsigned l_46 = 4294967293UL; + int *l_783 = &g_92; + int *l_792 = &g_101; + step_hash(14); + p_28 = &g_12; + step_hash(442); + for (p_25 = 0; (p_25 != (-28)); p_25 -= 6) + { + } + step_hash(443); + (*l_792) |= (((*l_783) <= g_12) | ((signed char)(p_26 != ((unsigned char)p_26 >> (unsigned char)5)) << (signed char)(p_27 | (0xCF70L <= ((unsigned)p_26 % (unsigned)((short)(&l_783 != &g_98) << (short)(*l_783))))))); + step_hash(449); + for (g_101 = 10; (g_101 <= 5); g_101 -= 7) + { + unsigned char l_795 = 0x5CL; + step_hash(447); + (*l_783) = 0L; + step_hash(448); + if (l_795) + continue; + } + step_hash(450); + return g_106; +} +static int * func_31(unsigned char p_32, short p_33, int * p_34, int * p_35) +{ + unsigned l_53 = 0x6845925FL; + int l_548 = 0x9638552AL; + int l_555 = 0x3E3091CEL; + int ***l_565 = (void*)0; + int l_585 = 0L; + signed char l_636 = 0x59L; + int *l_640 = (void*)0; + int l_657 = (-10L); + unsigned l_664 = 0x8321351DL; + short l_683 = 0x5D4EL; + int *l_693 = &l_585; + signed char l_736 = (-9L); + int *l_756 = &g_12; + step_hash(357); + if (func_47(g_10, p_32, l_53, g_10, l_53)) + { + int l_538 = 1L; + int l_574 = 0L; + int **l_600 = &g_98; + step_hash(337); + for (g_448 = 0; (g_448 <= 6); ++g_448) + { + short l_560 = 0xDB41L; + int *l_588 = &g_101; + step_hash(293); + (*p_35) = ((signed char)((unsigned short)0xC3AAL / (unsigned short)((unsigned short)((~(l_538 == g_10)) == ((unsigned)(p_33 | (((unsigned short)g_101 * (unsigned short)p_32) == (~l_53))) - (unsigned)0x6A687C36L)) << (unsigned short)8)) >> (signed char)l_538); + step_hash(294); + (*p_34) = l_538; + step_hash(295); + if ((*p_34)) + continue; + step_hash(336); + if (l_53) + { + unsigned char l_547 = 250UL; + int *l_550 = &l_548; + unsigned l_564 = 0UL; + step_hash(310); + for (p_33 = 0; (p_33 > 22); ++p_33) + { + int *l_549 = &g_101; + step_hash(307); + for (g_92 = 0; (g_92 > 10); g_92 += 6) + { + step_hash(303); + l_548 &= (~(((void*)0 == &g_98) > (4L & l_547))); + step_hash(304); + (*p_34) |= (p_33 == g_260); + step_hash(305); + (*g_97) = l_549; + step_hash(306); + p_35 = l_550; + } + step_hash(308); + (*p_34) = (*p_35); + step_hash(309); + return &g_12; + } + step_hash(315); + if (((unsigned char)((((int)l_555 % (int)((short)g_106 / (short)((*l_550) ^ ((unsigned char)l_560 + (unsigned char)l_538)))) || 1UL) & (-1L)) >> (unsigned char)0)) + { + unsigned l_563 = 4294967288UL; + unsigned l_568 = 0x74B69C44L; + step_hash(312); + l_568 |= ((signed char)(l_560 || (l_564 >= (((l_565 == &g_97) == ((short)p_33 % (short)65535UL)) == g_10))) + (signed char)0xC7L); + } + else + { + short l_573 = 0x6153L; + step_hash(314); + (*g_97) = func_60((((unsigned char)p_33 + (unsigned char)((short)l_573 + (short)((unsigned)g_12 - (unsigned)(!((unsigned short)(p_32 || 0xFDL) >> (unsigned short)g_106))))) < 0UL), p_32, p_34, l_573, l_550); + } + step_hash(325); + if (((g_448 <= 0L) < g_448)) + { + step_hash(321); + for (g_12 = 0; (g_12 > (-9)); --g_12) + { + step_hash(320); + (*l_550) &= (*p_35); + } + step_hash(322); + (*p_34) ^= (+(9L && ((*l_550) >= 250UL))); + } + else + { + step_hash(324); + (*g_97) = p_35; + } + step_hash(326); + l_585 &= (*l_550); + } + else + { + signed char l_589 = 0xD1L; + step_hash(328); + if (l_560) + break; + step_hash(333); + for (g_101 = 9; (g_101 <= 2); --g_101) + { + step_hash(332); + (*g_97) = l_588; + } + step_hash(334); + (*l_588) = 0x78CCDA2DL; + step_hash(335); + (*p_35) = l_589; + } + } + step_hash(350); + for (p_32 = 0; (p_32 == 7); ++p_32) + { + int l_592 = (-5L); + int ***l_599 = &g_97; + step_hash(341); + (*g_97) = p_35; + step_hash(342); + l_592 = func_47(g_12, l_538, g_448, p_33, (l_565 == &g_97)); + step_hash(348); + for (l_538 = 0; (l_538 <= (-9)); --l_538) + { + unsigned l_615 = 0x6CF255FBL; + int *l_616 = (void*)0; + int *l_617 = &l_592; + step_hash(346); + (*l_617) |= (((short)((p_32 == (l_599 == &g_97)) > (l_600 != &g_98)) + (short)(((signed char)(~(((((unsigned char)((int)1L + (int)(((signed char)p_33 * (signed char)(-1L)) != ((unsigned short)((signed char)g_448 >> (signed char)g_12) * (unsigned short)(-2L)))) + (unsigned char)g_101) & 0L) != p_32) <= p_32)) >> (signed char)g_106) == (-3L))) || g_448); + step_hash(347); + (*p_34) = ((unsigned char)g_106 - (unsigned char)5L); + } + step_hash(349); + (*p_35) = ((+(g_92 && g_260)) & (-1L)); + } + step_hash(351); + (*l_600) = p_34; + step_hash(352); + (*p_35) = (**g_97); + } + else + { + int *l_622 = &g_10; + int l_627 = 0L; + int *l_637 = &l_548; + int ***l_638 = (void*)0; + int ***l_639 = &g_97; + step_hash(354); + (*g_97) = func_60(((int)g_101 + (int)0x4D55F47BL), p_32, l_622, ((int)0x35040A48L + (int)((1UL & p_33) ^ (l_627 < g_92))), p_35); + step_hash(355); + (*l_637) |= ((signed char)g_448 * (signed char)func_66(((p_32 && ((unsigned short)(!((unsigned)4294967289UL / (unsigned)l_585)) << (unsigned short)10)) != ((short)p_33 * (short)l_636)), (p_34 == (void*)0))); + step_hash(356); + (*l_639) = &l_637; + } + step_hash(358); + l_640 = &l_548; + step_hash(367); + if ((*p_35)) + { + step_hash(364); + for (l_555 = 20; (l_555 != 2); l_555--) + { + step_hash(363); + return &g_10; + } + } + else + { + step_hash(366); + (*l_640) ^= (*p_35); + } + step_hash(439); + for (p_33 = (-23); (p_33 != 19); p_33 += 5) + { + unsigned l_645 = 0UL; + unsigned l_648 = 6UL; + unsigned char l_665 = 255UL; + int **l_682 = (void*)0; + int *l_779 = &g_101; + } + step_hash(440); + return p_35; +} +static int func_47(signed char p_48, unsigned p_49, unsigned short p_50, unsigned p_51, unsigned short p_52) +{ + int *l_59 = &g_12; + signed char l_79 = 0x2AL; + unsigned char l_80 = 0xD0L; + int **l_528 = &l_59; + int *l_529 = &g_101; + step_hash(284); + (*l_528) = func_54(l_59, g_12, p_51, func_60((func_66((((p_49 | 1UL) <= (*l_59)) <= (((signed char)g_12 % (signed char)((int)(((unsigned short)((unsigned short)(*l_59) - (unsigned short)(((unsigned char)(g_12 == (*l_59)) >> (unsigned char)(*l_59)) == (*l_59))) / (unsigned short)l_79) <= g_10) + (int)4294967287UL)) && g_10)), l_80) <= (*l_59)), p_48, l_59, p_50, l_59)); + step_hash(285); + g_12 = p_50; + step_hash(286); + (*l_529) = p_48; + step_hash(287); + (*l_528) = &g_101; + step_hash(288); + return (*l_529); +} +static int * func_54(int * p_55, signed char p_56, unsigned p_57, int * p_58) +{ + unsigned char l_368 = 0x83L; + int *l_401 = &g_10; + int ***l_453 = &g_97; + int l_526 = 3L; + step_hash(275); + if ((l_368 >= (+((unsigned char)((((short)g_101 >> (short)g_260) != l_368) || p_57) << (unsigned char)g_12)))) + { + step_hash(206); + return (*g_97); + } + else + { + int l_392 = 0x746557D3L; + short l_397 = 1L; + signed char l_403 = (-1L); + unsigned l_407 = 0x3CB08594L; + unsigned short l_447 = 0x7DF8L; + step_hash(274); + if ((*p_55)) + { + unsigned short l_391 = 0x56FBL; + int l_393 = 0L; + int *l_394 = &l_392; + step_hash(209); + l_394 = func_60(((unsigned short)0x5DAAL * (unsigned short)((p_57 || (l_391 ^ func_66(l_392, g_260))) <= p_57)), l_391, p_55, l_393, p_58); + step_hash(210); + l_392 ^= func_66((((signed char)p_57 - (signed char)l_397) >= 65535UL), l_397); + step_hash(211); + (*p_55) |= 0x06B0F98DL; + } + else + { + signed char l_402 = (-1L); + int ***l_416 = &g_97; + unsigned l_520 = 0x1980AD38L; + step_hash(235); + for (p_57 = 28; (p_57 > 24); p_57 -= 4) + { + unsigned char l_400 = 0xE3L; + int *l_404 = (void*)0; + unsigned l_437 = 0x315FED4AL; + signed char l_446 = 0x2CL; + step_hash(216); + (*g_97) = func_60(func_66(g_106, l_392), (l_400 >= ((-7L) <= (*p_55))), &g_12, p_57, l_401); + step_hash(217); + (*g_97) = func_60(l_402, l_403, &l_392, g_92, l_404); + step_hash(233); + for (l_368 = 0; (l_368 != 26); ++l_368) + { + int *l_419 = (void*)0; + } + step_hash(234); + (**l_416) = func_60(((unsigned)(***l_416) % (unsigned)p_56), (+((g_448 > ((!0x1AD9B4CEL) < ((unsigned short)p_56 - (unsigned short)(0xF9C83682L && (*p_55))))) == (&g_98 == (void*)0))), p_58, p_57, (*g_97)); + } + step_hash(236); + (*p_55) = ((void*)0 != l_453); + step_hash(272); + if ((p_57 & ((signed char)g_448 % (signed char)((0xFB8EL || p_56) || ((g_12 != (((+((short)((signed char)p_56 - (signed char)((unsigned char)(0x7331L && ((0xE307C46FL & 0L) | p_56)) << (unsigned char)p_56)) % (short)0x858AL)) < 4294967291UL) <= p_56)) <= g_448))))) + { + int ***l_466 = &g_97; + step_hash(238); + (*p_55) &= ((unsigned short)(((signed char)(l_466 == l_453) >> (signed char)1) < l_397) - (unsigned short)0xB0D3L); + step_hash(239); + (*p_55) = (((0UL <= ((unsigned char)((&g_97 == (void*)0) | g_92) - (unsigned char)p_56)) == p_57) < 0x8BAE48ADL); + } + else + { + short l_479 = 0x4B0BL; + step_hash(241); + (*p_55) = (!(*p_55)); + step_hash(247); + for (g_12 = 0; (g_12 <= 16); g_12++) + { + int *l_492 = (void*)0; + int *l_493 = &l_392; + step_hash(245); + (*l_493) = (((short)(g_10 < (l_397 >= p_56)) >> (short)p_57) == (*p_55)); + step_hash(246); + if (l_397) + continue; + } + step_hash(259); + for (l_368 = 23; (l_368 == 28); l_368++) + { + int **l_502 = &l_401; + int *l_505 = &g_101; + step_hash(251); + (*p_55) = ((signed char)g_260 + (signed char)(((signed char)func_66(p_57, l_447) - (signed char)(p_57 == ((unsigned)(g_97 == l_502) + (unsigned)p_57))) && (((((p_58 != (void*)0) & g_10) <= l_407) & 0xF3D125E4L) == p_57))); + step_hash(252); + (**l_453) = (void*)0; + step_hash(253); + if (l_479) + break; + step_hash(258); + for (g_448 = 0; (g_448 >= 14); g_448++) + { + step_hash(257); + return l_505; + } + } + step_hash(271); + if (((signed char)p_56 / (signed char)((p_56 == (0xD115L < (g_448 ^ p_57))) && (&g_97 != l_416)))) + { + int *l_512 = &l_392; + step_hash(265); + for (p_57 = 29; (p_57 >= 46); ++p_57) + { + step_hash(264); + (*p_55) = (*p_55); + } + step_hash(266); + (*l_512) |= func_66((*l_401), p_57); + step_hash(267); + (*l_512) = (g_448 ^ ((unsigned)(-(unsigned)p_56) % (unsigned)g_12)); + } + else + { + unsigned char l_521 = 0x70L; + int *l_522 = &g_92; + step_hash(269); + (*l_522) |= ((unsigned short)g_448 + (unsigned short)((short)(((*p_55) != (((g_101 < l_520) | l_397) | l_521)) && 255UL) >> (short)14)); + step_hash(270); + (**l_453) = p_55; + } + } + step_hash(273); + (**l_416) = (void*)0; + } + } + step_hash(282); + if ((*l_401)) + { + int l_525 = 5L; + step_hash(277); + l_526 |= ((unsigned char)g_260 * (unsigned char)l_525); + } + else + { + int *l_527 = &g_12; + step_hash(279); + (*g_97) = l_527; + step_hash(280); + g_97 = &g_98; + step_hash(281); + (*g_97) = l_527; + } + step_hash(283); + return p_55; +} +static int * func_60(unsigned char p_61, unsigned short p_62, int * p_63, unsigned char p_64, int * p_65) +{ + int *l_363 = (void*)0; + int *l_367 = &g_10; + step_hash(196); + (*g_97) = (void*)0; + step_hash(197); + (*g_97) = l_363; + step_hash(202); + for (g_101 = 0; (g_101 >= 14); g_101++) + { + int *l_366 = &g_92; + step_hash(201); + (*l_366) |= (*p_63); + } + step_hash(203); + return l_367; +} +static short func_66(unsigned short p_67, unsigned p_68) +{ + unsigned char l_83 = 8UL; + int *l_90 = &g_12; + unsigned l_132 = 4294967295UL; + unsigned short l_189 = 65534UL; + int l_231 = 0x8C644E42L; + signed char l_279 = (-1L); + short l_306 = 1L; + int ***l_320 = &g_97; + short l_336 = 0xB2CFL; + signed char l_337 = 0x3DL; + int *l_340 = &g_92; + step_hash(174); + if ((0xBFL & (p_68 & ((unsigned)1UL % (unsigned)l_83)))) + { + int *l_91 = &g_92; + int l_115 = 0L; + step_hash(31); + if (g_12) + { + int **l_84 = (void*)0; + int *l_86 = (void*)0; + int **l_85 = &l_86; + int l_87 = (-1L); + step_hash(23); + (*l_85) = &g_10; + step_hash(24); + l_87 = g_12; + } + else + { + step_hash(30); + for (p_68 = 0; (p_68 <= 48); p_68++) + { + step_hash(29); + l_91 = l_90; + } + } + step_hash(56); + if ((*l_91)) + { + int **l_99 = &l_91; + int *l_100 = &g_101; + step_hash(33); + (*l_100) ^= (g_10 == (((short)((unsigned)((*l_90) < ((((((void*)0 != g_97) && (g_10 != g_92)) != ((&g_98 == l_99) == ((*g_97) != (*g_97)))) | 4294967288UL) == g_92)) + (unsigned)p_67) / (short)g_92) && g_10)); + step_hash(40); + for (p_67 = 21; (p_67 >= 32); p_67 += 9) + { + step_hash(37); + g_106 = ((6UL < 0xFD67D06FL) >= (p_68 != (p_67 >= (*l_90)))); + step_hash(38); + (*l_100) = (*l_91); + step_hash(39); + (*l_100) ^= (*l_91); + } + step_hash(46); + for (g_92 = 7; (g_92 <= (-6)); --g_92) + { + unsigned l_110 = 4294967288UL; + int l_111 = 0xB120DA2EL; + step_hash(44); + l_111 |= (((-(int)l_110) != g_101) > g_10); + step_hash(45); + (*g_97) = (*g_97); + } + step_hash(52); + for (g_92 = (-22); (g_92 < (-5)); g_92++) + { + step_hash(50); + (*l_99) = (*g_97); + step_hash(51); + (*l_100) = p_68; + } + } + else + { + int *l_114 = &g_92; + step_hash(54); + (*l_114) = p_67; + step_hash(55); + (*g_97) = (*g_97); + } + step_hash(57); + l_115 ^= p_67; + } + else + { + int l_142 = 1L; + unsigned short l_169 = 0x6E22L; + int l_170 = 0x4F6C7F95L; + int **l_214 = &l_90; + step_hash(173); + if (p_68) + { + int *l_118 = &g_92; + unsigned char l_150 = 0x78L; + step_hash(76); + if (((unsigned short)(0xB263C45FL >= (~g_101)) >> (unsigned short)0)) + { + int *l_119 = &g_101; + step_hash(61); + l_119 = l_118; + step_hash(62); + (*l_119) = (p_67 ^ ((unsigned short)(0xDB05L > (g_106 > (((int)(-1L) / (int)((signed char)((((unsigned short)g_92 * (unsigned short)((unsigned char)(!(*l_118)) % (unsigned char)((signed char)(*l_119) >> (signed char)5))) == l_132) < (0xC8546551L >= (-1L))) * (signed char)(-1L))) && 0x0DD4D5FFL))) >> (unsigned short)g_92)); + } + else + { + unsigned l_135 = 0x7241B9ADL; + int l_141 = 0x01DBA863L; + int **l_143 = &g_98; + step_hash(75); + for (g_92 = 1; (g_92 != 0); g_92 -= 1) + { + short l_140 = 0x48D5L; + int *l_153 = &l_141; + step_hash(67); + if (l_135) + break; + step_hash(72); + for (p_67 = 0; (p_67 != 38); p_67 += 1) + { + step_hash(71); + l_141 = (((unsigned short)l_140 >> (unsigned short)g_12) & (0xB7A0L & l_135)); + } + step_hash(73); + (*l_153) &= (((!(l_142 & ((*l_118) == (&g_98 == l_143)))) > g_12) && ((unsigned char)(!((unsigned)p_67 - (unsigned)((signed char)l_142 << (signed char)l_150))) % (unsigned char)(((short)((void*)0 == (*l_143)) % (short)g_92) ^ g_101))); + step_hash(74); + (*l_153) = (p_68 && ((unsigned short)(l_90 == (*g_97)) * (unsigned short)0x0808L)); + } + } + step_hash(77); + (*l_118) = 0xBB3B6D22L; + step_hash(78); + l_170 |= ((short)(((unsigned char)(p_68 ^ (-(unsigned)0UL)) << (unsigned char)7) <= (((unsigned short)(*l_118) * (unsigned short)((l_142 || (&g_98 == &l_90)) != ((&l_90 != &l_90) != ((((~((int)((unsigned short)p_68 << (unsigned short)1) + (int)(*l_90))) & p_67) || l_169) ^ l_169)))) & g_10)) / (short)0xD9D7L); + } + else + { + int **l_180 = &g_98; + int l_255 = (-1L); + step_hash(114); + for (g_101 = 0; (g_101 < (-18)); g_101--) + { + int l_179 = 0L; + int l_213 = 0xA3BE24AFL; + unsigned char l_221 = 0xEDL; + int *l_222 = &l_213; + } + step_hash(134); + if (((((((unsigned char)(g_101 | ((**l_214) > g_10)) >> (unsigned char)(**l_214)) < p_68) | ((0xC4768125L && 1L) < g_10)) != g_101) < g_92)) + { + int *l_226 = (void*)0; + int *l_227 = (void*)0; + int *l_228 = &g_101; + step_hash(116); + (*l_180) = (*g_97); + step_hash(117); + (*l_228) |= (-(int)p_67); + step_hash(127); + for (l_170 = 16; (l_170 >= 17); l_170++) + { + step_hash(121); + l_231 = (&l_228 != (void*)0); + step_hash(126); + for (p_68 = 0; (p_68 <= 24); p_68++) + { + unsigned l_246 = 4294967286UL; + step_hash(125); + (*l_228) = ((signed char)((signed char)(((unsigned char)((((short)((short)g_10 / (short)g_106) >> (short)((((int)((l_246 >= (((unsigned short)((unsigned short)(p_67 ^ (((unsigned char)g_106 / (unsigned char)((unsigned)(g_10 <= ((g_92 == g_12) || ((g_10 <= g_92) | (-8L)))) % (unsigned)0x29605C3BL)) & g_101)) / (unsigned short)0xACE6L) * (unsigned short)p_68) != 0xBE11L)) && g_106) - (int)(-5L)) & (**l_214)) == 0xFCC5AF58L)) ^ p_68) || (**l_214)) << (unsigned char)1) | g_10) >> (signed char)g_101) / (signed char)p_68); + } + } + step_hash(128); + l_255 = p_68; + } + else + { + short l_256 = 0x6979L; + int *l_257 = &l_170; + step_hash(130); + (*l_257) |= l_256; + step_hash(131); + (*l_257) ^= ((((void*)0 != (*g_97)) | 1L) >= ((unsigned short)(g_10 >= p_68) >> (unsigned short)p_67)); + step_hash(132); + (*l_257) |= g_260; + step_hash(133); + (*l_257) |= (p_68 <= 0xA116L); + } + step_hash(172); + if (((signed char)(**l_214) << (signed char)(0xDDL | g_260))) + { + int ***l_278 = &l_180; + short l_282 = 0x134AL; + int l_287 = 0xF1F42B0BL; + int *l_331 = &g_92; + step_hash(166); + if (g_106) + { + int l_271 = 0L; + int **l_289 = (void*)0; + step_hash(144); + if (((unsigned char)g_106 * (unsigned char)((unsigned)((((int)0x4CD6723AL - (int)0xEB08BFD2L) ^ (((unsigned char)(0x37L > (**l_214)) << (unsigned char)1) != ((l_271 > ((signed char)(4UL <= (255UL && ((unsigned)((((((short)(((((void*)0 != l_278) || g_92) || 4294967295UL) <= p_67) / (short)0xC91FL) > 1L) >= p_67) >= p_68) ^ (-10L)) - (unsigned)(-8L)))) / (signed char)l_279)) > 0x276FL))) | l_271) % (unsigned)g_101))) + { + step_hash(138); + l_255 = p_67; + } + else + { + int *l_288 = &l_170; + step_hash(140); + l_287 &= ((g_260 && (l_282 >= ((short)((unsigned short)g_101 << (unsigned short)g_10) >> (short)4))) <= p_67); + step_hash(141); + (*l_288) = p_67; + step_hash(142); + (*l_278) = l_289; + step_hash(143); + (*g_97) = &l_231; + } + step_hash(151); + if ((!(g_260 | g_12))) + { + int l_300 = (-9L); + int *l_301 = (void*)0; + int *l_302 = (void*)0; + int *l_303 = &g_101; + step_hash(146); + (*l_303) = ((signed char)(g_12 <= (~g_92)) >> (signed char)((((((short)(&g_98 == (void*)0) >> (short)5) >= (g_92 <= (0x8BA5L || p_68))) || ((int)((unsigned char)((signed char)0xD7L + (signed char)(**l_214)) - (unsigned char)g_12) + (int)l_300)) || p_67) < g_106)); + step_hash(147); + (*l_303) ^= ((unsigned char)0UL >> (unsigned char)0); + step_hash(148); + (*l_214) = (*g_97); + } + else + { + step_hash(150); + return (**l_214); + } + step_hash(152); + return p_67; + } + else + { + unsigned short l_307 = 0x49B1L; + int ***l_319 = &g_97; + int l_326 = 0x1953DAA2L; + step_hash(163); + if ((*l_90)) + { + short l_314 = (-1L); + int l_321 = 0xE188A6EBL; + step_hash(155); + l_231 ^= l_306; + step_hash(156); + (*l_214) = (*l_180); + step_hash(157); + l_307 = p_67; + step_hash(158); + l_321 = ((((signed char)((signed char)(p_68 & 2UL) + (signed char)((unsigned short)((void*)0 == &g_97) << (unsigned short)8)) >> (signed char)((l_314 >= (((signed char)p_67 % (signed char)g_260) == p_68)) != ((signed char)(l_319 != l_320) / (signed char)1L))) > g_106) ^ 0xE0L); + } + else + { + short l_322 = 0xE4FAL; + int l_323 = 1L; + step_hash(160); + l_322 = p_67; + step_hash(161); + l_255 = (g_92 || (&l_214 != (void*)0)); + step_hash(162); + l_323 = (**l_214); + } + step_hash(164); + l_255 = (g_101 != 0xF21FL); + step_hash(165); + l_326 ^= (((-1L) & (g_12 >= ((unsigned char)250UL + (unsigned char)(&g_97 == &g_97)))) <= p_68); + } + step_hash(167); + l_255 &= g_12; + step_hash(168); + (*l_331) = (((short)p_67 >> (short)g_10) & (g_12 ^ ((unsigned char)g_10 - (unsigned char)g_12))); + step_hash(169); + (*l_331) = 0xABE08972L; + } + else + { + step_hash(171); + g_101 = (p_67 < (p_68 > p_68)); + } + } + } + step_hash(175); + (*l_340) = (4UL ^ ((signed char)((*l_320) != (void*)0) << (signed char)((short)l_336 * (short)(l_337 | (g_10 > (((signed char)4L >> (signed char)4) < g_101)))))); + step_hash(193); + if (((short)(((unsigned char)((unsigned char)(g_10 <= g_260) - (unsigned char)(((unsigned short)(*l_340) - (unsigned short)((short)(1L | 3L) + (short)0L)) ^ g_260)) % (unsigned char)p_68) <= g_260) << (short)p_68)) + { + unsigned char l_362 = 0xC1L; + step_hash(188); + for (g_106 = 0; (g_106 != 33); g_106 += 1) + { + int *l_353 = &g_101; + step_hash(180); + (*g_97) = l_353; + step_hash(181); + (***l_320) = ((p_68 ^ ((unsigned short)((unsigned char)0x64L % (unsigned char)g_101) << (unsigned short)5)) & (-(unsigned short)g_106)); + step_hash(187); + if (((unsigned char)p_67 >> (unsigned char)3)) + { + int l_361 = 1L; + step_hash(183); + l_361 = 0x391B31A1L; + step_hash(184); + if ((*g_98)) + break; + } + else + { + step_hash(186); + (*g_97) = (*g_97); + } + } + step_hash(189); + l_362 ^= (-1L); + step_hash(190); + (**l_320) = (*g_97); + } + else + { + step_hash(192); + (*l_340) = p_68; + } + step_hash(194); + return g_10; +} +void csmith_compute_hash(void) +{ + transparent_crc(g_10, "g_10", print_hash_value); + transparent_crc(g_12, "g_12", print_hash_value); + transparent_crc(g_92, "g_92", print_hash_value); + transparent_crc(g_101, "g_101", print_hash_value); + transparent_crc(g_106, "g_106", print_hash_value); + transparent_crc(g_260, "g_260", print_hash_value); + transparent_crc(g_448, "g_448", print_hash_value); + transparent_crc(g_722, "g_722", print_hash_value); + transparent_crc(g_837, "g_837", print_hash_value); +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand8.expect b/src/tests/csmith/rand8.expect new file mode 100644 index 0000000..cf0c6ad --- /dev/null +++ b/src/tests/csmith/rand8.expect @@ -0,0 +1,220 @@ +...checksum after hashing g_10 : EBCD8975 +...checksum after hashing g_12 : 5402BF3D +...checksum after hashing g_92 : A1821ECC +...checksum after hashing g_101 : 1BBF0E0A +...checksum after hashing g_106 : AD5F69E9 +...checksum after hashing g_260 : E0AFF11C +...checksum after hashing g_448 : 14ADC36C +...checksum after hashing g_722 : C22EA967 +...checksum after hashing g_837 : 8CC2B390 +before stmt(468): checksum = 8CC2B390 +...checksum after hashing g_10 : EBCD8975 +...checksum after hashing g_12 : 5402BF3D +...checksum after hashing g_92 : A1821ECC +...checksum after hashing g_101 : 1BBF0E0A +...checksum after hashing g_106 : AD5F69E9 +...checksum after hashing g_260 : E0AFF11C +...checksum after hashing g_448 : 14ADC36C +...checksum after hashing g_722 : C22EA967 +...checksum after hashing g_837 : 8CC2B390 +before stmt(8): checksum = 8CC2B390 +...checksum after hashing g_10 : EBCD8975 +...checksum after hashing g_12 : 5402BF3D +...checksum after hashing g_92 : A1821ECC +...checksum after hashing g_101 : 1BBF0E0A +...checksum after hashing g_106 : AD5F69E9 +...checksum after hashing g_260 : E0AFF11C +...checksum after hashing g_448 : 14ADC36C +...checksum after hashing g_722 : C22EA967 +...checksum after hashing g_837 : 8CC2B390 +before stmt(5): checksum = 8CC2B390 +...checksum after hashing g_10 : EBCD8975 +...checksum after hashing g_12 : 5402BF3D +...checksum after hashing g_92 : A1821ECC +...checksum after hashing g_101 : 1BBF0E0A +...checksum after hashing g_106 : AD5F69E9 +...checksum after hashing g_260 : E0AFF11C +...checksum after hashing g_448 : 14ADC36C +...checksum after hashing g_722 : C22EA967 +...checksum after hashing g_837 : 8CC2B390 +before stmt(6): checksum = 8CC2B390 +...checksum after hashing g_10 : EBCD8975 +...checksum after hashing g_12 : 9E8BE954 +...checksum after hashing g_92 : 1E6DFCEB +...checksum after hashing g_101 : E04DC7D +...checksum after hashing g_106 : BF56830A +...checksum after hashing g_260 : A26B80BD +...checksum after hashing g_448 : 830D8D9D +...checksum after hashing g_722 : 469CC261 +...checksum after hashing g_837 : D10D438E +before stmt(7): checksum = D10D438E +...checksum after hashing g_10 : CEAAEBE5 +...checksum after hashing g_12 : 9203E99 +...checksum after hashing g_92 : 31148A40 +...checksum after hashing g_101 : 913EA97D +...checksum after hashing g_106 : A875791D +...checksum after hashing g_260 : EA8CEB3B +...checksum after hashing g_448 : 6685EC32 +...checksum after hashing g_722 : 39BB6E91 +...checksum after hashing g_837 : 9D762FE5 +before stmt(465): checksum = 9D762FE5 +...checksum after hashing g_10 : 2144DF1C +...checksum after hashing g_12 : 21640B73 +...checksum after hashing g_92 : BD62E9C +...checksum after hashing g_101 : 1C0D369E +...checksum after hashing g_106 : FD92F2AB +...checksum after hashing g_260 : 35CBCE4C +...checksum after hashing g_448 : 7BFE69B +...checksum after hashing g_722 : 1B53327F +...checksum after hashing g_837 : 8DB7F63A +before stmt(466): checksum = 8DB7F63A +...checksum after hashing g_10 : 2144DF1C +...checksum after hashing g_12 : 21640B73 +...checksum after hashing g_92 : BD62E9C +...checksum after hashing g_101 : D003B993 +...checksum after hashing g_106 : E9C0D5DE +...checksum after hashing g_260 : C67F252C +...checksum after hashing g_448 : 3D33E6C3 +...checksum after hashing g_722 : 44D01BC7 +...checksum after hashing g_837 : 89976ACD +before stmt(467): checksum = 89976ACD +...checksum after hashing g_10 : 99F8B879 +...checksum after hashing g_12 : EDCE0BED +...checksum after hashing g_92 : 907362F3 +...checksum after hashing g_101 : 7E6B2802 +...checksum after hashing g_106 : 8CA7EE98 +...checksum after hashing g_260 : 475A400B +...checksum after hashing g_448 : 3C861BDE +...checksum after hashing g_722 : B50A1E6D +...checksum after hashing g_837 : 1CE7BE58 +before stmt(522): checksum = 1CE7BE58 +...checksum after hashing g_10 : 2144DF1C +...checksum after hashing g_12 : 21640B73 +...checksum after hashing g_92 : BD62E9C +...checksum after hashing g_101 : D003B993 +...checksum after hashing g_106 : E9C0D5DE +...checksum after hashing g_260 : C67F252C +...checksum after hashing g_448 : 3D33E6C3 +...checksum after hashing g_722 : 44D01BC7 +...checksum after hashing g_837 : 89976ACD +before stmt(472): checksum = 89976ACD +...checksum after hashing g_10 : 2144DF1C +...checksum after hashing g_12 : 21640B73 +...checksum after hashing g_92 : BD62E9C +...checksum after hashing g_101 : D003B993 +...checksum after hashing g_106 : E9C0D5DE +...checksum after hashing g_260 : C67F252C +...checksum after hashing g_448 : 3D33E6C3 +...checksum after hashing g_722 : 44D01BC7 +...checksum after hashing g_837 : 89976ACD +before stmt(520): checksum = 89976ACD +...checksum after hashing g_10 : 2144DF1C +...checksum after hashing g_12 : 21640B73 +...checksum after hashing g_92 : BD62E9C +...checksum after hashing g_101 : D003B993 +...checksum after hashing g_106 : E9C0D5DE +...checksum after hashing g_260 : C67F252C +...checksum after hashing g_448 : 3D33E6C3 +...checksum after hashing g_722 : 44D01BC7 +...checksum after hashing g_837 : 89976ACD +before stmt(521): checksum = 89976ACD +...checksum after hashing g_10 : 55F63774 +...checksum after hashing g_12 : F99C2C98 +...checksum after hashing g_92 : 56BF10DD +...checksum after hashing g_101 : 7CBBB3F6 +...checksum after hashing g_106 : 1BD39C4A +...checksum after hashing g_260 : B94A3732 +...checksum after hashing g_448 : F0DC1F6A +...checksum after hashing g_722 : F2955439 +...checksum after hashing g_837 : 3BE46C5D +before stmt(472): checksum = 3BE46C5D +...checksum after hashing g_10 : 55F63774 +...checksum after hashing g_12 : F99C2C98 +...checksum after hashing g_92 : 56BF10DD +...checksum after hashing g_101 : 7CBBB3F6 +...checksum after hashing g_106 : 1BD39C4A +...checksum after hashing g_260 : B94A3732 +...checksum after hashing g_448 : F0DC1F6A +...checksum after hashing g_722 : F2955439 +...checksum after hashing g_837 : 3BE46C5D +before stmt(520): checksum = 3BE46C5D +...checksum after hashing g_10 : 55F63774 +...checksum after hashing g_12 : F99C2C98 +...checksum after hashing g_92 : 56BF10DD +...checksum after hashing g_101 : 7CBBB3F6 +...checksum after hashing g_106 : 1BD39C4A +...checksum after hashing g_260 : B94A3732 +...checksum after hashing g_448 : F0DC1F6A +...checksum after hashing g_722 : F2955439 +...checksum after hashing g_837 : 3BE46C5D +before stmt(521): checksum = 3BE46C5D +...checksum after hashing g_10 : C8210FCD +...checksum after hashing g_12 : F3592581 +...checksum after hashing g_92 : 2227F952 +...checksum after hashing g_101 : 81424B83 +...checksum after hashing g_106 : FA973AD9 +...checksum after hashing g_260 : 88520045 +...checksum after hashing g_448 : F4D5EC39 +...checksum after hashing g_722 : 4A0046AC +...checksum after hashing g_837 : 67544F34 +before stmt(472): checksum = 67544F34 +...checksum after hashing g_10 : C8210FCD +...checksum after hashing g_12 : F3592581 +...checksum after hashing g_92 : 2227F952 +...checksum after hashing g_101 : 81424B83 +...checksum after hashing g_106 : FA973AD9 +...checksum after hashing g_260 : 88520045 +...checksum after hashing g_448 : F4D5EC39 +...checksum after hashing g_722 : 4A0046AC +...checksum after hashing g_837 : 67544F34 +before stmt(520): checksum = 67544F34 +...checksum after hashing g_10 : C8210FCD +...checksum after hashing g_12 : F3592581 +...checksum after hashing g_92 : 2227F952 +...checksum after hashing g_101 : 81424B83 +...checksum after hashing g_106 : FA973AD9 +...checksum after hashing g_260 : 88520045 +...checksum after hashing g_448 : F4D5EC39 +...checksum after hashing g_722 : 4A0046AC +...checksum after hashing g_837 : 67544F34 +before stmt(521): checksum = 67544F34 +...checksum after hashing g_10 : 3A4BD710 +...checksum after hashing g_12 : 685C3050 +...checksum after hashing g_92 : BC88F8BC +...checksum after hashing g_101 : 880809DA +...checksum after hashing g_106 : 4CC63C74 +...checksum after hashing g_260 : B27CC783 +...checksum after hashing g_448 : FE180DB8 +...checksum after hashing g_722 : 29446D78 +...checksum after hashing g_837 : BAD47218 +before stmt(523): checksum = BAD47218 +...checksum after hashing g_10 : 3A4BD710 +...checksum after hashing g_12 : 685C3050 +...checksum after hashing g_92 : BC88F8BC +...checksum after hashing g_101 : 880809DA +...checksum after hashing g_106 : 4CC63C74 +...checksum after hashing g_260 : B27CC783 +...checksum after hashing g_448 : FE180DB8 +...checksum after hashing g_722 : 29446D78 +...checksum after hashing g_837 : BAD47218 +before stmt(524): checksum = BAD47218 +...checksum after hashing g_10 : 3A4BD710 +...checksum after hashing g_12 : 685C3050 +...checksum after hashing g_92 : BC88F8BC +...checksum after hashing g_101 : 880809DA +...checksum after hashing g_106 : 4CC63C74 +...checksum after hashing g_260 : B27CC783 +...checksum after hashing g_448 : FE180DB8 +...checksum after hashing g_722 : 29446D78 +...checksum after hashing g_837 : BAD47218 +before stmt(525): checksum = BAD47218 +...checksum after hashing g_10 : 3A4BD710 +...checksum after hashing g_12 : 685C3050 +...checksum after hashing g_92 : BC88F8BC +...checksum after hashing g_101 : 880809DA +...checksum after hashing g_106 : 4CC63C74 +...checksum after hashing g_260 : B27CC783 +...checksum after hashing g_448 : FE180DB8 +...checksum after hashing g_722 : 29446D78 +...checksum after hashing g_837 : BAD47218 +checksum = bad47218 diff --git a/src/tests/csmith/rand80.c b/src/tests/csmith/rand80.c new file mode 100644 index 0000000..eb7a9b3 --- /dev/null +++ b/src/tests/csmith/rand80.c @@ -0,0 +1,2136 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static int g_2 = 0xFE0A8EACL; +static int g_64 = (-2L); +static unsigned short g_73 = 0x9389L; +static unsigned g_145 = 0x07E90836L; +static short g_173[1] = {(-10L)}; +static short g_174 = 0x009CL; +static unsigned char g_178[4][5] = {{0xBAL, 0UL, 254UL, 255UL, 255UL}, {0xBAL, 0UL, 254UL, 255UL, 255UL}, {0xBAL, 0UL, 254UL, 255UL, 255UL}, {0xBAL, 0UL, 254UL, 255UL, 255UL}}; +static int *g_215[3][10] = {{(void*)0, (void*)0, (void*)0, (void*)0, (void*)0, (void*)0, (void*)0, (void*)0, (void*)0, (void*)0}, {(void*)0, (void*)0, (void*)0, (void*)0, (void*)0, (void*)0, (void*)0, (void*)0, (void*)0, (void*)0}, {(void*)0, (void*)0, (void*)0, (void*)0, (void*)0, (void*)0, (void*)0, (void*)0, (void*)0, (void*)0}}; +static int **g_214 = &g_215[1][0]; +static signed char g_319 = 2L; +static unsigned g_363 = 0xB6B2F613L; +static int g_578 = 0x2568F8C0L; +static unsigned short g_627 = 0xB116L; +static short g_670 = (-1L); +static int **g_677 = (void*)0; +static unsigned g_681[5][8] = {{0xBF208AD7L, 0x186F2183L, 0xDBDAFFC8L, 0x186F2183L, 0xBF208AD7L, 4294967295UL, 0xBF208AD7L, 0x186F2183L}, {0xBF208AD7L, 0x186F2183L, 0xDBDAFFC8L, 0x186F2183L, 0xBF208AD7L, 4294967295UL, 0xBF208AD7L, 0x186F2183L}, {0xBF208AD7L, 0x186F2183L, 0xDBDAFFC8L, 0x186F2183L, 0xBF208AD7L, 4294967295UL, 0xBF208AD7L, 0x186F2183L}, {0xBF208AD7L, 0x186F2183L, 0xDBDAFFC8L, 0x186F2183L, 0xBF208AD7L, 4294967295UL, 0xBF208AD7L, 0x186F2183L}, {0xBF208AD7L, 0x186F2183L, 0xDBDAFFC8L, 0x186F2183L, 0xBF208AD7L, 4294967295UL, 0xBF208AD7L, 0x186F2183L}}; +static int g_760 = 0xA39326F4L; +static unsigned char g_876 = 0UL; +static unsigned g_891[1] = {0x5C5AEFB0L}; +static int *g_895 = &g_2; +static int g_1001 = 1L; +static unsigned short g_1077 = 65526UL; +static signed char g_1156 = 0x3CL; +static signed char g_1229 = 0x12L; +static unsigned g_1296[8][10] = {{0x6AD6CF0DL, 0xE2063814L, 9UL, 0x28E69C4CL, 0x824C1DD3L, 0UL, 0UL, 4294967295UL, 0UL, 0UL}, {0x6AD6CF0DL, 0xE2063814L, 9UL, 0x28E69C4CL, 0x824C1DD3L, 0UL, 0UL, 4294967295UL, 0UL, 0UL}, {0x6AD6CF0DL, 0xE2063814L, 9UL, 0x28E69C4CL, 0x824C1DD3L, 0UL, 0UL, 4294967295UL, 0UL, 0UL}, {0x6AD6CF0DL, 0xE2063814L, 9UL, 0x28E69C4CL, 0x824C1DD3L, 0UL, 0UL, 4294967295UL, 0UL, 0UL}, {0x6AD6CF0DL, 0xE2063814L, 9UL, 0x28E69C4CL, 0x824C1DD3L, 0UL, 0UL, 4294967295UL, 0UL, 0UL}, {0x6AD6CF0DL, 0xE2063814L, 9UL, 0x28E69C4CL, 0x824C1DD3L, 0UL, 0UL, 4294967295UL, 0UL, 0UL}, {0x6AD6CF0DL, 0xE2063814L, 9UL, 0x28E69C4CL, 0x824C1DD3L, 0UL, 0UL, 4294967295UL, 0UL, 0UL}, {0x6AD6CF0DL, 0xE2063814L, 9UL, 0x28E69C4CL, 0x824C1DD3L, 0UL, 0UL, 4294967295UL, 0UL, 0UL}}; +static unsigned g_1380 = 6UL; +static int g_1491 = 0x1184553FL; +static unsigned g_1519 = 8UL; +static int g_1520[6] = {0L, 0L, 0L, 0L, 0L, 0L}; +static unsigned func_1(void); +static int func_5(signed char p_6, int p_7, unsigned short p_8, unsigned p_9); +static int func_11(unsigned p_12); +static int * func_13(unsigned p_14, int * p_15); +static unsigned func_17(int p_18, int * p_19, unsigned char p_20, int * p_21); +static int * func_22(int p_23, int p_24, short p_25); +static short func_43(int * p_44, unsigned char p_45, unsigned p_46); +static short func_47(int * p_48, int p_49); +static int * func_50(unsigned p_51, signed char p_52, unsigned char p_53); +static unsigned func_59(short p_60); +static unsigned func_1(void) +{ + signed char l_10 = (-1L); + int l_1456 = 0xB7612FCAL; + int l_1462 = 0xA6D95F12L; + unsigned short l_1463 = 0xABACL; + step_hash(911); + for (g_2 = 0; (g_2 >= (-27)); g_2 -= 4) + { + int *l_1447 = &g_578; + int l_1454 = 0xE824343FL; + int l_1461 = 7L; + } + step_hash(912); + (*g_895) &= (+((unsigned short)l_1456 * (unsigned short)(-9L))); + step_hash(917); + for (g_760 = 7; (g_760 <= (-28)); g_760--) + { + step_hash(916); + (*g_214) = (void*)0; + } + step_hash(918); + return g_1380; +} +static int func_5(signed char p_6, int p_7, unsigned short p_8, unsigned p_9) +{ + int l_1198 = 0x9335173CL; + int *l_1203 = (void*)0; + int ***l_1215 = &g_214; + unsigned l_1224 = 4294967291UL; + int l_1228[8][7] = {{(-1L), 0xFBDDB12EL, (-1L), 0xFBDDB12EL, (-1L), 0xFBDDB12EL, (-1L)}, {(-1L), 0xFBDDB12EL, (-1L), 0xFBDDB12EL, (-1L), 0xFBDDB12EL, (-1L)}, {(-1L), 0xFBDDB12EL, (-1L), 0xFBDDB12EL, (-1L), 0xFBDDB12EL, (-1L)}, {(-1L), 0xFBDDB12EL, (-1L), 0xFBDDB12EL, (-1L), 0xFBDDB12EL, (-1L)}, {(-1L), 0xFBDDB12EL, (-1L), 0xFBDDB12EL, (-1L), 0xFBDDB12EL, (-1L)}, {(-1L), 0xFBDDB12EL, (-1L), 0xFBDDB12EL, (-1L), 0xFBDDB12EL, (-1L)}, {(-1L), 0xFBDDB12EL, (-1L), 0xFBDDB12EL, (-1L), 0xFBDDB12EL, (-1L)}, {(-1L), 0xFBDDB12EL, (-1L), 0xFBDDB12EL, (-1L), 0xFBDDB12EL, (-1L)}}; + int l_1249 = (-7L); + unsigned char l_1253 = 0xF4L; + signed char l_1286 = 0xDEL; + unsigned l_1289[5][5]; + unsigned char l_1301 = 251UL; + signed char l_1343 = 0L; + unsigned l_1369 = 0UL; + signed char l_1406[1][6]; + int i, j; + for (i = 0; i < 5; i++) + { + for (j = 0; j < 5; j++) + l_1289[i][j] = 4294967293UL; + } + for (i = 0; i < 1; i++) + { + for (j = 0; j < 6; j++) + l_1406[i][j] = 0x0FL; + } + step_hash(704); + l_1198 = func_11(g_2); + step_hash(859); + for (g_670 = 0; (g_670 > (-18)); g_670 -= 4) + { + short l_1204[2][8] = {{0x4239L, 0x4239L, 1L, 3L, 0xDD95L, 3L, 1L, 0x4239L}, {0x4239L, 0x4239L, 1L, 3L, 0xDD95L, 3L, 1L, 0x4239L}}; + int ***l_1205 = &g_214; + unsigned l_1217 = 0x8CE5F97DL; + int *l_1256 = &g_64; + int l_1325[5][5] = {{0xFAB88071L, 1L, 0x6E3EB0EFL, 0x6E3EB0EFL, 1L}, {0xFAB88071L, 1L, 0x6E3EB0EFL, 0x6E3EB0EFL, 1L}, {0xFAB88071L, 1L, 0x6E3EB0EFL, 0x6E3EB0EFL, 1L}, {0xFAB88071L, 1L, 0x6E3EB0EFL, 0x6E3EB0EFL, 1L}, {0xFAB88071L, 1L, 0x6E3EB0EFL, 0x6E3EB0EFL, 1L}}; + unsigned short l_1428 = 0x0081L; + int l_1446 = 0L; + int i, j; + } + step_hash(860); + return (*g_895); +} +static int func_11(unsigned p_12) +{ + int *l_16 = &g_2; + unsigned l_28 = 6UL; + int **l_1194 = (void*)0; + int **l_1195 = &l_16; + int **l_1196 = &g_895; + int ***l_1197 = &g_214; + step_hash(701); + (*l_1195) = func_13((!((l_16 == (void*)0) > func_17((((void*)0 != &g_2) <= 0L), func_22(((signed char)l_28 + (signed char)((unsigned char)(((unsigned short)0x736DL / (unsigned short)(-(signed char)(!p_12))) != (-8L)) >> (unsigned char)4)), g_2, p_12), (*l_16), &g_2))), l_16); + step_hash(702); + (*l_1197) = l_1196; + step_hash(703); + return (*l_16); +} +static int * func_13(unsigned p_14, int * p_15) +{ + signed char l_1108 = 3L; + unsigned l_1118 = 0UL; + signed char l_1124 = 0x3FL; + int ***l_1132[1][6] = {{&g_214, &g_677, &g_214, &g_677, &g_214, &g_677}}; + int i, j; + step_hash(699); + if (l_1108) + { + int l_1122[5]; + int *l_1123 = &g_64; + int i; + for (i = 0; i < 5; i++) + l_1122[i] = 0L; + step_hash(654); + if (l_1108) + { + step_hash(649); + (*g_214) = func_22(p_14, p_14, p_14); + } + else + { + unsigned l_1109 = 4294967295UL; + int ***l_1112 = &g_677; + int *l_1117 = (void*)0; + int *l_1121 = &g_578; + step_hash(651); + l_1117 = p_15; + step_hash(652); + l_1118--; + step_hash(653); + (*l_1121) ^= (*p_15); + } + step_hash(655); + (*l_1123) = l_1122[3]; + } + else + { + unsigned short l_1125 = 65531UL; + unsigned l_1136[4]; + int *l_1139 = &g_64; + int l_1140 = 0L; + signed char l_1159 = 0xD6L; + int l_1169 = 1L; + int l_1178 = 0xCBF3425AL; + int l_1181[7]; + unsigned short l_1182 = 0x92EDL; + int i; + for (i = 0; i < 4; i++) + l_1136[i] = 0UL; + for (i = 0; i < 7; i++) + l_1181[i] = 0x7F507F59L; + step_hash(657); + l_1125 = (l_1118 || ((*p_15) || l_1124)); + step_hash(658); + (*g_214) = func_22((g_681[3][3] == (p_14 & g_627)), l_1125, p_14); + step_hash(698); + if ((((int)(l_1125 | l_1125) % (int)p_14) == p_14)) + { + int *l_1135[3][7] = {{&g_578, &g_2, &g_2, &g_2, &g_2, &g_578, &g_2}, {&g_578, &g_2, &g_2, &g_2, &g_2, &g_578, &g_2}, {&g_578, &g_2, &g_2, &g_2, &g_2, &g_578, &g_2}}; + int i, j; + step_hash(660); + l_1140 &= ((unsigned)(func_43(l_1139, g_681[0][2], p_14) || p_14) / (unsigned)(*p_15)); + } + else + { + signed char l_1146[5][5] = {{4L, 0x0BL, 4L, 0x0BL, 4L}, {4L, 0x0BL, 4L, 0x0BL, 4L}, {4L, 0x0BL, 4L, 0x0BL, 4L}, {4L, 0x0BL, 4L, 0x0BL, 4L}, {4L, 0x0BL, 4L, 0x0BL, 4L}}; + int l_1147[10][1] = {{0xB433F118L}, {0xB433F118L}, {0xB433F118L}, {0xB433F118L}, {0xB433F118L}, {0xB433F118L}, {0xB433F118L}, {0xB433F118L}, {0xB433F118L}, {0xB433F118L}}; + int l_1165 = (-1L); + int l_1168 = 4L; + int l_1172 = 0x47E5BF5DL; + int l_1177 = (-1L); + int l_1180[4]; + unsigned l_1187 = 2UL; + int i, j; + for (i = 0; i < 4; i++) + l_1180[i] = 0x38E204CEL; + step_hash(694); + for (g_760 = 17; (g_760 != (-7)); --g_760) + { + int l_1166[8]; + int i; + for (i = 0; i < 8; i++) + l_1166[i] = 0xE5593852L; + step_hash(672); + if (((*l_1139) > (*p_15))) + { + int *l_1143 = &g_2; + step_hash(666); + (*l_1139) = 0x93EEE625L; + step_hash(667); + return l_1143; + } + else + { + step_hash(669); + (*l_1139) &= ((signed char)l_1146[3][2] - (signed char)g_876); + step_hash(670); + for (g_319 = 0; g_319 < 5; g_319 += 1) + { + for (g_876 = 0; g_876 < 8; g_876 += 1) + { + g_681[g_319][g_876] = 0xACB68E7BL; + } + } + step_hash(671); + (*l_1139) = l_1147[6][0]; + } + step_hash(673); + (*l_1139) = (-7L); + step_hash(693); + for (l_1124 = 0; (l_1124 >= 0); l_1124 -= 1) + { + int *l_1150 = &l_1140; + int **l_1164 = &l_1150; + int l_1167 = 0x608358EFL; + int l_1171 = 9L; + int l_1173 = (-8L); + int l_1174 = 0xF297A751L; + int l_1175 = 0L; + int l_1176 = 0x34BA5625L; + int l_1179 = 0x7FD9FFB1L; + step_hash(677); + (*l_1139) = ((((signed char)4L + (signed char)((void*)0 == l_1150)) && p_14) | (*l_1150)); + step_hash(682); + for (g_876 = 0; (g_876 <= 0); g_876 += 1) + { + step_hash(681); + (*l_1139) = func_47(p_15, (*g_895)); + } + step_hash(692); + if ((*g_895)) + { + unsigned short l_1151 = 65532UL; + step_hash(684); + if ((*g_895)) + break; + step_hash(685); + l_1151 = (g_145 < (p_14 | (g_319 != 0x8CF9L))); + step_hash(686); + (*l_1139) = ((unsigned short)((unsigned short)g_1156 >> (unsigned short)11) * (unsigned short)((int)l_1159 + (int)((unsigned short)((((*l_1150) && ((0xF9E54C54L == (0UL & ((unsigned short)((void*)0 != l_1164) >> (unsigned short)((void*)0 != &g_215[1][0])))) || g_73)) != 0x2863AD42L) >= (*l_1150)) << (unsigned short)g_174))); + } + else + { + int l_1170[9][2] = {{(-1L), (-1L)}, {(-1L), (-1L)}, {(-1L), (-1L)}, {(-1L), (-1L)}, {(-1L), (-1L)}, {(-1L), (-1L)}, {(-1L), (-1L)}, {(-1L), (-1L)}, {(-1L), (-1L)}}; + int i, j; + step_hash(688); + (**l_1164) ^= (*l_1139); + step_hash(689); + l_1182--; + step_hash(690); + (*l_1150) ^= ((p_14 == (((p_14 < (*l_1139)) ^ l_1165) != 1L)) <= 1L); + step_hash(691); + (*l_1150) ^= (*p_15); + } + } + } + step_hash(695); + (*l_1139) = (((unsigned char)0x87L >> (unsigned char)((p_14 | p_14) >= 0UL)) & 253UL); + step_hash(696); + l_1187--; + step_hash(697); + (*l_1139) = ((unsigned char)(~(((short)(-8L) - (short)g_627) <= (g_760 || (*l_1139)))) - (unsigned char)3L); + } + } + step_hash(700); + return p_15; +} + + + + + + + +static unsigned func_17(int p_18, int * p_19, unsigned char p_20, int * p_21) +{ + unsigned short l_1066 = 0UL; + int l_1067 = 0x01240F95L; + int l_1107 = 0L; + step_hash(644); + l_1107 |= ((unsigned char)((0x7933L > func_43(func_22((((func_47(func_50(p_20, ((short)(-(unsigned)g_2) << (short)3), (((void*)0 == &g_2) != (func_59((((g_2 >= p_18) >= ((unsigned char)g_2 - (unsigned char)g_2)) >= 0L)) < 0L))), (*g_895)) != 0UL) <= 1UL) >= l_1066), l_1066, l_1067), l_1067, g_681[2][7])) == 65526UL) % (unsigned char)g_2); + step_hash(645); + return l_1067; +} + + + + + + + +static int * func_22(int p_23, int p_24, short p_25) +{ + int *l_36 = &g_2; + step_hash(11); + for (p_25 = (-27); (p_25 < 2); ++p_25) + { + step_hash(10); + return l_36; + } + step_hash(17); + for (p_24 = 0; (p_24 != 19); ++p_24) + { + int l_39 = 0x9C9D9403L; + int *l_40 = &l_39; + step_hash(15); + (*l_40) = l_39; + step_hash(16); + (*l_40) |= g_2; + } + step_hash(18); + return &g_2; +} + + + + + + + +static short func_43(int * p_44, unsigned char p_45, unsigned p_46) +{ + int l_1070 = (-1L); + int l_1073 = 2L; + int l_1074 = 0x69B112E3L; + int l_1075 = 0L; + int l_1076 = 0x6AF730E4L; + int ***l_1090[7][3]; + int **l_1098 = &g_215[1][3]; + unsigned char l_1099[6][4] = {{0xE1L, 255UL, 0xB9L, 255UL}, {0xE1L, 255UL, 0xB9L, 255UL}, {0xE1L, 255UL, 0xB9L, 255UL}, {0xE1L, 255UL, 0xB9L, 255UL}, {0xE1L, 255UL, 0xB9L, 255UL}, {0xE1L, 255UL, 0xB9L, 255UL}}; + unsigned short l_1100 = 1UL; + signed char l_1103 = 0x9EL; + unsigned l_1104[8][1]; + int i, j; + for (i = 0; i < 7; i++) + { + for (j = 0; j < 3; j++) + l_1090[i][j] = &g_677; + } + for (i = 0; i < 8; i++) + { + for (j = 0; j < 1; j++) + l_1104[i][j] = 4294967293UL; + } + step_hash(639); + if (((int)(p_45 < ((l_1070 <= p_46) & p_46)) + (int)p_45)) + { + int *l_1071 = &g_578; + int *l_1072[6][4] = {{&g_578, &g_2, (void*)0, (void*)0}, {&g_578, &g_2, (void*)0, (void*)0}, {&g_578, &g_2, (void*)0, (void*)0}, {&g_578, &g_2, (void*)0, (void*)0}, {&g_578, &g_2, (void*)0, (void*)0}, {&g_578, &g_2, (void*)0, (void*)0}}; + int i, j; + step_hash(627); + g_1077--; + step_hash(628); + (*l_1071) = func_47(l_1071, (*p_44)); + step_hash(634); + for (g_145 = 0; (g_145 >= 30); g_145 += 8) + { + short l_1082 = 0L; + step_hash(632); + if (l_1082) + break; + step_hash(633); + return g_578; + } + } + else + { + int **l_1087 = &g_215[0][1]; + signed char l_1091 = 0xA7L; + unsigned l_1092 = 0xB7E65B63L; + int l_1093 = 0xD175C261L; + step_hash(636); + l_1093 = ((unsigned)(((-1L) ^ ((((unsigned char)(&g_215[1][0] != l_1087) * (unsigned char)(g_1001 == ((short)g_891[0] % (short)g_64))) >= 0x95L) && l_1092)) > g_760) - (unsigned)g_891[0]); + step_hash(637); + l_1093 = 0xD99A805BL; + step_hash(638); + return g_363; + } + step_hash(640); + l_1099[3][0] = func_47(func_22(p_45, ((+g_891[0]) ^ 5UL), ((signed char)((unsigned char)0x9BL - (unsigned char)((void*)0 == l_1098)) << (signed char)5)), (*p_44)); + step_hash(641); + l_1100++; + step_hash(642); + l_1104[5][0]--; + step_hash(643); + return g_1001; +} + + + + + + + +static short func_47(int * p_48, int p_49) +{ + step_hash(617); + (*g_214) = &p_49; + step_hash(623); + for (g_174 = 0; (g_174 == 16); g_174 += 2) + { + step_hash(621); + (*g_214) = &p_49; + step_hash(622); + return p_49; + } + step_hash(624); + return p_49; +} + + + + + + + +static int * func_50(unsigned p_51, signed char p_52, unsigned char p_53) +{ + int l_258 = 0x2FF86269L; + int l_261[2][6] = {{0xCEF595A5L, (-5L), 0xCEF595A5L, (-5L), 0xCEF595A5L, (-5L)}, {0xCEF595A5L, (-5L), 0xCEF595A5L, (-5L), 0xCEF595A5L, (-5L)}}; + short l_262 = 0x9AC1L; + int l_263 = 0x812FAC84L; + unsigned char l_322[1]; + int l_325 = 8L; + int l_329 = 0x0AFD5F46L; + int l_330 = 0L; + unsigned char l_333 = 0x32L; + int l_343 = 0x531503FBL; + unsigned l_379 = 4294967295UL; + unsigned char l_397 = 0xF2L; + unsigned l_432[1][5] = {{4294967295UL, 0xDD5CB82CL, 4294967295UL, 0xDD5CB82CL, 4294967295UL}}; + int l_450 = 0L; + unsigned l_477 = 0xA75572B1L; + unsigned l_517 = 0x5F48342AL; + int l_580 = 0x4E23795FL; + int l_591 = 0xB79FFF5DL; + int **l_604 = &g_215[2][2]; + int l_653[6][6] = {{1L, (-3L), 1L, (-3L), 1L, 1L}, {1L, (-3L), 1L, (-3L), 1L, 1L}, {1L, (-3L), 1L, (-3L), 1L, 1L}, {1L, (-3L), 1L, (-3L), 1L, 1L}, {1L, (-3L), 1L, (-3L), 1L, 1L}, {1L, (-3L), 1L, (-3L), 1L, 1L}}; + short l_695 = 0x1780L; + unsigned l_715 = 0xF365EA80L; + unsigned l_746 = 0x5CC3B270L; + unsigned char l_787 = 0xF4L; + int *l_916[8][10] = {{&g_2, &l_261[1][1], &g_64, &l_261[1][1], &g_2, &l_591, &g_578, &l_261[1][1], &g_2, &l_261[1][1]}, {&g_2, &l_261[1][1], &g_64, &l_261[1][1], &g_2, &l_591, &g_578, &l_261[1][1], &g_2, &l_261[1][1]}, {&g_2, &l_261[1][1], &g_64, &l_261[1][1], &g_2, &l_591, &g_578, &l_261[1][1], &g_2, &l_261[1][1]}, {&g_2, &l_261[1][1], &g_64, &l_261[1][1], &g_2, &l_591, &g_578, &l_261[1][1], &g_2, &l_261[1][1]}, {&g_2, &l_261[1][1], &g_64, &l_261[1][1], &g_2, &l_591, &g_578, &l_261[1][1], &g_2, &l_261[1][1]}, {&g_2, &l_261[1][1], &g_64, &l_261[1][1], &g_2, &l_591, &g_578, &l_261[1][1], &g_2, &l_261[1][1]}, {&g_2, &l_261[1][1], &g_64, &l_261[1][1], &g_2, &l_591, &g_578, &l_261[1][1], &g_2, &l_261[1][1]}, {&g_2, &l_261[1][1], &g_64, &l_261[1][1], &g_2, &l_591, &g_578, &l_261[1][1], &g_2, &l_261[1][1]}}; + int *l_920 = &l_261[1][4]; + int *l_1006[9] = {(void*)0, &l_343, (void*)0, &l_343, (void*)0, &l_343, (void*)0, &l_343, (void*)0}; + int *l_1009 = (void*)0; + unsigned short l_1053 = 65527UL; + int *l_1056 = &l_261[1][1]; + int *l_1057[8][9] = {{&l_325, &l_450, &l_343, &l_450, (void*)0, &l_450, &l_343, &l_450, &l_325}, {&l_325, &l_450, &l_343, &l_450, (void*)0, &l_450, &l_343, &l_450, &l_325}, {&l_325, &l_450, &l_343, &l_450, (void*)0, &l_450, &l_343, &l_450, &l_325}, {&l_325, &l_450, &l_343, &l_450, (void*)0, &l_450, &l_343, &l_450, &l_325}, {&l_325, &l_450, &l_343, &l_450, (void*)0, &l_450, &l_343, &l_450, &l_325}, {&l_325, &l_450, &l_343, &l_450, (void*)0, &l_450, &l_343, &l_450, &l_325}, {&l_325, &l_450, &l_343, &l_450, (void*)0, &l_450, &l_343, &l_450, &l_325}, {&l_325, &l_450, &l_343, &l_450, (void*)0, &l_450, &l_343, &l_450, &l_325}}; + int *l_1058 = &l_325; + int *l_1059 = &l_325; + int *l_1060[1]; + int *l_1061 = &l_261[0][0]; + int *l_1062 = &l_450; + int *l_1063[2]; + int i, j; + for (i = 0; i < 1; i++) + l_322[i] = 0x20L; + for (i = 0; i < 1; i++) + l_1060[i] = &l_591; + for (i = 0; i < 2; i++) + l_1063[i] = &g_64; + step_hash(455); + if (l_258) + { + int *l_259 = &g_64; + int *l_260[5]; + unsigned l_264 = 0x7FACF82BL; + short l_328[1][4]; + unsigned char l_387 = 251UL; + int ***l_528[5] = {&g_214, &g_214, &g_214, &g_214, &g_214}; + short l_590 = 0xE6EAL; + unsigned l_592[7][3] = {{4294967295UL, 0x69290373L, 1UL}, {4294967295UL, 0x69290373L, 1UL}, {4294967295UL, 0x69290373L, 1UL}, {4294967295UL, 0x69290373L, 1UL}, {4294967295UL, 0x69290373L, 1UL}, {4294967295UL, 0x69290373L, 1UL}, {4294967295UL, 0x69290373L, 1UL}}; + unsigned short l_633 = 0xA50AL; + signed char l_641 = (-1L); + int l_652[6] = {0L, 0L, (-4L), 0L, 0L, (-4L)}; + unsigned l_664 = 0xDC72AFF2L; + unsigned l_686 = 4294967295UL; + unsigned l_692 = 0UL; + int i, j; + for (i = 0; i < 5; i++) + l_260[i] = &g_64; + for (i = 0; i < 1; i++) + { + for (j = 0; j < 4; j++) + l_328[i][j] = 1L; + } + step_hash(138); + l_264--; + step_hash(212); + for (l_258 = 0; (l_258 != 7); ++l_258) + { + int l_286 = 0xBD12EB80L; + int l_304 = 0L; + int l_306 = (-5L); + int l_307 = (-1L); + int l_308 = 0xD94B7105L; + int l_309[8][3] = {{0xD556F374L, 0xD556F374L, 0x2EEE1C8CL}, {0xD556F374L, 0xD556F374L, 0x2EEE1C8CL}, {0xD556F374L, 0xD556F374L, 0x2EEE1C8CL}, {0xD556F374L, 0xD556F374L, 0x2EEE1C8CL}, {0xD556F374L, 0xD556F374L, 0x2EEE1C8CL}, {0xD556F374L, 0xD556F374L, 0x2EEE1C8CL}, {0xD556F374L, 0xD556F374L, 0x2EEE1C8CL}, {0xD556F374L, 0xD556F374L, 0x2EEE1C8CL}}; + signed char l_311 = 2L; + signed char l_316[7][9] = {{0x91L, 0x1AL, 0x91L, 0x1AL, 0x91L, 0x1AL, 0x91L, 0x1AL, 0x91L}, {0x91L, 0x1AL, 0x91L, 0x1AL, 0x91L, 0x1AL, 0x91L, 0x1AL, 0x91L}, {0x91L, 0x1AL, 0x91L, 0x1AL, 0x91L, 0x1AL, 0x91L, 0x1AL, 0x91L}, {0x91L, 0x1AL, 0x91L, 0x1AL, 0x91L, 0x1AL, 0x91L, 0x1AL, 0x91L}, {0x91L, 0x1AL, 0x91L, 0x1AL, 0x91L, 0x1AL, 0x91L, 0x1AL, 0x91L}, {0x91L, 0x1AL, 0x91L, 0x1AL, 0x91L, 0x1AL, 0x91L, 0x1AL, 0x91L}, {0x91L, 0x1AL, 0x91L, 0x1AL, 0x91L, 0x1AL, 0x91L, 0x1AL, 0x91L}}; + signed char l_331[3][4] = {{1L, 1L, 0x7FL, 1L}, {1L, 1L, 0x7FL, 1L}, {1L, 1L, 0x7FL, 1L}}; + int l_332 = 0xABAECFB9L; + int i, j; + step_hash(209); + for (g_64 = 0; (g_64 == 13); g_64++) + { + int ***l_281[2][10] = {{&g_214, (void*)0, &g_214, (void*)0, &g_214, (void*)0, &g_214, (void*)0, &g_214, (void*)0}, {&g_214, (void*)0, &g_214, (void*)0, &g_214, (void*)0, &g_214, (void*)0, &g_214, (void*)0}}; + int l_301 = (-7L); + int l_326[3][7] = {{0x1B861DB0L, 0x1B861DB0L, 0xC3BB1E18L, 0x1B861DB0L, 0x1B861DB0L, 0xC3BB1E18L, 0x1B861DB0L}, {0x1B861DB0L, 0x1B861DB0L, 0xC3BB1E18L, 0x1B861DB0L, 0x1B861DB0L, 0xC3BB1E18L, 0x1B861DB0L}, {0x1B861DB0L, 0x1B861DB0L, 0xC3BB1E18L, 0x1B861DB0L, 0x1B861DB0L, 0xC3BB1E18L, 0x1B861DB0L}}; + signed char l_360 = 1L; + int i, j; + step_hash(169); + for (l_263 = 0; (l_263 < 9); l_263 += 3) + { + unsigned l_278 = 0xD0F13C40L; + int *l_297 = &g_2; + int l_305 = 0xBDE2D00BL; + int l_310 = 1L; + int l_312 = 1L; + int l_313[1]; + unsigned char l_338 = 0x1CL; + unsigned char l_344 = 9UL; + int i; + for (i = 0; i < 1; i++) + l_313[i] = 0x1493CA2AL; + step_hash(152); + for (g_73 = (-3); (g_73 < 26); g_73++) + { + unsigned l_275 = 0x1A249A28L; + step_hash(151); + l_275++; + } + step_hash(160); + if ((((4294967295UL >= 0x97A598A3L) && (g_174 > (l_278 != g_173[0]))) > ((signed char)((void*)0 != l_281[1][0]) << (signed char)1))) + { + step_hash(154); + l_261[1][1] = (((p_53 <= ((int)((unsigned)l_286 + (unsigned)((((short)g_145 % (short)((unsigned)0x8398D24BL % (unsigned)l_261[1][1])) & (((short)p_53 / (short)0xC98EL) < ((signed char)g_2 * (signed char)(5UL <= g_178[1][1])))) && l_258)) + (int)0xDA47DFB4L)) || g_2) || 255UL); + step_hash(155); + (*g_214) = l_297; + } + else + { + int *l_298 = &l_261[1][1]; + int l_299 = 0xED2619A1L; + int l_300 = (-9L); + int l_302 = 0x776ED7C3L; + int l_303 = (-1L); + int l_314 = 0x4B7CE09DL; + int l_315 = 0L; + int l_317 = 0L; + int l_318 = 0xF8921A94L; + int l_320 = 0x500AC3C9L; + int l_321[7]; + short l_327 = 0x0A22L; + int i; + for (i = 0; i < 7; i++) + l_321[i] = 0L; + step_hash(157); + l_298 = l_260[3]; + step_hash(158); + --l_322[0]; + step_hash(159); + l_333--; + } + step_hash(168); + if (p_52) + { + signed char l_336[4] = {0xA7L, 1L, 0xA7L, 1L}; + short l_337 = (-1L); + int l_341 = 9L; + int l_342 = 0x329A7D32L; + int i; + step_hash(162); + (*g_214) = (*g_214); + step_hash(163); + ++l_338; + step_hash(164); + l_344--; + step_hash(165); + l_308 &= ((g_173[0] && (*l_297)) || 1UL); + } + else + { + int l_357 = 0x02423B62L; + step_hash(167); + l_357 = ((unsigned)((unsigned char)0x9EL * (unsigned char)(((signed char)(*l_297) * (signed char)p_51) && ((signed char)(-3L) * (signed char)g_319))) / (unsigned)((int)(p_51 != l_261[0][4]) / (int)l_261[1][1])); + } + } + step_hash(184); + for (l_262 = 0; (l_262 == (-21)); l_262 -= 8) + { + unsigned char l_361 = 0xACL; + int l_362 = 0xB61C34E6L; + step_hash(173); + l_360 = (g_178[3][4] && p_52); + step_hash(174); + l_343 = 0L; + step_hash(183); + if (l_361) + { + step_hash(176); + (*g_214) = func_22((!l_311), g_64, (9UL || ((*g_214) == (*g_214)))); + step_hash(177); + l_362 |= l_331[2][2]; + step_hash(178); + return (*g_214); + } + else + { + signed char l_364 = 0xC4L; + step_hash(180); + g_363 &= (p_53 & p_53); + step_hash(181); + l_325 = (l_364 == (!l_364)); + step_hash(182); + l_325 = p_52; + } + } + step_hash(207); + if ((g_178[0][4] != p_51)) + { + step_hash(190); + for (l_311 = 0; (l_311 == (-24)); l_311 -= 2) + { + step_hash(189); + l_307 = 0x090FCFD1L; + } + step_hash(197); + for (l_262 = 0; (l_262 >= 0); l_262 -= 1) + { + int l_369 = 5L; + int i, j; + step_hash(194); + l_286 = (((int)l_322[l_262] + (int)(l_331[(l_262 + 2)][l_262] & ((((5UL != l_369) == ((signed char)g_73 / (signed char)((-(unsigned char)g_174) & (5UL ^ ((p_52 != g_173[0]) & g_173[0]))))) <= 7UL) || p_53))) > g_319); + step_hash(195); + l_369 &= p_52; + step_hash(196); + return (*g_214); + } + } + else + { + unsigned short l_375 = 65535UL; + int l_377 = 1L; + step_hash(206); + for (l_264 = 5; (l_264 < 16); ++l_264) + { + unsigned l_376 = 0x4F36D27AL; + int l_378 = 0xC80504A8L; + step_hash(202); + l_375 = l_286; + step_hash(203); + l_376 &= (p_52 >= 0x36D8FB8BL); + step_hash(204); + --l_379; + step_hash(205); + l_377 |= p_53; + } + } + step_hash(208); + l_332 = ((short)g_173[0] >> (short)(!0xADF4L)); + } + step_hash(210); + (*g_214) = l_259; + step_hash(211); + (*g_214) = l_259; + } + step_hash(293); + if ((p_51 <= (-(int)1L))) + { + int l_385 = 0xA82AF8D5L; + int l_386 = 0xC5B45B3BL; + int l_394 = 1L; + step_hash(214); + ++l_387; + step_hash(219); + for (g_174 = (-28); (g_174 != 25); g_174 += 5) + { + short l_392 = 5L; + int l_393 = 0x43939D47L; + int l_395 = 0xD0546B5EL; + int l_396 = 0x585EBB25L; + step_hash(218); + ++l_397; + } + } + else + { + int *l_400 = &g_2; + int ***l_405 = &g_214; + int l_421 = 6L; + step_hash(221); + (*g_214) = l_400; + step_hash(222); + (*l_259) |= l_261[1][1]; + step_hash(244); + for (g_174 = 0; (g_174 <= 11); g_174 += 2) + { + unsigned l_413 = 0UL; + step_hash(236); + for (l_330 = 21; (l_330 >= 25); l_330 += 6) + { + int l_406 = 0xF4B6BAA1L; + step_hash(229); + l_406 |= (&g_214 == l_405); + step_hash(235); + for (g_64 = 0; (g_64 != (-28)); --g_64) + { + step_hash(233); + (*g_214) = func_22(g_64, g_173[0], ((unsigned)p_52 + (unsigned)p_53)); + step_hash(234); + (**l_405) = l_260[4]; + } + } + step_hash(243); + for (p_51 = 0; (p_51 == 2); p_51 += 7) + { + unsigned char l_414[1][9] = {{0x9FL, 0x06L, 0x9FL, 0x06L, 0x9FL, 0x06L, 0x9FL, 0x06L, 0x9FL}}; + int i, j; + step_hash(240); + (**l_405) = func_22(l_333, (l_413 || (g_174 | 0UL)), g_363); + step_hash(241); + (*g_214) = (void*)0; + step_hash(242); + if (l_414[0][5]) + break; + } + } + step_hash(292); + for (g_363 = 11; (g_363 <= 16); g_363++) + { + signed char l_419 = (-7L); + int *l_449 = &l_325; + step_hash(276); + for (l_262 = 1; (l_262 >= 0); l_262 -= 1) + { + int l_425 = 0x2B8EAB4CL; + int **l_451 = (void*)0; + int i, j; + step_hash(258); + if (l_261[l_262][(l_262 + 2)]) + { + signed char l_420 = 0xCFL; + int i, j; + step_hash(252); + l_261[l_262][(l_262 + 3)] = (p_51 < func_59((((int)(((l_419 || (*l_400)) ^ l_420) & (l_260[(l_262 + 1)] != (void*)0)) / (int)p_52) || 0x724FL))); + } + else + { + unsigned l_422 = 4294967293UL; + int l_433 = 0xF8981870L; + step_hash(254); + (*g_214) = (*g_214); + step_hash(255); + ++l_422; + step_hash(256); + l_425 |= l_262; + step_hash(257); + l_433 = ((signed char)(l_261[l_262][(l_262 + 2)] & g_73) % (signed char)((unsigned char)g_363 / (unsigned char)((short)p_51 - (short)(p_51 != l_432[0][2])))); + } + step_hash(259); + if (p_53) + continue; + step_hash(270); + if ((p_51 < (((g_363 & p_51) < func_59(p_53)) > (((unsigned short)0x7871L << (unsigned short)12) && ((short)g_319 + (short)(p_52 & l_425)))))) + { + unsigned l_448 = 0x971E3B31L; + step_hash(261); + l_421 &= func_59(g_363); + step_hash(262); + (*l_259) = ((unsigned char)p_52 - (unsigned char)(((unsigned)g_145 - (unsigned)l_343) > (0x7CL != ((signed char)(((unsigned char)((int)l_448 - (int)((l_449 == (*g_214)) | l_450)) + (unsigned char)((l_261[l_262][(l_262 + 2)] < l_261[l_262][(l_262 + 2)]) || g_319)) > (*l_400)) + (signed char)9L)))); + step_hash(263); + if (l_425) + continue; + step_hash(264); + (**l_405) = func_22((0x6F8FL == ((((*g_214) == &l_261[l_262][(l_262 + 2)]) != l_261[l_262][(l_262 + 2)]) || (-5L))), (*l_449), g_174); + } + else + { + int l_462[3][4] = {{0x4BEBEB32L, 0x4BEBEB32L, 1L, 0x4BEBEB32L}, {0x4BEBEB32L, 0x4BEBEB32L, 1L, 0x4BEBEB32L}, {0x4BEBEB32L, 0x4BEBEB32L, 1L, 0x4BEBEB32L}}; + int i, j; + step_hash(266); + if (p_52) + break; + step_hash(267); + (*l_259) &= p_53; + step_hash(268); + (*l_259) &= ((l_451 != &g_215[1][0]) != 0x574519E2L); + step_hash(269); + (*l_449) ^= ((unsigned char)p_51 / (unsigned char)((((unsigned)((signed char)((int)((&l_260[1] == &l_449) & 1UL) + (int)p_51) - (signed char)(((unsigned)p_53 / (unsigned)0xBBBE6B68L) == l_462[2][0])) - (unsigned)p_51) <= g_174) | p_53)); + } + step_hash(275); + for (p_52 = 3; (p_52 >= 0); p_52 -= 1) + { + int i, j; + step_hash(274); + (*l_449) ^= (4294967295UL < ((unsigned short)l_450 >> (unsigned short)((6UL <= ((signed char)g_173[0] / (signed char)(((signed char)(4UL > ((int)((p_53 & g_363) ^ p_51) / (int)((int)5L - (int)(*l_259)))) / (signed char)p_51) && p_51))) ^ p_53))); + } + } + step_hash(277); + (*l_259) = ((unsigned char)0x7BL + (unsigned char)g_64); + step_hash(291); + for (l_343 = 0; (l_343 >= (-20)); --l_343) + { + step_hash(281); + (*l_259) = ((*l_259) && p_51); + step_hash(282); + if (l_477) + continue; + step_hash(290); + for (l_262 = 0; (l_262 > (-23)); l_262 -= 8) + { + step_hash(286); + (*l_259) |= ((unsigned short)((unsigned)p_51 % (unsigned)(p_53 | p_53)) % (unsigned short)p_52); + step_hash(287); + (*l_259) = ((signed char)func_59(p_52) >> (signed char)4); + step_hash(288); + if (p_53) + break; + step_hash(289); + (*l_449) = p_51; + } + } + } + } + step_hash(397); + if (func_59(g_173[0])) + { + int l_492 = (-1L); + int ***l_495 = &g_214; + int l_496 = 0xF12F0929L; + int l_539 = 0L; + int l_559 = 0x409E4127L; + int l_562 = 0x6327EBE2L; + int l_565 = 0L; + int l_566 = (-1L); + int l_567 = (-1L); + int l_568 = (-1L); + int l_569 = 0x83AC71D7L; + int l_575 = (-1L); + int l_576 = (-9L); + int l_579 = 0xB8D595BBL; + int l_586 = 0x5D0CE154L; + unsigned l_605 = 0UL; + unsigned short l_626 = 0xF17BL; + short l_639 = 0L; + int l_660 = 0x2645AB90L; + unsigned l_661 = 4294967289UL; + step_hash(317); + if ((((signed char)func_59(((signed char)((((int)l_492 - (int)p_52) >= (p_51 <= (&l_260[3] == (void*)0))) != ((unsigned short)(l_492 <= (p_52 >= ((g_173[0] == (l_495 == (void*)0)) && l_496))) * (unsigned short)g_145)) % (signed char)8L)) + (signed char)g_319) < g_173[0])) + { + step_hash(296); + return (*g_214); + } + else + { + unsigned char l_501 = 0xBBL; + step_hash(315); + if (((signed char)3L + (signed char)((l_501 & ((void*)0 == &g_214)) == p_52))) + { + unsigned short l_513[10][3] = {{65526UL, 0x55AFL, 65526UL}, {65526UL, 0x55AFL, 65526UL}, {65526UL, 0x55AFL, 65526UL}, {65526UL, 0x55AFL, 65526UL}, {65526UL, 0x55AFL, 65526UL}, {65526UL, 0x55AFL, 65526UL}, {65526UL, 0x55AFL, 65526UL}, {65526UL, 0x55AFL, 65526UL}, {65526UL, 0x55AFL, 65526UL}, {65526UL, 0x55AFL, 65526UL}}; + int l_514 = 0x99E19607L; + int i, j; + step_hash(306); + for (p_52 = (-8); (p_52 <= (-5)); ++p_52) + { + unsigned l_510 = 4294967295UL; + int l_515 = 0x6497B497L; + int l_516 = 0x062B6874L; + step_hash(302); + (**l_495) = (*g_214); + step_hash(303); + if (p_53) + continue; + step_hash(304); + l_514 &= ((*l_259) == ((short)(l_450 && (((short)l_510 + (short)(((signed char)p_53 - (signed char)((*l_495) == (void*)0)) & g_64)) <= (p_52 == g_363))) / (short)l_513[0][1])); + step_hash(305); + l_517--; + } + step_hash(312); + for (l_517 = (-17); (l_517 > 44); ++l_517) + { + step_hash(310); + (*l_259) ^= (&l_514 != (void*)0); + step_hash(311); + l_514 = (func_59(((-4L) == ((void*)0 != l_260[1]))) & 8UL); + } + } + else + { + step_hash(314); + (*l_259) = ((unsigned short)((unsigned short)(((void*)0 != &g_215[1][0]) <= p_51) >> (unsigned short)l_432[0][2]) + (unsigned short)0UL); + } + step_hash(316); + (*l_259) = (!(!(65535UL | (((unsigned char)func_59(((void*)0 != l_528[1])) / (unsigned char)(((((short)l_379 << (short)12) <= ((unsigned)(p_51 != (((unsigned short)g_173[0] + (unsigned short)g_319) > ((unsigned char)g_173[0] - (unsigned char)g_2))) - (unsigned)g_363)) > l_501) & p_52)) ^ (-4L))))); + } + step_hash(318); + l_539 |= ((unsigned char)func_59((*l_259)) >> (unsigned char)2); + step_hash(366); + if (((func_59(((unsigned short)((unsigned char)l_333 - (unsigned char)(l_539 < func_59(((void*)0 == &l_450)))) << (unsigned short)15)) == 0x8A614F6AL) > g_173[0])) + { + short l_555[10]; + int l_556 = 0xFB806068L; + int l_558 = (-5L); + int l_564 = 1L; + int l_571 = 0L; + int l_572 = 1L; + int l_573 = 0x56CD9B57L; + int l_574 = (-9L); + int l_577 = 2L; + int l_581 = 0xC8988B86L; + int l_582 = 0L; + int l_583 = 0x898BCE5CL; + int l_584 = 0xC7B3CD29L; + int l_585[7][2] = {{0x230EDC34L, 0xA0C4E1C5L}, {0x230EDC34L, 0xA0C4E1C5L}, {0x230EDC34L, 0xA0C4E1C5L}, {0x230EDC34L, 0xA0C4E1C5L}, {0x230EDC34L, 0xA0C4E1C5L}, {0x230EDC34L, 0xA0C4E1C5L}, {0x230EDC34L, 0xA0C4E1C5L}}; + unsigned char l_587 = 2UL; + int i, j; + for (i = 0; i < 10; i++) + l_555[i] = 0x3843L; + step_hash(335); + if (((func_59(g_363) || ((int)p_53 + (int)((unsigned char)func_59(g_73) << (unsigned char)2))) >= ((((short)((unsigned short)p_51 + (unsigned short)0xCBCEL) * (short)p_51) > (&g_2 != (void*)0)) & 0x3FBC3809L))) + { + int *l_552 = &g_64; + int l_560 = (-5L); + int l_561 = 0x38FDFED9L; + int l_563[9] = {(-1L), 0x060E0886L, (-1L), 0x060E0886L, (-1L), 0x060E0886L, (-1L), 0x060E0886L, (-1L)}; + int i; + step_hash(325); + for (p_51 = 0; (p_51 <= 2); p_51 += 1) + { + step_hash(324); + (**l_495) = l_552; + } + step_hash(330); + for (l_539 = 0; (l_539 != 4); ++l_539) + { + int l_557[4]; + signed char l_570 = (-7L); + int i; + for (i = 0; i < 4; i++) + l_557[i] = 0x178CC454L; + step_hash(329); + l_587++; + } + step_hash(331); + l_592[0][1]--; + step_hash(332); + (**l_495) = func_22(p_52, g_73, l_584); + } + else + { + step_hash(334); + return (*g_214); + } + } + else + { + int l_595 = 1L; + int l_606[3][1]; + int i, j; + for (i = 0; i < 3; i++) + { + for (j = 0; j < 1; j++) + l_606[i][j] = (-6L); + } + step_hash(337); + l_606[2][0] ^= ((l_595 && ((short)1L - (short)((unsigned char)(((short)g_2 / (short)l_595) ^ g_2) << (unsigned char)((unsigned char)((void*)0 != &g_215[1][0]) - (unsigned char)(func_59((l_604 != l_604)) ^ l_605))))) | 0x8B07743CL); + step_hash(338); + (*l_259) = ((unsigned)(p_51 >= (&g_215[2][2] != &g_215[1][0])) / (unsigned)g_578); + step_hash(345); + for (l_330 = 0; (l_330 <= 25); l_330++) + { + unsigned l_611 = 0UL; + step_hash(342); + (*g_214) = (*g_214); + step_hash(343); + (*l_259) = p_53; + step_hash(344); + (*l_259) |= ((l_611 != ((((p_52 <= l_611) >= g_178[0][4]) & p_51) > ((((((short)((unsigned)(((&g_215[0][3] == (*l_495)) | 0x617D9450L) ^ g_363) % (unsigned)p_52) >> (short)8) & g_73) && 0xDEEFL) >= l_606[0][0]) && 0xD307DD75L))) ^ 0x659F79DCL); + } + step_hash(365); + if ((((unsigned)((short)(g_73 || ((unsigned char)((void*)0 == &g_215[1][9]) * (unsigned char)(p_53 == ((p_52 > 4294967294UL) != p_53)))) >> (short)7) / (unsigned)((!((unsigned short)((0xDAL != (((unsigned short)p_52 % (unsigned short)p_52) > p_53)) || l_626) - (unsigned short)g_627)) || p_51)) == l_606[2][0])) + { + int l_632 = 1L; + step_hash(353); + for (l_565 = 0; (l_565 <= (-6)); --l_565) + { + step_hash(350); + (*l_259) ^= (((unsigned char)l_606[1][0] * (unsigned char)l_632) <= (p_53 && p_53)); + step_hash(351); + (*l_259) = p_53; + step_hash(352); + l_633++; + } + } + else + { + short l_638 = 0xFA04L; + int l_640 = (-1L); + int l_655 = 0xAA43D093L; + int l_656 = 0xAF52B93DL; + int l_658 = (-1L); + step_hash(355); + (*g_214) = &l_606[0][0]; + step_hash(356); + l_595 |= p_52; + step_hash(364); + for (l_580 = (-1); (l_580 <= 23); l_580++) + { + unsigned char l_642 = 0x25L; + int l_645 = 0x171CA5E4L; + int l_646 = (-1L); + int l_647 = 9L; + int l_648 = 0x2DF0254FL; + int l_649 = 1L; + int l_650 = 0x531A1889L; + int l_651 = 1L; + int l_654 = 0x72B14805L; + int l_657 = 0xBDAEF7B2L; + int l_659 = 8L; + step_hash(360); + l_642++; + step_hash(361); + if (p_52) + break; + step_hash(362); + ++l_661; + step_hash(363); + ++l_664; + } + } + } + } + else + { + int *l_667[5]; + int i; + for (i = 0; i < 5; i++) + l_667[i] = &l_450; + step_hash(368); + (*l_604) = l_667[3]; + step_hash(395); + if ((((void*)0 != l_528[1]) <= ((unsigned short)g_670 * (unsigned short)g_578))) + { + int *l_678[3][3] = {{&l_261[1][1], &g_64, &l_261[1][1]}, {&l_261[1][1], &g_64, &l_261[1][1]}, {&l_261[1][1], &g_64, &l_261[1][1]}}; + int i, j; + step_hash(370); + (*l_259) |= ((signed char)((unsigned short)((short)p_51 >> (short)3) * (unsigned short)((void*)0 == g_677)) << (signed char)(l_678[0][2] == l_667[3])); + step_hash(382); + for (g_363 = (-23); (g_363 > 54); g_363 += 3) + { + int l_682 = 0xF05C05D9L; + step_hash(374); + l_682 = g_681[2][2]; + step_hash(380); + for (l_379 = (-29); (l_379 <= 7); l_379 += 7) + { + int *l_685 = (void*)0; + step_hash(378); + (*l_259) |= l_682; + step_hash(379); + return l_685; + } + step_hash(381); + (*l_259) = l_686; + } + } + else + { + unsigned l_687[1][6] = {{4294967290UL, 4294967290UL, 1UL, 4294967290UL, 4294967290UL, 1UL}}; + int i, j; + step_hash(384); + l_687[0][5]--; + step_hash(385); + for (g_627 = 0; g_627 < 5; g_627 += 1) + { + l_260[g_627] = (void*)0; + } + step_hash(394); + for (l_590 = 0; (l_590 <= 4); l_590 += 1) + { + int *l_690 = (void*)0; + int l_691 = 1L; + step_hash(393); + for (l_325 = 4; (l_325 >= 0); l_325 -= 1) + { + int i; + step_hash(392); + l_691 &= (p_53 ^ (p_53 > ((void*)0 == l_690))); + } + } + } + step_hash(396); + l_692++; + } + } + else + { + short l_699 = 3L; + int l_732 = (-1L); + int l_736 = 0x09346F0DL; + int l_737 = (-4L); + int l_740 = 1L; + int l_741[7][2]; + int *l_753[7]; + unsigned l_761[1]; + int i, j; + for (i = 0; i < 7; i++) + { + for (j = 0; j < 2; j++) + l_741[i][j] = 0x6EC7F115L; + } + for (i = 0; i < 7; i++) + l_753[i] = &l_741[2][1]; + for (i = 0; i < 1; i++) + l_761[i] = 1UL; + step_hash(454); + if (l_695) + { + int *l_696 = &l_450; + step_hash(400); + return (*l_604); + } + else + { + int l_716 = 5L; + int l_730 = 0xACEE1429L; + int l_733 = 0xC68DF22EL; + int l_734 = (-1L); + int l_735 = 1L; + int l_738 = 0xA4F13832L; + int l_739[4][3] = {{1L, 0x85612ADDL, 0L}, {1L, 0x85612ADDL, 0L}, {1L, 0x85612ADDL, 0L}, {1L, 0x85612ADDL, 0L}}; + int l_745 = 0xD9EBBE19L; + int *l_770[8] = {&l_739[3][0], &l_739[3][0], &l_261[1][1], &l_739[3][0], &l_739[3][0], &l_261[1][1], &l_739[3][0], &l_739[3][0]}; + int i, j; + step_hash(453); + if (((unsigned short)(((((((0xD946D89FL < (!(0xB37DL >= g_178[1][4]))) != 0x395CL) != l_699) && ((short)((signed char)g_2 >> (signed char)p_53) - (short)((unsigned)((unsigned short)0xDD38L >> (unsigned short)((short)(((int)(-(unsigned)g_319) + (int)1UL) < 0UL) / (short)l_715)) / (unsigned)p_52))) <= 0x0685L) > g_64) | l_716) >> (unsigned short)g_73)) + { + int **l_719 = &g_215[1][9]; + int l_731 = 0x04C2BA24L; + int l_742 = (-10L); + int l_743 = 0x09BAB926L; + int l_744[1]; + int i; + for (i = 0; i < 1; i++) + l_744[i] = 7L; + step_hash(431); + if ((((func_59(((unsigned short)(l_719 == &g_215[2][8]) + (unsigned short)g_64)) <= p_52) != ((short)((unsigned short)g_319 / (unsigned short)p_53) % (short)((unsigned char)((0x14L == ((int)((p_53 == p_51) <= l_716) / (int)0xD6BB153AL)) >= 0x7CL) >> (unsigned char)p_51))) > p_52)) + { + int *l_728 = (void*)0; + int *l_729[9]; + int l_762 = 8L; + int i; + for (i = 0; i < 9; i++) + l_729[i] = &g_64; + step_hash(404); + ++l_746; + step_hash(409); + for (l_591 = 0; (l_591 >= 0); l_591 -= 1) + { + unsigned char l_749 = 255UL; + step_hash(408); + ++l_749; + } + step_hash(418); + if ((l_739[3][0] && ((((p_51 == l_732) < (0x17L || func_59(func_59(g_64)))) != (g_173[0] ^ (!p_51))) <= 1UL))) + { + unsigned char l_752 = 0x86L; + step_hash(411); + l_343 &= l_752; + step_hash(412); + l_753[3] = (*l_604); + step_hash(413); + g_760 ^= ((short)((l_752 != p_52) <= (g_681[1][5] < ((((unsigned short)(g_670 || g_363) >> (unsigned short)9) != 0UL) <= ((short)((g_578 & (func_59((g_681[2][2] >= func_59(l_716))) == 0x89L)) <= g_681[1][0]) - (short)p_52)))) + (short)g_578); + step_hash(414); + l_743 |= 0L; + } + else + { + step_hash(416); + l_762 &= l_761[0]; + step_hash(417); + l_744[0] = 0x69322CA4L; + } + } + else + { + step_hash(424); + for (p_53 = (-15); (p_53 >= 54); p_53++) + { + int l_765[9][1]; + int i, j; + for (i = 0; i < 9; i++) + { + for (j = 0; j < 1; j++) + l_765[i][j] = 0xD921A881L; + } + step_hash(423); + l_765[3][0] &= ((void*)0 != &g_677); + } + step_hash(425); + l_731 = (p_53 == (g_363 > ((void*)0 != &l_734))); + step_hash(430); + for (l_517 = 0; (l_517 <= 6); l_517 += 1) + { + int l_766 = 0xC2CEEB3AL; + int i; + step_hash(429); + l_766 &= p_52; + } + } + step_hash(432); + (*l_604) = (*g_214); + } + else + { + int l_769 = 0xC8F4154BL; + int ***l_771[2][7] = {{&l_604, &l_604, &g_677, &g_214, &l_604, &g_214, &g_677}, {&l_604, &l_604, &g_677, &g_214, &l_604, &g_214, &g_677}}; + int i, j; + step_hash(445); + for (l_333 = 0; (l_333 >= 8); l_333 += 7) + { + step_hash(437); + for (l_263 = 0; l_263 < 4; l_263 += 1) + { + for (g_145 = 0; g_145 < 5; g_145 += 1) + { + g_178[l_263][g_145] = 0x01L; + } + } + step_hash(438); + l_769 ^= 0x7E7F86E9L; + step_hash(443); + for (l_379 = 0; (l_379 <= 0); l_379 += 1) + { + int i, j; + step_hash(442); + (*l_604) = &l_739[(l_379 + 3)][(l_379 + 1)]; + } + step_hash(444); + l_770[0] = &l_737; + } + step_hash(446); + l_604 = &l_770[0]; + step_hash(452); + for (l_737 = (-30); (l_737 <= 14); l_737 += 7) + { + int *l_774 = &g_578; + step_hash(450); + l_753[6] = l_774; + step_hash(451); + return l_774; + } + } + } + } + step_hash(532); + if (l_333) + { + unsigned short l_777 = 65531UL; + int l_791[7][3] = {{(-8L), 0x97AF8627L, 1L}, {(-8L), 0x97AF8627L, 1L}, {(-8L), 0x97AF8627L, 1L}, {(-8L), 0x97AF8627L, 1L}, {(-8L), 0x97AF8627L, 1L}, {(-8L), 0x97AF8627L, 1L}, {(-8L), 0x97AF8627L, 1L}}; + int l_808[4][8] = {{(-1L), 0x63E7FEECL, 1L, 0x9BC8B707L, 1L, 0x63E7FEECL, (-1L), 0xBB9142EAL}, {(-1L), 0x63E7FEECL, 1L, 0x9BC8B707L, 1L, 0x63E7FEECL, (-1L), 0xBB9142EAL}, {(-1L), 0x63E7FEECL, 1L, 0x9BC8B707L, 1L, 0x63E7FEECL, (-1L), 0xBB9142EAL}, {(-1L), 0x63E7FEECL, 1L, 0x9BC8B707L, 1L, 0x63E7FEECL, (-1L), 0xBB9142EAL}}; + short l_828 = (-6L); + int l_829 = 0x3B18D360L; + unsigned l_830 = 0UL; + int ***l_867 = &g_677; + int *l_918 = &l_450; + int *l_921 = &l_343; + int *l_922 = &l_829; + int *l_923[7][3] = {{&l_791[3][1], &l_829, (void*)0}, {&l_791[3][1], &l_829, (void*)0}, {&l_791[3][1], &l_829, (void*)0}, {&l_791[3][1], &l_829, (void*)0}, {&l_791[3][1], &l_829, (void*)0}, {&l_791[3][1], &l_829, (void*)0}, {&l_791[3][1], &l_829, (void*)0}}; + int i, j; + step_hash(529); + if (((unsigned char)p_52 + (unsigned char)g_178[0][4])) + { + int **l_784 = (void*)0; + int l_804 = 0xDD78CAEDL; + int l_805 = 0L; + int l_809 = 0xBECE8820L; + int l_811 = 0L; + int l_812[10][1] = {{0xB63E2146L}, {0xB63E2146L}, {0xB63E2146L}, {0xB63E2146L}, {0xB63E2146L}, {0xB63E2146L}, {0xB63E2146L}, {0xB63E2146L}, {0xB63E2146L}, {0xB63E2146L}}; + int l_847 = (-3L); + int i, j; + step_hash(495); + for (l_477 = 0; (l_477 <= 5); l_477 += 1) + { + unsigned char l_785 = 3UL; + unsigned char l_786[6] = {1UL, 0x27L, 1UL, 0x27L, 1UL, 0x27L}; + int l_800 = (-2L); + int l_810 = 0xC6D6DE57L; + int l_813 = 0xC0E7FE4BL; + unsigned char l_825 = 0xA3L; + int l_833[2][4]; + int l_839 = 0L; + int l_840 = 7L; + int l_841 = (-1L); + int l_842[8] = {0L, (-1L), 0L, (-1L), 0L, (-1L), 0L, (-1L)}; + short l_843 = (-1L); + unsigned l_844 = 0xAF99388CL; + int *l_852[5]; + int i, j; + for (i = 0; i < 2; i++) + { + for (j = 0; j < 4; j++) + l_833[i][j] = 3L; + } + for (i = 0; i < 5; i++) + l_852[i] = &l_839; + step_hash(461); + (*g_214) = func_22(l_787, g_681[2][2], g_2); + step_hash(469); + for (l_258 = 0; (l_258 <= 0); l_258 += 1) + { + unsigned short l_788 = 0xC7C3L; + int ***l_792 = &g_214; + int i, j; + step_hash(465); + l_788++; + step_hash(466); + if (l_653[(l_258 + 1)][(l_258 + 4)]) + continue; + step_hash(467); + l_791[3][1] = (+(-10L)); + step_hash(468); + (*l_792) = &g_215[1][1]; + } + step_hash(494); + for (g_319 = 4; (g_319 >= 0); g_319 -= 1) + { + int ***l_793 = &g_677; + int l_806 = 0x0792C37BL; + int l_807[8]; + int *l_834 = &l_450; + int *l_835 = &l_791[3][1]; + int *l_836 = &l_261[1][1]; + int *l_837 = (void*)0; + int *l_838[3][4]; + int i, j; + for (i = 0; i < 8; i++) + l_807[i] = (-10L); + for (i = 0; i < 3; i++) + { + for (j = 0; j < 4; j++) + l_838[i][j] = (void*)0; + } + step_hash(482); + if ((l_653[l_477][(g_319 + 1)] >= (l_785 ^ (l_793 == (void*)0)))) + { + int *l_794 = (void*)0; + int *l_795 = &l_791[2][1]; + step_hash(474); + (*l_795) = p_51; + step_hash(475); + (*l_795) = ((unsigned short)((-2L) && (0x09C5L == p_52)) * (unsigned short)p_53); + step_hash(476); + l_800 = ((unsigned short)((*l_795) < p_52) << (unsigned short)g_73); + } + else + { + int *l_801 = &l_261[1][1]; + int *l_802 = &l_261[1][1]; + int *l_803[2]; + unsigned l_814[9] = {0UL, 0UL, 0x79C8252BL, 0UL, 0UL, 0x79C8252BL, 0UL, 0UL, 0x79C8252BL}; + int i; + for (i = 0; i < 2; i++) + l_803[i] = &l_791[3][1]; + step_hash(478); + ++l_814[5]; + step_hash(479); + l_812[1][0] ^= (l_813 < p_51); + step_hash(480); + ++l_825; + step_hash(481); + --l_830; + } + step_hash(483); + l_844++; + step_hash(488); + if (l_825) + { + step_hash(485); + (*l_836) = 0xE2D5DFA9L; + } + else + { + step_hash(487); + (*g_214) = func_22((((l_847 >= 0xD0L) <= g_64) == ((int)p_51 % (int)((short)(-2L) * (short)((void*)0 != l_793)))), (((~g_319) == ((g_145 & 0xC8L) || p_51)) >= p_52), l_828); + } + step_hash(493); + for (l_809 = 4; (l_809 >= 0); l_809 -= 1) + { + step_hash(492); + (*g_214) = l_852[0]; + } + } + } + } + else + { + unsigned l_868 = 0x2EE0BBC9L; + int ***l_869 = &g_677; + int l_870 = 0x0F903350L; + int l_884 = 0x5FA68CBCL; + int l_885 = 9L; + int l_887 = 0x66A8FE31L; + int l_888[6][1]; + int *l_917[4]; + int *l_919 = &l_343; + int i, j; + for (i = 0; i < 6; i++) + { + for (j = 0; j < 1; j++) + l_888[i][j] = 1L; + } + for (i = 0; i < 4; i++) + l_917[i] = &l_829; + step_hash(528); + if (((signed char)(p_51 ^ (((unsigned short)g_73 << (unsigned short)l_379) && ((unsigned short)((unsigned short)((unsigned char)(p_51 == ((short)((((+p_52) && g_670) && ((signed char)p_53 - (signed char)p_51)) | p_51) * (short)0x816AL)) * (unsigned char)p_51) << (unsigned short)3) << (unsigned short)g_319))) << (signed char)l_868)) + { + unsigned l_871 = 0UL; + int l_877 = 0x95D939A6L; + int l_883 = 0x51C569C2L; + int l_886 = 0xD9EF8CD6L; + int l_890 = 0xAB1F872DL; + int *l_897 = (void*)0; + int *l_898 = &l_325; + step_hash(514); + for (l_777 = 0; (l_777 <= 5); l_777 += 1) + { + int l_881 = 0x27C5BB2BL; + int l_882[4] = {(-6L), (-1L), (-6L), (-1L)}; + int i; + step_hash(501); + l_870 |= ((void*)0 != l_869); + step_hash(506); + if ((p_52 ^ ((l_871 >= ((signed char)p_52 << (signed char)(((signed char)g_876 + (signed char)l_871) ^ p_51))) == ((*l_867) == (*l_869))))) + { + int *l_878 = &l_877; + int *l_879 = &g_64; + int *l_880[9][5] = {{&g_2, &l_591, &l_829, &l_791[5][0], &g_64}, {&g_2, &l_591, &l_829, &l_791[5][0], &g_64}, {&g_2, &l_591, &l_829, &l_791[5][0], &g_64}, {&g_2, &l_591, &l_829, &l_791[5][0], &g_64}, {&g_2, &l_591, &l_829, &l_791[5][0], &g_64}, {&g_2, &l_591, &l_829, &l_791[5][0], &g_64}, {&g_2, &l_591, &l_829, &l_791[5][0], &g_64}, {&g_2, &l_591, &l_829, &l_791[5][0], &g_64}, {&g_2, &l_591, &l_829, &l_791[5][0], &g_64}}; + int l_889 = 0xFF1F7CEBL; + int i, j; + step_hash(503); + g_891[0]--; + } + else + { + int *l_894[9]; + int i; + for (i = 0; i < 9; i++) + l_894[i] = &l_791[3][1]; + step_hash(505); + return g_895; + } + step_hash(513); + for (g_145 = 0; (g_145 <= 0); g_145 += 1) + { + int *l_896 = &l_887; + int *l_899 = (void*)0; + step_hash(510); + l_897 = l_896; + step_hash(511); + (*g_214) = &l_883; + step_hash(512); + return l_899; + } + } + } + else + { + unsigned char l_911 = 0UL; + int *l_914 = &l_887; + int *l_929[10] = {(void*)0, (void*)0, (void*)0, (void*)0, (void*)0, (void*)0, (void*)0, (void*)0, (void*)0, (void*)0}; + int i; + step_hash(516); + (*l_914) &= (((((unsigned)(p_51 ^ p_51) % (unsigned)1L) ^ ((short)g_64 << (short)9)) | ((!(((int)(((unsigned char)p_53 >> (unsigned char)1) >= ((short)(((-(unsigned short)l_911) & p_53) <= (((short)g_891[0] / (short)0xB67DL) <= l_911)) << (short)l_911)) - (int)p_53) ^ p_53)) <= p_52)) && 0x05ACL); + step_hash(527); + if (l_777) + { + int *l_915 = &l_884; + int *l_924 = &g_64; + step_hash(518); + return l_924; + } + else + { + step_hash(520); + (*l_918) = (g_876 >= (((int)(*g_895) % (int)(*l_922)) != g_173[0])); + step_hash(526); + for (l_477 = 0; (l_477 < 31); l_477++) + { + step_hash(524); + (*l_920) |= (-1L); + step_hash(525); + (*g_214) = l_929[5]; + } + } + } + } + } + else + { + int *l_930 = (void*)0; + step_hash(531); + return l_930; + } + step_hash(614); + for (p_51 = 0; (p_51 != 12); p_51 += 9) + { + int *l_933 = &g_2; + int l_942[3][5] = {{0xC7C1CC24L, 1L, 0xC806FC8BL, 1L, 0xC7C1CC24L}, {0xC7C1CC24L, 1L, 0xC806FC8BL, 1L, 0xC7C1CC24L}, {0xC7C1CC24L, 1L, 0xC806FC8BL, 1L, 0xC7C1CC24L}}; + int *l_1022[2][1]; + int i, j; + for (i = 0; i < 2; i++) + { + for (j = 0; j < 1; j++) + l_1022[i][j] = &g_2; + } + step_hash(572); + if ((*g_895)) + { + step_hash(537); + (*g_214) = l_933; + step_hash(542); + for (g_670 = 29; (g_670 == 7); g_670 -= 9) + { + step_hash(541); + (*l_920) = (((short)p_53 + (short)g_891[0]) && g_178[1][3]); + } + } + else + { + int **l_938[3][1]; + signed char l_941 = 0xB7L; + int *l_955 = (void*)0; + int i, j; + for (i = 0; i < 3; i++) + { + for (j = 0; j < 1; j++) + l_938[i][j] = (void*)0; + } + step_hash(544); + (*l_920) = ((l_938[2][0] != (void*)0) <= (+p_51)); + step_hash(571); + for (g_64 = (-13); (g_64 <= 9); g_64 += 2) + { + unsigned short l_943[6][2] = {{65535UL, 65529UL}, {65535UL, 65529UL}, {65535UL, 65529UL}, {65535UL, 65529UL}, {65535UL, 65529UL}, {65535UL, 65529UL}}; + int *l_959[4] = {&l_325, &g_578, &l_325, &g_578}; + int i, j; + step_hash(548); + l_943[0][1]++; + step_hash(570); + for (l_258 = 0; (l_258 >= 14); l_258++) + { + int ***l_948[1]; + int i; + for (i = 0; i < 1; i++) + l_948[i] = &l_938[2][0]; + step_hash(552); + (*l_920) &= p_51; + step_hash(559); + if (l_943[0][1]) + { + short l_962 = 0x4E8FL; + step_hash(554); + (*l_920) ^= ((((void*)0 != l_948[0]) | p_51) <= ((unsigned char)(p_51 > (65535UL ^ ((((unsigned short)((signed char)(l_955 == (void*)0) % (signed char)g_319) * (unsigned short)p_52) && l_943[0][1]) < 4294967295UL))) << (unsigned char)0)); + step_hash(555); + l_962 &= ((((short)(g_760 > (((-(unsigned short)(((&g_64 == l_959[2]) <= ((unsigned short)(~(p_52 ^ p_51)) * (unsigned short)((&g_215[1][0] == &l_916[5][7]) >= g_891[0]))) != (((void*)0 == l_959[2]) < g_2))) || (-1L)) && 0xBAL)) >> (short)p_53) < g_2) | p_52); + step_hash(556); + l_959[3] = &g_578; + } + else + { + int *l_963 = (void*)0; + step_hash(558); + return l_963; + } + step_hash(569); + if (((int)(+(p_53 >= 0x05L)) % (int)((short)g_681[3][5] * (short)(((unsigned short)g_891[0] / (unsigned short)((&l_942[1][4] == (void*)0) || ((short)(((void*)0 != &l_916[2][2]) & 251UL) << (short)p_52))) || (-1L))))) + { + step_hash(561); + if ((*g_895)) + break; + step_hash(562); + (*l_920) &= (*l_933); + step_hash(563); + if (p_52) + continue; + step_hash(564); + (*l_920) = 7L; + } + else + { + step_hash(566); + l_942[1][3] = ((short)(((((unsigned char)((g_178[0][4] >= p_51) == (p_52 >= g_145)) >> (unsigned char)1) > (*l_933)) || (p_52 < p_53)) > 1L) - (short)p_51); + step_hash(567); + if ((*g_895)) + continue; + step_hash(568); + (*l_920) = ((signed char)((unsigned)((short)9L / (short)g_681[2][2]) - (unsigned)((int)((short)(*l_933) * (short)g_178[0][4]) - (int)(1UL && 0xA3L))) % (signed char)g_178[0][4]); + } + } + } + } + step_hash(611); + if (((short)p_52 << (short)4)) + { + signed char l_998 = (-1L); + int *l_1007 = &l_591; + int *l_1008 = &l_261[1][5]; + step_hash(579); + if (((unsigned char)p_52 * (unsigned char)((signed char)((int)((((unsigned char)((int)(0UL > l_998) + (int)((g_627 > g_681[2][2]) >= 0x6C2BL)) / (unsigned char)p_52) <= p_53) <= 3UL) - (int)g_1001) - (signed char)l_998))) + { + int l_1002 = 0x4C7912E3L; + step_hash(575); + (*g_214) = func_22(l_1002, p_52, ((unsigned short)g_627 >> (unsigned short)9)); + step_hash(576); + if ((*l_933)) + continue; + } + else + { + int *l_1005 = &l_343; + step_hash(578); + return l_1009; + } + step_hash(580); + l_933 = func_22(((unsigned char)(((unsigned char)((void*)0 != &g_677) * (unsigned char)(((0xB2L && p_51) && (((short)(((signed char)g_2 - (signed char)(*l_933)) || ((g_64 <= g_319) | g_173[0])) * (short)(*l_933)) == g_1001)) & 0x7EL)) >= 0x90L) - (unsigned char)g_173[0]), p_51, (*l_933)); + } + else + { + int *l_1020[3]; + unsigned short l_1047 = 0UL; + int i; + for (i = 0; i < 3; i++) + l_1020[i] = &l_450; + step_hash(582); + (*l_920) ^= ((signed char)0xC3L * (signed char)g_319); + step_hash(590); + if (p_53) + { + int *l_1021 = &l_343; + step_hash(584); + (*g_214) = func_22(p_51, g_760, g_363); + step_hash(585); + return l_1022[1][0]; + } + else + { + step_hash(587); + (*l_920) = 0x9BE9A248L; + step_hash(588); + (*l_920) |= p_52; + step_hash(589); + (*l_920) ^= (0xF69BL > (+g_64)); + } + step_hash(595); + for (l_591 = 0; (l_591 == 14); l_591 += 1) + { + int *l_1025 = (void*)0; + step_hash(594); + (*g_214) = l_1025; + } + step_hash(610); + for (l_263 = 0; (l_263 < (-5)); --l_263) + { + int *l_1052 = (void*)0; + step_hash(609); + for (l_787 = 0; (l_787 == 53); l_787 += 4) + { + int l_1036 = (-6L); + int l_1050 = 0L; + step_hash(602); + (*l_920) &= ((short)((signed char)((0x6FL ^ p_53) | l_1036) / (signed char)g_73) + (short)g_681[1][2]); + step_hash(608); + if (((short)0xA33CL << (short)6)) + { + int *l_1051[9][4] = {{&l_591, (void*)0, &l_591, &g_578}, {&l_591, (void*)0, &l_591, &g_578}, {&l_591, (void*)0, &l_591, &g_578}, {&l_591, (void*)0, &l_591, &g_578}, {&l_591, (void*)0, &l_591, &g_578}, {&l_591, (void*)0, &l_591, &g_578}, {&l_591, (void*)0, &l_591, &g_578}, {&l_591, (void*)0, &l_591, &g_578}, {&l_591, (void*)0, &l_591, &g_578}}; + int i, j; + step_hash(604); + (*l_920) = (p_51 ^ ((short)(l_1047 >= (0xBC01F91AL || g_363)) * (short)((int)(((p_53 == p_53) | (1L && (g_145 ^ 1UL))) || 8UL) / (int)l_1050))); + step_hash(605); + return l_1052; + } + else + { + step_hash(607); + (*l_920) ^= p_53; + } + } + } + } + step_hash(612); + (*g_214) = func_22((*l_933), (*l_933), p_53); + step_hash(613); + l_1053--; + } + step_hash(615); + return l_1063[0]; +} + + + + + + + +static unsigned func_59(short p_60) +{ + int *l_63 = &g_64; + int *l_65 = &g_64; + int *l_66 = &g_64; + int l_67[3]; + int *l_68 = &l_67[0]; + int *l_69 = &l_67[0]; + int *l_70 = (void*)0; + int *l_71 = &g_64; + int *l_72[10][8] = {{(void*)0, &g_2, &l_67[0], &g_2, &g_2, &g_64, &g_2, &g_2}, {(void*)0, &g_2, &l_67[0], &g_2, &g_2, &g_64, &g_2, &g_2}, {(void*)0, &g_2, &l_67[0], &g_2, &g_2, &g_64, &g_2, &g_2}, {(void*)0, &g_2, &l_67[0], &g_2, &g_2, &g_64, &g_2, &g_2}, {(void*)0, &g_2, &l_67[0], &g_2, &g_2, &g_64, &g_2, &g_2}, {(void*)0, &g_2, &l_67[0], &g_2, &g_2, &g_64, &g_2, &g_2}, {(void*)0, &g_2, &l_67[0], &g_2, &g_2, &g_64, &g_2, &g_2}, {(void*)0, &g_2, &l_67[0], &g_2, &g_2, &g_64, &g_2, &g_2}, {(void*)0, &g_2, &l_67[0], &g_2, &g_2, &g_64, &g_2, &g_2}, {(void*)0, &g_2, &l_67[0], &g_2, &g_2, &g_64, &g_2, &g_2}}; + unsigned l_86 = 0UL; + int **l_251 = &l_63; + unsigned l_255 = 0xD96B38B3L; + int i, j; + for (i = 0; i < 3; i++) + l_67[i] = 0xC97DE2E5L; + step_hash(21); + g_73++; + step_hash(133); + if (((int)((unsigned char)(((unsigned)(*l_63) % (unsigned)(*l_63)) < ((short)p_60 / (short)(g_64 && ((signed char)l_86 + (signed char)(((unsigned short)0x21F9L + (unsigned short)((short)g_64 / (short)(-1L))) & 0x5115L))))) << (unsigned char)6) - (int)(*l_69))) + { + int *l_110 = &l_67[0]; + unsigned l_172 = 0x9A6180E0L; + step_hash(70); + for (l_86 = 0; (l_86 == 25); l_86 += 2) + { + int **l_121 = &l_69; + short l_138 = 0xC2F8L; + step_hash(68); + for (g_73 = (-8); (g_73 == 46); g_73 += 5) + { + int *l_99 = &l_67[1]; + step_hash(37); + if (g_2) + { + step_hash(30); + return p_60; + } + else + { + step_hash(36); + for (p_60 = 0; (p_60 >= (-16)); --p_60) + { + unsigned short l_97 = 7UL; + int **l_98[6] = {&l_72[3][3], &l_69, &l_72[3][3], &l_69, &l_72[3][3], &l_69}; + int i; + step_hash(35); + l_99 = func_22(p_60, l_97, l_97); + } + } + step_hash(38); + if (g_64) + continue; + step_hash(67); + if ((-(signed char)p_60)) + { + int l_107 = 0L; + step_hash(40); + (*l_66) |= (((unsigned char)g_2 * (unsigned char)((((unsigned short)((unsigned)l_107 - (unsigned)(p_60 || ((((int)g_73 + (int)g_73) ^ ((void*)0 == l_110)) < ((unsigned short)((int)p_60 / (int)(((void*)0 != &l_110) || 1UL)) << (unsigned short)5)))) + (unsigned short)0xB3DEL) & g_2) ^ (*l_99))) <= g_2); + step_hash(45); + for (l_107 = 9; (l_107 < 25); ++l_107) + { + step_hash(44); + (*l_66) = ((p_60 ^ ((unsigned short)g_73 << (unsigned short)6)) >= ((p_60 || p_60) || (p_60 != g_73))); + } + } + else + { + int *l_122 = &g_64; + int l_144 = 0x9873F28DL; + step_hash(55); + if (((((signed char)g_73 * (signed char)((l_121 == &l_99) > ((4294967294UL >= ((~(l_122 == (void*)0)) <= p_60)) ^ ((((((*l_122) & (g_73 > g_73)) == 0xA7L) ^ 0xC79CC16CL) > 0x45F5L) || g_64)))) != 0xBC9E7330L) && 8UL)) + { + signed char l_125 = 0L; + step_hash(48); + (**l_121) |= g_64; + step_hash(49); + g_64 = ((int)(l_125 >= g_2) + (int)(g_64 <= g_2)); + } + else + { + step_hash(51); + (*l_65) &= g_2; + step_hash(52); + l_138 |= ((((unsigned short)(*l_99) - (unsigned short)((signed char)(p_60 <= (-1L)) * (signed char)(g_73 <= p_60))) != ((*l_99) > 0UL)) >= (255UL != ((int)((int)g_64 + (int)g_64) % (int)g_2))); + step_hash(53); + if (g_73) + break; + step_hash(54); + (**l_121) = (p_60 >= g_64); + } + step_hash(61); + for (l_138 = 0; (l_138 >= (-11)); l_138 -= 9) + { + int **l_141 = &l_110; + step_hash(59); + (*l_71) = g_64; + step_hash(60); + (*l_63) ^= ((void*)0 == l_141); + } + step_hash(66); + for (g_64 = 5; (g_64 >= (-11)); g_64--) + { + step_hash(65); + g_145--; + } + } + } + step_hash(69); + (*l_63) = (((unsigned char)g_73 * (unsigned char)(~0x31L)) | (**l_121)); + } + step_hash(80); + for (l_86 = 0; (l_86 > 5); l_86 += 6) + { + unsigned char l_156 = 0x36L; + signed char l_162 = 0x66L; + int *l_163 = &l_67[1]; + step_hash(78); + for (g_145 = 24; (g_145 >= 23); g_145 -= 5) + { + unsigned l_159 = 0UL; + step_hash(77); + (*l_65) ^= ((unsigned short)l_156 * (unsigned short)((unsigned char)(+l_159) << (unsigned char)2)); + } + step_hash(79); + (*l_69) = (+(((signed char)((l_162 == (0UL & l_156)) < ((void*)0 != l_163)) % (signed char)p_60) <= ((((short)((signed char)((signed char)0L % (signed char)((unsigned short)l_172 << (unsigned short)((void*)0 != &l_110))) + (signed char)(*l_110)) >> (short)(*l_163)) != g_2) == 0xEFL))); + } + } + else + { + short l_175 = 0xACA0L; + int l_176 = 0x9AD7A1A6L; + int **l_199 = &l_72[9][4]; + int l_230 = 0x5C09B1F2L; + int l_235 = (-2L); + int l_239[8][4] = {{0x55240D6AL, (-7L), (-7L), (-7L)}, {0x55240D6AL, (-7L), (-7L), (-7L)}, {0x55240D6AL, (-7L), (-7L), (-7L)}, {0x55240D6AL, (-7L), (-7L), (-7L)}, {0x55240D6AL, (-7L), (-7L), (-7L)}, {0x55240D6AL, (-7L), (-7L), (-7L)}, {0x55240D6AL, (-7L), (-7L), (-7L)}, {0x55240D6AL, (-7L), (-7L), (-7L)}}; + unsigned char l_247 = 0x45L; + unsigned l_252[9]; + int i, j; + for (i = 0; i < 9; i++) + l_252[i] = 4294967291UL; + step_hash(130); + for (l_86 = 0; (l_86 <= 7); l_86 += 1) + { + signed char l_177 = 0x51L; + unsigned l_216 = 0x4A8CDCF8L; + int l_220 = 0x76D7F101L; + int l_231 = 0x25C5B712L; + int l_234 = (-1L); + int l_236 = 0xBBD95422L; + int l_242 = (-2L); + int l_243 = 0x6C139F92L; + int l_245 = 0x1DB522ABL; + int l_246 = 0x22C635EDL; + step_hash(85); + ++g_178[0][4]; + step_hash(102); + if ((p_60 >= (g_173[0] != (((unsigned short)((unsigned)((unsigned char)(*l_63) << (unsigned char)3) / (unsigned)((short)((unsigned short)p_60 << (unsigned short)4) << (short)5)) >> (unsigned short)p_60) ^ ((((int)((short)g_178[0][4] << (short)((signed char)0xC0L + (signed char)((unsigned char)(((void*)0 == l_199) <= g_173[0]) % (unsigned char)g_73))) - (int)g_2) != p_60) == g_64))))) + { + signed char l_200 = 0x89L; + int l_201 = 1L; + step_hash(98); + for (l_176 = 7; (l_176 >= 0); l_176 -= 1) + { + int l_204 = 9L; + step_hash(96); + for (g_73 = 2; (g_73 <= 7); g_73 += 1) + { + int i, j; + step_hash(93); + l_201 = (p_60 && l_200); + step_hash(94); + if ((*l_69)) + continue; + step_hash(95); + l_72[l_86][l_176] = func_22(p_60, g_178[0][1], ((signed char)g_178[1][1] % (signed char)255UL)); + } + step_hash(97); + return l_204; + } + } + else + { + unsigned short l_205 = 0x4D92L; + step_hash(100); + (*l_71) |= (p_60 != l_205); + step_hash(101); + (*l_71) = ((unsigned short)((signed char)((unsigned char)(((unsigned short)(!((g_64 & ((*l_66) || ((void*)0 == &l_67[0]))) & p_60)) << (unsigned short)12) | ((0xB36AC27EL | (8UL & (g_214 != (void*)0))) < l_177)) * (unsigned char)l_216) >> (signed char)p_60) - (unsigned short)g_145); + } + step_hash(129); + for (g_145 = 1; (g_145 <= 7); g_145 += 1) + { + unsigned l_222 = 0xCDD36E1FL; + int l_225 = 0x90030C72L; + int l_227 = 2L; + int l_229 = 0x7BC80E76L; + int l_232 = (-1L); + int l_233 = 0x0BB935E2L; + int l_237 = (-10L); + int l_244[5][8] = {{1L, (-8L), 1L, 0xD20FDB97L, 0L, 1L, (-7L), (-6L)}, {1L, (-8L), 1L, 0xD20FDB97L, 0L, 1L, (-7L), (-6L)}, {1L, (-8L), 1L, 0xD20FDB97L, 0L, 1L, (-7L), (-6L)}, {1L, (-8L), 1L, 0xD20FDB97L, 0L, 1L, (-7L), (-6L)}, {1L, (-8L), 1L, 0xD20FDB97L, 0L, 1L, (-7L), (-6L)}}; + int i, j; + step_hash(111); + for (g_64 = 7; (g_64 >= 2); g_64 -= 1) + { + int l_217 = 1L; + step_hash(109); + l_217 = l_177; + step_hash(110); + (*l_68) &= p_60; + } + step_hash(128); + for (l_175 = 2; (l_175 <= 7); l_175 += 1) + { + int l_221 = 0x50C489A4L; + int l_226 = 2L; + int l_228[6] = {0x961DA0ABL, (-10L), 0x961DA0ABL, (-10L), 0x961DA0ABL, (-10L)}; + int l_241 = (-1L); + int ***l_250[7] = {&g_214, &g_214, (void*)0, &g_214, &g_214, (void*)0, &g_214}; + int i, j; + step_hash(119); + for (g_174 = 0; (g_174 <= 3); g_174 += 1) + { + int i, j; + step_hash(118); + (*l_66) &= ((int)(g_178[g_174][(g_174 + 1)] == (g_178[2][3] == 0L)) / (int)g_2); + } + step_hash(120); + l_222--; + step_hash(126); + for (g_174 = 2; (g_174 >= 0); g_174 -= 1) + { + int l_238 = 8L; + int l_240[8] = {9L, 1L, 9L, 1L, 9L, 1L, 9L, 1L}; + int i, j; + step_hash(124); + (*g_214) = g_215[g_174][l_86]; + step_hash(125); + --l_247; + } + step_hash(127); + l_251 = &l_68; + } + } + } + step_hash(131); + l_252[8]--; + step_hash(132); + return g_178[0][1]; + } + step_hash(134); + l_255++; + step_hash(135); + return g_64; +} + + +void csmith_compute_hash(void) +{ + int i, j; + transparent_crc(g_2, "g_2", print_hash_value); + transparent_crc(g_64, "g_64", print_hash_value); + transparent_crc(g_73, "g_73", print_hash_value); + transparent_crc(g_145, "g_145", print_hash_value); + for (i = 0; i < 1; i++) + { + transparent_crc(g_173[i], "g_173[i]", print_hash_value); + if (print_hash_value) printf("index = [%d]\n", i); + + } + transparent_crc(g_174, "g_174", print_hash_value); + for (i = 0; i < 4; i++) + { + for (j = 0; j < 5; j++) + { + transparent_crc(g_178[i][j], "g_178[i][j]", print_hash_value); + if (print_hash_value) printf("index = [%d][%d]\n", i, j); + + } + } + transparent_crc(g_319, "g_319", print_hash_value); + transparent_crc(g_363, "g_363", print_hash_value); + transparent_crc(g_578, "g_578", print_hash_value); + transparent_crc(g_627, "g_627", print_hash_value); + transparent_crc(g_670, "g_670", print_hash_value); + for (i = 0; i < 5; i++) + { + for (j = 0; j < 8; j++) + { + transparent_crc(g_681[i][j], "g_681[i][j]", print_hash_value); + if (print_hash_value) printf("index = [%d][%d]\n", i, j); + + } + } + transparent_crc(g_760, "g_760", print_hash_value); + transparent_crc(g_876, "g_876", print_hash_value); + for (i = 0; i < 1; i++) + { + transparent_crc(g_891[i], "g_891[i]", print_hash_value); + if (print_hash_value) printf("index = [%d]\n", i); + + } + transparent_crc(g_1001, "g_1001", print_hash_value); + transparent_crc(g_1077, "g_1077", print_hash_value); + transparent_crc(g_1156, "g_1156", print_hash_value); + transparent_crc(g_1229, "g_1229", print_hash_value); + for (i = 0; i < 8; i++) + { + for (j = 0; j < 10; j++) + { + transparent_crc(g_1296[i][j], "g_1296[i][j]", print_hash_value); + if (print_hash_value) printf("index = [%d][%d]\n", i, j); + + } + } + transparent_crc(g_1380, "g_1380", print_hash_value); + transparent_crc(g_1491, "g_1491", print_hash_value); + transparent_crc(g_1519, "g_1519", print_hash_value); + for (i = 0; i < 6; i++) + { + transparent_crc(g_1520[i], "g_1520[i]", print_hash_value); + if (print_hash_value) printf("index = [%d]\n", i); + + } +} + +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} + + + +int main (void) +{ + int i, j; + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand80.expect b/src/tests/csmith/rand80.expect new file mode 100644 index 0000000..4a45f55 --- /dev/null +++ b/src/tests/csmith/rand80.expect @@ -0,0 +1,1580 @@ +...checksum after hashing g_2 : 6DB878BA +...checksum after hashing g_64 : 707136D9 +...checksum after hashing g_73 : 53DB76BE +...checksum after hashing g_145 : D6B0C50E +...checksum after hashing g_173[i] : 7E394AB4 +index = [0] +...checksum after hashing g_174 : 80F6815A +...checksum after hashing g_178[i][j] : B8922A88 +index = [0][0] +...checksum after hashing g_178[i][j] : BABE51D8 +index = [0][1] +...checksum after hashing g_178[i][j] : 9891B2DD +index = [0][2] +...checksum after hashing g_178[i][j] : 7B2B32FA +index = [0][3] +...checksum after hashing g_178[i][j] : 80D24B0D +index = [0][4] +...checksum after hashing g_178[i][j] : 8398EFA3 +index = [1][0] +...checksum after hashing g_178[i][j] : 110D2CE2 +index = [1][1] +...checksum after hashing g_178[i][j] : D5C2D600 +index = [1][2] +...checksum after hashing g_178[i][j] : 793003F8 +index = [1][3] +...checksum after hashing g_178[i][j] : 484AA697 +index = [1][4] +...checksum after hashing g_178[i][j] : DC78E700 +index = [2][0] +...checksum after hashing g_178[i][j] : E56A7438 +index = [2][1] +...checksum after hashing g_178[i][j] : 6EE83B90 +index = [2][2] +...checksum after hashing g_178[i][j] : 56920783 +index = [2][3] +...checksum after hashing g_178[i][j] : C49DCAE4 +index = [2][4] +...checksum after hashing g_178[i][j] : CE4846E5 +index = [3][0] +...checksum after hashing g_178[i][j] : F08EB5DE +index = [3][1] +...checksum after hashing g_178[i][j] : 5A5E0B00 +index = [3][2] +...checksum after hashing g_178[i][j] : 5C92FE3C +index = [3][3] +...checksum after hashing g_178[i][j] : DB4C3569 +index = [3][4] +...checksum after hashing g_319 : A20E8330 +...checksum after hashing g_363 : 935340BE +...checksum after hashing g_578 : 7F595E9A +...checksum after hashing g_627 : 8FB6CBB2 +...checksum after hashing g_670 : 1AE697C0 +...checksum after hashing g_681[i][j] : C368A7B6 +index = [0][0] +...checksum after hashing g_681[i][j] : 5D492D26 +index = [0][1] +...checksum after hashing g_681[i][j] : C75EF785 +index = [0][2] +...checksum after hashing g_681[i][j] : 5D1A01B5 +index = [0][3] +...checksum after hashing g_681[i][j] : 36A649D8 +index = [0][4] +...checksum after hashing g_681[i][j] : 54B35630 +index = [0][5] +...checksum after hashing g_681[i][j] : 83CB88E0 +index = [0][6] +...checksum after hashing g_681[i][j] : 73C8D23F +index = [0][7] +...checksum after hashing g_681[i][j] : 54553EBC +index = [1][0] +...checksum after hashing g_681[i][j] : C4B50064 +index = [1][1] +...checksum after hashing g_681[i][j] : F70C37D1 +index = [1][2] +...checksum after hashing g_681[i][j] : 268E007A +index = [1][3] +...checksum after hashing g_681[i][j] : CBB03A15 +index = [1][4] +...checksum after hashing g_681[i][j] : 59B78D94 +index = [1][5] +...checksum after hashing g_681[i][j] : DAC365DA +index = [1][6] +...checksum after hashing g_681[i][j] : 970AEA51 +index = [1][7] +...checksum after hashing g_681[i][j] : FB7F9909 +index = [2][0] +...checksum after hashing g_681[i][j] : 1B2C8778 +index = [2][1] +...checksum after hashing g_681[i][j] : BF562CE5 +index = [2][2] +...checksum after hashing g_681[i][j] : 71E75F61 +index = [2][3] +...checksum after hashing g_681[i][j] : 6A7897BF +index = [2][4] +...checksum after hashing g_681[i][j] : 83374FE +index = [2][5] +...checksum after hashing g_681[i][j] : 77CE06CF +index = [2][6] +...checksum after hashing g_681[i][j] : A795999D +index = [2][7] +...checksum after hashing g_681[i][j] : 4153B8C7 +index = [3][0] +...checksum after hashing g_681[i][j] : A6B403A6 +index = [3][1] +...checksum after hashing g_681[i][j] : 93A99E30 +index = [3][2] +...checksum after hashing g_681[i][j] : 74BAD25 +index = [3][3] +...checksum after hashing g_681[i][j] : 739AD887 +index = [3][4] +...checksum after hashing g_681[i][j] : 4E4957E3 +index = [3][5] +...checksum after hashing g_681[i][j] : A5D904ED +index = [3][6] +...checksum after hashing g_681[i][j] : C3741D28 +index = [3][7] +...checksum after hashing g_681[i][j] : 8079D2DF +index = [4][0] +...checksum after hashing g_681[i][j] : F5510C2E +index = [4][1] +...checksum after hashing g_681[i][j] : 6173403E +index = [4][2] +...checksum after hashing g_681[i][j] : 48E77C89 +index = [4][3] +...checksum after hashing g_681[i][j] : 1CBD8ED9 +index = [4][4] +...checksum after hashing g_681[i][j] : A62B3DC +index = [4][5] +...checksum after hashing g_681[i][j] : A4BBEC86 +index = [4][6] +...checksum after hashing g_681[i][j] : A86ED581 +index = [4][7] +...checksum after hashing g_760 : FCE70443 +...checksum after hashing g_876 : AD85B0F +...checksum after hashing g_891[i] : 2DBFD914 +index = [0] +...checksum after hashing g_1001 : E259980C +...checksum after hashing g_1077 : A07A9133 +...checksum after hashing g_1156 : 86F02F19 +...checksum after hashing g_1229 : D5339E68 +...checksum after hashing g_1296[i][j] : 3815351E +index = [0][0] +...checksum after hashing g_1296[i][j] : 41C8D673 +index = [0][1] +...checksum after hashing g_1296[i][j] : AE3AFA26 +index = [0][2] +...checksum after hashing g_1296[i][j] : 10D3D3EF +index = [0][3] +...checksum after hashing g_1296[i][j] : E85047F2 +index = [0][4] +...checksum after hashing g_1296[i][j] : 6C94AD6B +index = [0][5] +...checksum after hashing g_1296[i][j] : 4DEA0340 +index = [0][6] +...checksum after hashing g_1296[i][j] : CA513FD0 +index = [0][7] +...checksum after hashing g_1296[i][j] : F0368393 +index = [0][8] +...checksum after hashing g_1296[i][j] : 596357E6 +index = [0][9] +...checksum after hashing g_1296[i][j] : F558CB86 +index = [1][0] +...checksum after hashing g_1296[i][j] : 2664CEA7 +index = [1][1] +...checksum after hashing g_1296[i][j] : C45D213E +index = [1][2] +...checksum after hashing g_1296[i][j] : 83790368 +index = [1][3] +...checksum after hashing g_1296[i][j] : 28B96ADD +index = [1][4] +...checksum after hashing g_1296[i][j] : B0884DA5 +index = [1][5] +...checksum after hashing g_1296[i][j] : 1B888977 +index = [1][6] +...checksum after hashing g_1296[i][j] : 9ECC9C7A +index = [1][7] +...checksum after hashing g_1296[i][j] : A137F871 +index = [1][8] +...checksum after hashing g_1296[i][j] : 78C609C7 +index = [1][9] +...checksum after hashing g_1296[i][j] : 14ED5895 +index = [2][0] +...checksum after hashing g_1296[i][j] : D522B86C +index = [2][1] +...checksum after hashing g_1296[i][j] : B7FA17FE +index = [2][2] +...checksum after hashing g_1296[i][j] : FD987EE4 +index = [2][3] +...checksum after hashing g_1296[i][j] : 23C706CB +index = [2][4] +...checksum after hashing g_1296[i][j] : A259FA52 +index = [2][5] +...checksum after hashing g_1296[i][j] : ABB2CAEA +index = [2][6] +...checksum after hashing g_1296[i][j] : 4DF2FB6F +index = [2][7] +...checksum after hashing g_1296[i][j] : D5771A6A +index = [2][8] +...checksum after hashing g_1296[i][j] : F2A927B7 +index = [2][9] +...checksum after hashing g_1296[i][j] : A2098EB5 +index = [3][0] +...checksum after hashing g_1296[i][j] : E4047E81 +index = [3][1] +...checksum after hashing g_1296[i][j] : 94CDE7F7 +index = [3][2] +...checksum after hashing g_1296[i][j] : 73493F8 +index = [3][3] +...checksum after hashing g_1296[i][j] : C7E845F8 +index = [3][4] +...checksum after hashing g_1296[i][j] : 87608088 +index = [3][5] +...checksum after hashing g_1296[i][j] : FEBD276C +index = [3][6] +...checksum after hashing g_1296[i][j] : B863E8CF +index = [3][7] +...checksum after hashing g_1296[i][j] : 23F1A38E +index = [3][8] +...checksum after hashing g_1296[i][j] : 583C5CA3 +index = [3][9] +...checksum after hashing g_1296[i][j] : 1FE3FD65 +index = [4][0] +...checksum after hashing g_1296[i][j] : 85A6C546 +index = [4][1] +...checksum after hashing g_1296[i][j] : 10D8AF1C +index = [4][2] +...checksum after hashing g_1296[i][j] : A5A32894 +index = [4][3] +...checksum after hashing g_1296[i][j] : 79CBC2AB +index = [4][4] +...checksum after hashing g_1296[i][j] : 28D2C42B +index = [4][5] +...checksum after hashing g_1296[i][j] : 466AC6D8 +index = [4][6] +...checksum after hashing g_1296[i][j] : 8990E3F3 +index = [4][7] +...checksum after hashing g_1296[i][j] : FB16B932 +index = [4][8] +...checksum after hashing g_1296[i][j] : 871EB4EA +index = [4][9] +...checksum after hashing g_1296[i][j] : EFD0E2AF +index = [5][0] +...checksum after hashing g_1296[i][j] : C2FAB845 +index = [5][1] +...checksum after hashing g_1296[i][j] : A0F23D9A +index = [5][2] +...checksum after hashing g_1296[i][j] : 370CD249 +index = [5][3] +...checksum after hashing g_1296[i][j] : 223807A7 +index = [5][4] +...checksum after hashing g_1296[i][j] : 3648153A +index = [5][5] +...checksum after hashing g_1296[i][j] : 5325F6D6 +index = [5][6] +...checksum after hashing g_1296[i][j] : 5718C671 +index = [5][7] +...checksum after hashing g_1296[i][j] : 10F1AE19 +index = [5][8] +...checksum after hashing g_1296[i][j] : CFA377FB +index = [5][9] +...checksum after hashing g_1296[i][j] : BDF0E31B +index = [6][0] +...checksum after hashing g_1296[i][j] : 41C91FC5 +index = [6][1] +...checksum after hashing g_1296[i][j] : 114677EE +index = [6][2] +...checksum after hashing g_1296[i][j] : 92930532 +index = [6][3] +...checksum after hashing g_1296[i][j] : 46A5C23D +index = [6][4] +...checksum after hashing g_1296[i][j] : FDE11147 +index = [6][5] +...checksum after hashing g_1296[i][j] : BE0A3AD3 +index = [6][6] +...checksum after hashing g_1296[i][j] : 34D4FFCF +index = [6][7] +...checksum after hashing g_1296[i][j] : 7512E10F +index = [6][8] +...checksum after hashing g_1296[i][j] : 899C80BD +index = [6][9] +...checksum after hashing g_1296[i][j] : 74654F36 +index = [7][0] +...checksum after hashing g_1296[i][j] : 2D7DC869 +index = [7][1] +...checksum after hashing g_1296[i][j] : 5A90B429 +index = [7][2] +...checksum after hashing g_1296[i][j] : DC8C0115 +index = [7][3] +...checksum after hashing g_1296[i][j] : 20779F6F +index = [7][4] +...checksum after hashing g_1296[i][j] : EF5E087D +index = [7][5] +...checksum after hashing g_1296[i][j] : A28F79D6 +index = [7][6] +...checksum after hashing g_1296[i][j] : 23230C25 +index = [7][7] +...checksum after hashing g_1296[i][j] : A37C7F67 +index = [7][8] +...checksum after hashing g_1296[i][j] : 144DFB63 +index = [7][9] +...checksum after hashing g_1380 : CB20A129 +...checksum after hashing g_1491 : 4A964E74 +...checksum after hashing g_1519 : CBBBE5E0 +...checksum after hashing g_1520[i] : 5395E024 +index = [0] +...checksum after hashing g_1520[i] : 59A249C4 +index = [1] +...checksum after hashing g_1520[i] : 29A62739 +index = [2] +...checksum after hashing g_1520[i] : 2B8ABB51 +index = [3] +...checksum after hashing g_1520[i] : F62E2FAB +index = [4] +...checksum after hashing g_1520[i] : D7E61EC0 +index = [5] +before stmt(911): checksum = D7E61EC0 +...checksum after hashing g_2 : 78E72F61 +...checksum after hashing g_64 : B8299504 +...checksum after hashing g_73 : BB06691D +...checksum after hashing g_145 : 45346B0 +...checksum after hashing g_173[i] : 7D69C513 +index = [0] +...checksum after hashing g_174 : 9991F0B5 +...checksum after hashing g_178[i][j] : 2D6A2C21 +index = [0][0] +...checksum after hashing g_178[i][j] : D250779B +index = [0][1] +...checksum after hashing g_178[i][j] : AE644854 +index = [0][2] +...checksum after hashing g_178[i][j] : F558BD2C +index = [0][3] +...checksum after hashing g_178[i][j] : 679675E7 +index = [0][4] +...checksum after hashing g_178[i][j] : BED47BBF +index = [1][0] +...checksum after hashing g_178[i][j] : F57C98F1 +index = [1][1] +...checksum after hashing g_178[i][j] : C47A166B +index = [1][2] +...checksum after hashing g_178[i][j] : 4214E1F8 +index = [1][3] +...checksum after hashing g_178[i][j] : A2CFAADB +index = [1][4] +...checksum after hashing g_178[i][j] : 28B9E89 +index = [2][0] +...checksum after hashing g_178[i][j] : 70E193FB +index = [2][1] +...checksum after hashing g_178[i][j] : FEAF9A16 +index = [2][2] +...checksum after hashing g_178[i][j] : 92D93B5 +index = [2][3] +...checksum after hashing g_178[i][j] : 734E83A7 +index = [2][4] +...checksum after hashing g_178[i][j] : C7B2B78A +index = [3][0] +...checksum after hashing g_178[i][j] : B042FAFF +index = [3][1] +...checksum after hashing g_178[i][j] : 2885D074 +index = [3][2] +...checksum after hashing g_178[i][j] : E5D41FE2 +index = [3][3] +...checksum after hashing g_178[i][j] : A179A2FF +index = [3][4] +...checksum after hashing g_319 : D098C9A9 +...checksum after hashing g_363 : B706DB0A +...checksum after hashing g_578 : E7C09D86 +...checksum after hashing g_627 : 58C721A9 +...checksum after hashing g_670 : 17181DE8 +...checksum after hashing g_681[i][j] : BEC20EBF +index = [0][0] +...checksum after hashing g_681[i][j] : 8CB45DA1 +index = [0][1] +...checksum after hashing g_681[i][j] : B3E76CE5 +index = [0][2] +...checksum after hashing g_681[i][j] : F5150173 +index = [0][3] +...checksum after hashing g_681[i][j] : 3A15CF17 +index = [0][4] +...checksum after hashing g_681[i][j] : 597B7E02 +index = [0][5] +...checksum after hashing g_681[i][j] : 92258E69 +index = [0][6] +...checksum after hashing g_681[i][j] : 4D59A9AC +index = [0][7] +...checksum after hashing g_681[i][j] : A3F51B7 +index = [1][0] +...checksum after hashing g_681[i][j] : 43FEF4A6 +index = [1][1] +...checksum after hashing g_681[i][j] : F9D44A1D +index = [1][2] +...checksum after hashing g_681[i][j] : E865C8D7 +index = [1][3] +...checksum after hashing g_681[i][j] : 2A5BF9A5 +index = [1][4] +...checksum after hashing g_681[i][j] : BDAB13DE +index = [1][5] +...checksum after hashing g_681[i][j] : 98F73345 +index = [1][6] +...checksum after hashing g_681[i][j] : 39E09AEA +index = [1][7] +...checksum after hashing g_681[i][j] : F002AD4B +index = [2][0] +...checksum after hashing g_681[i][j] : 41084B1 +index = [2][1] +...checksum after hashing g_681[i][j] : 48AE473A +index = [2][2] +...checksum after hashing g_681[i][j] : B4EEDE65 +index = [2][3] +...checksum after hashing g_681[i][j] : 3F21FC29 +index = [2][4] +...checksum after hashing g_681[i][j] : A4E2AD21 +index = [2][5] +...checksum after hashing g_681[i][j] : CCE2BA22 +index = [2][6] +...checksum after hashing g_681[i][j] : 2A4606A6 +index = [2][7] +...checksum after hashing g_681[i][j] : A92A51EB +index = [3][0] +...checksum after hashing g_681[i][j] : BA4F50FA +index = [3][1] +...checksum after hashing g_681[i][j] : 9FC1DAFA +index = [3][2] +...checksum after hashing g_681[i][j] : CDBA2BDF +index = [3][3] +...checksum after hashing g_681[i][j] : 9EFB224 +index = [3][4] +...checksum after hashing g_681[i][j] : B64FBA6F +index = [3][5] +...checksum after hashing g_681[i][j] : 46509335 +index = [3][6] +...checksum after hashing g_681[i][j] : B8AB2EB +index = [3][7] +...checksum after hashing g_681[i][j] : 29250FDB +index = [4][0] +...checksum after hashing g_681[i][j] : 4666340E +index = [4][1] +...checksum after hashing g_681[i][j] : 2956192A +index = [4][2] +...checksum after hashing g_681[i][j] : 6405B03B +index = [4][3] +...checksum after hashing g_681[i][j] : 6DE39A61 +index = [4][4] +...checksum after hashing g_681[i][j] : CAB1EF75 +index = [4][5] +...checksum after hashing g_681[i][j] : C00F39B1 +index = [4][6] +...checksum after hashing g_681[i][j] : 84A62CBF +index = [4][7] +...checksum after hashing g_760 : 67FDF22B +...checksum after hashing g_876 : 92F33B96 +...checksum after hashing g_891[i] : 2D845A05 +index = [0] +...checksum after hashing g_1001 : D53DE217 +...checksum after hashing g_1077 : C728A787 +...checksum after hashing g_1156 : 6F5DA4DB +...checksum after hashing g_1229 : 2668D4FC +...checksum after hashing g_1296[i][j] : AC16CC2 +index = [0][0] +...checksum after hashing g_1296[i][j] : 63A494F6 +index = [0][1] +...checksum after hashing g_1296[i][j] : 1B8B80CE +index = [0][2] +...checksum after hashing g_1296[i][j] : 1CAB8F44 +index = [0][3] +...checksum after hashing g_1296[i][j] : F9CCB1F7 +index = [0][4] +...checksum after hashing g_1296[i][j] : 5D47B7DF +index = [0][5] +...checksum after hashing g_1296[i][j] : 35806ACD +index = [0][6] +...checksum after hashing g_1296[i][j] : 53A8DBBA +index = [0][7] +...checksum after hashing g_1296[i][j] : 46EB9D9C +index = [0][8] +...checksum after hashing g_1296[i][j] : 12C6421 +index = [0][9] +...checksum after hashing g_1296[i][j] : 2ABECCFC +index = [1][0] +...checksum after hashing g_1296[i][j] : 39E103F5 +index = [1][1] +...checksum after hashing g_1296[i][j] : F7D282FF +index = [1][2] +...checksum after hashing g_1296[i][j] : 957D8CA0 +index = [1][3] +...checksum after hashing g_1296[i][j] : E19180DC +index = [1][4] +...checksum after hashing g_1296[i][j] : 13A4AB08 +index = [1][5] +...checksum after hashing g_1296[i][j] : 7F087D41 +index = [1][6] +...checksum after hashing g_1296[i][j] : 881DDD01 +index = [1][7] +...checksum after hashing g_1296[i][j] : A67914 +index = [1][8] +...checksum after hashing g_1296[i][j] : 5D425764 +index = [1][9] +...checksum after hashing g_1296[i][j] : 39FA64CC +index = [2][0] +...checksum after hashing g_1296[i][j] : E0A3C53 +index = [2][1] +...checksum after hashing g_1296[i][j] : B5D2E9A3 +index = [2][2] +...checksum after hashing g_1296[i][j] : C8F638C7 +index = [2][3] +...checksum after hashing g_1296[i][j] : 489A7563 +index = [2][4] +...checksum after hashing g_1296[i][j] : A9448678 +index = [2][5] +...checksum after hashing g_1296[i][j] : 5168A110 +index = [2][6] +...checksum after hashing g_1296[i][j] : C6141FFA +index = [2][7] +...checksum after hashing g_1296[i][j] : 834C7D42 +index = [2][8] +...checksum after hashing g_1296[i][j] : 640D663A +index = [2][9] +...checksum after hashing g_1296[i][j] : 1F654838 +index = [3][0] +...checksum after hashing g_1296[i][j] : 128D110F +index = [3][1] +...checksum after hashing g_1296[i][j] : 645FDEC9 +index = [3][2] +...checksum after hashing g_1296[i][j] : C2B0D8F1 +index = [3][3] +...checksum after hashing g_1296[i][j] : 72CE0323 +index = [3][4] +...checksum after hashing g_1296[i][j] : 7AF78B45 +index = [3][5] +...checksum after hashing g_1296[i][j] : 8BC36C2A +index = [3][6] +...checksum after hashing g_1296[i][j] : EB005CC4 +index = [3][7] +...checksum after hashing g_1296[i][j] : 8A154A69 +index = [3][8] +...checksum after hashing g_1296[i][j] : 20BFE3A9 +index = [3][9] +...checksum after hashing g_1296[i][j] : F02C96AA +index = [4][0] +...checksum after hashing g_1296[i][j] : 93DD2BBF +index = [4][1] +...checksum after hashing g_1296[i][j] : 70D51EF7 +index = [4][2] +...checksum after hashing g_1296[i][j] : 985D659F +index = [4][3] +...checksum after hashing g_1296[i][j] : 4DFDB1B +index = [4][4] +...checksum after hashing g_1296[i][j] : 264DC89A +index = [4][5] +...checksum after hashing g_1296[i][j] : FBDFAD91 +index = [4][6] +...checksum after hashing g_1296[i][j] : 76C4549 +index = [4][7] +...checksum after hashing g_1296[i][j] : E6253688 +index = [4][8] +...checksum after hashing g_1296[i][j] : 88D54F40 +index = [4][9] +...checksum after hashing g_1296[i][j] : CC2694EB +index = [5][0] +...checksum after hashing g_1296[i][j] : 66715484 +index = [5][1] +...checksum after hashing g_1296[i][j] : C737BB4C +index = [5][2] +...checksum after hashing g_1296[i][j] : B4D084CE +index = [5][3] +...checksum after hashing g_1296[i][j] : 63BB83AE +index = [5][4] +...checksum after hashing g_1296[i][j] : BC095362 +index = [5][5] +...checksum after hashing g_1296[i][j] : CD843493 +index = [5][6] +...checksum after hashing g_1296[i][j] : C9521FBB +index = [5][7] +...checksum after hashing g_1296[i][j] : 9678B708 +index = [5][8] +...checksum after hashing g_1296[i][j] : DA6BDAE9 +index = [5][9] +...checksum after hashing g_1296[i][j] : F8BE0B91 +index = [6][0] +...checksum after hashing g_1296[i][j] : C901F16 +index = [6][1] +...checksum after hashing g_1296[i][j] : 46B3BAA9 +index = [6][2] +...checksum after hashing g_1296[i][j] : 91E3B10A +index = [6][3] +...checksum after hashing g_1296[i][j] : 75B6CF3 +index = [6][4] +...checksum after hashing g_1296[i][j] : 3371452D +index = [6][5] +...checksum after hashing g_1296[i][j] : 8CB9CE75 +index = [6][6] +...checksum after hashing g_1296[i][j] : E926CEE1 +index = [6][7] +...checksum after hashing g_1296[i][j] : CEBE9BF3 +index = [6][8] +...checksum after hashing g_1296[i][j] : 424B5DC5 +index = [6][9] +...checksum after hashing g_1296[i][j] : 9D7029C6 +index = [7][0] +...checksum after hashing g_1296[i][j] : 922D594 +index = [7][1] +...checksum after hashing g_1296[i][j] : 3B42EF3A +index = [7][2] +...checksum after hashing g_1296[i][j] : 7772CE66 +index = [7][3] +...checksum after hashing g_1296[i][j] : 835F733 +index = [7][4] +...checksum after hashing g_1296[i][j] : DFBBA782 +index = [7][5] +...checksum after hashing g_1296[i][j] : AB7E527F +index = [7][6] +...checksum after hashing g_1296[i][j] : 53239BF3 +index = [7][7] +...checksum after hashing g_1296[i][j] : 81A466B +index = [7][8] +...checksum after hashing g_1296[i][j] : 7822C85 +index = [7][9] +...checksum after hashing g_1380 : 782E1627 +...checksum after hashing g_1491 : A6B31E6A +...checksum after hashing g_1519 : 568E9548 +...checksum after hashing g_1520[i] : A33494D1 +index = [0] +...checksum after hashing g_1520[i] : B1431069 +index = [1] +...checksum after hashing g_1520[i] : 1C7E5B39 +index = [2] +...checksum after hashing g_1520[i] : 6933A151 +index = [3] +...checksum after hashing g_1520[i] : 4A4A3C40 +index = [4] +...checksum after hashing g_1520[i] : BBE94D4 +index = [5] +before stmt(912): checksum = BBE94D4 +...checksum after hashing g_2 : BDD52DEB +...checksum after hashing g_64 : 3F37757B +...checksum after hashing g_73 : 8625202B +...checksum after hashing g_145 : 48996CF2 +...checksum after hashing g_173[i] : 37D1A4EC +index = [0] +...checksum after hashing g_174 : B494DB6D +...checksum after hashing g_178[i][j] : C23ABC66 +index = [0][0] +...checksum after hashing g_178[i][j] : A38E0D52 +index = [0][1] +...checksum after hashing g_178[i][j] : C4FEAD65 +index = [0][2] +...checksum after hashing g_178[i][j] : 342FDA75 +index = [0][3] +...checksum after hashing g_178[i][j] : 1016F57D +index = [0][4] +...checksum after hashing g_178[i][j] : 78FE1D2B +index = [1][0] +...checksum after hashing g_178[i][j] : 9668F23D +index = [1][1] +...checksum after hashing g_178[i][j] : 47B4EE94 +index = [1][2] +...checksum after hashing g_178[i][j] : 60EED3B +index = [1][3] +...checksum after hashing g_178[i][j] : EB16D05 +index = [1][4] +...checksum after hashing g_178[i][j] : 3E3C6B5D +index = [2][0] +...checksum after hashing g_178[i][j] : EE3348F6 +index = [2][1] +...checksum after hashing g_178[i][j] : 29A081C4 +index = [2][2] +...checksum after hashing g_178[i][j] : A2CF58E +index = [2][3] +...checksum after hashing g_178[i][j] : 982C2B6E +index = [2][4] +...checksum after hashing g_178[i][j] : 7B8F280B +index = [3][0] +...checksum after hashing g_178[i][j] : BBD76375 +index = [3][1] +...checksum after hashing g_178[i][j] : C347A283 +index = [3][2] +...checksum after hashing g_178[i][j] : 670403FE +index = [3][3] +...checksum after hashing g_178[i][j] : 2C0437DF +index = [3][4] +...checksum after hashing g_319 : 82EAE4AA +...checksum after hashing g_363 : D4A8AFB +...checksum after hashing g_578 : C31CF258 +...checksum after hashing g_627 : CC490DDC +...checksum after hashing g_670 : 28CC105A +...checksum after hashing g_681[i][j] : 525336DB +index = [0][0] +...checksum after hashing g_681[i][j] : D36E9CD5 +index = [0][1] +...checksum after hashing g_681[i][j] : 47D4C6A9 +index = [0][2] +...checksum after hashing g_681[i][j] : BE836D75 +index = [0][3] +...checksum after hashing g_681[i][j] : 98A6170B +index = [0][4] +...checksum after hashing g_681[i][j] : 371ECD12 +index = [0][5] +...checksum after hashing g_681[i][j] : B7A44A02 +index = [0][6] +...checksum after hashing g_681[i][j] : 5E449A7F +index = [0][7] +...checksum after hashing g_681[i][j] : 632131CB +index = [1][0] +...checksum after hashing g_681[i][j] : CAEFC681 +index = [1][1] +...checksum after hashing g_681[i][j] : 2463F4F0 +index = [1][2] +...checksum after hashing g_681[i][j] : 5056143E +index = [1][3] +...checksum after hashing g_681[i][j] : 346E65CD +index = [1][4] +...checksum after hashing g_681[i][j] : EF0E7273 +index = [1][5] +...checksum after hashing g_681[i][j] : 38F62BFE +index = [1][6] +...checksum after hashing g_681[i][j] : 2E6B3310 +index = [1][7] +...checksum after hashing g_681[i][j] : 94D4F920 +index = [2][0] +...checksum after hashing g_681[i][j] : 1E3FB507 +index = [2][1] +...checksum after hashing g_681[i][j] : BA6018CC +index = [2][2] +...checksum after hashing g_681[i][j] : 76C99763 +index = [2][3] +...checksum after hashing g_681[i][j] : CAAE0443 +index = [2][4] +...checksum after hashing g_681[i][j] : 3A621A39 +index = [2][5] +...checksum after hashing g_681[i][j] : B56A0BCF +index = [2][6] +...checksum after hashing g_681[i][j] : 104CD0BF +index = [2][7] +...checksum after hashing g_681[i][j] : 31DC3144 +index = [3][0] +...checksum after hashing g_681[i][j] : 5BA2CFC4 +index = [3][1] +...checksum after hashing g_681[i][j] : 45A7F5EA +index = [3][2] +...checksum after hashing g_681[i][j] : FB138A76 +index = [3][3] +...checksum after hashing g_681[i][j] : 514941C5 +index = [3][4] +...checksum after hashing g_681[i][j] : F2E39312 +index = [3][5] +...checksum after hashing g_681[i][j] : 9B9AE077 +index = [3][6] +...checksum after hashing g_681[i][j] : A55765F9 +index = [3][7] +...checksum after hashing g_681[i][j] : 5E0B86C7 +index = [4][0] +...checksum after hashing g_681[i][j] : 772B1195 +index = [4][1] +...checksum after hashing g_681[i][j] : 6998CAF6 +index = [4][2] +...checksum after hashing g_681[i][j] : A4ED8623 +index = [4][3] +...checksum after hashing g_681[i][j] : D56BC767 +index = [4][4] +...checksum after hashing g_681[i][j] : BD5E24B7 +index = [4][5] +...checksum after hashing g_681[i][j] : 96366D21 +index = [4][6] +...checksum after hashing g_681[i][j] : DEDF320C +index = [4][7] +...checksum after hashing g_760 : BC1E770 +...checksum after hashing g_876 : A3E58622 +...checksum after hashing g_891[i] : 3F545B66 +index = [0] +...checksum after hashing g_1001 : 8FED649A +...checksum after hashing g_1077 : 3725D3A6 +...checksum after hashing g_1156 : 2C38205D +...checksum after hashing g_1229 : FF39018F +...checksum after hashing g_1296[i][j] : A4A6920E +index = [0][0] +...checksum after hashing g_1296[i][j] : FBB7E81D +index = [0][1] +...checksum after hashing g_1296[i][j] : D8258D27 +index = [0][2] +...checksum after hashing g_1296[i][j] : 8DED10C8 +index = [0][3] +...checksum after hashing g_1296[i][j] : 89270CE8 +index = [0][4] +...checksum after hashing g_1296[i][j] : 7534C64E +index = [0][5] +...checksum after hashing g_1296[i][j] : 54E86CA4 +index = [0][6] +...checksum after hashing g_1296[i][j] : 869AAFE0 +index = [0][7] +...checksum after hashing g_1296[i][j] : AA6AC0FC +index = [0][8] +...checksum after hashing g_1296[i][j] : D54A2998 +index = [0][9] +...checksum after hashing g_1296[i][j] : 809F0993 +index = [1][0] +...checksum after hashing g_1296[i][j] : 775CEF1E +index = [1][1] +...checksum after hashing g_1296[i][j] : 965BD160 +index = [1][2] +...checksum after hashing g_1296[i][j] : CE509F77 +index = [1][3] +...checksum after hashing g_1296[i][j] : 98E1CE46 +index = [1][4] +...checksum after hashing g_1296[i][j] : BDBBBA6C +index = [1][5] +...checksum after hashing g_1296[i][j] : 2A9C5423 +index = [1][6] +...checksum after hashing g_1296[i][j] : 20827583 +index = [1][7] +...checksum after hashing g_1296[i][j] : BE49B673 +index = [1][8] +...checksum after hashing g_1296[i][j] : 947F380B +index = [1][9] +...checksum after hashing g_1296[i][j] : 91643D2E +index = [2][0] +...checksum after hashing g_1296[i][j] : 26DE2C91 +index = [2][1] +...checksum after hashing g_1296[i][j] : A551C4BF +index = [2][2] +...checksum after hashing g_1296[i][j] : EFB5DEBF +index = [2][3] +...checksum after hashing g_1296[i][j] : 3520F8AF +index = [2][4] +...checksum after hashing g_1296[i][j] : 4CAC14A6 +index = [2][5] +...checksum after hashing g_1296[i][j] : 2FB36C37 +index = [2][6] +...checksum after hashing g_1296[i][j] : B7F7CD81 +index = [2][7] +...checksum after hashing g_1296[i][j] : E32E5A04 +index = [2][8] +...checksum after hashing g_1296[i][j] : FD0959C3 +index = [2][9] +...checksum after hashing g_1296[i][j] : 26835D5C +index = [3][0] +...checksum after hashing g_1296[i][j] : EB05CCA2 +index = [3][1] +...checksum after hashing g_1296[i][j] : 6934E189 +index = [3][2] +...checksum after hashing g_1296[i][j] : 8E2BECB0 +index = [3][3] +...checksum after hashing g_1296[i][j] : 9FDB2F5D +index = [3][4] +...checksum after hashing g_1296[i][j] : 294E9BBF +index = [3][5] +...checksum after hashing g_1296[i][j] : B95B2C26 +index = [3][6] +...checksum after hashing g_1296[i][j] : A0033F2E +index = [3][7] +...checksum after hashing g_1296[i][j] : B3655597 +index = [3][8] +...checksum after hashing g_1296[i][j] : 2146978E +index = [3][9] +...checksum after hashing g_1296[i][j] : 2C48ABC3 +index = [4][0] +...checksum after hashing g_1296[i][j] : 77B4D5A9 +index = [4][1] +...checksum after hashing g_1296[i][j] : A9A5BEE1 +index = [4][2] +...checksum after hashing g_1296[i][j] : E467233A +index = [4][3] +...checksum after hashing g_1296[i][j] : 76672030 +index = [4][4] +...checksum after hashing g_1296[i][j] : 7AF84834 +index = [4][5] +...checksum after hashing g_1296[i][j] : 4C319F05 +index = [4][6] +...checksum after hashing g_1296[i][j] : 8759FA09 +index = [4][7] +...checksum after hashing g_1296[i][j] : FCBA960E +index = [4][8] +...checksum after hashing g_1296[i][j] : 92249468 +index = [4][9] +...checksum after hashing g_1296[i][j] : D8B9E06D +index = [5][0] +...checksum after hashing g_1296[i][j] : 11B83F47 +index = [5][1] +...checksum after hashing g_1296[i][j] : 331456FD +index = [5][2] +...checksum after hashing g_1296[i][j] : B45DAFA6 +index = [5][3] +...checksum after hashing g_1296[i][j] : 271C1345 +index = [5][4] +...checksum after hashing g_1296[i][j] : D093820C +index = [5][5] +...checksum after hashing g_1296[i][j] : 559CA447 +index = [5][6] +...checksum after hashing g_1296[i][j] : E1B80AAA +index = [5][7] +...checksum after hashing g_1296[i][j] : F51455F5 +index = [5][8] +...checksum after hashing g_1296[i][j] : 19F20414 +index = [5][9] +...checksum after hashing g_1296[i][j] : A94B7F88 +index = [6][0] +...checksum after hashing g_1296[i][j] : 7DEB315 +index = [6][1] +...checksum after hashing g_1296[i][j] : 7D4C0A40 +index = [6][2] +...checksum after hashing g_1296[i][j] : DDE555FE +index = [6][3] +...checksum after hashing g_1296[i][j] : 89843F42 +index = [6][4] +...checksum after hashing g_1296[i][j] : F4E58BCC +index = [6][5] +...checksum after hashing g_1296[i][j] : 69664B6F +index = [6][6] +...checksum after hashing g_1296[i][j] : E7BC6F56 +index = [6][7] +...checksum after hashing g_1296[i][j] : FAB79510 +index = [6][8] +...checksum after hashing g_1296[i][j] : 7C69D1E5 +index = [6][9] +...checksum after hashing g_1296[i][j] : B3BE3F97 +index = [7][0] +...checksum after hashing g_1296[i][j] : EB97959E +index = [7][1] +...checksum after hashing g_1296[i][j] : F3D35B37 +index = [7][2] +...checksum after hashing g_1296[i][j] : BAAAB1AE +index = [7][3] +...checksum after hashing g_1296[i][j] : 4855EFAD +index = [7][4] +...checksum after hashing g_1296[i][j] : 8330E9EA +index = [7][5] +...checksum after hashing g_1296[i][j] : 95427106 +index = [7][6] +...checksum after hashing g_1296[i][j] : CD8DE808 +index = [7][7] +...checksum after hashing g_1296[i][j] : 28F92EE0 +index = [7][8] +...checksum after hashing g_1296[i][j] : 352307C0 +index = [7][9] +...checksum after hashing g_1380 : 9F37CB01 +...checksum after hashing g_1491 : 3D59628 +...checksum after hashing g_1519 : 1DAED480 +...checksum after hashing g_1520[i] : 151F0975 +index = [0] +...checksum after hashing g_1520[i] : D2F35E48 +index = [1] +...checksum after hashing g_1520[i] : 4E8AADF2 +index = [2] +...checksum after hashing g_1520[i] : 8C83D355 +index = [3] +...checksum after hashing g_1520[i] : A6F8AF66 +index = [4] +...checksum after hashing g_1520[i] : EFD00F6 +index = [5] +before stmt(917): checksum = EFD00F6 +...checksum after hashing g_2 : BDD52DEB +...checksum after hashing g_64 : 3F37757B +...checksum after hashing g_73 : 8625202B +...checksum after hashing g_145 : 48996CF2 +...checksum after hashing g_173[i] : 37D1A4EC +index = [0] +...checksum after hashing g_174 : B494DB6D +...checksum after hashing g_178[i][j] : C23ABC66 +index = [0][0] +...checksum after hashing g_178[i][j] : A38E0D52 +index = [0][1] +...checksum after hashing g_178[i][j] : C4FEAD65 +index = [0][2] +...checksum after hashing g_178[i][j] : 342FDA75 +index = [0][3] +...checksum after hashing g_178[i][j] : 1016F57D +index = [0][4] +...checksum after hashing g_178[i][j] : 78FE1D2B +index = [1][0] +...checksum after hashing g_178[i][j] : 9668F23D +index = [1][1] +...checksum after hashing g_178[i][j] : 47B4EE94 +index = [1][2] +...checksum after hashing g_178[i][j] : 60EED3B +index = [1][3] +...checksum after hashing g_178[i][j] : EB16D05 +index = [1][4] +...checksum after hashing g_178[i][j] : 3E3C6B5D +index = [2][0] +...checksum after hashing g_178[i][j] : EE3348F6 +index = [2][1] +...checksum after hashing g_178[i][j] : 29A081C4 +index = [2][2] +...checksum after hashing g_178[i][j] : A2CF58E +index = [2][3] +...checksum after hashing g_178[i][j] : 982C2B6E +index = [2][4] +...checksum after hashing g_178[i][j] : 7B8F280B +index = [3][0] +...checksum after hashing g_178[i][j] : BBD76375 +index = [3][1] +...checksum after hashing g_178[i][j] : C347A283 +index = [3][2] +...checksum after hashing g_178[i][j] : 670403FE +index = [3][3] +...checksum after hashing g_178[i][j] : 2C0437DF +index = [3][4] +...checksum after hashing g_319 : 82EAE4AA +...checksum after hashing g_363 : D4A8AFB +...checksum after hashing g_578 : C31CF258 +...checksum after hashing g_627 : CC490DDC +...checksum after hashing g_670 : 28CC105A +...checksum after hashing g_681[i][j] : 525336DB +index = [0][0] +...checksum after hashing g_681[i][j] : D36E9CD5 +index = [0][1] +...checksum after hashing g_681[i][j] : 47D4C6A9 +index = [0][2] +...checksum after hashing g_681[i][j] : BE836D75 +index = [0][3] +...checksum after hashing g_681[i][j] : 98A6170B +index = [0][4] +...checksum after hashing g_681[i][j] : 371ECD12 +index = [0][5] +...checksum after hashing g_681[i][j] : B7A44A02 +index = [0][6] +...checksum after hashing g_681[i][j] : 5E449A7F +index = [0][7] +...checksum after hashing g_681[i][j] : 632131CB +index = [1][0] +...checksum after hashing g_681[i][j] : CAEFC681 +index = [1][1] +...checksum after hashing g_681[i][j] : 2463F4F0 +index = [1][2] +...checksum after hashing g_681[i][j] : 5056143E +index = [1][3] +...checksum after hashing g_681[i][j] : 346E65CD +index = [1][4] +...checksum after hashing g_681[i][j] : EF0E7273 +index = [1][5] +...checksum after hashing g_681[i][j] : 38F62BFE +index = [1][6] +...checksum after hashing g_681[i][j] : 2E6B3310 +index = [1][7] +...checksum after hashing g_681[i][j] : 94D4F920 +index = [2][0] +...checksum after hashing g_681[i][j] : 1E3FB507 +index = [2][1] +...checksum after hashing g_681[i][j] : BA6018CC +index = [2][2] +...checksum after hashing g_681[i][j] : 76C99763 +index = [2][3] +...checksum after hashing g_681[i][j] : CAAE0443 +index = [2][4] +...checksum after hashing g_681[i][j] : 3A621A39 +index = [2][5] +...checksum after hashing g_681[i][j] : B56A0BCF +index = [2][6] +...checksum after hashing g_681[i][j] : 104CD0BF +index = [2][7] +...checksum after hashing g_681[i][j] : 31DC3144 +index = [3][0] +...checksum after hashing g_681[i][j] : 5BA2CFC4 +index = [3][1] +...checksum after hashing g_681[i][j] : 45A7F5EA +index = [3][2] +...checksum after hashing g_681[i][j] : FB138A76 +index = [3][3] +...checksum after hashing g_681[i][j] : 514941C5 +index = [3][4] +...checksum after hashing g_681[i][j] : F2E39312 +index = [3][5] +...checksum after hashing g_681[i][j] : 9B9AE077 +index = [3][6] +...checksum after hashing g_681[i][j] : A55765F9 +index = [3][7] +...checksum after hashing g_681[i][j] : 5E0B86C7 +index = [4][0] +...checksum after hashing g_681[i][j] : 772B1195 +index = [4][1] +...checksum after hashing g_681[i][j] : 6998CAF6 +index = [4][2] +...checksum after hashing g_681[i][j] : A4ED8623 +index = [4][3] +...checksum after hashing g_681[i][j] : D56BC767 +index = [4][4] +...checksum after hashing g_681[i][j] : BD5E24B7 +index = [4][5] +...checksum after hashing g_681[i][j] : 96366D21 +index = [4][6] +...checksum after hashing g_681[i][j] : DEDF320C +index = [4][7] +...checksum after hashing g_760 : B6614FE0 +...checksum after hashing g_876 : D2191886 +...checksum after hashing g_891[i] : 95DBAFD5 +index = [0] +...checksum after hashing g_1001 : B8FF9090 +...checksum after hashing g_1077 : 2A1C3D12 +...checksum after hashing g_1156 : 70D6E559 +...checksum after hashing g_1229 : 451F01CE +...checksum after hashing g_1296[i][j] : 6F6474E0 +index = [0][0] +...checksum after hashing g_1296[i][j] : 9502DCF0 +index = [0][1] +...checksum after hashing g_1296[i][j] : ECEA4F2C +index = [0][2] +...checksum after hashing g_1296[i][j] : A511EAD3 +index = [0][3] +...checksum after hashing g_1296[i][j] : 3BD02C3B +index = [0][4] +...checksum after hashing g_1296[i][j] : 70A3303 +index = [0][5] +...checksum after hashing g_1296[i][j] : 71575612 +index = [0][6] +...checksum after hashing g_1296[i][j] : BF26B8D0 +index = [0][7] +...checksum after hashing g_1296[i][j] : 545DE414 +index = [0][8] +...checksum after hashing g_1296[i][j] : 33C7D15C +index = [0][9] +...checksum after hashing g_1296[i][j] : 523F3E1 +index = [1][0] +...checksum after hashing g_1296[i][j] : DB9BE714 +index = [1][1] +...checksum after hashing g_1296[i][j] : AC2ECEF6 +index = [1][2] +...checksum after hashing g_1296[i][j] : D5459143 +index = [1][3] +...checksum after hashing g_1296[i][j] : 50E6A342 +index = [1][4] +...checksum after hashing g_1296[i][j] : A828A90D +index = [1][5] +...checksum after hashing g_1296[i][j] : 80D7E45E +index = [1][6] +...checksum after hashing g_1296[i][j] : 59072FEA +index = [1][7] +...checksum after hashing g_1296[i][j] : F661000A +index = [1][8] +...checksum after hashing g_1296[i][j] : 66C132B7 +index = [1][9] +...checksum after hashing g_1296[i][j] : E2A259DC +index = [2][0] +...checksum after hashing g_1296[i][j] : 11C3C10F +index = [2][1] +...checksum after hashing g_1296[i][j] : 1E25D8C8 +index = [2][2] +...checksum after hashing g_1296[i][j] : 1B81CA78 +index = [2][3] +...checksum after hashing g_1296[i][j] : C46FE04E +index = [2][4] +...checksum after hashing g_1296[i][j] : 8D015173 +index = [2][5] +...checksum after hashing g_1296[i][j] : BFA25A35 +index = [2][6] +...checksum after hashing g_1296[i][j] : 9ECE2C7C +index = [2][7] +...checksum after hashing g_1296[i][j] : 73343B3F +index = [2][8] +...checksum after hashing g_1296[i][j] : D314EEEB +index = [2][9] +...checksum after hashing g_1296[i][j] : A0AE53CB +index = [3][0] +...checksum after hashing g_1296[i][j] : E5FD444F +index = [3][1] +...checksum after hashing g_1296[i][j] : 99DA74E6 +index = [3][2] +...checksum after hashing g_1296[i][j] : 6BF65D80 +index = [3][3] +...checksum after hashing g_1296[i][j] : 4F9AEE7E +index = [3][4] +...checksum after hashing g_1296[i][j] : 6415CB88 +index = [3][5] +...checksum after hashing g_1296[i][j] : E9397B3C +index = [3][6] +...checksum after hashing g_1296[i][j] : CAF4E831 +index = [3][7] +...checksum after hashing g_1296[i][j] : C543CED7 +index = [3][8] +...checksum after hashing g_1296[i][j] : 31ACCF8F +index = [3][9] +...checksum after hashing g_1296[i][j] : 4F7DB8AC +index = [4][0] +...checksum after hashing g_1296[i][j] : 7C1BDD81 +index = [4][1] +...checksum after hashing g_1296[i][j] : 7C7D1126 +index = [4][2] +...checksum after hashing g_1296[i][j] : 62818694 +index = [4][3] +...checksum after hashing g_1296[i][j] : 89FA3F2 +index = [4][4] +...checksum after hashing g_1296[i][j] : 2E17FCEE +index = [4][5] +...checksum after hashing g_1296[i][j] : 726FEAFA +index = [4][6] +...checksum after hashing g_1296[i][j] : EE3F3B32 +index = [4][7] +...checksum after hashing g_1296[i][j] : 4C340004 +index = [4][8] +...checksum after hashing g_1296[i][j] : 6A66B607 +index = [4][9] +...checksum after hashing g_1296[i][j] : F11CC21F +index = [5][0] +...checksum after hashing g_1296[i][j] : 7A85151E +index = [5][1] +...checksum after hashing g_1296[i][j] : 43258D +index = [5][2] +...checksum after hashing g_1296[i][j] : C3FF73B6 +index = [5][3] +...checksum after hashing g_1296[i][j] : A1C6B27A +index = [5][4] +...checksum after hashing g_1296[i][j] : DF6D562C +index = [5][5] +...checksum after hashing g_1296[i][j] : 65AE4737 +index = [5][6] +...checksum after hashing g_1296[i][j] : EA8AA012 +index = [5][7] +...checksum after hashing g_1296[i][j] : 839F66CF +index = [5][8] +...checksum after hashing g_1296[i][j] : C158D291 +index = [5][9] +...checksum after hashing g_1296[i][j] : 26287E86 +index = [6][0] +...checksum after hashing g_1296[i][j] : D51408C4 +index = [6][1] +...checksum after hashing g_1296[i][j] : 73674971 +index = [6][2] +...checksum after hashing g_1296[i][j] : 766629CD +index = [6][3] +...checksum after hashing g_1296[i][j] : 675B48D1 +index = [6][4] +...checksum after hashing g_1296[i][j] : 4BBCADFC +index = [6][5] +...checksum after hashing g_1296[i][j] : 952AC19C +index = [6][6] +...checksum after hashing g_1296[i][j] : 770AF677 +index = [6][7] +...checksum after hashing g_1296[i][j] : 526B444E +index = [6][8] +...checksum after hashing g_1296[i][j] : 2E7057BA +index = [6][9] +...checksum after hashing g_1296[i][j] : DB0DDE91 +index = [7][0] +...checksum after hashing g_1296[i][j] : EA5D64C4 +index = [7][1] +...checksum after hashing g_1296[i][j] : A577A244 +index = [7][2] +...checksum after hashing g_1296[i][j] : 31567BAF +index = [7][3] +...checksum after hashing g_1296[i][j] : AEB26F47 +index = [7][4] +...checksum after hashing g_1296[i][j] : 83917150 +index = [7][5] +...checksum after hashing g_1296[i][j] : A391BB18 +index = [7][6] +...checksum after hashing g_1296[i][j] : 84DCD877 +index = [7][7] +...checksum after hashing g_1296[i][j] : 936EEE9B +index = [7][8] +...checksum after hashing g_1296[i][j] : 7A01C0C4 +index = [7][9] +...checksum after hashing g_1380 : C564C6B2 +...checksum after hashing g_1491 : 1EE25272 +...checksum after hashing g_1519 : DCB9C937 +...checksum after hashing g_1520[i] : 68A439C5 +index = [0] +...checksum after hashing g_1520[i] : C26F8FB0 +index = [1] +...checksum after hashing g_1520[i] : 415019CF +index = [2] +...checksum after hashing g_1520[i] : A7FD95E1 +index = [3] +...checksum after hashing g_1520[i] : 5DFF2AE1 +index = [4] +...checksum after hashing g_1520[i] : FCA3EA4C +index = [5] +before stmt(918): checksum = FCA3EA4C +...checksum after hashing g_2 : BDD52DEB +...checksum after hashing g_64 : 3F37757B +...checksum after hashing g_73 : 8625202B +...checksum after hashing g_145 : 48996CF2 +...checksum after hashing g_173[i] : 37D1A4EC +index = [0] +...checksum after hashing g_174 : B494DB6D +...checksum after hashing g_178[i][j] : C23ABC66 +index = [0][0] +...checksum after hashing g_178[i][j] : A38E0D52 +index = [0][1] +...checksum after hashing g_178[i][j] : C4FEAD65 +index = [0][2] +...checksum after hashing g_178[i][j] : 342FDA75 +index = [0][3] +...checksum after hashing g_178[i][j] : 1016F57D +index = [0][4] +...checksum after hashing g_178[i][j] : 78FE1D2B +index = [1][0] +...checksum after hashing g_178[i][j] : 9668F23D +index = [1][1] +...checksum after hashing g_178[i][j] : 47B4EE94 +index = [1][2] +...checksum after hashing g_178[i][j] : 60EED3B +index = [1][3] +...checksum after hashing g_178[i][j] : EB16D05 +index = [1][4] +...checksum after hashing g_178[i][j] : 3E3C6B5D +index = [2][0] +...checksum after hashing g_178[i][j] : EE3348F6 +index = [2][1] +...checksum after hashing g_178[i][j] : 29A081C4 +index = [2][2] +...checksum after hashing g_178[i][j] : A2CF58E +index = [2][3] +...checksum after hashing g_178[i][j] : 982C2B6E +index = [2][4] +...checksum after hashing g_178[i][j] : 7B8F280B +index = [3][0] +...checksum after hashing g_178[i][j] : BBD76375 +index = [3][1] +...checksum after hashing g_178[i][j] : C347A283 +index = [3][2] +...checksum after hashing g_178[i][j] : 670403FE +index = [3][3] +...checksum after hashing g_178[i][j] : 2C0437DF +index = [3][4] +...checksum after hashing g_319 : 82EAE4AA +...checksum after hashing g_363 : D4A8AFB +...checksum after hashing g_578 : C31CF258 +...checksum after hashing g_627 : CC490DDC +...checksum after hashing g_670 : 28CC105A +...checksum after hashing g_681[i][j] : 525336DB +index = [0][0] +...checksum after hashing g_681[i][j] : D36E9CD5 +index = [0][1] +...checksum after hashing g_681[i][j] : 47D4C6A9 +index = [0][2] +...checksum after hashing g_681[i][j] : BE836D75 +index = [0][3] +...checksum after hashing g_681[i][j] : 98A6170B +index = [0][4] +...checksum after hashing g_681[i][j] : 371ECD12 +index = [0][5] +...checksum after hashing g_681[i][j] : B7A44A02 +index = [0][6] +...checksum after hashing g_681[i][j] : 5E449A7F +index = [0][7] +...checksum after hashing g_681[i][j] : 632131CB +index = [1][0] +...checksum after hashing g_681[i][j] : CAEFC681 +index = [1][1] +...checksum after hashing g_681[i][j] : 2463F4F0 +index = [1][2] +...checksum after hashing g_681[i][j] : 5056143E +index = [1][3] +...checksum after hashing g_681[i][j] : 346E65CD +index = [1][4] +...checksum after hashing g_681[i][j] : EF0E7273 +index = [1][5] +...checksum after hashing g_681[i][j] : 38F62BFE +index = [1][6] +...checksum after hashing g_681[i][j] : 2E6B3310 +index = [1][7] +...checksum after hashing g_681[i][j] : 94D4F920 +index = [2][0] +...checksum after hashing g_681[i][j] : 1E3FB507 +index = [2][1] +...checksum after hashing g_681[i][j] : BA6018CC +index = [2][2] +...checksum after hashing g_681[i][j] : 76C99763 +index = [2][3] +...checksum after hashing g_681[i][j] : CAAE0443 +index = [2][4] +...checksum after hashing g_681[i][j] : 3A621A39 +index = [2][5] +...checksum after hashing g_681[i][j] : B56A0BCF +index = [2][6] +...checksum after hashing g_681[i][j] : 104CD0BF +index = [2][7] +...checksum after hashing g_681[i][j] : 31DC3144 +index = [3][0] +...checksum after hashing g_681[i][j] : 5BA2CFC4 +index = [3][1] +...checksum after hashing g_681[i][j] : 45A7F5EA +index = [3][2] +...checksum after hashing g_681[i][j] : FB138A76 +index = [3][3] +...checksum after hashing g_681[i][j] : 514941C5 +index = [3][4] +...checksum after hashing g_681[i][j] : F2E39312 +index = [3][5] +...checksum after hashing g_681[i][j] : 9B9AE077 +index = [3][6] +...checksum after hashing g_681[i][j] : A55765F9 +index = [3][7] +...checksum after hashing g_681[i][j] : 5E0B86C7 +index = [4][0] +...checksum after hashing g_681[i][j] : 772B1195 +index = [4][1] +...checksum after hashing g_681[i][j] : 6998CAF6 +index = [4][2] +...checksum after hashing g_681[i][j] : A4ED8623 +index = [4][3] +...checksum after hashing g_681[i][j] : D56BC767 +index = [4][4] +...checksum after hashing g_681[i][j] : BD5E24B7 +index = [4][5] +...checksum after hashing g_681[i][j] : 96366D21 +index = [4][6] +...checksum after hashing g_681[i][j] : DEDF320C +index = [4][7] +...checksum after hashing g_760 : B6614FE0 +...checksum after hashing g_876 : D2191886 +...checksum after hashing g_891[i] : 95DBAFD5 +index = [0] +...checksum after hashing g_1001 : B8FF9090 +...checksum after hashing g_1077 : 2A1C3D12 +...checksum after hashing g_1156 : 70D6E559 +...checksum after hashing g_1229 : 451F01CE +...checksum after hashing g_1296[i][j] : 6F6474E0 +index = [0][0] +...checksum after hashing g_1296[i][j] : 9502DCF0 +index = [0][1] +...checksum after hashing g_1296[i][j] : ECEA4F2C +index = [0][2] +...checksum after hashing g_1296[i][j] : A511EAD3 +index = [0][3] +...checksum after hashing g_1296[i][j] : 3BD02C3B +index = [0][4] +...checksum after hashing g_1296[i][j] : 70A3303 +index = [0][5] +...checksum after hashing g_1296[i][j] : 71575612 +index = [0][6] +...checksum after hashing g_1296[i][j] : BF26B8D0 +index = [0][7] +...checksum after hashing g_1296[i][j] : 545DE414 +index = [0][8] +...checksum after hashing g_1296[i][j] : 33C7D15C +index = [0][9] +...checksum after hashing g_1296[i][j] : 523F3E1 +index = [1][0] +...checksum after hashing g_1296[i][j] : DB9BE714 +index = [1][1] +...checksum after hashing g_1296[i][j] : AC2ECEF6 +index = [1][2] +...checksum after hashing g_1296[i][j] : D5459143 +index = [1][3] +...checksum after hashing g_1296[i][j] : 50E6A342 +index = [1][4] +...checksum after hashing g_1296[i][j] : A828A90D +index = [1][5] +...checksum after hashing g_1296[i][j] : 80D7E45E +index = [1][6] +...checksum after hashing g_1296[i][j] : 59072FEA +index = [1][7] +...checksum after hashing g_1296[i][j] : F661000A +index = [1][8] +...checksum after hashing g_1296[i][j] : 66C132B7 +index = [1][9] +...checksum after hashing g_1296[i][j] : E2A259DC +index = [2][0] +...checksum after hashing g_1296[i][j] : 11C3C10F +index = [2][1] +...checksum after hashing g_1296[i][j] : 1E25D8C8 +index = [2][2] +...checksum after hashing g_1296[i][j] : 1B81CA78 +index = [2][3] +...checksum after hashing g_1296[i][j] : C46FE04E +index = [2][4] +...checksum after hashing g_1296[i][j] : 8D015173 +index = [2][5] +...checksum after hashing g_1296[i][j] : BFA25A35 +index = [2][6] +...checksum after hashing g_1296[i][j] : 9ECE2C7C +index = [2][7] +...checksum after hashing g_1296[i][j] : 73343B3F +index = [2][8] +...checksum after hashing g_1296[i][j] : D314EEEB +index = [2][9] +...checksum after hashing g_1296[i][j] : A0AE53CB +index = [3][0] +...checksum after hashing g_1296[i][j] : E5FD444F +index = [3][1] +...checksum after hashing g_1296[i][j] : 99DA74E6 +index = [3][2] +...checksum after hashing g_1296[i][j] : 6BF65D80 +index = [3][3] +...checksum after hashing g_1296[i][j] : 4F9AEE7E +index = [3][4] +...checksum after hashing g_1296[i][j] : 6415CB88 +index = [3][5] +...checksum after hashing g_1296[i][j] : E9397B3C +index = [3][6] +...checksum after hashing g_1296[i][j] : CAF4E831 +index = [3][7] +...checksum after hashing g_1296[i][j] : C543CED7 +index = [3][8] +...checksum after hashing g_1296[i][j] : 31ACCF8F +index = [3][9] +...checksum after hashing g_1296[i][j] : 4F7DB8AC +index = [4][0] +...checksum after hashing g_1296[i][j] : 7C1BDD81 +index = [4][1] +...checksum after hashing g_1296[i][j] : 7C7D1126 +index = [4][2] +...checksum after hashing g_1296[i][j] : 62818694 +index = [4][3] +...checksum after hashing g_1296[i][j] : 89FA3F2 +index = [4][4] +...checksum after hashing g_1296[i][j] : 2E17FCEE +index = [4][5] +...checksum after hashing g_1296[i][j] : 726FEAFA +index = [4][6] +...checksum after hashing g_1296[i][j] : EE3F3B32 +index = [4][7] +...checksum after hashing g_1296[i][j] : 4C340004 +index = [4][8] +...checksum after hashing g_1296[i][j] : 6A66B607 +index = [4][9] +...checksum after hashing g_1296[i][j] : F11CC21F +index = [5][0] +...checksum after hashing g_1296[i][j] : 7A85151E +index = [5][1] +...checksum after hashing g_1296[i][j] : 43258D +index = [5][2] +...checksum after hashing g_1296[i][j] : C3FF73B6 +index = [5][3] +...checksum after hashing g_1296[i][j] : A1C6B27A +index = [5][4] +...checksum after hashing g_1296[i][j] : DF6D562C +index = [5][5] +...checksum after hashing g_1296[i][j] : 65AE4737 +index = [5][6] +...checksum after hashing g_1296[i][j] : EA8AA012 +index = [5][7] +...checksum after hashing g_1296[i][j] : 839F66CF +index = [5][8] +...checksum after hashing g_1296[i][j] : C158D291 +index = [5][9] +...checksum after hashing g_1296[i][j] : 26287E86 +index = [6][0] +...checksum after hashing g_1296[i][j] : D51408C4 +index = [6][1] +...checksum after hashing g_1296[i][j] : 73674971 +index = [6][2] +...checksum after hashing g_1296[i][j] : 766629CD +index = [6][3] +...checksum after hashing g_1296[i][j] : 675B48D1 +index = [6][4] +...checksum after hashing g_1296[i][j] : 4BBCADFC +index = [6][5] +...checksum after hashing g_1296[i][j] : 952AC19C +index = [6][6] +...checksum after hashing g_1296[i][j] : 770AF677 +index = [6][7] +...checksum after hashing g_1296[i][j] : 526B444E +index = [6][8] +...checksum after hashing g_1296[i][j] : 2E7057BA +index = [6][9] +...checksum after hashing g_1296[i][j] : DB0DDE91 +index = [7][0] +...checksum after hashing g_1296[i][j] : EA5D64C4 +index = [7][1] +...checksum after hashing g_1296[i][j] : A577A244 +index = [7][2] +...checksum after hashing g_1296[i][j] : 31567BAF +index = [7][3] +...checksum after hashing g_1296[i][j] : AEB26F47 +index = [7][4] +...checksum after hashing g_1296[i][j] : 83917150 +index = [7][5] +...checksum after hashing g_1296[i][j] : A391BB18 +index = [7][6] +...checksum after hashing g_1296[i][j] : 84DCD877 +index = [7][7] +...checksum after hashing g_1296[i][j] : 936EEE9B +index = [7][8] +...checksum after hashing g_1296[i][j] : 7A01C0C4 +index = [7][9] +...checksum after hashing g_1380 : C564C6B2 +...checksum after hashing g_1491 : 1EE25272 +...checksum after hashing g_1519 : DCB9C937 +...checksum after hashing g_1520[i] : 68A439C5 +index = [0] +...checksum after hashing g_1520[i] : C26F8FB0 +index = [1] +...checksum after hashing g_1520[i] : 415019CF +index = [2] +...checksum after hashing g_1520[i] : A7FD95E1 +index = [3] +...checksum after hashing g_1520[i] : 5DFF2AE1 +index = [4] +...checksum after hashing g_1520[i] : FCA3EA4C +index = [5] +checksum = fca3ea4c diff --git a/src/tests/csmith/rand81.c b/src/tests/csmith/rand81.c new file mode 100644 index 0000000..2d65037 --- /dev/null +++ b/src/tests/csmith/rand81.c @@ -0,0 +1,87 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static int func_1(void); +static int func_1(void) +{ + int l_2 = 0L; + step_hash(1); + return l_2; +} +void csmith_compute_hash(void) +{ +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand81.expect b/src/tests/csmith/rand81.expect new file mode 100644 index 0000000..0b4e62a --- /dev/null +++ b/src/tests/csmith/rand81.expect @@ -0,0 +1,2 @@ +before stmt(1): checksum = 0 +checksum = 0 diff --git a/src/tests/csmith/rand82.c b/src/tests/csmith/rand82.c new file mode 100644 index 0000000..f894772 --- /dev/null +++ b/src/tests/csmith/rand82.c @@ -0,0 +1,477 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static int g_2 = 0x4FD3DF75L; +static int g_8 = (-1L); +static int *g_7 = &g_8; +static int g_76[6] = {(-1L), (-1L), (-2L), (-1L), (-1L), (-2L)}; +static int g_85 = 0x669DD8B1L; +static unsigned short g_99 = 0xCCADL; +static short g_117 = 0x49DBL; +static int g_157 = 0x5C058660L; +static unsigned short g_163 = 0UL; +static signed char g_181 = 0xD2L; +static short g_188 = 0x93E9L; +static int *g_226 = (void*)0; +static int func_1(void); +static int * func_9(unsigned char p_10, unsigned p_11); +static unsigned short func_25(short p_26); +static short func_29(unsigned char p_30); +static unsigned char func_37(unsigned p_38, unsigned short p_39, unsigned char p_40, int * p_41, unsigned p_42); +static int func_43(short p_44, int * p_45, unsigned char p_46, signed char p_47); +static int func_48(int ** p_49, unsigned p_50, signed char p_51); +static int ** func_52(unsigned p_53, signed char p_54, unsigned char p_55); +static signed char func_57(int p_58, unsigned p_59, unsigned short p_60, int p_61, signed char p_62); +static unsigned func_63(int p_64); +static int func_1(void) +{ + int *l_14[3]; + int l_223 = 9L; + int i; + for (i = 0; i < 3; i++) + l_14[i] = &g_2; + step_hash(95); + for (g_2 = 0; (g_2 == 2); ++g_2) + { + int *l_6[7][1] = {{&g_2}, {&g_2}, {&g_2}, {&g_2}, {&g_2}, {&g_2}, {&g_2}}; + int **l_5[6] = {&l_6[2][0], &l_6[6][0], &l_6[2][0], &l_6[6][0], &l_6[2][0], &l_6[6][0]}; + int i, j; + step_hash(4); + g_7 = &g_2; + step_hash(94); + g_226 = func_9(g_8, ((signed char)((((void*)0 != l_14[2]) < (((((0x7A8CL & (((signed char)((short)(((unsigned char)g_8 << (unsigned char)(1L <= ((signed char)1L << (signed char)((unsigned short)func_25(g_2) % (unsigned short)g_8)))) <= (-7L)) << (short)g_2) >> (signed char)g_8) && g_117)) <= g_8) & g_157) & g_157) > g_2)) | g_2) - (signed char)l_223)); + } + step_hash(96); + return g_76[5]; +} +static int * func_9(unsigned char p_10, unsigned p_11) +{ + int *l_224 = (void*)0; + int *l_225[5] = {&g_8, &g_76[5], &g_8, &g_76[5], &g_8}; + int i; + step_hash(92); + g_85 &= 0L; + step_hash(93); + return l_224; +} +static unsigned short func_25(short p_26) +{ + unsigned char l_31 = 0xEDL; + int *l_198 = &g_2; + unsigned l_199 = 0xAB6FC985L; + int l_207[9]; + int ***l_213 = (void*)0; + int l_217 = 0xCD1AA114L; + int i; + for (i = 0; i < 9; i++) + l_207[i] = 0L; + step_hash(89); + if (((unsigned short)(p_26 & func_29(l_31)) << (unsigned short)((signed char)0xC9L * (signed char)(p_26 && (((unsigned)(~(g_188 > func_57(g_188, g_8, (l_198 == &g_8), p_26, l_199))) + (unsigned)(*l_198)) & g_157))))) + { + int *l_200 = (void*)0; + int *l_201 = &g_76[4]; + int **l_202 = (void*)0; + int **l_203 = &l_200; + step_hash(70); + (*l_201) &= (&g_8 != l_198); + step_hash(71); + (*l_203) = l_201; + } + else + { + int **l_204[8][4] = {{&l_198, &g_7, (void*)0, (void*)0}, {&l_198, &g_7, (void*)0, (void*)0}, {&l_198, &g_7, (void*)0, (void*)0}, {&l_198, &g_7, (void*)0, (void*)0}, {&l_198, &g_7, (void*)0, (void*)0}, {&l_198, &g_7, (void*)0, (void*)0}, {&l_198, &g_7, (void*)0, (void*)0}, {&l_198, &g_7, (void*)0, (void*)0}}; + int ***l_205 = (void*)0; + int ***l_206 = &l_204[0][3]; + int i, j; + step_hash(73); + (*l_206) = l_204[6][1]; + step_hash(88); + if (p_26) + { + unsigned char l_208 = 0x8BL; + step_hash(75); + l_207[4] = 0xCB467415L; + step_hash(76); + return l_208; + } + else + { + int ***l_214[2][5] = {{&l_204[1][0], &l_204[5][0], &l_204[1][0], &l_204[5][0], &l_204[1][0]}, {&l_204[1][0], &l_204[5][0], &l_204[1][0], &l_204[5][0], &l_204[1][0]}}; + int i, j; + step_hash(78); + g_76[5] ^= ((((unsigned char)((p_26 != ((void*)0 == &g_85)) != (0x37L <= p_26)) % (unsigned char)g_181) != 2UL) ^ (func_57((p_26 == ((signed char)(l_213 != l_214[1][3]) * (signed char)g_2)), g_85, p_26, (*l_198), g_117) || p_26)); + step_hash(85); + if (p_26) + { + step_hash(80); + for (l_31 = 0; l_31 < 2; l_31 += 1) + { + for (g_188 = 0; g_188 < 5; g_188 += 1) + { + l_214[l_31][g_188] = &l_204[6][1]; + } + } + } + else + { + unsigned l_218 = 4294967293UL; + step_hash(82); + l_207[4] = ((-3L) <= 3UL); + step_hash(83); + g_85 = ((short)(l_217 != 7L) << (short)2); + step_hash(84); + --l_218; + } + step_hash(86); + g_76[5] ^= ((unsigned short)g_85 / (unsigned short)65535UL); + step_hash(87); + g_76[5] = 0x3612B42AL; + } + } + step_hash(90); + return g_163; +} +static short func_29(unsigned char p_30) +{ + short l_36 = (-10L); + int *l_100 = &g_2; + int *l_104[7][5] = {{&g_76[3], &g_85, &g_76[3], &g_85, (void*)0}, {&g_76[3], &g_85, &g_76[3], &g_85, (void*)0}, {&g_76[3], &g_85, &g_76[3], &g_85, (void*)0}, {&g_76[3], &g_85, &g_76[3], &g_85, (void*)0}, {&g_76[3], &g_85, &g_76[3], &g_85, (void*)0}, {&g_76[3], &g_85, &g_76[3], &g_85, (void*)0}, {&g_76[3], &g_85, &g_76[3], &g_85, (void*)0}}; + int **l_193 = &g_7; + int i, j; + step_hash(25); + g_76[5] = ((signed char)(((unsigned short)((((l_36 || g_8) & func_37(g_8, (func_43(p_30, &g_8, p_30, g_8) & (~p_30)), g_8, l_100, p_30)) ^ g_8) >= (*l_100)) + (unsigned short)p_30) && 0x2BBAL) % (signed char)g_8); + step_hash(66); + for (g_85 = 5; (g_85 >= 0); g_85 -= 1) + { + signed char l_108 = (-5L); + int **l_116[10][4] = {{&g_7, &l_104[1][0], &g_7, (void*)0}, {&g_7, &l_104[1][0], &g_7, (void*)0}, {&g_7, &l_104[1][0], &g_7, (void*)0}, {&g_7, &l_104[1][0], &g_7, (void*)0}, {&g_7, &l_104[1][0], &g_7, (void*)0}, {&g_7, &l_104[1][0], &g_7, (void*)0}, {&g_7, &l_104[1][0], &g_7, (void*)0}, {&g_7, &l_104[1][0], &g_7, (void*)0}, {&g_7, &l_104[1][0], &g_7, (void*)0}, {&g_7, &l_104[1][0], &g_7, (void*)0}}; + int i, j; + step_hash(64); + for (l_36 = 5; (l_36 >= 0); l_36 -= 1) + { + int **l_105 = &l_104[1][0]; + int *l_142 = &g_76[5]; + int l_151[2]; + int l_161 = 0xAF25848BL; + signed char l_186 = 0x43L; + int l_187 = 0x6A6B90CAL; + int l_189 = 0xB6B8FFD3L; + int i; + for (i = 0; i < 2; i++) + l_151[i] = 0x385244D6L; + step_hash(32); + g_7 = &g_76[l_36]; + step_hash(62); + if (((void*)0 != l_105)) + { + unsigned short l_109 = 65530UL; + int **l_129 = &l_104[1][0]; + int l_148[1][1]; + int l_154 = 9L; + int i, j; + for (i = 0; i < 1; i++) + { + for (j = 0; j < 1; j++) + l_148[i][j] = (-9L); + } + step_hash(34); + (*g_7) = p_30; + step_hash(40); + for (p_30 = 11; (p_30 == 34); ++p_30) + { + step_hash(38); + l_109--; + step_hash(39); + g_117 |= ((unsigned short)((short)g_76[4] - (short)g_8) << (unsigned short)(l_116[1][1] != (void*)0)); + } + step_hash(59); + if (((unsigned char)((l_109 > g_2) & ((unsigned short)g_85 * (unsigned short)(&g_7 != (void*)0))) << (unsigned char)7)) + { + unsigned l_122 = 3UL; + int *l_141 = &g_85; + int l_150 = 0x1963C95DL; + int l_152 = 0L; + int l_155 = 0x9DC75A76L; + int l_156 = 0x4C5E673EL; + int l_158 = (-1L); + int l_159 = 7L; + int l_160 = 0x2510918FL; + int l_162 = 0x54D3D32AL; + step_hash(42); + --l_122; + step_hash(49); + if (((unsigned char)func_63(l_122) + (unsigned char)p_30)) + { + unsigned l_132 = 0xF18C2A7CL; + step_hash(44); + (*g_7) = ((unsigned short)(((void*)0 != l_129) >= ((int)l_132 - (int)(((g_117 == p_30) <= (((short)((int)func_57(p_30, ((short)((signed char)p_30 >> (signed char)3) << (short)11), g_85, p_30, p_30) - (int)g_85) / (short)g_99) > g_8)) >= g_85))) % (unsigned short)p_30); + } + else + { + unsigned l_145[2][5]; + int l_149 = 0x3CA084A1L; + int l_153[5]; + int i, j; + for (i = 0; i < 2; i++) + { + for (j = 0; j < 5; j++) + l_145[i][j] = 0x7E6CEEB8L; + } + for (i = 0; i < 5; i++) + l_153[i] = 0x5DACF7CCL; + step_hash(46); + l_142 = l_141; + step_hash(47); + l_148[0][0] = ((((l_141 != (*l_105)) | func_57(p_30, ((unsigned char)(l_145[1][0] > l_145[1][0]) >> (unsigned char)0), l_145[0][2], (*g_7), (g_99 >= ((signed char)func_57(func_57(((*l_141) >= g_117), p_30, g_85, (*g_7), p_30), g_99, g_76[0], (*g_7), p_30) * (signed char)0x41L)))) & g_117) < g_85); + step_hash(48); + ++g_163; + } + } + else + { + unsigned short l_180 = 65535UL; + int l_182 = 0x0DCFB84FL; + int l_183 = 1L; + int l_184 = (-1L); + int l_185[6] = {0L, 0L, (-8L), 0L, 0L, (-8L)}; + unsigned l_190 = 0x6423F066L; + int i; + step_hash(56); + for (l_109 = 0; (l_109 >= 42); l_109 += 4) + { + int l_168 = 0x6BEFEFA7L; + step_hash(54); + (*g_7) = (*g_7); + step_hash(55); + g_181 &= (((*g_7) != (l_168 > (*g_7))) | (((unsigned char)((func_57((((short)(p_30 && ((unsigned)(p_30 == ((short)((((g_117 || g_99) | ((unsigned char)(l_168 != (-(unsigned)((65535UL < g_99) | 4UL))) + (unsigned char)1L)) <= p_30) && (-1L)) / (short)g_163)) + (unsigned)(*l_142))) / (short)p_30) || p_30), g_8, g_85, (*g_7), p_30) == p_30) < l_180) / (unsigned char)p_30) == l_180)); + } + step_hash(57); + if ((*g_7)) + continue; + step_hash(58); + l_190--; + } + } + else + { + step_hash(61); + return g_76[3]; + } + step_hash(63); + if (p_30) + break; + } + step_hash(65); + return g_157; + } + step_hash(67); + (*l_193) = (void*)0; + step_hash(68); + return p_30; +} + + + + + + + +static unsigned char func_37(unsigned p_38, unsigned short p_39, unsigned char p_40, int * p_41, unsigned p_42) +{ + int **l_101 = (void*)0; + int **l_102 = &g_7; + int l_103 = 0x61520CADL; + step_hash(23); + (*l_102) = &g_76[5]; + step_hash(24); + return l_103; +} + + + + + + + +static int func_43(short p_44, int * p_45, unsigned char p_46, signed char p_47) +{ + unsigned l_56 = 3UL; + int *l_98 = (void*)0; + step_hash(20); + g_99 |= func_48(func_52((l_56 < (func_57(l_56, func_63(((unsigned short)(((((l_56 < ((signed char)((signed char)(((unsigned short)(l_56 | (p_46 <= p_47)) * (unsigned short)p_46) | ((void*)0 != p_45)) >> (signed char)6) >> (signed char)l_56)) && p_47) || l_56) | g_8) | l_56) / (unsigned short)p_47)), l_56, l_56, g_2) != 3L)), l_56, g_8), p_46, l_56); + step_hash(21); + return (*g_7); +} + + + + + + + +static int func_48(int ** p_49, unsigned p_50, signed char p_51) +{ + unsigned short l_97 = 4UL; + step_hash(18); + g_76[5] = (~(**p_49)); + step_hash(19); + return l_97; +} + + + + + + + +static int ** func_52(unsigned p_53, signed char p_54, unsigned char p_55) +{ + int *l_81 = (void*)0; + int *l_84 = &g_85; + int *l_86 = &g_76[3]; + int *l_87 = &g_85; + int l_88 = 0x2EA6DA23L; + int *l_89 = &g_76[1]; + int *l_90 = &g_76[5]; + int *l_91 = (void*)0; + int *l_92[7]; + int l_93 = (-1L); + unsigned l_94[3][3] = {{0UL, 0UL, 0x97F7BC9CL}, {0UL, 0UL, 0x97F7BC9CL}, {0UL, 0UL, 0x97F7BC9CL}}; + int i, j; + for (i = 0; i < 7; i++) + l_92[i] = &l_88; + step_hash(14); + (*l_84) |= func_57((*g_7), ((func_63(((&g_76[3] == (void*)0) ^ (g_2 >= (0x25L | ((unsigned char)((((void*)0 != l_81) ^ (((short)(g_2 == g_76[4]) << (short)10) ^ p_54)) >= p_54) % (unsigned char)g_76[1]))))) && 0x03A8461AL) | 1L), g_8, p_53, p_53); + step_hash(15); + l_94[1][1]++; + step_hash(16); + return &g_7; +} + + + + + + + +static signed char func_57(int p_58, unsigned p_59, unsigned short p_60, int p_61, signed char p_62) +{ + step_hash(12); + return p_58; +} + + + + + + + +static unsigned func_63(int p_64) +{ + int *l_75[9] = {(void*)0, (void*)0, &g_76[5], (void*)0, (void*)0, &g_76[5], (void*)0, (void*)0, &g_76[5]}; + int i; + step_hash(9); + g_76[2] ^= ((p_64 & g_2) && (0x6E9B1CC8L ^ 8UL)); + step_hash(10); + return g_8; +} + + +void csmith_compute_hash(void) +{ + int i; + transparent_crc(g_2, "g_2", print_hash_value); + transparent_crc(g_8, "g_8", print_hash_value); + for (i = 0; i < 6; i++) + { + transparent_crc(g_76[i], "g_76[i]", print_hash_value); + if (print_hash_value) printf("index = [%d]\n", i); + + } + transparent_crc(g_85, "g_85", print_hash_value); + transparent_crc(g_99, "g_99", print_hash_value); + transparent_crc(g_117, "g_117", print_hash_value); + transparent_crc(g_157, "g_157", print_hash_value); + transparent_crc(g_163, "g_163", print_hash_value); + transparent_crc(g_181, "g_181", print_hash_value); + transparent_crc(g_188, "g_188", print_hash_value); +} + +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} + + + +int main (void) +{ + int i; + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand82.expect b/src/tests/csmith/rand82.expect new file mode 100644 index 0000000..8b6f2c3 --- /dev/null +++ b/src/tests/csmith/rand82.expect @@ -0,0 +1,66 @@ +...checksum after hashing g_2 : B7063762 +...checksum after hashing g_8 : 4CABB2CB +...checksum after hashing g_76[i] : AAF0D41F +index = [0] +...checksum after hashing g_76[i] : 5FBA8E91 +index = [1] +...checksum after hashing g_76[i] : 4CEA2286 +index = [2] +...checksum after hashing g_76[i] : D7FF924B +index = [3] +...checksum after hashing g_76[i] : C6EEF658 +index = [4] +...checksum after hashing g_76[i] : 4A490952 +index = [5] +...checksum after hashing g_85 : BE490235 +...checksum after hashing g_99 : CFE3C7DA +...checksum after hashing g_117 : CDBF1FD +...checksum after hashing g_157 : 4B0021D5 +...checksum after hashing g_163 : E84F2278 +...checksum after hashing g_181 : E1D5AB61 +...checksum after hashing g_188 : B6B504AB +before stmt(95): checksum = B6B504AB +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_8 : BB99FF8A +...checksum after hashing g_76[i] : 3FB3C61A +index = [0] +...checksum after hashing g_76[i] : 2CF772B0 +index = [1] +...checksum after hashing g_76[i] : 646171A7 +index = [2] +...checksum after hashing g_76[i] : 4C492383 +index = [3] +...checksum after hashing g_76[i] : 64C9E764 +index = [4] +...checksum after hashing g_76[i] : F4DF7AD +index = [5] +...checksum after hashing g_85 : BDCC2A05 +...checksum after hashing g_99 : D66B1597 +...checksum after hashing g_117 : 7C992AC0 +...checksum after hashing g_157 : 5AD787C3 +...checksum after hashing g_163 : E40178C3 +...checksum after hashing g_181 : 2DC1E73C +...checksum after hashing g_188 : 4A2EFEBE +before stmt(96): checksum = 4A2EFEBE +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_8 : BB99FF8A +...checksum after hashing g_76[i] : 3FB3C61A +index = [0] +...checksum after hashing g_76[i] : 2CF772B0 +index = [1] +...checksum after hashing g_76[i] : 646171A7 +index = [2] +...checksum after hashing g_76[i] : 4C492383 +index = [3] +...checksum after hashing g_76[i] : 64C9E764 +index = [4] +...checksum after hashing g_76[i] : F4DF7AD +index = [5] +...checksum after hashing g_85 : BDCC2A05 +...checksum after hashing g_99 : D66B1597 +...checksum after hashing g_117 : 7C992AC0 +...checksum after hashing g_157 : 5AD787C3 +...checksum after hashing g_163 : E40178C3 +...checksum after hashing g_181 : 2DC1E73C +...checksum after hashing g_188 : 4A2EFEBE +checksum = 4a2efebe diff --git a/src/tests/csmith/rand83.c b/src/tests/csmith/rand83.c new file mode 100644 index 0000000..0a15832 --- /dev/null +++ b/src/tests/csmith/rand83.c @@ -0,0 +1,926 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static int g_2 = 0xCEA5D6C0L; +static int g_55 = 0x150040B3L; +static unsigned g_58 = 0x0C1731D4L; +static unsigned short g_63 = 0UL; +static int *g_69 = &g_55; +static int **g_68[1][4] = {{&g_69, &g_69, &g_69, &g_69}}; +static unsigned char g_233 = 6UL; +static int g_254 = 0xD18BA939L; +static unsigned char g_296 = 0x27L; +static unsigned short g_371 = 0x66BFL; +static unsigned g_390 = 4294967295UL; +static unsigned char g_451 = 0x0FL; +static short g_464 = 0x50C6L; +static int g_523 = 0x979AECACL; +static int *g_536 = &g_2; +static unsigned char g_557 = 0x88L; +static int g_597 = (-1L); +static int *g_735 = (void*)0; +static int **g_742 = &g_735; +static int ***g_741 = &g_742; +static short func_1(void); +static unsigned func_15(int * p_16, int * p_17, int * p_18); +static int * func_19(int * p_20, short p_21); +static int func_23(int p_24, int * p_25, int * p_26, int p_27, int * p_28); +static int * func_30(int * p_31, unsigned p_32, int * p_33, signed char p_34); +static int * func_35(signed char p_36); +static short func_41(int p_42, int * p_43, int * p_44, int * p_45); +static unsigned func_46(int p_47, int * p_48, unsigned p_49, int * p_50, unsigned char p_51); +static int * func_52(signed char p_53); +static int func_81(unsigned p_82, unsigned short p_83); +static short func_1(void) +{ + unsigned char l_5 = 0xE0L; + int *l_6 = &g_2; + signed char l_611 = 0x3BL; + unsigned l_621 = 1UL; + unsigned char l_627 = 0x7EL; + int *l_652 = &g_55; + int l_677 = 0x2DBC67DBL; + unsigned char l_682[2][6] = {{0x67L, 0xF1L, 0x36L, 0x36L, 0xF1L, 0x67L}, {0x67L, 0xF1L, 0x36L, 0x36L, 0xF1L, 0x67L}}; + signed char l_728 = 0x6DL; + int i, j; + step_hash(5); + for (g_2 = 17; (g_2 <= (-12)); g_2 -= 9) + { + step_hash(4); + if (l_5) + break; + } + step_hash(6); + (*l_6) = g_2; + step_hash(7); + (*l_6) = 0x6F5A9C4CL; + step_hash(423); + for (g_2 = 0; (g_2 > (-9)); g_2 -= 3) + { + int *l_22 = &g_2; + int l_612 = 0x83309D80L; + unsigned char l_624 = 0x9FL; + unsigned l_658 = 0x24B654D5L; + int l_675 = 0L; + int l_679 = 0x90ACB52BL; + } + step_hash(424); + return g_63; +} +static unsigned func_15(int * p_16, int * p_17, int * p_18) +{ + signed char l_598 = 0x27L; + int *l_599 = (void*)0; + int *l_600 = &g_523; + step_hash(319); + l_600 = l_599; + step_hash(320); + return l_598; +} +static int * func_19(int * p_20, short p_21) +{ + int l_29 = (-1L); + int **l_587[2]; + int *l_595[5] = {&l_29, (void*)0, &l_29, (void*)0, &l_29}; + int l_596 = 0xD7F3CA26L; + int i; + for (i = 0; i < 2; i++) + l_587[i] = &g_69; + step_hash(315); + if (func_23(l_29, p_20, &g_2, l_29, func_30(func_35(((short)0xB653L * (short)(((signed char)g_2 + (signed char)l_29) | (0xED1D25BBL | (((func_41(p_21, &l_29, &l_29, &l_29) || 0x2F3AL) < p_21) && l_29))))), l_29, p_20, p_21))) + { + unsigned l_588 = 0xE8829AA2L; + step_hash(312); + l_588 |= (l_587[1] != (void*)0); + } + else + { + step_hash(314); + return p_20; + } + step_hash(316); + g_597 = (!((4294967295UL && (p_21 >= (((signed char)(((((unsigned short)((func_23(p_21, p_20, p_20, p_21, l_595[0]) > l_596) == g_58) >> (unsigned short)p_21) >= p_21) | p_21) ^ p_21) % (signed char)g_254) == g_254))) != g_2)); + step_hash(317); + return p_20; +} +static int func_23(int p_24, int * p_25, int * p_26, int p_27, int * p_28) +{ + int l_575 = 0x11F8DB44L; + int *l_576 = &g_55; + unsigned char l_580[3][3] = {{251UL, 5UL, 251UL}, {251UL, 5UL, 251UL}, {251UL, 5UL, 251UL}}; + int ***l_584[4][7] = {{&g_68[0][1], &g_68[0][2], (void*)0, &g_68[0][2], &g_68[0][1], &g_68[0][2], &g_68[0][1]}, {&g_68[0][1], &g_68[0][2], (void*)0, &g_68[0][2], &g_68[0][1], &g_68[0][2], &g_68[0][1]}, {&g_68[0][1], &g_68[0][2], (void*)0, &g_68[0][2], &g_68[0][1], &g_68[0][2], &g_68[0][1]}, {&g_68[0][1], &g_68[0][2], (void*)0, &g_68[0][2], &g_68[0][1], &g_68[0][2], &g_68[0][1]}}; + int i, j; + step_hash(301); + (*l_576) = (l_575 | (*p_25)); + step_hash(308); + for (g_390 = 0; (g_390 != 2); g_390 += 1) + { + int *l_579[8][3] = {{&g_2, &g_55, &g_2}, {&g_2, &g_55, &g_2}, {&g_2, &g_55, &g_2}, {&g_2, &g_55, &g_2}, {&g_2, &g_55, &g_2}, {&g_2, &g_55, &g_2}, {&g_2, &g_55, &g_2}, {&g_2, &g_55, &g_2}}; + signed char l_581 = (-8L); + int i, j; + step_hash(305); + (*l_576) = ((void*)0 != l_579[0][0]); + step_hash(306); + (*l_576) = l_580[0][0]; + step_hash(307); + if (l_581) + continue; + } + step_hash(309); + p_28 = p_28; + step_hash(310); + return (*l_576); +} + + + + + + + +static int * func_30(int * p_31, unsigned p_32, int * p_33, signed char p_34) +{ + int **l_266 = (void*)0; + int l_289[4]; + unsigned short l_333 = 0x57E0L; + int *l_430[10][5] = {{(void*)0, &g_2, &g_55, &g_2, (void*)0}, {(void*)0, &g_2, &g_55, &g_2, (void*)0}, {(void*)0, &g_2, &g_55, &g_2, (void*)0}, {(void*)0, &g_2, &g_55, &g_2, (void*)0}, {(void*)0, &g_2, &g_55, &g_2, (void*)0}, {(void*)0, &g_2, &g_55, &g_2, (void*)0}, {(void*)0, &g_2, &g_55, &g_2, (void*)0}, {(void*)0, &g_2, &g_55, &g_2, (void*)0}, {(void*)0, &g_2, &g_55, &g_2, (void*)0}, {(void*)0, &g_2, &g_55, &g_2, (void*)0}}; + unsigned l_452 = 0xB1D8BA16L; + int l_486 = (-1L); + unsigned l_510 = 0xFD554E02L; + int i, j; + for (i = 0; i < 4; i++) + l_289[i] = 1L; + step_hash(298); + if ((*p_33)) + { + int *l_267[1]; + unsigned l_278 = 0x6556C072L; + int *l_306 = (void*)0; + int l_457 = 0x218FCF2CL; + int i; + for (i = 0; i < 1; i++) + l_267[i] = &g_2; + step_hash(173); + if (((signed char)(+(&g_69 != &g_69)) * (signed char)(((p_34 && ((unsigned char)248UL * (unsigned char)(0xDCL > (&p_31 != l_266)))) != ((*p_33) <= (*p_33))) >= g_58))) + { + unsigned l_275[2]; + int l_287 = 0xE435E4F5L; + int l_288 = 0x1E13063FL; + int l_352 = 0x6B0EA0F8L; + int l_354 = (-6L); + int l_355 = 0xB4221DD1L; + int l_356 = 0L; + int l_357 = 0x2D9FF996L; + int l_358 = (-1L); + int i; + for (i = 0; i < 2; i++) + l_275[i] = 0xE2523DFDL; + step_hash(121); + for (g_58 = 17; (g_58 == 26); g_58++) + { + unsigned l_272 = 0x4324CCB7L; + step_hash(120); + l_272 = (((void*)0 != &g_68[0][1]) != (g_254 ^ (((signed char)p_34 << (signed char)6) < p_32))); + } + step_hash(160); + if ((((unsigned short)l_275[1] - (unsigned short)((unsigned short)(~l_278) - (unsigned short)(((l_275[1] > (((*p_31) & (((unsigned)((*p_31) >= ((&p_31 != &p_31) ^ 0x8844D54AL)) + (unsigned)((int)(((unsigned char)(l_275[1] > 7L) << (unsigned char)0) <= (*p_31)) % (int)(*p_31))) <= (*p_33))) >= g_2)) || 0x2C3C9639L) ^ 0UL))) & 65535UL)) + { + unsigned l_301 = 0xEE3AD7C6L; + int l_319[5] = {0L, 0x776AFE39L, 0L, 0x776AFE39L, 0L}; + int i; + step_hash(143); + for (g_58 = (-13); (g_58 == 45); ++g_58) + { + unsigned l_293[2][7] = {{0x3C9033E0L, 4294967287UL, 4294967295UL, 4294967295UL, 4294967287UL, 0x3C9033E0L, 4294967287UL}, {0x3C9033E0L, 4294967287UL, 4294967295UL, 4294967295UL, 4294967287UL, 0x3C9033E0L, 4294967287UL}}; + int i, j; + step_hash(130); + for (l_278 = 0; (l_278 <= 0); l_278 += 1) + { + int l_290 = 0x4AADFF80L; + int l_291 = 0L; + int l_292 = 0xF1200FA1L; + int i; + step_hash(129); + l_293[0][3]--; + } + step_hash(131); + g_296++; + step_hash(137); + for (g_233 = (-24); (g_233 < 3); g_233 += 2) + { + step_hash(135); + --l_301; + step_hash(136); + l_288 = ((unsigned short)func_46(g_58, l_267[0], g_233, l_306, g_2) >> (unsigned short)0); + } + step_hash(142); + for (g_55 = 0; (g_55 <= 0); g_55 += 1) + { + step_hash(141); + return p_31; + } + } + step_hash(144); + l_319[1] |= (l_301 && ((short)(-7L) + (short)((short)((unsigned char)((((unsigned short)((short)l_288 << (short)g_296) << (unsigned short)7) ^ l_301) != l_288) - (unsigned char)0UL) >> (short)((short)(p_33 == l_306) << (short)5)))); + } + else + { + int ***l_320 = &g_68[0][1]; + int l_323 = 0xD02CCC27L; + int l_329 = (-10L); + int l_331 = (-1L); + int l_350 = 0x51002C15L; + int l_351 = 0x860C1E19L; + int l_353[9] = {0xA733B53FL, 0x741FB120L, 0xA733B53FL, 0x741FB120L, 0xA733B53FL, 0x741FB120L, 0xA733B53FL, 0x741FB120L, 0xA733B53FL}; + unsigned l_359[8]; + int i; + for (i = 0; i < 8; i++) + l_359[i] = 0xA6C449CCL; + step_hash(146); + (*l_320) = &g_69; + step_hash(158); + for (g_233 = 0; (g_233 >= 49); g_233 += 4) + { + int l_324 = 0xEABC095BL; + int l_328 = 0x374E9201L; + short l_330 = (-1L); + unsigned char l_336 = 1UL; + step_hash(155); + for (g_55 = 0; (g_55 <= 0); g_55 += 1) + { + int l_325 = 0x6B19C9D3L; + int l_326 = 0xC1D3C510L; + int l_327 = 2L; + int l_332 = 0L; + int i, j; + step_hash(153); + p_31 = p_31; + step_hash(154); + l_333++; + } + step_hash(156); + l_288 ^= (l_336 > ((unsigned short)g_55 * (unsigned short)(((short)l_331 / (short)l_336) || ((short)((unsigned short)(((5UL || (*p_33)) <= ((signed char)(g_2 <= g_296) % (signed char)g_58)) == p_34) >> (unsigned short)p_32) * (short)p_34)))); + step_hash(157); + l_287 &= ((signed char)(g_2 ^ l_275[1]) / (signed char)g_2); + } + step_hash(159); + l_359[1]--; + } + step_hash(161); + l_289[2] ^= (l_267[0] != p_33); + } + else + { + unsigned l_365 = 0xF80A26F1L; + int *l_374 = &l_289[2]; + step_hash(170); + if ((*p_31)) + { + signed char l_364 = 0x49L; + unsigned short l_366 = 65526UL; + step_hash(164); + l_289[2] &= (((short)l_364 * (short)(g_254 && g_2)) & ((g_58 | g_58) < g_63)); + step_hash(165); + l_365 |= (p_32 < g_2); + step_hash(166); + l_289[2] ^= l_366; + step_hash(167); + g_371 ^= ((unsigned char)(((short)p_34 % (short)func_81(g_296, p_34)) & l_364) / (unsigned char)0x1AL); + } + else + { + step_hash(169); + l_289[2] = ((0xB7L | g_63) <= (((signed char)l_365 << (signed char)6) >= ((void*)0 == &g_69))); + } + step_hash(171); + p_33 = func_52(p_34); + step_hash(172); + (*l_374) = ((void*)0 != l_374); + } + step_hash(180); + for (l_278 = 0; (l_278 > 49); l_278++) + { + unsigned short l_387 = 4UL; + int *l_389 = &l_289[2]; + step_hash(177); + l_289[1] = ((signed char)(((unsigned char)func_81(g_2, (func_81(p_32, p_32) > (((unsigned)((g_2 > (g_296 > p_32)) < p_34) + (unsigned)(1UL < g_371)) == 0x8DE38532L))) << (unsigned char)7) <= p_32) << (signed char)g_254); + step_hash(178); + if ((*p_31)) + break; + step_hash(179); + g_390 ^= (l_387 & func_46(func_81((-(signed char)g_55), p_32), &g_2, ((((0xEBL & (~p_34)) || g_233) == (p_32 && p_32)) != p_34), l_389, p_34)); + } + step_hash(214); + for (g_296 = (-25); (g_296 > 37); g_296 += 8) + { + int l_395[9]; + int **l_396 = &l_306; + int *l_467[1][9] = {{&g_2, &l_395[3], &g_2, &l_395[3], &g_2, &l_395[3], &g_2, &l_395[3], &g_2}}; + int i, j; + for (i = 0; i < 9; i++) + l_395[i] = 0x2EEC62A9L; + step_hash(184); + (*l_396) = func_52(((unsigned)p_34 - (unsigned)l_395[6])); + step_hash(213); + for (p_32 = 0; (p_32 <= 0); p_32 += 1) + { + unsigned l_421 = 0UL; + int l_458 = 0L; + signed char l_465[3]; + int i; + for (i = 0; i < 3; i++) + l_465[i] = 0xC2L; + step_hash(188); + l_395[2] ^= (*p_31); + step_hash(212); + if (((unsigned short)((unsigned char)p_32 / (unsigned char)((signed char)(-6L) * (signed char)(((unsigned char)((unsigned)(p_31 == p_31) - (unsigned)(g_296 != (p_34 < p_34))) + (unsigned char)(p_32 | ((signed char)p_32 % (signed char)1UL))) == g_2))) >> (unsigned short)1)) + { + unsigned l_415 = 0x5F4CEE84L; + int l_416 = 0x6539C225L; + int ***l_436 = &l_396; + step_hash(190); + l_416 = ((unsigned short)((signed char)((unsigned char)g_233 >> (unsigned char)7) / (signed char)l_415) << (unsigned short)9); + step_hash(191); + if ((*p_31)) + continue; + step_hash(198); + for (g_371 = 0; (g_371 <= 0); g_371 += 1) + { + unsigned l_437 = 0x98BFE0FBL; + int *l_438[3]; + int i; + for (i = 0; i < 3; i++) + l_438[i] = &l_416; + step_hash(195); + l_416 ^= (((((short)((int)l_421 - (int)(0xB7L < (((short)(-1L) * (short)1UL) > ((short)((unsigned short)g_390 + (unsigned short)g_254) >> (short)p_34)))) - (short)p_32) != l_421) | g_58) > p_34); + step_hash(196); + g_451 |= ((int)((short)((((short)g_390 + (short)(!(&g_69 != (void*)0))) | 0xB8167B32L) > p_32) * (short)(0UL < func_81(g_58, ((unsigned char)(((short)(((unsigned char)(&p_31 != &l_267[0]) >> (unsigned char)p_32) == p_34) * (short)0UL) & l_421) * (unsigned char)g_63)))) / (int)g_254); + step_hash(197); + l_452--; + } + } + else + { + unsigned short l_463 = 1UL; + int *l_466 = &l_289[0]; + step_hash(204); + for (l_452 = 24; (l_452 != 58); l_452++) + { + step_hash(203); + l_458 = l_457; + } + step_hash(205); + if ((*p_31)) + continue; + step_hash(211); + if (((((unsigned short)g_58 << (unsigned short)(g_254 ^ (((-6L) <= (&g_69 != &p_31)) < (func_46((l_421 != p_34), p_31, l_463, (*l_396), g_464) == g_254)))) ^ l_421) && l_465[1])) + { + step_hash(207); + (*l_396) = func_52((g_58 && p_34)); + step_hash(208); + (*l_396) = p_31; + } + else + { + step_hash(210); + return p_31; + } + } + } + } + } + else + { + unsigned l_468 = 0x4FB7707CL; + int l_469 = 0x20E71E96L; + int l_487 = 0x6018D809L; + int l_493 = (-1L); + int l_494 = 0x14195862L; + unsigned char l_531 = 250UL; + int l_532[2][6] = {{0x3C9E2092L, 0x3C9E2092L, 0xB6441281L, 0x3C9E2092L, 0x3C9E2092L, 0xB6441281L}, {0x3C9E2092L, 0x3C9E2092L, 0xB6441281L, 0x3C9E2092L, 0x3C9E2092L, 0xB6441281L}}; + signed char l_551 = 6L; + int *l_555 = &l_289[2]; + int i, j; + step_hash(216); + l_469 = (func_81(g_390, p_34) < ((g_296 <= 7L) >= l_468)); + step_hash(270); + if ((p_32 ^ ((unsigned char)p_34 << (unsigned char)1))) + { + int *l_472[3]; + int i; + for (i = 0; i < 3; i++) + l_472[i] = (void*)0; + step_hash(218); + p_31 = l_472[0]; + step_hash(219); + l_487 ^= ((int)((unsigned)g_451 + (unsigned)((short)9L - (short)(((g_233 & g_390) ^ (p_32 >= ((-(signed char)p_32) == ((unsigned char)((signed char)(0x984CL && p_32) * (signed char)(((int)(l_468 <= g_254) % (int)l_469) == g_390)) % (unsigned char)l_468)))) < (*p_33)))) % (int)l_486); + step_hash(230); + for (g_464 = 14; (g_464 >= 11); g_464--) + { + int *l_490[8]; + unsigned char l_496 = 0x19L; + int i; + for (i = 0; i < 8; i++) + l_490[i] = &l_487; + step_hash(228); + if (l_468) + { + int **l_491 = &l_490[5]; + int l_492 = (-1L); + int l_495[9] = {0x3DF5D265L, 0L, 0x3DF5D265L, 0L, 0x3DF5D265L, 0L, 0x3DF5D265L, 0L, 0x3DF5D265L}; + int i; + step_hash(224); + (*l_491) = l_490[4]; + step_hash(225); + --l_496; + } + else + { + int l_511 = 1L; + step_hash(227); + l_511 = (((unsigned short)((short)(((short)g_63 - (short)((int)l_493 - (int)((unsigned char)(0x95DBL != (g_371 | (-(unsigned)l_510))) * (unsigned char)p_34))) != g_464) - (short)((&l_472[0] != &l_490[4]) < p_34)) * (unsigned short)l_511) && g_390); + } + step_hash(229); + return p_31; + } + } + else + { + int *l_533 = &g_523; + step_hash(236); + for (g_58 = 0; (g_58 <= 51); g_58++) + { + step_hash(235); + l_487 ^= (-10L); + } + step_hash(269); + for (l_493 = (-15); (l_493 >= (-7)); ++l_493) + { + unsigned l_520[2][6] = {{0UL, 0xAF0F9DC9L, 0UL, 0xAF0F9DC9L, 0UL, 0xAF0F9DC9L}, {0UL, 0xAF0F9DC9L, 0UL, 0xAF0F9DC9L, 0UL, 0xAF0F9DC9L}}; + int ***l_530 = &l_266; + int i, j; + step_hash(256); + if (((unsigned char)((p_31 != p_33) || g_371) + (unsigned char)((unsigned char)(l_493 > 0L) + (unsigned char)p_32))) + { + unsigned short l_550 = 0x1084L; + int l_552 = 0xF086F0F9L; + step_hash(247); + if ((func_81(g_233, ((int)0x517E33AEL - (int)((void*)0 == &l_266))) != p_32)) + { + int **l_537 = &g_536; + step_hash(242); + (*l_537) = g_536; + step_hash(243); + (*l_533) = ((unsigned)(p_34 | ((int)0x91E29988L + (int)p_32)) % (unsigned)p_34); + } + else + { + step_hash(245); + l_551 = ((unsigned char)((unsigned short)p_32 + (unsigned short)((signed char)((((unsigned short)(l_531 & (-1L)) << (unsigned short)14) | g_254) < ((*p_31) > ((((*g_536) & (((l_550 != p_34) ^ g_254) | p_34)) | p_32) <= 0xD0C783F7L))) * (signed char)(-6L))) << (unsigned char)7); + step_hash(246); + l_552 &= 0x9B3E6EBEL; + } + step_hash(253); + for (l_551 = 0; (l_551 == 15); l_551++) + { + step_hash(251); + if ((*p_31)) + break; + step_hash(252); + return l_533; + } + } + else + { + step_hash(255); + return p_33; + } + step_hash(267); + for (g_390 = 0; (g_390 <= 1); g_390 += 1) + { + int l_556 = 1L; + int i, j; + step_hash(260); + l_555 = func_35(l_520[g_390][(g_390 + 2)]); + step_hash(261); + --g_557; + step_hash(266); + for (g_371 = 0; (g_371 <= 1); g_371 += 1) + { + step_hash(265); + if ((*p_31)) + break; + } + } + step_hash(268); + return p_31; + } + } + step_hash(271); + (*l_555) = 0x017F7B86L; + step_hash(297); + for (g_55 = 0; (g_55 <= 3); g_55 += 1) + { + signed char l_560[7] = {(-2L), (-2L), 0xE1L, (-2L), (-2L), 0xE1L, (-2L)}; + int i; + step_hash(275); + l_289[g_55] = l_560[3]; + step_hash(296); + for (g_296 = 0; (g_296 <= 0); g_296 += 1) + { + int *l_563 = &l_289[g_55]; + } + } + } + step_hash(299); + return p_33; +} + + + + + + + +static int * func_35(signed char p_36) +{ + int *l_75 = &g_55; + int *l_76 = &g_55; + int *l_77[5] = {&g_55, (void*)0, &g_55, (void*)0, &g_55}; + unsigned char l_78[4][6] = {{0xB9L, 0xBFL, 0xE5L, 0xE0L, 255UL, 0UL}, {0xB9L, 0xBFL, 0xE5L, 0xE0L, 255UL, 0UL}, {0xB9L, 0xBFL, 0xE5L, 0xE0L, 255UL, 0UL}, {0xB9L, 0xBFL, 0xE5L, 0xE0L, 255UL, 0UL}}; + int l_86 = 0xCE1F6DC3L; + int *l_87 = &g_55; + unsigned l_88 = 3UL; + int ***l_169[1][5]; + int l_208 = 9L; + short l_224 = 0x7442L; + int *l_250 = &l_208; + int l_255 = 0x78E3D2E3L; + unsigned short l_256 = 65535UL; + int *l_259 = &g_2; + int i, j; + for (i = 0; i < 1; i++) + { + for (j = 0; j < 5; j++) + l_169[i][j] = &g_68[0][3]; + } + step_hash(30); + --l_78[0][2]; + step_hash(111); + if (func_81(p_36, ((int)l_88 - (int)0xD85E2616L))) + { + int l_135 = (-1L); + step_hash(55); + (*l_76) = ((short)(((short)l_135 * (short)((*l_87) && (0xFB12L && l_135))) != 4UL) << (short)6); + step_hash(56); + (*l_87) ^= l_135; + } + else + { + short l_154 = 0x023DL; + int *l_162 = &g_2; + unsigned char l_165 = 0x2CL; + int l_200[7][9] = {{0x07BAAA9AL, 0xA83723A6L, 0x5CB3DCC7L, 0x5CB3DCC7L, 0xA83723A6L, 0x07BAAA9AL, 0x6CB78A07L, 0xC93F04C9L, 0L}, {0x07BAAA9AL, 0xA83723A6L, 0x5CB3DCC7L, 0x5CB3DCC7L, 0xA83723A6L, 0x07BAAA9AL, 0x6CB78A07L, 0xC93F04C9L, 0L}, {0x07BAAA9AL, 0xA83723A6L, 0x5CB3DCC7L, 0x5CB3DCC7L, 0xA83723A6L, 0x07BAAA9AL, 0x6CB78A07L, 0xC93F04C9L, 0L}, {0x07BAAA9AL, 0xA83723A6L, 0x5CB3DCC7L, 0x5CB3DCC7L, 0xA83723A6L, 0x07BAAA9AL, 0x6CB78A07L, 0xC93F04C9L, 0L}, {0x07BAAA9AL, 0xA83723A6L, 0x5CB3DCC7L, 0x5CB3DCC7L, 0xA83723A6L, 0x07BAAA9AL, 0x6CB78A07L, 0xC93F04C9L, 0L}, {0x07BAAA9AL, 0xA83723A6L, 0x5CB3DCC7L, 0x5CB3DCC7L, 0xA83723A6L, 0x07BAAA9AL, 0x6CB78A07L, 0xC93F04C9L, 0L}, {0x07BAAA9AL, 0xA83723A6L, 0x5CB3DCC7L, 0x5CB3DCC7L, 0xA83723A6L, 0x07BAAA9AL, 0x6CB78A07L, 0xC93F04C9L, 0L}}; + unsigned l_219 = 4294967295UL; + int i, j; + step_hash(58); + (*l_87) |= p_36; + step_hash(91); + for (g_58 = 8; (g_58 < 60); g_58 += 6) + { + int *l_140 = &g_55; + int l_163 = (-10L); + int l_164 = (-1L); + int l_210 = (-1L); + int l_216 = 0x48CB3587L; + int l_218 = (-1L); + step_hash(90); + for (l_86 = 28; (l_86 > (-3)); l_86--) + { + int **l_141 = &g_69; + int *l_189 = &l_164; + int l_205 = 0L; + int l_212 = 0xE747D80AL; + int l_214[9] = {4L, 4L, 0x781C0EB3L, 4L, 4L, 0x781C0EB3L, 4L, 4L, 0x781C0EB3L}; + int i; + step_hash(65); + (*l_141) = l_140; + step_hash(89); + if (((signed char)((unsigned short)(((unsigned char)((unsigned char)p_36 + (unsigned char)(&l_141 != (void*)0)) % (unsigned char)((+((((unsigned char)g_58 % (unsigned char)p_36) && (((unsigned char)g_63 >> (unsigned char)l_154) | ((unsigned char)p_36 * (unsigned char)(((p_36 | 0x75085CE8L) <= 0xDCBEL) >= p_36)))) || g_58)) & g_63)) && p_36) >> (unsigned short)0) + (signed char)(*l_76))) + { + int l_159[1]; + int *l_168 = &l_163; + int i; + for (i = 0; i < 1; i++) + l_159[i] = 0x1652FD55L; + step_hash(67); + l_164 |= ((short)(0xB4L && ((*l_75) || func_46(l_159[0], (*l_141), ((unsigned char)p_36 / (unsigned char)0xCAL), l_162, (**l_141)))) * (short)l_163); + step_hash(68); + if (l_165) + continue; + step_hash(74); + for (p_36 = (-5); (p_36 <= 5); p_36++) + { + step_hash(72); + (*l_141) = l_168; + step_hash(73); + (*l_87) ^= (&g_68[0][1] == l_169[0][3]); + } + } + else + { + unsigned short l_178[2]; + int *l_179 = &l_164; + unsigned short l_188 = 0UL; + int l_206 = 0xCD24EA2AL; + int l_213 = 0x433CC307L; + int l_215 = (-8L); + int l_217 = 1L; + int i; + for (i = 0; i < 2; i++) + l_178[i] = 0x24B6L; + step_hash(76); + (*l_179) ^= ((signed char)g_63 - (signed char)((int)((5UL >= ((int)(*l_162) + (int)((short)l_178[1] * (short)g_58))) < ((l_179 != (*l_141)) | (-1L))) - (int)((short)((int)((unsigned short)(((unsigned char)p_36 * (unsigned char)1UL) | 0UL) / (unsigned short)g_2) / (int)p_36) << (short)5))); + step_hash(87); + if (((l_188 && p_36) ^ ((*l_162) > p_36))) + { + step_hash(78); + (*l_141) = (void*)0; + step_hash(79); + if ((*l_179)) + continue; + step_hash(80); + (*l_141) = l_189; + step_hash(81); + (*l_140) = (((signed char)(((*l_162) != ((signed char)(0x0CB6L | (!(func_46(p_36, &l_163, (*l_140), &l_164, ((unsigned short)(p_36 == (~((**l_141) <= ((int)((signed char)g_55 << (signed char)p_36) + (int)(*l_140))))) * (unsigned short)p_36)) > p_36))) + (signed char)0x6BL)) < 0xC788L) >> (signed char)p_36) != p_36); + } + else + { + unsigned l_201 = 0xB116D794L; + int *l_204 = &l_200[4][0]; + int l_207 = 0x3EBDBDEAL; + int l_209 = 0L; + int l_211[2][9] = {{0L, 0L, (-1L), 5L, 0x8155E1EFL, 5L, (-1L), 0L, 0L}, {0L, 0L, (-1L), 5L, 0x8155E1EFL, 5L, (-1L), 0L, 0L}}; + int i, j; + step_hash(83); + l_201--; + step_hash(84); + if (p_36) + break; + step_hash(85); + (*l_141) = l_204; + step_hash(86); + --l_219; + } + step_hash(88); + (*l_75) = ((signed char)0L << (signed char)0); + } + } + } + step_hash(92); + l_224 &= (*l_76); + step_hash(110); + for (l_165 = 0; (l_165 != 55); l_165 += 3) + { + unsigned short l_227[10][8] = {{0x27ABL, 65532UL, 0xB929L, 0xC41AL, 0x8773L, 0x96D3L, 0x27ABL, 4UL}, {0x27ABL, 65532UL, 0xB929L, 0xC41AL, 0x8773L, 0x96D3L, 0x27ABL, 4UL}, {0x27ABL, 65532UL, 0xB929L, 0xC41AL, 0x8773L, 0x96D3L, 0x27ABL, 4UL}, {0x27ABL, 65532UL, 0xB929L, 0xC41AL, 0x8773L, 0x96D3L, 0x27ABL, 4UL}, {0x27ABL, 65532UL, 0xB929L, 0xC41AL, 0x8773L, 0x96D3L, 0x27ABL, 4UL}, {0x27ABL, 65532UL, 0xB929L, 0xC41AL, 0x8773L, 0x96D3L, 0x27ABL, 4UL}, {0x27ABL, 65532UL, 0xB929L, 0xC41AL, 0x8773L, 0x96D3L, 0x27ABL, 4UL}, {0x27ABL, 65532UL, 0xB929L, 0xC41AL, 0x8773L, 0x96D3L, 0x27ABL, 4UL}, {0x27ABL, 65532UL, 0xB929L, 0xC41AL, 0x8773L, 0x96D3L, 0x27ABL, 4UL}, {0x27ABL, 65532UL, 0xB929L, 0xC41AL, 0x8773L, 0x96D3L, 0x27ABL, 4UL}}; + int l_230 = 1L; + int i, j; + step_hash(96); + l_227[1][5]++; + step_hash(97); + l_230 = (-1L); + step_hash(109); + for (l_154 = 0; (l_154 <= (-4)); l_154 -= 3) + { + unsigned l_248 = 3UL; + int *l_249 = &l_230; + step_hash(101); + l_162 = func_52((g_58 && ((p_36 <= g_2) <= (g_2 == 1UL)))); + step_hash(102); + g_233++; + step_hash(103); + (*l_75) |= ((unsigned short)p_36 << (unsigned short)l_230); + step_hash(108); + for (p_36 = (-21); (p_36 != (-30)); p_36 -= 8) + { + int *l_253 = (void*)0; + step_hash(107); + l_253 = l_249; + } + } + } + } + step_hash(112); + l_256++; + step_hash(113); + return l_259; +} + + + + + + + +static short func_41(int p_42, int * p_43, int * p_44, int * p_45) +{ + int l_71 = 4L; + signed char l_74 = 0xC4L; + step_hash(21); + (*g_69) = (func_46(g_2, &g_2, (0x01C8L > (0x9751L | g_2)), func_52(p_42), p_42) ^ l_71); + step_hash(22); + (*g_69) ^= (*p_45); + step_hash(27); + for (g_63 = (-21); (g_63 <= 40); g_63++) + { + step_hash(26); + return g_58; + } + step_hash(28); + return l_74; +} + + + + + + + +static unsigned func_46(int p_47, int * p_48, unsigned p_49, int * p_50, unsigned char p_51) +{ + int *l_61 = &g_55; + int *l_62 = (void*)0; + int ***l_70 = &g_68[0][0]; + step_hash(17); + ++g_63; + step_hash(18); + (*l_61) = ((short)g_63 >> (short)7); + step_hash(19); + (*l_70) = g_68[0][1]; + step_hash(20); + return p_51; +} + + + + + + + +static int * func_52(signed char p_53) +{ + int *l_54 = &g_55; + int *l_56 = &g_55; + int *l_57[4][5] = {{&g_55, &g_55, &g_2, &g_55, &g_55}, {&g_55, &g_55, &g_2, &g_55, &g_55}, {&g_55, &g_55, &g_2, &g_55, &g_55}, {&g_55, &g_55, &g_2, &g_55, &g_55}}; + int i, j; + step_hash(14); + g_58++; + step_hash(15); + return l_57[2][2]; +} + + + + + + + +static int func_81(unsigned p_82, unsigned short p_83) +{ + int l_105 = 0xDC0990E4L; + int l_117 = 0xB19369D4L; + int **l_122 = &g_69; + step_hash(52); + for (p_82 = (-26); (p_82 == 27); ++p_82) + { + unsigned l_91 = 4294967292UL; + int **l_92 = &g_69; + int *l_116 = &g_55; + step_hash(35); + (*l_92) = func_52(l_91); + step_hash(36); + l_117 |= ((short)(((int)((((unsigned short)((signed char)func_46(((unsigned short)(((unsigned short)(p_83 == 1L) * (unsigned short)(-8L)) == g_2) + (unsigned short)p_83), (*l_92), l_105, (*l_92), p_82) * (signed char)g_2) / (unsigned short)l_105) != (-1L)) < l_105) - (int)0x9B5B590BL) | p_82) >> (short)15); + step_hash(51); + for (l_105 = 27; (l_105 != (-10)); l_105 -= 8) + { + int **l_123 = &g_69; + int *l_124 = &l_117; + step_hash(40); + (*l_124) |= func_46(((((unsigned char)((l_122 != l_123) | (g_58 >= (g_58 ^ func_46(p_83, (*l_122), func_46(g_55, (*l_122), p_82, (*l_123), g_55), (*l_123), g_2)))) * (unsigned char)p_83) >= 0UL) == g_58), (*l_92), g_58, &g_2, g_2); + step_hash(41); + (*l_124) = ((((void*)0 != l_122) ^ ((((((short)0x4060L * (short)p_83) < (g_63 <= ((void*)0 == &l_92))) == g_58) & p_83) != 0xCDL)) | p_82); + step_hash(50); + for (g_58 = 0; (g_58 <= 0); g_58 += 1) + { + step_hash(49); + for (g_55 = 0; (g_55 <= 0); g_55 += 1) + { + int i, j; + step_hash(48); + (*l_124) &= (((short)((void*)0 != (*l_122)) * (short)g_55) >= g_2); + } + } + } + } + step_hash(53); + return p_82; +} + + +void csmith_compute_hash(void) +{ + int i, j; + transparent_crc(g_2, "g_2", print_hash_value); + transparent_crc(g_55, "g_55", print_hash_value); + transparent_crc(g_58, "g_58", print_hash_value); + transparent_crc(g_63, "g_63", print_hash_value); + transparent_crc(g_233, "g_233", print_hash_value); + transparent_crc(g_254, "g_254", print_hash_value); + transparent_crc(g_296, "g_296", print_hash_value); + transparent_crc(g_371, "g_371", print_hash_value); + transparent_crc(g_390, "g_390", print_hash_value); + transparent_crc(g_451, "g_451", print_hash_value); + transparent_crc(g_464, "g_464", print_hash_value); + transparent_crc(g_523, "g_523", print_hash_value); + transparent_crc(g_557, "g_557", print_hash_value); + transparent_crc(g_597, "g_597", print_hash_value); +} + +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} + + + +int main (void) +{ + int i, j; + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand83.expect b/src/tests/csmith/rand83.expect new file mode 100644 index 0000000..36c5b1a --- /dev/null +++ b/src/tests/csmith/rand83.expect @@ -0,0 +1,90 @@ +...checksum after hashing g_2 : 71A1DF83 +...checksum after hashing g_55 : DAE3F099 +...checksum after hashing g_58 : C737F0D3 +...checksum after hashing g_63 : 35664D9C +...checksum after hashing g_233 : EEEFC84D +...checksum after hashing g_254 : 3BFBCA5E +...checksum after hashing g_296 : ED08F2CE +...checksum after hashing g_371 : 1EBF1C04 +...checksum after hashing g_390 : FCF3BDA8 +...checksum after hashing g_451 : B7E49FAA +...checksum after hashing g_464 : A550561D +...checksum after hashing g_523 : B581E361 +...checksum after hashing g_557 : B804515E +...checksum after hashing g_597 : 18853D53 +before stmt(5): checksum = 18853D53 +...checksum after hashing g_2 : C9E1EFE6 +...checksum after hashing g_55 : C7B36683 +...checksum after hashing g_58 : D8B0B2E7 +...checksum after hashing g_63 : C0FB78BD +...checksum after hashing g_233 : DDF9D5A9 +...checksum after hashing g_254 : D550F8D3 +...checksum after hashing g_296 : DF95078B +...checksum after hashing g_371 : D42A0E7 +...checksum after hashing g_390 : D1D18A24 +...checksum after hashing g_451 : D3227F69 +...checksum after hashing g_464 : BF3512DC +...checksum after hashing g_523 : E90B2986 +...checksum after hashing g_557 : CC255657 +...checksum after hashing g_597 : BB35C49A +before stmt(6): checksum = BB35C49A +...checksum after hashing g_2 : C9E1EFE6 +...checksum after hashing g_55 : C7B36683 +...checksum after hashing g_58 : D8B0B2E7 +...checksum after hashing g_63 : C0FB78BD +...checksum after hashing g_233 : DDF9D5A9 +...checksum after hashing g_254 : D550F8D3 +...checksum after hashing g_296 : DF95078B +...checksum after hashing g_371 : D42A0E7 +...checksum after hashing g_390 : D1D18A24 +...checksum after hashing g_451 : D3227F69 +...checksum after hashing g_464 : BF3512DC +...checksum after hashing g_523 : E90B2986 +...checksum after hashing g_557 : CC255657 +...checksum after hashing g_597 : BB35C49A +before stmt(7): checksum = BB35C49A +...checksum after hashing g_2 : 99D6B01A +...checksum after hashing g_55 : 978F57D1 +...checksum after hashing g_58 : 8485D262 +...checksum after hashing g_63 : 92472AFD +...checksum after hashing g_233 : E4C0A626 +...checksum after hashing g_254 : 675C8D05 +...checksum after hashing g_296 : 74AD6D9 +...checksum after hashing g_371 : 6EA5BBFF +...checksum after hashing g_390 : 918BEC0C +...checksum after hashing g_451 : CC76BB64 +...checksum after hashing g_464 : 88266138 +...checksum after hashing g_523 : 3FF3CD7D +...checksum after hashing g_557 : 807CA3D9 +...checksum after hashing g_597 : 11AF5F0F +before stmt(423): checksum = 11AF5F0F +...checksum after hashing g_2 : 3A4BD710 +...checksum after hashing g_55 : 3E9A6C15 +...checksum after hashing g_58 : CD2B5C1A +...checksum after hashing g_63 : E8E3FC57 +...checksum after hashing g_233 : 35A9F70A +...checksum after hashing g_254 : A52DEBA8 +...checksum after hashing g_296 : B75F4BB8 +...checksum after hashing g_371 : E42055A2 +...checksum after hashing g_390 : 4009C0E9 +...checksum after hashing g_451 : E4E1AD61 +...checksum after hashing g_464 : ACE6FAEF +...checksum after hashing g_523 : 82CF28D3 +...checksum after hashing g_557 : 44C2696A +...checksum after hashing g_597 : 641F2872 +before stmt(424): checksum = 641F2872 +...checksum after hashing g_2 : 3A4BD710 +...checksum after hashing g_55 : 3E9A6C15 +...checksum after hashing g_58 : CD2B5C1A +...checksum after hashing g_63 : E8E3FC57 +...checksum after hashing g_233 : 35A9F70A +...checksum after hashing g_254 : A52DEBA8 +...checksum after hashing g_296 : B75F4BB8 +...checksum after hashing g_371 : E42055A2 +...checksum after hashing g_390 : 4009C0E9 +...checksum after hashing g_451 : E4E1AD61 +...checksum after hashing g_464 : ACE6FAEF +...checksum after hashing g_523 : 82CF28D3 +...checksum after hashing g_557 : 44C2696A +...checksum after hashing g_597 : 641F2872 +checksum = 641f2872 diff --git a/src/tests/csmith/rand84.c b/src/tests/csmith/rand84.c new file mode 100644 index 0000000..1d3baa6 --- /dev/null +++ b/src/tests/csmith/rand84.c @@ -0,0 +1,2611 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static signed char g_2[5] = {0x17L, 0x17L, 0x17L, 0x17L, 0x17L}; +static int g_3 = 0x3245F1DBL; +static int g_26 = 0xD6A56C37L; +static int *g_25 = &g_26; +static unsigned short g_140 = 0xF30DL; +static int g_154 = 0x5DDDEB7DL; +static signed char g_184[9] = {0xB7L, 0xB7L, 1L, 0xB7L, 0xB7L, 1L, 0xB7L, 0xB7L, 1L}; +static int ***g_193 = (void*)0; +static unsigned g_199 = 0UL; +static signed char g_210 = (-1L); +static unsigned char g_211 = 0x1BL; +static short g_225 = (-2L); +static short g_226 = (-1L); +static short g_228 = 0x4E76L; +static short g_230 = 0L; +static int g_232 = 0xB7EFDFD4L; +static signed char g_244 = 0x85L; +static unsigned g_249 = 0x41AC932FL; +static int *g_292 = &g_26; +static unsigned char g_328 = 0xA2L; +static short g_337[8][4] = {{(-6L), (-6L), 0x03CDL, (-6L)}, {(-6L), (-6L), 0x03CDL, (-6L)}, {(-6L), (-6L), 0x03CDL, (-6L)}, {(-6L), (-6L), 0x03CDL, (-6L)}, {(-6L), (-6L), 0x03CDL, (-6L)}, {(-6L), (-6L), 0x03CDL, (-6L)}, {(-6L), (-6L), 0x03CDL, (-6L)}, {(-6L), (-6L), 0x03CDL, (-6L)}}; +static short g_338[7] = {0L, 0L, 0xCEE1L, 0L, 0L, 0xCEE1L, 0L}; +static short g_339 = 0x824DL; +static unsigned char g_340[2] = {251UL, 251UL}; +static unsigned g_355 = 0x7B961AA7L; +static int g_396[9][6] = {{9L, (-1L), 9L, 1L, (-1L), 1L}, {9L, (-1L), 9L, 1L, (-1L), 1L}, {9L, (-1L), 9L, 1L, (-1L), 1L}, {9L, (-1L), 9L, 1L, (-1L), 1L}, {9L, (-1L), 9L, 1L, (-1L), 1L}, {9L, (-1L), 9L, 1L, (-1L), 1L}, {9L, (-1L), 9L, 1L, (-1L), 1L}, {9L, (-1L), 9L, 1L, (-1L), 1L}, {9L, (-1L), 9L, 1L, (-1L), 1L}}; +static unsigned char g_397 = 1UL; +static signed char g_422 = 0L; +static unsigned char g_423[9][1] = {{0UL}, {0UL}, {0UL}, {0UL}, {0UL}, {0UL}, {0UL}, {0UL}, {0UL}}; +static unsigned short g_429 = 6UL; +static unsigned short g_444 = 0x2E8AL; +static unsigned short g_503 = 1UL; +static int g_524 = 0x61CFE555L; +static unsigned short g_534 = 0xFC48L; +static int g_543 = 0x3DDEC6CEL; +static unsigned g_545 = 0UL; +static unsigned g_548 = 5UL; +static unsigned g_577 = 0x4205539CL; +static int g_594[3][10] = {{6L, 0xBEB9D53DL, 6L, 0xBEB9D53DL, 6L, 0xBEB9D53DL, 6L, 0xBEB9D53DL, 6L, 0xBEB9D53DL}, {6L, 0xBEB9D53DL, 6L, 0xBEB9D53DL, 6L, 0xBEB9D53DL, 6L, 0xBEB9D53DL, 6L, 0xBEB9D53DL}, {6L, 0xBEB9D53DL, 6L, 0xBEB9D53DL, 6L, 0xBEB9D53DL, 6L, 0xBEB9D53DL, 6L, 0xBEB9D53DL}}; +static unsigned g_595 = 0x3237DB2EL; +static unsigned short g_883[9][1] = {{0x9A7EL}, {0x9A7EL}, {0x9A7EL}, {0x9A7EL}, {0x9A7EL}, {0x9A7EL}, {0x9A7EL}, {0x9A7EL}, {0x9A7EL}}; +static int g_1024[8] = {0x913B9430L, 0x913B9430L, 0x913B9430L, 0x913B9430L, 0x913B9430L, 0x913B9430L, 0x913B9430L, 0x913B9430L}; +static signed char g_1083 = (-1L); +static unsigned short g_1196 = 65535UL; +static int *g_1357 = &g_232; +static int *g_1434 = &g_154; +static int g_1451 = 2L; +static unsigned char g_1531 = 0x61L; +static unsigned g_1534 = 0x6B1B78B5L; +static int g_1538 = (-1L); +static signed char g_1543 = 1L; +static int g_1584 = 0xE0C975B9L; +static int g_1649 = 0x953350D8L; +static unsigned g_1695 = 4294967295UL; +static unsigned short func_1(void); +static signed char func_6(unsigned short p_7, int p_8, int p_9, signed char p_10); +static unsigned short func_20(unsigned short p_21); +static int * func_27(int ** p_28, int ** p_29); +static int ** func_30(unsigned short p_31, int * p_32, unsigned p_33, unsigned char p_34); +static int func_39(unsigned p_40, int * p_41); +static int * func_42(unsigned p_43, unsigned char p_44); +static short func_51(unsigned p_52, short p_53, int p_54, int p_55, int ** p_56); +static short func_57(int p_58, unsigned p_59, int * p_60, short p_61, int p_62); +static int func_67(unsigned p_68, int * p_69, int ** p_70, unsigned char p_71); +static unsigned short func_1(void) +{ + short l_22 = 0x41A6L; + int *l_1615 = &g_154; + unsigned short l_1618 = 9UL; + int l_1623 = 0x1F760722L; + int l_1624 = 1L; + int l_1625 = 0xD1AB473CL; + int l_1628 = 3L; + int l_1634 = (-9L); + short l_1700[2]; + int l_1709 = (-1L); + unsigned l_1714 = 0xFA50C062L; + signed char l_1721 = 0x45L; + int i; + for (i = 0; i < 2; i++) + l_1700[i] = 0xA852L; + step_hash(1031); + if (g_2[3]) + { + step_hash(2); + return g_2[2]; + } + else + { + short l_19[3]; + int **l_1597 = &g_1434; + int l_1611 = 0L; + int l_1622 = 0x8F1291B4L; + int l_1626 = 0x007BDE43L; + int l_1632 = 0xB7560AB5L; + int l_1633[9] = {(-1L), 1L, (-1L), 1L, (-1L), 1L, (-1L), 1L, (-1L)}; + unsigned l_1688 = 0xE7966B75L; + unsigned l_1710 = 6UL; + int i; + for (i = 0; i < 3; i++) + l_19[i] = 0xE912L; + step_hash(979); + for (g_3 = 4; (g_3 >= 0); g_3 -= 1) + { + unsigned l_1570 = 0xC1E8DC0DL; + unsigned l_1571[1][5] = {{0xE55C3634L, 1UL, 0xE55C3634L, 1UL, 0xE55C3634L}}; + int **l_1596 = &g_25; + int ***l_1595 = &l_1596; + short l_1610 = 1L; + int l_1630 = 0x51AA23C9L; + int l_1631 = (-4L); + int l_1656 = (-5L); + int *l_1660 = &l_1622; + int *l_1661 = &l_1656; + int *l_1662 = &l_1630; + int *l_1663 = &l_1633[3]; + int *l_1664[5][2] = {{&l_1625, &g_3}, {&l_1625, &g_3}, {&l_1625, &g_3}, {&l_1625, &g_3}, {&l_1625, &g_3}}; + unsigned l_1665 = 6UL; + int i, j; + } + step_hash(1029); + for (g_444 = 0; (g_444 <= 8); g_444 += 1) + { + unsigned short l_1672[4][10] = {{65532UL, 0x747CL, 65535UL, 0UL, 0xCD56L, 65531UL, 0xCD56L, 0UL, 65535UL, 0x747CL}, {65532UL, 0x747CL, 65535UL, 0UL, 0xCD56L, 65531UL, 0xCD56L, 0UL, 65535UL, 0x747CL}, {65532UL, 0x747CL, 65535UL, 0UL, 0xCD56L, 65531UL, 0xCD56L, 0UL, 65535UL, 0x747CL}, {65532UL, 0x747CL, 65535UL, 0UL, 0xCD56L, 65531UL, 0xCD56L, 0UL, 65535UL, 0x747CL}}; + int l_1687 = 3L; + int l_1691[6][3] = {{0x67150A1DL, (-1L), 0x67150A1DL}, {0x67150A1DL, (-1L), 0x67150A1DL}, {0x67150A1DL, (-1L), 0x67150A1DL}, {0x67150A1DL, (-1L), 0x67150A1DL}, {0x67150A1DL, (-1L), 0x67150A1DL}, {0x67150A1DL, (-1L), 0x67150A1DL}}; + int i, j; + step_hash(1016); + for (l_1622 = 0; (l_1622 <= 0); l_1622 += 1) + { + int i, j; + } + step_hash(1021); + for (g_140 = 0; (g_140 <= 0); g_140 += 1) + { + step_hash(1020); + (*g_1357) = (g_534 ^ g_230); + } + step_hash(1022); + (*g_25) = (g_1695 < ((short)g_1531 << (short)(!((g_193 == (void*)0) & (**l_1597))))); + step_hash(1023); + (*g_292) |= (!0x44EA343CL); + step_hash(1028); + for (g_232 = 0; (g_232 >= 0); g_232 -= 1) + { + signed char l_1711 = 9L; + step_hash(1027); + (**l_1597) &= ((unsigned short)l_1700[0] << (unsigned short)((!l_1691[4][0]) && l_1672[0][8])); + } + } + step_hash(1030); + l_1624 |= func_51(((((signed char)func_67((&l_1625 == &g_154), (*l_1597), l_1597, ((g_1024[5] ^ (g_340[1] < g_2[0])) > ((void*)0 != &l_1634))) * (signed char)g_1534) && l_1714) != (*l_1615)), (**l_1597), (*g_1357), g_337[3][0], l_1597); + } + step_hash(1041); + for (g_595 = 0; (g_595 < 7); ++g_595) + { + signed char l_1723 = (-1L); + int l_1724 = 1L; + step_hash(1039); + for (l_1624 = (-10); (l_1624 == (-9)); l_1624++) + { + int *l_1719 = &l_1628; + int l_1720 = 0x982DA191L; + int *l_1722[2]; + unsigned short l_1725 = 5UL; + int i; + for (i = 0; i < 2; i++) + l_1722[i] = (void*)0; + step_hash(1038); + l_1725++; + } + step_hash(1040); + return (*l_1615); + } + step_hash(1042); + return (*l_1615); +} +static signed char func_6(unsigned short p_7, int p_8, int p_9, signed char p_10) +{ + int *l_1572 = &g_154; + int *l_1573 = (void*)0; + int *l_1574 = &g_26; + int *l_1575 = &g_232; + int *l_1576 = &g_232; + int *l_1577 = (void*)0; + int *l_1578 = &g_26; + int l_1579 = 0x0242E28EL; + int *l_1580 = &g_232; + int *l_1581 = (void*)0; + int *l_1582 = &g_232; + int *l_1583[1][5] = {{&g_26, &g_1451, &g_26, &g_1451, &g_26}}; + unsigned short l_1585 = 1UL; + int **l_1588 = &l_1582; + int i, j; + step_hash(937); + l_1585--; + step_hash(938); + (*l_1588) = &p_8; + step_hash(939); + return g_184[7]; +} +static unsigned short func_20(unsigned short p_21) +{ + int *l_23 = &g_3; + int **l_24[9][7] = {{&l_23, &l_23, &l_23, &l_23, &l_23, &l_23, &l_23}, {&l_23, &l_23, &l_23, &l_23, &l_23, &l_23, &l_23}, {&l_23, &l_23, &l_23, &l_23, &l_23, &l_23, &l_23}, {&l_23, &l_23, &l_23, &l_23, &l_23, &l_23, &l_23}, {&l_23, &l_23, &l_23, &l_23, &l_23, &l_23, &l_23}, {&l_23, &l_23, &l_23, &l_23, &l_23, &l_23, &l_23}, {&l_23, &l_23, &l_23, &l_23, &l_23, &l_23, &l_23}, {&l_23, &l_23, &l_23, &l_23, &l_23, &l_23, &l_23}, {&l_23, &l_23, &l_23, &l_23, &l_23, &l_23, &l_23}}; + signed char l_91 = (-8L); + int l_549[1][4]; + int l_550 = 0x0EA5A63EL; + unsigned l_1025 = 0x8EFCA73AL; + unsigned short l_1026 = 65530UL; + int *l_1526[7]; + int *l_1528 = (void*)0; + int i, j; + for (i = 0; i < 1; i++) + { + for (j = 0; j < 4; j++) + l_549[i][j] = (-6L); + } + for (i = 0; i < 7; i++) + l_1526[i] = (void*)0; + step_hash(8); + g_25 = l_23; + step_hash(901); + l_1526[2] = func_27(&l_23, func_30((*l_23), &g_26, ((int)(((short)(func_39(p_21, func_42(((int)(((short)((signed char)((func_51((*l_23), func_57((((unsigned short)((void*)0 == &g_3) >> (unsigned short)11) < ((((unsigned char)(0x4E023024L && func_67(p_21, &g_3, &g_25, g_2[3])) >> (unsigned char)4) <= (*l_23)) >= g_2[3])), l_91, &g_3, (*l_23), (*g_25)), p_21, g_338[2], &l_23) >= g_548) | l_549[0][0]) + (signed char)p_21) % (short)0xB658L) && 0x8FL) / (int)p_21), l_550)) <= p_21) << (short)8) > l_1025) / (int)g_184[6]), l_1026)); + step_hash(934); + for (g_226 = 1; (g_226 <= 5); g_226 += 1) + { + int *l_1527[6][1]; + int l_1529 = (-2L); + int l_1530 = 0x6FC280A2L; + int ***l_1563 = &l_24[3][0]; + int i, j; + for (i = 0; i < 6; i++) + { + for (j = 0; j < 1; j++) + l_1527[i][j] = &g_26; + } + step_hash(905); + g_292 = l_1527[4][0]; + step_hash(906); + l_1528 = func_42(g_595, p_21); + step_hash(907); + --g_1531; + step_hash(908); + g_1534 ^= 0xD39955C9L; + step_hash(933); + for (g_444 = 0; (g_444 <= 0); g_444 += 1) + { + int *l_1548 = &g_594[0][9]; + int i, j; + step_hash(929); + if (g_396[(g_444 + 6)][(g_444 + 3)]) + { + int i, j; + step_hash(913); + return g_396[(g_444 + 4)][g_226]; + } + else + { + int **l_1549 = &l_1526[2]; + step_hash(928); + if (func_39((((~0UL) != 0x4BL) < (-(short)(~((((signed char)g_1538 % (signed char)0xF4L) & (g_1024[1] != (0x07A3L == ((unsigned char)p_21 << (unsigned char)5)))) <= (p_21 > g_423[3][0]))))), &l_1529)) + { + unsigned l_1550 = 4294967295UL; + int l_1551 = 0xEFFFD444L; + int **l_1560 = &l_23; + step_hash(916); + if ((*g_292)) + break; + step_hash(917); + l_1551 &= (((unsigned)(g_1543 || 0x4957L) % (unsigned)g_232) <= ((unsigned char)255UL / (unsigned char)((unsigned char)p_21 / (unsigned char)p_21))); + step_hash(918); + (*l_1548) = p_21; + step_hash(925); + if (((*g_1357) >= p_21)) + { + step_hash(920); + (*l_1549) = &g_26; + step_hash(921); + (*g_292) = (l_1548 == l_1548); + } + else + { + step_hash(923); + (*l_1560) = (*l_1560); + step_hash(924); + if (p_21) + continue; + } + } + else + { + step_hash(927); + (*l_1548) &= ((signed char)0x19L - (signed char)(&l_23 != (void*)0)); + } + } + step_hash(930); + (*l_1548) = (l_1548 == (void*)0); + step_hash(931); + (*l_1548) &= (p_21 != (g_1024[3] > ((void*)0 != l_1563))); + step_hash(932); + l_1548 = &g_26; + } + } + step_hash(935); + return p_21; +} +static int * func_27(int ** p_28, int ** p_29) +{ + unsigned l_1436 = 0x3432664CL; + int *l_1471[5]; + unsigned l_1485 = 0x6742CDC3L; + int i; + for (i = 0; i < 5; i++) + l_1471[i] = &g_26; + step_hash(824); + l_1436++; + step_hash(899); + if (l_1436) + { + int *l_1439 = &g_3; + step_hash(849); + for (g_328 = 0; (g_328 <= 0); g_328 += 1) + { + unsigned l_1443 = 2UL; + int **l_1455 = &g_292; + step_hash(829); + g_1357 = l_1439; + step_hash(848); + for (g_1083 = 1; (g_1083 >= 0); g_1083 -= 1) + { + int l_1444 = 1L; + int ***l_1477 = &l_1455; + step_hash(847); + for (g_339 = 0; (g_339 >= 0); g_339 -= 1) + { + unsigned l_1452 = 1UL; + int **l_1472 = &l_1439; + int i; + step_hash(843); + if (g_340[g_339]) + { + int *l_1440 = &g_154; + int i; + step_hash(837); + l_1440 = func_42(g_340[g_1083], g_1196); + step_hash(838); + l_1452 = (g_444 | (((!((unsigned short)l_1443 / (unsigned short)0xEEEBL)) & (*l_1440)) ^ (*l_1439))); + step_hash(839); + (*l_1440) |= (g_184[7] == ((short)((+((((void*)0 != p_28) > l_1444) || (*g_1357))) >= g_244) / (short)0xACF4L)); + } + else + { + int *l_1458 = &g_594[2][3]; + step_hash(841); + (*l_1458) = (((unsigned char)0UL + (unsigned char)g_883[5][0]) & 0x59EBL); + step_hash(842); + (*p_28) = func_42(g_3, l_1444); + } + step_hash(844); + if ((*g_1357)) + break; + step_hash(845); + g_594[2][5] ^= ((signed char)((unsigned short)g_340[1] + (unsigned short)((unsigned short)((unsigned char)((signed char)(((unsigned char)l_1436 % (unsigned char)l_1444) == (**l_1472)) % (signed char)((p_28 == p_28) ^ 5UL)) >> (unsigned char)(*l_1439)) / (unsigned short)(*l_1439))) * (signed char)g_423[5][0]); + step_hash(846); + g_154 = ((unsigned char)(**l_1472) - (unsigned char)(((unsigned)(&p_29 != l_1477) - (unsigned)(**p_28)) && g_184[8])); + } + } + } + step_hash(850); + g_594[0][9] = (*l_1439); + } + else + { + short l_1482 = 0L; + int **l_1483[3]; + int l_1484 = 7L; + int ***l_1498 = &l_1483[0]; + int *l_1508 = &g_26; + int i; + for (i = 0; i < 3; i++) + l_1483[i] = &l_1471[2]; + step_hash(852); + (*p_28) = (*p_28); + step_hash(853); + (*g_1357) = ((unsigned short)l_1484 << (unsigned short)1); + step_hash(854); + ++l_1485; + step_hash(898); + for (g_232 = (-21); (g_232 < 28); g_232 += 4) + { + signed char l_1499 = 0x4FL; + int **l_1505[2]; + int l_1518 = 0x8008F891L; + int i; + for (i = 0; i < 2; i++) + l_1505[i] = (void*)0; + step_hash(888); + if (l_1499) + { + unsigned short l_1506[7][2] = {{0UL, 0x5B8DL}, {0UL, 0x5B8DL}, {0UL, 0x5B8DL}, {0UL, 0x5B8DL}, {0UL, 0x5B8DL}, {0UL, 0x5B8DL}, {0UL, 0x5B8DL}}; + int l_1507 = 0x3C7F1D90L; + int i, j; + step_hash(878); + for (l_1436 = 0; (l_1436 != 34); l_1436++) + { + step_hash(867); + for (g_225 = 0; (g_225 > (-26)); g_225 -= 5) + { + int *l_1504 = &g_3; + step_hash(865); + (*p_28) = (**l_1498); + step_hash(866); + return l_1504; + } + step_hash(868); + (***l_1498) ^= (l_1505[1] != (void*)0); + step_hash(869); + if (l_1506[0][0]) + continue; + step_hash(877); + for (g_422 = 2; (g_422 >= 0); g_422 -= 1) + { + int i; + step_hash(873); + l_1507 |= (&l_1483[g_422] != &p_29); + step_hash(874); + if ((***l_1498)) + continue; + step_hash(875); + if ((*g_1357)) + break; + step_hash(876); + l_1507 |= 0x49BDF297L; + } + } + step_hash(879); + (*p_28) = &g_154; + step_hash(880); + if ((*g_1357)) + continue; + step_hash(885); + for (l_1436 = 0; (l_1436 <= 1); l_1436 += 1) + { + step_hash(884); + return l_1508; + } + } + else + { + unsigned l_1509[4][6]; + int i, j; + for (i = 0; i < 4; i++) + { + for (j = 0; j < 6; j++) + l_1509[i][j] = 0xB9049EE8L; + } + step_hash(887); + ++l_1509[2][3]; + } + step_hash(897); + for (g_534 = 0; (g_534 < 10); g_534 += 9) + { + int **l_1521 = (void*)0; + int **l_1525 = &g_25; + step_hash(896); + for (g_444 = 1; (g_444 > 23); g_444 += 8) + { + unsigned short l_1523 = 0x4824L; + int l_1524[4]; + int i; + for (i = 0; i < 4; i++) + l_1524[i] = 0L; + step_hash(895); + (***l_1498) = ((signed char)(g_337[3][0] || (&p_29 == &p_29)) + (signed char)g_328); + } + } + } + } + step_hash(900); + return l_1471[2]; +} + + + + + + + +static int ** func_30(unsigned short p_31, int * p_32, unsigned p_33, unsigned char p_34) +{ + int l_1029 = 0x6729AA0AL; + int **l_1030 = (void*)0; + unsigned char l_1033 = 0xA8L; + int l_1052 = (-1L); + unsigned short l_1062 = 0x32F2L; + int l_1079[1]; + unsigned l_1107 = 4294967292UL; + int **l_1190 = &g_25; + int l_1242 = 5L; + unsigned l_1262 = 1UL; + int *l_1273 = &g_3; + int *l_1274 = &g_154; + int **l_1362 = &l_1274; + unsigned short l_1370 = 0x04DDL; + int l_1417 = 0xD329EBB8L; + int **l_1435 = (void*)0; + int i; + for (i = 0; i < 1; i++) + l_1079[i] = 5L; + step_hash(820); + if (((unsigned short)(l_1029 > (((void*)0 == l_1030) || p_31)) / (unsigned short)g_337[3][0])) + { + int l_1049 = 1L; + int **l_1073[3][9] = {{&g_25, &g_292, &g_25, &g_292, &g_292, (void*)0, &g_292, &g_292, (void*)0}, {&g_25, &g_292, &g_25, &g_292, &g_292, (void*)0, &g_292, &g_292, (void*)0}, {&g_25, &g_292, &g_25, &g_292, &g_292, (void*)0, &g_292, &g_292, (void*)0}}; + int *l_1078 = &g_594[1][7]; + unsigned l_1085 = 0x289AD366L; + int i, j; + step_hash(643); + for (l_1029 = 0; (l_1029 >= 0); l_1029 -= 1) + { + unsigned char l_1038 = 0xC8L; + int **l_1053 = &g_292; + int l_1080[9] = {0x37C6B1A2L, 0xB1AF1425L, 0x37C6B1A2L, 0xB1AF1425L, 0x37C6B1A2L, 0xB1AF1425L, 0x37C6B1A2L, 0xB1AF1425L, 0x37C6B1A2L}; + unsigned l_1103 = 8UL; + int i; + step_hash(605); + (**l_1053) = ((short)(g_328 <= (((unsigned char)255UL / (unsigned char)p_31) != p_31)) / (short)0x48B3L); + step_hash(606); + (*p_32) &= ((void*)0 == &l_1053); + step_hash(607); + (**l_1053) = (p_32 != p_32); + step_hash(642); + for (p_34 = 0; (p_34 <= 0); p_34 += 1) + { + int *l_1054 = &g_3; + short l_1058[5]; + int *l_1076 = &g_232; + int ***l_1100 = (void*)0; + int i, j; + for (i = 0; i < 5; i++) + l_1058[i] = 0x1D6CL; + step_hash(611); + (**l_1053) = (0UL ^ 4UL); + step_hash(639); + if ((g_883[(l_1029 + 2)][l_1029] > (0x2281L != p_34))) + { + unsigned l_1055 = 9UL; + int *l_1061 = &g_154; + int l_1081 = 0x7BA8F649L; + step_hash(613); + (*l_1061) = ((p_33 != l_1055) > ((unsigned short)((g_184[7] | p_34) > (*l_1061)) * (unsigned short)0xF7CFL)); + step_hash(621); + if ((*l_1054)) + { + signed char l_1077 = 0xA3L; + int l_1082 = 1L; + int l_1084 = 0xB80A7EEDL; + step_hash(615); + (*p_32) = ((unsigned)((short)((unsigned)g_422 / (unsigned)((unsigned char)((signed char)((-1L) || (g_1024[1] || (**l_1053))) * (signed char)p_31) / (unsigned char)5L)) * (short)g_199) - (unsigned)g_230); + step_hash(616); + --l_1085; + step_hash(617); + (*l_1053) = l_1054; + } + else + { + step_hash(619); + (*p_32) = (&p_32 != &p_32); + step_hash(620); + return l_1053; + } + step_hash(626); + for (g_249 = 13; (g_249 != 58); g_249 += 4) + { + step_hash(625); + return l_1030; + } + step_hash(634); + for (g_534 = 0; (g_534 <= 0); g_534 += 1) + { + int *l_1093 = &l_1080[6]; + int i, j; + step_hash(630); + if (g_396[(g_534 + 8)][(l_1029 + 4)]) + break; + step_hash(631); + l_1093 = func_42((0x7840B109L >= (-(signed char)(**l_1053))), ((unsigned char)p_34 << (unsigned char)4)); + step_hash(632); + l_1103 = ((int)((short)((int)(*l_1061) / (int)((signed char)((void*)0 == &g_25) * (signed char)0xEAL)) << (short)1) + (int)g_337[5][3]); + step_hash(633); + l_1073[l_1029][(l_1029 + 1)] = &p_32; + } + } + else + { + int ***l_1106 = &l_1073[2][2]; + step_hash(636); + (**l_1053) = (((signed char)l_1062 % (signed char)0xBFL) || (*l_1076)); + step_hash(637); + (*l_1106) = &p_32; + step_hash(638); + ++l_1107; + } + step_hash(640); + for (l_1103 = 0; l_1103 < 3; l_1103 += 1) + { + for (g_429 = 0; g_429 < 10; g_429 += 1) + { + g_594[l_1103][g_429] = 0xA992F5E7L; + } + } + step_hash(641); + (*l_1053) = func_42(((short)p_34 / (short)(p_34 & ((signed char)p_34 / (signed char)(*l_1054)))), p_33); + } + } + } + else + { + int *l_1133 = &g_154; + int l_1179 = 1L; + short l_1191 = 0xA021L; + int l_1195 = 0x3F256AA6L; + unsigned char l_1211 = 0x0DL; + signed char l_1226 = 0xE7L; + int l_1232[8] = {(-1L), (-4L), (-1L), (-4L), (-1L), (-4L), (-1L), (-4L)}; + int l_1239[5][8] = {{0x4BCD9F93L, 6L, 1L, 0xABB36AE7L, 0L, 0xB3994CD8L, 0L, 0xABB36AE7L}, {0x4BCD9F93L, 6L, 1L, 0xABB36AE7L, 0L, 0xB3994CD8L, 0L, 0xABB36AE7L}, {0x4BCD9F93L, 6L, 1L, 0xABB36AE7L, 0L, 0xB3994CD8L, 0L, 0xABB36AE7L}, {0x4BCD9F93L, 6L, 1L, 0xABB36AE7L, 0L, 0xB3994CD8L, 0L, 0xABB36AE7L}, {0x4BCD9F93L, 6L, 1L, 0xABB36AE7L, 0L, 0xB3994CD8L, 0L, 0xABB36AE7L}}; + int l_1257 = 0x1883B8B8L; + short l_1296 = 0xADBBL; + int *l_1367 = &g_594[0][9]; + unsigned l_1368[7] = {0xF56B1555L, 0xF56B1555L, 0x513D8D3DL, 0xF56B1555L, 0xF56B1555L, 0x513D8D3DL, 0xF56B1555L}; + int i, j; + step_hash(704); + if ((0xABAFL != p_31)) + { + unsigned char l_1119 = 0xF1L; + int **l_1134 = &g_292; + int *l_1171 = &g_154; + int l_1180[8] = {0x0C4815FBL, 9L, 0x0C4815FBL, 9L, 0x0C4815FBL, 9L, 0x0C4815FBL, 9L}; + unsigned short l_1231 = 0x2100L; + int i; + step_hash(652); + if (((((signed char)((g_397 && (-(short)(-4L))) || (l_1119 ^ p_33)) >> (signed char)5) ^ ((((short)(**l_1134) / (short)0x17B4L) ^ p_34) <= p_31)) < 0x023930F5L)) + { + step_hash(647); + p_32 = (void*)0; + } + else + { + step_hash(649); + (*g_292) = (((void*)0 == g_193) ^ g_594[0][3]); + step_hash(650); + (**l_1134) = (((signed char)p_31 + (signed char)((void*)0 == &p_32)) && ((unsigned)(*l_1133) % (unsigned)4294967289UL)); + step_hash(651); + (*l_1133) &= (*g_292); + } + step_hash(700); + if (((unsigned)((unsigned char)((unsigned char)(**l_1134) / (unsigned char)p_33) / (unsigned char)g_594[1][6]) - (unsigned)((int)((((void*)0 == p_32) > (((unsigned short)0xEE0FL << (unsigned short)10) | (((&p_32 == (void*)0) != 1L) | g_211))) > p_33) / (int)(**l_1134)))) + { + signed char l_1160[8]; + int *l_1174 = &g_232; + unsigned short l_1205 = 0xF8ACL; + int i; + for (i = 0; i < 8; i++) + l_1160[i] = 0x27L; + step_hash(682); + if ((*g_292)) + { + unsigned short l_1159 = 0xEBBFL; + short l_1161[5][1] = {{(-6L)}, {(-6L)}, {(-6L)}, {(-6L)}, {(-6L)}}; + int ***l_1168 = &l_1030; + signed char l_1175 = 0x7CL; + int *l_1176 = (void*)0; + int *l_1177 = &l_1079[0]; + int *l_1178[2]; + unsigned short l_1181 = 65527UL; + int i, j; + for (i = 0; i < 2; i++) + l_1178[i] = &g_594[1][3]; + step_hash(662); + if (((int)((short)p_31 << (short)(((((void*)0 == p_32) != (*l_1133)) | (((0x9BFB424AL | ((short)((signed char)((unsigned short)65527UL >> (unsigned short)l_1159) << (signed char)0) * (short)((g_355 & l_1160[0]) || (*l_1133)))) | p_34) || l_1161[1][0])) ^ 0xDA59L)) + (int)(**l_1134))) + { + step_hash(656); + (*l_1133) = (((unsigned char)((int)l_1160[0] / (int)0x351159A8L) + (unsigned char)g_594[2][0]) || (**l_1134)); + step_hash(657); + (*l_1133) = ((unsigned char)(p_31 | (p_31 >= (0x6E1D2D00L & g_1024[1]))) >> (unsigned char)g_338[6]); + step_hash(658); + (*l_1134) = p_32; + step_hash(659); + (*l_1134) = p_32; + } + else + { + step_hash(661); + (**l_1134) = (p_32 == &g_3); + } + step_hash(669); + if ((0xA5L != (((unsigned)(l_1133 == l_1171) - (unsigned)(*l_1133)) < (((unsigned char)(((0x26L < ((((g_1024[7] == g_3) != ((l_1174 == &g_154) ^ 1L)) > 0x83L) ^ 0xAB9571F0L)) < 0x1EF2892FL) <= 1L) << (unsigned char)3) > (*l_1174))))) + { + step_hash(664); + (*l_1171) = p_31; + step_hash(665); + (*l_1134) = p_32; + } + else + { + step_hash(667); + l_1079[0] ^= (*l_1171); + step_hash(668); + (*l_1171) = p_34; + } + step_hash(670); + ++l_1181; + } + else + { + int l_1192 = 0L; + int l_1204 = 0xF0938542L; + step_hash(681); + if (((unsigned char)((g_355 & ((unsigned short)((unsigned char)(l_1190 == &g_25) / (unsigned char)g_423[6][0]) << (unsigned short)g_503)) ^ 0x2E28BBFAL) / (unsigned char)g_1024[1])) + { + step_hash(673); + (*l_1133) = (**l_1134); + step_hash(674); + (*g_292) = l_1195; + step_hash(675); + (*l_1133) |= (p_34 == (&g_25 != (void*)0)); + step_hash(676); + (*l_1171) = (g_1196 == (+(*l_1133))); + } + else + { + unsigned char l_1199 = 0UL; + int *l_1202 = &l_1180[2]; + int *l_1203[6] = {(void*)0, (void*)0, &g_594[0][9], (void*)0, (void*)0, &g_594[0][9]}; + int i; + step_hash(678); + (*l_1202) ^= ((unsigned short)(4294967286UL & (((*l_1171) || (255UL != l_1199)) || (((unsigned short)g_524 << (unsigned short)8) & (*l_1174)))) * (unsigned short)((-6L) ^ p_33)); + step_hash(679); + (*l_1190) = &g_154; + step_hash(680); + --l_1205; + } + } + step_hash(683); + (*l_1134) = &g_3; + } + else + { + int *l_1208 = &l_1079[0]; + int *l_1209 = &l_1179; + int *l_1210[7] = {(void*)0, (void*)0, (void*)0, (void*)0, (void*)0, (void*)0, (void*)0}; + unsigned l_1243[10][7] = {{1UL, 0UL, 1UL, 2UL, 0x4C3735E5L, 4294967295UL, 4294967295UL}, {1UL, 0UL, 1UL, 2UL, 0x4C3735E5L, 4294967295UL, 4294967295UL}, {1UL, 0UL, 1UL, 2UL, 0x4C3735E5L, 4294967295UL, 4294967295UL}, {1UL, 0UL, 1UL, 2UL, 0x4C3735E5L, 4294967295UL, 4294967295UL}, {1UL, 0UL, 1UL, 2UL, 0x4C3735E5L, 4294967295UL, 4294967295UL}, {1UL, 0UL, 1UL, 2UL, 0x4C3735E5L, 4294967295UL, 4294967295UL}, {1UL, 0UL, 1UL, 2UL, 0x4C3735E5L, 4294967295UL, 4294967295UL}, {1UL, 0UL, 1UL, 2UL, 0x4C3735E5L, 4294967295UL, 4294967295UL}, {1UL, 0UL, 1UL, 2UL, 0x4C3735E5L, 4294967295UL, 4294967295UL}, {1UL, 0UL, 1UL, 2UL, 0x4C3735E5L, 4294967295UL, 4294967295UL}}; + int i, j; + step_hash(685); + l_1211++; + step_hash(698); + for (g_249 = 2; (g_249 <= 7); g_249 += 1) + { + unsigned short l_1218 = 2UL; + int **l_1221 = &g_292; + int **l_1228 = (void*)0; + int **l_1229 = &l_1171; + int l_1234 = 0x670A152EL; + int l_1235 = 1L; + int l_1236 = (-3L); + int l_1238 = (-1L); + int l_1240[4][2] = {{0x11F6C806L, 0x11F6C806L}, {0x11F6C806L, 0x11F6C806L}, {0x11F6C806L, 0x11F6C806L}, {0x11F6C806L, 0x11F6C806L}}; + int i, j; + step_hash(689); + (*l_1134) = &l_1180[g_249]; + step_hash(690); + (*l_1208) ^= l_1180[g_249]; + step_hash(697); + if ((+p_31)) + { + unsigned char l_1227 = 0UL; + int **l_1230 = &l_1210[4]; + step_hash(692); + (*l_1171) ^= (((unsigned char)p_33 >> (unsigned char)6) >= (-5L)); + step_hash(693); + l_1232[5] ^= l_1231; + } + else + { + int l_1233 = 7L; + int l_1237 = 0L; + int l_1241[5][3] = {{0x2DD17C1CL, 0x8AF23081L, 0x1FC8088CL}, {0x2DD17C1CL, 0x8AF23081L, 0x1FC8088CL}, {0x2DD17C1CL, 0x8AF23081L, 0x1FC8088CL}, {0x2DD17C1CL, 0x8AF23081L, 0x1FC8088CL}, {0x2DD17C1CL, 0x8AF23081L, 0x1FC8088CL}}; + unsigned l_1250[7][7] = {{4294967290UL, 1UL, 0xA6D5C212L, 1UL, 4294967290UL, 0xBE55C406L, 0x16F63DF4L}, {4294967290UL, 1UL, 0xA6D5C212L, 1UL, 4294967290UL, 0xBE55C406L, 0x16F63DF4L}, {4294967290UL, 1UL, 0xA6D5C212L, 1UL, 4294967290UL, 0xBE55C406L, 0x16F63DF4L}, {4294967290UL, 1UL, 0xA6D5C212L, 1UL, 4294967290UL, 0xBE55C406L, 0x16F63DF4L}, {4294967290UL, 1UL, 0xA6D5C212L, 1UL, 4294967290UL, 0xBE55C406L, 0x16F63DF4L}, {4294967290UL, 1UL, 0xA6D5C212L, 1UL, 4294967290UL, 0xBE55C406L, 0x16F63DF4L}, {4294967290UL, 1UL, 0xA6D5C212L, 1UL, 4294967290UL, 0xBE55C406L, 0x16F63DF4L}}; + int i, j; + step_hash(695); + l_1243[9][6]--; + step_hash(696); + (**l_1134) |= ((unsigned short)(p_33 != (((short)l_1250[0][5] >> (short)15) ^ 9L)) << (unsigned short)7); + } + } + step_hash(699); + (*l_1208) = 1L; + } + } + else + { + unsigned char l_1263[6]; + int *l_1264 = &g_594[2][5]; + int i; + for (i = 0; i < 6; i++) + l_1263[i] = 0x54L; + step_hash(702); + (*g_292) = (*g_292); + step_hash(703); + (*l_1264) |= ((short)(((unsigned short)p_33 * (unsigned short)(8UL >= ((((unsigned)g_883[6][0] + (unsigned)(*l_1133)) != (*p_32)) < l_1257))) | 0xFD4EL) << (short)(((int)((unsigned char)(p_31 | ((*p_32) > l_1262)) * (unsigned char)g_199) + (int)(*p_32)) != l_1263[0])); + } + step_hash(819); + if (((((unsigned short)((unsigned short)(g_396[0][4] != (*l_1133)) << (unsigned short)p_34) << (unsigned short)p_33) != g_26) || 0xD2D2L)) + { + int *l_1275 = (void*)0; + unsigned l_1278[3]; + unsigned char l_1283 = 0x72L; + int l_1294 = (-1L); + int l_1297 = 0x101F6C0DL; + int l_1298 = (-1L); + int l_1299[2][9] = {{0x23EAE8D2L, 0x23EAE8D2L, 1L, 0x23EAE8D2L, 0x23EAE8D2L, 1L, 0x23EAE8D2L, 0x23EAE8D2L, 1L}, {0x23EAE8D2L, 0x23EAE8D2L, 1L, 0x23EAE8D2L, 0x23EAE8D2L, 1L, 0x23EAE8D2L, 0x23EAE8D2L, 1L}}; + unsigned char l_1338 = 0x2DL; + int i, j; + for (i = 0; i < 3; i++) + l_1278[i] = 0x94B24562L; + step_hash(706); + l_1274 = l_1273; + step_hash(707); + l_1275 = (void*)0; + step_hash(772); + if (((int)(*l_1133) - (int)0L)) + { + int *l_1281 = &g_3; + int l_1282[9]; + int l_1291 = 0x9630ACC0L; + int l_1295[3][5] = {{0x28CDF635L, (-1L), 0x4EA173BFL, 0x4EA173BFL, (-1L)}, {0x28CDF635L, (-1L), 0x4EA173BFL, 0x4EA173BFL, (-1L)}, {0x28CDF635L, (-1L), 0x4EA173BFL, 0x4EA173BFL, (-1L)}}; + unsigned char l_1300 = 0x24L; + int *l_1308[7][9] = {{&l_1239[3][3], &g_154, &l_1179, &g_232, &l_1179, (void*)0, (void*)0, &l_1179, &g_232}, {&l_1239[3][3], &g_154, &l_1179, &g_232, &l_1179, (void*)0, (void*)0, &l_1179, &g_232}, {&l_1239[3][3], &g_154, &l_1179, &g_232, &l_1179, (void*)0, (void*)0, &l_1179, &g_232}, {&l_1239[3][3], &g_154, &l_1179, &g_232, &l_1179, (void*)0, (void*)0, &l_1179, &g_232}, {&l_1239[3][3], &g_154, &l_1179, &g_232, &l_1179, (void*)0, (void*)0, &l_1179, &g_232}, {&l_1239[3][3], &g_154, &l_1179, &g_232, &l_1179, (void*)0, (void*)0, &l_1179, &g_232}, {&l_1239[3][3], &g_154, &l_1179, &g_232, &l_1179, (void*)0, (void*)0, &l_1179, &g_232}}; + unsigned l_1335 = 0x4DAC3CDCL; + int i, j; + for (i = 0; i < 9; i++) + l_1282[i] = (-1L); + step_hash(728); + if ((~(*l_1274))) + { + int **l_1289 = &l_1281; + int *l_1290 = &g_154; + int *l_1292 = &g_594[0][9]; + int *l_1293[10] = {(void*)0, &l_1079[0], &l_1179, &l_1179, &l_1079[0], (void*)0, &l_1079[0], &l_1179, &l_1179, &l_1079[0]}; + int i; + step_hash(715); + if (l_1278[0]) + { + unsigned char l_1284 = 0UL; + step_hash(711); + --l_1284; + step_hash(712); + g_26 &= ((unsigned char)p_33 >> (unsigned char)6); + } + else + { + step_hash(714); + return &g_292; + } + step_hash(716); + l_1300++; + step_hash(717); + (*l_1289) = p_32; + } + else + { + unsigned l_1305[3]; + int i; + for (i = 0; i < 3; i++) + l_1305[i] = 0xB82D25A5L; + step_hash(719); + (*l_1133) = (*l_1281); + step_hash(727); + for (l_1062 = 0; (l_1062 > 48); l_1062 += 1) + { + step_hash(723); + if (l_1305[2]) + break; + step_hash(724); + if (l_1305[2]) + continue; + step_hash(725); + l_1294 = (*l_1133); + step_hash(726); + (*l_1133) = ((signed char)g_883[3][0] >> (signed char)(*l_1133)); + } + } + step_hash(729); + l_1133 = p_32; + step_hash(730); + l_1079[0] &= 0x2F1EE157L; + step_hash(754); + for (g_1083 = 0; (g_1083 < (-27)); g_1083--) + { + unsigned char l_1311[8][4] = {{0x19L, 0x19L, 0x03L, 4UL}, {0x19L, 0x19L, 0x03L, 4UL}, {0x19L, 0x19L, 0x03L, 4UL}, {0x19L, 0x19L, 0x03L, 4UL}, {0x19L, 0x19L, 0x03L, 4UL}, {0x19L, 0x19L, 0x03L, 4UL}, {0x19L, 0x19L, 0x03L, 4UL}, {0x19L, 0x19L, 0x03L, 4UL}}; + int ***l_1320[2][5] = {{&l_1030, &l_1030, &l_1030, &l_1030, &l_1030}, {&l_1030, &l_1030, &l_1030, &l_1030, &l_1030}}; + int l_1324 = (-1L); + int i, j; + step_hash(738); + for (l_1033 = 0; (l_1033 <= 0); l_1033 += 1) + { + step_hash(737); + l_1311[7][2]++; + } + step_hash(745); + for (g_595 = 0; (g_595 <= 3); g_595 += 1) + { + int l_1321 = 0xAB6B33DAL; + int i, j; + step_hash(742); + l_1321 |= (65535UL > ((unsigned char)((signed char)0L >> (signed char)(l_1311[(g_595 + 2)][g_595] == ((signed char)(l_1311[7][2] || (g_193 != l_1320[1][0])) * (signed char)(0x0AL & (0x4276L >= (g_225 >= g_594[1][1])))))) * (unsigned char)p_31)); + step_hash(743); + (*l_1190) = &l_1257; + step_hash(744); + l_1321 &= (p_33 >= (((int)(((((l_1324 < ((signed char)g_232 + (signed char)((short)p_31 << (short)(g_232 || p_31)))) > ((6L | l_1311[(g_595 + 2)][g_595]) & (((-1L) < 0xCC03L) | 0x40BDL))) ^ p_34) & 0UL) || g_1024[3]) / (int)p_31) ^ 0x4CFEL)); + } + step_hash(753); + for (g_328 = (-24); (g_328 < 13); g_328 += 1) + { + int l_1333 = 0L; + int *l_1334 = &g_26; + step_hash(749); + g_232 = (((int)0x891351B5L + (int)p_33) | l_1333); + step_hash(750); + l_1239[0][1] &= p_31; + step_hash(751); + (*l_1334) = l_1335; + step_hash(752); + (*l_1334) &= p_33; + } + } + } + else + { + step_hash(769); + for (l_1226 = 3; (l_1226 <= 9); l_1226 += 4) + { + unsigned l_1354[9][8] = {{4294967289UL, 0xFC687138L, 1UL, 0UL, 0x9584919CL, 0xD7D3AB05L, 4294967292UL, 0xECCD1F61L}, {4294967289UL, 0xFC687138L, 1UL, 0UL, 0x9584919CL, 0xD7D3AB05L, 4294967292UL, 0xECCD1F61L}, {4294967289UL, 0xFC687138L, 1UL, 0UL, 0x9584919CL, 0xD7D3AB05L, 4294967292UL, 0xECCD1F61L}, {4294967289UL, 0xFC687138L, 1UL, 0UL, 0x9584919CL, 0xD7D3AB05L, 4294967292UL, 0xECCD1F61L}, {4294967289UL, 0xFC687138L, 1UL, 0UL, 0x9584919CL, 0xD7D3AB05L, 4294967292UL, 0xECCD1F61L}, {4294967289UL, 0xFC687138L, 1UL, 0UL, 0x9584919CL, 0xD7D3AB05L, 4294967292UL, 0xECCD1F61L}, {4294967289UL, 0xFC687138L, 1UL, 0UL, 0x9584919CL, 0xD7D3AB05L, 4294967292UL, 0xECCD1F61L}, {4294967289UL, 0xFC687138L, 1UL, 0UL, 0x9584919CL, 0xD7D3AB05L, 4294967292UL, 0xECCD1F61L}, {4294967289UL, 0xFC687138L, 1UL, 0UL, 0x9584919CL, 0xD7D3AB05L, 4294967292UL, 0xECCD1F61L}}; + int i, j; + step_hash(768); + if (l_1338) + { + unsigned l_1345 = 4294967287UL; + int **l_1346 = (void*)0; + step_hash(760); + (*l_1190) = (void*)0; + step_hash(761); + (*l_1133) ^= 0xC060893EL; + step_hash(762); + (*l_1133) ^= 0L; + step_hash(763); + (*l_1133) |= (0xAEDEL <= (((unsigned char)p_34 / (unsigned char)((short)(p_34 <= ((0x2EBC72F2L & ((unsigned char)p_33 >> (unsigned char)3)) < p_33)) / (short)g_184[8])) >= p_34)); + } + else + { + int *l_1347 = &g_232; + int *l_1348 = &l_1079[0]; + int *l_1349 = (void*)0; + int *l_1350 = &l_1179; + int *l_1351 = &g_154; + int *l_1352 = &l_1294; + int *l_1353[7][9] = {{&g_594[0][9], &l_1242, &l_1298, &l_1079[0], &g_232, &l_1079[0], &g_232, &l_1079[0], &l_1298}, {&g_594[0][9], &l_1242, &l_1298, &l_1079[0], &g_232, &l_1079[0], &g_232, &l_1079[0], &l_1298}, {&g_594[0][9], &l_1242, &l_1298, &l_1079[0], &g_232, &l_1079[0], &g_232, &l_1079[0], &l_1298}, {&g_594[0][9], &l_1242, &l_1298, &l_1079[0], &g_232, &l_1079[0], &g_232, &l_1079[0], &l_1298}, {&g_594[0][9], &l_1242, &l_1298, &l_1079[0], &g_232, &l_1079[0], &g_232, &l_1079[0], &l_1298}, {&g_594[0][9], &l_1242, &l_1298, &l_1079[0], &g_232, &l_1079[0], &g_232, &l_1079[0], &l_1298}, {&g_594[0][9], &l_1242, &l_1298, &l_1079[0], &g_232, &l_1079[0], &g_232, &l_1079[0], &l_1298}}; + int i, j; + step_hash(765); + l_1354[1][1]--; + step_hash(766); + if (l_1354[1][1]) + break; + step_hash(767); + (*l_1350) = 0x4FB2CE7DL; + } + } + step_hash(770); + (*l_1190) = g_1357; + step_hash(771); + return &g_292; + } + step_hash(773); + (*l_1190) = func_42((9L | ((unsigned)0xCBCDA671L + (unsigned)(((unsigned)(**l_1362) + (unsigned)p_34) & p_31))), l_1239[2][6]); + } + else + { + int ***l_1363[6]; + unsigned l_1364[1]; + unsigned short l_1369 = 0x0ECEL; + int i; + for (i = 0; i < 6; i++) + l_1363[i] = &l_1190; + for (i = 0; i < 1; i++) + l_1364[i] = 1UL; + step_hash(790); + if (l_1370) + { + int l_1373 = 0x270A1387L; + step_hash(787); + for (g_328 = (-19); (g_328 != 19); ++g_328) + { + int **l_1376 = &g_1357; + step_hash(786); + if (l_1373) + { + step_hash(780); + return &g_1357; + } + else + { + short l_1391 = 0x2F59L; + step_hash(782); + if ((*g_1357)) + break; + step_hash(783); + (*l_1367) = (**l_1376); + step_hash(784); + (**l_1376) = ((unsigned char)((-1L) != p_34) << (unsigned char)(g_249 & (((int)((p_32 == &g_594[0][9]) & ((short)(-1L) << (short)9)) + (int)(((*l_1273) || ((int)1L / (int)g_211)) & (*l_1273))) < g_577))); + step_hash(785); + (*l_1133) &= (((unsigned char)255UL - (unsigned char)((**l_1376) > ((&p_32 == &p_32) <= ((g_3 & ((unsigned short)(l_1373 & ((*l_1376) == p_32)) / (unsigned short)l_1391)) ^ l_1391)))) == 0x33L); + } + } + } + else + { + step_hash(789); + return &g_25; + } + step_hash(802); + for (p_33 = 0; (p_33 != 24); p_33 += 5) + { + int l_1411[8][8] = {{(-5L), 0xBDA87B23L, 0x7035D55DL, 3L, 0xCC240084L, 3L, 0x7035D55DL, 0xBDA87B23L}, {(-5L), 0xBDA87B23L, 0x7035D55DL, 3L, 0xCC240084L, 3L, 0x7035D55DL, 0xBDA87B23L}, {(-5L), 0xBDA87B23L, 0x7035D55DL, 3L, 0xCC240084L, 3L, 0x7035D55DL, 0xBDA87B23L}, {(-5L), 0xBDA87B23L, 0x7035D55DL, 3L, 0xCC240084L, 3L, 0x7035D55DL, 0xBDA87B23L}, {(-5L), 0xBDA87B23L, 0x7035D55DL, 3L, 0xCC240084L, 3L, 0x7035D55DL, 0xBDA87B23L}, {(-5L), 0xBDA87B23L, 0x7035D55DL, 3L, 0xCC240084L, 3L, 0x7035D55DL, 0xBDA87B23L}, {(-5L), 0xBDA87B23L, 0x7035D55DL, 3L, 0xCC240084L, 3L, 0x7035D55DL, 0xBDA87B23L}, {(-5L), 0xBDA87B23L, 0x7035D55DL, 3L, 0xCC240084L, 3L, 0x7035D55DL, 0xBDA87B23L}}; + int i, j; + step_hash(801); + if (((unsigned char)(((short)g_422 >> (short)(&l_1274 == &p_32)) > ((((unsigned char)((*l_1273) | ((((((((unsigned short)65535UL >> (unsigned short)3) | (g_339 ^ ((signed char)(p_31 | (+g_338[2])) >> (signed char)2))) == p_31) != (*l_1273)) == g_184[7]) || g_225) == 9UL)) >> (unsigned char)2) ^ p_33) < p_31)) << (unsigned char)3)) + { + step_hash(795); + (*l_1362) = func_42((*l_1367), ((&g_1357 != &p_32) >= p_33)); + step_hash(796); + return &g_1357; + } + else + { + unsigned short l_1406[7][10] = {{0x8EEFL, 0x3DDCL, 0x9B17L, 0xC03CL, 0xB6E1L, 0xC03CL, 0x9B17L, 0x3DDCL, 0x8EEFL, 65535UL}, {0x8EEFL, 0x3DDCL, 0x9B17L, 0xC03CL, 0xB6E1L, 0xC03CL, 0x9B17L, 0x3DDCL, 0x8EEFL, 65535UL}, {0x8EEFL, 0x3DDCL, 0x9B17L, 0xC03CL, 0xB6E1L, 0xC03CL, 0x9B17L, 0x3DDCL, 0x8EEFL, 65535UL}, {0x8EEFL, 0x3DDCL, 0x9B17L, 0xC03CL, 0xB6E1L, 0xC03CL, 0x9B17L, 0x3DDCL, 0x8EEFL, 65535UL}, {0x8EEFL, 0x3DDCL, 0x9B17L, 0xC03CL, 0xB6E1L, 0xC03CL, 0x9B17L, 0x3DDCL, 0x8EEFL, 65535UL}, {0x8EEFL, 0x3DDCL, 0x9B17L, 0xC03CL, 0xB6E1L, 0xC03CL, 0x9B17L, 0x3DDCL, 0x8EEFL, 65535UL}, {0x8EEFL, 0x3DDCL, 0x9B17L, 0xC03CL, 0xB6E1L, 0xC03CL, 0x9B17L, 0x3DDCL, 0x8EEFL, 65535UL}}; + int i, j; + step_hash(798); + if ((*g_1357)) + break; + step_hash(799); + if (l_1406[2][0]) + break; + step_hash(800); + (*g_1357) &= ((int)((signed char)l_1411[1][4] * (signed char)0x7DL) + (int)0x20919729L); + } + } + step_hash(803); + p_32 = (*l_1362); + step_hash(818); + for (p_31 = 0; (p_31 < 10); ++p_31) + { + int l_1416 = 0L; + int **l_1432 = (void*)0; + step_hash(817); + for (l_1033 = 16; (l_1033 < 49); l_1033 += 8) + { + int l_1431 = (-1L); + step_hash(816); + if (l_1416) + { + unsigned l_1426 = 4UL; + unsigned short l_1433 = 65535UL; + step_hash(811); + (*g_1357) |= (*p_32); + step_hash(812); + (*l_1274) = l_1433; + step_hash(813); + g_1434 = (void*)0; + } + else + { + step_hash(815); + if ((*p_32)) + break; + } + } + } + } + } + step_hash(821); + (*g_1357) = (-1L); + step_hash(822); + return l_1435; +} + + + + + + + +static int func_39(unsigned p_40, int * p_41) +{ + signed char l_608 = (-8L); + int **l_612 = &g_25; + int l_632 = 0x6FD6DD8CL; + int l_633[1]; + short l_659 = 0x3DBFL; + unsigned l_754[2]; + unsigned char l_755[10] = {0x42L, 0x76L, 0x42L, 0x76L, 0x42L, 0x76L, 0x42L, 0x76L, 0x42L, 0x76L}; + int l_783 = 1L; + unsigned l_870 = 0xA0042BA8L; + signed char l_879 = 0L; + int l_994[1][5] = {{9L, 0xACA4125EL, 9L, 0xACA4125EL, 9L}}; + unsigned l_998 = 4294967286UL; + int i, j; + for (i = 0; i < 1; i++) + l_633[i] = 1L; + for (i = 0; i < 2; i++) + l_754[i] = 0xCADE01FFL; + step_hash(403); + (*p_41) = 0L; + step_hash(450); + if (l_608) + { + step_hash(405); + return l_608; + } + else + { + signed char l_609[8] = {2L, 2L, 0xF5L, 2L, 2L, 0xF5L, 2L, 2L}; + int *l_611[10]; + int l_663[4][3] = {{(-10L), (-3L), (-10L)}, {(-10L), (-3L), (-10L)}, {(-10L), (-3L), (-10L)}, {(-10L), (-3L), (-10L)}}; + unsigned char l_664 = 0xADL; + int ***l_683 = (void*)0; + int i, j; + for (i = 0; i < 10; i++) + l_611[i] = &g_594[0][9]; + step_hash(449); + if ((p_40 & 0x170FL)) + { + unsigned l_613 = 4294967295UL; + int *l_621 = &g_26; + int l_634 = 0L; + int l_635 = 0L; + int l_637 = 0x17D1E21DL; + int l_641[6][1] = {{0xCEF855DCL}, {0xCEF855DCL}, {0xCEF855DCL}, {0xCEF855DCL}, {0xCEF855DCL}, {0xCEF855DCL}}; + unsigned short l_646 = 0x78F7L; + int ***l_653 = &l_612; + unsigned l_654 = 4294967286UL; + int i, j; + step_hash(412); + for (l_608 = 0; (l_608 <= 6); l_608 += 1) + { + step_hash(411); + if (l_609[2]) + break; + } + step_hash(434); + for (p_40 = 0; (p_40 <= 2); p_40 += 1) + { + int **l_610[6][5]; + short l_614 = 0x02F7L; + int l_638 = 0L; + int l_645 = (-4L); + int i, j; + for (i = 0; i < 6; i++) + { + for (j = 0; j < 5; j++) + l_610[i][j] = &g_292; + } + step_hash(428); + if ((*g_292)) + { + step_hash(417); + l_614 &= (*p_41); + } + else + { + unsigned l_626 = 0xD29443E5L; + int l_631 = 0x1B1EF5C0L; + int l_636 = 1L; + int l_642[2]; + int l_644 = 0x640B74C2L; + unsigned char l_649 = 0x51L; + int i; + for (i = 0; i < 2; i++) + l_642[i] = 8L; + step_hash(427); + if (((int)(((unsigned char)((unsigned short)(+p_40) + (unsigned short)((g_225 && (p_40 ^ g_328)) >= p_40)) + (unsigned char)l_613) <= 4294967288UL) - (int)g_232)) + { + signed char l_639[4] = {0x5FL, 0xBFL, 0x5FL, 0xBFL}; + int l_640[10] = {1L, 1L, 0x558BD61EL, 1L, 1L, 0x558BD61EL, 1L, 1L, 0x558BD61EL, 1L}; + int l_643[9] = {0x38D2291BL, 0x7E288652L, 0x38D2291BL, 0x7E288652L, 0x38D2291BL, 0x7E288652L, 0x38D2291BL, 0x7E288652L, 0x38D2291BL}; + int **l_650 = &l_611[2]; + int i; + step_hash(420); + (*g_292) = (g_337[3][1] <= 0L); + step_hash(421); + l_646++; + step_hash(422); + (*g_292) = (*p_41); + step_hash(423); + (*l_612) = p_41; + } + else + { + step_hash(425); + l_644 &= ((unsigned char)(g_193 == l_653) + (unsigned char)(+(((g_193 == g_193) & p_40) ^ (*p_41)))); + step_hash(426); + if (l_642[1]) + break; + } + } + step_hash(433); + for (g_140 = 0; (g_140 <= 2); g_140 += 1) + { + step_hash(432); + l_654--; + } + } + } + else + { + int l_657 = 0xCB3DF271L; + int l_658 = 0xFC905425L; + signed char l_660[9] = {(-1L), (-1L), (-1L), (-1L), (-1L), (-1L), (-1L), (-1L), (-1L)}; + int l_661 = 4L; + int l_662[10][3] = {{0x712B81C2L, 1L, 0x70B5938AL}, {0x712B81C2L, 1L, 0x70B5938AL}, {0x712B81C2L, 1L, 0x70B5938AL}, {0x712B81C2L, 1L, 0x70B5938AL}, {0x712B81C2L, 1L, 0x70B5938AL}, {0x712B81C2L, 1L, 0x70B5938AL}, {0x712B81C2L, 1L, 0x70B5938AL}, {0x712B81C2L, 1L, 0x70B5938AL}, {0x712B81C2L, 1L, 0x70B5938AL}, {0x712B81C2L, 1L, 0x70B5938AL}}; + int i, j; + step_hash(436); + ++l_664; + step_hash(443); + for (l_659 = 0; (l_659 >= (-16)); --l_659) + { + step_hash(440); + (*g_292) = (*p_41); + step_hash(441); + (*l_612) = &g_594[0][9]; + step_hash(442); + (**l_612) &= (p_40 <= (0x2B3FL > ((signed char)(g_423[6][0] ^ ((int)(*p_41) - (int)0x1F6C8B46L)) << (signed char)4))); + } + step_hash(448); + for (g_355 = 13; (g_355 >= 53); g_355 += 5) + { + short l_684 = 0x8299L; + step_hash(447); + (*p_41) = ((unsigned char)(g_595 != (p_40 | ((short)(4UL == ((+(0xADL || l_660[2])) || ((((unsigned short)(l_683 == g_193) / (unsigned short)l_658) && p_40) < g_545))) * (short)g_338[2]))) + (unsigned char)l_662[8][2]); + } + } + } + step_hash(598); + if ((*g_292)) + { + unsigned char l_693 = 0x12L; + step_hash(467); + for (p_40 = 0; (p_40 <= 2); p_40 += 1) + { + int **l_695 = (void*)0; + int *l_708 = (void*)0; + int *l_709 = &l_633[0]; + step_hash(465); + for (g_211 = 0; (g_211 <= 6); g_211 += 1) + { + unsigned l_694 = 0UL; + int *l_704 = (void*)0; + int l_705[2]; + int i; + for (i = 0; i < 2; i++) + l_705[i] = 0x4D72859CL; + step_hash(463); + for (g_429 = 0; (g_429 <= 0); g_429 += 1) + { + int i, j; + step_hash(461); + (*p_41) &= ((unsigned short)g_594[p_40][(g_429 + 7)] - (unsigned short)((unsigned char)((short)(((&p_41 != &p_41) == ((g_338[(g_429 + 4)] >= ((short)l_633[g_429] - (short)g_397)) < 0xFDL)) & ((l_633[g_429] <= p_40) & l_693)) >> (short)1) * (unsigned char)l_694)); + step_hash(462); + l_695 = &g_25; + } + step_hash(464); + l_705[0] ^= ((short)p_40 + (short)((unsigned)((int)(func_51(((unsigned char)255UL << (unsigned char)g_184[7]), g_545, (p_40 != ((void*)0 == &p_41)), g_543, &p_41) < p_40) % (int)p_40) % (unsigned)p_40)); + } + step_hash(466); + (*l_709) ^= ((unsigned short)g_26 % (unsigned short)g_595); + } + } + else + { + unsigned short l_731 = 65528UL; + int **l_753 = (void*)0; + short l_785[3]; + int l_799 = 0x7E3166F0L; + int l_803[1][8] = {{0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L}}; + int l_830[9][4] = {{0xB86EAC4EL, 1L, 0x72F5E222L, 0x659B7318L}, {0xB86EAC4EL, 1L, 0x72F5E222L, 0x659B7318L}, {0xB86EAC4EL, 1L, 0x72F5E222L, 0x659B7318L}, {0xB86EAC4EL, 1L, 0x72F5E222L, 0x659B7318L}, {0xB86EAC4EL, 1L, 0x72F5E222L, 0x659B7318L}, {0xB86EAC4EL, 1L, 0x72F5E222L, 0x659B7318L}, {0xB86EAC4EL, 1L, 0x72F5E222L, 0x659B7318L}, {0xB86EAC4EL, 1L, 0x72F5E222L, 0x659B7318L}, {0xB86EAC4EL, 1L, 0x72F5E222L, 0x659B7318L}}; + int **l_850 = &g_25; + unsigned short l_882[7] = {65528UL, 65528UL, 1UL, 65528UL, 65528UL, 1UL, 65528UL}; + int ***l_919 = &l_753; + signed char l_984 = 0x9CL; + int l_990 = (-1L); + short l_992 = (-5L); + unsigned char l_1005 = 255UL; + unsigned char l_1020 = 0xF3L; + short l_1023 = 1L; + int i, j; + for (i = 0; i < 3; i++) + l_785[i] = 0xD86FL; + step_hash(479); + for (l_659 = 0; (l_659 <= 13); l_659 += 1) + { + unsigned l_728 = 0UL; + int l_745 = 0x62A8108DL; + step_hash(472); + (*g_292) = ((!(((short)((unsigned char)((signed char)(((int)(4294967295UL == g_396[0][3]) % (int)((unsigned short)((unsigned)((unsigned char)((unsigned char)(4294967295UL <= (l_728 & ((-1L) ^ (p_40 && (((unsigned short)(l_731 & (*g_292)) / (unsigned short)((((*p_41) != p_40) == 0x0BEB066EL) || g_154)) != l_731))))) << (unsigned char)p_40) * (unsigned char)p_40) % (unsigned)4294967295UL) + (unsigned short)0x6D2AL)) <= p_40) - (signed char)0xCEL) + (unsigned char)p_40) / (short)g_244) != (-4L))) != 0x74491D21L); + step_hash(478); + for (g_577 = (-16); (g_577 == 6); g_577 += 5) + { + unsigned short l_736 = 0x5BFBL; + step_hash(476); + (*p_41) |= (-1L); + step_hash(477); + l_745 |= ((unsigned short)l_736 >> (unsigned short)((((short)((unsigned short)p_40 * (unsigned short)((unsigned short)p_40 % (unsigned short)g_337[3][0])) % (short)(p_40 || ((unsigned char)g_2[3] * (unsigned char)g_210))) == ((*p_41) || ((1L || p_40) && 1L))) == l_728)); + } + } + step_hash(553); + for (g_595 = 0; (g_595 <= 0); g_595 += 1) + { + int l_746 = 1L; + int **l_756 = &g_25; + int l_770[6][5] = {{6L, 0x710053E7L, 0x1E9C7C64L, 0x1E9C7C64L, 0x710053E7L}, {6L, 0x710053E7L, 0x1E9C7C64L, 0x1E9C7C64L, 0x710053E7L}, {6L, 0x710053E7L, 0x1E9C7C64L, 0x1E9C7C64L, 0x710053E7L}, {6L, 0x710053E7L, 0x1E9C7C64L, 0x1E9C7C64L, 0x710053E7L}, {6L, 0x710053E7L, 0x1E9C7C64L, 0x1E9C7C64L, 0x710053E7L}, {6L, 0x710053E7L, 0x1E9C7C64L, 0x1E9C7C64L, 0x710053E7L}}; + int l_795[5][9] = {{0L, 1L, 1L, 0xC018B887L, 1L, 0L, 1L, 0xC018B887L, 1L}, {0L, 1L, 1L, 0xC018B887L, 1L, 0L, 1L, 0xC018B887L, 1L}, {0L, 1L, 1L, 0xC018B887L, 1L, 0L, 1L, 0xC018B887L, 1L}, {0L, 1L, 1L, 0xC018B887L, 1L, 0L, 1L, 0xC018B887L, 1L}, {0L, 1L, 1L, 0xC018B887L, 1L, 0L, 1L, 0xC018B887L, 1L}}; + int *l_845[6] = {(void*)0, (void*)0, &l_799, (void*)0, (void*)0, &l_799}; + short l_897[9][3] = {{0x1558L, 0x7885L, 0x1558L}, {0x1558L, 0x7885L, 0x1558L}, {0x1558L, 0x7885L, 0x1558L}, {0x1558L, 0x7885L, 0x1558L}, {0x1558L, 0x7885L, 0x1558L}, {0x1558L, 0x7885L, 0x1558L}, {0x1558L, 0x7885L, 0x1558L}, {0x1558L, 0x7885L, 0x1558L}, {0x1558L, 0x7885L, 0x1558L}}; + unsigned short l_898 = 65535UL; + int i, j; + step_hash(516); + if ((l_746 <= g_594[0][9])) + { + unsigned l_771 = 0xBCD05241L; + int **l_772 = &g_292; + int l_786 = (-7L); + int l_798 = 0x631DC005L; + int l_801 = (-10L); + int l_802[6][1] = {{6L}, {6L}, {6L}, {6L}, {6L}, {6L}}; + unsigned l_805 = 0x84597814L; + int i, j; + step_hash(496); + if (((*p_41) != ((unsigned char)(l_612 != &p_41) >> (unsigned char)7))) + { + unsigned short l_763 = 1UL; + step_hash(485); + l_770[2][2] ^= ((int)((short)l_763 << (short)((signed char)g_232 * (signed char)((((unsigned char)0x99L * (unsigned char)((((g_423[2][0] & (p_40 > ((int)l_763 % (int)(*p_41)))) | l_763) < (((247UL == 9UL) != p_40) >= p_40)) & l_763)) == g_244) > 0L))) % (int)p_40); + } + else + { + int l_784 = 0L; + int l_796 = 8L; + int l_797 = (-1L); + int l_800 = 0xDBF02605L; + int l_804 = 0x7CF42B48L; + int **l_820 = &g_292; + step_hash(487); + l_771 = (*g_292); + step_hash(488); + (**l_772) = ((((l_772 == (void*)0) && p_40) != p_40) == 0x07BFL); + step_hash(495); + for (l_784 = 0; (l_784 >= 0); l_784 -= 1) + { + int *l_787 = &l_632; + int *l_788 = &l_632; + int *l_789 = (void*)0; + int *l_790 = &l_786; + int *l_791 = &l_633[0]; + int *l_792 = &l_632; + int *l_793 = &l_633[0]; + int *l_794[2]; + int i, j; + for (i = 0; i < 2; i++) + l_794[i] = &l_633[0]; + step_hash(492); + (*p_41) = g_423[g_595][g_595]; + step_hash(493); + l_805--; + step_hash(494); + (*l_788) &= ((unsigned short)((unsigned char)(g_337[(l_784 + 4)][g_595] >= (((int)g_594[(g_595 + 2)][(l_784 + 3)] - (int)(**l_820)) > g_339)) * (unsigned char)g_2[0]) / (unsigned short)p_40); + } + } + } + else + { + int l_825 = 9L; + int l_828 = 0xC22744DCL; + int l_829[8] = {0x946A2E76L, 0xFC538597L, 0x946A2E76L, 0xFC538597L, 0x946A2E76L, 0xFC538597L, 0x946A2E76L, 0xFC538597L}; + signed char l_833 = 0x0CL; + unsigned short l_836 = 0x79BEL; + int i; + step_hash(509); + for (g_429 = 0; (g_429 <= 3); g_429 += 1) + { + short l_821[8]; + int l_824 = 0x750C65E3L; + int l_826 = 6L; + int l_827 = 0x456ADDD7L; + int l_831 = 0xF443E775L; + int l_832 = (-1L); + int l_834 = (-1L); + int l_835[6][8] = {{7L, 0xAEC1AA0DL, 0xC0B5452DL, 0xE87BF8C3L, 0xC9D4E88BL, 0L, 0x13AF5842L, 0x67943884L}, {7L, 0xAEC1AA0DL, 0xC0B5452DL, 0xE87BF8C3L, 0xC9D4E88BL, 0L, 0x13AF5842L, 0x67943884L}, {7L, 0xAEC1AA0DL, 0xC0B5452DL, 0xE87BF8C3L, 0xC9D4E88BL, 0L, 0x13AF5842L, 0x67943884L}, {7L, 0xAEC1AA0DL, 0xC0B5452DL, 0xE87BF8C3L, 0xC9D4E88BL, 0L, 0x13AF5842L, 0x67943884L}, {7L, 0xAEC1AA0DL, 0xC0B5452DL, 0xE87BF8C3L, 0xC9D4E88BL, 0L, 0x13AF5842L, 0x67943884L}, {7L, 0xAEC1AA0DL, 0xC0B5452DL, 0xE87BF8C3L, 0xC9D4E88BL, 0L, 0x13AF5842L, 0x67943884L}}; + int ***l_863[2]; + int i, j; + for (i = 0; i < 8; i++) + l_821[i] = 6L; + for (i = 0; i < 2; i++) + l_863[i] = &l_753; + step_hash(508); + if ((p_41 != (void*)0)) + { + int i, j; + step_hash(502); + (*l_756) = func_42(g_423[(g_595 + 2)][g_595], g_423[(g_429 + 5)][g_595]); + } + else + { + int *l_822 = &l_799; + int *l_823[5] = {&g_3, &g_232, &g_3, &g_232, &g_3}; + int i, j; + step_hash(504); + l_836--; + step_hash(505); + (*g_292) = ((g_337[(g_429 + 4)][g_429] && (*p_41)) >= (~g_444)); + step_hash(506); + (*g_292) = (*g_292); + step_hash(507); + g_154 |= ((signed char)((0xECL != ((*p_41) <= ((short)l_832 + (short)((unsigned short)(p_40 | 1L) * (unsigned short)((unsigned char)(((unsigned short)p_40 >> (unsigned short)11) <= (((short)g_3 >> (short)9) == ((&l_850 != l_863[0]) == g_337[4][2]))) - (unsigned char)0x2DL))))) == 0x10L) / (signed char)0x59L); + } + } + step_hash(515); + for (g_230 = 0; (g_230 >= 0); g_230 -= 1) + { + step_hash(513); + (*p_41) = (0xA7L > g_232); + step_hash(514); + return (*p_41); + } + } + step_hash(517); + (*g_292) = ((short)0x26EAL % (short)((((p_40 <= 0x3CL) > p_40) != (0xDD62B185L < ((unsigned)g_340[1] / (unsigned)(-10L)))) & g_211)); + step_hash(518); + l_870--; + step_hash(519); + (*l_612) = func_42(p_40, ((unsigned char)(g_210 || (p_40 || (4294967292UL || (p_40 <= p_40)))) << (unsigned char)6)); + step_hash(552); + for (g_548 = 0; (g_548 <= 0); g_548 += 1) + { + unsigned l_886 = 4294967295UL; + int l_911[7][5] = {{0xCBEF739AL, 1L, 0x1F71F7AFL, (-4L), 0xCCA97FF3L}, {0xCBEF739AL, 1L, 0x1F71F7AFL, (-4L), 0xCCA97FF3L}, {0xCBEF739AL, 1L, 0x1F71F7AFL, (-4L), 0xCCA97FF3L}, {0xCBEF739AL, 1L, 0x1F71F7AFL, (-4L), 0xCCA97FF3L}, {0xCBEF739AL, 1L, 0x1F71F7AFL, (-4L), 0xCCA97FF3L}, {0xCBEF739AL, 1L, 0x1F71F7AFL, (-4L), 0xCCA97FF3L}, {0xCBEF739AL, 1L, 0x1F71F7AFL, (-4L), 0xCCA97FF3L}}; + int **l_914[2]; + int i, j; + for (i = 0; i < 2; i++) + l_914[i] = &g_25; + step_hash(523); + g_883[5][0]++; + } + } + step_hash(597); + if (((signed char)g_548 * (signed char)((((void*)0 != l_919) | (*p_41)) <= ((g_444 >= (-(unsigned)(g_226 ^ 0x32DDFB4BL))) == g_244)))) + { + unsigned char l_921 = 251UL; + short l_937[2]; + short l_959 = 0xE01CL; + int l_962 = (-1L); + short l_976 = 0L; + signed char l_987 = 3L; + int l_991 = (-1L); + int l_993[3]; + short l_995[8] = {0x8A39L, (-1L), 0x8A39L, (-1L), 0x8A39L, (-1L), 0x8A39L, (-1L)}; + short l_996[5] = {1L, 1L, 1L, 1L, 1L}; + int l_997 = 6L; + int **l_1006 = &g_292; + int i; + for (i = 0; i < 2; i++) + l_937[i] = 0xA9FEL; + for (i = 0; i < 3; i++) + l_993[i] = 1L; + step_hash(585); + if ((&l_612 == g_193)) + { + unsigned short l_928 = 0xD013L; + int l_931 = 0x63DD22BBL; + int l_932 = 0x43F9A84AL; + step_hash(556); + l_921++; + step_hash(557); + (*p_41) |= (((unsigned short)l_932 >> (unsigned short)9) == 0L); + } + else + { + int *l_938 = &g_154; + int l_972 = 0x18932DBCL; + int l_978 = (-6L); + int l_985 = 0x2802EFB3L; + int l_986 = 0xC3595CD8L; + int l_988[5][6] = {{0xA41D02B1L, 0x1B51728EL, 0x498EBFC9L, 0x498EBFC9L, 0x1B51728EL, 0xA41D02B1L}, {0xA41D02B1L, 0x1B51728EL, 0x498EBFC9L, 0x498EBFC9L, 0x1B51728EL, 0xA41D02B1L}, {0xA41D02B1L, 0x1B51728EL, 0x498EBFC9L, 0x498EBFC9L, 0x1B51728EL, 0xA41D02B1L}, {0xA41D02B1L, 0x1B51728EL, 0x498EBFC9L, 0x498EBFC9L, 0x1B51728EL, 0xA41D02B1L}, {0xA41D02B1L, 0x1B51728EL, 0x498EBFC9L, 0x498EBFC9L, 0x1B51728EL, 0xA41D02B1L}}; + signed char l_989 = 1L; + int i, j; + step_hash(559); + l_938 = func_42(p_40, ((unsigned short)1UL >> (unsigned short)l_937[1])); + step_hash(564); + for (g_534 = 0; (g_534 > 8); g_534 += 7) + { + step_hash(563); + return (*p_41); + } + step_hash(565); + l_938 = func_42(((unsigned char)g_429 % (unsigned char)p_40), ((signed char)(0xF171L == ((short)((short)((unsigned char)((g_543 != ((short)((short)p_40 - (short)g_328) >> (short)4)) && l_937[1]) << (unsigned char)6) / (short)((unsigned short)(0L != g_422) * (unsigned short)0x6A16L)) * (short)g_337[3][0])) / (signed char)l_937[0])); + step_hash(584); + if ((g_338[6] || (&l_612 != g_193))) + { + step_hash(567); + return (*l_938); + } + else + { + unsigned l_973 = 0xCC4C3DC6L; + int l_977 = (-8L); + int l_979 = 0x3D5EA11EL; + int l_980 = 1L; + int l_981 = 0L; + int l_982 = 1L; + int l_983[7] = {0xED08B0C9L, 0xFB109138L, 0xED08B0C9L, 0xFB109138L, 0xED08B0C9L, 0xFB109138L, 0xED08B0C9L}; + int i; + step_hash(573); + for (l_731 = 0; (l_731 <= 0); l_731 += 1) + { + step_hash(572); + (*l_850) = (void*)0; + } + step_hash(574); + l_959 |= ((*l_938) == ((short)((void*)0 != p_41) << (short)2)); + step_hash(575); + (*l_850) = &g_3; + step_hash(583); + for (g_328 = 0; (g_328 == 40); ++g_328) + { + int *l_963 = (void*)0; + int *l_964 = &l_799; + int *l_965 = &l_783; + int *l_966 = (void*)0; + int *l_967 = &g_594[0][9]; + int *l_968 = (void*)0; + int *l_969 = &l_633[0]; + int *l_970 = &l_799; + int *l_971[6] = {(void*)0, (void*)0, &g_594[0][1], (void*)0, (void*)0, &g_594[0][1]}; + int i; + step_hash(579); + --l_973; + step_hash(580); + l_998--; + step_hash(581); + if ((**l_612)) + continue; + step_hash(582); + (*l_965) &= (&l_612 != g_193); + } + } + } + step_hash(592); + if (((g_339 & (**l_1006)) != p_40)) + { + step_hash(587); + return (*g_292); + } + else + { + step_hash(589); + (*l_1006) = func_42((**l_1006), p_40); + step_hash(590); + for (g_429 = 0; g_429 < 1; g_429 += 1) + { + l_633[g_429] = 0xFFB7C9FAL; + } + step_hash(591); + (**l_1006) = (+(**l_1006)); + } + step_hash(593); + (*l_1006) = p_41; + } + else + { + int l_1007 = 1L; + int *l_1008 = &g_154; + int *l_1009 = (void*)0; + int *l_1010 = &l_799; + int *l_1011 = &g_26; + int *l_1012 = &l_633[0]; + int *l_1013 = &g_154; + int *l_1014 = (void*)0; + int l_1015 = 0x0EA46510L; + int *l_1016 = (void*)0; + int l_1017 = 5L; + int *l_1018 = (void*)0; + int *l_1019[4][7] = {{&l_803[0][1], (void*)0, &l_632, (void*)0, &l_803[0][1], &l_1007, &l_803[0][1]}, {&l_803[0][1], (void*)0, &l_632, (void*)0, &l_803[0][1], &l_1007, &l_803[0][1]}, {&l_803[0][1], (void*)0, &l_632, (void*)0, &l_803[0][1], &l_1007, &l_803[0][1]}, {&l_803[0][1], (void*)0, &l_632, (void*)0, &l_803[0][1], &l_1007, &l_803[0][1]}}; + int i, j; + step_hash(595); + l_1020++; + step_hash(596); + (*l_1008) &= g_1024[1]; + } + } + step_hash(599); + return l_632; +} + + + + + + + +static int * func_42(unsigned p_43, unsigned char p_44) +{ + int **l_555 = &g_25; + int *l_556 = &g_26; + int l_557 = 0x731AC907L; + unsigned char l_569 = 255UL; + int l_574 = 0L; + int l_576 = 0L; + int *l_607 = &g_26; + step_hash(400); + if ((0x804FL | (((((unsigned)(l_555 == l_555) % (unsigned)(*l_556)) ^ p_43) | l_557) != 251UL))) + { + short l_558 = 0L; + int *l_559 = &g_154; + int *l_560 = &g_154; + int *l_561 = &g_154; + int *l_562 = &g_232; + int *l_563 = &g_26; + int *l_564 = (void*)0; + int *l_565 = &g_232; + int *l_566 = &g_26; + int *l_567 = &g_154; + int *l_568 = &g_232; + step_hash(381); + ++l_569; + step_hash(382); + (*l_565) |= 0x745DCFF6L; + } + else + { + int *l_572 = (void*)0; + int *l_573 = &g_232; + int *l_575[1]; + unsigned short l_582 = 0xD90DL; + int i; + for (i = 0; i < 1; i++) + l_575[i] = (void*)0; + step_hash(384); + --g_577; + step_hash(399); + for (l_574 = 0; (l_574 == 10); l_574++) + { + int l_583 = (-6L); + int **l_605[4][3] = {{&l_573, (void*)0, &l_573}, {&l_573, (void*)0, &l_573}, {&l_573, (void*)0, &l_573}, {&l_573, (void*)0, &l_573}}; + int *l_606 = &g_3; + int i, j; + step_hash(388); + l_583 |= l_582; + step_hash(397); + if (((unsigned short)((unsigned char)((signed char)((((65535UL < (*l_556)) < ((unsigned short)(l_583 <= ((p_43 >= (&g_25 != &l_575[0])) | ((&g_292 == (void*)0) && ((((g_524 <= 65534UL) | g_340[1]) | g_594[0][9]) == l_583)))) * (unsigned short)g_594[1][1])) == g_249) || g_595) << (signed char)g_396[0][3]) - (unsigned char)0x93L) / (unsigned short)l_583)) + { + int *l_604 = &g_232; + step_hash(390); + (*l_573) = (((((unsigned short)((int)((signed char)(p_44 && (l_604 != (void*)0)) << (signed char)2) - (int)0xA9E3DA89L) + (unsigned short)((void*)0 != l_605[2][1])) | p_43) > (l_606 != l_572)) <= g_595); + step_hash(391); + if ((*l_573)) + continue; + step_hash(392); + (*l_604) = p_44; + step_hash(393); + (*l_573) = p_44; + } + else + { + step_hash(395); + (*l_555) = (void*)0; + step_hash(396); + return &g_232; + } + step_hash(398); + (*l_556) = ((0xE3L < g_226) < (*l_606)); + } + } + step_hash(401); + return l_607; +} + + + + + + + +static short func_51(unsigned p_52, short p_53, int p_54, int p_55, int ** p_56) +{ + unsigned short l_470 = 65535UL; + int **l_472 = &g_292; + int l_480 = (-8L); + unsigned l_485 = 4294967295UL; + int l_525 = 0L; + step_hash(308); + (*g_292) = 0L; + step_hash(375); + if (((unsigned)l_470 + (unsigned)(-1L))) + { + int *l_471 = &g_154; + step_hash(310); + (**l_472) |= (*l_471); + step_hash(315); + for (g_230 = (-8); (g_230 == 14); g_230 += 2) + { + step_hash(314); + if ((*g_292)) + break; + } + } + else + { + int ***l_477 = &l_472; + int l_489[10][4] = {{0xFC82DC88L, (-1L), 0L, 0x4A013A1BL}, {0xFC82DC88L, (-1L), 0L, 0x4A013A1BL}, {0xFC82DC88L, (-1L), 0L, 0x4A013A1BL}, {0xFC82DC88L, (-1L), 0L, 0x4A013A1BL}, {0xFC82DC88L, (-1L), 0L, 0x4A013A1BL}, {0xFC82DC88L, (-1L), 0L, 0x4A013A1BL}, {0xFC82DC88L, (-1L), 0L, 0x4A013A1BL}, {0xFC82DC88L, (-1L), 0L, 0x4A013A1BL}, {0xFC82DC88L, (-1L), 0L, 0x4A013A1BL}, {0xFC82DC88L, (-1L), 0L, 0x4A013A1BL}}; + int l_490 = 0x9C44CCC5L; + int l_502[2][2]; + short l_522 = (-6L); + int i, j; + for (i = 0; i < 2; i++) + { + for (j = 0; j < 2; j++) + l_502[i][j] = 0xA92C175DL; + } + step_hash(321); + for (g_355 = 0; (g_355 >= 40); g_355++) + { + step_hash(320); + (**l_472) = (l_477 == (void*)0); + } + step_hash(326); + for (g_26 = 0; (g_26 != 7); g_26 += 7) + { + step_hash(325); + return l_480; + } + step_hash(374); + for (g_228 = 0; (g_228 >= 0); g_228 -= 1) + { + int *l_487 = &g_3; + int l_499 = 0x9B31973DL; + int l_501 = 0x5AFA4DA5L; + int l_544 = 0x073718EFL; + } + } + step_hash(376); + p_54 = (*g_292); + step_hash(377); + (**l_472) = (0xE07780E1L || (**p_56)); + step_hash(378); + return (**l_472); +} + + + + + + + +static short func_57(int p_58, unsigned p_59, int * p_60, short p_61, int p_62) +{ + int *l_96 = &g_26; + unsigned char l_97 = 255UL; + unsigned short l_100[8][3]; + int *l_103 = &g_26; + int l_129 = 0x95E3EEF2L; + int l_136 = 0xEB2EF126L; + unsigned char l_163 = 9UL; + int l_223 = (-10L); + int l_233 = 0x2D96BE51L; + int **l_303 = &l_103; + int ***l_302[9] = {(void*)0, (void*)0, (void*)0, (void*)0, (void*)0, (void*)0, (void*)0, (void*)0, (void*)0}; + unsigned short l_392 = 65533UL; + int *l_393 = &l_136; + unsigned l_466[3][10] = {{0xAA1151E7L, 0x437FD6A4L, 6UL, 6UL, 0x437FD6A4L, 0xAA1151E7L, 0x437FD6A4L, 6UL, 6UL, 0x437FD6A4L}, {0xAA1151E7L, 0x437FD6A4L, 6UL, 6UL, 0x437FD6A4L, 0xAA1151E7L, 0x437FD6A4L, 6UL, 6UL, 0x437FD6A4L}, {0xAA1151E7L, 0x437FD6A4L, 6UL, 6UL, 0x437FD6A4L, 0xAA1151E7L, 0x437FD6A4L, 6UL, 6UL, 0x437FD6A4L}}; + int *l_467 = &g_26; + int i, j; + for (i = 0; i < 8; i++) + { + for (j = 0; j < 3; j++) + l_100[i][j] = 0xD8FEL; + } + step_hash(29); + if ((((unsigned)((unsigned char)((l_97 >= ((unsigned short)l_100[4][0] - (unsigned short)0x8654L)) || g_26) << (unsigned char)0) / (unsigned)3UL) ^ 0x348DL)) + { + step_hash(19); + p_60 = &g_26; + step_hash(20); + return g_3; + } + else + { + unsigned char l_112[4][1]; + int i, j; + for (i = 0; i < 4; i++) + { + for (j = 0; j < 1; j++) + l_112[i][j] = 0x52L; + } + step_hash(28); + for (p_59 = (-4); (p_59 <= 14); p_59 += 9) + { + int l_106 = 0L; + int *l_107 = &g_26; + step_hash(25); + l_103 = &g_26; + step_hash(26); + if ((*g_25)) + break; + step_hash(27); + (*l_107) &= ((unsigned char)246UL % (unsigned char)l_112[0][0]); + } + } + step_hash(304); + if ((*l_103)) + { + unsigned l_115 = 0x1824DA47L; + int l_139 = 2L; + int l_153 = 0x76DB0F71L; + int *l_160 = &l_136; + step_hash(54); + for (p_59 = 15; (p_59 > 53); p_59 += 4) + { + unsigned short l_118 = 0UL; + int *l_119 = &g_3; + signed char l_127 = 0x0EL; + int l_138 = 7L; + int l_151 = 1L; + int l_152[3][5]; + short l_155 = 0x031CL; + unsigned short l_156[7][5] = {{65530UL, 0x1100L, 0x019FL, 0x019FL, 0x1100L}, {65530UL, 0x1100L, 0x019FL, 0x019FL, 0x1100L}, {65530UL, 0x1100L, 0x019FL, 0x019FL, 0x1100L}, {65530UL, 0x1100L, 0x019FL, 0x019FL, 0x1100L}, {65530UL, 0x1100L, 0x019FL, 0x019FL, 0x1100L}, {65530UL, 0x1100L, 0x019FL, 0x019FL, 0x1100L}, {65530UL, 0x1100L, 0x019FL, 0x019FL, 0x1100L}}; + int *l_159 = (void*)0; + int i, j; + for (i = 0; i < 3; i++) + { + for (j = 0; j < 5; j++) + l_152[i][j] = 1L; + } + step_hash(34); + ++l_115; + step_hash(51); + if (func_67((l_115 | func_67(l_118, &g_3, &l_103, (g_3 ^ (*p_60)))), l_119, &g_25, l_115)) + { + int **l_128 = &l_103; + int l_137 = 1L; + step_hash(46); + for (p_62 = 0; (p_62 > 25); p_62 += 9) + { + unsigned l_124 = 0x402E0EFCL; + int *l_130 = &l_129; + int *l_131 = &l_129; + int *l_132 = (void*)0; + int *l_133 = (void*)0; + int *l_134 = (void*)0; + int *l_135[8][6] = {{&l_129, &g_26, &g_26, &g_26, &l_129, &g_26}, {&l_129, &g_26, &g_26, &g_26, &l_129, &g_26}, {&l_129, &g_26, &g_26, &g_26, &l_129, &g_26}, {&l_129, &g_26, &g_26, &g_26, &l_129, &g_26}, {&l_129, &g_26, &g_26, &g_26, &l_129, &g_26}, {&l_129, &g_26, &g_26, &g_26, &l_129, &g_26}, {&l_129, &g_26, &g_26, &g_26, &l_129, &g_26}, {&l_129, &g_26, &g_26, &g_26, &l_129, &g_26}}; + int i, j; + step_hash(39); + (**l_128) = ((unsigned short)l_115 * (unsigned short)(l_124 | (((unsigned short)g_2[4] * (unsigned short)l_115) == (((void*)0 != l_128) | 6UL)))); + step_hash(40); + g_140--; + step_hash(45); + for (l_127 = 0; (l_127 <= 5); l_127 += 1) + { + step_hash(44); + return g_3; + } + } + step_hash(47); + (**l_128) &= (-10L); + } + else + { + int **l_145 = (void*)0; + int *l_148 = (void*)0; + int *l_149 = &l_139; + int *l_150[9][3] = {{&l_138, &l_136, &g_26}, {&l_138, &l_136, &g_26}, {&l_138, &l_136, &g_26}, {&l_138, &l_136, &g_26}, {&l_138, &l_136, &g_26}, {&l_138, &l_136, &g_26}, {&l_138, &l_136, &g_26}, {&l_138, &l_136, &g_26}, {&l_138, &l_136, &g_26}}; + int i, j; + step_hash(49); + (*l_103) = (((unsigned char)g_140 >> (unsigned char)2) ^ p_61); + step_hash(50); + --l_156[2][0]; + } + step_hash(52); + l_159 = &p_62; + step_hash(53); + g_25 = l_160; + } + step_hash(82); + for (l_129 = 12; (l_129 >= 6); l_129--) + { + unsigned short l_175[2][8]; + int i, j; + for (i = 0; i < 2; i++) + { + for (j = 0; j < 8; j++) + l_175[i][j] = 0x9F31L; + } + step_hash(81); + if ((*p_60)) + { + step_hash(59); + if ((*p_60)) + break; + step_hash(60); + if ((*g_25)) + break; + } + else + { + int *l_182 = &l_129; + step_hash(62); + if ((*g_25)) + break; + step_hash(63); + if (l_163) + continue; + step_hash(80); + for (p_62 = 0; (p_62 >= (-3)); p_62 -= 9) + { + short l_168[4][1] = {{(-1L)}, {(-1L)}, {(-1L)}, {(-1L)}}; + int i, j; + step_hash(71); + for (p_61 = 0; (p_61 == (-2)); --p_61) + { + step_hash(70); + (*l_96) ^= l_168[3][0]; + } + step_hash(79); + if ((((signed char)(((unsigned char)((int)(0L ^ (-9L)) - (int)(l_175[0][7] ^ (((int)((short)p_58 % (short)((signed char)func_67(g_26, l_182, &g_25, p_61) * (signed char)1UL)) + (int)(*p_60)) > p_58))) * (unsigned char)p_61) & 0x07L) << (signed char)p_59) > 0L)) + { + int **l_183 = &l_160; + step_hash(73); + (*l_183) = &g_154; + step_hash(74); + if (g_184[7]) + break; + } + else + { + int **l_186 = &l_160; + int ***l_185 = &l_186; + step_hash(76); + (*l_185) = &g_25; + step_hash(77); + l_153 &= func_67((*l_160), &g_3, (*l_185), (*l_182)); + step_hash(78); + (**l_185) = (**l_185); + } + } + } + } + } + else + { + int *l_194 = &g_26; + int l_206 = (-4L); + int l_207 = 1L; + int l_208 = 0xD7E750E0L; + int l_209 = 1L; + int l_227 = 0x0B6075C1L; + int l_231 = 0xF5C7D206L; + int l_234 = 0x5F4AB859L; + unsigned l_313 = 0xABF1D935L; + int ***l_349 = &l_303; + int l_410 = 4L; + unsigned l_451 = 1UL; + step_hash(84); + (*l_194) = (((unsigned short)(*l_103) % (unsigned short)p_61) && 0x4FL); + step_hash(290); + if (((unsigned)((unsigned char)((65529UL || g_184[7]) ^ g_2[1]) >> (unsigned char)(*l_96)) % (unsigned)g_199)) + { + int l_200 = (-1L); + int *l_201 = &l_200; + int *l_202 = &g_154; + int *l_203 = &g_26; + int *l_204 = (void*)0; + int *l_205[9][2]; + short l_220 = (-5L); + unsigned l_332[4][8] = {{0xED5DEBCBL, 0x8F58FCC1L, 4294967295UL, 4294967295UL, 0xE7A8B45EL, 0x835EB3EBL, 0xE7A8B45EL, 4294967295UL}, {0xED5DEBCBL, 0x8F58FCC1L, 4294967295UL, 4294967295UL, 0xE7A8B45EL, 0x835EB3EBL, 0xE7A8B45EL, 4294967295UL}, {0xED5DEBCBL, 0x8F58FCC1L, 4294967295UL, 4294967295UL, 0xE7A8B45EL, 0x835EB3EBL, 0xE7A8B45EL, 4294967295UL}, {0xED5DEBCBL, 0x8F58FCC1L, 4294967295UL, 4294967295UL, 0xE7A8B45EL, 0x835EB3EBL, 0xE7A8B45EL, 4294967295UL}}; + int ***l_348[5]; + int i, j; + for (i = 0; i < 9; i++) + { + for (j = 0; j < 2; j++) + l_205[i][j] = &g_154; + } + for (i = 0; i < 5; i++) + l_348[i] = &l_303; + step_hash(86); + g_211++; + step_hash(203); + if ((func_67((*l_202), &l_129, &l_201, p_59) == (((unsigned char)(((((*p_60) ^ (*p_60)) != (((unsigned char)p_59 << (unsigned char)p_59) ^ 0x88F8C125L)) | p_62) < p_59) / (unsigned char)1L) < l_220))) + { + short l_221 = 0x76C0L; + int l_222 = 0x1FDA6A71L; + int l_224 = 0xC58C7FB5L; + int l_229 = 0L; + int l_235 = 4L; + int l_236 = 2L; + unsigned l_241 = 0xF134357EL; + unsigned l_262 = 0x68317A62L; + int **l_263 = &g_25; + step_hash(105); + if (l_221) + { + step_hash(89); + g_154 = l_221; + step_hash(90); + (*l_96) &= (p_59 ^ (p_61 >= p_58)); + step_hash(91); + (*l_103) = (*l_96); + step_hash(92); + l_203 = &l_208; + } + else + { + unsigned char l_237 = 255UL; + int **l_240 = &l_205[8][1]; + int l_242 = 0x68A72DF7L; + int l_246 = 1L; + int l_247 = 0x965F41A6L; + step_hash(94); + l_237++; + step_hash(95); + (*l_240) = &l_136; + step_hash(96); + (*l_240) = &p_62; + step_hash(104); + if (l_241) + { + step_hash(98); + (*l_240) = &l_200; + step_hash(99); + (*l_240) = &p_62; + } + else + { + short l_243 = 0x9B24L; + int l_245 = 0xB8529774L; + int l_248 = 0xD9C56D79L; + step_hash(101); + g_249--; + step_hash(102); + (**l_240) = (*g_25); + step_hash(103); + l_207 &= ((**l_240) | (((l_248 ^ ((signed char)l_235 >> (signed char)1)) && (*l_194)) == ((short)p_62 * (short)((unsigned short)p_62 + (unsigned short)(&p_60 != &g_25))))); + } + } + step_hash(124); + for (g_230 = (-19); (g_230 == 2); ++g_230) + { + int l_268 = 0xF9731A4EL; + int l_279 = 0xC40897D5L; + step_hash(113); + for (l_129 = 0; (l_129 <= 8); l_129 += 1) + { + step_hash(112); + (*l_194) = (*g_25); + } + step_hash(114); + (*l_202) &= (((*p_60) != ((l_262 >= ((&g_25 == l_263) == ((unsigned char)((unsigned char)func_67(g_249, &g_3, &p_60, l_268) % (unsigned char)p_61) * (unsigned char)0UL))) > 0L)) || g_2[3]); + step_hash(122); + for (l_222 = 0; (l_222 != (-26)); l_222 -= 5) + { + int l_290 = 0x11371912L; + int *l_291 = (void*)0; + step_hash(118); + l_279 &= (((unsigned)p_61 / (unsigned)((unsigned char)((unsigned)g_184[6] + (unsigned)(*g_25)) - (unsigned char)((signed char)p_58 + (signed char)(-1L)))) <= g_232); + step_hash(119); + (*l_103) |= (~l_279); + step_hash(120); + (*l_201) &= (((unsigned char)((p_61 == (0xFA4CL || (*l_103))) & ((unsigned short)p_59 % (unsigned short)g_211)) + (unsigned char)p_58) < ((((unsigned char)((unsigned short)0x1156L << (unsigned short)((l_290 > (l_291 == g_292)) && 0x30F2670DL)) << (unsigned char)6) != (-6L)) == g_232)); + step_hash(121); + (*l_202) ^= (*l_96); + } + step_hash(123); + if ((*l_201)) + break; + } + step_hash(142); + for (l_206 = 0; (l_206 <= 2); l_206 += 1) + { + step_hash(132); + for (g_230 = 2; (g_230 >= 0); g_230 -= 1) + { + int i, j; + step_hash(131); + if (l_100[(l_206 + 5)][g_230]) + break; + } + step_hash(133); + (*l_103) = (*l_194); + step_hash(141); + for (g_210 = 2; (g_210 >= 0); g_210 -= 1) + { + int i, j; + step_hash(137); + if (l_100[(l_206 + 3)][g_210]) + break; + step_hash(138); + if ((*g_25)) + break; + step_hash(139); + if ((*g_25)) + continue; + step_hash(140); + if ((**l_263)) + continue; + } + } + } + else + { + signed char l_299[8][5] = {{0x3CL, (-1L), 0L, 0x02L, (-1L)}, {0x3CL, (-1L), 0L, 0x02L, (-1L)}, {0x3CL, (-1L), 0L, 0x02L, (-1L)}, {0x3CL, (-1L), 0L, 0x02L, (-1L)}, {0x3CL, (-1L), 0L, 0x02L, (-1L)}, {0x3CL, (-1L), 0L, 0x02L, (-1L)}, {0x3CL, (-1L), 0L, 0x02L, (-1L)}, {0x3CL, (-1L), 0L, 0x02L, (-1L)}}; + int *l_306 = &g_154; + unsigned l_314 = 0x42308839L; + short l_318 = 0xA17FL; + int l_327 = 0x51733B03L; + int l_336 = (-1L); + int i, j; + step_hash(185); + if (func_67(g_2[2], &p_62, &p_60, (((short)((signed char)(p_61 == (((unsigned short)func_67((*l_194), &g_232, &l_96, g_184[6]) * (unsigned short)0L) < 0x12L)) >> (signed char)g_210) * (short)l_299[5][4]) && p_62))) + { + int l_315 = 0x2D44B38EL; + step_hash(151); + if (((unsigned)p_62 + (unsigned)0x182FCCD7L)) + { + step_hash(146); + (*l_201) &= (-6L); + step_hash(147); + (*l_103) = ((l_302[1] == (void*)0) == func_67(p_58, &l_200, &l_194, ((unsigned)g_249 % (unsigned)4294967288UL))); + step_hash(148); + (*l_303) = l_306; + } + else + { + step_hash(150); + return p_59; + } + step_hash(152); + (*l_303) = (void*)0; + step_hash(153); + (*l_306) = (((((int)(*l_306) / (int)(*g_292)) > ((signed char)((signed char)(l_313 > ((p_61 < p_59) & l_314)) - (signed char)0x92L) * (signed char)(p_61 & 0xAEL))) > g_249) != l_315); + step_hash(161); + if ((~((p_59 && ((((4294967295UL != ((signed char)(g_26 > l_318) / (signed char)((int)(*p_60) - (int)0xE40CD6EAL))) == g_211) != (g_193 != &l_303)) | g_210)) < p_62))) + { + step_hash(155); + p_60 = &l_315; + } + else + { + step_hash(157); + l_194 = &g_26; + step_hash(158); + (*l_303) = &p_62; + step_hash(159); + (*l_303) = &l_315; + step_hash(160); + (*l_201) |= (((**l_303) == 2UL) || (((unsigned char)p_62 / (unsigned char)func_67((*l_306), &g_154, &g_25, p_62)) && func_67(l_315, &l_209, &g_292, (**l_303)))); + } + } + else + { + int l_331 = 0xF8220F61L; + int l_335[5]; + int i; + for (i = 0; i < 5; i++) + l_335[i] = (-1L); + step_hash(170); + for (l_129 = (-11); (l_129 != (-16)); l_129 -= 6) + { + signed char l_325 = (-10L); + int l_326[5]; + int i; + for (i = 0; i < 5; i++) + l_326[i] = 0x39BD6E01L; + step_hash(166); + --g_328; + step_hash(167); + l_332[3][0]--; + step_hash(168); + (*l_203) |= 0x141A13E0L; + step_hash(169); + if ((*p_60)) + break; + } + step_hash(171); + ++g_340[1]; + step_hash(177); + for (g_328 = (-11); (g_328 > 55); g_328++) + { + step_hash(175); + p_60 = &p_62; + step_hash(176); + (*l_303) = &p_62; + } + step_hash(184); + for (g_328 = 0; (g_328 <= 8); g_328 += 1) + { + int l_345 = (-1L); + int i; + step_hash(181); + if (l_345) + break; + step_hash(182); + (*l_306) &= (*g_292); + step_hash(183); + (*l_203) |= (0x999CL ^ g_328); + } + } + step_hash(202); + if ((*l_194)) + { + unsigned l_350 = 6UL; + int l_353[4]; + int *l_354 = (void*)0; + int i; + for (i = 0; i < 4; i++) + l_353[i] = 0xDEA73EE1L; + step_hash(187); + (*g_292) &= ((signed char)(l_348[4] != l_349) << (signed char)(+l_350)); + step_hash(195); + for (g_225 = (-17); (g_225 > 0); g_225 += 2) + { + step_hash(191); + (*g_292) ^= l_353[0]; + step_hash(192); + (**l_349) = &p_62; + step_hash(193); + p_60 = (*l_303); + step_hash(194); + if ((*p_60)) + continue; + } + step_hash(196); + (*g_292) = (((void*)0 != l_354) ^ (p_62 || g_199)); + } + else + { + step_hash(198); + (*g_292) ^= (p_62 & g_2[3]); + step_hash(199); + g_355++; + step_hash(200); + (*l_203) = (g_199 > g_210); + step_hash(201); + (*l_201) = (-3L); + } + } + step_hash(204); + (*l_96) &= 0xF551BCBEL; + step_hash(220); + for (g_226 = 15; (g_226 == (-4)); g_226 -= 9) + { + int *l_360 = &l_206; + step_hash(212); + for (l_223 = 0; (l_223 <= 1); l_223 += 1) + { + step_hash(211); + (**l_349) = l_360; + } + step_hash(213); + for (l_209 = 0; l_209 < 8; l_209 += 1) + { + for (g_339 = 0; g_339 < 3; g_339 += 1) + { + l_100[l_209][g_339] = 0x7FFDL; + } + } + step_hash(218); + for (g_26 = 0; (g_26 == 18); g_26++) + { + unsigned char l_363 = 255UL; + step_hash(217); + ++l_363; + } + step_hash(219); + (*g_292) = (-(unsigned char)((signed char)((short)0L % (short)p_61) / (signed char)g_340[1])); + } + } + else + { + int *l_385 = (void*)0; + short l_394[7][3] = {{0xAB95L, (-3L), (-6L)}, {0xAB95L, (-3L), (-6L)}, {0xAB95L, (-3L), (-6L)}, {0xAB95L, (-3L), (-6L)}, {0xAB95L, (-3L), (-6L)}, {0xAB95L, (-3L), (-6L)}, {0xAB95L, (-3L), (-6L)}}; + unsigned char l_408 = 0x2AL; + int l_412[10][3] = {{0x353F31BBL, 0x353F31BBL, 0x58FA1B2EL}, {0x353F31BBL, 0x353F31BBL, 0x58FA1B2EL}, {0x353F31BBL, 0x353F31BBL, 0x58FA1B2EL}, {0x353F31BBL, 0x353F31BBL, 0x58FA1B2EL}, {0x353F31BBL, 0x353F31BBL, 0x58FA1B2EL}, {0x353F31BBL, 0x353F31BBL, 0x58FA1B2EL}, {0x353F31BBL, 0x353F31BBL, 0x58FA1B2EL}, {0x353F31BBL, 0x353F31BBL, 0x58FA1B2EL}, {0x353F31BBL, 0x353F31BBL, 0x58FA1B2EL}, {0x353F31BBL, 0x353F31BBL, 0x58FA1B2EL}}; + int i, j; + step_hash(228); + if ((g_193 != (void*)0)) + { + int **l_386 = &l_96; + int *l_391 = &l_234; + int l_395 = (-9L); + step_hash(223); + (*l_391) = func_67((((unsigned)(((unsigned short)((unsigned short)((signed char)g_2[1] - (signed char)((((short)(((&p_60 == (void*)0) != ((signed char)((unsigned short)g_3 >> (unsigned short)7) >> (signed char)g_184[7])) > (*p_60)) << (short)2) | 0xEAL) ^ p_58)) + (unsigned short)(*l_194)) << (unsigned short)g_340[0]) > g_337[3][0]) - (unsigned)l_392) && 0x52L), l_393, &g_25, p_58); + step_hash(224); + (*l_303) = (*l_386); + step_hash(225); + --g_397; + } + else + { + step_hash(227); + return g_184[7]; + } + step_hash(277); + for (g_397 = (-16); (g_397 == 37); g_397 += 7) + { + int l_409[3][9] = {{0x0EC9AAEDL, 0x21EED9EFL, 0xB403FD4EL, 0x21EED9EFL, 0x0EC9AAEDL, 0L, 0x0EC9AAEDL, 0x21EED9EFL, 0xB403FD4EL}, {0x0EC9AAEDL, 0x21EED9EFL, 0xB403FD4EL, 0x21EED9EFL, 0x0EC9AAEDL, 0L, 0x0EC9AAEDL, 0x21EED9EFL, 0xB403FD4EL}, {0x0EC9AAEDL, 0x21EED9EFL, 0xB403FD4EL, 0x21EED9EFL, 0x0EC9AAEDL, 0L, 0x0EC9AAEDL, 0x21EED9EFL, 0xB403FD4EL}}; + int l_416[8][8] = {{0L, 7L, 0L, 0xE56BA82FL, 0xFF766F32L, 0xA9BD53F7L, 8L, 0L}, {0L, 7L, 0L, 0xE56BA82FL, 0xFF766F32L, 0xA9BD53F7L, 8L, 0L}, {0L, 7L, 0L, 0xE56BA82FL, 0xFF766F32L, 0xA9BD53F7L, 8L, 0L}, {0L, 7L, 0L, 0xE56BA82FL, 0xFF766F32L, 0xA9BD53F7L, 8L, 0L}, {0L, 7L, 0L, 0xE56BA82FL, 0xFF766F32L, 0xA9BD53F7L, 8L, 0L}, {0L, 7L, 0L, 0xE56BA82FL, 0xFF766F32L, 0xA9BD53F7L, 8L, 0L}, {0L, 7L, 0L, 0xE56BA82FL, 0xFF766F32L, 0xA9BD53F7L, 8L, 0L}, {0L, 7L, 0L, 0xE56BA82FL, 0xFF766F32L, 0xA9BD53F7L, 8L, 0L}}; + int i, j; + } + step_hash(278); + p_60 = &p_62; + step_hash(289); + for (p_59 = 0; (p_59 <= 2); p_59 += 1) + { + unsigned char l_452 = 1UL; + step_hash(282); + if (l_451) + break; + step_hash(283); + --l_452; + step_hash(288); + for (l_163 = 0; (l_163 <= 2); l_163 += 1) + { + int i, j; + step_hash(287); + (*l_194) ^= l_412[(l_163 + 5)][l_163]; + } + } + } + step_hash(297); + for (g_397 = 0; (g_397 <= 3); g_397 += 1) + { + int *l_455[1]; + int i; + for (i = 0; i < 1; i++) + l_455[i] = &l_208; + step_hash(294); + (**l_349) = &p_62; + step_hash(295); + (*l_303) = l_455[0]; + step_hash(296); + return p_59; + } + step_hash(303); + for (p_62 = 10; (p_62 < 17); p_62 += 2) + { + unsigned short l_460 = 0x08C2L; + int **l_465 = &l_96; + step_hash(301); + (*l_393) = (0xDBL & (((short)l_460 * (short)(((unsigned char)((unsigned short)func_67(p_59, &g_3, l_465, p_58) << (unsigned short)9) * (unsigned char)l_466[1][6]) < ((p_58 < p_58) || g_244))) && p_61)); + step_hash(302); + if ((**l_465)) + break; + } + } + step_hash(305); + l_467 = &p_62; + step_hash(306); + return p_61; +} + + + + + + + +static int func_67(unsigned p_68, int * p_69, int ** p_70, unsigned char p_71) +{ + int l_72 = 0x689278A4L; + unsigned l_78 = 0UL; + step_hash(10); + l_72 = (*g_25); + step_hash(16); + if ((**p_70)) + { + unsigned char l_75[3]; + unsigned char l_79 = 0xA5L; + int *l_90 = &g_26; + int i; + for (i = 0; i < 3; i++) + l_75[i] = 0x81L; + step_hash(12); + (*l_90) ^= ((short)l_75[1] << (short)((((short)l_78 + (short)(l_79 == l_78)) >= p_71) | (((unsigned)(((((short)(&g_26 == (*p_70)) * (short)((signed char)((unsigned short)(p_71 > ((((((((signed char)g_2[0] << (signed char)0) & g_2[3]) > p_68) >= p_71) == l_75[2]) == g_2[1]) && 1L)) * (unsigned short)g_2[3]) + (signed char)l_75[0])) != l_72) ^ l_78) || (*p_69)) / (unsigned)(-1L)) >= p_68))); + step_hash(13); + return (*g_25); + } + else + { + step_hash(15); + return (*p_69); + } +} + + +void csmith_compute_hash(void) +{ + int i, j; + for (i = 0; i < 5; i++) + { + transparent_crc(g_2[i], "g_2[i]", print_hash_value); + if (print_hash_value) printf("index = [%d]\n", i); + + } + transparent_crc(g_3, "g_3", print_hash_value); + transparent_crc(g_26, "g_26", print_hash_value); + transparent_crc(g_140, "g_140", print_hash_value); + transparent_crc(g_154, "g_154", print_hash_value); + for (i = 0; i < 9; i++) + { + transparent_crc(g_184[i], "g_184[i]", print_hash_value); + if (print_hash_value) printf("index = [%d]\n", i); + + } + transparent_crc(g_199, "g_199", print_hash_value); + transparent_crc(g_210, "g_210", print_hash_value); + transparent_crc(g_211, "g_211", print_hash_value); + transparent_crc(g_225, "g_225", print_hash_value); + transparent_crc(g_226, "g_226", print_hash_value); + transparent_crc(g_228, "g_228", print_hash_value); + transparent_crc(g_230, "g_230", print_hash_value); + transparent_crc(g_232, "g_232", print_hash_value); + transparent_crc(g_244, "g_244", print_hash_value); + transparent_crc(g_249, "g_249", print_hash_value); + transparent_crc(g_328, "g_328", print_hash_value); + for (i = 0; i < 8; i++) + { + for (j = 0; j < 4; j++) + { + transparent_crc(g_337[i][j], "g_337[i][j]", print_hash_value); + if (print_hash_value) printf("index = [%d][%d]\n", i, j); + + } + } + for (i = 0; i < 7; i++) + { + transparent_crc(g_338[i], "g_338[i]", print_hash_value); + if (print_hash_value) printf("index = [%d]\n", i); + + } + transparent_crc(g_339, "g_339", print_hash_value); + for (i = 0; i < 2; i++) + { + transparent_crc(g_340[i], "g_340[i]", print_hash_value); + if (print_hash_value) printf("index = [%d]\n", i); + + } + transparent_crc(g_355, "g_355", print_hash_value); + for (i = 0; i < 9; i++) + { + for (j = 0; j < 6; j++) + { + transparent_crc(g_396[i][j], "g_396[i][j]", print_hash_value); + if (print_hash_value) printf("index = [%d][%d]\n", i, j); + + } + } + transparent_crc(g_397, "g_397", print_hash_value); + transparent_crc(g_422, "g_422", print_hash_value); + for (i = 0; i < 9; i++) + { + for (j = 0; j < 1; j++) + { + transparent_crc(g_423[i][j], "g_423[i][j]", print_hash_value); + if (print_hash_value) printf("index = [%d][%d]\n", i, j); + + } + } + transparent_crc(g_429, "g_429", print_hash_value); + transparent_crc(g_444, "g_444", print_hash_value); + transparent_crc(g_503, "g_503", print_hash_value); + transparent_crc(g_524, "g_524", print_hash_value); + transparent_crc(g_534, "g_534", print_hash_value); + transparent_crc(g_543, "g_543", print_hash_value); + transparent_crc(g_545, "g_545", print_hash_value); + transparent_crc(g_548, "g_548", print_hash_value); + transparent_crc(g_577, "g_577", print_hash_value); + for (i = 0; i < 3; i++) + { + for (j = 0; j < 10; j++) + { + transparent_crc(g_594[i][j], "g_594[i][j]", print_hash_value); + if (print_hash_value) printf("index = [%d][%d]\n", i, j); + + } + } + transparent_crc(g_595, "g_595", print_hash_value); + for (i = 0; i < 9; i++) + { + for (j = 0; j < 1; j++) + { + transparent_crc(g_883[i][j], "g_883[i][j]", print_hash_value); + if (print_hash_value) printf("index = [%d][%d]\n", i, j); + + } + } + for (i = 0; i < 8; i++) + { + transparent_crc(g_1024[i], "g_1024[i]", print_hash_value); + if (print_hash_value) printf("index = [%d]\n", i); + + } + transparent_crc(g_1083, "g_1083", print_hash_value); + transparent_crc(g_1196, "g_1196", print_hash_value); + transparent_crc(g_1451, "g_1451", print_hash_value); + transparent_crc(g_1531, "g_1531", print_hash_value); + transparent_crc(g_1534, "g_1534", print_hash_value); + transparent_crc(g_1538, "g_1538", print_hash_value); + transparent_crc(g_1543, "g_1543", print_hash_value); + transparent_crc(g_1584, "g_1584", print_hash_value); + transparent_crc(g_1649, "g_1649", print_hash_value); + transparent_crc(g_1695, "g_1695", print_hash_value); +} + +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} + + + +int main (void) +{ + int i, j; + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand84.expect b/src/tests/csmith/rand84.expect new file mode 100644 index 0000000..d57d95d --- /dev/null +++ b/src/tests/csmith/rand84.expect @@ -0,0 +1,1110 @@ +...checksum after hashing g_2[i] : EC8AB03A +index = [0] +...checksum after hashing g_2[i] : DE92887D +index = [1] +...checksum after hashing g_2[i] : B8E59508 +index = [2] +...checksum after hashing g_2[i] : 3455DED9 +index = [3] +...checksum after hashing g_2[i] : D6B903B7 +index = [4] +...checksum after hashing g_3 : F99AB8C9 +...checksum after hashing g_26 : 3E723401 +...checksum after hashing g_140 : 231AE6BE +...checksum after hashing g_154 : 7E621015 +...checksum after hashing g_184[i] : 3AC8DEEE +index = [0] +...checksum after hashing g_184[i] : D5C725E8 +index = [1] +...checksum after hashing g_184[i] : C6B73277 +index = [2] +...checksum after hashing g_184[i] : A9DB790C +index = [3] +...checksum after hashing g_184[i] : 7D6F64D2 +index = [4] +...checksum after hashing g_184[i] : 96AAD07E +index = [5] +...checksum after hashing g_184[i] : EAB20FA0 +index = [6] +...checksum after hashing g_184[i] : 71441649 +index = [7] +...checksum after hashing g_184[i] : D458BBA7 +index = [8] +...checksum after hashing g_199 : CB2F2EC0 +...checksum after hashing g_210 : A5CB5946 +...checksum after hashing g_211 : F5FC44BE +...checksum after hashing g_225 : B8A32C0D +...checksum after hashing g_226 : 7C524C32 +...checksum after hashing g_228 : E788C6D9 +...checksum after hashing g_230 : 220EA665 +...checksum after hashing g_232 : 18AA005A +...checksum after hashing g_244 : 18499CF4 +...checksum after hashing g_249 : EAF34840 +...checksum after hashing g_328 : 5CF533CF +...checksum after hashing g_337[i][j] : CB34A273 +index = [0][0] +...checksum after hashing g_337[i][j] : DCCB617E +index = [0][1] +...checksum after hashing g_337[i][j] : C2BBB15C +index = [0][2] +...checksum after hashing g_337[i][j] : FF3DFF1F +index = [0][3] +...checksum after hashing g_337[i][j] : 3929DBDA +index = [1][0] +...checksum after hashing g_337[i][j] : 1B579B02 +index = [1][1] +...checksum after hashing g_337[i][j] : 83F5CA7B +index = [1][2] +...checksum after hashing g_337[i][j] : F55DFCA4 +index = [1][3] +...checksum after hashing g_337[i][j] : 74342EA1 +index = [2][0] +...checksum after hashing g_337[i][j] : E3675C95 +index = [2][1] +...checksum after hashing g_337[i][j] : 5BA2DF7E +index = [2][2] +...checksum after hashing g_337[i][j] : A59CFC78 +index = [2][3] +...checksum after hashing g_337[i][j] : A13C9F7B +index = [3][0] +...checksum after hashing g_337[i][j] : 50723D1C +index = [3][1] +...checksum after hashing g_337[i][j] : E73B83FA +index = [3][2] +...checksum after hashing g_337[i][j] : C055C434 +index = [3][3] +...checksum after hashing g_337[i][j] : 7D663506 +index = [4][0] +...checksum after hashing g_337[i][j] : D2F9B6CA +index = [4][1] +...checksum after hashing g_337[i][j] : D2A53252 +index = [4][2] +...checksum after hashing g_337[i][j] : 3567024E +index = [4][3] +...checksum after hashing g_337[i][j] : CC61CDEE +index = [5][0] +...checksum after hashing g_337[i][j] : 89C2E8A8 +index = [5][1] +...checksum after hashing g_337[i][j] : E5A36924 +index = [5][2] +...checksum after hashing g_337[i][j] : F53D3ED6 +index = [5][3] +...checksum after hashing g_337[i][j] : 42D46F3F +index = [6][0] +...checksum after hashing g_337[i][j] : 5E644B80 +index = [6][1] +...checksum after hashing g_337[i][j] : BBF151D4 +index = [6][2] +...checksum after hashing g_337[i][j] : 5D7DDF7C +index = [6][3] +...checksum after hashing g_337[i][j] : E0564816 +index = [7][0] +...checksum after hashing g_337[i][j] : 8F31C35C +index = [7][1] +...checksum after hashing g_337[i][j] : E4D569E +index = [7][2] +...checksum after hashing g_337[i][j] : 5FE0D717 +index = [7][3] +...checksum after hashing g_338[i] : C1E62C06 +index = [0] +...checksum after hashing g_338[i] : D13F9908 +index = [1] +...checksum after hashing g_338[i] : F4EC331A +index = [2] +...checksum after hashing g_338[i] : 70D6B9CB +index = [3] +...checksum after hashing g_338[i] : CDE06021 +index = [4] +...checksum after hashing g_338[i] : 81621E6E +index = [5] +...checksum after hashing g_338[i] : 21716BC5 +index = [6] +...checksum after hashing g_339 : 6BF1E0F1 +...checksum after hashing g_340[i] : 30DC87F4 +index = [0] +...checksum after hashing g_340[i] : 960978F0 +index = [1] +...checksum after hashing g_355 : 14AFFF59 +...checksum after hashing g_396[i][j] : 67949008 +index = [0][0] +...checksum after hashing g_396[i][j] : 1A3D405 +index = [0][1] +...checksum after hashing g_396[i][j] : 133F22F4 +index = [0][2] +...checksum after hashing g_396[i][j] : 7755C0E5 +index = [0][3] +...checksum after hashing g_396[i][j] : 865C953B +index = [0][4] +...checksum after hashing g_396[i][j] : 57DF898F +index = [0][5] +...checksum after hashing g_396[i][j] : F43D0B73 +index = [1][0] +...checksum after hashing g_396[i][j] : 5A1861D7 +index = [1][1] +...checksum after hashing g_396[i][j] : A77F9012 +index = [1][2] +...checksum after hashing g_396[i][j] : 7EEECCEF +index = [1][3] +...checksum after hashing g_396[i][j] : 9E1643EC +index = [1][4] +...checksum after hashing g_396[i][j] : 7CA27EF4 +index = [1][5] +...checksum after hashing g_396[i][j] : CEA5B740 +index = [2][0] +...checksum after hashing g_396[i][j] : B56E84C +index = [2][1] +...checksum after hashing g_396[i][j] : 514CD551 +index = [2][2] +...checksum after hashing g_396[i][j] : 21AB460E +index = [2][3] +...checksum after hashing g_396[i][j] : 6AAD0CC2 +index = [2][4] +...checksum after hashing g_396[i][j] : FA682D72 +index = [2][5] +...checksum after hashing g_396[i][j] : 5DA3D79F +index = [3][0] +...checksum after hashing g_396[i][j] : 2EAEFDB +index = [3][1] +...checksum after hashing g_396[i][j] : 453843D9 +index = [3][2] +...checksum after hashing g_396[i][j] : A1517417 +index = [3][3] +...checksum after hashing g_396[i][j] : 63B8AF3E +index = [3][4] +...checksum after hashing g_396[i][j] : A38F39E4 +index = [3][5] +...checksum after hashing g_396[i][j] : DD2FEE30 +index = [4][0] +...checksum after hashing g_396[i][j] : 46D66CF0 +index = [4][1] +...checksum after hashing g_396[i][j] : D33A3249 +index = [4][2] +...checksum after hashing g_396[i][j] : 6278C327 +index = [4][3] +...checksum after hashing g_396[i][j] : 15A9B3EB +index = [4][4] +...checksum after hashing g_396[i][j] : 4D86DD42 +index = [4][5] +...checksum after hashing g_396[i][j] : 8DB4A4A3 +index = [5][0] +...checksum after hashing g_396[i][j] : 6DF02889 +index = [5][1] +...checksum after hashing g_396[i][j] : DDFC8227 +index = [5][2] +...checksum after hashing g_396[i][j] : 6C7E0C8 +index = [5][3] +...checksum after hashing g_396[i][j] : 883C0D0A +index = [5][4] +...checksum after hashing g_396[i][j] : 6E0DB9A3 +index = [5][5] +...checksum after hashing g_396[i][j] : D6B9D1F0 +index = [6][0] +...checksum after hashing g_396[i][j] : AF65D44F +index = [6][1] +...checksum after hashing g_396[i][j] : 4B58648A +index = [6][2] +...checksum after hashing g_396[i][j] : C7AEC29E +index = [6][3] +...checksum after hashing g_396[i][j] : 5CFED32 +index = [6][4] +...checksum after hashing g_396[i][j] : 5EE8F4AE +index = [6][5] +...checksum after hashing g_396[i][j] : 594120BB +index = [7][0] +...checksum after hashing g_396[i][j] : F614E790 +index = [7][1] +...checksum after hashing g_396[i][j] : 37D1376B +index = [7][2] +...checksum after hashing g_396[i][j] : 74656A3F +index = [7][3] +...checksum after hashing g_396[i][j] : 5D157339 +index = [7][4] +...checksum after hashing g_396[i][j] : 60031206 +index = [7][5] +...checksum after hashing g_396[i][j] : 1A8ACF +index = [8][0] +...checksum after hashing g_396[i][j] : 8D5E6522 +index = [8][1] +...checksum after hashing g_396[i][j] : AF5A71AF +index = [8][2] +...checksum after hashing g_396[i][j] : DFFEB8EA +index = [8][3] +...checksum after hashing g_396[i][j] : 1123F27D +index = [8][4] +...checksum after hashing g_396[i][j] : 62F43015 +index = [8][5] +...checksum after hashing g_397 : 938DE89 +...checksum after hashing g_422 : 58413AC8 +...checksum after hashing g_423[i][j] : 3793DE31 +index = [0][0] +...checksum after hashing g_423[i][j] : C152434 +index = [1][0] +...checksum after hashing g_423[i][j] : 5F4AF4E9 +index = [2][0] +...checksum after hashing g_423[i][j] : C9BCE148 +index = [3][0] +...checksum after hashing g_423[i][j] : 7D0C8EF9 +index = [4][0] +...checksum after hashing g_423[i][j] : B380F236 +index = [5][0] +...checksum after hashing g_423[i][j] : 2BAFA5A2 +index = [6][0] +...checksum after hashing g_423[i][j] : 9CB6C87F +index = [7][0] +...checksum after hashing g_423[i][j] : C6827E7F +index = [8][0] +...checksum after hashing g_429 : 12AEE81C +...checksum after hashing g_444 : EF706BB9 +...checksum after hashing g_503 : A28A1BB7 +...checksum after hashing g_524 : 6D0B203F +...checksum after hashing g_534 : 83C84F43 +...checksum after hashing g_543 : E0D2BAA9 +...checksum after hashing g_545 : CAEAB7B0 +...checksum after hashing g_548 : 14D9B9E9 +...checksum after hashing g_577 : 7655A416 +...checksum after hashing g_594[i][j] : D1860027 +index = [0][0] +...checksum after hashing g_594[i][j] : 1071C9C9 +index = [0][1] +...checksum after hashing g_594[i][j] : BA87D450 +index = [0][2] +...checksum after hashing g_594[i][j] : AF624591 +index = [0][3] +...checksum after hashing g_594[i][j] : 6620FE76 +index = [0][4] +...checksum after hashing g_594[i][j] : 71C2C294 +index = [0][5] +...checksum after hashing g_594[i][j] : 7AE8407B +index = [0][6] +...checksum after hashing g_594[i][j] : 5B4AC85A +index = [0][7] +...checksum after hashing g_594[i][j] : C90C870D +index = [0][8] +...checksum after hashing g_594[i][j] : E9846301 +index = [0][9] +...checksum after hashing g_594[i][j] : 703B954F +index = [1][0] +...checksum after hashing g_594[i][j] : E5812FB5 +index = [1][1] +...checksum after hashing g_594[i][j] : EF6A8048 +index = [1][2] +...checksum after hashing g_594[i][j] : A1AB9457 +index = [1][3] +...checksum after hashing g_594[i][j] : 44CD51AB +index = [1][4] +...checksum after hashing g_594[i][j] : 496875C8 +index = [1][5] +...checksum after hashing g_594[i][j] : 47C8F409 +index = [1][6] +...checksum after hashing g_594[i][j] : 95C79E32 +index = [1][7] +...checksum after hashing g_594[i][j] : AD5E0352 +index = [1][8] +...checksum after hashing g_594[i][j] : 5E84553E +index = [1][9] +...checksum after hashing g_594[i][j] : AD90C2B5 +index = [2][0] +...checksum after hashing g_594[i][j] : D0382A08 +index = [2][1] +...checksum after hashing g_594[i][j] : 650D0536 +index = [2][2] +...checksum after hashing g_594[i][j] : EA640DCD +index = [2][3] +...checksum after hashing g_594[i][j] : C99E808D +index = [2][4] +...checksum after hashing g_594[i][j] : 42E52B27 +index = [2][5] +...checksum after hashing g_594[i][j] : B6099953 +index = [2][6] +...checksum after hashing g_594[i][j] : 69230D02 +index = [2][7] +...checksum after hashing g_594[i][j] : 2C397585 +index = [2][8] +...checksum after hashing g_594[i][j] : 5788E2A +index = [2][9] +...checksum after hashing g_595 : B0D52D5 +...checksum after hashing g_883[i][j] : 6EE2125 +index = [0][0] +...checksum after hashing g_883[i][j] : DDDD3D19 +index = [1][0] +...checksum after hashing g_883[i][j] : 97764E78 +index = [2][0] +...checksum after hashing g_883[i][j] : 99A1C5BB +index = [3][0] +...checksum after hashing g_883[i][j] : 39F80EED +index = [4][0] +...checksum after hashing g_883[i][j] : F7CB62C7 +index = [5][0] +...checksum after hashing g_883[i][j] : F13E955E +index = [6][0] +...checksum after hashing g_883[i][j] : 155EEE8 +index = [7][0] +...checksum after hashing g_883[i][j] : 5A5C386F +index = [8][0] +...checksum after hashing g_1024[i] : 444282B4 +index = [0] +...checksum after hashing g_1024[i] : 5390C556 +index = [1] +...checksum after hashing g_1024[i] : 6AEEF5FA +index = [2] +...checksum after hashing g_1024[i] : A7816AA7 +index = [3] +...checksum after hashing g_1024[i] : 6F198B70 +index = [4] +...checksum after hashing g_1024[i] : 509DFA57 +index = [5] +...checksum after hashing g_1024[i] : D1C21FC5 +index = [6] +...checksum after hashing g_1024[i] : CE3ED68C +index = [7] +...checksum after hashing g_1083 : EC6D4B34 +...checksum after hashing g_1196 : 3BB05B6E +...checksum after hashing g_1451 : 6593116A +...checksum after hashing g_1531 : 8C15DD54 +...checksum after hashing g_1534 : 30D93C9F +...checksum after hashing g_1538 : 418E5C03 +...checksum after hashing g_1543 : 4A300480 +...checksum after hashing g_1584 : A297A52 +...checksum after hashing g_1649 : 46E73E7B +...checksum after hashing g_1695 : E3B49176 +before stmt(1031): checksum = E3B49176 +...checksum after hashing g_2[i] : EC8AB03A +index = [0] +...checksum after hashing g_2[i] : DE92887D +index = [1] +...checksum after hashing g_2[i] : B8E59508 +index = [2] +...checksum after hashing g_2[i] : 3455DED9 +index = [3] +...checksum after hashing g_2[i] : D6B903B7 +index = [4] +...checksum after hashing g_3 : F99AB8C9 +...checksum after hashing g_26 : 3E723401 +...checksum after hashing g_140 : 231AE6BE +...checksum after hashing g_154 : 7E621015 +...checksum after hashing g_184[i] : 3AC8DEEE +index = [0] +...checksum after hashing g_184[i] : D5C725E8 +index = [1] +...checksum after hashing g_184[i] : C6B73277 +index = [2] +...checksum after hashing g_184[i] : A9DB790C +index = [3] +...checksum after hashing g_184[i] : 7D6F64D2 +index = [4] +...checksum after hashing g_184[i] : 96AAD07E +index = [5] +...checksum after hashing g_184[i] : EAB20FA0 +index = [6] +...checksum after hashing g_184[i] : 71441649 +index = [7] +...checksum after hashing g_184[i] : D458BBA7 +index = [8] +...checksum after hashing g_199 : CB2F2EC0 +...checksum after hashing g_210 : A5CB5946 +...checksum after hashing g_211 : F5FC44BE +...checksum after hashing g_225 : B8A32C0D +...checksum after hashing g_226 : 7C524C32 +...checksum after hashing g_228 : E788C6D9 +...checksum after hashing g_230 : 220EA665 +...checksum after hashing g_232 : 18AA005A +...checksum after hashing g_244 : 18499CF4 +...checksum after hashing g_249 : EAF34840 +...checksum after hashing g_328 : 5CF533CF +...checksum after hashing g_337[i][j] : CB34A273 +index = [0][0] +...checksum after hashing g_337[i][j] : DCCB617E +index = [0][1] +...checksum after hashing g_337[i][j] : C2BBB15C +index = [0][2] +...checksum after hashing g_337[i][j] : FF3DFF1F +index = [0][3] +...checksum after hashing g_337[i][j] : 3929DBDA +index = [1][0] +...checksum after hashing g_337[i][j] : 1B579B02 +index = [1][1] +...checksum after hashing g_337[i][j] : 83F5CA7B +index = [1][2] +...checksum after hashing g_337[i][j] : F55DFCA4 +index = [1][3] +...checksum after hashing g_337[i][j] : 74342EA1 +index = [2][0] +...checksum after hashing g_337[i][j] : E3675C95 +index = [2][1] +...checksum after hashing g_337[i][j] : 5BA2DF7E +index = [2][2] +...checksum after hashing g_337[i][j] : A59CFC78 +index = [2][3] +...checksum after hashing g_337[i][j] : A13C9F7B +index = [3][0] +...checksum after hashing g_337[i][j] : 50723D1C +index = [3][1] +...checksum after hashing g_337[i][j] : E73B83FA +index = [3][2] +...checksum after hashing g_337[i][j] : C055C434 +index = [3][3] +...checksum after hashing g_337[i][j] : 7D663506 +index = [4][0] +...checksum after hashing g_337[i][j] : D2F9B6CA +index = [4][1] +...checksum after hashing g_337[i][j] : D2A53252 +index = [4][2] +...checksum after hashing g_337[i][j] : 3567024E +index = [4][3] +...checksum after hashing g_337[i][j] : CC61CDEE +index = [5][0] +...checksum after hashing g_337[i][j] : 89C2E8A8 +index = [5][1] +...checksum after hashing g_337[i][j] : E5A36924 +index = [5][2] +...checksum after hashing g_337[i][j] : F53D3ED6 +index = [5][3] +...checksum after hashing g_337[i][j] : 42D46F3F +index = [6][0] +...checksum after hashing g_337[i][j] : 5E644B80 +index = [6][1] +...checksum after hashing g_337[i][j] : BBF151D4 +index = [6][2] +...checksum after hashing g_337[i][j] : 5D7DDF7C +index = [6][3] +...checksum after hashing g_337[i][j] : E0564816 +index = [7][0] +...checksum after hashing g_337[i][j] : 8F31C35C +index = [7][1] +...checksum after hashing g_337[i][j] : E4D569E +index = [7][2] +...checksum after hashing g_337[i][j] : 5FE0D717 +index = [7][3] +...checksum after hashing g_338[i] : C1E62C06 +index = [0] +...checksum after hashing g_338[i] : D13F9908 +index = [1] +...checksum after hashing g_338[i] : F4EC331A +index = [2] +...checksum after hashing g_338[i] : 70D6B9CB +index = [3] +...checksum after hashing g_338[i] : CDE06021 +index = [4] +...checksum after hashing g_338[i] : 81621E6E +index = [5] +...checksum after hashing g_338[i] : 21716BC5 +index = [6] +...checksum after hashing g_339 : 6BF1E0F1 +...checksum after hashing g_340[i] : 30DC87F4 +index = [0] +...checksum after hashing g_340[i] : 960978F0 +index = [1] +...checksum after hashing g_355 : 14AFFF59 +...checksum after hashing g_396[i][j] : 67949008 +index = [0][0] +...checksum after hashing g_396[i][j] : 1A3D405 +index = [0][1] +...checksum after hashing g_396[i][j] : 133F22F4 +index = [0][2] +...checksum after hashing g_396[i][j] : 7755C0E5 +index = [0][3] +...checksum after hashing g_396[i][j] : 865C953B +index = [0][4] +...checksum after hashing g_396[i][j] : 57DF898F +index = [0][5] +...checksum after hashing g_396[i][j] : F43D0B73 +index = [1][0] +...checksum after hashing g_396[i][j] : 5A1861D7 +index = [1][1] +...checksum after hashing g_396[i][j] : A77F9012 +index = [1][2] +...checksum after hashing g_396[i][j] : 7EEECCEF +index = [1][3] +...checksum after hashing g_396[i][j] : 9E1643EC +index = [1][4] +...checksum after hashing g_396[i][j] : 7CA27EF4 +index = [1][5] +...checksum after hashing g_396[i][j] : CEA5B740 +index = [2][0] +...checksum after hashing g_396[i][j] : B56E84C +index = [2][1] +...checksum after hashing g_396[i][j] : 514CD551 +index = [2][2] +...checksum after hashing g_396[i][j] : 21AB460E +index = [2][3] +...checksum after hashing g_396[i][j] : 6AAD0CC2 +index = [2][4] +...checksum after hashing g_396[i][j] : FA682D72 +index = [2][5] +...checksum after hashing g_396[i][j] : 5DA3D79F +index = [3][0] +...checksum after hashing g_396[i][j] : 2EAEFDB +index = [3][1] +...checksum after hashing g_396[i][j] : 453843D9 +index = [3][2] +...checksum after hashing g_396[i][j] : A1517417 +index = [3][3] +...checksum after hashing g_396[i][j] : 63B8AF3E +index = [3][4] +...checksum after hashing g_396[i][j] : A38F39E4 +index = [3][5] +...checksum after hashing g_396[i][j] : DD2FEE30 +index = [4][0] +...checksum after hashing g_396[i][j] : 46D66CF0 +index = [4][1] +...checksum after hashing g_396[i][j] : D33A3249 +index = [4][2] +...checksum after hashing g_396[i][j] : 6278C327 +index = [4][3] +...checksum after hashing g_396[i][j] : 15A9B3EB +index = [4][4] +...checksum after hashing g_396[i][j] : 4D86DD42 +index = [4][5] +...checksum after hashing g_396[i][j] : 8DB4A4A3 +index = [5][0] +...checksum after hashing g_396[i][j] : 6DF02889 +index = [5][1] +...checksum after hashing g_396[i][j] : DDFC8227 +index = [5][2] +...checksum after hashing g_396[i][j] : 6C7E0C8 +index = [5][3] +...checksum after hashing g_396[i][j] : 883C0D0A +index = [5][4] +...checksum after hashing g_396[i][j] : 6E0DB9A3 +index = [5][5] +...checksum after hashing g_396[i][j] : D6B9D1F0 +index = [6][0] +...checksum after hashing g_396[i][j] : AF65D44F +index = [6][1] +...checksum after hashing g_396[i][j] : 4B58648A +index = [6][2] +...checksum after hashing g_396[i][j] : C7AEC29E +index = [6][3] +...checksum after hashing g_396[i][j] : 5CFED32 +index = [6][4] +...checksum after hashing g_396[i][j] : 5EE8F4AE +index = [6][5] +...checksum after hashing g_396[i][j] : 594120BB +index = [7][0] +...checksum after hashing g_396[i][j] : F614E790 +index = [7][1] +...checksum after hashing g_396[i][j] : 37D1376B +index = [7][2] +...checksum after hashing g_396[i][j] : 74656A3F +index = [7][3] +...checksum after hashing g_396[i][j] : 5D157339 +index = [7][4] +...checksum after hashing g_396[i][j] : 60031206 +index = [7][5] +...checksum after hashing g_396[i][j] : 1A8ACF +index = [8][0] +...checksum after hashing g_396[i][j] : 8D5E6522 +index = [8][1] +...checksum after hashing g_396[i][j] : AF5A71AF +index = [8][2] +...checksum after hashing g_396[i][j] : DFFEB8EA +index = [8][3] +...checksum after hashing g_396[i][j] : 1123F27D +index = [8][4] +...checksum after hashing g_396[i][j] : 62F43015 +index = [8][5] +...checksum after hashing g_397 : 938DE89 +...checksum after hashing g_422 : 58413AC8 +...checksum after hashing g_423[i][j] : 3793DE31 +index = [0][0] +...checksum after hashing g_423[i][j] : C152434 +index = [1][0] +...checksum after hashing g_423[i][j] : 5F4AF4E9 +index = [2][0] +...checksum after hashing g_423[i][j] : C9BCE148 +index = [3][0] +...checksum after hashing g_423[i][j] : 7D0C8EF9 +index = [4][0] +...checksum after hashing g_423[i][j] : B380F236 +index = [5][0] +...checksum after hashing g_423[i][j] : 2BAFA5A2 +index = [6][0] +...checksum after hashing g_423[i][j] : 9CB6C87F +index = [7][0] +...checksum after hashing g_423[i][j] : C6827E7F +index = [8][0] +...checksum after hashing g_429 : 12AEE81C +...checksum after hashing g_444 : EF706BB9 +...checksum after hashing g_503 : A28A1BB7 +...checksum after hashing g_524 : 6D0B203F +...checksum after hashing g_534 : 83C84F43 +...checksum after hashing g_543 : E0D2BAA9 +...checksum after hashing g_545 : CAEAB7B0 +...checksum after hashing g_548 : 14D9B9E9 +...checksum after hashing g_577 : 7655A416 +...checksum after hashing g_594[i][j] : D1860027 +index = [0][0] +...checksum after hashing g_594[i][j] : 1071C9C9 +index = [0][1] +...checksum after hashing g_594[i][j] : BA87D450 +index = [0][2] +...checksum after hashing g_594[i][j] : AF624591 +index = [0][3] +...checksum after hashing g_594[i][j] : 6620FE76 +index = [0][4] +...checksum after hashing g_594[i][j] : 71C2C294 +index = [0][5] +...checksum after hashing g_594[i][j] : 7AE8407B +index = [0][6] +...checksum after hashing g_594[i][j] : 5B4AC85A +index = [0][7] +...checksum after hashing g_594[i][j] : C90C870D +index = [0][8] +...checksum after hashing g_594[i][j] : E9846301 +index = [0][9] +...checksum after hashing g_594[i][j] : 703B954F +index = [1][0] +...checksum after hashing g_594[i][j] : E5812FB5 +index = [1][1] +...checksum after hashing g_594[i][j] : EF6A8048 +index = [1][2] +...checksum after hashing g_594[i][j] : A1AB9457 +index = [1][3] +...checksum after hashing g_594[i][j] : 44CD51AB +index = [1][4] +...checksum after hashing g_594[i][j] : 496875C8 +index = [1][5] +...checksum after hashing g_594[i][j] : 47C8F409 +index = [1][6] +...checksum after hashing g_594[i][j] : 95C79E32 +index = [1][7] +...checksum after hashing g_594[i][j] : AD5E0352 +index = [1][8] +...checksum after hashing g_594[i][j] : 5E84553E +index = [1][9] +...checksum after hashing g_594[i][j] : AD90C2B5 +index = [2][0] +...checksum after hashing g_594[i][j] : D0382A08 +index = [2][1] +...checksum after hashing g_594[i][j] : 650D0536 +index = [2][2] +...checksum after hashing g_594[i][j] : EA640DCD +index = [2][3] +...checksum after hashing g_594[i][j] : C99E808D +index = [2][4] +...checksum after hashing g_594[i][j] : 42E52B27 +index = [2][5] +...checksum after hashing g_594[i][j] : B6099953 +index = [2][6] +...checksum after hashing g_594[i][j] : 69230D02 +index = [2][7] +...checksum after hashing g_594[i][j] : 2C397585 +index = [2][8] +...checksum after hashing g_594[i][j] : 5788E2A +index = [2][9] +...checksum after hashing g_595 : B0D52D5 +...checksum after hashing g_883[i][j] : 6EE2125 +index = [0][0] +...checksum after hashing g_883[i][j] : DDDD3D19 +index = [1][0] +...checksum after hashing g_883[i][j] : 97764E78 +index = [2][0] +...checksum after hashing g_883[i][j] : 99A1C5BB +index = [3][0] +...checksum after hashing g_883[i][j] : 39F80EED +index = [4][0] +...checksum after hashing g_883[i][j] : F7CB62C7 +index = [5][0] +...checksum after hashing g_883[i][j] : F13E955E +index = [6][0] +...checksum after hashing g_883[i][j] : 155EEE8 +index = [7][0] +...checksum after hashing g_883[i][j] : 5A5C386F +index = [8][0] +...checksum after hashing g_1024[i] : 444282B4 +index = [0] +...checksum after hashing g_1024[i] : 5390C556 +index = [1] +...checksum after hashing g_1024[i] : 6AEEF5FA +index = [2] +...checksum after hashing g_1024[i] : A7816AA7 +index = [3] +...checksum after hashing g_1024[i] : 6F198B70 +index = [4] +...checksum after hashing g_1024[i] : 509DFA57 +index = [5] +...checksum after hashing g_1024[i] : D1C21FC5 +index = [6] +...checksum after hashing g_1024[i] : CE3ED68C +index = [7] +...checksum after hashing g_1083 : EC6D4B34 +...checksum after hashing g_1196 : 3BB05B6E +...checksum after hashing g_1451 : 6593116A +...checksum after hashing g_1531 : 8C15DD54 +...checksum after hashing g_1534 : 30D93C9F +...checksum after hashing g_1538 : 418E5C03 +...checksum after hashing g_1543 : 4A300480 +...checksum after hashing g_1584 : A297A52 +...checksum after hashing g_1649 : 46E73E7B +...checksum after hashing g_1695 : E3B49176 +before stmt(2): checksum = E3B49176 +...checksum after hashing g_2[i] : EC8AB03A +index = [0] +...checksum after hashing g_2[i] : DE92887D +index = [1] +...checksum after hashing g_2[i] : B8E59508 +index = [2] +...checksum after hashing g_2[i] : 3455DED9 +index = [3] +...checksum after hashing g_2[i] : D6B903B7 +index = [4] +...checksum after hashing g_3 : F99AB8C9 +...checksum after hashing g_26 : 3E723401 +...checksum after hashing g_140 : 231AE6BE +...checksum after hashing g_154 : 7E621015 +...checksum after hashing g_184[i] : 3AC8DEEE +index = [0] +...checksum after hashing g_184[i] : D5C725E8 +index = [1] +...checksum after hashing g_184[i] : C6B73277 +index = [2] +...checksum after hashing g_184[i] : A9DB790C +index = [3] +...checksum after hashing g_184[i] : 7D6F64D2 +index = [4] +...checksum after hashing g_184[i] : 96AAD07E +index = [5] +...checksum after hashing g_184[i] : EAB20FA0 +index = [6] +...checksum after hashing g_184[i] : 71441649 +index = [7] +...checksum after hashing g_184[i] : D458BBA7 +index = [8] +...checksum after hashing g_199 : CB2F2EC0 +...checksum after hashing g_210 : A5CB5946 +...checksum after hashing g_211 : F5FC44BE +...checksum after hashing g_225 : B8A32C0D +...checksum after hashing g_226 : 7C524C32 +...checksum after hashing g_228 : E788C6D9 +...checksum after hashing g_230 : 220EA665 +...checksum after hashing g_232 : 18AA005A +...checksum after hashing g_244 : 18499CF4 +...checksum after hashing g_249 : EAF34840 +...checksum after hashing g_328 : 5CF533CF +...checksum after hashing g_337[i][j] : CB34A273 +index = [0][0] +...checksum after hashing g_337[i][j] : DCCB617E +index = [0][1] +...checksum after hashing g_337[i][j] : C2BBB15C +index = [0][2] +...checksum after hashing g_337[i][j] : FF3DFF1F +index = [0][3] +...checksum after hashing g_337[i][j] : 3929DBDA +index = [1][0] +...checksum after hashing g_337[i][j] : 1B579B02 +index = [1][1] +...checksum after hashing g_337[i][j] : 83F5CA7B +index = [1][2] +...checksum after hashing g_337[i][j] : F55DFCA4 +index = [1][3] +...checksum after hashing g_337[i][j] : 74342EA1 +index = [2][0] +...checksum after hashing g_337[i][j] : E3675C95 +index = [2][1] +...checksum after hashing g_337[i][j] : 5BA2DF7E +index = [2][2] +...checksum after hashing g_337[i][j] : A59CFC78 +index = [2][3] +...checksum after hashing g_337[i][j] : A13C9F7B +index = [3][0] +...checksum after hashing g_337[i][j] : 50723D1C +index = [3][1] +...checksum after hashing g_337[i][j] : E73B83FA +index = [3][2] +...checksum after hashing g_337[i][j] : C055C434 +index = [3][3] +...checksum after hashing g_337[i][j] : 7D663506 +index = [4][0] +...checksum after hashing g_337[i][j] : D2F9B6CA +index = [4][1] +...checksum after hashing g_337[i][j] : D2A53252 +index = [4][2] +...checksum after hashing g_337[i][j] : 3567024E +index = [4][3] +...checksum after hashing g_337[i][j] : CC61CDEE +index = [5][0] +...checksum after hashing g_337[i][j] : 89C2E8A8 +index = [5][1] +...checksum after hashing g_337[i][j] : E5A36924 +index = [5][2] +...checksum after hashing g_337[i][j] : F53D3ED6 +index = [5][3] +...checksum after hashing g_337[i][j] : 42D46F3F +index = [6][0] +...checksum after hashing g_337[i][j] : 5E644B80 +index = [6][1] +...checksum after hashing g_337[i][j] : BBF151D4 +index = [6][2] +...checksum after hashing g_337[i][j] : 5D7DDF7C +index = [6][3] +...checksum after hashing g_337[i][j] : E0564816 +index = [7][0] +...checksum after hashing g_337[i][j] : 8F31C35C +index = [7][1] +...checksum after hashing g_337[i][j] : E4D569E +index = [7][2] +...checksum after hashing g_337[i][j] : 5FE0D717 +index = [7][3] +...checksum after hashing g_338[i] : C1E62C06 +index = [0] +...checksum after hashing g_338[i] : D13F9908 +index = [1] +...checksum after hashing g_338[i] : F4EC331A +index = [2] +...checksum after hashing g_338[i] : 70D6B9CB +index = [3] +...checksum after hashing g_338[i] : CDE06021 +index = [4] +...checksum after hashing g_338[i] : 81621E6E +index = [5] +...checksum after hashing g_338[i] : 21716BC5 +index = [6] +...checksum after hashing g_339 : 6BF1E0F1 +...checksum after hashing g_340[i] : 30DC87F4 +index = [0] +...checksum after hashing g_340[i] : 960978F0 +index = [1] +...checksum after hashing g_355 : 14AFFF59 +...checksum after hashing g_396[i][j] : 67949008 +index = [0][0] +...checksum after hashing g_396[i][j] : 1A3D405 +index = [0][1] +...checksum after hashing g_396[i][j] : 133F22F4 +index = [0][2] +...checksum after hashing g_396[i][j] : 7755C0E5 +index = [0][3] +...checksum after hashing g_396[i][j] : 865C953B +index = [0][4] +...checksum after hashing g_396[i][j] : 57DF898F +index = [0][5] +...checksum after hashing g_396[i][j] : F43D0B73 +index = [1][0] +...checksum after hashing g_396[i][j] : 5A1861D7 +index = [1][1] +...checksum after hashing g_396[i][j] : A77F9012 +index = [1][2] +...checksum after hashing g_396[i][j] : 7EEECCEF +index = [1][3] +...checksum after hashing g_396[i][j] : 9E1643EC +index = [1][4] +...checksum after hashing g_396[i][j] : 7CA27EF4 +index = [1][5] +...checksum after hashing g_396[i][j] : CEA5B740 +index = [2][0] +...checksum after hashing g_396[i][j] : B56E84C +index = [2][1] +...checksum after hashing g_396[i][j] : 514CD551 +index = [2][2] +...checksum after hashing g_396[i][j] : 21AB460E +index = [2][3] +...checksum after hashing g_396[i][j] : 6AAD0CC2 +index = [2][4] +...checksum after hashing g_396[i][j] : FA682D72 +index = [2][5] +...checksum after hashing g_396[i][j] : 5DA3D79F +index = [3][0] +...checksum after hashing g_396[i][j] : 2EAEFDB +index = [3][1] +...checksum after hashing g_396[i][j] : 453843D9 +index = [3][2] +...checksum after hashing g_396[i][j] : A1517417 +index = [3][3] +...checksum after hashing g_396[i][j] : 63B8AF3E +index = [3][4] +...checksum after hashing g_396[i][j] : A38F39E4 +index = [3][5] +...checksum after hashing g_396[i][j] : DD2FEE30 +index = [4][0] +...checksum after hashing g_396[i][j] : 46D66CF0 +index = [4][1] +...checksum after hashing g_396[i][j] : D33A3249 +index = [4][2] +...checksum after hashing g_396[i][j] : 6278C327 +index = [4][3] +...checksum after hashing g_396[i][j] : 15A9B3EB +index = [4][4] +...checksum after hashing g_396[i][j] : 4D86DD42 +index = [4][5] +...checksum after hashing g_396[i][j] : 8DB4A4A3 +index = [5][0] +...checksum after hashing g_396[i][j] : 6DF02889 +index = [5][1] +...checksum after hashing g_396[i][j] : DDFC8227 +index = [5][2] +...checksum after hashing g_396[i][j] : 6C7E0C8 +index = [5][3] +...checksum after hashing g_396[i][j] : 883C0D0A +index = [5][4] +...checksum after hashing g_396[i][j] : 6E0DB9A3 +index = [5][5] +...checksum after hashing g_396[i][j] : D6B9D1F0 +index = [6][0] +...checksum after hashing g_396[i][j] : AF65D44F +index = [6][1] +...checksum after hashing g_396[i][j] : 4B58648A +index = [6][2] +...checksum after hashing g_396[i][j] : C7AEC29E +index = [6][3] +...checksum after hashing g_396[i][j] : 5CFED32 +index = [6][4] +...checksum after hashing g_396[i][j] : 5EE8F4AE +index = [6][5] +...checksum after hashing g_396[i][j] : 594120BB +index = [7][0] +...checksum after hashing g_396[i][j] : F614E790 +index = [7][1] +...checksum after hashing g_396[i][j] : 37D1376B +index = [7][2] +...checksum after hashing g_396[i][j] : 74656A3F +index = [7][3] +...checksum after hashing g_396[i][j] : 5D157339 +index = [7][4] +...checksum after hashing g_396[i][j] : 60031206 +index = [7][5] +...checksum after hashing g_396[i][j] : 1A8ACF +index = [8][0] +...checksum after hashing g_396[i][j] : 8D5E6522 +index = [8][1] +...checksum after hashing g_396[i][j] : AF5A71AF +index = [8][2] +...checksum after hashing g_396[i][j] : DFFEB8EA +index = [8][3] +...checksum after hashing g_396[i][j] : 1123F27D +index = [8][4] +...checksum after hashing g_396[i][j] : 62F43015 +index = [8][5] +...checksum after hashing g_397 : 938DE89 +...checksum after hashing g_422 : 58413AC8 +...checksum after hashing g_423[i][j] : 3793DE31 +index = [0][0] +...checksum after hashing g_423[i][j] : C152434 +index = [1][0] +...checksum after hashing g_423[i][j] : 5F4AF4E9 +index = [2][0] +...checksum after hashing g_423[i][j] : C9BCE148 +index = [3][0] +...checksum after hashing g_423[i][j] : 7D0C8EF9 +index = [4][0] +...checksum after hashing g_423[i][j] : B380F236 +index = [5][0] +...checksum after hashing g_423[i][j] : 2BAFA5A2 +index = [6][0] +...checksum after hashing g_423[i][j] : 9CB6C87F +index = [7][0] +...checksum after hashing g_423[i][j] : C6827E7F +index = [8][0] +...checksum after hashing g_429 : 12AEE81C +...checksum after hashing g_444 : EF706BB9 +...checksum after hashing g_503 : A28A1BB7 +...checksum after hashing g_524 : 6D0B203F +...checksum after hashing g_534 : 83C84F43 +...checksum after hashing g_543 : E0D2BAA9 +...checksum after hashing g_545 : CAEAB7B0 +...checksum after hashing g_548 : 14D9B9E9 +...checksum after hashing g_577 : 7655A416 +...checksum after hashing g_594[i][j] : D1860027 +index = [0][0] +...checksum after hashing g_594[i][j] : 1071C9C9 +index = [0][1] +...checksum after hashing g_594[i][j] : BA87D450 +index = [0][2] +...checksum after hashing g_594[i][j] : AF624591 +index = [0][3] +...checksum after hashing g_594[i][j] : 6620FE76 +index = [0][4] +...checksum after hashing g_594[i][j] : 71C2C294 +index = [0][5] +...checksum after hashing g_594[i][j] : 7AE8407B +index = [0][6] +...checksum after hashing g_594[i][j] : 5B4AC85A +index = [0][7] +...checksum after hashing g_594[i][j] : C90C870D +index = [0][8] +...checksum after hashing g_594[i][j] : E9846301 +index = [0][9] +...checksum after hashing g_594[i][j] : 703B954F +index = [1][0] +...checksum after hashing g_594[i][j] : E5812FB5 +index = [1][1] +...checksum after hashing g_594[i][j] : EF6A8048 +index = [1][2] +...checksum after hashing g_594[i][j] : A1AB9457 +index = [1][3] +...checksum after hashing g_594[i][j] : 44CD51AB +index = [1][4] +...checksum after hashing g_594[i][j] : 496875C8 +index = [1][5] +...checksum after hashing g_594[i][j] : 47C8F409 +index = [1][6] +...checksum after hashing g_594[i][j] : 95C79E32 +index = [1][7] +...checksum after hashing g_594[i][j] : AD5E0352 +index = [1][8] +...checksum after hashing g_594[i][j] : 5E84553E +index = [1][9] +...checksum after hashing g_594[i][j] : AD90C2B5 +index = [2][0] +...checksum after hashing g_594[i][j] : D0382A08 +index = [2][1] +...checksum after hashing g_594[i][j] : 650D0536 +index = [2][2] +...checksum after hashing g_594[i][j] : EA640DCD +index = [2][3] +...checksum after hashing g_594[i][j] : C99E808D +index = [2][4] +...checksum after hashing g_594[i][j] : 42E52B27 +index = [2][5] +...checksum after hashing g_594[i][j] : B6099953 +index = [2][6] +...checksum after hashing g_594[i][j] : 69230D02 +index = [2][7] +...checksum after hashing g_594[i][j] : 2C397585 +index = [2][8] +...checksum after hashing g_594[i][j] : 5788E2A +index = [2][9] +...checksum after hashing g_595 : B0D52D5 +...checksum after hashing g_883[i][j] : 6EE2125 +index = [0][0] +...checksum after hashing g_883[i][j] : DDDD3D19 +index = [1][0] +...checksum after hashing g_883[i][j] : 97764E78 +index = [2][0] +...checksum after hashing g_883[i][j] : 99A1C5BB +index = [3][0] +...checksum after hashing g_883[i][j] : 39F80EED +index = [4][0] +...checksum after hashing g_883[i][j] : F7CB62C7 +index = [5][0] +...checksum after hashing g_883[i][j] : F13E955E +index = [6][0] +...checksum after hashing g_883[i][j] : 155EEE8 +index = [7][0] +...checksum after hashing g_883[i][j] : 5A5C386F +index = [8][0] +...checksum after hashing g_1024[i] : 444282B4 +index = [0] +...checksum after hashing g_1024[i] : 5390C556 +index = [1] +...checksum after hashing g_1024[i] : 6AEEF5FA +index = [2] +...checksum after hashing g_1024[i] : A7816AA7 +index = [3] +...checksum after hashing g_1024[i] : 6F198B70 +index = [4] +...checksum after hashing g_1024[i] : 509DFA57 +index = [5] +...checksum after hashing g_1024[i] : D1C21FC5 +index = [6] +...checksum after hashing g_1024[i] : CE3ED68C +index = [7] +...checksum after hashing g_1083 : EC6D4B34 +...checksum after hashing g_1196 : 3BB05B6E +...checksum after hashing g_1451 : 6593116A +...checksum after hashing g_1531 : 8C15DD54 +...checksum after hashing g_1534 : 30D93C9F +...checksum after hashing g_1538 : 418E5C03 +...checksum after hashing g_1543 : 4A300480 +...checksum after hashing g_1584 : A297A52 +...checksum after hashing g_1649 : 46E73E7B +...checksum after hashing g_1695 : E3B49176 +checksum = e3b49176 diff --git a/src/tests/csmith/rand85.c b/src/tests/csmith/rand85.c new file mode 100644 index 0000000..174b830 --- /dev/null +++ b/src/tests/csmith/rand85.c @@ -0,0 +1,2133 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static int g_3 = (-6L); +static int g_81 = 0x97D63F7CL; +static int g_83[9] = {0x2D86A023L, 0x2D86A023L, (-10L), 0x2D86A023L, 0x2D86A023L, (-10L), 0x2D86A023L, 0x2D86A023L, (-10L)}; +static int g_86 = 0x3B76F056L; +static short g_91 = (-6L); +static short g_92[6] = {1L, 1L, 1L, 1L, 1L, 1L}; +static unsigned g_94 = 4294967295UL; +static int *g_117 = &g_86; +static int **g_144[4] = {&g_117, &g_117, &g_117, &g_117}; +static int ***g_143[3][7] = {{&g_144[3], (void*)0, (void*)0, (void*)0, &g_144[3], (void*)0, (void*)0}, {&g_144[3], (void*)0, (void*)0, (void*)0, &g_144[3], (void*)0, (void*)0}, {&g_144[3], (void*)0, (void*)0, (void*)0, &g_144[3], (void*)0, (void*)0}}; +static unsigned char g_241 = 0x1FL; +static unsigned char g_475 = 0x9FL; +static short g_487 = 0x9293L; +static unsigned g_525 = 0x8D1CBB35L; +static short g_595[8][9] = {{1L, 0x6B4FL, 0xE47EL, (-1L), 0xE47EL, 0x6B4FL, 1L, 0L, 0xABF7L}, {1L, 0x6B4FL, 0xE47EL, (-1L), 0xE47EL, 0x6B4FL, 1L, 0L, 0xABF7L}, {1L, 0x6B4FL, 0xE47EL, (-1L), 0xE47EL, 0x6B4FL, 1L, 0L, 0xABF7L}, {1L, 0x6B4FL, 0xE47EL, (-1L), 0xE47EL, 0x6B4FL, 1L, 0L, 0xABF7L}, {1L, 0x6B4FL, 0xE47EL, (-1L), 0xE47EL, 0x6B4FL, 1L, 0L, 0xABF7L}, {1L, 0x6B4FL, 0xE47EL, (-1L), 0xE47EL, 0x6B4FL, 1L, 0L, 0xABF7L}, {1L, 0x6B4FL, 0xE47EL, (-1L), 0xE47EL, 0x6B4FL, 1L, 0L, 0xABF7L}, {1L, 0x6B4FL, 0xE47EL, (-1L), 0xE47EL, 0x6B4FL, 1L, 0L, 0xABF7L}}; +static int ***g_910 = &g_144[3]; +static int g_1070 = 0xB4BF964AL; +static short g_1122[4] = {0xC45DL, 1L, 0xC45DL, 1L}; +static short g_1142 = (-3L); +static short g_1152[6][4] = {{0x57F9L, 0x4ECDL, 0x9FFAL, 0x3651L}, {0x57F9L, 0x4ECDL, 0x9FFAL, 0x3651L}, {0x57F9L, 0x4ECDL, 0x9FFAL, 0x3651L}, {0x57F9L, 0x4ECDL, 0x9FFAL, 0x3651L}, {0x57F9L, 0x4ECDL, 0x9FFAL, 0x3651L}, {0x57F9L, 0x4ECDL, 0x9FFAL, 0x3651L}}; +static signed char g_1156 = 0x06L; +static int g_1262 = 0x32E19C82L; +static unsigned g_1359 = 0xABE466D4L; +static int g_1398 = 0x751E89CDL; +static signed char g_1585 = 0L; +static int **g_1646 = &g_117; +static signed char g_1703 = 0L; +static unsigned short func_1(void); +static int func_14(unsigned p_15, unsigned p_16, unsigned p_17, unsigned p_18); +static signed char func_21(int * p_22, unsigned p_23, unsigned p_24, unsigned p_25); +static unsigned func_26(short p_27, unsigned p_28, short p_29, unsigned short p_30, int p_31); +static unsigned char func_39(unsigned short p_40, int * p_41); +static signed char func_46(int * p_47, unsigned p_48, signed char p_49, int * p_50); +static int * func_54(unsigned p_55, int * p_56, int * p_57, unsigned p_58, short p_59); +static short func_62(int p_63, signed char p_64, short p_65); +static unsigned short func_71(short p_72, signed char p_73, int * p_74, int p_75); +static short func_78(int * p_79); +static unsigned short func_1(void) +{ + int *l_2 = &g_3; + int *l_4 = &g_3; + unsigned l_5[8] = {0x2D149FEBL, 1UL, 0x2D149FEBL, 1UL, 0x2D149FEBL, 1UL, 0x2D149FEBL, 1UL}; + unsigned l_8[8] = {0xD952EAA2L, 4294967295UL, 0xD952EAA2L, 4294967295UL, 0xD952EAA2L, 4294967295UL, 0xD952EAA2L, 4294967295UL}; + unsigned char l_1201 = 0x86L; + int **l_1312 = &l_4; + int *l_1318 = &g_83[5]; + int l_1345 = 0x91AF68CEL; + unsigned char l_1350[8] = {255UL, 0x76L, 255UL, 0x76L, 255UL, 0x76L, 255UL, 0x76L}; + unsigned char l_1376 = 0xD5L; + unsigned l_1417 = 0x87192689L; + int *l_1427 = &g_83[7]; + int l_1442 = 0xF44A8193L; + int *l_1615[7] = {&g_1398, &g_1398, (void*)0, &g_1398, &g_1398, (void*)0, &g_1398}; + unsigned l_1670 = 0x2CD22480L; + unsigned short l_1675 = 0x9691L; + int i; + step_hash(1); + l_5[3]++; + step_hash(1076); + if (l_8[1]) + { + step_hash(3); + g_3 = ((signed char)0x48L + (signed char)6UL); + } + else + { + unsigned char l_11 = 1UL; + int l_38 = 0x826FBD10L; + int ***l_1315 = &g_144[3]; + signed char l_1327 = (-4L); + int l_1346 = 4L; + int l_1349 = 0x2614F9E9L; + signed char l_1373 = 0xA4L; + int *l_1380 = (void*)0; + int *l_1420 = &g_3; + unsigned short l_1439 = 0x0565L; + signed char l_1460[7][6] = {{0x8AL, 0x99L, 0x8AL, 0x99L, 0x8AL, 0x99L}, {0x8AL, 0x99L, 0x8AL, 0x99L, 0x8AL, 0x99L}, {0x8AL, 0x99L, 0x8AL, 0x99L, 0x8AL, 0x99L}, {0x8AL, 0x99L, 0x8AL, 0x99L, 0x8AL, 0x99L}, {0x8AL, 0x99L, 0x8AL, 0x99L, 0x8AL, 0x99L}, {0x8AL, 0x99L, 0x8AL, 0x99L, 0x8AL, 0x99L}, {0x8AL, 0x99L, 0x8AL, 0x99L, 0x8AL, 0x99L}}; + int l_1486 = 0L; + unsigned l_1489 = 7UL; + unsigned char l_1573 = 250UL; + unsigned l_1621 = 0UL; + int *l_1649 = &l_1349; + int l_1677 = 0L; + int l_1689 = 0xC0535174L; + unsigned l_1762 = 4294967292UL; + int *l_1763[5]; + int i, j; + for (i = 0; i < 5; i++) + l_1763[i] = &g_1398; + step_hash(5); + l_11++; + step_hash(888); + if (func_14(l_11, (((l_11 & (func_21(&g_3, (l_4 != &g_3), l_11, func_26((g_3 <= ((unsigned)(((short)((signed char)l_38 / (signed char)func_39(g_3, &g_3)) / (short)(*l_2)) <= g_1142) / (unsigned)l_11)), g_1122[2], g_92[1], (*l_4), l_1201)) != g_1156)) >= 0x1A128378L) < 0x5E9FL), g_1152[1][0], g_92[2])) + { + int l_1294[1]; + int *l_1314 = &g_83[6]; + unsigned l_1325 = 0x7C9151FCL; + int *l_1336 = &g_83[8]; + int i; + for (i = 0; i < 1; i++) + l_1294[i] = 1L; + step_hash(821); + for (g_475 = 0; (g_475 < 55); ++g_475) + { + signed char l_1296 = (-8L); + int **l_1329 = (void*)0; + int *l_1337 = &g_3; + step_hash(799); + if ((*g_117)) + { + step_hash(788); + return l_1294[0]; + } + else + { + unsigned short l_1295[1][9] = {{0x49CDL, 0x49CDL, 0x93E2L, 0x49CDL, 0x49CDL, 0x93E2L, 0x49CDL, 0x49CDL, 0x93E2L}}; + int l_1313 = 0xF053C390L; + int i, j; + step_hash(790); + (*g_117) &= 0x27A6EA42L; + step_hash(791); + if (l_1295[0][7]) + break; + step_hash(798); + if (l_1296) + { + int **l_1311 = (void*)0; + step_hash(793); + l_1313 &= (((unsigned char)(((short)((short)0x7D23L * (short)((signed char)((unsigned short)(0xDE69B211L || (((unsigned char)g_81 >> (unsigned char)g_83[3]) < ((signed char)(g_1122[0] > g_1262) * (signed char)(((!(l_1311 != l_1312)) | 9UL) != 0x9256FED2L)))) >> (unsigned short)g_81) * (signed char)g_1156)) << (short)(*l_2)) | l_1296) << (unsigned char)g_1156) < g_1122[2]); + } + else + { + step_hash(795); + (*l_1312) = l_1314; + step_hash(796); + if (l_1296) + continue; + step_hash(797); + (*l_4) = (&g_144[3] == &g_144[3]); + } + } + step_hash(800); + (*g_117) = (l_1315 != &g_144[3]); + step_hash(808); + for (g_241 = 2; (g_241 <= 30); g_241++) + { + signed char l_1319 = 0x8EL; + int *l_1326 = &g_3; + int *l_1328 = &g_86; + step_hash(804); + (*g_117) = ((func_71(g_83[5], g_1070, l_1318, (*l_1318)) | l_1319) || func_26((func_14(l_1296, (-(int)(((short)(((unsigned short)g_1262 / (unsigned short)g_525) > 0x62L) / (short)g_94) == g_1122[2])), (*l_1314), g_1142) >= g_81), g_487, l_1325, g_1152[1][0], g_83[0])); + step_hash(805); + (*l_1328) |= (((g_1156 == func_71(g_475, (*l_4), l_1326, (*l_4))) && g_3) || l_1327); + step_hash(806); + (*g_910) = l_1329; + step_hash(807); + (*g_117) |= (-6L); + } + step_hash(820); + for (g_86 = 0; (g_86 < (-23)); g_86 -= 2) + { + unsigned l_1335 = 4294967292UL; + step_hash(817); + for (l_1201 = 20; (l_1201 >= 24); ++l_1201) + { + int l_1334[2]; + int i; + for (i = 0; i < 2; i++) + l_1334[i] = 0x7E990413L; + step_hash(815); + l_1334[0] = (*g_117); + step_hash(816); + return l_1335; + } + step_hash(818); + (*l_1312) = l_1336; + step_hash(819); + (*l_1312) = l_1337; + } + } + step_hash(822); + return (*l_1336); + } + else + { + signed char l_1347 = 0x3AL; + int l_1348 = 0x79035617L; + int **l_1362 = (void*)0; + int l_1374 = 0xCF837CA7L; + int **l_1423 = &l_2; + signed char l_1428 = 0xC0L; + signed char l_1444[2][5] = {{0xD7L, (-1L), 0xD7L, (-1L), 0xD7L}, {0xD7L, (-1L), 0xD7L, (-1L), 0xD7L}}; + short l_1445 = 2L; + short l_1446 = 0xFB9EL; + int i, j; + step_hash(864); + for (l_1327 = 2; (l_1327 >= 0); l_1327 -= 1) + { + int *l_1338 = &g_86; + int *l_1339 = (void*)0; + int *l_1340 = &g_83[(l_1327 + 2)]; + int *l_1341 = &g_86; + int *l_1342 = &g_3; + int *l_1343 = &g_3; + int *l_1344[9][6] = {{&g_83[6], &g_83[(l_1327 + 2)], &g_83[l_1327], &g_83[l_1327], &g_83[(l_1327 + 2)], &g_83[6]}, {&g_83[6], &g_83[(l_1327 + 2)], &g_83[l_1327], &g_83[l_1327], &g_83[(l_1327 + 2)], &g_83[6]}, {&g_83[6], &g_83[(l_1327 + 2)], &g_83[l_1327], &g_83[l_1327], &g_83[(l_1327 + 2)], &g_83[6]}, {&g_83[6], &g_83[(l_1327 + 2)], &g_83[l_1327], &g_83[l_1327], &g_83[(l_1327 + 2)], &g_83[6]}, {&g_83[6], &g_83[(l_1327 + 2)], &g_83[l_1327], &g_83[l_1327], &g_83[(l_1327 + 2)], &g_83[6]}, {&g_83[6], &g_83[(l_1327 + 2)], &g_83[l_1327], &g_83[l_1327], &g_83[(l_1327 + 2)], &g_83[6]}, {&g_83[6], &g_83[(l_1327 + 2)], &g_83[l_1327], &g_83[l_1327], &g_83[(l_1327 + 2)], &g_83[6]}, {&g_83[6], &g_83[(l_1327 + 2)], &g_83[l_1327], &g_83[l_1327], &g_83[(l_1327 + 2)], &g_83[6]}, {&g_83[6], &g_83[(l_1327 + 2)], &g_83[l_1327], &g_83[l_1327], &g_83[(l_1327 + 2)], &g_83[6]}}; + int i, j; + step_hash(831); + for (g_475 = 0; (g_475 <= 5); g_475 += 1) + { + int i; + step_hash(830); + return g_83[(g_475 + 3)]; + } + step_hash(832); + --l_1350[6]; + step_hash(833); + l_1348 ^= ((signed char)(((signed char)g_83[(l_1327 + 1)] << (signed char)7) == g_92[(l_1327 + 3)]) * (signed char)(g_1070 & ((+((func_46((*l_1312), (((signed char)func_26((*l_2), g_595[5][4], g_1359, g_1142, ((((unsigned)((l_1362 != (void*)0) && (*g_117)) % (unsigned)(*l_1341)) != 4UL) ^ (*g_117))) / (signed char)0x38L) > 6UL), g_1122[3], &g_83[l_1327]) == 0x0E38L) == (*l_2))) | 5L))); + step_hash(846); + if (((short)g_1122[2] % (short)g_595[5][3])) + { + short l_1372 = 4L; + step_hash(841); + for (g_91 = 2; (g_91 >= 0); g_91 -= 1) + { + unsigned char l_1369 = 1UL; + int l_1375 = 1L; + int *l_1379 = &l_1346; + int i, j; + step_hash(838); + (*g_117) = ((+(((((short)0xB6C5L + (short)func_78(&g_83[l_1327])) >= ((((((unsigned short)l_1369 << (unsigned short)((short)func_46((*l_1312), g_1142, l_1372, (*l_1312)) * (short)g_1152[3][1])) & l_1373) > 0L) != l_1374) >= g_1152[1][2])) && (*l_1343)) != 0x9AL)) & g_475); + step_hash(839); + --l_1376; + step_hash(840); + l_1380 = l_1379; + } + step_hash(842); + if (l_1372) + continue; + } + else + { + short l_1381 = 0x4D3FL; + int *l_1382[4][2] = {{&l_1348, &l_1348}, {&l_1348, &l_1348}, {&l_1348, &l_1348}, {&l_1348, &l_1348}}; + int i, j; + step_hash(844); + (*l_1312) = (*l_1312); + step_hash(845); + if ((*g_117)) + break; + } + step_hash(863); + for (l_1349 = 2; (l_1349 >= 0); l_1349 -= 1) + { + int l_1394 = 0x572087E2L; + unsigned l_1397 = 1UL; + int i, j; + step_hash(850); + if ((*l_1340)) + break; + step_hash(856); + if (((((-(unsigned char)g_86) < ((**l_1312) != (((0xC6L || ((unsigned char)((0xB081BBF4L < ((*l_4) != ((unsigned)l_1348 / (unsigned)((int)(*g_117) + (int)((unsigned short)((short)l_1394 + (short)((unsigned short)g_83[5] + (unsigned short)g_1262)) % (unsigned short)0x1122L))))) ^ 0L) >> (unsigned char)g_1142)) || g_595[0][6]) | 0xBC600954L))) ^ g_1152[1][0]) >= 7L)) + { + step_hash(852); + (*l_1312) = (*l_1312); + } + else + { + step_hash(854); + if ((*g_117)) + break; + step_hash(855); + (*l_1318) ^= l_1397; + } + step_hash(862); + if (g_1398) + { + step_hash(858); + return g_1142; + } + else + { + short l_1401 = 0xBA92L; + int *l_1404[7][1] = {{&g_83[(l_1327 + 2)]}, {&g_83[(l_1327 + 2)]}, {&g_83[(l_1327 + 2)]}, {&g_83[(l_1327 + 2)]}, {&g_83[(l_1327 + 2)]}, {&g_83[(l_1327 + 2)]}, {&g_83[(l_1327 + 2)]}}; + int i, j; + step_hash(860); + (*l_1338) = ((short)l_1401 + (short)(((int)0xEEB3ED56L - (int)func_78((*l_1312))) | 4294967287UL)); + step_hash(861); + if ((*l_4)) + continue; + } + } + } + step_hash(887); + if ((((signed char)g_94 * (signed char)(((unsigned short)((short)0x84D3L % (short)((unsigned)((short)((signed char)0L * (signed char)g_1152[1][0]) + (short)((((+l_1417) != ((signed char)func_46(l_1420, g_83[5], ((unsigned)(l_1423 != &l_2) % (unsigned)(**l_1312)), (*l_1423)) % (signed char)0x14L)) & 65526UL) > g_487)) / (unsigned)g_94)) >> (unsigned short)15) || g_94)) ^ 0UL)) + { + int *l_1429 = &g_86; + unsigned l_1431 = 4294967292UL; + step_hash(870); + for (g_3 = (-15); (g_3 != 28); g_3 += 1) + { + int **l_1426 = (void*)0; + int *l_1430 = (void*)0; + step_hash(869); + (*l_1312) = l_1429; + } + step_hash(871); + (*l_4) = l_1431; + step_hash(882); + for (l_1346 = 0; (l_1346 >= 9); l_1346 += 1) + { + int *l_1434 = (void*)0; + int *l_1435 = (void*)0; + unsigned l_1436 = 0x744CDC49L; + step_hash(875); + ++l_1436; + step_hash(876); + (**l_1423) &= l_1439; + step_hash(881); + if (((unsigned short)(g_1152[1][0] && 1UL) * (unsigned short)((*g_117) != 0x8D9C0E08L))) + { + step_hash(878); + return g_81; + } + else + { + step_hash(880); + return g_86; + } + } + } + else + { + int *l_1443[7]; + unsigned l_1447 = 4294967295UL; + int i; + for (i = 0; i < 7; i++) + l_1443[i] = &l_1374; + step_hash(884); + l_1447++; + step_hash(885); + (*l_1420) = (((((unsigned short)((((short)((signed char)g_1142 - (signed char)(g_1359 || ((unsigned)g_241 + (unsigned)g_525))) / (short)((short)(8L >= l_1460[2][0]) + (short)((short)(0x4BAFL <= (((signed char)(g_1122[1] < (*l_1427)) >> (signed char)2) & (**l_1312))) - (short)1L))) >= (*l_1420)) | g_1359) * (unsigned short)(**l_1423)) <= g_475) || g_1122[2]) == g_595[5][4]); + step_hash(886); + (*l_4) |= 0xBD1A72E3L; + } + } + step_hash(893); + for (g_487 = 0; (g_487 <= 7); g_487 += 1) + { + int i; + step_hash(892); + if (l_8[g_487]) + break; + } + step_hash(1075); + for (g_241 = 18; (g_241 < 44); g_241 += 9) + { + signed char l_1469 = 1L; + int *l_1472[7][3] = {{(void*)0, &l_1346, (void*)0}, {(void*)0, &l_1346, (void*)0}, {(void*)0, &l_1346, (void*)0}, {(void*)0, &l_1346, (void*)0}, {(void*)0, &l_1346, (void*)0}, {(void*)0, &l_1346, (void*)0}, {(void*)0, &l_1346, (void*)0}}; + short l_1499 = 0x8BCAL; + int *l_1524 = &l_1349; + unsigned l_1531 = 4294967295UL; + unsigned char l_1538 = 0x29L; + int l_1551 = 0x16DA1726L; + unsigned l_1560 = 0xD5040E44L; + unsigned short l_1582 = 0UL; + short l_1596 = 0xF822L; + unsigned l_1612[3]; + int ***l_1636 = &g_144[3]; + int l_1647 = 0xA044B158L; + int l_1761 = 0x2586556FL; + int i, j; + for (i = 0; i < 3; i++) + l_1612[i] = 3UL; + step_hash(897); + (*l_1315) = (void*)0; + step_hash(970); + if ((((((unsigned char)(l_1469 >= (g_1152[1][3] == ((short)g_1398 % (short)g_1122[0]))) * (unsigned char)g_1152[0][3]) && 0x470E946DL) | 6UL) > g_1398)) + { + unsigned char l_1481 = 0UL; + int ***l_1485[10][2] = {{&g_144[3], (void*)0}, {&g_144[3], (void*)0}, {&g_144[3], (void*)0}, {&g_144[3], (void*)0}, {&g_144[3], (void*)0}, {&g_144[3], (void*)0}, {&g_144[3], (void*)0}, {&g_144[3], (void*)0}, {&g_144[3], (void*)0}, {&g_144[3], (void*)0}}; + short l_1488 = 0L; + int i, j; + step_hash(899); + (*l_1312) = (*l_1312); + step_hash(904); + for (g_1142 = (-28); (g_1142 != (-16)); g_1142++) + { + step_hash(903); + return g_1262; + } + step_hash(920); + for (g_1142 = (-22); (g_1142 != 14); g_1142 += 3) + { + unsigned l_1484 = 0xD256E1D0L; + int *l_1487 = &g_86; + step_hash(908); + (*l_4) = 0x02E7C6F8L; + step_hash(913); + for (g_1398 = (-3); (g_1398 < (-3)); g_1398 += 7) + { + step_hash(912); + return g_94; + } + step_hash(914); + l_1489 = (l_1481 || func_71(g_83[1], (((((unsigned short)((g_1152[1][0] < ((((l_1484 ^ (*l_4)) <= ((l_1485[8][0] == &g_144[3]) <= ((((*l_1420) >= func_46((*l_1312), g_241, l_1486, l_1487)) | g_1070) == l_1488))) <= g_595[3][6]) != (*l_1487))) || g_1152[2][2]) - (unsigned short)g_475) > g_1122[2]) == g_1156) != g_91), l_1487, (*l_1420))); + step_hash(919); + if ((((signed char)(&l_1318 == &l_4) << (signed char)5) && (g_1070 > g_1122[2]))) + { + step_hash(916); + (*l_1487) ^= (-1L); + } + else + { + step_hash(918); + return (*l_2); + } + } + step_hash(936); + for (l_1327 = 0; (l_1327 != (-4)); --l_1327) + { + int **l_1496[9][6] = {{&l_1318, &g_117, &l_1427, &l_1427, &g_117, &l_1318}, {&l_1318, &g_117, &l_1427, &l_1427, &g_117, &l_1318}, {&l_1318, &g_117, &l_1427, &l_1427, &g_117, &l_1318}, {&l_1318, &g_117, &l_1427, &l_1427, &g_117, &l_1318}, {&l_1318, &g_117, &l_1427, &l_1427, &g_117, &l_1318}, {&l_1318, &g_117, &l_1427, &l_1427, &g_117, &l_1318}, {&l_1318, &g_117, &l_1427, &l_1427, &g_117, &l_1318}, {&l_1318, &g_117, &l_1427, &l_1427, &g_117, &l_1318}, {&l_1318, &g_117, &l_1427, &l_1427, &g_117, &l_1318}}; + int i, j; + step_hash(930); + for (l_1442 = 7; (l_1442 >= 2); l_1442 -= 1) + { + int i, j; + step_hash(927); + (*l_4) |= ((unsigned char)(~((void*)0 != l_1496[0][1])) * (unsigned char)((short)((g_595[l_1442][(l_1442 + 1)] > g_595[l_1442][(l_1442 + 1)]) == (0x373EL < l_1350[l_1442])) + (short)l_1350[l_1442])); + step_hash(928); + if (l_1499) + break; + step_hash(929); + (*l_1318) &= (1UL > g_92[2]); + } + step_hash(935); + for (l_1373 = 0; (l_1373 == (-12)); --l_1373) + { + step_hash(934); + return g_1152[1][0]; + } + } + } + else + { + int *l_1504 = &g_83[8]; + unsigned l_1523 = 0xED7AC434L; + int **l_1539 = &l_1524; + step_hash(952); + for (g_1156 = 0; (g_1156 != (-9)); --g_1156) + { + unsigned char l_1507 = 0x86L; + int *l_1518 = &g_86; + int l_1519 = 0xB6C55F2EL; + } + step_hash(969); + for (l_1499 = 0; (l_1499 <= (-11)); l_1499 -= 2) + { + step_hash(961); + for (l_1376 = 3; (l_1376 >= 50); l_1376++) + { + int *l_1548 = &l_1442; + step_hash(959); + l_1551 ^= (l_1538 <= ((g_83[5] <= ((void*)0 == l_1539)) == ((+(g_1262 <= ((short)((unsigned short)((((short)g_86 << (short)((signed char)func_46(l_1548, ((unsigned)g_1262 / (unsigned)(*l_2)), g_1070, l_1524) / (signed char)0x49L)) && g_241) == g_475) >> (unsigned short)g_91) - (short)(*l_1427)))) == g_1152[1][0]))); + step_hash(960); + return (*l_1504); + } + step_hash(968); + for (g_94 = 21; (g_94 > 2); g_94 -= 7) + { + unsigned l_1554 = 4294967292UL; + step_hash(965); + (*l_1420) = l_1554; + step_hash(966); + (*l_1504) = l_1554; + step_hash(967); + return g_241; + } + } + } + } + } + step_hash(1077); + return g_1359; +} +static int func_14(unsigned p_15, unsigned p_16, unsigned p_17, unsigned p_18) +{ + int **l_1240 = &g_117; + int l_1250 = (-7L); + step_hash(743); + for (g_1156 = 0; (g_1156 > (-16)); g_1156--) + { + step_hash(736); + (*g_117) = (p_17 || (l_1240 != (void*)0)); + step_hash(741); + for (g_91 = 2; (g_91 >= 0); g_91 -= 1) + { + step_hash(740); + return p_18; + } + step_hash(742); + (**l_1240) = ((unsigned char)p_15 / (unsigned char)(**l_1240)); + } + step_hash(744); + (**l_1240) = func_46((*l_1240), ((((**l_1240) <= (&g_144[2] != (void*)0)) && ((**l_1240) < p_15)) || (((signed char)(g_1156 <= ((short)(**l_1240) >> (short)(-(unsigned short)(**l_1240)))) << (signed char)p_16) && 3L)), (**l_1240), (*l_1240)); + step_hash(745); + l_1250 |= ((signed char)g_86 / (signed char)0xC9L); + step_hash(781); + for (g_525 = 23; (g_525 >= 38); g_525++) + { + short l_1263 = 0x626CL; + int *l_1284 = &g_86; + step_hash(780); + for (l_1250 = (-13); (l_1250 < (-19)); l_1250--) + { + unsigned short l_1265 = 0xC10BL; + int *l_1273 = &l_1250; + int l_1274 = 0x8C551F7EL; + step_hash(756); + for (g_3 = 5; (g_3 > (-20)); g_3 -= 4) + { + step_hash(755); + if (p_18) + break; + } + step_hash(777); + for (p_17 = (-21); (p_17 <= 41); p_17++) + { + int *l_1261 = &g_3; + int l_1277 = 0xEE951AAFL; + int ***l_1283 = &g_144[3]; + step_hash(776); + for (g_1142 = (-10); (g_1142 <= (-5)); g_1142++) + { + int *l_1264 = &l_1250; + int *l_1275 = &g_83[2]; + int *l_1276[10] = {(void*)0, (void*)0, &g_86, (void*)0, (void*)0, &g_86, (void*)0, (void*)0, &g_86, (void*)0}; + unsigned char l_1278 = 252UL; + int l_1289[8][3]; + int i, j; + for (i = 0; i < 8; i++) + { + for (j = 0; j < 3; j++) + l_1289[i][j] = 0x667AABB5L; + } + } + } + step_hash(778); + (*g_117) = (**l_1240); + step_hash(779); + l_1274 |= ((unsigned char)(*l_1284) * (unsigned char)7UL); + } + } + step_hash(782); + return (*g_117); +} +static signed char func_21(int * p_22, unsigned p_23, unsigned p_24, unsigned p_25) +{ + unsigned l_1231 = 0x6251A222L; + int *l_1234[1]; + int i; + for (i = 0; i < 1; i++) + l_1234[i] = &g_3; + step_hash(730); + for (g_1070 = (-5); (g_1070 != 18); g_1070++) + { + int **l_1237 = (void*)0; + step_hash(726); + for (g_91 = 0; (g_91 >= (-29)); --g_91) + { + int **l_1236[3][5] = {{&l_1234[0], &l_1234[0], &l_1234[0], &l_1234[0], &l_1234[0]}, {&l_1234[0], &l_1234[0], &l_1234[0], &l_1234[0], &l_1234[0]}, {&l_1234[0], &l_1234[0], &l_1234[0], &l_1234[0], &l_1234[0]}}; + int i, j; + step_hash(719); + (*p_22) = l_1231; + step_hash(724); + for (g_3 = 27; (g_3 == (-26)); g_3 -= 8) + { + int **l_1235 = &l_1234[0]; + step_hash(723); + (*l_1235) = l_1234[0]; + } + step_hash(725); + l_1234[0] = p_22; + } + step_hash(727); + l_1234[0] = p_22; + step_hash(728); + (*p_22) &= ((void*)0 == &p_22); + step_hash(729); + return g_595[5][4]; + } + step_hash(731); + return g_1152[4][0]; +} +static unsigned func_26(short p_27, unsigned p_28, short p_29, unsigned short p_30, int p_31) +{ + int l_1202[10] = {0x8B4350F3L, 0x8B4350F3L, 0xF8C64CB0L, 0x8B4350F3L, 0x8B4350F3L, 0xF8C64CB0L, 0x8B4350F3L, 0x8B4350F3L, 0xF8C64CB0L, 0x8B4350F3L}; + int *l_1203 = &g_83[0]; + int *l_1204 = (void*)0; + int *l_1205 = &g_3; + int *l_1206 = &g_86; + int *l_1207 = &g_83[0]; + int *l_1208 = &g_86; + int *l_1209 = &g_83[8]; + int *l_1210 = &g_83[1]; + int *l_1211 = &g_86; + int *l_1212 = &g_86; + int *l_1213 = &g_86; + int *l_1214[6][2] = {{&g_3, &g_83[0]}, {&g_3, &g_83[0]}, {&g_3, &g_83[0]}, {&g_3, &g_83[0]}, {&g_3, &g_83[0]}, {&g_3, &g_83[0]}}; + unsigned char l_1215 = 0xD5L; + int ***l_1218 = (void*)0; + unsigned l_1224 = 0UL; + int i, j; + step_hash(708); + ++l_1215; + step_hash(709); + (*l_1206) = (g_1122[2] && (*l_1208)); + step_hash(710); + l_1224++; + step_hash(711); + return p_29; +} + + + + + + + +static unsigned char func_39(unsigned short p_40, int * p_41) +{ + int *l_51 = &g_3; + int l_1128 = 0x0321E436L; + int l_1150 = 0x914A8D88L; + int l_1151 = 0xBE36B82EL; + int l_1154 = 0x1FE9416BL; + short l_1155 = 0xC38BL; + int l_1158 = 0xF9B6E23AL; + int ***l_1168[8][10] = {{&g_144[3], &g_144[3], (void*)0, (void*)0, &g_144[3], &g_144[0], &g_144[1], &g_144[0], (void*)0, &g_144[0]}, {&g_144[3], &g_144[3], (void*)0, (void*)0, &g_144[3], &g_144[0], &g_144[1], &g_144[0], (void*)0, &g_144[0]}, {&g_144[3], &g_144[3], (void*)0, (void*)0, &g_144[3], &g_144[0], &g_144[1], &g_144[0], (void*)0, &g_144[0]}, {&g_144[3], &g_144[3], (void*)0, (void*)0, &g_144[3], &g_144[0], &g_144[1], &g_144[0], (void*)0, &g_144[0]}, {&g_144[3], &g_144[3], (void*)0, (void*)0, &g_144[3], &g_144[0], &g_144[1], &g_144[0], (void*)0, &g_144[0]}, {&g_144[3], &g_144[3], (void*)0, (void*)0, &g_144[3], &g_144[0], &g_144[1], &g_144[0], (void*)0, &g_144[0]}, {&g_144[3], &g_144[3], (void*)0, (void*)0, &g_144[3], &g_144[0], &g_144[1], &g_144[0], (void*)0, &g_144[0]}, {&g_144[3], &g_144[3], (void*)0, (void*)0, &g_144[3], &g_144[0], &g_144[1], &g_144[0], (void*)0, &g_144[0]}}; + unsigned char l_1198 = 0x69L; + int i, j; + step_hash(670); + if (((unsigned char)((signed char)func_46(&g_3, p_40, p_40, l_51) - (signed char)(l_51 != p_41)) + (unsigned char)func_71(((*l_51) < (*l_51)), g_595[5][4], l_51, (*l_51)))) + { + signed char l_1120 = 1L; + unsigned l_1121 = 0x7AA989C0L; + int *l_1125 = &g_83[5]; + int *l_1129 = (void*)0; + int l_1147 = 0x7313C922L; + int l_1149 = (-10L); + int l_1159 = 0x3D064881L; + int l_1160[7][3] = {{0xA7639A70L, (-8L), 0xE159FB6CL}, {0xA7639A70L, (-8L), 0xE159FB6CL}, {0xA7639A70L, (-8L), 0xE159FB6CL}, {0xA7639A70L, (-8L), 0xE159FB6CL}, {0xA7639A70L, (-8L), 0xE159FB6CL}, {0xA7639A70L, (-8L), 0xE159FB6CL}, {0xA7639A70L, (-8L), 0xE159FB6CL}}; + int i, j; + step_hash(623); + for (g_1070 = 0; (g_1070 <= 2); g_1070 += 1) + { + int i; + step_hash(617); + (***g_910) = g_92[(g_1070 + 3)]; + step_hash(622); + for (g_91 = 2; (g_91 >= 0); g_91 -= 1) + { + int i, j; + step_hash(621); + p_41 = p_41; + } + } + step_hash(661); + for (g_94 = (-20); (g_94 != 4); ++g_94) + { + int ***l_1127 = &g_144[3]; + int l_1144[7][3] = {{1L, 0x1E92FABBL, 0xA5B70FB2L}, {1L, 0x1E92FABBL, 0xA5B70FB2L}, {1L, 0x1E92FABBL, 0xA5B70FB2L}, {1L, 0x1E92FABBL, 0xA5B70FB2L}, {1L, 0x1E92FABBL, 0xA5B70FB2L}, {1L, 0x1E92FABBL, 0xA5B70FB2L}, {1L, 0x1E92FABBL, 0xA5B70FB2L}}; + int i, j; + step_hash(659); + if (((0xE137L || p_40) && ((signed char)(((g_525 >= p_40) < g_1122[2]) <= g_94) - (signed char)g_94))) + { + step_hash(632); + for (g_1070 = 0; (g_1070 <= (-24)); g_1070 -= 9) + { + step_hash(631); + return p_40; + } + step_hash(633); + (*g_117) = ((void*)0 != (**g_910)); + } + else + { + signed char l_1126[4][5] = {{0xC7L, 0x31L, 0x5CL, 0x31L, 0xC7L}, {0xC7L, 0x31L, 0x5CL, 0x31L, 0xC7L}, {0xC7L, 0x31L, 0x5CL, 0x31L, 0xC7L}, {0xC7L, 0x31L, 0x5CL, 0x31L, 0xC7L}}; + int l_1133 = 0x307DB213L; + int l_1143[3]; + int i, j; + for (i = 0; i < 3; i++) + l_1143[i] = 0x50DA5453L; + step_hash(658); + for (g_81 = 0; (g_81 <= 2); g_81 += 1) + { + unsigned l_1130 = 0UL; + int l_1135 = 0xA191AAA5L; + int l_1136 = (-1L); + int l_1145 = 1L; + int l_1146 = (-5L); + int l_1148[9][7] = {{0xF04A1E59L, (-10L), 1L, 5L, 0x33C32F5CL, 5L, 1L}, {0xF04A1E59L, (-10L), 1L, 5L, 0x33C32F5CL, 5L, 1L}, {0xF04A1E59L, (-10L), 1L, 5L, 0x33C32F5CL, 5L, 1L}, {0xF04A1E59L, (-10L), 1L, 5L, 0x33C32F5CL, 5L, 1L}, {0xF04A1E59L, (-10L), 1L, 5L, 0x33C32F5CL, 5L, 1L}, {0xF04A1E59L, (-10L), 1L, 5L, 0x33C32F5CL, 5L, 1L}, {0xF04A1E59L, (-10L), 1L, 5L, 0x33C32F5CL, 5L, 1L}, {0xF04A1E59L, (-10L), 1L, 5L, 0x33C32F5CL, 5L, 1L}, {0xF04A1E59L, (-10L), 1L, 5L, 0x33C32F5CL, 5L, 1L}}; + int l_1153 = 0x1E374F75L; + int l_1157 = (-3L); + unsigned l_1161 = 0x6185CE33L; + int i, j; + step_hash(638); + (*g_910) = &p_41; + step_hash(639); + l_1125 = p_41; + } + } + step_hash(660); + (*g_117) &= 0x847C2D61L; + } + } + else + { + int *l_1171 = &g_3; + int l_1174 = 0x3956C3EBL; + step_hash(668); + if ((g_92[2] && ((unsigned)p_40 + (unsigned)((**g_910) == p_41)))) + { + step_hash(664); + (***g_910) &= (*p_41); + step_hash(665); + (**g_910) = l_1171; + } + else + { + step_hash(667); + (*g_117) |= (*p_41); + } + step_hash(669); + l_1174 = (g_1122[2] > ((*g_910) != &l_1171)); + } + step_hash(696); + for (g_1070 = (-2); (g_1070 >= (-17)); g_1070 -= 9) + { + int ***l_1179 = &g_144[3]; + int l_1184 = 0xF1F25141L; + int l_1193 = 5L; + step_hash(674); + (**g_910) = p_41; + step_hash(695); + for (g_525 = (-20); (g_525 == 7); g_525 += 1) + { + short l_1180 = 0xC502L; + int l_1191 = (-10L); + int l_1192 = 1L; + unsigned char l_1194[8][1] = {{1UL}, {1UL}, {1UL}, {1UL}, {1UL}, {1UL}, {1UL}, {1UL}}; + int i, j; + step_hash(688); + if ((*l_51)) + { + signed char l_1183 = 0x6DL; + step_hash(679); + l_1180 ^= (&g_144[3] == l_1179); + step_hash(685); + for (g_241 = 0; (g_241 <= 3); g_241 += 1) + { + int i, j; + step_hash(683); + l_1183 &= ((signed char)g_1152[(g_241 + 1)][g_241] + (signed char)((void*)0 != &g_144[0])); + step_hash(684); + l_1184 &= l_1180; + } + } + else + { + int *l_1189 = &l_1150; + step_hash(687); + (*l_1189) = ((unsigned char)((unsigned char)func_78(l_1189) + (unsigned char)(-1L)) << (unsigned char)p_40); + } + step_hash(693); + for (l_1151 = 0; (l_1151 <= 7); l_1151 += 1) + { + int l_1190[6][5] = {{0x660ED758L, (-1L), 0x660ED758L, (-1L), 0x660ED758L}, {0x660ED758L, (-1L), 0x660ED758L, (-1L), 0x660ED758L}, {0x660ED758L, (-1L), 0x660ED758L, (-1L), 0x660ED758L}, {0x660ED758L, (-1L), 0x660ED758L, (-1L), 0x660ED758L}, {0x660ED758L, (-1L), 0x660ED758L, (-1L), 0x660ED758L}, {0x660ED758L, (-1L), 0x660ED758L, (-1L), 0x660ED758L}}; + int i, j; + step_hash(692); + ++l_1194[6][0]; + } + step_hash(694); + if ((*p_41)) + break; + } + } + step_hash(697); + (**g_910) = (**g_910); + step_hash(705); + for (l_1150 = 0; (l_1150 <= 3); l_1150 += 1) + { + int l_1197 = (-4L); + int i; + step_hash(701); + if (g_83[(l_1150 + 5)]) + break; + step_hash(702); + l_1197 |= func_71(func_78(p_41), p_40, p_41, p_40); + step_hash(703); + --l_1198; + step_hash(704); + p_41 = (**g_910); + } + step_hash(706); + return g_91; +} + + + + + + + +static signed char func_46(int * p_47, unsigned p_48, signed char p_49, int * p_50) +{ + signed char l_66 = 8L; + int *l_80[9][7] = {{(void*)0, (void*)0, &g_3, &g_3, (void*)0, &g_3, &g_3}, {(void*)0, (void*)0, &g_3, &g_3, (void*)0, &g_3, &g_3}, {(void*)0, (void*)0, &g_3, &g_3, (void*)0, &g_3, &g_3}, {(void*)0, (void*)0, &g_3, &g_3, (void*)0, &g_3, &g_3}, {(void*)0, (void*)0, &g_3, &g_3, (void*)0, &g_3, &g_3}, {(void*)0, (void*)0, &g_3, &g_3, (void*)0, &g_3, &g_3}, {(void*)0, (void*)0, &g_3, &g_3, (void*)0, &g_3, &g_3}, {(void*)0, (void*)0, &g_3, &g_3, (void*)0, &g_3, &g_3}, {(void*)0, (void*)0, &g_3, &g_3, (void*)0, &g_3, &g_3}}; + unsigned short l_187 = 5UL; + unsigned char l_1068 = 0x75L; + int i, j; + step_hash(611); + for (p_49 = 0; (p_49 > (-16)); p_49 -= 2) + { + int *l_188[2][9] = {{&g_3, &g_3, &g_3, &g_3, &g_3, &g_3, &g_3, &g_3, &g_3}, {&g_3, &g_3, &g_3, &g_3, &g_3, &g_3, &g_3, &g_3, &g_3}}; + int **l_1026 = &l_80[0][3]; + signed char l_1055 = 7L; + unsigned char l_1084[1][10] = {{1UL, 248UL, 1UL, 248UL, 1UL, 248UL, 1UL, 248UL, 1UL, 248UL}}; + int l_1085 = 0L; + signed char l_1100 = 0xF9L; + int i, j; + } + step_hash(612); + return g_595[0][4]; +} + + + + + + + +static int * func_54(unsigned p_55, int * p_56, int * p_57, unsigned p_58, short p_59) +{ + int *l_447[4] = {&g_86, &g_86, &g_86, &g_86}; + signed char l_450 = 0x60L; + unsigned l_451 = 4294967295UL; + signed char l_601[4]; + unsigned l_647[9] = {7UL, 7UL, 4294967295UL, 7UL, 7UL, 4294967295UL, 7UL, 7UL, 4294967295UL}; + unsigned l_696 = 1UL; + int ***l_798 = &g_144[2]; + int ***l_878 = &g_144[0]; + unsigned l_953 = 1UL; + int ***l_978 = &g_144[3]; + unsigned char l_1010[1]; + int *l_1023 = &g_83[5]; + int i; + for (i = 0; i < 4; i++) + l_601[i] = (-1L); + for (i = 0; i < 1; i++) + l_1010[i] = 0xDCL; + step_hash(270); + for (p_59 = 0; (p_59 == 18); p_59 += 8) + { + int **l_448 = (void*)0; + int **l_449 = &g_117; + step_hash(269); + (*l_449) = l_447[2]; + } + step_hash(271); + --l_451; + step_hash(544); + if (((signed char)0x88L % (signed char)0xD2L)) + { + short l_456[4][1]; + int l_472 = 0L; + int **l_555 = &l_447[2]; + signed char l_563 = 0L; + int l_580 = 0L; + int l_582 = 0L; + int l_589 = 0x2395AA96L; + int l_590 = 1L; + int l_593 = (-1L); + int l_597[9] = {1L, 1L, 0x2FAE3115L, 1L, 1L, 0x2FAE3115L, 1L, 1L, 0x2FAE3115L}; + unsigned char l_646 = 1UL; + int ***l_681 = &l_555; + unsigned l_795 = 4294967293UL; + int **l_816 = &l_447[2]; + int l_818[2]; + int i, j; + for (i = 0; i < 4; i++) + { + for (j = 0; j < 1; j++) + l_456[i][j] = 0L; + } + for (i = 0; i < 2; i++) + l_818[i] = 0L; + step_hash(378); + if ((0L ^ (4L > (~l_456[3][0])))) + { + signed char l_459 = 4L; + int *l_470[7]; + int ***l_503 = &g_144[3]; + unsigned short l_584 = 65535UL; + short l_596 = (-1L); + unsigned char l_598 = 0UL; + int l_672[9][8] = {{0xFCCC60D0L, 0x1F5A3AF7L, 0x1FD95619L, (-7L), (-1L), 9L, 0x1C3CC502L, (-1L)}, {0xFCCC60D0L, 0x1F5A3AF7L, 0x1FD95619L, (-7L), (-1L), 9L, 0x1C3CC502L, (-1L)}, {0xFCCC60D0L, 0x1F5A3AF7L, 0x1FD95619L, (-7L), (-1L), 9L, 0x1C3CC502L, (-1L)}, {0xFCCC60D0L, 0x1F5A3AF7L, 0x1FD95619L, (-7L), (-1L), 9L, 0x1C3CC502L, (-1L)}, {0xFCCC60D0L, 0x1F5A3AF7L, 0x1FD95619L, (-7L), (-1L), 9L, 0x1C3CC502L, (-1L)}, {0xFCCC60D0L, 0x1F5A3AF7L, 0x1FD95619L, (-7L), (-1L), 9L, 0x1C3CC502L, (-1L)}, {0xFCCC60D0L, 0x1F5A3AF7L, 0x1FD95619L, (-7L), (-1L), 9L, 0x1C3CC502L, (-1L)}, {0xFCCC60D0L, 0x1F5A3AF7L, 0x1FD95619L, (-7L), (-1L), 9L, 0x1C3CC502L, (-1L)}, {0xFCCC60D0L, 0x1F5A3AF7L, 0x1FD95619L, (-7L), (-1L), 9L, 0x1C3CC502L, (-1L)}}; + int i, j; + for (i = 0; i < 7; i++) + l_470[i] = &g_86; + step_hash(283); + for (l_451 = 0; (l_451 != 51); l_451++) + { + int *l_463 = &g_3; + int *l_468 = &g_83[5]; + step_hash(281); + if ((g_86 < ((((g_3 ^ (((p_57 == p_57) != func_71(g_241, (l_459 < (1L >= ((signed char)p_59 << (signed char)((-(int)func_71(g_241, g_241, p_57, (*p_57))) & p_55)))), l_463, l_456[3][0])) ^ 1L)) & g_241) ^ l_456[0][0]) != p_55))) + { + int *l_469 = &g_83[5]; + unsigned l_471 = 0x043BEBC2L; + step_hash(278); + l_471 &= (0xE91AL && (0L ^ ((g_83[5] > (0x1B54L | ((0x48L < ((g_86 | ((int)0xA66F6F8BL % (int)((short)g_81 + (short)(func_71((l_468 != l_469), g_241, l_470[2], (*p_56)) || 0xBAC5L)))) < 0UL)) != 0x9B7AL))) < 0xF4D5L))); + } + else + { + step_hash(280); + return l_447[2]; + } + step_hash(282); + l_472 = 0L; + } + step_hash(356); + if (((unsigned)g_83[2] % (unsigned)g_475)) + { + int **l_476[10][3] = {{&l_447[2], &l_470[2], &l_470[0]}, {&l_447[2], &l_470[2], &l_470[0]}, {&l_447[2], &l_470[2], &l_470[0]}, {&l_447[2], &l_470[2], &l_470[0]}, {&l_447[2], &l_470[2], &l_470[0]}, {&l_447[2], &l_470[2], &l_470[0]}, {&l_447[2], &l_470[2], &l_470[0]}, {&l_447[2], &l_470[2], &l_470[0]}, {&l_447[2], &l_470[2], &l_470[0]}, {&l_447[2], &l_470[2], &l_470[0]}}; + int i, j; + step_hash(285); + l_447[0] = p_56; + step_hash(286); + l_472 = ((signed char)p_58 << (signed char)0); + step_hash(305); + if (((unsigned)(65527UL >= (((unsigned short)(g_83[5] != g_83[3]) + (unsigned short)6UL) & ((unsigned char)5UL - (unsigned char)(&l_447[2] != (void*)0)))) / (unsigned)g_92[2])) + { + signed char l_485 = 0L; + step_hash(288); + l_485 = (*p_56); + } + else + { + signed char l_495 = (-3L); + int l_499 = 0xA1F61590L; + unsigned char l_518 = 5UL; + step_hash(295); + for (g_475 = 0; (g_475 <= 3); g_475 += 1) + { + int l_486 = 0xCE4011C5L; + int i; + step_hash(293); + l_486 = (&g_144[g_475] == &g_144[g_475]); + step_hash(294); + return p_56; + } + step_hash(296); + g_487 ^= 0L; + step_hash(303); + if (((unsigned short)p_58 / (unsigned short)((+(p_59 && 0x1FB7L)) | (l_447[0] == (void*)0)))) + { + short l_494 = 3L; + step_hash(298); + l_472 &= (g_94 & ((signed char)((unsigned short)l_494 >> (unsigned short)3) + (signed char)g_86)); + } + else + { + unsigned l_496 = 0x2FF40AB4L; + int l_500 = 0x55F6B382L; + step_hash(300); + l_496--; + step_hash(301); + l_499 &= (-1L); + step_hash(302); + l_500 &= (*p_56); + } + step_hash(304); + l_499 = ((unsigned char)(((void*)0 != l_503) >= func_71((((unsigned short)(func_78(p_57) < (-(unsigned)((+(~((-(unsigned short)(((signed char)((signed char)(p_55 > ((+(l_499 & ((unsigned short)1UL - (unsigned short)func_71((((unsigned short)((unsigned short)l_495 * (unsigned short)0x300AL) / (unsigned short)l_472) < g_92[2]), p_59, &l_472, l_499)))) > 0x9779181DL)) << (signed char)l_518) - (signed char)3L) || p_55)) != g_92[2]))) && p_59))) >> (unsigned short)4) & p_58), g_487, p_56, (*p_57))) % (unsigned char)0xC8L); + } + } + else + { + int l_523 = 0L; + int l_524[1]; + int l_637 = 0x42CF07C6L; + unsigned char l_652 = 3UL; + int i; + for (i = 0; i < 1; i++) + l_524[i] = (-1L); + step_hash(319); + for (g_241 = 0; (g_241 <= 4); g_241 += 5) + { + short l_521 = 0x6685L; + int l_550 = (-5L); + step_hash(317); + if (l_521) + { + int *l_522 = &g_83[5]; + step_hash(311); + (**l_503) = l_522; + step_hash(312); + (*g_117) ^= (p_57 == (**l_503)); + step_hash(313); + ++g_525; + } + else + { + int **l_545 = (void*)0; + step_hash(315); + l_472 ^= (g_525 | (l_524[0] == ((p_58 > ((unsigned char)(0x834CECF7L != ((unsigned)p_59 - (unsigned)(0xD39526B3L != ((unsigned short)((short)(-(signed char)0x4FL) - (short)(0L || p_59)) >> (unsigned short)p_59)))) << (unsigned char)l_456[3][0])) && g_86))); + step_hash(316); + l_550 |= ((((unsigned short)l_524[0] % (unsigned short)func_78(&l_472)) >= (((signed char)((unsigned short)0x0989L + (unsigned short)(&p_56 == l_545)) << (signed char)((void*)0 != l_545)) < (((unsigned short)((signed char)p_55 % (signed char)0x80L) - (unsigned short)1L) == p_59))) <= 0x135BL); + } + step_hash(318); + l_472 &= (func_78(p_57) & (((short)g_525 / (short)g_241) <= ((unsigned short)0x2A9CL << (unsigned short)(&p_57 == l_555)))); + } + step_hash(336); + if ((((unsigned char)0x21L + (unsigned char)(0x5DFC9776L && (((((signed char)p_58 + (signed char)(0x0853L < ((l_524[0] < 1L) >= (-(unsigned char)(((short)((g_487 && (g_83[5] || (l_563 ^ p_58))) >= p_55) - (short)p_58) > 0UL))))) != g_487) == 0L) && 0L))) ^ g_94)) + { + signed char l_578 = (-7L); + int l_581 = (-10L); + int l_583 = 0x392C0F20L; + int *l_587 = &l_524[0]; + int *l_588[2]; + int i; + for (i = 0; i < 2; i++) + l_588[i] = &l_523; + step_hash(327); + if (((signed char)((short)((((short)g_94 << (short)12) != p_55) || ((short)p_59 << (short)(1L & (((((short)3L >> (short)7) >= ((unsigned short)(((int)(*p_57) - (int)g_83[4]) < p_58) << (unsigned short)(p_58 > p_55))) == p_55) && p_59)))) / (short)p_55) >> (signed char)7)) + { + signed char l_579 = (-6L); + step_hash(322); + (**l_555) ^= (*p_56); + step_hash(323); + l_584--; + } + else + { + step_hash(325); + l_587 = l_447[2]; + step_hash(326); + (*l_555) = l_588[1]; + } + step_hash(332); + for (l_523 = 0; (l_523 <= 3); l_523 += 1) + { + int i; + step_hash(331); + l_447[l_523] = p_57; + } + } + else + { + short l_591[3][8] = {{(-8L), 0x0F02L, (-8L), 0x0F02L, (-8L), 0x0F02L, (-8L), 0x0F02L}, {(-8L), 0x0F02L, (-8L), 0x0F02L, (-8L), 0x0F02L, (-8L), 0x0F02L}, {(-8L), 0x0F02L, (-8L), 0x0F02L, (-8L), 0x0F02L, (-8L), 0x0F02L}}; + int l_592 = (-8L); + int l_594[1]; + int i, j; + for (i = 0; i < 1; i++) + l_594[i] = 0x84839CD7L; + step_hash(334); + --l_598; + step_hash(335); + (**l_555) = l_601[0]; + } + step_hash(355); + if (((unsigned short)((((signed char)g_94 / (signed char)p_58) != (-10L)) <= (&g_144[3] != (void*)0)) - (unsigned short)g_525)) + { + short l_608 = 0x9B32L; + int l_609 = 0L; + int l_611[1][9]; + unsigned l_614 = 4294967287UL; + int i, j; + for (i = 0; i < 1; i++) + { + for (j = 0; j < 9; j++) + l_611[i][j] = (-1L); + } + step_hash(343); + if ((*p_57)) + { + int l_610 = (-9L); + int l_612 = 0L; + int l_613[6][5] = {{0x04127FDDL, 0x785FCC2DL, 0L, 0x785FCC2DL, 0x04127FDDL}, {0x04127FDDL, 0x785FCC2DL, 0L, 0x785FCC2DL, 0x04127FDDL}, {0x04127FDDL, 0x785FCC2DL, 0L, 0x785FCC2DL, 0x04127FDDL}, {0x04127FDDL, 0x785FCC2DL, 0L, 0x785FCC2DL, 0x04127FDDL}, {0x04127FDDL, 0x785FCC2DL, 0L, 0x785FCC2DL, 0x04127FDDL}, {0x04127FDDL, 0x785FCC2DL, 0L, 0x785FCC2DL, 0x04127FDDL}}; + int i, j; + step_hash(339); + ++l_614; + step_hash(340); + l_611[0][1] ^= ((*p_57) && ((unsigned char)(((signed char)(-1L) % (signed char)9UL) < (&p_57 == (void*)0)) << (unsigned char)4)); + } + else + { + int ***l_625[9][10] = {{&g_144[3], (void*)0, &g_144[3], (void*)0, (void*)0, &g_144[0], &l_555, &l_555, &g_144[3], &l_555}, {&g_144[3], (void*)0, &g_144[3], (void*)0, (void*)0, &g_144[0], &l_555, &l_555, &g_144[3], &l_555}, {&g_144[3], (void*)0, &g_144[3], (void*)0, (void*)0, &g_144[0], &l_555, &l_555, &g_144[3], &l_555}, {&g_144[3], (void*)0, &g_144[3], (void*)0, (void*)0, &g_144[0], &l_555, &l_555, &g_144[3], &l_555}, {&g_144[3], (void*)0, &g_144[3], (void*)0, (void*)0, &g_144[0], &l_555, &l_555, &g_144[3], &l_555}, {&g_144[3], (void*)0, &g_144[3], (void*)0, (void*)0, &g_144[0], &l_555, &l_555, &g_144[3], &l_555}, {&g_144[3], (void*)0, &g_144[3], (void*)0, (void*)0, &g_144[0], &l_555, &l_555, &g_144[3], &l_555}, {&g_144[3], (void*)0, &g_144[3], (void*)0, (void*)0, &g_144[0], &l_555, &l_555, &g_144[3], &l_555}, {&g_144[3], (void*)0, &g_144[3], (void*)0, (void*)0, &g_144[0], &l_555, &l_555, &g_144[3], &l_555}}; + unsigned l_630 = 4294967295UL; + int i, j; + step_hash(342); + l_630 = (((unsigned)(0x0575L < g_595[7][1]) + (unsigned)((unsigned short)((0x2CAFL ^ ((l_625[6][8] == &g_144[0]) >= ((unsigned short)p_55 + (unsigned short)((unsigned)0xFC8ADAA9L + (unsigned)(p_59 >= (!g_595[2][1])))))) & 0x2FEFL) << (unsigned short)p_58)) > p_58); + } + step_hash(344); + l_611[0][1] = (func_78(&l_523) > 0UL); + step_hash(345); + l_647[3] = (((int)func_78(p_57) + (int)g_92[0]) | ((signed char)func_71((g_241 > ((int)l_637 + (int)((((unsigned char)(((short)((unsigned short)l_614 << (unsigned short)((unsigned short)l_614 >> (unsigned short)(0xA704AB6BL ^ p_59))) % (short)0x2DDCL) > 65535UL) - (unsigned char)g_91) && l_646) ^ p_58))), g_92[2], &l_611[0][1], (*p_56)) / (signed char)g_3)); + } + else + { + int l_649[10] = {(-1L), 0xC0E0B0CCL, (-1L), 0xC0E0B0CCL, (-1L), 0xC0E0B0CCL, (-1L), 0xC0E0B0CCL, (-1L), 0xC0E0B0CCL}; + int l_658 = 0xB1E7AFEAL; + int i; + step_hash(347); + l_524[0] = (*p_57); + step_hash(354); + if ((-(unsigned char)(&l_524[0] != &l_524[0]))) + { + short l_650 = 4L; + int l_651 = 0xC487ED9AL; + step_hash(349); + --l_652; + } + else + { + unsigned char l_655 = 9UL; + unsigned char l_659[3][1]; + int i, j; + for (i = 0; i < 3; i++) + { + for (j = 0; j < 1; j++) + l_659[i][j] = 0xFFL; + } + step_hash(351); + l_655--; + step_hash(352); + l_658 &= (g_81 || g_92[2]); + step_hash(353); + --l_659[2][0]; + } + } + } + step_hash(368); + for (l_646 = 0; (l_646 < 49); l_646 += 6) + { + unsigned l_674 = 0xB03BCA02L; + int *l_675 = (void*)0; + step_hash(360); + l_597[3] &= ((unsigned short)l_589 - (unsigned short)65535UL); + step_hash(367); + for (l_584 = 1; (l_584 <= 5); l_584 += 1) + { + int *l_673 = &l_472; + int i, j; + step_hash(364); + l_674 = func_71(g_595[l_584][(l_584 + 2)], ((unsigned char)((unsigned char)((signed char)func_71(func_78(p_57), l_672[5][0], p_57, (*p_57)) + (signed char)g_487) >> (unsigned char)((func_71(g_91, p_55, p_56, l_472) < 0xF0L) <= g_92[2])) >> (unsigned char)p_58), l_673, (*l_673)); + step_hash(365); + (*l_555) = l_675; + step_hash(366); + (*l_555) = p_57; + } + } + } + else + { + int **l_678 = (void*)0; + step_hash(377); + for (g_91 = 0; (g_91 >= 2); g_91++) + { + } + } + step_hash(379); + (*l_681) = &p_57; + step_hash(468); + if (((unsigned short)(((short)((-4L) <= (((signed char)((unsigned short)((short)((((((signed char)p_55 / (signed char)(0x79EEL ^ g_595[5][4])) <= (&l_555 == &l_555)) & p_55) > l_696) <= g_92[4]) % (short)p_58) << (unsigned short)10) / (signed char)g_86) > 1UL)) + (short)0x9ED6L) != g_595[0][4]) - (unsigned short)(-1L))) + { + unsigned l_713[9][6] = {{4294967295UL, 4294967295UL, 4294967286UL, 4294967295UL, 4294967295UL, 1UL}, {4294967295UL, 4294967295UL, 4294967286UL, 4294967295UL, 4294967295UL, 1UL}, {4294967295UL, 4294967295UL, 4294967286UL, 4294967295UL, 4294967295UL, 1UL}, {4294967295UL, 4294967295UL, 4294967286UL, 4294967295UL, 4294967295UL, 1UL}, {4294967295UL, 4294967295UL, 4294967286UL, 4294967295UL, 4294967295UL, 1UL}, {4294967295UL, 4294967295UL, 4294967286UL, 4294967295UL, 4294967295UL, 1UL}, {4294967295UL, 4294967295UL, 4294967286UL, 4294967295UL, 4294967295UL, 1UL}, {4294967295UL, 4294967295UL, 4294967286UL, 4294967295UL, 4294967295UL, 1UL}, {4294967295UL, 4294967295UL, 4294967286UL, 4294967295UL, 4294967295UL, 1UL}}; + int l_714 = 0x289C3B88L; + int ***l_719 = (void*)0; + int i, j; + step_hash(392); + for (l_593 = (-18); (l_593 != (-5)); ++l_593) + { + unsigned l_712 = 0x99DC1280L; + step_hash(391); + for (l_696 = (-20); (l_696 >= 24); l_696++) + { + unsigned l_703 = 0UL; + int l_720[6][1] = {{2L}, {2L}, {2L}, {2L}, {2L}, {2L}}; + int l_727 = (-7L); + int i, j; + step_hash(387); + l_714 = (((unsigned)4294967295UL + (unsigned)l_703) && (l_703 >= ((int)((!(0x18004B53L && 0x70D584F5L)) || (((signed char)((unsigned short)((short)(p_55 & (&g_144[3] != (void*)0)) + (short)p_59) >> (unsigned short)p_55) << (signed char)4) < l_703)) % (int)9L))); + step_hash(388); + l_720[2][0] &= ((signed char)((short)(l_713[1][5] ^ ((***l_681) > p_58)) % (short)0x95C0L) * (signed char)p_59); + step_hash(389); + l_714 |= (g_3 < g_86); + step_hash(390); + if ((*p_56)) + continue; + } + } + step_hash(410); + if (((short)8L * (short)(((unsigned short)g_595[3][8] % (unsigned short)0x9971L) | p_59))) + { + int l_738 = 0x8B29A7AEL; + step_hash(394); + l_738 = ((((~(*p_56)) != ((((int)(*p_57) + (int)(((signed char)5L + (signed char)(g_595[5][5] & p_55)) != 0x1430CDE7L)) <= ((signed char)((((void*)0 != &p_56) ^ ((void*)0 == p_56)) & g_525) / (signed char)g_92[5])) <= 0x82L)) >= (-8L)) < p_55); + } + else + { + int *l_739 = &g_3; + int ***l_753 = &g_144[3]; + int l_768 = (-1L); + step_hash(408); + if ((*p_57)) + { + step_hash(397); + (*l_555) = l_739; + } + else + { + int ***l_754 = &l_555; + int l_771[3]; + int i; + for (i = 0; i < 3; i++) + l_771[i] = 0x7283BB99L; + step_hash(399); + l_714 = (((unsigned)(((unsigned short)((unsigned short)((+((short)(**l_555) % (short)((short)((-(int)(((unsigned short)((l_753 != l_754) < (g_94 != 0xB527BB63L)) - (unsigned short)(((unsigned short)g_92[5] * (unsigned short)((unsigned short)(func_71(g_241, (((unsigned char)g_83[5] << (unsigned char)0) & (((int)(*p_56) % (int)(*p_56)) != p_55)), (**l_754), (*p_57)) | (**l_555)) * (unsigned short)1UL)) > g_94)) < (*p_56))) >= 0x4BL) << (short)8))) & p_55) >> (unsigned short)11) >> (unsigned short)p_58) && 0x855CC9AAL) % (unsigned)4294967288UL) < p_59); + step_hash(407); + if ((**l_555)) + { + int l_763 = 0x049073F7L; + step_hash(401); + l_763 = (*p_57); + } + else + { + step_hash(403); + l_768 &= (((unsigned char)((signed char)p_58 / (signed char)0xE0L) % (unsigned char)(0L || g_595[5][4])) & (p_55 != (((*p_57) != (*l_739)) ^ 0x52L))); + step_hash(404); + l_771[2] = (p_58 == ((*l_753) == &p_56)); + step_hash(405); + (**l_681) = p_56; + step_hash(406); + l_714 |= ((unsigned char)((unsigned char)(-(unsigned)((((signed char)(((void*)0 != l_753) != ((unsigned char)(**l_555) + (unsigned char)1L)) >> (signed char)0) <= (~0x4AL)) && func_78(p_57))) % (unsigned char)l_713[2][5]) % (unsigned char)((short)g_92[2] >> (short)1)); + } + } + step_hash(409); + l_768 = (-5L); + } + step_hash(411); + l_597[8] |= ((signed char)0L * (signed char)0xFAL); + step_hash(412); + return p_57; + } + else + { + short l_792 = 0x70D0L; + int l_793[7][9] = {{2L, 2L, 0x7FE5F855L, 2L, 2L, 0x7FE5F855L, 2L, 2L, 0x7FE5F855L}, {2L, 2L, 0x7FE5F855L, 2L, 2L, 0x7FE5F855L, 2L, 2L, 0x7FE5F855L}, {2L, 2L, 0x7FE5F855L, 2L, 2L, 0x7FE5F855L, 2L, 2L, 0x7FE5F855L}, {2L, 2L, 0x7FE5F855L, 2L, 2L, 0x7FE5F855L, 2L, 2L, 0x7FE5F855L}, {2L, 2L, 0x7FE5F855L, 2L, 2L, 0x7FE5F855L, 2L, 2L, 0x7FE5F855L}, {2L, 2L, 0x7FE5F855L, 2L, 2L, 0x7FE5F855L, 2L, 2L, 0x7FE5F855L}, {2L, 2L, 0x7FE5F855L, 2L, 2L, 0x7FE5F855L, 2L, 2L, 0x7FE5F855L}}; + int l_800 = (-1L); + int **l_877 = &g_117; + int i, j; + step_hash(421); + for (g_81 = 1; (g_81 <= 5); g_81 += 1) + { + int ***l_789 = &g_144[3]; + int l_794 = 0x230A96D4L; + int l_799 = (-1L); + int i; + step_hash(417); + l_792 ^= (((unsigned char)g_92[g_81] - (unsigned char)((void*)0 == l_789)) <= ((-4L) == ((unsigned char)g_92[g_81] << (unsigned char)1))); + step_hash(418); + l_795++; + step_hash(419); + l_793[5][8] = (l_798 != l_798); + step_hash(420); + l_793[6][8] &= l_799; + } + step_hash(422); + l_800 |= (l_793[3][7] && (+l_792)); + step_hash(466); + if ((p_58 & ((int)(*p_57) - (int)5L))) + { + unsigned short l_817 = 0xE00AL; + step_hash(424); + (*l_555) = (*l_555); + step_hash(430); + for (l_590 = (-10); (l_590 >= 1); l_590 += 7) + { + unsigned l_811 = 0x1B8C2E2BL; + step_hash(428); + l_817 |= ((short)((unsigned char)((unsigned char)((**l_681) != (void*)0) * (unsigned char)l_811) << (unsigned char)7) - (short)((((short)(p_56 != (void*)0) >> (short)(l_816 != &p_56)) && 0xD5055BA8L) <= ((+0xF30FE994L) & 0UL))); + step_hash(429); + l_818[1] &= (*p_57); + } + step_hash(431); + (**l_681) = p_56; + step_hash(432); + (**l_681) = p_57; + } + else + { + int *l_821 = &l_793[5][8]; + int l_869 = 0x15A5C33CL; + step_hash(441); + for (l_593 = 27; (l_593 != 15); l_593 -= 7) + { + unsigned short l_828 = 0xBCAEL; + step_hash(437); + (*l_555) = l_821; + step_hash(438); + (**l_798) = l_821; + step_hash(439); + if ((*p_56)) + break; + step_hash(440); + (***l_681) = ((unsigned short)((unsigned)p_58 + (unsigned)(((int)(*p_56) / (int)l_828) != ((*g_117) < ((unsigned char)((l_800 >= p_55) > (((unsigned char)1UL - (unsigned char)(*l_821)) && ((-(signed char)(-(unsigned char)((unsigned short)((signed char)(p_55 <= 5UL) << (signed char)l_828) >> (unsigned short)7))) > g_91))) - (unsigned char)l_793[2][4])))) * (unsigned short)p_55); + } + step_hash(464); + for (l_590 = 0; (l_590 > 15); l_590 += 1) + { + unsigned short l_858 = 1UL; + int l_859 = 0xC80569BCL; + int l_868 = 8L; + int l_870 = 0L; + int l_871 = 1L; + unsigned l_879[9][7] = {{4294967292UL, 4294967291UL, 4294967295UL, 4294967295UL, 4294967291UL, 4294967292UL, 4294967291UL}, {4294967292UL, 4294967291UL, 4294967295UL, 4294967295UL, 4294967291UL, 4294967292UL, 4294967291UL}, {4294967292UL, 4294967291UL, 4294967295UL, 4294967295UL, 4294967291UL, 4294967292UL, 4294967291UL}, {4294967292UL, 4294967291UL, 4294967295UL, 4294967295UL, 4294967291UL, 4294967292UL, 4294967291UL}, {4294967292UL, 4294967291UL, 4294967295UL, 4294967295UL, 4294967291UL, 4294967292UL, 4294967291UL}, {4294967292UL, 4294967291UL, 4294967295UL, 4294967295UL, 4294967291UL, 4294967292UL, 4294967291UL}, {4294967292UL, 4294967291UL, 4294967295UL, 4294967295UL, 4294967291UL, 4294967292UL, 4294967291UL}, {4294967292UL, 4294967291UL, 4294967295UL, 4294967295UL, 4294967291UL, 4294967292UL, 4294967291UL}, {4294967292UL, 4294967291UL, 4294967295UL, 4294967295UL, 4294967291UL, 4294967292UL, 4294967291UL}}; + int i, j; + step_hash(454); + if ((*p_56)) + { + int *l_841[1]; + int i; + for (i = 0; i < 1; i++) + l_841[i] = &g_83[5]; + step_hash(446); + (*l_821) |= ((void*)0 == l_841[0]); + step_hash(447); + l_859 |= ((***l_681) | (0x132D9B26L || (((short)g_525 << (short)((signed char)((unsigned)((unsigned char)((unsigned char)func_78(&l_793[2][2]) << (unsigned char)func_71((1UL ^ func_71(g_92[2], (8UL > func_71((((short)((short)((unsigned)0UL / (unsigned)(**l_555)) / (short)g_92[1]) - (short)g_475) != l_858), p_59, p_57, (*p_57))), p_56, (*p_57))), g_595[6][3], p_56, (*p_56))) * (unsigned char)p_59) % (unsigned)0xE7FA0FEEL) << (signed char)p_55)) ^ l_858))); + step_hash(448); + if ((*p_57)) + break; + step_hash(449); + (*l_821) = (***l_681); + } + else + { + int *l_865 = &l_793[5][8]; + step_hash(451); + (*l_821) |= (!((short)((void*)0 == p_57) >> (short)1)); + step_hash(452); + (**l_681) = l_865; + step_hash(453); + (*p_57) = (*l_821); + } + step_hash(455); + if ((*p_57)) + break; + step_hash(463); + if (((short)p_55 << (short)7)) + { + unsigned short l_872 = 3UL; + step_hash(457); + l_872++; + step_hash(458); + l_870 = l_793[4][3]; + } + else + { + int l_880[9] = {1L, 1L, 0x2D18D467L, 1L, 1L, 0x2D18D467L, 1L, 1L, 0x2D18D467L}; + int i; + step_hash(460); + (*l_821) = ((int)((**l_555) ^ 0x70L) / (int)g_94); + step_hash(461); + l_880[8] &= (p_59 && func_71((((func_71(p_59, g_83[6], &l_869, (l_877 != &p_56)) & ((l_798 != l_878) & 0x3DEAL)) < 1UL) || g_94), p_58, p_57, l_879[8][4])); + step_hash(462); + (*l_821) &= ((signed char)p_58 * (signed char)p_59); + } + } + step_hash(465); + (*l_821) |= 0x908D84FCL; + } + step_hash(467); + (*l_816) = (void*)0; + } + step_hash(469); + l_580 &= ((short)g_94 >> (short)8); + } + else + { + int *l_911 = &g_83[5]; + int l_912 = 0xDFDCF9DCL; + unsigned l_913 = 0UL; + int *l_949 = &g_83[7]; + int ***l_956 = &g_144[3]; + int *l_972 = &g_83[0]; + int l_1001 = 0x45EDF574L; + step_hash(482); + for (l_451 = 0; (l_451 > 52); l_451++) + { + int l_887[3]; + int ***l_909 = &g_144[3]; + int i; + for (i = 0; i < 3; i++) + l_887[i] = 8L; + step_hash(474); + l_887[2] |= ((void*)0 == p_56); + step_hash(479); + for (g_241 = 10; (g_241 <= 56); g_241++) + { + unsigned l_896 = 0x3DB98C9FL; + step_hash(478); + (*l_911) = ((unsigned short)(p_59 | ((int)(((signed char)l_896 % (signed char)0x11L) || ((signed char)((unsigned char)(((unsigned char)(((short)((unsigned short)func_71(func_71(l_896, ((unsigned char)((l_909 != g_910) <= p_59) + (unsigned char)(!(g_3 >= ((p_56 == (void*)0) && 0xD412L)))), l_911, (*p_57)), g_525, l_911, (*p_56)) + (unsigned short)0x2009L) / (short)p_58) >= 0xC5L) + (unsigned char)(-9L)) <= (*p_57)) / (unsigned char)0xDDL) + (signed char)p_58)) % (int)0x1AFE2176L)) >> (unsigned short)l_896); + } + step_hash(480); + l_913++; + step_hash(481); + if (l_887[0]) + continue; + } + step_hash(542); + for (g_81 = 0; (g_81 <= 5); g_81 += 1) + { + int l_927 = 0xEFC2EC47L; + unsigned char l_991[4][5] = {{0x19L, 255UL, 9UL, 250UL, 0UL}, {0x19L, 255UL, 9UL, 250UL, 0UL}, {0x19L, 255UL, 9UL, 250UL, 0UL}, {0x19L, 255UL, 9UL, 250UL, 0UL}}; + signed char l_1011 = 4L; + int i, j; + step_hash(486); + (*l_911) = ((unsigned char)((short)0L >> (short)g_92[g_81]) * (unsigned char)(p_59 == (((int)(*p_56) % (int)1L) || ((unsigned short)(-(signed char)p_58) + (unsigned short)p_58)))); + step_hash(487); + l_927 = (0x97CA2F20L & ((signed char)0x5DL / (signed char)254UL)); + step_hash(523); + if ((p_57 == (void*)0)) + { + int l_932 = 0xF1D43EBDL; + step_hash(489); + (*l_911) |= l_927; + step_hash(490); + p_57 = p_56; + step_hash(491); + l_927 = ((short)(l_932 > (((0x2CL >= ((signed char)((int)(l_932 == 0xC6758475L) - (int)g_525) + (signed char)0xC8L)) < l_932) != (p_55 ^ 0x5FL))) << (short)g_487); + } + else + { + int l_938 = 4L; + int l_939 = (-3L); + int *l_952 = &l_912; + step_hash(514); + for (p_59 = 0; (p_59 <= 2); p_59 += 1) + { + int i, j; + step_hash(500); + for (l_450 = 3; (l_450 >= 0); l_450 -= 1) + { + int l_937 = 0x61AAEA9DL; + int i, j; + step_hash(499); + l_937 |= (g_595[(p_59 + 1)][l_450] == 0x5AL); + } + step_hash(506); + for (g_475 = 0; (g_475 <= 3); g_475 += 1) + { + unsigned l_940 = 0UL; + int i, j; + step_hash(504); + ++l_940; + step_hash(505); + if (g_595[(p_59 + 4)][(p_59 + 3)]) + continue; + } + step_hash(507); + (*l_911) |= (g_595[(p_59 + 2)][(g_81 + 2)] & (*p_57)); + step_hash(513); + for (l_938 = 3; (l_938 >= 0); l_938 -= 1) + { + step_hash(511); + l_939 &= (((signed char)((short)(((int)(-5L) / (int)(*p_57)) != (&p_56 != (void*)0)) >> (short)((p_56 != l_949) & ((unsigned char)func_71(p_58, g_595[5][4], l_952, (*l_952)) << (unsigned char)l_927))) >> (signed char)g_83[5]) > l_953); + step_hash(512); + (*l_952) |= (((unsigned char)(&g_144[p_59] == l_956) % (unsigned char)((short)((-(signed char)((unsigned)(((*p_56) > (p_58 >= ((int)((short)p_59 - (short)(func_71(p_55, g_92[2], p_56, (*l_949)) || 0x52L)) - (int)g_92[g_81]))) > p_59) - (unsigned)4294967295UL)) > (-10L)) / (short)p_55)) <= g_92[g_81]); + } + } + step_hash(521); + if (((p_56 == p_57) <= func_71(func_71((p_59 > p_55), ((unsigned char)g_94 << (unsigned char)(p_59 & ((void*)0 == p_57))), l_972, (*p_57)), (*l_952), &l_927, (*p_57)))) + { + int ***l_977[9][1] = {{&g_144[1]}, {&g_144[1]}, {&g_144[1]}, {&g_144[1]}, {&g_144[1]}, {&g_144[1]}, {&g_144[1]}, {&g_144[1]}, {&g_144[1]}}; + int i, j; + step_hash(516); + (*l_952) &= (((unsigned short)(0L == (((signed char)g_241 - (signed char)(l_977[5][0] != l_978)) != func_71(((short)((short)(((short)((short)((unsigned)g_525 + (unsigned)((signed char)0x40L * (signed char)g_86)) + (short)l_991[2][3]) - (short)(((unsigned short)((short)(-1L) + (short)1UL) >> (unsigned short)3) || (-1L))) | g_92[4]) * (short)p_55) * (short)g_83[4]), g_525, p_56, (*p_56)))) * (unsigned short)p_59) == g_595[3][3]); + } + else + { + unsigned short l_996 = 3UL; + step_hash(518); + l_1001 ^= ((((~l_996) <= ((func_71((g_81 & (g_487 | ((unsigned short)((unsigned)((0x7F7D7225L && 0x11417CE6L) <= g_81) - (unsigned)(*l_952)) * (unsigned short)l_927))), g_525, p_56, (*p_57)) || p_59) & 5L)) <= p_58) && (*l_972)); + step_hash(519); + (**l_798) = p_57; + step_hash(520); + (*l_949) = ((unsigned char)((~0xA0L) || ((int)(*l_952) % (int)((unsigned char)((*p_56) && ((func_71(((g_595[3][1] | 0x5DB1L) & ((short)l_1010[0] / (short)p_58)), g_83[1], p_57, (***g_910)) != g_92[2]) > g_92[0])) % (unsigned char)g_525))) << (unsigned char)6); + } + step_hash(522); + (**l_956) = p_56; + } + step_hash(541); + for (g_91 = 0; (g_91 <= 3); g_91 += 1) + { + int l_1022[6][8] = {{1L, 1L, 0x75C6ED5DL, 1L, 1L, 4L, 1L, 1L}, {1L, 1L, 0x75C6ED5DL, 1L, 1L, 4L, 1L, 1L}, {1L, 1L, 0x75C6ED5DL, 1L, 1L, 4L, 1L, 1L}, {1L, 1L, 0x75C6ED5DL, 1L, 1L, 4L, 1L, 1L}, {1L, 1L, 0x75C6ED5DL, 1L, 1L, 4L, 1L, 1L}, {1L, 1L, 0x75C6ED5DL, 1L, 1L, 4L, 1L, 1L}}; + int i, j; + step_hash(538); + if (g_595[(g_91 + 1)][(g_91 + 2)]) + { + int l_1021 = 0x1BAF9776L; + step_hash(535); + if (((void*)0 != &p_56)) + { + step_hash(529); + (*l_972) |= (*p_56); + step_hash(530); + (*l_949) = g_595[(g_91 + 1)][(g_91 + 2)]; + step_hash(531); + if (l_1011) + break; + } + else + { + int l_1014 = 1L; + step_hash(533); + l_1022[0][2] = (((short)l_1014 + (short)p_59) && (((short)((unsigned short)(8UL <= 0x4B6471AAL) << (unsigned short)((int)l_1011 + (int)((g_487 < g_81) < (l_1014 & 0x34C2FBB4L)))) + (short)g_487) != l_1021)); + step_hash(534); + return p_56; + } + } + else + { + step_hash(537); + (*l_949) = g_595[(g_91 + 1)][(g_91 + 2)]; + } + step_hash(539); + if ((*p_56)) + break; + step_hash(540); + (*l_949) = 1L; + } + } + step_hash(543); + (*l_949) = 4L; + } + step_hash(545); + return l_1023; +} + + + + + + + +static short func_62(int p_63, signed char p_64, short p_65) +{ + int *l_189 = (void*)0; + int *l_190 = &g_86; + int l_191 = 0xB8DD50FDL; + int *l_192[6]; + unsigned char l_193 = 0x6CL; + unsigned l_215 = 6UL; + int ***l_325 = &g_144[0]; + int l_431[4] = {0x0616CA4FL, 0L, 0x0616CA4FL, 0L}; + int i; + for (i = 0; i < 6; i++) + l_192[i] = &g_83[6]; + step_hash(86); + l_193--; + step_hash(101); + for (l_191 = 16; (l_191 < (-15)); l_191 -= 9) + { + unsigned char l_212 = 0xF8L; + int *l_214 = &g_83[5]; + step_hash(94); + for (g_91 = 8; (g_91 >= 3); g_91 -= 1) + { + int i; + step_hash(93); + return g_83[g_91]; + } + step_hash(100); + for (g_81 = 0; (g_81 > (-18)); --g_81) + { + signed char l_213 = 0x18L; + int **l_216 = &l_189; + step_hash(98); + (*l_190) = ((signed char)((((unsigned short)6UL >> (unsigned short)5) == ((0xB1F4L ^ (*l_190)) >= ((int)(func_71(((7UL < g_83[1]) >= ((g_92[2] == (func_71(g_81, (((unsigned)(l_212 >= (-3L)) - (unsigned)l_212) >= l_213), l_214, (*l_214)) >= p_65)) < 0xA04E1165L)), g_83[5], &l_191, l_215) == g_83[0]) % (int)g_86))) || (*l_214)) - (signed char)g_91); + step_hash(99); + (*l_216) = (void*)0; + } + } + step_hash(163); + for (g_81 = 22; (g_81 <= (-29)); g_81 -= 4) + { + short l_223 = 0L; + int **l_226 = (void*)0; + int *l_229 = (void*)0; + int l_236 = (-1L); + int l_300 = 0xAA0C160EL; + int l_301 = (-4L); + int l_302 = 0L; + int l_304 = 0x14E7BC7DL; + int l_306 = (-1L); + int l_308 = 0x3CE50976L; + step_hash(105); + (*g_117) = func_71(((signed char)g_92[2] % (signed char)((unsigned short)g_81 * (unsigned short)p_65)), ((void*)0 == &p_63), &l_191, p_64); + step_hash(106); + if ((*g_117)) + break; + step_hash(162); + if ((func_71((l_223 && (p_63 != (func_71(((signed char)((l_226 != &l_192[3]) && (((-1L) & ((unsigned short)(0x4ECCL > (func_71(g_92[1], p_64, &l_191, p_63) & g_83[5])) >> (unsigned short)p_65)) == 0L)) - (signed char)p_64), p_64, l_229, (*l_190)) | 3UL))), g_81, &l_191, p_65) & g_92[4])) + { + signed char l_240 = 0x61L; + int l_245 = 1L; + int *l_266 = (void*)0; + unsigned char l_297 = 0x56L; + int l_299[7]; + int l_305 = 0x5546EA2CL; + int i; + for (i = 0; i < 7; i++) + l_299[i] = 0x47172757L; + step_hash(157); + for (p_65 = 5; (p_65 >= (-25)); p_65 -= 1) + { + unsigned char l_237[8] = {254UL, 254UL, 255UL, 254UL, 254UL, 255UL, 254UL, 254UL}; + int l_244[5][2] = {{1L, 0xA520F3B2L}, {1L, 0xA520F3B2L}, {1L, 0xA520F3B2L}, {1L, 0xA520F3B2L}, {1L, 0xA520F3B2L}}; + int **l_260 = &l_189; + unsigned l_310 = 0UL; + int i, j; + step_hash(137); + for (l_193 = 0; (l_193 != 25); l_193 += 8) + { + unsigned l_246 = 1UL; + int *l_261 = &g_3; + step_hash(123); + if ((g_83[3] <= (0xAEC4BBD0L < (&g_144[0] != (void*)0)))) + { + unsigned l_234 = 0x41DB001EL; + int l_235 = 0xE1C7F332L; + step_hash(115); + if (p_65) + break; + step_hash(116); + (*g_117) = l_234; + step_hash(117); + ++l_237[7]; + } + else + { + step_hash(119); + p_63 &= l_240; + step_hash(120); + --g_241; + step_hash(121); + (*g_117) = 0xD45AA9D1L; + step_hash(122); + --l_246; + } + step_hash(128); + for (g_241 = 0; (g_241 <= 2); g_241 += 1) + { + step_hash(127); + return p_65; + } + step_hash(136); + if ((*g_117)) + { + unsigned short l_249[7][8] = {{0x5D0AL, 0UL, 65535UL, 0xF6C5L, 0UL, 0x94ABL, 0UL, 0xF6C5L}, {0x5D0AL, 0UL, 65535UL, 0xF6C5L, 0UL, 0x94ABL, 0UL, 0xF6C5L}, {0x5D0AL, 0UL, 65535UL, 0xF6C5L, 0UL, 0x94ABL, 0UL, 0xF6C5L}, {0x5D0AL, 0UL, 65535UL, 0xF6C5L, 0UL, 0x94ABL, 0UL, 0xF6C5L}, {0x5D0AL, 0UL, 65535UL, 0xF6C5L, 0UL, 0x94ABL, 0UL, 0xF6C5L}, {0x5D0AL, 0UL, 65535UL, 0xF6C5L, 0UL, 0x94ABL, 0UL, 0xF6C5L}, {0x5D0AL, 0UL, 65535UL, 0xF6C5L, 0UL, 0x94ABL, 0UL, 0xF6C5L}}; + int i, j; + step_hash(130); + (*g_117) = func_71(g_94, g_94, &l_244[2][1], p_63); + step_hash(131); + --l_249[0][1]; + step_hash(132); + (*l_190) = ((5UL > ((((int)(-6L) + (int)((signed char)((signed char)((func_71(((((void*)0 != l_260) >= (l_261 != (void*)0)) > ((short)((((signed char)g_91 >> (signed char)2) == (((-5L) < ((g_83[5] >= g_92[2]) == 0xE13FBB33L)) == 0x77FB83B5L)) != (-2L)) / (short)(-4L))), g_81, &l_245, p_63) | (*l_261)) & p_63) * (signed char)8UL) << (signed char)3)) ^ p_65) || 0x2E4BL)) > 0L); + } + else + { + step_hash(134); + (*l_260) = &l_191; + step_hash(135); + l_266 = &p_63; + } + } + step_hash(150); + for (l_236 = 0; (l_236 >= 17); l_236 += 8) + { + int *l_269 = &l_244[4][1]; + step_hash(146); + for (l_193 = 0; (l_193 <= 8); l_193 += 1) + { + step_hash(144); + (*l_260) = l_269; + step_hash(145); + (*l_260) = (*l_260); + } + step_hash(147); + (*l_260) = &p_63; + step_hash(148); + (*l_190) &= (func_71(p_63, (**l_260), &l_191, ((signed char)(g_81 ^ 0xE27EL) + (signed char)((signed char)((signed char)p_65 + (signed char)(!func_71(g_83[5], ((unsigned short)((*l_269) == (g_3 >= g_91)) * (unsigned short)p_65), &l_191, p_64))) << (signed char)g_94))) || p_63); + step_hash(149); + (**l_260) ^= (p_64 < (*l_269)); + } + step_hash(156); + for (g_241 = 0; (g_241 <= 3); g_241++) + { + short l_296 = 1L; + int l_298 = 9L; + int l_303 = 0L; + int l_307 = 3L; + int l_309 = 0xBE4C5A7FL; + step_hash(154); + l_298 = ((unsigned char)((int)(g_94 & (((signed char)g_92[2] << (signed char)((unsigned char)((unsigned short)((unsigned char)func_71(g_241, p_64, &p_63, (+(~((short)((unsigned short)func_71(g_83[5], p_64, &p_63, l_296) - (unsigned short)(*l_190)) + (short)g_3)))) / (unsigned char)0x24L) / (unsigned short)0x10A6L) / (unsigned char)0xDBL)) == (*g_117))) - (int)p_65) - (unsigned char)l_297); + step_hash(155); + --l_310; + } + } + step_hash(158); + (*g_117) |= 0x63A026B2L; + step_hash(159); + (*l_190) = (g_91 >= ((unsigned short)(*l_190) >> (unsigned short)(((unsigned)((((p_63 || (*g_117)) >= p_65) <= ((((void*)0 == &l_266) >= ((((unsigned short)(((signed char)((unsigned char)(l_325 == &g_144[3]) - (unsigned char)p_64) >> (signed char)0) && 4294967292UL) + (unsigned short)p_64) == p_65) == (***l_325))) >= p_64)) >= 0x382C0D10L) % (unsigned)p_63) & 4294967286UL))); + } + else + { + int l_326 = 0x99902EABL; + step_hash(161); + return l_326; + } + } + step_hash(263); + for (g_81 = 0; (g_81 < (-19)); --g_81) + { + unsigned short l_333 = 1UL; + int **l_334[7][8] = {{&g_117, &l_192[2], &l_192[3], &l_192[3], &l_192[2], &g_117, &l_192[2], &l_192[3]}, {&g_117, &l_192[2], &l_192[3], &l_192[3], &l_192[2], &g_117, &l_192[2], &l_192[3]}, {&g_117, &l_192[2], &l_192[3], &l_192[3], &l_192[2], &g_117, &l_192[2], &l_192[3]}, {&g_117, &l_192[2], &l_192[3], &l_192[3], &l_192[2], &g_117, &l_192[2], &l_192[3]}, {&g_117, &l_192[2], &l_192[3], &l_192[3], &l_192[2], &g_117, &l_192[2], &l_192[3]}, {&g_117, &l_192[2], &l_192[3], &l_192[3], &l_192[2], &g_117, &l_192[2], &l_192[3]}, {&g_117, &l_192[2], &l_192[3], &l_192[3], &l_192[2], &g_117, &l_192[2], &l_192[3]}}; + int *l_363 = &g_86; + int ***l_374 = &l_334[5][0]; + int *l_399 = &g_83[5]; + signed char l_401 = 0x93L; + short l_436 = 5L; + int i, j; + step_hash(262); + if ((((unsigned char)(65531UL & (((short)l_333 << (short)12) ^ g_3)) << (unsigned char)0) ^ (l_334[5][0] == (void*)0))) + { + int *l_342 = &g_3; + int l_346[1][9] = {{0x15E5B6B0L, 0x15E5B6B0L, 0xDB74E478L, 0x15E5B6B0L, 0x15E5B6B0L, 0xDB74E478L, 0x15E5B6B0L, 0x15E5B6B0L, 0xDB74E478L}}; + signed char l_348[4] = {6L, 0x93L, 6L, 0x93L}; + int *l_372 = &g_86; + int ***l_373[1]; + int i, j; + for (i = 0; i < 1; i++) + l_373[i] = &g_144[3]; + step_hash(168); + (*g_117) = p_63; + step_hash(223); + for (l_333 = 0; (l_333 <= 6); l_333 += 1) + { + int *l_339 = &g_83[6]; + int l_344 = 0x4F9FACA5L; + int l_345 = 0L; + int l_349 = 0x600C539AL; + unsigned short l_351 = 65532UL; + int *l_354 = &g_86; + step_hash(190); + if ((*g_117)) + { + step_hash(173); + (**l_325) = &p_63; + } + else + { + unsigned l_341 = 4294967295UL; + step_hash(181); + for (g_91 = 0; (g_91 <= 6); g_91 += 1) + { + signed char l_340 = 3L; + step_hash(178); + (**l_325) = &p_63; + step_hash(179); + (*l_190) = (~0x69557001L); + step_hash(180); + p_63 = (((unsigned char)(1UL <= g_83[5]) + (unsigned char)((signed char)(func_71(g_83[5], (&g_144[3] == (void*)0), l_339, (*g_117)) ^ (0x343D5BD6L > l_340)) * (signed char)0xA9L)) | (*l_339)); + } + step_hash(189); + for (l_215 = 0; (l_215 <= 5); l_215 += 1) + { + int i, j; + step_hash(185); + (**l_325) = &p_63; + step_hash(186); + if (g_92[l_215]) + break; + step_hash(187); + (*l_190) = g_92[l_215]; + step_hash(188); + l_341 = 0xD081BB5CL; + } + } + step_hash(202); + for (p_64 = 6; (p_64 >= 0); p_64 -= 1) + { + int l_343 = (-6L); + step_hash(194); + (**l_325) = l_342; + step_hash(201); + if (p_65) + { + step_hash(196); + if (l_343) + break; + step_hash(197); + (**l_325) = &p_63; + step_hash(198); + l_343 = p_63; + } + else + { + step_hash(200); + (**l_325) = &p_63; + } + } + } + step_hash(246); + if ((***l_325)) + { + int l_402 = 6L; + int l_403 = 1L; + unsigned l_411 = 4294967288UL; + int *l_420 = &l_403; + step_hash(236); + if ((((g_94 | l_401) || (p_65 || p_65)) > l_402)) + { + step_hash(226); + if (p_63) + break; + } + else + { + int *l_410[1][8]; + int i, j; + for (i = 0; i < 1; i++) + { + for (j = 0; j < 8; j++) + l_410[i][j] = &l_346[0][5]; + } + step_hash(228); + p_63 = ((void*)0 == (**l_374)); + step_hash(235); + if ((&p_63 != &p_63)) + { + step_hash(230); + return g_81; + } + else + { + int l_412 = 6L; + step_hash(232); + (*l_190) = (p_63 || ((((g_83[3] != 0xDFL) & func_71(((l_403 >= p_65) <= 0x7DFC97EEL), ((unsigned char)((signed char)((unsigned short)(!p_64) * (unsigned short)p_65) + (signed char)0x32L) >> (unsigned char)p_65), l_410[0][6], l_411)) && g_3) < l_412)); + step_hash(233); + l_402 = l_403; + step_hash(234); + p_63 = ((signed char)((void*)0 == l_410[0][3]) >> (signed char)p_65); + } + } + step_hash(242); + if (((!g_241) && (!(+((void*)0 != (*l_374)))))) + { + step_hash(238); + p_63 |= (-1L); + } + else + { + unsigned char l_419 = 0x02L; + step_hash(240); + (*l_420) = (((unsigned short)func_71(l_419, (*l_190), l_420, p_65) + (unsigned short)((unsigned short)((unsigned char)(((func_71((((short)g_241 * (short)func_71(((int)(((*l_342) && ((short)func_71(((((p_65 && func_71(func_71(g_91, p_65, (**l_374), (*l_190)), p_65, &l_403, l_431[2])) == p_63) && g_83[5]) > (*l_420)), g_94, (**l_325), p_64) + (short)p_63)) < (*l_420)) - (int)4294967295UL), g_3, (**l_325), p_64)) >= 249UL), g_241, &l_403, p_64) > l_419) < p_63) && (*l_420)) % (unsigned char)248UL) / (unsigned short)g_83[6])) > p_65); + step_hash(241); + (*l_363) = p_63; + } + } + else + { + step_hash(244); + (*l_399) = p_65; + step_hash(245); + for (p_63 = 0; p_63 < 4; p_63 += 1) + { + l_431[p_63] = 0x5924FA6CL; + } + } + step_hash(247); + return p_64; + } + else + { + int l_443 = 0L; + int *l_444 = &g_3; + step_hash(249); + (*l_399) |= ((signed char)g_81 / (signed char)(***l_325)); + step_hash(260); + if ((*l_190)) + { + step_hash(251); + (*g_117) = 0x856B24E4L; + } + else + { + int ***l_437[8] = {&l_334[5][0], &l_334[6][0], &l_334[5][0], &l_334[6][0], &l_334[5][0], &l_334[6][0], &l_334[5][0], &l_334[6][0]}; + int i; + step_hash(258); + if (((func_71(g_241, (-(unsigned char)g_81), &p_63, (-(signed char)l_436)) | (-3L)) == (&g_144[3] == l_437[0]))) + { + step_hash(254); + p_63 = p_63; + step_hash(255); + (**l_374) = &p_63; + } + else + { + signed char l_438 = 0x1BL; + step_hash(257); + (*l_363) ^= (((*l_374) != (*l_374)) | l_438); + } + step_hash(259); + (*l_399) &= ((unsigned)(((unsigned)func_71(g_3, l_443, &p_63, p_63) % (unsigned)l_443) < func_71(p_63, g_92[4], l_444, (*g_117))) % (unsigned)(*l_444)); + } + step_hash(261); + return p_65; + } + } + step_hash(264); + return g_83[0]; +} + + + + + + + +static unsigned short func_71(short p_72, signed char p_73, int * p_74, int p_75) +{ + step_hash(84); + return p_75; +} + + + + + + + +static short func_78(int * p_79) +{ + unsigned l_82[6]; + int l_90 = 1L; + int l_93 = 1L; + short l_105 = 0L; + unsigned l_131 = 0xA5AE12EAL; + int i; + for (i = 0; i < 6; i++) + l_82[i] = 0UL; + step_hash(12); + g_81 = 8L; + step_hash(81); + for (g_81 = 1; (g_81 <= 5); g_81 += 1) + { + int l_87 = (-7L); + int l_88 = 1L; + int l_89[7] = {0x3BC0E3E0L, 0x3BC0E3E0L, (-6L), 0x3BC0E3E0L, 0x3BC0E3E0L, (-6L), 0x3BC0E3E0L}; + unsigned l_112 = 0UL; + int l_127 = 0xDBB176A9L; + int i; + step_hash(21); + for (g_83[5] = 0; (g_83[5] <= 5); g_83[5] += 1) + { + int *l_84 = (void*)0; + int *l_85[6][6] = {{&g_86, (void*)0, &g_86, (void*)0, &g_86, (void*)0}, {&g_86, (void*)0, &g_86, (void*)0, &g_86, (void*)0}, {&g_86, (void*)0, &g_86, (void*)0, &g_86, (void*)0}, {&g_86, (void*)0, &g_86, (void*)0, &g_86, (void*)0}, {&g_86, (void*)0, &g_86, (void*)0, &g_86, (void*)0}, {&g_86, (void*)0, &g_86, (void*)0, &g_86, (void*)0}}; + int i, j; + step_hash(19); + g_86 = l_82[g_81]; + step_hash(20); + g_94++; + } + step_hash(22); + if (l_82[g_81]) + continue; + } + step_hash(82); + return l_93; +} + + +void csmith_compute_hash(void) +{ + int i, j; + transparent_crc(g_3, "g_3", print_hash_value); + transparent_crc(g_81, "g_81", print_hash_value); + for (i = 0; i < 9; i++) + { + transparent_crc(g_83[i], "g_83[i]", print_hash_value); + if (print_hash_value) printf("index = [%d]\n", i); + + } + transparent_crc(g_86, "g_86", print_hash_value); + transparent_crc(g_91, "g_91", print_hash_value); + for (i = 0; i < 6; i++) + { + transparent_crc(g_92[i], "g_92[i]", print_hash_value); + if (print_hash_value) printf("index = [%d]\n", i); + + } + transparent_crc(g_94, "g_94", print_hash_value); + transparent_crc(g_241, "g_241", print_hash_value); + transparent_crc(g_475, "g_475", print_hash_value); + transparent_crc(g_487, "g_487", print_hash_value); + transparent_crc(g_525, "g_525", print_hash_value); + for (i = 0; i < 8; i++) + { + for (j = 0; j < 9; j++) + { + transparent_crc(g_595[i][j], "g_595[i][j]", print_hash_value); + if (print_hash_value) printf("index = [%d][%d]\n", i, j); + + } + } + transparent_crc(g_1070, "g_1070", print_hash_value); + for (i = 0; i < 4; i++) + { + transparent_crc(g_1122[i], "g_1122[i]", print_hash_value); + if (print_hash_value) printf("index = [%d]\n", i); + + } + transparent_crc(g_1142, "g_1142", print_hash_value); + for (i = 0; i < 6; i++) + { + for (j = 0; j < 4; j++) + { + transparent_crc(g_1152[i][j], "g_1152[i][j]", print_hash_value); + if (print_hash_value) printf("index = [%d][%d]\n", i, j); + + } + } + transparent_crc(g_1156, "g_1156", print_hash_value); + transparent_crc(g_1262, "g_1262", print_hash_value); + transparent_crc(g_1359, "g_1359", print_hash_value); + transparent_crc(g_1398, "g_1398", print_hash_value); + transparent_crc(g_1585, "g_1585", print_hash_value); + transparent_crc(g_1703, "g_1703", print_hash_value); +} + +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} + + + +int main (void) +{ + int i, j; + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand85.expect b/src/tests/csmith/rand85.expect new file mode 100644 index 0000000..8f490cf --- /dev/null +++ b/src/tests/csmith/rand85.expect @@ -0,0 +1,1240 @@ +...checksum after hashing g_3 : C8210FCD +...checksum after hashing g_81 : C8286C +...checksum after hashing g_83[i] : 2630E3B1 +index = [0] +...checksum after hashing g_83[i] : 619C151C +index = [1] +...checksum after hashing g_83[i] : 6594AD11 +index = [2] +...checksum after hashing g_83[i] : 734DC514 +index = [3] +...checksum after hashing g_83[i] : A67964B9 +index = [4] +...checksum after hashing g_83[i] : 6C1B16FB +index = [5] +...checksum after hashing g_83[i] : C6434999 +index = [6] +...checksum after hashing g_83[i] : 74ED8236 +index = [7] +...checksum after hashing g_83[i] : 9BEE062 +index = [8] +...checksum after hashing g_86 : 89DF1F5C +...checksum after hashing g_91 : CC44B9CE +...checksum after hashing g_92[i] : C322E049 +index = [0] +...checksum after hashing g_92[i] : 73D9AA44 +index = [1] +...checksum after hashing g_92[i] : C097F175 +index = [2] +...checksum after hashing g_92[i] : D47B2F5D +index = [3] +...checksum after hashing g_92[i] : DEFBD82B +index = [4] +...checksum after hashing g_92[i] : FB72336B +index = [5] +...checksum after hashing g_94 : 293E4D4 +...checksum after hashing g_241 : 9A817692 +...checksum after hashing g_475 : B110C073 +...checksum after hashing g_487 : D081E74E +...checksum after hashing g_525 : 29E9F64B +...checksum after hashing g_595[i][j] : A9AAB8EE +index = [0][0] +...checksum after hashing g_595[i][j] : A0BE653A +index = [0][1] +...checksum after hashing g_595[i][j] : C77353E0 +index = [0][2] +...checksum after hashing g_595[i][j] : 46685308 +index = [0][3] +...checksum after hashing g_595[i][j] : 23BCDF3C +index = [0][4] +...checksum after hashing g_595[i][j] : 708E1664 +index = [0][5] +...checksum after hashing g_595[i][j] : C012C316 +index = [0][6] +...checksum after hashing g_595[i][j] : 244F4D25 +index = [0][7] +...checksum after hashing g_595[i][j] : F5B2A7F8 +index = [0][8] +...checksum after hashing g_595[i][j] : 1D39077D +index = [1][0] +...checksum after hashing g_595[i][j] : 57293C11 +index = [1][1] +...checksum after hashing g_595[i][j] : CEF41582 +index = [1][2] +...checksum after hashing g_595[i][j] : AE4E2BDA +index = [1][3] +...checksum after hashing g_595[i][j] : 980C7EA8 +index = [1][4] +...checksum after hashing g_595[i][j] : 2260937C +index = [1][5] +...checksum after hashing g_595[i][j] : F7D98BB7 +index = [1][6] +...checksum after hashing g_595[i][j] : 3FA244B7 +index = [1][7] +...checksum after hashing g_595[i][j] : 8C9FF115 +index = [1][8] +...checksum after hashing g_595[i][j] : 58EE5FED +index = [2][0] +...checksum after hashing g_595[i][j] : 4009447A +index = [2][1] +...checksum after hashing g_595[i][j] : 6E66FD0D +index = [2][2] +...checksum after hashing g_595[i][j] : 292447DF +index = [2][3] +...checksum after hashing g_595[i][j] : 2D12970 +index = [2][4] +...checksum after hashing g_595[i][j] : 8C3FFB37 +index = [2][5] +...checksum after hashing g_595[i][j] : F1450167 +index = [2][6] +...checksum after hashing g_595[i][j] : C1C3035B +index = [2][7] +...checksum after hashing g_595[i][j] : 4300112D +index = [2][8] +...checksum after hashing g_595[i][j] : 399116F7 +index = [3][0] +...checksum after hashing g_595[i][j] : 92F47139 +index = [3][1] +...checksum after hashing g_595[i][j] : CA801AD +index = [3][2] +...checksum after hashing g_595[i][j] : 2E542EDA +index = [3][3] +...checksum after hashing g_595[i][j] : C352C5B8 +index = [3][4] +...checksum after hashing g_595[i][j] : 63F32DB4 +index = [3][5] +...checksum after hashing g_595[i][j] : D057369B +index = [3][6] +...checksum after hashing g_595[i][j] : 18CA39DC +index = [3][7] +...checksum after hashing g_595[i][j] : 34BF2ED0 +index = [3][8] +...checksum after hashing g_595[i][j] : CF962CC8 +index = [4][0] +...checksum after hashing g_595[i][j] : 8DF3866 +index = [4][1] +...checksum after hashing g_595[i][j] : 86272F25 +index = [4][2] +...checksum after hashing g_595[i][j] : 851C355E +index = [4][3] +...checksum after hashing g_595[i][j] : C8BE1728 +index = [4][4] +...checksum after hashing g_595[i][j] : 35A74826 +index = [4][5] +...checksum after hashing g_595[i][j] : D5DD7AEE +index = [4][6] +...checksum after hashing g_595[i][j] : 8CAD9998 +index = [4][7] +...checksum after hashing g_595[i][j] : 246F16E7 +index = [4][8] +...checksum after hashing g_595[i][j] : 149D8D83 +index = [5][0] +...checksum after hashing g_595[i][j] : 6E85029A +index = [5][1] +...checksum after hashing g_595[i][j] : 87EE97CF +index = [5][2] +...checksum after hashing g_595[i][j] : 9AAC673B +index = [5][3] +...checksum after hashing g_595[i][j] : C2B3498A +index = [5][4] +...checksum after hashing g_595[i][j] : E19C0D41 +index = [5][5] +...checksum after hashing g_595[i][j] : B871038A +index = [5][6] +...checksum after hashing g_595[i][j] : 52784413 +index = [5][7] +...checksum after hashing g_595[i][j] : 6424F37 +index = [5][8] +...checksum after hashing g_595[i][j] : A4EE3A2E +index = [6][0] +...checksum after hashing g_595[i][j] : DEE6B26E +index = [6][1] +...checksum after hashing g_595[i][j] : CE0563C7 +index = [6][2] +...checksum after hashing g_595[i][j] : 5F5F47CB +index = [6][3] +...checksum after hashing g_595[i][j] : A8079D8C +index = [6][4] +...checksum after hashing g_595[i][j] : 63B92C8B +index = [6][5] +...checksum after hashing g_595[i][j] : 734B13D4 +index = [6][6] +...checksum after hashing g_595[i][j] : 4C935AB3 +index = [6][7] +...checksum after hashing g_595[i][j] : 1A14CF0C +index = [6][8] +...checksum after hashing g_595[i][j] : 9A11F893 +index = [7][0] +...checksum after hashing g_595[i][j] : F19086DE +index = [7][1] +...checksum after hashing g_595[i][j] : 22A18338 +index = [7][2] +...checksum after hashing g_595[i][j] : 4B6F4624 +index = [7][3] +...checksum after hashing g_595[i][j] : E245445B +index = [7][4] +...checksum after hashing g_595[i][j] : E24261D +index = [7][5] +...checksum after hashing g_595[i][j] : 111BC1C8 +index = [7][6] +...checksum after hashing g_595[i][j] : C1560EEA +index = [7][7] +...checksum after hashing g_595[i][j] : E220D5DE +index = [7][8] +...checksum after hashing g_1070 : 156BF862 +...checksum after hashing g_1122[i] : F18F6F67 +index = [0] +...checksum after hashing g_1122[i] : A23BDD0 +index = [1] +...checksum after hashing g_1122[i] : 850D6EA5 +index = [2] +...checksum after hashing g_1122[i] : 8978BE86 +index = [3] +...checksum after hashing g_1142 : 2186C5F3 +...checksum after hashing g_1152[i][j] : 91DE7C75 +index = [0][0] +...checksum after hashing g_1152[i][j] : 46DEC3D4 +index = [0][1] +...checksum after hashing g_1152[i][j] : 3A2DCE0E +index = [0][2] +...checksum after hashing g_1152[i][j] : EFDB61DD +index = [0][3] +...checksum after hashing g_1152[i][j] : 7C8B9D6A +index = [1][0] +...checksum after hashing g_1152[i][j] : FFF3095E +index = [1][1] +...checksum after hashing g_1152[i][j] : B666DA00 +index = [1][2] +...checksum after hashing g_1152[i][j] : E3A84487 +index = [1][3] +...checksum after hashing g_1152[i][j] : EB1990B9 +index = [2][0] +...checksum after hashing g_1152[i][j] : EED66205 +index = [2][1] +...checksum after hashing g_1152[i][j] : 6CAB8677 +index = [2][2] +...checksum after hashing g_1152[i][j] : 68B499BF +index = [2][3] +...checksum after hashing g_1152[i][j] : C7CAE161 +index = [3][0] +...checksum after hashing g_1152[i][j] : C0C80B2B +index = [3][1] +...checksum after hashing g_1152[i][j] : 63D79CC5 +index = [3][2] +...checksum after hashing g_1152[i][j] : DD4B1263 +index = [3][3] +...checksum after hashing g_1152[i][j] : 6E07A950 +index = [4][0] +...checksum after hashing g_1152[i][j] : 2788FAD8 +index = [4][1] +...checksum after hashing g_1152[i][j] : 8D1504B5 +index = [4][2] +...checksum after hashing g_1152[i][j] : FB0A2104 +index = [4][3] +...checksum after hashing g_1152[i][j] : D5B4C69A +index = [5][0] +...checksum after hashing g_1152[i][j] : EEA8EFD8 +index = [5][1] +...checksum after hashing g_1152[i][j] : E0C43B98 +index = [5][2] +...checksum after hashing g_1152[i][j] : 2D451DF1 +index = [5][3] +...checksum after hashing g_1156 : E6DA2614 +...checksum after hashing g_1262 : CCAAE357 +...checksum after hashing g_1359 : 847A89D2 +...checksum after hashing g_1398 : E215F4FC +...checksum after hashing g_1585 : 2688C84F +...checksum after hashing g_1703 : 5CD8C731 +before stmt(1): checksum = 5CD8C731 +...checksum after hashing g_3 : C8210FCD +...checksum after hashing g_81 : C8286C +...checksum after hashing g_83[i] : 2630E3B1 +index = [0] +...checksum after hashing g_83[i] : 619C151C +index = [1] +...checksum after hashing g_83[i] : 6594AD11 +index = [2] +...checksum after hashing g_83[i] : 734DC514 +index = [3] +...checksum after hashing g_83[i] : A67964B9 +index = [4] +...checksum after hashing g_83[i] : 6C1B16FB +index = [5] +...checksum after hashing g_83[i] : C6434999 +index = [6] +...checksum after hashing g_83[i] : 74ED8236 +index = [7] +...checksum after hashing g_83[i] : 9BEE062 +index = [8] +...checksum after hashing g_86 : 89DF1F5C +...checksum after hashing g_91 : CC44B9CE +...checksum after hashing g_92[i] : C322E049 +index = [0] +...checksum after hashing g_92[i] : 73D9AA44 +index = [1] +...checksum after hashing g_92[i] : C097F175 +index = [2] +...checksum after hashing g_92[i] : D47B2F5D +index = [3] +...checksum after hashing g_92[i] : DEFBD82B +index = [4] +...checksum after hashing g_92[i] : FB72336B +index = [5] +...checksum after hashing g_94 : 293E4D4 +...checksum after hashing g_241 : 9A817692 +...checksum after hashing g_475 : B110C073 +...checksum after hashing g_487 : D081E74E +...checksum after hashing g_525 : 29E9F64B +...checksum after hashing g_595[i][j] : A9AAB8EE +index = [0][0] +...checksum after hashing g_595[i][j] : A0BE653A +index = [0][1] +...checksum after hashing g_595[i][j] : C77353E0 +index = [0][2] +...checksum after hashing g_595[i][j] : 46685308 +index = [0][3] +...checksum after hashing g_595[i][j] : 23BCDF3C +index = [0][4] +...checksum after hashing g_595[i][j] : 708E1664 +index = [0][5] +...checksum after hashing g_595[i][j] : C012C316 +index = [0][6] +...checksum after hashing g_595[i][j] : 244F4D25 +index = [0][7] +...checksum after hashing g_595[i][j] : F5B2A7F8 +index = [0][8] +...checksum after hashing g_595[i][j] : 1D39077D +index = [1][0] +...checksum after hashing g_595[i][j] : 57293C11 +index = [1][1] +...checksum after hashing g_595[i][j] : CEF41582 +index = [1][2] +...checksum after hashing g_595[i][j] : AE4E2BDA +index = [1][3] +...checksum after hashing g_595[i][j] : 980C7EA8 +index = [1][4] +...checksum after hashing g_595[i][j] : 2260937C +index = [1][5] +...checksum after hashing g_595[i][j] : F7D98BB7 +index = [1][6] +...checksum after hashing g_595[i][j] : 3FA244B7 +index = [1][7] +...checksum after hashing g_595[i][j] : 8C9FF115 +index = [1][8] +...checksum after hashing g_595[i][j] : 58EE5FED +index = [2][0] +...checksum after hashing g_595[i][j] : 4009447A +index = [2][1] +...checksum after hashing g_595[i][j] : 6E66FD0D +index = [2][2] +...checksum after hashing g_595[i][j] : 292447DF +index = [2][3] +...checksum after hashing g_595[i][j] : 2D12970 +index = [2][4] +...checksum after hashing g_595[i][j] : 8C3FFB37 +index = [2][5] +...checksum after hashing g_595[i][j] : F1450167 +index = [2][6] +...checksum after hashing g_595[i][j] : C1C3035B +index = [2][7] +...checksum after hashing g_595[i][j] : 4300112D +index = [2][8] +...checksum after hashing g_595[i][j] : 399116F7 +index = [3][0] +...checksum after hashing g_595[i][j] : 92F47139 +index = [3][1] +...checksum after hashing g_595[i][j] : CA801AD +index = [3][2] +...checksum after hashing g_595[i][j] : 2E542EDA +index = [3][3] +...checksum after hashing g_595[i][j] : C352C5B8 +index = [3][4] +...checksum after hashing g_595[i][j] : 63F32DB4 +index = [3][5] +...checksum after hashing g_595[i][j] : D057369B +index = [3][6] +...checksum after hashing g_595[i][j] : 18CA39DC +index = [3][7] +...checksum after hashing g_595[i][j] : 34BF2ED0 +index = [3][8] +...checksum after hashing g_595[i][j] : CF962CC8 +index = [4][0] +...checksum after hashing g_595[i][j] : 8DF3866 +index = [4][1] +...checksum after hashing g_595[i][j] : 86272F25 +index = [4][2] +...checksum after hashing g_595[i][j] : 851C355E +index = [4][3] +...checksum after hashing g_595[i][j] : C8BE1728 +index = [4][4] +...checksum after hashing g_595[i][j] : 35A74826 +index = [4][5] +...checksum after hashing g_595[i][j] : D5DD7AEE +index = [4][6] +...checksum after hashing g_595[i][j] : 8CAD9998 +index = [4][7] +...checksum after hashing g_595[i][j] : 246F16E7 +index = [4][8] +...checksum after hashing g_595[i][j] : 149D8D83 +index = [5][0] +...checksum after hashing g_595[i][j] : 6E85029A +index = [5][1] +...checksum after hashing g_595[i][j] : 87EE97CF +index = [5][2] +...checksum after hashing g_595[i][j] : 9AAC673B +index = [5][3] +...checksum after hashing g_595[i][j] : C2B3498A +index = [5][4] +...checksum after hashing g_595[i][j] : E19C0D41 +index = [5][5] +...checksum after hashing g_595[i][j] : B871038A +index = [5][6] +...checksum after hashing g_595[i][j] : 52784413 +index = [5][7] +...checksum after hashing g_595[i][j] : 6424F37 +index = [5][8] +...checksum after hashing g_595[i][j] : A4EE3A2E +index = [6][0] +...checksum after hashing g_595[i][j] : DEE6B26E +index = [6][1] +...checksum after hashing g_595[i][j] : CE0563C7 +index = [6][2] +...checksum after hashing g_595[i][j] : 5F5F47CB +index = [6][3] +...checksum after hashing g_595[i][j] : A8079D8C +index = [6][4] +...checksum after hashing g_595[i][j] : 63B92C8B +index = [6][5] +...checksum after hashing g_595[i][j] : 734B13D4 +index = [6][6] +...checksum after hashing g_595[i][j] : 4C935AB3 +index = [6][7] +...checksum after hashing g_595[i][j] : 1A14CF0C +index = [6][8] +...checksum after hashing g_595[i][j] : 9A11F893 +index = [7][0] +...checksum after hashing g_595[i][j] : F19086DE +index = [7][1] +...checksum after hashing g_595[i][j] : 22A18338 +index = [7][2] +...checksum after hashing g_595[i][j] : 4B6F4624 +index = [7][3] +...checksum after hashing g_595[i][j] : E245445B +index = [7][4] +...checksum after hashing g_595[i][j] : E24261D +index = [7][5] +...checksum after hashing g_595[i][j] : 111BC1C8 +index = [7][6] +...checksum after hashing g_595[i][j] : C1560EEA +index = [7][7] +...checksum after hashing g_595[i][j] : E220D5DE +index = [7][8] +...checksum after hashing g_1070 : 156BF862 +...checksum after hashing g_1122[i] : F18F6F67 +index = [0] +...checksum after hashing g_1122[i] : A23BDD0 +index = [1] +...checksum after hashing g_1122[i] : 850D6EA5 +index = [2] +...checksum after hashing g_1122[i] : 8978BE86 +index = [3] +...checksum after hashing g_1142 : 2186C5F3 +...checksum after hashing g_1152[i][j] : 91DE7C75 +index = [0][0] +...checksum after hashing g_1152[i][j] : 46DEC3D4 +index = [0][1] +...checksum after hashing g_1152[i][j] : 3A2DCE0E +index = [0][2] +...checksum after hashing g_1152[i][j] : EFDB61DD +index = [0][3] +...checksum after hashing g_1152[i][j] : 7C8B9D6A +index = [1][0] +...checksum after hashing g_1152[i][j] : FFF3095E +index = [1][1] +...checksum after hashing g_1152[i][j] : B666DA00 +index = [1][2] +...checksum after hashing g_1152[i][j] : E3A84487 +index = [1][3] +...checksum after hashing g_1152[i][j] : EB1990B9 +index = [2][0] +...checksum after hashing g_1152[i][j] : EED66205 +index = [2][1] +...checksum after hashing g_1152[i][j] : 6CAB8677 +index = [2][2] +...checksum after hashing g_1152[i][j] : 68B499BF +index = [2][3] +...checksum after hashing g_1152[i][j] : C7CAE161 +index = [3][0] +...checksum after hashing g_1152[i][j] : C0C80B2B +index = [3][1] +...checksum after hashing g_1152[i][j] : 63D79CC5 +index = [3][2] +...checksum after hashing g_1152[i][j] : DD4B1263 +index = [3][3] +...checksum after hashing g_1152[i][j] : 6E07A950 +index = [4][0] +...checksum after hashing g_1152[i][j] : 2788FAD8 +index = [4][1] +...checksum after hashing g_1152[i][j] : 8D1504B5 +index = [4][2] +...checksum after hashing g_1152[i][j] : FB0A2104 +index = [4][3] +...checksum after hashing g_1152[i][j] : D5B4C69A +index = [5][0] +...checksum after hashing g_1152[i][j] : EEA8EFD8 +index = [5][1] +...checksum after hashing g_1152[i][j] : E0C43B98 +index = [5][2] +...checksum after hashing g_1152[i][j] : 2D451DF1 +index = [5][3] +...checksum after hashing g_1156 : E6DA2614 +...checksum after hashing g_1262 : CCAAE357 +...checksum after hashing g_1359 : 847A89D2 +...checksum after hashing g_1398 : E215F4FC +...checksum after hashing g_1585 : 2688C84F +...checksum after hashing g_1703 : 5CD8C731 +before stmt(1076): checksum = 5CD8C731 +...checksum after hashing g_3 : C8210FCD +...checksum after hashing g_81 : C8286C +...checksum after hashing g_83[i] : 2630E3B1 +index = [0] +...checksum after hashing g_83[i] : 619C151C +index = [1] +...checksum after hashing g_83[i] : 6594AD11 +index = [2] +...checksum after hashing g_83[i] : 734DC514 +index = [3] +...checksum after hashing g_83[i] : A67964B9 +index = [4] +...checksum after hashing g_83[i] : 6C1B16FB +index = [5] +...checksum after hashing g_83[i] : C6434999 +index = [6] +...checksum after hashing g_83[i] : 74ED8236 +index = [7] +...checksum after hashing g_83[i] : 9BEE062 +index = [8] +...checksum after hashing g_86 : 89DF1F5C +...checksum after hashing g_91 : CC44B9CE +...checksum after hashing g_92[i] : C322E049 +index = [0] +...checksum after hashing g_92[i] : 73D9AA44 +index = [1] +...checksum after hashing g_92[i] : C097F175 +index = [2] +...checksum after hashing g_92[i] : D47B2F5D +index = [3] +...checksum after hashing g_92[i] : DEFBD82B +index = [4] +...checksum after hashing g_92[i] : FB72336B +index = [5] +...checksum after hashing g_94 : 293E4D4 +...checksum after hashing g_241 : 9A817692 +...checksum after hashing g_475 : B110C073 +...checksum after hashing g_487 : D081E74E +...checksum after hashing g_525 : 29E9F64B +...checksum after hashing g_595[i][j] : A9AAB8EE +index = [0][0] +...checksum after hashing g_595[i][j] : A0BE653A +index = [0][1] +...checksum after hashing g_595[i][j] : C77353E0 +index = [0][2] +...checksum after hashing g_595[i][j] : 46685308 +index = [0][3] +...checksum after hashing g_595[i][j] : 23BCDF3C +index = [0][4] +...checksum after hashing g_595[i][j] : 708E1664 +index = [0][5] +...checksum after hashing g_595[i][j] : C012C316 +index = [0][6] +...checksum after hashing g_595[i][j] : 244F4D25 +index = [0][7] +...checksum after hashing g_595[i][j] : F5B2A7F8 +index = [0][8] +...checksum after hashing g_595[i][j] : 1D39077D +index = [1][0] +...checksum after hashing g_595[i][j] : 57293C11 +index = [1][1] +...checksum after hashing g_595[i][j] : CEF41582 +index = [1][2] +...checksum after hashing g_595[i][j] : AE4E2BDA +index = [1][3] +...checksum after hashing g_595[i][j] : 980C7EA8 +index = [1][4] +...checksum after hashing g_595[i][j] : 2260937C +index = [1][5] +...checksum after hashing g_595[i][j] : F7D98BB7 +index = [1][6] +...checksum after hashing g_595[i][j] : 3FA244B7 +index = [1][7] +...checksum after hashing g_595[i][j] : 8C9FF115 +index = [1][8] +...checksum after hashing g_595[i][j] : 58EE5FED +index = [2][0] +...checksum after hashing g_595[i][j] : 4009447A +index = [2][1] +...checksum after hashing g_595[i][j] : 6E66FD0D +index = [2][2] +...checksum after hashing g_595[i][j] : 292447DF +index = [2][3] +...checksum after hashing g_595[i][j] : 2D12970 +index = [2][4] +...checksum after hashing g_595[i][j] : 8C3FFB37 +index = [2][5] +...checksum after hashing g_595[i][j] : F1450167 +index = [2][6] +...checksum after hashing g_595[i][j] : C1C3035B +index = [2][7] +...checksum after hashing g_595[i][j] : 4300112D +index = [2][8] +...checksum after hashing g_595[i][j] : 399116F7 +index = [3][0] +...checksum after hashing g_595[i][j] : 92F47139 +index = [3][1] +...checksum after hashing g_595[i][j] : CA801AD +index = [3][2] +...checksum after hashing g_595[i][j] : 2E542EDA +index = [3][3] +...checksum after hashing g_595[i][j] : C352C5B8 +index = [3][4] +...checksum after hashing g_595[i][j] : 63F32DB4 +index = [3][5] +...checksum after hashing g_595[i][j] : D057369B +index = [3][6] +...checksum after hashing g_595[i][j] : 18CA39DC +index = [3][7] +...checksum after hashing g_595[i][j] : 34BF2ED0 +index = [3][8] +...checksum after hashing g_595[i][j] : CF962CC8 +index = [4][0] +...checksum after hashing g_595[i][j] : 8DF3866 +index = [4][1] +...checksum after hashing g_595[i][j] : 86272F25 +index = [4][2] +...checksum after hashing g_595[i][j] : 851C355E +index = [4][3] +...checksum after hashing g_595[i][j] : C8BE1728 +index = [4][4] +...checksum after hashing g_595[i][j] : 35A74826 +index = [4][5] +...checksum after hashing g_595[i][j] : D5DD7AEE +index = [4][6] +...checksum after hashing g_595[i][j] : 8CAD9998 +index = [4][7] +...checksum after hashing g_595[i][j] : 246F16E7 +index = [4][8] +...checksum after hashing g_595[i][j] : 149D8D83 +index = [5][0] +...checksum after hashing g_595[i][j] : 6E85029A +index = [5][1] +...checksum after hashing g_595[i][j] : 87EE97CF +index = [5][2] +...checksum after hashing g_595[i][j] : 9AAC673B +index = [5][3] +...checksum after hashing g_595[i][j] : C2B3498A +index = [5][4] +...checksum after hashing g_595[i][j] : E19C0D41 +index = [5][5] +...checksum after hashing g_595[i][j] : B871038A +index = [5][6] +...checksum after hashing g_595[i][j] : 52784413 +index = [5][7] +...checksum after hashing g_595[i][j] : 6424F37 +index = [5][8] +...checksum after hashing g_595[i][j] : A4EE3A2E +index = [6][0] +...checksum after hashing g_595[i][j] : DEE6B26E +index = [6][1] +...checksum after hashing g_595[i][j] : CE0563C7 +index = [6][2] +...checksum after hashing g_595[i][j] : 5F5F47CB +index = [6][3] +...checksum after hashing g_595[i][j] : A8079D8C +index = [6][4] +...checksum after hashing g_595[i][j] : 63B92C8B +index = [6][5] +...checksum after hashing g_595[i][j] : 734B13D4 +index = [6][6] +...checksum after hashing g_595[i][j] : 4C935AB3 +index = [6][7] +...checksum after hashing g_595[i][j] : 1A14CF0C +index = [6][8] +...checksum after hashing g_595[i][j] : 9A11F893 +index = [7][0] +...checksum after hashing g_595[i][j] : F19086DE +index = [7][1] +...checksum after hashing g_595[i][j] : 22A18338 +index = [7][2] +...checksum after hashing g_595[i][j] : 4B6F4624 +index = [7][3] +...checksum after hashing g_595[i][j] : E245445B +index = [7][4] +...checksum after hashing g_595[i][j] : E24261D +index = [7][5] +...checksum after hashing g_595[i][j] : 111BC1C8 +index = [7][6] +...checksum after hashing g_595[i][j] : C1560EEA +index = [7][7] +...checksum after hashing g_595[i][j] : E220D5DE +index = [7][8] +...checksum after hashing g_1070 : 156BF862 +...checksum after hashing g_1122[i] : F18F6F67 +index = [0] +...checksum after hashing g_1122[i] : A23BDD0 +index = [1] +...checksum after hashing g_1122[i] : 850D6EA5 +index = [2] +...checksum after hashing g_1122[i] : 8978BE86 +index = [3] +...checksum after hashing g_1142 : 2186C5F3 +...checksum after hashing g_1152[i][j] : 91DE7C75 +index = [0][0] +...checksum after hashing g_1152[i][j] : 46DEC3D4 +index = [0][1] +...checksum after hashing g_1152[i][j] : 3A2DCE0E +index = [0][2] +...checksum after hashing g_1152[i][j] : EFDB61DD +index = [0][3] +...checksum after hashing g_1152[i][j] : 7C8B9D6A +index = [1][0] +...checksum after hashing g_1152[i][j] : FFF3095E +index = [1][1] +...checksum after hashing g_1152[i][j] : B666DA00 +index = [1][2] +...checksum after hashing g_1152[i][j] : E3A84487 +index = [1][3] +...checksum after hashing g_1152[i][j] : EB1990B9 +index = [2][0] +...checksum after hashing g_1152[i][j] : EED66205 +index = [2][1] +...checksum after hashing g_1152[i][j] : 6CAB8677 +index = [2][2] +...checksum after hashing g_1152[i][j] : 68B499BF +index = [2][3] +...checksum after hashing g_1152[i][j] : C7CAE161 +index = [3][0] +...checksum after hashing g_1152[i][j] : C0C80B2B +index = [3][1] +...checksum after hashing g_1152[i][j] : 63D79CC5 +index = [3][2] +...checksum after hashing g_1152[i][j] : DD4B1263 +index = [3][3] +...checksum after hashing g_1152[i][j] : 6E07A950 +index = [4][0] +...checksum after hashing g_1152[i][j] : 2788FAD8 +index = [4][1] +...checksum after hashing g_1152[i][j] : 8D1504B5 +index = [4][2] +...checksum after hashing g_1152[i][j] : FB0A2104 +index = [4][3] +...checksum after hashing g_1152[i][j] : D5B4C69A +index = [5][0] +...checksum after hashing g_1152[i][j] : EEA8EFD8 +index = [5][1] +...checksum after hashing g_1152[i][j] : E0C43B98 +index = [5][2] +...checksum after hashing g_1152[i][j] : 2D451DF1 +index = [5][3] +...checksum after hashing g_1156 : E6DA2614 +...checksum after hashing g_1262 : CCAAE357 +...checksum after hashing g_1359 : 847A89D2 +...checksum after hashing g_1398 : E215F4FC +...checksum after hashing g_1585 : 2688C84F +...checksum after hashing g_1703 : 5CD8C731 +before stmt(3): checksum = 5CD8C731 +...checksum after hashing g_3 : 5A8FF012 +...checksum after hashing g_81 : EEE2D641 +...checksum after hashing g_83[i] : E3EBC9DF +index = [0] +...checksum after hashing g_83[i] : 67D7CF1 +index = [1] +...checksum after hashing g_83[i] : 9234F20D +index = [2] +...checksum after hashing g_83[i] : 83BC9FE8 +index = [3] +...checksum after hashing g_83[i] : BBF84420 +index = [4] +...checksum after hashing g_83[i] : D5803BE6 +index = [5] +...checksum after hashing g_83[i] : 74AD4B91 +index = [6] +...checksum after hashing g_83[i] : 574F7275 +index = [7] +...checksum after hashing g_83[i] : B8DCB78 +index = [8] +...checksum after hashing g_86 : 980605BA +...checksum after hashing g_91 : 14ABDF28 +...checksum after hashing g_92[i] : 2D82FCFA +index = [0] +...checksum after hashing g_92[i] : 809762B2 +index = [1] +...checksum after hashing g_92[i] : B668BEDB +index = [2] +...checksum after hashing g_92[i] : 284BA2ED +index = [3] +...checksum after hashing g_92[i] : 412996A6 +index = [4] +...checksum after hashing g_92[i] : 4DFBD40F +index = [5] +...checksum after hashing g_94 : D239771E +...checksum after hashing g_241 : AE1FF8EE +...checksum after hashing g_475 : B524BAFC +...checksum after hashing g_487 : 809A9B4B +...checksum after hashing g_525 : 81810D23 +...checksum after hashing g_595[i][j] : 9B803146 +index = [0][0] +...checksum after hashing g_595[i][j] : 6139E977 +index = [0][1] +...checksum after hashing g_595[i][j] : DE83CD4E +index = [0][2] +...checksum after hashing g_595[i][j] : 6C86E1B9 +index = [0][3] +...checksum after hashing g_595[i][j] : 5BEECB09 +index = [0][4] +...checksum after hashing g_595[i][j] : 7A07D383 +index = [0][5] +...checksum after hashing g_595[i][j] : 164A2420 +index = [0][6] +...checksum after hashing g_595[i][j] : 40708CC0 +index = [0][7] +...checksum after hashing g_595[i][j] : 967F65F8 +index = [0][8] +...checksum after hashing g_595[i][j] : 25FDDCB2 +index = [1][0] +...checksum after hashing g_595[i][j] : 7F4FB244 +index = [1][1] +...checksum after hashing g_595[i][j] : DF9EB843 +index = [1][2] +...checksum after hashing g_595[i][j] : 44BDCF55 +index = [1][3] +...checksum after hashing g_595[i][j] : FC9319A1 +index = [1][4] +...checksum after hashing g_595[i][j] : AEF632C7 +index = [1][5] +...checksum after hashing g_595[i][j] : 260597EC +index = [1][6] +...checksum after hashing g_595[i][j] : EACBFE51 +index = [1][7] +...checksum after hashing g_595[i][j] : F5C46282 +index = [1][8] +...checksum after hashing g_595[i][j] : F7BACD5E +index = [2][0] +...checksum after hashing g_595[i][j] : 29E7EFB9 +index = [2][1] +...checksum after hashing g_595[i][j] : 2B2009FA +index = [2][2] +...checksum after hashing g_595[i][j] : 20CDEF51 +index = [2][3] +...checksum after hashing g_595[i][j] : 2E5C14A1 +index = [2][4] +...checksum after hashing g_595[i][j] : 8291D9ED +index = [2][5] +...checksum after hashing g_595[i][j] : 54597674 +index = [2][6] +...checksum after hashing g_595[i][j] : 921A8FC5 +index = [2][7] +...checksum after hashing g_595[i][j] : 54281B46 +index = [2][8] +...checksum after hashing g_595[i][j] : 6AFC84E +index = [3][0] +...checksum after hashing g_595[i][j] : 823A5E53 +index = [3][1] +...checksum after hashing g_595[i][j] : 23ECFDB3 +index = [3][2] +...checksum after hashing g_595[i][j] : 1D88339A +index = [3][3] +...checksum after hashing g_595[i][j] : DEE546A3 +index = [3][4] +...checksum after hashing g_595[i][j] : CF1A0C55 +index = [3][5] +...checksum after hashing g_595[i][j] : D7C79B77 +index = [3][6] +...checksum after hashing g_595[i][j] : BAE616D6 +index = [3][7] +...checksum after hashing g_595[i][j] : 69FA6603 +index = [3][8] +...checksum after hashing g_595[i][j] : 1D2A70CE +index = [4][0] +...checksum after hashing g_595[i][j] : 68BFE222 +index = [4][1] +...checksum after hashing g_595[i][j] : 3A005A56 +index = [4][2] +...checksum after hashing g_595[i][j] : B6BEDD55 +index = [4][3] +...checksum after hashing g_595[i][j] : 9BAFAE4C +index = [4][4] +...checksum after hashing g_595[i][j] : EAD7CEB3 +index = [4][5] +...checksum after hashing g_595[i][j] : 83A8BAF9 +index = [4][6] +...checksum after hashing g_595[i][j] : 8C198C +index = [4][7] +...checksum after hashing g_595[i][j] : 72B01747 +index = [4][8] +...checksum after hashing g_595[i][j] : DC9CD3A0 +index = [5][0] +...checksum after hashing g_595[i][j] : 36847A33 +index = [5][1] +...checksum after hashing g_595[i][j] : 91C4102F +index = [5][2] +...checksum after hashing g_595[i][j] : 3316527F +index = [5][3] +...checksum after hashing g_595[i][j] : 4545FCE5 +index = [5][4] +...checksum after hashing g_595[i][j] : 70768657 +index = [5][5] +...checksum after hashing g_595[i][j] : 3FA471C +index = [5][6] +...checksum after hashing g_595[i][j] : 3904F4F3 +index = [5][7] +...checksum after hashing g_595[i][j] : 4C897E35 +index = [5][8] +...checksum after hashing g_595[i][j] : 9549DB09 +index = [6][0] +...checksum after hashing g_595[i][j] : FBBBB56A +index = [6][1] +...checksum after hashing g_595[i][j] : 39154B +index = [6][2] +...checksum after hashing g_595[i][j] : A783CCE2 +index = [6][3] +...checksum after hashing g_595[i][j] : 6B67964 +index = [6][4] +...checksum after hashing g_595[i][j] : 12292C36 +index = [6][5] +...checksum after hashing g_595[i][j] : CA104E23 +index = [6][6] +...checksum after hashing g_595[i][j] : D8B446F9 +index = [6][7] +...checksum after hashing g_595[i][j] : D626C879 +index = [6][8] +...checksum after hashing g_595[i][j] : BC1D6452 +index = [7][0] +...checksum after hashing g_595[i][j] : B5D084D8 +index = [7][1] +...checksum after hashing g_595[i][j] : 8586C206 +index = [7][2] +...checksum after hashing g_595[i][j] : B8B4AA6F +index = [7][3] +...checksum after hashing g_595[i][j] : 48D00DD1 +index = [7][4] +...checksum after hashing g_595[i][j] : C9BEF2A4 +index = [7][5] +...checksum after hashing g_595[i][j] : 754F68B7 +index = [7][6] +...checksum after hashing g_595[i][j] : B0ABE5DE +index = [7][7] +...checksum after hashing g_595[i][j] : BECE5B33 +index = [7][8] +...checksum after hashing g_1070 : 78F594B0 +...checksum after hashing g_1122[i] : E0DE9640 +index = [0] +...checksum after hashing g_1122[i] : 44C32EEF +index = [1] +...checksum after hashing g_1122[i] : 1D0A1F80 +index = [2] +...checksum after hashing g_1122[i] : FA326E5C +index = [3] +...checksum after hashing g_1142 : 267C2E37 +...checksum after hashing g_1152[i][j] : BD71A6F1 +index = [0][0] +...checksum after hashing g_1152[i][j] : BFBC9E9B +index = [0][1] +...checksum after hashing g_1152[i][j] : E94781B +index = [0][2] +...checksum after hashing g_1152[i][j] : 5D7CA596 +index = [0][3] +...checksum after hashing g_1152[i][j] : 62118444 +index = [1][0] +...checksum after hashing g_1152[i][j] : DD48165F +index = [1][1] +...checksum after hashing g_1152[i][j] : CBF16FBF +index = [1][2] +...checksum after hashing g_1152[i][j] : 759837EC +index = [1][3] +...checksum after hashing g_1152[i][j] : 97A33630 +index = [2][0] +...checksum after hashing g_1152[i][j] : E4EBC143 +index = [2][1] +...checksum after hashing g_1152[i][j] : 83D7C30F +index = [2][2] +...checksum after hashing g_1152[i][j] : 35197F4 +index = [2][3] +...checksum after hashing g_1152[i][j] : 7828AC2E +index = [3][0] +...checksum after hashing g_1152[i][j] : 4C6B62A0 +index = [3][1] +...checksum after hashing g_1152[i][j] : 7FAD7D71 +index = [3][2] +...checksum after hashing g_1152[i][j] : 26AABC0A +index = [3][3] +...checksum after hashing g_1152[i][j] : 96C5888A +index = [4][0] +...checksum after hashing g_1152[i][j] : 1D444010 +index = [4][1] +...checksum after hashing g_1152[i][j] : 5766F86A +index = [4][2] +...checksum after hashing g_1152[i][j] : 5BF71380 +index = [4][3] +...checksum after hashing g_1152[i][j] : E7A4EA10 +index = [5][0] +...checksum after hashing g_1152[i][j] : DF0E45D2 +index = [5][1] +...checksum after hashing g_1152[i][j] : F215181F +index = [5][2] +...checksum after hashing g_1152[i][j] : C5AEEDC +index = [5][3] +...checksum after hashing g_1156 : 823382BE +...checksum after hashing g_1262 : F56E026E +...checksum after hashing g_1359 : 51EA1E2C +...checksum after hashing g_1398 : FB08975C +...checksum after hashing g_1585 : BA7560EF +...checksum after hashing g_1703 : 9E739273 +before stmt(1077): checksum = 9E739273 +...checksum after hashing g_3 : 5A8FF012 +...checksum after hashing g_81 : EEE2D641 +...checksum after hashing g_83[i] : E3EBC9DF +index = [0] +...checksum after hashing g_83[i] : 67D7CF1 +index = [1] +...checksum after hashing g_83[i] : 9234F20D +index = [2] +...checksum after hashing g_83[i] : 83BC9FE8 +index = [3] +...checksum after hashing g_83[i] : BBF84420 +index = [4] +...checksum after hashing g_83[i] : D5803BE6 +index = [5] +...checksum after hashing g_83[i] : 74AD4B91 +index = [6] +...checksum after hashing g_83[i] : 574F7275 +index = [7] +...checksum after hashing g_83[i] : B8DCB78 +index = [8] +...checksum after hashing g_86 : 980605BA +...checksum after hashing g_91 : 14ABDF28 +...checksum after hashing g_92[i] : 2D82FCFA +index = [0] +...checksum after hashing g_92[i] : 809762B2 +index = [1] +...checksum after hashing g_92[i] : B668BEDB +index = [2] +...checksum after hashing g_92[i] : 284BA2ED +index = [3] +...checksum after hashing g_92[i] : 412996A6 +index = [4] +...checksum after hashing g_92[i] : 4DFBD40F +index = [5] +...checksum after hashing g_94 : D239771E +...checksum after hashing g_241 : AE1FF8EE +...checksum after hashing g_475 : B524BAFC +...checksum after hashing g_487 : 809A9B4B +...checksum after hashing g_525 : 81810D23 +...checksum after hashing g_595[i][j] : 9B803146 +index = [0][0] +...checksum after hashing g_595[i][j] : 6139E977 +index = [0][1] +...checksum after hashing g_595[i][j] : DE83CD4E +index = [0][2] +...checksum after hashing g_595[i][j] : 6C86E1B9 +index = [0][3] +...checksum after hashing g_595[i][j] : 5BEECB09 +index = [0][4] +...checksum after hashing g_595[i][j] : 7A07D383 +index = [0][5] +...checksum after hashing g_595[i][j] : 164A2420 +index = [0][6] +...checksum after hashing g_595[i][j] : 40708CC0 +index = [0][7] +...checksum after hashing g_595[i][j] : 967F65F8 +index = [0][8] +...checksum after hashing g_595[i][j] : 25FDDCB2 +index = [1][0] +...checksum after hashing g_595[i][j] : 7F4FB244 +index = [1][1] +...checksum after hashing g_595[i][j] : DF9EB843 +index = [1][2] +...checksum after hashing g_595[i][j] : 44BDCF55 +index = [1][3] +...checksum after hashing g_595[i][j] : FC9319A1 +index = [1][4] +...checksum after hashing g_595[i][j] : AEF632C7 +index = [1][5] +...checksum after hashing g_595[i][j] : 260597EC +index = [1][6] +...checksum after hashing g_595[i][j] : EACBFE51 +index = [1][7] +...checksum after hashing g_595[i][j] : F5C46282 +index = [1][8] +...checksum after hashing g_595[i][j] : F7BACD5E +index = [2][0] +...checksum after hashing g_595[i][j] : 29E7EFB9 +index = [2][1] +...checksum after hashing g_595[i][j] : 2B2009FA +index = [2][2] +...checksum after hashing g_595[i][j] : 20CDEF51 +index = [2][3] +...checksum after hashing g_595[i][j] : 2E5C14A1 +index = [2][4] +...checksum after hashing g_595[i][j] : 8291D9ED +index = [2][5] +...checksum after hashing g_595[i][j] : 54597674 +index = [2][6] +...checksum after hashing g_595[i][j] : 921A8FC5 +index = [2][7] +...checksum after hashing g_595[i][j] : 54281B46 +index = [2][8] +...checksum after hashing g_595[i][j] : 6AFC84E +index = [3][0] +...checksum after hashing g_595[i][j] : 823A5E53 +index = [3][1] +...checksum after hashing g_595[i][j] : 23ECFDB3 +index = [3][2] +...checksum after hashing g_595[i][j] : 1D88339A +index = [3][3] +...checksum after hashing g_595[i][j] : DEE546A3 +index = [3][4] +...checksum after hashing g_595[i][j] : CF1A0C55 +index = [3][5] +...checksum after hashing g_595[i][j] : D7C79B77 +index = [3][6] +...checksum after hashing g_595[i][j] : BAE616D6 +index = [3][7] +...checksum after hashing g_595[i][j] : 69FA6603 +index = [3][8] +...checksum after hashing g_595[i][j] : 1D2A70CE +index = [4][0] +...checksum after hashing g_595[i][j] : 68BFE222 +index = [4][1] +...checksum after hashing g_595[i][j] : 3A005A56 +index = [4][2] +...checksum after hashing g_595[i][j] : B6BEDD55 +index = [4][3] +...checksum after hashing g_595[i][j] : 9BAFAE4C +index = [4][4] +...checksum after hashing g_595[i][j] : EAD7CEB3 +index = [4][5] +...checksum after hashing g_595[i][j] : 83A8BAF9 +index = [4][6] +...checksum after hashing g_595[i][j] : 8C198C +index = [4][7] +...checksum after hashing g_595[i][j] : 72B01747 +index = [4][8] +...checksum after hashing g_595[i][j] : DC9CD3A0 +index = [5][0] +...checksum after hashing g_595[i][j] : 36847A33 +index = [5][1] +...checksum after hashing g_595[i][j] : 91C4102F +index = [5][2] +...checksum after hashing g_595[i][j] : 3316527F +index = [5][3] +...checksum after hashing g_595[i][j] : 4545FCE5 +index = [5][4] +...checksum after hashing g_595[i][j] : 70768657 +index = [5][5] +...checksum after hashing g_595[i][j] : 3FA471C +index = [5][6] +...checksum after hashing g_595[i][j] : 3904F4F3 +index = [5][7] +...checksum after hashing g_595[i][j] : 4C897E35 +index = [5][8] +...checksum after hashing g_595[i][j] : 9549DB09 +index = [6][0] +...checksum after hashing g_595[i][j] : FBBBB56A +index = [6][1] +...checksum after hashing g_595[i][j] : 39154B +index = [6][2] +...checksum after hashing g_595[i][j] : A783CCE2 +index = [6][3] +...checksum after hashing g_595[i][j] : 6B67964 +index = [6][4] +...checksum after hashing g_595[i][j] : 12292C36 +index = [6][5] +...checksum after hashing g_595[i][j] : CA104E23 +index = [6][6] +...checksum after hashing g_595[i][j] : D8B446F9 +index = [6][7] +...checksum after hashing g_595[i][j] : D626C879 +index = [6][8] +...checksum after hashing g_595[i][j] : BC1D6452 +index = [7][0] +...checksum after hashing g_595[i][j] : B5D084D8 +index = [7][1] +...checksum after hashing g_595[i][j] : 8586C206 +index = [7][2] +...checksum after hashing g_595[i][j] : B8B4AA6F +index = [7][3] +...checksum after hashing g_595[i][j] : 48D00DD1 +index = [7][4] +...checksum after hashing g_595[i][j] : C9BEF2A4 +index = [7][5] +...checksum after hashing g_595[i][j] : 754F68B7 +index = [7][6] +...checksum after hashing g_595[i][j] : B0ABE5DE +index = [7][7] +...checksum after hashing g_595[i][j] : BECE5B33 +index = [7][8] +...checksum after hashing g_1070 : 78F594B0 +...checksum after hashing g_1122[i] : E0DE9640 +index = [0] +...checksum after hashing g_1122[i] : 44C32EEF +index = [1] +...checksum after hashing g_1122[i] : 1D0A1F80 +index = [2] +...checksum after hashing g_1122[i] : FA326E5C +index = [3] +...checksum after hashing g_1142 : 267C2E37 +...checksum after hashing g_1152[i][j] : BD71A6F1 +index = [0][0] +...checksum after hashing g_1152[i][j] : BFBC9E9B +index = [0][1] +...checksum after hashing g_1152[i][j] : E94781B +index = [0][2] +...checksum after hashing g_1152[i][j] : 5D7CA596 +index = [0][3] +...checksum after hashing g_1152[i][j] : 62118444 +index = [1][0] +...checksum after hashing g_1152[i][j] : DD48165F +index = [1][1] +...checksum after hashing g_1152[i][j] : CBF16FBF +index = [1][2] +...checksum after hashing g_1152[i][j] : 759837EC +index = [1][3] +...checksum after hashing g_1152[i][j] : 97A33630 +index = [2][0] +...checksum after hashing g_1152[i][j] : E4EBC143 +index = [2][1] +...checksum after hashing g_1152[i][j] : 83D7C30F +index = [2][2] +...checksum after hashing g_1152[i][j] : 35197F4 +index = [2][3] +...checksum after hashing g_1152[i][j] : 7828AC2E +index = [3][0] +...checksum after hashing g_1152[i][j] : 4C6B62A0 +index = [3][1] +...checksum after hashing g_1152[i][j] : 7FAD7D71 +index = [3][2] +...checksum after hashing g_1152[i][j] : 26AABC0A +index = [3][3] +...checksum after hashing g_1152[i][j] : 96C5888A +index = [4][0] +...checksum after hashing g_1152[i][j] : 1D444010 +index = [4][1] +...checksum after hashing g_1152[i][j] : 5766F86A +index = [4][2] +...checksum after hashing g_1152[i][j] : 5BF71380 +index = [4][3] +...checksum after hashing g_1152[i][j] : E7A4EA10 +index = [5][0] +...checksum after hashing g_1152[i][j] : DF0E45D2 +index = [5][1] +...checksum after hashing g_1152[i][j] : F215181F +index = [5][2] +...checksum after hashing g_1152[i][j] : C5AEEDC +index = [5][3] +...checksum after hashing g_1156 : 823382BE +...checksum after hashing g_1262 : F56E026E +...checksum after hashing g_1359 : 51EA1E2C +...checksum after hashing g_1398 : FB08975C +...checksum after hashing g_1585 : BA7560EF +...checksum after hashing g_1703 : 9E739273 +checksum = 9e739273 diff --git a/src/tests/csmith/rand86.c b/src/tests/csmith/rand86.c new file mode 100644 index 0000000..856a555 --- /dev/null +++ b/src/tests/csmith/rand86.c @@ -0,0 +1,87 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static short func_1(void); +static short func_1(void) +{ + unsigned l_2 = 0UL; + step_hash(1); + return l_2; +} +void csmith_compute_hash(void) +{ +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand86.expect b/src/tests/csmith/rand86.expect new file mode 100644 index 0000000..0b4e62a --- /dev/null +++ b/src/tests/csmith/rand86.expect @@ -0,0 +1,2 @@ +before stmt(1): checksum = 0 +checksum = 0 diff --git a/src/tests/csmith/rand87.c b/src/tests/csmith/rand87.c new file mode 100644 index 0000000..837b1b9 --- /dev/null +++ b/src/tests/csmith/rand87.c @@ -0,0 +1,1542 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static int g_2 = 0xFE0A8EACL; +static int g_129 = 0x22D1E25FL; +static int *g_131 = &g_129; +static unsigned char g_161 = 255UL; +static unsigned g_176 = 0xE138955FL; +static unsigned g_180 = 0x834275C0L; +static unsigned short g_188[5][6] = {{3UL, 1UL, 0x6CB0L, 0UL, 0xC73BL, 0UL}, {3UL, 1UL, 0x6CB0L, 0UL, 0xC73BL, 0UL}, {3UL, 1UL, 0x6CB0L, 0UL, 0xC73BL, 0UL}, {3UL, 1UL, 0x6CB0L, 0UL, 0xC73BL, 0UL}, {3UL, 1UL, 0x6CB0L, 0UL, 0xC73BL, 0UL}}; +static unsigned char g_254 = 0x05L; +static int g_274 = 0x630A5C78L; +static unsigned char g_286 = 0x10L; +static unsigned g_307 = 0x468E9773L; +static signed char g_314 = (-1L); +static unsigned g_316 = 0xCA451F2BL; +static unsigned g_336[9][2] = {{0x71822003L, 0xCEE99220L}, {0x71822003L, 0xCEE99220L}, {0x71822003L, 0xCEE99220L}, {0x71822003L, 0xCEE99220L}, {0x71822003L, 0xCEE99220L}, {0x71822003L, 0xCEE99220L}, {0x71822003L, 0xCEE99220L}, {0x71822003L, 0xCEE99220L}, {0x71822003L, 0xCEE99220L}}; +static unsigned g_344 = 4294967287UL; +static int g_347[8][9] = {{1L, 1L, 0xDDB92C3FL, 1L, 0xBCAEF4B9L, 0x8183C4D5L, 0xBCAEF4B9L, 1L, 0xDDB92C3FL}, {1L, 1L, 0xDDB92C3FL, 1L, 0xBCAEF4B9L, 0x8183C4D5L, 0xBCAEF4B9L, 1L, 0xDDB92C3FL}, {1L, 1L, 0xDDB92C3FL, 1L, 0xBCAEF4B9L, 0x8183C4D5L, 0xBCAEF4B9L, 1L, 0xDDB92C3FL}, {1L, 1L, 0xDDB92C3FL, 1L, 0xBCAEF4B9L, 0x8183C4D5L, 0xBCAEF4B9L, 1L, 0xDDB92C3FL}, {1L, 1L, 0xDDB92C3FL, 1L, 0xBCAEF4B9L, 0x8183C4D5L, 0xBCAEF4B9L, 1L, 0xDDB92C3FL}, {1L, 1L, 0xDDB92C3FL, 1L, 0xBCAEF4B9L, 0x8183C4D5L, 0xBCAEF4B9L, 1L, 0xDDB92C3FL}, {1L, 1L, 0xDDB92C3FL, 1L, 0xBCAEF4B9L, 0x8183C4D5L, 0xBCAEF4B9L, 1L, 0xDDB92C3FL}, {1L, 1L, 0xDDB92C3FL, 1L, 0xBCAEF4B9L, 0x8183C4D5L, 0xBCAEF4B9L, 1L, 0xDDB92C3FL}}; +static signed char g_349 = 0x79L; +static int g_350 = (-6L); +static unsigned g_353 = 0x498343F8L; +static signed char g_358 = 7L; +static unsigned g_359 = 7UL; +static short g_387 = 0L; +static unsigned short g_391 = 7UL; +static short g_404 = 0x2666L; +static unsigned char g_405[2][6] = {{0x0BL, 0x0BL, 0x18L, 0x0BL, 0x0BL, 0x18L}, {0x0BL, 0x0BL, 0x18L, 0x0BL, 0x0BL, 0x18L}}; +static unsigned char g_433 = 0xF8L; +static int **g_448 = &g_131; +static int ***g_447 = &g_448; +static int g_474 = 1L; +static unsigned g_540 = 0x16993E9DL; +static signed char g_554 = 0x78L; +static unsigned char g_562 = 0x4BL; +static unsigned g_580 = 4294967291UL; +static int g_619 = 7L; +static short g_633 = 1L; +static unsigned char g_635[2][5] = {{255UL, 255UL, 255UL, 255UL, 255UL}, {255UL, 255UL, 255UL, 255UL, 255UL}}; +static int g_754[7][9] = {{0xF4D29B33L, 0x049066CDL, 0x83334F85L, 1L, 2L, (-9L), (-9L), 2L, 1L}, {0xF4D29B33L, 0x049066CDL, 0x83334F85L, 1L, 2L, (-9L), (-9L), 2L, 1L}, {0xF4D29B33L, 0x049066CDL, 0x83334F85L, 1L, 2L, (-9L), (-9L), 2L, 1L}, {0xF4D29B33L, 0x049066CDL, 0x83334F85L, 1L, 2L, (-9L), (-9L), 2L, 1L}, {0xF4D29B33L, 0x049066CDL, 0x83334F85L, 1L, 2L, (-9L), (-9L), 2L, 1L}, {0xF4D29B33L, 0x049066CDL, 0x83334F85L, 1L, 2L, (-9L), (-9L), 2L, 1L}, {0xF4D29B33L, 0x049066CDL, 0x83334F85L, 1L, 2L, (-9L), (-9L), 2L, 1L}}; +static int g_768 = 0xCE5A8A68L; +static int *g_809 = &g_274; +static int g_1005[2] = {0x26863B4FL, 0x26863B4FL}; +static unsigned func_1(void); +static int func_5(signed char p_6, unsigned short p_7, unsigned short p_8); +static signed char func_14(unsigned short p_15, short p_16, unsigned p_17, int p_18, unsigned p_19); +static unsigned func_24(unsigned char p_25); +static unsigned char func_26(unsigned char p_27, int p_28, unsigned char p_29); +static int func_35(int p_36, unsigned p_37, unsigned short p_38); +static short func_42(unsigned char p_43, unsigned char p_44); +static unsigned char func_57(signed char p_58, short p_59, unsigned char p_60, signed char p_61, short p_62); +static signed char func_63(unsigned char p_64, unsigned char p_65, short p_66, unsigned short p_67); +static unsigned char func_74(unsigned p_75, unsigned p_76, short p_77, int p_78); +static unsigned func_1(void) +{ + int l_9[8]; + int l_988 = (-1L); + int *l_1008 = &g_274; + int l_1011 = 0x97938E3BL; + int l_1018 = 0xD277BE45L; + int l_1019[2]; + int l_1024 = 0xC271A075L; + unsigned char l_1025 = 0xD6L; + int i; + for (i = 0; i < 8; i++) + l_9[i] = 0x942A1E94L; + for (i = 0; i < 2; i++) + l_1019[i] = 0L; + step_hash(663); + for (g_2 = 25; (g_2 <= (-5)); --g_2) + { + int l_769 = (-7L); + unsigned l_770 = 0x14CFEE24L; + } + step_hash(664); + (***g_447) = ((((signed char)(g_359 || ((int)l_9[0] / (int)l_9[0])) >> (signed char)4) ^ ((signed char)l_9[2] >> (signed char)4)) ^ (~(((short)2L >> (short)12) == (g_180 <= (((unsigned short)((signed char)0xB4L << (signed char)0) + (unsigned short)(l_9[5] & (g_353 == l_9[0]))) <= g_754[4][8]))))); + step_hash(676); + for (g_316 = (-14); (g_316 > 55); ++g_316) + { + step_hash(668); + if (g_1005[1]) + break; + step_hash(673); + for (g_314 = 0; (g_314 >= 9); g_314++) + { + step_hash(672); + (*g_809) = (*g_809); + } + step_hash(674); + if ((***g_447)) + continue; + step_hash(675); + l_1008 = &l_988; + } + step_hash(682); + for (g_633 = 6; (g_633 == 17); ++g_633) + { + int *l_1012 = &g_2; + int *l_1013 = (void*)0; + int *l_1014 = &g_754[5][3]; + int *l_1015 = &g_619; + int *l_1016 = &g_2; + int *l_1017[3]; + signed char l_1020[5][10] = {{8L, 0x0CL, (-7L), (-2L), 0x0CL, (-1L), 0x0CL, (-2L), (-7L), 0x0CL}, {8L, 0x0CL, (-7L), (-2L), 0x0CL, (-1L), 0x0CL, (-2L), (-7L), 0x0CL}, {8L, 0x0CL, (-7L), (-2L), 0x0CL, (-1L), 0x0CL, (-2L), (-7L), 0x0CL}, {8L, 0x0CL, (-7L), (-2L), 0x0CL, (-1L), 0x0CL, (-2L), (-7L), 0x0CL}, {8L, 0x0CL, (-7L), (-2L), 0x0CL, (-1L), 0x0CL, (-2L), (-7L), 0x0CL}}; + unsigned l_1021 = 1UL; + int i, j; + for (i = 0; i < 3; i++) + l_1017[i] = &g_274; + step_hash(680); + --l_1021; + step_hash(681); + (*l_1015) &= ((((l_1024 & (-1L)) != 0x6C63L) < (((l_1025 <= (1UL < (g_336[1][0] & (*l_1008)))) < func_63(((unsigned char)((short)((unsigned char)(((unsigned char)(&g_448 != &g_448) + (unsigned char)(*l_1008)) >= g_635[1][0]) >> (unsigned char)g_387) << (short)g_633) % (unsigned char)255UL), g_635[1][0], (*l_1008), g_358)) <= 0x37L)) == g_316); + } + step_hash(683); + return g_274; +} +static int func_5(signed char p_6, unsigned short p_7, unsigned short p_8) +{ + int ***l_777 = &g_448; + int l_787[2][5]; + short l_867 = (-7L); + int l_899 = 0xEA9D2EA7L; + short l_914 = 0xEE49L; + int i, j; + for (i = 0; i < 2; i++) + { + for (j = 0; j < 5; j++) + l_787[i][j] = (-3L); + } + step_hash(499); + for (p_7 = 0; (p_7 <= 1); p_7 += 1) + { + unsigned char l_778 = 0xA1L; + int l_786 = 0x70BA411CL; + int l_788 = 0x8D1C6474L; + step_hash(478); + (***l_777) = l_778; + step_hash(498); + for (g_180 = 0; (g_180 <= 4); g_180 += 1) + { + unsigned l_779 = 0x01D16C35L; + unsigned l_780 = 0x938BC10CL; + step_hash(497); + for (g_316 = 0; (g_316 <= 1); g_316 += 1) + { + int i, j; + step_hash(491); + if ((func_74(g_188[(p_7 + 1)][g_180], g_635[g_316][(g_316 + 3)], p_7, (func_24(l_779) == func_74(g_554, (p_8 < 6L), func_74(l_779, p_6, p_6, l_779), l_778))) || l_780)) + { + int l_785 = 8L; + int *l_789 = &l_788; + int *l_790[8][7] = {{&g_754[5][3], &g_129, (void*)0, (void*)0, &g_754[3][4], (void*)0, (void*)0}, {&g_754[5][3], &g_129, (void*)0, (void*)0, &g_754[3][4], (void*)0, (void*)0}, {&g_754[5][3], &g_129, (void*)0, (void*)0, &g_754[3][4], (void*)0, (void*)0}, {&g_754[5][3], &g_129, (void*)0, (void*)0, &g_754[3][4], (void*)0, (void*)0}, {&g_754[5][3], &g_129, (void*)0, (void*)0, &g_754[3][4], (void*)0, (void*)0}, {&g_754[5][3], &g_129, (void*)0, (void*)0, &g_754[3][4], (void*)0, (void*)0}, {&g_754[5][3], &g_129, (void*)0, (void*)0, &g_754[3][4], (void*)0, (void*)0}, {&g_754[5][3], &g_129, (void*)0, (void*)0, &g_754[3][4], (void*)0, (void*)0}}; + unsigned short l_791 = 65535UL; + int i, j; + step_hash(486); + l_785 = (((short)(!(p_6 >= p_7)) << (short)((signed char)0L >> (signed char)1)) ^ func_24(l_778)); + step_hash(487); + --l_791; + } + else + { + unsigned char l_798 = 0UL; + step_hash(489); + (**g_448) = ((signed char)((signed char)l_798 % (signed char)func_74(g_188[3][2], p_7, g_554, (**g_448))) * (signed char)func_74((0xF5L && (g_635[g_316][(g_316 + 3)] <= g_359)), p_6, g_405[1][1], (***g_447))); + step_hash(490); + if (p_8) + break; + } + step_hash(496); + for (l_778 = 0; (l_778 <= 1); l_778 += 1) + { + step_hash(495); + return p_8; + } + } + } + } + step_hash(500); + (**l_777) = (void*)0; + step_hash(660); + for (g_161 = 0; (g_161 <= 1); g_161 += 1) + { + unsigned l_804 = 4294967295UL; + int l_807 = (-1L); + int *l_810 = &l_787[0][2]; + int l_811 = 0xA90C624DL; + int l_815[8] = {(-6L), (-1L), (-6L), (-1L), (-6L), (-1L), (-6L), (-1L)}; + unsigned l_866[9][9] = {{0UL, 4294967289UL, 0x83AC71D7L, 0UL, 0x83AC71D7L, 4294967289UL, 0UL, 1UL, 4294967295UL}, {0UL, 4294967289UL, 0x83AC71D7L, 0UL, 0x83AC71D7L, 4294967289UL, 0UL, 1UL, 4294967295UL}, {0UL, 4294967289UL, 0x83AC71D7L, 0UL, 0x83AC71D7L, 4294967289UL, 0UL, 1UL, 4294967295UL}, {0UL, 4294967289UL, 0x83AC71D7L, 0UL, 0x83AC71D7L, 4294967289UL, 0UL, 1UL, 4294967295UL}, {0UL, 4294967289UL, 0x83AC71D7L, 0UL, 0x83AC71D7L, 4294967289UL, 0UL, 1UL, 4294967295UL}, {0UL, 4294967289UL, 0x83AC71D7L, 0UL, 0x83AC71D7L, 4294967289UL, 0UL, 1UL, 4294967295UL}, {0UL, 4294967289UL, 0x83AC71D7L, 0UL, 0x83AC71D7L, 4294967289UL, 0UL, 1UL, 4294967295UL}, {0UL, 4294967289UL, 0x83AC71D7L, 0UL, 0x83AC71D7L, 4294967289UL, 0UL, 1UL, 4294967295UL}, {0UL, 4294967289UL, 0x83AC71D7L, 0UL, 0x83AC71D7L, 4294967289UL, 0UL, 1UL, 4294967295UL}}; + int i, j; + step_hash(514); + for (g_433 = 0; (g_433 <= 1); g_433 += 1) + { + int *l_801 = &g_474; + int *l_802 = &g_129; + int *l_803[9]; + int i, j; + for (i = 0; i < 9; i++) + l_803[i] = &g_754[5][3]; + step_hash(507); + l_804--; + step_hash(513); + for (g_768 = 0; (g_768 <= 1); g_768 += 1) + { + step_hash(511); + (*g_447) = &l_801; + step_hash(512); + (*g_448) = (void*)0; + } + } + step_hash(515); + l_807 |= 1L; + step_hash(516); + l_787[0][1] = p_6; + step_hash(659); + for (g_350 = 1; (g_350 >= 0); g_350 -= 1) + { + int l_816 = 0L; + int l_822 = (-2L); + int l_823 = 0L; + int *l_841 = &l_815[4]; + int l_895[5][2] = {{1L, 0xB2608B29L}, {1L, 0xB2608B29L}, {1L, 0xB2608B29L}, {1L, 0xB2608B29L}, {1L, 0xB2608B29L}}; + unsigned l_932 = 0xA0417D87L; + unsigned short l_944[5][7] = {{0xF392L, 65535UL, 65535UL, 0x29D0L, 0x9855L, 0x29D0L, 65535UL}, {0xF392L, 65535UL, 65535UL, 0x29D0L, 0x9855L, 0x29D0L, 65535UL}, {0xF392L, 65535UL, 65535UL, 0x29D0L, 0x9855L, 0x29D0L, 65535UL}, {0xF392L, 65535UL, 65535UL, 0x29D0L, 0x9855L, 0x29D0L, 65535UL}, {0xF392L, 65535UL, 65535UL, 0x29D0L, 0x9855L, 0x29D0L, 65535UL}}; + unsigned l_956 = 1UL; + unsigned l_981[10][5] = {{4294967293UL, 1UL, 4294967293UL, 0x3DD37B07L, 0xEC396901L}, {4294967293UL, 1UL, 4294967293UL, 0x3DD37B07L, 0xEC396901L}, {4294967293UL, 1UL, 4294967293UL, 0x3DD37B07L, 0xEC396901L}, {4294967293UL, 1UL, 4294967293UL, 0x3DD37B07L, 0xEC396901L}, {4294967293UL, 1UL, 4294967293UL, 0x3DD37B07L, 0xEC396901L}, {4294967293UL, 1UL, 4294967293UL, 0x3DD37B07L, 0xEC396901L}, {4294967293UL, 1UL, 4294967293UL, 0x3DD37B07L, 0xEC396901L}, {4294967293UL, 1UL, 4294967293UL, 0x3DD37B07L, 0xEC396901L}, {4294967293UL, 1UL, 4294967293UL, 0x3DD37B07L, 0xEC396901L}, {4294967293UL, 1UL, 4294967293UL, 0x3DD37B07L, 0xEC396901L}}; + int i, j; + step_hash(560); + for (l_807 = 1; (l_807 >= 0); l_807 -= 1) + { + int l_820 = (-6L); + int l_821[2][9] = {{1L, 0xE40357A5L, 1L, 0xE40357A5L, 1L, 0xE40357A5L, 1L, 0xE40357A5L, 1L}, {1L, 0xE40357A5L, 1L, 0xE40357A5L, 1L, 0xE40357A5L, 1L, 0xE40357A5L, 1L}}; + int i, j; + step_hash(540); + for (p_6 = 0; (p_6 <= 1); p_6 += 1) + { + int l_817 = 0x597D154FL; + int l_818 = 0x424F2709L; + int l_819[2]; + unsigned l_824 = 4294967288UL; + int i, j; + for (i = 0; i < 2; i++) + l_819[i] = 0xA59C1508L; + step_hash(526); + if (g_405[g_161][(g_350 + 3)]) + break; + step_hash(532); + for (g_391 = 0; (g_391 <= 1); g_391 += 1) + { + int **l_808[10] = {&g_131, &g_131, &g_131, &g_131, &g_131, &g_131, &g_131, &g_131, &g_131, &g_131}; + int i, j; + step_hash(530); + g_809 = &l_787[l_807][(g_350 + 2)]; + step_hash(531); + return g_635[g_161][(g_350 + 3)]; + } + step_hash(539); + for (g_768 = 0; (g_768 <= 1); g_768 += 1) + { + int *l_812 = &g_754[5][3]; + int *l_813 = &g_619; + int *l_814[5][9] = {{&g_619, &g_2, &g_474, &g_2, &g_619, &g_2, &g_474, &g_2, &g_619}, {&g_619, &g_2, &g_474, &g_2, &g_619, &g_2, &g_474, &g_2, &g_619}, {&g_619, &g_2, &g_474, &g_2, &g_619, &g_2, &g_474, &g_2, &g_619}, {&g_619, &g_2, &g_474, &g_2, &g_619, &g_2, &g_474, &g_2, &g_619}, {&g_619, &g_2, &g_474, &g_2, &g_619, &g_2, &g_474, &g_2, &g_619}}; + int i, j; + step_hash(536); + l_810 = (void*)0; + step_hash(537); + l_824--; + step_hash(538); + return l_787[g_161][(g_768 + 1)]; + } + } + step_hash(541); + l_816 ^= 0xD8AE6931L; + step_hash(542); + l_810 = &l_787[g_161][(g_161 + 1)]; + step_hash(559); + for (l_822 = 0; (l_822 <= 1); l_822 += 1) + { + int l_835 = 0x4060C6A3L; + int l_837[10][8] = {{0xC45AD5D3L, 0x1C9997FFL, 0x54036D7EL, (-9L), 0x54036D7EL, 0x1C9997FFL, 0xC45AD5D3L, (-7L)}, {0xC45AD5D3L, 0x1C9997FFL, 0x54036D7EL, (-9L), 0x54036D7EL, 0x1C9997FFL, 0xC45AD5D3L, (-7L)}, {0xC45AD5D3L, 0x1C9997FFL, 0x54036D7EL, (-9L), 0x54036D7EL, 0x1C9997FFL, 0xC45AD5D3L, (-7L)}, {0xC45AD5D3L, 0x1C9997FFL, 0x54036D7EL, (-9L), 0x54036D7EL, 0x1C9997FFL, 0xC45AD5D3L, (-7L)}, {0xC45AD5D3L, 0x1C9997FFL, 0x54036D7EL, (-9L), 0x54036D7EL, 0x1C9997FFL, 0xC45AD5D3L, (-7L)}, {0xC45AD5D3L, 0x1C9997FFL, 0x54036D7EL, (-9L), 0x54036D7EL, 0x1C9997FFL, 0xC45AD5D3L, (-7L)}, {0xC45AD5D3L, 0x1C9997FFL, 0x54036D7EL, (-9L), 0x54036D7EL, 0x1C9997FFL, 0xC45AD5D3L, (-7L)}, {0xC45AD5D3L, 0x1C9997FFL, 0x54036D7EL, (-9L), 0x54036D7EL, 0x1C9997FFL, 0xC45AD5D3L, (-7L)}, {0xC45AD5D3L, 0x1C9997FFL, 0x54036D7EL, (-9L), 0x54036D7EL, 0x1C9997FFL, 0xC45AD5D3L, (-7L)}, {0xC45AD5D3L, 0x1C9997FFL, 0x54036D7EL, (-9L), 0x54036D7EL, 0x1C9997FFL, 0xC45AD5D3L, (-7L)}}; + unsigned short l_838 = 0x6259L; + int i, j; + step_hash(550); + for (l_804 = 0; (l_804 <= 1); l_804 += 1) + { + int i, j; + step_hash(549); + return g_405[g_350][(l_804 + 3)]; + } + step_hash(557); + if ((g_405[g_350][l_807] || l_787[1][2])) + { + step_hash(552); + (*g_809) = func_74(p_7, (g_336[4][1] != ((g_405[1][1] | ((int)((unsigned short)g_286 + (unsigned short)p_7) - (int)(0xE8L < p_8))) != ((*l_810) == p_7))), l_816, p_6); + step_hash(553); + (*l_810) = (g_405[g_350][l_807] >= (9L > ((unsigned char)p_7 << (unsigned char)p_7))); + } + else + { + int *l_836[3][5] = {{&g_274, &l_787[g_161][(g_161 + 1)], &g_274, &l_787[g_161][(g_161 + 1)], &g_274}, {&g_274, &l_787[g_161][(g_161 + 1)], &g_274, &l_787[g_161][(g_161 + 1)], &g_274}, {&g_274, &l_787[g_161][(g_161 + 1)], &g_274, &l_787[g_161][(g_161 + 1)], &g_274}}; + int i, j; + step_hash(555); + if (l_816) + break; + step_hash(556); + ++l_838; + } + step_hash(558); + (*g_809) = (l_841 != &l_811); + } + } + step_hash(577); + for (g_254 = 0; (g_254 <= 1); g_254 += 1) + { + int **l_850[7]; + int i; + for (i = 0; i < 7; i++) + l_850[i] = &l_841; + step_hash(564); + (*l_777) = &l_810; + step_hash(575); + for (g_433 = 0; (g_433 <= 1); g_433 += 1) + { + int l_842 = 0x6934F45CL; + int i; + step_hash(568); + l_842 |= l_815[(g_161 + 1)]; + step_hash(574); + for (g_554 = 1; (g_554 >= 0); g_554 -= 1) + { + int i; + step_hash(572); + (***l_777) ^= l_815[(g_254 + 2)]; + step_hash(573); + return l_815[(g_254 + 2)]; + } + } + step_hash(576); + (*g_809) = ((short)p_8 - (short)func_74(((signed char)((unsigned)p_6 + (unsigned)(-(unsigned char)(!p_8))) * (signed char)g_188[4][2]), ((void*)0 != l_850[5]), p_7, (*g_809))); + } + step_hash(657); + for (l_822 = 0; (l_822 <= 1); l_822 += 1) + { + int ***l_857 = &g_448; + int l_871 = 0xF1AADCE2L; + int l_874 = 0xAB7C1F7DL; + int l_888 = 0xB9345B12L; + int l_890 = (-1L); + int l_894 = 0L; + int l_897[6][8] = {{0xDCE527E5L, 0x03465D71L, 0xDCE527E5L, 0x03465D71L, 0xDCE527E5L, 0x03465D71L, 0xDCE527E5L, 0x03465D71L}, {0xDCE527E5L, 0x03465D71L, 0xDCE527E5L, 0x03465D71L, 0xDCE527E5L, 0x03465D71L, 0xDCE527E5L, 0x03465D71L}, {0xDCE527E5L, 0x03465D71L, 0xDCE527E5L, 0x03465D71L, 0xDCE527E5L, 0x03465D71L, 0xDCE527E5L, 0x03465D71L}, {0xDCE527E5L, 0x03465D71L, 0xDCE527E5L, 0x03465D71L, 0xDCE527E5L, 0x03465D71L, 0xDCE527E5L, 0x03465D71L}, {0xDCE527E5L, 0x03465D71L, 0xDCE527E5L, 0x03465D71L, 0xDCE527E5L, 0x03465D71L, 0xDCE527E5L, 0x03465D71L}, {0xDCE527E5L, 0x03465D71L, 0xDCE527E5L, 0x03465D71L, 0xDCE527E5L, 0x03465D71L, 0xDCE527E5L, 0x03465D71L}}; + int **l_939 = &l_810; + int i, j; + } + step_hash(658); + (*l_777) = &l_810; + } + } + step_hash(661); + return p_8; +} +static signed char func_14(unsigned short p_15, short p_16, unsigned p_17, int p_18, unsigned p_19) +{ + int l_30 = 0x451F1E28L; + int *l_767 = &g_768; + step_hash(472); + (*l_767) &= (p_17 ^ ((unsigned short)(func_24(func_26(p_18, p_19, ((0x11E0L | p_17) == l_30))) == func_74(func_74(g_404, g_349, l_30, p_17), l_30, g_2, p_15)) * (unsigned short)l_30)); + step_hash(473); + return g_633; +} +static unsigned func_24(unsigned char p_25) +{ + short l_758 = (-1L); + int *l_759 = &g_474; + int *l_760 = &g_619; + int *l_761 = &g_274; + int *l_762[6][1]; + int l_763 = 0xD9F93307L; + unsigned l_764[9][10] = {{1UL, 6UL, 1UL, 0xACEE6F1DL, 0x49B50D3AL, 6UL, 4294967295UL, 0x5ABE2539L, 4294967295UL, 1UL}, {1UL, 6UL, 1UL, 0xACEE6F1DL, 0x49B50D3AL, 6UL, 4294967295UL, 0x5ABE2539L, 4294967295UL, 1UL}, {1UL, 6UL, 1UL, 0xACEE6F1DL, 0x49B50D3AL, 6UL, 4294967295UL, 0x5ABE2539L, 4294967295UL, 1UL}, {1UL, 6UL, 1UL, 0xACEE6F1DL, 0x49B50D3AL, 6UL, 4294967295UL, 0x5ABE2539L, 4294967295UL, 1UL}, {1UL, 6UL, 1UL, 0xACEE6F1DL, 0x49B50D3AL, 6UL, 4294967295UL, 0x5ABE2539L, 4294967295UL, 1UL}, {1UL, 6UL, 1UL, 0xACEE6F1DL, 0x49B50D3AL, 6UL, 4294967295UL, 0x5ABE2539L, 4294967295UL, 1UL}, {1UL, 6UL, 1UL, 0xACEE6F1DL, 0x49B50D3AL, 6UL, 4294967295UL, 0x5ABE2539L, 4294967295UL, 1UL}, {1UL, 6UL, 1UL, 0xACEE6F1DL, 0x49B50D3AL, 6UL, 4294967295UL, 0x5ABE2539L, 4294967295UL, 1UL}, {1UL, 6UL, 1UL, 0xACEE6F1DL, 0x49B50D3AL, 6UL, 4294967295UL, 0x5ABE2539L, 4294967295UL, 1UL}}; + int i, j; + for (i = 0; i < 6; i++) + { + for (j = 0; j < 1; j++) + l_762[i][j] = &g_129; + } + step_hash(469); + ++l_764[0][2]; + step_hash(470); + (**g_447) = l_759; + step_hash(471); + return p_25; +} + + + + + + + +static unsigned char func_26(unsigned char p_27, int p_28, unsigned char p_29) +{ + unsigned l_39[6]; + int l_45 = 0x81F51B43L; + unsigned char l_752 = 252UL; + int *l_753 = &g_754[5][3]; + int l_757 = 1L; + int i; + for (i = 0; i < 6; i++) + l_39[i] = 0x88216928L; + step_hash(463); + (*l_753) &= ((p_28 >= ((signed char)(((unsigned char)((func_35(p_28, ((0x51DBL ^ ((((l_39[0] >= (((6UL >= p_28) <= ((0x0FE1F230L && g_2) < ((short)func_42(g_2, l_45) % (short)0x812FL))) <= 0L)) ^ 0x3D02DF21L) <= 1L) == l_45)) < g_350), l_45) == 0L) | (-1L)) >> (unsigned char)l_45) != l_752) * (signed char)7UL)) & 0x74L); + step_hash(464); + (*g_448) = &l_45; + step_hash(465); + (*g_448) = &l_45; + step_hash(466); + l_757 &= func_35(p_29, ((*l_753) && (func_35(p_28, (*l_753), (0x509072BCL & (**g_448))) > (4294967290UL & ((short)(func_74((*l_753), (*l_753), (*l_753), (*l_753)) && g_619) + (short)(*l_753))))), p_29); + step_hash(467); + return p_27; +} + + + + + + + +static int func_35(int p_36, unsigned p_37, unsigned short p_38) +{ + int **l_585 = &g_131; + int l_589 = 0x6BDEB9DEL; + unsigned l_596 = 4294967286UL; + int **l_605[9][3] = {{&g_131, &g_131, &g_131}, {&g_131, &g_131, &g_131}, {&g_131, &g_131, &g_131}, {&g_131, &g_131, &g_131}, {&g_131, &g_131, &g_131}, {&g_131, &g_131, &g_131}, {&g_131, &g_131, &g_131}, {&g_131, &g_131, &g_131}, {&g_131, &g_131, &g_131}}; + int *l_640 = &g_274; + int l_735 = 0L; + unsigned char l_741 = 0xA4L; + unsigned short l_748 = 0UL; + int i, j; + step_hash(440); + for (g_316 = 0; (g_316 <= 55); g_316 += 6) + { + int ***l_588[6][6] = {{&g_448, &l_585, &g_448, &l_585, &l_585, &l_585}, {&g_448, &l_585, &g_448, &l_585, &l_585, &l_585}, {&g_448, &l_585, &g_448, &l_585, &l_585, &l_585}, {&g_448, &l_585, &g_448, &l_585, &l_585, &l_585}, {&g_448, &l_585, &g_448, &l_585, &l_585, &l_585}, {&g_448, &l_585, &g_448, &l_585, &l_585, &l_585}}; + int *l_641 = &g_274; + unsigned char l_653[6]; + int l_699 = 7L; + unsigned char l_729 = 0xB5L; + signed char l_740[10][9] = {{(-1L), (-1L), (-5L), 0x55L, 6L, 0xB9L, 0xAEL, (-1L), 0x87L}, {(-1L), (-1L), (-5L), 0x55L, 6L, 0xB9L, 0xAEL, (-1L), 0x87L}, {(-1L), (-1L), (-5L), 0x55L, 6L, 0xB9L, 0xAEL, (-1L), 0x87L}, {(-1L), (-1L), (-5L), 0x55L, 6L, 0xB9L, 0xAEL, (-1L), 0x87L}, {(-1L), (-1L), (-5L), 0x55L, 6L, 0xB9L, 0xAEL, (-1L), 0x87L}, {(-1L), (-1L), (-5L), 0x55L, 6L, 0xB9L, 0xAEL, (-1L), 0x87L}, {(-1L), (-1L), (-5L), 0x55L, 6L, 0xB9L, 0xAEL, (-1L), 0x87L}, {(-1L), (-1L), (-5L), 0x55L, 6L, 0xB9L, 0xAEL, (-1L), 0x87L}, {(-1L), (-1L), (-5L), 0x55L, 6L, 0xB9L, 0xAEL, (-1L), 0x87L}, {(-1L), (-1L), (-5L), 0x55L, 6L, 0xB9L, 0xAEL, (-1L), 0x87L}}; + int i, j; + for (i = 0; i < 6; i++) + l_653[i] = 0xEEL; + step_hash(381); + for (p_36 = 0; (p_36 <= 1); p_36 += 1) + { + int l_590 = 3L; + int ***l_593 = &l_585; + unsigned l_612[5][10] = {{1UL, 0x5D088E13L, 4294967290UL, 0xEFFD0C9DL, 0x5D088E13L, 3UL, 0x5D088E13L, 0xEFFD0C9DL, 4294967290UL, 0x5D088E13L}, {1UL, 0x5D088E13L, 4294967290UL, 0xEFFD0C9DL, 0x5D088E13L, 3UL, 0x5D088E13L, 0xEFFD0C9DL, 4294967290UL, 0x5D088E13L}, {1UL, 0x5D088E13L, 4294967290UL, 0xEFFD0C9DL, 0x5D088E13L, 3UL, 0x5D088E13L, 0xEFFD0C9DL, 4294967290UL, 0x5D088E13L}, {1UL, 0x5D088E13L, 4294967290UL, 0xEFFD0C9DL, 0x5D088E13L, 3UL, 0x5D088E13L, 0xEFFD0C9DL, 4294967290UL, 0x5D088E13L}, {1UL, 0x5D088E13L, 4294967290UL, 0xEFFD0C9DL, 0x5D088E13L, 3UL, 0x5D088E13L, 0xEFFD0C9DL, 4294967290UL, 0x5D088E13L}}; + short l_618 = (-1L); + unsigned short l_624 = 0UL; + signed char l_627 = 0xB6L; + int i, j; + step_hash(355); + l_590 = func_74(((*g_447) != l_585), ((unsigned)g_188[(p_36 + 1)][p_36] + (unsigned)((&p_36 == (void*)0) < (((void*)0 == l_588[3][1]) == g_180))), g_188[(p_36 + 1)][p_36], p_38); + step_hash(356); + l_590 = (((unsigned)((l_593 != &g_448) & ((unsigned short)g_336[1][0] * (unsigned short)(l_596 >= ((unsigned short)func_74(g_405[1][1], g_188[1][3], g_286, p_36) + (unsigned short)p_36)))) % (unsigned)p_37) || 65535UL); + step_hash(357); + g_274 = ((short)g_405[1][2] >> (short)p_36); + step_hash(380); + if (g_540) + { + unsigned char l_615 = 249UL; + step_hash(359); + ++l_615; + } + else + { + unsigned char l_623 = 0x88L; + int l_625 = 1L; + int l_628[10][4] = {{0L, 0x53167DB8L, 0x9D3FB8D0L, 0x9D3FB8D0L}, {0L, 0x53167DB8L, 0x9D3FB8D0L, 0x9D3FB8D0L}, {0L, 0x53167DB8L, 0x9D3FB8D0L, 0x9D3FB8D0L}, {0L, 0x53167DB8L, 0x9D3FB8D0L, 0x9D3FB8D0L}, {0L, 0x53167DB8L, 0x9D3FB8D0L, 0x9D3FB8D0L}, {0L, 0x53167DB8L, 0x9D3FB8D0L, 0x9D3FB8D0L}, {0L, 0x53167DB8L, 0x9D3FB8D0L, 0x9D3FB8D0L}, {0L, 0x53167DB8L, 0x9D3FB8D0L, 0x9D3FB8D0L}, {0L, 0x53167DB8L, 0x9D3FB8D0L, 0x9D3FB8D0L}, {0L, 0x53167DB8L, 0x9D3FB8D0L, 0x9D3FB8D0L}}; + int i, j; + step_hash(367); + for (g_129 = 1; (g_129 >= 0); g_129 -= 1) + { + unsigned l_620 = 0x91D3C02AL; + step_hash(364); + l_618 = 1L; + step_hash(365); + l_620++; + step_hash(366); + if (p_37) + break; + } + step_hash(379); + if (l_623) + { + step_hash(369); + (**l_593) = (void*)0; + step_hash(370); + l_625 = (l_624 >= (-1L)); + } + else + { + signed char l_629 = 0xACL; + step_hash(377); + for (g_274 = 0; (g_274 <= 1); g_274 += 1) + { + int l_626[10] = {(-1L), 0L, (-1L), 0L, (-1L), 0L, (-1L), 0L, (-1L), 0L}; + int l_630 = 0x4F70A7E7L; + int l_631 = 0x78E71ECAL; + int l_632 = (-4L); + int l_634 = 0xDB1845A3L; + int i; + step_hash(375); + ++g_635[1][0]; + step_hash(376); + l_634 |= (!(g_353 & ((signed char)((+((void*)0 != &g_448)) <= p_38) << (signed char)1))); + } + step_hash(378); + return p_38; + } + } + } + step_hash(438); + if (((p_36 & p_36) == p_37)) + { + int ***l_656[3]; + unsigned l_683 = 2UL; + unsigned l_697 = 0xB236087CL; + int i; + for (i = 0; i < 3; i++) + l_656[i] = &g_448; + step_hash(410); + if (((((signed char)(-8L) >> (signed char)((short)p_38 + (short)func_74(((((unsigned)((-(unsigned short)((signed char)l_653[1] * (signed char)p_36)) <= ((g_347[4][5] && (l_656[0] == l_656[0])) | ((signed char)g_635[0][0] >> (signed char)(((unsigned short)p_36 >> (unsigned short)p_36) < 0UL)))) + (unsigned)g_433) || 1L) | (*l_640)), p_37, p_36, p_36))) == 0x4190L) & 0UL)) + { + unsigned l_661 = 4294967291UL; + step_hash(384); + p_36 |= l_661; + step_hash(395); + for (p_37 = 0; (p_37 != 33); p_37 += 7) + { + int l_666 = (-1L); + step_hash(393); + for (g_391 = 0; (g_391 == 29); g_391 += 4) + { + int l_680[7] = {1L, 0xD1D0773AL, 1L, 0xD1D0773AL, 1L, 0xD1D0773AL, 1L}; + int i; + step_hash(391); + l_666 &= p_37; + step_hash(392); + (*l_641) |= ((short)(p_36 || (((unsigned char)((signed char)(255UL == 254UL) % (signed char)((signed char)(-1L) << (signed char)(-(short)((unsigned short)0x2266L << (unsigned short)p_37)))) << (unsigned char)((((signed char)p_38 << (signed char)4) >= 0UL) | 0x2D1DDE1BL)) != l_661)) << (short)g_349); + } + step_hash(394); + p_36 = 0x2E1D51B5L; + } + } + else + { + step_hash(408); + for (g_254 = 0; (g_254 <= 2); g_254 += 1) + { + int i, j; + step_hash(400); + (*l_640) = l_653[(g_254 + 2)]; + step_hash(406); + for (g_161 = 0; (g_161 <= 4); g_161 += 1) + { + step_hash(404); + if ((*l_640)) + break; + step_hash(405); + (*l_641) ^= ((short)g_391 + (short)p_36); + } + step_hash(407); + if (p_36) + continue; + } + step_hash(409); + if (l_683) + break; + } + step_hash(430); + if ((&l_640 != &l_640)) + { + int **l_695[7][7] = {{(void*)0, &l_641, (void*)0, &l_641, (void*)0, &g_131, (void*)0}, {(void*)0, &l_641, (void*)0, &l_641, (void*)0, &g_131, (void*)0}, {(void*)0, &l_641, (void*)0, &l_641, (void*)0, &g_131, (void*)0}, {(void*)0, &l_641, (void*)0, &l_641, (void*)0, &g_131, (void*)0}, {(void*)0, &l_641, (void*)0, &l_641, (void*)0, &g_131, (void*)0}, {(void*)0, &l_641, (void*)0, &l_641, (void*)0, &g_131, (void*)0}, {(void*)0, &l_641, (void*)0, &l_641, (void*)0, &g_131, (void*)0}}; + unsigned short l_698[8]; + signed char l_700 = 0x91L; + int i, j; + for (i = 0; i < 8; i++) + l_698[i] = 0UL; + step_hash(425); + for (g_474 = 5; (g_474 < (-1)); g_474 -= 3) + { + unsigned l_692 = 2UL; + int **l_696 = &g_131; + int l_710 = 0xC19B2F67L; + unsigned short l_721 = 0x2EDCL; + int l_722 = (-6L); + step_hash(422); + if ((g_387 && ((unsigned short)((0xA4L != ((+((unsigned short)((void*)0 != (*g_447)) * (unsigned short)((unsigned char)((l_692 <= g_274) || (((short)p_38 << (short)13) > 0x76E0343EL)) * (unsigned char)l_698[3]))) && g_633)) < p_37) << (unsigned short)l_699))) + { + step_hash(416); + (*g_448) = &g_2; + step_hash(417); + if ((***g_447)) + continue; + step_hash(418); + l_700 &= (*l_641); + step_hash(419); + (*l_641) = p_37; + } + else + { + step_hash(421); + return p_38; + } + step_hash(423); + (*l_640) ^= ((unsigned)func_74(((short)p_38 / (short)p_38), (((p_36 == ((+(p_37 <= (((unsigned short)g_129 * (unsigned short)((unsigned char)1UL / (unsigned char)p_38)) & g_635[0][1]))) > (-(short)(func_74(g_2, g_349, g_349, p_37) && 0x70L)))) < 0xC308F3C6L) != 0x51AAC99AL), l_710, (**l_696)) % (unsigned)(**g_448)); + step_hash(424); + l_722 |= func_74(((((p_36 & func_74((((short)((short)(((((*l_640) | func_74(g_161, g_350, (g_619 | ((***g_447) < (((short)(0x6FFC1F88L <= ((int)p_36 - (int)(65529UL < g_387))) >> (short)p_38) != l_721))), p_37)) >= 0x55L) < g_347[3][1]) >= p_38) - (short)0L) / (short)p_36) ^ p_37), p_37, g_188[3][2], p_38)) == p_36) >= 246UL) | 65535UL), g_286, p_36, p_38); + } + step_hash(426); + (*l_641) = ((1L >= ((unsigned short)(~((&p_36 != (void*)0) != ((unsigned char)p_38 * (unsigned char)l_729))) << (unsigned short)g_2)) ^ 65529UL); + } + else + { + unsigned char l_730 = 0UL; + step_hash(428); + ++l_730; + step_hash(429); + if ((*l_641)) + break; + } + } + else + { + step_hash(437); + for (l_589 = (-24); (l_589 <= 18); l_589 += 3) + { + step_hash(435); + if (p_36) + break; + step_hash(436); + if (p_37) + continue; + } + } + step_hash(439); + (*l_640) = p_36; + } + step_hash(441); + (*l_640) = (*l_640); + step_hash(461); + for (g_580 = 0; (g_580 <= 1); g_580 += 1) + { + int *l_742 = &g_2; + signed char l_743 = 3L; + unsigned l_751 = 0xA15A82AFL; + step_hash(459); + if ((p_36 || (g_404 > (*l_640)))) + { + step_hash(446); + (**g_447) = l_742; + step_hash(447); + return l_743; + } + else + { + int l_746 = 0x6DB520FEL; + int l_747[1]; + int i; + for (i = 0; i < 1; i++) + l_747[i] = (-1L); + step_hash(458); + for (g_540 = 0; (g_540 <= 1); g_540 += 1) + { + int l_744 = 0x88A7BDD9L; + int l_745 = (-2L); + int i, j; + step_hash(452); + (*g_448) = &p_36; + step_hash(457); + if ((4L == (+g_336[(g_580 + 5)][g_540]))) + { + step_hash(454); + return g_336[(g_580 + 5)][g_540]; + } + else + { + step_hash(456); + --l_748; + } + } + } + step_hash(460); + return l_751; + } + step_hash(462); + return (*l_640); +} + + + + + + + +static short func_42(unsigned char p_43, unsigned char p_44) +{ + unsigned char l_54 = 0x1AL; + int l_334 = 0xCFFEF3BCL; + int l_335 = 0x2EAF47D8L; + int l_342 = (-7L); + int l_343[4] = {(-9L), 0x68528BF4L, (-9L), 0x68528BF4L}; + short l_376 = 0xCE44L; + signed char l_388 = 1L; + unsigned l_390 = 0x3F4ED036L; + int ***l_473 = &g_448; + unsigned l_517 = 1UL; + int l_535 = 0x0F049638L; + int *l_565 = &l_343[2]; + int *l_566 = &l_334; + int *l_567 = (void*)0; + int *l_568 = (void*)0; + int *l_569 = &g_474; + int *l_570 = (void*)0; + int *l_571 = (void*)0; + int *l_572 = &l_343[2]; + int *l_573 = (void*)0; + int *l_574 = &g_274; + int *l_575 = &l_334; + int *l_576 = &l_343[2]; + int *l_577 = &g_274; + int *l_578 = &g_474; + int *l_579[1]; + int i; + for (i = 0; i < 1; i++) + l_579[i] = &g_474; + step_hash(298); + if ((((short)((short)((signed char)((signed char)(l_54 != ((unsigned char)func_57(func_63(((((unsigned)g_2 / (unsigned)g_2) || 255UL) & ((signed char)((unsigned char)func_74(((short)(((signed char)(g_2 > ((unsigned short)l_54 << (unsigned short)15)) << (signed char)((short)((g_2 && ((p_44 > ((p_44 && g_2) ^ 0x9EA2L)) && g_2)) >= p_44) - (short)0xCDB7L)) && g_2) + (short)l_54), g_2, p_44, g_2) % (unsigned char)0xFBL) / (signed char)0x7CL)), p_44, p_44, g_2), g_176, l_54, g_161, l_54) * (unsigned char)0x5BL)) % (signed char)g_161) << (signed char)g_2) % (short)l_54) << (short)g_161) < p_43)) + { + int *l_319 = &g_129; + int *l_320 = &g_274; + int l_321 = 0x3F947EABL; + int *l_322 = (void*)0; + int *l_323 = (void*)0; + int *l_324 = &g_129; + int *l_325 = &g_274; + int *l_326 = &l_321; + int *l_327 = &g_129; + int *l_328 = &g_129; + int *l_329 = &l_321; + int *l_330 = &l_321; + int *l_331 = &g_274; + int *l_332 = &g_274; + int *l_333[6] = {&g_274, &g_274, &g_274, &g_274, &g_274, &g_274}; + int l_341 = 1L; + int l_356 = 0x12270CDBL; + short l_402 = (-1L); + int i; + step_hash(165); + ++g_336[1][0]; + step_hash(166); + (*l_330) |= ((short)(l_341 & p_43) << (short)5); + step_hash(167); + --g_344; + step_hash(211); + for (l_334 = 0; (l_334 <= 4); l_334 += 1) + { + short l_352 = 7L; + int l_357 = 0x777C8B33L; + int l_389[7][3] = {{0x59952D4AL, 0x59952D4AL, 0x4B82A4E6L}, {0x59952D4AL, 0x59952D4AL, 0x4B82A4E6L}, {0x59952D4AL, 0x59952D4AL, 0x4B82A4E6L}, {0x59952D4AL, 0x59952D4AL, 0x4B82A4E6L}, {0x59952D4AL, 0x59952D4AL, 0x4B82A4E6L}, {0x59952D4AL, 0x59952D4AL, 0x4B82A4E6L}, {0x59952D4AL, 0x59952D4AL, 0x4B82A4E6L}}; + unsigned l_399 = 2UL; + int l_403[4] = {0x32302CAEL, 1L, 0x32302CAEL, 1L}; + int i, j; + step_hash(188); + for (g_286 = 1; (g_286 <= 4); g_286 += 1) + { + int l_348 = 0x4D5258D7L; + int i, j; + step_hash(185); + if (g_188[l_334][g_286]) + { + step_hash(175); + return g_180; + } + else + { + int l_351 = 0x9425BB4CL; + step_hash(177); + g_353--; + step_hash(178); + (*l_325) = (p_43 || g_188[l_334][g_286]); + step_hash(183); + for (l_54 = 0; (l_54 <= 7); l_54 += 1) + { + int i, j; + step_hash(182); + return g_347[l_54][(l_334 + 1)]; + } + step_hash(184); + if (p_44) + break; + } + step_hash(186); + ++g_359; + step_hash(187); + (*l_327) = l_376; + } + step_hash(189); + (*l_331) = (((unsigned char)(l_352 && ((((((l_357 > ((unsigned)((0xDF26L >= ((unsigned)g_344 / (unsigned)l_342)) >= 1UL) / (unsigned)4294967295UL)) && 0xF271L) == (*l_332)) != g_359) & l_389[4][2]) == l_343[2])) * (unsigned char)g_359) == g_161); + step_hash(197); + for (l_54 = 0; (l_54 <= 3); l_54 += 1) + { + int **l_394 = &l_325; + int ***l_395 = (void*)0; + int ***l_396 = &l_394; + int i; + step_hash(193); + l_390 &= l_343[l_54]; + step_hash(194); + g_391--; + step_hash(195); + (*l_396) = l_394; + step_hash(196); + if (l_343[l_54]) + break; + } + step_hash(198); + (*l_326) |= p_44; + step_hash(210); + for (g_180 = 0; (g_180 <= 3); g_180 += 1) + { + int l_397 = 0xEF639776L; + int i; + step_hash(202); + if (l_343[g_180]) + break; + step_hash(209); + for (g_391 = 0; (g_391 <= 3); g_391 += 1) + { + int l_398 = 1L; + int i; + step_hash(206); + ++l_399; + step_hash(207); + --g_405[1][1]; + step_hash(208); + return l_343[g_180]; + } + } + } + } + else + { + int l_430 = 0xAEE4F8E2L; + int l_431 = 0L; + int **l_456 = &g_131; + unsigned l_520 = 6UL; + step_hash(251); + for (g_180 = (-24); (g_180 == 50); ++g_180) + { + unsigned l_426 = 0xED94B710L; + int l_432 = 1L; + unsigned l_436 = 4294967295UL; + int *l_449 = &l_431; + step_hash(228); + for (g_359 = 23; (g_359 > 42); g_359 += 6) + { + unsigned l_416 = 0x27DD6BAFL; + int l_428 = 0L; + int *l_439 = &l_334; + step_hash(226); + for (l_388 = (-14); (l_388 < (-19)); l_388 -= 3) + { + short l_421 = 0x0179L; + int *l_427 = &l_343[0]; + int *l_429[2][5] = {{&g_129, &g_129, &l_342, &g_129, &g_129}, {&g_129, &g_129, &l_342, &g_129, &g_129}}; + int i, j; + step_hash(222); + (*l_427) = (p_44 && ((unsigned char)(l_416 != ((unsigned short)((signed char)(l_421 & 4294967295UL) % (signed char)((unsigned char)((unsigned short)l_426 - (unsigned short)((&g_274 != &l_343[1]) > ((void*)0 != &g_274))) % (unsigned char)(-4L))) << (unsigned short)11)) << (unsigned char)6)); + step_hash(223); + l_428 = g_254; + step_hash(224); + g_433--; + step_hash(225); + ++l_436; + } + step_hash(227); + (*l_439) |= p_44; + } + step_hash(248); + for (g_344 = 0; (g_344 <= 3); g_344 += 1) + { + int *l_440[7]; + unsigned l_441 = 4294967290UL; + int **l_444[10][8] = {{&l_440[3], &l_440[5], &l_440[2], &l_440[2], &l_440[2], &l_440[2], &l_440[2], &l_440[5]}, {&l_440[3], &l_440[5], &l_440[2], &l_440[2], &l_440[2], &l_440[2], &l_440[2], &l_440[5]}, {&l_440[3], &l_440[5], &l_440[2], &l_440[2], &l_440[2], &l_440[2], &l_440[2], &l_440[5]}, {&l_440[3], &l_440[5], &l_440[2], &l_440[2], &l_440[2], &l_440[2], &l_440[2], &l_440[5]}, {&l_440[3], &l_440[5], &l_440[2], &l_440[2], &l_440[2], &l_440[2], &l_440[2], &l_440[5]}, {&l_440[3], &l_440[5], &l_440[2], &l_440[2], &l_440[2], &l_440[2], &l_440[2], &l_440[5]}, {&l_440[3], &l_440[5], &l_440[2], &l_440[2], &l_440[2], &l_440[2], &l_440[2], &l_440[5]}, {&l_440[3], &l_440[5], &l_440[2], &l_440[2], &l_440[2], &l_440[2], &l_440[2], &l_440[5]}, {&l_440[3], &l_440[5], &l_440[2], &l_440[2], &l_440[2], &l_440[2], &l_440[2], &l_440[5]}, {&l_440[3], &l_440[5], &l_440[2], &l_440[2], &l_440[2], &l_440[2], &l_440[2], &l_440[5]}}; + int i, j; + for (i = 0; i < 7; i++) + l_440[i] = &l_431; + step_hash(232); + l_441++; + step_hash(233); + g_131 = &l_343[g_344]; + step_hash(247); + for (g_161 = 0; (g_161 <= 1); g_161 += 1) + { + int i, j; + step_hash(237); + l_432 ^= func_74(g_336[(g_161 + 5)][g_161], (func_74((g_405[g_161][(g_161 + 1)] == (p_43 || ((+(func_74(((short)(((0x82F8L > (l_436 >= (!((void*)0 != g_447)))) & 0xAF9BL) | (**g_448)) << (short)9), p_43, g_314, (***g_447)) >= l_436)) | g_344))), g_405[g_161][(g_161 + 1)], p_44, (***g_447)) == p_44), p_44, (***g_447)); + step_hash(238); + if ((*g_131)) + continue; + step_hash(239); + (*g_131) |= p_43; + step_hash(246); + for (g_433 = 0; (g_433 <= 1); g_433 += 1) + { + step_hash(243); + (**g_448) &= (&l_431 == &l_335); + step_hash(244); + if ((***g_447)) + continue; + step_hash(245); + if ((**g_448)) + continue; + } + } + } + step_hash(249); + (*l_449) = 0L; + step_hash(250); + l_335 = ((*l_449) || g_188[3][1]); + } + step_hash(285); + for (g_254 = 0; (g_254 <= 3); g_254 += 1) + { + unsigned char l_489 = 253UL; + int l_500 = 0L; + int i; + step_hash(255); + l_343[g_254] = ((unsigned short)(~(((signed char)(((unsigned char)(((void*)0 == l_456) >= ((unsigned short)l_343[g_254] >> (unsigned short)((((short)(&g_448 == &g_448) - (short)g_391) == p_44) != g_161))) % (unsigned char)((signed char)((unsigned char)l_343[g_254] >> (unsigned char)g_336[1][0]) - (signed char)255UL)) >= (-10L)) / (signed char)l_343[2]) & g_433)) + (unsigned short)g_353); + step_hash(282); + if ((g_344 < p_44)) + { + unsigned short l_485 = 2UL; + int *l_501 = &l_335; + step_hash(257); + (*g_448) = (*l_456); + step_hash(277); + for (l_430 = 1; (l_430 <= 4); l_430 += 1) + { + int l_488 = 0x8EE25456L; + int *l_492 = &g_129; + int i, j; + step_hash(261); + g_274 &= (g_350 != 0UL); + step_hash(268); + if (((*g_447) == (void*)0)) + { + step_hash(263); + (*l_456) = (**l_473); + } + else + { + unsigned l_499 = 4294967295UL; + step_hash(265); + l_343[g_254] = ((unsigned)g_336[1][0] - (unsigned)((**g_447) == l_492)); + step_hash(266); + (*l_492) |= 0xD4CB0198L; + step_hash(267); + l_500 &= (((unsigned short)0x41E1L + (unsigned short)func_74(((unsigned char)((p_43 <= l_343[g_254]) <= ((0xD583L == p_44) < ((unsigned)p_44 / (unsigned)p_44))) + (unsigned char)(~(0xAA89L & g_180))), g_391, l_499, p_43)) || (*l_492)); + } + step_hash(276); + for (p_44 = 0; (p_44 <= 4); p_44 += 1) + { + step_hash(272); + l_501 = (void*)0; + step_hash(273); + if (p_44) + continue; + step_hash(274); + (*g_448) = (**g_447); + step_hash(275); + if (p_43) + continue; + } + } + step_hash(278); + l_431 &= p_43; + step_hash(279); + (**g_447) = &l_343[g_254]; + } + else + { + unsigned l_502[3][6] = {{0x220C7741L, 1UL, 4294967291UL, 4294967291UL, 1UL, 0x220C7741L}, {0x220C7741L, 1UL, 4294967291UL, 4294967291UL, 1UL, 0x220C7741L}, {0x220C7741L, 1UL, 4294967291UL, 4294967291UL, 1UL, 0x220C7741L}}; + int *l_503 = &g_274; + int i, j; + step_hash(281); + (*l_503) ^= l_502[1][5]; + } + step_hash(283); + (**l_473) = (**g_447); + step_hash(284); + g_129 &= ((unsigned char)(1L > (((unsigned short)g_387 % (unsigned short)(0x14DC4E3CL | (l_489 || func_74((((-(signed char)p_44) < (p_44 <= p_44)) | l_489), p_43, g_391, p_44)))) <= g_347[2][6])) >> (unsigned char)g_307); + } + step_hash(297); + if (p_44) + { + step_hash(287); + return p_44; + } + else + { + step_hash(296); + if (l_520) + { + step_hash(290); + return p_44; + } + else + { + int *l_521 = (void*)0; + int *l_522 = &g_274; + step_hash(292); + (**g_447) = (*g_448); + step_hash(293); + (*l_522) = p_43; + step_hash(294); + (*l_522) = p_44; + step_hash(295); + return g_391; + } + } + } + step_hash(344); + if (((signed char)((func_74((l_390 || p_43), l_376, p_44, p_44) ^ 0x3944L) | l_535) % (signed char)0x6EL)) + { + step_hash(341); + for (g_254 = 0; (g_254 <= 3); g_254 += 1) + { + short l_559[9][6] = {{1L, 4L, 0L, (-1L), (-1L), 0L}, {1L, 4L, 0L, (-1L), (-1L), 0L}, {1L, 4L, 0L, (-1L), (-1L), 0L}, {1L, 4L, 0L, (-1L), (-1L), 0L}, {1L, 4L, 0L, (-1L), (-1L), 0L}, {1L, 4L, 0L, (-1L), (-1L), 0L}, {1L, 4L, 0L, (-1L), (-1L), 0L}, {1L, 4L, 0L, (-1L), (-1L), 0L}, {1L, 4L, 0L, (-1L), (-1L), 0L}}; + int i, j; + step_hash(303); + (*g_448) = (*g_448); + step_hash(312); + for (l_342 = 0; (l_342 <= 1); l_342 += 1) + { + step_hash(311); + for (g_274 = 0; (g_274 <= 3); g_274 += 1) + { + int *l_541 = &l_343[2]; + step_hash(310); + (**l_473) = l_541; + } + } + step_hash(340); + for (l_335 = 1; (l_335 >= 0); l_335 -= 1) + { + int l_555 = 0x9B7F5648L; + int i, j; + step_hash(327); + for (g_540 = 0; (g_540 <= 3); g_540 += 1) + { + int i, j; + step_hash(319); + l_343[g_254] &= (g_405[l_335][g_540] >= g_188[(g_254 + 1)][g_254]); + step_hash(325); + for (g_387 = 0; (g_387 <= 3); g_387 += 1) + { + int i, j; + step_hash(323); + l_343[g_254] = ((void*)0 != (*g_447)); + step_hash(324); + l_343[g_254] = func_74(l_343[g_540], g_188[(g_540 + 1)][g_387], g_405[l_335][(g_540 + 2)], p_44); + } + step_hash(326); + return l_343[g_254]; + } + step_hash(328); + l_343[g_254] ^= g_405[l_335][(g_254 + 2)]; + step_hash(339); + for (g_316 = 0; (g_316 <= 1); g_316 += 1) + { + int l_558 = 0x9DBB7E0FL; + step_hash(332); + l_559[2][2] = (((unsigned short)p_43 >> (unsigned short)8) < ((unsigned short)(1UL | ((short)((short)(((unsigned char)((short)p_43 << (short)4) + (unsigned char)g_176) > p_44) + (short)0x7F8EL) >> (short)g_349)) << (unsigned short)p_43)); + step_hash(338); + for (g_314 = 0; (g_314 <= 5); g_314 += 1) + { + step_hash(336); + (*g_448) = (*g_448); + step_hash(337); + (**l_473) = (**g_447); + } + } + } + } + } + else + { + int *l_560 = (void*)0; + int *l_561[2]; + int i; + for (i = 0; i < 2; i++) + l_561[i] = &l_343[2]; + step_hash(343); + --g_562; + } + step_hash(345); + l_334 &= (p_43 < (&g_448 != (void*)0)); + step_hash(346); + ++g_580; + step_hash(347); + return p_44; +} + + + + + + + +static unsigned char func_57(signed char p_58, short p_59, unsigned char p_60, signed char p_61, short p_62) +{ + int *l_187[6][5] = {{&g_129, &g_129, (void*)0, &g_129, &g_129}, {&g_129, &g_129, (void*)0, &g_129, &g_129}, {&g_129, &g_129, (void*)0, &g_129, &g_129}, {&g_129, &g_129, (void*)0, &g_129, &g_129}, {&g_129, &g_129, (void*)0, &g_129, &g_129}, {&g_129, &g_129, (void*)0, &g_129, &g_129}}; + short l_209 = 0x1B59L; + signed char l_212[3][5] = {{0x99L, 0x99L, 3L, 0x99L, 0x99L}, {0x99L, 0x99L, 3L, 0x99L, 0x99L}, {0x99L, 0x99L, 3L, 0x99L, 0x99L}}; + signed char l_215 = 0x3AL; + short l_243 = 0x0293L; + int i, j; + step_hash(92); + g_188[3][2] ^= (!(*g_131)); + step_hash(157); + if (((((signed char)p_62 << (signed char)7) != (p_61 <= (((signed char)((unsigned short)p_58 - (unsigned short)65531UL) * (signed char)p_59) >= (func_74((p_60 | ((+((unsigned short)((short)p_62 % (short)((int)((void*)0 == &l_187[4][0]) / (int)(*g_131))) >> (unsigned short)p_60)) > g_180)), g_180, g_188[2][2], (*g_131)) == 0xF072L)))) < p_60)) + { + int **l_203 = &l_187[0][1]; + short l_208 = 0xFDC0L; + unsigned char l_226 = 0x5DL; + int l_244 = (-3L); + unsigned short l_247 = 1UL; + int l_252 = 0xC25EC4CEL; + int l_298 = 1L; + step_hash(94); + l_209 = (((signed char)0x1DL >> (signed char)(l_203 != l_203)) & ((unsigned short)g_161 - (unsigned short)(((*g_131) > l_208) <= (l_187[2][3] != (*l_203))))); + step_hash(151); + if (((unsigned)g_180 + (unsigned)((func_74(l_212[2][0], p_62, g_161, p_60) && func_74(p_61, ((func_74(((short)func_74(((void*)0 == &g_131), g_161, g_2, p_62) % (short)6L), g_176, g_188[2][0], (*g_131)) || 0UL) >= p_59), g_188[3][2], p_61)) & l_215))) + { + step_hash(105); + for (g_129 = 0; (g_129 <= 2); g_129 += 1) + { + step_hash(99); + if (p_59) + break; + step_hash(104); + for (g_176 = 0; (g_176 <= 2); g_176 += 1) + { + int i, j; + step_hash(103); + return l_212[g_176][(g_129 + 1)]; + } + } + } + else + { + int **l_231 = &l_187[4][0]; + short l_232 = 4L; + int l_239 = 0L; + int l_251 = 0x1BEB0008L; + unsigned l_289 = 0xBA3A8752L; + step_hash(131); + if (((signed char)(((~p_60) | p_59) <= ((unsigned char)func_74(((short)((((unsigned short)((short)(1UL > (func_63(l_226, func_74(((unsigned)((signed char)(((void*)0 != l_231) <= g_176) << (signed char)1) + (unsigned)(g_176 == g_2)), g_2, p_60, p_61), p_59, g_180) & g_188[2][5])) >> (short)p_60) + (unsigned short)g_161) | (-1L)) >= p_58) << (short)g_161), p_59, p_61, l_232) >> (unsigned char)6)) * (signed char)p_62)) + { + unsigned l_233 = 0xBF60BB93L; + int l_250 = (-2L); + int l_253 = 0x6F3E09BFL; + step_hash(108); + l_233 |= (*g_131); + step_hash(127); + for (p_60 = 0; (p_60 <= 42); ++p_60) + { + unsigned l_240 = 0x503FB3B2L; + int l_248 = 0x58BBD954L; + step_hash(112); + (*l_203) = l_187[5][4]; + step_hash(119); + for (g_180 = 0; (g_180 > 3); g_180 += 7) + { + int l_238 = 1L; + step_hash(116); + --l_240; + step_hash(117); + if (l_243) + continue; + step_hash(118); + l_244 ^= (*g_131); + } + step_hash(126); + if (((signed char)l_247 * (signed char)g_188[3][2])) + { + step_hash(121); + return l_240; + } + else + { + int l_249[2]; + int i; + for (i = 0; i < 2; i++) + l_249[i] = 1L; + step_hash(123); + g_254--; + step_hash(124); + (*l_231) = &g_2; + step_hash(125); + return p_59; + } + } + } + else + { + step_hash(129); + (*l_203) = &g_2; + step_hash(130); + (*g_131) = (*g_131); + } + step_hash(132); + (*g_131) = (((signed char)(((void*)0 == &g_131) | (((unsigned char)(((signed char)(((-1L) | g_188[3][2]) | ((void*)0 == (*l_203))) >> (signed char)4) ^ g_188[0][2]) + (unsigned char)((unsigned char)(&g_2 != (*l_203)) * (unsigned char)0xE2L)) ^ g_2)) >> (signed char)7) >= 0xB0L); + step_hash(149); + if (((p_59 != g_129) == ((void*)0 != &g_131))) + { + int *l_269[9][4] = {{&l_244, &g_2, &l_244, &g_2}, {&l_244, &g_2, &l_244, &g_2}, {&l_244, &g_2, &l_244, &g_2}, {&l_244, &g_2, &l_244, &g_2}, {&l_244, &g_2, &l_244, &g_2}, {&l_244, &g_2, &l_244, &g_2}, {&l_244, &g_2, &l_244, &g_2}, {&l_244, &g_2, &l_244, &g_2}, {&l_244, &g_2, &l_244, &g_2}}; + int i, j; + step_hash(134); + g_274 &= ((signed char)func_74(p_60, ((short)0x779DL + (short)(l_187[4][0] == l_269[0][0])), p_58, ((short)p_58 << (short)((signed char)p_61 - (signed char)func_63(((&g_2 != l_269[0][0]) == p_62), g_254, g_188[3][2], p_58)))) * (signed char)g_254); + step_hash(145); + if ((*g_131)) + { + int l_281 = 0x7C646956L; + step_hash(142); + for (g_254 = (-2); (g_254 < 18); g_254 += 7) + { + unsigned short l_284 = 0xD492L; + int l_285 = (-1L); + step_hash(139); + (*g_131) = (*g_131); + step_hash(140); + l_269[1][3] = &g_129; + step_hash(141); + l_285 ^= (g_2 || (func_63(((unsigned short)((int)l_281 - (int)g_254) + (unsigned short)(-2L)), ((unsigned short)func_63(g_180, g_254, ((void*)0 == (*l_203)), (~0xC744L)) * (unsigned short)l_284), l_284, g_274) > 8L)); + } + } + else + { + step_hash(144); + (*l_203) = &g_274; + } + } + else + { + step_hash(147); + (*g_131) = p_58; + step_hash(148); + g_286++; + } + step_hash(150); + (*g_131) &= (65535UL || l_289); + } + step_hash(152); + (*g_131) = (g_161 != ((unsigned)((unsigned short)(((unsigned char)func_74(p_59, g_176, ((short)(func_74(l_298, p_61, g_188[3][2], (&l_187[4][0] == (void*)0)) ^ p_59) + (short)p_61), p_61) * (unsigned char)0L) | p_60) % (unsigned short)0x1E84L) - (unsigned)p_59)); + } + else + { + signed char l_299 = 5L; + int l_304 = 0x7649E829L; + int l_305 = 0x5E0AE813L; + int l_306 = 0L; + step_hash(154); + (*g_131) = ((g_176 <= l_299) < (((unsigned char)(g_176 == ((l_299 >= ((unsigned)g_161 + (unsigned)(g_2 | ((void*)0 == &g_131)))) == (0xCD54L == (-1L)))) >> (unsigned char)0) & p_59)); + step_hash(155); + g_131 = l_187[4][0]; + step_hash(156); + g_307++; + } + step_hash(162); + for (g_274 = 0; (g_274 < 5); g_274 += 4) + { + short l_312[4]; + int l_313 = 0x8AA95A07L; + int l_315[1][4] = {{0xD4A61B79L, 0x946A76BEL, 0xD4A61B79L, 0x946A76BEL}}; + int i, j; + for (i = 0; i < 4; i++) + l_312[i] = 0xCE60L; + step_hash(161); + g_316--; + } + step_hash(163); + return g_176; +} + + + + + + + +static signed char func_63(unsigned char p_64, unsigned char p_65, short p_66, unsigned short p_67) +{ + int *l_91 = &g_2; + int **l_90 = &l_91; + int l_99 = 0xCD2740D6L; + unsigned char l_105 = 254UL; + int l_175 = 1L; + step_hash(11); + (*l_90) = &g_2; + step_hash(12); + (*l_90) = (void*)0; + step_hash(88); + if (((signed char)g_2 / (signed char)g_2)) + { + unsigned l_115 = 4294967288UL; + int l_128 = 0L; + int *l_150 = &l_128; + int *l_151 = &l_128; + step_hash(77); + for (p_67 = (-4); (p_67 > 48); p_67 += 6) + { + int **l_96[5]; + signed char l_137 = 0xE0L; + int i; + for (i = 0; i < 5; i++) + l_96[i] = &l_91; + } + step_hash(78); + (*l_151) = (*g_131); + } + else + { + int *l_179[5][8] = {{&l_99, &g_129, &g_2, &g_129, &l_99, &l_99, &l_99, &g_129}, {&l_99, &g_129, &g_2, &g_129, &l_99, &l_99, &l_99, &g_129}, {&l_99, &g_129, &g_2, &g_129, &l_99, &l_99, &l_99, &g_129}, {&l_99, &g_129, &g_2, &g_129, &l_99, &l_99, &l_99, &g_129}, {&l_99, &g_129, &g_2, &g_129, &l_99, &l_99, &l_99, &g_129}}; + int i, j; + step_hash(80); + --g_180; + step_hash(81); + (*g_131) &= ((unsigned char)g_176 - (unsigned char)((int)0xFD62B9E9L / (int)0x82FD2184L)); + step_hash(86); + for (p_65 = 1; (p_65 <= 4); p_65 += 1) + { + step_hash(85); + return p_64; + } + step_hash(87); + return p_67; + } + step_hash(89); + (*l_90) = (*l_90); + step_hash(90); + return p_65; +} + + + + + + + +static unsigned char func_74(unsigned p_75, unsigned p_76, short p_77, int p_78) +{ + unsigned short l_89 = 0x3301L; + step_hash(8); + l_89 &= (((g_2 > 0x5D26L) & p_75) == (p_78 == p_77)); + step_hash(9); + return g_2; +} + + +void csmith_compute_hash(void) +{ + int i, j; + transparent_crc(g_2, "g_2", print_hash_value); + transparent_crc(g_129, "g_129", print_hash_value); + transparent_crc(g_161, "g_161", print_hash_value); + transparent_crc(g_176, "g_176", print_hash_value); + transparent_crc(g_180, "g_180", print_hash_value); + for (i = 0; i < 5; i++) + { + for (j = 0; j < 6; j++) + { + transparent_crc(g_188[i][j], "g_188[i][j]", print_hash_value); + if (print_hash_value) printf("index = [%d][%d]\n", i, j); + + } + } + transparent_crc(g_254, "g_254", print_hash_value); + transparent_crc(g_274, "g_274", print_hash_value); + transparent_crc(g_286, "g_286", print_hash_value); + transparent_crc(g_307, "g_307", print_hash_value); + transparent_crc(g_314, "g_314", print_hash_value); + transparent_crc(g_316, "g_316", print_hash_value); + for (i = 0; i < 9; i++) + { + for (j = 0; j < 2; j++) + { + transparent_crc(g_336[i][j], "g_336[i][j]", print_hash_value); + if (print_hash_value) printf("index = [%d][%d]\n", i, j); + + } + } + transparent_crc(g_344, "g_344", print_hash_value); + for (i = 0; i < 8; i++) + { + for (j = 0; j < 9; j++) + { + transparent_crc(g_347[i][j], "g_347[i][j]", print_hash_value); + if (print_hash_value) printf("index = [%d][%d]\n", i, j); + + } + } + transparent_crc(g_349, "g_349", print_hash_value); + transparent_crc(g_350, "g_350", print_hash_value); + transparent_crc(g_353, "g_353", print_hash_value); + transparent_crc(g_358, "g_358", print_hash_value); + transparent_crc(g_359, "g_359", print_hash_value); + transparent_crc(g_387, "g_387", print_hash_value); + transparent_crc(g_391, "g_391", print_hash_value); + transparent_crc(g_404, "g_404", print_hash_value); + for (i = 0; i < 2; i++) + { + for (j = 0; j < 6; j++) + { + transparent_crc(g_405[i][j], "g_405[i][j]", print_hash_value); + if (print_hash_value) printf("index = [%d][%d]\n", i, j); + + } + } + transparent_crc(g_433, "g_433", print_hash_value); + transparent_crc(g_474, "g_474", print_hash_value); + transparent_crc(g_540, "g_540", print_hash_value); + transparent_crc(g_554, "g_554", print_hash_value); + transparent_crc(g_562, "g_562", print_hash_value); + transparent_crc(g_580, "g_580", print_hash_value); + transparent_crc(g_619, "g_619", print_hash_value); + transparent_crc(g_633, "g_633", print_hash_value); + for (i = 0; i < 2; i++) + { + for (j = 0; j < 5; j++) + { + transparent_crc(g_635[i][j], "g_635[i][j]", print_hash_value); + if (print_hash_value) printf("index = [%d][%d]\n", i, j); + + } + } + for (i = 0; i < 7; i++) + { + for (j = 0; j < 9; j++) + { + transparent_crc(g_754[i][j], "g_754[i][j]", print_hash_value); + if (print_hash_value) printf("index = [%d][%d]\n", i, j); + + } + } + transparent_crc(g_768, "g_768", print_hash_value); + for (i = 0; i < 2; i++) + { + transparent_crc(g_1005[i], "g_1005[i]", print_hash_value); + if (print_hash_value) printf("index = [%d]\n", i); + + } +} + +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} + + + +int main (void) +{ + int i, j; + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand87.expect b/src/tests/csmith/rand87.expect new file mode 100644 index 0000000..08c5278 --- /dev/null +++ b/src/tests/csmith/rand87.expect @@ -0,0 +1,3108 @@ +...checksum after hashing g_2 : 6DB878BA +...checksum after hashing g_129 : 623DDFDF +...checksum after hashing g_161 : CEF74AE5 +...checksum after hashing g_176 : 32EDF537 +...checksum after hashing g_180 : 4E39C9BE +...checksum after hashing g_188[i][j] : CFC205B9 +index = [0][0] +...checksum after hashing g_188[i][j] : D5E116F +index = [0][1] +...checksum after hashing g_188[i][j] : 59D381B7 +index = [0][2] +...checksum after hashing g_188[i][j] : F9B4A704 +index = [0][3] +...checksum after hashing g_188[i][j] : 8513DDCF +index = [0][4] +...checksum after hashing g_188[i][j] : 7606B112 +index = [0][5] +...checksum after hashing g_188[i][j] : E241084E +index = [1][0] +...checksum after hashing g_188[i][j] : 4B463BDF +index = [1][1] +...checksum after hashing g_188[i][j] : 6CDF70E7 +index = [1][2] +...checksum after hashing g_188[i][j] : 7CB93A6E +index = [1][3] +...checksum after hashing g_188[i][j] : C3FE8E9 +index = [1][4] +...checksum after hashing g_188[i][j] : 7CAA36A1 +index = [1][5] +...checksum after hashing g_188[i][j] : EB9BFEC4 +index = [2][0] +...checksum after hashing g_188[i][j] : 7AE0F7D3 +index = [2][1] +...checksum after hashing g_188[i][j] : 173FBB2E +index = [2][2] +...checksum after hashing g_188[i][j] : 73AFB91B +index = [2][3] +...checksum after hashing g_188[i][j] : 3F8AB5D8 +index = [2][4] +...checksum after hashing g_188[i][j] : 763B2F6D +index = [2][5] +...checksum after hashing g_188[i][j] : 4C7865C0 +index = [3][0] +...checksum after hashing g_188[i][j] : 3925A1F1 +index = [3][1] +...checksum after hashing g_188[i][j] : 2C6DBDB8 +index = [3][2] +...checksum after hashing g_188[i][j] : D68FAD23 +index = [3][3] +...checksum after hashing g_188[i][j] : 22021DFF +index = [3][4] +...checksum after hashing g_188[i][j] : CE9CAA8 +index = [3][5] +...checksum after hashing g_188[i][j] : A11C5600 +index = [4][0] +...checksum after hashing g_188[i][j] : B66F2458 +index = [4][1] +...checksum after hashing g_188[i][j] : 8C610B62 +index = [4][2] +...checksum after hashing g_188[i][j] : 24D69A98 +index = [4][3] +...checksum after hashing g_188[i][j] : F19F525C +index = [4][4] +...checksum after hashing g_188[i][j] : F3C4C187 +index = [4][5] +...checksum after hashing g_254 : 7D5BEC37 +...checksum after hashing g_274 : 7EC23811 +...checksum after hashing g_286 : FDF1E5A6 +...checksum after hashing g_307 : 93AF25B4 +...checksum after hashing g_314 : 13F0C0E1 +...checksum after hashing g_316 : D8DC93FE +...checksum after hashing g_336[i][j] : 19623AB9 +index = [0][0] +...checksum after hashing g_336[i][j] : F6A77B1D +index = [0][1] +...checksum after hashing g_336[i][j] : 6A44F885 +index = [1][0] +...checksum after hashing g_336[i][j] : D4A3DD88 +index = [1][1] +...checksum after hashing g_336[i][j] : 8C234C21 +index = [2][0] +...checksum after hashing g_336[i][j] : B728BF3B +index = [2][1] +...checksum after hashing g_336[i][j] : C47BC379 +index = [3][0] +...checksum after hashing g_336[i][j] : 599DDA35 +index = [3][1] +...checksum after hashing g_336[i][j] : B4B82803 +index = [4][0] +...checksum after hashing g_336[i][j] : 487A503D +index = [4][1] +...checksum after hashing g_336[i][j] : E621DB63 +index = [5][0] +...checksum after hashing g_336[i][j] : E1386B3C +index = [5][1] +...checksum after hashing g_336[i][j] : 1BE680BC +index = [6][0] +...checksum after hashing g_336[i][j] : B851CC8A +index = [6][1] +...checksum after hashing g_336[i][j] : 5940E3A1 +index = [7][0] +...checksum after hashing g_336[i][j] : 303C0D62 +index = [7][1] +...checksum after hashing g_336[i][j] : E9D668F9 +index = [8][0] +...checksum after hashing g_336[i][j] : 3F9F405E +index = [8][1] +...checksum after hashing g_344 : 21BC99A9 +...checksum after hashing g_347[i][j] : 5F409C63 +index = [0][0] +...checksum after hashing g_347[i][j] : 4FCFA260 +index = [0][1] +...checksum after hashing g_347[i][j] : 3EE5DA7A +index = [0][2] +...checksum after hashing g_347[i][j] : FF0C5265 +index = [0][3] +...checksum after hashing g_347[i][j] : E3D736AE +index = [0][4] +...checksum after hashing g_347[i][j] : 5651C71B +index = [0][5] +...checksum after hashing g_347[i][j] : 33F0A34F +index = [0][6] +...checksum after hashing g_347[i][j] : 2ADD9380 +index = [0][7] +...checksum after hashing g_347[i][j] : 881FF1E1 +index = [0][8] +...checksum after hashing g_347[i][j] : 6D04824F +index = [1][0] +...checksum after hashing g_347[i][j] : EF51E71D +index = [1][1] +...checksum after hashing g_347[i][j] : E8F5E96C +index = [1][2] +...checksum after hashing g_347[i][j] : 8921645F +index = [1][3] +...checksum after hashing g_347[i][j] : C5EB39AF +index = [1][4] +...checksum after hashing g_347[i][j] : 444F1B41 +index = [1][5] +...checksum after hashing g_347[i][j] : 342BCE4A +index = [1][6] +...checksum after hashing g_347[i][j] : A1A4B2B6 +index = [1][7] +...checksum after hashing g_347[i][j] : E047E25C +index = [1][8] +...checksum after hashing g_347[i][j] : AD773717 +index = [2][0] +...checksum after hashing g_347[i][j] : BD0B142E +index = [2][1] +...checksum after hashing g_347[i][j] : 78D8F6AC +index = [2][2] +...checksum after hashing g_347[i][j] : 3833A7BF +index = [2][3] +...checksum after hashing g_347[i][j] : 44EFA347 +index = [2][4] +...checksum after hashing g_347[i][j] : 59D33902 +index = [2][5] +...checksum after hashing g_347[i][j] : 38B102D8 +index = [2][6] +...checksum after hashing g_347[i][j] : AC40DA06 +index = [2][7] +...checksum after hashing g_347[i][j] : FF527C0B +index = [2][8] +...checksum after hashing g_347[i][j] : B69D7E17 +index = [3][0] +...checksum after hashing g_347[i][j] : ECB470EB +index = [3][1] +...checksum after hashing g_347[i][j] : 9A45871 +index = [3][2] +...checksum after hashing g_347[i][j] : 9B63C1C1 +index = [3][3] +...checksum after hashing g_347[i][j] : 76316C7C +index = [3][4] +...checksum after hashing g_347[i][j] : 33662ECE +index = [3][5] +...checksum after hashing g_347[i][j] : 29963428 +index = [3][6] +...checksum after hashing g_347[i][j] : BAB5C714 +index = [3][7] +...checksum after hashing g_347[i][j] : 8CA37395 +index = [3][8] +...checksum after hashing g_347[i][j] : 24F55FC7 +index = [4][0] +...checksum after hashing g_347[i][j] : 404AF662 +index = [4][1] +...checksum after hashing g_347[i][j] : 2912E502 +index = [4][2] +...checksum after hashing g_347[i][j] : A69E8A06 +index = [4][3] +...checksum after hashing g_347[i][j] : 181E0B03 +index = [4][4] +...checksum after hashing g_347[i][j] : F5B43793 +index = [4][5] +...checksum after hashing g_347[i][j] : C20FBBB0 +index = [4][6] +...checksum after hashing g_347[i][j] : BF735841 +index = [4][7] +...checksum after hashing g_347[i][j] : 6BF5F78F +index = [4][8] +...checksum after hashing g_347[i][j] : 2FE2D669 +index = [5][0] +...checksum after hashing g_347[i][j] : 914BE545 +index = [5][1] +...checksum after hashing g_347[i][j] : E258BCAF +index = [5][2] +...checksum after hashing g_347[i][j] : 7CD2E256 +index = [5][3] +...checksum after hashing g_347[i][j] : AF1DA5FA +index = [5][4] +...checksum after hashing g_347[i][j] : A3146B38 +index = [5][5] +...checksum after hashing g_347[i][j] : 11CCBA48 +index = [5][6] +...checksum after hashing g_347[i][j] : 26E0BDD +index = [5][7] +...checksum after hashing g_347[i][j] : B8259A57 +index = [5][8] +...checksum after hashing g_347[i][j] : 12EF591D +index = [6][0] +...checksum after hashing g_347[i][j] : 72B9BC6F +index = [6][1] +...checksum after hashing g_347[i][j] : 5133D637 +index = [6][2] +...checksum after hashing g_347[i][j] : 950735B1 +index = [6][3] +...checksum after hashing g_347[i][j] : 49EA9448 +index = [6][4] +...checksum after hashing g_347[i][j] : 235252B9 +index = [6][5] +...checksum after hashing g_347[i][j] : 2408DEAA +index = [6][6] +...checksum after hashing g_347[i][j] : C8E337FB +index = [6][7] +...checksum after hashing g_347[i][j] : E591BBE9 +index = [6][8] +...checksum after hashing g_347[i][j] : 43BE0A96 +index = [7][0] +...checksum after hashing g_347[i][j] : 99D710CB +index = [7][1] +...checksum after hashing g_347[i][j] : 8FFE81B8 +index = [7][2] +...checksum after hashing g_347[i][j] : 56F1FD39 +index = [7][3] +...checksum after hashing g_347[i][j] : BE301855 +index = [7][4] +...checksum after hashing g_347[i][j] : 31007535 +index = [7][5] +...checksum after hashing g_347[i][j] : C5B1C9D2 +index = [7][6] +...checksum after hashing g_347[i][j] : 9D0BCD62 +index = [7][7] +...checksum after hashing g_347[i][j] : 102C3F5E +index = [7][8] +...checksum after hashing g_349 : 171091FC +...checksum after hashing g_350 : 3151E383 +...checksum after hashing g_353 : A9D2FB72 +...checksum after hashing g_358 : D830AF52 +...checksum after hashing g_359 : 58FD56C4 +...checksum after hashing g_387 : 74F8B279 +...checksum after hashing g_391 : E773FC5D +...checksum after hashing g_404 : BC0C4DB4 +...checksum after hashing g_405[i][j] : 72752FE8 +index = [0][0] +...checksum after hashing g_405[i][j] : 3ADCADB4 +index = [0][1] +...checksum after hashing g_405[i][j] : 1CD8E433 +index = [0][2] +...checksum after hashing g_405[i][j] : E7D06476 +index = [0][3] +...checksum after hashing g_405[i][j] : 48997665 +index = [0][4] +...checksum after hashing g_405[i][j] : 30E94B4E +index = [0][5] +...checksum after hashing g_405[i][j] : 58246D3B +index = [1][0] +...checksum after hashing g_405[i][j] : 53847AE +index = [1][1] +...checksum after hashing g_405[i][j] : B7D1D6B +index = [1][2] +...checksum after hashing g_405[i][j] : 3DFC60F +index = [1][3] +...checksum after hashing g_405[i][j] : A4AD2AD3 +index = [1][4] +...checksum after hashing g_405[i][j] : 7FC0D078 +index = [1][5] +...checksum after hashing g_433 : 4AD4E7F4 +...checksum after hashing g_474 : 4F0C5739 +...checksum after hashing g_540 : BACA36EE +...checksum after hashing g_554 : 83289D10 +...checksum after hashing g_562 : E16F002C +...checksum after hashing g_580 : AF11DDA8 +...checksum after hashing g_619 : A4ADED45 +...checksum after hashing g_633 : 5E1AF6D0 +...checksum after hashing g_635[i][j] : 54A2E93E +index = [0][0] +...checksum after hashing g_635[i][j] : B9B1F6D6 +index = [0][1] +...checksum after hashing g_635[i][j] : 254A41B +index = [0][2] +...checksum after hashing g_635[i][j] : 96F105B3 +index = [0][3] +...checksum after hashing g_635[i][j] : E2861CFF +index = [0][4] +...checksum after hashing g_635[i][j] : 17A53991 +index = [1][0] +...checksum after hashing g_635[i][j] : 81A44C58 +index = [1][1] +...checksum after hashing g_635[i][j] : D8AC405F +index = [1][2] +...checksum after hashing g_635[i][j] : 960FE2DA +index = [1][3] +...checksum after hashing g_635[i][j] : 823AAE60 +index = [1][4] +...checksum after hashing g_754[i][j] : F59DF5C6 +index = [0][0] +...checksum after hashing g_754[i][j] : 7604E273 +index = [0][1] +...checksum after hashing g_754[i][j] : E39FEF3 +index = [0][2] +...checksum after hashing g_754[i][j] : 5B4DFF57 +index = [0][3] +...checksum after hashing g_754[i][j] : DA61AD55 +index = [0][4] +...checksum after hashing g_754[i][j] : DD8879F +index = [0][5] +...checksum after hashing g_754[i][j] : C42184D +index = [0][6] +...checksum after hashing g_754[i][j] : 3BFF0413 +index = [0][7] +...checksum after hashing g_754[i][j] : FE72FC82 +index = [0][8] +...checksum after hashing g_754[i][j] : 87C07EB1 +index = [1][0] +...checksum after hashing g_754[i][j] : DC92BD3E +index = [1][1] +...checksum after hashing g_754[i][j] : 11BF70F4 +index = [1][2] +...checksum after hashing g_754[i][j] : CDE0C35C +index = [1][3] +...checksum after hashing g_754[i][j] : 22D4C275 +index = [1][4] +...checksum after hashing g_754[i][j] : C4B5846F +index = [1][5] +...checksum after hashing g_754[i][j] : BA89DF4D +index = [1][6] +...checksum after hashing g_754[i][j] : A5139CEA +index = [1][7] +...checksum after hashing g_754[i][j] : 13604E44 +index = [1][8] +...checksum after hashing g_754[i][j] : B4730B03 +index = [2][0] +...checksum after hashing g_754[i][j] : 49EB0DF9 +index = [2][1] +...checksum after hashing g_754[i][j] : 41E3FD2F +index = [2][2] +...checksum after hashing g_754[i][j] : A83D36BB +index = [2][3] +...checksum after hashing g_754[i][j] : D33D244A +index = [2][4] +...checksum after hashing g_754[i][j] : 84944AA5 +index = [2][5] +...checksum after hashing g_754[i][j] : C20B3E16 +index = [2][6] +...checksum after hashing g_754[i][j] : 4654AD19 +index = [2][7] +...checksum after hashing g_754[i][j] : 242112AA +index = [2][8] +...checksum after hashing g_754[i][j] : B6AA3197 +index = [3][0] +...checksum after hashing g_754[i][j] : ECC10436 +index = [3][1] +...checksum after hashing g_754[i][j] : A9CBA3BF +index = [3][2] +...checksum after hashing g_754[i][j] : 80D31045 +index = [3][3] +...checksum after hashing g_754[i][j] : 7C0C0914 +index = [3][4] +...checksum after hashing g_754[i][j] : 1FE75E4C +index = [3][5] +...checksum after hashing g_754[i][j] : 119C5BF1 +index = [3][6] +...checksum after hashing g_754[i][j] : 623A42E0 +index = [3][7] +...checksum after hashing g_754[i][j] : BA8C7EE2 +index = [3][8] +...checksum after hashing g_754[i][j] : A5D90FE6 +index = [4][0] +...checksum after hashing g_754[i][j] : 911B60BE +index = [4][1] +...checksum after hashing g_754[i][j] : 9B9B7E83 +index = [4][2] +...checksum after hashing g_754[i][j] : CD13FDEB +index = [4][3] +...checksum after hashing g_754[i][j] : B315CEB2 +index = [4][4] +...checksum after hashing g_754[i][j] : 73DCEE69 +index = [4][5] +...checksum after hashing g_754[i][j] : 3B9838A6 +index = [4][6] +...checksum after hashing g_754[i][j] : C1A60C50 +index = [4][7] +...checksum after hashing g_754[i][j] : 4FD1A7F6 +index = [4][8] +...checksum after hashing g_754[i][j] : 3A38E41B +index = [5][0] +...checksum after hashing g_754[i][j] : 6775DDFD +index = [5][1] +...checksum after hashing g_754[i][j] : 701CF513 +index = [5][2] +...checksum after hashing g_754[i][j] : DE29DD52 +index = [5][3] +...checksum after hashing g_754[i][j] : 4A3516E5 +index = [5][4] +...checksum after hashing g_754[i][j] : F779D3E0 +index = [5][5] +...checksum after hashing g_754[i][j] : BEDFB841 +index = [5][6] +...checksum after hashing g_754[i][j] : 49D1C03C +index = [5][7] +...checksum after hashing g_754[i][j] : 2589644A +index = [5][8] +...checksum after hashing g_754[i][j] : 2170623A +index = [6][0] +...checksum after hashing g_754[i][j] : 28867E75 +index = [6][1] +...checksum after hashing g_754[i][j] : 5A3D6681 +index = [6][2] +...checksum after hashing g_754[i][j] : 61112EE1 +index = [6][3] +...checksum after hashing g_754[i][j] : BE3128FE +index = [6][4] +...checksum after hashing g_754[i][j] : 802838E5 +index = [6][5] +...checksum after hashing g_754[i][j] : 4177FFB8 +index = [6][6] +...checksum after hashing g_754[i][j] : 8CB6DB38 +index = [6][7] +...checksum after hashing g_754[i][j] : 7B2A74D3 +index = [6][8] +...checksum after hashing g_768 : C05976A8 +...checksum after hashing g_1005[i] : 5D672693 +index = [0] +...checksum after hashing g_1005[i] : D98A8307 +index = [1] +before stmt(663): checksum = D98A8307 +...checksum after hashing g_2 : C55C709 +...checksum after hashing g_129 : 729D5BE9 +...checksum after hashing g_161 : 4E3BF249 +...checksum after hashing g_176 : 74EAE740 +...checksum after hashing g_180 : 778D54E7 +...checksum after hashing g_188[i][j] : 53A08D86 +index = [0][0] +...checksum after hashing g_188[i][j] : E44265EA +index = [0][1] +...checksum after hashing g_188[i][j] : EF0D00B3 +index = [0][2] +...checksum after hashing g_188[i][j] : AB98BFCC +index = [0][3] +...checksum after hashing g_188[i][j] : 988BB298 +index = [0][4] +...checksum after hashing g_188[i][j] : B9C966DF +index = [0][5] +...checksum after hashing g_188[i][j] : A9190980 +index = [1][0] +...checksum after hashing g_188[i][j] : 4F7A8799 +index = [1][1] +...checksum after hashing g_188[i][j] : 6A7ACD94 +index = [1][2] +...checksum after hashing g_188[i][j] : F2A6B5C6 +index = [1][3] +...checksum after hashing g_188[i][j] : A9D32507 +index = [1][4] +...checksum after hashing g_188[i][j] : 870AEE3E +index = [1][5] +...checksum after hashing g_188[i][j] : 94AFCC3 +index = [2][0] +...checksum after hashing g_188[i][j] : 32946C0E +index = [2][1] +...checksum after hashing g_188[i][j] : 113F82B +index = [2][2] +...checksum after hashing g_188[i][j] : FB48A44F +index = [2][3] +...checksum after hashing g_188[i][j] : 9D477337 +index = [2][4] +...checksum after hashing g_188[i][j] : 2B89FF36 +index = [2][5] +...checksum after hashing g_188[i][j] : 1ED43920 +index = [3][0] +...checksum after hashing g_188[i][j] : D2BF420 +index = [3][1] +...checksum after hashing g_188[i][j] : 67C55624 +index = [3][2] +...checksum after hashing g_188[i][j] : 37E6287 +index = [3][3] +...checksum after hashing g_188[i][j] : 81E6B477 +index = [3][4] +...checksum after hashing g_188[i][j] : 8760F629 +index = [3][5] +...checksum after hashing g_188[i][j] : 49A3E200 +index = [4][0] +...checksum after hashing g_188[i][j] : B9B4AAA9 +index = [4][1] +...checksum after hashing g_188[i][j] : AB634D6F +index = [4][2] +...checksum after hashing g_188[i][j] : 359764DE +index = [4][3] +...checksum after hashing g_188[i][j] : 736855D1 +index = [4][4] +...checksum after hashing g_188[i][j] : B1F32C92 +index = [4][5] +...checksum after hashing g_254 : B37388E1 +...checksum after hashing g_274 : 13A2FCB5 +...checksum after hashing g_286 : FFA0232A +...checksum after hashing g_307 : ECACCBFC +...checksum after hashing g_314 : 5BB72F7 +...checksum after hashing g_316 : 8C2D925C +...checksum after hashing g_336[i][j] : 9E63C411 +index = [0][0] +...checksum after hashing g_336[i][j] : ABE533EF +index = [0][1] +...checksum after hashing g_336[i][j] : EF37FA1F +index = [1][0] +...checksum after hashing g_336[i][j] : 9C1A55BC +index = [1][1] +...checksum after hashing g_336[i][j] : 514CB5BC +index = [2][0] +...checksum after hashing g_336[i][j] : 5810171C +index = [2][1] +...checksum after hashing g_336[i][j] : 9DF1B34 +index = [3][0] +...checksum after hashing g_336[i][j] : 9CC7F9BD +index = [3][1] +...checksum after hashing g_336[i][j] : D04CD8F +index = [4][0] +...checksum after hashing g_336[i][j] : BA11A169 +index = [4][1] +...checksum after hashing g_336[i][j] : C3F27B2D +index = [5][0] +...checksum after hashing g_336[i][j] : A29A5BC9 +index = [5][1] +...checksum after hashing g_336[i][j] : FDD14DF8 +index = [6][0] +...checksum after hashing g_336[i][j] : EC3EE18A +index = [6][1] +...checksum after hashing g_336[i][j] : E7B6D497 +index = [7][0] +...checksum after hashing g_336[i][j] : AA6781BA +index = [7][1] +...checksum after hashing g_336[i][j] : AB8CE5AE +index = [8][0] +...checksum after hashing g_336[i][j] : 582E6AF4 +index = [8][1] +...checksum after hashing g_344 : 18B8C8FC +...checksum after hashing g_347[i][j] : F5846A78 +index = [0][0] +...checksum after hashing g_347[i][j] : E00B2520 +index = [0][1] +...checksum after hashing g_347[i][j] : A8742371 +index = [0][2] +...checksum after hashing g_347[i][j] : E32E1011 +index = [0][3] +...checksum after hashing g_347[i][j] : C72742A4 +index = [0][4] +...checksum after hashing g_347[i][j] : 42ABE29F +index = [0][5] +...checksum after hashing g_347[i][j] : 9BC4DB62 +index = [0][6] +...checksum after hashing g_347[i][j] : 414005A6 +index = [0][7] +...checksum after hashing g_347[i][j] : EA5789C6 +index = [0][8] +...checksum after hashing g_347[i][j] : 911FE959 +index = [1][0] +...checksum after hashing g_347[i][j] : C39CBE32 +index = [1][1] +...checksum after hashing g_347[i][j] : 3F4586DB +index = [1][2] +...checksum after hashing g_347[i][j] : B67D77AE +index = [1][3] +...checksum after hashing g_347[i][j] : 45396A21 +index = [1][4] +...checksum after hashing g_347[i][j] : 79856E1D +index = [1][5] +...checksum after hashing g_347[i][j] : 8EB7A73E +index = [1][6] +...checksum after hashing g_347[i][j] : F4BFEA56 +index = [1][7] +...checksum after hashing g_347[i][j] : E6A0B28D +index = [1][8] +...checksum after hashing g_347[i][j] : A77F0745 +index = [2][0] +...checksum after hashing g_347[i][j] : D0685581 +index = [2][1] +...checksum after hashing g_347[i][j] : 615B3D89 +index = [2][2] +...checksum after hashing g_347[i][j] : 46E0E25A +index = [2][3] +...checksum after hashing g_347[i][j] : CEB79781 +index = [2][4] +...checksum after hashing g_347[i][j] : 569878F6 +index = [2][5] +...checksum after hashing g_347[i][j] : C3DFEF80 +index = [2][6] +...checksum after hashing g_347[i][j] : D2D2D305 +index = [2][7] +...checksum after hashing g_347[i][j] : 16FC5CC9 +index = [2][8] +...checksum after hashing g_347[i][j] : BBC6D5C1 +index = [3][0] +...checksum after hashing g_347[i][j] : 1D58DC0D +index = [3][1] +...checksum after hashing g_347[i][j] : 12A39CFB +index = [3][2] +...checksum after hashing g_347[i][j] : 4A05F629 +index = [3][3] +...checksum after hashing g_347[i][j] : 86ADD8DD +index = [3][4] +...checksum after hashing g_347[i][j] : 64AF3168 +index = [3][5] +...checksum after hashing g_347[i][j] : B9DB3EEC +index = [3][6] +...checksum after hashing g_347[i][j] : FBD5999F +index = [3][7] +...checksum after hashing g_347[i][j] : B4FF5BB4 +index = [3][8] +...checksum after hashing g_347[i][j] : 34292A02 +index = [4][0] +...checksum after hashing g_347[i][j] : 63D9D89A +index = [4][1] +...checksum after hashing g_347[i][j] : A018180B +index = [4][2] +...checksum after hashing g_347[i][j] : 801F601 +index = [4][3] +...checksum after hashing g_347[i][j] : 1F95BAB4 +index = [4][4] +...checksum after hashing g_347[i][j] : F79E01B4 +index = [4][5] +...checksum after hashing g_347[i][j] : 5E691811 +index = [4][6] +...checksum after hashing g_347[i][j] : 5B84D656 +index = [4][7] +...checksum after hashing g_347[i][j] : B10AFF38 +index = [4][8] +...checksum after hashing g_347[i][j] : 5476374A +index = [5][0] +...checksum after hashing g_347[i][j] : 5916B8A8 +index = [5][1] +...checksum after hashing g_347[i][j] : 3883F132 +index = [5][2] +...checksum after hashing g_347[i][j] : 4F70E2A2 +index = [5][3] +...checksum after hashing g_347[i][j] : 85F89B77 +index = [5][4] +...checksum after hashing g_347[i][j] : 6A60033B +index = [5][5] +...checksum after hashing g_347[i][j] : EC5649D8 +index = [5][6] +...checksum after hashing g_347[i][j] : 400ECBC1 +index = [5][7] +...checksum after hashing g_347[i][j] : CE6AAF2B +index = [5][8] +...checksum after hashing g_347[i][j] : DF21E681 +index = [6][0] +...checksum after hashing g_347[i][j] : FB811F93 +index = [6][1] +...checksum after hashing g_347[i][j] : C5461B6E +index = [6][2] +...checksum after hashing g_347[i][j] : 1F5FAA64 +index = [6][3] +...checksum after hashing g_347[i][j] : D1209F4C +index = [6][4] +...checksum after hashing g_347[i][j] : 6FA40EBD +index = [6][5] +...checksum after hashing g_347[i][j] : F340D5A9 +index = [6][6] +...checksum after hashing g_347[i][j] : F614F58E +index = [6][7] +...checksum after hashing g_347[i][j] : B1C7C3B8 +index = [6][8] +...checksum after hashing g_347[i][j] : EA0A3486 +index = [7][0] +...checksum after hashing g_347[i][j] : C898FF3E +index = [7][1] +...checksum after hashing g_347[i][j] : F775C218 +index = [7][2] +...checksum after hashing g_347[i][j] : EFEF6F2B +index = [7][3] +...checksum after hashing g_347[i][j] : DC4BDF28 +index = [7][4] +...checksum after hashing g_347[i][j] : 53C22DF8 +index = [7][5] +...checksum after hashing g_347[i][j] : 794935B9 +index = [7][6] +...checksum after hashing g_347[i][j] : D340A3C6 +index = [7][7] +...checksum after hashing g_347[i][j] : 1285AD7F +index = [7][8] +...checksum after hashing g_349 : 60C253B5 +...checksum after hashing g_350 : 3809F518 +...checksum after hashing g_353 : D0862DED +...checksum after hashing g_358 : 431946EA +...checksum after hashing g_359 : 5930EB9 +...checksum after hashing g_387 : 61A6DE50 +...checksum after hashing g_391 : 3261BA9C +...checksum after hashing g_404 : 88A7632D +...checksum after hashing g_405[i][j] : ECA97BBB +index = [0][0] +...checksum after hashing g_405[i][j] : B2EBBFC4 +index = [0][1] +...checksum after hashing g_405[i][j] : 1B219897 +index = [0][2] +...checksum after hashing g_405[i][j] : 2328B447 +index = [0][3] +...checksum after hashing g_405[i][j] : CDEBB18D +index = [0][4] +...checksum after hashing g_405[i][j] : 3719CE87 +index = [0][5] +...checksum after hashing g_405[i][j] : 3E4761C2 +index = [1][0] +...checksum after hashing g_405[i][j] : 1D4D1BEE +index = [1][1] +...checksum after hashing g_405[i][j] : B4EB8767 +index = [1][2] +...checksum after hashing g_405[i][j] : C548C710 +index = [1][3] +...checksum after hashing g_405[i][j] : E1127C75 +index = [1][4] +...checksum after hashing g_405[i][j] : 1A1AC3CB +index = [1][5] +...checksum after hashing g_433 : 1D7CA3EB +...checksum after hashing g_474 : A334C75A +...checksum after hashing g_540 : D069C45B +...checksum after hashing g_554 : 3789E36A +...checksum after hashing g_562 : C092FFB3 +...checksum after hashing g_580 : 19D19719 +...checksum after hashing g_619 : 95960D5B +...checksum after hashing g_633 : 2A52E9DE +...checksum after hashing g_635[i][j] : CCCF0A68 +index = [0][0] +...checksum after hashing g_635[i][j] : D2F4C6CD +index = [0][1] +...checksum after hashing g_635[i][j] : F6499285 +index = [0][2] +...checksum after hashing g_635[i][j] : AE34501F +index = [0][3] +...checksum after hashing g_635[i][j] : 11C3CD8C +index = [0][4] +...checksum after hashing g_635[i][j] : 4BDE7102 +index = [1][0] +...checksum after hashing g_635[i][j] : FECE6388 +index = [1][1] +...checksum after hashing g_635[i][j] : 9241179B +index = [1][2] +...checksum after hashing g_635[i][j] : 7B0A8691 +index = [1][3] +...checksum after hashing g_635[i][j] : 223D7820 +index = [1][4] +...checksum after hashing g_754[i][j] : 7E1AD156 +index = [0][0] +...checksum after hashing g_754[i][j] : FAA8B9CF +index = [0][1] +...checksum after hashing g_754[i][j] : DFC8F26E +index = [0][2] +...checksum after hashing g_754[i][j] : E10E0DF4 +index = [0][3] +...checksum after hashing g_754[i][j] : C31FFA54 +index = [0][4] +...checksum after hashing g_754[i][j] : 9402477 +index = [0][5] +...checksum after hashing g_754[i][j] : 7A4256A8 +index = [0][6] +...checksum after hashing g_754[i][j] : 193CC1DA +index = [0][7] +...checksum after hashing g_754[i][j] : 57E4CCCC +index = [0][8] +...checksum after hashing g_754[i][j] : 507182FF +index = [1][0] +...checksum after hashing g_754[i][j] : FEEEC00A +index = [1][1] +...checksum after hashing g_754[i][j] : 6435931F +index = [1][2] +...checksum after hashing g_754[i][j] : 86399EEE +index = [1][3] +...checksum after hashing g_754[i][j] : 403F1FC9 +index = [1][4] +...checksum after hashing g_754[i][j] : 876F97D +index = [1][5] +...checksum after hashing g_754[i][j] : 6EB5B14C +index = [1][6] +...checksum after hashing g_754[i][j] : ADAB7297 +index = [1][7] +...checksum after hashing g_754[i][j] : B8E672D +index = [1][8] +...checksum after hashing g_754[i][j] : 165088D1 +index = [2][0] +...checksum after hashing g_754[i][j] : A0B46C97 +index = [2][1] +...checksum after hashing g_754[i][j] : 37FAC74F +index = [2][2] +...checksum after hashing g_754[i][j] : 9881DCEF +index = [2][3] +...checksum after hashing g_754[i][j] : 5D8E38D1 +index = [2][4] +...checksum after hashing g_754[i][j] : 3E012548 +index = [2][5] +...checksum after hashing g_754[i][j] : 82170F23 +index = [2][6] +...checksum after hashing g_754[i][j] : 34A336E0 +index = [2][7] +...checksum after hashing g_754[i][j] : CBFF7BFC +index = [2][8] +...checksum after hashing g_754[i][j] : 30C4863E +index = [3][0] +...checksum after hashing g_754[i][j] : E316DA10 +index = [3][1] +...checksum after hashing g_754[i][j] : F543052E +index = [3][2] +...checksum after hashing g_754[i][j] : C95DB8CA +index = [3][3] +...checksum after hashing g_754[i][j] : B45DEF50 +index = [3][4] +...checksum after hashing g_754[i][j] : 90E11BA3 +index = [3][5] +...checksum after hashing g_754[i][j] : C28C7C83 +index = [3][6] +...checksum after hashing g_754[i][j] : CB16EBAD +index = [3][7] +...checksum after hashing g_754[i][j] : 9360E80F +index = [3][8] +...checksum after hashing g_754[i][j] : C82B76CD +index = [4][0] +...checksum after hashing g_754[i][j] : A8818584 +index = [4][1] +...checksum after hashing g_754[i][j] : 7F8F9E95 +index = [4][2] +...checksum after hashing g_754[i][j] : 984AD43C +index = [4][3] +...checksum after hashing g_754[i][j] : 4F72719B +index = [4][4] +...checksum after hashing g_754[i][j] : FE53F4A7 +index = [4][5] +...checksum after hashing g_754[i][j] : 93A9FC2C +index = [4][6] +...checksum after hashing g_754[i][j] : CBB448FB +index = [4][7] +...checksum after hashing g_754[i][j] : 3A098523 +index = [4][8] +...checksum after hashing g_754[i][j] : 79F5F59A +index = [5][0] +...checksum after hashing g_754[i][j] : BEF57CCD +index = [5][1] +...checksum after hashing g_754[i][j] : 9C01C8DE +index = [5][2] +...checksum after hashing g_754[i][j] : 206D5F05 +index = [5][3] +...checksum after hashing g_754[i][j] : 304EBB0A +index = [5][4] +...checksum after hashing g_754[i][j] : D4DE74A2 +index = [5][5] +...checksum after hashing g_754[i][j] : 10D4384E +index = [5][6] +...checksum after hashing g_754[i][j] : 221D9CCE +index = [5][7] +...checksum after hashing g_754[i][j] : D16F4D20 +index = [5][8] +...checksum after hashing g_754[i][j] : F0836A5D +index = [6][0] +...checksum after hashing g_754[i][j] : 4E21B04B +index = [6][1] +...checksum after hashing g_754[i][j] : 946FBC1A +index = [6][2] +...checksum after hashing g_754[i][j] : 7F1F28C3 +index = [6][3] +...checksum after hashing g_754[i][j] : D40B2314 +index = [6][4] +...checksum after hashing g_754[i][j] : BD712067 +index = [6][5] +...checksum after hashing g_754[i][j] : 2703D9CC +index = [6][6] +...checksum after hashing g_754[i][j] : BBA9AE3E +index = [6][7] +...checksum after hashing g_754[i][j] : 799C2A25 +index = [6][8] +...checksum after hashing g_768 : 59E7547B +...checksum after hashing g_1005[i] : A1DA0ABC +index = [0] +...checksum after hashing g_1005[i] : F5ECED29 +index = [1] +before stmt(664): checksum = F5ECED29 +...checksum after hashing g_2 : C55C709 +...checksum after hashing g_129 : 9B01CDD0 +...checksum after hashing g_161 : 3EA41EEA +...checksum after hashing g_176 : 2D109F86 +...checksum after hashing g_180 : 82AD3CB2 +...checksum after hashing g_188[i][j] : B1E4CABF +index = [0][0] +...checksum after hashing g_188[i][j] : C6A540D1 +index = [0][1] +...checksum after hashing g_188[i][j] : 32FEDFD7 +index = [0][2] +...checksum after hashing g_188[i][j] : 5EFAB182 +index = [0][3] +...checksum after hashing g_188[i][j] : 73C2BF2A +index = [0][4] +...checksum after hashing g_188[i][j] : 1009BC21 +index = [0][5] +...checksum after hashing g_188[i][j] : 2B4E14F0 +index = [1][0] +...checksum after hashing g_188[i][j] : C6F73EB9 +index = [1][1] +...checksum after hashing g_188[i][j] : 1A8E7AB7 +index = [1][2] +...checksum after hashing g_188[i][j] : A0E50806 +index = [1][3] +...checksum after hashing g_188[i][j] : 4C298A5C +index = [1][4] +...checksum after hashing g_188[i][j] : 77116300 +index = [1][5] +...checksum after hashing g_188[i][j] : E4D8C204 +index = [2][0] +...checksum after hashing g_188[i][j] : 6A370476 +index = [2][1] +...checksum after hashing g_188[i][j] : 9C6DC2C +index = [2][2] +...checksum after hashing g_188[i][j] : AB4FCBA2 +index = [2][3] +...checksum after hashing g_188[i][j] : DEF3A1FC +index = [2][4] +...checksum after hashing g_188[i][j] : 6BB40CF9 +index = [2][5] +...checksum after hashing g_188[i][j] : 9B4C03D7 +index = [3][0] +...checksum after hashing g_188[i][j] : 1B2CCDC5 +index = [3][1] +...checksum after hashing g_188[i][j] : 164B1AA7 +index = [3][2] +...checksum after hashing g_188[i][j] : 710FB99 +index = [3][3] +...checksum after hashing g_188[i][j] : 3FF19594 +index = [3][4] +...checksum after hashing g_188[i][j] : 537F2E35 +index = [3][5] +...checksum after hashing g_188[i][j] : 9C1276FC +index = [4][0] +...checksum after hashing g_188[i][j] : 8479AA38 +index = [4][1] +...checksum after hashing g_188[i][j] : 88A32EBC +index = [4][2] +...checksum after hashing g_188[i][j] : 227AA1EC +index = [4][3] +...checksum after hashing g_188[i][j] : D62D3936 +index = [4][4] +...checksum after hashing g_188[i][j] : 90248B70 +index = [4][5] +...checksum after hashing g_254 : 91220931 +...checksum after hashing g_274 : A3C1196A +...checksum after hashing g_286 : AB0F1346 +...checksum after hashing g_307 : FCAE531C +...checksum after hashing g_314 : F45A861 +...checksum after hashing g_316 : FEF2B9EF +...checksum after hashing g_336[i][j] : 1D1745A4 +index = [0][0] +...checksum after hashing g_336[i][j] : 5E5C9298 +index = [0][1] +...checksum after hashing g_336[i][j] : 39B5460F +index = [1][0] +...checksum after hashing g_336[i][j] : 6642887F +index = [1][1] +...checksum after hashing g_336[i][j] : 9FEF9E69 +index = [2][0] +...checksum after hashing g_336[i][j] : 8474F72B +index = [2][1] +...checksum after hashing g_336[i][j] : 43353BD0 +index = [3][0] +...checksum after hashing g_336[i][j] : CF0FDADA +index = [3][1] +...checksum after hashing g_336[i][j] : 60BFA784 +index = [4][0] +...checksum after hashing g_336[i][j] : 1C620208 +index = [4][1] +...checksum after hashing g_336[i][j] : A0F1249A +index = [5][0] +...checksum after hashing g_336[i][j] : BA492746 +index = [5][1] +...checksum after hashing g_336[i][j] : AC79742B +index = [6][0] +...checksum after hashing g_336[i][j] : 89D77E61 +index = [6][1] +...checksum after hashing g_336[i][j] : A2E33011 +index = [7][0] +...checksum after hashing g_336[i][j] : DC40C2F +index = [7][1] +...checksum after hashing g_336[i][j] : 567A58A +index = [8][0] +...checksum after hashing g_336[i][j] : 8B007B95 +index = [8][1] +...checksum after hashing g_344 : 921B1B9F +...checksum after hashing g_347[i][j] : DB9F3CE8 +index = [0][0] +...checksum after hashing g_347[i][j] : 409A50D3 +index = [0][1] +...checksum after hashing g_347[i][j] : D0112830 +index = [0][2] +...checksum after hashing g_347[i][j] : 8A87A644 +index = [0][3] +...checksum after hashing g_347[i][j] : B18CE1CA +index = [0][4] +...checksum after hashing g_347[i][j] : B6F930BD +index = [0][5] +...checksum after hashing g_347[i][j] : 2DAF545A +index = [0][6] +...checksum after hashing g_347[i][j] : 3ABD2D80 +index = [0][7] +...checksum after hashing g_347[i][j] : 3F955938 +index = [0][8] +...checksum after hashing g_347[i][j] : 755A2E6A +index = [1][0] +...checksum after hashing g_347[i][j] : 9F8BF499 +index = [1][1] +...checksum after hashing g_347[i][j] : BF7C8980 +index = [1][2] +...checksum after hashing g_347[i][j] : 4211B6AA +index = [1][3] +...checksum after hashing g_347[i][j] : 29AE13AF +index = [1][4] +...checksum after hashing g_347[i][j] : 5527CD64 +index = [1][5] +...checksum after hashing g_347[i][j] : ED571999 +index = [1][6] +...checksum after hashing g_347[i][j] : 6106DBFE +index = [1][7] +...checksum after hashing g_347[i][j] : FEB47EFA +index = [1][8] +...checksum after hashing g_347[i][j] : F4E0BF47 +index = [2][0] +...checksum after hashing g_347[i][j] : B597A439 +index = [2][1] +...checksum after hashing g_347[i][j] : A3672ABE +index = [2][2] +...checksum after hashing g_347[i][j] : 34EC4DD4 +index = [2][3] +...checksum after hashing g_347[i][j] : 3AB13C8 +index = [2][4] +...checksum after hashing g_347[i][j] : 551A3F4D +index = [2][5] +...checksum after hashing g_347[i][j] : ECC5162D +index = [2][6] +...checksum after hashing g_347[i][j] : CC3A9D00 +index = [2][7] +...checksum after hashing g_347[i][j] : 378E48B6 +index = [2][8] +...checksum after hashing g_347[i][j] : C2D5658D +index = [3][0] +...checksum after hashing g_347[i][j] : 41F24D92 +index = [3][1] +...checksum after hashing g_347[i][j] : 3D64F672 +index = [3][2] +...checksum after hashing g_347[i][j] : B07E3DBE +index = [3][3] +...checksum after hashing g_347[i][j] : AA63C35E +index = [3][4] +...checksum after hashing g_347[i][j] : EC91F20F +index = [3][5] +...checksum after hashing g_347[i][j] : 2E65C920 +index = [3][6] +...checksum after hashing g_347[i][j] : 63E828A5 +index = [3][7] +...checksum after hashing g_347[i][j] : 7BC9849E +index = [3][8] +...checksum after hashing g_347[i][j] : FFB45901 +index = [4][0] +...checksum after hashing g_347[i][j] : EF824E12 +index = [4][1] +...checksum after hashing g_347[i][j] : CC2A0909 +index = [4][2] +...checksum after hashing g_347[i][j] : 16988ECF +index = [4][3] +...checksum after hashing g_347[i][j] : 89691659 +index = [4][4] +...checksum after hashing g_347[i][j] : A28CA495 +index = [4][5] +...checksum after hashing g_347[i][j] : FAA19A69 +index = [4][6] +...checksum after hashing g_347[i][j] : C526AB7C +index = [4][7] +...checksum after hashing g_347[i][j] : A92A2B49 +index = [4][8] +...checksum after hashing g_347[i][j] : 8B9DD1AB +index = [5][0] +...checksum after hashing g_347[i][j] : 315CD785 +index = [5][1] +...checksum after hashing g_347[i][j] : 60AF4429 +index = [5][2] +...checksum after hashing g_347[i][j] : 577CBCAF +index = [5][3] +...checksum after hashing g_347[i][j] : AE69974A +index = [5][4] +...checksum after hashing g_347[i][j] : A5DD9838 +index = [5][5] +...checksum after hashing g_347[i][j] : 5515BEF3 +index = [5][6] +...checksum after hashing g_347[i][j] : EE5F9145 +index = [5][7] +...checksum after hashing g_347[i][j] : 5FB4C7DB +index = [5][8] +...checksum after hashing g_347[i][j] : 873021FD +index = [6][0] +...checksum after hashing g_347[i][j] : 78E17AA4 +index = [6][1] +...checksum after hashing g_347[i][j] : F7EA6B80 +index = [6][2] +...checksum after hashing g_347[i][j] : B76B565A +index = [6][3] +...checksum after hashing g_347[i][j] : 1E2D4247 +index = [6][4] +...checksum after hashing g_347[i][j] : 83818EB3 +index = [6][5] +...checksum after hashing g_347[i][j] : B3E5C7AE +index = [6][6] +...checksum after hashing g_347[i][j] : D1CDB315 +index = [6][7] +...checksum after hashing g_347[i][j] : 5A619F52 +index = [6][8] +...checksum after hashing g_347[i][j] : F9EB6291 +index = [7][0] +...checksum after hashing g_347[i][j] : AEBC4169 +index = [7][1] +...checksum after hashing g_347[i][j] : 3B5603D2 +index = [7][2] +...checksum after hashing g_347[i][j] : 4A0964C4 +index = [7][3] +...checksum after hashing g_347[i][j] : F09A62AA +index = [7][4] +...checksum after hashing g_347[i][j] : 73EFA6B6 +index = [7][5] +...checksum after hashing g_347[i][j] : F4A694F1 +index = [7][6] +...checksum after hashing g_347[i][j] : 1FB5F4FD +index = [7][7] +...checksum after hashing g_347[i][j] : A7457189 +index = [7][8] +...checksum after hashing g_349 : 37AD46D7 +...checksum after hashing g_350 : A4A11834 +...checksum after hashing g_353 : 43F9716 +...checksum after hashing g_358 : 6E0EAFB6 +...checksum after hashing g_359 : 62278D6F +...checksum after hashing g_387 : D295028B +...checksum after hashing g_391 : E1A4CF56 +...checksum after hashing g_404 : 6A3A6791 +...checksum after hashing g_405[i][j] : 36EF5546 +index = [0][0] +...checksum after hashing g_405[i][j] : 3411C91D +index = [0][1] +...checksum after hashing g_405[i][j] : FA895544 +index = [0][2] +...checksum after hashing g_405[i][j] : 3F6D432C +index = [0][3] +...checksum after hashing g_405[i][j] : 84843D5 +index = [0][4] +...checksum after hashing g_405[i][j] : E1C49761 +index = [0][5] +...checksum after hashing g_405[i][j] : F518A6AA +index = [1][0] +...checksum after hashing g_405[i][j] : 46AA1E64 +index = [1][1] +...checksum after hashing g_405[i][j] : DD42FE84 +index = [1][2] +...checksum after hashing g_405[i][j] : 1109A445 +index = [1][3] +...checksum after hashing g_405[i][j] : 3F8C9E15 +index = [1][4] +...checksum after hashing g_405[i][j] : 5F36841 +index = [1][5] +...checksum after hashing g_433 : 48010265 +...checksum after hashing g_474 : F79893C5 +...checksum after hashing g_540 : 304BD5CD +...checksum after hashing g_554 : B5FE300D +...checksum after hashing g_562 : 8A64B65D +...checksum after hashing g_580 : 84D5F9E8 +...checksum after hashing g_619 : 3D7B04E +...checksum after hashing g_633 : 701D6B05 +...checksum after hashing g_635[i][j] : 2374103E +index = [0][0] +...checksum after hashing g_635[i][j] : 1AA7388F +index = [0][1] +...checksum after hashing g_635[i][j] : 7C2718FC +index = [0][2] +...checksum after hashing g_635[i][j] : A2B20D48 +index = [0][3] +...checksum after hashing g_635[i][j] : 47123492 +index = [0][4] +...checksum after hashing g_635[i][j] : 5B26196E +index = [1][0] +...checksum after hashing g_635[i][j] : 828CA7A +index = [1][1] +...checksum after hashing g_635[i][j] : 347DAC1B +index = [1][2] +...checksum after hashing g_635[i][j] : 131E5E79 +index = [1][3] +...checksum after hashing g_635[i][j] : DFAB4B40 +index = [1][4] +...checksum after hashing g_754[i][j] : 8706DEA1 +index = [0][0] +...checksum after hashing g_754[i][j] : C853C709 +index = [0][1] +...checksum after hashing g_754[i][j] : ED1E6F18 +index = [0][2] +...checksum after hashing g_754[i][j] : 4524EA0E +index = [0][3] +...checksum after hashing g_754[i][j] : 38B9616B +index = [0][4] +...checksum after hashing g_754[i][j] : 827CAB6A +index = [0][5] +...checksum after hashing g_754[i][j] : 3BC1A600 +index = [0][6] +...checksum after hashing g_754[i][j] : 3552396E +index = [0][7] +...checksum after hashing g_754[i][j] : B7851DA3 +index = [0][8] +...checksum after hashing g_754[i][j] : 63938233 +index = [1][0] +...checksum after hashing g_754[i][j] : 11ED61CC +index = [1][1] +...checksum after hashing g_754[i][j] : F431B9B8 +index = [1][2] +...checksum after hashing g_754[i][j] : F73C2A24 +index = [1][3] +...checksum after hashing g_754[i][j] : C1EDF288 +index = [1][4] +...checksum after hashing g_754[i][j] : A35591FD +index = [1][5] +...checksum after hashing g_754[i][j] : 3A8590EE +index = [1][6] +...checksum after hashing g_754[i][j] : C0062CD0 +index = [1][7] +...checksum after hashing g_754[i][j] : 43C5DB52 +index = [1][8] +...checksum after hashing g_754[i][j] : 82C26003 +index = [2][0] +...checksum after hashing g_754[i][j] : 3F0D2358 +index = [2][1] +...checksum after hashing g_754[i][j] : 37A568C6 +index = [2][2] +...checksum after hashing g_754[i][j] : E7D77E98 +index = [2][3] +...checksum after hashing g_754[i][j] : 5DC1BF85 +index = [2][4] +...checksum after hashing g_754[i][j] : E9F5E372 +index = [2][5] +...checksum after hashing g_754[i][j] : E0C49EDA +index = [2][6] +...checksum after hashing g_754[i][j] : 3AB52BA2 +index = [2][7] +...checksum after hashing g_754[i][j] : 153C43B9 +index = [2][8] +...checksum after hashing g_754[i][j] : 37CAE147 +index = [3][0] +...checksum after hashing g_754[i][j] : B85E508E +index = [3][1] +...checksum after hashing g_754[i][j] : 8067409E +index = [3][2] +...checksum after hashing g_754[i][j] : 73F9DD6E +index = [3][3] +...checksum after hashing g_754[i][j] : D9974BB6 +index = [3][4] +...checksum after hashing g_754[i][j] : BF92D2DA +index = [3][5] +...checksum after hashing g_754[i][j] : E5062936 +index = [3][6] +...checksum after hashing g_754[i][j] : EFAB7CF4 +index = [3][7] +...checksum after hashing g_754[i][j] : B0513276 +index = [3][8] +...checksum after hashing g_754[i][j] : 3A385FFD +index = [4][0] +...checksum after hashing g_754[i][j] : 5D6AD2E8 +index = [4][1] +...checksum after hashing g_754[i][j] : 17D1C2AF +index = [4][2] +...checksum after hashing g_754[i][j] : 52B829D +index = [4][3] +...checksum after hashing g_754[i][j] : 20CCE8E6 +index = [4][4] +...checksum after hashing g_754[i][j] : 328FF066 +index = [4][5] +...checksum after hashing g_754[i][j] : E50ED91B +index = [4][6] +...checksum after hashing g_754[i][j] : C0EEF2CF +index = [4][7] +...checksum after hashing g_754[i][j] : 5A0FFD45 +index = [4][8] +...checksum after hashing g_754[i][j] : 26B2A273 +index = [5][0] +...checksum after hashing g_754[i][j] : 389DDFED +index = [5][1] +...checksum after hashing g_754[i][j] : 4EF24363 +index = [5][2] +...checksum after hashing g_754[i][j] : 75593CA5 +index = [5][3] +...checksum after hashing g_754[i][j] : 979F81FA +index = [5][4] +...checksum after hashing g_754[i][j] : ABD5C056 +index = [5][5] +...checksum after hashing g_754[i][j] : F8C95A14 +index = [5][6] +...checksum after hashing g_754[i][j] : 9C436A10 +index = [5][7] +...checksum after hashing g_754[i][j] : AE4C62B9 +index = [5][8] +...checksum after hashing g_754[i][j] : 7DC9DE62 +index = [6][0] +...checksum after hashing g_754[i][j] : BDA15662 +index = [6][1] +...checksum after hashing g_754[i][j] : FB0DCB51 +index = [6][2] +...checksum after hashing g_754[i][j] : E872FCC6 +index = [6][3] +...checksum after hashing g_754[i][j] : D76D5DC7 +index = [6][4] +...checksum after hashing g_754[i][j] : 7D51EED1 +index = [6][5] +...checksum after hashing g_754[i][j] : 8ACB95D2 +index = [6][6] +...checksum after hashing g_754[i][j] : D9AB7825 +index = [6][7] +...checksum after hashing g_754[i][j] : E60AD1CF +index = [6][8] +...checksum after hashing g_768 : 1E1FCA5F +...checksum after hashing g_1005[i] : 4DDA18A9 +index = [0] +...checksum after hashing g_1005[i] : 243593C9 +index = [1] +before stmt(676): checksum = 243593C9 +...checksum after hashing g_2 : C55C709 +...checksum after hashing g_129 : 9B01CDD0 +...checksum after hashing g_161 : 3EA41EEA +...checksum after hashing g_176 : 2D109F86 +...checksum after hashing g_180 : 82AD3CB2 +...checksum after hashing g_188[i][j] : B1E4CABF +index = [0][0] +...checksum after hashing g_188[i][j] : C6A540D1 +index = [0][1] +...checksum after hashing g_188[i][j] : 32FEDFD7 +index = [0][2] +...checksum after hashing g_188[i][j] : 5EFAB182 +index = [0][3] +...checksum after hashing g_188[i][j] : 73C2BF2A +index = [0][4] +...checksum after hashing g_188[i][j] : 1009BC21 +index = [0][5] +...checksum after hashing g_188[i][j] : 2B4E14F0 +index = [1][0] +...checksum after hashing g_188[i][j] : C6F73EB9 +index = [1][1] +...checksum after hashing g_188[i][j] : 1A8E7AB7 +index = [1][2] +...checksum after hashing g_188[i][j] : A0E50806 +index = [1][3] +...checksum after hashing g_188[i][j] : 4C298A5C +index = [1][4] +...checksum after hashing g_188[i][j] : 77116300 +index = [1][5] +...checksum after hashing g_188[i][j] : E4D8C204 +index = [2][0] +...checksum after hashing g_188[i][j] : 6A370476 +index = [2][1] +...checksum after hashing g_188[i][j] : 9C6DC2C +index = [2][2] +...checksum after hashing g_188[i][j] : AB4FCBA2 +index = [2][3] +...checksum after hashing g_188[i][j] : DEF3A1FC +index = [2][4] +...checksum after hashing g_188[i][j] : 6BB40CF9 +index = [2][5] +...checksum after hashing g_188[i][j] : 9B4C03D7 +index = [3][0] +...checksum after hashing g_188[i][j] : 1B2CCDC5 +index = [3][1] +...checksum after hashing g_188[i][j] : 164B1AA7 +index = [3][2] +...checksum after hashing g_188[i][j] : 710FB99 +index = [3][3] +...checksum after hashing g_188[i][j] : 3FF19594 +index = [3][4] +...checksum after hashing g_188[i][j] : 537F2E35 +index = [3][5] +...checksum after hashing g_188[i][j] : 9C1276FC +index = [4][0] +...checksum after hashing g_188[i][j] : 8479AA38 +index = [4][1] +...checksum after hashing g_188[i][j] : 88A32EBC +index = [4][2] +...checksum after hashing g_188[i][j] : 227AA1EC +index = [4][3] +...checksum after hashing g_188[i][j] : D62D3936 +index = [4][4] +...checksum after hashing g_188[i][j] : 90248B70 +index = [4][5] +...checksum after hashing g_254 : 91220931 +...checksum after hashing g_274 : A3C1196A +...checksum after hashing g_286 : AB0F1346 +...checksum after hashing g_307 : FCAE531C +...checksum after hashing g_314 : F45A861 +...checksum after hashing g_316 : 44D51D4D +...checksum after hashing g_336[i][j] : D5758961 +index = [0][0] +...checksum after hashing g_336[i][j] : 450EA02F +index = [0][1] +...checksum after hashing g_336[i][j] : 9C17F7E8 +index = [1][0] +...checksum after hashing g_336[i][j] : D3FBECD5 +index = [1][1] +...checksum after hashing g_336[i][j] : 7CEB5606 +index = [2][0] +...checksum after hashing g_336[i][j] : 25E2A140 +index = [2][1] +...checksum after hashing g_336[i][j] : 41E9A732 +index = [3][0] +...checksum after hashing g_336[i][j] : 84F3F9C2 +index = [3][1] +...checksum after hashing g_336[i][j] : 961E16E4 +index = [4][0] +...checksum after hashing g_336[i][j] : 1ABBAD +index = [4][1] +...checksum after hashing g_336[i][j] : E32CA783 +index = [5][0] +...checksum after hashing g_336[i][j] : AF6831F2 +index = [5][1] +...checksum after hashing g_336[i][j] : C780832C +index = [6][0] +...checksum after hashing g_336[i][j] : BB95C1A9 +index = [6][1] +...checksum after hashing g_336[i][j] : D58033D2 +index = [7][0] +...checksum after hashing g_336[i][j] : EBCB2F65 +index = [7][1] +...checksum after hashing g_336[i][j] : 534BEE8 +index = [8][0] +...checksum after hashing g_336[i][j] : 9BCA061B +index = [8][1] +...checksum after hashing g_344 : EF160E34 +...checksum after hashing g_347[i][j] : C002B0BB +index = [0][0] +...checksum after hashing g_347[i][j] : 3F872FC0 +index = [0][1] +...checksum after hashing g_347[i][j] : F2C6FF9D +index = [0][2] +...checksum after hashing g_347[i][j] : A6595615 +index = [0][3] +...checksum after hashing g_347[i][j] : 5A9A7EAF +index = [0][4] +...checksum after hashing g_347[i][j] : 670E4666 +index = [0][5] +...checksum after hashing g_347[i][j] : 26AFEB18 +index = [0][6] +...checksum after hashing g_347[i][j] : 5270DD93 +index = [0][7] +...checksum after hashing g_347[i][j] : F5C092F0 +index = [0][8] +...checksum after hashing g_347[i][j] : E724139D +index = [1][0] +...checksum after hashing g_347[i][j] : 7340A54 +index = [1][1] +...checksum after hashing g_347[i][j] : 19884880 +index = [1][2] +...checksum after hashing g_347[i][j] : 9D1968B9 +index = [1][3] +...checksum after hashing g_347[i][j] : 32A0B6A9 +index = [1][4] +...checksum after hashing g_347[i][j] : BB19E951 +index = [1][5] +...checksum after hashing g_347[i][j] : 13912B34 +index = [1][6] +...checksum after hashing g_347[i][j] : 3E4D840B +index = [1][7] +...checksum after hashing g_347[i][j] : C0B52B49 +index = [1][8] +...checksum after hashing g_347[i][j] : 492A9E82 +index = [2][0] +...checksum after hashing g_347[i][j] : 494E662F +index = [2][1] +...checksum after hashing g_347[i][j] : A0CFA0B2 +index = [2][2] +...checksum after hashing g_347[i][j] : 6D4F0B61 +index = [2][3] +...checksum after hashing g_347[i][j] : CA8D5A68 +index = [2][4] +...checksum after hashing g_347[i][j] : 465C6937 +index = [2][5] +...checksum after hashing g_347[i][j] : A2EBAD8A +index = [2][6] +...checksum after hashing g_347[i][j] : 4FEEC8F6 +index = [2][7] +...checksum after hashing g_347[i][j] : 6F113F17 +index = [2][8] +...checksum after hashing g_347[i][j] : F5D52A2B +index = [3][0] +...checksum after hashing g_347[i][j] : EA8964B9 +index = [3][1] +...checksum after hashing g_347[i][j] : F004797F +index = [3][2] +...checksum after hashing g_347[i][j] : 28556C74 +index = [3][3] +...checksum after hashing g_347[i][j] : 56496FA4 +index = [3][4] +...checksum after hashing g_347[i][j] : E48D2D7 +index = [3][5] +...checksum after hashing g_347[i][j] : EB36E3B4 +index = [3][6] +...checksum after hashing g_347[i][j] : 1E88A5C8 +index = [3][7] +...checksum after hashing g_347[i][j] : 102145B5 +index = [3][8] +...checksum after hashing g_347[i][j] : 542D4C7D +index = [4][0] +...checksum after hashing g_347[i][j] : 35017B9E +index = [4][1] +...checksum after hashing g_347[i][j] : 3FADD7B3 +index = [4][2] +...checksum after hashing g_347[i][j] : B3369521 +index = [4][3] +...checksum after hashing g_347[i][j] : 3982AAC3 +index = [4][4] +...checksum after hashing g_347[i][j] : CADE3B8A +index = [4][5] +...checksum after hashing g_347[i][j] : CF70F4D1 +index = [4][6] +...checksum after hashing g_347[i][j] : 91391B5E +index = [4][7] +...checksum after hashing g_347[i][j] : C713299F +index = [4][8] +...checksum after hashing g_347[i][j] : 2FA82265 +index = [5][0] +...checksum after hashing g_347[i][j] : 63C6267E +index = [5][1] +...checksum after hashing g_347[i][j] : 8B059E20 +index = [5][2] +...checksum after hashing g_347[i][j] : C95A2C50 +index = [5][3] +...checksum after hashing g_347[i][j] : 5916142C +index = [5][4] +...checksum after hashing g_347[i][j] : D39D97B8 +index = [5][5] +...checksum after hashing g_347[i][j] : FA0FD4F9 +index = [5][6] +...checksum after hashing g_347[i][j] : 32E67B75 +index = [5][7] +...checksum after hashing g_347[i][j] : B188E102 +index = [5][8] +...checksum after hashing g_347[i][j] : D4ED5B3C +index = [6][0] +...checksum after hashing g_347[i][j] : 2982A55D +index = [6][1] +...checksum after hashing g_347[i][j] : D8ED19A6 +index = [6][2] +...checksum after hashing g_347[i][j] : 81D7B118 +index = [6][3] +...checksum after hashing g_347[i][j] : 45760F9 +index = [6][4] +...checksum after hashing g_347[i][j] : 6D574D92 +index = [6][5] +...checksum after hashing g_347[i][j] : A8528A0A +index = [6][6] +...checksum after hashing g_347[i][j] : 4A67D247 +index = [6][7] +...checksum after hashing g_347[i][j] : 4145E7C3 +index = [6][8] +...checksum after hashing g_347[i][j] : DD78F5F2 +index = [7][0] +...checksum after hashing g_347[i][j] : 191C8AF9 +index = [7][1] +...checksum after hashing g_347[i][j] : E0EE0111 +index = [7][2] +...checksum after hashing g_347[i][j] : 1068DEAE +index = [7][3] +...checksum after hashing g_347[i][j] : 9B90EC07 +index = [7][4] +...checksum after hashing g_347[i][j] : 7CA01BE +index = [7][5] +...checksum after hashing g_347[i][j] : 52BE9239 +index = [7][6] +...checksum after hashing g_347[i][j] : 156FD022 +index = [7][7] +...checksum after hashing g_347[i][j] : 7D34F2F1 +index = [7][8] +...checksum after hashing g_349 : 2A771800 +...checksum after hashing g_350 : 61D1DBE2 +...checksum after hashing g_353 : 50D81683 +...checksum after hashing g_358 : 795E3F51 +...checksum after hashing g_359 : EDF4948D +...checksum after hashing g_387 : 6A061BAA +...checksum after hashing g_391 : 750B7D95 +...checksum after hashing g_404 : 16E5FB7C +...checksum after hashing g_405[i][j] : B9E069F0 +index = [0][0] +...checksum after hashing g_405[i][j] : DBE646D1 +index = [0][1] +...checksum after hashing g_405[i][j] : 4733D0D4 +index = [0][2] +...checksum after hashing g_405[i][j] : CE29F2E0 +index = [0][3] +...checksum after hashing g_405[i][j] : AEE0CEC7 +index = [0][4] +...checksum after hashing g_405[i][j] : AB52B09A +index = [0][5] +...checksum after hashing g_405[i][j] : 286FE27B +index = [1][0] +...checksum after hashing g_405[i][j] : 37CDA4DC +index = [1][1] +...checksum after hashing g_405[i][j] : C0F35FFD +index = [1][2] +...checksum after hashing g_405[i][j] : 415C8F24 +index = [1][3] +...checksum after hashing g_405[i][j] : 24A95F97 +index = [1][4] +...checksum after hashing g_405[i][j] : B058F38D +index = [1][5] +...checksum after hashing g_433 : 732426EB +...checksum after hashing g_474 : 9CA28532 +...checksum after hashing g_540 : CC9842B8 +...checksum after hashing g_554 : F5DE63D +...checksum after hashing g_562 : 5DD5B2C6 +...checksum after hashing g_580 : CF4EF1F +...checksum after hashing g_619 : 6F315F63 +...checksum after hashing g_633 : CCDBF262 +...checksum after hashing g_635[i][j] : 2830D394 +index = [0][0] +...checksum after hashing g_635[i][j] : A85FBA7E +index = [0][1] +...checksum after hashing g_635[i][j] : 59461FC5 +index = [0][2] +...checksum after hashing g_635[i][j] : 1D3C2247 +index = [0][3] +...checksum after hashing g_635[i][j] : D2BE3EC1 +index = [0][4] +...checksum after hashing g_635[i][j] : DDEA8DA +index = [1][0] +...checksum after hashing g_635[i][j] : C918E4 +index = [1][1] +...checksum after hashing g_635[i][j] : AE51914D +index = [1][2] +...checksum after hashing g_635[i][j] : F8206930 +index = [1][3] +...checksum after hashing g_635[i][j] : 6E8E8F6F +index = [1][4] +...checksum after hashing g_754[i][j] : BD640CA8 +index = [0][0] +...checksum after hashing g_754[i][j] : AA91B94A +index = [0][1] +...checksum after hashing g_754[i][j] : 60A06829 +index = [0][2] +...checksum after hashing g_754[i][j] : E1B31FE4 +index = [0][3] +...checksum after hashing g_754[i][j] : DDCF0A20 +index = [0][4] +...checksum after hashing g_754[i][j] : 23EE9810 +index = [0][5] +...checksum after hashing g_754[i][j] : FBC8C6D7 +index = [0][6] +...checksum after hashing g_754[i][j] : 8CA00A97 +index = [0][7] +...checksum after hashing g_754[i][j] : FEF19750 +index = [0][8] +...checksum after hashing g_754[i][j] : 5FB1E0EA +index = [1][0] +...checksum after hashing g_754[i][j] : 893FB236 +index = [1][1] +...checksum after hashing g_754[i][j] : DFFF78F9 +index = [1][2] +...checksum after hashing g_754[i][j] : BD3CEA8B +index = [1][3] +...checksum after hashing g_754[i][j] : D343C515 +index = [1][4] +...checksum after hashing g_754[i][j] : E66BBBE +index = [1][5] +...checksum after hashing g_754[i][j] : DAF21E6E +index = [1][6] +...checksum after hashing g_754[i][j] : 680A128 +index = [1][7] +...checksum after hashing g_754[i][j] : F6243581 +index = [1][8] +...checksum after hashing g_754[i][j] : E9310E70 +index = [2][0] +...checksum after hashing g_754[i][j] : E13FC0AE +index = [2][1] +...checksum after hashing g_754[i][j] : B317E4E6 +index = [2][2] +...checksum after hashing g_754[i][j] : 93ECB841 +index = [2][3] +...checksum after hashing g_754[i][j] : F865F979 +index = [2][4] +...checksum after hashing g_754[i][j] : 3D859595 +index = [2][5] +...checksum after hashing g_754[i][j] : 55919C82 +index = [2][6] +...checksum after hashing g_754[i][j] : 4B4F3693 +index = [2][7] +...checksum after hashing g_754[i][j] : 8004A4C3 +index = [2][8] +...checksum after hashing g_754[i][j] : 81FBCAA +index = [3][0] +...checksum after hashing g_754[i][j] : B20668EF +index = [3][1] +...checksum after hashing g_754[i][j] : BB325A92 +index = [3][2] +...checksum after hashing g_754[i][j] : 5E590445 +index = [3][3] +...checksum after hashing g_754[i][j] : C7248DAA +index = [3][4] +...checksum after hashing g_754[i][j] : 5981017 +index = [3][5] +...checksum after hashing g_754[i][j] : 2251EFDB +index = [3][6] +...checksum after hashing g_754[i][j] : AE669363 +index = [3][7] +...checksum after hashing g_754[i][j] : 4DF7A4F3 +index = [3][8] +...checksum after hashing g_754[i][j] : 22704878 +index = [4][0] +...checksum after hashing g_754[i][j] : B5487C4F +index = [4][1] +...checksum after hashing g_754[i][j] : 1DE8BF13 +index = [4][2] +...checksum after hashing g_754[i][j] : E0F7EC18 +index = [4][3] +...checksum after hashing g_754[i][j] : 45EFD421 +index = [4][4] +...checksum after hashing g_754[i][j] : 7715D89B +index = [4][5] +...checksum after hashing g_754[i][j] : 2A44D7B6 +index = [4][6] +...checksum after hashing g_754[i][j] : 743C66B3 +index = [4][7] +...checksum after hashing g_754[i][j] : FEFE2245 +index = [4][8] +...checksum after hashing g_754[i][j] : 7C7B6773 +index = [5][0] +...checksum after hashing g_754[i][j] : 3E7F5FAB +index = [5][1] +...checksum after hashing g_754[i][j] : 94936B59 +index = [5][2] +...checksum after hashing g_754[i][j] : C6715214 +index = [5][3] +...checksum after hashing g_754[i][j] : 7F2D02B3 +index = [5][4] +...checksum after hashing g_754[i][j] : D698D448 +index = [5][5] +...checksum after hashing g_754[i][j] : 38434DDD +index = [5][6] +...checksum after hashing g_754[i][j] : D467CC18 +index = [5][7] +...checksum after hashing g_754[i][j] : 3FE24380 +index = [5][8] +...checksum after hashing g_754[i][j] : 7EE9772B +index = [6][0] +...checksum after hashing g_754[i][j] : 81995222 +index = [6][1] +...checksum after hashing g_754[i][j] : 5FE0FBCC +index = [6][2] +...checksum after hashing g_754[i][j] : B958CA7F +index = [6][3] +...checksum after hashing g_754[i][j] : E4F668BF +index = [6][4] +...checksum after hashing g_754[i][j] : DC1F731E +index = [6][5] +...checksum after hashing g_754[i][j] : 9E05B1D4 +index = [6][6] +...checksum after hashing g_754[i][j] : 8C27E778 +index = [6][7] +...checksum after hashing g_754[i][j] : A5158B41 +index = [6][8] +...checksum after hashing g_768 : 503DBE85 +...checksum after hashing g_1005[i] : 611DAB6F +index = [0] +...checksum after hashing g_1005[i] : 6684F30 +index = [1] +before stmt(668): checksum = 6684F30 +...checksum after hashing g_2 : C55C709 +...checksum after hashing g_129 : 9B01CDD0 +...checksum after hashing g_161 : 3EA41EEA +...checksum after hashing g_176 : 2D109F86 +...checksum after hashing g_180 : 82AD3CB2 +...checksum after hashing g_188[i][j] : B1E4CABF +index = [0][0] +...checksum after hashing g_188[i][j] : C6A540D1 +index = [0][1] +...checksum after hashing g_188[i][j] : 32FEDFD7 +index = [0][2] +...checksum after hashing g_188[i][j] : 5EFAB182 +index = [0][3] +...checksum after hashing g_188[i][j] : 73C2BF2A +index = [0][4] +...checksum after hashing g_188[i][j] : 1009BC21 +index = [0][5] +...checksum after hashing g_188[i][j] : 2B4E14F0 +index = [1][0] +...checksum after hashing g_188[i][j] : C6F73EB9 +index = [1][1] +...checksum after hashing g_188[i][j] : 1A8E7AB7 +index = [1][2] +...checksum after hashing g_188[i][j] : A0E50806 +index = [1][3] +...checksum after hashing g_188[i][j] : 4C298A5C +index = [1][4] +...checksum after hashing g_188[i][j] : 77116300 +index = [1][5] +...checksum after hashing g_188[i][j] : E4D8C204 +index = [2][0] +...checksum after hashing g_188[i][j] : 6A370476 +index = [2][1] +...checksum after hashing g_188[i][j] : 9C6DC2C +index = [2][2] +...checksum after hashing g_188[i][j] : AB4FCBA2 +index = [2][3] +...checksum after hashing g_188[i][j] : DEF3A1FC +index = [2][4] +...checksum after hashing g_188[i][j] : 6BB40CF9 +index = [2][5] +...checksum after hashing g_188[i][j] : 9B4C03D7 +index = [3][0] +...checksum after hashing g_188[i][j] : 1B2CCDC5 +index = [3][1] +...checksum after hashing g_188[i][j] : 164B1AA7 +index = [3][2] +...checksum after hashing g_188[i][j] : 710FB99 +index = [3][3] +...checksum after hashing g_188[i][j] : 3FF19594 +index = [3][4] +...checksum after hashing g_188[i][j] : 537F2E35 +index = [3][5] +...checksum after hashing g_188[i][j] : 9C1276FC +index = [4][0] +...checksum after hashing g_188[i][j] : 8479AA38 +index = [4][1] +...checksum after hashing g_188[i][j] : 88A32EBC +index = [4][2] +...checksum after hashing g_188[i][j] : 227AA1EC +index = [4][3] +...checksum after hashing g_188[i][j] : D62D3936 +index = [4][4] +...checksum after hashing g_188[i][j] : 90248B70 +index = [4][5] +...checksum after hashing g_254 : 91220931 +...checksum after hashing g_274 : A3C1196A +...checksum after hashing g_286 : AB0F1346 +...checksum after hashing g_307 : FCAE531C +...checksum after hashing g_314 : F45A861 +...checksum after hashing g_316 : 44D51D4D +...checksum after hashing g_336[i][j] : D5758961 +index = [0][0] +...checksum after hashing g_336[i][j] : 450EA02F +index = [0][1] +...checksum after hashing g_336[i][j] : 9C17F7E8 +index = [1][0] +...checksum after hashing g_336[i][j] : D3FBECD5 +index = [1][1] +...checksum after hashing g_336[i][j] : 7CEB5606 +index = [2][0] +...checksum after hashing g_336[i][j] : 25E2A140 +index = [2][1] +...checksum after hashing g_336[i][j] : 41E9A732 +index = [3][0] +...checksum after hashing g_336[i][j] : 84F3F9C2 +index = [3][1] +...checksum after hashing g_336[i][j] : 961E16E4 +index = [4][0] +...checksum after hashing g_336[i][j] : 1ABBAD +index = [4][1] +...checksum after hashing g_336[i][j] : E32CA783 +index = [5][0] +...checksum after hashing g_336[i][j] : AF6831F2 +index = [5][1] +...checksum after hashing g_336[i][j] : C780832C +index = [6][0] +...checksum after hashing g_336[i][j] : BB95C1A9 +index = [6][1] +...checksum after hashing g_336[i][j] : D58033D2 +index = [7][0] +...checksum after hashing g_336[i][j] : EBCB2F65 +index = [7][1] +...checksum after hashing g_336[i][j] : 534BEE8 +index = [8][0] +...checksum after hashing g_336[i][j] : 9BCA061B +index = [8][1] +...checksum after hashing g_344 : EF160E34 +...checksum after hashing g_347[i][j] : C002B0BB +index = [0][0] +...checksum after hashing g_347[i][j] : 3F872FC0 +index = [0][1] +...checksum after hashing g_347[i][j] : F2C6FF9D +index = [0][2] +...checksum after hashing g_347[i][j] : A6595615 +index = [0][3] +...checksum after hashing g_347[i][j] : 5A9A7EAF +index = [0][4] +...checksum after hashing g_347[i][j] : 670E4666 +index = [0][5] +...checksum after hashing g_347[i][j] : 26AFEB18 +index = [0][6] +...checksum after hashing g_347[i][j] : 5270DD93 +index = [0][7] +...checksum after hashing g_347[i][j] : F5C092F0 +index = [0][8] +...checksum after hashing g_347[i][j] : E724139D +index = [1][0] +...checksum after hashing g_347[i][j] : 7340A54 +index = [1][1] +...checksum after hashing g_347[i][j] : 19884880 +index = [1][2] +...checksum after hashing g_347[i][j] : 9D1968B9 +index = [1][3] +...checksum after hashing g_347[i][j] : 32A0B6A9 +index = [1][4] +...checksum after hashing g_347[i][j] : BB19E951 +index = [1][5] +...checksum after hashing g_347[i][j] : 13912B34 +index = [1][6] +...checksum after hashing g_347[i][j] : 3E4D840B +index = [1][7] +...checksum after hashing g_347[i][j] : C0B52B49 +index = [1][8] +...checksum after hashing g_347[i][j] : 492A9E82 +index = [2][0] +...checksum after hashing g_347[i][j] : 494E662F +index = [2][1] +...checksum after hashing g_347[i][j] : A0CFA0B2 +index = [2][2] +...checksum after hashing g_347[i][j] : 6D4F0B61 +index = [2][3] +...checksum after hashing g_347[i][j] : CA8D5A68 +index = [2][4] +...checksum after hashing g_347[i][j] : 465C6937 +index = [2][5] +...checksum after hashing g_347[i][j] : A2EBAD8A +index = [2][6] +...checksum after hashing g_347[i][j] : 4FEEC8F6 +index = [2][7] +...checksum after hashing g_347[i][j] : 6F113F17 +index = [2][8] +...checksum after hashing g_347[i][j] : F5D52A2B +index = [3][0] +...checksum after hashing g_347[i][j] : EA8964B9 +index = [3][1] +...checksum after hashing g_347[i][j] : F004797F +index = [3][2] +...checksum after hashing g_347[i][j] : 28556C74 +index = [3][3] +...checksum after hashing g_347[i][j] : 56496FA4 +index = [3][4] +...checksum after hashing g_347[i][j] : E48D2D7 +index = [3][5] +...checksum after hashing g_347[i][j] : EB36E3B4 +index = [3][6] +...checksum after hashing g_347[i][j] : 1E88A5C8 +index = [3][7] +...checksum after hashing g_347[i][j] : 102145B5 +index = [3][8] +...checksum after hashing g_347[i][j] : 542D4C7D +index = [4][0] +...checksum after hashing g_347[i][j] : 35017B9E +index = [4][1] +...checksum after hashing g_347[i][j] : 3FADD7B3 +index = [4][2] +...checksum after hashing g_347[i][j] : B3369521 +index = [4][3] +...checksum after hashing g_347[i][j] : 3982AAC3 +index = [4][4] +...checksum after hashing g_347[i][j] : CADE3B8A +index = [4][5] +...checksum after hashing g_347[i][j] : CF70F4D1 +index = [4][6] +...checksum after hashing g_347[i][j] : 91391B5E +index = [4][7] +...checksum after hashing g_347[i][j] : C713299F +index = [4][8] +...checksum after hashing g_347[i][j] : 2FA82265 +index = [5][0] +...checksum after hashing g_347[i][j] : 63C6267E +index = [5][1] +...checksum after hashing g_347[i][j] : 8B059E20 +index = [5][2] +...checksum after hashing g_347[i][j] : C95A2C50 +index = [5][3] +...checksum after hashing g_347[i][j] : 5916142C +index = [5][4] +...checksum after hashing g_347[i][j] : D39D97B8 +index = [5][5] +...checksum after hashing g_347[i][j] : FA0FD4F9 +index = [5][6] +...checksum after hashing g_347[i][j] : 32E67B75 +index = [5][7] +...checksum after hashing g_347[i][j] : B188E102 +index = [5][8] +...checksum after hashing g_347[i][j] : D4ED5B3C +index = [6][0] +...checksum after hashing g_347[i][j] : 2982A55D +index = [6][1] +...checksum after hashing g_347[i][j] : D8ED19A6 +index = [6][2] +...checksum after hashing g_347[i][j] : 81D7B118 +index = [6][3] +...checksum after hashing g_347[i][j] : 45760F9 +index = [6][4] +...checksum after hashing g_347[i][j] : 6D574D92 +index = [6][5] +...checksum after hashing g_347[i][j] : A8528A0A +index = [6][6] +...checksum after hashing g_347[i][j] : 4A67D247 +index = [6][7] +...checksum after hashing g_347[i][j] : 4145E7C3 +index = [6][8] +...checksum after hashing g_347[i][j] : DD78F5F2 +index = [7][0] +...checksum after hashing g_347[i][j] : 191C8AF9 +index = [7][1] +...checksum after hashing g_347[i][j] : E0EE0111 +index = [7][2] +...checksum after hashing g_347[i][j] : 1068DEAE +index = [7][3] +...checksum after hashing g_347[i][j] : 9B90EC07 +index = [7][4] +...checksum after hashing g_347[i][j] : 7CA01BE +index = [7][5] +...checksum after hashing g_347[i][j] : 52BE9239 +index = [7][6] +...checksum after hashing g_347[i][j] : 156FD022 +index = [7][7] +...checksum after hashing g_347[i][j] : 7D34F2F1 +index = [7][8] +...checksum after hashing g_349 : 2A771800 +...checksum after hashing g_350 : 61D1DBE2 +...checksum after hashing g_353 : 50D81683 +...checksum after hashing g_358 : 795E3F51 +...checksum after hashing g_359 : EDF4948D +...checksum after hashing g_387 : 6A061BAA +...checksum after hashing g_391 : 750B7D95 +...checksum after hashing g_404 : 16E5FB7C +...checksum after hashing g_405[i][j] : B9E069F0 +index = [0][0] +...checksum after hashing g_405[i][j] : DBE646D1 +index = [0][1] +...checksum after hashing g_405[i][j] : 4733D0D4 +index = [0][2] +...checksum after hashing g_405[i][j] : CE29F2E0 +index = [0][3] +...checksum after hashing g_405[i][j] : AEE0CEC7 +index = [0][4] +...checksum after hashing g_405[i][j] : AB52B09A +index = [0][5] +...checksum after hashing g_405[i][j] : 286FE27B +index = [1][0] +...checksum after hashing g_405[i][j] : 37CDA4DC +index = [1][1] +...checksum after hashing g_405[i][j] : C0F35FFD +index = [1][2] +...checksum after hashing g_405[i][j] : 415C8F24 +index = [1][3] +...checksum after hashing g_405[i][j] : 24A95F97 +index = [1][4] +...checksum after hashing g_405[i][j] : B058F38D +index = [1][5] +...checksum after hashing g_433 : 732426EB +...checksum after hashing g_474 : 9CA28532 +...checksum after hashing g_540 : CC9842B8 +...checksum after hashing g_554 : F5DE63D +...checksum after hashing g_562 : 5DD5B2C6 +...checksum after hashing g_580 : CF4EF1F +...checksum after hashing g_619 : 6F315F63 +...checksum after hashing g_633 : CCDBF262 +...checksum after hashing g_635[i][j] : 2830D394 +index = [0][0] +...checksum after hashing g_635[i][j] : A85FBA7E +index = [0][1] +...checksum after hashing g_635[i][j] : 59461FC5 +index = [0][2] +...checksum after hashing g_635[i][j] : 1D3C2247 +index = [0][3] +...checksum after hashing g_635[i][j] : D2BE3EC1 +index = [0][4] +...checksum after hashing g_635[i][j] : DDEA8DA +index = [1][0] +...checksum after hashing g_635[i][j] : C918E4 +index = [1][1] +...checksum after hashing g_635[i][j] : AE51914D +index = [1][2] +...checksum after hashing g_635[i][j] : F8206930 +index = [1][3] +...checksum after hashing g_635[i][j] : 6E8E8F6F +index = [1][4] +...checksum after hashing g_754[i][j] : BD640CA8 +index = [0][0] +...checksum after hashing g_754[i][j] : AA91B94A +index = [0][1] +...checksum after hashing g_754[i][j] : 60A06829 +index = [0][2] +...checksum after hashing g_754[i][j] : E1B31FE4 +index = [0][3] +...checksum after hashing g_754[i][j] : DDCF0A20 +index = [0][4] +...checksum after hashing g_754[i][j] : 23EE9810 +index = [0][5] +...checksum after hashing g_754[i][j] : FBC8C6D7 +index = [0][6] +...checksum after hashing g_754[i][j] : 8CA00A97 +index = [0][7] +...checksum after hashing g_754[i][j] : FEF19750 +index = [0][8] +...checksum after hashing g_754[i][j] : 5FB1E0EA +index = [1][0] +...checksum after hashing g_754[i][j] : 893FB236 +index = [1][1] +...checksum after hashing g_754[i][j] : DFFF78F9 +index = [1][2] +...checksum after hashing g_754[i][j] : BD3CEA8B +index = [1][3] +...checksum after hashing g_754[i][j] : D343C515 +index = [1][4] +...checksum after hashing g_754[i][j] : E66BBBE +index = [1][5] +...checksum after hashing g_754[i][j] : DAF21E6E +index = [1][6] +...checksum after hashing g_754[i][j] : 680A128 +index = [1][7] +...checksum after hashing g_754[i][j] : F6243581 +index = [1][8] +...checksum after hashing g_754[i][j] : E9310E70 +index = [2][0] +...checksum after hashing g_754[i][j] : E13FC0AE +index = [2][1] +...checksum after hashing g_754[i][j] : B317E4E6 +index = [2][2] +...checksum after hashing g_754[i][j] : 93ECB841 +index = [2][3] +...checksum after hashing g_754[i][j] : F865F979 +index = [2][4] +...checksum after hashing g_754[i][j] : 3D859595 +index = [2][5] +...checksum after hashing g_754[i][j] : 55919C82 +index = [2][6] +...checksum after hashing g_754[i][j] : 4B4F3693 +index = [2][7] +...checksum after hashing g_754[i][j] : 8004A4C3 +index = [2][8] +...checksum after hashing g_754[i][j] : 81FBCAA +index = [3][0] +...checksum after hashing g_754[i][j] : B20668EF +index = [3][1] +...checksum after hashing g_754[i][j] : BB325A92 +index = [3][2] +...checksum after hashing g_754[i][j] : 5E590445 +index = [3][3] +...checksum after hashing g_754[i][j] : C7248DAA +index = [3][4] +...checksum after hashing g_754[i][j] : 5981017 +index = [3][5] +...checksum after hashing g_754[i][j] : 2251EFDB +index = [3][6] +...checksum after hashing g_754[i][j] : AE669363 +index = [3][7] +...checksum after hashing g_754[i][j] : 4DF7A4F3 +index = [3][8] +...checksum after hashing g_754[i][j] : 22704878 +index = [4][0] +...checksum after hashing g_754[i][j] : B5487C4F +index = [4][1] +...checksum after hashing g_754[i][j] : 1DE8BF13 +index = [4][2] +...checksum after hashing g_754[i][j] : E0F7EC18 +index = [4][3] +...checksum after hashing g_754[i][j] : 45EFD421 +index = [4][4] +...checksum after hashing g_754[i][j] : 7715D89B +index = [4][5] +...checksum after hashing g_754[i][j] : 2A44D7B6 +index = [4][6] +...checksum after hashing g_754[i][j] : 743C66B3 +index = [4][7] +...checksum after hashing g_754[i][j] : FEFE2245 +index = [4][8] +...checksum after hashing g_754[i][j] : 7C7B6773 +index = [5][0] +...checksum after hashing g_754[i][j] : 3E7F5FAB +index = [5][1] +...checksum after hashing g_754[i][j] : 94936B59 +index = [5][2] +...checksum after hashing g_754[i][j] : C6715214 +index = [5][3] +...checksum after hashing g_754[i][j] : 7F2D02B3 +index = [5][4] +...checksum after hashing g_754[i][j] : D698D448 +index = [5][5] +...checksum after hashing g_754[i][j] : 38434DDD +index = [5][6] +...checksum after hashing g_754[i][j] : D467CC18 +index = [5][7] +...checksum after hashing g_754[i][j] : 3FE24380 +index = [5][8] +...checksum after hashing g_754[i][j] : 7EE9772B +index = [6][0] +...checksum after hashing g_754[i][j] : 81995222 +index = [6][1] +...checksum after hashing g_754[i][j] : 5FE0FBCC +index = [6][2] +...checksum after hashing g_754[i][j] : B958CA7F +index = [6][3] +...checksum after hashing g_754[i][j] : E4F668BF +index = [6][4] +...checksum after hashing g_754[i][j] : DC1F731E +index = [6][5] +...checksum after hashing g_754[i][j] : 9E05B1D4 +index = [6][6] +...checksum after hashing g_754[i][j] : 8C27E778 +index = [6][7] +...checksum after hashing g_754[i][j] : A5158B41 +index = [6][8] +...checksum after hashing g_768 : 503DBE85 +...checksum after hashing g_1005[i] : 611DAB6F +index = [0] +...checksum after hashing g_1005[i] : 6684F30 +index = [1] +before stmt(682): checksum = 6684F30 +...checksum after hashing g_2 : C55C709 +...checksum after hashing g_129 : 9B01CDD0 +...checksum after hashing g_161 : 3EA41EEA +...checksum after hashing g_176 : 2D109F86 +...checksum after hashing g_180 : 82AD3CB2 +...checksum after hashing g_188[i][j] : B1E4CABF +index = [0][0] +...checksum after hashing g_188[i][j] : C6A540D1 +index = [0][1] +...checksum after hashing g_188[i][j] : 32FEDFD7 +index = [0][2] +...checksum after hashing g_188[i][j] : 5EFAB182 +index = [0][3] +...checksum after hashing g_188[i][j] : 73C2BF2A +index = [0][4] +...checksum after hashing g_188[i][j] : 1009BC21 +index = [0][5] +...checksum after hashing g_188[i][j] : 2B4E14F0 +index = [1][0] +...checksum after hashing g_188[i][j] : C6F73EB9 +index = [1][1] +...checksum after hashing g_188[i][j] : 1A8E7AB7 +index = [1][2] +...checksum after hashing g_188[i][j] : A0E50806 +index = [1][3] +...checksum after hashing g_188[i][j] : 4C298A5C +index = [1][4] +...checksum after hashing g_188[i][j] : 77116300 +index = [1][5] +...checksum after hashing g_188[i][j] : E4D8C204 +index = [2][0] +...checksum after hashing g_188[i][j] : 6A370476 +index = [2][1] +...checksum after hashing g_188[i][j] : 9C6DC2C +index = [2][2] +...checksum after hashing g_188[i][j] : AB4FCBA2 +index = [2][3] +...checksum after hashing g_188[i][j] : DEF3A1FC +index = [2][4] +...checksum after hashing g_188[i][j] : 6BB40CF9 +index = [2][5] +...checksum after hashing g_188[i][j] : 9B4C03D7 +index = [3][0] +...checksum after hashing g_188[i][j] : 1B2CCDC5 +index = [3][1] +...checksum after hashing g_188[i][j] : 164B1AA7 +index = [3][2] +...checksum after hashing g_188[i][j] : 710FB99 +index = [3][3] +...checksum after hashing g_188[i][j] : 3FF19594 +index = [3][4] +...checksum after hashing g_188[i][j] : 537F2E35 +index = [3][5] +...checksum after hashing g_188[i][j] : 9C1276FC +index = [4][0] +...checksum after hashing g_188[i][j] : 8479AA38 +index = [4][1] +...checksum after hashing g_188[i][j] : 88A32EBC +index = [4][2] +...checksum after hashing g_188[i][j] : 227AA1EC +index = [4][3] +...checksum after hashing g_188[i][j] : D62D3936 +index = [4][4] +...checksum after hashing g_188[i][j] : 90248B70 +index = [4][5] +...checksum after hashing g_254 : 91220931 +...checksum after hashing g_274 : A3C1196A +...checksum after hashing g_286 : AB0F1346 +...checksum after hashing g_307 : FCAE531C +...checksum after hashing g_314 : F45A861 +...checksum after hashing g_316 : 44D51D4D +...checksum after hashing g_336[i][j] : D5758961 +index = [0][0] +...checksum after hashing g_336[i][j] : 450EA02F +index = [0][1] +...checksum after hashing g_336[i][j] : 9C17F7E8 +index = [1][0] +...checksum after hashing g_336[i][j] : D3FBECD5 +index = [1][1] +...checksum after hashing g_336[i][j] : 7CEB5606 +index = [2][0] +...checksum after hashing g_336[i][j] : 25E2A140 +index = [2][1] +...checksum after hashing g_336[i][j] : 41E9A732 +index = [3][0] +...checksum after hashing g_336[i][j] : 84F3F9C2 +index = [3][1] +...checksum after hashing g_336[i][j] : 961E16E4 +index = [4][0] +...checksum after hashing g_336[i][j] : 1ABBAD +index = [4][1] +...checksum after hashing g_336[i][j] : E32CA783 +index = [5][0] +...checksum after hashing g_336[i][j] : AF6831F2 +index = [5][1] +...checksum after hashing g_336[i][j] : C780832C +index = [6][0] +...checksum after hashing g_336[i][j] : BB95C1A9 +index = [6][1] +...checksum after hashing g_336[i][j] : D58033D2 +index = [7][0] +...checksum after hashing g_336[i][j] : EBCB2F65 +index = [7][1] +...checksum after hashing g_336[i][j] : 534BEE8 +index = [8][0] +...checksum after hashing g_336[i][j] : 9BCA061B +index = [8][1] +...checksum after hashing g_344 : EF160E34 +...checksum after hashing g_347[i][j] : C002B0BB +index = [0][0] +...checksum after hashing g_347[i][j] : 3F872FC0 +index = [0][1] +...checksum after hashing g_347[i][j] : F2C6FF9D +index = [0][2] +...checksum after hashing g_347[i][j] : A6595615 +index = [0][3] +...checksum after hashing g_347[i][j] : 5A9A7EAF +index = [0][4] +...checksum after hashing g_347[i][j] : 670E4666 +index = [0][5] +...checksum after hashing g_347[i][j] : 26AFEB18 +index = [0][6] +...checksum after hashing g_347[i][j] : 5270DD93 +index = [0][7] +...checksum after hashing g_347[i][j] : F5C092F0 +index = [0][8] +...checksum after hashing g_347[i][j] : E724139D +index = [1][0] +...checksum after hashing g_347[i][j] : 7340A54 +index = [1][1] +...checksum after hashing g_347[i][j] : 19884880 +index = [1][2] +...checksum after hashing g_347[i][j] : 9D1968B9 +index = [1][3] +...checksum after hashing g_347[i][j] : 32A0B6A9 +index = [1][4] +...checksum after hashing g_347[i][j] : BB19E951 +index = [1][5] +...checksum after hashing g_347[i][j] : 13912B34 +index = [1][6] +...checksum after hashing g_347[i][j] : 3E4D840B +index = [1][7] +...checksum after hashing g_347[i][j] : C0B52B49 +index = [1][8] +...checksum after hashing g_347[i][j] : 492A9E82 +index = [2][0] +...checksum after hashing g_347[i][j] : 494E662F +index = [2][1] +...checksum after hashing g_347[i][j] : A0CFA0B2 +index = [2][2] +...checksum after hashing g_347[i][j] : 6D4F0B61 +index = [2][3] +...checksum after hashing g_347[i][j] : CA8D5A68 +index = [2][4] +...checksum after hashing g_347[i][j] : 465C6937 +index = [2][5] +...checksum after hashing g_347[i][j] : A2EBAD8A +index = [2][6] +...checksum after hashing g_347[i][j] : 4FEEC8F6 +index = [2][7] +...checksum after hashing g_347[i][j] : 6F113F17 +index = [2][8] +...checksum after hashing g_347[i][j] : F5D52A2B +index = [3][0] +...checksum after hashing g_347[i][j] : EA8964B9 +index = [3][1] +...checksum after hashing g_347[i][j] : F004797F +index = [3][2] +...checksum after hashing g_347[i][j] : 28556C74 +index = [3][3] +...checksum after hashing g_347[i][j] : 56496FA4 +index = [3][4] +...checksum after hashing g_347[i][j] : E48D2D7 +index = [3][5] +...checksum after hashing g_347[i][j] : EB36E3B4 +index = [3][6] +...checksum after hashing g_347[i][j] : 1E88A5C8 +index = [3][7] +...checksum after hashing g_347[i][j] : 102145B5 +index = [3][8] +...checksum after hashing g_347[i][j] : 542D4C7D +index = [4][0] +...checksum after hashing g_347[i][j] : 35017B9E +index = [4][1] +...checksum after hashing g_347[i][j] : 3FADD7B3 +index = [4][2] +...checksum after hashing g_347[i][j] : B3369521 +index = [4][3] +...checksum after hashing g_347[i][j] : 3982AAC3 +index = [4][4] +...checksum after hashing g_347[i][j] : CADE3B8A +index = [4][5] +...checksum after hashing g_347[i][j] : CF70F4D1 +index = [4][6] +...checksum after hashing g_347[i][j] : 91391B5E +index = [4][7] +...checksum after hashing g_347[i][j] : C713299F +index = [4][8] +...checksum after hashing g_347[i][j] : 2FA82265 +index = [5][0] +...checksum after hashing g_347[i][j] : 63C6267E +index = [5][1] +...checksum after hashing g_347[i][j] : 8B059E20 +index = [5][2] +...checksum after hashing g_347[i][j] : C95A2C50 +index = [5][3] +...checksum after hashing g_347[i][j] : 5916142C +index = [5][4] +...checksum after hashing g_347[i][j] : D39D97B8 +index = [5][5] +...checksum after hashing g_347[i][j] : FA0FD4F9 +index = [5][6] +...checksum after hashing g_347[i][j] : 32E67B75 +index = [5][7] +...checksum after hashing g_347[i][j] : B188E102 +index = [5][8] +...checksum after hashing g_347[i][j] : D4ED5B3C +index = [6][0] +...checksum after hashing g_347[i][j] : 2982A55D +index = [6][1] +...checksum after hashing g_347[i][j] : D8ED19A6 +index = [6][2] +...checksum after hashing g_347[i][j] : 81D7B118 +index = [6][3] +...checksum after hashing g_347[i][j] : 45760F9 +index = [6][4] +...checksum after hashing g_347[i][j] : 6D574D92 +index = [6][5] +...checksum after hashing g_347[i][j] : A8528A0A +index = [6][6] +...checksum after hashing g_347[i][j] : 4A67D247 +index = [6][7] +...checksum after hashing g_347[i][j] : 4145E7C3 +index = [6][8] +...checksum after hashing g_347[i][j] : DD78F5F2 +index = [7][0] +...checksum after hashing g_347[i][j] : 191C8AF9 +index = [7][1] +...checksum after hashing g_347[i][j] : E0EE0111 +index = [7][2] +...checksum after hashing g_347[i][j] : 1068DEAE +index = [7][3] +...checksum after hashing g_347[i][j] : 9B90EC07 +index = [7][4] +...checksum after hashing g_347[i][j] : 7CA01BE +index = [7][5] +...checksum after hashing g_347[i][j] : 52BE9239 +index = [7][6] +...checksum after hashing g_347[i][j] : 156FD022 +index = [7][7] +...checksum after hashing g_347[i][j] : 7D34F2F1 +index = [7][8] +...checksum after hashing g_349 : 2A771800 +...checksum after hashing g_350 : 61D1DBE2 +...checksum after hashing g_353 : 50D81683 +...checksum after hashing g_358 : 795E3F51 +...checksum after hashing g_359 : EDF4948D +...checksum after hashing g_387 : 6A061BAA +...checksum after hashing g_391 : 750B7D95 +...checksum after hashing g_404 : 16E5FB7C +...checksum after hashing g_405[i][j] : B9E069F0 +index = [0][0] +...checksum after hashing g_405[i][j] : DBE646D1 +index = [0][1] +...checksum after hashing g_405[i][j] : 4733D0D4 +index = [0][2] +...checksum after hashing g_405[i][j] : CE29F2E0 +index = [0][3] +...checksum after hashing g_405[i][j] : AEE0CEC7 +index = [0][4] +...checksum after hashing g_405[i][j] : AB52B09A +index = [0][5] +...checksum after hashing g_405[i][j] : 286FE27B +index = [1][0] +...checksum after hashing g_405[i][j] : 37CDA4DC +index = [1][1] +...checksum after hashing g_405[i][j] : C0F35FFD +index = [1][2] +...checksum after hashing g_405[i][j] : 415C8F24 +index = [1][3] +...checksum after hashing g_405[i][j] : 24A95F97 +index = [1][4] +...checksum after hashing g_405[i][j] : B058F38D +index = [1][5] +...checksum after hashing g_433 : 732426EB +...checksum after hashing g_474 : 9CA28532 +...checksum after hashing g_540 : CC9842B8 +...checksum after hashing g_554 : F5DE63D +...checksum after hashing g_562 : 5DD5B2C6 +...checksum after hashing g_580 : CF4EF1F +...checksum after hashing g_619 : 6F315F63 +...checksum after hashing g_633 : 510CCADB +...checksum after hashing g_635[i][j] : 22F5DA8D +index = [0][0] +...checksum after hashing g_635[i][j] : DCC753F1 +index = [0][1] +...checksum after hashing g_635[i][j] : A4BFE7B0 +index = [0][2] +...checksum after hashing g_635[i][j] : FC7884D4 +index = [0][3] +...checksum after hashing g_635[i][j] : E3A609B6 +index = [0][4] +...checksum after hashing g_635[i][j] : 9D75B89 +index = [1][0] +...checksum after hashing g_635[i][j] : B85C0A71 +index = [1][1] +...checksum after hashing g_635[i][j] : F2E1B224 +index = [1][2] +...checksum after hashing g_635[i][j] : 21D9A67 +index = [1][3] +...checksum after hashing g_635[i][j] : B8562641 +index = [1][4] +...checksum after hashing g_754[i][j] : D718ABC +index = [0][0] +...checksum after hashing g_754[i][j] : 6C864B28 +index = [0][1] +...checksum after hashing g_754[i][j] : 304B130C +index = [0][2] +...checksum after hashing g_754[i][j] : F81ABC8A +index = [0][3] +...checksum after hashing g_754[i][j] : C6A6C649 +index = [0][4] +...checksum after hashing g_754[i][j] : C32F56BF +index = [0][5] +...checksum after hashing g_754[i][j] : 71A70B9 +index = [0][6] +...checksum after hashing g_754[i][j] : 918F11AF +index = [0][7] +...checksum after hashing g_754[i][j] : AA075F3B +index = [0][8] +...checksum after hashing g_754[i][j] : 2CA84C6 +index = [1][0] +...checksum after hashing g_754[i][j] : F5144C38 +index = [1][1] +...checksum after hashing g_754[i][j] : AFB9916E +index = [1][2] +...checksum after hashing g_754[i][j] : CDBE4106 +index = [1][3] +...checksum after hashing g_754[i][j] : 40ED9287 +index = [1][4] +...checksum after hashing g_754[i][j] : 295EF93D +index = [1][5] +...checksum after hashing g_754[i][j] : E4955785 +index = [1][6] +...checksum after hashing g_754[i][j] : 93683195 +index = [1][7] +...checksum after hashing g_754[i][j] : F2ED0519 +index = [1][8] +...checksum after hashing g_754[i][j] : A8FB8AB5 +index = [2][0] +...checksum after hashing g_754[i][j] : 765E2304 +index = [2][1] +...checksum after hashing g_754[i][j] : 28E82F7F +index = [2][2] +...checksum after hashing g_754[i][j] : 3AA7D870 +index = [2][3] +...checksum after hashing g_754[i][j] : 44A2201F +index = [2][4] +...checksum after hashing g_754[i][j] : E7FC8DDB +index = [2][5] +...checksum after hashing g_754[i][j] : A494B831 +index = [2][6] +...checksum after hashing g_754[i][j] : CC010F14 +index = [2][7] +...checksum after hashing g_754[i][j] : C6168056 +index = [2][8] +...checksum after hashing g_754[i][j] : 5A8ED776 +index = [3][0] +...checksum after hashing g_754[i][j] : 7739C18C +index = [3][1] +...checksum after hashing g_754[i][j] : F7D87893 +index = [3][2] +...checksum after hashing g_754[i][j] : 6D7E773 +index = [3][3] +...checksum after hashing g_754[i][j] : 7970282D +index = [3][4] +...checksum after hashing g_754[i][j] : 58AB07C5 +index = [3][5] +...checksum after hashing g_754[i][j] : 56D46345 +index = [3][6] +...checksum after hashing g_754[i][j] : A4A3E3B +index = [3][7] +...checksum after hashing g_754[i][j] : 7A6441D2 +index = [3][8] +...checksum after hashing g_754[i][j] : 7706EEBE +index = [4][0] +...checksum after hashing g_754[i][j] : 59FF974C +index = [4][1] +...checksum after hashing g_754[i][j] : A8D2B990 +index = [4][2] +...checksum after hashing g_754[i][j] : 85341005 +index = [4][3] +...checksum after hashing g_754[i][j] : 864DC08D +index = [4][4] +...checksum after hashing g_754[i][j] : F5DB38EB +index = [4][5] +...checksum after hashing g_754[i][j] : BE56BF46 +index = [4][6] +...checksum after hashing g_754[i][j] : 3B08CD02 +index = [4][7] +...checksum after hashing g_754[i][j] : D35416CD +index = [4][8] +...checksum after hashing g_754[i][j] : 66C3BCFD +index = [5][0] +...checksum after hashing g_754[i][j] : 635B99B8 +index = [5][1] +...checksum after hashing g_754[i][j] : A72FB535 +index = [5][2] +...checksum after hashing g_754[i][j] : C7368237 +index = [5][3] +...checksum after hashing g_754[i][j] : 881CDE07 +index = [5][4] +...checksum after hashing g_754[i][j] : 259FA1DC +index = [5][5] +...checksum after hashing g_754[i][j] : 33AEA4F4 +index = [5][6] +...checksum after hashing g_754[i][j] : D36C93AA +index = [5][7] +...checksum after hashing g_754[i][j] : 92E9E074 +index = [5][8] +...checksum after hashing g_754[i][j] : E740137C +index = [6][0] +...checksum after hashing g_754[i][j] : 6E8B2A85 +index = [6][1] +...checksum after hashing g_754[i][j] : 9DFF6CA2 +index = [6][2] +...checksum after hashing g_754[i][j] : 22CD4938 +index = [6][3] +...checksum after hashing g_754[i][j] : 6AAD9971 +index = [6][4] +...checksum after hashing g_754[i][j] : ADC4D974 +index = [6][5] +...checksum after hashing g_754[i][j] : 5BBF237B +index = [6][6] +...checksum after hashing g_754[i][j] : 929CF2B8 +index = [6][7] +...checksum after hashing g_754[i][j] : 348B4ECC +index = [6][8] +...checksum after hashing g_768 : B0A0808E +...checksum after hashing g_1005[i] : FC0CF2DB +index = [0] +...checksum after hashing g_1005[i] : 2A724F2B +index = [1] +before stmt(683): checksum = 2A724F2B +...checksum after hashing g_2 : C55C709 +...checksum after hashing g_129 : 9B01CDD0 +...checksum after hashing g_161 : 3EA41EEA +...checksum after hashing g_176 : 2D109F86 +...checksum after hashing g_180 : 82AD3CB2 +...checksum after hashing g_188[i][j] : B1E4CABF +index = [0][0] +...checksum after hashing g_188[i][j] : C6A540D1 +index = [0][1] +...checksum after hashing g_188[i][j] : 32FEDFD7 +index = [0][2] +...checksum after hashing g_188[i][j] : 5EFAB182 +index = [0][3] +...checksum after hashing g_188[i][j] : 73C2BF2A +index = [0][4] +...checksum after hashing g_188[i][j] : 1009BC21 +index = [0][5] +...checksum after hashing g_188[i][j] : 2B4E14F0 +index = [1][0] +...checksum after hashing g_188[i][j] : C6F73EB9 +index = [1][1] +...checksum after hashing g_188[i][j] : 1A8E7AB7 +index = [1][2] +...checksum after hashing g_188[i][j] : A0E50806 +index = [1][3] +...checksum after hashing g_188[i][j] : 4C298A5C +index = [1][4] +...checksum after hashing g_188[i][j] : 77116300 +index = [1][5] +...checksum after hashing g_188[i][j] : E4D8C204 +index = [2][0] +...checksum after hashing g_188[i][j] : 6A370476 +index = [2][1] +...checksum after hashing g_188[i][j] : 9C6DC2C +index = [2][2] +...checksum after hashing g_188[i][j] : AB4FCBA2 +index = [2][3] +...checksum after hashing g_188[i][j] : DEF3A1FC +index = [2][4] +...checksum after hashing g_188[i][j] : 6BB40CF9 +index = [2][5] +...checksum after hashing g_188[i][j] : 9B4C03D7 +index = [3][0] +...checksum after hashing g_188[i][j] : 1B2CCDC5 +index = [3][1] +...checksum after hashing g_188[i][j] : 164B1AA7 +index = [3][2] +...checksum after hashing g_188[i][j] : 710FB99 +index = [3][3] +...checksum after hashing g_188[i][j] : 3FF19594 +index = [3][4] +...checksum after hashing g_188[i][j] : 537F2E35 +index = [3][5] +...checksum after hashing g_188[i][j] : 9C1276FC +index = [4][0] +...checksum after hashing g_188[i][j] : 8479AA38 +index = [4][1] +...checksum after hashing g_188[i][j] : 88A32EBC +index = [4][2] +...checksum after hashing g_188[i][j] : 227AA1EC +index = [4][3] +...checksum after hashing g_188[i][j] : D62D3936 +index = [4][4] +...checksum after hashing g_188[i][j] : 90248B70 +index = [4][5] +...checksum after hashing g_254 : 91220931 +...checksum after hashing g_274 : A3C1196A +...checksum after hashing g_286 : AB0F1346 +...checksum after hashing g_307 : FCAE531C +...checksum after hashing g_314 : F45A861 +...checksum after hashing g_316 : 44D51D4D +...checksum after hashing g_336[i][j] : D5758961 +index = [0][0] +...checksum after hashing g_336[i][j] : 450EA02F +index = [0][1] +...checksum after hashing g_336[i][j] : 9C17F7E8 +index = [1][0] +...checksum after hashing g_336[i][j] : D3FBECD5 +index = [1][1] +...checksum after hashing g_336[i][j] : 7CEB5606 +index = [2][0] +...checksum after hashing g_336[i][j] : 25E2A140 +index = [2][1] +...checksum after hashing g_336[i][j] : 41E9A732 +index = [3][0] +...checksum after hashing g_336[i][j] : 84F3F9C2 +index = [3][1] +...checksum after hashing g_336[i][j] : 961E16E4 +index = [4][0] +...checksum after hashing g_336[i][j] : 1ABBAD +index = [4][1] +...checksum after hashing g_336[i][j] : E32CA783 +index = [5][0] +...checksum after hashing g_336[i][j] : AF6831F2 +index = [5][1] +...checksum after hashing g_336[i][j] : C780832C +index = [6][0] +...checksum after hashing g_336[i][j] : BB95C1A9 +index = [6][1] +...checksum after hashing g_336[i][j] : D58033D2 +index = [7][0] +...checksum after hashing g_336[i][j] : EBCB2F65 +index = [7][1] +...checksum after hashing g_336[i][j] : 534BEE8 +index = [8][0] +...checksum after hashing g_336[i][j] : 9BCA061B +index = [8][1] +...checksum after hashing g_344 : EF160E34 +...checksum after hashing g_347[i][j] : C002B0BB +index = [0][0] +...checksum after hashing g_347[i][j] : 3F872FC0 +index = [0][1] +...checksum after hashing g_347[i][j] : F2C6FF9D +index = [0][2] +...checksum after hashing g_347[i][j] : A6595615 +index = [0][3] +...checksum after hashing g_347[i][j] : 5A9A7EAF +index = [0][4] +...checksum after hashing g_347[i][j] : 670E4666 +index = [0][5] +...checksum after hashing g_347[i][j] : 26AFEB18 +index = [0][6] +...checksum after hashing g_347[i][j] : 5270DD93 +index = [0][7] +...checksum after hashing g_347[i][j] : F5C092F0 +index = [0][8] +...checksum after hashing g_347[i][j] : E724139D +index = [1][0] +...checksum after hashing g_347[i][j] : 7340A54 +index = [1][1] +...checksum after hashing g_347[i][j] : 19884880 +index = [1][2] +...checksum after hashing g_347[i][j] : 9D1968B9 +index = [1][3] +...checksum after hashing g_347[i][j] : 32A0B6A9 +index = [1][4] +...checksum after hashing g_347[i][j] : BB19E951 +index = [1][5] +...checksum after hashing g_347[i][j] : 13912B34 +index = [1][6] +...checksum after hashing g_347[i][j] : 3E4D840B +index = [1][7] +...checksum after hashing g_347[i][j] : C0B52B49 +index = [1][8] +...checksum after hashing g_347[i][j] : 492A9E82 +index = [2][0] +...checksum after hashing g_347[i][j] : 494E662F +index = [2][1] +...checksum after hashing g_347[i][j] : A0CFA0B2 +index = [2][2] +...checksum after hashing g_347[i][j] : 6D4F0B61 +index = [2][3] +...checksum after hashing g_347[i][j] : CA8D5A68 +index = [2][4] +...checksum after hashing g_347[i][j] : 465C6937 +index = [2][5] +...checksum after hashing g_347[i][j] : A2EBAD8A +index = [2][6] +...checksum after hashing g_347[i][j] : 4FEEC8F6 +index = [2][7] +...checksum after hashing g_347[i][j] : 6F113F17 +index = [2][8] +...checksum after hashing g_347[i][j] : F5D52A2B +index = [3][0] +...checksum after hashing g_347[i][j] : EA8964B9 +index = [3][1] +...checksum after hashing g_347[i][j] : F004797F +index = [3][2] +...checksum after hashing g_347[i][j] : 28556C74 +index = [3][3] +...checksum after hashing g_347[i][j] : 56496FA4 +index = [3][4] +...checksum after hashing g_347[i][j] : E48D2D7 +index = [3][5] +...checksum after hashing g_347[i][j] : EB36E3B4 +index = [3][6] +...checksum after hashing g_347[i][j] : 1E88A5C8 +index = [3][7] +...checksum after hashing g_347[i][j] : 102145B5 +index = [3][8] +...checksum after hashing g_347[i][j] : 542D4C7D +index = [4][0] +...checksum after hashing g_347[i][j] : 35017B9E +index = [4][1] +...checksum after hashing g_347[i][j] : 3FADD7B3 +index = [4][2] +...checksum after hashing g_347[i][j] : B3369521 +index = [4][3] +...checksum after hashing g_347[i][j] : 3982AAC3 +index = [4][4] +...checksum after hashing g_347[i][j] : CADE3B8A +index = [4][5] +...checksum after hashing g_347[i][j] : CF70F4D1 +index = [4][6] +...checksum after hashing g_347[i][j] : 91391B5E +index = [4][7] +...checksum after hashing g_347[i][j] : C713299F +index = [4][8] +...checksum after hashing g_347[i][j] : 2FA82265 +index = [5][0] +...checksum after hashing g_347[i][j] : 63C6267E +index = [5][1] +...checksum after hashing g_347[i][j] : 8B059E20 +index = [5][2] +...checksum after hashing g_347[i][j] : C95A2C50 +index = [5][3] +...checksum after hashing g_347[i][j] : 5916142C +index = [5][4] +...checksum after hashing g_347[i][j] : D39D97B8 +index = [5][5] +...checksum after hashing g_347[i][j] : FA0FD4F9 +index = [5][6] +...checksum after hashing g_347[i][j] : 32E67B75 +index = [5][7] +...checksum after hashing g_347[i][j] : B188E102 +index = [5][8] +...checksum after hashing g_347[i][j] : D4ED5B3C +index = [6][0] +...checksum after hashing g_347[i][j] : 2982A55D +index = [6][1] +...checksum after hashing g_347[i][j] : D8ED19A6 +index = [6][2] +...checksum after hashing g_347[i][j] : 81D7B118 +index = [6][3] +...checksum after hashing g_347[i][j] : 45760F9 +index = [6][4] +...checksum after hashing g_347[i][j] : 6D574D92 +index = [6][5] +...checksum after hashing g_347[i][j] : A8528A0A +index = [6][6] +...checksum after hashing g_347[i][j] : 4A67D247 +index = [6][7] +...checksum after hashing g_347[i][j] : 4145E7C3 +index = [6][8] +...checksum after hashing g_347[i][j] : DD78F5F2 +index = [7][0] +...checksum after hashing g_347[i][j] : 191C8AF9 +index = [7][1] +...checksum after hashing g_347[i][j] : E0EE0111 +index = [7][2] +...checksum after hashing g_347[i][j] : 1068DEAE +index = [7][3] +...checksum after hashing g_347[i][j] : 9B90EC07 +index = [7][4] +...checksum after hashing g_347[i][j] : 7CA01BE +index = [7][5] +...checksum after hashing g_347[i][j] : 52BE9239 +index = [7][6] +...checksum after hashing g_347[i][j] : 156FD022 +index = [7][7] +...checksum after hashing g_347[i][j] : 7D34F2F1 +index = [7][8] +...checksum after hashing g_349 : 2A771800 +...checksum after hashing g_350 : 61D1DBE2 +...checksum after hashing g_353 : 50D81683 +...checksum after hashing g_358 : 795E3F51 +...checksum after hashing g_359 : EDF4948D +...checksum after hashing g_387 : 6A061BAA +...checksum after hashing g_391 : 750B7D95 +...checksum after hashing g_404 : 16E5FB7C +...checksum after hashing g_405[i][j] : B9E069F0 +index = [0][0] +...checksum after hashing g_405[i][j] : DBE646D1 +index = [0][1] +...checksum after hashing g_405[i][j] : 4733D0D4 +index = [0][2] +...checksum after hashing g_405[i][j] : CE29F2E0 +index = [0][3] +...checksum after hashing g_405[i][j] : AEE0CEC7 +index = [0][4] +...checksum after hashing g_405[i][j] : AB52B09A +index = [0][5] +...checksum after hashing g_405[i][j] : 286FE27B +index = [1][0] +...checksum after hashing g_405[i][j] : 37CDA4DC +index = [1][1] +...checksum after hashing g_405[i][j] : C0F35FFD +index = [1][2] +...checksum after hashing g_405[i][j] : 415C8F24 +index = [1][3] +...checksum after hashing g_405[i][j] : 24A95F97 +index = [1][4] +...checksum after hashing g_405[i][j] : B058F38D +index = [1][5] +...checksum after hashing g_433 : 732426EB +...checksum after hashing g_474 : 9CA28532 +...checksum after hashing g_540 : CC9842B8 +...checksum after hashing g_554 : F5DE63D +...checksum after hashing g_562 : 5DD5B2C6 +...checksum after hashing g_580 : CF4EF1F +...checksum after hashing g_619 : 6F315F63 +...checksum after hashing g_633 : 510CCADB +...checksum after hashing g_635[i][j] : 22F5DA8D +index = [0][0] +...checksum after hashing g_635[i][j] : DCC753F1 +index = [0][1] +...checksum after hashing g_635[i][j] : A4BFE7B0 +index = [0][2] +...checksum after hashing g_635[i][j] : FC7884D4 +index = [0][3] +...checksum after hashing g_635[i][j] : E3A609B6 +index = [0][4] +...checksum after hashing g_635[i][j] : 9D75B89 +index = [1][0] +...checksum after hashing g_635[i][j] : B85C0A71 +index = [1][1] +...checksum after hashing g_635[i][j] : F2E1B224 +index = [1][2] +...checksum after hashing g_635[i][j] : 21D9A67 +index = [1][3] +...checksum after hashing g_635[i][j] : B8562641 +index = [1][4] +...checksum after hashing g_754[i][j] : D718ABC +index = [0][0] +...checksum after hashing g_754[i][j] : 6C864B28 +index = [0][1] +...checksum after hashing g_754[i][j] : 304B130C +index = [0][2] +...checksum after hashing g_754[i][j] : F81ABC8A +index = [0][3] +...checksum after hashing g_754[i][j] : C6A6C649 +index = [0][4] +...checksum after hashing g_754[i][j] : C32F56BF +index = [0][5] +...checksum after hashing g_754[i][j] : 71A70B9 +index = [0][6] +...checksum after hashing g_754[i][j] : 918F11AF +index = [0][7] +...checksum after hashing g_754[i][j] : AA075F3B +index = [0][8] +...checksum after hashing g_754[i][j] : 2CA84C6 +index = [1][0] +...checksum after hashing g_754[i][j] : F5144C38 +index = [1][1] +...checksum after hashing g_754[i][j] : AFB9916E +index = [1][2] +...checksum after hashing g_754[i][j] : CDBE4106 +index = [1][3] +...checksum after hashing g_754[i][j] : 40ED9287 +index = [1][4] +...checksum after hashing g_754[i][j] : 295EF93D +index = [1][5] +...checksum after hashing g_754[i][j] : E4955785 +index = [1][6] +...checksum after hashing g_754[i][j] : 93683195 +index = [1][7] +...checksum after hashing g_754[i][j] : F2ED0519 +index = [1][8] +...checksum after hashing g_754[i][j] : A8FB8AB5 +index = [2][0] +...checksum after hashing g_754[i][j] : 765E2304 +index = [2][1] +...checksum after hashing g_754[i][j] : 28E82F7F +index = [2][2] +...checksum after hashing g_754[i][j] : 3AA7D870 +index = [2][3] +...checksum after hashing g_754[i][j] : 44A2201F +index = [2][4] +...checksum after hashing g_754[i][j] : E7FC8DDB +index = [2][5] +...checksum after hashing g_754[i][j] : A494B831 +index = [2][6] +...checksum after hashing g_754[i][j] : CC010F14 +index = [2][7] +...checksum after hashing g_754[i][j] : C6168056 +index = [2][8] +...checksum after hashing g_754[i][j] : 5A8ED776 +index = [3][0] +...checksum after hashing g_754[i][j] : 7739C18C +index = [3][1] +...checksum after hashing g_754[i][j] : F7D87893 +index = [3][2] +...checksum after hashing g_754[i][j] : 6D7E773 +index = [3][3] +...checksum after hashing g_754[i][j] : 7970282D +index = [3][4] +...checksum after hashing g_754[i][j] : 58AB07C5 +index = [3][5] +...checksum after hashing g_754[i][j] : 56D46345 +index = [3][6] +...checksum after hashing g_754[i][j] : A4A3E3B +index = [3][7] +...checksum after hashing g_754[i][j] : 7A6441D2 +index = [3][8] +...checksum after hashing g_754[i][j] : 7706EEBE +index = [4][0] +...checksum after hashing g_754[i][j] : 59FF974C +index = [4][1] +...checksum after hashing g_754[i][j] : A8D2B990 +index = [4][2] +...checksum after hashing g_754[i][j] : 85341005 +index = [4][3] +...checksum after hashing g_754[i][j] : 864DC08D +index = [4][4] +...checksum after hashing g_754[i][j] : F5DB38EB +index = [4][5] +...checksum after hashing g_754[i][j] : BE56BF46 +index = [4][6] +...checksum after hashing g_754[i][j] : 3B08CD02 +index = [4][7] +...checksum after hashing g_754[i][j] : D35416CD +index = [4][8] +...checksum after hashing g_754[i][j] : 66C3BCFD +index = [5][0] +...checksum after hashing g_754[i][j] : 635B99B8 +index = [5][1] +...checksum after hashing g_754[i][j] : A72FB535 +index = [5][2] +...checksum after hashing g_754[i][j] : C7368237 +index = [5][3] +...checksum after hashing g_754[i][j] : 881CDE07 +index = [5][4] +...checksum after hashing g_754[i][j] : 259FA1DC +index = [5][5] +...checksum after hashing g_754[i][j] : 33AEA4F4 +index = [5][6] +...checksum after hashing g_754[i][j] : D36C93AA +index = [5][7] +...checksum after hashing g_754[i][j] : 92E9E074 +index = [5][8] +...checksum after hashing g_754[i][j] : E740137C +index = [6][0] +...checksum after hashing g_754[i][j] : 6E8B2A85 +index = [6][1] +...checksum after hashing g_754[i][j] : 9DFF6CA2 +index = [6][2] +...checksum after hashing g_754[i][j] : 22CD4938 +index = [6][3] +...checksum after hashing g_754[i][j] : 6AAD9971 +index = [6][4] +...checksum after hashing g_754[i][j] : ADC4D974 +index = [6][5] +...checksum after hashing g_754[i][j] : 5BBF237B +index = [6][6] +...checksum after hashing g_754[i][j] : 929CF2B8 +index = [6][7] +...checksum after hashing g_754[i][j] : 348B4ECC +index = [6][8] +...checksum after hashing g_768 : B0A0808E +...checksum after hashing g_1005[i] : FC0CF2DB +index = [0] +...checksum after hashing g_1005[i] : 2A724F2B +index = [1] +checksum = 2a724f2b diff --git a/src/tests/csmith/rand88.c b/src/tests/csmith/rand88.c new file mode 100644 index 0000000..6caf73d --- /dev/null +++ b/src/tests/csmith/rand88.c @@ -0,0 +1,101 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static int g_4[8][4] = {{0x1D925B0EL, 0xBA07E4FCL, (-1L), 0x2887CF2EL}, {0x1D925B0EL, 0xBA07E4FCL, (-1L), 0x2887CF2EL}, {0x1D925B0EL, 0xBA07E4FCL, (-1L), 0x2887CF2EL}, {0x1D925B0EL, 0xBA07E4FCL, (-1L), 0x2887CF2EL}, {0x1D925B0EL, 0xBA07E4FCL, (-1L), 0x2887CF2EL}, {0x1D925B0EL, 0xBA07E4FCL, (-1L), 0x2887CF2EL}, {0x1D925B0EL, 0xBA07E4FCL, (-1L), 0x2887CF2EL}, {0x1D925B0EL, 0xBA07E4FCL, (-1L), 0x2887CF2EL}}; +static signed char func_1(void); +static signed char func_1(void) +{ + signed char l_2 = (-4L); + int *l_3 = &g_4[5][0]; + step_hash(1); + (*l_3) = l_2; + step_hash(2); + return g_4[5][0]; +} +void csmith_compute_hash(void) +{ + int i, j; + for (i = 0; i < 8; i++) + { + for (j = 0; j < 4; j++) + { + transparent_crc(g_4[i][j], "g_4[i][j]", print_hash_value); + if (print_hash_value) printf("index = [%d][%d]\n", i, j); + } + } +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int i, j; + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand88.expect b/src/tests/csmith/rand88.expect new file mode 100644 index 0000000..bc84a1b --- /dev/null +++ b/src/tests/csmith/rand88.expect @@ -0,0 +1,195 @@ +...checksum after hashing g_4[i][j] : 8103ED3F +index = [0][0] +...checksum after hashing g_4[i][j] : 9F0A895B +index = [0][1] +...checksum after hashing g_4[i][j] : 9748310C +index = [0][2] +...checksum after hashing g_4[i][j] : 839983EF +index = [0][3] +...checksum after hashing g_4[i][j] : 385EFA41 +index = [1][0] +...checksum after hashing g_4[i][j] : B02BC330 +index = [1][1] +...checksum after hashing g_4[i][j] : 212C61A2 +index = [1][2] +...checksum after hashing g_4[i][j] : 61027B73 +index = [1][3] +...checksum after hashing g_4[i][j] : A8AE56B0 +index = [2][0] +...checksum after hashing g_4[i][j] : BA20640F +index = [2][1] +...checksum after hashing g_4[i][j] : 5672F265 +index = [2][2] +...checksum after hashing g_4[i][j] : 9F943F20 +index = [2][3] +...checksum after hashing g_4[i][j] : 7B9B2167 +index = [3][0] +...checksum after hashing g_4[i][j] : EDF6DA22 +index = [3][1] +...checksum after hashing g_4[i][j] : E987F052 +index = [3][2] +...checksum after hashing g_4[i][j] : C3F990B3 +index = [3][3] +...checksum after hashing g_4[i][j] : B4C47D45 +index = [4][0] +...checksum after hashing g_4[i][j] : B493F4F9 +index = [4][1] +...checksum after hashing g_4[i][j] : 203CD392 +index = [4][2] +...checksum after hashing g_4[i][j] : 6A368B6B +index = [4][3] +...checksum after hashing g_4[i][j] : A43F706F +index = [5][0] +...checksum after hashing g_4[i][j] : 993B00E2 +index = [5][1] +...checksum after hashing g_4[i][j] : 36E8B294 +index = [5][2] +...checksum after hashing g_4[i][j] : 17C8C0EA +index = [5][3] +...checksum after hashing g_4[i][j] : 299E02A2 +index = [6][0] +...checksum after hashing g_4[i][j] : 6E7CF832 +index = [6][1] +...checksum after hashing g_4[i][j] : 378A9718 +index = [6][2] +...checksum after hashing g_4[i][j] : AE0D74D1 +index = [6][3] +...checksum after hashing g_4[i][j] : C8D303ED +index = [7][0] +...checksum after hashing g_4[i][j] : 3E1339C8 +index = [7][1] +...checksum after hashing g_4[i][j] : C732BB30 +index = [7][2] +...checksum after hashing g_4[i][j] : 6B7D9A28 +index = [7][3] +before stmt(1): checksum = 6B7D9A28 +...checksum after hashing g_4[i][j] : 8103ED3F +index = [0][0] +...checksum after hashing g_4[i][j] : 9F0A895B +index = [0][1] +...checksum after hashing g_4[i][j] : 9748310C +index = [0][2] +...checksum after hashing g_4[i][j] : 839983EF +index = [0][3] +...checksum after hashing g_4[i][j] : 385EFA41 +index = [1][0] +...checksum after hashing g_4[i][j] : B02BC330 +index = [1][1] +...checksum after hashing g_4[i][j] : 212C61A2 +index = [1][2] +...checksum after hashing g_4[i][j] : 61027B73 +index = [1][3] +...checksum after hashing g_4[i][j] : A8AE56B0 +index = [2][0] +...checksum after hashing g_4[i][j] : BA20640F +index = [2][1] +...checksum after hashing g_4[i][j] : 5672F265 +index = [2][2] +...checksum after hashing g_4[i][j] : 9F943F20 +index = [2][3] +...checksum after hashing g_4[i][j] : 7B9B2167 +index = [3][0] +...checksum after hashing g_4[i][j] : EDF6DA22 +index = [3][1] +...checksum after hashing g_4[i][j] : E987F052 +index = [3][2] +...checksum after hashing g_4[i][j] : C3F990B3 +index = [3][3] +...checksum after hashing g_4[i][j] : B4C47D45 +index = [4][0] +...checksum after hashing g_4[i][j] : B493F4F9 +index = [4][1] +...checksum after hashing g_4[i][j] : 203CD392 +index = [4][2] +...checksum after hashing g_4[i][j] : 6A368B6B +index = [4][3] +...checksum after hashing g_4[i][j] : C876CD41 +index = [5][0] +...checksum after hashing g_4[i][j] : 71EF6C93 +index = [5][1] +...checksum after hashing g_4[i][j] : EF232D78 +index = [5][2] +...checksum after hashing g_4[i][j] : AA2FA552 +index = [5][3] +...checksum after hashing g_4[i][j] : 1BABC706 +index = [6][0] +...checksum after hashing g_4[i][j] : 51F7B1FD +index = [6][1] +...checksum after hashing g_4[i][j] : 8FEB3BA +index = [6][2] +...checksum after hashing g_4[i][j] : 8B1EDAAC +index = [6][3] +...checksum after hashing g_4[i][j] : A88B9E13 +index = [7][0] +...checksum after hashing g_4[i][j] : 92B1C5FB +index = [7][1] +...checksum after hashing g_4[i][j] : DA235763 +index = [7][2] +...checksum after hashing g_4[i][j] : 22E25C69 +index = [7][3] +before stmt(2): checksum = 22E25C69 +...checksum after hashing g_4[i][j] : 8103ED3F +index = [0][0] +...checksum after hashing g_4[i][j] : 9F0A895B +index = [0][1] +...checksum after hashing g_4[i][j] : 9748310C +index = [0][2] +...checksum after hashing g_4[i][j] : 839983EF +index = [0][3] +...checksum after hashing g_4[i][j] : 385EFA41 +index = [1][0] +...checksum after hashing g_4[i][j] : B02BC330 +index = [1][1] +...checksum after hashing g_4[i][j] : 212C61A2 +index = [1][2] +...checksum after hashing g_4[i][j] : 61027B73 +index = [1][3] +...checksum after hashing g_4[i][j] : A8AE56B0 +index = [2][0] +...checksum after hashing g_4[i][j] : BA20640F +index = [2][1] +...checksum after hashing g_4[i][j] : 5672F265 +index = [2][2] +...checksum after hashing g_4[i][j] : 9F943F20 +index = [2][3] +...checksum after hashing g_4[i][j] : 7B9B2167 +index = [3][0] +...checksum after hashing g_4[i][j] : EDF6DA22 +index = [3][1] +...checksum after hashing g_4[i][j] : E987F052 +index = [3][2] +...checksum after hashing g_4[i][j] : C3F990B3 +index = [3][3] +...checksum after hashing g_4[i][j] : B4C47D45 +index = [4][0] +...checksum after hashing g_4[i][j] : B493F4F9 +index = [4][1] +...checksum after hashing g_4[i][j] : 203CD392 +index = [4][2] +...checksum after hashing g_4[i][j] : 6A368B6B +index = [4][3] +...checksum after hashing g_4[i][j] : C876CD41 +index = [5][0] +...checksum after hashing g_4[i][j] : 71EF6C93 +index = [5][1] +...checksum after hashing g_4[i][j] : EF232D78 +index = [5][2] +...checksum after hashing g_4[i][j] : AA2FA552 +index = [5][3] +...checksum after hashing g_4[i][j] : 1BABC706 +index = [6][0] +...checksum after hashing g_4[i][j] : 51F7B1FD +index = [6][1] +...checksum after hashing g_4[i][j] : 8FEB3BA +index = [6][2] +...checksum after hashing g_4[i][j] : 8B1EDAAC +index = [6][3] +...checksum after hashing g_4[i][j] : A88B9E13 +index = [7][0] +...checksum after hashing g_4[i][j] : 92B1C5FB +index = [7][1] +...checksum after hashing g_4[i][j] : DA235763 +index = [7][2] +...checksum after hashing g_4[i][j] : 22E25C69 +index = [7][3] +checksum = 22e25c69 diff --git a/src/tests/csmith/rand89.c b/src/tests/csmith/rand89.c new file mode 100644 index 0000000..833fad6 --- /dev/null +++ b/src/tests/csmith/rand89.c @@ -0,0 +1,104 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static int g_3 = 0xC05BAF43L; +static unsigned func_1(void); +static unsigned func_1(void) +{ + int *l_2 = &g_3; + int *l_4 = &g_3; + int l_5 = 0L; + int *l_6 = &l_5; + int l_7 = 0x03248C66L; + int *l_8 = &l_7; + int *l_9 = &g_3; + int l_10[9][3] = {{0xFBF2121FL, 4L, 0x307D7C11L}, {0xFBF2121FL, 4L, 0x307D7C11L}, {0xFBF2121FL, 4L, 0x307D7C11L}, {0xFBF2121FL, 4L, 0x307D7C11L}, {0xFBF2121FL, 4L, 0x307D7C11L}, {0xFBF2121FL, 4L, 0x307D7C11L}, {0xFBF2121FL, 4L, 0x307D7C11L}, {0xFBF2121FL, 4L, 0x307D7C11L}, {0xFBF2121FL, 4L, 0x307D7C11L}}; + int *l_11 = &g_3; + int *l_12 = (void*)0; + int *l_13 = &l_10[2][1]; + int *l_14 = &l_7; + unsigned l_15 = 0x3C6FE23AL; + int i, j; + step_hash(1); + --l_15; + step_hash(2); + return g_3; +} +void csmith_compute_hash(void) +{ + transparent_crc(g_3, "g_3", print_hash_value); +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand89.expect b/src/tests/csmith/rand89.expect new file mode 100644 index 0000000..ed0dc8a --- /dev/null +++ b/src/tests/csmith/rand89.expect @@ -0,0 +1,6 @@ +...checksum after hashing g_3 : B8EA74BD +before stmt(1): checksum = B8EA74BD +...checksum after hashing g_3 : B8EA74BD +before stmt(2): checksum = B8EA74BD +...checksum after hashing g_3 : B8EA74BD +checksum = b8ea74bd diff --git a/src/tests/csmith/rand9.c b/src/tests/csmith/rand9.c new file mode 100644 index 0000000..cd31107 --- /dev/null +++ b/src/tests/csmith/rand9.c @@ -0,0 +1,903 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static unsigned char g_4 = 0x88L; +static int g_21 = 0x4456E348L; +static int *g_22 = &g_21; +static int *g_121 = &g_21; +static int g_142 = 1L; +static signed char g_149 = 0xB2L; +static int g_159 = 0L; +static int g_180 = 0x38483835L; +static int *g_179 = &g_180; +static int **g_178 = &g_179; +static int g_205 = 0L; +static int *g_204 = &g_205; +static short g_341 = (-7L); +static int g_372 = 0x534F437CL; +static int *g_466 = (void*)0; +static unsigned char func_1(void); +static short func_2(int p_3); +static unsigned func_5(int p_6); +static unsigned func_12(unsigned char p_13, short p_14, int p_15); +static int * func_25(int ** p_26, int ** p_27, int ** p_28); +static int ** func_29(unsigned p_30, unsigned short p_31, int * p_32, int * p_33, unsigned char p_34); +static unsigned func_35(int p_36, int p_37); +static int func_38(int ** p_39, int ** p_40, unsigned short p_41, int * p_42); +static int ** func_43(signed char p_44, unsigned p_45, int ** p_46, int p_47, unsigned p_48); +static signed char func_49(int p_50, unsigned char p_51); +static unsigned char func_1(void) +{ + int **l_553 = &g_204; + step_hash(411); + (*g_121) = (func_2(g_4) && (l_553 == (void*)0)); + step_hash(412); + return (**l_553); +} +static short func_2(int p_3) +{ + int l_11 = 0L; + step_hash(409); + p_3 = (func_5(((int)((unsigned char)l_11 / (unsigned char)g_4) - (int)func_12(p_3, g_4, g_4))) ^ 3L); + step_hash(410); + return l_11; +} +static unsigned func_5(int p_6) +{ + step_hash(408); + return p_6; +} +static unsigned func_12(unsigned char p_13, short p_14, int p_15) +{ + int l_518 = 1L; + step_hash(405); + for (p_14 = 28; (p_14 != 24); p_14 -= 1) + { + int l_24 = (-1L); + int *l_517 = &g_21; + short l_533 = 0xB869L; + } + step_hash(406); + return p_13; +} +static int * func_25(int ** p_26, int ** p_27, int ** p_28) +{ + short l_488 = 0x2CC9L; + short l_503 = 0x933FL; + step_hash(341); + (*g_121) |= l_488; + step_hash(372); + for (g_205 = 12; (g_205 < (-7)); g_205--) + { + int l_500 = 0L; + step_hash(368); + if ((((*p_26) != (void*)0) != (**p_28))) + { + unsigned short l_499 = 1UL; + step_hash(360); + if ((0xCEAFL != ((int)((unsigned short)((short)((unsigned short)g_4 % (unsigned short)l_499) % (short)g_142) / (unsigned short)g_4) + (int)0x45CC115CL))) + { + step_hash(347); + (**p_28) &= l_503; + step_hash(348); + (*g_121) &= 0xDC005F59L; + step_hash(357); + for (g_180 = 0; (g_180 >= (-18)); g_180--) + { + short l_509 = 6L; + step_hash(356); + for (l_500 = 0; (l_500 < (-19)); --l_500) + { + int l_508 = (-1L); + step_hash(355); + (*g_121) ^= (l_508 ^ l_509); + } + } + } + else + { + step_hash(359); + (**p_28) |= ((unsigned char)g_159 << (unsigned char)4); + } + step_hash(361); + return (*p_28); + } + else + { + step_hash(367); + for (g_142 = 0; (g_142 < (-8)); g_142 -= 7) + { + step_hash(366); + (**p_28) = ((short)(-(signed char)l_503) >> (short)0); + } + } + step_hash(369); + (*g_178) = (*p_28); + step_hash(370); + if (l_500) + break; + step_hash(371); + if ((**p_28)) + continue; + } + step_hash(373); + return (*p_28); +} +static int ** func_29(unsigned p_30, unsigned short p_31, int * p_32, int * p_33, unsigned char p_34) +{ + int **l_473 = &g_22; + step_hash(317); + (*p_33) = (+(-1L)); + step_hash(336); + for (g_341 = 19; (g_341 == 24); ++g_341) + { + unsigned l_478 = 4294967291UL; + int *l_483 = &g_21; + step_hash(334); + for (p_34 = (-28); (p_34 == 21); p_34++) + { + int *l_481 = (void*)0; + step_hash(333); + for (g_159 = 0; (g_159 >= 12); ++g_159) + { + int *l_479 = &g_205; + short l_480 = 0L; + step_hash(332); + if (l_480) + { + step_hash(328); + (*l_479) = (g_142 || (**l_473)); + step_hash(329); + p_32 = p_32; + } + else + { + unsigned char l_482 = 0xC5L; + step_hash(331); + (*l_479) |= (*p_33); + } + } + } + step_hash(335); + return &g_121; + } + step_hash(337); + (*l_473) = p_32; + step_hash(338); + (*p_33) = (((short)((unsigned short)(g_180 && g_21) >> (unsigned short)10) >> (short)5) != (*p_33)); + step_hash(339); + return &g_466; +} +static unsigned func_35(int p_36, int p_37) +{ + int l_52 = 0L; + int **l_209 = (void*)0; + int **l_210 = &g_204; + int l_213 = 0xA3542F59L; + signed char l_214 = 1L; + unsigned l_286 = 4294967290UL; + int l_365 = 0x78BD9CC4L; + unsigned l_434 = 0xBFE20CF4L; + step_hash(147); + (*g_204) = func_38(&g_22, func_43((func_49(l_52, ((void*)0 == &p_37)) || (l_52 <= ((unsigned)g_149 + (unsigned)(0x6539L || (p_36 > g_142))))), l_52, g_178, l_52, p_37), l_52, g_204); + step_hash(313); + if (((short)(((func_38(l_209, func_43((g_180 > g_21), p_36, l_210, (p_37 < (((**l_210) || ((unsigned)(((void*)0 == (*l_210)) && l_213) / (unsigned)0x89F28232L)) == 4294967295UL)), p_36), p_36, &g_205) != 4294967294UL) < g_4) <= p_36) >> (short)l_214)) + { + int **l_221 = &g_179; + int **l_315 = &g_179; + int **l_316 = &g_204; + int *l_384 = &l_213; + short l_393 = 0x522AL; + step_hash(196); + if (((unsigned char)(((int)((short)p_37 / (short)func_38(&g_204, l_221, ((signed char)((unsigned char)(((unsigned char)((int)p_37 - (int)((unsigned)((((unsigned char)(((((short)((unsigned)((signed char)((**l_221) & p_36) >> (signed char)((-6L) > 9L)) + (unsigned)((unsigned char)(p_36 | g_4) - (unsigned char)4L)) - (short)p_37) ^ (**l_221)) || (**l_221)) < (-1L)) << (unsigned char)p_37) <= 0x17L) && p_37) % (unsigned)0x118C1422L)) << (unsigned char)(**l_210)) <= g_21) % (unsigned char)2L) / (signed char)g_4), (*g_178))) + (int)0xEDC9C37AL) | p_37) / (unsigned char)p_36)) + { + int *l_250 = (void*)0; + int l_253 = 0x5EE5D022L; + step_hash(150); + (*g_178) = (*l_221); + step_hash(151); + (**l_210) = (((short)func_49(((func_49(p_36, ((signed char)p_37 << (signed char)5)) < ((unsigned short)g_180 << (unsigned short)5)) > ((+((short)((*l_221) != l_250) * (short)((unsigned short)p_36 * (unsigned short)(+(**l_210))))) == l_253)), g_205) * (short)0L) & (**l_221)); + step_hash(152); + (**l_221) = (*g_121); + step_hash(153); + p_36 = (((short)0x0433L << (short)g_142) <= (**g_178)); + } + else + { + int *l_256 = &g_205; + step_hash(187); + if ((g_159 != 65535UL)) + { + step_hash(156); + (*g_178) = &p_36; + step_hash(157); + (*g_178) = l_256; + step_hash(158); + return p_37; + } + else + { + int *l_269 = &g_142; + int **l_275 = &g_121; + step_hash(164); + if (func_49((**l_221), ((-(unsigned short)(g_149 & p_37)) && ((void*)0 == (*g_178))))) + { + step_hash(161); + (*g_204) = ((unsigned char)g_21 << (unsigned char)1); + } + else + { + step_hash(163); + (**l_210) = (*g_121); + } + step_hash(184); + for (g_159 = (-27); (g_159 < (-28)); g_159 -= 6) + { + unsigned char l_272 = 0x64L; + int *l_283 = &g_180; + step_hash(168); + (*l_256) = ((8L && (((+1L) <= (-(int)(((short)g_149 >> (short)8) | ((unsigned)(0xA7184DBDL ^ ((short)func_38(&g_22, l_221, ((void*)0 != &p_36), l_269) >> (short)p_36)) + (unsigned)(*l_269))))) & g_4)) && p_36); + step_hash(173); + if ((((signed char)(-9L) >> (signed char)(**l_221)) && (l_272 || 0x0AL))) + { + step_hash(170); + (*l_210) = &p_37; + } + else + { + step_hash(172); + return p_37; + } + step_hash(182); + if (((short)((**l_221) == (**l_221)) - (short)g_180)) + { + int **l_276 = &g_179; + step_hash(175); + (*l_210) = (*g_178); + step_hash(176); + (*l_269) = ((&g_121 != l_275) | p_37); + step_hash(177); + (**l_210) = func_38(&g_204, &g_179, (**l_210), (*g_178)); + step_hash(178); + (**g_178) &= ((void*)0 == l_276); + } + else + { + step_hash(180); + (*l_221) = &p_37; + step_hash(181); + return (*l_269); + } + step_hash(183); + (*l_269) ^= ((signed char)((unsigned char)(((*l_256) <= (l_283 == (*g_178))) ^ ((g_4 > p_36) == 0UL)) << (unsigned char)5) << (signed char)7); + } + step_hash(185); + (**l_221) &= ((unsigned)p_36 / (unsigned)0x1AF36540L); + step_hash(186); + (**l_275) = p_36; + } + step_hash(193); + if ((*g_22)) + { + step_hash(189); + (*l_256) = ((**l_221) | l_286); + } + else + { + unsigned char l_287 = 0UL; + step_hash(191); + l_287 = ((-1L) | g_205); + step_hash(192); + (**l_210) = func_49((((((short)((signed char)g_149 * (signed char)(p_37 ^ ((*l_256) || ((signed char)(((short)(**l_221) - (short)((int)9L % (int)func_49(((unsigned short)g_21 - (unsigned short)(p_37 || (**l_221))), (**l_221)))) >= 0x388FD200L) * (signed char)(*l_256))))) >> (short)l_287) | p_37) | (-10L)) > l_287), p_36); + } + step_hash(194); + (**l_210) = ((unsigned short)(((**l_221) && p_37) <= (g_205 >= p_36)) >> (unsigned short)2); + step_hash(195); + (**l_210) = (-(unsigned char)((unsigned short)func_49((**l_221), p_37) * (unsigned short)g_205)); + } + step_hash(256); + if (((unsigned char)p_37 - (unsigned char)g_180)) + { + signed char l_309 = 0x3FL; + int l_349 = 0xFE9FD4BCL; + int **l_351 = &g_204; + step_hash(251); + if ((((unsigned)l_309 / (unsigned)1UL) <= (**l_210))) + { + unsigned short l_310 = 65529UL; + step_hash(213); + if (l_310) + { + unsigned short l_328 = 65535UL; + step_hash(204); + for (l_309 = 0; (l_309 == 4); l_309++) + { + int l_317 = 0L; + step_hash(203); + (*g_22) = (((unsigned short)func_38(l_315, l_316, (l_317 & 0xAE0FL), &p_37) - (unsigned short)(((signed char)((signed char)p_37 + (signed char)(((((unsigned short)((unsigned)((unsigned short)(((p_37 || (252UL || 5L)) | g_159) | l_328) / (unsigned short)l_309) + (unsigned)l_317) >> (unsigned short)p_37) ^ g_4) ^ g_4) || p_37)) / (signed char)p_37) ^ p_37)) | p_37); + } + step_hash(205); + (*g_179) = ((unsigned short)0x75D7L % (unsigned short)(((func_49((l_221 != &g_179), (((unsigned char)((unsigned char)l_309 >> (unsigned char)p_37) % (unsigned char)1L) >= ((short)((**l_210) > l_310) / (short)g_21))) < l_328) <= g_205) || 0L)); + } + else + { + step_hash(207); + (**l_316) |= p_37; + step_hash(212); + if ((*g_204)) + { + step_hash(209); + (*l_316) = &p_36; + } + else + { + unsigned char l_337 = 0UL; + int *l_338 = &l_213; + step_hash(211); + (*l_338) |= ((l_309 ^ 0xCFL) <= (func_49(((p_36 > 0x56L) == p_37), l_337) == (**l_221))); + } + } + } + else + { + unsigned short l_350 = 0x3BDAL; + int l_379 = 5L; + int **l_382 = &g_121; + step_hash(228); + for (g_21 = (-29); (g_21 == (-30)); g_21--) + { + step_hash(218); + if (g_341) + break; + step_hash(219); + (**l_221) = ((unsigned char)(-(int)(p_36 | (-10L))) % (unsigned char)((**l_315) | ((p_37 ^ g_142) || ((p_37 != g_4) ^ (-8L))))); + step_hash(226); + for (g_149 = 12; (g_149 > (-17)); g_149--) + { + step_hash(223); + l_349 = ((unsigned char)0UL - (unsigned char)(p_36 <= p_36)); + step_hash(224); + (**l_316) &= l_350; + step_hash(225); + (**l_315) ^= (p_37 >= l_309); + } + step_hash(227); + (**l_221) &= (&g_121 == l_351); + } + step_hash(229); + p_37 = ((signed char)g_21 >> (signed char)0); + step_hash(230); + (*l_210) = (void*)0; + step_hash(250); + for (g_205 = 5; (g_205 >= (-16)); g_205--) + { + signed char l_376 = 9L; + step_hash(240); + for (l_349 = 0; (l_349 < (-5)); l_349 -= 7) + { + unsigned char l_358 = 0xACL; + step_hash(237); + if (p_37) + break; + step_hash(238); + l_358 |= (**g_178); + step_hash(239); + p_36 |= ((((unsigned char)g_205 >> (unsigned char)5) ^ func_49(((signed char)p_37 >> (signed char)7), (func_49(g_341, g_341) <= (-3L)))) & (((short)((g_4 ^ 0xF9DEE71FL) > g_149) - (short)0UL) <= l_365)); + } + step_hash(241); + l_376 = func_49(g_149, func_49(((unsigned short)p_37 * (unsigned short)(((unsigned char)((((unsigned short)((*g_121) | g_372) - (unsigned short)((*l_351) != (*g_178))) || ((signed char)(-(int)(g_149 & p_37)) % (signed char)g_372)) < (**g_178)) >> (unsigned char)p_36) & 0x6112L)), g_159)); + step_hash(249); + for (l_365 = (-18); (l_365 == (-15)); l_365 += 4) + { + int *l_383 = &g_21; + step_hash(245); + if (p_36) + break; + step_hash(246); + l_379 ^= p_37; + step_hash(247); + if ((**l_221)) + break; + step_hash(248); + (*l_383) = ((int)func_49((l_382 != (void*)0), g_159) - (int)(**g_178)); + } + } + } + } + else + { + unsigned l_385 = 0x54D95447L; + int *l_386 = &l_213; + step_hash(253); + l_384 = (void*)0; + step_hash(254); + (*l_221) = &p_37; + step_hash(255); + (*l_386) &= (((**l_210) || l_385) >= func_49(p_36, ((**l_221) > 65535UL))); + } + step_hash(257); + (*l_210) = (*g_178); + step_hash(258); + l_393 &= (p_36 >= ((short)0L << (short)((short)(((*g_178) != &p_36) < func_49(p_37, p_37)) >> (short)2))); + } + else + { + unsigned l_403 = 5UL; + unsigned short l_404 = 1UL; + int **l_405 = &g_204; + int *l_408 = &g_180; + step_hash(265); + for (l_213 = 0; (l_213 < (-17)); --l_213) + { + unsigned char l_398 = 0UL; + step_hash(263); + (**g_178) |= (*g_121); + step_hash(264); + p_37 ^= ((unsigned char)g_21 + (unsigned char)l_398); + } + step_hash(310); + if (((**l_210) < (((signed char)p_37 >> (signed char)2) && ((signed char)(1UL | 0x635BAB6BL) + (signed char)p_37)))) + { + step_hash(267); + (*g_179) = ((((1L > l_403) == (g_205 || (func_49(l_403, g_341) == p_36))) && (0L & (((((p_36 && 0xF58DC4ADL) < p_37) == 0x66FCL) & p_37) ^ l_404))) & p_36); + } + else + { + int l_411 = 0L; + int **l_442 = &g_204; + unsigned l_455 = 0x43AA5389L; + step_hash(276); + if (((g_372 < g_341) & (func_38(l_405, &g_22, ((**l_405) && (&g_204 != &g_204)), (*l_405)) && g_142))) + { + step_hash(270); + (*g_22) ^= ((*g_178) == l_408); + } + else + { + int l_412 = 0L; + step_hash(272); + (**l_210) ^= (func_49(((void*)0 == &g_22), p_36) != (*l_408)); + step_hash(273); + (**g_178) = ((unsigned char)((l_411 <= (l_412 <= (l_412 <= ((p_37 ^ 4L) != p_36)))) == (((short)l_411 << (short)(((unsigned short)(0x45A4L >= (((((signed char)((p_37 | p_37) > 0xC3057E25L) / (signed char)p_36) >= l_412) < l_412) ^ g_341)) + (unsigned short)1UL) < g_149)) ^ 0L)) * (unsigned char)g_142); + step_hash(274); + (*l_408) ^= ((short)g_341 + (short)g_205); + step_hash(275); + p_37 &= func_38(&l_408, l_210, g_180, (*g_178)); + } + step_hash(296); + if (p_36) + { + step_hash(278); + (*g_22) |= 1L; + step_hash(279); + (**l_210) &= 1L; + } + else + { + int **l_429 = &g_204; + step_hash(293); + for (l_213 = 0; (l_213 <= (-2)); l_213 -= 3) + { + int *l_432 = (void*)0; + int *l_433 = &l_52; + step_hash(290); + if ((g_142 != p_37)) + { + step_hash(285); + (*l_210) = &p_36; + step_hash(286); + (*g_22) |= (**g_178); + step_hash(287); + (*g_178) = (*g_178); + } + else + { + step_hash(289); + (**l_210) = func_49((((short)p_36 << (short)15) == p_37), p_37); + } + step_hash(291); + (*l_433) |= func_49(g_142, ((unsigned char)((signed char)(+g_142) + (signed char)func_38(l_209, l_429, ((+((short)(+(**l_429)) >> (short)p_36)) | ((p_36 < (p_37 >= (l_411 >= g_205))) > 3UL)), (*l_429))) >> (unsigned char)4)); + step_hash(292); + (*l_408) &= func_49((**l_210), (*l_433)); + } + step_hash(294); + (*l_408) = p_37; + step_hash(295); + return p_37; + } + step_hash(308); + if (((p_36 > g_149) != (&l_408 != &g_204))) + { + step_hash(298); + (*l_405) = (*l_210); + step_hash(299); + (*l_405) = &p_36; + step_hash(300); + l_434 = 0x6852D1D0L; + } + else + { + int **l_456 = (void*)0; + step_hash(307); + for (l_214 = 0; (l_214 == (-29)); --l_214) + { + signed char l_441 = 0xA6L; + step_hash(305); + p_37 = ((unsigned)(((unsigned)(l_441 | func_49((l_210 == l_442), ((int)(!(*l_408)) % (int)0xF4B528D2L))) / (unsigned)g_4) > ((unsigned char)((&g_179 == (void*)0) | p_36) << (unsigned char)g_149)) - (unsigned)(**g_178)); + step_hash(306); + p_36 &= ((short)((short)((unsigned char)((*g_121) == 0x753B144CL) >> (unsigned char)0) >> (short)3) / (short)0xD5A2L); + } + } + step_hash(309); + return g_149; + } + step_hash(311); + (*g_179) = (((int)((0x5B19036AL && func_49(((unsigned char)g_21 % (unsigned char)((unsigned char)(l_209 != &g_22) >> (unsigned char)g_4)), (**l_405))) != p_37) * (int)(g_149 <= 0x4AL)) ^ g_4); + step_hash(312); + (*g_179) = (*g_204); + } + step_hash(314); + (*g_178) = (*g_178); + step_hash(315); + return g_159; +} +static int func_38(int ** p_39, int ** p_40, unsigned short p_41, int * p_42) +{ + unsigned l_206 = 0x812F185FL; + step_hash(144); + (*g_121) = (~(**p_40)); + step_hash(145); + (*g_179) = l_206; + step_hash(146); + return l_206; +} +static int ** func_43(signed char p_44, unsigned p_45, int ** p_46, int p_47, unsigned p_48) +{ + unsigned short l_186 = 0x6F00L; + int l_194 = 0xC581D854L; + step_hash(118); + (*g_178) = (*g_178); + step_hash(141); + for (g_180 = 0; (g_180 <= 17); g_180++) + { + int **l_191 = &g_179; + step_hash(127); + for (p_48 = 9; (p_48 == 4); --p_48) + { + int *l_185 = &g_159; + step_hash(125); + l_185 = (*p_46); + step_hash(126); + (*g_178) = (*p_46); + } + step_hash(128); + l_194 = (l_186 > ((unsigned)((signed char)(p_47 < ((func_49(p_48, g_180) && 0UL) >= (l_191 != &g_179))) >> (signed char)5) / (unsigned)(((unsigned)g_180 / (unsigned)(*g_179)) && 0x46D9L))); + step_hash(133); + for (g_149 = 6; (g_149 != (-10)); g_149 -= 5) + { + step_hash(132); + return p_46; + } + step_hash(140); + if (((signed char)(l_186 > (**p_46)) * (signed char)g_149)) + { + int *l_203 = &g_159; + step_hash(135); + (*l_203) = ((short)func_49(l_186, p_44) << (short)(+((unsigned char)p_48 / (unsigned char)p_47))); + step_hash(136); + if ((**p_46)) + break; + step_hash(137); + if ((*g_179)) + continue; + } + else + { + step_hash(139); + (*g_22) = (**p_46); + } + } + step_hash(142); + return &g_121; +} +static signed char func_49(int p_50, unsigned char p_51) +{ + unsigned char l_56 = 1UL; + int *l_57 = &g_21; + step_hash(114); + if (((unsigned short)p_51 / (unsigned short)p_51)) + { + int **l_55 = &g_22; + step_hash(18); + (*g_22) = (*g_22); + step_hash(19); + (*l_55) = &g_21; + step_hash(20); + (*l_55) = (*l_55); + step_hash(25); + if (l_56) + { + step_hash(22); + (*l_55) = l_57; + } + else + { + step_hash(24); + (**l_55) &= 0L; + } + } + else + { + unsigned short l_62 = 65526UL; + int *l_86 = &g_21; + int *l_111 = &g_21; + step_hash(113); + if (((signed char)(-3L) >> (signed char)((*l_57) <= g_4))) + { + short l_68 = 0xEE3BL; + int *l_104 = &g_21; + int l_173 = 0xA0AC9A06L; + step_hash(41); + if (((((short)l_62 + (short)g_21) || l_62) >= (((short)0xAFE4L << (short)(*l_57)) == ((signed char)(*l_57) - (signed char)g_4)))) + { + short l_67 = 0x4D23L; + step_hash(29); + l_67 |= 0x576953C5L; + step_hash(30); + (*g_22) = (*g_22); + step_hash(31); + (*l_57) &= l_68; + } + else + { + unsigned l_83 = 0xB40ACB48L; + step_hash(33); + (*l_57) = ((+(g_21 == p_50)) == ((g_21 <= (((unsigned short)g_21 >> (unsigned short)3) || ((unsigned short)g_21 + (unsigned short)0x9320L))) && (p_50 | 255UL))); + step_hash(40); + if ((((unsigned short)(((unsigned char)((p_51 || (0x30L >= l_68)) > p_51) * (unsigned char)((unsigned short)(l_68 < ((short)0xAA2EL * (short)(p_51 >= (*l_57)))) * (unsigned short)((((unsigned char)0UL << (unsigned char)l_62) <= g_4) || p_50))) <= 9UL) >> (unsigned short)4) <= 0xDAEA480DL)) + { + step_hash(35); + (*g_22) |= l_83; + } + else + { + int **l_84 = (void*)0; + int **l_85 = &l_57; + step_hash(37); + (*l_85) = &g_21; + step_hash(38); + (*l_86) = ((void*)0 == l_86); + step_hash(39); + (*g_22) ^= l_68; + } + } + step_hash(103); + if (((unsigned char)((unsigned short)((short)0L - (short)((+p_51) ^ (-10L))) >> (unsigned short)(4294967286UL ^ (((short)p_51 << (short)(*l_86)) <= ((short)g_21 << (short)(-(short)g_21))))) * (unsigned char)((unsigned)((signed char)((((g_21 || 1L) | (*g_22)) | l_68) | (*l_86)) - (signed char)g_4) % (unsigned)0xBBFFD320L))) + { + step_hash(43); + return p_51; + } + else + { + int **l_105 = &l_104; + step_hash(45); + (*l_105) = l_104; + step_hash(56); + for (l_68 = (-17); (l_68 >= (-30)); l_68--) + { + int *l_110 = &g_21; + step_hash(49); + (*l_105) = l_104; + step_hash(50); + if ((*l_57)) + break; + step_hash(55); + for (g_21 = 0; (g_21 >= 23); ++g_21) + { + step_hash(54); + l_110 = l_110; + } + } + step_hash(62); + if (((*l_86) & (0x4E6BL <= p_50))) + { + step_hash(58); + (*l_86) = (*g_22); + } + else + { + step_hash(60); + (*l_105) = l_111; + step_hash(61); + (*l_111) = ((unsigned short)p_51 >> (unsigned short)9); + } + step_hash(102); + if (((*l_57) < g_21)) + { + unsigned short l_120 = 0x1D39L; + signed char l_132 = (-1L); + int *l_133 = &g_21; + step_hash(64); + l_111 = l_57; + step_hash(70); + for (p_50 = 0; (p_50 > 16); ++p_50) + { + step_hash(68); + if (p_51) + break; + step_hash(69); + (*l_105) = l_57; + } + step_hash(71); + (*l_105) = l_86; + step_hash(79); + if (((((short)((65535UL || l_120) < g_4) + (short)p_51) & ((void*)0 == g_121)) == ((1L && p_50) != ((unsigned short)(((short)((unsigned char)(((signed char)((int)(*g_22) / (int)(*l_57)) % (signed char)g_21) > p_50) % (unsigned char)(*l_57)) + (short)p_50) != l_132) % (unsigned short)(**l_105))))) + { + unsigned l_134 = 0UL; + step_hash(73); + (*l_105) = l_133; + step_hash(74); + g_121 = &g_21; + step_hash(75); + return l_134; + } + else + { + int *l_141 = &g_142; + step_hash(77); + (*l_105) = &g_21; + step_hash(78); + (*l_141) |= ((unsigned)((unsigned short)((unsigned char)(p_50 ^ g_4) >> (unsigned char)g_21) / (unsigned short)p_51) - (unsigned)(((void*)0 == &l_57) >= p_50)); + } + } + else + { + unsigned char l_145 = 251UL; + int *l_146 = &g_21; + step_hash(85); + if (((unsigned)(l_145 > ((void*)0 == l_146)) % (unsigned)((short)p_51 * (short)p_51))) + { + step_hash(82); + (*l_57) = g_149; + } + else + { + step_hash(84); + return (*l_146); + } + step_hash(92); + for (l_145 = 3; (l_145 > 31); l_145 += 9) + { + int *l_158 = &g_159; + step_hash(89); + (*g_121) = ((((short)(g_142 && g_149) << (short)((short)p_51 << (short)14)) & 0x02147657L) ^ p_50); + step_hash(90); + (*g_22) = ((*l_86) && g_4); + step_hash(91); + (*l_158) ^= ((**l_105) <= (((unsigned char)(g_142 | (p_50 & (*l_111))) >> (unsigned char)6) > p_50)); + } + step_hash(93); + (*l_104) ^= (((unsigned short)(0xDDL > p_50) % (unsigned short)g_149) || p_51); + step_hash(101); + for (l_68 = 15; (l_68 > 11); l_68 -= 2) + { + unsigned short l_172 = 8UL; + step_hash(97); + (*l_57) = (*g_22); + step_hash(98); + (*g_121) = (((((unsigned char)253UL << (unsigned char)(*l_57)) || (((unsigned short)g_149 * (unsigned short)(g_149 > (g_159 > ((signed char)((unsigned short)l_172 / (unsigned short)p_51) * (signed char)((void*)0 != &g_121))))) && p_51)) | l_172) && g_159); + step_hash(99); + l_173 |= (*l_86); + step_hash(100); + (*l_86) |= 1L; + } + } + } + } + else + { + step_hash(110); + for (l_56 = (-19); (l_56 != 18); l_56 += 4) + { + step_hash(108); + (*l_86) = p_51; + step_hash(109); + return g_149; + } + step_hash(111); + (*l_111) = p_51; + step_hash(112); + (*g_121) = (0xB56EB578L | (*l_57)); + } + } + step_hash(115); + (*l_57) = (!p_50); + step_hash(116); + return (*l_57); +} +void csmith_compute_hash(void) +{ + transparent_crc(g_4, "g_4", print_hash_value); + transparent_crc(g_21, "g_21", print_hash_value); + transparent_crc(g_142, "g_142", print_hash_value); + transparent_crc(g_149, "g_149", print_hash_value); + transparent_crc(g_159, "g_159", print_hash_value); + transparent_crc(g_180, "g_180", print_hash_value); + transparent_crc(g_205, "g_205", print_hash_value); + transparent_crc(g_341, "g_341", print_hash_value); + transparent_crc(g_372, "g_372", print_hash_value); +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand9.expect b/src/tests/csmith/rand9.expect new file mode 100644 index 0000000..70a2191 --- /dev/null +++ b/src/tests/csmith/rand9.expect @@ -0,0 +1,80 @@ +...checksum after hashing g_4 : 9A941C8 +...checksum after hashing g_21 : 8DA82076 +...checksum after hashing g_142 : 1A36C8A5 +...checksum after hashing g_149 : 7F639DF +...checksum after hashing g_159 : A84B7B54 +...checksum after hashing g_180 : B20BC64 +...checksum after hashing g_205 : 5B124516 +...checksum after hashing g_341 : 5DFA1FE4 +...checksum after hashing g_372 : 421CB679 +before stmt(411): checksum = 421CB679 +...checksum after hashing g_4 : 9A941C8 +...checksum after hashing g_21 : 8DA82076 +...checksum after hashing g_142 : 1A36C8A5 +...checksum after hashing g_149 : 7F639DF +...checksum after hashing g_159 : A84B7B54 +...checksum after hashing g_180 : B20BC64 +...checksum after hashing g_205 : 5B124516 +...checksum after hashing g_341 : 5DFA1FE4 +...checksum after hashing g_372 : 421CB679 +before stmt(409): checksum = 421CB679 +...checksum after hashing g_4 : 9A941C8 +...checksum after hashing g_21 : 8DA82076 +...checksum after hashing g_142 : 1A36C8A5 +...checksum after hashing g_149 : 7F639DF +...checksum after hashing g_159 : A84B7B54 +...checksum after hashing g_180 : B20BC64 +...checksum after hashing g_205 : 5B124516 +...checksum after hashing g_341 : 5DFA1FE4 +...checksum after hashing g_372 : 421CB679 +before stmt(405): checksum = 421CB679 +...checksum after hashing g_4 : 9A941C8 +...checksum after hashing g_21 : 8DA82076 +...checksum after hashing g_142 : 1A36C8A5 +...checksum after hashing g_149 : 7F639DF +...checksum after hashing g_159 : A84B7B54 +...checksum after hashing g_180 : B20BC64 +...checksum after hashing g_205 : 5B124516 +...checksum after hashing g_341 : 5DFA1FE4 +...checksum after hashing g_372 : 421CB679 +before stmt(406): checksum = 421CB679 +...checksum after hashing g_4 : 9A941C8 +...checksum after hashing g_21 : 8DA82076 +...checksum after hashing g_142 : 1A36C8A5 +...checksum after hashing g_149 : 7F639DF +...checksum after hashing g_159 : A84B7B54 +...checksum after hashing g_180 : B20BC64 +...checksum after hashing g_205 : 5B124516 +...checksum after hashing g_341 : 5DFA1FE4 +...checksum after hashing g_372 : 421CB679 +before stmt(408): checksum = 421CB679 +...checksum after hashing g_4 : 9A941C8 +...checksum after hashing g_21 : 8DA82076 +...checksum after hashing g_142 : 1A36C8A5 +...checksum after hashing g_149 : 7F639DF +...checksum after hashing g_159 : A84B7B54 +...checksum after hashing g_180 : B20BC64 +...checksum after hashing g_205 : 5B124516 +...checksum after hashing g_341 : 5DFA1FE4 +...checksum after hashing g_372 : 421CB679 +before stmt(410): checksum = 421CB679 +...checksum after hashing g_4 : 9A941C8 +...checksum after hashing g_21 : E5FC4106 +...checksum after hashing g_142 : A5A2B814 +...checksum after hashing g_149 : B83A9973 +...checksum after hashing g_159 : 4A1FB6D6 +...checksum after hashing g_180 : 45D4DCC3 +...checksum after hashing g_205 : 22CDE7A4 +...checksum after hashing g_341 : 1F0400B3 +...checksum after hashing g_372 : 115189A0 +before stmt(412): checksum = 115189A0 +...checksum after hashing g_4 : 9A941C8 +...checksum after hashing g_21 : E5FC4106 +...checksum after hashing g_142 : A5A2B814 +...checksum after hashing g_149 : B83A9973 +...checksum after hashing g_159 : 4A1FB6D6 +...checksum after hashing g_180 : 45D4DCC3 +...checksum after hashing g_205 : 22CDE7A4 +...checksum after hashing g_341 : 1F0400B3 +...checksum after hashing g_372 : 115189A0 +checksum = 115189a0 diff --git a/src/tests/csmith/rand90.c b/src/tests/csmith/rand90.c new file mode 100644 index 0000000..e108b94 --- /dev/null +++ b/src/tests/csmith/rand90.c @@ -0,0 +1,96 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static int *g_2 = (void*)0; +static short g_4 = 0xCE96L; +static signed char func_1(void); +static signed char func_1(void) +{ + int **l_3[9][10] = {{(void*)0, &g_2, &g_2, (void*)0, (void*)0, &g_2, &g_2, &g_2, &g_2, &g_2}, {(void*)0, &g_2, &g_2, (void*)0, (void*)0, &g_2, &g_2, &g_2, &g_2, &g_2}, {(void*)0, &g_2, &g_2, (void*)0, (void*)0, &g_2, &g_2, &g_2, &g_2, &g_2}, {(void*)0, &g_2, &g_2, (void*)0, (void*)0, &g_2, &g_2, &g_2, &g_2, &g_2}, {(void*)0, &g_2, &g_2, (void*)0, (void*)0, &g_2, &g_2, &g_2, &g_2, &g_2}, {(void*)0, &g_2, &g_2, (void*)0, (void*)0, &g_2, &g_2, &g_2, &g_2, &g_2}, {(void*)0, &g_2, &g_2, (void*)0, (void*)0, &g_2, &g_2, &g_2, &g_2, &g_2}, {(void*)0, &g_2, &g_2, (void*)0, (void*)0, &g_2, &g_2, &g_2, &g_2, &g_2}, {(void*)0, &g_2, &g_2, (void*)0, (void*)0, &g_2, &g_2, &g_2, &g_2, &g_2}}; + int l_5 = (-6L); + int i, j; + step_hash(1); + g_2 = g_2; + step_hash(2); + l_5 = g_4; + step_hash(3); + return g_4; +} +void csmith_compute_hash(void) +{ + transparent_crc(g_4, "g_4", print_hash_value); +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand90.expect b/src/tests/csmith/rand90.expect new file mode 100644 index 0000000..1fd03ff --- /dev/null +++ b/src/tests/csmith/rand90.expect @@ -0,0 +1,8 @@ +...checksum after hashing g_4 : 9C78C8D1 +before stmt(1): checksum = 9C78C8D1 +...checksum after hashing g_4 : 9C78C8D1 +before stmt(2): checksum = 9C78C8D1 +...checksum after hashing g_4 : 9C78C8D1 +before stmt(3): checksum = 9C78C8D1 +...checksum after hashing g_4 : 9C78C8D1 +checksum = 9c78c8d1 diff --git a/src/tests/csmith/rand91.c b/src/tests/csmith/rand91.c new file mode 100644 index 0000000..4daa149 --- /dev/null +++ b/src/tests/csmith/rand91.c @@ -0,0 +1,88 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static unsigned char g_2 = 252UL; +static unsigned func_1(void); +static unsigned func_1(void) +{ + step_hash(1); + return g_2; +} +void csmith_compute_hash(void) +{ + transparent_crc(g_2, "g_2", print_hash_value); +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand91.expect b/src/tests/csmith/rand91.expect new file mode 100644 index 0000000..314eabc --- /dev/null +++ b/src/tests/csmith/rand91.expect @@ -0,0 +1,4 @@ +...checksum after hashing g_2 : EDF47603 +before stmt(1): checksum = EDF47603 +...checksum after hashing g_2 : EDF47603 +checksum = edf47603 diff --git a/src/tests/csmith/rand92.c b/src/tests/csmith/rand92.c new file mode 100644 index 0000000..165c816 --- /dev/null +++ b/src/tests/csmith/rand92.c @@ -0,0 +1,1655 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static int g_2 = 0x68EC0AE9L; +static int g_6 = 7L; +static int g_8 = 2L; +static unsigned char g_11 = 0x41L; +static int g_42 = (-1L); +static signed char g_45 = 0x7EL; +static short g_46 = 0L; +static unsigned short g_58 = 65535UL; +static int *g_82 = &g_6; +static int **g_81 = &g_82; +static unsigned short g_103 = 3UL; +static signed char g_149 = 0x45L; +static int g_210 = 0L; +static int g_303 = 0xE5B87094L; +static unsigned char g_305 = 0UL; +static signed char g_331[9][1] = {{(-3L)}, {(-3L)}, {(-3L)}, {(-3L)}, {(-3L)}, {(-3L)}, {(-3L)}, {(-3L)}, {(-3L)}}; +static unsigned g_332 = 0xC584E066L; +static unsigned short g_340[9] = {0UL, 0x1407L, 0UL, 0x1407L, 0UL, 0x1407L, 0UL, 0x1407L, 0UL}; +static unsigned short g_396 = 0x1A5CL; +static unsigned char g_412 = 0x38L; +static unsigned g_441 = 0x01594FE4L; +static unsigned char g_467[8] = {0xC1L, 0x71L, 0xC1L, 0x71L, 0xC1L, 0x71L, 0xC1L, 0x71L}; +static unsigned g_474 = 0x2063382BL; +static int g_481 = 0x76F57C1EL; +static int g_482 = 0x669907E1L; +static short g_483 = 8L; +static unsigned g_484[10] = {0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL}; +static unsigned short g_518 = 0UL; +static signed char g_523 = 1L; +static unsigned g_545 = 0xD5BFFF3AL; +static int g_556[8] = {1L, 0x8AC4478BL, 1L, 0x8AC4478BL, 1L, 0x8AC4478BL, 1L, 0x8AC4478BL}; +static int g_557 = 0x21D1FC7FL; +static unsigned short g_558 = 4UL; +static int **g_612 = &g_82; +static int g_620 = 0L; +static int g_621 = 0xA7EF65A4L; +static int *g_632[7] = {&g_6, &g_6, &g_210, &g_6, &g_6, &g_210, &g_6}; +static int **g_755 = (void*)0; +static int *g_1172[3][1] = {{(void*)0}, {(void*)0}, {(void*)0}}; +static unsigned short g_1201[1] = {65535UL}; +static short func_1(void); +static int ** func_16(int ** p_17, signed char p_18, int * p_19, int * p_20, int ** p_21); +static int ** func_22(int * p_23, int ** p_24, int * p_25, int p_26, unsigned char p_27); +static int * func_28(int * p_29); +static int * func_30(int * p_31, short p_32, int ** p_33, int p_34, short p_35); +static int * func_36(int ** p_37, int ** p_38); +static unsigned char func_87(unsigned p_88); +static signed char func_110(unsigned p_111, int ** p_112, int * p_113, int * p_114, int ** p_115); +static unsigned func_116(unsigned short p_117, unsigned char p_118, short p_119, unsigned short p_120); +static short func_123(short p_124); +static short func_1(void) +{ + int *l_1042[2][7] = {{&g_210, &g_42, &g_210, &g_42, &g_210, &g_42, &g_210}, {&g_210, &g_42, &g_210, &g_42, &g_210, &g_42, &g_210}}; + int **l_1198 = &g_632[4]; + signed char l_1211 = 0xE0L; + int i, j; + step_hash(885); + for (g_2 = 0; (g_2 < (-9)); g_2 -= 8) + { + signed char l_5[9]; + int **l_39[5]; + unsigned l_1199 = 4294967291UL; + unsigned char l_1200 = 0xF1L; + int l_1218[5] = {(-4L), 0xA44FD442L, (-4L), 0xA44FD442L, (-4L)}; + int i; + for (i = 0; i < 9; i++) + l_5[i] = 0x38L; + for (i = 0; i < 5; i++) + l_39[i] = (void*)0; + step_hash(883); + for (g_6 = 3; (g_6 <= 8); g_6 += 1) + { + int *l_7 = &g_8; + int *l_9 = (void*)0; + int *l_10[3]; + int ***l_1210 = &l_1198; + int i; + for (i = 0; i < 3; i++) + l_10[i] = &g_8; + step_hash(7); + ++g_11; + } + step_hash(884); + l_1218[1] |= ((g_340[7] >= 0L) >= (((((0x26C593DBL | g_441) ^ (**l_1198)) & (g_1201[0] ^ (**l_1198))) <= ((unsigned short)((((((int)(**g_81) - (int)func_116(func_116(g_484[5], g_149, g_518, g_481), g_305, g_484[4], g_46)) < (**l_1198)) && g_396) != 1L) | 0UL) + (unsigned short)(-7L))) & g_481)); + } + step_hash(900); + for (g_58 = 0; (g_58 >= 17); g_58 += 6) + { + unsigned char l_1223 = 0x31L; + int **l_1228 = &l_1042[1][1]; + step_hash(893); + for (g_42 = 0; (g_42 <= 6); g_42 += 1) + { + step_hash(892); + return g_11; + } + step_hash(898); + for (g_6 = 0; (g_6 <= (-2)); g_6--) + { + unsigned short l_1226 = 0x1A70L; + int **l_1227 = &l_1042[0][5]; + int ***l_1229[4] = {&l_1227, &g_612, &l_1227, &g_612}; + int i; + step_hash(897); + g_755 = &g_1172[2][0]; + } + step_hash(899); + (*l_1228) = func_28(func_28((*l_1198))); + } + step_hash(901); + return g_483; +} +static int ** func_16(int ** p_17, signed char p_18, int * p_19, int * p_20, int ** p_21) +{ + unsigned short l_1114[1][10]; + int **l_1136[10] = {&g_632[3], &g_632[3], &g_632[3], &g_632[3], &g_632[3], &g_632[3], &g_632[3], &g_632[3], &g_632[3], &g_632[3]}; + unsigned char l_1146 = 0UL; + int **l_1151[1]; + unsigned short l_1174 = 65531UL; + int **l_1193 = &g_82; + int i, j; + for (i = 0; i < 1; i++) + { + for (j = 0; j < 10; j++) + l_1114[i][j] = 0x87B6L; + } + for (i = 0; i < 1; i++) + l_1151[i] = &g_632[3]; + step_hash(851); + for (g_210 = 0; (g_210 >= 0); g_210 -= 1) + { + unsigned l_1112 = 0UL; + signed char l_1113 = 0xA8L; + unsigned char l_1135 = 0UL; + int l_1147[6][7] = {{0x312BDF80L, 0x312BDF80L, 6L, 2L, 0x4D3BE362L, 1L, (-8L)}, {0x312BDF80L, 0x312BDF80L, 6L, 2L, 0x4D3BE362L, 1L, (-8L)}, {0x312BDF80L, 0x312BDF80L, 6L, 2L, 0x4D3BE362L, 1L, (-8L)}, {0x312BDF80L, 0x312BDF80L, 6L, 2L, 0x4D3BE362L, 1L, (-8L)}, {0x312BDF80L, 0x312BDF80L, 6L, 2L, 0x4D3BE362L, 1L, (-8L)}, {0x312BDF80L, 0x312BDF80L, 6L, 2L, 0x4D3BE362L, 1L, (-8L)}}; + int **l_1165 = (void*)0; + int i, j; + step_hash(773); + for (g_523 = 0; (g_523 <= 8); g_523 += 1) + { + int i, j; + step_hash(771); + l_1112 = g_331[g_523][g_210]; + step_hash(772); + l_1113 = g_331[g_523][g_210]; + } + step_hash(774); + if (l_1114[0][9]) + continue; + step_hash(817); + if (((signed char)((signed char)((unsigned char)((0x820E0D26L <= (((signed char)p_18 + (signed char)(((unsigned)p_18 / (unsigned)(((unsigned char)p_18 * (unsigned char)((p_18 > (p_18 > p_18)) ^ g_467[5])) ^ l_1113)) | l_1113)) || 0UL)) != g_6) / (unsigned char)l_1114[0][6]) << (signed char)l_1114[0][2]) + (signed char)l_1112)) + { + int *l_1127 = &g_210; + unsigned short l_1140 = 0xC40AL; + step_hash(802); + if ((l_1127 == p_20)) + { + int **l_1132 = &g_632[3]; + int *l_1137 = &g_482; + step_hash(785); + for (g_620 = 0; (g_620 <= 0); g_620 += 1) + { + step_hash(784); + if (((unsigned short)((unsigned)g_483 + (unsigned)1UL) * (unsigned short)p_18)) + { + step_hash(781); + return l_1132; + } + else + { + int *l_1133 = &g_481; + step_hash(783); + (*l_1133) = l_1114[0][6]; + } + } + step_hash(786); + (*p_21) = l_1127; + step_hash(799); + for (g_332 = 0; (g_332 <= 0); g_332 += 1) + { + int *l_1138 = (void*)0; + step_hash(795); + for (g_46 = 0; (g_46 <= 8); g_46 += 1) + { + int l_1134 = 4L; + step_hash(793); + l_1135 ^= l_1134; + step_hash(794); + (*l_1132) = l_1137; + } + step_hash(796); + if ((**p_21)) + break; + } + } + else + { + int l_1139 = 3L; + step_hash(801); + l_1139 |= l_1112; + } + step_hash(803); + if (l_1112) + continue; + step_hash(804); + l_1140--; + step_hash(813); + for (g_545 = 2; (g_545 <= 8); g_545 += 1) + { + step_hash(812); + for (g_149 = 0; (g_149 >= 0); g_149 -= 1) + { + unsigned char l_1143 = 0xAEL; + step_hash(811); + l_1143--; + } + } + } + else + { + int **l_1150 = &g_632[5]; + step_hash(815); + l_1147[3][3] |= l_1146; + step_hash(816); + (*g_612) = &l_1147[5][4]; + } + step_hash(818); + l_1147[3][3] ^= (*p_19); + step_hash(850); + for (g_620 = 0; (g_620 <= 8); g_620 += 1) + { + unsigned short l_1166 = 65526UL; + int l_1173 = 0L; + unsigned short l_1187 = 1UL; + step_hash(849); + if ((l_1166 == l_1166)) + { + int *l_1171[3]; + int i; + for (i = 0; i < 3; i++) + l_1171[i] = &g_621; + step_hash(836); + if ((!(((int)((short)8L * (short)((l_1171[2] != g_1172[2][0]) ^ p_18)) - (int)p_18) & g_11))) + { + step_hash(829); + for (g_481 = 0; (g_481 >= 0); g_481 -= 1) + { + int i; + step_hash(827); + l_1173 = (~(&l_1151[g_210] == &p_21)); + step_hash(828); + l_1174 |= ((void*)0 != &p_21); + } + } + else + { + unsigned l_1176 = 1UL; + step_hash(835); + for (l_1173 = 0; (l_1173 <= 8); l_1173 += 1) + { + int l_1175 = 0x23AB39E0L; + step_hash(834); + l_1176++; + } + } + } + else + { + signed char l_1188 = 0x22L; + step_hash(838); + (*p_17) = &l_1173; + step_hash(843); + for (g_45 = 0; (g_45 <= 8); g_45 += 1) + { + unsigned char l_1189 = 246UL; + step_hash(842); + l_1189 = (((unsigned short)l_1173 << (unsigned short)(l_1173 || ((unsigned char)(0xCC172E96L >= (+((p_18 < ((((g_523 && (((unsigned)g_11 / (unsigned)(((0xB253L <= ((+(p_18 == l_1187)) >= l_1166)) <= g_332) ^ l_1188)) || p_18)) >= p_18) ^ 0xC140BEB8L) & 0x9CL)) >= g_523))) / (unsigned char)p_18))) == g_481); + } + step_hash(848); + for (g_481 = 0; (g_481 <= 0); g_481 += 1) + { + step_hash(847); + if (l_1188) + break; + } + } + } + } + step_hash(858); + for (g_481 = 5; (g_481 < (-7)); --g_481) + { + int *l_1192 = &g_210; + step_hash(855); + (*g_612) = p_19; + step_hash(856); + (*p_17) = l_1192; + step_hash(857); + if ((*p_20)) + continue; + } + step_hash(859); + return l_1193; +} +static int ** func_22(int * p_23, int ** p_24, int * p_25, int p_26, unsigned char p_27) +{ + int *l_1047 = &g_482; + unsigned short l_1052 = 0x4D61L; + unsigned char l_1054 = 255UL; + int l_1073 = 0L; + int ***l_1082 = &g_81; + int l_1101 = (-3L); + int l_1103 = 1L; + int l_1104 = (-1L); + step_hash(760); + if (((unsigned short)(g_481 != ((g_620 & (((((unsigned)(l_1047 == l_1047) % (unsigned)((signed char)(((short)(g_396 && p_27) << (short)2) && (-10L)) + (signed char)(*l_1047))) != p_26) ^ (*l_1047)) & l_1052)) && p_26)) * (unsigned short)p_27)) + { + step_hash(716); + return &g_632[0]; + } + else + { + int *l_1053[2]; + int i; + for (i = 0; i < 2; i++) + l_1053[i] = &g_210; + step_hash(718); + ++l_1054; + step_hash(759); + if ((*l_1047)) + { + int ***l_1061 = &g_755; + int l_1064 = 0x2414C1E4L; + step_hash(730); + for (g_42 = 0; (g_42 > (-29)); g_42 -= 5) + { + step_hash(728); + for (g_557 = 0; (g_557 != 12); g_557 += 6) + { + step_hash(726); + l_1053[1] = func_36(&l_1053[1], &l_1047); + step_hash(727); + return &g_632[3]; + } + step_hash(729); + return &g_82; + } + step_hash(731); + (*l_1061) = &p_25; + step_hash(732); + l_1064 ^= ((~((signed char)(~(-1L)) * (signed char)(&p_25 == &g_82))) && (*p_25)); + } + else + { + unsigned l_1072 = 0xA0344524L; + int l_1100[2]; + int *l_1110 = &g_6; + int i; + for (i = 0; i < 2; i++) + l_1100[i] = 1L; + step_hash(740); + for (g_621 = 5; (g_621 >= 3); g_621 -= 1) + { + int *l_1065 = &g_303; + int i; + step_hash(737); + (*p_24) = l_1065; + step_hash(738); + (*p_25) = (((unsigned short)g_340[(g_621 + 2)] / (unsigned short)65532UL) ^ (**p_24)); + step_hash(739); + p_26 |= ((signed char)g_558 - (signed char)func_110((*l_1065), &g_632[3], (*p_24), (*g_612), &g_632[4])); + } + step_hash(741); + l_1073 &= (g_46 < ((int)l_1072 / (int)(*p_25))); + step_hash(757); + for (g_474 = 2; (g_474 < 54); ++g_474) + { + unsigned l_1078 = 5UL; + int l_1105 = (-3L); + unsigned l_1107[9][4]; + int i, j; + for (i = 0; i < 9; i++) + { + for (j = 0; j < 4; j++) + l_1107[i][j] = 1UL; + } + step_hash(745); + (*g_612) = &l_1073; + step_hash(756); + if ((((signed char)((l_1078 ^ (p_27 != ((-(unsigned short)((short)0xB2B5L * (short)l_1072)) & (&g_755 == &p_24)))) >= p_26) + (signed char)(l_1082 == &p_24)) & 4294967294UL)) + { + short l_1099 = 0x8583L; + int l_1106 = 0x2C6592A9L; + step_hash(747); + (*p_24) = func_30((**l_1082), ((signed char)((unsigned short)p_26 >> (unsigned short)9) << (signed char)g_523), &g_632[4], (*p_25), ((unsigned short)(((signed char)((void*)0 != &p_24) * (signed char)9L) > ((unsigned char)((unsigned char)l_1072 + (unsigned char)p_26) << (unsigned char)4)) >> (unsigned short)4)); + step_hash(753); + for (g_545 = 0; (g_545 <= 7); g_545 += 1) + { + int l_1095 = (-2L); + int l_1096 = (-1L); + int l_1097 = 0x552B2F47L; + int l_1098 = (-1L); + int l_1102[4]; + int i; + for (i = 0; i < 4; i++) + l_1102[i] = 1L; + step_hash(751); + if (g_556[g_545]) + break; + step_hash(752); + ++l_1107[6][3]; + } + } + else + { + step_hash(755); + return &g_632[5]; + } + } + step_hash(758); + (**l_1082) = func_28(l_1110); + } + } + step_hash(761); + (*p_25) ^= (-1L); + step_hash(762); + (*g_81) = func_36((*l_1082), (*l_1082)); + step_hash(763); + return &g_632[1]; +} +static int * func_28(int * p_29) +{ + unsigned short l_1036 = 65533UL; + int l_1037 = 0xF7868DE4L; + int *l_1038[3][3]; + unsigned l_1039 = 0x4BBC5A7EL; + int i, j; + for (i = 0; i < 3; i++) + { + for (j = 0; j < 3; j++) + l_1038[i][j] = &g_210; + } + step_hash(709); + (*g_612) = p_29; + step_hash(710); + l_1036 &= (*g_82); + step_hash(711); + (*g_81) = (*g_612); + step_hash(712); + --l_1039; + step_hash(713); + return p_29; +} + + + + + + + +static int * func_30(int * p_31, short p_32, int ** p_33, int p_34, short p_35) +{ + unsigned l_762 = 0x3243E815L; + int l_766 = 0xCB78B72FL; + unsigned l_780 = 7UL; + int l_804[10] = {0x89AAFC3BL, 0xC8EDC4B5L, 0x89AAFC3BL, 0xC8EDC4B5L, 0x89AAFC3BL, 0xC8EDC4B5L, 0x89AAFC3BL, 0xC8EDC4B5L, 0x89AAFC3BL, 0xC8EDC4B5L}; + unsigned l_809 = 0UL; + int l_845[4]; + unsigned short l_873 = 0x4D9FL; + unsigned char l_953[9][9] = {{0x5CL, 9UL, 251UL, 251UL, 9UL, 0x5CL, 1UL, 0x4AL, 255UL}, {0x5CL, 9UL, 251UL, 251UL, 9UL, 0x5CL, 1UL, 0x4AL, 255UL}, {0x5CL, 9UL, 251UL, 251UL, 9UL, 0x5CL, 1UL, 0x4AL, 255UL}, {0x5CL, 9UL, 251UL, 251UL, 9UL, 0x5CL, 1UL, 0x4AL, 255UL}, {0x5CL, 9UL, 251UL, 251UL, 9UL, 0x5CL, 1UL, 0x4AL, 255UL}, {0x5CL, 9UL, 251UL, 251UL, 9UL, 0x5CL, 1UL, 0x4AL, 255UL}, {0x5CL, 9UL, 251UL, 251UL, 9UL, 0x5CL, 1UL, 0x4AL, 255UL}, {0x5CL, 9UL, 251UL, 251UL, 9UL, 0x5CL, 1UL, 0x4AL, 255UL}, {0x5CL, 9UL, 251UL, 251UL, 9UL, 0x5CL, 1UL, 0x4AL, 255UL}}; + int i, j; + for (i = 0; i < 4; i++) + l_845[i] = 0x243A6AB7L; + step_hash(700); + for (g_412 = 0; (g_412 <= 7); g_412 += 1) + { + unsigned l_777 = 0xCAE93D8BL; + int l_794 = 1L; + int l_799 = 1L; + int l_800[8][3] = {{(-1L), 9L, (-1L)}, {(-1L), 9L, (-1L)}, {(-1L), 9L, (-1L)}, {(-1L), 9L, (-1L)}, {(-1L), 9L, (-1L)}, {(-1L), 9L, (-1L)}, {(-1L), 9L, (-1L)}, {(-1L), 9L, (-1L)}}; + int l_815 = 0x96C6C66BL; + int **l_821 = (void*)0; + unsigned l_831 = 0x153F9D67L; + int l_872[5][4] = {{0xCD0EA6B3L, (-2L), 8L, 8L}, {0xCD0EA6B3L, (-2L), 8L, 8L}, {0xCD0EA6B3L, (-2L), 8L, 8L}, {0xCD0EA6B3L, (-2L), 8L, 8L}, {0xCD0EA6B3L, (-2L), 8L, 8L}}; + int *l_952 = &g_557; + unsigned short l_1021 = 0UL; + int i, j; + step_hash(534); + if (l_762) + break; + step_hash(562); + for (g_11 = 2; (g_11 <= 6); g_11 += 1) + { + int *l_779 = &g_621; + int l_796 = 0L; + int l_797 = 0x44223930L; + int l_801 = 0xCFA3204CL; + int l_806[2]; + int i; + for (i = 0; i < 2; i++) + l_806[i] = 0x535A12B9L; + step_hash(542); + for (g_46 = 6; (g_46 >= 0); g_46 -= 1) + { + int i; + step_hash(541); + if ((**g_612)) + break; + } + step_hash(561); + for (g_620 = 0; (g_620 <= 7); g_620 += 1) + { + int *l_765[1]; + signed char l_808 = (-1L); + int i; + for (i = 0; i < 1; i++) + l_765[i] = &g_210; + step_hash(546); + l_766 &= (((void*)0 == (*g_81)) & ((unsigned short)g_620 >> (unsigned short)p_34)); + step_hash(560); + for (p_35 = 0; (p_35 <= 7); p_35 += 1) + { + int **l_778 = (void*)0; + unsigned short l_793 = 65535UL; + int l_795[4][1] = {{(-1L)}, {(-1L)}, {(-1L)}, {(-1L)}}; + int i, j; + step_hash(550); + (*l_779) &= l_780; + step_hash(551); + (*l_779) |= ((unsigned char)((signed char)g_331[5][0] << (signed char)5) << (unsigned char)((signed char)((signed char)p_35 + (signed char)((unsigned short)0xEC01L * (unsigned short)(!p_34))) - (signed char)(p_34 > ((unsigned short)g_396 + (unsigned short)p_35)))); + step_hash(552); + g_632[g_11] = (*g_81); + step_hash(559); + if ((p_32 == l_793)) + { + short l_798 = 0x3E61L; + int l_802 = 0x1BC74F75L; + int l_803 = (-1L); + int l_805 = 0xF2F451F0L; + int l_807[8][3] = {{(-1L), (-1L), 1L}, {(-1L), (-1L), 1L}, {(-1L), (-1L), 1L}, {(-1L), (-1L), 1L}, {(-1L), (-1L), 1L}, {(-1L), (-1L), 1L}, {(-1L), (-1L), 1L}, {(-1L), (-1L), 1L}}; + int i, j; + step_hash(554); + ++l_809; + step_hash(555); + (*g_612) = (*g_612); + step_hash(556); + l_815 &= ((((-(unsigned)0xE5E1E1FBL) < 255UL) != ((-1L) || ((unsigned)(1L | (*l_779)) - (unsigned)5UL))) || 0x373DL); + } + else + { + int *l_816[4]; + int i; + for (i = 0; i < 4; i++) + l_816[i] = &g_557; + step_hash(558); + return l_816[3]; + } + } + } + } + } + step_hash(706); + for (p_32 = 23; (p_32 >= 15); p_32 -= 2) + { + signed char l_1026 = 1L; + int l_1027 = 1L; + int *l_1028 = &l_804[5]; + int *l_1029 = &g_557; + int *l_1030 = &l_1027; + int *l_1031[5]; + signed char l_1032 = (-1L); + unsigned char l_1033 = 0UL; + int i; + for (i = 0; i < 5; i++) + l_1031[i] = &l_804[1]; + step_hash(704); + l_1027 = l_1026; + step_hash(705); + --l_1033; + } + step_hash(707); + return (*g_81); +} + + + + + + + +static int * func_36(int ** p_37, int ** p_38) +{ + unsigned short l_40[10][7] = {{65535UL, 0x3E5EL, 0xF8B2L, 1UL, 1UL, 0xF8B2L, 0x3E5EL}, {65535UL, 0x3E5EL, 0xF8B2L, 1UL, 1UL, 0xF8B2L, 0x3E5EL}, {65535UL, 0x3E5EL, 0xF8B2L, 1UL, 1UL, 0xF8B2L, 0x3E5EL}, {65535UL, 0x3E5EL, 0xF8B2L, 1UL, 1UL, 0xF8B2L, 0x3E5EL}, {65535UL, 0x3E5EL, 0xF8B2L, 1UL, 1UL, 0xF8B2L, 0x3E5EL}, {65535UL, 0x3E5EL, 0xF8B2L, 1UL, 1UL, 0xF8B2L, 0x3E5EL}, {65535UL, 0x3E5EL, 0xF8B2L, 1UL, 1UL, 0xF8B2L, 0x3E5EL}, {65535UL, 0x3E5EL, 0xF8B2L, 1UL, 1UL, 0xF8B2L, 0x3E5EL}, {65535UL, 0x3E5EL, 0xF8B2L, 1UL, 1UL, 0xF8B2L, 0x3E5EL}, {65535UL, 0x3E5EL, 0xF8B2L, 1UL, 1UL, 0xF8B2L, 0x3E5EL}}; + int l_47[7]; + int l_56[5]; + int l_57 = 0L; + int *l_754[1][10]; + int i, j; + for (i = 0; i < 7; i++) + l_47[i] = (-1L); + for (i = 0; i < 5; i++) + l_56[i] = 0x8BA832A4L; + for (i = 0; i < 1; i++) + { + for (j = 0; j < 10; j++) + l_754[i][j] = &g_42; + } + step_hash(528); + for (g_11 = 0; (g_11 <= 6); g_11 += 1) + { + unsigned short l_48 = 65530UL; + int *l_51 = &g_42; + int *l_52 = &g_8; + int *l_53 = (void*)0; + int *l_54 = (void*)0; + int *l_55[3][2]; + int **l_61[10][8] = {{&l_54, &l_55[0][1], (void*)0, &l_55[0][1], &l_51, &l_53, &l_54, &l_55[0][1]}, {&l_54, &l_55[0][1], (void*)0, &l_55[0][1], &l_51, &l_53, &l_54, &l_55[0][1]}, {&l_54, &l_55[0][1], (void*)0, &l_55[0][1], &l_51, &l_53, &l_54, &l_55[0][1]}, {&l_54, &l_55[0][1], (void*)0, &l_55[0][1], &l_51, &l_53, &l_54, &l_55[0][1]}, {&l_54, &l_55[0][1], (void*)0, &l_55[0][1], &l_51, &l_53, &l_54, &l_55[0][1]}, {&l_54, &l_55[0][1], (void*)0, &l_55[0][1], &l_51, &l_53, &l_54, &l_55[0][1]}, {&l_54, &l_55[0][1], (void*)0, &l_55[0][1], &l_51, &l_53, &l_54, &l_55[0][1]}, {&l_54, &l_55[0][1], (void*)0, &l_55[0][1], &l_51, &l_53, &l_54, &l_55[0][1]}, {&l_54, &l_55[0][1], (void*)0, &l_55[0][1], &l_51, &l_53, &l_54, &l_55[0][1]}, {&l_54, &l_55[0][1], (void*)0, &l_55[0][1], &l_51, &l_53, &l_54, &l_55[0][1]}}; + int *l_62[10][5]; + unsigned l_751[10][2] = {{0x0B60085EL, 0xD350C211L}, {0x0B60085EL, 0xD350C211L}, {0x0B60085EL, 0xD350C211L}, {0x0B60085EL, 0xD350C211L}, {0x0B60085EL, 0xD350C211L}, {0x0B60085EL, 0xD350C211L}, {0x0B60085EL, 0xD350C211L}, {0x0B60085EL, 0xD350C211L}, {0x0B60085EL, 0xD350C211L}, {0x0B60085EL, 0xD350C211L}}; + int i, j; + for (i = 0; i < 3; i++) + { + for (j = 0; j < 2; j++) + l_55[i][j] = &l_47[5]; + } + for (i = 0; i < 10; i++) + { + for (j = 0; j < 5; j++) + l_62[i][j] = &l_47[1]; + } + step_hash(17); + for (g_8 = 0; (g_8 <= 6); g_8 += 1) + { + int *l_41 = &g_42; + int *l_43 = (void*)0; + int *l_44[10][2] = {{(void*)0, &g_6}, {(void*)0, &g_6}, {(void*)0, &g_6}, {(void*)0, &g_6}, {(void*)0, &g_6}, {(void*)0, &g_6}, {(void*)0, &g_6}, {(void*)0, &g_6}, {(void*)0, &g_6}, {(void*)0, &g_6}}; + int i, j; + step_hash(16); + l_48--; + } + step_hash(18); + g_58--; + step_hash(19); + l_62[0][1] = &g_2; + step_hash(513); + (*l_52) = (g_58 ^ ((short)((signed char)((unsigned char)((short)(~((unsigned short)((unsigned short)((g_11 != (&l_57 == (void*)0)) < ((((unsigned char)(((unsigned short)(p_38 == g_81) * (unsigned short)(-1L)) != ((unsigned short)((unsigned char)func_87(g_11) << (unsigned char)g_11) % (unsigned short)(-1L))) >> (unsigned char)3) < l_47[5]) != 0xB542L)) % (unsigned short)l_57) / (unsigned short)l_56[1])) * (short)l_751[9][0]) * (unsigned char)251UL) << (signed char)g_467[5]) << (short)g_620)); + step_hash(527); + for (g_103 = 1; (g_103 <= 6); g_103 += 1) + { + step_hash(526); + for (g_558 = 2; (g_558 <= 8); g_558 += 1) + { + unsigned l_752 = 1UL; + step_hash(525); + for (g_481 = 1; (g_481 <= 6); g_481 += 1) + { + int *l_753 = (void*)0; + int i; + step_hash(523); + l_752 = g_340[(g_481 + 1)]; + step_hash(524); + return l_753; + } + } + } + } + step_hash(529); + return l_754[0][2]; +} + + + + + + + +static unsigned char func_87(unsigned p_88) +{ + unsigned l_89[9] = {4294967295UL, 4294967294UL, 4294967295UL, 4294967294UL, 4294967295UL, 4294967294UL, 4294967295UL, 4294967294UL, 4294967295UL}; + int l_100 = 0x03BE979EL; + int l_102 = (-8L); + int **l_667 = &g_632[3]; + int l_670 = 7L; + int l_716[9]; + int l_741 = 0x29F899CCL; + int l_742 = 0L; + int l_743 = 0x77AAE354L; + int l_744[1]; + int i; + for (i = 0; i < 9; i++) + l_716[i] = (-2L); + for (i = 0; i < 1; i++) + l_744[i] = 0L; + step_hash(482); + for (g_45 = 8; (g_45 >= 3); g_45 -= 1) + { + int l_99 = 0xA8980DF3L; + int *l_562[7]; + int **l_561[8][4] = {{&l_562[6], &l_562[4], &l_562[4], &l_562[4]}, {&l_562[6], &l_562[4], &l_562[4], &l_562[4]}, {&l_562[6], &l_562[4], &l_562[4], &l_562[4]}, {&l_562[6], &l_562[4], &l_562[4], &l_562[4]}, {&l_562[6], &l_562[4], &l_562[4], &l_562[4]}, {&l_562[6], &l_562[4], &l_562[4], &l_562[4]}, {&l_562[6], &l_562[4], &l_562[4], &l_562[4]}, {&l_562[6], &l_562[4], &l_562[4], &l_562[4]}}; + unsigned char l_685 = 1UL; + signed char l_697 = 1L; + int *l_699 = &g_210; + int i, j; + for (i = 0; i < 7; i++) + l_562[i] = (void*)0; + } + step_hash(483); + (*g_612) = (*g_612); + step_hash(511); + for (g_149 = 0; (g_149 <= 7); g_149 += 1) + { + int **l_724 = &g_632[4]; + short l_738 = 0xD4A6L; + int *l_739 = &g_481; + int *l_740[5][6] = {{&g_303, (void*)0, &g_303, (void*)0, &g_303, (void*)0}, {&g_303, (void*)0, &g_303, (void*)0, &g_303, (void*)0}, {&g_303, (void*)0, &g_303, (void*)0, &g_303, (void*)0}, {&g_303, (void*)0, &g_303, (void*)0, &g_303, (void*)0}, {&g_303, (void*)0, &g_303, (void*)0, &g_303, (void*)0}}; + short l_745 = 0x4ED9L; + int l_746 = 1L; + signed char l_747 = (-6L); + unsigned l_748[9][2] = {{0xD4E66103L, 0xACBE97B3L}, {0xD4E66103L, 0xACBE97B3L}, {0xD4E66103L, 0xACBE97B3L}, {0xD4E66103L, 0xACBE97B3L}, {0xD4E66103L, 0xACBE97B3L}, {0xD4E66103L, 0xACBE97B3L}, {0xD4E66103L, 0xACBE97B3L}, {0xD4E66103L, 0xACBE97B3L}, {0xD4E66103L, 0xACBE97B3L}}; + int i, j; + step_hash(509); + if (g_467[g_149]) + { + unsigned char l_726 = 1UL; + step_hash(495); + for (g_303 = 0; (g_303 > 2); ++g_303) + { + unsigned char l_723 = 2UL; + int ***l_725[3]; + int i; + for (i = 0; i < 3; i++) + l_725[i] = (void*)0; + step_hash(491); + if (p_88) + break; + step_hash(492); + if (l_723) + continue; + step_hash(493); + l_724 = l_724; + step_hash(494); + l_726 = (**l_667); + } + step_hash(496); + (*g_81) = (*l_667); + } + else + { + unsigned short l_730[10] = {0x19AFL, 0x19AFL, 0x49F5L, 0x19AFL, 0x19AFL, 0x49F5L, 0x19AFL, 0x19AFL, 0x49F5L, 0x19AFL}; + int **l_733 = &g_632[6]; + int i; + step_hash(508); + if ((**l_724)) + { + step_hash(503); + for (g_103 = 26; (g_103 == 26); ++g_103) + { + int *l_729 = &l_100; + step_hash(502); + (*l_729) = p_88; + } + } + else + { + int l_734 = 0xBD011F0EL; + int *l_737[2]; + int i; + for (i = 0; i < 2; i++) + l_737[i] = &l_670; + step_hash(505); + l_730[1]++; + step_hash(506); + l_738 = (((&g_632[0] != l_733) < l_734) & ((short)0L << (short)12)); + step_hash(507); + (*l_733) = (*l_667); + } + } + step_hash(510); + l_748[7][0]++; + } + step_hash(512); + return p_88; +} + + + + + + + +static signed char func_110(unsigned p_111, int ** p_112, int * p_113, int * p_114, int ** p_115) +{ + int ***l_569 = &g_81; + int l_583 = 1L; + unsigned l_584[5]; + int **l_616 = &g_82; + int i; + for (i = 0; i < 5; i++) + l_584[i] = 6UL; + step_hash(423); + for (g_545 = 0; (g_545 <= 7); g_545 += 1) + { + int l_578[7] = {0x739154E5L, (-1L), 0x739154E5L, (-1L), 0x739154E5L, (-1L), 0x739154E5L}; + unsigned short l_579 = 0xFC0DL; + int **l_599 = &g_82; + int i; + step_hash(413); + for (g_557 = 8; (g_557 >= 0); g_557 -= 1) + { + int l_617 = (-9L); + int i; + step_hash(411); + if ((((unsigned char)((short)(((unsigned short)(l_569 != (void*)0) * (unsigned short)((short)(((short)g_340[g_557] << (short)g_556[g_545]) >= (0x04L < ((unsigned char)(p_111 == (((unsigned short)g_303 - (unsigned short)func_116((((((g_305 ^ ((func_116(g_149, p_111, g_441, p_111) == g_58) ^ l_578[2])) > g_523) && 0x7DB9L) & 0x77L) > g_556[0]), g_340[g_557], l_579, p_111)) != g_556[0])) / (unsigned char)(-10L)))) * (short)65527UL)) >= p_111) - (short)0xF37BL) / (unsigned char)g_481) < l_578[2])) + { + int *l_580 = &g_482; + int *l_581 = &g_482; + int *l_582[10][7] = {{&l_578[0], (void*)0, &g_8, (void*)0, &l_578[0], &l_578[3], &g_8}, {&l_578[0], (void*)0, &g_8, (void*)0, &l_578[0], &l_578[3], &g_8}, {&l_578[0], (void*)0, &g_8, (void*)0, &l_578[0], &l_578[3], &g_8}, {&l_578[0], (void*)0, &g_8, (void*)0, &l_578[0], &l_578[3], &g_8}, {&l_578[0], (void*)0, &g_8, (void*)0, &l_578[0], &l_578[3], &g_8}, {&l_578[0], (void*)0, &g_8, (void*)0, &l_578[0], &l_578[3], &g_8}, {&l_578[0], (void*)0, &g_8, (void*)0, &l_578[0], &l_578[3], &g_8}, {&l_578[0], (void*)0, &g_8, (void*)0, &l_578[0], &l_578[3], &g_8}, {&l_578[0], (void*)0, &g_8, (void*)0, &l_578[0], &l_578[3], &g_8}, {&l_578[0], (void*)0, &g_8, (void*)0, &l_578[0], &l_578[3], &g_8}}; + int ***l_602 = &g_81; + short l_609 = 0x9BE4L; + unsigned l_627 = 0x516C6685L; + int i, j; + step_hash(385); + --l_584[2]; + step_hash(406); + if ((p_111 & ((unsigned char)(((unsigned char)p_111 - (unsigned char)(5UL != (((unsigned char)p_111 << (unsigned char)((unsigned short)((short)g_103 - (short)((unsigned char)((l_599 == (void*)0) & (((unsigned)((void*)0 == l_602) - (unsigned)g_396) ^ g_6)) - (unsigned char)p_111)) * (unsigned short)g_556[g_545])) ^ p_111))) || 3UL) * (unsigned char)g_441))) + { + unsigned short l_610 = 65534UL; + step_hash(394); + if ((+g_556[g_545])) + { + unsigned l_603 = 1UL; + int ***l_611[4][4] = {{&g_81, (void*)0, &l_599, (void*)0}, {&g_81, (void*)0, &l_599, (void*)0}, {&g_81, (void*)0, &l_599, (void*)0}, {&g_81, (void*)0, &l_599, (void*)0}}; + int i, j; + step_hash(388); + (*p_114) = l_603; + step_hash(389); + l_610 ^= (((short)(p_111 || g_331[5][0]) % (short)(-(unsigned short)func_116(l_578[5], p_111, p_111, ((((short)(g_441 | (l_603 | (*p_114))) * (short)(p_111 || 3L)) >= (*l_581)) && l_609)))) >= 3UL); + step_hash(390); + g_612 = &g_82; + } + else + { + step_hash(392); + (**l_569) = &g_8; + step_hash(393); + (**g_612) = l_610; + } + } + else + { + unsigned l_615 = 4294967295UL; + int l_618 = 0x38508EE6L; + int l_619 = 0L; + step_hash(405); + if (func_116(((func_116(((int)0L - (int)(((+p_111) && ((void*)0 != &p_113)) >= l_615)), (&p_113 == (void*)0), (g_340[g_557] <= ((*l_602) == l_616)), p_111) && p_111) | g_45), p_111, p_111, g_481)) + { + unsigned char l_622 = 0xD4L; + int **l_625 = &l_580; + step_hash(397); + l_622--; + step_hash(398); + if (g_556[g_545]) + break; + step_hash(399); + l_619 = (g_396 & func_116(g_396, p_111, func_116(l_622, p_111, g_305, p_111), ((((&g_82 == l_625) || p_111) ^ g_2) | g_11))); + step_hash(400); + (*g_612) = &l_617; + } + else + { + int l_626[5][2]; + int i, j; + for (i = 0; i < 5; i++) + { + for (j = 0; j < 2; j++) + l_626[i][j] = 0x839E23DCL; + } + step_hash(402); + if (l_615) + break; + step_hash(403); + l_627++; + step_hash(404); + return g_518; + } + } + } + else + { + step_hash(408); + (*p_113) &= g_305; + step_hash(409); + (*p_113) = 0xDE0A621BL; + step_hash(410); + (*g_612) = &l_578[5]; + } + step_hash(412); + (*p_114) ^= 0xF312E88FL; + } + step_hash(414); + if (g_340[g_545]) + continue; + step_hash(422); + for (g_441 = 0; (g_441 <= 7); g_441 += 1) + { + int *l_637 = (void*)0; + int l_638[9][7] = {{4L, (-1L), 6L, (-1L), 4L, 4L, 4L}, {4L, (-1L), 6L, (-1L), 4L, 4L, 4L}, {4L, (-1L), 6L, (-1L), 4L, 4L, 4L}, {4L, (-1L), 6L, (-1L), 4L, 4L, 4L}, {4L, (-1L), 6L, (-1L), 4L, 4L, 4L}, {4L, (-1L), 6L, (-1L), 4L, 4L, 4L}, {4L, (-1L), 6L, (-1L), 4L, 4L, 4L}, {4L, (-1L), 6L, (-1L), 4L, 4L, 4L}, {4L, (-1L), 6L, (-1L), 4L, 4L, 4L}}; + int *l_639 = &g_8; + int *l_640 = &g_557; + int *l_641 = &g_621; + int *l_642 = (void*)0; + unsigned short l_643[1]; + int i, j; + for (i = 0; i < 1; i++) + l_643[i] = 0xFB00L; + step_hash(418); + (*p_113) |= (((signed char)(-1L) + (signed char)g_556[g_545]) <= (func_116(g_556[g_441], (p_113 != g_632[3]), ((((signed char)(+(g_556[g_441] && ((unsigned char)p_111 + (unsigned char)(l_637 != l_637)))) << (signed char)0) | p_111) ^ g_545), p_111) | g_483)); + step_hash(419); + ++l_643[0]; + step_hash(420); + (*p_113) = (0xDCB6L || ((short)(*l_641) + (short)g_518)); + step_hash(421); + return p_111; + } + } + step_hash(424); + (**l_569) = &g_482; + step_hash(425); + (*l_616) = (*g_612); + step_hash(426); + return g_467[5]; +} + + + + + + + +static unsigned func_116(unsigned short p_117, unsigned char p_118, short p_119, unsigned short p_120) +{ + step_hash(376); + return p_117; +} + + + + + + + +static short func_123(short p_124) +{ + int *l_129 = &g_8; + short l_144 = 1L; + unsigned l_284 = 0x772E67D2L; + int l_291 = (-9L); + int l_293 = 2L; + int l_294 = (-7L); + unsigned char l_324 = 0x28L; + unsigned l_378 = 1UL; + int l_436 = 0xEEC116A2L; + int l_437 = 0x60C62E70L; + int l_439 = 0xF5582DE0L; + int l_465 = 0x9778E438L; + int l_470 = 0x6E7E9149L; + step_hash(45); + for (g_8 = 0; (g_8 <= (-15)); g_8 -= 6) + { + unsigned char l_130 = 0xE8L; + step_hash(43); + (*g_81) = l_129; + step_hash(44); + l_130 = 1L; + } + step_hash(373); + if (p_124) + { + unsigned short l_131[9]; + int *l_143 = &g_42; + unsigned l_186 = 0x6D32158AL; + int i; + for (i = 0; i < 9; i++) + l_131[i] = 1UL; + step_hash(51); + for (g_46 = 6; (g_46 >= 0); g_46 -= 1) + { + int i; + step_hash(50); + (*l_129) |= l_131[(g_46 + 2)]; + } + step_hash(107); + for (g_42 = 7; (g_42 >= 0); g_42 -= 1) + { + unsigned char l_154 = 249UL; + int *l_169 = &g_8; + int i; + step_hash(105); + if ((0x52ABL == (l_131[(g_42 + 1)] > l_131[g_42]))) + { + signed char l_142 = (-2L); + int l_168[10][8] = {{0L, 0x186BA227L, 0L, 0x186BA227L, 0L, 0x186BA227L, 0L, 0x186BA227L}, {0L, 0x186BA227L, 0L, 0x186BA227L, 0L, 0x186BA227L, 0L, 0x186BA227L}, {0L, 0x186BA227L, 0L, 0x186BA227L, 0L, 0x186BA227L, 0L, 0x186BA227L}, {0L, 0x186BA227L, 0L, 0x186BA227L, 0L, 0x186BA227L, 0L, 0x186BA227L}, {0L, 0x186BA227L, 0L, 0x186BA227L, 0L, 0x186BA227L, 0L, 0x186BA227L}, {0L, 0x186BA227L, 0L, 0x186BA227L, 0L, 0x186BA227L, 0L, 0x186BA227L}, {0L, 0x186BA227L, 0L, 0x186BA227L, 0L, 0x186BA227L, 0L, 0x186BA227L}, {0L, 0x186BA227L, 0L, 0x186BA227L, 0L, 0x186BA227L, 0L, 0x186BA227L}, {0L, 0x186BA227L, 0L, 0x186BA227L, 0L, 0x186BA227L, 0L, 0x186BA227L}, {0L, 0x186BA227L, 0L, 0x186BA227L, 0L, 0x186BA227L, 0L, 0x186BA227L}}; + int i, j; + step_hash(79); + for (g_46 = 0; (g_46 <= 8); g_46 += 1) + { + unsigned char l_137 = 246UL; + step_hash(66); + for (p_124 = 8; (p_124 >= 1); p_124 -= 1) + { + step_hash(62); + (*l_129) |= 0x4CB4AB47L; + step_hash(63); + (*l_129) = ((short)(((signed char)((!0x3CL) | (&g_82 == (void*)0)) + (signed char)(-(int)l_137)) == ((unsigned short)65528UL >> (unsigned short)((*g_81) == (void*)0))) << (short)((unsigned char)(g_42 == l_131[4]) - (unsigned char)0x61L)); + step_hash(64); + l_142 = (*g_82); + step_hash(65); + (*g_81) = (*g_81); + } + step_hash(71); + if (p_124) + { + step_hash(68); + return l_142; + } + else + { + step_hash(70); + (*g_81) = l_143; + } + step_hash(72); + l_144 = 0x897B4F3EL; + step_hash(78); + if ((**g_81)) + { + unsigned short l_155 = 0x0ECFL; + step_hash(74); + (*l_129) |= ((short)(((p_124 == ((int)l_137 / (int)(-1L))) && p_124) >= ((0x1430L || g_149) || ((((unsigned)((short)0xBC95L << (short)9) % (unsigned)(g_45 ^ l_154)) & p_124) >= l_155))) * (short)(-1L)); + } + else + { + step_hash(76); + (*l_129) = ((g_58 >= (0x5A6FL < ((l_142 ^ (0xE9L >= ((p_124 < (*l_129)) > g_8))) || (-2L)))) > p_124); + step_hash(77); + l_168[2][6] |= (p_124 || ((unsigned char)((short)((unsigned short)p_124 << (unsigned short)1) >> (short)((int)(((signed char)((int)(*l_143) + (int)g_42) >> (signed char)0) <= l_137) - (int)(&l_143 != (void*)0))) + (unsigned char)(0x1AL | g_8))); + } + } + step_hash(80); + l_169 = (*g_81); + } + else + { + int **l_201 = &l_129; + step_hash(104); + if (((unsigned char)p_124 * (unsigned char)((signed char)((signed char)((void*)0 == l_169) << (signed char)(((unsigned char)0x57L >> (unsigned char)(((unsigned short)g_45 << (unsigned short)((short)(l_129 != (*g_81)) + (short)((*l_129) > (((unsigned)((unsigned char)(*l_129) / (unsigned char)g_42) - (unsigned)0UL) > 4294967294UL)))) & 0x3CL)) == g_6)) >> (signed char)5))) + { + unsigned l_189[8] = {0x1F00607BL, 0x1F00607BL, 7UL, 0x1F00607BL, 0x1F00607BL, 7UL, 0x1F00607BL, 0x1F00607BL}; + int l_192 = 0x7C884FDEL; + int *l_197 = &g_42; + int i; + step_hash(83); + if (l_186) + break; + step_hash(89); + if (((short)p_124 - (short)((l_189[5] == ((int)p_124 / (int)(0xF75C71E7L || ((*l_143) & 0x925CL)))) | (l_192 && ((short)(((signed char)(((void*)0 != l_129) == p_124) / (signed char)g_149) != p_124) + (short)0xC222L))))) + { + int l_198[9]; + int i; + for (i = 0; i < 9; i++) + l_198[i] = 7L; + step_hash(85); + (*g_81) = l_197; + step_hash(86); + if (l_198[4]) + break; + } + else + { + step_hash(88); + return (*l_169); + } + } + else + { + unsigned l_202[10][9] = {{0x1C342DABL, 0x27B7FBD4L, 0x0575CF62L, 0x63847764L, 4294967295UL, 0x86C0DB86L, 1UL, 1UL, 0x0575CF62L}, {0x1C342DABL, 0x27B7FBD4L, 0x0575CF62L, 0x63847764L, 4294967295UL, 0x86C0DB86L, 1UL, 1UL, 0x0575CF62L}, {0x1C342DABL, 0x27B7FBD4L, 0x0575CF62L, 0x63847764L, 4294967295UL, 0x86C0DB86L, 1UL, 1UL, 0x0575CF62L}, {0x1C342DABL, 0x27B7FBD4L, 0x0575CF62L, 0x63847764L, 4294967295UL, 0x86C0DB86L, 1UL, 1UL, 0x0575CF62L}, {0x1C342DABL, 0x27B7FBD4L, 0x0575CF62L, 0x63847764L, 4294967295UL, 0x86C0DB86L, 1UL, 1UL, 0x0575CF62L}, {0x1C342DABL, 0x27B7FBD4L, 0x0575CF62L, 0x63847764L, 4294967295UL, 0x86C0DB86L, 1UL, 1UL, 0x0575CF62L}, {0x1C342DABL, 0x27B7FBD4L, 0x0575CF62L, 0x63847764L, 4294967295UL, 0x86C0DB86L, 1UL, 1UL, 0x0575CF62L}, {0x1C342DABL, 0x27B7FBD4L, 0x0575CF62L, 0x63847764L, 4294967295UL, 0x86C0DB86L, 1UL, 1UL, 0x0575CF62L}, {0x1C342DABL, 0x27B7FBD4L, 0x0575CF62L, 0x63847764L, 4294967295UL, 0x86C0DB86L, 1UL, 1UL, 0x0575CF62L}, {0x1C342DABL, 0x27B7FBD4L, 0x0575CF62L, 0x63847764L, 4294967295UL, 0x86C0DB86L, 1UL, 1UL, 0x0575CF62L}}; + int i, j; + step_hash(91); + (*l_129) &= ((signed char)(((p_124 != ((((&g_82 != l_201) <= ((p_124 & (l_202[4][4] ^ ((unsigned char)g_103 * (unsigned char)(((p_124 > g_45) <= ((signed char)((short)g_103 * (short)p_124) * (signed char)g_45)) > 8UL)))) || g_2)) ^ 2L) || p_124)) | 0xC670BDA2L) || g_6) >> (signed char)3); + step_hash(96); + for (g_8 = 0; (g_8 <= 8); g_8 += 1) + { + int *l_209 = &g_210; + step_hash(95); + (*l_209) = (**g_81); + } + step_hash(103); + for (g_8 = 2; (g_8 <= 8); g_8 += 1) + { + int *l_211 = (void*)0; + int *l_212 = &g_210; + step_hash(100); + (*g_81) = (*l_201); + step_hash(101); + (*l_212) |= (g_103 > 0xADBACC00L); + step_hash(102); + (*l_212) &= (*g_82); + } + } + } + step_hash(106); + return g_11; + } + } + else + { + int l_213 = 0x3A24A825L; + int l_224 = (-9L); + int *l_230 = &g_210; + int l_290 = 0x8BB7738AL; + int l_292 = (-10L); + signed char l_295 = (-1L); + int l_297 = (-1L); + int l_300 = (-5L); + int l_302 = (-1L); + unsigned l_316[3]; + unsigned short l_363[3]; + unsigned char l_488[8] = {0xB9L, 0x8EL, 0xB9L, 0x8EL, 0xB9L, 0x8EL, 0xB9L, 0x8EL}; + int l_522 = 0x2E96E14CL; + int i; + for (i = 0; i < 3; i++) + l_316[i] = 0xC6F64A7FL; + for (i = 0; i < 3; i++) + l_363[i] = 5UL; + step_hash(196); + if (l_213) + { + unsigned l_234 = 0UL; + int *l_262 = &g_8; + step_hash(110); + (*l_129) = (((short)p_124 * (short)(((((short)g_6 * (short)((void*)0 == &g_82)) == ((unsigned char)(p_124 ^ (p_124 & (*l_129))) + (unsigned char)(~l_213))) & p_124) == 0xBAF6L)) == (*l_129)); + step_hash(152); + for (l_213 = 0; (l_213 > (-26)); --l_213) + { + signed char l_241 = (-1L); + int **l_248 = &l_230; + step_hash(134); + if (((unsigned short)((*l_129) >= (-9L)) * (unsigned short)(0xAA7906B7L || p_124))) + { + unsigned char l_225 = 0UL; + int *l_231 = &g_42; + int *l_232 = &g_8; + int *l_233[9][1] = {{(void*)0}, {(void*)0}, {(void*)0}, {(void*)0}, {(void*)0}, {(void*)0}, {(void*)0}, {(void*)0}, {(void*)0}}; + int i, j; + step_hash(124); + if (p_124) + { + step_hash(116); + (*l_129) = l_224; + step_hash(117); + (*l_129) &= (-1L); + step_hash(118); + (*l_129) = (*l_129); + step_hash(119); + l_225++; + } + else + { + int *l_228 = (void*)0; + step_hash(121); + if ((**g_81)) + break; + step_hash(122); + (*g_81) = l_228; + step_hash(123); + (*l_129) |= l_225; + } + step_hash(129); + if (l_213) + { + unsigned l_229[7][9] = {{0xF6FDADEBL, 0xF6FDADEBL, 0x5B8B4CAAL, 0xAC24F387L, 0x8B46DE65L, 0x68103C05L, 0xD797C3EEL, 0xF6FDADEBL, 4294967286UL}, {0xF6FDADEBL, 0xF6FDADEBL, 0x5B8B4CAAL, 0xAC24F387L, 0x8B46DE65L, 0x68103C05L, 0xD797C3EEL, 0xF6FDADEBL, 4294967286UL}, {0xF6FDADEBL, 0xF6FDADEBL, 0x5B8B4CAAL, 0xAC24F387L, 0x8B46DE65L, 0x68103C05L, 0xD797C3EEL, 0xF6FDADEBL, 4294967286UL}, {0xF6FDADEBL, 0xF6FDADEBL, 0x5B8B4CAAL, 0xAC24F387L, 0x8B46DE65L, 0x68103C05L, 0xD797C3EEL, 0xF6FDADEBL, 4294967286UL}, {0xF6FDADEBL, 0xF6FDADEBL, 0x5B8B4CAAL, 0xAC24F387L, 0x8B46DE65L, 0x68103C05L, 0xD797C3EEL, 0xF6FDADEBL, 4294967286UL}, {0xF6FDADEBL, 0xF6FDADEBL, 0x5B8B4CAAL, 0xAC24F387L, 0x8B46DE65L, 0x68103C05L, 0xD797C3EEL, 0xF6FDADEBL, 4294967286UL}, {0xF6FDADEBL, 0xF6FDADEBL, 0x5B8B4CAAL, 0xAC24F387L, 0x8B46DE65L, 0x68103C05L, 0xD797C3EEL, 0xF6FDADEBL, 4294967286UL}}; + int i, j; + step_hash(126); + return l_229[1][1]; + } + else + { + step_hash(128); + (*g_81) = l_230; + } + step_hash(130); + (*l_129) = (**g_81); + step_hash(131); + l_234++; + } + else + { + step_hash(133); + return g_210; + } + step_hash(135); + if ((**g_81)) + break; + step_hash(151); + for (g_8 = (-3); (g_8 != 27); g_8++) + { + unsigned char l_258 = 255UL; + } + } + } + else + { + short l_270[4]; + int l_298 = 0xEF448E64L; + int l_299 = 0xD3C6A0BBL; + int l_301 = 0x7A19EBCAL; + int l_304 = 7L; + unsigned short l_329 = 0x13C4L; + int *l_330[10][2] = {{(void*)0, &l_302}, {(void*)0, &l_302}, {(void*)0, &l_302}, {(void*)0, &l_302}, {(void*)0, &l_302}, {(void*)0, &l_302}, {(void*)0, &l_302}, {(void*)0, &l_302}, {(void*)0, &l_302}, {(void*)0, &l_302}}; + int i, j; + for (i = 0; i < 4; i++) + l_270[i] = (-5L); + step_hash(188); + for (l_213 = 0; (l_213 != (-5)); l_213 -= 1) + { + int *l_275 = &g_42; + int l_296 = 2L; + } + step_hash(189); + g_332--; + step_hash(195); + for (p_124 = 0; (p_124 <= (-5)); --p_124) + { + int l_337 = (-10L); + int l_338 = 1L; + int l_339[2][1]; + int i, j; + for (i = 0; i < 2; i++) + { + for (j = 0; j < 1; j++) + l_339[i][j] = 0x5E9CBFC7L; + } + step_hash(193); + ++g_340[7]; + step_hash(194); + if ((*l_129)) + continue; + } + } + step_hash(226); + for (l_291 = 0; (l_291 < 29); l_291++) + { + int *l_345 = &g_303; + int *l_346 = &l_293; + int *l_347 = (void*)0; + int *l_348 = &g_210; + int *l_349 = &g_210; + int *l_350 = &l_293; + int *l_351[3][10] = {{&g_8, (void*)0, &l_297, (void*)0, &g_8, (void*)0, &l_297, (void*)0, &g_8, (void*)0}, {&g_8, (void*)0, &l_297, (void*)0, &g_8, (void*)0, &l_297, (void*)0, &g_8, (void*)0}, {&g_8, (void*)0, &l_297, (void*)0, &g_8, (void*)0, &l_297, (void*)0, &g_8, (void*)0}}; + unsigned l_352 = 0x604F5D17L; + int i, j; + step_hash(200); + --l_352; + } + step_hash(367); + if ((*l_230)) + { + unsigned l_379 = 4294967295UL; + int l_438 = 0x325822FEL; + int l_440 = 1L; + step_hash(234); + for (l_294 = 4; (l_294 >= (-8)); l_294--) + { + int *l_384 = &l_291; + step_hash(231); + (*l_230) = (((l_378 & ((((&l_294 == (void*)0) && l_379) > 0xC1L) && 247UL)) == ((signed char)((signed char)g_331[5][0] * (signed char)0x14L) << (signed char)(&g_82 == &g_82))) > g_210); + } + step_hash(267); + for (g_46 = (-7); (g_46 != (-28)); g_46 -= 3) + { + unsigned char l_395 = 0x1FL; + int *l_409 = &g_6; + int l_435 = (-1L); + step_hash(263); + if (((p_124 < (((signed char)(((*l_230) == p_124) == ((*g_81) != (*g_81))) / (signed char)6L) == ((p_124 | ((short)((signed char)((((signed char)l_395 * (signed char)(g_8 != (*l_230))) > g_396) >= 0UL) % (signed char)0xC4L) % (short)g_45)) > p_124))) | g_340[7])) + { + int l_411 = 0x56A399DBL; + step_hash(239); + (*l_129) = ((*g_82) ^ (*l_230)); + step_hash(246); + if ((*g_82)) + { + int *l_410[1][8] = {{&g_210, &g_210, &l_292, &g_210, &g_210, &l_292, &g_210, &g_210}}; + int i, j; + step_hash(241); + g_42 |= (((0x28L >= (((unsigned short)g_103 / (unsigned short)((unsigned)(g_45 && (*l_129)) / (unsigned)((unsigned char)g_331[5][0] >> (unsigned char)6))) | ((unsigned short)(((8L | (((signed char)l_379 % (signed char)((unsigned char)g_58 * (unsigned char)(l_409 != (void*)0))) ^ p_124)) | (**g_81)) | 0x4CEEL) - (unsigned short)g_8))) == 0x8FL) > 0x31L); + step_hash(242); + ++g_412; + } + else + { + int l_427 = 0x7ECD8F6BL; + step_hash(244); + (*l_129) = (((unsigned char)0x47L * (unsigned char)((unsigned char)((unsigned char)((unsigned short)(((short)(*l_129) - (short)(*l_409)) <= (2UL != l_427)) << (unsigned short)l_411) / (unsigned char)((unsigned char)g_58 + (unsigned char)((1L ^ l_379) < p_124))) * (unsigned char)(*l_129))) ^ 0x0FL); + step_hash(245); + (*g_81) = &l_293; + } + } + else + { + int *l_430 = (void*)0; + int *l_431 = (void*)0; + int *l_432 = &l_302; + int *l_433 = (void*)0; + int *l_434[5]; + int i; + for (i = 0; i < 5; i++) + l_434[i] = &l_291; + step_hash(248); + --g_441; + step_hash(256); + for (l_291 = 0; (l_291 >= (-26)); --l_291) + { + step_hash(252); + (*g_81) = &l_291; + step_hash(253); + (*l_230) ^= (*g_82); + step_hash(254); + (*g_81) = &l_435; + step_hash(255); + if ((**g_81)) + break; + } + step_hash(262); + for (l_293 = 8; (l_293 >= 1); l_293 -= 1) + { + int i; + step_hash(260); + (*l_432) = ((signed char)((!(-(unsigned)(((void*)0 == &g_82) > g_340[l_293]))) >= g_340[l_293]) >> (signed char)((g_340[l_293] < (((p_124 < p_124) > ((&l_300 == l_431) | g_441)) && (*l_129))) ^ p_124)); + step_hash(261); + (*l_432) ^= p_124; + } + } + step_hash(264); + (*l_129) = p_124; + step_hash(265); + (*l_129) = (*g_82); + step_hash(266); + return g_11; + } + step_hash(268); + (*l_230) |= ((*l_129) | 0xDA27BD15L); + } + else + { + unsigned short l_455 = 0x20F7L; + int l_460[2]; + int *l_487 = &l_300; + int ***l_497 = &g_81; + int i; + for (i = 0; i < 2; i++) + l_460[i] = 0L; + step_hash(279); + for (g_412 = 6; (g_412 < 13); g_412 += 5) + { + int **l_459 = &l_129; + int ***l_458 = &l_459; + step_hash(277); + for (l_378 = 0; (l_378 < 43); l_378 += 7) + { + int *l_453 = &g_8; + int *l_454[5][8] = {{&l_294, &l_294, &g_303, &l_300, &l_302, &l_300, &g_303, &l_294}, {&l_294, &l_294, &g_303, &l_300, &l_302, &l_300, &g_303, &l_294}, {&l_294, &l_294, &g_303, &l_300, &l_302, &l_300, &g_303, &l_294}, {&l_294, &l_294, &g_303, &l_300, &l_302, &l_300, &g_303, &l_294}, {&l_294, &l_294, &g_303, &l_300, &l_302, &l_300, &g_303, &l_294}}; + int i, j; + step_hash(276); + l_455++; + } + step_hash(278); + (*l_458) = &l_230; + } + step_hash(328); + for (l_224 = 2; (l_224 >= 0); l_224 -= 1) + { + int l_463 = 8L; + int l_464 = 6L; + int l_466[2][5] = {{0xA86D853BL, 0x53D0AA9BL, 0L, 0L, 0x53D0AA9BL}, {0xA86D853BL, 0x53D0AA9BL, 0L, 0L, 0x53D0AA9BL}}; + int i, j; + } + step_hash(329); + l_488[3]++; + step_hash(366); + if (((((((void*)0 == &g_81) >= (((unsigned short)((short)p_124 >> (short)g_474) * (unsigned short)(((void*)0 == l_497) || (((unsigned)4294967295UL / (unsigned)((signed char)(~p_124) * (signed char)(((signed char)((void*)0 == &g_81) % (signed char)255UL) < 0x6E3E5089L))) || p_124))) ^ p_124)) == 0UL) >= p_124) < g_332)) + { + int *l_505 = (void*)0; + int l_508 = (-4L); + step_hash(352); + if (p_124) + { + int *l_504 = &l_290; + step_hash(332); + l_505 = l_504; + } + else + { + unsigned short l_514 = 0xCA62L; + int l_517 = 1L; + int l_521[2]; + int i; + for (i = 0; i < 2; i++) + l_521[i] = 1L; + step_hash(334); + (**l_497) = &l_302; + step_hash(335); + (*g_81) = (**l_497); + step_hash(343); + for (l_465 = 17; (l_465 == (-25)); --l_465) + { + int *l_509 = &g_42; + int *l_510 = &l_302; + int *l_511 = (void*)0; + int *l_512 = &l_292; + int *l_513[6] = {&l_291, &l_291, &l_294, &l_291, &l_291, &l_294}; + unsigned l_524 = 0UL; + int i; + step_hash(339); + l_514--; + step_hash(340); + if ((**g_81)) + continue; + step_hash(341); + g_518--; + step_hash(342); + l_524++; + } + step_hash(351); + if (p_124) + { + step_hash(345); + (*g_81) = &l_290; + } + else + { + step_hash(347); + (**l_497) = (*g_81); + step_hash(348); + (**g_81) = (**g_81); + step_hash(349); + (*g_81) = &l_294; + step_hash(350); + (**l_497) = (void*)0; + } + } + } + else + { + unsigned char l_529 = 0UL; + int l_541 = 1L; + int l_542 = 0x63D1E85AL; + step_hash(365); + for (l_290 = 2; (l_290 >= 0); l_290 -= 1) + { + int l_543 = 0L; + int l_544 = 1L; + int i; + step_hash(357); + if (l_363[l_290]) + break; + step_hash(364); + for (l_300 = 0; (l_300 <= 9); l_300 += 1) + { + int *l_538 = &g_8; + int *l_539 = &g_210; + int *l_540[7] = {&l_470, &l_470, &l_470, &l_470, &l_470, &l_470, &l_470}; + int i; + step_hash(361); + (*l_129) = ((((((g_484[l_300] != ((((int)g_467[(l_290 + 5)] % (int)l_529) <= ((signed char)g_11 % (signed char)l_363[l_290])) || ((unsigned char)(***l_497) + (unsigned char)((int)p_124 + (int)(0xDBF5441CL < ((signed char)g_467[(l_290 + 5)] << (signed char)g_46)))))) ^ 2L) || 249UL) <= g_331[5][0]) & 4294967287UL) | (-2L)); + step_hash(362); + ++g_545; + step_hash(363); + return g_331[5][0]; + } + } + } + } + step_hash(372); + for (p_124 = (-15); (p_124 == 15); ++p_124) + { + int *l_550 = (void*)0; + int *l_551 = &l_292; + int *l_552 = &l_291; + int *l_553 = &l_292; + int *l_554 = &g_42; + int *l_555[5]; + int i; + for (i = 0; i < 5; i++) + l_555[i] = &l_300; + step_hash(371); + ++g_558; + } + } + step_hash(374); + return p_124; +} + + +void csmith_compute_hash(void) +{ + int i, j; + transparent_crc(g_2, "g_2", print_hash_value); + transparent_crc(g_6, "g_6", print_hash_value); + transparent_crc(g_8, "g_8", print_hash_value); + transparent_crc(g_11, "g_11", print_hash_value); + transparent_crc(g_42, "g_42", print_hash_value); + transparent_crc(g_45, "g_45", print_hash_value); + transparent_crc(g_46, "g_46", print_hash_value); + transparent_crc(g_58, "g_58", print_hash_value); + transparent_crc(g_103, "g_103", print_hash_value); + transparent_crc(g_149, "g_149", print_hash_value); + transparent_crc(g_210, "g_210", print_hash_value); + transparent_crc(g_303, "g_303", print_hash_value); + transparent_crc(g_305, "g_305", print_hash_value); + for (i = 0; i < 9; i++) + { + for (j = 0; j < 1; j++) + { + transparent_crc(g_331[i][j], "g_331[i][j]", print_hash_value); + if (print_hash_value) printf("index = [%d][%d]\n", i, j); + + } + } + transparent_crc(g_332, "g_332", print_hash_value); + for (i = 0; i < 9; i++) + { + transparent_crc(g_340[i], "g_340[i]", print_hash_value); + if (print_hash_value) printf("index = [%d]\n", i); + + } + transparent_crc(g_396, "g_396", print_hash_value); + transparent_crc(g_412, "g_412", print_hash_value); + transparent_crc(g_441, "g_441", print_hash_value); + for (i = 0; i < 8; i++) + { + transparent_crc(g_467[i], "g_467[i]", print_hash_value); + if (print_hash_value) printf("index = [%d]\n", i); + + } + transparent_crc(g_474, "g_474", print_hash_value); + transparent_crc(g_481, "g_481", print_hash_value); + transparent_crc(g_482, "g_482", print_hash_value); + transparent_crc(g_483, "g_483", print_hash_value); + for (i = 0; i < 10; i++) + { + transparent_crc(g_484[i], "g_484[i]", print_hash_value); + if (print_hash_value) printf("index = [%d]\n", i); + + } + transparent_crc(g_518, "g_518", print_hash_value); + transparent_crc(g_523, "g_523", print_hash_value); + transparent_crc(g_545, "g_545", print_hash_value); + for (i = 0; i < 8; i++) + { + transparent_crc(g_556[i], "g_556[i]", print_hash_value); + if (print_hash_value) printf("index = [%d]\n", i); + + } + transparent_crc(g_557, "g_557", print_hash_value); + transparent_crc(g_558, "g_558", print_hash_value); + transparent_crc(g_620, "g_620", print_hash_value); + transparent_crc(g_621, "g_621", print_hash_value); + for (i = 0; i < 1; i++) + { + transparent_crc(g_1201[i], "g_1201[i]", print_hash_value); + if (print_hash_value) printf("index = [%d]\n", i); + + } +} + +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} + + + +int main (void) +{ + int i, j; + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand92.expect b/src/tests/csmith/rand92.expect new file mode 100644 index 0000000..ef8febc --- /dev/null +++ b/src/tests/csmith/rand92.expect @@ -0,0 +1,476 @@ +...checksum after hashing g_2 : 360601F2 +...checksum after hashing g_6 : 8DE61A1 +...checksum after hashing g_8 : 26EFA843 +...checksum after hashing g_11 : 57CD7191 +...checksum after hashing g_42 : 246B160D +...checksum after hashing g_45 : FA6F5911 +...checksum after hashing g_46 : 158196B3 +...checksum after hashing g_58 : F8C585D7 +...checksum after hashing g_103 : 6A67719C +...checksum after hashing g_149 : A8F05E4E +...checksum after hashing g_210 : F01C39CF +...checksum after hashing g_303 : E5B57CF6 +...checksum after hashing g_305 : 96704B59 +...checksum after hashing g_331[i][j] : A96F5AFA +index = [0][0] +...checksum after hashing g_331[i][j] : 906906F5 +index = [1][0] +...checksum after hashing g_331[i][j] : A4F3EEF9 +index = [2][0] +...checksum after hashing g_331[i][j] : E3CE467C +index = [3][0] +...checksum after hashing g_331[i][j] : 6C729020 +index = [4][0] +...checksum after hashing g_331[i][j] : 51DA16BD +index = [5][0] +...checksum after hashing g_331[i][j] : C5FE3206 +index = [6][0] +...checksum after hashing g_331[i][j] : 3643A35A +index = [7][0] +...checksum after hashing g_331[i][j] : 3E96B2D4 +index = [8][0] +...checksum after hashing g_332 : AB9CF894 +...checksum after hashing g_340[i] : 344134F1 +index = [0] +...checksum after hashing g_340[i] : 72D25A76 +index = [1] +...checksum after hashing g_340[i] : 33E3CB7 +index = [2] +...checksum after hashing g_340[i] : D2A4CC19 +index = [3] +...checksum after hashing g_340[i] : 36566238 +index = [4] +...checksum after hashing g_340[i] : FA2B4C42 +index = [5] +...checksum after hashing g_340[i] : 42C1DD65 +index = [6] +...checksum after hashing g_340[i] : 64268BE8 +index = [7] +...checksum after hashing g_340[i] : 56EE64CF +index = [8] +...checksum after hashing g_396 : 922BFEAF +...checksum after hashing g_412 : D6F857DA +...checksum after hashing g_441 : 8C2E6899 +...checksum after hashing g_467[i] : 8630A4EE +index = [0] +...checksum after hashing g_467[i] : C18BCBB4 +index = [1] +...checksum after hashing g_467[i] : D44B45B5 +index = [2] +...checksum after hashing g_467[i] : 3C096965 +index = [3] +...checksum after hashing g_467[i] : 5AE6662F +index = [4] +...checksum after hashing g_467[i] : C556FC9F +index = [5] +...checksum after hashing g_467[i] : B1A7E1D4 +index = [6] +...checksum after hashing g_467[i] : AEF12588 +index = [7] +...checksum after hashing g_474 : 23131F6B +...checksum after hashing g_481 : 24110BDA +...checksum after hashing g_482 : 64FC6B27 +...checksum after hashing g_483 : 6F414F45 +...checksum after hashing g_484[i] : C227BF63 +index = [0] +...checksum after hashing g_484[i] : 697A2F25 +index = [1] +...checksum after hashing g_484[i] : 6407C94D +index = [2] +...checksum after hashing g_484[i] : D3DAC1B5 +index = [3] +...checksum after hashing g_484[i] : FF883338 +index = [4] +...checksum after hashing g_484[i] : ECAEA955 +index = [5] +...checksum after hashing g_484[i] : 92067957 +index = [6] +...checksum after hashing g_484[i] : 64E5EE36 +index = [7] +...checksum after hashing g_484[i] : 3EAE2723 +index = [8] +...checksum after hashing g_484[i] : 5F240365 +index = [9] +...checksum after hashing g_518 : 25C6CBB7 +...checksum after hashing g_523 : 52031374 +...checksum after hashing g_545 : C1DB2EE1 +...checksum after hashing g_556[i] : 4B471B3C +index = [0] +...checksum after hashing g_556[i] : 388A4745 +index = [1] +...checksum after hashing g_556[i] : A989436C +index = [2] +...checksum after hashing g_556[i] : 8A554E7B +index = [3] +...checksum after hashing g_556[i] : 9563FC01 +index = [4] +...checksum after hashing g_556[i] : 6E5BF69 +index = [5] +...checksum after hashing g_556[i] : DBBE1B41 +index = [6] +...checksum after hashing g_556[i] : 94AEF6B4 +index = [7] +...checksum after hashing g_557 : 9E3311F7 +...checksum after hashing g_558 : 4BAF7461 +...checksum after hashing g_620 : 39B7B7C8 +...checksum after hashing g_621 : BB6C1FE6 +...checksum after hashing g_1201[i] : 304C5906 +index = [0] +before stmt(885): checksum = 304C5906 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_6 : F8F5E7D0 +...checksum after hashing g_8 : DB1907FD +...checksum after hashing g_11 : F9AE9AFF +...checksum after hashing g_42 : 259B1FF7 +...checksum after hashing g_45 : 7FDE4576 +...checksum after hashing g_46 : C640EB4B +...checksum after hashing g_58 : 2A0525FD +...checksum after hashing g_103 : DFB70710 +...checksum after hashing g_149 : 6530C133 +...checksum after hashing g_210 : B129D700 +...checksum after hashing g_303 : CB0DCCBC +...checksum after hashing g_305 : 574D246F +...checksum after hashing g_331[i][j] : B92FCB02 +index = [0][0] +...checksum after hashing g_331[i][j] : C2A4B51B +index = [1][0] +...checksum after hashing g_331[i][j] : AE7A0160 +index = [2][0] +...checksum after hashing g_331[i][j] : 8BACB5D3 +index = [3][0] +...checksum after hashing g_331[i][j] : DA5AB4B5 +index = [4][0] +...checksum after hashing g_331[i][j] : 9B5F5104 +index = [5][0] +...checksum after hashing g_331[i][j] : ED14EFF3 +index = [6][0] +...checksum after hashing g_331[i][j] : 938E5030 +index = [7][0] +...checksum after hashing g_331[i][j] : 567965E +index = [8][0] +...checksum after hashing g_332 : AA90792F +...checksum after hashing g_340[i] : C577F347 +index = [0] +...checksum after hashing g_340[i] : 9D8D980A +index = [1] +...checksum after hashing g_340[i] : BD6ADFCF +index = [2] +...checksum after hashing g_340[i] : 25852C48 +index = [3] +...checksum after hashing g_340[i] : 4343A803 +index = [4] +...checksum after hashing g_340[i] : 56E343D3 +index = [5] +...checksum after hashing g_340[i] : 9022AE1C +index = [6] +...checksum after hashing g_340[i] : 3928A120 +index = [7] +...checksum after hashing g_340[i] : 5B9461D7 +index = [8] +...checksum after hashing g_396 : AA2CAEF5 +...checksum after hashing g_412 : 79B7B8F5 +...checksum after hashing g_441 : E749ADDF +...checksum after hashing g_467[i] : 5FF7B214 +index = [0] +...checksum after hashing g_467[i] : 4B4FC94C +index = [1] +...checksum after hashing g_467[i] : 36E6D7E7 +index = [2] +...checksum after hashing g_467[i] : F6378322 +index = [3] +...checksum after hashing g_467[i] : C224630E +index = [4] +...checksum after hashing g_467[i] : DC0B5895 +index = [5] +...checksum after hashing g_467[i] : 6B157FD5 +index = [6] +...checksum after hashing g_467[i] : 513520E7 +index = [7] +...checksum after hashing g_474 : C409C712 +...checksum after hashing g_481 : 3FFF0D44 +...checksum after hashing g_482 : 7776968C +...checksum after hashing g_483 : DE500DD +...checksum after hashing g_484[i] : A8C2C54C +index = [0] +...checksum after hashing g_484[i] : 4623F224 +index = [1] +...checksum after hashing g_484[i] : 9942D30F +index = [2] +...checksum after hashing g_484[i] : BD744244 +index = [3] +...checksum after hashing g_484[i] : B8AF3A1B +index = [4] +...checksum after hashing g_484[i] : 6385F45C +index = [5] +...checksum after hashing g_484[i] : 801DE8E6 +index = [6] +...checksum after hashing g_484[i] : 6775AFDC +index = [7] +...checksum after hashing g_484[i] : 1E7CBA28 +index = [8] +...checksum after hashing g_484[i] : F58E2892 +index = [9] +...checksum after hashing g_518 : 6884523D +...checksum after hashing g_523 : E807D6FE +...checksum after hashing g_545 : 9B83B383 +...checksum after hashing g_556[i] : D67F60A1 +index = [0] +...checksum after hashing g_556[i] : B625AA8F +index = [1] +...checksum after hashing g_556[i] : 32DC00FC +index = [2] +...checksum after hashing g_556[i] : E5D87F9B +index = [3] +...checksum after hashing g_556[i] : 3595A851 +index = [4] +...checksum after hashing g_556[i] : 326DD374 +index = [5] +...checksum after hashing g_556[i] : EAEE40B1 +index = [6] +...checksum after hashing g_556[i] : 99447C2C +index = [7] +...checksum after hashing g_557 : D0452131 +...checksum after hashing g_558 : D4E392CC +...checksum after hashing g_620 : 17A554DE +...checksum after hashing g_621 : C1980440 +...checksum after hashing g_1201[i] : 883FEFD5 +index = [0] +before stmt(900): checksum = 883FEFD5 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_6 : F8F5E7D0 +...checksum after hashing g_8 : DB1907FD +...checksum after hashing g_11 : F9AE9AFF +...checksum after hashing g_42 : 259B1FF7 +...checksum after hashing g_45 : 7FDE4576 +...checksum after hashing g_46 : C640EB4B +...checksum after hashing g_58 : 4A9817E1 +...checksum after hashing g_103 : 6BCA4BC6 +...checksum after hashing g_149 : 491223FC +...checksum after hashing g_210 : A00B075D +...checksum after hashing g_303 : B2E14821 +...checksum after hashing g_305 : 2549DB32 +...checksum after hashing g_331[i][j] : E4B7FD84 +index = [0][0] +...checksum after hashing g_331[i][j] : 8632E885 +index = [1][0] +...checksum after hashing g_331[i][j] : C12B8201 +index = [2][0] +...checksum after hashing g_331[i][j] : 95E890B0 +index = [3][0] +...checksum after hashing g_331[i][j] : A355DF31 +index = [4][0] +...checksum after hashing g_331[i][j] : 13A781FE +index = [5][0] +...checksum after hashing g_331[i][j] : B6404CA7 +index = [6][0] +...checksum after hashing g_331[i][j] : 2EB13BD0 +index = [7][0] +...checksum after hashing g_331[i][j] : 7A9416AA +index = [8][0] +...checksum after hashing g_332 : BD8A3D8C +...checksum after hashing g_340[i] : DEC41FAC +index = [0] +...checksum after hashing g_340[i] : 79864360 +index = [1] +...checksum after hashing g_340[i] : 2CBEEDD3 +index = [2] +...checksum after hashing g_340[i] : 7AF95658 +index = [3] +...checksum after hashing g_340[i] : 32626885 +index = [4] +...checksum after hashing g_340[i] : A4E3683D +index = [5] +...checksum after hashing g_340[i] : C129A226 +index = [6] +...checksum after hashing g_340[i] : 503CF828 +index = [7] +...checksum after hashing g_340[i] : E78D52AE +index = [8] +...checksum after hashing g_396 : C3E14C95 +...checksum after hashing g_412 : A2CD3BC7 +...checksum after hashing g_441 : 9AC9A20C +...checksum after hashing g_467[i] : 757D7694 +index = [0] +...checksum after hashing g_467[i] : 2A67F8FC +index = [1] +...checksum after hashing g_467[i] : 69D5E9BE +index = [2] +...checksum after hashing g_467[i] : 617822C5 +index = [3] +...checksum after hashing g_467[i] : 48BC78F5 +index = [4] +...checksum after hashing g_467[i] : 29EAEF8E +index = [5] +...checksum after hashing g_467[i] : A6AE83E0 +index = [6] +...checksum after hashing g_467[i] : C8FA6BBE +index = [7] +...checksum after hashing g_474 : CB72057A +...checksum after hashing g_481 : F322D2A +...checksum after hashing g_482 : CC4FC9F3 +...checksum after hashing g_483 : B6E3E24 +...checksum after hashing g_484[i] : 4C4DB04E +index = [0] +...checksum after hashing g_484[i] : A56C32F1 +index = [1] +...checksum after hashing g_484[i] : 5785ECEC +index = [2] +...checksum after hashing g_484[i] : AEEEA001 +index = [3] +...checksum after hashing g_484[i] : B113B594 +index = [4] +...checksum after hashing g_484[i] : D7A579C +index = [5] +...checksum after hashing g_484[i] : 144054F4 +index = [6] +...checksum after hashing g_484[i] : A95643F8 +index = [7] +...checksum after hashing g_484[i] : 53A13353 +index = [8] +...checksum after hashing g_484[i] : 9BAFA97F +index = [9] +...checksum after hashing g_518 : 8AF3E3D3 +...checksum after hashing g_523 : 344118B7 +...checksum after hashing g_545 : CFE86902 +...checksum after hashing g_556[i] : E98B2698 +index = [0] +...checksum after hashing g_556[i] : 89A7E552 +index = [1] +...checksum after hashing g_556[i] : 22F77CB1 +index = [2] +...checksum after hashing g_556[i] : BA8A8342 +index = [3] +...checksum after hashing g_556[i] : A14EA745 +index = [4] +...checksum after hashing g_556[i] : 73E41F08 +index = [5] +...checksum after hashing g_556[i] : B82862B5 +index = [6] +...checksum after hashing g_556[i] : 352A39E5 +index = [7] +...checksum after hashing g_557 : 894F667C +...checksum after hashing g_558 : 201088B3 +...checksum after hashing g_620 : B00946C9 +...checksum after hashing g_621 : 59F4D9D6 +...checksum after hashing g_1201[i] : A2D9C813 +index = [0] +before stmt(901): checksum = A2D9C813 +...checksum after hashing g_2 : 2144DF1C +...checksum after hashing g_6 : F8F5E7D0 +...checksum after hashing g_8 : DB1907FD +...checksum after hashing g_11 : F9AE9AFF +...checksum after hashing g_42 : 259B1FF7 +...checksum after hashing g_45 : 7FDE4576 +...checksum after hashing g_46 : C640EB4B +...checksum after hashing g_58 : 4A9817E1 +...checksum after hashing g_103 : 6BCA4BC6 +...checksum after hashing g_149 : 491223FC +...checksum after hashing g_210 : A00B075D +...checksum after hashing g_303 : B2E14821 +...checksum after hashing g_305 : 2549DB32 +...checksum after hashing g_331[i][j] : E4B7FD84 +index = [0][0] +...checksum after hashing g_331[i][j] : 8632E885 +index = [1][0] +...checksum after hashing g_331[i][j] : C12B8201 +index = [2][0] +...checksum after hashing g_331[i][j] : 95E890B0 +index = [3][0] +...checksum after hashing g_331[i][j] : A355DF31 +index = [4][0] +...checksum after hashing g_331[i][j] : 13A781FE +index = [5][0] +...checksum after hashing g_331[i][j] : B6404CA7 +index = [6][0] +...checksum after hashing g_331[i][j] : 2EB13BD0 +index = [7][0] +...checksum after hashing g_331[i][j] : 7A9416AA +index = [8][0] +...checksum after hashing g_332 : BD8A3D8C +...checksum after hashing g_340[i] : DEC41FAC +index = [0] +...checksum after hashing g_340[i] : 79864360 +index = [1] +...checksum after hashing g_340[i] : 2CBEEDD3 +index = [2] +...checksum after hashing g_340[i] : 7AF95658 +index = [3] +...checksum after hashing g_340[i] : 32626885 +index = [4] +...checksum after hashing g_340[i] : A4E3683D +index = [5] +...checksum after hashing g_340[i] : C129A226 +index = [6] +...checksum after hashing g_340[i] : 503CF828 +index = [7] +...checksum after hashing g_340[i] : E78D52AE +index = [8] +...checksum after hashing g_396 : C3E14C95 +...checksum after hashing g_412 : A2CD3BC7 +...checksum after hashing g_441 : 9AC9A20C +...checksum after hashing g_467[i] : 757D7694 +index = [0] +...checksum after hashing g_467[i] : 2A67F8FC +index = [1] +...checksum after hashing g_467[i] : 69D5E9BE +index = [2] +...checksum after hashing g_467[i] : 617822C5 +index = [3] +...checksum after hashing g_467[i] : 48BC78F5 +index = [4] +...checksum after hashing g_467[i] : 29EAEF8E +index = [5] +...checksum after hashing g_467[i] : A6AE83E0 +index = [6] +...checksum after hashing g_467[i] : C8FA6BBE +index = [7] +...checksum after hashing g_474 : CB72057A +...checksum after hashing g_481 : F322D2A +...checksum after hashing g_482 : CC4FC9F3 +...checksum after hashing g_483 : B6E3E24 +...checksum after hashing g_484[i] : 4C4DB04E +index = [0] +...checksum after hashing g_484[i] : A56C32F1 +index = [1] +...checksum after hashing g_484[i] : 5785ECEC +index = [2] +...checksum after hashing g_484[i] : AEEEA001 +index = [3] +...checksum after hashing g_484[i] : B113B594 +index = [4] +...checksum after hashing g_484[i] : D7A579C +index = [5] +...checksum after hashing g_484[i] : 144054F4 +index = [6] +...checksum after hashing g_484[i] : A95643F8 +index = [7] +...checksum after hashing g_484[i] : 53A13353 +index = [8] +...checksum after hashing g_484[i] : 9BAFA97F +index = [9] +...checksum after hashing g_518 : 8AF3E3D3 +...checksum after hashing g_523 : 344118B7 +...checksum after hashing g_545 : CFE86902 +...checksum after hashing g_556[i] : E98B2698 +index = [0] +...checksum after hashing g_556[i] : 89A7E552 +index = [1] +...checksum after hashing g_556[i] : 22F77CB1 +index = [2] +...checksum after hashing g_556[i] : BA8A8342 +index = [3] +...checksum after hashing g_556[i] : A14EA745 +index = [4] +...checksum after hashing g_556[i] : 73E41F08 +index = [5] +...checksum after hashing g_556[i] : B82862B5 +index = [6] +...checksum after hashing g_556[i] : 352A39E5 +index = [7] +...checksum after hashing g_557 : 894F667C +...checksum after hashing g_558 : 201088B3 +...checksum after hashing g_620 : B00946C9 +...checksum after hashing g_621 : 59F4D9D6 +...checksum after hashing g_1201[i] : A2D9C813 +index = [0] +checksum = a2d9c813 diff --git a/src/tests/csmith/rand93.c b/src/tests/csmith/rand93.c new file mode 100644 index 0000000..a174000 --- /dev/null +++ b/src/tests/csmith/rand93.c @@ -0,0 +1,91 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static int g_3 = 0xD7D490C4L; +static unsigned char func_1(void); +static unsigned char func_1(void) +{ + int *l_2 = &g_3; + step_hash(1); + l_2 = l_2; + step_hash(2); + return g_3; +} +void csmith_compute_hash(void) +{ + transparent_crc(g_3, "g_3", print_hash_value); +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand93.expect b/src/tests/csmith/rand93.expect new file mode 100644 index 0000000..8672b6d --- /dev/null +++ b/src/tests/csmith/rand93.expect @@ -0,0 +1,6 @@ +...checksum after hashing g_3 : D89B59D1 +before stmt(1): checksum = D89B59D1 +...checksum after hashing g_3 : D89B59D1 +before stmt(2): checksum = D89B59D1 +...checksum after hashing g_3 : D89B59D1 +checksum = d89b59d1 diff --git a/src/tests/csmith/rand94.c b/src/tests/csmith/rand94.c new file mode 100644 index 0000000..dd38cc1 --- /dev/null +++ b/src/tests/csmith/rand94.c @@ -0,0 +1,1499 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static unsigned char g_16 = 8UL; +static int g_31 = 5L; +static int g_33 = 5L; +static int g_75 = 1L; +static int g_76 = 1L; +static int g_77 = (-5L); +static int *g_84 = &g_77; +static int g_94 = 0x27FA81B2L; +static unsigned g_95[8] = {4294967293UL, 1UL, 4294967293UL, 1UL, 4294967293UL, 1UL, 4294967293UL, 1UL}; +static unsigned g_182[5] = {1UL, 1UL, 1UL, 1UL, 1UL}; +static signed char g_188 = 0xFCL; +static int g_189 = (-5L); +static short g_190 = 0L; +static unsigned g_191 = 4294967286UL; +static int g_232 = 0xA1BE2514L; +static unsigned g_233 = 3UL; +static short g_283[7] = {0x17F4L, 0x50A7L, 0x17F4L, 0x50A7L, 0x17F4L, 0x50A7L, 0x17F4L}; +static signed char g_284[8][3] = {{1L, 1L, 1L}, {1L, 1L, 1L}, {1L, 1L, 1L}, {1L, 1L, 1L}, {1L, 1L, 1L}, {1L, 1L, 1L}, {1L, 1L, 1L}, {1L, 1L, 1L}}; +static signed char g_285 = (-2L); +static unsigned g_286 = 0x2992A0FDL; +static unsigned short g_307 = 65532UL; +static int g_312 = 0x93D39C3CL; +static int g_313 = 0xCFED7D17L; +static signed char g_336 = 0x8CL; +static signed char g_337 = 0x32L; +static unsigned char g_338[9][8] = {{0x73L, 0xC2L, 255UL, 1UL, 2UL, 0UL, 0xE8L, 255UL}, {0x73L, 0xC2L, 255UL, 1UL, 2UL, 0UL, 0xE8L, 255UL}, {0x73L, 0xC2L, 255UL, 1UL, 2UL, 0UL, 0xE8L, 255UL}, {0x73L, 0xC2L, 255UL, 1UL, 2UL, 0UL, 0xE8L, 255UL}, {0x73L, 0xC2L, 255UL, 1UL, 2UL, 0UL, 0xE8L, 255UL}, {0x73L, 0xC2L, 255UL, 1UL, 2UL, 0UL, 0xE8L, 255UL}, {0x73L, 0xC2L, 255UL, 1UL, 2UL, 0UL, 0xE8L, 255UL}, {0x73L, 0xC2L, 255UL, 1UL, 2UL, 0UL, 0xE8L, 255UL}, {0x73L, 0xC2L, 255UL, 1UL, 2UL, 0UL, 0xE8L, 255UL}}; +static int ***g_355 = (void*)0; +static signed char g_406 = 0x40L; +static unsigned char g_407 = 0xBCL; +static int g_449 = 0x7C810448L; +static int g_514 = 0x35D05901L; +static signed char g_515 = 0xB5L; +static int g_516[4][3] = {{0x8D607E72L, 8L, 0x8D607E72L}, {0x8D607E72L, 8L, 0x8D607E72L}, {0x8D607E72L, 8L, 0x8D607E72L}, {0x8D607E72L, 8L, 0x8D607E72L}}; +static int g_549[3] = {(-1L), (-1L), (-1L)}; +static short g_633[8][8] = {{0L, 0x80CEL, 0xE9F8L, 0x80CEL, 0L, 0x5E94L, 0L, 0x80CEL}, {0L, 0x80CEL, 0xE9F8L, 0x80CEL, 0L, 0x5E94L, 0L, 0x80CEL}, {0L, 0x80CEL, 0xE9F8L, 0x80CEL, 0L, 0x5E94L, 0L, 0x80CEL}, {0L, 0x80CEL, 0xE9F8L, 0x80CEL, 0L, 0x5E94L, 0L, 0x80CEL}, {0L, 0x80CEL, 0xE9F8L, 0x80CEL, 0L, 0x5E94L, 0L, 0x80CEL}, {0L, 0x80CEL, 0xE9F8L, 0x80CEL, 0L, 0x5E94L, 0L, 0x80CEL}, {0L, 0x80CEL, 0xE9F8L, 0x80CEL, 0L, 0x5E94L, 0L, 0x80CEL}, {0L, 0x80CEL, 0xE9F8L, 0x80CEL, 0L, 0x5E94L, 0L, 0x80CEL}}; +static unsigned short g_706[7] = {0x808DL, 0x808DL, 8UL, 0x808DL, 0x808DL, 8UL, 0x808DL}; +static int *g_783[3] = {&g_77, &g_77, &g_77}; +static int g_903 = 0xF2017E75L; +static unsigned g_904 = 0xAA62AC66L; +static unsigned func_1(void); +static int func_11(signed char p_12, unsigned p_13, int p_14, signed char p_15); +static unsigned short func_17(signed char p_18, unsigned char p_19, unsigned p_20, unsigned char p_21); +static int * func_28(int * p_29); +static signed char func_34(int p_35, int * p_36, unsigned short p_37, int * p_38); +static unsigned short func_42(unsigned char p_43, int p_44, int * p_45); +static int * func_47(unsigned char p_48, int * p_49, int * p_50, int * p_51, int * p_52); +static int * func_54(int p_55, signed char p_56, int * p_57, unsigned p_58); +static signed char func_59(unsigned p_60, short p_61, int * p_62, int * p_63, signed char p_64); +static int * func_66(unsigned char p_67, int * p_68, int * p_69); +static unsigned func_1(void) +{ + int l_10 = (-3L); + unsigned l_901 = 0xE10BFCA3L; + int *l_902[9] = {&g_516[0][1], &g_903, &g_516[0][1], &g_903, &g_516[0][1], &g_903, &g_516[0][1], &g_903, &g_516[0][1]}; + int l_907 = 0x4934D44CL; + unsigned l_908 = 0UL; + int i; + step_hash(605); + g_903 &= (((signed char)((short)((((unsigned)0x9ED080C1L + (unsigned)((short)0xF3C3L << (short)(l_10 || func_11(l_10, l_10, g_16, (((((func_17(l_10, ((short)(l_10 || (((signed char)g_16 >> (signed char)g_16) == 0L)) << (short)8), g_16, l_10) || 2L) <= 0xCB2EL) <= 0x82842D44L) ^ 65534UL) <= l_10))))) & l_901) > l_901) - (short)g_285) << (signed char)2) > l_901); + step_hash(606); + g_904++; + step_hash(607); + ++l_908; + step_hash(608); + return g_904; +} +static int func_11(signed char p_12, unsigned p_13, int p_14, signed char p_15) +{ + unsigned l_894 = 0xCC28BAF9L; + int ***l_897 = (void*)0; + step_hash(603); + for (g_232 = 4; (g_232 >= 2); g_232 -= 1) + { + int *l_892 = &g_76; + int *l_893 = &g_549[1]; + int **l_899 = &g_783[2]; + int ***l_898 = &l_899; + unsigned l_900 = 4294967295UL; + int i; + step_hash(592); + if (g_706[g_232]) + break; + step_hash(593); + ++l_894; + step_hash(602); + for (g_16 = 0; (g_16 <= 6); g_16 += 1) + { + step_hash(601); + if (((l_897 == l_898) & p_13)) + { + step_hash(598); + (*l_892) = p_14; + } + else + { + step_hash(600); + return l_900; + } + } + } + step_hash(604); + return p_12; +} +static unsigned short func_17(signed char p_18, unsigned char p_19, unsigned p_20, unsigned char p_21) +{ + int *l_30 = &g_31; + int **l_782[6] = {&l_30, &l_30, &l_30, &l_30, &l_30, &l_30}; + int l_798 = 0xC86177A6L; + signed char l_801 = 6L; + unsigned char l_805 = 1UL; + int *l_829 = (void*)0; + int *l_836 = &g_549[2]; + unsigned l_861[8][9] = {{1UL, 4UL, 0x42D479A7L, 4UL, 1UL, 0UL, 0x42D479A7L, 0UL, 1UL}, {1UL, 4UL, 0x42D479A7L, 4UL, 1UL, 0UL, 0x42D479A7L, 0UL, 1UL}, {1UL, 4UL, 0x42D479A7L, 4UL, 1UL, 0UL, 0x42D479A7L, 0UL, 1UL}, {1UL, 4UL, 0x42D479A7L, 4UL, 1UL, 0UL, 0x42D479A7L, 0UL, 1UL}, {1UL, 4UL, 0x42D479A7L, 4UL, 1UL, 0UL, 0x42D479A7L, 0UL, 1UL}, {1UL, 4UL, 0x42D479A7L, 4UL, 1UL, 0UL, 0x42D479A7L, 0UL, 1UL}, {1UL, 4UL, 0x42D479A7L, 4UL, 1UL, 0UL, 0x42D479A7L, 0UL, 1UL}, {1UL, 4UL, 0x42D479A7L, 4UL, 1UL, 0UL, 0x42D479A7L, 0UL, 1UL}}; + unsigned short l_866 = 65529UL; + unsigned short l_890[5]; + unsigned char l_891 = 2UL; + int i, j; + for (i = 0; i < 5; i++) + l_890[i] = 0x869CL; + step_hash(501); + g_783[2] = func_28(l_30); + step_hash(534); + for (p_20 = 0; (p_20 != 51); p_20 += 9) + { + int **l_790[7] = {&g_783[2], &g_783[2], &g_783[2], &g_783[2], &g_783[2], &g_783[2], &g_783[2]}; + int *l_791 = (void*)0; + unsigned l_821 = 4294967295UL; + unsigned l_827 = 2UL; + int i; + } + step_hash(585); + for (g_233 = 0; (g_233 <= 5); g_233 += 1) + { + unsigned char l_837 = 0xAEL; + int l_842 = 0x47E3965CL; + step_hash(583); + for (g_313 = 5; (g_313 >= 0); g_313 -= 1) + { + int *l_838 = &g_549[2]; + int *l_867[4] = {(void*)0, &g_313, (void*)0, &g_313}; + int i; + } + step_hash(584); + (*l_30) ^= ((((((signed char)((short)((short)p_19 / (short)g_283[3]) >> (short)0) / (signed char)g_549[2]) == ((unsigned short)((g_233 ^ ((unsigned char)l_837 + (unsigned char)(0x67L == ((unsigned char)(g_286 == (0xB605AB1EL | 5UL)) >> (unsigned char)3)))) >= 0xA3E1L) >> (unsigned short)p_21)) > 253UL) > p_18) > g_307); + } + step_hash(586); + (*l_836) = ((unsigned)(((unsigned char)(0L > ((((1L ^ ((signed char)p_21 << (signed char)((short)(&g_516[1][2] == &g_549[2]) + (short)(-10L)))) | ((signed char)g_191 / (signed char)func_34(p_21, &g_76, l_890[3], &g_189))) & 0x3DL) & 0x2BBEL)) % (unsigned char)0x0BL) ^ l_891) % (unsigned)0x0D186CD5L); + step_hash(587); + return g_75; +} +static int * func_28(int * p_29) +{ + unsigned short l_32[5][7] = {{0x5641L, 0x69FFL, 0xE215L, 0x69FFL, 0x5641L, 0x48AAL, 0x5641L}, {0x5641L, 0x69FFL, 0xE215L, 0x69FFL, 0x5641L, 0x48AAL, 0x5641L}, {0x5641L, 0x69FFL, 0xE215L, 0x69FFL, 0x5641L, 0x48AAL, 0x5641L}, {0x5641L, 0x69FFL, 0xE215L, 0x69FFL, 0x5641L, 0x48AAL, 0x5641L}, {0x5641L, 0x69FFL, 0xE215L, 0x69FFL, 0x5641L, 0x48AAL, 0x5641L}}; + int *l_41 = (void*)0; + int l_670 = 0x70C21215L; + int l_672 = 0x3F67168FL; + int l_717 = (-1L); + int l_722 = 0xE9669BACL; + int l_723 = 0x150A33C5L; + int l_724 = (-5L); + int l_725[5][1]; + int *l_769 = &g_549[2]; + int *l_770 = &g_549[2]; + int *l_771 = &g_313; + int *l_772 = &g_516[2][0]; + int *l_773 = &g_33; + int *l_774[7] = {&l_717, &l_717, &g_189, &l_717, &l_717, &g_189, &l_717}; + short l_775[3]; + unsigned l_776 = 0xF74538BCL; + int **l_781 = &l_769; + int i, j; + for (i = 0; i < 5; i++) + { + for (j = 0; j < 1; j++) + l_725[i][j] = (-6L); + } + for (i = 0; i < 3; i++) + l_775[i] = 1L; + step_hash(496); + for (g_31 = 1; (g_31 <= 4); g_31 += 1) + { + int **l_655 = &l_41; + int ***l_654 = &l_655; + int l_673 = (-1L); + int l_674 = 0x830F1EC4L; + signed char l_690 = 0L; + int l_718 = (-6L); + int l_721[4][10]; + short l_735 = 1L; + int i, j; + for (i = 0; i < 4; i++) + { + for (j = 0; j < 10; j++) + l_721[i][j] = 7L; + } + step_hash(450); + if ((0x7B1A0949L > ((void*)0 != &g_31))) + { + int l_649 = 1L; + step_hash(432); + for (g_33 = 1; (g_33 <= 4); g_33 += 1) + { + signed char l_46[2][4] = {{0x6AL, 0x98L, 0x6AL, 0x98L}, {0x6AL, 0x98L, 0x6AL, 0x98L}}; + int l_650 = (-2L); + int i, j; + } + } + else + { + int l_656 = 0x5DA6A106L; + unsigned char l_667 = 0xCFL; + int l_668[8] = {0x1138B450L, (-2L), 0x1138B450L, (-2L), 0x1138B450L, (-2L), 0x1138B450L, (-2L)}; + int *l_689[6] = {(void*)0, (void*)0, (void*)0, (void*)0, (void*)0, (void*)0}; + int i; + step_hash(446); + for (g_449 = 3; (g_449 >= 0); g_449 -= 1) + { + int *l_651[3][6] = {{(void*)0, &g_189, &g_516[0][1], &g_516[0][1], &g_189, (void*)0}, {(void*)0, &g_189, &g_516[0][1], &g_516[0][1], &g_189, (void*)0}, {(void*)0, &g_189, &g_516[0][1], &g_516[0][1], &g_189, (void*)0}}; + unsigned char l_675 = 0x3CL; + int i, j; + step_hash(437); + p_29 = l_651[0][2]; + } + step_hash(447); + if (l_668[2]) + continue; + step_hash(448); + l_673 ^= (*g_84); + step_hash(449); + l_690 |= (*g_84); + } + step_hash(451); + (*g_84) = 0x56FFD2D0L; + step_hash(452); + (**l_654) = p_29; + step_hash(453); + for (g_307 = 0; g_307 < 5; g_307 += 1) + { + g_182[g_307] = 1UL; + } + step_hash(495); + for (g_313 = 0; (g_313 <= 4); g_313 += 1) + { + short l_699 = 0x995FL; + int l_715 = 0x37EEA187L; + int l_716 = 0x3E75476CL; + int l_719 = 1L; + int l_720[2]; + int l_734 = (-10L); + unsigned char l_746 = 0xE1L; + unsigned l_766 = 3UL; + int i; + for (i = 0; i < 2; i++) + l_720[i] = 0xC46755B4L; + } + } + step_hash(497); + --l_776; + step_hash(498); + (*l_781) = func_54((*g_84), ((&l_774[1] != (void*)0) <= (*l_770)), &g_189, (((short)g_16 + (short)g_95[4]) >= (-1L))); + step_hash(499); + (**l_781) &= (*g_84); + step_hash(500); + return p_29; +} + + + + + + + +static signed char func_34(int p_35, int * p_36, unsigned short p_37, int * p_38) +{ + int *l_417 = &g_75; + int ***l_455 = (void*)0; + unsigned char l_461 = 0x9BL; + short l_525 = 0L; + signed char l_529 = 0x97L; + int l_534 = 0xDF4D3023L; + int l_548[9]; + signed char l_551[5][3]; + unsigned short l_570[4] = {65535UL, 65533UL, 65535UL, 65533UL}; + int *l_589 = &g_75; + unsigned char l_637[2][10] = {{246UL, 250UL, 0x4CL, 250UL, 246UL, 250UL, 0x4CL, 250UL, 246UL, 250UL}, {246UL, 250UL, 0x4CL, 250UL, 246UL, 250UL, 0x4CL, 250UL, 246UL, 250UL}}; + int i, j; + for (i = 0; i < 9; i++) + l_548[i] = 0x208B8FC1L; + for (i = 0; i < 5; i++) + { + for (j = 0; j < 3; j++) + l_551[i][j] = 0L; + } + step_hash(306); + for (g_188 = 4; (g_188 >= 0); g_188 -= 1) + { + int **l_418 = &g_84; + unsigned char l_426[5]; + int l_427 = (-1L); + unsigned l_446 = 0xD493B671L; + int i; + for (i = 0; i < 5; i++) + l_426[i] = 255UL; + step_hash(287); + for (g_94 = 0; (g_94 <= 4); g_94 += 1) + { + int i; + step_hash(286); + if (g_182[g_94]) + break; + } + step_hash(288); + (*l_418) = l_417; + step_hash(289); + (*l_418) = (void*)0; + step_hash(305); + for (g_94 = 4; (g_94 >= 1); g_94 -= 1) + { + int *l_425 = (void*)0; + unsigned short l_434 = 0xA5D5L; + int ***l_440 = (void*)0; + int i; + step_hash(304); + if (((signed char)g_286 >> (signed char)5)) + { + step_hash(294); + return l_427; + } + else + { + signed char l_437 = 0x49L; + int *l_441 = &g_76; + step_hash(296); + (*l_417) = (((*l_417) != g_284[4][2]) <= ((unsigned short)(((unsigned short)((unsigned short)65535UL << (unsigned short)l_434) - (unsigned short)((g_337 ^ (0x667CL == ((0x2672286EL >= (g_75 == ((unsigned short)p_35 << (unsigned short)5))) > 4L))) == g_338[2][0])) | l_437) * (unsigned short)g_33)); + step_hash(297); + g_84 = l_425; + step_hash(298); + if (g_233) + break; + step_hash(303); + if ((((unsigned char)(g_233 & l_437) + (unsigned char)((&l_418 == l_440) | ((&g_75 == l_441) <= ((((int)((((unsigned short)p_35 * (unsigned short)g_337) ^ g_189) == 0x9CL) / (int)p_37) & 0x5C3BD3D9L) | g_95[3])))) && 0UL)) + { + step_hash(300); + (*l_418) = &p_35; + } + else + { + signed char l_450 = 5L; + step_hash(302); + g_76 = ((int)g_449 - (int)(g_182[3] >= (l_450 == 0x1E00628DL))); + } + } + } + } + step_hash(428); + for (g_77 = 0; (g_77 == 21); ++g_77) + { + int l_458 = 0x0CA4A02CL; + int l_475[3][2]; + unsigned char l_552 = 0xA2L; + int **l_562 = (void*)0; + int ***l_561 = &l_562; + int l_606 = (-4L); + int l_640 = 0xEBEB0606L; + int i, j; + for (i = 0; i < 3; i++) + { + for (j = 0; j < 2; j++) + l_475[i][j] = (-1L); + } + step_hash(310); + (*l_417) = ((void*)0 == &p_38); + step_hash(427); + for (p_35 = (-18); (p_35 > (-21)); --p_35) + { + short l_476[10][8]; + int l_508 = 0x169E0388L; + int l_509 = (-2L); + int l_512 = 7L; + int l_550[7][5] = {{0x9EFB1165L, 0xC0D33F4DL, (-9L), 1L, 0xFC89C641L}, {0x9EFB1165L, 0xC0D33F4DL, (-9L), 1L, 0xFC89C641L}, {0x9EFB1165L, 0xC0D33F4DL, (-9L), 1L, 0xFC89C641L}, {0x9EFB1165L, 0xC0D33F4DL, (-9L), 1L, 0xFC89C641L}, {0x9EFB1165L, 0xC0D33F4DL, (-9L), 1L, 0xFC89C641L}, {0x9EFB1165L, 0xC0D33F4DL, (-9L), 1L, 0xFC89C641L}, {0x9EFB1165L, 0xC0D33F4DL, (-9L), 1L, 0xFC89C641L}}; + int *l_563 = &l_509; + int *l_564 = &l_509; + int *l_565[10][2]; + signed char l_566[5] = {0xA1L, (-1L), 0xA1L, (-1L), 0xA1L}; + unsigned l_567 = 0x0E0090EBL; + int i, j; + for (i = 0; i < 10; i++) + { + for (j = 0; j < 8; j++) + l_476[i][j] = 0x267EL; + } + for (i = 0; i < 10; i++) + { + for (j = 0; j < 2; j++) + l_565[i][j] = &l_550[2][1]; + } + step_hash(369); + if ((((void*)0 == l_455) == ((unsigned char)l_458 + (unsigned char)((unsigned short)(l_461 ^ ((-(short)0x98BCL) | ((unsigned char)((short)((int)((unsigned char)(((int)(+l_458) - (int)p_35) & (0x0A810701L >= ((unsigned)((((((g_182[3] != l_475[2][0]) != (*l_417)) ^ (-1L)) | l_476[7][6]) | p_35) | g_95[0]) - (unsigned)(*l_417)))) - (unsigned char)g_285) + (int)1UL) << (short)2) % (unsigned char)g_190))) * (unsigned short)g_285)))) + { + signed char l_507 = 0xD1L; + int l_513 = 6L; + int l_535 = 1L; + int *l_541 = &g_313; + int *l_542 = &g_189; + int *l_543 = &l_534; + int *l_544 = &l_475[2][0]; + int *l_545 = &g_76; + int *l_546 = &l_512; + int *l_547[7] = {&g_77, &g_77, (void*)0, &g_77, &g_77, (void*)0, &g_77}; + int i; + step_hash(334); + for (g_337 = 0; (g_337 <= 2); g_337 += 1) + { + int *l_477 = &g_77; + int **l_478 = &l_477; + int l_510 = 0xAB6CAB2DL; + int l_511 = 0x6D6B166CL; + unsigned l_517 = 0x954569E3L; + int i, j; + step_hash(318); + (*l_478) = l_477; + step_hash(327); + if (g_284[(g_337 + 2)][g_337]) + { + step_hash(320); + (*l_417) &= ((unsigned char)g_407 >> (unsigned char)7); + step_hash(321); + if (p_35) + break; + step_hash(322); + (*l_478) = &l_475[1][1]; + step_hash(323); + (*l_477) = (1L && (g_75 >= ((unsigned short)(+((unsigned short)g_283[3] % (unsigned short)((signed char)((unsigned short)((((unsigned)g_182[3] - (unsigned)p_37) && (**l_478)) >= (((short)(((unsigned short)p_37 << (unsigned short)0) || g_31) * (short)((unsigned char)((unsigned char)((((unsigned char)(0xC4L | 0xB7L) - (unsigned char)p_37) ^ g_95[0]) <= 0xE0ABF591L) - (unsigned char)p_35) % (unsigned char)g_16)) && 0xB4BD69DBL)) << (unsigned short)p_35) >> (signed char)3))) >> (unsigned short)p_37))); + } + else + { + int *l_503 = &g_189; + int *l_504 = &l_475[2][0]; + int *l_505 = &l_475[2][0]; + int *l_506[4][5] = {{&l_475[2][1], &l_475[2][0], (void*)0, &l_475[2][0], &l_475[2][1]}, {&l_475[2][1], &l_475[2][0], (void*)0, &l_475[2][0], &l_475[2][1]}, {&l_475[2][1], &l_475[2][0], (void*)0, &l_475[2][0], &l_475[2][1]}, {&l_475[2][1], &l_475[2][0], (void*)0, &l_475[2][0], &l_475[2][1]}}; + int i, j; + step_hash(325); + --l_517; + step_hash(326); + (*l_478) = &p_35; + } + step_hash(333); + for (g_312 = 0; (g_312 >= 19); g_312 += 9) + { + step_hash(331); + p_38 = &p_35; + step_hash(332); + return (*l_417); + } + } + step_hash(357); + if (p_35) + { + int *l_522 = &l_513; + int *l_523 = &g_76; + int *l_524[9] = {&g_31, &g_31, (void*)0, &g_31, &g_31, (void*)0, &g_31, &g_31, (void*)0}; + unsigned char l_526 = 0xB1L; + int i; + step_hash(336); + l_526++; + } + else + { + step_hash(343); + if ((!l_529)) + { + step_hash(339); + return p_35; + } + else + { + short l_530 = 3L; + step_hash(341); + l_530 ^= (g_285 & (~((g_16 == (((void*)0 != &p_35) | p_37)) == 0x541260E6L))); + step_hash(342); + if (g_307) + break; + } + step_hash(348); + for (g_94 = 7; (g_94 >= 0); g_94 -= 1) + { + step_hash(347); + l_513 = l_475[2][0]; + } + step_hash(356); + for (g_406 = 0; (g_406 >= 5); g_406 += 4) + { + int *l_533[7] = {&g_33, &l_509, &g_33, &l_509, &g_33, &l_509, &g_33}; + unsigned char l_536 = 0xB8L; + int i; + step_hash(352); + (*l_417) = (p_35 == (p_37 & 2UL)); + step_hash(353); + l_536--; + step_hash(354); + (*l_417) = ((signed char)(0xB9E5L & (g_355 == g_355)) >> (signed char)(1L <= g_283[3])); + step_hash(355); + return l_475[2][0]; + } + } + step_hash(358); + ++l_552; + step_hash(359); + if ((*l_541)) + break; + } + else + { + short l_555 = 0x0528L; + int **l_560[4][1] = {{&l_417}, {&l_417}, {&l_417}, {&l_417}}; + int ***l_559 = &l_560[1][0]; + int i, j; + step_hash(361); + l_550[2][1] ^= l_555; + step_hash(367); + for (l_512 = 0; (l_512 <= 5); l_512++) + { + int l_558 = (-4L); + step_hash(365); + (*l_417) ^= (l_558 ^ (&l_508 != &p_35)); + step_hash(366); + return g_95[2]; + } + step_hash(368); + (*l_417) &= (l_559 != l_561); + } + step_hash(370); + --l_567; + step_hash(425); + if ((l_570[1] && ((unsigned short)((g_312 >= (p_37 && (&p_38 != &g_84))) >= ((int)(*l_563) - (int)((-2L) != ((signed char)((unsigned char)((*l_417) && g_188) << (unsigned char)0) + (signed char)0x1EL)))) * (unsigned short)g_188))) + { + step_hash(372); + (*l_564) ^= ((unsigned short)g_516[0][1] % (unsigned short)p_37); + } + else + { + unsigned l_583 = 4294967289UL; + int l_590 = 0L; + int *l_595[5][3] = {{&g_33, &g_77, &g_33}, {&g_33, &g_77, &g_33}, {&g_33, &g_77, &g_33}, {&g_33, &g_77, &g_33}, {&g_33, &g_77, &g_33}}; + int i, j; + step_hash(399); + if ((((unsigned short)p_35 / (unsigned short)p_35) < l_583)) + { + signed char l_584 = 0x28L; + int **l_585[1][9] = {{(void*)0, (void*)0, &l_564, (void*)0, (void*)0, &l_564, (void*)0, (void*)0, &l_564}}; + int i, j; + step_hash(375); + (*l_564) = l_584; + step_hash(376); + (*l_561) = l_585[0][7]; + step_hash(384); + if ((*l_564)) + { + unsigned l_586 = 4294967294UL; + step_hash(378); + --l_586; + } + else + { + unsigned l_596[4][10] = {{0xA5CCFE04L, 0xA5CCFE04L, 0xDA14FC92L, 0xF1889E30L, 0x0BA093BCL, 0xF1889E30L, 0xDA14FC92L, 0xA5CCFE04L, 0xA5CCFE04L, 0xDA14FC92L}, {0xA5CCFE04L, 0xA5CCFE04L, 0xDA14FC92L, 0xF1889E30L, 0x0BA093BCL, 0xF1889E30L, 0xDA14FC92L, 0xA5CCFE04L, 0xA5CCFE04L, 0xDA14FC92L}, {0xA5CCFE04L, 0xA5CCFE04L, 0xDA14FC92L, 0xF1889E30L, 0x0BA093BCL, 0xF1889E30L, 0xDA14FC92L, 0xA5CCFE04L, 0xA5CCFE04L, 0xDA14FC92L}, {0xA5CCFE04L, 0xA5CCFE04L, 0xDA14FC92L, 0xF1889E30L, 0x0BA093BCL, 0xF1889E30L, 0xDA14FC92L, 0xA5CCFE04L, 0xA5CCFE04L, 0xDA14FC92L}}; + int i, j; + step_hash(380); + l_589 = &p_35; + step_hash(381); + l_590 = ((void*)0 != g_355); + step_hash(382); + if (p_35) + break; + step_hash(383); + (*l_417) ^= ((unsigned short)(((+g_515) & ((unsigned short)5UL * (unsigned short)(!p_37))) >= ((l_595[3][1] == l_595[3][1]) == l_596[1][6])) % (unsigned short)p_37); + } + } + else + { + int **l_597 = &l_417; + step_hash(386); + (*l_597) = &g_313; + step_hash(392); + for (g_336 = 0; (g_336 >= 6); g_336 += 8) + { + step_hash(390); + p_36 = &p_35; + step_hash(391); + (*l_417) &= (*p_36); + } + step_hash(398); + for (g_514 = 6; (g_514 == (-8)); g_514 -= 6) + { + unsigned l_607 = 0x3419D489L; + step_hash(396); + (*l_563) ^= ((((unsigned short)g_31 + (unsigned short)(-5L)) && (*l_589)) & ((unsigned)g_515 + (unsigned)(**l_597))); + step_hash(397); + l_607++; + } + } + step_hash(423); + if ((255UL | ((unsigned short)g_514 + (unsigned short)p_37))) + { + unsigned short l_618 = 0x72EEL; + int ***l_629 = (void*)0; + int l_634 = 0xE18F3EB4L; + int l_636[6] = {7L, 7L, 0x5628A893L, 7L, 7L, 0x5628A893L}; + int i; + step_hash(401); + if ((*l_564)) + break; + step_hash(406); + if (((void*)0 == &p_35)) + { + short l_614 = (-1L); + step_hash(403); + (*l_564) = ((&l_550[4][2] == &l_509) ^ ((signed char)(*l_417) % (signed char)l_614)); + } + else + { + int **l_615 = (void*)0; + step_hash(405); + p_38 = &p_35; + } + step_hash(407); + (*l_564) &= g_182[4]; + step_hash(415); + if (((unsigned char)g_549[2] >> (unsigned char)(((+l_618) > (((signed char)p_37 % (signed char)p_37) ^ ((signed char)p_37 + (signed char)(-1L)))) ^ p_35))) + { + unsigned char l_630[10][8] = {{0x4FL, 0xA5L, 0xE9L, 0xE9L, 0xA5L, 0x4FL, 0xA5L, 0xE9L}, {0x4FL, 0xA5L, 0xE9L, 0xE9L, 0xA5L, 0x4FL, 0xA5L, 0xE9L}, {0x4FL, 0xA5L, 0xE9L, 0xE9L, 0xA5L, 0x4FL, 0xA5L, 0xE9L}, {0x4FL, 0xA5L, 0xE9L, 0xE9L, 0xA5L, 0x4FL, 0xA5L, 0xE9L}, {0x4FL, 0xA5L, 0xE9L, 0xE9L, 0xA5L, 0x4FL, 0xA5L, 0xE9L}, {0x4FL, 0xA5L, 0xE9L, 0xE9L, 0xA5L, 0x4FL, 0xA5L, 0xE9L}, {0x4FL, 0xA5L, 0xE9L, 0xE9L, 0xA5L, 0x4FL, 0xA5L, 0xE9L}, {0x4FL, 0xA5L, 0xE9L, 0xE9L, 0xA5L, 0x4FL, 0xA5L, 0xE9L}, {0x4FL, 0xA5L, 0xE9L, 0xE9L, 0xA5L, 0x4FL, 0xA5L, 0xE9L}, {0x4FL, 0xA5L, 0xE9L, 0xE9L, 0xA5L, 0x4FL, 0xA5L, 0xE9L}}; + int l_635 = 0xBD05030BL; + int i, j; + step_hash(409); + (*l_417) = (3UL & (((unsigned char)(g_232 || (((unsigned)(~4294967286UL) - (unsigned)p_35) >= (p_35 ^ (l_629 != g_355)))) + (unsigned char)0x3DL) < ((void*)0 == &p_35))); + step_hash(410); + l_630[9][7]--; + step_hash(411); + (*l_417) = ((void*)0 != &p_35); + step_hash(412); + l_637[1][8]++; + } + else + { + unsigned l_641 = 0x1D12B5EEL; + step_hash(414); + ++l_641; + } + } + else + { + unsigned short l_644 = 0UL; + step_hash(417); + l_644++; + step_hash(422); + for (g_189 = 0; (g_189 < (-6)); g_189 -= 5) + { + step_hash(421); + return p_35; + } + } + step_hash(424); + (*l_563) = 1L; + } + } + } + step_hash(429); + return p_35; +} + + + + + + + +static unsigned short func_42(unsigned char p_43, int p_44, int * p_45) +{ + int l_53 = 0xF3AC16B4L; + int *l_65 = &g_33; + int *l_412 = &g_189; + step_hash(270); + l_65 = func_47(l_53, func_54((*p_45), func_59(p_43, l_53, l_65, func_66(((l_65 == (void*)0) != ((*p_45) ^ (*p_45))), l_65, l_65), p_44), l_65, (*l_65)), &g_33, l_65, &g_31); + step_hash(276); + if ((!(func_59((*l_65), (*l_65), &p_44, l_412, ((&l_412 != &l_412) <= 0x09L)) == p_44))) + { + unsigned l_413 = 0x76D68D60L; + step_hash(272); + l_413 = 1L; + } + else + { + int **l_414[5] = {&l_65, &l_412, &l_65, &l_412, &l_65}; + int i; + step_hash(274); + (*l_412) = (*p_45); + step_hash(275); + g_84 = l_412; + } + step_hash(277); + (*l_412) = (func_59(((signed char)(((*l_65) == p_44) <= p_44) << (signed char)6), g_338[3][0], &p_44, l_65, p_43) < 0xB9L); + step_hash(278); + return g_337; +} + + + + + + + +static int * func_47(unsigned char p_48, int * p_49, int * p_50, int * p_51, int * p_52) +{ + int **l_245 = &g_84; + int ***l_244 = &l_245; + int *l_252 = &g_33; + int l_281 = 4L; + int l_306[8][9] = {{(-1L), 0x96B20FC8L, 4L, 0x3094950BL, 1L, 0L, 0x044F218FL, 0x43DD389AL, 0x044F218FL}, {(-1L), 0x96B20FC8L, 4L, 0x3094950BL, 1L, 0L, 0x044F218FL, 0x43DD389AL, 0x044F218FL}, {(-1L), 0x96B20FC8L, 4L, 0x3094950BL, 1L, 0L, 0x044F218FL, 0x43DD389AL, 0x044F218FL}, {(-1L), 0x96B20FC8L, 4L, 0x3094950BL, 1L, 0L, 0x044F218FL, 0x43DD389AL, 0x044F218FL}, {(-1L), 0x96B20FC8L, 4L, 0x3094950BL, 1L, 0L, 0x044F218FL, 0x43DD389AL, 0x044F218FL}, {(-1L), 0x96B20FC8L, 4L, 0x3094950BL, 1L, 0L, 0x044F218FL, 0x43DD389AL, 0x044F218FL}, {(-1L), 0x96B20FC8L, 4L, 0x3094950BL, 1L, 0L, 0x044F218FL, 0x43DD389AL, 0x044F218FL}, {(-1L), 0x96B20FC8L, 4L, 0x3094950BL, 1L, 0L, 0x044F218FL, 0x43DD389AL, 0x044F218FL}}; + int l_405 = (-4L); + int *l_410[10][9] = {{&g_76, &g_313, &g_76, (void*)0, &g_31, &l_306[5][1], &g_75, (void*)0, &g_77}, {&g_76, &g_313, &g_76, (void*)0, &g_31, &l_306[5][1], &g_75, (void*)0, &g_77}, {&g_76, &g_313, &g_76, (void*)0, &g_31, &l_306[5][1], &g_75, (void*)0, &g_77}, {&g_76, &g_313, &g_76, (void*)0, &g_31, &l_306[5][1], &g_75, (void*)0, &g_77}, {&g_76, &g_313, &g_76, (void*)0, &g_31, &l_306[5][1], &g_75, (void*)0, &g_77}, {&g_76, &g_313, &g_76, (void*)0, &g_31, &l_306[5][1], &g_75, (void*)0, &g_77}, {&g_76, &g_313, &g_76, (void*)0, &g_31, &l_306[5][1], &g_75, (void*)0, &g_77}, {&g_76, &g_313, &g_76, (void*)0, &g_31, &l_306[5][1], &g_75, (void*)0, &g_77}, {&g_76, &g_313, &g_76, (void*)0, &g_31, &l_306[5][1], &g_75, (void*)0, &g_77}, {&g_76, &g_313, &g_76, (void*)0, &g_31, &l_306[5][1], &g_75, (void*)0, &g_77}}; + int *l_411 = &g_189; + int i, j; + step_hash(267); + for (g_233 = (-14); (g_233 >= 47); g_233 += 3) + { + short l_263 = (-3L); + int ***l_268 = &l_245; + int l_276[1]; + unsigned l_314 = 0xFD7DE96FL; + unsigned short l_364 = 1UL; + int i; + for (i = 0; i < 1; i++) + l_276[i] = 1L; + step_hash(265); + for (g_190 = 0; (g_190 >= (-9)); g_190 -= 8) + { + int l_254 = 0xAEE7E948L; + int **l_323 = (void*)0; + int l_331 = (-9L); + int *l_404[3][4] = {{(void*)0, (void*)0, (void*)0, (void*)0}, {(void*)0, (void*)0, (void*)0, (void*)0}, {(void*)0, (void*)0, (void*)0, (void*)0}}; + int i, j; + step_hash(147); + if ((*p_51)) + break; + step_hash(185); + if ((l_244 != (void*)0)) + { + step_hash(161); + if ((*g_84)) + { + unsigned l_249 = 0UL; + step_hash(154); + for (g_94 = (-23); (g_94 > (-23)); g_94 += 4) + { + int *l_248 = &g_77; + step_hash(153); + return l_248; + } + step_hash(155); + if (l_249) + continue; + step_hash(156); + if ((*p_52)) + break; + step_hash(157); + (*l_244) = (*l_244); + } + else + { + unsigned short l_253 = 5UL; + step_hash(159); + (*l_245) = func_66(((signed char)(l_252 == (void*)0) + (signed char)func_59(p_48, l_253, p_52, func_66(g_188, func_66(p_48, func_66(p_48, p_51, (**l_244)), p_50), &g_31), l_254)), &g_33, &g_189); + step_hash(160); + if (l_253) + break; + } + } + else + { + int l_259 = (-6L); + int *l_262 = (void*)0; + int l_282[8][6] = {{0L, 0x1E1A05C3L, 0L, (-5L), 3L, 1L}, {0L, 0x1E1A05C3L, 0L, (-5L), 3L, 1L}, {0L, 0x1E1A05C3L, 0L, (-5L), 3L, 1L}, {0L, 0x1E1A05C3L, 0L, (-5L), 3L, 1L}, {0L, 0x1E1A05C3L, 0L, (-5L), 3L, 1L}, {0L, 0x1E1A05C3L, 0L, (-5L), 3L, 1L}, {0L, 0x1E1A05C3L, 0L, (-5L), 3L, 1L}, {0L, 0x1E1A05C3L, 0L, (-5L), 3L, 1L}}; + int i, j; + step_hash(183); + if ((((((unsigned char)g_16 * (unsigned char)((((func_59(l_259, ((unsigned)(**l_245) % (unsigned)(*p_50)), p_50, l_262, g_76) <= ((4294967294UL != (*p_52)) > g_95[4])) >= 0x5263576AL) <= p_48) < g_232)) && 1UL) & l_263) >= (*p_51))) + { + step_hash(168); + for (g_232 = 7; (g_232 <= (-29)); --g_232) + { + step_hash(167); + return &g_75; + } + step_hash(169); + l_262 = (void*)0; + } + else + { + unsigned l_269 = 0x0CF4673FL; + int l_305 = (-3L); + step_hash(175); + if (((unsigned short)(((l_268 == (void*)0) >= l_269) || ((unsigned short)(0xF8L == g_94) / (unsigned short)l_254)) << (unsigned short)6)) + { + int *l_272 = &g_189; + int *l_273 = &g_189; + int l_274[6][7] = {{(-5L), (-4L), 0xFCE317D5L, (-9L), 0x641700D3L, 0x6FF1FB67L, 0x641700D3L}, {(-5L), (-4L), 0xFCE317D5L, (-9L), 0x641700D3L, 0x6FF1FB67L, 0x641700D3L}, {(-5L), (-4L), 0xFCE317D5L, (-9L), 0x641700D3L, 0x6FF1FB67L, 0x641700D3L}, {(-5L), (-4L), 0xFCE317D5L, (-9L), 0x641700D3L, 0x6FF1FB67L, 0x641700D3L}, {(-5L), (-4L), 0xFCE317D5L, (-9L), 0x641700D3L, 0x6FF1FB67L, 0x641700D3L}, {(-5L), (-4L), 0xFCE317D5L, (-9L), 0x641700D3L, 0x6FF1FB67L, 0x641700D3L}}; + int *l_275 = &l_274[1][6]; + int *l_277 = &l_274[1][2]; + int *l_278 = &l_276[0]; + int *l_279 = &g_189; + int *l_280[6]; + int i, j; + for (i = 0; i < 6; i++) + l_280[i] = (void*)0; + step_hash(172); + g_286++; + } + else + { + step_hash(174); + return p_50; + } + step_hash(182); + if (((signed char)g_33 - (signed char)((unsigned char)g_94 * (unsigned char)(((short)g_189 % (short)l_254) & 0xEAA5L)))) + { + int *l_297 = &l_282[6][3]; + int *l_298 = &g_75; + int *l_299 = &g_76; + int *l_300 = &l_281; + int *l_301 = &l_281; + int *l_302 = (void*)0; + int *l_303 = (void*)0; + int *l_304[2]; + int i; + for (i = 0; i < 2; i++) + l_304[i] = &l_281; + step_hash(177); + (*p_49) = ((unsigned short)g_16 % (unsigned short)func_59(g_284[1][2], g_76, p_50, (**l_268), l_254)); + step_hash(178); + (**l_268) = &g_31; + step_hash(179); + g_307--; + } + else + { + int l_310 = 0x68492E97L; + int *l_311[2]; + int i; + for (i = 0; i < 2; i++) + l_311[i] = &l_282[6][1]; + step_hash(181); + ++l_314; + } + } + step_hash(184); + if ((*p_49)) + break; + } + step_hash(263); + if (((signed char)((((unsigned char)(&p_50 == (void*)0) + (unsigned char)((***l_244) && g_95[7])) || (!((***l_268) != 0x3499L))) | g_189) * (signed char)((short)g_182[0] >> (short)((void*)0 == l_323)))) + { + int *l_324 = &l_281; + int l_334 = 0L; + int l_335 = 3L; + step_hash(187); + (**l_244) = func_66(((func_59((***l_268), p_48, l_324, &g_31, ((short)p_48 + (short)(*l_324))) && ((signed char)func_59((&g_313 != (void*)0), g_94, (**l_244), &g_189, (*l_324)) * (signed char)p_48)) || 65535UL), &g_189, p_52); + step_hash(194); + if ((*g_84)) + { + int l_329 = (-1L); + step_hash(189); + (*p_49) = l_329; + } + else + { + int l_330[7][5] = {{0x2927434CL, 0x2927434CL, 6L, 7L, 0x1A42DC09L}, {0x2927434CL, 0x2927434CL, 6L, 7L, 0x1A42DC09L}, {0x2927434CL, 0x2927434CL, 6L, 7L, 0x1A42DC09L}, {0x2927434CL, 0x2927434CL, 6L, 7L, 0x1A42DC09L}, {0x2927434CL, 0x2927434CL, 6L, 7L, 0x1A42DC09L}, {0x2927434CL, 0x2927434CL, 6L, 7L, 0x1A42DC09L}, {0x2927434CL, 0x2927434CL, 6L, 7L, 0x1A42DC09L}}; + int *l_332 = &g_77; + int *l_333[4][2] = {{(void*)0, (void*)0}, {(void*)0, (void*)0}, {(void*)0, (void*)0}, {(void*)0, (void*)0}}; + int i, j; + step_hash(191); + (*l_324) |= ((void*)0 == &l_245); + step_hash(192); + l_330[3][0] = (*g_84); + step_hash(193); + ++g_338[4][6]; + } + step_hash(200); + for (g_307 = 0; (g_307 < 50); g_307 += 2) + { + step_hash(198); + (**l_244) = (**l_268); + step_hash(199); + return &g_75; + } + step_hash(221); + if (((signed char)(***l_268) * (signed char)g_336)) + { + short l_349 = (-7L); + step_hash(208); + for (g_189 = 0; (g_189 < (-22)); g_189--) + { + int *l_350 = &g_77; + step_hash(205); + (*l_324) = (*p_49); + step_hash(206); + g_77 = ((unsigned short)((*g_84) > ((*l_324) == l_349)) % (unsigned short)p_48); + step_hash(207); + (**l_268) = l_350; + } + } + else + { + int *l_361 = &g_313; + step_hash(210); + (*l_324) = (*p_49); + step_hash(211); + if ((***l_244)) + continue; + step_hash(212); + if ((*g_84)) + continue; + step_hash(220); + for (l_331 = 22; (l_331 == 5); --l_331) + { + int *l_360[7][1] = {{&l_306[2][1]}, {&l_306[2][1]}, {&l_306[2][1]}, {&l_306[2][1]}, {&l_306[2][1]}, {&l_306[2][1]}, {&l_306[2][1]}}; + int i, j; + step_hash(216); + (*l_324) = 0x63CE230CL; + step_hash(217); + (*l_361) = func_59(((unsigned char)p_48 >> (unsigned char)(g_283[4] <= (g_355 == (void*)0))), ((short)((short)func_59(((*p_51) & func_59(g_286, (***l_268), p_51, (**l_268), g_283[3])), p_48, p_52, l_360[3][0], g_31) - (short)g_16) + (short)g_313), p_49, l_361, g_95[1]); + step_hash(218); + (*l_361) = (*l_324); + step_hash(219); + if ((*g_84)) + continue; + } + } + } + else + { + short l_367 = 0x9BEDL; + int l_391 = (-1L); + step_hash(242); + for (p_48 = 0; (p_48 <= 0); p_48 += 1) + { + step_hash(231); + for (g_232 = 0; (g_232 <= 0); g_232 += 1) + { + int i; + step_hash(229); + (*p_49) ^= (((void*)0 != &p_52) ^ l_276[g_232]); + step_hash(230); + (*p_49) = (&p_49 != (void*)0); + } + step_hash(236); + for (g_336 = 0; (g_336 >= 25); g_336 += 9) + { + step_hash(235); + l_364++; + } + step_hash(241); + for (g_336 = 0; (g_336 <= 6); g_336 += 1) + { + step_hash(240); + return (**l_268); + } + } + step_hash(243); + l_367 ^= 0xA0008B65L; + step_hash(244); + (*p_49) = (*p_52); + step_hash(262); + for (l_281 = 22; (l_281 != 26); l_281++) + { + unsigned l_372 = 0x293277F5L; + int *l_394 = &l_306[2][1]; + int *l_397[2]; + signed char l_398 = 8L; + int i; + for (i = 0; i < 2; i++) + l_397[i] = &l_281; + step_hash(256); + if (((0xDAF6L > ((signed char)g_312 << (signed char)6)) & p_48)) + { + step_hash(249); + (**l_244) = func_66(p_48, p_51, p_50); + step_hash(250); + (*p_49) = l_372; + } + else + { + unsigned l_381 = 0UL; + int ***l_403 = &l_323; + step_hash(252); + l_391 = ((short)(((unsigned)((unsigned short)((unsigned)func_59(l_381, (-(signed char)((((((unsigned short)g_94 + (unsigned short)0L) | (l_381 | ((((int)((**l_244) != (void*)0) - (int)(***l_268)) < ((unsigned short)g_76 * (unsigned short)((unsigned char)255UL << (unsigned char)g_307))) != l_381))) ^ l_372) != 65533UL) <= 0xE211L)), p_49, p_50, l_372) / (unsigned)g_233) << (unsigned short)2) / (unsigned)0xF4205768L) & g_312) * (short)1UL); + step_hash(253); + (*p_49) = func_59((((unsigned short)func_59(func_59(p_48, p_48, p_52, l_394, p_48), ((signed char)(*l_394) - (signed char)p_48), p_51, l_397[0], p_48) >> (unsigned short)7) == l_398), l_367, p_52, p_52, p_48); + step_hash(254); + g_75 |= (0UL != (**l_245)); + step_hash(255); + (*p_49) = func_59((((((((unsigned)((*l_394) ^ (*g_84)) - (unsigned)(!(*p_52))) <= l_367) | (g_95[4] >= ((signed char)0x85L >> (signed char)p_48))) | (l_403 == g_355)) | p_48) && g_286), (***l_268), &g_75, &g_189, g_337); + } + step_hash(261); + for (l_314 = 0; (l_314 <= 1); l_314 += 1) + { + int i; + step_hash(260); + return p_51; + } + } + } + step_hash(264); + ++g_407; + } + step_hash(266); + return p_49; + } + step_hash(268); + (**l_245) |= (*p_50); + step_hash(269); + return l_411; +} + + + + + + + +static int * func_54(int p_55, signed char p_56, int * p_57, unsigned p_58) +{ + int l_230 = (-1L); + int l_231[10][4] = {{0xE80D83C7L, 0x9599C243L, 0x723FDEEFL, 0L}, {0xE80D83C7L, 0x9599C243L, 0x723FDEEFL, 0L}, {0xE80D83C7L, 0x9599C243L, 0x723FDEEFL, 0L}, {0xE80D83C7L, 0x9599C243L, 0x723FDEEFL, 0L}, {0xE80D83C7L, 0x9599C243L, 0x723FDEEFL, 0L}, {0xE80D83C7L, 0x9599C243L, 0x723FDEEFL, 0L}, {0xE80D83C7L, 0x9599C243L, 0x723FDEEFL, 0L}, {0xE80D83C7L, 0x9599C243L, 0x723FDEEFL, 0L}, {0xE80D83C7L, 0x9599C243L, 0x723FDEEFL, 0L}, {0xE80D83C7L, 0x9599C243L, 0x723FDEEFL, 0L}}; + int **l_238 = (void*)0; + int **l_239 = &g_84; + int i, j; + step_hash(137); + for (g_190 = (-1); (g_190 != 5); g_190 += 3) + { + int *l_223 = (void*)0; + int *l_224 = (void*)0; + int *l_225 = &g_76; + int *l_226 = (void*)0; + int l_227 = (-8L); + int *l_228 = &g_77; + int *l_229[7] = {&g_75, &g_75, &g_75, &g_75, &g_75, &g_75, &g_75}; + int **l_236 = &g_84; + int ***l_237 = &l_236; + int i; + step_hash(133); + g_233++; + step_hash(134); + (*l_228) = (*g_84); + step_hash(135); + (*l_236) = &p_55; + step_hash(136); + (*l_237) = &p_57; + } + step_hash(138); + (*l_239) = &g_77; + step_hash(139); + return &g_189; +} + + + + + + + +static signed char func_59(unsigned p_60, short p_61, int * p_62, int * p_63, signed char p_64) +{ + unsigned l_103 = 4294967295UL; + int l_131 = 0xBD50C841L; + int l_186 = (-5L); + int l_187 = 0L; + step_hash(55); + g_77 &= 0xD42852A3L; + step_hash(127); + for (g_77 = 0; (g_77 > 22); ++g_77) + { + int **l_102 = (void*)0; + int l_110 = 0L; + step_hash(59); + p_63 = &g_33; + step_hash(110); + if ((l_103 < (0x0BL < ((short)((255UL ^ (((unsigned char)((signed char)p_64 << (signed char)((void*)0 == &g_33)) / (unsigned char)p_61) ^ g_77)) != l_110) / (short)(-1L))))) + { + int l_129 = 0x2A052AF0L; + int *l_130 = &g_75; + step_hash(61); + (*l_130) = (+(((unsigned short)((signed char)p_61 << (signed char)((253UL && ((unsigned char)((short)l_103 << (short)5) >> (unsigned char)(l_103 == (250UL | (g_94 && (((signed char)((short)((unsigned char)(g_94 <= ((((signed char)(((unsigned short)(~l_103) << (unsigned short)9) && (g_95[7] < 8UL)) * (signed char)8L) != l_103) >= g_31)) + (unsigned char)g_76) + (short)0x4513L) << (signed char)1) >= l_103)))))) | 0UL)) - (unsigned short)g_16) == l_129)); + } + else + { + signed char l_153 = 0xCCL; + unsigned short l_172 = 0xF7DDL; + int l_181[4][10] = {{0x200A2DC1L, (-6L), 0x200A2DC1L, (-6L), 0x200A2DC1L, (-6L), 0x200A2DC1L, (-6L), 0x200A2DC1L, (-6L)}, {0x200A2DC1L, (-6L), 0x200A2DC1L, (-6L), 0x200A2DC1L, (-6L), 0x200A2DC1L, (-6L), 0x200A2DC1L, (-6L)}, {0x200A2DC1L, (-6L), 0x200A2DC1L, (-6L), 0x200A2DC1L, (-6L), 0x200A2DC1L, (-6L), 0x200A2DC1L, (-6L)}, {0x200A2DC1L, (-6L), 0x200A2DC1L, (-6L), 0x200A2DC1L, (-6L), 0x200A2DC1L, (-6L), 0x200A2DC1L, (-6L)}}; + short l_213 = 0x0EF9L; + int l_215 = 0x2D4C9FC4L; + int i, j; + step_hash(63); + if ((*g_84)) + break; + step_hash(64); + l_131 = (*g_84); + step_hash(109); + for (l_103 = 0; (l_103 >= 31); l_103 += 1) + { + int **l_134 = (void*)0; + int **l_135[9] = {&g_84, (void*)0, &g_84, (void*)0, &g_84, (void*)0, &g_84, (void*)0, &g_84}; + int l_162 = 0x85391AC4L; + int i; + step_hash(68); + g_84 = &g_76; + step_hash(108); + if (l_103) + { + int l_163 = 0xFDDBE10EL; + unsigned short l_164 = 0xC5FAL; + step_hash(77); + for (p_64 = 0; (p_64 >= (-1)); p_64 -= 9) + { + signed char l_165 = 1L; + step_hash(73); + g_75 ^= (*g_84); + step_hash(74); + l_131 |= (g_33 > 0x1128L); + step_hash(75); + (*g_84) = (*g_84); + step_hash(76); + l_165 ^= ((short)((((unsigned char)g_75 * (unsigned char)((void*)0 != &g_75)) && ((((unsigned char)(((short)((unsigned char)p_64 - (unsigned char)((short)((-(unsigned short)((short)l_153 >> (short)g_77)) != l_153) - (short)(((unsigned short)(((short)((((signed char)((int)(((0L >= g_77) & (-1L)) & p_60) - (int)l_162) / (signed char)0x50L) != 0xEAL) < l_163) << (short)5) ^ g_95[5]) / (unsigned short)l_164) > (*p_62)))) * (short)l_153) >= 4294967286UL) >> (unsigned char)g_76) || p_61) && g_16)) != g_95[6]) - (short)p_64); + } + step_hash(83); + if (l_153) + { + step_hash(79); + (*g_84) = (*p_62); + step_hash(80); + p_63 = &g_33; + } + else + { + step_hash(82); + if (l_164) + break; + } + step_hash(92); + if ((*p_62)) + { + step_hash(85); + p_63 = p_62; + step_hash(86); + (*g_84) |= ((unsigned short)((short)(&g_84 == (void*)0) / (short)g_33) % (unsigned short)0xD8F4L); + step_hash(87); + if ((*g_84)) + continue; + } + else + { + step_hash(89); + (*g_84) &= ((signed char)l_172 - (signed char)((short)(p_61 == l_153) << (short)5)); + step_hash(90); + g_84 = &g_31; + step_hash(91); + l_110 = (*g_84); + } + } + else + { + signed char l_177 = 0x3DL; + int l_185 = 0x2546FF5CL; + unsigned l_206[10][4] = {{0xFF2045DDL, 0xFF2045DDL, 0UL, 0xFF2045DDL}, {0xFF2045DDL, 0xFF2045DDL, 0UL, 0xFF2045DDL}, {0xFF2045DDL, 0xFF2045DDL, 0UL, 0xFF2045DDL}, {0xFF2045DDL, 0xFF2045DDL, 0UL, 0xFF2045DDL}, {0xFF2045DDL, 0xFF2045DDL, 0UL, 0xFF2045DDL}, {0xFF2045DDL, 0xFF2045DDL, 0UL, 0xFF2045DDL}, {0xFF2045DDL, 0xFF2045DDL, 0UL, 0xFF2045DDL}, {0xFF2045DDL, 0xFF2045DDL, 0UL, 0xFF2045DDL}, {0xFF2045DDL, 0xFF2045DDL, 0UL, 0xFF2045DDL}, {0xFF2045DDL, 0xFF2045DDL, 0UL, 0xFF2045DDL}}; + int i, j; + step_hash(98); + for (l_172 = (-7); (l_172 < 33); l_172 += 6) + { + unsigned char l_178 = 0x35L; + step_hash(97); + l_178++; + } + step_hash(99); + ++g_182[0]; + step_hash(100); + g_191++; + step_hash(107); + for (l_186 = 0; (l_186 != 0); ++l_186) + { + int l_214 = 1L; + step_hash(104); + p_62 = p_63; + step_hash(105); + (*g_84) ^= 0x90CD53C7L; + step_hash(106); + l_215 &= ((unsigned char)(((signed char)((unsigned short)0xA1C3L * (unsigned short)((signed char)(((short)l_206[7][3] / (short)(l_172 ^ (9UL < g_182[4]))) > (((((unsigned)((short)g_182[0] % (short)65535UL) / (unsigned)(((unsigned char)g_188 << (unsigned char)(g_75 == l_181[2][2])) ^ l_172)) <= l_213) && p_61) & l_214)) % (signed char)g_16)) * (signed char)l_206[7][2]) > p_64) / (unsigned char)0xF4L); + } + } + } + } + step_hash(116); + for (l_131 = 7; (l_131 >= 1); l_131 -= 1) + { + int ***l_216 = &l_102; + step_hash(114); + (*l_216) = &p_63; + step_hash(115); + (**l_216) = (**l_216); + } + step_hash(126); + for (g_76 = 0; (g_76 == 11); g_76 += 5) + { + step_hash(120); + g_75 = l_186; + step_hash(125); + for (l_110 = 0; (l_110 < 29); l_110 += 3) + { + step_hash(124); + p_62 = p_63; + } + } + } + step_hash(128); + return g_77; +} + + + + + + + +static int * func_66(unsigned char p_67, int * p_68, int * p_69) +{ + unsigned l_74[3][5] = {{6UL, 0x21D2CF1AL, 0UL, 0UL, 0x21D2CF1AL}, {6UL, 0x21D2CF1AL, 0UL, 0UL, 0x21D2CF1AL}, {6UL, 0x21D2CF1AL, 0UL, 0UL, 0x21D2CF1AL}}; + int l_78 = 0x955DF93CL; + int i, j; + step_hash(52); + for (p_67 = 16; (p_67 == 23); p_67 += 9) + { + int **l_72 = (void*)0; + int **l_73 = (void*)0; + int l_92 = 0xD1841160L; + int **l_98 = (void*)0; + int **l_99 = &g_84; + step_hash(15); + p_68 = p_69; + step_hash(49); + for (g_75 = 2; (g_75 >= 0); g_75 -= 1) + { + int **l_79 = (void*)0; + int l_80[9] = {0xBBCB567DL, 0xDB1B7937L, 0xBBCB567DL, 0xDB1B7937L, 0xBBCB567DL, 0xDB1B7937L, 0xBBCB567DL, 0xDB1B7937L, 0xBBCB567DL}; + int *l_86 = &l_80[6]; + int *l_87 = &g_76; + int *l_88 = &g_76; + int *l_89 = (void*)0; + int *l_90 = &l_78; + int *l_91 = (void*)0; + int *l_93[7] = {&g_31, &l_92, &g_31, &l_92, &g_31, &l_92, &g_31}; + int i; + step_hash(47); + for (g_76 = 2; (g_76 >= 0); g_76 -= 1) + { + int l_85 = 1L; + int i, j; + step_hash(32); + for (g_77 = 2; (g_77 >= 0); g_77 -= 1) + { + int i, j; + step_hash(25); + l_78 = l_74[g_76][(g_77 + 1)]; + step_hash(30); + if ((g_33 < ((void*)0 == p_68))) + { + step_hash(27); + return p_68; + } + else + { + step_hash(29); + l_79 = &p_69; + } + step_hash(31); + if ((*p_69)) + break; + } + step_hash(33); + l_80[6] = l_74[g_75][(g_76 + 1)]; + step_hash(46); + for (l_78 = 0; (l_78 <= 2); l_78 += 1) + { + int l_83 = 0x78915CEDL; + int i, j; + step_hash(37); + l_83 = (((l_74[g_75][l_78] || (g_75 || ((void*)0 != p_68))) <= ((void*)0 != &p_69)) > g_33); + step_hash(43); + for (l_83 = 0; (l_83 <= 8); l_83 += 1) + { + int i, j; + step_hash(41); + l_80[l_83] ^= l_74[l_78][(g_75 + 1)]; + step_hash(42); + l_80[(g_76 + 6)] = 0x5D7A2328L; + } + step_hash(44); + g_84 = &g_76; + step_hash(45); + l_85 = 0xB7A7919EL; + } + } + step_hash(48); + ++g_95[0]; + } + step_hash(50); + l_92 ^= 0xD205C6C2L; + step_hash(51); + (*l_99) = p_68; + } + step_hash(53); + return &g_76; +} + + +void csmith_compute_hash(void) +{ + int i, j; + transparent_crc(g_16, "g_16", print_hash_value); + transparent_crc(g_31, "g_31", print_hash_value); + transparent_crc(g_33, "g_33", print_hash_value); + transparent_crc(g_75, "g_75", print_hash_value); + transparent_crc(g_76, "g_76", print_hash_value); + transparent_crc(g_77, "g_77", print_hash_value); + transparent_crc(g_94, "g_94", print_hash_value); + for (i = 0; i < 8; i++) + { + transparent_crc(g_95[i], "g_95[i]", print_hash_value); + if (print_hash_value) printf("index = [%d]\n", i); + + } + for (i = 0; i < 5; i++) + { + transparent_crc(g_182[i], "g_182[i]", print_hash_value); + if (print_hash_value) printf("index = [%d]\n", i); + + } + transparent_crc(g_188, "g_188", print_hash_value); + transparent_crc(g_189, "g_189", print_hash_value); + transparent_crc(g_190, "g_190", print_hash_value); + transparent_crc(g_191, "g_191", print_hash_value); + transparent_crc(g_232, "g_232", print_hash_value); + transparent_crc(g_233, "g_233", print_hash_value); + for (i = 0; i < 7; i++) + { + transparent_crc(g_283[i], "g_283[i]", print_hash_value); + if (print_hash_value) printf("index = [%d]\n", i); + + } + for (i = 0; i < 8; i++) + { + for (j = 0; j < 3; j++) + { + transparent_crc(g_284[i][j], "g_284[i][j]", print_hash_value); + if (print_hash_value) printf("index = [%d][%d]\n", i, j); + + } + } + transparent_crc(g_285, "g_285", print_hash_value); + transparent_crc(g_286, "g_286", print_hash_value); + transparent_crc(g_307, "g_307", print_hash_value); + transparent_crc(g_312, "g_312", print_hash_value); + transparent_crc(g_313, "g_313", print_hash_value); + transparent_crc(g_336, "g_336", print_hash_value); + transparent_crc(g_337, "g_337", print_hash_value); + for (i = 0; i < 9; i++) + { + for (j = 0; j < 8; j++) + { + transparent_crc(g_338[i][j], "g_338[i][j]", print_hash_value); + if (print_hash_value) printf("index = [%d][%d]\n", i, j); + + } + } + transparent_crc(g_406, "g_406", print_hash_value); + transparent_crc(g_407, "g_407", print_hash_value); + transparent_crc(g_449, "g_449", print_hash_value); + transparent_crc(g_514, "g_514", print_hash_value); + transparent_crc(g_515, "g_515", print_hash_value); + for (i = 0; i < 4; i++) + { + for (j = 0; j < 3; j++) + { + transparent_crc(g_516[i][j], "g_516[i][j]", print_hash_value); + if (print_hash_value) printf("index = [%d][%d]\n", i, j); + + } + } + for (i = 0; i < 3; i++) + { + transparent_crc(g_549[i], "g_549[i]", print_hash_value); + if (print_hash_value) printf("index = [%d]\n", i); + + } + for (i = 0; i < 8; i++) + { + for (j = 0; j < 8; j++) + { + transparent_crc(g_633[i][j], "g_633[i][j]", print_hash_value); + if (print_hash_value) printf("index = [%d][%d]\n", i, j); + + } + } + for (i = 0; i < 7; i++) + { + transparent_crc(g_706[i], "g_706[i]", print_hash_value); + if (print_hash_value) printf("index = [%d]\n", i); + + } + transparent_crc(g_903, "g_903", print_hash_value); + transparent_crc(g_904, "g_904", print_hash_value); +} + +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} + + + +int main (void) +{ + int i, j; + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand94.expect b/src/tests/csmith/rand94.expect new file mode 100644 index 0000000..57c46ba --- /dev/null +++ b/src/tests/csmith/rand94.expect @@ -0,0 +1,2160 @@ +...checksum after hashing g_16 : E4F0F7F3 +...checksum after hashing g_31 : 811934EE +...checksum after hashing g_33 : 2E74EC7 +...checksum after hashing g_75 : F757CA0B +...checksum after hashing g_76 : 4E280C2 +...checksum after hashing g_77 : 26C900D2 +...checksum after hashing g_94 : 79F90C0E +...checksum after hashing g_95[i] : 50942A4F +index = [0] +...checksum after hashing g_95[i] : 11132DCE +index = [1] +...checksum after hashing g_95[i] : F8AE1A92 +index = [2] +...checksum after hashing g_95[i] : 1CE25CB9 +index = [3] +...checksum after hashing g_95[i] : 28632C91 +index = [4] +...checksum after hashing g_95[i] : D63611A2 +index = [5] +...checksum after hashing g_95[i] : 49DCC929 +index = [6] +...checksum after hashing g_95[i] : F8318625 +index = [7] +...checksum after hashing g_182[i] : 9E97FDDB +index = [0] +...checksum after hashing g_182[i] : FC06C4FC +index = [1] +...checksum after hashing g_182[i] : 21BF364B +index = [2] +...checksum after hashing g_182[i] : DA3F5C4E +index = [3] +...checksum after hashing g_182[i] : B94D5155 +index = [4] +...checksum after hashing g_188 : 8B8DD166 +...checksum after hashing g_189 : 16DC23DE +...checksum after hashing g_190 : 49DD64D +...checksum after hashing g_191 : A10F4959 +...checksum after hashing g_232 : F429F241 +...checksum after hashing g_233 : 588F41FA +...checksum after hashing g_283[i] : 7001A76F +index = [0] +...checksum after hashing g_283[i] : 6B283CDD +index = [1] +...checksum after hashing g_283[i] : 4F5B80D3 +index = [2] +...checksum after hashing g_283[i] : F7BC0579 +index = [3] +...checksum after hashing g_283[i] : 4A7C40EF +index = [4] +...checksum after hashing g_283[i] : 764192CA +index = [5] +...checksum after hashing g_283[i] : 864A23A8 +index = [6] +...checksum after hashing g_284[i][j] : 2561F0B0 +index = [0][0] +...checksum after hashing g_284[i][j] : 6AC0B92 +index = [0][1] +...checksum after hashing g_284[i][j] : 69352867 +index = [0][2] +...checksum after hashing g_284[i][j] : 9F087BD1 +index = [1][0] +...checksum after hashing g_284[i][j] : F7DDE5E9 +index = [1][1] +...checksum after hashing g_284[i][j] : 8AE9786D +index = [1][2] +...checksum after hashing g_284[i][j] : 88878CD4 +index = [2][0] +...checksum after hashing g_284[i][j] : 4F4071CD +index = [2][1] +...checksum after hashing g_284[i][j] : 5EF69FC1 +index = [2][2] +...checksum after hashing g_284[i][j] : 6F73F41F +index = [3][0] +...checksum after hashing g_284[i][j] : FA507240 +index = [3][1] +...checksum after hashing g_284[i][j] : B24A1A2C +index = [3][2] +...checksum after hashing g_284[i][j] : 4D54FB76 +index = [4][0] +...checksum after hashing g_284[i][j] : B8877E75 +index = [4][1] +...checksum after hashing g_284[i][j] : 2A0E98BF +index = [4][2] +...checksum after hashing g_284[i][j] : 6AD1EBA5 +index = [5][0] +...checksum after hashing g_284[i][j] : 73BE1217 +index = [5][1] +...checksum after hashing g_284[i][j] : F8DE03F1 +index = [5][2] +...checksum after hashing g_284[i][j] : 9B9E55D +index = [6][0] +...checksum after hashing g_284[i][j] : 436DD018 +index = [6][1] +...checksum after hashing g_284[i][j] : BE5AF7F9 +index = [6][2] +...checksum after hashing g_284[i][j] : BE90AF54 +index = [7][0] +...checksum after hashing g_284[i][j] : 522B2E40 +index = [7][1] +...checksum after hashing g_284[i][j] : C32A461F +index = [7][2] +...checksum after hashing g_285 : 56287103 +...checksum after hashing g_286 : 1526CB10 +...checksum after hashing g_307 : 308C0B1F +...checksum after hashing g_312 : 1963C270 +...checksum after hashing g_313 : 83076BAF +...checksum after hashing g_336 : EC0F9942 +...checksum after hashing g_337 : 969D4E63 +...checksum after hashing g_338[i][j] : D6DAEA6F +index = [0][0] +...checksum after hashing g_338[i][j] : 2E5711C6 +index = [0][1] +...checksum after hashing g_338[i][j] : 98AF672C +index = [0][2] +...checksum after hashing g_338[i][j] : E9CFCE0A +index = [0][3] +...checksum after hashing g_338[i][j] : EA75DDE4 +index = [0][4] +...checksum after hashing g_338[i][j] : EF9F29C5 +index = [0][5] +...checksum after hashing g_338[i][j] : 82ECBCAC +index = [0][6] +...checksum after hashing g_338[i][j] : C5C526C8 +index = [0][7] +...checksum after hashing g_338[i][j] : 8A7439E1 +index = [1][0] +...checksum after hashing g_338[i][j] : FE47D71F +index = [1][1] +...checksum after hashing g_338[i][j] : 9AC0BB48 +index = [1][2] +...checksum after hashing g_338[i][j] : D573744E +index = [1][3] +...checksum after hashing g_338[i][j] : 51D5F47B +index = [1][4] +...checksum after hashing g_338[i][j] : CF9473B5 +index = [1][5] +...checksum after hashing g_338[i][j] : 50624E55 +index = [1][6] +...checksum after hashing g_338[i][j] : 4536DE66 +index = [1][7] +...checksum after hashing g_338[i][j] : 4E3E44E1 +index = [2][0] +...checksum after hashing g_338[i][j] : 34F18D3A +index = [2][1] +...checksum after hashing g_338[i][j] : A5296DB2 +index = [2][2] +...checksum after hashing g_338[i][j] : 8C76AE97 +index = [2][3] +...checksum after hashing g_338[i][j] : E557AF9B +index = [2][4] +...checksum after hashing g_338[i][j] : BCBB7E80 +index = [2][5] +...checksum after hashing g_338[i][j] : 445FCD7E +index = [2][6] +...checksum after hashing g_338[i][j] : A144CF43 +index = [2][7] +...checksum after hashing g_338[i][j] : 7E58EFBF +index = [3][0] +...checksum after hashing g_338[i][j] : DF70BBA7 +index = [3][1] +...checksum after hashing g_338[i][j] : DFA55F13 +index = [3][2] +...checksum after hashing g_338[i][j] : 79A8AE6C +index = [3][3] +...checksum after hashing g_338[i][j] : 665CD03F +index = [3][4] +...checksum after hashing g_338[i][j] : B65AD4EE +index = [3][5] +...checksum after hashing g_338[i][j] : ECF9BE4B +index = [3][6] +...checksum after hashing g_338[i][j] : 1056216C +index = [3][7] +...checksum after hashing g_338[i][j] : E1E75EB4 +index = [4][0] +...checksum after hashing g_338[i][j] : CF009423 +index = [4][1] +...checksum after hashing g_338[i][j] : BC071630 +index = [4][2] +...checksum after hashing g_338[i][j] : FCEEF67A +index = [4][3] +...checksum after hashing g_338[i][j] : 4A703858 +index = [4][4] +...checksum after hashing g_338[i][j] : BCB39D01 +index = [4][5] +...checksum after hashing g_338[i][j] : 72C7F8D1 +index = [4][6] +...checksum after hashing g_338[i][j] : E0CE74E0 +index = [4][7] +...checksum after hashing g_338[i][j] : 283A4962 +index = [5][0] +...checksum after hashing g_338[i][j] : 37806D5 +index = [5][1] +...checksum after hashing g_338[i][j] : 94A94EB0 +index = [5][2] +...checksum after hashing g_338[i][j] : 762906D4 +index = [5][3] +...checksum after hashing g_338[i][j] : DBD60E09 +index = [5][4] +...checksum after hashing g_338[i][j] : 90B1D459 +index = [5][5] +...checksum after hashing g_338[i][j] : 3DB67B2 +index = [5][6] +...checksum after hashing g_338[i][j] : FE67CF37 +index = [5][7] +...checksum after hashing g_338[i][j] : DF78E370 +index = [6][0] +...checksum after hashing g_338[i][j] : CC110B4F +index = [6][1] +...checksum after hashing g_338[i][j] : F168D3EC +index = [6][2] +...checksum after hashing g_338[i][j] : ED00EEB5 +index = [6][3] +...checksum after hashing g_338[i][j] : DC26CA50 +index = [6][4] +...checksum after hashing g_338[i][j] : 3ACADEF3 +index = [6][5] +...checksum after hashing g_338[i][j] : D652F1CE +index = [6][6] +...checksum after hashing g_338[i][j] : 3AE81108 +index = [6][7] +...checksum after hashing g_338[i][j] : D0359190 +index = [7][0] +...checksum after hashing g_338[i][j] : 9873DA90 +index = [7][1] +...checksum after hashing g_338[i][j] : 38D9B9EC +index = [7][2] +...checksum after hashing g_338[i][j] : B72645AE +index = [7][3] +...checksum after hashing g_338[i][j] : C6739381 +index = [7][4] +...checksum after hashing g_338[i][j] : FDE1455B +index = [7][5] +...checksum after hashing g_338[i][j] : DCBB3D4F +index = [7][6] +...checksum after hashing g_338[i][j] : 98D10EC9 +index = [7][7] +...checksum after hashing g_338[i][j] : 3FE2B3C0 +index = [8][0] +...checksum after hashing g_338[i][j] : 967BEB8D +index = [8][1] +...checksum after hashing g_338[i][j] : 90621E06 +index = [8][2] +...checksum after hashing g_338[i][j] : DEFF3BE +index = [8][3] +...checksum after hashing g_338[i][j] : 66357029 +index = [8][4] +...checksum after hashing g_338[i][j] : AE6F5123 +index = [8][5] +...checksum after hashing g_338[i][j] : 3E7D0B1B +index = [8][6] +...checksum after hashing g_338[i][j] : 2FFCFC82 +index = [8][7] +...checksum after hashing g_406 : 5206E0CD +...checksum after hashing g_407 : 881A5F1B +...checksum after hashing g_449 : B070DBD5 +...checksum after hashing g_514 : 5916F57A +...checksum after hashing g_515 : B2F4EAE2 +...checksum after hashing g_516[i][j] : C5554CB7 +index = [0][0] +...checksum after hashing g_516[i][j] : 31176A5A +index = [0][1] +...checksum after hashing g_516[i][j] : FD4443F7 +index = [0][2] +...checksum after hashing g_516[i][j] : 769D7F4C +index = [1][0] +...checksum after hashing g_516[i][j] : 17161F45 +index = [1][1] +...checksum after hashing g_516[i][j] : 6C121A39 +index = [1][2] +...checksum after hashing g_516[i][j] : E88BAA46 +index = [2][0] +...checksum after hashing g_516[i][j] : F8C6036E +index = [2][1] +...checksum after hashing g_516[i][j] : BF9052E4 +index = [2][2] +...checksum after hashing g_516[i][j] : 54536EDD +index = [3][0] +...checksum after hashing g_516[i][j] : 8F17EBE7 +index = [3][1] +...checksum after hashing g_516[i][j] : DE723A8C +index = [3][2] +...checksum after hashing g_549[i] : DEE729D +index = [0] +...checksum after hashing g_549[i] : 59ECD867 +index = [1] +...checksum after hashing g_549[i] : 3AE8017D +index = [2] +...checksum after hashing g_633[i][j] : E9786D3C +index = [0][0] +...checksum after hashing g_633[i][j] : 2C07F91E +index = [0][1] +...checksum after hashing g_633[i][j] : DC98A53 +index = [0][2] +...checksum after hashing g_633[i][j] : B95661F6 +index = [0][3] +...checksum after hashing g_633[i][j] : 9500C68A +index = [0][4] +...checksum after hashing g_633[i][j] : E2E77133 +index = [0][5] +...checksum after hashing g_633[i][j] : C9D26C4B +index = [0][6] +...checksum after hashing g_633[i][j] : B4AB7FA7 +index = [0][7] +...checksum after hashing g_633[i][j] : 2FAAC37A +index = [1][0] +...checksum after hashing g_633[i][j] : 80974E8D +index = [1][1] +...checksum after hashing g_633[i][j] : CC0C4955 +index = [1][2] +...checksum after hashing g_633[i][j] : 553AC71E +index = [1][3] +...checksum after hashing g_633[i][j] : 3BCA0477 +index = [1][4] +...checksum after hashing g_633[i][j] : 4BB4C4C +index = [1][5] +...checksum after hashing g_633[i][j] : 895AFF57 +index = [1][6] +...checksum after hashing g_633[i][j] : D4B7C2FA +index = [1][7] +...checksum after hashing g_633[i][j] : 708E4543 +index = [2][0] +...checksum after hashing g_633[i][j] : E2303357 +index = [2][1] +...checksum after hashing g_633[i][j] : 9B36C1F1 +index = [2][2] +...checksum after hashing g_633[i][j] : A8B3195A +index = [2][3] +...checksum after hashing g_633[i][j] : 81E67E84 +index = [2][4] +...checksum after hashing g_633[i][j] : DB8B29BF +index = [2][5] +...checksum after hashing g_633[i][j] : 9ABFB663 +index = [2][6] +...checksum after hashing g_633[i][j] : 73025D34 +index = [2][7] +...checksum after hashing g_633[i][j] : C1534F0D +index = [3][0] +...checksum after hashing g_633[i][j] : 1C9CA1C7 +index = [3][1] +...checksum after hashing g_633[i][j] : 80566035 +index = [3][2] +...checksum after hashing g_633[i][j] : 66BEF517 +index = [3][3] +...checksum after hashing g_633[i][j] : 8112465A +index = [3][4] +...checksum after hashing g_633[i][j] : 47A87784 +index = [3][5] +...checksum after hashing g_633[i][j] : 9CA76277 +index = [3][6] +...checksum after hashing g_633[i][j] : 4D813D7C +index = [3][7] +...checksum after hashing g_633[i][j] : 6EB22DC +index = [4][0] +...checksum after hashing g_633[i][j] : EB6754EB +index = [4][1] +...checksum after hashing g_633[i][j] : D2C9E41 +index = [4][2] +...checksum after hashing g_633[i][j] : 7B60F2E7 +index = [4][3] +...checksum after hashing g_633[i][j] : 7E86C230 +index = [4][4] +...checksum after hashing g_633[i][j] : CD20732C +index = [4][5] +...checksum after hashing g_633[i][j] : ED46833C +index = [4][6] +...checksum after hashing g_633[i][j] : C9D3DBD0 +index = [4][7] +...checksum after hashing g_633[i][j] : CE61509C +index = [5][0] +...checksum after hashing g_633[i][j] : 73D58AAB +index = [5][1] +...checksum after hashing g_633[i][j] : 3908090A +index = [5][2] +...checksum after hashing g_633[i][j] : 1F7596BD +index = [5][3] +...checksum after hashing g_633[i][j] : E8820D5F +index = [5][4] +...checksum after hashing g_633[i][j] : 4996B671 +index = [5][5] +...checksum after hashing g_633[i][j] : 1B0F4EEF +index = [5][6] +...checksum after hashing g_633[i][j] : 11206BD1 +index = [5][7] +...checksum after hashing g_633[i][j] : 41A2171 +index = [6][0] +...checksum after hashing g_633[i][j] : B5899ABA +index = [6][1] +...checksum after hashing g_633[i][j] : A982EF5D +index = [6][2] +...checksum after hashing g_633[i][j] : D5A3EE31 +index = [6][3] +...checksum after hashing g_633[i][j] : B93C7403 +index = [6][4] +...checksum after hashing g_633[i][j] : F547B7E0 +index = [6][5] +...checksum after hashing g_633[i][j] : 45C5A9E0 +index = [6][6] +...checksum after hashing g_633[i][j] : 5828FE95 +index = [6][7] +...checksum after hashing g_633[i][j] : 2C6DE73C +index = [7][0] +...checksum after hashing g_633[i][j] : 1C1EB763 +index = [7][1] +...checksum after hashing g_633[i][j] : 5341CB6C +index = [7][2] +...checksum after hashing g_633[i][j] : 1FCF0046 +index = [7][3] +...checksum after hashing g_633[i][j] : 5E511E89 +index = [7][4] +...checksum after hashing g_633[i][j] : DCDECD78 +index = [7][5] +...checksum after hashing g_633[i][j] : 86662412 +index = [7][6] +...checksum after hashing g_633[i][j] : 1AEDD44A +index = [7][7] +...checksum after hashing g_706[i] : B7D9FB14 +index = [0] +...checksum after hashing g_706[i] : BC57AEFA +index = [1] +...checksum after hashing g_706[i] : E9E0456E +index = [2] +...checksum after hashing g_706[i] : F542CC51 +index = [3] +...checksum after hashing g_706[i] : 3BDE868D +index = [4] +...checksum after hashing g_706[i] : B0CBFF92 +index = [5] +...checksum after hashing g_706[i] : 95FC0AB1 +index = [6] +...checksum after hashing g_903 : F9570DCA +...checksum after hashing g_904 : AE108C0E +before stmt(605): checksum = AE108C0E +...checksum after hashing g_16 : E4F0F7F3 +...checksum after hashing g_31 : 811934EE +...checksum after hashing g_33 : 2E74EC7 +...checksum after hashing g_75 : F757CA0B +...checksum after hashing g_76 : 4E280C2 +...checksum after hashing g_77 : 26C900D2 +...checksum after hashing g_94 : 79F90C0E +...checksum after hashing g_95[i] : 50942A4F +index = [0] +...checksum after hashing g_95[i] : 11132DCE +index = [1] +...checksum after hashing g_95[i] : F8AE1A92 +index = [2] +...checksum after hashing g_95[i] : 1CE25CB9 +index = [3] +...checksum after hashing g_95[i] : 28632C91 +index = [4] +...checksum after hashing g_95[i] : D63611A2 +index = [5] +...checksum after hashing g_95[i] : 49DCC929 +index = [6] +...checksum after hashing g_95[i] : F8318625 +index = [7] +...checksum after hashing g_182[i] : 9E97FDDB +index = [0] +...checksum after hashing g_182[i] : FC06C4FC +index = [1] +...checksum after hashing g_182[i] : 21BF364B +index = [2] +...checksum after hashing g_182[i] : DA3F5C4E +index = [3] +...checksum after hashing g_182[i] : B94D5155 +index = [4] +...checksum after hashing g_188 : 8B8DD166 +...checksum after hashing g_189 : 16DC23DE +...checksum after hashing g_190 : 49DD64D +...checksum after hashing g_191 : A10F4959 +...checksum after hashing g_232 : F429F241 +...checksum after hashing g_233 : 588F41FA +...checksum after hashing g_283[i] : 7001A76F +index = [0] +...checksum after hashing g_283[i] : 6B283CDD +index = [1] +...checksum after hashing g_283[i] : 4F5B80D3 +index = [2] +...checksum after hashing g_283[i] : F7BC0579 +index = [3] +...checksum after hashing g_283[i] : 4A7C40EF +index = [4] +...checksum after hashing g_283[i] : 764192CA +index = [5] +...checksum after hashing g_283[i] : 864A23A8 +index = [6] +...checksum after hashing g_284[i][j] : 2561F0B0 +index = [0][0] +...checksum after hashing g_284[i][j] : 6AC0B92 +index = [0][1] +...checksum after hashing g_284[i][j] : 69352867 +index = [0][2] +...checksum after hashing g_284[i][j] : 9F087BD1 +index = [1][0] +...checksum after hashing g_284[i][j] : F7DDE5E9 +index = [1][1] +...checksum after hashing g_284[i][j] : 8AE9786D +index = [1][2] +...checksum after hashing g_284[i][j] : 88878CD4 +index = [2][0] +...checksum after hashing g_284[i][j] : 4F4071CD +index = [2][1] +...checksum after hashing g_284[i][j] : 5EF69FC1 +index = [2][2] +...checksum after hashing g_284[i][j] : 6F73F41F +index = [3][0] +...checksum after hashing g_284[i][j] : FA507240 +index = [3][1] +...checksum after hashing g_284[i][j] : B24A1A2C +index = [3][2] +...checksum after hashing g_284[i][j] : 4D54FB76 +index = [4][0] +...checksum after hashing g_284[i][j] : B8877E75 +index = [4][1] +...checksum after hashing g_284[i][j] : 2A0E98BF +index = [4][2] +...checksum after hashing g_284[i][j] : 6AD1EBA5 +index = [5][0] +...checksum after hashing g_284[i][j] : 73BE1217 +index = [5][1] +...checksum after hashing g_284[i][j] : F8DE03F1 +index = [5][2] +...checksum after hashing g_284[i][j] : 9B9E55D +index = [6][0] +...checksum after hashing g_284[i][j] : 436DD018 +index = [6][1] +...checksum after hashing g_284[i][j] : BE5AF7F9 +index = [6][2] +...checksum after hashing g_284[i][j] : BE90AF54 +index = [7][0] +...checksum after hashing g_284[i][j] : 522B2E40 +index = [7][1] +...checksum after hashing g_284[i][j] : C32A461F +index = [7][2] +...checksum after hashing g_285 : 56287103 +...checksum after hashing g_286 : 1526CB10 +...checksum after hashing g_307 : 308C0B1F +...checksum after hashing g_312 : 1963C270 +...checksum after hashing g_313 : 83076BAF +...checksum after hashing g_336 : EC0F9942 +...checksum after hashing g_337 : 969D4E63 +...checksum after hashing g_338[i][j] : D6DAEA6F +index = [0][0] +...checksum after hashing g_338[i][j] : 2E5711C6 +index = [0][1] +...checksum after hashing g_338[i][j] : 98AF672C +index = [0][2] +...checksum after hashing g_338[i][j] : E9CFCE0A +index = [0][3] +...checksum after hashing g_338[i][j] : EA75DDE4 +index = [0][4] +...checksum after hashing g_338[i][j] : EF9F29C5 +index = [0][5] +...checksum after hashing g_338[i][j] : 82ECBCAC +index = [0][6] +...checksum after hashing g_338[i][j] : C5C526C8 +index = [0][7] +...checksum after hashing g_338[i][j] : 8A7439E1 +index = [1][0] +...checksum after hashing g_338[i][j] : FE47D71F +index = [1][1] +...checksum after hashing g_338[i][j] : 9AC0BB48 +index = [1][2] +...checksum after hashing g_338[i][j] : D573744E +index = [1][3] +...checksum after hashing g_338[i][j] : 51D5F47B +index = [1][4] +...checksum after hashing g_338[i][j] : CF9473B5 +index = [1][5] +...checksum after hashing g_338[i][j] : 50624E55 +index = [1][6] +...checksum after hashing g_338[i][j] : 4536DE66 +index = [1][7] +...checksum after hashing g_338[i][j] : 4E3E44E1 +index = [2][0] +...checksum after hashing g_338[i][j] : 34F18D3A +index = [2][1] +...checksum after hashing g_338[i][j] : A5296DB2 +index = [2][2] +...checksum after hashing g_338[i][j] : 8C76AE97 +index = [2][3] +...checksum after hashing g_338[i][j] : E557AF9B +index = [2][4] +...checksum after hashing g_338[i][j] : BCBB7E80 +index = [2][5] +...checksum after hashing g_338[i][j] : 445FCD7E +index = [2][6] +...checksum after hashing g_338[i][j] : A144CF43 +index = [2][7] +...checksum after hashing g_338[i][j] : 7E58EFBF +index = [3][0] +...checksum after hashing g_338[i][j] : DF70BBA7 +index = [3][1] +...checksum after hashing g_338[i][j] : DFA55F13 +index = [3][2] +...checksum after hashing g_338[i][j] : 79A8AE6C +index = [3][3] +...checksum after hashing g_338[i][j] : 665CD03F +index = [3][4] +...checksum after hashing g_338[i][j] : B65AD4EE +index = [3][5] +...checksum after hashing g_338[i][j] : ECF9BE4B +index = [3][6] +...checksum after hashing g_338[i][j] : 1056216C +index = [3][7] +...checksum after hashing g_338[i][j] : E1E75EB4 +index = [4][0] +...checksum after hashing g_338[i][j] : CF009423 +index = [4][1] +...checksum after hashing g_338[i][j] : BC071630 +index = [4][2] +...checksum after hashing g_338[i][j] : FCEEF67A +index = [4][3] +...checksum after hashing g_338[i][j] : 4A703858 +index = [4][4] +...checksum after hashing g_338[i][j] : BCB39D01 +index = [4][5] +...checksum after hashing g_338[i][j] : 72C7F8D1 +index = [4][6] +...checksum after hashing g_338[i][j] : E0CE74E0 +index = [4][7] +...checksum after hashing g_338[i][j] : 283A4962 +index = [5][0] +...checksum after hashing g_338[i][j] : 37806D5 +index = [5][1] +...checksum after hashing g_338[i][j] : 94A94EB0 +index = [5][2] +...checksum after hashing g_338[i][j] : 762906D4 +index = [5][3] +...checksum after hashing g_338[i][j] : DBD60E09 +index = [5][4] +...checksum after hashing g_338[i][j] : 90B1D459 +index = [5][5] +...checksum after hashing g_338[i][j] : 3DB67B2 +index = [5][6] +...checksum after hashing g_338[i][j] : FE67CF37 +index = [5][7] +...checksum after hashing g_338[i][j] : DF78E370 +index = [6][0] +...checksum after hashing g_338[i][j] : CC110B4F +index = [6][1] +...checksum after hashing g_338[i][j] : F168D3EC +index = [6][2] +...checksum after hashing g_338[i][j] : ED00EEB5 +index = [6][3] +...checksum after hashing g_338[i][j] : DC26CA50 +index = [6][4] +...checksum after hashing g_338[i][j] : 3ACADEF3 +index = [6][5] +...checksum after hashing g_338[i][j] : D652F1CE +index = [6][6] +...checksum after hashing g_338[i][j] : 3AE81108 +index = [6][7] +...checksum after hashing g_338[i][j] : D0359190 +index = [7][0] +...checksum after hashing g_338[i][j] : 9873DA90 +index = [7][1] +...checksum after hashing g_338[i][j] : 38D9B9EC +index = [7][2] +...checksum after hashing g_338[i][j] : B72645AE +index = [7][3] +...checksum after hashing g_338[i][j] : C6739381 +index = [7][4] +...checksum after hashing g_338[i][j] : FDE1455B +index = [7][5] +...checksum after hashing g_338[i][j] : DCBB3D4F +index = [7][6] +...checksum after hashing g_338[i][j] : 98D10EC9 +index = [7][7] +...checksum after hashing g_338[i][j] : 3FE2B3C0 +index = [8][0] +...checksum after hashing g_338[i][j] : 967BEB8D +index = [8][1] +...checksum after hashing g_338[i][j] : 90621E06 +index = [8][2] +...checksum after hashing g_338[i][j] : DEFF3BE +index = [8][3] +...checksum after hashing g_338[i][j] : 66357029 +index = [8][4] +...checksum after hashing g_338[i][j] : AE6F5123 +index = [8][5] +...checksum after hashing g_338[i][j] : 3E7D0B1B +index = [8][6] +...checksum after hashing g_338[i][j] : 2FFCFC82 +index = [8][7] +...checksum after hashing g_406 : 5206E0CD +...checksum after hashing g_407 : 881A5F1B +...checksum after hashing g_449 : B070DBD5 +...checksum after hashing g_514 : 5916F57A +...checksum after hashing g_515 : B2F4EAE2 +...checksum after hashing g_516[i][j] : C5554CB7 +index = [0][0] +...checksum after hashing g_516[i][j] : 31176A5A +index = [0][1] +...checksum after hashing g_516[i][j] : FD4443F7 +index = [0][2] +...checksum after hashing g_516[i][j] : 769D7F4C +index = [1][0] +...checksum after hashing g_516[i][j] : 17161F45 +index = [1][1] +...checksum after hashing g_516[i][j] : 6C121A39 +index = [1][2] +...checksum after hashing g_516[i][j] : E88BAA46 +index = [2][0] +...checksum after hashing g_516[i][j] : F8C6036E +index = [2][1] +...checksum after hashing g_516[i][j] : BF9052E4 +index = [2][2] +...checksum after hashing g_516[i][j] : 54536EDD +index = [3][0] +...checksum after hashing g_516[i][j] : 8F17EBE7 +index = [3][1] +...checksum after hashing g_516[i][j] : DE723A8C +index = [3][2] +...checksum after hashing g_549[i] : DEE729D +index = [0] +...checksum after hashing g_549[i] : 59ECD867 +index = [1] +...checksum after hashing g_549[i] : 3AE8017D +index = [2] +...checksum after hashing g_633[i][j] : E9786D3C +index = [0][0] +...checksum after hashing g_633[i][j] : 2C07F91E +index = [0][1] +...checksum after hashing g_633[i][j] : DC98A53 +index = [0][2] +...checksum after hashing g_633[i][j] : B95661F6 +index = [0][3] +...checksum after hashing g_633[i][j] : 9500C68A +index = [0][4] +...checksum after hashing g_633[i][j] : E2E77133 +index = [0][5] +...checksum after hashing g_633[i][j] : C9D26C4B +index = [0][6] +...checksum after hashing g_633[i][j] : B4AB7FA7 +index = [0][7] +...checksum after hashing g_633[i][j] : 2FAAC37A +index = [1][0] +...checksum after hashing g_633[i][j] : 80974E8D +index = [1][1] +...checksum after hashing g_633[i][j] : CC0C4955 +index = [1][2] +...checksum after hashing g_633[i][j] : 553AC71E +index = [1][3] +...checksum after hashing g_633[i][j] : 3BCA0477 +index = [1][4] +...checksum after hashing g_633[i][j] : 4BB4C4C +index = [1][5] +...checksum after hashing g_633[i][j] : 895AFF57 +index = [1][6] +...checksum after hashing g_633[i][j] : D4B7C2FA +index = [1][7] +...checksum after hashing g_633[i][j] : 708E4543 +index = [2][0] +...checksum after hashing g_633[i][j] : E2303357 +index = [2][1] +...checksum after hashing g_633[i][j] : 9B36C1F1 +index = [2][2] +...checksum after hashing g_633[i][j] : A8B3195A +index = [2][3] +...checksum after hashing g_633[i][j] : 81E67E84 +index = [2][4] +...checksum after hashing g_633[i][j] : DB8B29BF +index = [2][5] +...checksum after hashing g_633[i][j] : 9ABFB663 +index = [2][6] +...checksum after hashing g_633[i][j] : 73025D34 +index = [2][7] +...checksum after hashing g_633[i][j] : C1534F0D +index = [3][0] +...checksum after hashing g_633[i][j] : 1C9CA1C7 +index = [3][1] +...checksum after hashing g_633[i][j] : 80566035 +index = [3][2] +...checksum after hashing g_633[i][j] : 66BEF517 +index = [3][3] +...checksum after hashing g_633[i][j] : 8112465A +index = [3][4] +...checksum after hashing g_633[i][j] : 47A87784 +index = [3][5] +...checksum after hashing g_633[i][j] : 9CA76277 +index = [3][6] +...checksum after hashing g_633[i][j] : 4D813D7C +index = [3][7] +...checksum after hashing g_633[i][j] : 6EB22DC +index = [4][0] +...checksum after hashing g_633[i][j] : EB6754EB +index = [4][1] +...checksum after hashing g_633[i][j] : D2C9E41 +index = [4][2] +...checksum after hashing g_633[i][j] : 7B60F2E7 +index = [4][3] +...checksum after hashing g_633[i][j] : 7E86C230 +index = [4][4] +...checksum after hashing g_633[i][j] : CD20732C +index = [4][5] +...checksum after hashing g_633[i][j] : ED46833C +index = [4][6] +...checksum after hashing g_633[i][j] : C9D3DBD0 +index = [4][7] +...checksum after hashing g_633[i][j] : CE61509C +index = [5][0] +...checksum after hashing g_633[i][j] : 73D58AAB +index = [5][1] +...checksum after hashing g_633[i][j] : 3908090A +index = [5][2] +...checksum after hashing g_633[i][j] : 1F7596BD +index = [5][3] +...checksum after hashing g_633[i][j] : E8820D5F +index = [5][4] +...checksum after hashing g_633[i][j] : 4996B671 +index = [5][5] +...checksum after hashing g_633[i][j] : 1B0F4EEF +index = [5][6] +...checksum after hashing g_633[i][j] : 11206BD1 +index = [5][7] +...checksum after hashing g_633[i][j] : 41A2171 +index = [6][0] +...checksum after hashing g_633[i][j] : B5899ABA +index = [6][1] +...checksum after hashing g_633[i][j] : A982EF5D +index = [6][2] +...checksum after hashing g_633[i][j] : D5A3EE31 +index = [6][3] +...checksum after hashing g_633[i][j] : B93C7403 +index = [6][4] +...checksum after hashing g_633[i][j] : F547B7E0 +index = [6][5] +...checksum after hashing g_633[i][j] : 45C5A9E0 +index = [6][6] +...checksum after hashing g_633[i][j] : 5828FE95 +index = [6][7] +...checksum after hashing g_633[i][j] : 2C6DE73C +index = [7][0] +...checksum after hashing g_633[i][j] : 1C1EB763 +index = [7][1] +...checksum after hashing g_633[i][j] : 5341CB6C +index = [7][2] +...checksum after hashing g_633[i][j] : 1FCF0046 +index = [7][3] +...checksum after hashing g_633[i][j] : 5E511E89 +index = [7][4] +...checksum after hashing g_633[i][j] : DCDECD78 +index = [7][5] +...checksum after hashing g_633[i][j] : 86662412 +index = [7][6] +...checksum after hashing g_633[i][j] : 1AEDD44A +index = [7][7] +...checksum after hashing g_706[i] : B7D9FB14 +index = [0] +...checksum after hashing g_706[i] : BC57AEFA +index = [1] +...checksum after hashing g_706[i] : E9E0456E +index = [2] +...checksum after hashing g_706[i] : F542CC51 +index = [3] +...checksum after hashing g_706[i] : 3BDE868D +index = [4] +...checksum after hashing g_706[i] : B0CBFF92 +index = [5] +...checksum after hashing g_706[i] : 95FC0AB1 +index = [6] +...checksum after hashing g_903 : B171BA4F +...checksum after hashing g_904 : F5F6814 +before stmt(606): checksum = F5F6814 +...checksum after hashing g_16 : E4F0F7F3 +...checksum after hashing g_31 : 811934EE +...checksum after hashing g_33 : 2E74EC7 +...checksum after hashing g_75 : F757CA0B +...checksum after hashing g_76 : 4E280C2 +...checksum after hashing g_77 : 26C900D2 +...checksum after hashing g_94 : 79F90C0E +...checksum after hashing g_95[i] : 50942A4F +index = [0] +...checksum after hashing g_95[i] : 11132DCE +index = [1] +...checksum after hashing g_95[i] : F8AE1A92 +index = [2] +...checksum after hashing g_95[i] : 1CE25CB9 +index = [3] +...checksum after hashing g_95[i] : 28632C91 +index = [4] +...checksum after hashing g_95[i] : D63611A2 +index = [5] +...checksum after hashing g_95[i] : 49DCC929 +index = [6] +...checksum after hashing g_95[i] : F8318625 +index = [7] +...checksum after hashing g_182[i] : 9E97FDDB +index = [0] +...checksum after hashing g_182[i] : FC06C4FC +index = [1] +...checksum after hashing g_182[i] : 21BF364B +index = [2] +...checksum after hashing g_182[i] : DA3F5C4E +index = [3] +...checksum after hashing g_182[i] : B94D5155 +index = [4] +...checksum after hashing g_188 : 8B8DD166 +...checksum after hashing g_189 : 16DC23DE +...checksum after hashing g_190 : 49DD64D +...checksum after hashing g_191 : A10F4959 +...checksum after hashing g_232 : F429F241 +...checksum after hashing g_233 : 588F41FA +...checksum after hashing g_283[i] : 7001A76F +index = [0] +...checksum after hashing g_283[i] : 6B283CDD +index = [1] +...checksum after hashing g_283[i] : 4F5B80D3 +index = [2] +...checksum after hashing g_283[i] : F7BC0579 +index = [3] +...checksum after hashing g_283[i] : 4A7C40EF +index = [4] +...checksum after hashing g_283[i] : 764192CA +index = [5] +...checksum after hashing g_283[i] : 864A23A8 +index = [6] +...checksum after hashing g_284[i][j] : 2561F0B0 +index = [0][0] +...checksum after hashing g_284[i][j] : 6AC0B92 +index = [0][1] +...checksum after hashing g_284[i][j] : 69352867 +index = [0][2] +...checksum after hashing g_284[i][j] : 9F087BD1 +index = [1][0] +...checksum after hashing g_284[i][j] : F7DDE5E9 +index = [1][1] +...checksum after hashing g_284[i][j] : 8AE9786D +index = [1][2] +...checksum after hashing g_284[i][j] : 88878CD4 +index = [2][0] +...checksum after hashing g_284[i][j] : 4F4071CD +index = [2][1] +...checksum after hashing g_284[i][j] : 5EF69FC1 +index = [2][2] +...checksum after hashing g_284[i][j] : 6F73F41F +index = [3][0] +...checksum after hashing g_284[i][j] : FA507240 +index = [3][1] +...checksum after hashing g_284[i][j] : B24A1A2C +index = [3][2] +...checksum after hashing g_284[i][j] : 4D54FB76 +index = [4][0] +...checksum after hashing g_284[i][j] : B8877E75 +index = [4][1] +...checksum after hashing g_284[i][j] : 2A0E98BF +index = [4][2] +...checksum after hashing g_284[i][j] : 6AD1EBA5 +index = [5][0] +...checksum after hashing g_284[i][j] : 73BE1217 +index = [5][1] +...checksum after hashing g_284[i][j] : F8DE03F1 +index = [5][2] +...checksum after hashing g_284[i][j] : 9B9E55D +index = [6][0] +...checksum after hashing g_284[i][j] : 436DD018 +index = [6][1] +...checksum after hashing g_284[i][j] : BE5AF7F9 +index = [6][2] +...checksum after hashing g_284[i][j] : BE90AF54 +index = [7][0] +...checksum after hashing g_284[i][j] : 522B2E40 +index = [7][1] +...checksum after hashing g_284[i][j] : C32A461F +index = [7][2] +...checksum after hashing g_285 : 56287103 +...checksum after hashing g_286 : 1526CB10 +...checksum after hashing g_307 : 308C0B1F +...checksum after hashing g_312 : 1963C270 +...checksum after hashing g_313 : 83076BAF +...checksum after hashing g_336 : EC0F9942 +...checksum after hashing g_337 : 969D4E63 +...checksum after hashing g_338[i][j] : D6DAEA6F +index = [0][0] +...checksum after hashing g_338[i][j] : 2E5711C6 +index = [0][1] +...checksum after hashing g_338[i][j] : 98AF672C +index = [0][2] +...checksum after hashing g_338[i][j] : E9CFCE0A +index = [0][3] +...checksum after hashing g_338[i][j] : EA75DDE4 +index = [0][4] +...checksum after hashing g_338[i][j] : EF9F29C5 +index = [0][5] +...checksum after hashing g_338[i][j] : 82ECBCAC +index = [0][6] +...checksum after hashing g_338[i][j] : C5C526C8 +index = [0][7] +...checksum after hashing g_338[i][j] : 8A7439E1 +index = [1][0] +...checksum after hashing g_338[i][j] : FE47D71F +index = [1][1] +...checksum after hashing g_338[i][j] : 9AC0BB48 +index = [1][2] +...checksum after hashing g_338[i][j] : D573744E +index = [1][3] +...checksum after hashing g_338[i][j] : 51D5F47B +index = [1][4] +...checksum after hashing g_338[i][j] : CF9473B5 +index = [1][5] +...checksum after hashing g_338[i][j] : 50624E55 +index = [1][6] +...checksum after hashing g_338[i][j] : 4536DE66 +index = [1][7] +...checksum after hashing g_338[i][j] : 4E3E44E1 +index = [2][0] +...checksum after hashing g_338[i][j] : 34F18D3A +index = [2][1] +...checksum after hashing g_338[i][j] : A5296DB2 +index = [2][2] +...checksum after hashing g_338[i][j] : 8C76AE97 +index = [2][3] +...checksum after hashing g_338[i][j] : E557AF9B +index = [2][4] +...checksum after hashing g_338[i][j] : BCBB7E80 +index = [2][5] +...checksum after hashing g_338[i][j] : 445FCD7E +index = [2][6] +...checksum after hashing g_338[i][j] : A144CF43 +index = [2][7] +...checksum after hashing g_338[i][j] : 7E58EFBF +index = [3][0] +...checksum after hashing g_338[i][j] : DF70BBA7 +index = [3][1] +...checksum after hashing g_338[i][j] : DFA55F13 +index = [3][2] +...checksum after hashing g_338[i][j] : 79A8AE6C +index = [3][3] +...checksum after hashing g_338[i][j] : 665CD03F +index = [3][4] +...checksum after hashing g_338[i][j] : B65AD4EE +index = [3][5] +...checksum after hashing g_338[i][j] : ECF9BE4B +index = [3][6] +...checksum after hashing g_338[i][j] : 1056216C +index = [3][7] +...checksum after hashing g_338[i][j] : E1E75EB4 +index = [4][0] +...checksum after hashing g_338[i][j] : CF009423 +index = [4][1] +...checksum after hashing g_338[i][j] : BC071630 +index = [4][2] +...checksum after hashing g_338[i][j] : FCEEF67A +index = [4][3] +...checksum after hashing g_338[i][j] : 4A703858 +index = [4][4] +...checksum after hashing g_338[i][j] : BCB39D01 +index = [4][5] +...checksum after hashing g_338[i][j] : 72C7F8D1 +index = [4][6] +...checksum after hashing g_338[i][j] : E0CE74E0 +index = [4][7] +...checksum after hashing g_338[i][j] : 283A4962 +index = [5][0] +...checksum after hashing g_338[i][j] : 37806D5 +index = [5][1] +...checksum after hashing g_338[i][j] : 94A94EB0 +index = [5][2] +...checksum after hashing g_338[i][j] : 762906D4 +index = [5][3] +...checksum after hashing g_338[i][j] : DBD60E09 +index = [5][4] +...checksum after hashing g_338[i][j] : 90B1D459 +index = [5][5] +...checksum after hashing g_338[i][j] : 3DB67B2 +index = [5][6] +...checksum after hashing g_338[i][j] : FE67CF37 +index = [5][7] +...checksum after hashing g_338[i][j] : DF78E370 +index = [6][0] +...checksum after hashing g_338[i][j] : CC110B4F +index = [6][1] +...checksum after hashing g_338[i][j] : F168D3EC +index = [6][2] +...checksum after hashing g_338[i][j] : ED00EEB5 +index = [6][3] +...checksum after hashing g_338[i][j] : DC26CA50 +index = [6][4] +...checksum after hashing g_338[i][j] : 3ACADEF3 +index = [6][5] +...checksum after hashing g_338[i][j] : D652F1CE +index = [6][6] +...checksum after hashing g_338[i][j] : 3AE81108 +index = [6][7] +...checksum after hashing g_338[i][j] : D0359190 +index = [7][0] +...checksum after hashing g_338[i][j] : 9873DA90 +index = [7][1] +...checksum after hashing g_338[i][j] : 38D9B9EC +index = [7][2] +...checksum after hashing g_338[i][j] : B72645AE +index = [7][3] +...checksum after hashing g_338[i][j] : C6739381 +index = [7][4] +...checksum after hashing g_338[i][j] : FDE1455B +index = [7][5] +...checksum after hashing g_338[i][j] : DCBB3D4F +index = [7][6] +...checksum after hashing g_338[i][j] : 98D10EC9 +index = [7][7] +...checksum after hashing g_338[i][j] : 3FE2B3C0 +index = [8][0] +...checksum after hashing g_338[i][j] : 967BEB8D +index = [8][1] +...checksum after hashing g_338[i][j] : 90621E06 +index = [8][2] +...checksum after hashing g_338[i][j] : DEFF3BE +index = [8][3] +...checksum after hashing g_338[i][j] : 66357029 +index = [8][4] +...checksum after hashing g_338[i][j] : AE6F5123 +index = [8][5] +...checksum after hashing g_338[i][j] : 3E7D0B1B +index = [8][6] +...checksum after hashing g_338[i][j] : 2FFCFC82 +index = [8][7] +...checksum after hashing g_406 : 5206E0CD +...checksum after hashing g_407 : 881A5F1B +...checksum after hashing g_449 : B070DBD5 +...checksum after hashing g_514 : 5916F57A +...checksum after hashing g_515 : B2F4EAE2 +...checksum after hashing g_516[i][j] : C5554CB7 +index = [0][0] +...checksum after hashing g_516[i][j] : 31176A5A +index = [0][1] +...checksum after hashing g_516[i][j] : FD4443F7 +index = [0][2] +...checksum after hashing g_516[i][j] : 769D7F4C +index = [1][0] +...checksum after hashing g_516[i][j] : 17161F45 +index = [1][1] +...checksum after hashing g_516[i][j] : 6C121A39 +index = [1][2] +...checksum after hashing g_516[i][j] : E88BAA46 +index = [2][0] +...checksum after hashing g_516[i][j] : F8C6036E +index = [2][1] +...checksum after hashing g_516[i][j] : BF9052E4 +index = [2][2] +...checksum after hashing g_516[i][j] : 54536EDD +index = [3][0] +...checksum after hashing g_516[i][j] : 8F17EBE7 +index = [3][1] +...checksum after hashing g_516[i][j] : DE723A8C +index = [3][2] +...checksum after hashing g_549[i] : DEE729D +index = [0] +...checksum after hashing g_549[i] : 59ECD867 +index = [1] +...checksum after hashing g_549[i] : 3AE8017D +index = [2] +...checksum after hashing g_633[i][j] : E9786D3C +index = [0][0] +...checksum after hashing g_633[i][j] : 2C07F91E +index = [0][1] +...checksum after hashing g_633[i][j] : DC98A53 +index = [0][2] +...checksum after hashing g_633[i][j] : B95661F6 +index = [0][3] +...checksum after hashing g_633[i][j] : 9500C68A +index = [0][4] +...checksum after hashing g_633[i][j] : E2E77133 +index = [0][5] +...checksum after hashing g_633[i][j] : C9D26C4B +index = [0][6] +...checksum after hashing g_633[i][j] : B4AB7FA7 +index = [0][7] +...checksum after hashing g_633[i][j] : 2FAAC37A +index = [1][0] +...checksum after hashing g_633[i][j] : 80974E8D +index = [1][1] +...checksum after hashing g_633[i][j] : CC0C4955 +index = [1][2] +...checksum after hashing g_633[i][j] : 553AC71E +index = [1][3] +...checksum after hashing g_633[i][j] : 3BCA0477 +index = [1][4] +...checksum after hashing g_633[i][j] : 4BB4C4C +index = [1][5] +...checksum after hashing g_633[i][j] : 895AFF57 +index = [1][6] +...checksum after hashing g_633[i][j] : D4B7C2FA +index = [1][7] +...checksum after hashing g_633[i][j] : 708E4543 +index = [2][0] +...checksum after hashing g_633[i][j] : E2303357 +index = [2][1] +...checksum after hashing g_633[i][j] : 9B36C1F1 +index = [2][2] +...checksum after hashing g_633[i][j] : A8B3195A +index = [2][3] +...checksum after hashing g_633[i][j] : 81E67E84 +index = [2][4] +...checksum after hashing g_633[i][j] : DB8B29BF +index = [2][5] +...checksum after hashing g_633[i][j] : 9ABFB663 +index = [2][6] +...checksum after hashing g_633[i][j] : 73025D34 +index = [2][7] +...checksum after hashing g_633[i][j] : C1534F0D +index = [3][0] +...checksum after hashing g_633[i][j] : 1C9CA1C7 +index = [3][1] +...checksum after hashing g_633[i][j] : 80566035 +index = [3][2] +...checksum after hashing g_633[i][j] : 66BEF517 +index = [3][3] +...checksum after hashing g_633[i][j] : 8112465A +index = [3][4] +...checksum after hashing g_633[i][j] : 47A87784 +index = [3][5] +...checksum after hashing g_633[i][j] : 9CA76277 +index = [3][6] +...checksum after hashing g_633[i][j] : 4D813D7C +index = [3][7] +...checksum after hashing g_633[i][j] : 6EB22DC +index = [4][0] +...checksum after hashing g_633[i][j] : EB6754EB +index = [4][1] +...checksum after hashing g_633[i][j] : D2C9E41 +index = [4][2] +...checksum after hashing g_633[i][j] : 7B60F2E7 +index = [4][3] +...checksum after hashing g_633[i][j] : 7E86C230 +index = [4][4] +...checksum after hashing g_633[i][j] : CD20732C +index = [4][5] +...checksum after hashing g_633[i][j] : ED46833C +index = [4][6] +...checksum after hashing g_633[i][j] : C9D3DBD0 +index = [4][7] +...checksum after hashing g_633[i][j] : CE61509C +index = [5][0] +...checksum after hashing g_633[i][j] : 73D58AAB +index = [5][1] +...checksum after hashing g_633[i][j] : 3908090A +index = [5][2] +...checksum after hashing g_633[i][j] : 1F7596BD +index = [5][3] +...checksum after hashing g_633[i][j] : E8820D5F +index = [5][4] +...checksum after hashing g_633[i][j] : 4996B671 +index = [5][5] +...checksum after hashing g_633[i][j] : 1B0F4EEF +index = [5][6] +...checksum after hashing g_633[i][j] : 11206BD1 +index = [5][7] +...checksum after hashing g_633[i][j] : 41A2171 +index = [6][0] +...checksum after hashing g_633[i][j] : B5899ABA +index = [6][1] +...checksum after hashing g_633[i][j] : A982EF5D +index = [6][2] +...checksum after hashing g_633[i][j] : D5A3EE31 +index = [6][3] +...checksum after hashing g_633[i][j] : B93C7403 +index = [6][4] +...checksum after hashing g_633[i][j] : F547B7E0 +index = [6][5] +...checksum after hashing g_633[i][j] : 45C5A9E0 +index = [6][6] +...checksum after hashing g_633[i][j] : 5828FE95 +index = [6][7] +...checksum after hashing g_633[i][j] : 2C6DE73C +index = [7][0] +...checksum after hashing g_633[i][j] : 1C1EB763 +index = [7][1] +...checksum after hashing g_633[i][j] : 5341CB6C +index = [7][2] +...checksum after hashing g_633[i][j] : 1FCF0046 +index = [7][3] +...checksum after hashing g_633[i][j] : 5E511E89 +index = [7][4] +...checksum after hashing g_633[i][j] : DCDECD78 +index = [7][5] +...checksum after hashing g_633[i][j] : 86662412 +index = [7][6] +...checksum after hashing g_633[i][j] : 1AEDD44A +index = [7][7] +...checksum after hashing g_706[i] : B7D9FB14 +index = [0] +...checksum after hashing g_706[i] : BC57AEFA +index = [1] +...checksum after hashing g_706[i] : E9E0456E +index = [2] +...checksum after hashing g_706[i] : F542CC51 +index = [3] +...checksum after hashing g_706[i] : 3BDE868D +index = [4] +...checksum after hashing g_706[i] : B0CBFF92 +index = [5] +...checksum after hashing g_706[i] : 95FC0AB1 +index = [6] +...checksum after hashing g_903 : B171BA4F +...checksum after hashing g_904 : B7E30F71 +before stmt(607): checksum = B7E30F71 +...checksum after hashing g_16 : E4F0F7F3 +...checksum after hashing g_31 : 811934EE +...checksum after hashing g_33 : 2E74EC7 +...checksum after hashing g_75 : F757CA0B +...checksum after hashing g_76 : 4E280C2 +...checksum after hashing g_77 : 26C900D2 +...checksum after hashing g_94 : 79F90C0E +...checksum after hashing g_95[i] : 50942A4F +index = [0] +...checksum after hashing g_95[i] : 11132DCE +index = [1] +...checksum after hashing g_95[i] : F8AE1A92 +index = [2] +...checksum after hashing g_95[i] : 1CE25CB9 +index = [3] +...checksum after hashing g_95[i] : 28632C91 +index = [4] +...checksum after hashing g_95[i] : D63611A2 +index = [5] +...checksum after hashing g_95[i] : 49DCC929 +index = [6] +...checksum after hashing g_95[i] : F8318625 +index = [7] +...checksum after hashing g_182[i] : 9E97FDDB +index = [0] +...checksum after hashing g_182[i] : FC06C4FC +index = [1] +...checksum after hashing g_182[i] : 21BF364B +index = [2] +...checksum after hashing g_182[i] : DA3F5C4E +index = [3] +...checksum after hashing g_182[i] : B94D5155 +index = [4] +...checksum after hashing g_188 : 8B8DD166 +...checksum after hashing g_189 : 16DC23DE +...checksum after hashing g_190 : 49DD64D +...checksum after hashing g_191 : A10F4959 +...checksum after hashing g_232 : F429F241 +...checksum after hashing g_233 : 588F41FA +...checksum after hashing g_283[i] : 7001A76F +index = [0] +...checksum after hashing g_283[i] : 6B283CDD +index = [1] +...checksum after hashing g_283[i] : 4F5B80D3 +index = [2] +...checksum after hashing g_283[i] : F7BC0579 +index = [3] +...checksum after hashing g_283[i] : 4A7C40EF +index = [4] +...checksum after hashing g_283[i] : 764192CA +index = [5] +...checksum after hashing g_283[i] : 864A23A8 +index = [6] +...checksum after hashing g_284[i][j] : 2561F0B0 +index = [0][0] +...checksum after hashing g_284[i][j] : 6AC0B92 +index = [0][1] +...checksum after hashing g_284[i][j] : 69352867 +index = [0][2] +...checksum after hashing g_284[i][j] : 9F087BD1 +index = [1][0] +...checksum after hashing g_284[i][j] : F7DDE5E9 +index = [1][1] +...checksum after hashing g_284[i][j] : 8AE9786D +index = [1][2] +...checksum after hashing g_284[i][j] : 88878CD4 +index = [2][0] +...checksum after hashing g_284[i][j] : 4F4071CD +index = [2][1] +...checksum after hashing g_284[i][j] : 5EF69FC1 +index = [2][2] +...checksum after hashing g_284[i][j] : 6F73F41F +index = [3][0] +...checksum after hashing g_284[i][j] : FA507240 +index = [3][1] +...checksum after hashing g_284[i][j] : B24A1A2C +index = [3][2] +...checksum after hashing g_284[i][j] : 4D54FB76 +index = [4][0] +...checksum after hashing g_284[i][j] : B8877E75 +index = [4][1] +...checksum after hashing g_284[i][j] : 2A0E98BF +index = [4][2] +...checksum after hashing g_284[i][j] : 6AD1EBA5 +index = [5][0] +...checksum after hashing g_284[i][j] : 73BE1217 +index = [5][1] +...checksum after hashing g_284[i][j] : F8DE03F1 +index = [5][2] +...checksum after hashing g_284[i][j] : 9B9E55D +index = [6][0] +...checksum after hashing g_284[i][j] : 436DD018 +index = [6][1] +...checksum after hashing g_284[i][j] : BE5AF7F9 +index = [6][2] +...checksum after hashing g_284[i][j] : BE90AF54 +index = [7][0] +...checksum after hashing g_284[i][j] : 522B2E40 +index = [7][1] +...checksum after hashing g_284[i][j] : C32A461F +index = [7][2] +...checksum after hashing g_285 : 56287103 +...checksum after hashing g_286 : 1526CB10 +...checksum after hashing g_307 : 308C0B1F +...checksum after hashing g_312 : 1963C270 +...checksum after hashing g_313 : 83076BAF +...checksum after hashing g_336 : EC0F9942 +...checksum after hashing g_337 : 969D4E63 +...checksum after hashing g_338[i][j] : D6DAEA6F +index = [0][0] +...checksum after hashing g_338[i][j] : 2E5711C6 +index = [0][1] +...checksum after hashing g_338[i][j] : 98AF672C +index = [0][2] +...checksum after hashing g_338[i][j] : E9CFCE0A +index = [0][3] +...checksum after hashing g_338[i][j] : EA75DDE4 +index = [0][4] +...checksum after hashing g_338[i][j] : EF9F29C5 +index = [0][5] +...checksum after hashing g_338[i][j] : 82ECBCAC +index = [0][6] +...checksum after hashing g_338[i][j] : C5C526C8 +index = [0][7] +...checksum after hashing g_338[i][j] : 8A7439E1 +index = [1][0] +...checksum after hashing g_338[i][j] : FE47D71F +index = [1][1] +...checksum after hashing g_338[i][j] : 9AC0BB48 +index = [1][2] +...checksum after hashing g_338[i][j] : D573744E +index = [1][3] +...checksum after hashing g_338[i][j] : 51D5F47B +index = [1][4] +...checksum after hashing g_338[i][j] : CF9473B5 +index = [1][5] +...checksum after hashing g_338[i][j] : 50624E55 +index = [1][6] +...checksum after hashing g_338[i][j] : 4536DE66 +index = [1][7] +...checksum after hashing g_338[i][j] : 4E3E44E1 +index = [2][0] +...checksum after hashing g_338[i][j] : 34F18D3A +index = [2][1] +...checksum after hashing g_338[i][j] : A5296DB2 +index = [2][2] +...checksum after hashing g_338[i][j] : 8C76AE97 +index = [2][3] +...checksum after hashing g_338[i][j] : E557AF9B +index = [2][4] +...checksum after hashing g_338[i][j] : BCBB7E80 +index = [2][5] +...checksum after hashing g_338[i][j] : 445FCD7E +index = [2][6] +...checksum after hashing g_338[i][j] : A144CF43 +index = [2][7] +...checksum after hashing g_338[i][j] : 7E58EFBF +index = [3][0] +...checksum after hashing g_338[i][j] : DF70BBA7 +index = [3][1] +...checksum after hashing g_338[i][j] : DFA55F13 +index = [3][2] +...checksum after hashing g_338[i][j] : 79A8AE6C +index = [3][3] +...checksum after hashing g_338[i][j] : 665CD03F +index = [3][4] +...checksum after hashing g_338[i][j] : B65AD4EE +index = [3][5] +...checksum after hashing g_338[i][j] : ECF9BE4B +index = [3][6] +...checksum after hashing g_338[i][j] : 1056216C +index = [3][7] +...checksum after hashing g_338[i][j] : E1E75EB4 +index = [4][0] +...checksum after hashing g_338[i][j] : CF009423 +index = [4][1] +...checksum after hashing g_338[i][j] : BC071630 +index = [4][2] +...checksum after hashing g_338[i][j] : FCEEF67A +index = [4][3] +...checksum after hashing g_338[i][j] : 4A703858 +index = [4][4] +...checksum after hashing g_338[i][j] : BCB39D01 +index = [4][5] +...checksum after hashing g_338[i][j] : 72C7F8D1 +index = [4][6] +...checksum after hashing g_338[i][j] : E0CE74E0 +index = [4][7] +...checksum after hashing g_338[i][j] : 283A4962 +index = [5][0] +...checksum after hashing g_338[i][j] : 37806D5 +index = [5][1] +...checksum after hashing g_338[i][j] : 94A94EB0 +index = [5][2] +...checksum after hashing g_338[i][j] : 762906D4 +index = [5][3] +...checksum after hashing g_338[i][j] : DBD60E09 +index = [5][4] +...checksum after hashing g_338[i][j] : 90B1D459 +index = [5][5] +...checksum after hashing g_338[i][j] : 3DB67B2 +index = [5][6] +...checksum after hashing g_338[i][j] : FE67CF37 +index = [5][7] +...checksum after hashing g_338[i][j] : DF78E370 +index = [6][0] +...checksum after hashing g_338[i][j] : CC110B4F +index = [6][1] +...checksum after hashing g_338[i][j] : F168D3EC +index = [6][2] +...checksum after hashing g_338[i][j] : ED00EEB5 +index = [6][3] +...checksum after hashing g_338[i][j] : DC26CA50 +index = [6][4] +...checksum after hashing g_338[i][j] : 3ACADEF3 +index = [6][5] +...checksum after hashing g_338[i][j] : D652F1CE +index = [6][6] +...checksum after hashing g_338[i][j] : 3AE81108 +index = [6][7] +...checksum after hashing g_338[i][j] : D0359190 +index = [7][0] +...checksum after hashing g_338[i][j] : 9873DA90 +index = [7][1] +...checksum after hashing g_338[i][j] : 38D9B9EC +index = [7][2] +...checksum after hashing g_338[i][j] : B72645AE +index = [7][3] +...checksum after hashing g_338[i][j] : C6739381 +index = [7][4] +...checksum after hashing g_338[i][j] : FDE1455B +index = [7][5] +...checksum after hashing g_338[i][j] : DCBB3D4F +index = [7][6] +...checksum after hashing g_338[i][j] : 98D10EC9 +index = [7][7] +...checksum after hashing g_338[i][j] : 3FE2B3C0 +index = [8][0] +...checksum after hashing g_338[i][j] : 967BEB8D +index = [8][1] +...checksum after hashing g_338[i][j] : 90621E06 +index = [8][2] +...checksum after hashing g_338[i][j] : DEFF3BE +index = [8][3] +...checksum after hashing g_338[i][j] : 66357029 +index = [8][4] +...checksum after hashing g_338[i][j] : AE6F5123 +index = [8][5] +...checksum after hashing g_338[i][j] : 3E7D0B1B +index = [8][6] +...checksum after hashing g_338[i][j] : 2FFCFC82 +index = [8][7] +...checksum after hashing g_406 : 5206E0CD +...checksum after hashing g_407 : 881A5F1B +...checksum after hashing g_449 : B070DBD5 +...checksum after hashing g_514 : 5916F57A +...checksum after hashing g_515 : B2F4EAE2 +...checksum after hashing g_516[i][j] : C5554CB7 +index = [0][0] +...checksum after hashing g_516[i][j] : 31176A5A +index = [0][1] +...checksum after hashing g_516[i][j] : FD4443F7 +index = [0][2] +...checksum after hashing g_516[i][j] : 769D7F4C +index = [1][0] +...checksum after hashing g_516[i][j] : 17161F45 +index = [1][1] +...checksum after hashing g_516[i][j] : 6C121A39 +index = [1][2] +...checksum after hashing g_516[i][j] : E88BAA46 +index = [2][0] +...checksum after hashing g_516[i][j] : F8C6036E +index = [2][1] +...checksum after hashing g_516[i][j] : BF9052E4 +index = [2][2] +...checksum after hashing g_516[i][j] : 54536EDD +index = [3][0] +...checksum after hashing g_516[i][j] : 8F17EBE7 +index = [3][1] +...checksum after hashing g_516[i][j] : DE723A8C +index = [3][2] +...checksum after hashing g_549[i] : DEE729D +index = [0] +...checksum after hashing g_549[i] : 59ECD867 +index = [1] +...checksum after hashing g_549[i] : 3AE8017D +index = [2] +...checksum after hashing g_633[i][j] : E9786D3C +index = [0][0] +...checksum after hashing g_633[i][j] : 2C07F91E +index = [0][1] +...checksum after hashing g_633[i][j] : DC98A53 +index = [0][2] +...checksum after hashing g_633[i][j] : B95661F6 +index = [0][3] +...checksum after hashing g_633[i][j] : 9500C68A +index = [0][4] +...checksum after hashing g_633[i][j] : E2E77133 +index = [0][5] +...checksum after hashing g_633[i][j] : C9D26C4B +index = [0][6] +...checksum after hashing g_633[i][j] : B4AB7FA7 +index = [0][7] +...checksum after hashing g_633[i][j] : 2FAAC37A +index = [1][0] +...checksum after hashing g_633[i][j] : 80974E8D +index = [1][1] +...checksum after hashing g_633[i][j] : CC0C4955 +index = [1][2] +...checksum after hashing g_633[i][j] : 553AC71E +index = [1][3] +...checksum after hashing g_633[i][j] : 3BCA0477 +index = [1][4] +...checksum after hashing g_633[i][j] : 4BB4C4C +index = [1][5] +...checksum after hashing g_633[i][j] : 895AFF57 +index = [1][6] +...checksum after hashing g_633[i][j] : D4B7C2FA +index = [1][7] +...checksum after hashing g_633[i][j] : 708E4543 +index = [2][0] +...checksum after hashing g_633[i][j] : E2303357 +index = [2][1] +...checksum after hashing g_633[i][j] : 9B36C1F1 +index = [2][2] +...checksum after hashing g_633[i][j] : A8B3195A +index = [2][3] +...checksum after hashing g_633[i][j] : 81E67E84 +index = [2][4] +...checksum after hashing g_633[i][j] : DB8B29BF +index = [2][5] +...checksum after hashing g_633[i][j] : 9ABFB663 +index = [2][6] +...checksum after hashing g_633[i][j] : 73025D34 +index = [2][7] +...checksum after hashing g_633[i][j] : C1534F0D +index = [3][0] +...checksum after hashing g_633[i][j] : 1C9CA1C7 +index = [3][1] +...checksum after hashing g_633[i][j] : 80566035 +index = [3][2] +...checksum after hashing g_633[i][j] : 66BEF517 +index = [3][3] +...checksum after hashing g_633[i][j] : 8112465A +index = [3][4] +...checksum after hashing g_633[i][j] : 47A87784 +index = [3][5] +...checksum after hashing g_633[i][j] : 9CA76277 +index = [3][6] +...checksum after hashing g_633[i][j] : 4D813D7C +index = [3][7] +...checksum after hashing g_633[i][j] : 6EB22DC +index = [4][0] +...checksum after hashing g_633[i][j] : EB6754EB +index = [4][1] +...checksum after hashing g_633[i][j] : D2C9E41 +index = [4][2] +...checksum after hashing g_633[i][j] : 7B60F2E7 +index = [4][3] +...checksum after hashing g_633[i][j] : 7E86C230 +index = [4][4] +...checksum after hashing g_633[i][j] : CD20732C +index = [4][5] +...checksum after hashing g_633[i][j] : ED46833C +index = [4][6] +...checksum after hashing g_633[i][j] : C9D3DBD0 +index = [4][7] +...checksum after hashing g_633[i][j] : CE61509C +index = [5][0] +...checksum after hashing g_633[i][j] : 73D58AAB +index = [5][1] +...checksum after hashing g_633[i][j] : 3908090A +index = [5][2] +...checksum after hashing g_633[i][j] : 1F7596BD +index = [5][3] +...checksum after hashing g_633[i][j] : E8820D5F +index = [5][4] +...checksum after hashing g_633[i][j] : 4996B671 +index = [5][5] +...checksum after hashing g_633[i][j] : 1B0F4EEF +index = [5][6] +...checksum after hashing g_633[i][j] : 11206BD1 +index = [5][7] +...checksum after hashing g_633[i][j] : 41A2171 +index = [6][0] +...checksum after hashing g_633[i][j] : B5899ABA +index = [6][1] +...checksum after hashing g_633[i][j] : A982EF5D +index = [6][2] +...checksum after hashing g_633[i][j] : D5A3EE31 +index = [6][3] +...checksum after hashing g_633[i][j] : B93C7403 +index = [6][4] +...checksum after hashing g_633[i][j] : F547B7E0 +index = [6][5] +...checksum after hashing g_633[i][j] : 45C5A9E0 +index = [6][6] +...checksum after hashing g_633[i][j] : 5828FE95 +index = [6][7] +...checksum after hashing g_633[i][j] : 2C6DE73C +index = [7][0] +...checksum after hashing g_633[i][j] : 1C1EB763 +index = [7][1] +...checksum after hashing g_633[i][j] : 5341CB6C +index = [7][2] +...checksum after hashing g_633[i][j] : 1FCF0046 +index = [7][3] +...checksum after hashing g_633[i][j] : 5E511E89 +index = [7][4] +...checksum after hashing g_633[i][j] : DCDECD78 +index = [7][5] +...checksum after hashing g_633[i][j] : 86662412 +index = [7][6] +...checksum after hashing g_633[i][j] : 1AEDD44A +index = [7][7] +...checksum after hashing g_706[i] : B7D9FB14 +index = [0] +...checksum after hashing g_706[i] : BC57AEFA +index = [1] +...checksum after hashing g_706[i] : E9E0456E +index = [2] +...checksum after hashing g_706[i] : F542CC51 +index = [3] +...checksum after hashing g_706[i] : 3BDE868D +index = [4] +...checksum after hashing g_706[i] : B0CBFF92 +index = [5] +...checksum after hashing g_706[i] : 95FC0AB1 +index = [6] +...checksum after hashing g_903 : B171BA4F +...checksum after hashing g_904 : B7E30F71 +before stmt(608): checksum = B7E30F71 +...checksum after hashing g_16 : E4F0F7F3 +...checksum after hashing g_31 : 811934EE +...checksum after hashing g_33 : 2E74EC7 +...checksum after hashing g_75 : F757CA0B +...checksum after hashing g_76 : 4E280C2 +...checksum after hashing g_77 : 26C900D2 +...checksum after hashing g_94 : 79F90C0E +...checksum after hashing g_95[i] : 50942A4F +index = [0] +...checksum after hashing g_95[i] : 11132DCE +index = [1] +...checksum after hashing g_95[i] : F8AE1A92 +index = [2] +...checksum after hashing g_95[i] : 1CE25CB9 +index = [3] +...checksum after hashing g_95[i] : 28632C91 +index = [4] +...checksum after hashing g_95[i] : D63611A2 +index = [5] +...checksum after hashing g_95[i] : 49DCC929 +index = [6] +...checksum after hashing g_95[i] : F8318625 +index = [7] +...checksum after hashing g_182[i] : 9E97FDDB +index = [0] +...checksum after hashing g_182[i] : FC06C4FC +index = [1] +...checksum after hashing g_182[i] : 21BF364B +index = [2] +...checksum after hashing g_182[i] : DA3F5C4E +index = [3] +...checksum after hashing g_182[i] : B94D5155 +index = [4] +...checksum after hashing g_188 : 8B8DD166 +...checksum after hashing g_189 : 16DC23DE +...checksum after hashing g_190 : 49DD64D +...checksum after hashing g_191 : A10F4959 +...checksum after hashing g_232 : F429F241 +...checksum after hashing g_233 : 588F41FA +...checksum after hashing g_283[i] : 7001A76F +index = [0] +...checksum after hashing g_283[i] : 6B283CDD +index = [1] +...checksum after hashing g_283[i] : 4F5B80D3 +index = [2] +...checksum after hashing g_283[i] : F7BC0579 +index = [3] +...checksum after hashing g_283[i] : 4A7C40EF +index = [4] +...checksum after hashing g_283[i] : 764192CA +index = [5] +...checksum after hashing g_283[i] : 864A23A8 +index = [6] +...checksum after hashing g_284[i][j] : 2561F0B0 +index = [0][0] +...checksum after hashing g_284[i][j] : 6AC0B92 +index = [0][1] +...checksum after hashing g_284[i][j] : 69352867 +index = [0][2] +...checksum after hashing g_284[i][j] : 9F087BD1 +index = [1][0] +...checksum after hashing g_284[i][j] : F7DDE5E9 +index = [1][1] +...checksum after hashing g_284[i][j] : 8AE9786D +index = [1][2] +...checksum after hashing g_284[i][j] : 88878CD4 +index = [2][0] +...checksum after hashing g_284[i][j] : 4F4071CD +index = [2][1] +...checksum after hashing g_284[i][j] : 5EF69FC1 +index = [2][2] +...checksum after hashing g_284[i][j] : 6F73F41F +index = [3][0] +...checksum after hashing g_284[i][j] : FA507240 +index = [3][1] +...checksum after hashing g_284[i][j] : B24A1A2C +index = [3][2] +...checksum after hashing g_284[i][j] : 4D54FB76 +index = [4][0] +...checksum after hashing g_284[i][j] : B8877E75 +index = [4][1] +...checksum after hashing g_284[i][j] : 2A0E98BF +index = [4][2] +...checksum after hashing g_284[i][j] : 6AD1EBA5 +index = [5][0] +...checksum after hashing g_284[i][j] : 73BE1217 +index = [5][1] +...checksum after hashing g_284[i][j] : F8DE03F1 +index = [5][2] +...checksum after hashing g_284[i][j] : 9B9E55D +index = [6][0] +...checksum after hashing g_284[i][j] : 436DD018 +index = [6][1] +...checksum after hashing g_284[i][j] : BE5AF7F9 +index = [6][2] +...checksum after hashing g_284[i][j] : BE90AF54 +index = [7][0] +...checksum after hashing g_284[i][j] : 522B2E40 +index = [7][1] +...checksum after hashing g_284[i][j] : C32A461F +index = [7][2] +...checksum after hashing g_285 : 56287103 +...checksum after hashing g_286 : 1526CB10 +...checksum after hashing g_307 : 308C0B1F +...checksum after hashing g_312 : 1963C270 +...checksum after hashing g_313 : 83076BAF +...checksum after hashing g_336 : EC0F9942 +...checksum after hashing g_337 : 969D4E63 +...checksum after hashing g_338[i][j] : D6DAEA6F +index = [0][0] +...checksum after hashing g_338[i][j] : 2E5711C6 +index = [0][1] +...checksum after hashing g_338[i][j] : 98AF672C +index = [0][2] +...checksum after hashing g_338[i][j] : E9CFCE0A +index = [0][3] +...checksum after hashing g_338[i][j] : EA75DDE4 +index = [0][4] +...checksum after hashing g_338[i][j] : EF9F29C5 +index = [0][5] +...checksum after hashing g_338[i][j] : 82ECBCAC +index = [0][6] +...checksum after hashing g_338[i][j] : C5C526C8 +index = [0][7] +...checksum after hashing g_338[i][j] : 8A7439E1 +index = [1][0] +...checksum after hashing g_338[i][j] : FE47D71F +index = [1][1] +...checksum after hashing g_338[i][j] : 9AC0BB48 +index = [1][2] +...checksum after hashing g_338[i][j] : D573744E +index = [1][3] +...checksum after hashing g_338[i][j] : 51D5F47B +index = [1][4] +...checksum after hashing g_338[i][j] : CF9473B5 +index = [1][5] +...checksum after hashing g_338[i][j] : 50624E55 +index = [1][6] +...checksum after hashing g_338[i][j] : 4536DE66 +index = [1][7] +...checksum after hashing g_338[i][j] : 4E3E44E1 +index = [2][0] +...checksum after hashing g_338[i][j] : 34F18D3A +index = [2][1] +...checksum after hashing g_338[i][j] : A5296DB2 +index = [2][2] +...checksum after hashing g_338[i][j] : 8C76AE97 +index = [2][3] +...checksum after hashing g_338[i][j] : E557AF9B +index = [2][4] +...checksum after hashing g_338[i][j] : BCBB7E80 +index = [2][5] +...checksum after hashing g_338[i][j] : 445FCD7E +index = [2][6] +...checksum after hashing g_338[i][j] : A144CF43 +index = [2][7] +...checksum after hashing g_338[i][j] : 7E58EFBF +index = [3][0] +...checksum after hashing g_338[i][j] : DF70BBA7 +index = [3][1] +...checksum after hashing g_338[i][j] : DFA55F13 +index = [3][2] +...checksum after hashing g_338[i][j] : 79A8AE6C +index = [3][3] +...checksum after hashing g_338[i][j] : 665CD03F +index = [3][4] +...checksum after hashing g_338[i][j] : B65AD4EE +index = [3][5] +...checksum after hashing g_338[i][j] : ECF9BE4B +index = [3][6] +...checksum after hashing g_338[i][j] : 1056216C +index = [3][7] +...checksum after hashing g_338[i][j] : E1E75EB4 +index = [4][0] +...checksum after hashing g_338[i][j] : CF009423 +index = [4][1] +...checksum after hashing g_338[i][j] : BC071630 +index = [4][2] +...checksum after hashing g_338[i][j] : FCEEF67A +index = [4][3] +...checksum after hashing g_338[i][j] : 4A703858 +index = [4][4] +...checksum after hashing g_338[i][j] : BCB39D01 +index = [4][5] +...checksum after hashing g_338[i][j] : 72C7F8D1 +index = [4][6] +...checksum after hashing g_338[i][j] : E0CE74E0 +index = [4][7] +...checksum after hashing g_338[i][j] : 283A4962 +index = [5][0] +...checksum after hashing g_338[i][j] : 37806D5 +index = [5][1] +...checksum after hashing g_338[i][j] : 94A94EB0 +index = [5][2] +...checksum after hashing g_338[i][j] : 762906D4 +index = [5][3] +...checksum after hashing g_338[i][j] : DBD60E09 +index = [5][4] +...checksum after hashing g_338[i][j] : 90B1D459 +index = [5][5] +...checksum after hashing g_338[i][j] : 3DB67B2 +index = [5][6] +...checksum after hashing g_338[i][j] : FE67CF37 +index = [5][7] +...checksum after hashing g_338[i][j] : DF78E370 +index = [6][0] +...checksum after hashing g_338[i][j] : CC110B4F +index = [6][1] +...checksum after hashing g_338[i][j] : F168D3EC +index = [6][2] +...checksum after hashing g_338[i][j] : ED00EEB5 +index = [6][3] +...checksum after hashing g_338[i][j] : DC26CA50 +index = [6][4] +...checksum after hashing g_338[i][j] : 3ACADEF3 +index = [6][5] +...checksum after hashing g_338[i][j] : D652F1CE +index = [6][6] +...checksum after hashing g_338[i][j] : 3AE81108 +index = [6][7] +...checksum after hashing g_338[i][j] : D0359190 +index = [7][0] +...checksum after hashing g_338[i][j] : 9873DA90 +index = [7][1] +...checksum after hashing g_338[i][j] : 38D9B9EC +index = [7][2] +...checksum after hashing g_338[i][j] : B72645AE +index = [7][3] +...checksum after hashing g_338[i][j] : C6739381 +index = [7][4] +...checksum after hashing g_338[i][j] : FDE1455B +index = [7][5] +...checksum after hashing g_338[i][j] : DCBB3D4F +index = [7][6] +...checksum after hashing g_338[i][j] : 98D10EC9 +index = [7][7] +...checksum after hashing g_338[i][j] : 3FE2B3C0 +index = [8][0] +...checksum after hashing g_338[i][j] : 967BEB8D +index = [8][1] +...checksum after hashing g_338[i][j] : 90621E06 +index = [8][2] +...checksum after hashing g_338[i][j] : DEFF3BE +index = [8][3] +...checksum after hashing g_338[i][j] : 66357029 +index = [8][4] +...checksum after hashing g_338[i][j] : AE6F5123 +index = [8][5] +...checksum after hashing g_338[i][j] : 3E7D0B1B +index = [8][6] +...checksum after hashing g_338[i][j] : 2FFCFC82 +index = [8][7] +...checksum after hashing g_406 : 5206E0CD +...checksum after hashing g_407 : 881A5F1B +...checksum after hashing g_449 : B070DBD5 +...checksum after hashing g_514 : 5916F57A +...checksum after hashing g_515 : B2F4EAE2 +...checksum after hashing g_516[i][j] : C5554CB7 +index = [0][0] +...checksum after hashing g_516[i][j] : 31176A5A +index = [0][1] +...checksum after hashing g_516[i][j] : FD4443F7 +index = [0][2] +...checksum after hashing g_516[i][j] : 769D7F4C +index = [1][0] +...checksum after hashing g_516[i][j] : 17161F45 +index = [1][1] +...checksum after hashing g_516[i][j] : 6C121A39 +index = [1][2] +...checksum after hashing g_516[i][j] : E88BAA46 +index = [2][0] +...checksum after hashing g_516[i][j] : F8C6036E +index = [2][1] +...checksum after hashing g_516[i][j] : BF9052E4 +index = [2][2] +...checksum after hashing g_516[i][j] : 54536EDD +index = [3][0] +...checksum after hashing g_516[i][j] : 8F17EBE7 +index = [3][1] +...checksum after hashing g_516[i][j] : DE723A8C +index = [3][2] +...checksum after hashing g_549[i] : DEE729D +index = [0] +...checksum after hashing g_549[i] : 59ECD867 +index = [1] +...checksum after hashing g_549[i] : 3AE8017D +index = [2] +...checksum after hashing g_633[i][j] : E9786D3C +index = [0][0] +...checksum after hashing g_633[i][j] : 2C07F91E +index = [0][1] +...checksum after hashing g_633[i][j] : DC98A53 +index = [0][2] +...checksum after hashing g_633[i][j] : B95661F6 +index = [0][3] +...checksum after hashing g_633[i][j] : 9500C68A +index = [0][4] +...checksum after hashing g_633[i][j] : E2E77133 +index = [0][5] +...checksum after hashing g_633[i][j] : C9D26C4B +index = [0][6] +...checksum after hashing g_633[i][j] : B4AB7FA7 +index = [0][7] +...checksum after hashing g_633[i][j] : 2FAAC37A +index = [1][0] +...checksum after hashing g_633[i][j] : 80974E8D +index = [1][1] +...checksum after hashing g_633[i][j] : CC0C4955 +index = [1][2] +...checksum after hashing g_633[i][j] : 553AC71E +index = [1][3] +...checksum after hashing g_633[i][j] : 3BCA0477 +index = [1][4] +...checksum after hashing g_633[i][j] : 4BB4C4C +index = [1][5] +...checksum after hashing g_633[i][j] : 895AFF57 +index = [1][6] +...checksum after hashing g_633[i][j] : D4B7C2FA +index = [1][7] +...checksum after hashing g_633[i][j] : 708E4543 +index = [2][0] +...checksum after hashing g_633[i][j] : E2303357 +index = [2][1] +...checksum after hashing g_633[i][j] : 9B36C1F1 +index = [2][2] +...checksum after hashing g_633[i][j] : A8B3195A +index = [2][3] +...checksum after hashing g_633[i][j] : 81E67E84 +index = [2][4] +...checksum after hashing g_633[i][j] : DB8B29BF +index = [2][5] +...checksum after hashing g_633[i][j] : 9ABFB663 +index = [2][6] +...checksum after hashing g_633[i][j] : 73025D34 +index = [2][7] +...checksum after hashing g_633[i][j] : C1534F0D +index = [3][0] +...checksum after hashing g_633[i][j] : 1C9CA1C7 +index = [3][1] +...checksum after hashing g_633[i][j] : 80566035 +index = [3][2] +...checksum after hashing g_633[i][j] : 66BEF517 +index = [3][3] +...checksum after hashing g_633[i][j] : 8112465A +index = [3][4] +...checksum after hashing g_633[i][j] : 47A87784 +index = [3][5] +...checksum after hashing g_633[i][j] : 9CA76277 +index = [3][6] +...checksum after hashing g_633[i][j] : 4D813D7C +index = [3][7] +...checksum after hashing g_633[i][j] : 6EB22DC +index = [4][0] +...checksum after hashing g_633[i][j] : EB6754EB +index = [4][1] +...checksum after hashing g_633[i][j] : D2C9E41 +index = [4][2] +...checksum after hashing g_633[i][j] : 7B60F2E7 +index = [4][3] +...checksum after hashing g_633[i][j] : 7E86C230 +index = [4][4] +...checksum after hashing g_633[i][j] : CD20732C +index = [4][5] +...checksum after hashing g_633[i][j] : ED46833C +index = [4][6] +...checksum after hashing g_633[i][j] : C9D3DBD0 +index = [4][7] +...checksum after hashing g_633[i][j] : CE61509C +index = [5][0] +...checksum after hashing g_633[i][j] : 73D58AAB +index = [5][1] +...checksum after hashing g_633[i][j] : 3908090A +index = [5][2] +...checksum after hashing g_633[i][j] : 1F7596BD +index = [5][3] +...checksum after hashing g_633[i][j] : E8820D5F +index = [5][4] +...checksum after hashing g_633[i][j] : 4996B671 +index = [5][5] +...checksum after hashing g_633[i][j] : 1B0F4EEF +index = [5][6] +...checksum after hashing g_633[i][j] : 11206BD1 +index = [5][7] +...checksum after hashing g_633[i][j] : 41A2171 +index = [6][0] +...checksum after hashing g_633[i][j] : B5899ABA +index = [6][1] +...checksum after hashing g_633[i][j] : A982EF5D +index = [6][2] +...checksum after hashing g_633[i][j] : D5A3EE31 +index = [6][3] +...checksum after hashing g_633[i][j] : B93C7403 +index = [6][4] +...checksum after hashing g_633[i][j] : F547B7E0 +index = [6][5] +...checksum after hashing g_633[i][j] : 45C5A9E0 +index = [6][6] +...checksum after hashing g_633[i][j] : 5828FE95 +index = [6][7] +...checksum after hashing g_633[i][j] : 2C6DE73C +index = [7][0] +...checksum after hashing g_633[i][j] : 1C1EB763 +index = [7][1] +...checksum after hashing g_633[i][j] : 5341CB6C +index = [7][2] +...checksum after hashing g_633[i][j] : 1FCF0046 +index = [7][3] +...checksum after hashing g_633[i][j] : 5E511E89 +index = [7][4] +...checksum after hashing g_633[i][j] : DCDECD78 +index = [7][5] +...checksum after hashing g_633[i][j] : 86662412 +index = [7][6] +...checksum after hashing g_633[i][j] : 1AEDD44A +index = [7][7] +...checksum after hashing g_706[i] : B7D9FB14 +index = [0] +...checksum after hashing g_706[i] : BC57AEFA +index = [1] +...checksum after hashing g_706[i] : E9E0456E +index = [2] +...checksum after hashing g_706[i] : F542CC51 +index = [3] +...checksum after hashing g_706[i] : 3BDE868D +index = [4] +...checksum after hashing g_706[i] : B0CBFF92 +index = [5] +...checksum after hashing g_706[i] : 95FC0AB1 +index = [6] +...checksum after hashing g_903 : B171BA4F +...checksum after hashing g_904 : B7E30F71 +checksum = b7e30f71 diff --git a/src/tests/csmith/rand95.c b/src/tests/csmith/rand95.c new file mode 100644 index 0000000..6a5646c --- /dev/null +++ b/src/tests/csmith/rand95.c @@ -0,0 +1,1680 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static int g_4 = 0x67A876E6L; +static int g_10 = 0xC5EB2006L; +static int g_71 = 0x51ECDE47L; +static int g_72 = 0x995E148CL; +static signed char g_108 = 0L; +static signed char g_109 = 0x00L; +static unsigned g_112 = 0UL; +static int *g_117 = &g_71; +static int **g_116 = &g_117; +static unsigned char g_128 = 0x87L; +static unsigned short g_144 = 65535UL; +static short g_155 = 0x2CBFL; +static unsigned short g_156[4][9] = {{65528UL, 65528UL, 65528UL, 65528UL, 65528UL, 65528UL, 65528UL, 65528UL, 65528UL}, {65528UL, 65528UL, 65528UL, 65528UL, 65528UL, 65528UL, 65528UL, 65528UL, 65528UL}, {65528UL, 65528UL, 65528UL, 65528UL, 65528UL, 65528UL, 65528UL, 65528UL, 65528UL}, {65528UL, 65528UL, 65528UL, 65528UL, 65528UL, 65528UL, 65528UL, 65528UL, 65528UL}}; +static short g_173[9][2] = {{1L, 0x0713L}, {1L, 0x0713L}, {1L, 0x0713L}, {1L, 0x0713L}, {1L, 0x0713L}, {1L, 0x0713L}, {1L, 0x0713L}, {1L, 0x0713L}, {1L, 0x0713L}}; +static unsigned g_177 = 4294967289UL; +static signed char g_192 = (-8L); +static unsigned char g_193 = 1UL; +static unsigned short g_285 = 0UL; +static unsigned g_294 = 0UL; +static int g_343 = 0x3E3CC25AL; +static short g_345 = 0x39F1L; +static unsigned short g_346[9] = {0UL, 4UL, 0UL, 4UL, 0UL, 4UL, 0UL, 4UL, 0UL}; +static unsigned g_362 = 6UL; +static unsigned g_379 = 0xC057A79DL; +static unsigned g_382 = 3UL; +static unsigned g_416 = 4294967291UL; +static int g_445 = 8L; +static signed char g_495 = (-5L); +static unsigned short g_499[4] = {0x8175L, 0x8175L, 0x8175L, 0x8175L}; +static signed char g_506[6] = {(-1L), (-1L), 0x0EL, (-1L), (-1L), 0x0EL}; +static unsigned g_538 = 4294967294UL; +static int g_553 = (-5L); +static signed char g_587 = 0x2DL; +static unsigned g_589 = 0xED6979E6L; +static unsigned char g_592 = 0xD2L; +static int g_595 = (-1L); +static int g_609[9][5] = {{0xA145D9A1L, 4L, (-1L), 0x136DF85BL, (-1L)}, {0xA145D9A1L, 4L, (-1L), 0x136DF85BL, (-1L)}, {0xA145D9A1L, 4L, (-1L), 0x136DF85BL, (-1L)}, {0xA145D9A1L, 4L, (-1L), 0x136DF85BL, (-1L)}, {0xA145D9A1L, 4L, (-1L), 0x136DF85BL, (-1L)}, {0xA145D9A1L, 4L, (-1L), 0x136DF85BL, (-1L)}, {0xA145D9A1L, 4L, (-1L), 0x136DF85BL, (-1L)}, {0xA145D9A1L, 4L, (-1L), 0x136DF85BL, (-1L)}, {0xA145D9A1L, 4L, (-1L), 0x136DF85BL, (-1L)}}; +static int g_610 = 0x95CA8796L; +static unsigned g_611[5] = {4294967288UL, 4294967288UL, 4294967288UL, 4294967288UL, 4294967288UL}; +static int g_619[8] = {0xB3359B46L, 0xB3359B46L, 0xB3359B46L, 0xB3359B46L, 0xB3359B46L, 0xB3359B46L, 0xB3359B46L, 0xB3359B46L}; +static int g_620 = 6L; +static unsigned char g_622 = 0x64L; +static unsigned short g_659 = 3UL; +static int *g_747[4] = {&g_10, &g_10, &g_10, &g_10}; +static int g_797 = 0x95EB4067L; +static int func_1(void); +static int * func_12(int * p_13); +static int * func_14(int * p_15, signed char p_16, int * p_17, int p_18, short p_19); +static int * func_20(short p_21, unsigned p_22); +static int func_33(int * p_34, unsigned p_35); +static int * func_36(int p_37, int * p_38, int * p_39); +static int func_48(unsigned short p_49, signed char p_50, unsigned char p_51, unsigned p_52); +static unsigned func_61(short p_62, int p_63, signed char p_64, unsigned p_65); +static unsigned func_68(int * p_69); +static unsigned char func_76(int p_77); +static int func_1(void) +{ + short l_2 = 0x0657L; + int *l_3 = &g_4; + int l_11 = 0xC2E9378FL; + step_hash(1); + (*l_3) = l_2; + step_hash(2); + (*l_3) = (((short)g_4 >> (short)5) | ((!g_4) < (*l_3))); + step_hash(776); + for (g_4 = 11; (g_4 != 6); g_4--) + { + int *l_9[7][10] = {{&g_10, &g_4, &g_10, &g_4, &g_10, &g_4, &g_10, &g_4, &g_4, (void*)0}, {&g_10, &g_4, &g_10, &g_4, &g_10, &g_4, &g_10, &g_4, &g_4, (void*)0}, {&g_10, &g_4, &g_10, &g_4, &g_10, &g_4, &g_10, &g_4, &g_4, (void*)0}, {&g_10, &g_4, &g_10, &g_4, &g_10, &g_4, &g_10, &g_4, &g_4, (void*)0}, {&g_10, &g_4, &g_10, &g_4, &g_10, &g_4, &g_10, &g_4, &g_4, (void*)0}, {&g_10, &g_4, &g_10, &g_4, &g_10, &g_4, &g_10, &g_4, &g_4, (void*)0}, {&g_10, &g_4, &g_10, &g_4, &g_10, &g_4, &g_10, &g_4, &g_4, (void*)0}}; + int i, j; + step_hash(6); + l_11 = g_4; + } + step_hash(777); + return g_553; +} +static int * func_12(int * p_13) +{ + int *l_726 = &g_595; + int l_746 = 0xA44568A6L; + int l_763 = (-7L); + int ***l_785 = &g_116; + short l_849 = (-1L); + int l_860 = 0x71C6DF36L; + int l_862 = 6L; + int l_863 = (-1L); + int l_864 = 0xEDD4CC1EL; + int l_865 = 0x0E7FE351L; + int l_867 = 0x27CCD9D0L; + int l_868 = (-7L); + int l_870 = 5L; + int l_871 = 0x3A3C2269L; + int l_872 = (-7L); + int l_873 = (-1L); + int l_874[4][9] = {{0xB5943D5CL, 0xBF27DE18L, 0xB5943D5CL, 0x5BCC74E1L, (-4L), (-2L), 0xFA3FCE69L, 0xFA3FCE69L, (-2L)}, {0xB5943D5CL, 0xBF27DE18L, 0xB5943D5CL, 0x5BCC74E1L, (-4L), (-2L), 0xFA3FCE69L, 0xFA3FCE69L, (-2L)}, {0xB5943D5CL, 0xBF27DE18L, 0xB5943D5CL, 0x5BCC74E1L, (-4L), (-2L), 0xFA3FCE69L, 0xFA3FCE69L, (-2L)}, {0xB5943D5CL, 0xBF27DE18L, 0xB5943D5CL, 0x5BCC74E1L, (-4L), (-2L), 0xFA3FCE69L, 0xFA3FCE69L, (-2L)}}; + int l_878[6][10] = {{0L, (-1L), 0x2A6FEC0EL, (-1L), 0L, 4L, 0L, (-1L), 0x2A6FEC0EL, (-1L)}, {0L, (-1L), 0x2A6FEC0EL, (-1L), 0L, 4L, 0L, (-1L), 0x2A6FEC0EL, (-1L)}, {0L, (-1L), 0x2A6FEC0EL, (-1L), 0L, 4L, 0L, (-1L), 0x2A6FEC0EL, (-1L)}, {0L, (-1L), 0x2A6FEC0EL, (-1L), 0L, 4L, 0L, (-1L), 0x2A6FEC0EL, (-1L)}, {0L, (-1L), 0x2A6FEC0EL, (-1L), 0L, 4L, 0L, (-1L), 0x2A6FEC0EL, (-1L)}, {0L, (-1L), 0x2A6FEC0EL, (-1L), 0L, 4L, 0L, (-1L), 0x2A6FEC0EL, (-1L)}}; + int i, j; + step_hash(773); + if (func_33(l_726, g_659)) + { + int ***l_728 = &g_116; + int l_761 = (-9L); + int l_762[9][3]; + int i, j; + for (i = 0; i < 9; i++) + { + for (j = 0; j < 3; j++) + l_762[i][j] = (-4L); + } + step_hash(613); + (*l_726) = (-(unsigned)(((void*)0 != l_728) ^ ((void*)0 == l_728))); + step_hash(650); + for (g_72 = 3; (g_72 >= 0); g_72 -= 1) + { + int *l_729 = &g_620; + step_hash(624); + for (g_144 = 0; (g_144 <= 3); g_144 += 1) + { + int i; + step_hash(620); + l_729 = &g_10; + step_hash(621); + (**l_728) = func_36(g_499[g_144], p_13, p_13); + step_hash(622); + (***l_728) = ((short)((int)(p_13 != (*g_116)) - (int)(***l_728)) << (short)15); + step_hash(623); + (*l_726) &= ((***l_728) ^ (~(-(unsigned char)(***l_728)))); + } + step_hash(647); + for (g_71 = 3; (g_71 >= 0); g_71 -= 1) + { + int i; + step_hash(628); + (*l_729) ^= g_499[g_71]; + step_hash(629); + (**l_728) = &g_595; + step_hash(641); + for (g_294 = 0; (g_294 <= 3); g_294 += 1) + { + int l_735 = 0xDEDE5561L; + step_hash(639); + for (g_592 = 0; (g_592 <= 4); g_592 += 1) + { + int i, j; + step_hash(636); + (*g_116) = func_20(g_499[g_72], ((func_33(func_20(g_499[g_72], g_609[(g_294 + 3)][g_71]), (g_609[(g_72 + 4)][(g_71 + 1)] && 9L)) | l_735) == ((signed char)g_609[3][3] << (signed char)5))); + step_hash(637); + (*l_729) |= (g_611[1] >= l_735); + step_hash(638); + (**l_728) = func_20((((g_156[0][1] & ((unsigned char)255UL * (unsigned char)((unsigned)((&l_735 != (void*)0) & (*l_729)) + (unsigned)(((g_499[g_71] == (***l_728)) ^ 0xFA2FL) != ((signed char)((unsigned short)(+0xC70CL) << (unsigned short)(***l_728)) >> (signed char)(***l_728)))))) >= 0xB1F132E3L) >= 0x47A48975L), l_746); + } + step_hash(640); + return (*g_116); + } + step_hash(646); + for (g_362 = 0; (g_362 <= 3); g_362 += 1) + { + step_hash(645); + return p_13; + } + } + step_hash(648); + (*l_729) &= (*l_726); + step_hash(649); + (**l_728) = g_747[1]; + } + step_hash(651); + (*l_726) = ((((int)((0xCA987275L != (((short)(func_33(&l_746, g_538) == ((short)((((g_72 < ((void*)0 != &l_746)) && ((*l_726) <= g_294)) || (*l_726)) != (*l_726)) << (short)1)) << (short)1) & g_156[0][1])) >= 0xC2EAE26FL) / (int)0xD0902EB3L) && 0x225EL) < g_611[4]); + step_hash(694); + for (g_362 = 0; (g_362 != 59); g_362++) + { + unsigned l_764 = 0xBC973493L; + int ***l_777 = &g_116; + int l_803 = 0xD3B2FCC9L; + int l_804[2]; + int i; + for (i = 0; i < 2; i++) + l_804[i] = 1L; + step_hash(692); + for (g_416 = 19; (g_416 >= 14); g_416 -= 9) + { + int *l_760[4]; + int i; + for (i = 0; i < 4; i++) + l_760[i] = &g_10; + step_hash(658); + l_764++; + step_hash(659); + l_746 &= (l_764 ^ ((((short)l_764 >> (short)7) >= ((0xDEL == (+g_294)) > ((unsigned char)g_595 >> (unsigned char)(((+g_108) && g_506[0]) && (+g_506[0]))))) >= func_33(p_13, g_128))); + step_hash(664); + for (g_587 = 0; (g_587 <= 16); g_587 += 9) + { + step_hash(663); + if (l_762[5][0]) + break; + } + } + step_hash(693); + (*l_726) = (*l_726); + } + } + else + { + int l_815[9][6] = {{(-1L), 9L, 9L, 0xE7BFC7EEL, 0xE7BFC7EEL, 9L}, {(-1L), 9L, 9L, 0xE7BFC7EEL, 0xE7BFC7EEL, 9L}, {(-1L), 9L, 9L, 0xE7BFC7EEL, 0xE7BFC7EEL, 9L}, {(-1L), 9L, 9L, 0xE7BFC7EEL, 0xE7BFC7EEL, 9L}, {(-1L), 9L, 9L, 0xE7BFC7EEL, 0xE7BFC7EEL, 9L}, {(-1L), 9L, 9L, 0xE7BFC7EEL, 0xE7BFC7EEL, 9L}, {(-1L), 9L, 9L, 0xE7BFC7EEL, 0xE7BFC7EEL, 9L}, {(-1L), 9L, 9L, 0xE7BFC7EEL, 0xE7BFC7EEL, 9L}, {(-1L), 9L, 9L, 0xE7BFC7EEL, 0xE7BFC7EEL, 9L}}; + int **l_822[4]; + unsigned l_839 = 0xEC4B8773L; + signed char l_866 = 0xA3L; + int l_877 = 0x4212E3C9L; + unsigned short l_879[4] = {65533UL, 1UL, 65533UL, 1UL}; + int l_904 = 0x57434979L; + short l_905 = 1L; + int l_906 = 0x303B8232L; + unsigned short l_907[7][8] = {{0x5609L, 0x2C89L, 0xFF4DL, 1UL, 1UL, 0x3D28L, 1UL, 1UL}, {0x5609L, 0x2C89L, 0xFF4DL, 1UL, 1UL, 0x3D28L, 1UL, 1UL}, {0x5609L, 0x2C89L, 0xFF4DL, 1UL, 1UL, 0x3D28L, 1UL, 1UL}, {0x5609L, 0x2C89L, 0xFF4DL, 1UL, 1UL, 0x3D28L, 1UL, 1UL}, {0x5609L, 0x2C89L, 0xFF4DL, 1UL, 1UL, 0x3D28L, 1UL, 1UL}, {0x5609L, 0x2C89L, 0xFF4DL, 1UL, 1UL, 0x3D28L, 1UL, 1UL}, {0x5609L, 0x2C89L, 0xFF4DL, 1UL, 1UL, 0x3D28L, 1UL, 1UL}}; + int i, j; + for (i = 0; i < 4; i++) + l_822[i] = &g_117; + step_hash(696); + (**l_785) = &l_746; + step_hash(697); + (***l_785) = (*g_117); + step_hash(771); + if ((*g_117)) + { + int *l_829 = &g_71; + step_hash(727); + if (func_76((**g_116))) + { + int *l_825 = (void*)0; + step_hash(700); + return l_825; + } + else + { + signed char l_842 = 0x03L; + int l_843[9] = {0x2C23884DL, 0x50CB14D8L, 0x2C23884DL, 0x50CB14D8L, 0x2C23884DL, 0x50CB14D8L, 0x2C23884DL, 0x50CB14D8L, 0x2C23884DL}; + int i; + step_hash(712); + for (g_343 = (-4); (g_343 <= 20); g_343++) + { + unsigned char l_828[4][6] = {{0x82L, 249UL, 6UL, 249UL, 0x82L, 255UL}, {0x82L, 249UL, 6UL, 249UL, 0x82L, 255UL}, {0x82L, 249UL, 6UL, 249UL, 0x82L, 255UL}, {0x82L, 249UL, 6UL, 249UL, 0x82L, 255UL}}; + int i, j; + step_hash(709); + for (g_109 = 0; (g_109 <= 5); g_109 += 1) + { + step_hash(708); + return p_13; + } + step_hash(710); + if (l_828[1][1]) + continue; + step_hash(711); + return l_829; + } + step_hash(724); + if ((*l_829)) + { + unsigned l_834[2]; + int i; + for (i = 0; i < 2; i++) + l_834[i] = 0x8F63ED42L; + step_hash(714); + (*l_726) &= (((((signed char)(((void*)0 == &g_747[1]) < g_538) << (signed char)g_128) != ((unsigned char)l_834[0] + (unsigned char)l_834[1])) != ((void*)0 != &p_13)) < (&g_116 != &g_116)); + step_hash(715); + (*g_116) = p_13; + step_hash(721); + for (g_620 = 0; (g_620 != (-27)); g_620--) + { + step_hash(719); + (*l_726) = ((unsigned char)((void*)0 == (*g_116)) << (unsigned char)4); + step_hash(720); + ++l_839; + } + } + else + { + step_hash(723); + (*l_726) = l_842; + } + step_hash(725); + l_843[3] |= (*l_829); + step_hash(726); + l_829 = p_13; + } + } + else + { + signed char l_852[1]; + int l_854 = 0x469EB094L; + int l_856[7] = {0xAC85FBADL, (-9L), 0xAC85FBADL, (-9L), 0xAC85FBADL, (-9L), 0xAC85FBADL}; + int l_875 = 0xA1CA5AB6L; + int i; + for (i = 0; i < 1; i++) + l_852[i] = 1L; + step_hash(770); + if (((short)((**l_785) == (*g_116)) * (short)5UL)) + { + int l_857 = 0x21D58C82L; + int l_859[9][9] = {{0L, 1L, 0x8C8A4D12L, 0xA64A33E1L, 0x15027F77L, 0xB833185CL, 6L, 0xD99DEED8L, 0x8C8A4D12L}, {0L, 1L, 0x8C8A4D12L, 0xA64A33E1L, 0x15027F77L, 0xB833185CL, 6L, 0xD99DEED8L, 0x8C8A4D12L}, {0L, 1L, 0x8C8A4D12L, 0xA64A33E1L, 0x15027F77L, 0xB833185CL, 6L, 0xD99DEED8L, 0x8C8A4D12L}, {0L, 1L, 0x8C8A4D12L, 0xA64A33E1L, 0x15027F77L, 0xB833185CL, 6L, 0xD99DEED8L, 0x8C8A4D12L}, {0L, 1L, 0x8C8A4D12L, 0xA64A33E1L, 0x15027F77L, 0xB833185CL, 6L, 0xD99DEED8L, 0x8C8A4D12L}, {0L, 1L, 0x8C8A4D12L, 0xA64A33E1L, 0x15027F77L, 0xB833185CL, 6L, 0xD99DEED8L, 0x8C8A4D12L}, {0L, 1L, 0x8C8A4D12L, 0xA64A33E1L, 0x15027F77L, 0xB833185CL, 6L, 0xD99DEED8L, 0x8C8A4D12L}, {0L, 1L, 0x8C8A4D12L, 0xA64A33E1L, 0x15027F77L, 0xB833185CL, 6L, 0xD99DEED8L, 0x8C8A4D12L}, {0L, 1L, 0x8C8A4D12L, 0xA64A33E1L, 0x15027F77L, 0xB833185CL, 6L, 0xD99DEED8L, 0x8C8A4D12L}}; + int l_869 = 2L; + signed char l_876 = (-1L); + int ***l_897[8][9] = {{(void*)0, &l_822[0], &l_822[0], &l_822[0], &g_116, (void*)0, (void*)0, &g_116, (void*)0}, {(void*)0, &l_822[0], &l_822[0], &l_822[0], &g_116, (void*)0, (void*)0, &g_116, (void*)0}, {(void*)0, &l_822[0], &l_822[0], &l_822[0], &g_116, (void*)0, (void*)0, &g_116, (void*)0}, {(void*)0, &l_822[0], &l_822[0], &l_822[0], &g_116, (void*)0, (void*)0, &g_116, (void*)0}, {(void*)0, &l_822[0], &l_822[0], &l_822[0], &g_116, (void*)0, (void*)0, &g_116, (void*)0}, {(void*)0, &l_822[0], &l_822[0], &l_822[0], &g_116, (void*)0, (void*)0, &g_116, (void*)0}, {(void*)0, &l_822[0], &l_822[0], &l_822[0], &g_116, (void*)0, (void*)0, &g_116, (void*)0}, {(void*)0, &l_822[0], &l_822[0], &l_822[0], &g_116, (void*)0, (void*)0, &g_116, (void*)0}}; + unsigned short l_899 = 0xFFB9L; + int i, j; + step_hash(736); + for (g_362 = 0; (g_362 != 32); g_362 += 8) + { + short l_848 = (-5L); + step_hash(733); + (***l_785) = l_848; + step_hash(734); + (*g_117) = (!0xF2474093L); + step_hash(735); + (***l_785) ^= ((*g_116) != p_13); + } + step_hash(737); + (*g_117) |= (~l_849); + step_hash(758); + for (g_108 = 9; (g_108 != 20); g_108 += 1) + { + int l_853 = 1L; + int l_855 = (-1L); + int l_858 = 0xF9425689L; + int l_861[6] = {0xFA0D5660L, 0xFA0D5660L, 0x5273E52DL, 0xFA0D5660L, 0xFA0D5660L, 0x5273E52DL}; + int ***l_898 = (void*)0; + int i; + step_hash(741); + l_879[1]++; + step_hash(751); + if ((0x8DD5L | l_875)) + { + int l_888 = 0xC0293B56L; + step_hash(743); + (***l_785) ^= (((unsigned char)(((unsigned short)l_856[4] << (unsigned short)9) & (0x3BBDA1CDL ^ ((5L <= (*l_726)) || g_538))) / (unsigned char)((unsigned short)65535UL + (unsigned short)func_33(p_13, l_888))) || l_875); + step_hash(744); + p_13 = (void*)0; + step_hash(745); + if (l_875) + break; + } + else + { + step_hash(747); + (*g_117) = ((unsigned char)((signed char)(0xEBL < ((void*)0 != p_13)) >> (signed char)g_345) << (unsigned char)4); + step_hash(748); + if (l_859[1][5]) + break; + step_hash(749); + p_13 = func_36(((0x90DCA07CL <= l_854) >= ((unsigned char)((short)func_33(func_36((**g_116), func_20(l_861[5], ((0xD6L < func_33(p_13, (((***l_785) && (l_897[6][0] == l_898)) | (***l_785)))) && 0x6DL)), (*g_116)), g_499[1]) >> (short)5) + (unsigned char)l_856[3])), (*g_116), p_13); + step_hash(750); + (*l_726) = (-1L); + } + step_hash(757); + for (g_144 = 0; (g_144 <= 3); g_144 += 1) + { + int i; + step_hash(755); + l_899--; + step_hash(756); + (**g_116) ^= l_879[g_144]; + } + } + } + else + { + step_hash(764); + for (g_362 = 1; (g_362 > 47); g_362 += 8) + { + step_hash(763); + return p_13; + } + step_hash(769); + for (l_877 = 0; (l_877 <= 4); l_877 += 1) + { + step_hash(768); + return p_13; + } + } + } + step_hash(772); + l_907[5][7]--; + } + step_hash(774); + return p_13; +} +static int * func_14(int * p_15, signed char p_16, int * p_17, int p_18, short p_19) +{ + unsigned l_708 = 1UL; + int *l_709[8][8] = {{&g_595, &g_620, &g_71, &g_4, &g_71, &g_620, &g_595, &g_72}, {&g_595, &g_620, &g_71, &g_4, &g_71, &g_620, &g_595, &g_72}, {&g_595, &g_620, &g_71, &g_4, &g_71, &g_620, &g_595, &g_72}, {&g_595, &g_620, &g_71, &g_4, &g_71, &g_620, &g_595, &g_72}, {&g_595, &g_620, &g_71, &g_4, &g_71, &g_620, &g_595, &g_72}, {&g_595, &g_620, &g_71, &g_4, &g_71, &g_620, &g_595, &g_72}, {&g_595, &g_620, &g_71, &g_4, &g_71, &g_620, &g_595, &g_72}, {&g_595, &g_620, &g_71, &g_4, &g_71, &g_620, &g_595, &g_72}}; + unsigned l_724 = 4294967295UL; + unsigned short l_725 = 0xDCF5L; + int i, j; + step_hash(608); + for (g_294 = 0; (g_294 > 2); g_294 += 5) + { + int l_707 = (-1L); + step_hash(604); + (*g_117) = ((signed char)0L << (signed char)0); + step_hash(605); + (*p_17) = (p_19 != (0xECE2L | func_61(g_346[0], g_611[3], ((+(p_16 >= (-(unsigned char)((signed char)(((unsigned short)0xDBE0L >> (unsigned short)(p_16 ^ func_48(((unsigned)((int)((unsigned short)g_193 << (unsigned short)0) + (int)(((((unsigned char)((short)l_707 * (short)l_708) << (unsigned char)6) != l_708) >= p_19) <= l_708)) - (unsigned)p_18), g_609[3][3], p_16, p_16))) | l_707) * (signed char)g_610)))) <= (*p_17)), p_19))); + step_hash(606); + if ((*p_15)) + break; + step_hash(607); + return l_709[6][3]; + } + step_hash(609); + (*p_17) = ((unsigned char)(g_173[4][0] & 65532UL) - (unsigned char)((unsigned short)((short)(((3L >= ((unsigned short)(l_709[6][3] != (void*)0) - (unsigned short)((unsigned short)(((g_193 <= (p_19 > ((signed char)g_156[3][0] << (signed char)(((((short)p_18 / (short)p_16) < g_193) && 0x86L) <= l_724)))) != l_725) > (*p_17)) >> (unsigned short)g_622))) == (*p_15)) || 0x167D15C9L) / (short)g_345) * (unsigned short)0L)); + step_hash(610); + return l_709[3][6]; +} +static int * func_20(short p_21, unsigned p_22) +{ + unsigned short l_53 = 65531UL; + int *l_54[1]; + int i; + for (i = 0; i < 1; i++) + l_54[i] = &g_4; + step_hash(598); + for (g_10 = (-5); (g_10 <= 11); g_10 += 1) + { + int *l_56 = (void*)0; + int l_665 = (-1L); + short l_675[8][5] = {{0xD173L, 0xFD06L, 0xC6D8L, 1L, 0x8B7CL}, {0xD173L, 0xFD06L, 0xC6D8L, 1L, 0x8B7CL}, {0xD173L, 0xFD06L, 0xC6D8L, 1L, 0x8B7CL}, {0xD173L, 0xFD06L, 0xC6D8L, 1L, 0x8B7CL}, {0xD173L, 0xFD06L, 0xC6D8L, 1L, 0x8B7CL}, {0xD173L, 0xFD06L, 0xC6D8L, 1L, 0x8B7CL}, {0xD173L, 0xFD06L, 0xC6D8L, 1L, 0x8B7CL}, {0xD173L, 0xFD06L, 0xC6D8L, 1L, 0x8B7CL}}; + unsigned l_683 = 1UL; + int i, j; + step_hash(11); + if (p_22) + break; + step_hash(596); + for (p_22 = 22; (p_22 > 44); p_22++) + { + unsigned char l_644[3][4] = {{0xBFL, 255UL, 0xBFL, 255UL}, {0xBFL, 255UL, 0xBFL, 255UL}, {0xBFL, 255UL, 0xBFL, 255UL}}; + int *l_652 = &g_595; + int l_657[8] = {0x6179EC45L, 6L, 0x6179EC45L, 6L, 0x6179EC45L, 6L, 0x6179EC45L, 6L}; + int i, j; + step_hash(595); + for (p_21 = 0; (p_21 > (-22)); --p_21) + { + int *l_55 = (void*)0; + int *l_651[1][5]; + int i, j; + for (i = 0; i < 1; i++) + { + for (j = 0; j < 5; j++) + l_651[i][j] = (void*)0; + } + } + } + step_hash(597); + return l_54[0]; + } + step_hash(599); + return (*g_116); +} + + + + + + + +static int func_33(int * p_34, unsigned p_35) +{ + signed char l_646[7][5] = {{6L, 0xF7L, 6L, 0x4CL, (-5L)}, {6L, 0xF7L, 6L, 0x4CL, (-5L)}, {6L, 0xF7L, 6L, 0x4CL, (-5L)}, {6L, 0xF7L, 6L, 0x4CL, (-5L)}, {6L, 0xF7L, 6L, 0x4CL, (-5L)}, {6L, 0xF7L, 6L, 0x4CL, (-5L)}, {6L, 0xF7L, 6L, 0x4CL, (-5L)}}; + int i, j; + step_hash(571); + return l_646[4][1]; +} + + + + + + + +static int * func_36(int p_37, int * p_38, int * p_39) +{ + int *l_645 = &g_620; + step_hash(568); + (*l_645) = 0L; + step_hash(569); + return l_645; +} + + + + + + + +static int func_48(unsigned short p_49, signed char p_50, unsigned char p_51, unsigned p_52) +{ + unsigned char l_593 = 255UL; + int l_598 = 9L; + int l_606 = 0x06D756E5L; + int l_607[8][4] = {{0xEB2C1E0DL, 0L, 0xEB2C1E0DL, 0L}, {0xEB2C1E0DL, 0L, 0xEB2C1E0DL, 0L}, {0xEB2C1E0DL, 0L, 0xEB2C1E0DL, 0L}, {0xEB2C1E0DL, 0L, 0xEB2C1E0DL, 0L}, {0xEB2C1E0DL, 0L, 0xEB2C1E0DL, 0L}, {0xEB2C1E0DL, 0L, 0xEB2C1E0DL, 0L}, {0xEB2C1E0DL, 0L, 0xEB2C1E0DL, 0L}, {0xEB2C1E0DL, 0L, 0xEB2C1E0DL, 0L}}; + short l_608 = 0x5FC8L; + int **l_631 = (void*)0; + int **l_632 = (void*)0; + unsigned char l_640 = 246UL; + unsigned l_641[4] = {0x4611CCAFL, 8UL, 0x4611CCAFL, 8UL}; + unsigned short l_642 = 0x7F10L; + int *l_643 = &l_598; + int i, j; + step_hash(548); + for (p_50 = 0; (p_50 == 29); p_50++) + { + int l_596[9] = {0xA590D8F6L, 0x5F5DB6E9L, 0xA590D8F6L, 0x5F5DB6E9L, 0xA590D8F6L, 0x5F5DB6E9L, 0xA590D8F6L, 0x5F5DB6E9L, 0xA590D8F6L}; + int i; + step_hash(546); + for (p_51 = 0; (p_51 >= 41); ++p_51) + { + unsigned l_450 = 0x5C1075D9L; + int *l_594 = &g_595; + int *l_597 = &g_72; + int *l_599 = &l_596[3]; + int *l_600 = &l_598; + int *l_601 = (void*)0; + int *l_602 = &l_596[2]; + int *l_603 = &l_598; + int *l_604 = &l_598; + int *l_605[2]; + int i; + for (i = 0; i < 2; i++) + l_605[i] = &g_595; + } + step_hash(547); + (*g_116) = &l_606; + } + step_hash(564); + for (g_379 = 0; (g_379 <= 3); g_379 += 1) + { + signed char l_617 = 0x7EL; + int l_618 = 0x0B167869L; + int l_621 = 1L; + step_hash(557); + for (g_112 = 0; (g_112 <= 3); g_112 += 1) + { + int i, j; + step_hash(555); + if (g_156[g_379][(g_379 + 4)]) + break; + step_hash(556); + (**g_116) = p_49; + } + step_hash(563); + for (g_193 = 0; (g_193 <= 3); g_193 += 1) + { + int *l_614 = &l_598; + int *l_615 = &l_598; + int *l_616[2]; + int i; + for (i = 0; i < 2; i++) + l_616[i] = &l_607[6][1]; + step_hash(561); + g_622--; + step_hash(562); + return p_51; + } + } + step_hash(565); + (*l_643) = ((unsigned char)(p_52 ^ l_608) + (unsigned char)((((short)((unsigned short)(l_631 == l_632) / (unsigned short)p_49) << (short)1) ^ (((short)func_61((-(short)0x60CEL), ((int)(((short)((*g_117) != (p_50 >= (l_640 > g_609[3][3]))) >> (short)g_592) | l_606) + (int)0L), l_641[3], g_553) % (short)0xD14DL) & l_642)) & p_50)); + step_hash(566); + return p_49; +} + + + + + + + +static unsigned func_61(short p_62, int p_63, signed char p_64, unsigned p_65) +{ + short l_451[9][6] = {{0L, 0L, 0xBE0FL, (-5L), 0xD65EL, (-5L)}, {0L, 0L, 0xBE0FL, (-5L), 0xD65EL, (-5L)}, {0L, 0L, 0xBE0FL, (-5L), 0xD65EL, (-5L)}, {0L, 0L, 0xBE0FL, (-5L), 0xD65EL, (-5L)}, {0L, 0L, 0xBE0FL, (-5L), 0xD65EL, (-5L)}, {0L, 0L, 0xBE0FL, (-5L), 0xD65EL, (-5L)}, {0L, 0L, 0xBE0FL, (-5L), 0xD65EL, (-5L)}, {0L, 0L, 0xBE0FL, (-5L), 0xD65EL, (-5L)}, {0L, 0L, 0xBE0FL, (-5L), 0xD65EL, (-5L)}}; + int *l_452 = &g_10; + int l_483 = 0x1E058DDEL; + unsigned l_496 = 4294967295UL; + int *l_527 = &l_483; + unsigned l_532[3][10] = {{1UL, 1UL, 1UL, 1UL, 1UL, 1UL, 1UL, 1UL, 1UL, 1UL}, {1UL, 1UL, 1UL, 1UL, 1UL, 1UL, 1UL, 1UL, 1UL, 1UL}, {1UL, 1UL, 1UL, 1UL, 1UL, 1UL, 1UL, 1UL, 1UL, 1UL}}; + int l_537 = 0x033ADC80L; + unsigned l_578[8][3] = {{0xAAFEFFE6L, 0x9C91C8CCL, 4294967286UL}, {0xAAFEFFE6L, 0x9C91C8CCL, 4294967286UL}, {0xAAFEFFE6L, 0x9C91C8CCL, 4294967286UL}, {0xAAFEFFE6L, 0x9C91C8CCL, 4294967286UL}, {0xAAFEFFE6L, 0x9C91C8CCL, 4294967286UL}, {0xAAFEFFE6L, 0x9C91C8CCL, 4294967286UL}, {0xAAFEFFE6L, 0x9C91C8CCL, 4294967286UL}, {0xAAFEFFE6L, 0x9C91C8CCL, 4294967286UL}}; + int l_586 = 0x3E888837L; + int l_588 = 0xF1AD761CL; + int i, j; + step_hash(412); + l_451[4][4] = g_294; + step_hash(532); + for (g_71 = 0; (g_71 <= 1); g_71 += 1) + { + unsigned char l_476 = 8UL; + int *l_489 = &g_72; + unsigned short l_507 = 65535UL; + unsigned l_525 = 4294967289UL; + unsigned l_568 = 0UL; + step_hash(416); + (*g_116) = l_452; + step_hash(460); + for (g_379 = 0; (g_379 <= 5); g_379 += 1) + { + unsigned l_459[7] = {0x1416C7F9L, 1UL, 0x1416C7F9L, 1UL, 0x1416C7F9L, 1UL, 0x1416C7F9L}; + int **l_473 = &g_117; + int l_481[6][7] = {{0x0F6A6855L, 0xF8CCFB3AL, 0xB57B5FCCL, 0xCF78BDAAL, 0x7008C40EL, 0xCF78BDAAL, 0xB57B5FCCL}, {0x0F6A6855L, 0xF8CCFB3AL, 0xB57B5FCCL, 0xCF78BDAAL, 0x7008C40EL, 0xCF78BDAAL, 0xB57B5FCCL}, {0x0F6A6855L, 0xF8CCFB3AL, 0xB57B5FCCL, 0xCF78BDAAL, 0x7008C40EL, 0xCF78BDAAL, 0xB57B5FCCL}, {0x0F6A6855L, 0xF8CCFB3AL, 0xB57B5FCCL, 0xCF78BDAAL, 0x7008C40EL, 0xCF78BDAAL, 0xB57B5FCCL}, {0x0F6A6855L, 0xF8CCFB3AL, 0xB57B5FCCL, 0xCF78BDAAL, 0x7008C40EL, 0xCF78BDAAL, 0xB57B5FCCL}, {0x0F6A6855L, 0xF8CCFB3AL, 0xB57B5FCCL, 0xCF78BDAAL, 0x7008C40EL, 0xCF78BDAAL, 0xB57B5FCCL}}; + int i, j; + step_hash(457); + for (g_108 = 1; (g_108 >= 0); g_108 -= 1) + { + int l_480 = 2L; + int i, j; + } + step_hash(458); + (*l_489) ^= p_65; + step_hash(459); + g_495 ^= (*l_489); + } + } + step_hash(540); + if ((*l_527)) + { + step_hash(534); + (*l_527) |= p_63; + } + else + { + int l_579 = (-1L); + int *l_580 = &l_483; + int *l_581 = &l_483; + int *l_582 = (void*)0; + int l_583[8] = {3L, 0x710BFD9DL, 3L, 0x710BFD9DL, 3L, 0x710BFD9DL, 3L, 0x710BFD9DL}; + int *l_584 = &g_72; + int *l_585[10][1] = {{(void*)0}, {(void*)0}, {(void*)0}, {(void*)0}, {(void*)0}, {(void*)0}, {(void*)0}, {(void*)0}, {(void*)0}, {(void*)0}}; + int i, j; + step_hash(536); + --g_589; + step_hash(537); + (*g_116) = (void*)0; + step_hash(538); + (*l_527) |= g_592; + step_hash(539); + return p_65; + } + step_hash(541); + return g_193; +} + + + + + + + +static unsigned func_68(int * p_69) +{ + unsigned l_70[9]; + int i; + for (i = 0; i < 9; i++) + l_70[i] = 3UL; + step_hash(409); + for (g_71 = 3; (g_71 <= 8); g_71 += 1) + { + unsigned char l_73 = 254UL; + int *l_444[7]; + int i; + for (i = 0; i < 7; i++) + l_444[i] = &g_72; + step_hash(33); + for (g_72 = 3; (g_72 <= 8); g_72 += 1) + { + int i; + step_hash(32); + return l_70[g_72]; + } + step_hash(407); + g_445 = (l_73 ^ ((unsigned char)func_76(l_70[5]) * (unsigned char)((unsigned short)(l_70[8] | (*p_69)) << (unsigned short)11))); + step_hash(408); + return l_70[1]; + } + step_hash(410); + return g_177; +} + + + + + + + +static unsigned char func_76(int p_77) +{ + int *l_81 = &g_72; + int l_110 = 0x61642E2BL; + int l_111[2]; + unsigned l_187 = 0xB4418FC0L; + int **l_239 = &g_117; + int l_309 = 0x6E31292AL; + int l_324 = 0x8A42E7EDL; + int i; + for (i = 0; i < 2; i++) + l_111[i] = 0xB33B2D97L; + step_hash(210); + if (p_77) + { + unsigned l_95 = 4294967295UL; + int l_126[7][10] = {{1L, 1L, 0L, 0xB73F452BL, 1L, 0xDE28BE02L, 0x4A4F5E2AL, 0xDE28BE02L, 1L, 0xB73F452BL}, {1L, 1L, 0L, 0xB73F452BL, 1L, 0xDE28BE02L, 0x4A4F5E2AL, 0xDE28BE02L, 1L, 0xB73F452BL}, {1L, 1L, 0L, 0xB73F452BL, 1L, 0xDE28BE02L, 0x4A4F5E2AL, 0xDE28BE02L, 1L, 0xB73F452BL}, {1L, 1L, 0L, 0xB73F452BL, 1L, 0xDE28BE02L, 0x4A4F5E2AL, 0xDE28BE02L, 1L, 0xB73F452BL}, {1L, 1L, 0L, 0xB73F452BL, 1L, 0xDE28BE02L, 0x4A4F5E2AL, 0xDE28BE02L, 1L, 0xB73F452BL}, {1L, 1L, 0L, 0xB73F452BL, 1L, 0xDE28BE02L, 0x4A4F5E2AL, 0xDE28BE02L, 1L, 0xB73F452BL}, {1L, 1L, 0L, 0xB73F452BL, 1L, 0xDE28BE02L, 0x4A4F5E2AL, 0xDE28BE02L, 1L, 0xB73F452BL}}; + int i, j; + step_hash(88); + if (g_72) + { + signed char l_78 = 0xA4L; + unsigned char l_102[7] = {0xBCL, 255UL, 0xBCL, 255UL, 0xBCL, 255UL, 0xBCL}; + int l_105 = 0x35008519L; + int l_107 = (-1L); + int **l_120 = &g_117; + int i; + step_hash(70); + if (l_78) + { + int *l_80 = &g_4; + int **l_79[9] = {&l_80, (void*)0, &l_80, (void*)0, &l_80, (void*)0, &l_80, (void*)0, &l_80}; + int i; + step_hash(38); + l_81 = (void*)0; + step_hash(54); + for (p_77 = 29; (p_77 > (-5)); --p_77) + { + unsigned l_94 = 0UL; + int *l_101 = &g_71; + int l_106 = 0x6471EDBFL; + short l_125[8][8] = {{(-7L), 9L, 0x2933L, 0x8A64L, 0x2933L, 9L, (-7L), (-3L)}, {(-7L), 9L, 0x2933L, 0x8A64L, 0x2933L, 9L, (-7L), (-3L)}, {(-7L), 9L, 0x2933L, 0x8A64L, 0x2933L, 9L, (-7L), (-3L)}, {(-7L), 9L, 0x2933L, 0x8A64L, 0x2933L, 9L, (-7L), (-3L)}, {(-7L), 9L, 0x2933L, 0x8A64L, 0x2933L, 9L, (-7L), (-3L)}, {(-7L), 9L, 0x2933L, 0x8A64L, 0x2933L, 9L, (-7L), (-3L)}, {(-7L), 9L, 0x2933L, 0x8A64L, 0x2933L, 9L, (-7L), (-3L)}, {(-7L), 9L, 0x2933L, 0x8A64L, 0x2933L, 9L, (-7L), (-3L)}}; + int i, j; + step_hash(42); + l_95 = ((int)p_77 / (int)((unsigned short)l_78 / (unsigned short)(((signed char)(+((short)((p_77 < (0x4F4D1268L | (g_71 < g_71))) <= g_71) * (short)(((((short)l_78 << (short)l_94) < l_94) & 251UL) || (-3L)))) - (signed char)l_78) && g_4))); + step_hash(43); + l_102[2] |= (((unsigned short)l_95 - (unsigned short)(-(signed char)((((unsigned short)p_77 - (unsigned short)p_77) && ((l_101 == &g_10) >= ((~l_95) < (&g_72 != &p_77)))) != ((g_72 == g_71) & g_4)))) & p_77); + step_hash(53); + if (((signed char)3L << (signed char)5)) + { + unsigned l_115 = 0x81172E91L; + step_hash(45); + ++g_112; + step_hash(46); + l_115 ^= (g_4 & (&l_81 != (void*)0)); + step_hash(47); + return p_77; + } + else + { + int ***l_118 = (void*)0; + int ***l_119 = (void*)0; + step_hash(49); + l_120 = g_116; + step_hash(50); + l_110 &= (p_77 && (((signed char)l_95 << (signed char)6) > p_77)); + step_hash(51); + l_125[5][4] &= (p_77 == ((unsigned short)(l_118 != l_119) << (unsigned short)p_77)); + step_hash(52); + l_105 |= (*g_117); + } + } + step_hash(65); + if ((g_112 || p_77)) + { + step_hash(56); + (*l_120) = (*g_116); + } + else + { + int *l_127 = (void*)0; + step_hash(63); + for (g_108 = 2; (g_108 <= 8); g_108 += 1) + { + step_hash(61); + l_126[6][2] = (**l_120); + step_hash(62); + l_81 = l_127; + } + step_hash(64); + ++g_128; + } + step_hash(66); + for (l_78 = 0; l_78 < 7; l_78 += 1) + { + l_102[l_78] = 0x66L; + } + } + else + { + int *l_131 = &l_111[0]; + int *l_132 = &l_111[0]; + int *l_133 = (void*)0; + int *l_134 = &l_111[0]; + int *l_135 = &l_126[6][2]; + int *l_136 = &l_111[0]; + int *l_137 = (void*)0; + int *l_138 = &l_126[3][6]; + int *l_139 = (void*)0; + int *l_140 = &l_110; + int *l_141 = &l_107; + int *l_142 = &l_105; + int *l_143[8] = {&l_111[0], &l_111[0], &g_72, &l_111[0], &l_111[0], &g_72, &l_111[0], &l_111[0]}; + int i; + step_hash(68); + (*g_116) = l_131; + step_hash(69); + g_144--; + } + step_hash(71); + (*l_120) = (*g_116); + step_hash(72); + return l_111[0]; + } + else + { + unsigned short l_147 = 1UL; + step_hash(74); + (*g_116) = (*g_116); + step_hash(86); + if (l_147) + { + int *l_150 = (void*)0; + int l_151 = 6L; + int *l_152 = &l_151; + int *l_153 = &l_110; + int *l_154[9][5] = {{(void*)0, &l_126[6][6], &g_4, &l_126[6][2], &l_126[6][6]}, {(void*)0, &l_126[6][6], &g_4, &l_126[6][2], &l_126[6][6]}, {(void*)0, &l_126[6][6], &g_4, &l_126[6][2], &l_126[6][6]}, {(void*)0, &l_126[6][6], &g_4, &l_126[6][2], &l_126[6][6]}, {(void*)0, &l_126[6][6], &g_4, &l_126[6][2], &l_126[6][6]}, {(void*)0, &l_126[6][6], &g_4, &l_126[6][2], &l_126[6][6]}, {(void*)0, &l_126[6][6], &g_4, &l_126[6][2], &l_126[6][6]}, {(void*)0, &l_126[6][6], &g_4, &l_126[6][2], &l_126[6][6]}, {(void*)0, &l_126[6][6], &g_4, &l_126[6][2], &l_126[6][6]}}; + int i, j; + step_hash(80); + for (l_110 = (-19); (l_110 <= 15); l_110 += 3) + { + step_hash(79); + return l_126[6][2]; + } + step_hash(81); + (*g_116) = (*g_116); + step_hash(82); + --g_156[0][1]; + step_hash(83); + (*l_152) = ((1UL != ((signed char)(l_147 == l_147) * (signed char)(+p_77))) | p_77); + } + else + { + step_hash(85); + (*g_116) = (void*)0; + } + step_hash(87); + return p_77; + } + } + else + { + unsigned char l_164[8][4] = {{0UL, 248UL, 0x9DL, 0UL}, {0UL, 248UL, 0x9DL, 0UL}, {0UL, 248UL, 0x9DL, 0UL}, {0UL, 248UL, 0x9DL, 0UL}, {0UL, 248UL, 0x9DL, 0UL}, {0UL, 248UL, 0x9DL, 0UL}, {0UL, 248UL, 0x9DL, 0UL}, {0UL, 248UL, 0x9DL, 0UL}}; + int l_174 = 0x8C6D9029L; + int l_176[9][7] = {{0x3766640BL, 0x72261EF3L, 0x3766640BL, 0x04F40C7BL, 1L, (-5L), 1L}, {0x3766640BL, 0x72261EF3L, 0x3766640BL, 0x04F40C7BL, 1L, (-5L), 1L}, {0x3766640BL, 0x72261EF3L, 0x3766640BL, 0x04F40C7BL, 1L, (-5L), 1L}, {0x3766640BL, 0x72261EF3L, 0x3766640BL, 0x04F40C7BL, 1L, (-5L), 1L}, {0x3766640BL, 0x72261EF3L, 0x3766640BL, 0x04F40C7BL, 1L, (-5L), 1L}, {0x3766640BL, 0x72261EF3L, 0x3766640BL, 0x04F40C7BL, 1L, (-5L), 1L}, {0x3766640BL, 0x72261EF3L, 0x3766640BL, 0x04F40C7BL, 1L, (-5L), 1L}, {0x3766640BL, 0x72261EF3L, 0x3766640BL, 0x04F40C7BL, 1L, (-5L), 1L}, {0x3766640BL, 0x72261EF3L, 0x3766640BL, 0x04F40C7BL, 1L, (-5L), 1L}}; + int i, j; + step_hash(176); + if (((0x5C7AE313L | 6UL) <= g_156[0][1])) + { + unsigned char l_168[6]; + int l_175 = 0xC2DF66EBL; + int i; + for (i = 0; i < 6; i++) + l_168[i] = 1UL; + step_hash(122); + if ((1UL != 0UL)) + { + int *l_161 = &l_111[1]; + int *l_162 = &l_111[1]; + int *l_163[8][1] = {{&l_111[0]}, {&l_111[0]}, {&l_111[0]}, {&l_111[0]}, {&l_111[0]}, {&l_111[0]}, {&l_111[0]}, {&l_111[0]}}; + int i, j; + step_hash(92); + l_164[1][2]++; + step_hash(93); + (*l_81) = l_164[1][2]; + step_hash(98); + for (g_72 = 0; (g_72 >= 0); g_72 -= 1) + { + step_hash(97); + return l_164[1][3]; + } + } + else + { + step_hash(115); + for (g_112 = 0; (g_112 <= 1); g_112 += 1) + { + step_hash(107); + for (l_110 = 3; (l_110 >= 0); l_110 -= 1) + { + step_hash(106); + (*g_116) = &p_77; + } + step_hash(108); + if ((*g_117)) + break; + step_hash(114); + for (g_108 = 0; (g_108 <= 1); g_108 += 1) + { + int i, j; + step_hash(112); + (*g_116) = &p_77; + step_hash(113); + l_111[g_112] &= ((g_156[(g_108 + 2)][(g_108 + 7)] != (-1L)) && (0xDEC6L | g_156[0][1])); + } + } + step_hash(120); + if ((*l_81)) + { + int *l_167[2][4]; + int i, j; + for (i = 0; i < 2; i++) + { + for (j = 0; j < 4; j++) + l_167[i][j] = (void*)0; + } + step_hash(117); + (*g_116) = l_167[0][2]; + } + else + { + step_hash(119); + (*l_81) |= (*g_117); + } + step_hash(121); + (*g_116) = &p_77; + } + step_hash(129); + if ((p_77 && (*g_117))) + { + step_hash(124); + l_168[2] &= (*l_81); + } + else + { + int *l_169 = &l_111[0]; + int *l_170 = &l_111[0]; + int *l_171 = &l_111[1]; + int *l_172[2]; + int i; + for (i = 0; i < 2; i++) + l_172[i] = &l_111[0]; + step_hash(126); + g_177--; + step_hash(127); + (*l_81) = ((unsigned char)g_156[0][1] >> (unsigned char)1); + step_hash(128); + (*l_81) |= (**g_116); + } + step_hash(130); + l_174 &= p_77; + } + else + { + int *l_186 = &l_111[0]; + int *l_200 = &l_110; + int l_209 = (-1L); + step_hash(132); + (*l_81) = ((signed char)((signed char)p_77 - (signed char)((*g_116) == l_186)) - (signed char)l_187); + step_hash(175); + if (((l_164[1][2] >= g_173[6][1]) > 0x8CL)) + { + int *l_190 = &g_72; + int *l_191[6] = {&l_176[4][0], &l_111[0], &l_176[4][0], &l_111[0], &l_176[4][0], &l_111[0]}; + int i; + step_hash(138); + for (g_109 = 0; (g_109 <= 8); g_109++) + { + step_hash(137); + return p_77; + } + step_hash(139); + --g_193; + step_hash(150); + if (p_77) + { + step_hash(141); + (*l_190) &= (*l_186); + } + else + { + step_hash(148); + for (g_144 = 17; (g_144 < 17); g_144 += 3) + { + step_hash(146); + (*l_186) ^= ((signed char)g_72 + (signed char)g_173[7][0]); + step_hash(147); + l_200 = l_191[1]; + } + step_hash(149); + (*l_190) = 0x3F6459BDL; + } + step_hash(170); + for (g_177 = 0; (g_177 != 25); g_177++) + { + unsigned l_210 = 0x1ED7C92EL; + step_hash(158); + for (g_192 = 14; (g_192 < 16); ++g_192) + { + int ***l_205 = &g_116; + step_hash(157); + (*l_190) = (65535UL ^ ((l_205 != (void*)0) ^ 0x7FL)); + } + step_hash(163); + if ((l_191[1] == (*g_116))) + { + step_hash(160); + if (p_77) + break; + } + else + { + step_hash(162); + l_200 = &l_176[4][0]; + } + step_hash(168); + for (g_155 = 19; (g_155 >= 4); g_155 -= 3) + { + int l_208[8][4] = {{(-1L), (-1L), 0xD9FB2421L, 0x7C0DB931L}, {(-1L), (-1L), 0xD9FB2421L, 0x7C0DB931L}, {(-1L), (-1L), 0xD9FB2421L, 0x7C0DB931L}, {(-1L), (-1L), 0xD9FB2421L, 0x7C0DB931L}, {(-1L), (-1L), 0xD9FB2421L, 0x7C0DB931L}, {(-1L), (-1L), 0xD9FB2421L, 0x7C0DB931L}, {(-1L), (-1L), 0xD9FB2421L, 0x7C0DB931L}, {(-1L), (-1L), 0xD9FB2421L, 0x7C0DB931L}}; + int i, j; + step_hash(167); + return l_208[4][0]; + } + step_hash(169); + l_210++; + } + } + else + { + int ***l_215 = &g_116; + step_hash(172); + (*l_81) |= (((signed char)((void*)0 == &l_81) << (signed char)7) < (g_71 ^ (+0x67L))); + step_hash(173); + (*l_81) = (l_215 != (void*)0); + step_hash(174); + return p_77; + } + } + step_hash(208); + for (p_77 = 0; (p_77 <= 3); p_77 += 1) + { + unsigned short l_228 = 65530UL; + int **l_231 = &l_81; + step_hash(180); + (*g_116) = (*g_116); + step_hash(207); + for (g_177 = 0; (g_177 <= 3); g_177 += 1) + { + int *l_216 = &l_111[0]; + int l_225 = (-1L); + step_hash(184); + (*g_116) = l_216; + step_hash(204); + for (g_109 = 1; (g_109 >= 0); g_109 -= 1) + { + unsigned l_229 = 4UL; + int i, j; + step_hash(188); + (*g_116) = (*g_116); + step_hash(189); + (*l_81) &= (((unsigned short)((signed char)((unsigned short)((signed char)(2UL | g_156[p_77][(g_177 + 5)]) << (signed char)g_156[0][1]) << (unsigned short)((l_225 > g_144) < (*l_216))) % (signed char)((&g_117 == &l_81) || ((short)p_77 * (short)8L))) * (unsigned short)l_228) < l_229); + step_hash(196); + for (l_225 = 3; (l_225 >= 0); l_225 -= 1) + { + int l_230 = 0xB967A072L; + int ***l_232 = &l_231; + int i, j; + step_hash(193); + l_111[g_109] ^= g_173[(p_77 + 2)][g_109]; + step_hash(194); + l_111[g_109] ^= ((l_164[0][1] && l_230) >= p_77); + step_hash(195); + (*l_232) = l_231; + } + step_hash(203); + for (l_229 = 0; (l_229 <= 1); l_229 += 1) + { + int i; + step_hash(200); + (*l_81) = (&g_116 != &g_116); + step_hash(201); + (*l_81) &= ((unsigned short)l_111[g_109] - (unsigned short)(((unsigned short)p_77 << (unsigned short)((((short)(l_239 != &l_216) << (short)4) <= l_111[g_109]) && ((signed char)p_77 << (signed char)((signed char)g_10 << (signed char)3)))) | (-8L))); + step_hash(202); + (*l_239) = l_216; + } + } + step_hash(205); + (**g_116) = (**g_116); + step_hash(206); + (*l_81) |= ((unsigned char)(**l_239) - (unsigned char)0x25L); + } + } + step_hash(209); + (*l_239) = &l_176[4][0]; + } + step_hash(404); + if ((((signed char)(&g_71 == (void*)0) * (signed char)((1L | g_109) && ((*l_81) <= p_77))) < p_77)) + { + signed char l_251 = 0xE0L; + int l_266 = 0x03686385L; + step_hash(268); + for (g_193 = 0; (g_193 <= 1); g_193 += 1) + { + int ***l_263 = &l_239; + int l_298 = (-5L); + step_hash(255); + for (l_187 = 0; (l_187 <= 1); l_187 += 1) + { + int ***l_252 = &l_239; + int l_280 = 1L; + int i, j; + step_hash(241); + if (((unsigned)(-(short)g_173[(g_193 + 7)][g_193]) / (unsigned)p_77)) + { + step_hash(219); + if (l_251) + break; + step_hash(224); + for (g_192 = 0; (g_192 <= 3); g_192 += 1) + { + int i, j; + step_hash(223); + (*l_81) = (g_156[g_192][(g_192 + 5)] ^ g_173[(g_192 + 1)][l_187]); + } + } + else + { + unsigned short l_260 = 65535UL; + int **l_269 = (void*)0; + step_hash(232); + if ((&g_116 != l_252)) + { + step_hash(227); + return l_251; + } + else + { + int *l_253 = &l_111[0]; + int *l_254 = &l_111[0]; + int *l_255 = &g_72; + int *l_256 = &l_111[0]; + int *l_257 = &l_111[0]; + int *l_258 = (void*)0; + int *l_259[7][10] = {{(void*)0, &g_10, &l_111[0], &l_110, &g_72, &l_110, &g_72, &l_110, &l_111[0], &g_10}, {(void*)0, &g_10, &l_111[0], &l_110, &g_72, &l_110, &g_72, &l_110, &l_111[0], &g_10}, {(void*)0, &g_10, &l_111[0], &l_110, &g_72, &l_110, &g_72, &l_110, &l_111[0], &g_10}, {(void*)0, &g_10, &l_111[0], &l_110, &g_72, &l_110, &g_72, &l_110, &l_111[0], &g_10}, {(void*)0, &g_10, &l_111[0], &l_110, &g_72, &l_110, &g_72, &l_110, &l_111[0], &g_10}, {(void*)0, &g_10, &l_111[0], &l_110, &g_72, &l_110, &g_72, &l_110, &l_111[0], &g_10}, {(void*)0, &g_10, &l_111[0], &l_110, &g_72, &l_110, &g_72, &l_110, &l_111[0], &g_10}}; + int i, j; + step_hash(229); + --l_260; + step_hash(230); + (*l_257) = ((void*)0 != l_263); + step_hash(231); + l_266 |= (((signed char)0x44L * (signed char)g_173[6][1]) & g_155); + } + step_hash(240); + if (((unsigned short)(0x96L >= (l_251 > g_177)) - (unsigned short)((void*)0 == l_269))) + { + step_hash(234); + (*l_239) = &g_71; + step_hash(235); + return p_77; + } + else + { + step_hash(237); + (**l_252) = &p_77; + step_hash(238); + (*g_117) = (***l_263); + step_hash(239); + return p_77; + } + } + step_hash(254); + for (l_251 = 1; (l_251 >= 0); l_251 -= 1) + { + int l_293 = 0x350D1A62L; + step_hash(253); + if (((signed char)(((short)(&g_116 == l_263) << (short)10) || (&p_77 != &p_77)) - (signed char)((g_144 == (((unsigned short)g_173[4][0] + (unsigned short)((int)p_77 / (int)(((void*)0 != &p_77) || g_193))) != l_280)) < p_77))) + { + int l_281 = 0x1D8A302AL; + int *l_282 = &l_111[1]; + int *l_283 = (void*)0; + int *l_284[6][7]; + int i, j; + for (i = 0; i < 6; i++) + { + for (j = 0; j < 7; j++) + l_284[i][j] = &g_72; + } + step_hash(246); + g_285++; + step_hash(247); + (*l_81) ^= ((g_112 & ((-(int)(((((signed char)p_77 + (signed char)g_177) | (((unsigned)(*l_282) + (unsigned)(g_109 && (((5UL <= ((void*)0 == l_284[5][2])) && p_77) == g_108))) | g_144)) ^ g_10) && 0xD852L)) >= l_266)) >= p_77); + step_hash(248); + --g_294; + step_hash(249); + return p_77; + } + else + { + unsigned l_297 = 0xB85E74F0L; + step_hash(251); + l_298 = l_297; + step_hash(252); + (*l_81) = ((unsigned char)p_77 * (unsigned char)((unsigned short)(+p_77) >> (unsigned short)12)); + } + } + } + step_hash(260); + for (g_294 = 0; (g_294 <= 1); g_294 += 1) + { + step_hash(259); + return g_173[7][1]; + } + step_hash(261); + p_77 |= l_251; + step_hash(262); + if (l_251) + continue; + step_hash(267); + for (g_144 = 0; (g_144 <= 1); g_144 += 1) + { + step_hash(266); + (*l_81) = p_77; + } + } + } + else + { + unsigned char l_310 = 1UL; + int l_329 = 0xF25A9B19L; + int ***l_370 = &g_116; + int l_376 = 0x64786584L; + int l_378[2][7] = {{0xAB695C8EL, 0xB7B668EEL, 0xDAAFBBF8L, 0xDAAFBBF8L, 0xB7B668EEL, 0xAB695C8EL, 0xB7B668EEL}, {0xAB695C8EL, 0xB7B668EEL, 0xDAAFBBF8L, 0xDAAFBBF8L, 0xB7B668EEL, 0xAB695C8EL, 0xB7B668EEL}}; + unsigned l_410 = 3UL; + int i, j; + step_hash(282); + for (g_112 = 0; (g_112 > 25); g_112 += 1) + { + step_hash(281); + for (g_128 = 0; (g_128 <= 54); g_128 += 7) + { + step_hash(280); + for (g_155 = 1; (g_155 >= 0); g_155 -= 1) + { + step_hash(279); + (*l_239) = &p_77; + } + } + } + step_hash(283); + (*l_81) |= ((short)(l_309 == 0UL) << (short)12); + step_hash(403); + if (l_310) + { + short l_321 = 0xFE96L; + short l_322[8] = {0xCB8CL, 0xCB8CL, 0x1A3AL, 0xCB8CL, 0xCB8CL, 0x1A3AL, 0xCB8CL, 0xCB8CL}; + int l_358 = 0xE0134C85L; + int i; + step_hash(291); + if (((unsigned short)((signed char)((((signed char)((unsigned char)((0L && (g_173[4][0] <= (((p_77 && 0x438DL) < (p_77 | (+g_173[4][0]))) ^ (*l_81)))) >= ((signed char)(0x3F08L >= ((&g_117 != (void*)0) > l_321)) >> (signed char)l_322[0])) - (unsigned char)g_71) * (signed char)0L) != p_77) != g_128) * (signed char)1L) >> (unsigned short)p_77)) + { + int l_323 = 0xD2656983L; + step_hash(286); + (*g_116) = (void*)0; + step_hash(287); + (*l_81) &= l_323; + } + else + { + step_hash(289); + (*l_81) = l_324; + step_hash(290); + return g_155; + } + step_hash(308); + if (p_77) + { + unsigned short l_335 = 0x0142L; + step_hash(303); + for (g_144 = 0; (g_144 != 16); g_144++) + { + step_hash(296); + (*g_116) = &p_77; + step_hash(301); + for (g_155 = 0; (g_155 >= 25); ++g_155) + { + int *l_330 = &g_72; + int *l_331 = &l_329; + int *l_332 = &l_110; + int *l_333 = &g_72; + int *l_334 = &l_111[0]; + step_hash(300); + --l_335; + } + step_hash(302); + (*l_81) &= (p_77 | 0x3D60B044L); + } + } + else + { + int *l_338 = &l_111[0]; + int *l_339 = &l_309; + int *l_340 = &l_111[0]; + int *l_341 = (void*)0; + int *l_342 = &l_111[0]; + int *l_344[4][3] = {{&l_329, &l_329, &g_71}, {&l_329, &l_329, &g_71}, {&l_329, &l_329, &g_71}, {&l_329, &l_329, &g_71}}; + int i, j; + step_hash(305); + (*l_81) = p_77; + step_hash(306); + (*g_116) = &p_77; + step_hash(307); + --g_346[5]; + } + step_hash(331); + if (l_322[1]) + { + step_hash(310); + return g_285; + } + else + { + unsigned l_351 = 4294967295UL; + step_hash(312); + (*l_81) ^= l_310; + step_hash(325); + for (g_109 = 28; (g_109 >= 15); g_109 -= 9) + { + step_hash(324); + if (p_77) + { + int *l_354[1][6] = {{(void*)0, (void*)0, (void*)0, (void*)0, (void*)0, (void*)0}}; + int i, j; + step_hash(317); + (*l_81) |= (&l_81 == (void*)0); + step_hash(318); + (*l_239) = (*g_116); + step_hash(319); + --l_351; + step_hash(320); + l_354[0][4] = (void*)0; + } + else + { + int *l_355 = &l_309; + int *l_356 = &l_111[0]; + int *l_357 = (void*)0; + int *l_359 = &l_111[0]; + int *l_360 = &l_358; + int *l_361 = &l_110; + step_hash(322); + ++g_362; + step_hash(323); + (*g_116) = (*g_116); + } + } + step_hash(330); + for (g_345 = (-2); (g_345 <= (-5)); g_345--) + { + unsigned short l_369 = 65531UL; + step_hash(329); + l_369 &= (g_345 && ((signed char)(0xB7L < (p_77 > (p_77 ^ g_192))) * (signed char)(!0x99L))); + } + } + step_hash(362); + for (g_128 = 0; (g_128 <= 7); g_128 += 1) + { + unsigned l_373 = 0x9F8442B3L; + int l_377[9] = {0xAD1BEC33L, 0xAD1BEC33L, (-6L), 0xAD1BEC33L, 0xAD1BEC33L, (-6L), 0xAD1BEC33L, 0xAD1BEC33L, (-6L)}; + int ***l_394[9][2] = {{&l_239, (void*)0}, {&l_239, (void*)0}, {&l_239, (void*)0}, {&l_239, (void*)0}, {&l_239, (void*)0}, {&l_239, (void*)0}, {&l_239, (void*)0}, {&l_239, (void*)0}, {&l_239, (void*)0}}; + int i, j; + step_hash(335); + p_77 = (~l_329); + step_hash(340); + for (l_324 = 3; (l_324 >= 0); l_324 -= 1) + { + int l_374 = 0x25295300L; + int i, j; + step_hash(339); + l_374 |= ((((void*)0 != l_370) || (((unsigned short)g_156[l_324][g_128] * (unsigned short)l_373) == (p_77 == l_373))) | g_112); + } + step_hash(356); + for (g_112 = 0; (g_112 <= 7); g_112 += 1) + { + int *l_375[8] = {(void*)0, &l_111[0], (void*)0, &l_111[0], (void*)0, &l_111[0], (void*)0, &l_111[0]}; + int i; + step_hash(344); + --g_379; + step_hash(345); + (*g_116) = &p_77; + step_hash(346); + (***l_370) ^= (l_377[0] == (&g_117 == &l_81)); + step_hash(355); + if (g_382) + { + step_hash(348); + if (p_77) + break; + step_hash(349); + (**l_239) = (-8L); + } + else + { + int *l_383 = &l_378[0][1]; + step_hash(351); + (*g_116) = l_383; + step_hash(352); + (*g_117) = ((int)0x8F5D8F84L - (int)(p_77 ^ l_373)); + step_hash(353); + (**l_370) = &l_358; + step_hash(354); + (***l_370) = ((((void*)0 != &g_117) != (((signed char)(-1L) >> (signed char)(l_377[0] | (p_77 > ((signed char)(-4L) << (signed char)5)))) && (((unsigned char)((short)((void*)0 == l_394[7][1]) << (short)((unsigned char)((short)((int)(((unsigned short)((unsigned char)(((signed char)(&l_239 != (void*)0) - (signed char)g_382) >= g_193) << (unsigned char)4) + (unsigned short)g_156[0][1]) & g_173[2][1]) / (int)p_77) + (short)0x9B88L) + (unsigned char)0xE3L)) * (unsigned char)(*l_81)) > p_77))) & 0x96L); + } + } + step_hash(361); + for (g_285 = 0; (g_285 <= 7); g_285 += 1) + { + int *l_407[6][3] = {{&l_110, &l_110, (void*)0}, {&l_110, &l_110, (void*)0}, {&l_110, &l_110, (void*)0}, {&l_110, &l_110, (void*)0}, {&l_110, &l_110, (void*)0}, {&l_110, &l_110, (void*)0}}; + int i, j; + step_hash(360); + (*l_239) = l_407[0][1]; + } + } + } + else + { + step_hash(369); + for (p_77 = (-1); (p_77 == 28); p_77 += 9) + { + step_hash(367); + (*l_239) = &p_77; + step_hash(368); + return g_285; + } + step_hash(370); + (*g_116) = &p_77; + step_hash(402); + if ((*g_117)) + { + step_hash(372); + (*g_117) = l_410; + } + else + { + int **l_413 = &g_117; + step_hash(387); + for (g_144 = 0; (g_144 > 37); g_144 += 3) + { + int l_430 = 9L; + int l_431 = (-1L); + step_hash(386); + if ((&g_117 != l_413)) + { + step_hash(378); + if ((*g_117)) + break; + step_hash(379); + (**l_370) = (*g_116); + step_hash(380); + (*g_117) = 1L; + } + else + { + short l_414 = (-1L); + int *l_415 = &l_378[1][5]; + step_hash(382); + ++g_416; + step_hash(383); + (*g_117) = ((signed char)((short)(g_155 <= (((unsigned char)(((unsigned short)((((unsigned char)((void*)0 != (*l_370)) >> (unsigned char)0) ^ (((-(unsigned char)0xE4L) < p_77) && p_77)) & p_77) << (unsigned short)9) >= (*g_117)) + (unsigned char)(l_430 == (**l_413))) <= (***l_370))) - (short)0L) - (signed char)g_156[1][8]); + step_hash(384); + l_431 &= (**g_116); + step_hash(385); + (***l_370) ^= ((*g_116) != &p_77); + } + } + step_hash(400); + for (l_110 = 1; (l_110 >= 0); l_110 -= 1) + { + int i; + step_hash(391); + if (l_111[l_110]) + break; + step_hash(399); + for (g_108 = 1; (g_108 >= 0); g_108 -= 1) + { + int i, j; + step_hash(395); + l_378[l_110][(l_110 + 1)] = ((unsigned short)(l_378[g_108][l_110] | l_378[l_110][(l_110 + 4)]) >> (unsigned short)p_77); + step_hash(396); + (*l_413) = &p_77; + step_hash(397); + l_111[l_110] = ((l_111[l_110] >= ((unsigned char)p_77 % (unsigned char)p_77)) != p_77); + step_hash(398); + (*g_117) = (-1L); + } + } + step_hash(401); + l_329 |= ((unsigned char)((*l_81) > (65535UL ^ g_346[6])) * (unsigned char)(p_77 < (p_77 | ((unsigned char)(0x1C13L < ((void*)0 != &g_117)) << (unsigned char)(((short)((*l_370) != &g_117) * (short)(***l_370)) != g_109))))); + } + } + } + step_hash(405); + (*l_81) = (1L < (0L | 0x22L)); + step_hash(406); + return g_108; +} + + +void csmith_compute_hash(void) +{ + int i, j; + transparent_crc(g_4, "g_4", print_hash_value); + transparent_crc(g_10, "g_10", print_hash_value); + transparent_crc(g_71, "g_71", print_hash_value); + transparent_crc(g_72, "g_72", print_hash_value); + transparent_crc(g_108, "g_108", print_hash_value); + transparent_crc(g_109, "g_109", print_hash_value); + transparent_crc(g_112, "g_112", print_hash_value); + transparent_crc(g_128, "g_128", print_hash_value); + transparent_crc(g_144, "g_144", print_hash_value); + transparent_crc(g_155, "g_155", print_hash_value); + for (i = 0; i < 4; i++) + { + for (j = 0; j < 9; j++) + { + transparent_crc(g_156[i][j], "g_156[i][j]", print_hash_value); + if (print_hash_value) printf("index = [%d][%d]\n", i, j); + + } + } + for (i = 0; i < 9; i++) + { + for (j = 0; j < 2; j++) + { + transparent_crc(g_173[i][j], "g_173[i][j]", print_hash_value); + if (print_hash_value) printf("index = [%d][%d]\n", i, j); + + } + } + transparent_crc(g_177, "g_177", print_hash_value); + transparent_crc(g_192, "g_192", print_hash_value); + transparent_crc(g_193, "g_193", print_hash_value); + transparent_crc(g_285, "g_285", print_hash_value); + transparent_crc(g_294, "g_294", print_hash_value); + transparent_crc(g_343, "g_343", print_hash_value); + transparent_crc(g_345, "g_345", print_hash_value); + for (i = 0; i < 9; i++) + { + transparent_crc(g_346[i], "g_346[i]", print_hash_value); + if (print_hash_value) printf("index = [%d]\n", i); + + } + transparent_crc(g_362, "g_362", print_hash_value); + transparent_crc(g_379, "g_379", print_hash_value); + transparent_crc(g_382, "g_382", print_hash_value); + transparent_crc(g_416, "g_416", print_hash_value); + transparent_crc(g_445, "g_445", print_hash_value); + transparent_crc(g_495, "g_495", print_hash_value); + for (i = 0; i < 4; i++) + { + transparent_crc(g_499[i], "g_499[i]", print_hash_value); + if (print_hash_value) printf("index = [%d]\n", i); + + } + for (i = 0; i < 6; i++) + { + transparent_crc(g_506[i], "g_506[i]", print_hash_value); + if (print_hash_value) printf("index = [%d]\n", i); + + } + transparent_crc(g_538, "g_538", print_hash_value); + transparent_crc(g_553, "g_553", print_hash_value); + transparent_crc(g_587, "g_587", print_hash_value); + transparent_crc(g_589, "g_589", print_hash_value); + transparent_crc(g_592, "g_592", print_hash_value); + transparent_crc(g_595, "g_595", print_hash_value); + for (i = 0; i < 9; i++) + { + for (j = 0; j < 5; j++) + { + transparent_crc(g_609[i][j], "g_609[i][j]", print_hash_value); + if (print_hash_value) printf("index = [%d][%d]\n", i, j); + + } + } + transparent_crc(g_610, "g_610", print_hash_value); + for (i = 0; i < 5; i++) + { + transparent_crc(g_611[i], "g_611[i]", print_hash_value); + if (print_hash_value) printf("index = [%d]\n", i); + + } + for (i = 0; i < 8; i++) + { + transparent_crc(g_619[i], "g_619[i]", print_hash_value); + if (print_hash_value) printf("index = [%d]\n", i); + + } + transparent_crc(g_620, "g_620", print_hash_value); + transparent_crc(g_622, "g_622", print_hash_value); + transparent_crc(g_659, "g_659", print_hash_value); + transparent_crc(g_797, "g_797", print_hash_value); +} + +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} + + + +int main (void) +{ + int i, j; + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand95.expect b/src/tests/csmith/rand95.expect new file mode 100644 index 0000000..05adef8 --- /dev/null +++ b/src/tests/csmith/rand95.expect @@ -0,0 +1,2970 @@ +...checksum after hashing g_4 : 37241700 +...checksum after hashing g_10 : 3ADA2B64 +...checksum after hashing g_71 : 73B04752 +...checksum after hashing g_72 : 917545B +...checksum after hashing g_108 : 2AA2EDE1 +...checksum after hashing g_109 : A937AD0F +...checksum after hashing g_112 : 978ABA01 +...checksum after hashing g_128 : 8EB83B1B +...checksum after hashing g_144 : C8E3BD78 +...checksum after hashing g_155 : D6E331C9 +...checksum after hashing g_156[i][j] : E8012C5C +index = [0][0] +...checksum after hashing g_156[i][j] : DB48812C +index = [0][1] +...checksum after hashing g_156[i][j] : FFBC7AD9 +index = [0][2] +...checksum after hashing g_156[i][j] : BB46C015 +index = [0][3] +...checksum after hashing g_156[i][j] : D0F666D3 +index = [0][4] +...checksum after hashing g_156[i][j] : 6080E0B3 +index = [0][5] +...checksum after hashing g_156[i][j] : C1A1D7E +index = [0][6] +...checksum after hashing g_156[i][j] : FA8B84C5 +index = [0][7] +...checksum after hashing g_156[i][j] : FEBE2253 +index = [0][8] +...checksum after hashing g_156[i][j] : 1E3CBB56 +index = [1][0] +...checksum after hashing g_156[i][j] : 729FD0AA +index = [1][1] +...checksum after hashing g_156[i][j] : 3B839F2D +index = [1][2] +...checksum after hashing g_156[i][j] : D9BC7F3B +index = [1][3] +...checksum after hashing g_156[i][j] : 13F60EB0 +index = [1][4] +...checksum after hashing g_156[i][j] : DBAB1CC +index = [1][5] +...checksum after hashing g_156[i][j] : 44922AAF +index = [1][6] +...checksum after hashing g_156[i][j] : CE1A72CD +index = [1][7] +...checksum after hashing g_156[i][j] : C3AD4A30 +index = [1][8] +...checksum after hashing g_156[i][j] : 48EC74A0 +index = [2][0] +...checksum after hashing g_156[i][j] : 48517972 +index = [2][1] +...checksum after hashing g_156[i][j] : 9DBF4BC6 +index = [2][2] +...checksum after hashing g_156[i][j] : 1E045BCC +index = [2][3] +...checksum after hashing g_156[i][j] : 1E1FBD31 +index = [2][4] +...checksum after hashing g_156[i][j] : 6E4A14C3 +index = [2][5] +...checksum after hashing g_156[i][j] : 345742D +index = [2][6] +...checksum after hashing g_156[i][j] : C9A9882C +index = [2][7] +...checksum after hashing g_156[i][j] : 44B1F2B3 +index = [2][8] +...checksum after hashing g_156[i][j] : E9E68903 +index = [3][0] +...checksum after hashing g_156[i][j] : F1AD54EE +index = [3][1] +...checksum after hashing g_156[i][j] : 500865F0 +index = [3][2] +...checksum after hashing g_156[i][j] : B7C61129 +index = [3][3] +...checksum after hashing g_156[i][j] : D475AAAD +index = [3][4] +...checksum after hashing g_156[i][j] : 641657A9 +index = [3][5] +...checksum after hashing g_156[i][j] : D3D9AB95 +index = [3][6] +...checksum after hashing g_156[i][j] : CC9D8B96 +index = [3][7] +...checksum after hashing g_156[i][j] : FF78E56C +index = [3][8] +...checksum after hashing g_173[i][j] : 8DC5FEFA +index = [0][0] +...checksum after hashing g_173[i][j] : 15A24567 +index = [0][1] +...checksum after hashing g_173[i][j] : B8B40268 +index = [1][0] +...checksum after hashing g_173[i][j] : DEA26A68 +index = [1][1] +...checksum after hashing g_173[i][j] : DF7008DB +index = [2][0] +...checksum after hashing g_173[i][j] : A0B2E87B +index = [2][1] +...checksum after hashing g_173[i][j] : 8212712E +index = [3][0] +...checksum after hashing g_173[i][j] : 83B795D +index = [3][1] +...checksum after hashing g_173[i][j] : C9D65BD3 +index = [4][0] +...checksum after hashing g_173[i][j] : 775FE43 +index = [4][1] +...checksum after hashing g_173[i][j] : 632F0960 +index = [5][0] +...checksum after hashing g_173[i][j] : 94F7F5EB +index = [5][1] +...checksum after hashing g_173[i][j] : 8716EF5C +index = [6][0] +...checksum after hashing g_173[i][j] : 2A86B53B +index = [6][1] +...checksum after hashing g_173[i][j] : CB250D39 +index = [7][0] +...checksum after hashing g_173[i][j] : 719DE4F +index = [7][1] +...checksum after hashing g_173[i][j] : D8FCD493 +index = [8][0] +...checksum after hashing g_173[i][j] : 73D31619 +index = [8][1] +...checksum after hashing g_177 : 8C37D1AE +...checksum after hashing g_192 : 37DE9948 +...checksum after hashing g_193 : 929C064A +...checksum after hashing g_285 : 12952C89 +...checksum after hashing g_294 : 7FCD963E +...checksum after hashing g_343 : F2C998DE +...checksum after hashing g_345 : 4824A814 +...checksum after hashing g_346[i] : A0BB3B08 +index = [0] +...checksum after hashing g_346[i] : 924BBE4E +index = [1] +...checksum after hashing g_346[i] : 98C347AE +index = [2] +...checksum after hashing g_346[i] : 684422C3 +index = [3] +...checksum after hashing g_346[i] : A9096F11 +index = [4] +...checksum after hashing g_346[i] : 7BC054A9 +index = [5] +...checksum after hashing g_346[i] : 76BF7005 +index = [6] +...checksum after hashing g_346[i] : 1732B657 +index = [7] +...checksum after hashing g_346[i] : D8EEBB13 +index = [8] +...checksum after hashing g_362 : C77DEDC4 +...checksum after hashing g_379 : 1B43CEA9 +...checksum after hashing g_382 : C992481D +...checksum after hashing g_416 : DA8A91E +...checksum after hashing g_445 : 9AF0FBEC +...checksum after hashing g_495 : 51C391FE +...checksum after hashing g_499[i] : FB81A8B9 +index = [0] +...checksum after hashing g_499[i] : 22B47153 +index = [1] +...checksum after hashing g_499[i] : 44107676 +index = [2] +...checksum after hashing g_499[i] : B809827F +index = [3] +...checksum after hashing g_506[i] : 3A6A002C +index = [0] +...checksum after hashing g_506[i] : 4C05B5E6 +index = [1] +...checksum after hashing g_506[i] : F30773CE +index = [2] +...checksum after hashing g_506[i] : 542F85A2 +index = [3] +...checksum after hashing g_506[i] : 81795A9A +index = [4] +...checksum after hashing g_506[i] : 160F7380 +index = [5] +...checksum after hashing g_538 : 8FE15136 +...checksum after hashing g_553 : F2C1D74E +...checksum after hashing g_587 : 143D17B +...checksum after hashing g_589 : 7FD288C6 +...checksum after hashing g_592 : 62AD9EDC +...checksum after hashing g_595 : DCE5AEF4 +...checksum after hashing g_609[i][j] : C9AEF31 +index = [0][0] +...checksum after hashing g_609[i][j] : C6176EA9 +index = [0][1] +...checksum after hashing g_609[i][j] : FA51AC49 +index = [0][2] +...checksum after hashing g_609[i][j] : 1AC4E547 +index = [0][3] +...checksum after hashing g_609[i][j] : 4E16600 +index = [0][4] +...checksum after hashing g_609[i][j] : 764636DB +index = [1][0] +...checksum after hashing g_609[i][j] : 60D0D37B +index = [1][1] +...checksum after hashing g_609[i][j] : 84F74C +index = [1][2] +...checksum after hashing g_609[i][j] : ECD4FE7C +index = [1][3] +...checksum after hashing g_609[i][j] : 2DA41049 +index = [1][4] +...checksum after hashing g_609[i][j] : F9A16A2 +index = [2][0] +...checksum after hashing g_609[i][j] : 4AFE3906 +index = [2][1] +...checksum after hashing g_609[i][j] : ED181A81 +index = [2][2] +...checksum after hashing g_609[i][j] : CA86D087 +index = [2][3] +...checksum after hashing g_609[i][j] : 1490502E +index = [2][4] +...checksum after hashing g_609[i][j] : 3DDE2F27 +index = [3][0] +...checksum after hashing g_609[i][j] : E7017A91 +index = [3][1] +...checksum after hashing g_609[i][j] : 8410D222 +index = [3][2] +...checksum after hashing g_609[i][j] : F653F260 +index = [3][3] +...checksum after hashing g_609[i][j] : B7D1F6FC +index = [3][4] +...checksum after hashing g_609[i][j] : CACBF3F1 +index = [4][0] +...checksum after hashing g_609[i][j] : 74C1D12B +index = [4][1] +...checksum after hashing g_609[i][j] : 810EDBED +index = [4][2] +...checksum after hashing g_609[i][j] : 7387FCEF +index = [4][3] +...checksum after hashing g_609[i][j] : 70F30A2F +index = [4][4] +...checksum after hashing g_609[i][j] : E0467E01 +index = [5][0] +...checksum after hashing g_609[i][j] : 4EDC608F +index = [5][1] +...checksum after hashing g_609[i][j] : BEFB7436 +index = [5][2] +...checksum after hashing g_609[i][j] : 8F5BE0EF +index = [5][3] +...checksum after hashing g_609[i][j] : FC49641F +index = [5][4] +...checksum after hashing g_609[i][j] : A800E9B3 +index = [6][0] +...checksum after hashing g_609[i][j] : DFDF69CA +index = [6][1] +...checksum after hashing g_609[i][j] : B1C517A7 +index = [6][2] +...checksum after hashing g_609[i][j] : 114C15BB +index = [6][3] +...checksum after hashing g_609[i][j] : 191D7704 +index = [6][4] +...checksum after hashing g_609[i][j] : 3FCFAAA3 +index = [7][0] +...checksum after hashing g_609[i][j] : DF13C0AA +index = [7][1] +...checksum after hashing g_609[i][j] : 3B051E09 +index = [7][2] +...checksum after hashing g_609[i][j] : 75BEFD72 +index = [7][3] +...checksum after hashing g_609[i][j] : D9FC71EE +index = [7][4] +...checksum after hashing g_609[i][j] : 5E817750 +index = [8][0] +...checksum after hashing g_609[i][j] : 9ADEECC5 +index = [8][1] +...checksum after hashing g_609[i][j] : 11F55AC4 +index = [8][2] +...checksum after hashing g_609[i][j] : 490DC6DE +index = [8][3] +...checksum after hashing g_609[i][j] : 16F85CDE +index = [8][4] +...checksum after hashing g_610 : 67F9F3F4 +...checksum after hashing g_611[i] : CA062530 +index = [0] +...checksum after hashing g_611[i] : 816E37C4 +index = [1] +...checksum after hashing g_611[i] : DBE2B89D +index = [2] +...checksum after hashing g_611[i] : 9B06CBA5 +index = [3] +...checksum after hashing g_611[i] : B4E0BA9A +index = [4] +...checksum after hashing g_619[i] : 16625113 +index = [0] +...checksum after hashing g_619[i] : 12E9AFEE +index = [1] +...checksum after hashing g_619[i] : 6A5BAD7 +index = [2] +...checksum after hashing g_619[i] : D77DB813 +index = [3] +...checksum after hashing g_619[i] : 95E3B879 +index = [4] +...checksum after hashing g_619[i] : B6682836 +index = [5] +...checksum after hashing g_619[i] : F21CE85F +index = [6] +...checksum after hashing g_619[i] : 1F7FFFED +index = [7] +...checksum after hashing g_620 : BB0D4504 +...checksum after hashing g_622 : 852E737D +...checksum after hashing g_659 : 6AC6A039 +...checksum after hashing g_797 : AE5CC24F +before stmt(1): checksum = AE5CC24F +...checksum after hashing g_4 : 731394B5 +...checksum after hashing g_10 : 12B315A8 +...checksum after hashing g_71 : E054A662 +...checksum after hashing g_72 : 208E27B +...checksum after hashing g_108 : 11CB176B +...checksum after hashing g_109 : 96B4349C +...checksum after hashing g_112 : 6C759181 +...checksum after hashing g_128 : EEB2F2C7 +...checksum after hashing g_144 : 8D429F44 +...checksum after hashing g_155 : E67DDCE9 +...checksum after hashing g_156[i][j] : 201257A9 +index = [0][0] +...checksum after hashing g_156[i][j] : C604EB18 +index = [0][1] +...checksum after hashing g_156[i][j] : FA7F3709 +index = [0][2] +...checksum after hashing g_156[i][j] : 75ED171D +index = [0][3] +...checksum after hashing g_156[i][j] : ACABE71C +index = [0][4] +...checksum after hashing g_156[i][j] : F8FF715A +index = [0][5] +...checksum after hashing g_156[i][j] : DCFBF44 +index = [0][6] +...checksum after hashing g_156[i][j] : 34A914C2 +index = [0][7] +...checksum after hashing g_156[i][j] : 45140B8D +index = [0][8] +...checksum after hashing g_156[i][j] : E77036F4 +index = [1][0] +...checksum after hashing g_156[i][j] : E4BDC346 +index = [1][1] +...checksum after hashing g_156[i][j] : 7940CD5 +index = [1][2] +...checksum after hashing g_156[i][j] : 4FD7BFCB +index = [1][3] +...checksum after hashing g_156[i][j] : 9B5A0A4A +index = [1][4] +...checksum after hashing g_156[i][j] : 2B91724 +index = [1][5] +...checksum after hashing g_156[i][j] : 313E2CF8 +index = [1][6] +...checksum after hashing g_156[i][j] : BE904F32 +index = [1][7] +...checksum after hashing g_156[i][j] : A0723BFF +index = [1][8] +...checksum after hashing g_156[i][j] : E1EA61A5 +index = [2][0] +...checksum after hashing g_156[i][j] : 9C325411 +index = [2][1] +...checksum after hashing g_156[i][j] : 4BD7E831 +index = [2][2] +...checksum after hashing g_156[i][j] : 1C1F00A5 +index = [2][3] +...checksum after hashing g_156[i][j] : 7FE06E5F +index = [2][4] +...checksum after hashing g_156[i][j] : 93EDB326 +index = [2][5] +...checksum after hashing g_156[i][j] : 1C992A4D +index = [2][6] +...checksum after hashing g_156[i][j] : 3428FB73 +index = [2][7] +...checksum after hashing g_156[i][j] : 60FC1CE5 +index = [2][8] +...checksum after hashing g_156[i][j] : DD28F14E +index = [3][0] +...checksum after hashing g_156[i][j] : B6FCE393 +index = [3][1] +...checksum after hashing g_156[i][j] : 42544D02 +index = [3][2] +...checksum after hashing g_156[i][j] : 4840BB4D +index = [3][3] +...checksum after hashing g_156[i][j] : F405C20F +index = [3][4] +...checksum after hashing g_156[i][j] : D1E14581 +index = [3][5] +...checksum after hashing g_156[i][j] : 490B6B23 +index = [3][6] +...checksum after hashing g_156[i][j] : C6FFD157 +index = [3][7] +...checksum after hashing g_156[i][j] : E7BC2752 +index = [3][8] +...checksum after hashing g_173[i][j] : B3E0B95A +index = [0][0] +...checksum after hashing g_173[i][j] : 48E0A6B +index = [0][1] +...checksum after hashing g_173[i][j] : DA253C71 +index = [1][0] +...checksum after hashing g_173[i][j] : 16A001C8 +index = [1][1] +...checksum after hashing g_173[i][j] : 71101D1F +index = [2][0] +...checksum after hashing g_173[i][j] : 17E315F9 +index = [2][1] +...checksum after hashing g_173[i][j] : 8EFBA527 +index = [3][0] +...checksum after hashing g_173[i][j] : 79B9AFB5 +index = [3][1] +...checksum after hashing g_173[i][j] : 7DAEC0E5 +index = [4][0] +...checksum after hashing g_173[i][j] : 8998A44 +index = [4][1] +...checksum after hashing g_173[i][j] : CF745024 +index = [5][0] +...checksum after hashing g_173[i][j] : 65C344E2 +index = [5][1] +...checksum after hashing g_173[i][j] : 4F12058C +index = [6][0] +...checksum after hashing g_173[i][j] : 5974D652 +index = [6][1] +...checksum after hashing g_173[i][j] : 281C6370 +index = [7][0] +...checksum after hashing g_173[i][j] : 94CB11AA +index = [7][1] +...checksum after hashing g_173[i][j] : 79A6D187 +index = [8][0] +...checksum after hashing g_173[i][j] : 4BE6329A +index = [8][1] +...checksum after hashing g_177 : C6AC5C6F +...checksum after hashing g_192 : 147E63A7 +...checksum after hashing g_193 : A8B36CB9 +...checksum after hashing g_285 : 17163AE9 +...checksum after hashing g_294 : 3C8481F8 +...checksum after hashing g_343 : 76E87897 +...checksum after hashing g_345 : 61903DD9 +...checksum after hashing g_346[i] : 1D5F8418 +index = [0] +...checksum after hashing g_346[i] : 8392A925 +index = [1] +...checksum after hashing g_346[i] : 57C7DCFD +index = [2] +...checksum after hashing g_346[i] : 2F0DCFBB +index = [3] +...checksum after hashing g_346[i] : 6FBB84EE +index = [4] +...checksum after hashing g_346[i] : A486C6A6 +index = [5] +...checksum after hashing g_346[i] : 60042B0B +index = [6] +...checksum after hashing g_346[i] : 64E1C217 +index = [7] +...checksum after hashing g_346[i] : 731B95F8 +index = [8] +...checksum after hashing g_362 : DC1F2F8F +...checksum after hashing g_379 : 18D39372 +...checksum after hashing g_382 : B4EB10C6 +...checksum after hashing g_416 : 4E1B27B0 +...checksum after hashing g_445 : FCD24E01 +...checksum after hashing g_495 : B520B6AD +...checksum after hashing g_499[i] : CD0FDEDE +index = [0] +...checksum after hashing g_499[i] : BE838A57 +index = [1] +...checksum after hashing g_499[i] : 1B5D024B +index = [2] +...checksum after hashing g_499[i] : 57B31FA2 +index = [3] +...checksum after hashing g_506[i] : 3500F310 +index = [0] +...checksum after hashing g_506[i] : 4ED7A1CA +index = [1] +...checksum after hashing g_506[i] : 5FCCAE55 +index = [2] +...checksum after hashing g_506[i] : 4C51A422 +index = [3] +...checksum after hashing g_506[i] : F77F0C58 +index = [4] +...checksum after hashing g_506[i] : 4D467480 +index = [5] +...checksum after hashing g_538 : 57AC3B83 +...checksum after hashing g_553 : 50F24CBE +...checksum after hashing g_587 : BAD03739 +...checksum after hashing g_589 : E57F07BF +...checksum after hashing g_592 : 95809589 +...checksum after hashing g_595 : 2F9083D5 +...checksum after hashing g_609[i][j] : 527DDCCC +index = [0][0] +...checksum after hashing g_609[i][j] : 9DAE2C2 +index = [0][1] +...checksum after hashing g_609[i][j] : 8BD6488D +index = [0][2] +...checksum after hashing g_609[i][j] : 1EC0AB4C +index = [0][3] +...checksum after hashing g_609[i][j] : CAE540D6 +index = [0][4] +...checksum after hashing g_609[i][j] : 5109C07F +index = [1][0] +...checksum after hashing g_609[i][j] : C17BB4EA +index = [1][1] +...checksum after hashing g_609[i][j] : A4C25A74 +index = [1][2] +...checksum after hashing g_609[i][j] : 7F736F73 +index = [1][3] +...checksum after hashing g_609[i][j] : 1563A08 +index = [1][4] +...checksum after hashing g_609[i][j] : DBA0510 +index = [2][0] +...checksum after hashing g_609[i][j] : 986FE7B0 +index = [2][1] +...checksum after hashing g_609[i][j] : 52911B5E +index = [2][2] +...checksum after hashing g_609[i][j] : 4EC9E60 +index = [2][3] +...checksum after hashing g_609[i][j] : C6F2E5FF +index = [2][4] +...checksum after hashing g_609[i][j] : 5FB577FD +index = [3][0] +...checksum after hashing g_609[i][j] : E9F2EE7C +index = [3][1] +...checksum after hashing g_609[i][j] : 8236C492 +index = [3][2] +...checksum after hashing g_609[i][j] : D9374529 +index = [3][3] +...checksum after hashing g_609[i][j] : 3B9C9A24 +index = [3][4] +...checksum after hashing g_609[i][j] : C93FAE80 +index = [4][0] +...checksum after hashing g_609[i][j] : 2AFFDE32 +index = [4][1] +...checksum after hashing g_609[i][j] : 6A55E34B +index = [4][2] +...checksum after hashing g_609[i][j] : 5F68B171 +index = [4][3] +...checksum after hashing g_609[i][j] : BE1001EB +index = [4][4] +...checksum after hashing g_609[i][j] : 1CB3A729 +index = [5][0] +...checksum after hashing g_609[i][j] : 74C2422E +index = [5][1] +...checksum after hashing g_609[i][j] : 62A87EB5 +index = [5][2] +...checksum after hashing g_609[i][j] : 63D3EC84 +index = [5][3] +...checksum after hashing g_609[i][j] : 43925169 +index = [5][4] +...checksum after hashing g_609[i][j] : FDE68341 +index = [6][0] +...checksum after hashing g_609[i][j] : A5D50801 +index = [6][1] +...checksum after hashing g_609[i][j] : 13A3AF1F +index = [6][2] +...checksum after hashing g_609[i][j] : 9B8D283 +index = [6][3] +...checksum after hashing g_609[i][j] : DBDE9B60 +index = [6][4] +...checksum after hashing g_609[i][j] : BECEC422 +index = [7][0] +...checksum after hashing g_609[i][j] : 4B1B7529 +index = [7][1] +...checksum after hashing g_609[i][j] : 38C7E672 +index = [7][2] +...checksum after hashing g_609[i][j] : 12921CF1 +index = [7][3] +...checksum after hashing g_609[i][j] : 64D74DF9 +index = [7][4] +...checksum after hashing g_609[i][j] : 7D9E36DA +index = [8][0] +...checksum after hashing g_609[i][j] : 65F2281 +index = [8][1] +...checksum after hashing g_609[i][j] : 45935881 +index = [8][2] +...checksum after hashing g_609[i][j] : B9E2E373 +index = [8][3] +...checksum after hashing g_609[i][j] : F3240432 +index = [8][4] +...checksum after hashing g_610 : 6412EE98 +...checksum after hashing g_611[i] : 8B8B2635 +index = [0] +...checksum after hashing g_611[i] : 3B00EEAF +index = [1] +...checksum after hashing g_611[i] : 6557DA9B +index = [2] +...checksum after hashing g_611[i] : 40554F41 +index = [3] +...checksum after hashing g_611[i] : 8B56DA62 +index = [4] +...checksum after hashing g_619[i] : 199E8078 +index = [0] +...checksum after hashing g_619[i] : 5A3333CB +index = [1] +...checksum after hashing g_619[i] : 66904078 +index = [2] +...checksum after hashing g_619[i] : 95A5E4A8 +index = [3] +...checksum after hashing g_619[i] : EB05C99D +index = [4] +...checksum after hashing g_619[i] : 5DFF46F +index = [5] +...checksum after hashing g_619[i] : 3966BE6A +index = [6] +...checksum after hashing g_619[i] : 69DD2F38 +index = [7] +...checksum after hashing g_620 : 25933FD +...checksum after hashing g_622 : 4256ADCA +...checksum after hashing g_659 : 8F926ACD +...checksum after hashing g_797 : 35D7DE8E +before stmt(2): checksum = 35D7DE8E +...checksum after hashing g_4 : C3DA8853 +...checksum after hashing g_10 : 25C28ED3 +...checksum after hashing g_71 : 23B53B56 +...checksum after hashing g_72 : CD82F789 +...checksum after hashing g_108 : EDFE073C +...checksum after hashing g_109 : CA72DC76 +...checksum after hashing g_112 : 8D3BDCD2 +...checksum after hashing g_128 : F6BFFC7D +...checksum after hashing g_144 : 53D1FAAB +...checksum after hashing g_155 : 1D7AA246 +...checksum after hashing g_156[i][j] : E5BA6F3 +index = [0][0] +...checksum after hashing g_156[i][j] : 2BDFE4BA +index = [0][1] +...checksum after hashing g_156[i][j] : AA3623AB +index = [0][2] +...checksum after hashing g_156[i][j] : C3706887 +index = [0][3] +...checksum after hashing g_156[i][j] : C7162B5F +index = [0][4] +...checksum after hashing g_156[i][j] : 62E08188 +index = [0][5] +...checksum after hashing g_156[i][j] : E9D6C942 +index = [0][6] +...checksum after hashing g_156[i][j] : 7DD9D085 +index = [0][7] +...checksum after hashing g_156[i][j] : F54ED557 +index = [0][8] +...checksum after hashing g_156[i][j] : A2BB7161 +index = [1][0] +...checksum after hashing g_156[i][j] : 354EF20F +index = [1][1] +...checksum after hashing g_156[i][j] : A64C4F9 +index = [1][2] +...checksum after hashing g_156[i][j] : 5082F5B5 +index = [1][3] +...checksum after hashing g_156[i][j] : 27737117 +index = [1][4] +...checksum after hashing g_156[i][j] : E5EB27A6 +index = [1][5] +...checksum after hashing g_156[i][j] : E4E6FFD5 +index = [1][6] +...checksum after hashing g_156[i][j] : DC5FDAF4 +index = [1][7] +...checksum after hashing g_156[i][j] : E7523BCB +index = [1][8] +...checksum after hashing g_156[i][j] : E39FFEC2 +index = [2][0] +...checksum after hashing g_156[i][j] : 70CA88F9 +index = [2][1] +...checksum after hashing g_156[i][j] : A9568854 +index = [2][2] +...checksum after hashing g_156[i][j] : 34ACE6EA +index = [2][3] +...checksum after hashing g_156[i][j] : EBA5DFA7 +index = [2][4] +...checksum after hashing g_156[i][j] : 6ECFF554 +index = [2][5] +...checksum after hashing g_156[i][j] : CD067BA9 +index = [2][6] +...checksum after hashing g_156[i][j] : 7461D0C +index = [2][7] +...checksum after hashing g_156[i][j] : BA612702 +index = [2][8] +...checksum after hashing g_156[i][j] : 1C574D23 +index = [3][0] +...checksum after hashing g_156[i][j] : F7305C26 +index = [3][1] +...checksum after hashing g_156[i][j] : C06EA3C3 +index = [3][2] +...checksum after hashing g_156[i][j] : 3D2F3F1 +index = [3][3] +...checksum after hashing g_156[i][j] : 7F519FD5 +index = [3][4] +...checksum after hashing g_156[i][j] : 58D16367 +index = [3][5] +...checksum after hashing g_156[i][j] : CDFD42E2 +index = [3][6] +...checksum after hashing g_156[i][j] : 97A12459 +index = [3][7] +...checksum after hashing g_156[i][j] : 8C38F0E2 +index = [3][8] +...checksum after hashing g_173[i][j] : A3DB31EA +index = [0][0] +...checksum after hashing g_173[i][j] : D7DFF195 +index = [0][1] +...checksum after hashing g_173[i][j] : B9772EAF +index = [1][0] +...checksum after hashing g_173[i][j] : 93BFB748 +index = [1][1] +...checksum after hashing g_173[i][j] : D1250B7 +index = [2][0] +...checksum after hashing g_173[i][j] : 8CFB6515 +index = [2][1] +...checksum after hashing g_173[i][j] : A365E162 +index = [3][0] +...checksum after hashing g_173[i][j] : 8FDD947 +index = [3][1] +...checksum after hashing g_173[i][j] : B2AAC180 +index = [4][0] +...checksum after hashing g_173[i][j] : 6A14FD67 +index = [4][1] +...checksum after hashing g_173[i][j] : 1DCC853 +index = [5][0] +...checksum after hashing g_173[i][j] : 7A29ECD9 +index = [5][1] +...checksum after hashing g_173[i][j] : 96CA6067 +index = [6][0] +...checksum after hashing g_173[i][j] : A0F83CC7 +index = [6][1] +...checksum after hashing g_173[i][j] : 55A0BA6F +index = [7][0] +...checksum after hashing g_173[i][j] : 782DB4E9 +index = [7][1] +...checksum after hashing g_173[i][j] : 8E2C43E6 +index = [8][0] +...checksum after hashing g_173[i][j] : D45ED91C +index = [8][1] +...checksum after hashing g_177 : E78520AC +...checksum after hashing g_192 : 25423CCE +...checksum after hashing g_193 : AB50C478 +...checksum after hashing g_285 : E2D64EC7 +...checksum after hashing g_294 : 29BC48A4 +...checksum after hashing g_343 : 130F3D52 +...checksum after hashing g_345 : 7AB59C3A +...checksum after hashing g_346[i] : 63B94492 +index = [0] +...checksum after hashing g_346[i] : 2F40616B +index = [1] +...checksum after hashing g_346[i] : DFDE7C55 +index = [2] +...checksum after hashing g_346[i] : 6C9013B +index = [3] +...checksum after hashing g_346[i] : F4F703B9 +index = [4] +...checksum after hashing g_346[i] : 2D37B67D +index = [5] +...checksum after hashing g_346[i] : AC1AD9BE +index = [6] +...checksum after hashing g_346[i] : BE9E6A45 +index = [7] +...checksum after hashing g_346[i] : BD500FA +index = [8] +...checksum after hashing g_362 : 86699ED1 +...checksum after hashing g_379 : 546195E +...checksum after hashing g_382 : DD9D8C90 +...checksum after hashing g_416 : 197F31D6 +...checksum after hashing g_445 : EAA53E8 +...checksum after hashing g_495 : BEFCE8F2 +...checksum after hashing g_499[i] : 821C910B +index = [0] +...checksum after hashing g_499[i] : 53431492 +index = [1] +...checksum after hashing g_499[i] : B802C00E +index = [2] +...checksum after hashing g_499[i] : 1BAE464A +index = [3] +...checksum after hashing g_506[i] : C5A0EE5F +index = [0] +...checksum after hashing g_506[i] : 8AE49777 +index = [1] +...checksum after hashing g_506[i] : F850C2A9 +index = [2] +...checksum after hashing g_506[i] : 546ACC24 +index = [3] +...checksum after hashing g_506[i] : BB0EBE72 +index = [4] +...checksum after hashing g_506[i] : D5D54A8 +index = [5] +...checksum after hashing g_538 : D58D70B8 +...checksum after hashing g_553 : 843EA6D0 +...checksum after hashing g_587 : 23AD6CF0 +...checksum after hashing g_589 : 9D914B39 +...checksum after hashing g_592 : BA112FA6 +...checksum after hashing g_595 : DC83C179 +...checksum after hashing g_609[i][j] : 6385C1EB +index = [0][0] +...checksum after hashing g_609[i][j] : AD7A2EE9 +index = [0][1] +...checksum after hashing g_609[i][j] : 1BECD48E +index = [0][2] +...checksum after hashing g_609[i][j] : 2DDA080B +index = [0][3] +...checksum after hashing g_609[i][j] : 18E558A6 +index = [0][4] +...checksum after hashing g_609[i][j] : 40DE21D3 +index = [1][0] +...checksum after hashing g_609[i][j] : CA2FDBEA +index = [1][1] +...checksum after hashing g_609[i][j] : AE4C97B1 +index = [1][2] +...checksum after hashing g_609[i][j] : E242288F +index = [1][3] +...checksum after hashing g_609[i][j] : F0D0E019 +index = [1][4] +...checksum after hashing g_609[i][j] : C262784B +index = [2][0] +...checksum after hashing g_609[i][j] : 9A700426 +index = [2][1] +...checksum after hashing g_609[i][j] : 424AA46D +index = [2][2] +...checksum after hashing g_609[i][j] : 570B7CB2 +index = [2][3] +...checksum after hashing g_609[i][j] : 394F546 +index = [2][4] +...checksum after hashing g_609[i][j] : FB402F83 +index = [3][0] +...checksum after hashing g_609[i][j] : B8CD34D2 +index = [3][1] +...checksum after hashing g_609[i][j] : EB2E511C +index = [3][2] +...checksum after hashing g_609[i][j] : 991CBF9F +index = [3][3] +...checksum after hashing g_609[i][j] : BB7AC19D +index = [3][4] +...checksum after hashing g_609[i][j] : 2C30B98B +index = [4][0] +...checksum after hashing g_609[i][j] : B36FE6FE +index = [4][1] +...checksum after hashing g_609[i][j] : 8424A727 +index = [4][2] +...checksum after hashing g_609[i][j] : 289D5B1E +index = [4][3] +...checksum after hashing g_609[i][j] : DE8A42AF +index = [4][4] +...checksum after hashing g_609[i][j] : BC055812 +index = [5][0] +...checksum after hashing g_609[i][j] : 8939A3B5 +index = [5][1] +...checksum after hashing g_609[i][j] : 948D1450 +index = [5][2] +...checksum after hashing g_609[i][j] : 7B1F94B6 +index = [5][3] +...checksum after hashing g_609[i][j] : 377158BF +index = [5][4] +...checksum after hashing g_609[i][j] : D3334B81 +index = [6][0] +...checksum after hashing g_609[i][j] : 6CBD1D6A +index = [6][1] +...checksum after hashing g_609[i][j] : AAF5253D +index = [6][2] +...checksum after hashing g_609[i][j] : B17DDA9A +index = [6][3] +...checksum after hashing g_609[i][j] : 8BEBCA78 +index = [6][4] +...checksum after hashing g_609[i][j] : 8F476C97 +index = [7][0] +...checksum after hashing g_609[i][j] : D43E461 +index = [7][1] +...checksum after hashing g_609[i][j] : 776B779E +index = [7][2] +...checksum after hashing g_609[i][j] : 963B9F52 +index = [7][3] +...checksum after hashing g_609[i][j] : 4D6A1E52 +index = [7][4] +...checksum after hashing g_609[i][j] : 9AD770AE +index = [8][0] +...checksum after hashing g_609[i][j] : 89C067AF +index = [8][1] +...checksum after hashing g_609[i][j] : F8F1C7C3 +index = [8][2] +...checksum after hashing g_609[i][j] : 9CAB4A1C +index = [8][3] +...checksum after hashing g_609[i][j] : 2C77A583 +index = [8][4] +...checksum after hashing g_610 : 9E9C31E2 +...checksum after hashing g_611[i] : F1B4BA07 +index = [0] +...checksum after hashing g_611[i] : 7D252D0F +index = [1] +...checksum after hashing g_611[i] : CC99DFC5 +index = [2] +...checksum after hashing g_611[i] : 973F14B7 +index = [3] +...checksum after hashing g_611[i] : CF179612 +index = [4] +...checksum after hashing g_619[i] : 93F2AF8D +index = [0] +...checksum after hashing g_619[i] : 1CBF9A16 +index = [1] +...checksum after hashing g_619[i] : 6C8E7431 +index = [2] +...checksum after hashing g_619[i] : 644F6892 +index = [3] +...checksum after hashing g_619[i] : F297EA50 +index = [4] +...checksum after hashing g_619[i] : 9CEF7A55 +index = [5] +...checksum after hashing g_619[i] : 1BCE8D36 +index = [6] +...checksum after hashing g_619[i] : 7D95B3EE +index = [7] +...checksum after hashing g_620 : D715855C +...checksum after hashing g_622 : DC27775A +...checksum after hashing g_659 : 935FCD7B +...checksum after hashing g_797 : BBAC7161 +before stmt(776): checksum = BBAC7161 +...checksum after hashing g_4 : F645581D +...checksum after hashing g_10 : 73EAC61B +...checksum after hashing g_71 : 31907BAC +...checksum after hashing g_72 : 4F892D25 +...checksum after hashing g_108 : 8A1F2AA0 +...checksum after hashing g_109 : 99C2618F +...checksum after hashing g_112 : AD74464A +...checksum after hashing g_128 : 32407B12 +...checksum after hashing g_144 : DBC3EB20 +...checksum after hashing g_155 : A15121FA +...checksum after hashing g_156[i][j] : E2BF0C6 +index = [0][0] +...checksum after hashing g_156[i][j] : AB24C7DD +index = [0][1] +...checksum after hashing g_156[i][j] : 2C3CAFFE +index = [0][2] +...checksum after hashing g_156[i][j] : 29B8BB6C +index = [0][3] +...checksum after hashing g_156[i][j] : A5B302F +index = [0][4] +...checksum after hashing g_156[i][j] : B9AEE2C0 +index = [0][5] +...checksum after hashing g_156[i][j] : 821CA53E +index = [0][6] +...checksum after hashing g_156[i][j] : F6887AF1 +index = [0][7] +...checksum after hashing g_156[i][j] : 1C360C97 +index = [0][8] +...checksum after hashing g_156[i][j] : 689E38FA +index = [1][0] +...checksum after hashing g_156[i][j] : B306D9AC +index = [1][1] +...checksum after hashing g_156[i][j] : 5DD9380B +index = [1][2] +...checksum after hashing g_156[i][j] : 6457B58F +index = [1][3] +...checksum after hashing g_156[i][j] : 158421FD +index = [1][4] +...checksum after hashing g_156[i][j] : A3BF8EB0 +index = [1][5] +...checksum after hashing g_156[i][j] : 655ED8C +index = [1][6] +...checksum after hashing g_156[i][j] : F41493ED +index = [1][7] +...checksum after hashing g_156[i][j] : 9330ABA5 +index = [1][8] +...checksum after hashing g_156[i][j] : C5D67A02 +index = [2][0] +...checksum after hashing g_156[i][j] : 130DA412 +index = [2][1] +...checksum after hashing g_156[i][j] : C97F8082 +index = [2][2] +...checksum after hashing g_156[i][j] : 3074AFA4 +index = [2][3] +...checksum after hashing g_156[i][j] : A1A9CDE8 +index = [2][4] +...checksum after hashing g_156[i][j] : 88A62DA3 +index = [2][5] +...checksum after hashing g_156[i][j] : A87BA69C +index = [2][6] +...checksum after hashing g_156[i][j] : E2AB2190 +index = [2][7] +...checksum after hashing g_156[i][j] : 5B36FEBC +index = [2][8] +...checksum after hashing g_156[i][j] : 41556348 +index = [3][0] +...checksum after hashing g_156[i][j] : E280805 +index = [3][1] +...checksum after hashing g_156[i][j] : 5F26F79E +index = [3][2] +...checksum after hashing g_156[i][j] : 910E93A +index = [3][3] +...checksum after hashing g_156[i][j] : D6B58CA6 +index = [3][4] +...checksum after hashing g_156[i][j] : AA235C98 +index = [3][5] +...checksum after hashing g_156[i][j] : 49F6F6B1 +index = [3][6] +...checksum after hashing g_156[i][j] : 856F4C2B +index = [3][7] +...checksum after hashing g_156[i][j] : AD0A89E5 +index = [3][8] +...checksum after hashing g_173[i][j] : C4351EA3 +index = [0][0] +...checksum after hashing g_173[i][j] : 11F9CD66 +index = [0][1] +...checksum after hashing g_173[i][j] : B10C6FB3 +index = [1][0] +...checksum after hashing g_173[i][j] : 3A389097 +index = [1][1] +...checksum after hashing g_173[i][j] : 95EFBCDD +index = [2][0] +...checksum after hashing g_173[i][j] : 275EDF30 +index = [2][1] +...checksum after hashing g_173[i][j] : 6E34F764 +index = [3][0] +...checksum after hashing g_173[i][j] : 73488B41 +index = [3][1] +...checksum after hashing g_173[i][j] : A69C96CB +index = [4][0] +...checksum after hashing g_173[i][j] : DC345F66 +index = [4][1] +...checksum after hashing g_173[i][j] : D41A1423 +index = [5][0] +...checksum after hashing g_173[i][j] : FE9CD682 +index = [5][1] +...checksum after hashing g_173[i][j] : D05D9546 +index = [6][0] +...checksum after hashing g_173[i][j] : AAC6BDDF +index = [6][1] +...checksum after hashing g_173[i][j] : 81EA46CB +index = [7][0] +...checksum after hashing g_173[i][j] : 8DD2014D +index = [7][1] +...checksum after hashing g_173[i][j] : D1430AAE +index = [8][0] +...checksum after hashing g_173[i][j] : EC04248C +index = [8][1] +...checksum after hashing g_177 : 8F8F2CCB +...checksum after hashing g_192 : 332F0BF0 +...checksum after hashing g_193 : BE071844 +...checksum after hashing g_285 : 449FEAF2 +...checksum after hashing g_294 : 2E36471A +...checksum after hashing g_343 : BAF6A6A4 +...checksum after hashing g_345 : 428AC3E8 +...checksum after hashing g_346[i] : F8D8CEAF +index = [0] +...checksum after hashing g_346[i] : DA98CF6B +index = [1] +...checksum after hashing g_346[i] : 880E45BB +index = [2] +...checksum after hashing g_346[i] : 6FE4E867 +index = [3] +...checksum after hashing g_346[i] : C75BDB9F +index = [4] +...checksum after hashing g_346[i] : 9696B0E4 +index = [5] +...checksum after hashing g_346[i] : 8370EC8E +index = [6] +...checksum after hashing g_346[i] : 58D60BEB +index = [7] +...checksum after hashing g_346[i] : 9EBD4D9B +index = [8] +...checksum after hashing g_362 : 50F09640 +...checksum after hashing g_379 : C19A8895 +...checksum after hashing g_382 : 3184BBEA +...checksum after hashing g_416 : E658570 +...checksum after hashing g_445 : 97033CE1 +...checksum after hashing g_495 : 76690725 +...checksum after hashing g_499[i] : 2A8B36B +index = [0] +...checksum after hashing g_499[i] : 3EBD9983 +index = [1] +...checksum after hashing g_499[i] : 76A9F1 +index = [2] +...checksum after hashing g_499[i] : C443758 +index = [3] +...checksum after hashing g_506[i] : 4DC1ED8D +index = [0] +...checksum after hashing g_506[i] : 9B7A09C8 +index = [1] +...checksum after hashing g_506[i] : CFBE8EF9 +index = [2] +...checksum after hashing g_506[i] : 9EA7CC4F +index = [3] +...checksum after hashing g_506[i] : 52CC4CDD +index = [4] +...checksum after hashing g_506[i] : 8E0F1555 +index = [5] +...checksum after hashing g_538 : 2CE5B479 +...checksum after hashing g_553 : B52CBA38 +...checksum after hashing g_587 : C702FDA +...checksum after hashing g_589 : BF85B1F1 +...checksum after hashing g_592 : 4A7589F8 +...checksum after hashing g_595 : 9688C485 +...checksum after hashing g_609[i][j] : DC03DB5A +index = [0][0] +...checksum after hashing g_609[i][j] : 2F02B060 +index = [0][1] +...checksum after hashing g_609[i][j] : 9860A937 +index = [0][2] +...checksum after hashing g_609[i][j] : F20EF7C5 +index = [0][3] +...checksum after hashing g_609[i][j] : C3D73A20 +index = [0][4] +...checksum after hashing g_609[i][j] : 3FCE8857 +index = [1][0] +...checksum after hashing g_609[i][j] : F4C5E295 +index = [1][1] +...checksum after hashing g_609[i][j] : D35AFFA9 +index = [1][2] +...checksum after hashing g_609[i][j] : 3077531 +index = [1][3] +...checksum after hashing g_609[i][j] : 331A0DFD +index = [1][4] +...checksum after hashing g_609[i][j] : 93D4119 +index = [2][0] +...checksum after hashing g_609[i][j] : E15B47B3 +index = [2][1] +...checksum after hashing g_609[i][j] : BAFD3BF +index = [2][2] +...checksum after hashing g_609[i][j] : A6E18DE8 +index = [2][3] +...checksum after hashing g_609[i][j] : 7D09DA8B +index = [2][4] +...checksum after hashing g_609[i][j] : 3F24B0E9 +index = [3][0] +...checksum after hashing g_609[i][j] : 87817472 +index = [3][1] +...checksum after hashing g_609[i][j] : 3C75E8ED +index = [3][2] +...checksum after hashing g_609[i][j] : 2CB1C82A +index = [3][3] +...checksum after hashing g_609[i][j] : 60CA8447 +index = [3][4] +...checksum after hashing g_609[i][j] : E64C0AB9 +index = [4][0] +...checksum after hashing g_609[i][j] : D66E8BC9 +index = [4][1] +...checksum after hashing g_609[i][j] : 8D149BDA +index = [4][2] +...checksum after hashing g_609[i][j] : D77A07C7 +index = [4][3] +...checksum after hashing g_609[i][j] : DC4DE9CE +index = [4][4] +...checksum after hashing g_609[i][j] : 80075A50 +index = [5][0] +...checksum after hashing g_609[i][j] : A6F9F968 +index = [5][1] +...checksum after hashing g_609[i][j] : 41B33465 +index = [5][2] +...checksum after hashing g_609[i][j] : 33DBE7E3 +index = [5][3] +...checksum after hashing g_609[i][j] : 4A84AACE +index = [5][4] +...checksum after hashing g_609[i][j] : F18F33BF +index = [6][0] +...checksum after hashing g_609[i][j] : BBBB0B40 +index = [6][1] +...checksum after hashing g_609[i][j] : 333C5554 +index = [6][2] +...checksum after hashing g_609[i][j] : 30494DA4 +index = [6][3] +...checksum after hashing g_609[i][j] : 42D6ABDE +index = [6][4] +...checksum after hashing g_609[i][j] : 2602B9F3 +index = [7][0] +...checksum after hashing g_609[i][j] : 1041D3E2 +index = [7][1] +...checksum after hashing g_609[i][j] : F8939305 +index = [7][2] +...checksum after hashing g_609[i][j] : F3F3748F +index = [7][3] +...checksum after hashing g_609[i][j] : 21888C6 +index = [7][4] +...checksum after hashing g_609[i][j] : AA01856A +index = [8][0] +...checksum after hashing g_609[i][j] : 325BFDF0 +index = [8][1] +...checksum after hashing g_609[i][j] : 551DDCC4 +index = [8][2] +...checksum after hashing g_609[i][j] : 4BA35D81 +index = [8][3] +...checksum after hashing g_609[i][j] : AA5AE470 +index = [8][4] +...checksum after hashing g_610 : 5FE613A6 +...checksum after hashing g_611[i] : E7B884B9 +index = [0] +...checksum after hashing g_611[i] : F61C2661 +index = [1] +...checksum after hashing g_611[i] : 6FDB6706 +index = [2] +...checksum after hashing g_611[i] : B51A2522 +index = [3] +...checksum after hashing g_611[i] : 5DB39920 +index = [4] +...checksum after hashing g_619[i] : 16E6531F +index = [0] +...checksum after hashing g_619[i] : 4549977 +index = [1] +...checksum after hashing g_619[i] : 43B4E87F +index = [2] +...checksum after hashing g_619[i] : 65F5E528 +index = [3] +...checksum after hashing g_619[i] : 98BAD9 +index = [4] +...checksum after hashing g_619[i] : B42922AB +index = [5] +...checksum after hashing g_619[i] : B7CD4B98 +index = [6] +...checksum after hashing g_619[i] : B14E8B2A +index = [7] +...checksum after hashing g_620 : F45CDA6A +...checksum after hashing g_622 : ED5B3C94 +...checksum after hashing g_659 : AB5600AF +...checksum after hashing g_797 : 722D596B +before stmt(6): checksum = 722D596B +...checksum after hashing g_4 : 4EF93F78 +...checksum after hashing g_10 : BF40C685 +...checksum after hashing g_71 : AA3537C3 +...checksum after hashing g_72 : E1E1BCB4 +...checksum after hashing g_108 : EF7811E6 +...checksum after hashing g_109 : 18E704A8 +...checksum after hashing g_112 : ACC1BB57 +...checksum after hashing g_128 : C39A7EB8 +...checksum after hashing g_144 : 4EB33FB5 +...checksum after hashing g_155 : E15B3BD +...checksum after hashing g_156[i][j] : 2403C8A4 +index = [0][0] +...checksum after hashing g_156[i][j] : 96952B01 +index = [0][1] +...checksum after hashing g_156[i][j] : 45F053F3 +index = [0][2] +...checksum after hashing g_156[i][j] : 342DA8BB +index = [0][3] +...checksum after hashing g_156[i][j] : C088BEA0 +index = [0][4] +...checksum after hashing g_156[i][j] : 369BCF55 +index = [0][5] +...checksum after hashing g_156[i][j] : E7213D1C +index = [0][6] +...checksum after hashing g_156[i][j] : 58832965 +index = [0][7] +...checksum after hashing g_156[i][j] : 9274BDA9 +index = [0][8] +...checksum after hashing g_156[i][j] : 74B9A0EF +index = [1][0] +...checksum after hashing g_156[i][j] : E9057963 +index = [1][1] +...checksum after hashing g_156[i][j] : A1C7012 +index = [1][2] +...checksum after hashing g_156[i][j] : 744D96BE +index = [1][3] +...checksum after hashing g_156[i][j] : CA82AC3F +index = [1][4] +...checksum after hashing g_156[i][j] : D620482D +index = [1][5] +...checksum after hashing g_156[i][j] : AEB2D61 +index = [1][6] +...checksum after hashing g_156[i][j] : 325E5355 +index = [1][7] +...checksum after hashing g_156[i][j] : A2C89B9A +index = [1][8] +...checksum after hashing g_156[i][j] : C44E1CEA +index = [2][0] +...checksum after hashing g_156[i][j] : 82034AD3 +index = [2][1] +...checksum after hashing g_156[i][j] : BD797A17 +index = [2][2] +...checksum after hashing g_156[i][j] : 38B5A97 +index = [2][3] +...checksum after hashing g_156[i][j] : DCCCB7F8 +index = [2][4] +...checksum after hashing g_156[i][j] : B7E705D9 +index = [2][5] +...checksum after hashing g_156[i][j] : C5A3A245 +index = [2][6] +...checksum after hashing g_156[i][j] : C41C2DAD +index = [2][7] +...checksum after hashing g_156[i][j] : 29E49A26 +index = [2][8] +...checksum after hashing g_156[i][j] : D173B6F9 +index = [3][0] +...checksum after hashing g_156[i][j] : 1375C641 +index = [3][1] +...checksum after hashing g_156[i][j] : BC72CC7E +index = [3][2] +...checksum after hashing g_156[i][j] : 108589E1 +index = [3][3] +...checksum after hashing g_156[i][j] : 76AAF81 +index = [3][4] +...checksum after hashing g_156[i][j] : 5AB90834 +index = [3][5] +...checksum after hashing g_156[i][j] : 13ED46EC +index = [3][6] +...checksum after hashing g_156[i][j] : 5BDE1634 +index = [3][7] +...checksum after hashing g_156[i][j] : 58EE0560 +index = [3][8] +...checksum after hashing g_173[i][j] : 1588A35 +index = [0][0] +...checksum after hashing g_173[i][j] : 489540E7 +index = [0][1] +...checksum after hashing g_173[i][j] : D6FBFBC5 +index = [1][0] +...checksum after hashing g_173[i][j] : 65DFC7A +index = [1][1] +...checksum after hashing g_173[i][j] : C7D2F419 +index = [2][0] +...checksum after hashing g_173[i][j] : 4F75027F +index = [2][1] +...checksum after hashing g_173[i][j] : 1D0B0D6F +index = [3][0] +...checksum after hashing g_173[i][j] : 8DC8F0FC +index = [3][1] +...checksum after hashing g_173[i][j] : 70A6C06D +index = [4][0] +...checksum after hashing g_173[i][j] : 961CE225 +index = [4][1] +...checksum after hashing g_173[i][j] : 5B698897 +index = [5][0] +...checksum after hashing g_173[i][j] : E190FA5F +index = [5][1] +...checksum after hashing g_173[i][j] : 1489097F +index = [6][0] +...checksum after hashing g_173[i][j] : AAB14DD2 +index = [6][1] +...checksum after hashing g_173[i][j] : A63A02F7 +index = [7][0] +...checksum after hashing g_173[i][j] : 648E133C +index = [7][1] +...checksum after hashing g_173[i][j] : D2BAF2CD +index = [8][0] +...checksum after hashing g_173[i][j] : 22375547 +index = [8][1] +...checksum after hashing g_177 : F347CD2C +...checksum after hashing g_192 : 8A37A8B7 +...checksum after hashing g_193 : 535C0888 +...checksum after hashing g_285 : E3D60266 +...checksum after hashing g_294 : D2EC72F6 +...checksum after hashing g_343 : CB23ECFD +...checksum after hashing g_345 : 52CFFB26 +...checksum after hashing g_346[i] : D48B4896 +index = [0] +...checksum after hashing g_346[i] : 114D7D06 +index = [1] +...checksum after hashing g_346[i] : 77616A79 +index = [2] +...checksum after hashing g_346[i] : 4FD657D2 +index = [3] +...checksum after hashing g_346[i] : F5EBA8A3 +index = [4] +...checksum after hashing g_346[i] : 56CEDECC +index = [5] +...checksum after hashing g_346[i] : 4DB99899 +index = [6] +...checksum after hashing g_346[i] : A00427F1 +index = [7] +...checksum after hashing g_346[i] : 90269857 +index = [8] +...checksum after hashing g_362 : 92244EF3 +...checksum after hashing g_379 : DDF9AEEE +...checksum after hashing g_382 : EBABC20E +...checksum after hashing g_416 : 78420367 +...checksum after hashing g_445 : DCD65299 +...checksum after hashing g_495 : 87EAC03E +...checksum after hashing g_499[i] : CB44EA32 +index = [0] +...checksum after hashing g_499[i] : FBA60A60 +index = [1] +...checksum after hashing g_499[i] : 79D1BC2B +index = [2] +...checksum after hashing g_499[i] : 97DFEC88 +index = [3] +...checksum after hashing g_506[i] : 1F2197D8 +index = [0] +...checksum after hashing g_506[i] : E5D4D8EA +index = [1] +...checksum after hashing g_506[i] : CEF77B17 +index = [2] +...checksum after hashing g_506[i] : 4DB48FA5 +index = [3] +...checksum after hashing g_506[i] : E7E71CE4 +index = [4] +...checksum after hashing g_506[i] : A2EB36A4 +index = [5] +...checksum after hashing g_538 : 20FE6709 +...checksum after hashing g_553 : F15C167C +...checksum after hashing g_587 : 96EAB8CB +...checksum after hashing g_589 : 340837B4 +...checksum after hashing g_592 : F740FA6B +...checksum after hashing g_595 : 782B5141 +...checksum after hashing g_609[i][j] : 1C6CF845 +index = [0][0] +...checksum after hashing g_609[i][j] : 6472BAC8 +index = [0][1] +...checksum after hashing g_609[i][j] : D319FCE5 +index = [0][2] +...checksum after hashing g_609[i][j] : BD7302B +index = [0][3] +...checksum after hashing g_609[i][j] : F50CB800 +index = [0][4] +...checksum after hashing g_609[i][j] : D03B61CA +index = [1][0] +...checksum after hashing g_609[i][j] : 44A2DAD2 +index = [1][1] +...checksum after hashing g_609[i][j] : 1E3C65E9 +index = [1][2] +...checksum after hashing g_609[i][j] : BEE56206 +index = [1][3] +...checksum after hashing g_609[i][j] : 9E17264F +index = [1][4] +...checksum after hashing g_609[i][j] : 9797CF11 +index = [2][0] +...checksum after hashing g_609[i][j] : 8C1BB3F6 +index = [2][1] +...checksum after hashing g_609[i][j] : D6D2F25C +index = [2][2] +...checksum after hashing g_609[i][j] : 3957E63B +index = [2][3] +...checksum after hashing g_609[i][j] : DF456FD6 +index = [2][4] +...checksum after hashing g_609[i][j] : A1C299A0 +index = [3][0] +...checksum after hashing g_609[i][j] : 4992F483 +index = [3][1] +...checksum after hashing g_609[i][j] : FEA92C8A +index = [3][2] +...checksum after hashing g_609[i][j] : 44011083 +index = [3][3] +...checksum after hashing g_609[i][j] : 749FF192 +index = [3][4] +...checksum after hashing g_609[i][j] : 78EA94C5 +index = [4][0] +...checksum after hashing g_609[i][j] : EFE0A43B +index = [4][1] +...checksum after hashing g_609[i][j] : 686F79E6 +index = [4][2] +...checksum after hashing g_609[i][j] : DB4AF2DA +index = [4][3] +...checksum after hashing g_609[i][j] : 1BC1AD6F +index = [4][4] +...checksum after hashing g_609[i][j] : 90758178 +index = [5][0] +...checksum after hashing g_609[i][j] : 421DAF78 +index = [5][1] +...checksum after hashing g_609[i][j] : E4EE2171 +index = [5][2] +...checksum after hashing g_609[i][j] : 5FE432CE +index = [5][3] +...checksum after hashing g_609[i][j] : 8F442DB9 +index = [5][4] +...checksum after hashing g_609[i][j] : C3E947EE +index = [6][0] +...checksum after hashing g_609[i][j] : 60823EAA +index = [6][1] +...checksum after hashing g_609[i][j] : B7DB5595 +index = [6][2] +...checksum after hashing g_609[i][j] : 552E6D5 +index = [6][3] +...checksum after hashing g_609[i][j] : BBFDD11F +index = [6][4] +...checksum after hashing g_609[i][j] : 3846AC7 +index = [7][0] +...checksum after hashing g_609[i][j] : C61ADCF7 +index = [7][1] +...checksum after hashing g_609[i][j] : A2F780EB +index = [7][2] +...checksum after hashing g_609[i][j] : 511C49E4 +index = [7][3] +...checksum after hashing g_609[i][j] : 23B2A3E0 +index = [7][4] +...checksum after hashing g_609[i][j] : 3C198B4 +index = [8][0] +...checksum after hashing g_609[i][j] : 84DECF7B +index = [8][1] +...checksum after hashing g_609[i][j] : 2C5CA6B7 +index = [8][2] +...checksum after hashing g_609[i][j] : ABF408A9 +index = [8][3] +...checksum after hashing g_609[i][j] : F05BA611 +index = [8][4] +...checksum after hashing g_610 : 3DC753C5 +...checksum after hashing g_611[i] : 91924403 +index = [0] +...checksum after hashing g_611[i] : C37106FE +index = [1] +...checksum after hashing g_611[i] : 345501DD +index = [2] +...checksum after hashing g_611[i] : 51AC9191 +index = [3] +...checksum after hashing g_611[i] : 85DB01C7 +index = [4] +...checksum after hashing g_619[i] : 8B62789F +index = [0] +...checksum after hashing g_619[i] : C4434FB +index = [1] +...checksum after hashing g_619[i] : 7182B5AC +index = [2] +...checksum after hashing g_619[i] : 74BB8E49 +index = [3] +...checksum after hashing g_619[i] : C3CA4C07 +index = [4] +...checksum after hashing g_619[i] : 490B4FBF +index = [5] +...checksum after hashing g_619[i] : 4C071BA2 +index = [6] +...checksum after hashing g_619[i] : 591EA90F +index = [7] +...checksum after hashing g_620 : 4C1320F6 +...checksum after hashing g_622 : 10C5FCFA +...checksum after hashing g_659 : CDCE3FEA +...checksum after hashing g_797 : EC9997B6 +before stmt(6): checksum = EC9997B6 +...checksum after hashing g_4 : 5C4C9096 +...checksum after hashing g_10 : 31CFC166 +...checksum after hashing g_71 : DDABE533 +...checksum after hashing g_72 : C8290846 +...checksum after hashing g_108 : 40D15C2C +...checksum after hashing g_109 : 40F9AD80 +...checksum after hashing g_112 : AE1FBC70 +...checksum after hashing g_128 : A857607 +...checksum after hashing g_144 : 2A53444B +...checksum after hashing g_155 : 24A90335 +...checksum after hashing g_156[i][j] : 5A7B8002 +index = [0][0] +...checksum after hashing g_156[i][j] : D0471E65 +index = [0][1] +...checksum after hashing g_156[i][j] : FFA557E4 +index = [0][2] +...checksum after hashing g_156[i][j] : 12929CC2 +index = [0][3] +...checksum after hashing g_156[i][j] : 448D2B70 +index = [0][4] +...checksum after hashing g_156[i][j] : 7CB5BFAB +index = [0][5] +...checksum after hashing g_156[i][j] : 4867957A +index = [0][6] +...checksum after hashing g_156[i][j] : 71EFDB98 +index = [0][7] +...checksum after hashing g_156[i][j] : DBC268AA +index = [0][8] +...checksum after hashing g_156[i][j] : 50D108D0 +index = [1][0] +...checksum after hashing g_156[i][j] : 7019832 +index = [1][1] +...checksum after hashing g_156[i][j] : F253A839 +index = [1][2] +...checksum after hashing g_156[i][j] : 4463F3ED +index = [1][3] +...checksum after hashing g_156[i][j] : 70F83C38 +index = [1][4] +...checksum after hashing g_156[i][j] : 4880038A +index = [1][5] +...checksum after hashing g_156[i][j] : 1F286C56 +index = [1][6] +...checksum after hashing g_156[i][j] : A3F014DC +index = [1][7] +...checksum after hashing g_156[i][j] : F0C0CBDB +index = [1][8] +...checksum after hashing g_156[i][j] : C6E6B7D2 +index = [2][0] +...checksum after hashing g_156[i][j] : EA617FD1 +index = [2][1] +...checksum after hashing g_156[i][j] : 217275A8 +index = [2][2] +...checksum after hashing g_156[i][j] : 578B45C2 +index = [2][3] +...checksum after hashing g_156[i][j] : 5B6339C8 +index = [2][4] +...checksum after hashing g_156[i][j] : F6247D57 +index = [2][5] +...checksum after hashing g_156[i][j] : 73CBAF2E +index = [2][6] +...checksum after hashing g_156[i][j] : AFC539EA +index = [2][7] +...checksum after hashing g_156[i][j] : BE923788 +index = [2][8] +...checksum after hashing g_156[i][j] : BA69CE6B +index = [3][0] +...checksum after hashing g_156[i][j] : 3493948D +index = [3][1] +...checksum after hashing g_156[i][j] : 42FF861F +index = [3][2] +...checksum after hashing g_156[i][j] : 3A3A288C +index = [3][3] +...checksum after hashing g_156[i][j] : AE7ACCA9 +index = [3][4] +...checksum after hashing g_156[i][j] : 9066F381 +index = [3][5] +...checksum after hashing g_156[i][j] : FDC1960B +index = [3][6] +...checksum after hashing g_156[i][j] : E37CFE54 +index = [3][7] +...checksum after hashing g_156[i][j] : 9DB296AE +index = [3][8] +...checksum after hashing g_173[i][j] : 959F31CE +index = [0][0] +...checksum after hashing g_173[i][j] : A320D664 +index = [0][1] +...checksum after hashing g_173[i][j] : 7EE3475F +index = [1][0] +...checksum after hashing g_173[i][j] : 42F2494D +index = [1][1] +...checksum after hashing g_173[i][j] : 31952D55 +index = [2][0] +...checksum after hashing g_173[i][j] : F70965AE +index = [2][1] +...checksum after hashing g_173[i][j] : 884B0372 +index = [3][0] +...checksum after hashing g_173[i][j] : 55397A7A +index = [3][1] +...checksum after hashing g_173[i][j] : D1993DC6 +index = [4][0] +...checksum after hashing g_173[i][j] : 486525E0 +index = [4][1] +...checksum after hashing g_173[i][j] : 118C2B0A +index = [5][0] +...checksum after hashing g_173[i][j] : C0848F38 +index = [5][1] +...checksum after hashing g_173[i][j] : 8285AB75 +index = [6][0] +...checksum after hashing g_173[i][j] : AA295DC5 +index = [6][1] +...checksum after hashing g_173[i][j] : CE4ACEB3 +index = [7][0] +...checksum after hashing g_173[i][j] : 841B23EE +index = [7][1] +...checksum after hashing g_173[i][j] : D6B0FA68 +index = [8][0] +...checksum after hashing g_173[i][j] : AB13C15B +index = [8][1] +...checksum after hashing g_177 : 761EEF05 +...checksum after hashing g_192 : 9A6F4B3F +...checksum after hashing g_193 : BFC03F9D +...checksum after hashing g_285 : D17D3D9B +...checksum after hashing g_294 : CF32A83 +...checksum after hashing g_343 : 595C3216 +...checksum after hashing g_345 : 6200B274 +...checksum after hashing g_346[i] : A07FC2DD +index = [0] +...checksum after hashing g_346[i] : 9642ADF0 +index = [1] +...checksum after hashing g_346[i] : ADA11C7E +index = [2] +...checksum after hashing g_346[i] : 2F81970D +index = [3] +...checksum after hashing g_346[i] : A23B3DE7 +index = [4] +...checksum after hashing g_346[i] : CD576AF5 +index = [5] +...checksum after hashing g_346[i] : C59302E1 +index = [6] +...checksum after hashing g_346[i] : 7203559E +index = [7] +...checksum after hashing g_346[i] : 838AE603 +index = [8] +...checksum after hashing g_362 : E282167 +...checksum after hashing g_379 : F95CC463 +...checksum after hashing g_382 : 5EAB4E63 +...checksum after hashing g_416 : E22A895E +...checksum after hashing g_445 : A9E011 +...checksum after hashing g_495 : 4E1F8F52 +...checksum after hashing g_499[i] : 4A010798 +index = [0] +...checksum after hashing g_499[i] : 6FFBB804 +index = [1] +...checksum after hashing g_499[i] : F3388245 +index = [2] +...checksum after hashing g_499[i] : E00286B9 +index = [3] +...checksum after hashing g_506[i] : E8011927 +index = [0] +...checksum after hashing g_506[i] : 6627AB8C +index = [1] +...checksum after hashing g_506[i] : CD2D6525 +index = [2] +...checksum after hashing g_506[i] : E3F04DDA +index = [3] +...checksum after hashing g_506[i] : E3EBEAEE +index = [4] +...checksum after hashing g_506[i] : D7C752B7 +index = [5] +...checksum after hashing g_538 : 34D21299 +...checksum after hashing g_553 : 3DCDE2B0 +...checksum after hashing g_587 : E23407B9 +...checksum after hashing g_589 : 73EFBB3A +...checksum after hashing g_592 : EB6E689F +...checksum after hashing g_595 : 90BEE94C +...checksum after hashing g_609[i][j] : 87AC9B25 +index = [0][0] +...checksum after hashing g_609[i][j] : B9E2A530 +index = [0][1] +...checksum after hashing g_609[i][j] : E920293 +index = [0][2] +...checksum after hashing g_609[i][j] : DACC7E58 +index = [0][3] +...checksum after hashing g_609[i][j] : AE603E60 +index = [0][4] +...checksum after hashing g_609[i][j] : 3B545D2C +index = [1][0] +...checksum after hashing g_609[i][j] : 4F7A945A +index = [1][1] +...checksum after hashing g_609[i][j] : 92E6CD68 +index = [1][2] +...checksum after hashing g_609[i][j] : A3B25D1E +index = [1][3] +...checksum after hashing g_609[i][j] : B2715CD8 +index = [1][4] +...checksum after hashing g_609[i][j] : EF195B48 +index = [2][0] +...checksum after hashing g_609[i][j] : 3BDAAF39 +index = [2][1] +...checksum after hashing g_609[i][j] : 6A249638 +index = [2][2] +...checksum after hashing g_609[i][j] : 42FC5C0F +index = [2][3] +...checksum after hashing g_609[i][j] : E2E1B670 +index = [2][4] +...checksum after hashing g_609[i][j] : D999E43A +index = [3][0] +...checksum after hashing g_609[i][j] : C0D773D1 +index = [3][1] +...checksum after hashing g_609[i][j] : 62BD6662 +index = [3][2] +...checksum after hashing g_609[i][j] : FDD07978 +index = [3][3] +...checksum after hashing g_609[i][j] : 48606FED +index = [3][4] +...checksum after hashing g_609[i][j] : 703000 +index = [4][0] +...checksum after hashing g_609[i][j] : A572D42D +index = [4][1] +...checksum after hashing g_609[i][j] : 9C9259E3 +index = [4][2] +...checksum after hashing g_609[i][j] : CF1BEDFD +index = [4][3] +...checksum after hashing g_609[i][j] : 882466CD +index = [4][4] +...checksum after hashing g_609[i][j] : A0E2EC00 +index = [5][0] +...checksum after hashing g_609[i][j] : B4405309 +index = [5][1] +...checksum after hashing g_609[i][j] : D078180C +index = [5][2] +...checksum after hashing g_609[i][j] : EBA44DB9 +index = [5][3] +...checksum after hashing g_609[i][j] : 1A74A261 +index = [5][4] +...checksum after hashing g_609[i][j] : 9543DB1D +index = [6][0] +...checksum after hashing g_609[i][j] : D6B866D5 +index = [6][1] +...checksum after hashing g_609[i][j] : E1835297 +index = [6][2] +...checksum after hashing g_609[i][j] : 5A7E1B46 +index = [6][3] +...checksum after hashing g_609[i][j] : 6BF1581D +index = [6][4] +...checksum after hashing g_609[i][j] : 6D0F1F9B +index = [7][0] +...checksum after hashing g_609[i][j] : 6786CB89 +index = [7][1] +...checksum after hashing g_609[i][j] : 4C5BB4D9 +index = [7][2] +...checksum after hashing g_609[i][j] : 6D5C0818 +index = [7][3] +...checksum after hashing g_609[i][j] : 414CDE8A +index = [7][4] +...checksum after hashing g_609[i][j] : 22F0B897 +index = [8][0] +...checksum after hashing g_609[i][j] : 84209EA7 +index = [8][1] +...checksum after hashing g_609[i][j] : A79F2822 +index = [8][2] +...checksum after hashing g_609[i][j] : 507CF190 +index = [8][3] +...checksum after hashing g_609[i][j] : 1E5860B2 +index = [8][4] +...checksum after hashing g_610 : 9BA49360 +...checksum after hashing g_611[i] : BED05CD +index = [0] +...checksum after hashing g_611[i] : 9CC6675F +index = [1] +...checksum after hashing g_611[i] : D8C7AAB0 +index = [2] +...checksum after hashing g_611[i] : A7064A05 +index = [3] +...checksum after hashing g_611[i] : 3613AEAF +index = [4] +...checksum after hashing g_619[i] : F69F025E +index = [0] +...checksum after hashing g_619[i] : 1475C26F +index = [1] +...checksum after hashing g_619[i] : 27D853D9 +index = [2] +...checksum after hashing g_619[i] : 476933EA +index = [3] +...checksum after hashing g_619[i] : 5D4C5124 +index = [4] +...checksum after hashing g_619[i] : 951CFEC2 +index = [5] +...checksum after hashing g_619[i] : 9B28EDAD +index = [6] +...checksum after hashing g_619[i] : BA9FC921 +index = [7] +...checksum after hashing g_620 : 5FB22913 +...checksum after hashing g_622 : CD17BA09 +...checksum after hashing g_659 : 66667E25 +...checksum after hashing g_797 : 9435C290 +before stmt(6): checksum = 9435C290 +...checksum after hashing g_4 : E4F0F7F3 +...checksum after hashing g_10 : FD65C1F8 +...checksum after hashing g_71 : 460EA95C +...checksum after hashing g_72 : 664199D7 +...checksum after hashing g_108 : 25B6676A +...checksum after hashing g_109 : C1DCC8A7 +...checksum after hashing g_112 : AFAA416D +...checksum after hashing g_128 : FB5F73AD +...checksum after hashing g_144 : BF2390DE +...checksum after hashing g_155 : 8BED9172 +...checksum after hashing g_156[i][j] : 7053B860 +index = [0][0] +...checksum after hashing g_156[i][j] : EDF6F2B9 +index = [0][1] +...checksum after hashing g_156[i][j] : 9669ABE9 +index = [0][2] +...checksum after hashing g_156[i][j] : F078F15 +index = [0][3] +...checksum after hashing g_156[i][j] : 8E5EA5FF +index = [0][4] +...checksum after hashing g_156[i][j] : F380923E +index = [0][5] +...checksum after hashing g_156[i][j] : 2D5A0D58 +index = [0][6] +...checksum after hashing g_156[i][j] : DFE4880C +index = [0][7] +...checksum after hashing g_156[i][j] : 5580D994 +index = [0][8] +...checksum after hashing g_156[i][j] : 4CF690C5 +index = [1][0] +...checksum after hashing g_156[i][j] : 5D0238FD +index = [1][1] +...checksum after hashing g_156[i][j] : A596E020 +index = [1][2] +...checksum after hashing g_156[i][j] : 5479D0DC +index = [1][3] +...checksum after hashing g_156[i][j] : AFFEB1FA +index = [1][4] +...checksum after hashing g_156[i][j] : 3D1FC517 +index = [1][5] +...checksum after hashing g_156[i][j] : 1396ACBB +index = [1][6] +...checksum after hashing g_156[i][j] : 65BAD464 +index = [1][7] +...checksum after hashing g_156[i][j] : C138FBE4 +index = [1][8] +...checksum after hashing g_156[i][j] : C77ED13A +index = [2][0] +...checksum after hashing g_156[i][j] : 7B6F9110 +index = [2][1] +...checksum after hashing g_156[i][j] : 55748F3D +index = [2][2] +...checksum after hashing g_156[i][j] : 6474B0F1 +index = [2][3] +...checksum after hashing g_156[i][j] : 260643D8 +index = [2][4] +...checksum after hashing g_156[i][j] : C965552D +index = [2][5] +...checksum after hashing g_156[i][j] : 1E13ABF7 +index = [2][6] +...checksum after hashing g_156[i][j] : 897235D7 +index = [2][7] +...checksum after hashing g_156[i][j] : CC405312 +index = [2][8] +...checksum after hashing g_156[i][j] : 2A4F1BDA +index = [3][0] +...checksum after hashing g_156[i][j] : 29CE5AC9 +index = [3][1] +...checksum after hashing g_156[i][j] : A1ABBDFF +index = [3][2] +...checksum after hashing g_156[i][j] : 23AF4857 +index = [3][3] +...checksum after hashing g_156[i][j] : 7FA5EF8E +index = [3][4] +...checksum after hashing g_156[i][j] : 60FCA72D +index = [3][5] +...checksum after hashing g_156[i][j] : A7DA2656 +index = [3][6] +...checksum after hashing g_156[i][j] : 3DCDA44B +index = [3][7] +...checksum after hashing g_156[i][j] : 68561A2B +index = [3][8] +...checksum after hashing g_173[i][j] : 50F2A558 +index = [0][0] +...checksum after hashing g_173[i][j] : FA4C5BE5 +index = [0][1] +...checksum after hashing g_173[i][j] : 1914D329 +index = [1][0] +...checksum after hashing g_173[i][j] : 7E9725A0 +index = [1][1] +...checksum after hashing g_173[i][j] : 63A86591 +index = [2][0] +...checksum after hashing g_173[i][j] : 9F22B8E1 +index = [2][1] +...checksum after hashing g_173[i][j] : FB74F979 +index = [3][0] +...checksum after hashing g_173[i][j] : ABB901C7 +index = [3][1] +...checksum after hashing g_173[i][j] : 7A36B60 +index = [4][0] +...checksum after hashing g_173[i][j] : 24D98A3 +index = [4][1] +...checksum after hashing g_173[i][j] : 9EFFB7BE +index = [5][0] +...checksum after hashing g_173[i][j] : DF88A3E5 +index = [5][1] +...checksum after hashing g_173[i][j] : 4651374C +index = [6][0] +...checksum after hashing g_173[i][j] : AA5EADC8 +index = [6][1] +...checksum after hashing g_173[i][j] : E99A8A8F +index = [7][0] +...checksum after hashing g_173[i][j] : 6D47319F +index = [7][1] +...checksum after hashing g_173[i][j] : D549020B +index = [8][0] +...checksum after hashing g_173[i][j] : 6520B090 +index = [8][1] +...checksum after hashing g_177 : AD60EE2 +...checksum after hashing g_192 : 2377E878 +...checksum after hashing g_193 : 529B2F51 +...checksum after hashing g_285 : 7634D50F +...checksum after hashing g_294 : F0291F6F +...checksum after hashing g_343 : 2889784F +...checksum after hashing g_345 : 72458ABA +...checksum after hashing g_346[i] : 8C2C44E4 +index = [0] +...checksum after hashing g_346[i] : 5D971F9D +index = [1] +...checksum after hashing g_346[i] : 52CE33BC +index = [2] +...checksum after hashing g_346[i] : FB328B8 +index = [3] +...checksum after hashing g_346[i] : 908B4EDB +index = [4] +...checksum after hashing g_346[i] : D0F04DD +index = [5] +...checksum after hashing g_346[i] : B5A76F6 +index = [6] +...checksum after hashing g_346[i] : 8AD17984 +index = [7] +...checksum after hashing g_346[i] : 8D1133CF +index = [8] +...checksum after hashing g_362 : CCFCF9D4 +...checksum after hashing g_379 : E53FE218 +...checksum after hashing g_382 : 84843787 +...checksum after hashing g_416 : 940D0F49 +...checksum after hashing g_445 : 4B7C8E69 +...checksum after hashing g_495 : BF9C4849 +...checksum after hashing g_499[i] : 83ED5EC1 +index = [0] +...checksum after hashing g_499[i] : AAE02BE7 +index = [1] +...checksum after hashing g_499[i] : 8A9F979F +index = [2] +...checksum after hashing g_499[i] : 7B995D69 +index = [3] +...checksum after hashing g_506[i] : BAE16372 +index = [0] +...checksum after hashing g_506[i] : 18897AAE +index = [1] +...checksum after hashing g_506[i] : CC6490CB +index = [2] +...checksum after hashing g_506[i] : 30E30E30 +index = [3] +...checksum after hashing g_506[i] : 56C0BAD7 +index = [4] +...checksum after hashing g_506[i] : FB237146 +index = [5] +...checksum after hashing g_538 : 38C9C1E9 +...checksum after hashing g_553 : 79BD4EF4 +...checksum after hashing g_587 : 78AE90A8 +...checksum after hashing g_589 : F8623D7F +...checksum after hashing g_592 : 565B1B0C +...checksum after hashing g_595 : 7E1D7C88 +...checksum after hashing g_609[i][j] : 47C3B83A +index = [0][0] +...checksum after hashing g_609[i][j] : F292AF98 +index = [0][1] +...checksum after hashing g_609[i][j] : 45EB5741 +index = [0][2] +...checksum after hashing g_609[i][j] : 2315B9B6 +index = [0][3] +...checksum after hashing g_609[i][j] : 98BBBC40 +index = [0][4] +...checksum after hashing g_609[i][j] : D4A1B4B1 +index = [1][0] +...checksum after hashing g_609[i][j] : FF1DAC1D +index = [1][1] +...checksum after hashing g_609[i][j] : 5F805728 +index = [1][2] +...checksum after hashing g_609[i][j] : 1E504A29 +index = [1][3] +...checksum after hashing g_609[i][j] : 1F7C776A +index = [1][4] +...checksum after hashing g_609[i][j] : 71B3D540 +index = [2][0] +...checksum after hashing g_609[i][j] : 569A5B7C +index = [2][1] +...checksum after hashing g_609[i][j] : B759B7DB +index = [2][2] +...checksum after hashing g_609[i][j] : DD4A37DC +index = [2][3] +...checksum after hashing g_609[i][j] : 40AD032D +index = [2][4] +...checksum after hashing g_609[i][j] : 477FCD73 +index = [3][0] +...checksum after hashing g_609[i][j] : EC4F320 +index = [3][1] +...checksum after hashing g_609[i][j] : A061A205 +index = [3][2] +...checksum after hashing g_609[i][j] : 9560A1D1 +index = [3][3] +...checksum after hashing g_609[i][j] : 5C351A38 +index = [3][4] +...checksum after hashing g_609[i][j] : 9ED6AE7C +index = [4][0] +...checksum after hashing g_609[i][j] : 9CFCFBDF +index = [4][1] +...checksum after hashing g_609[i][j] : 79E9BBDF +index = [4][2] +...checksum after hashing g_609[i][j] : C32B18E0 +index = [4][3] +...checksum after hashing g_609[i][j] : 4FA8226C +index = [4][4] +...checksum after hashing g_609[i][j] : B0903728 +index = [5][0] +...checksum after hashing g_609[i][j] : 50A40519 +index = [5][1] +...checksum after hashing g_609[i][j] : 75250D18 +index = [5][2] +...checksum after hashing g_609[i][j] : 879B9894 +index = [5][3] +...checksum after hashing g_609[i][j] : DFB42516 +index = [5][4] +...checksum after hashing g_609[i][j] : A725AF4C +index = [6][0] +...checksum after hashing g_609[i][j] : D81533F +index = [6][1] +...checksum after hashing g_609[i][j] : 65645256 +index = [6][2] +...checksum after hashing g_609[i][j] : 6F65B037 +index = [6][3] +...checksum after hashing g_609[i][j] : 92DA22DC +index = [6][4] +...checksum after hashing g_609[i][j] : 4889CCAF +index = [7][0] +...checksum after hashing g_609[i][j] : B1DDC49C +index = [7][1] +...checksum after hashing g_609[i][j] : 163FA737 +index = [7][2] +...checksum after hashing g_609[i][j] : CFB33573 +index = [7][3] +...checksum after hashing g_609[i][j] : 60E6F5AC +index = [7][4] +...checksum after hashing g_609[i][j] : 8B30A549 +index = [8][0] +...checksum after hashing g_609[i][j] : 32A5AC2C +index = [8][1] +...checksum after hashing g_609[i][j] : DEDE5251 +index = [8][2] +...checksum after hashing g_609[i][j] : B02BA4B8 +index = [8][3] +...checksum after hashing g_609[i][j] : 445922D3 +index = [8][4] +...checksum after hashing g_610 : F985D303 +...checksum after hashing g_611[i] : 7DC7C577 +index = [0] +...checksum after hashing g_611[i] : A9AB47C0 +index = [1] +...checksum after hashing g_611[i] : 8349CC6B +index = [2] +...checksum after hashing g_611[i] : 43B0FEB6 +index = [3] +...checksum after hashing g_611[i] : EE7B3648 +index = [4] +...checksum after hashing g_619[i] : 6B1B29DE +index = [0] +...checksum after hashing g_619[i] : 1C656FE3 +index = [1] +...checksum after hashing g_619[i] : 15EE0E0A +index = [2] +...checksum after hashing g_619[i] : 5627588B +index = [3] +...checksum after hashing g_619[i] : 9E1EA7FA +index = [4] +...checksum after hashing g_619[i] : 683E93D6 +index = [5] +...checksum after hashing g_619[i] : 60E2BD97 +index = [6] +...checksum after hashing g_619[i] : 52CFEB04 +index = [7] +...checksum after hashing g_620 : E7FDD38F +...checksum after hashing g_622 : 30897A67 +...checksum after hashing g_659 : FE4160 +...checksum after hashing g_797 : A810C4D +before stmt(6): checksum = A810C4D +...checksum after hashing g_4 : BC93E7A5 +...checksum after hashing g_10 : 2445D354 +...checksum after hashing g_71 : 349A362D +...checksum after hashing g_72 : E8ABFEED +...checksum after hashing g_108 : 5929174B +...checksum after hashing g_109 : 22C9C36E +...checksum after hashing g_112 : A60C5AD6 +...checksum after hashing g_128 : A0DE556C +...checksum after hashing g_144 : 93330299 +...checksum after hashing g_155 : BA3E3DA +...checksum after hashing g_156[i][j] : 2CBBD41F +index = [0][0] +...checksum after hashing g_156[i][j] : 6B1D140C +index = [0][1] +...checksum after hashing g_156[i][j] : A8FBB561 +index = [0][2] +...checksum after hashing g_156[i][j] : B3446A88 +index = [0][3] +...checksum after hashing g_156[i][j] : 77DE6DAC +index = [0][4] +...checksum after hashing g_156[i][j] : 4A662779 +index = [0][5] +...checksum after hashing g_156[i][j] : 52950E65 +index = [0][6] +...checksum after hashing g_156[i][j] : 533BB105 +index = [0][7] +...checksum after hashing g_156[i][j] : E19C5EDA +index = [0][8] +...checksum after hashing g_156[i][j] : F93C9806 +index = [1][0] +...checksum after hashing g_156[i][j] : BDF7506A +index = [1][1] +...checksum after hashing g_156[i][j] : A045425 +index = [1][2] +...checksum after hashing g_156[i][j] : A4EE20C3 +index = [1][3] +...checksum after hashing g_156[i][j] : 91FD6B22 +index = [1][4] +...checksum after hashing g_156[i][j] : B4ADAAEF +index = [1][5] +...checksum after hashing g_156[i][j] : 5158E950 +index = [1][6] +...checksum after hashing g_156[i][j] : DF3E870A +index = [1][7] +...checksum after hashing g_156[i][j] : 60ECE0 +index = [1][8] +...checksum after hashing g_156[i][j] : CF74D6E2 +index = [2][0] +...checksum after hashing g_156[i][j] : 69F4765B +index = [2][1] +...checksum after hashing g_156[i][j] : D4C0B4BD +index = [2][2] +...checksum after hashing g_156[i][j] : BB05D4B1 +index = [2][3] +...checksum after hashing g_156[i][j] : D284FFEB +index = [2][4] +...checksum after hashing g_156[i][j] : 54DAC9DA +index = [2][5] +...checksum after hashing g_156[i][j] : 1C4899F3 +index = [2][6] +...checksum after hashing g_156[i][j] : 96BE76CD +index = [2][7] +...checksum after hashing g_156[i][j] : 6B7F42C7 +index = [2][8] +...checksum after hashing g_156[i][j] : 364D8741 +index = [3][0] +...checksum after hashing g_156[i][j] : 91B14335 +index = [3][1] +...checksum after hashing g_156[i][j] : 13F1D298 +index = [3][2] +...checksum after hashing g_156[i][j] : A3EE6C8E +index = [3][3] +...checksum after hashing g_156[i][j] : 1F670AC5 +index = [3][4] +...checksum after hashing g_156[i][j] : 37BEBECE +index = [3][5] +...checksum after hashing g_156[i][j] : 47A7B9AF +index = [3][6] +...checksum after hashing g_156[i][j] : A77E768 +index = [3][7] +...checksum after hashing g_156[i][j] : E9ACA5F +index = [3][8] +...checksum after hashing g_173[i][j] : FAB8FB8C +index = [0][0] +...checksum after hashing g_173[i][j] : 9CD9BE8 +index = [0][1] +...checksum after hashing g_173[i][j] : 7CFD9718 +index = [1][0] +...checksum after hashing g_173[i][j] : F3F7420A +index = [1][1] +...checksum after hashing g_173[i][j] : FA12D56F +index = [2][0] +...checksum after hashing g_173[i][j] : AB3C4AB7 +index = [2][1] +...checksum after hashing g_173[i][j] : 56A7C5D3 +index = [3][0] +...checksum after hashing g_173[i][j] : A66CADDB +index = [3][1] +...checksum after hashing g_173[i][j] : 4FF06AA4 +index = [4][0] +...checksum after hashing g_173[i][j] : 13314CF0 +index = [4][1] +...checksum after hashing g_173[i][j] : 24FD9C16 +index = [5][0] +...checksum after hashing g_173[i][j] : 7ACD031E +index = [5][1] +...checksum after hashing g_173[i][j] : E5FC17AD +index = [6][0] +...checksum after hashing g_173[i][j] : A8A6FD83 +index = [6][1] +...checksum after hashing g_173[i][j] : FB58719A +index = [7][0] +...checksum after hashing g_173[i][j] : B964CE87 +index = [7][1] +...checksum after hashing g_173[i][j] : C16B283A +index = [8][0] +...checksum after hashing g_173[i][j] : A5057E3F +index = [8][1] +...checksum after hashing g_177 : F778AEAC +...checksum after hashing g_192 : 724C85D0 +...checksum after hashing g_193 : BA95C892 +...checksum after hashing g_285 : 8E331506 +...checksum after hashing g_294 : E0A92A4C +...checksum after hashing g_343 : 9E9AD7CB +...checksum after hashing g_345 : 81B7E6A0 +...checksum after hashing g_346[i] : F07BE1C2 +index = [0] +...checksum after hashing g_346[i] : AB348670 +index = [1] +...checksum after hashing g_346[i] : 55ED9125 +index = [2] +...checksum after hashing g_346[i] : 35CAED5A +index = [3] +...checksum after hashing g_346[i] : 436888CE +index = [4] +...checksum after hashing g_346[i] : 95636AC3 +index = [5] +...checksum after hashing g_346[i] : CE498FAD +index = [6] +...checksum after hashing g_346[i] : A629CED5 +index = [7] +...checksum after hashing g_346[i] : D00CB4CB +index = [8] +...checksum after hashing g_362 : 4D5222D3 +...checksum after hashing g_379 : 530F22A1 +...checksum after hashing g_382 : 8815809D +...checksum after hashing g_416 : A54A757 +...checksum after hashing g_445 : 501FFA43 +...checksum after hashing g_495 : E75E3617 +...checksum after hashing g_499[i] : 6A2C0F00 +index = [0] +...checksum after hashing g_499[i] : 2585AD0 +index = [1] +...checksum after hashing g_499[i] : 46415A8A +index = [2] +...checksum after hashing g_499[i] : 84099DD +index = [3] +...checksum after hashing g_506[i] : 27A1DAF3 +index = [0] +...checksum after hashing g_506[i] : F924CE93 +index = [1] +...checksum after hashing g_506[i] : C0D6F631 +index = [2] +...checksum after hashing g_506[i] : 4A27CF70 +index = [3] +...checksum after hashing g_506[i] : 42FF94F5 +index = [4] +...checksum after hashing g_506[i] : 81CF8358 +index = [5] +...checksum after hashing g_538 : 7C546239 +...checksum after hashing g_553 : 3189658A +...checksum after hashing g_587 : 47BD453 +...checksum after hashing g_589 : 7B6A8588 +...checksum after hashing g_592 : 3ACFC228 +...checksum after hashing g_595 : 823C2833 +...checksum after hashing g_609[i][j] : DE915C19 +index = [0][0] +...checksum after hashing g_609[i][j] : EFA0C302 +index = [0][1] +...checksum after hashing g_609[i][j] : 58AD5C6D +index = [0][2] +...checksum after hashing g_609[i][j] : 81C28B +index = [0][3] +...checksum after hashing g_609[i][j] : 751425E1 +index = [0][4] +...checksum after hashing g_609[i][j] : 2490774D +index = [1][0] +...checksum after hashing g_609[i][j] : DBA4D8B5 +index = [1][1] +...checksum after hashing g_609[i][j] : 8DA3576E +index = [1][2] +...checksum after hashing g_609[i][j] : 765B8951 +index = [1][3] +...checksum after hashing g_609[i][j] : 8283E7A1 +index = [1][4] +...checksum after hashing g_609[i][j] : 3076163C +index = [2][0] +...checksum after hashing g_609[i][j] : 53CC3E4C +index = [2][1] +...checksum after hashing g_609[i][j] : 95E548EC +index = [2][2] +...checksum after hashing g_609[i][j] : 933E6379 +index = [2][3] +...checksum after hashing g_609[i][j] : 8B9ABC13 +index = [2][4] +...checksum after hashing g_609[i][j] : 53840C0 +index = [3][0] +...checksum after hashing g_609[i][j] : CF0463F9 +index = [3][1] +...checksum after hashing g_609[i][j] : 21B7C98E +index = [3][2] +...checksum after hashing g_609[i][j] : A6676505 +index = [3][3] +...checksum after hashing g_609[i][j] : 9334FDBB +index = [3][4] +...checksum after hashing g_609[i][j] : DF579FEC +index = [4][0] +...checksum after hashing g_609[i][j] : 27564DD0 +index = [4][1] +...checksum after hashing g_609[i][j] : E802174C +index = [4][2] +...checksum after hashing g_609[i][j] : 863E7B5B +index = [4][3] +...checksum after hashing g_609[i][j] : FE49CD85 +index = [4][4] +...checksum after hashing g_609[i][j] : 425AEFB0 +index = [5][0] +...checksum after hashing g_609[i][j] : C96C042E +index = [5][1] +...checksum after hashing g_609[i][j] : 93EBD191 +index = [5][2] +...checksum after hashing g_609[i][j] : 8F4910FC +index = [5][3] +...checksum after hashing g_609[i][j] : 73D59F6D +index = [5][4] +...checksum after hashing g_609[i][j] : 70544632 +index = [6][0] +...checksum after hashing g_609[i][j] : EC1607F +index = [6][1] +...checksum after hashing g_609[i][j] : B12D4F1D +index = [6][2] +...checksum after hashing g_609[i][j] : 978BBDA9 +index = [6][3] +...checksum after hashing g_609[i][j] : B4068354 +index = [6][4] +...checksum after hashing g_609[i][j] : 475E6AC2 +index = [7][0] +...checksum after hashing g_609[i][j] : FBA284D9 +index = [7][1] +...checksum after hashing g_609[i][j] : F4C14F4F +index = [7][2] +...checksum after hashing g_609[i][j] : 2F2737F +index = [7][3] +...checksum after hashing g_609[i][j] : 52907B2F +index = [7][4] +...checksum after hashing g_609[i][j] : 2EC505E6 +index = [8][0] +...checksum after hashing g_609[i][j] : 31A2BA80 +index = [8][1] +...checksum after hashing g_609[i][j] : 1780EC53 +index = [8][2] +...checksum after hashing g_609[i][j] : 1362B5E7 +index = [8][3] +...checksum after hashing g_609[i][j] : A4B7F27E +index = [8][4] +...checksum after hashing g_610 : ABFA1BF1 +...checksum after hashing g_611[i] : E3D68942 +index = [0] +...checksum after hashing g_611[i] : 53B0A6A4 +index = [1] +...checksum after hashing g_611[i] : 6B73C630 +index = [2] +...checksum after hashing g_611[i] : D95347F0 +index = [3] +...checksum after hashing g_611[i] : FF022E43 +index = [4] +...checksum after hashing g_619[i] : 3A62BE5A +index = [0] +...checksum after hashing g_619[i] : 64934327 +index = [1] +...checksum after hashing g_619[i] : C1AE77EA +index = [2] +...checksum after hashing g_619[i] : AABF13A4 +index = [3] +...checksum after hashing g_619[i] : 1713C496 +index = [4] +...checksum after hashing g_619[i] : 7295EBDD +index = [5] +...checksum after hashing g_619[i] : 5D909F26 +index = [6] +...checksum after hashing g_619[i] : 89A90710 +index = [7] +...checksum after hashing g_620 : BAD8FDFE +...checksum after hashing g_622 : 2CF02BDA +...checksum after hashing g_659 : 68640D50 +...checksum after hashing g_797 : 4BED0BB2 +before stmt(6): checksum = 4BED0BB2 +...checksum after hashing g_4 : 42F80C0 +...checksum after hashing g_10 : E8EFD3CA +...checksum after hashing g_71 : AF3F7A42 +...checksum after hashing g_72 : 46C36F7C +...checksum after hashing g_108 : 3C4E2C0D +...checksum after hashing g_109 : A3ECA649 +...checksum after hashing g_112 : A7B9A7CB +...checksum after hashing g_128 : 510450C6 +...checksum after hashing g_144 : 643D60C +...checksum after hashing g_155 : A4E7719D +...checksum after hashing g_156[i][j] : 693EC7D +index = [0][0] +...checksum after hashing g_156[i][j] : 56ACF8D0 +index = [0][1] +...checksum after hashing g_156[i][j] : C137496C +index = [0][2] +...checksum after hashing g_156[i][j] : AED1795F +index = [0][3] +...checksum after hashing g_156[i][j] : BD0DE323 +index = [0][4] +...checksum after hashing g_156[i][j] : C5530AEC +index = [0][5] +...checksum after hashing g_156[i][j] : 37A89647 +index = [0][6] +...checksum after hashing g_156[i][j] : FD30E291 +index = [0][7] +...checksum after hashing g_156[i][j] : 6FDEEFE4 +index = [0][8] +...checksum after hashing g_156[i][j] : E51B0013 +index = [1][0] +...checksum after hashing g_156[i][j] : E7F4F0A5 +index = [1][1] +...checksum after hashing g_156[i][j] : 5DC11C3C +index = [1][2] +...checksum after hashing g_156[i][j] : B4F403F2 +index = [1][3] +...checksum after hashing g_156[i][j] : 4EFBE6E0 +index = [1][4] +...checksum after hashing g_156[i][j] : C1326C72 +index = [1][5] +...checksum after hashing g_156[i][j] : 5DE629BD +index = [1][6] +...checksum after hashing g_156[i][j] : 197447B2 +index = [1][7] +...checksum after hashing g_156[i][j] : 3198DCDF +index = [1][8] +...checksum after hashing g_156[i][j] : CEECB00A +index = [2][0] +...checksum after hashing g_156[i][j] : F8FA989A +index = [2][1] +...checksum after hashing g_156[i][j] : A0C64E28 +index = [2][2] +...checksum after hashing g_156[i][j] : 88FA2182 +index = [2][3] +...checksum after hashing g_156[i][j] : AFE185FB +index = [2][4] +...checksum after hashing g_156[i][j] : 6B9BE1A0 +index = [2][5] +...checksum after hashing g_156[i][j] : 71909D2A +index = [2][6] +...checksum after hashing g_156[i][j] : B0097AF0 +index = [2][7] +...checksum after hashing g_156[i][j] : 19AD265D +index = [2][8] +...checksum after hashing g_156[i][j] : A66B52F0 +index = [3][0] +...checksum after hashing g_156[i][j] : 8CEC8D71 +index = [3][1] +...checksum after hashing g_156[i][j] : F0A5E978 +index = [3][2] +...checksum after hashing g_156[i][j] : BA7B0C55 +index = [3][3] +...checksum after hashing g_156[i][j] : CEB829E2 +index = [3][4] +...checksum after hashing g_156[i][j] : C724EA62 +index = [3][5] +...checksum after hashing g_156[i][j] : 1DBC09F2 +index = [3][6] +...checksum after hashing g_156[i][j] : D4C6BD77 +index = [3][7] +...checksum after hashing g_156[i][j] : FB7E46DA +index = [3][8] +...checksum after hashing g_173[i][j] : 3FD56F1A +index = [0][0] +...checksum after hashing g_173[i][j] : 50A11669 +index = [0][1] +...checksum after hashing g_173[i][j] : 1B0A036E +index = [1][0] +...checksum after hashing g_173[i][j] : CF922EE7 +index = [1][1] +...checksum after hashing g_173[i][j] : A82F9DAB +index = [2][0] +...checksum after hashing g_173[i][j] : C31797F8 +index = [2][1] +...checksum after hashing g_173[i][j] : 25983FD8 +index = [3][0] +...checksum after hashing g_173[i][j] : 58ECD666 +index = [3][1] +...checksum after hashing g_173[i][j] : 99CA3C02 +index = [4][0] +...checksum after hashing g_173[i][j] : 5919F1B3 +index = [4][1] +...checksum after hashing g_173[i][j] : AB8E00A2 +index = [5][0] +...checksum after hashing g_173[i][j] : 65C12FC3 +index = [5][1] +...checksum after hashing g_173[i][j] : 21288B94 +index = [6][0] +...checksum after hashing g_173[i][j] : A8D10D8E +index = [6][1] +...checksum after hashing g_173[i][j] : DC8835A6 +index = [7][0] +...checksum after hashing g_173[i][j] : 5038DCF6 +index = [7][1] +...checksum after hashing g_173[i][j] : C292D059 +index = [8][0] +...checksum after hashing g_173[i][j] : 6B360FF4 +index = [8][1] +...checksum after hashing g_177 : 8BB04F4B +...checksum after hashing g_192 : CB542697 +...checksum after hashing g_193 : 57CED85E +...checksum after hashing g_285 : 297AFD92 +...checksum after hashing g_294 : 1C731FA0 +...checksum after hashing g_343 : EF4F9D92 +...checksum after hashing g_345 : 91F2DE6E +...checksum after hashing g_346[i] : DC2867FB +index = [0] +...checksum after hashing g_346[i] : 60E1341D +index = [1] +...checksum after hashing g_346[i] : AA82BEE7 +index = [2] +...checksum after hashing g_346[i] : 15F852EF +index = [3] +...checksum after hashing g_346[i] : 71D8FBF2 +index = [4] +...checksum after hashing g_346[i] : 553B04EB +index = [5] +...checksum after hashing g_346[i] : 80FBBA +index = [6] +...checksum after hashing g_346[i] : 5EFBE2CF +index = [7] +...checksum after hashing g_346[i] : DE976107 +index = [8] +...checksum after hashing g_362 : 8F86FA60 +...checksum after hashing g_379 : 4F6C04DA +...checksum after hashing g_382 : 523AF979 +...checksum after hashing g_416 : 7C732140 +...checksum after hashing g_445 : 1BCA943B +...checksum after hashing g_495 : 16DDF10C +...checksum after hashing g_499[i] : A3C05659 +index = [0] +...checksum after hashing g_499[i] : C743C933 +index = [1] +...checksum after hashing g_499[i] : 3FE64F50 +index = [2] +...checksum after hashing g_499[i] : 93DB420D +index = [3] +...checksum after hashing g_506[i] : 7541A0A6 +index = [0] +...checksum after hashing g_506[i] : 878A1FB1 +index = [1] +...checksum after hashing g_506[i] : C19F03DF +index = [2] +...checksum after hashing g_506[i] : 99348C9A +index = [3] +...checksum after hashing g_506[i] : F7D4C4CC +index = [4] +...checksum after hashing g_506[i] : AD2BA0A9 +index = [5] +...checksum after hashing g_538 : 704FB149 +...checksum after hashing g_553 : 75F9C9CE +...checksum after hashing g_587 : 9EE14342 +...checksum after hashing g_589 : F0E703CD +...checksum after hashing g_592 : 87FAB1BB +...checksum after hashing g_595 : 6C9FBDF7 +...checksum after hashing g_609[i][j] : 1EFE7F06 +index = [0][0] +...checksum after hashing g_609[i][j] : A4D0C9AA +index = [0][1] +...checksum after hashing g_609[i][j] : 13D409BF +index = [0][2] +...checksum after hashing g_609[i][j] : F9580565 +index = [0][3] +...checksum after hashing g_609[i][j] : 43CFA7C1 +index = [0][4] +...checksum after hashing g_609[i][j] : CB659ED0 +index = [1][0] +...checksum after hashing g_609[i][j] : 6BC3E0F2 +index = [1][1] +...checksum after hashing g_609[i][j] : 40C5CD2E +index = [1][2] +...checksum after hashing g_609[i][j] : CBB99E66 +index = [1][3] +...checksum after hashing g_609[i][j] : 2F8ECC13 +index = [1][4] +...checksum after hashing g_609[i][j] : AEDC9834 +index = [2][0] +...checksum after hashing g_609[i][j] : 3E8CCA09 +index = [2][1] +...checksum after hashing g_609[i][j] : 4898690F +index = [2][2] +...checksum after hashing g_609[i][j] : C8808AA +index = [2][3] +...checksum after hashing g_609[i][j] : 29D6094E +index = [2][4] +...checksum after hashing g_609[i][j] : 9BDE6989 +index = [3][0] +...checksum after hashing g_609[i][j] : 117E308 +index = [3][1] +...checksum after hashing g_609[i][j] : E36B0DE9 +index = [3][2] +...checksum after hashing g_609[i][j] : CED7BDAC +index = [3][3] +...checksum after hashing g_609[i][j] : 8761886E +index = [3][4] +...checksum after hashing g_609[i][j] : 41F10190 +index = [4][0] +...checksum after hashing g_609[i][j] : 1ED86222 +index = [4][1] +...checksum after hashing g_609[i][j] : D79F570 +index = [4][2] +...checksum after hashing g_609[i][j] : 8A0E8E46 +index = [4][3] +...checksum after hashing g_609[i][j] : 39C58924 +index = [4][4] +...checksum after hashing g_609[i][j] : 52283498 +index = [5][0] +...checksum after hashing g_609[i][j] : 2D88523E +index = [5][1] +...checksum after hashing g_609[i][j] : 36B6C485 +index = [5][2] +...checksum after hashing g_609[i][j] : E376C5D1 +index = [5][3] +...checksum after hashing g_609[i][j] : B615181A +index = [5][4] +...checksum after hashing g_609[i][j] : 42323263 +index = [6][0] +...checksum after hashing g_609[i][j] : D5F85595 +index = [6][1] +...checksum after hashing g_609[i][j] : 35CA4FDC +index = [6][2] +...checksum after hashing g_609[i][j] : A29016D8 +index = [6][3] +...checksum after hashing g_609[i][j] : 4D2DF995 +index = [6][4] +...checksum after hashing g_609[i][j] : 62D8B9F6 +index = [7][0] +...checksum after hashing g_609[i][j] : 2DF98BCC +index = [7][1] +...checksum after hashing g_609[i][j] : AEA55CA1 +index = [7][2] +...checksum after hashing g_609[i][j] : A01D4E14 +index = [7][3] +...checksum after hashing g_609[i][j] : 733A5009 +index = [7][4] +...checksum after hashing g_609[i][j] : 87051838 +index = [8][0] +...checksum after hashing g_609[i][j] : 8727880B +index = [8][1] +...checksum after hashing g_609[i][j] : 6EC19620 +index = [8][2] +...checksum after hashing g_609[i][j] : F335E0CF +index = [8][3] +...checksum after hashing g_609[i][j] : FEB6B01F +index = [8][4] +...checksum after hashing g_610 : C9DB5B92 +...checksum after hashing g_611[i] : 95FC49F8 +index = [0] +...checksum after hashing g_611[i] : 66DD863B +index = [1] +...checksum after hashing g_611[i] : 30FDA0EB +index = [2] +...checksum after hashing g_611[i] : 3DE5F343 +index = [3] +...checksum after hashing g_611[i] : 276AB6A4 +index = [4] +...checksum after hashing g_619[i] : A7E695DA +index = [0] +...checksum after hashing g_619[i] : 6C83EEAB +index = [1] +...checksum after hashing g_619[i] : F3982A39 +index = [2] +...checksum after hashing g_619[i] : BBF178C5 +index = [3] +...checksum after hashing g_619[i] : D4413248 +index = [4] +...checksum after hashing g_619[i] : 8FB786C9 +index = [5] +...checksum after hashing g_619[i] : A65ACF1C +index = [6] +...checksum after hashing g_619[i] : 61F92535 +index = [7] +...checksum after hashing g_620 : 2970762 +...checksum after hashing g_622 : D16EEBB4 +...checksum after hashing g_659 : EFC3215 +...checksum after hashing g_797 : D559C56F +before stmt(777): checksum = D559C56F +...checksum after hashing g_4 : 42F80C0 +...checksum after hashing g_10 : E8EFD3CA +...checksum after hashing g_71 : AF3F7A42 +...checksum after hashing g_72 : 46C36F7C +...checksum after hashing g_108 : 3C4E2C0D +...checksum after hashing g_109 : A3ECA649 +...checksum after hashing g_112 : A7B9A7CB +...checksum after hashing g_128 : 510450C6 +...checksum after hashing g_144 : 643D60C +...checksum after hashing g_155 : A4E7719D +...checksum after hashing g_156[i][j] : 693EC7D +index = [0][0] +...checksum after hashing g_156[i][j] : 56ACF8D0 +index = [0][1] +...checksum after hashing g_156[i][j] : C137496C +index = [0][2] +...checksum after hashing g_156[i][j] : AED1795F +index = [0][3] +...checksum after hashing g_156[i][j] : BD0DE323 +index = [0][4] +...checksum after hashing g_156[i][j] : C5530AEC +index = [0][5] +...checksum after hashing g_156[i][j] : 37A89647 +index = [0][6] +...checksum after hashing g_156[i][j] : FD30E291 +index = [0][7] +...checksum after hashing g_156[i][j] : 6FDEEFE4 +index = [0][8] +...checksum after hashing g_156[i][j] : E51B0013 +index = [1][0] +...checksum after hashing g_156[i][j] : E7F4F0A5 +index = [1][1] +...checksum after hashing g_156[i][j] : 5DC11C3C +index = [1][2] +...checksum after hashing g_156[i][j] : B4F403F2 +index = [1][3] +...checksum after hashing g_156[i][j] : 4EFBE6E0 +index = [1][4] +...checksum after hashing g_156[i][j] : C1326C72 +index = [1][5] +...checksum after hashing g_156[i][j] : 5DE629BD +index = [1][6] +...checksum after hashing g_156[i][j] : 197447B2 +index = [1][7] +...checksum after hashing g_156[i][j] : 3198DCDF +index = [1][8] +...checksum after hashing g_156[i][j] : CEECB00A +index = [2][0] +...checksum after hashing g_156[i][j] : F8FA989A +index = [2][1] +...checksum after hashing g_156[i][j] : A0C64E28 +index = [2][2] +...checksum after hashing g_156[i][j] : 88FA2182 +index = [2][3] +...checksum after hashing g_156[i][j] : AFE185FB +index = [2][4] +...checksum after hashing g_156[i][j] : 6B9BE1A0 +index = [2][5] +...checksum after hashing g_156[i][j] : 71909D2A +index = [2][6] +...checksum after hashing g_156[i][j] : B0097AF0 +index = [2][7] +...checksum after hashing g_156[i][j] : 19AD265D +index = [2][8] +...checksum after hashing g_156[i][j] : A66B52F0 +index = [3][0] +...checksum after hashing g_156[i][j] : 8CEC8D71 +index = [3][1] +...checksum after hashing g_156[i][j] : F0A5E978 +index = [3][2] +...checksum after hashing g_156[i][j] : BA7B0C55 +index = [3][3] +...checksum after hashing g_156[i][j] : CEB829E2 +index = [3][4] +...checksum after hashing g_156[i][j] : C724EA62 +index = [3][5] +...checksum after hashing g_156[i][j] : 1DBC09F2 +index = [3][6] +...checksum after hashing g_156[i][j] : D4C6BD77 +index = [3][7] +...checksum after hashing g_156[i][j] : FB7E46DA +index = [3][8] +...checksum after hashing g_173[i][j] : 3FD56F1A +index = [0][0] +...checksum after hashing g_173[i][j] : 50A11669 +index = [0][1] +...checksum after hashing g_173[i][j] : 1B0A036E +index = [1][0] +...checksum after hashing g_173[i][j] : CF922EE7 +index = [1][1] +...checksum after hashing g_173[i][j] : A82F9DAB +index = [2][0] +...checksum after hashing g_173[i][j] : C31797F8 +index = [2][1] +...checksum after hashing g_173[i][j] : 25983FD8 +index = [3][0] +...checksum after hashing g_173[i][j] : 58ECD666 +index = [3][1] +...checksum after hashing g_173[i][j] : 99CA3C02 +index = [4][0] +...checksum after hashing g_173[i][j] : 5919F1B3 +index = [4][1] +...checksum after hashing g_173[i][j] : AB8E00A2 +index = [5][0] +...checksum after hashing g_173[i][j] : 65C12FC3 +index = [5][1] +...checksum after hashing g_173[i][j] : 21288B94 +index = [6][0] +...checksum after hashing g_173[i][j] : A8D10D8E +index = [6][1] +...checksum after hashing g_173[i][j] : DC8835A6 +index = [7][0] +...checksum after hashing g_173[i][j] : 5038DCF6 +index = [7][1] +...checksum after hashing g_173[i][j] : C292D059 +index = [8][0] +...checksum after hashing g_173[i][j] : 6B360FF4 +index = [8][1] +...checksum after hashing g_177 : 8BB04F4B +...checksum after hashing g_192 : CB542697 +...checksum after hashing g_193 : 57CED85E +...checksum after hashing g_285 : 297AFD92 +...checksum after hashing g_294 : 1C731FA0 +...checksum after hashing g_343 : EF4F9D92 +...checksum after hashing g_345 : 91F2DE6E +...checksum after hashing g_346[i] : DC2867FB +index = [0] +...checksum after hashing g_346[i] : 60E1341D +index = [1] +...checksum after hashing g_346[i] : AA82BEE7 +index = [2] +...checksum after hashing g_346[i] : 15F852EF +index = [3] +...checksum after hashing g_346[i] : 71D8FBF2 +index = [4] +...checksum after hashing g_346[i] : 553B04EB +index = [5] +...checksum after hashing g_346[i] : 80FBBA +index = [6] +...checksum after hashing g_346[i] : 5EFBE2CF +index = [7] +...checksum after hashing g_346[i] : DE976107 +index = [8] +...checksum after hashing g_362 : 8F86FA60 +...checksum after hashing g_379 : 4F6C04DA +...checksum after hashing g_382 : 523AF979 +...checksum after hashing g_416 : 7C732140 +...checksum after hashing g_445 : 1BCA943B +...checksum after hashing g_495 : 16DDF10C +...checksum after hashing g_499[i] : A3C05659 +index = [0] +...checksum after hashing g_499[i] : C743C933 +index = [1] +...checksum after hashing g_499[i] : 3FE64F50 +index = [2] +...checksum after hashing g_499[i] : 93DB420D +index = [3] +...checksum after hashing g_506[i] : 7541A0A6 +index = [0] +...checksum after hashing g_506[i] : 878A1FB1 +index = [1] +...checksum after hashing g_506[i] : C19F03DF +index = [2] +...checksum after hashing g_506[i] : 99348C9A +index = [3] +...checksum after hashing g_506[i] : F7D4C4CC +index = [4] +...checksum after hashing g_506[i] : AD2BA0A9 +index = [5] +...checksum after hashing g_538 : 704FB149 +...checksum after hashing g_553 : 75F9C9CE +...checksum after hashing g_587 : 9EE14342 +...checksum after hashing g_589 : F0E703CD +...checksum after hashing g_592 : 87FAB1BB +...checksum after hashing g_595 : 6C9FBDF7 +...checksum after hashing g_609[i][j] : 1EFE7F06 +index = [0][0] +...checksum after hashing g_609[i][j] : A4D0C9AA +index = [0][1] +...checksum after hashing g_609[i][j] : 13D409BF +index = [0][2] +...checksum after hashing g_609[i][j] : F9580565 +index = [0][3] +...checksum after hashing g_609[i][j] : 43CFA7C1 +index = [0][4] +...checksum after hashing g_609[i][j] : CB659ED0 +index = [1][0] +...checksum after hashing g_609[i][j] : 6BC3E0F2 +index = [1][1] +...checksum after hashing g_609[i][j] : 40C5CD2E +index = [1][2] +...checksum after hashing g_609[i][j] : CBB99E66 +index = [1][3] +...checksum after hashing g_609[i][j] : 2F8ECC13 +index = [1][4] +...checksum after hashing g_609[i][j] : AEDC9834 +index = [2][0] +...checksum after hashing g_609[i][j] : 3E8CCA09 +index = [2][1] +...checksum after hashing g_609[i][j] : 4898690F +index = [2][2] +...checksum after hashing g_609[i][j] : C8808AA +index = [2][3] +...checksum after hashing g_609[i][j] : 29D6094E +index = [2][4] +...checksum after hashing g_609[i][j] : 9BDE6989 +index = [3][0] +...checksum after hashing g_609[i][j] : 117E308 +index = [3][1] +...checksum after hashing g_609[i][j] : E36B0DE9 +index = [3][2] +...checksum after hashing g_609[i][j] : CED7BDAC +index = [3][3] +...checksum after hashing g_609[i][j] : 8761886E +index = [3][4] +...checksum after hashing g_609[i][j] : 41F10190 +index = [4][0] +...checksum after hashing g_609[i][j] : 1ED86222 +index = [4][1] +...checksum after hashing g_609[i][j] : D79F570 +index = [4][2] +...checksum after hashing g_609[i][j] : 8A0E8E46 +index = [4][3] +...checksum after hashing g_609[i][j] : 39C58924 +index = [4][4] +...checksum after hashing g_609[i][j] : 52283498 +index = [5][0] +...checksum after hashing g_609[i][j] : 2D88523E +index = [5][1] +...checksum after hashing g_609[i][j] : 36B6C485 +index = [5][2] +...checksum after hashing g_609[i][j] : E376C5D1 +index = [5][3] +...checksum after hashing g_609[i][j] : B615181A +index = [5][4] +...checksum after hashing g_609[i][j] : 42323263 +index = [6][0] +...checksum after hashing g_609[i][j] : D5F85595 +index = [6][1] +...checksum after hashing g_609[i][j] : 35CA4FDC +index = [6][2] +...checksum after hashing g_609[i][j] : A29016D8 +index = [6][3] +...checksum after hashing g_609[i][j] : 4D2DF995 +index = [6][4] +...checksum after hashing g_609[i][j] : 62D8B9F6 +index = [7][0] +...checksum after hashing g_609[i][j] : 2DF98BCC +index = [7][1] +...checksum after hashing g_609[i][j] : AEA55CA1 +index = [7][2] +...checksum after hashing g_609[i][j] : A01D4E14 +index = [7][3] +...checksum after hashing g_609[i][j] : 733A5009 +index = [7][4] +...checksum after hashing g_609[i][j] : 87051838 +index = [8][0] +...checksum after hashing g_609[i][j] : 8727880B +index = [8][1] +...checksum after hashing g_609[i][j] : 6EC19620 +index = [8][2] +...checksum after hashing g_609[i][j] : F335E0CF +index = [8][3] +...checksum after hashing g_609[i][j] : FEB6B01F +index = [8][4] +...checksum after hashing g_610 : C9DB5B92 +...checksum after hashing g_611[i] : 95FC49F8 +index = [0] +...checksum after hashing g_611[i] : 66DD863B +index = [1] +...checksum after hashing g_611[i] : 30FDA0EB +index = [2] +...checksum after hashing g_611[i] : 3DE5F343 +index = [3] +...checksum after hashing g_611[i] : 276AB6A4 +index = [4] +...checksum after hashing g_619[i] : A7E695DA +index = [0] +...checksum after hashing g_619[i] : 6C83EEAB +index = [1] +...checksum after hashing g_619[i] : F3982A39 +index = [2] +...checksum after hashing g_619[i] : BBF178C5 +index = [3] +...checksum after hashing g_619[i] : D4413248 +index = [4] +...checksum after hashing g_619[i] : 8FB786C9 +index = [5] +...checksum after hashing g_619[i] : A65ACF1C +index = [6] +...checksum after hashing g_619[i] : 61F92535 +index = [7] +...checksum after hashing g_620 : 2970762 +...checksum after hashing g_622 : D16EEBB4 +...checksum after hashing g_659 : EFC3215 +...checksum after hashing g_797 : D559C56F +checksum = d559c56f diff --git a/src/tests/csmith/rand96.c b/src/tests/csmith/rand96.c new file mode 100644 index 0000000..5ef35e6 --- /dev/null +++ b/src/tests/csmith/rand96.c @@ -0,0 +1,110 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static int g_3[10][3] = {{0xFD5464B5L, 0L, 0xFD5464B5L}, {0xFD5464B5L, 0L, 0xFD5464B5L}, {0xFD5464B5L, 0L, 0xFD5464B5L}, {0xFD5464B5L, 0L, 0xFD5464B5L}, {0xFD5464B5L, 0L, 0xFD5464B5L}, {0xFD5464B5L, 0L, 0xFD5464B5L}, {0xFD5464B5L, 0L, 0xFD5464B5L}, {0xFD5464B5L, 0L, 0xFD5464B5L}, {0xFD5464B5L, 0L, 0xFD5464B5L}, {0xFD5464B5L, 0L, 0xFD5464B5L}}; +static unsigned g_7[3] = {1UL, 1UL, 1UL}; +static int func_1(void); +static int func_1(void) +{ + int *l_2 = &g_3[4][2]; + int *l_4 = &g_3[4][2]; + int *l_5[6][6] = {{&g_3[8][1], &g_3[4][2], &g_3[0][1], &g_3[9][1], (void*)0, &g_3[9][1]}, {&g_3[8][1], &g_3[4][2], &g_3[0][1], &g_3[9][1], (void*)0, &g_3[9][1]}, {&g_3[8][1], &g_3[4][2], &g_3[0][1], &g_3[9][1], (void*)0, &g_3[9][1]}, {&g_3[8][1], &g_3[4][2], &g_3[0][1], &g_3[9][1], (void*)0, &g_3[9][1]}, {&g_3[8][1], &g_3[4][2], &g_3[0][1], &g_3[9][1], (void*)0, &g_3[9][1]}, {&g_3[8][1], &g_3[4][2], &g_3[0][1], &g_3[9][1], (void*)0, &g_3[9][1]}}; + int l_6 = 0x2B013A58L; + int i, j; + step_hash(1); + g_7[1]++; + step_hash(2); + return (*l_4); +} +void csmith_compute_hash(void) +{ + int i, j; + for (i = 0; i < 10; i++) + { + for (j = 0; j < 3; j++) + { + transparent_crc(g_3[i][j], "g_3[i][j]", print_hash_value); + if (print_hash_value) printf("index = [%d][%d]\n", i, j); + } + } + for (i = 0; i < 3; i++) + { + transparent_crc(g_7[i], "g_7[i]", print_hash_value); + if (print_hash_value) printf("index = [%d]\n", i); + } +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int i, j; + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand96.expect b/src/tests/csmith/rand96.expect new file mode 100644 index 0000000..2c5745e --- /dev/null +++ b/src/tests/csmith/rand96.expect @@ -0,0 +1,201 @@ +...checksum after hashing g_3[i][j] : 59ED14B9 +index = [0][0] +...checksum after hashing g_3[i][j] : A376B151 +index = [0][1] +...checksum after hashing g_3[i][j] : D87AC47B +index = [0][2] +...checksum after hashing g_3[i][j] : 2EADC622 +index = [1][0] +...checksum after hashing g_3[i][j] : 79229D30 +index = [1][1] +...checksum after hashing g_3[i][j] : D2664803 +index = [1][2] +...checksum after hashing g_3[i][j] : 6EAB18F6 +index = [2][0] +...checksum after hashing g_3[i][j] : 77854DD2 +index = [2][1] +...checksum after hashing g_3[i][j] : 2567F3A9 +index = [2][2] +...checksum after hashing g_3[i][j] : BFB4A698 +index = [3][0] +...checksum after hashing g_3[i][j] : 5F32F224 +index = [3][1] +...checksum after hashing g_3[i][j] : D659937A +index = [3][2] +...checksum after hashing g_3[i][j] : A6F3C314 +index = [4][0] +...checksum after hashing g_3[i][j] : 6DF2836E +index = [4][1] +...checksum after hashing g_3[i][j] : 74EEAF8A +index = [4][2] +...checksum after hashing g_3[i][j] : 9EB833FC +index = [5][0] +...checksum after hashing g_3[i][j] : F072B739 +index = [5][1] +...checksum after hashing g_3[i][j] : B46BA26F +index = [5][2] +...checksum after hashing g_3[i][j] : AA51BF1B +index = [6][0] +...checksum after hashing g_3[i][j] : FDFD904C +index = [6][1] +...checksum after hashing g_3[i][j] : 17225A9D +index = [6][2] +...checksum after hashing g_3[i][j] : 538D4541 +index = [7][0] +...checksum after hashing g_3[i][j] : 8F24927 +index = [7][1] +...checksum after hashing g_3[i][j] : 33123E7C +index = [7][2] +...checksum after hashing g_3[i][j] : 91D5D2C2 +index = [8][0] +...checksum after hashing g_3[i][j] : 84A8A47 +index = [8][1] +...checksum after hashing g_3[i][j] : B7C1C5D6 +index = [8][2] +...checksum after hashing g_3[i][j] : 4A526677 +index = [9][0] +...checksum after hashing g_3[i][j] : 857267F3 +index = [9][1] +...checksum after hashing g_3[i][j] : 7D1C8E +index = [9][2] +...checksum after hashing g_7[i] : 1BD324DE +index = [0] +...checksum after hashing g_7[i] : 4047C7DF +index = [1] +...checksum after hashing g_7[i] : BACB0921 +index = [2] +before stmt(1): checksum = BACB0921 +...checksum after hashing g_3[i][j] : 59ED14B9 +index = [0][0] +...checksum after hashing g_3[i][j] : A376B151 +index = [0][1] +...checksum after hashing g_3[i][j] : D87AC47B +index = [0][2] +...checksum after hashing g_3[i][j] : 2EADC622 +index = [1][0] +...checksum after hashing g_3[i][j] : 79229D30 +index = [1][1] +...checksum after hashing g_3[i][j] : D2664803 +index = [1][2] +...checksum after hashing g_3[i][j] : 6EAB18F6 +index = [2][0] +...checksum after hashing g_3[i][j] : 77854DD2 +index = [2][1] +...checksum after hashing g_3[i][j] : 2567F3A9 +index = [2][2] +...checksum after hashing g_3[i][j] : BFB4A698 +index = [3][0] +...checksum after hashing g_3[i][j] : 5F32F224 +index = [3][1] +...checksum after hashing g_3[i][j] : D659937A +index = [3][2] +...checksum after hashing g_3[i][j] : A6F3C314 +index = [4][0] +...checksum after hashing g_3[i][j] : 6DF2836E +index = [4][1] +...checksum after hashing g_3[i][j] : 74EEAF8A +index = [4][2] +...checksum after hashing g_3[i][j] : 9EB833FC +index = [5][0] +...checksum after hashing g_3[i][j] : F072B739 +index = [5][1] +...checksum after hashing g_3[i][j] : B46BA26F +index = [5][2] +...checksum after hashing g_3[i][j] : AA51BF1B +index = [6][0] +...checksum after hashing g_3[i][j] : FDFD904C +index = [6][1] +...checksum after hashing g_3[i][j] : 17225A9D +index = [6][2] +...checksum after hashing g_3[i][j] : 538D4541 +index = [7][0] +...checksum after hashing g_3[i][j] : 8F24927 +index = [7][1] +...checksum after hashing g_3[i][j] : 33123E7C +index = [7][2] +...checksum after hashing g_3[i][j] : 91D5D2C2 +index = [8][0] +...checksum after hashing g_3[i][j] : 84A8A47 +index = [8][1] +...checksum after hashing g_3[i][j] : B7C1C5D6 +index = [8][2] +...checksum after hashing g_3[i][j] : 4A526677 +index = [9][0] +...checksum after hashing g_3[i][j] : 857267F3 +index = [9][1] +...checksum after hashing g_3[i][j] : 7D1C8E +index = [9][2] +...checksum after hashing g_7[i] : 1BD324DE +index = [0] +...checksum after hashing g_7[i] : 52F26831 +index = [1] +...checksum after hashing g_7[i] : 34440EC2 +index = [2] +before stmt(2): checksum = 34440EC2 +...checksum after hashing g_3[i][j] : 59ED14B9 +index = [0][0] +...checksum after hashing g_3[i][j] : A376B151 +index = [0][1] +...checksum after hashing g_3[i][j] : D87AC47B +index = [0][2] +...checksum after hashing g_3[i][j] : 2EADC622 +index = [1][0] +...checksum after hashing g_3[i][j] : 79229D30 +index = [1][1] +...checksum after hashing g_3[i][j] : D2664803 +index = [1][2] +...checksum after hashing g_3[i][j] : 6EAB18F6 +index = [2][0] +...checksum after hashing g_3[i][j] : 77854DD2 +index = [2][1] +...checksum after hashing g_3[i][j] : 2567F3A9 +index = [2][2] +...checksum after hashing g_3[i][j] : BFB4A698 +index = [3][0] +...checksum after hashing g_3[i][j] : 5F32F224 +index = [3][1] +...checksum after hashing g_3[i][j] : D659937A +index = [3][2] +...checksum after hashing g_3[i][j] : A6F3C314 +index = [4][0] +...checksum after hashing g_3[i][j] : 6DF2836E +index = [4][1] +...checksum after hashing g_3[i][j] : 74EEAF8A +index = [4][2] +...checksum after hashing g_3[i][j] : 9EB833FC +index = [5][0] +...checksum after hashing g_3[i][j] : F072B739 +index = [5][1] +...checksum after hashing g_3[i][j] : B46BA26F +index = [5][2] +...checksum after hashing g_3[i][j] : AA51BF1B +index = [6][0] +...checksum after hashing g_3[i][j] : FDFD904C +index = [6][1] +...checksum after hashing g_3[i][j] : 17225A9D +index = [6][2] +...checksum after hashing g_3[i][j] : 538D4541 +index = [7][0] +...checksum after hashing g_3[i][j] : 8F24927 +index = [7][1] +...checksum after hashing g_3[i][j] : 33123E7C +index = [7][2] +...checksum after hashing g_3[i][j] : 91D5D2C2 +index = [8][0] +...checksum after hashing g_3[i][j] : 84A8A47 +index = [8][1] +...checksum after hashing g_3[i][j] : B7C1C5D6 +index = [8][2] +...checksum after hashing g_3[i][j] : 4A526677 +index = [9][0] +...checksum after hashing g_3[i][j] : 857267F3 +index = [9][1] +...checksum after hashing g_3[i][j] : 7D1C8E +index = [9][2] +...checksum after hashing g_7[i] : 1BD324DE +index = [0] +...checksum after hashing g_7[i] : 52F26831 +index = [1] +...checksum after hashing g_7[i] : 34440EC2 +index = [2] +checksum = 34440ec2 diff --git a/src/tests/csmith/rand97.c b/src/tests/csmith/rand97.c new file mode 100644 index 0000000..93ca5c9 --- /dev/null +++ b/src/tests/csmith/rand97.c @@ -0,0 +1,99 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static unsigned short g_2[9] = {65535UL, 65535UL, 0x55BBL, 65535UL, 65535UL, 0x55BBL, 65535UL, 65535UL, 0x55BBL}; +static int g_4 = 0L; +static unsigned short func_1(void); +static unsigned short func_1(void) +{ + int *l_3 = &g_4; + step_hash(1); + (*l_3) ^= g_2[4]; + step_hash(2); + return g_2[1]; +} +void csmith_compute_hash(void) +{ + int i; + for (i = 0; i < 9; i++) + { + transparent_crc(g_2[i], "g_2[i]", print_hash_value); + if (print_hash_value) printf("index = [%d]\n", i); + } + transparent_crc(g_4, "g_4", print_hash_value); +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int i; + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand97.expect b/src/tests/csmith/rand97.expect new file mode 100644 index 0000000..736cbab --- /dev/null +++ b/src/tests/csmith/rand97.expect @@ -0,0 +1,60 @@ +...checksum after hashing g_2[i] : 41D9ED00 +index = [0] +...checksum after hashing g_2[i] : B1C2A1A3 +index = [1] +...checksum after hashing g_2[i] : 438E4DB6 +index = [2] +...checksum after hashing g_2[i] : 4B57473A +index = [3] +...checksum after hashing g_2[i] : BF6E3D0B +index = [4] +...checksum after hashing g_2[i] : DA52E32A +index = [5] +...checksum after hashing g_2[i] : CB79C8BF +index = [6] +...checksum after hashing g_2[i] : 693FADB3 +index = [7] +...checksum after hashing g_2[i] : 3397265B +index = [8] +...checksum after hashing g_4 : 80581026 +before stmt(1): checksum = 80581026 +...checksum after hashing g_2[i] : 41D9ED00 +index = [0] +...checksum after hashing g_2[i] : B1C2A1A3 +index = [1] +...checksum after hashing g_2[i] : 438E4DB6 +index = [2] +...checksum after hashing g_2[i] : 4B57473A +index = [3] +...checksum after hashing g_2[i] : BF6E3D0B +index = [4] +...checksum after hashing g_2[i] : DA52E32A +index = [5] +...checksum after hashing g_2[i] : CB79C8BF +index = [6] +...checksum after hashing g_2[i] : 693FADB3 +index = [7] +...checksum after hashing g_2[i] : 3397265B +index = [8] +...checksum after hashing g_4 : E0C5223A +before stmt(2): checksum = E0C5223A +...checksum after hashing g_2[i] : 41D9ED00 +index = [0] +...checksum after hashing g_2[i] : B1C2A1A3 +index = [1] +...checksum after hashing g_2[i] : 438E4DB6 +index = [2] +...checksum after hashing g_2[i] : 4B57473A +index = [3] +...checksum after hashing g_2[i] : BF6E3D0B +index = [4] +...checksum after hashing g_2[i] : DA52E32A +index = [5] +...checksum after hashing g_2[i] : CB79C8BF +index = [6] +...checksum after hashing g_2[i] : 693FADB3 +index = [7] +...checksum after hashing g_2[i] : 3397265B +index = [8] +...checksum after hashing g_4 : E0C5223A +checksum = e0c5223a diff --git a/src/tests/csmith/rand98.c b/src/tests/csmith/rand98.c new file mode 100644 index 0000000..286ef3a --- /dev/null +++ b/src/tests/csmith/rand98.c @@ -0,0 +1,103 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static int g_5 = (-1L); +static int *g_4 = &g_5; +static unsigned short func_1(void); +static int * func_2(int * p_3); +static unsigned short func_1(void) +{ + int **l_10 = &g_4; + unsigned l_11 = 7UL; + step_hash(4); + (*l_10) = func_2(g_4); + step_hash(5); + return l_11; +} +static int * func_2(int * p_3) +{ + unsigned short l_6 = 6UL; + int *l_9 = &g_5; + step_hash(2); + ++l_6; + step_hash(3); + return l_9; +} +void csmith_compute_hash(void) +{ + transparent_crc(g_5, "g_5", print_hash_value); +} +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} +int main (void) +{ + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand98.expect b/src/tests/csmith/rand98.expect new file mode 100644 index 0000000..1fc93f7 --- /dev/null +++ b/src/tests/csmith/rand98.expect @@ -0,0 +1,10 @@ +...checksum after hashing g_5 : FFFFFFFF +before stmt(4): checksum = FFFFFFFF +...checksum after hashing g_5 : FFFFFFFF +before stmt(2): checksum = FFFFFFFF +...checksum after hashing g_5 : FFFFFFFF +before stmt(3): checksum = FFFFFFFF +...checksum after hashing g_5 : FFFFFFFF +before stmt(5): checksum = FFFFFFFF +...checksum after hashing g_5 : FFFFFFFF +checksum = ffffffff diff --git a/src/tests/csmith/rand99.c b/src/tests/csmith/rand99.c new file mode 100644 index 0000000..f1eea27 --- /dev/null +++ b/src/tests/csmith/rand99.c @@ -0,0 +1,1592 @@ +#include +int print_hash_value = 1; +static void platform_main_begin(void) +{ +} +static unsigned crc32_tab[256]; +static unsigned crc32_context = 0xFFFFFFFFUL; +static void +crc32_gentab (void) +{ + unsigned crc; + unsigned poly = 0xEDB88320UL; + int i, j; + for (i = 0; i < 256; i++) { + crc = i; + for (j = 8; j > 0; j--) { + if (crc & 1) { + crc = (crc >> 1) ^ poly; + } else { + crc >>= 1; + } + } + crc32_tab[i] = crc; + } +} +static void +crc32_byte (unsigned char b) { + crc32_context = + ((crc32_context >> 8) & 0x00FFFFFF) ^ + crc32_tab[(crc32_context ^ b) & 0xFF]; +} +extern int strcmp ( char *, char *); +static void +crc32_8bytes (unsigned val) +{ + crc32_byte ((val>>0) & 0xff); + crc32_byte ((val>>8) & 0xff); + crc32_byte ((val>>16) & 0xff); + crc32_byte ((val>>24) & 0xff); +} +static void +transparent_crc (unsigned val, char* vname, int flag) +{ + crc32_8bytes(val); + if (flag) { + printf("...checksum after hashing %s : %X\n", vname, crc32_context ^ 0xFFFFFFFFU); + } +} +static void +platform_main_end (int x, int flag) +{ + if (!flag) printf ("checksum = %x\n", x); +} +static long __undefined; +void csmith_compute_hash(void); +void step_hash(int stmt_id); +static int g_6 = 0x398070ADL; +static signed char g_14 = 0L; +static unsigned short g_17 = 0UL; +static int g_85[5] = {(-10L), (-10L), (-10L), (-10L), (-10L)}; +static int *g_129 = &g_85[1]; +static unsigned g_201[3] = {1UL, 1UL, 1UL}; +static unsigned short g_451 = 1UL; +static unsigned g_470 = 0x50F2087BL; +static int g_557 = 0xA0172E6EL; +static unsigned short g_643[8][3] = {{0x4692L, 0x42ABL, 0x4692L}, {0x4692L, 0x42ABL, 0x4692L}, {0x4692L, 0x42ABL, 0x4692L}, {0x4692L, 0x42ABL, 0x4692L}, {0x4692L, 0x42ABL, 0x4692L}, {0x4692L, 0x42ABL, 0x4692L}, {0x4692L, 0x42ABL, 0x4692L}, {0x4692L, 0x42ABL, 0x4692L}}; +static unsigned short g_651 = 0UL; +static int g_661[3] = {(-5L), (-5L), (-5L)}; +static int **g_698 = &g_129; +static int ***g_697 = &g_698; +static int g_812 = 0xD28761F7L; +static short g_838 = 1L; +static int g_860[10][10] = {{0x07B9BE07L, 1L, (-10L), 0x13DA5BC7L, 0xB7184757L, 0xCBA38D5AL, 0xB7184757L, 0x13DA5BC7L, (-10L), 1L}, {0x07B9BE07L, 1L, (-10L), 0x13DA5BC7L, 0xB7184757L, 0xCBA38D5AL, 0xB7184757L, 0x13DA5BC7L, (-10L), 1L}, {0x07B9BE07L, 1L, (-10L), 0x13DA5BC7L, 0xB7184757L, 0xCBA38D5AL, 0xB7184757L, 0x13DA5BC7L, (-10L), 1L}, {0x07B9BE07L, 1L, (-10L), 0x13DA5BC7L, 0xB7184757L, 0xCBA38D5AL, 0xB7184757L, 0x13DA5BC7L, (-10L), 1L}, {0x07B9BE07L, 1L, (-10L), 0x13DA5BC7L, 0xB7184757L, 0xCBA38D5AL, 0xB7184757L, 0x13DA5BC7L, (-10L), 1L}, {0x07B9BE07L, 1L, (-10L), 0x13DA5BC7L, 0xB7184757L, 0xCBA38D5AL, 0xB7184757L, 0x13DA5BC7L, (-10L), 1L}, {0x07B9BE07L, 1L, (-10L), 0x13DA5BC7L, 0xB7184757L, 0xCBA38D5AL, 0xB7184757L, 0x13DA5BC7L, (-10L), 1L}, {0x07B9BE07L, 1L, (-10L), 0x13DA5BC7L, 0xB7184757L, 0xCBA38D5AL, 0xB7184757L, 0x13DA5BC7L, (-10L), 1L}, {0x07B9BE07L, 1L, (-10L), 0x13DA5BC7L, 0xB7184757L, 0xCBA38D5AL, 0xB7184757L, 0x13DA5BC7L, (-10L), 1L}, {0x07B9BE07L, 1L, (-10L), 0x13DA5BC7L, 0xB7184757L, 0xCBA38D5AL, 0xB7184757L, 0x13DA5BC7L, (-10L), 1L}}; +static int ***g_871 = &g_698; +static int g_912 = 0x1F364B07L; +static int g_949 = 0x875127CDL; +static unsigned func_1(void); +static int * func_31(unsigned p_32, unsigned char p_33, int * p_34, int * p_35, unsigned p_36); +static short func_39(int * p_40, int p_41, int * p_42, int * p_43, unsigned char p_44); +static int * func_45(int * p_46, int * p_47); +static int * func_48(unsigned p_49, int * p_50, short p_51); +static int * func_53(int * p_54, int * p_55); +static int * func_56(int * p_57, int * p_58, int * p_59, int * p_60); +static int * func_61(unsigned char p_62, int * p_63); +static unsigned func_64(int * p_65, int * p_66, int p_67); +static unsigned char func_74(int * p_75, unsigned short p_76); +static unsigned func_1(void) +{ + int *l_2 = (void*)0; + int *l_3 = (void*)0; + int *l_4 = (void*)0; + int *l_5 = &g_6; + int *l_7 = &g_6; + int *l_8 = &g_6; + int l_9[4][9] = {{0x666A756AL, 0L, 0x666A756AL, 0L, 0x666A756AL, 0L, 0x666A756AL, 0L, 0x666A756AL}, {0x666A756AL, 0L, 0x666A756AL, 0L, 0x666A756AL, 0L, 0x666A756AL, 0L, 0x666A756AL}, {0x666A756AL, 0L, 0x666A756AL, 0L, 0x666A756AL, 0L, 0x666A756AL, 0L, 0x666A756AL}, {0x666A756AL, 0L, 0x666A756AL, 0L, 0x666A756AL, 0L, 0x666A756AL, 0L, 0x666A756AL}}; + int *l_10 = &l_9[1][8]; + int *l_11 = &l_9[1][8]; + int *l_12 = &l_9[1][8]; + int *l_13 = &l_9[1][8]; + int *l_15 = &g_6; + int *l_16[8] = {&l_9[1][8], &l_9[1][8], &l_9[1][8], &l_9[1][8], &l_9[1][8], &l_9[1][8], &l_9[1][8], &l_9[1][8]}; + unsigned char l_20 = 0xB6L; + short l_23[8][5] = {{0xF11BL, 0L, 0xF11BL, 0L, 0xF11BL}, {0xF11BL, 0L, 0xF11BL, 0L, 0xF11BL}, {0xF11BL, 0L, 0xF11BL, 0L, 0xF11BL}, {0xF11BL, 0L, 0xF11BL, 0L, 0xF11BL}, {0xF11BL, 0L, 0xF11BL, 0L, 0xF11BL}, {0xF11BL, 0L, 0xF11BL, 0L, 0xF11BL}, {0xF11BL, 0L, 0xF11BL, 0L, 0xF11BL}, {0xF11BL, 0L, 0xF11BL, 0L, 0xF11BL}}; + short l_589[7][7] = {{0L, 1L, 1L, (-4L), (-10L), 0x953AL, (-1L)}, {0L, 1L, 1L, (-4L), (-10L), 0x953AL, (-1L)}, {0L, 1L, 1L, (-4L), (-10L), 0x953AL, (-1L)}, {0L, 1L, 1L, (-4L), (-10L), 0x953AL, (-1L)}, {0L, 1L, 1L, (-4L), (-10L), 0x953AL, (-1L)}, {0L, 1L, 1L, (-4L), (-10L), 0x953AL, (-1L)}, {0L, 1L, 1L, (-4L), (-10L), 0x953AL, (-1L)}}; + unsigned char l_824 = 0xBCL; + unsigned l_855 = 0xB672D4EBL; + int ***l_872 = &g_698; + int l_907 = 4L; + short l_932 = (-5L); + int l_933[2]; + int i, j; + for (i = 0; i < 2; i++) + l_933[i] = 1L; + step_hash(1); + --g_17; + step_hash(673); + if ((l_20 > ((((short)l_23[6][3] << (short)8) ^ g_14) && g_6))) + { + unsigned l_26 = 0UL; + int *l_615 = (void*)0; + unsigned l_806 = 0xBF119F23L; + int l_822 = (-1L); + int *l_827 = &g_812; + short l_828 = 9L; + int *l_859 = &g_6; + signed char l_879 = 0L; + int **l_938 = &l_827; + int *l_948 = (void*)0; + step_hash(664); + for (g_6 = 0; (g_6 <= (-15)); g_6 -= 2) + { + int *l_77 = &g_6; + int l_817 = (-10L); + int l_819[8][5] = {{1L, 0x3F151C09L, (-1L), 0L, 0L}, {1L, 0x3F151C09L, (-1L), 0L, 0L}, {1L, 0x3F151C09L, (-1L), 0L, 0L}, {1L, 0x3F151C09L, (-1L), 0L, 0L}, {1L, 0x3F151C09L, (-1L), 0L, 0L}, {1L, 0x3F151C09L, (-1L), 0L, 0L}, {1L, 0x3F151C09L, (-1L), 0L, 0L}, {1L, 0x3F151C09L, (-1L), 0L, 0L}}; + short l_930 = 0x8F86L; + int i, j; + } + step_hash(669); + for (g_6 = (-12); (g_6 < 14); g_6 += 4) + { + step_hash(668); + return (*l_827); + } + step_hash(670); + (*l_11) |= (func_39(func_56((**g_697), (*g_698), (**l_872), (**l_872)), func_74((**g_697), g_860[5][2]), (**l_872), (*l_938), g_949) != (**l_938)); + } + else + { + step_hash(672); + (**g_697) = (*g_698); + } + step_hash(674); + return g_949; +} +static int * func_31(unsigned p_32, unsigned char p_33, int * p_34, int * p_35, unsigned p_36) +{ + int l_808 = 0L; + int *l_814 = &g_85[1]; + step_hash(580); + if ((***g_697)) + { + int *l_807 = (void*)0; + int *l_811 = &g_812; + step_hash(576); + (*g_698) = l_807; + step_hash(577); + (*l_811) ^= func_39((*g_698), ((signed char)1L + (signed char)(g_661[1] > (6UL <= ((p_32 != 1UL) >= 8L)))), l_807, l_807, p_33); + } + else + { + int *l_813 = &g_85[0]; + step_hash(579); + (**g_697) = l_813; + } + step_hash(581); + return l_814; +} +static short func_39(int * p_40, int p_41, int * p_42, int * p_43, unsigned char p_44) +{ + int ***l_793 = &g_698; + int *l_794 = (void*)0; + int *l_795 = &g_661[1]; + int *l_796 = &g_661[1]; + int *l_797 = &g_661[0]; + int l_798 = 0x0569EFD0L; + int *l_799 = &g_85[0]; + int *l_800 = &l_798; + int *l_801 = &g_85[1]; + int *l_802[3][10] = {{&g_85[0], &g_557, (void*)0, (void*)0, (void*)0, &g_557, &g_85[0], &g_661[1], &g_85[1], &g_661[1]}, {&g_85[0], &g_557, (void*)0, (void*)0, (void*)0, &g_557, &g_85[0], &g_661[1], &g_85[1], &g_661[1]}, {&g_85[0], &g_557, (void*)0, (void*)0, (void*)0, &g_557, &g_85[0], &g_661[1], &g_85[1], &g_661[1]}}; + unsigned l_803 = 0xC69B6AE2L; + int i, j; + step_hash(571); + for (g_557 = 2; (g_557 >= 0); g_557 -= 1) + { + int *l_791 = &g_661[1]; + step_hash(570); + for (p_41 = 0; (p_41 <= 2); p_41 += 1) + { + int ***l_792[8]; + int i, j; + for (i = 0; i < 8; i++) + l_792[i] = &g_698; + step_hash(567); + g_661[g_557] = func_74(l_791, (l_792[1] == l_793)); + step_hash(568); + g_85[(g_557 + 2)] = func_74(func_56((**l_793), (**l_793), func_56(&p_41, l_791, (*g_698), (**l_793)), &p_41), g_661[p_41]); + step_hash(569); + if (g_643[(g_557 + 4)][g_557]) + continue; + } + } + step_hash(572); + l_803--; + step_hash(573); + return g_85[1]; +} +static int * func_45(int * p_46, int * p_47) +{ + unsigned char l_714 = 0xE9L; + int l_732[10] = {0xFE724599L, 0x680FE581L, 0xFE724599L, 0x680FE581L, 0xFE724599L, 0x680FE581L, 0xFE724599L, 0x680FE581L, 0xFE724599L, 0x680FE581L}; + unsigned char l_753 = 1UL; + int **l_778 = &g_129; + int i; + step_hash(492); + for (g_651 = 13; (g_651 < 32); g_651++) + { + int *l_709 = &g_85[1]; + int *l_710 = &g_661[1]; + int *l_711 = (void*)0; + int *l_712 = &g_557; + int *l_713 = &g_557; + step_hash(491); + --l_714; + } + step_hash(551); + for (l_714 = 12; (l_714 > 6); l_714 -= 5) + { + unsigned short l_724 = 65534UL; + int l_731 = 0x1CC7F592L; + int l_756 = 0xCC4C32D2L; + unsigned l_775 = 0x24917C87L; + unsigned char l_785 = 0x56L; + step_hash(510); + for (g_470 = 0; (g_470 < 41); g_470 += 2) + { + int *l_722 = &g_557; + int *l_723[7] = {(void*)0, &g_85[1], (void*)0, &g_85[1], (void*)0, &g_85[1], (void*)0}; + int i; + step_hash(508); + for (g_451 = 0; (g_451 <= 2); g_451 += 1) + { + int *l_721[1]; + int i; + for (i = 0; i < 1; i++) + l_721[i] = &g_85[2]; + step_hash(506); + for (g_17 = 0; (g_17 <= 2); g_17 += 1) + { + step_hash(505); + return l_721[0]; + } + step_hash(507); + (*p_46) = g_201[g_451]; + } + step_hash(509); + --l_724; + } + step_hash(550); + for (g_14 = 0; (g_14 <= (-23)); g_14--) + { + int *l_729 = (void*)0; + int *l_730[9][7] = {{&g_85[1], &g_557, &g_661[1], &g_557, &g_661[1], &g_661[1], &g_661[1]}, {&g_85[1], &g_557, &g_661[1], &g_557, &g_661[1], &g_661[1], &g_661[1]}, {&g_85[1], &g_557, &g_661[1], &g_557, &g_661[1], &g_661[1], &g_661[1]}, {&g_85[1], &g_557, &g_661[1], &g_557, &g_661[1], &g_661[1], &g_661[1]}, {&g_85[1], &g_557, &g_661[1], &g_557, &g_661[1], &g_661[1], &g_661[1]}, {&g_85[1], &g_557, &g_661[1], &g_557, &g_661[1], &g_661[1], &g_661[1]}, {&g_85[1], &g_557, &g_661[1], &g_557, &g_661[1], &g_661[1], &g_661[1]}, {&g_85[1], &g_557, &g_661[1], &g_557, &g_661[1], &g_661[1], &g_661[1]}, {&g_85[1], &g_557, &g_661[1], &g_557, &g_661[1], &g_661[1], &g_661[1]}}; + unsigned char l_733 = 1UL; + unsigned l_761[2][6] = {{0x2507D538L, 0UL, 0x2507D538L, 0UL, 0x2507D538L, 0UL}, {0x2507D538L, 0UL, 0x2507D538L, 0UL, 0x2507D538L, 0UL}}; + int i, j; + step_hash(514); + l_733--; + step_hash(515); + (*g_129) = (*p_47); + step_hash(549); + if (((unsigned char)((+l_732[5]) == (0xDD0182C3L == l_724)) + (unsigned char)(((func_74(&l_731, g_14) < l_731) ^ ((signed char)((unsigned short)g_14 >> (unsigned short)l_724) + (signed char)l_732[9])) <= (-1L)))) + { + int l_742 = 0x643BF55BL; + int l_754 = 0x8EE163EAL; + int l_758 = 9L; + int l_760[2][1]; + int i, j; + for (i = 0; i < 2; i++) + { + for (j = 0; j < 1; j++) + l_760[i][j] = 0x2AF04588L; + } + step_hash(517); + l_742 ^= func_74(p_46, l_731); + step_hash(518); + (**g_697) = p_46; + step_hash(533); + if (((unsigned char)((*p_47) ^ (l_742 > l_732[7])) % (unsigned char)((short)func_74(&l_731, l_742) << (short)(-(unsigned short)(((((unsigned char)g_557 % (unsigned char)l_742) && ((short)g_557 - (short)g_451)) >= l_742) || l_714))))) + { + unsigned short l_752 = 0xC4A7L; + int l_755 = 1L; + int l_757 = 9L; + int l_759[1][2]; + int i, j; + for (i = 0; i < 1; i++) + { + for (j = 0; j < 2; j++) + l_759[i][j] = 0x555FD7F3L; + } + step_hash(520); + (**g_697) = func_56((**g_697), (**g_697), &l_731, func_61((!246UL), p_46)); + step_hash(528); + for (g_557 = 2; (g_557 >= 0); g_557 -= 1) + { + int i, j; + step_hash(524); + l_752 ^= g_201[g_557]; + step_hash(525); + l_753 |= l_724; + step_hash(526); + l_731 &= (l_742 < func_74((*g_698), g_201[2])); + step_hash(527); + l_731 &= 0x71248A86L; + } + step_hash(529); + --l_761[0][3]; + } + else + { + unsigned l_764 = 9UL; + step_hash(531); + ++l_764; + step_hash(532); + (*g_129) = l_731; + } + step_hash(534); + (*g_698) = p_46; + } + else + { + step_hash(547); + for (g_651 = (-20); (g_651 < 3); g_651 += 4) + { + unsigned short l_786 = 0xAD64L; + unsigned l_787 = 0xDB5C09E6L; + step_hash(539); + (*p_46) = ((int)(((short)((short)l_775 >> (short)0) >> (short)((((g_651 || (((((signed char)1L * (signed char)((*g_697) == l_778)) || 65535UL) || 6UL) & g_85[3])) <= l_756) < 1L) <= 0xCCL)) | 0x39L) - (int)(-5L)); + step_hash(545); + for (g_17 = 1; (g_17 <= 4); g_17 += 1) + { + int i; + step_hash(543); + g_85[g_17] = 0x920823ADL; + step_hash(544); + return p_46; + } + step_hash(546); + l_731 ^= ((signed char)(((signed char)(((l_756 && func_74((**g_697), g_6)) >= l_785) || l_786) << (signed char)7) || (((void*)0 != (**g_697)) <= g_643[5][1])) >> (signed char)l_787); + } + step_hash(548); + if ((***g_697)) + break; + } + } + } + step_hash(552); + (*g_697) = l_778; + step_hash(558); + for (l_714 = (-19); (l_714 >= 2); l_714++) + { + step_hash(556); + (**l_778) = 0x880B1029L; + step_hash(557); + return (*g_698); + } + step_hash(559); + return p_47; +} + + + + + + + +static int * func_48(unsigned p_49, int * p_50, short p_51) +{ + int **l_621 = (void*)0; + int **l_622[1]; + int l_625[5][7] = {{1L, 0x9FF9039AL, 0L, 0x0161932AL, 0x0161932AL, 0L, 0x9FF9039AL}, {1L, 0x9FF9039AL, 0L, 0x0161932AL, 0x0161932AL, 0L, 0x9FF9039AL}, {1L, 0x9FF9039AL, 0L, 0x0161932AL, 0x0161932AL, 0L, 0x9FF9039AL}, {1L, 0x9FF9039AL, 0L, 0x0161932AL, 0x0161932AL, 0L, 0x9FF9039AL}, {1L, 0x9FF9039AL, 0L, 0x0161932AL, 0x0161932AL, 0L, 0x9FF9039AL}}; + int l_684 = 0x1A97AF11L; + int i, j; + for (i = 0; i < 1; i++) + l_622[i] = (void*)0; + step_hash(430); + g_129 = func_61(p_51, &g_85[1]); + step_hash(431); + (*p_50) = (p_51 != (p_51 >= ((((unsigned short)l_625[3][6] >> (unsigned short)0) <= ((int)func_74(p_50, p_51) - (int)p_49)) >= (+(p_50 != (void*)0))))); + step_hash(432); + g_129 = p_50; + step_hash(485); + for (g_451 = 0; (g_451 < 22); g_451 += 7) + { + short l_644 = 0xC3D7L; + int l_648[7][1] = {{0x93B0BB7EL}, {0x93B0BB7EL}, {0x93B0BB7EL}, {0x93B0BB7EL}, {0x93B0BB7EL}, {0x93B0BB7EL}, {0x93B0BB7EL}}; + short l_650 = 8L; + int i, j; + step_hash(450); + for (g_17 = 1; (g_17 <= 4); g_17 += 1) + { + int i, j; + step_hash(443); + for (g_470 = 0; (g_470 <= 0); g_470 += 1) + { + int l_632[6]; + int i, j; + for (i = 0; i < 6; i++) + l_632[i] = (-3L); + step_hash(442); + l_632[4] &= ((signed char)l_625[g_17][(g_470 + 3)] * (signed char)g_85[(g_470 + 1)]); + } + step_hash(448); + for (g_14 = 0; (g_14 <= 4); g_14 += 1) + { + int ***l_633 = &l_621; + step_hash(447); + (*l_633) = &p_50; + } + step_hash(449); + l_625[g_17][g_17] = ((signed char)(((((void*)0 != &p_50) <= l_625[g_17][(g_17 + 1)]) < (-(short)g_85[g_17])) & (-5L)) / (signed char)((unsigned short)g_85[g_17] % (unsigned short)((unsigned char)(g_85[2] == ((unsigned short)(g_6 && ((g_201[2] >= g_85[g_17]) ^ 0L)) % (unsigned short)g_643[5][1])) >> (unsigned char)l_644))); + } + step_hash(451); + g_557 &= (0x2A768312L == ((signed char)p_49 >> (signed char)((p_50 != p_50) < (*g_129)))); + step_hash(484); + if ((*g_129)) + { + signed char l_647 = 0xBBL; + int l_649[9][1] = {{(-1L)}, {(-1L)}, {(-1L)}, {(-1L)}, {(-1L)}, {(-1L)}, {(-1L)}, {(-1L)}, {(-1L)}}; + short l_680 = (-9L); + int i, j; + step_hash(453); + (*p_50) |= (&p_50 != &g_129); + step_hash(454); + ++g_651; + step_hash(472); + for (p_49 = (-11); (p_49 <= 19); p_49 += 8) + { + signed char l_656 = 0x30L; + int l_657 = 0xD5A127C5L; + unsigned short l_658 = 0x5D8DL; + int l_662 = 6L; + int l_673[2][2]; + int i, j; + for (i = 0; i < 2; i++) + { + for (j = 0; j < 2; j++) + l_673[i][j] = 0x7B3202F8L; + } + step_hash(458); + l_658++; + step_hash(470); + if (l_648[5][0]) + { + unsigned short l_663 = 65535UL; + step_hash(460); + if (l_644) + break; + step_hash(461); + ++l_663; + } + else + { + unsigned l_666 = 4294967292UL; + int l_669 = (-1L); + int l_670 = 0L; + int l_671 = 0L; + int l_672 = 0xFD532E8AL; + int l_674 = 0xA05175F2L; + int l_675 = 0x14CF6733L; + int l_676 = 0L; + int l_677[1]; + signed char l_678[6] = {0x3CL, 0x3CL, 0x1AL, 0x3CL, 0x3CL, 0x1AL}; + int l_679 = 0x57E8D400L; + unsigned short l_681 = 0xBA8BL; + int i; + for (i = 0; i < 1; i++) + l_677[i] = 0L; + step_hash(467); + for (l_644 = 0; (l_644 <= 2); l_644 += 1) + { + step_hash(466); + ++l_666; + } + step_hash(468); + l_681--; + step_hash(469); + return &g_557; + } + step_hash(471); + (*g_129) = 0x69CB4F15L; + } + step_hash(473); + if (l_684) + continue; + } + else + { + unsigned char l_699 = 2UL; + int ***l_706 = &l_622[0]; + step_hash(475); + l_648[5][0] ^= ((unsigned char)((short)((unsigned char)255UL >> (unsigned char)0) * (short)((p_49 < ((short)1L << (short)0)) & ((short)((void*)0 == &g_557) - (short)g_557))) << (unsigned char)(((short)(func_74(&l_648[4][0], (g_697 != (void*)0)) >= 4294967295UL) * (short)l_699) < p_49)); + step_hash(481); + for (p_51 = 14; (p_51 >= (-2)); p_51 -= 5) + { + step_hash(479); + (*g_698) = (*g_698); + step_hash(480); + return (*g_698); + } + step_hash(482); + (*p_50) = (((short)p_49 << (short)(g_470 > (*p_50))) || ((func_74((*g_698), (g_85[0] | p_49)) == ((int)l_699 + (int)(&g_698 == l_706))) | p_49)); + step_hash(483); + (**g_698) |= 0xF3FD9127L; + } + } + step_hash(486); + return p_50; +} + + + + + + + +static int * func_53(int * p_54, int * p_55) +{ + unsigned char l_616 = 1UL; + int *l_617 = &g_6; + int **l_618 = &l_617; + int *l_619 = &g_85[3]; + step_hash(427); + (*l_618) = func_61(l_616, l_617); + step_hash(428); + return l_619; +} + + + + + + + +static int * func_56(int * p_57, int * p_58, int * p_59, int * p_60) +{ + unsigned l_614 = 0UL; + step_hash(424); + l_614 = g_6; + step_hash(425); + return &g_557; +} + + + + + + + +static int * func_61(unsigned char p_62, int * p_63) +{ + unsigned char l_590[8][6] = {{1UL, 0xA1L, 255UL, 0xA1L, 1UL, 1UL}, {1UL, 0xA1L, 255UL, 0xA1L, 1UL, 1UL}, {1UL, 0xA1L, 255UL, 0xA1L, 1UL, 1UL}, {1UL, 0xA1L, 255UL, 0xA1L, 1UL, 1UL}, {1UL, 0xA1L, 255UL, 0xA1L, 1UL, 1UL}, {1UL, 0xA1L, 255UL, 0xA1L, 1UL, 1UL}, {1UL, 0xA1L, 255UL, 0xA1L, 1UL, 1UL}, {1UL, 0xA1L, 255UL, 0xA1L, 1UL, 1UL}}; + int *l_591[6][3] = {{&g_85[1], &g_85[1], &g_6}, {&g_85[1], &g_85[1], &g_6}, {&g_85[1], &g_85[1], &g_6}, {&g_85[1], &g_85[1], &g_6}, {&g_85[1], &g_85[1], &g_6}, {&g_85[1], &g_85[1], &g_6}}; + unsigned l_592[3]; + signed char l_613 = 0x65L; + int i, j; + for (i = 0; i < 3; i++) + l_592[i] = 1UL; + step_hash(402); + g_85[1] ^= l_590[3][3]; + step_hash(403); + l_592[2]--; + step_hash(421); + if (((unsigned char)((g_201[2] != (((void*)0 != &g_85[3]) && 4L)) != 0x3DL) - (unsigned char)g_201[2])) + { + unsigned l_599[10][9] = {{1UL, 0x8FA0CE26L, 0x8C594E2CL, 0x8FA0CE26L, 1UL, 0x363F3F98L, 1UL, 0x8FA0CE26L, 0x8C594E2CL}, {1UL, 0x8FA0CE26L, 0x8C594E2CL, 0x8FA0CE26L, 1UL, 0x363F3F98L, 1UL, 0x8FA0CE26L, 0x8C594E2CL}, {1UL, 0x8FA0CE26L, 0x8C594E2CL, 0x8FA0CE26L, 1UL, 0x363F3F98L, 1UL, 0x8FA0CE26L, 0x8C594E2CL}, {1UL, 0x8FA0CE26L, 0x8C594E2CL, 0x8FA0CE26L, 1UL, 0x363F3F98L, 1UL, 0x8FA0CE26L, 0x8C594E2CL}, {1UL, 0x8FA0CE26L, 0x8C594E2CL, 0x8FA0CE26L, 1UL, 0x363F3F98L, 1UL, 0x8FA0CE26L, 0x8C594E2CL}, {1UL, 0x8FA0CE26L, 0x8C594E2CL, 0x8FA0CE26L, 1UL, 0x363F3F98L, 1UL, 0x8FA0CE26L, 0x8C594E2CL}, {1UL, 0x8FA0CE26L, 0x8C594E2CL, 0x8FA0CE26L, 1UL, 0x363F3F98L, 1UL, 0x8FA0CE26L, 0x8C594E2CL}, {1UL, 0x8FA0CE26L, 0x8C594E2CL, 0x8FA0CE26L, 1UL, 0x363F3F98L, 1UL, 0x8FA0CE26L, 0x8C594E2CL}, {1UL, 0x8FA0CE26L, 0x8C594E2CL, 0x8FA0CE26L, 1UL, 0x363F3F98L, 1UL, 0x8FA0CE26L, 0x8C594E2CL}, {1UL, 0x8FA0CE26L, 0x8C594E2CL, 0x8FA0CE26L, 1UL, 0x363F3F98L, 1UL, 0x8FA0CE26L, 0x8C594E2CL}}; + int l_600 = 6L; + int l_604 = 1L; + int l_605[10]; + unsigned short l_606[4][5] = {{65530UL, 4UL, 2UL, 2UL, 4UL}, {65530UL, 4UL, 2UL, 2UL, 4UL}, {65530UL, 4UL, 2UL, 2UL, 4UL}, {65530UL, 4UL, 2UL, 2UL, 4UL}}; + int i, j; + for (i = 0; i < 10; i++) + l_605[i] = 0x3E6D9348L; + step_hash(411); + for (p_62 = 0; (p_62 > 32); p_62++) + { + short l_601 = 2L; + int l_602 = 0xAB720FC4L; + int l_603 = (-1L); + step_hash(408); + l_599[8][1] = (*p_63); + step_hash(409); + if ((*p_63)) + break; + step_hash(410); + l_606[2][2]--; + } + } + else + { + int l_609 = 0xF07253B9L; + int **l_610 = &l_591[5][1]; + step_hash(413); + l_609 = (((g_470 ^ l_609) != (&g_129 == (void*)0)) <= p_62); + step_hash(414); + (*l_610) = p_63; + step_hash(420); + for (g_557 = (-23); (g_557 == 4); g_557++) + { + step_hash(418); + (*l_610) = p_63; + step_hash(419); + if (l_613) + continue; + } + } + step_hash(422); + return l_591[5][1]; +} + + + + + + + +static unsigned func_64(int * p_65, int * p_66, int p_67) +{ + unsigned char l_86 = 0UL; + int l_94 = 3L; + int l_95 = (-1L); + int l_103 = (-4L); + int l_105 = 6L; + unsigned short l_106 = 0UL; + unsigned short l_123[2][10]; + unsigned short l_252[4][8] = {{65527UL, 0x2812L, 65527UL, 0x6F82L, 0xC98EL, 1UL, 65528UL, 65528UL}, {65527UL, 0x2812L, 65527UL, 0x6F82L, 0xC98EL, 1UL, 65528UL, 65528UL}, {65527UL, 0x2812L, 65527UL, 0x6F82L, 0xC98EL, 1UL, 65528UL, 65528UL}, {65527UL, 0x2812L, 65527UL, 0x6F82L, 0xC98EL, 1UL, 65528UL, 65528UL}}; + int l_307[4]; + int **l_397[9] = {&g_129, &g_129, &g_129, &g_129, &g_129, &g_129, &g_129, &g_129, &g_129}; + int l_415 = 0xDDAF827EL; + unsigned short l_463 = 0x126FL; + unsigned l_480[8] = {4294967295UL, 0xA103C6BBL, 4294967295UL, 0xA103C6BBL, 4294967295UL, 0xA103C6BBL, 4294967295UL, 0xA103C6BBL}; + int l_531 = (-6L); + int l_563 = 1L; + int i, j; + for (i = 0; i < 2; i++) + { + for (j = 0; j < 10; j++) + l_123[i][j] = 1UL; + } + for (i = 0; i < 4; i++) + l_307[i] = 0x824BA821L; + step_hash(136); + if (l_86) + { + int *l_87 = &g_85[1]; + int l_90 = 0xE6E27DFDL; + int l_96 = (-1L); + int l_97 = 5L; + int l_98 = 0x5FFFC42EL; + int l_100 = (-8L); + int l_101 = 0xB503A71BL; + int l_102 = 0L; + int l_104[6] = {0L, 0L, 0x6993EB33L, 0L, 0L, 0x6993EB33L}; + int l_200[6][7] = {{0xF0944A39L, 7L, 0xF0944A39L, (-1L), (-1L), 1L, 0xDCD2CF26L}, {0xF0944A39L, 7L, 0xF0944A39L, (-1L), (-1L), 1L, 0xDCD2CF26L}, {0xF0944A39L, 7L, 0xF0944A39L, (-1L), (-1L), 1L, 0xDCD2CF26L}, {0xF0944A39L, 7L, 0xF0944A39L, (-1L), (-1L), 1L, 0xDCD2CF26L}, {0xF0944A39L, 7L, 0xF0944A39L, (-1L), (-1L), 1L, 0xDCD2CF26L}, {0xF0944A39L, 7L, 0xF0944A39L, (-1L), (-1L), 1L, 0xDCD2CF26L}}; + int l_250[2][8]; + int i, j; + for (i = 0; i < 2; i++) + { + for (j = 0; j < 8; j++) + l_250[i][j] = 7L; + } + step_hash(22); + if ((*p_66)) + { + step_hash(19); + l_87 = &g_6; + } + else + { + step_hash(21); + (*p_65) ^= (((void*)0 != &g_85[2]) >= g_6); + } + step_hash(29); + for (p_67 = 0; (p_67 != (-8)); p_67 -= 6) + { + int *l_91 = &l_90; + int *l_92 = &g_85[1]; + int *l_93[2]; + short l_99 = 0xDAE5L; + int i; + for (i = 0; i < 2; i++) + l_93[i] = &g_85[1]; + step_hash(26); + if (l_86) + break; + step_hash(27); + ++l_106; + step_hash(28); + (*l_91) &= g_85[1]; + } + step_hash(72); + if ((-(unsigned)((short)(-(unsigned short)((((unsigned short)((unsigned)(*l_87) / (unsigned)p_67) * (unsigned short)l_106) <= (((unsigned short)((void*)0 != &l_98) * (unsigned short)65532UL) | (&g_6 != (void*)0))) == 0xBA4768E4L)) >> (short)1))) + { + int l_121 = 0xE71BBE26L; + int **l_135 = &l_87; + step_hash(47); + for (l_103 = 3; (l_103 >= 1); l_103 -= 1) + { + step_hash(46); + for (l_90 = 5; (l_90 >= 1); l_90 -= 1) + { + int **l_119 = &l_87; + int *l_122[9]; + int i; + for (i = 0; i < 9; i++) + l_122[i] = &l_102; + step_hash(37); + (*l_119) = &l_104[(l_103 + 2)]; + step_hash(44); + for (l_95 = 4; (l_95 >= 1); l_95 -= 1) + { + int **l_120 = &l_87; + int i; + step_hash(41); + l_104[l_90] = 0xEF1402E7L; + step_hash(42); + g_85[l_95] = (g_85[l_103] && ((p_65 == (void*)0) > ((((0UL ^ ((void*)0 != l_120)) | ((-1L) > (**l_119))) >= 0x88L) && (-2L)))); + step_hash(43); + g_85[l_95] = (*p_66); + } + step_hash(45); + ++l_123[1][3]; + } + } + step_hash(59); + for (g_17 = 0; (g_17 >= 50); g_17 += 7) + { + int **l_128[10][7] = {{&l_87, (void*)0, &l_87, &l_87, (void*)0, &l_87, &l_87}, {&l_87, (void*)0, &l_87, &l_87, (void*)0, &l_87, &l_87}, {&l_87, (void*)0, &l_87, &l_87, (void*)0, &l_87, &l_87}, {&l_87, (void*)0, &l_87, &l_87, (void*)0, &l_87, &l_87}, {&l_87, (void*)0, &l_87, &l_87, (void*)0, &l_87, &l_87}, {&l_87, (void*)0, &l_87, &l_87, (void*)0, &l_87, &l_87}, {&l_87, (void*)0, &l_87, &l_87, (void*)0, &l_87, &l_87}, {&l_87, (void*)0, &l_87, &l_87, (void*)0, &l_87, &l_87}, {&l_87, (void*)0, &l_87, &l_87, (void*)0, &l_87, &l_87}, {&l_87, (void*)0, &l_87, &l_87, (void*)0, &l_87, &l_87}}; + int i, j; + step_hash(51); + g_129 = p_65; + step_hash(52); + (*p_65) ^= func_74(&g_6, ((signed char)(0xF5L & g_85[0]) / (signed char)g_17)); + step_hash(58); + for (l_98 = 0; (l_98 >= 3); ++l_98) + { + unsigned l_134[1][5]; + int i, j; + for (i = 0; i < 1; i++) + { + for (j = 0; j < 5; j++) + l_134[i][j] = 0xE3D09CE0L; + } + step_hash(56); + (*p_65) = l_134[0][1]; + step_hash(57); + (*p_65) ^= (~func_74(&g_85[1], (*l_87))); + } + } + step_hash(60); + (*l_135) = p_65; + } + else + { + unsigned char l_149 = 1UL; + step_hash(66); + for (l_97 = 0; (l_97 >= (-4)); --l_97) + { + unsigned l_138[8]; + int i; + for (i = 0; i < 8; i++) + l_138[i] = 0x9EBF9289L; + step_hash(65); + ++l_138[2]; + } + step_hash(71); + for (l_94 = 0; (l_94 < (-20)); l_94--) + { + int *l_143 = &l_102; + int *l_144 = &l_98; + int l_145 = (-4L); + int *l_146 = &l_97; + int *l_147 = &g_85[3]; + int *l_148[9] = {&l_103, (void*)0, &l_103, (void*)0, &l_103, (void*)0, &l_103, (void*)0, &l_103}; + int i; + step_hash(70); + ++l_149; + } + } + step_hash(120); + if (func_74(&l_103, p_67)) + { + step_hash(83); + if ((&g_129 != (void*)0)) + { + int l_157[10][7] = {{0xE1307C17L, 0xBB96E4AEL, 0xBB96E4AEL, 0xE1307C17L, 7L, 1L, 0x2C2F114CL}, {0xE1307C17L, 0xBB96E4AEL, 0xBB96E4AEL, 0xE1307C17L, 7L, 1L, 0x2C2F114CL}, {0xE1307C17L, 0xBB96E4AEL, 0xBB96E4AEL, 0xE1307C17L, 7L, 1L, 0x2C2F114CL}, {0xE1307C17L, 0xBB96E4AEL, 0xBB96E4AEL, 0xE1307C17L, 7L, 1L, 0x2C2F114CL}, {0xE1307C17L, 0xBB96E4AEL, 0xBB96E4AEL, 0xE1307C17L, 7L, 1L, 0x2C2F114CL}, {0xE1307C17L, 0xBB96E4AEL, 0xBB96E4AEL, 0xE1307C17L, 7L, 1L, 0x2C2F114CL}, {0xE1307C17L, 0xBB96E4AEL, 0xBB96E4AEL, 0xE1307C17L, 7L, 1L, 0x2C2F114CL}, {0xE1307C17L, 0xBB96E4AEL, 0xBB96E4AEL, 0xE1307C17L, 7L, 1L, 0x2C2F114CL}, {0xE1307C17L, 0xBB96E4AEL, 0xBB96E4AEL, 0xE1307C17L, 7L, 1L, 0x2C2F114CL}, {0xE1307C17L, 0xBB96E4AEL, 0xBB96E4AEL, 0xE1307C17L, 7L, 1L, 0x2C2F114CL}}; + int i, j; + step_hash(79); + for (l_94 = 0; (l_94 != 2); ++l_94) + { + int **l_154[4] = {(void*)0, &l_87, (void*)0, &l_87}; + int i; + step_hash(78); + l_87 = p_65; + } + step_hash(80); + (*p_65) = ((*g_129) | ((unsigned short)0UL * (unsigned short)l_157[5][0])); + } + else + { + int **l_158 = &l_87; + step_hash(82); + (*l_158) = p_65; + } + } + else + { + unsigned l_163 = 0x06447CF2L; + int *l_166 = &l_94; + unsigned l_179 = 2UL; + int l_187 = 1L; + int l_188 = 6L; + int l_189 = 0L; + int l_242 = 0L; + step_hash(118); + if (((signed char)p_67 * (signed char)g_85[0])) + { + signed char l_186 = 1L; + step_hash(96); + for (g_17 = (-24); (g_17 > 56); g_17 += 3) + { + unsigned char l_180 = 0x42L; + int l_190 = 0x11735A46L; + unsigned l_191 = 5UL; + step_hash(95); + if (l_163) + { + int **l_164 = &l_87; + unsigned l_165 = 4294967295UL; + signed char l_181[6]; + int i; + for (i = 0; i < 6; i++) + l_181[i] = 0x05L; + step_hash(90); + (*l_164) = p_65; + step_hash(91); + l_165 = (-3L); + step_hash(92); + l_181[3] ^= (func_74(l_166, ((short)((unsigned char)(0L > ((signed char)(((*l_166) | (((signed char)0x36L << (signed char)(((void*)0 != l_164) > ((*g_129) != ((unsigned char)((unsigned short)((void*)0 == &p_66) << (unsigned short)l_179) * (unsigned char)g_85[1])))) >= (*g_129))) != 0x7270L) % (signed char)p_67)) << (unsigned char)l_86) * (short)l_180)) || p_67); + } + else + { + int *l_182 = &l_103; + int *l_183 = &l_102; + int *l_184 = &l_102; + int *l_185[3][2] = {{&l_101, &l_104[0]}, {&l_101, &l_104[0]}, {&l_101, &l_104[0]}}; + int i, j; + step_hash(94); + --l_191; + } + } + step_hash(97); + (*g_129) = ((int)(*g_129) / (int)p_67); + } + else + { + int l_202 = 0L; + int l_237 = 0x4C6D56EDL; + int l_238 = 2L; + int l_244[1][8]; + short l_251 = 0xC65BL; + int i, j; + for (i = 0; i < 1; i++) + { + for (j = 0; j < 8; j++) + l_244[i][j] = 0xD06CCA62L; + } + step_hash(99); + (*g_129) = (l_105 == 0UL); + step_hash(115); + for (l_163 = 20; (l_163 == 46); l_163 += 5) + { + signed char l_230 = 0x66L; + int *l_231 = &g_85[1]; + int l_239 = 0xD871682DL; + int l_240 = 0xD00192FCL; + int l_241 = 7L; + int l_243 = 0xB1182683L; + int l_245 = 3L; + unsigned char l_246 = 0x27L; + int *l_249[2][9] = {{&l_202, &l_101, &l_202, &l_101, &l_202, &l_101, &l_202, &l_101, &l_202}, {&l_202, &l_101, &l_202, &l_101, &l_202, &l_101, &l_202, &l_101, &l_202}}; + int i, j; + step_hash(103); + (*l_166) &= ((1L == func_74(p_65, (*l_87))) || ((void*)0 == &p_65)); + step_hash(104); + l_103 |= ((unsigned char)l_200[0][5] >> (unsigned char)((g_201[2] & (0xADL > ((-5L) != func_74(p_65, l_202)))) > (((unsigned short)g_17 << (unsigned short)15) ^ ((int)l_86 / (int)0x38762AC0L)))); + step_hash(113); + if (((g_6 && (p_67 || ((signed char)((unsigned char)g_85[3] - (unsigned char)0x6CL) + (signed char)((~p_67) && ((unsigned short)(p_67 & ((void*)0 == &l_87)) + (unsigned short)(((6L > (*g_129)) > 0xD2L) ^ 0x485C87E2L)))))) < p_67)) + { + int **l_213 = (void*)0; + int **l_214[4]; + int i; + for (i = 0; i < 4; i++) + l_214[i] = &l_166; + step_hash(106); + g_129 = &l_202; + step_hash(107); + return p_67; + } + else + { + int **l_215 = &l_87; + int *l_234 = (void*)0; + int *l_235 = &l_102; + int *l_236[1][7]; + int i, j; + for (i = 0; i < 1; i++) + { + for (j = 0; j < 7; j++) + l_236[i][j] = (void*)0; + } + step_hash(109); + (*l_215) = p_65; + step_hash(110); + (*p_65) = (((((signed char)(!p_67) + (signed char)(((unsigned short)((*p_66) & ((short)((unsigned short)func_74(p_65, (**l_215)) / (unsigned short)(**l_215)) - (short)((short)((short)p_67 / (short)((signed char)(g_201[0] <= 0x9E74L) % (signed char)p_67)) - (short)p_67))) << (unsigned short)14) > l_230)) | l_202) & 0x3ED3L) > g_6); + step_hash(111); + (*l_166) = (((*p_66) >= ((l_231 != &l_105) > ((signed char)func_74(p_66, ((void*)0 == p_66)) * (signed char)g_201[2]))) < g_14); + step_hash(112); + l_246++; + } + step_hash(114); + --l_252[1][4]; + } + step_hash(116); + l_94 = (p_67 >= (((~g_85[1]) || l_86) == ((unsigned short)p_67 - (unsigned short)(((l_103 ^ (&g_6 == &g_6)) > (0x9F68L == ((unsigned short)g_17 * (unsigned short)3UL))) || 0xF5L)))); + step_hash(117); + return l_251; + } + step_hash(119); + (*g_129) = (*p_66); + } + } + else + { + unsigned l_263 = 0x4AD94989L; + int **l_266 = &g_129; + step_hash(134); + for (p_67 = 0; (p_67 <= 4); p_67 += 1) + { + int **l_259 = &g_129; + int i; + step_hash(125); + (*l_259) = &g_85[p_67]; + step_hash(126); + l_259 = &p_65; + step_hash(132); + if (((short)g_17 / (short)func_74(p_65, p_67))) + { + step_hash(128); + (*l_259) = (*l_259); + } + else + { + int *l_262[6][3] = {{&l_94, &l_94, &g_85[p_67]}, {&l_94, &l_94, &g_85[p_67]}, {&l_94, &l_94, &g_85[p_67]}, {&l_94, &l_94, &g_85[p_67]}, {&l_94, &l_94, &g_85[p_67]}, {&l_94, &l_94, &g_85[p_67]}}; + int i, j; + step_hash(130); + l_263++; + step_hash(131); + (*p_65) = (&g_85[1] == &g_85[4]); + } + step_hash(133); + return p_67; + } + step_hash(135); + (*l_266) = p_65; + } + step_hash(398); + if (func_74(&l_103, (p_67 && (+func_74(&g_6, g_85[1]))))) + { + short l_285 = (-6L); + int l_287[7][4] = {{(-1L), (-1L), 0x5ADCCE1AL, (-1L)}, {(-1L), (-1L), 0x5ADCCE1AL, (-1L)}, {(-1L), (-1L), 0x5ADCCE1AL, (-1L)}, {(-1L), (-1L), 0x5ADCCE1AL, (-1L)}, {(-1L), (-1L), 0x5ADCCE1AL, (-1L)}, {(-1L), (-1L), 0x5ADCCE1AL, (-1L)}, {(-1L), (-1L), 0x5ADCCE1AL, (-1L)}}; + int l_344 = 1L; + int **l_394 = (void*)0; + short l_396 = 0L; + int *l_402 = &l_287[5][3]; + int l_414 = 0x6F42F22EL; + int i, j; + step_hash(284); + if ((((unsigned short)g_201[0] * (unsigned short)(&g_129 != &p_66)) & g_85[1])) + { + int l_271 = 0L; + int **l_393[10] = {&g_129, (void*)0, &g_129, (void*)0, &g_129, (void*)0, &g_129, (void*)0, &g_129, (void*)0}; + int l_435[7][1] = {{1L}, {1L}, {1L}, {1L}, {1L}, {1L}, {1L}}; + int i, j; + step_hash(212); + if ((((int)(l_271 < ((void*)0 == &p_66)) + (int)g_85[1]) ^ (((unsigned short)((&p_65 != (void*)0) != (((unsigned short)(g_17 > (((short)(!(((l_106 & 0xBACDL) > l_252[1][4]) != l_103)) * (short)65535UL) == g_201[1])) - (unsigned short)0UL) <= p_67)) + (unsigned short)p_67) >= l_95))) + { + unsigned l_278[8] = {8UL, 8UL, 0x4E592116L, 8UL, 8UL, 0x4E592116L, 8UL, 8UL}; + int l_284 = 0x76AEA6EAL; + int l_286[9][4] = {{1L, 1L, 5L, 0xB7B0CE8AL}, {1L, 1L, 5L, 0xB7B0CE8AL}, {1L, 1L, 5L, 0xB7B0CE8AL}, {1L, 1L, 5L, 0xB7B0CE8AL}, {1L, 1L, 5L, 0xB7B0CE8AL}, {1L, 1L, 5L, 0xB7B0CE8AL}, {1L, 1L, 5L, 0xB7B0CE8AL}, {1L, 1L, 5L, 0xB7B0CE8AL}, {1L, 1L, 5L, 0xB7B0CE8AL}}; + unsigned short l_288 = 0x4845L; + unsigned l_291 = 0x12271815L; + signed char l_324 = 7L; + int i, j; + step_hash(144); + if (l_278[7]) + { + unsigned l_279 = 4294967293UL; + step_hash(141); + l_279++; + } + else + { + step_hash(143); + return p_67; + } + step_hash(172); + if ((func_74(p_66, g_201[2]) <= l_271)) + { + int l_282[4][3] = {{1L, 0x5E0FD3B0L, 0x33A1D277L}, {1L, 0x5E0FD3B0L, 0x33A1D277L}, {1L, 0x5E0FD3B0L, 0x33A1D277L}, {1L, 0x5E0FD3B0L, 0x33A1D277L}}; + int *l_283[9] = {(void*)0, &l_103, (void*)0, &l_103, (void*)0, &l_103, (void*)0, &l_103, (void*)0}; + int i, j; + step_hash(151); + for (g_17 = 0; (g_17 <= 2); g_17 += 1) + { + int i; + step_hash(149); + l_282[2][0] = func_74(p_66, g_201[g_17]); + step_hash(150); + (*g_129) = (*p_65); + } + step_hash(152); + --l_288; + } + else + { + unsigned l_294 = 0x9CD487A2L; + int *l_330 = (void*)0; + step_hash(154); + l_271 = l_291; + step_hash(162); + if (((signed char)l_294 - (signed char)((unsigned)((int)(0x43E5D3A1L | ((((unsigned char)0UL % (unsigned char)((signed char)g_14 << (signed char)l_271)) != (g_85[2] >= ((signed char)((unsigned char)l_307[0] % (unsigned char)l_286[6][2]) >> (signed char)((signed char)((~((unsigned)(&g_85[1] != p_66) + (unsigned)1L)) && l_294) >> (signed char)0)))) & 5UL)) % (int)l_294) % (unsigned)(*g_129)))) + { + unsigned l_325 = 1UL; + step_hash(156); + (*p_65) |= (+((func_74(&l_271, p_67) == ((signed char)(-5L) + (signed char)((int)l_288 / (int)((unsigned)p_67 + (unsigned)(((short)(((short)((unsigned short)((p_67 != p_67) > l_284) + (unsigned short)p_67) >> (short)l_324) && l_286[6][2]) - (short)p_67) ^ l_94))))) > g_17)); + step_hash(157); + (*p_65) = func_74(&g_85[1], g_201[1]); + step_hash(158); + (*p_65) |= (0x60L >= (l_325 | (((&p_66 != (void*)0) != l_123[0][5]) < ((short)((unsigned char)(l_271 >= (p_67 > func_74(l_330, l_286[5][3]))) >> (unsigned char)5) % (short)2L)))); + } + else + { + int **l_331 = &g_129; + step_hash(160); + (*g_129) &= ((void*)0 == &p_66); + step_hash(161); + (*l_331) = &l_103; + } + step_hash(163); + (*p_65) &= ((unsigned char)(g_85[1] | (4294967295UL & (p_67 != 65532UL))) - (unsigned char)p_67); + step_hash(171); + for (p_67 = (-23); (p_67 >= (-9)); ++p_67) + { + step_hash(167); + (*p_65) |= l_307[1]; + step_hash(168); + p_65 = &g_85[1]; + step_hash(169); + if ((*p_66)) + break; + step_hash(170); + (*g_129) ^= 0xF1477639L; + } + } + step_hash(186); + for (l_86 = 0; (l_86 != 40); l_86++) + { + unsigned l_352 = 0x9C06BD83L; + } + } + else + { + int *l_360[6] = {&g_85[1], &g_85[1], &l_103, &g_85[1], &g_85[1], &l_103}; + int i; + step_hash(209); + if (func_74(&g_85[4], ((short)((unsigned char)g_14 * (unsigned char)((&g_129 != &p_65) && (func_74(p_65, g_85[1]) & p_67))) << (short)13))) + { + unsigned short l_363[8][4] = {{0xB063L, 0x930AL, 0xB063L, 0x930AL}, {0xB063L, 0x930AL, 0xB063L, 0x930AL}, {0xB063L, 0x930AL, 0xB063L, 0x930AL}, {0xB063L, 0x930AL, 0xB063L, 0x930AL}, {0xB063L, 0x930AL, 0xB063L, 0x930AL}, {0xB063L, 0x930AL, 0xB063L, 0x930AL}, {0xB063L, 0x930AL, 0xB063L, 0x930AL}, {0xB063L, 0x930AL, 0xB063L, 0x930AL}}; + int l_372 = 0x98F1B2D3L; + int i, j; + step_hash(189); + (*g_129) = ((-(signed char)(l_360[4] == (void*)0)) || 0x95DFL); + step_hash(197); + for (l_94 = 12; (l_94 == (-17)); l_94--) + { + signed char l_387 = 1L; + step_hash(193); + (*p_65) &= (!(0UL >= func_74(&g_6, p_67))); + step_hash(194); + l_363[4][3]++; + step_hash(195); + l_372 &= (l_363[4][3] < (((+((*p_65) > func_74(p_65, func_74(&g_6, ((unsigned)((unsigned char)g_85[0] * (unsigned char)(((short)g_201[2] - (short)1UL) ^ (g_14 | (g_85[0] | g_14)))) / (unsigned)0x51DFCB4BL))))) ^ (*p_66)) > 0x304AL)); + step_hash(196); + (*g_129) = (((short)l_271 - (short)((unsigned char)((int)(l_95 <= (((g_85[1] >= ((unsigned short)p_67 / (unsigned short)((unsigned short)g_85[4] * (unsigned short)0xD4D5L))) >= (((unsigned)((int)0xF00F302BL + (int)g_17) - (unsigned)l_387) != (*p_65))) & l_86)) - (int)p_67) - (unsigned char)(-6L))) || (-3L)); + } + step_hash(198); + (*g_129) = ((*g_129) || (*p_65)); + step_hash(206); + for (p_67 = 0; (p_67 <= 3); p_67 += 1) + { + unsigned l_390 = 0x15303D7FL; + int l_395 = 4L; + int i; + step_hash(202); + if (l_103) + break; + step_hash(203); + l_95 |= (g_14 & (((short)((l_390 != p_67) != (((0x04L > (((void*)0 != &g_6) >= (((short)(0x5C87L ^ g_6) - (short)(0xC31B24D9L > (*p_65))) >= g_85[1]))) >= g_6) < (-4L))) / (short)0xBAB7L) <= (*p_66))); + step_hash(204); + (*p_65) &= (l_393[9] != l_394); + step_hash(205); + l_395 ^= (*g_129); + } + } + else + { + step_hash(208); + return g_6; + } + step_hash(210); + (*p_65) ^= l_396; + step_hash(211); + g_129 = p_66; + } + step_hash(231); + if (((l_397[3] == &g_129) <= ((unsigned short)g_201[2] >> (unsigned short)7))) + { + unsigned char l_400 = 253UL; + step_hash(214); + (*p_65) |= (l_400 != (-(signed char)0x6FL)); + step_hash(215); + l_402 = p_66; + } + else + { + unsigned l_403 = 0UL; + step_hash(229); + for (l_103 = 3; (l_103 >= 0); l_103 -= 1) + { + int i; + step_hash(220); + (*l_402) = l_307[l_103]; + step_hash(228); + for (l_396 = 0; (l_396 <= 3); l_396 += 1) + { + int i, j; + step_hash(224); + l_287[(l_103 + 1)][l_396] = l_403; + step_hash(225); + l_287[(l_103 + 2)][l_396] |= (+(+func_74(&l_287[(l_103 + 1)][l_396], g_17))); + step_hash(226); + (*p_65) &= ((void*)0 == p_65); + step_hash(227); + if (l_307[l_103]) + continue; + } + } + step_hash(230); + l_415 = (((short)(((unsigned char)((((p_67 ^ p_67) != 0UL) >= ((+((unsigned char)l_403 + (unsigned char)((unsigned short)g_14 << (unsigned short)(g_85[2] < ((unsigned char)(~(l_403 == g_201[0])) << (unsigned char)(g_17 == 1UL)))))) && 1L)) <= 0UL) * (unsigned char)l_414) | g_14) >> (short)l_403) <= p_67); + } + step_hash(255); + for (g_14 = 1; (g_14 >= 0); g_14 -= 1) + { + unsigned short l_421 = 65531UL; + unsigned l_422 = 0x7866A51FL; + step_hash(252); + for (l_285 = 0; (l_285 <= 1); l_285 += 1) + { + unsigned l_418 = 4294967291UL; + step_hash(245); + for (g_17 = 0; (g_17 <= 8); g_17 += 1) + { + int i, j; + step_hash(241); + g_85[1] ^= ((int)((void*)0 == &g_85[(l_285 + 3)]) + (int)4UL); + step_hash(242); + l_418--; + step_hash(243); + g_85[1] = (func_74(&g_6, (l_123[l_285][(l_285 + 6)] >= func_74(p_65, ((g_201[(g_14 + 1)] > l_421) & g_6)))) >= (~(l_422 | p_67))); + step_hash(244); + if ((*g_129)) + break; + } + step_hash(251); + for (l_106 = 0; (l_106 <= 2); l_106 += 1) + { + step_hash(249); + l_287[0][0] |= (((unsigned char)(((*g_129) <= l_421) & l_421) << (unsigned char)1) || 0xF4E64863L); + step_hash(250); + return g_85[3]; + } + } + step_hash(253); + p_66 = p_65; + step_hash(254); + return g_201[2]; + } + step_hash(281); + if ((l_393[9] != (void*)0)) + { + int **l_428 = (void*)0; + step_hash(269); + for (l_396 = (-26); (l_396 <= (-5)); ++l_396) + { + int *l_427[4]; + int i; + for (i = 0; i < 4; i++) + l_427[i] = &l_271; + step_hash(266); + for (p_67 = 0; (p_67 <= 3); p_67 += 1) + { + step_hash(263); + g_129 = (void*)0; + step_hash(264); + (*p_65) = (!((void*)0 != l_393[9])); + step_hash(265); + l_427[1] = &g_85[2]; + } + step_hash(267); + (*p_65) ^= (*p_66); + step_hash(268); + (*p_65) &= ((void*)0 != l_428); + } + } + else + { + unsigned l_450[9][4] = {{4294967290UL, 0x1A1E9AEDL, 2UL, 0xB62B6FBFL}, {4294967290UL, 0x1A1E9AEDL, 2UL, 0xB62B6FBFL}, {4294967290UL, 0x1A1E9AEDL, 2UL, 0xB62B6FBFL}, {4294967290UL, 0x1A1E9AEDL, 2UL, 0xB62B6FBFL}, {4294967290UL, 0x1A1E9AEDL, 2UL, 0xB62B6FBFL}, {4294967290UL, 0x1A1E9AEDL, 2UL, 0xB62B6FBFL}, {4294967290UL, 0x1A1E9AEDL, 2UL, 0xB62B6FBFL}, {4294967290UL, 0x1A1E9AEDL, 2UL, 0xB62B6FBFL}, {4294967290UL, 0x1A1E9AEDL, 2UL, 0xB62B6FBFL}}; + short l_452 = 1L; + int l_453[7] = {0x51D2ECACL, 0xA998834DL, 0x51D2ECACL, 0xA998834DL, 0x51D2ECACL, 0xA998834DL, 0x51D2ECACL}; + unsigned l_454 = 4294967290UL; + int i, j; + step_hash(278); + if (((short)(p_67 || func_74(&g_85[0], (0UL && ((unsigned char)func_74(&g_6, ((short)l_435[5][0] << (short)14)) % (unsigned char)g_201[2])))) + (short)((unsigned char)(((int)7L + (int)0xE86B153DL) || g_201[0]) / (unsigned char)0x12L))) + { + short l_442 = 0xACC0L; + step_hash(272); + g_85[4] = ((unsigned char)p_67 % (unsigned char)0x66L); + step_hash(273); + l_442 ^= (*g_129); + step_hash(274); + (*p_65) = (p_67 & 0UL); + step_hash(275); + g_85[2] = ((short)(-(unsigned)((2L ^ (+(0xECL <= (p_67 ^ ((func_74(&g_85[3], (p_67 & g_201[2])) && 1L) == ((*l_402) | l_442)))))) > g_201[1])) >> (short)1); + } + else + { + step_hash(277); + g_129 = p_65; + } + step_hash(279); + g_451 |= (~((int)(*g_129) + (int)l_450[3][3])); + step_hash(280); + ++l_454; + } + } + else + { + step_hash(283); + return p_67; + } + step_hash(285); + g_470 |= (((unsigned char)((((unsigned)g_17 + (unsigned)(&g_129 == &p_65)) | (((unsigned char)254UL - (unsigned char)l_463) && ((short)g_85[3] % (short)((unsigned)p_67 + (unsigned)(*p_66))))) != ((unsigned char)0x3CL % (unsigned char)g_85[0])) - (unsigned char)6UL) & g_201[1]); + step_hash(294); + for (g_451 = 0; (g_451 <= 15); g_451 += 5) + { + unsigned l_475 = 0UL; + step_hash(293); + for (l_106 = (-4); (l_106 < 7); l_106 += 1) + { + step_hash(292); + l_475--; + } + } + step_hash(304); + for (l_86 = (-16); (l_86 == 2); l_86++) + { + step_hash(298); + l_480[2] = 0x1F418CDAL; + step_hash(303); + for (l_94 = (-14); (l_94 > (-28)); --l_94) + { + int *l_483 = &l_287[0][2]; + step_hash(302); + l_483 = (void*)0; + } + } + } + else + { + unsigned l_484 = 8UL; + int *l_519 = &l_105; + int l_525 = 1L; + int l_537 = 0x6FFD2F16L; + int l_540 = 0L; + int l_544 = 0x5B8B17ABL; + signed char l_547 = 1L; + unsigned char l_548 = 250UL; + unsigned short l_564 = 1UL; + step_hash(379); + if (l_484) + { + int *l_489 = &l_103; + int *l_503 = &g_85[1]; + int l_521 = 0L; + int l_523 = 0x9AEC4979L; + unsigned short l_526 = 1UL; + short l_530 = 0xF7BDL; + int l_539 = 1L; + int l_541 = (-2L); + int l_542 = 0xF0BB177EL; + int l_543 = (-1L); + int l_545 = 1L; + int l_546 = 0x8401FAB9L; + step_hash(352); + if (((signed char)((int)(((0x45CDBFF9L == func_74(l_489, g_201[0])) > (0x14C0L && ((g_201[2] && ((((((unsigned short)((unsigned char)((-9L) || p_67) >> (unsigned char)1) << (unsigned short)1) & ((void*)0 == &g_6)) || g_14) && g_6) | 0xC523L)) && p_67))) != p_67) / (int)(*l_489)) >> (signed char)7)) + { + unsigned l_500 = 4294967295UL; + int l_524[3][2] = {{1L, 0xC9036A03L}, {1L, 0xC9036A03L}, {1L, 0xC9036A03L}}; + unsigned l_552 = 4294967288UL; + int i, j; + step_hash(308); + (*l_489) = ((unsigned short)(((signed char)g_17 >> (signed char)p_67) && g_85[1]) + (unsigned short)(((((signed char)p_67 % (signed char)l_500) == (*l_489)) > g_85[0]) < g_201[1])); + step_hash(313); + for (l_500 = 0; (l_500 >= 4); ++l_500) + { + step_hash(312); + (*l_489) = func_74(l_503, func_74(l_503, g_201[2])); + } + step_hash(321); + for (l_95 = 0; (l_95 != 8); l_95 += 4) + { + unsigned char l_512 = 0x18L; + int l_520 = (-9L); + int l_522 = 0x854D8CF6L; + step_hash(317); + if ((*g_129)) + break; + step_hash(318); + (*l_519) &= ((int)(*g_129) / (int)(((unsigned char)(l_512 | (((unsigned short)g_85[1] * (unsigned short)g_201[1]) <= (g_17 & (((unsigned char)2UL << (unsigned char)g_17) >= (&g_6 != l_519))))) << (unsigned char)2) & g_451)); + step_hash(319); + --l_526; + step_hash(320); + p_65 = &g_85[1]; + } + step_hash(349); + for (l_105 = 0; (l_105 <= 1); l_105 += 1) + { + int l_533 = (-8L); + int l_534 = 0x12D26980L; + int l_536[7] = {(-1L), 0x5EB85CDDL, (-1L), 0x5EB85CDDL, (-1L), 0x5EB85CDDL, (-1L)}; + short l_538[10][6] = {{0x6F76L, 0L, 8L, 0x4E49L, 0x4E49L, 8L}, {0x6F76L, 0L, 8L, 0x4E49L, 0x4E49L, 8L}, {0x6F76L, 0L, 8L, 0x4E49L, 0x4E49L, 8L}, {0x6F76L, 0L, 8L, 0x4E49L, 0x4E49L, 8L}, {0x6F76L, 0L, 8L, 0x4E49L, 0x4E49L, 8L}, {0x6F76L, 0L, 8L, 0x4E49L, 0x4E49L, 8L}, {0x6F76L, 0L, 8L, 0x4E49L, 0x4E49L, 8L}, {0x6F76L, 0L, 8L, 0x4E49L, 0x4E49L, 8L}, {0x6F76L, 0L, 8L, 0x4E49L, 0x4E49L, 8L}, {0x6F76L, 0L, 8L, 0x4E49L, 0x4E49L, 8L}}; + int l_567 = 0x599A88A0L; + int i, j; + step_hash(332); + for (l_484 = 0; (l_484 <= 2); l_484 += 1) + { + int *l_529 = &l_524[1][1]; + int l_532[5] = {0x20CAC603L, 0xD2894843L, 0x20CAC603L, 0xD2894843L, 0x20CAC603L}; + int l_535 = 0x38B08613L; + int l_551 = 0xE44E8891L; + int i, j; + step_hash(328); + l_529 = p_65; + step_hash(329); + l_548--; + step_hash(330); + l_552--; + step_hash(331); + if (l_123[l_105][(l_105 + 2)]) + continue; + } + step_hash(339); + if ((+((unsigned short)p_67 * (unsigned short)g_17))) + { + step_hash(334); + (*g_129) = (&g_129 == &p_65); + step_hash(335); + return p_67; + } + else + { + step_hash(337); + (*l_489) ^= (*l_519); + step_hash(338); + (*g_129) &= (-9L); + } + step_hash(340); + if ((*p_65)) + continue; + step_hash(341); + g_129 = &l_539; + step_hash(348); + for (l_521 = 1; (l_521 >= 0); l_521 -= 1) + { + int l_562 = (-9L); + int i, j; + step_hash(345); + (*l_503) = ((l_123[l_105][(l_521 + 7)] ^ func_74(&g_85[1], g_557)) == (((signed char)l_524[1][0] / (signed char)((unsigned short)(0x06C6L || (8L == g_14)) * (unsigned short)l_562)) ^ 0x3129L)); + step_hash(346); + ++l_564; + step_hash(347); + l_567 ^= (-1L); + } + } + } + else + { + step_hash(351); + (*g_129) = (*g_129); + } + step_hash(353); + p_66 = p_65; + } + else + { + int **l_570 = &l_519; + step_hash(355); + (*g_129) = (((((g_201[2] ^ (!((signed char)(l_570 == (void*)0) << (signed char)6))) == (((int)((0xD7BEL != (((short)((short)g_470 % (short)g_17) + (short)(l_397[3] == &g_129)) ^ ((short)func_74(&l_544, g_6) - (short)g_14))) != 0xF6DDA1FEL) % (int)(*l_519)) || g_17)) & p_67) > (*l_519)) > (*l_519)); + step_hash(378); + for (l_547 = 3; (l_547 >= 0); l_547 -= 1) + { + int i; + step_hash(359); + (**l_570) &= l_307[l_547]; + step_hash(365); + for (l_531 = 1; (l_531 >= 0); l_531 -= 1) + { + int i, j; + step_hash(363); + (*p_65) &= (((unsigned char)g_201[l_531] * (unsigned char)func_74(&l_525, (l_123[l_531][(l_531 + 2)] != (-1L)))) | (l_123[l_531][(l_531 + 2)] != (~(*l_519)))); + step_hash(364); + if ((*g_129)) + break; + } + step_hash(377); + for (g_14 = 0; (g_14 <= 3); g_14 += 1) + { + step_hash(375); + for (g_470 = 0; (g_470 <= 3); g_470 += 1) + { + step_hash(372); + (*l_570) = p_65; + step_hash(373); + (**l_570) ^= func_74(p_65, (g_557 == g_85[1])); + step_hash(374); + if ((*g_129)) + break; + } + step_hash(376); + return p_67; + } + } + } + step_hash(380); + (*p_65) &= (*l_519); + step_hash(391); + for (g_451 = 22; (g_451 >= 40); ++g_451) + { + unsigned char l_584 = 0x27L; + } + step_hash(397); + for (l_95 = 5; (l_95 <= 4); --l_95) + { + step_hash(395); + l_519 = (void*)0; + step_hash(396); + if ((*p_66)) + break; + } + } + step_hash(399); + p_66 = p_66; + step_hash(400); + return p_67; +} + + + + + + + +static unsigned char func_74(int * p_75, unsigned short p_76) +{ + unsigned l_82[7][8] = {{0x456014EFL, 0xECA6696BL, 1UL, 0UL, 4294967288UL, 5UL, 0x71010F19L, 0x4264A3A2L}, {0x456014EFL, 0xECA6696BL, 1UL, 0UL, 4294967288UL, 5UL, 0x71010F19L, 0x4264A3A2L}, {0x456014EFL, 0xECA6696BL, 1UL, 0UL, 4294967288UL, 5UL, 0x71010F19L, 0x4264A3A2L}, {0x456014EFL, 0xECA6696BL, 1UL, 0UL, 4294967288UL, 5UL, 0x71010F19L, 0x4264A3A2L}, {0x456014EFL, 0xECA6696BL, 1UL, 0UL, 4294967288UL, 5UL, 0x71010F19L, 0x4264A3A2L}, {0x456014EFL, 0xECA6696BL, 1UL, 0UL, 4294967288UL, 5UL, 0x71010F19L, 0x4264A3A2L}, {0x456014EFL, 0xECA6696BL, 1UL, 0UL, 4294967288UL, 5UL, 0x71010F19L, 0x4264A3A2L}}; + int *l_83 = (void*)0; + int *l_84 = &g_85[1]; + int i, j; + step_hash(14); + (*l_84) |= ((unsigned)(g_6 <= 0xCAL) + (unsigned)((unsigned)p_76 + (unsigned)l_82[6][7])); + step_hash(15); + return g_14; +} + + +void csmith_compute_hash(void) +{ + int i, j; + transparent_crc(g_6, "g_6", print_hash_value); + transparent_crc(g_14, "g_14", print_hash_value); + transparent_crc(g_17, "g_17", print_hash_value); + for (i = 0; i < 5; i++) + { + transparent_crc(g_85[i], "g_85[i]", print_hash_value); + if (print_hash_value) printf("index = [%d]\n", i); + + } + for (i = 0; i < 3; i++) + { + transparent_crc(g_201[i], "g_201[i]", print_hash_value); + if (print_hash_value) printf("index = [%d]\n", i); + + } + transparent_crc(g_451, "g_451", print_hash_value); + transparent_crc(g_470, "g_470", print_hash_value); + transparent_crc(g_557, "g_557", print_hash_value); + for (i = 0; i < 8; i++) + { + for (j = 0; j < 3; j++) + { + transparent_crc(g_643[i][j], "g_643[i][j]", print_hash_value); + if (print_hash_value) printf("index = [%d][%d]\n", i, j); + + } + } + transparent_crc(g_651, "g_651", print_hash_value); + for (i = 0; i < 3; i++) + { + transparent_crc(g_661[i], "g_661[i]", print_hash_value); + if (print_hash_value) printf("index = [%d]\n", i); + + } + transparent_crc(g_812, "g_812", print_hash_value); + transparent_crc(g_838, "g_838", print_hash_value); + for (i = 0; i < 10; i++) + { + for (j = 0; j < 10; j++) + { + transparent_crc(g_860[i][j], "g_860[i][j]", print_hash_value); + if (print_hash_value) printf("index = [%d][%d]\n", i, j); + + } + } + transparent_crc(g_912, "g_912", print_hash_value); + transparent_crc(g_949, "g_949", print_hash_value); +} + +void step_hash(int stmt_id) +{ + int i = 0; + csmith_compute_hash(); + printf("before stmt(%d): checksum = %X\n", stmt_id, crc32_context ^ 0xFFFFFFFFUL); + crc32_context = 0xFFFFFFFFUL; + for (i = 0; i < 256; i++) { + crc32_tab[i] = 0; + } + crc32_gentab(); +} + + + +int main (void) +{ + int i, j; + int print_hash_value = 0; + platform_main_begin(); + crc32_gentab(); + func_1(); + csmith_compute_hash(); + platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value); + return 0; +} diff --git a/src/tests/csmith/rand99.expect b/src/tests/csmith/rand99.expect new file mode 100644 index 0000000..2b4c966 --- /dev/null +++ b/src/tests/csmith/rand99.expect @@ -0,0 +1,1692 @@ +...checksum after hashing g_6 : AE3266D7 +...checksum after hashing g_14 : A833330 +...checksum after hashing g_17 : 7395EE2 +...checksum after hashing g_85[i] : 8432265 +index = [0] +...checksum after hashing g_85[i] : 6049B13E +index = [1] +...checksum after hashing g_85[i] : 3A963ED4 +index = [2] +...checksum after hashing g_85[i] : E423A20F +index = [3] +...checksum after hashing g_85[i] : 19A6782D +index = [4] +...checksum after hashing g_201[i] : D7445DD +index = [0] +...checksum after hashing g_201[i] : E755659 +index = [1] +...checksum after hashing g_201[i] : F23C0AE7 +index = [2] +...checksum after hashing g_451 : FF87AEE1 +...checksum after hashing g_470 : 3A6DCCC4 +...checksum after hashing g_557 : 6CFEC995 +...checksum after hashing g_643[i][j] : 98C15A58 +index = [0][0] +...checksum after hashing g_643[i][j] : 8B9769E4 +index = [0][1] +...checksum after hashing g_643[i][j] : 186B67F4 +index = [0][2] +...checksum after hashing g_643[i][j] : 93E3712E +index = [1][0] +...checksum after hashing g_643[i][j] : C1BBA00D +index = [1][1] +...checksum after hashing g_643[i][j] : 825A07A9 +index = [1][2] +...checksum after hashing g_643[i][j] : 34D41099 +index = [2][0] +...checksum after hashing g_643[i][j] : D0BEE146 +index = [2][1] +...checksum after hashing g_643[i][j] : A8D0EBD5 +index = [2][2] +...checksum after hashing g_643[i][j] : AF129F6E +index = [3][0] +...checksum after hashing g_643[i][j] : DB1BA9E1 +index = [3][1] +...checksum after hashing g_643[i][j] : 42478735 +index = [3][2] +...checksum after hashing g_643[i][j] : 467FFBA9 +index = [4][0] +...checksum after hashing g_643[i][j] : 76DA5394 +index = [4][1] +...checksum after hashing g_643[i][j] : DC7318C7 +index = [4][2] +...checksum after hashing g_643[i][j] : 30C297FC +index = [5][0] +...checksum after hashing g_643[i][j] : 23C99ABC +index = [5][1] +...checksum after hashing g_643[i][j] : 5D65D630 +index = [5][2] +...checksum after hashing g_643[i][j] : 366504C9 +index = [6][0] +...checksum after hashing g_643[i][j] : 134C1B9D +index = [6][1] +...checksum after hashing g_643[i][j] : C531337E +index = [6][2] +...checksum after hashing g_643[i][j] : C284BAAA +index = [7][0] +...checksum after hashing g_643[i][j] : 8AA64C2 +index = [7][1] +...checksum after hashing g_643[i][j] : 8BB39E61 +index = [7][2] +...checksum after hashing g_651 : E0D17D53 +...checksum after hashing g_661[i] : CD2525C1 +index = [0] +...checksum after hashing g_661[i] : 8DCC0B2A +index = [1] +...checksum after hashing g_661[i] : 4701AFCC +index = [2] +...checksum after hashing g_812 : 70E343F0 +...checksum after hashing g_838 : 48144C54 +...checksum after hashing g_860[i][j] : B376464B +index = [0][0] +...checksum after hashing g_860[i][j] : 8AF7AA71 +index = [0][1] +...checksum after hashing g_860[i][j] : D30BB27E +index = [0][2] +...checksum after hashing g_860[i][j] : E44A03CD +index = [0][3] +...checksum after hashing g_860[i][j] : FEC5C458 +index = [0][4] +...checksum after hashing g_860[i][j] : 9112A9DA +index = [0][5] +...checksum after hashing g_860[i][j] : B5E92127 +index = [0][6] +...checksum after hashing g_860[i][j] : 6583104F +index = [0][7] +...checksum after hashing g_860[i][j] : 70D00531 +index = [0][8] +...checksum after hashing g_860[i][j] : 6995175 +index = [0][9] +...checksum after hashing g_860[i][j] : A04F34A2 +index = [1][0] +...checksum after hashing g_860[i][j] : FCCFD499 +index = [1][1] +...checksum after hashing g_860[i][j] : 3056F601 +index = [1][2] +...checksum after hashing g_860[i][j] : 969306C0 +index = [1][3] +...checksum after hashing g_860[i][j] : E495B028 +index = [1][4] +...checksum after hashing g_860[i][j] : EE0C6DE4 +index = [1][5] +...checksum after hashing g_860[i][j] : 2740C35B +index = [1][6] +...checksum after hashing g_860[i][j] : 8FC8FE6D +index = [1][7] +...checksum after hashing g_860[i][j] : 8AC50286 +index = [1][8] +...checksum after hashing g_860[i][j] : E9AECCC5 +index = [1][9] +...checksum after hashing g_860[i][j] : E8440E46 +index = [2][0] +...checksum after hashing g_860[i][j] : 17DD72D9 +index = [2][1] +...checksum after hashing g_860[i][j] : 399BC4CD +index = [2][2] +...checksum after hashing g_860[i][j] : 8A6F7727 +index = [2][3] +...checksum after hashing g_860[i][j] : 56063930 +index = [2][4] +...checksum after hashing g_860[i][j] : EA4639E2 +index = [2][5] +...checksum after hashing g_860[i][j] : 6465797D +index = [2][6] +...checksum after hashing g_860[i][j] : C57EB584 +index = [2][7] +...checksum after hashing g_860[i][j] : 79EBCFA5 +index = [2][8] +...checksum after hashing g_860[i][j] : EDED638C +index = [2][9] +...checksum after hashing g_860[i][j] : 45DB73 +index = [3][0] +...checksum after hashing g_860[i][j] : ECA0D69A +index = [3][1] +...checksum after hashing g_860[i][j] : DEB5EA8D +index = [3][2] +...checksum after hashing g_860[i][j] : 16C13A07 +index = [3][3] +...checksum after hashing g_860[i][j] : 474BC695 +index = [3][4] +...checksum after hashing g_860[i][j] : 10CF582 +index = [3][5] +...checksum after hashing g_860[i][j] : FAB87D25 +index = [3][6] +...checksum after hashing g_860[i][j] : EFEF3F04 +index = [3][7] +...checksum after hashing g_860[i][j] : CBF19545 +index = [3][8] +...checksum after hashing g_860[i][j] : CFFBA1A9 +index = [3][9] +...checksum after hashing g_860[i][j] : CC7A3262 +index = [4][0] +...checksum after hashing g_860[i][j] : 683AA9E8 +index = [4][1] +...checksum after hashing g_860[i][j] : 2155885E +index = [4][2] +...checksum after hashing g_860[i][j] : 1A0F2F5F +index = [4][3] +...checksum after hashing g_860[i][j] : FD036A8 +index = [4][4] +...checksum after hashing g_860[i][j] : 5C3B3C5D +index = [4][5] +...checksum after hashing g_860[i][j] : 9F2CF458 +index = [4][6] +...checksum after hashing g_860[i][j] : B0ABBD83 +index = [4][7] +...checksum after hashing g_860[i][j] : 360F124D +index = [4][8] +...checksum after hashing g_860[i][j] : A706C6D1 +index = [4][9] +...checksum after hashing g_860[i][j] : CD12112E +index = [5][0] +...checksum after hashing g_860[i][j] : 59D067ED +index = [5][1] +...checksum after hashing g_860[i][j] : 78F5D87A +index = [5][2] +...checksum after hashing g_860[i][j] : E5536C3F +index = [5][3] +...checksum after hashing g_860[i][j] : 7D260FE7 +index = [5][4] +...checksum after hashing g_860[i][j] : 481BFC02 +index = [5][5] +...checksum after hashing g_860[i][j] : 12B38D33 +index = [5][6] +...checksum after hashing g_860[i][j] : 627CF716 +index = [5][7] +...checksum after hashing g_860[i][j] : 6738EBED +index = [5][8] +...checksum after hashing g_860[i][j] : DC1356DD +index = [5][9] +...checksum after hashing g_860[i][j] : 8AB558C6 +index = [6][0] +...checksum after hashing g_860[i][j] : 3CAE4668 +index = [6][1] +...checksum after hashing g_860[i][j] : 1799730B +index = [6][2] +...checksum after hashing g_860[i][j] : F7B84125 +index = [6][3] +...checksum after hashing g_860[i][j] : 3C2436C0 +index = [6][4] +...checksum after hashing g_860[i][j] : 6DA9A61E +index = [6][5] +...checksum after hashing g_860[i][j] : F4A0D60F +index = [6][6] +...checksum after hashing g_860[i][j] : 90EE7781 +index = [6][7] +...checksum after hashing g_860[i][j] : B65E52D8 +index = [6][8] +...checksum after hashing g_860[i][j] : 131AB5B2 +index = [6][9] +...checksum after hashing g_860[i][j] : 984DB502 +index = [7][0] +...checksum after hashing g_860[i][j] : 4B676637 +index = [7][1] +...checksum after hashing g_860[i][j] : 68E3A287 +index = [7][2] +...checksum after hashing g_860[i][j] : C916EA70 +index = [7][3] +...checksum after hashing g_860[i][j] : E43FF71D +index = [7][4] +...checksum after hashing g_860[i][j] : 8C4AA51 +index = [7][5] +...checksum after hashing g_860[i][j] : D346E73D +index = [7][6] +...checksum after hashing g_860[i][j] : 424B290D +index = [7][7] +...checksum after hashing g_860[i][j] : CC5EA3B5 +index = [7][8] +...checksum after hashing g_860[i][j] : DE801BA9 +index = [7][9] +...checksum after hashing g_860[i][j] : A2C8C96B +index = [8][0] +...checksum after hashing g_860[i][j] : D05AFA36 +index = [8][1] +...checksum after hashing g_860[i][j] : 29638604 +index = [8][2] +...checksum after hashing g_860[i][j] : 33E6F4D4 +index = [8][3] +...checksum after hashing g_860[i][j] : 795A0D8A +index = [8][4] +...checksum after hashing g_860[i][j] : 634F551 +index = [8][5] +...checksum after hashing g_860[i][j] : 47A2420A +index = [8][6] +...checksum after hashing g_860[i][j] : 3D74172B +index = [8][7] +...checksum after hashing g_860[i][j] : FF96DD5C +index = [8][8] +...checksum after hashing g_860[i][j] : 976B6C11 +index = [8][9] +...checksum after hashing g_860[i][j] : 993A02D8 +index = [9][0] +...checksum after hashing g_860[i][j] : D5E608F8 +index = [9][1] +...checksum after hashing g_860[i][j] : 31ABADB4 +index = [9][2] +...checksum after hashing g_860[i][j] : AC3D65F +index = [9][3] +...checksum after hashing g_860[i][j] : CF3DF6D1 +index = [9][4] +...checksum after hashing g_860[i][j] : AB170A1A +index = [9][5] +...checksum after hashing g_860[i][j] : A3E101EF +index = [9][6] +...checksum after hashing g_860[i][j] : D23AAF1F +index = [9][7] +...checksum after hashing g_860[i][j] : 15DD8060 +index = [9][8] +...checksum after hashing g_860[i][j] : 1AA00B43 +index = [9][9] +...checksum after hashing g_912 : 12D944A5 +...checksum after hashing g_949 : E6780001 +before stmt(1): checksum = E6780001 +...checksum after hashing g_6 : AE3266D7 +...checksum after hashing g_14 : A833330 +...checksum after hashing g_17 : 67A46CFE +...checksum after hashing g_85[i] : BC3E6EB3 +index = [0] +...checksum after hashing g_85[i] : 4C6B53F1 +index = [1] +...checksum after hashing g_85[i] : 2BB4EE89 +index = [2] +...checksum after hashing g_85[i] : 9DCF2692 +index = [3] +...checksum after hashing g_85[i] : 6BA28770 +index = [4] +...checksum after hashing g_201[i] : 50EC735B +index = [0] +...checksum after hashing g_201[i] : 4AE30BC7 +index = [1] +...checksum after hashing g_201[i] : 9D6D8986 +index = [2] +...checksum after hashing g_451 : E1C38B82 +...checksum after hashing g_470 : 4362A740 +...checksum after hashing g_557 : E406196F +...checksum after hashing g_643[i][j] : C395F90C +index = [0][0] +...checksum after hashing g_643[i][j] : 36A80204 +index = [0][1] +...checksum after hashing g_643[i][j] : 6798E700 +index = [0][2] +...checksum after hashing g_643[i][j] : 84F9358D +index = [1][0] +...checksum after hashing g_643[i][j] : DA084CE6 +index = [1][1] +...checksum after hashing g_643[i][j] : 6651DCC3 +index = [1][2] +...checksum after hashing g_643[i][j] : A5002285 +index = [2][0] +...checksum after hashing g_643[i][j] : 8FC29B56 +index = [2][1] +...checksum after hashing g_643[i][j] : D9F12B53 +index = [2][2] +...checksum after hashing g_643[i][j] : 5D12B480 +index = [3][0] +...checksum after hashing g_643[i][j] : 8A10A5DB +index = [3][1] +...checksum after hashing g_643[i][j] : 2B53DE3D +index = [3][2] +...checksum after hashing g_643[i][j] : FA66C8D0 +index = [4][0] +...checksum after hashing g_643[i][j] : 1F17B1F4 +index = [4][1] +...checksum after hashing g_643[i][j] : 7099BF5 +index = [4][2] +...checksum after hashing g_643[i][j] : 4D42982F +index = [5][0] +...checksum after hashing g_643[i][j] : 9435E3C +index = [5][1] +...checksum after hashing g_643[i][j] : 3C4DE780 +index = [5][2] +...checksum after hashing g_643[i][j] : 69563A90 +index = [6][0] +...checksum after hashing g_643[i][j] : 8403BA7A +index = [6][1] +...checksum after hashing g_643[i][j] : 4FA92885 +index = [6][2] +...checksum after hashing g_643[i][j] : 37650DB1 +index = [7][0] +...checksum after hashing g_643[i][j] : C51198F7 +index = [7][1] +...checksum after hashing g_643[i][j] : 127CD538 +index = [7][2] +...checksum after hashing g_651 : EFAABF3B +...checksum after hashing g_661[i] : FDE805AF +index = [0] +...checksum after hashing g_661[i] : 36F55455 +index = [1] +...checksum after hashing g_661[i] : 418A9135 +index = [2] +...checksum after hashing g_812 : 946C36F2 +...checksum after hashing g_838 : AB5B8C81 +...checksum after hashing g_860[i][j] : 7DB179A8 +index = [0][0] +...checksum after hashing g_860[i][j] : 996D4834 +index = [0][1] +...checksum after hashing g_860[i][j] : DAB73DF1 +index = [0][2] +...checksum after hashing g_860[i][j] : 8AB5A00D +index = [0][3] +...checksum after hashing g_860[i][j] : 6A98784A +index = [0][4] +...checksum after hashing g_860[i][j] : 5F3145FE +index = [0][5] +...checksum after hashing g_860[i][j] : F834A85C +index = [0][6] +...checksum after hashing g_860[i][j] : BA291A2 +index = [0][7] +...checksum after hashing g_860[i][j] : 92A7B4DF +index = [0][8] +...checksum after hashing g_860[i][j] : DADF9F3C +index = [0][9] +...checksum after hashing g_860[i][j] : F424EE23 +index = [1][0] +...checksum after hashing g_860[i][j] : C33B92A0 +index = [1][1] +...checksum after hashing g_860[i][j] : FD4B9DC +index = [1][2] +...checksum after hashing g_860[i][j] : 86B87A8D +index = [1][3] +...checksum after hashing g_860[i][j] : BBC74CF1 +index = [1][4] +...checksum after hashing g_860[i][j] : 7AD762F0 +index = [1][5] +...checksum after hashing g_860[i][j] : 66C90F27 +index = [1][6] +...checksum after hashing g_860[i][j] : DD0EDC69 +index = [1][7] +...checksum after hashing g_860[i][j] : 26AB474F +index = [1][8] +...checksum after hashing g_860[i][j] : B0A48B88 +index = [1][9] +...checksum after hashing g_860[i][j] : 1CB71439 +index = [2][0] +...checksum after hashing g_860[i][j] : B07160CE +index = [2][1] +...checksum after hashing g_860[i][j] : A1F7195B +index = [2][2] +...checksum after hashing g_860[i][j] : A08950E1 +index = [2][3] +...checksum after hashing g_860[i][j] : EBBD4533 +index = [2][4] +...checksum after hashing g_860[i][j] : 17F9BF7A +index = [2][5] +...checksum after hashing g_860[i][j] : 5978EBD2 +index = [2][6] +...checksum after hashing g_860[i][j] : 89E5F044 +index = [2][7] +...checksum after hashing g_860[i][j] : 942830E2 +index = [2][8] +...checksum after hashing g_860[i][j] : 6BDA2DAD +index = [2][9] +...checksum after hashing g_860[i][j] : F61335C3 +index = [3][0] +...checksum after hashing g_860[i][j] : EA91C851 +index = [3][1] +...checksum after hashing g_860[i][j] : 467FAF77 +index = [3][2] +...checksum after hashing g_860[i][j] : 468AA75D +index = [3][3] +...checksum after hashing g_860[i][j] : 6ED6C5CA +index = [3][4] +...checksum after hashing g_860[i][j] : 16793814 +index = [3][5] +...checksum after hashing g_860[i][j] : 2A7FCE3A +index = [3][6] +...checksum after hashing g_860[i][j] : 22E5ABD9 +index = [3][7] +...checksum after hashing g_860[i][j] : FAEFB2AA +index = [3][8] +...checksum after hashing g_860[i][j] : F97A9F47 +index = [3][9] +...checksum after hashing g_860[i][j] : 390DF060 +index = [4][0] +...checksum after hashing g_860[i][j] : FDB1CAEF +index = [4][1] +...checksum after hashing g_860[i][j] : AE01E3D5 +index = [4][2] +...checksum after hashing g_860[i][j] : C7053C45 +index = [4][3] +...checksum after hashing g_860[i][j] : 2C99DA99 +index = [4][4] +...checksum after hashing g_860[i][j] : 37880F63 +index = [4][5] +...checksum after hashing g_860[i][j] : BC7D65A8 +index = [4][6] +...checksum after hashing g_860[i][j] : CBDB6484 +index = [4][7] +...checksum after hashing g_860[i][j] : C168F509 +index = [4][8] +...checksum after hashing g_860[i][j] : 16B85541 +index = [4][9] +...checksum after hashing g_860[i][j] : 4927F60F +index = [5][0] +...checksum after hashing g_860[i][j] : A517EC1C +index = [5][1] +...checksum after hashing g_860[i][j] : 9BFFA267 +index = [5][2] +...checksum after hashing g_860[i][j] : DDAA55B3 +index = [5][3] +...checksum after hashing g_860[i][j] : 1C6F3A11 +index = [5][4] +...checksum after hashing g_860[i][j] : D2B83780 +index = [5][5] +...checksum after hashing g_860[i][j] : 5DE91F52 +index = [5][6] +...checksum after hashing g_860[i][j] : B946E231 +index = [5][7] +...checksum after hashing g_860[i][j] : 7498C8D4 +index = [5][8] +...checksum after hashing g_860[i][j] : 4182E478 +index = [5][9] +...checksum after hashing g_860[i][j] : D03ECF2D +index = [6][0] +...checksum after hashing g_860[i][j] : 9645D74E +index = [6][1] +...checksum after hashing g_860[i][j] : E59831FF +index = [6][2] +...checksum after hashing g_860[i][j] : C70A3B0A +index = [6][3] +...checksum after hashing g_860[i][j] : 6D3998B8 +index = [6][4] +...checksum after hashing g_860[i][j] : F3C45379 +index = [6][5] +...checksum after hashing g_860[i][j] : 26BA0327 +index = [6][6] +...checksum after hashing g_860[i][j] : A6DA4EA8 +index = [6][7] +...checksum after hashing g_860[i][j] : 344E0A1D +index = [6][8] +...checksum after hashing g_860[i][j] : 795224D3 +index = [6][9] +...checksum after hashing g_860[i][j] : 72C1BAE8 +index = [7][0] +...checksum after hashing g_860[i][j] : 2E105C77 +index = [7][1] +...checksum after hashing g_860[i][j] : 87ADE01A +index = [7][2] +...checksum after hashing g_860[i][j] : AB6D17C5 +index = [7][3] +...checksum after hashing g_860[i][j] : 1CF8097F +index = [7][4] +...checksum after hashing g_860[i][j] : 116CF0A4 +index = [7][5] +...checksum after hashing g_860[i][j] : 16034EF +index = [7][6] +...checksum after hashing g_860[i][j] : EADAE3AA +index = [7][7] +...checksum after hashing g_860[i][j] : 308D011E +index = [7][8] +...checksum after hashing g_860[i][j] : 80082448 +index = [7][9] +...checksum after hashing g_860[i][j] : 9CB5232B +index = [8][0] +...checksum after hashing g_860[i][j] : B4CBED6D +index = [8][1] +...checksum after hashing g_860[i][j] : E83A548 +index = [8][2] +...checksum after hashing g_860[i][j] : 235BAD6F +index = [8][3] +...checksum after hashing g_860[i][j] : 9C9811BF +index = [8][4] +...checksum after hashing g_860[i][j] : FD5104ED +index = [8][5] +...checksum after hashing g_860[i][j] : 96E51EB9 +index = [8][6] +...checksum after hashing g_860[i][j] : 19F91A0B +index = [8][7] +...checksum after hashing g_860[i][j] : E552E3E6 +index = [8][8] +...checksum after hashing g_860[i][j] : 99A5E145 +index = [8][9] +...checksum after hashing g_860[i][j] : 8679C539 +index = [9][0] +...checksum after hashing g_860[i][j] : 7999BF53 +index = [9][1] +...checksum after hashing g_860[i][j] : 1C1751DF +index = [9][2] +...checksum after hashing g_860[i][j] : 57959128 +index = [9][3] +...checksum after hashing g_860[i][j] : B53B222A +index = [9][4] +...checksum after hashing g_860[i][j] : 967A39F4 +index = [9][5] +...checksum after hashing g_860[i][j] : 3B5735D6 +index = [9][6] +...checksum after hashing g_860[i][j] : 30304730 +index = [9][7] +...checksum after hashing g_860[i][j] : FE96D5CE +index = [9][8] +...checksum after hashing g_860[i][j] : F9362410 +index = [9][9] +...checksum after hashing g_912 : E6687B6A +...checksum after hashing g_949 : A06FF500 +before stmt(673): checksum = A06FF500 +...checksum after hashing g_6 : AE3266D7 +...checksum after hashing g_14 : A833330 +...checksum after hashing g_17 : 67A46CFE +...checksum after hashing g_85[i] : BC3E6EB3 +index = [0] +...checksum after hashing g_85[i] : 4C6B53F1 +index = [1] +...checksum after hashing g_85[i] : 2BB4EE89 +index = [2] +...checksum after hashing g_85[i] : 9DCF2692 +index = [3] +...checksum after hashing g_85[i] : 6BA28770 +index = [4] +...checksum after hashing g_201[i] : 50EC735B +index = [0] +...checksum after hashing g_201[i] : 4AE30BC7 +index = [1] +...checksum after hashing g_201[i] : 9D6D8986 +index = [2] +...checksum after hashing g_451 : E1C38B82 +...checksum after hashing g_470 : 4362A740 +...checksum after hashing g_557 : E406196F +...checksum after hashing g_643[i][j] : C395F90C +index = [0][0] +...checksum after hashing g_643[i][j] : 36A80204 +index = [0][1] +...checksum after hashing g_643[i][j] : 6798E700 +index = [0][2] +...checksum after hashing g_643[i][j] : 84F9358D +index = [1][0] +...checksum after hashing g_643[i][j] : DA084CE6 +index = [1][1] +...checksum after hashing g_643[i][j] : 6651DCC3 +index = [1][2] +...checksum after hashing g_643[i][j] : A5002285 +index = [2][0] +...checksum after hashing g_643[i][j] : 8FC29B56 +index = [2][1] +...checksum after hashing g_643[i][j] : D9F12B53 +index = [2][2] +...checksum after hashing g_643[i][j] : 5D12B480 +index = [3][0] +...checksum after hashing g_643[i][j] : 8A10A5DB +index = [3][1] +...checksum after hashing g_643[i][j] : 2B53DE3D +index = [3][2] +...checksum after hashing g_643[i][j] : FA66C8D0 +index = [4][0] +...checksum after hashing g_643[i][j] : 1F17B1F4 +index = [4][1] +...checksum after hashing g_643[i][j] : 7099BF5 +index = [4][2] +...checksum after hashing g_643[i][j] : 4D42982F +index = [5][0] +...checksum after hashing g_643[i][j] : 9435E3C +index = [5][1] +...checksum after hashing g_643[i][j] : 3C4DE780 +index = [5][2] +...checksum after hashing g_643[i][j] : 69563A90 +index = [6][0] +...checksum after hashing g_643[i][j] : 8403BA7A +index = [6][1] +...checksum after hashing g_643[i][j] : 4FA92885 +index = [6][2] +...checksum after hashing g_643[i][j] : 37650DB1 +index = [7][0] +...checksum after hashing g_643[i][j] : C51198F7 +index = [7][1] +...checksum after hashing g_643[i][j] : 127CD538 +index = [7][2] +...checksum after hashing g_651 : EFAABF3B +...checksum after hashing g_661[i] : FDE805AF +index = [0] +...checksum after hashing g_661[i] : 36F55455 +index = [1] +...checksum after hashing g_661[i] : 418A9135 +index = [2] +...checksum after hashing g_812 : 946C36F2 +...checksum after hashing g_838 : AB5B8C81 +...checksum after hashing g_860[i][j] : 7DB179A8 +index = [0][0] +...checksum after hashing g_860[i][j] : 996D4834 +index = [0][1] +...checksum after hashing g_860[i][j] : DAB73DF1 +index = [0][2] +...checksum after hashing g_860[i][j] : 8AB5A00D +index = [0][3] +...checksum after hashing g_860[i][j] : 6A98784A +index = [0][4] +...checksum after hashing g_860[i][j] : 5F3145FE +index = [0][5] +...checksum after hashing g_860[i][j] : F834A85C +index = [0][6] +...checksum after hashing g_860[i][j] : BA291A2 +index = [0][7] +...checksum after hashing g_860[i][j] : 92A7B4DF +index = [0][8] +...checksum after hashing g_860[i][j] : DADF9F3C +index = [0][9] +...checksum after hashing g_860[i][j] : F424EE23 +index = [1][0] +...checksum after hashing g_860[i][j] : C33B92A0 +index = [1][1] +...checksum after hashing g_860[i][j] : FD4B9DC +index = [1][2] +...checksum after hashing g_860[i][j] : 86B87A8D +index = [1][3] +...checksum after hashing g_860[i][j] : BBC74CF1 +index = [1][4] +...checksum after hashing g_860[i][j] : 7AD762F0 +index = [1][5] +...checksum after hashing g_860[i][j] : 66C90F27 +index = [1][6] +...checksum after hashing g_860[i][j] : DD0EDC69 +index = [1][7] +...checksum after hashing g_860[i][j] : 26AB474F +index = [1][8] +...checksum after hashing g_860[i][j] : B0A48B88 +index = [1][9] +...checksum after hashing g_860[i][j] : 1CB71439 +index = [2][0] +...checksum after hashing g_860[i][j] : B07160CE +index = [2][1] +...checksum after hashing g_860[i][j] : A1F7195B +index = [2][2] +...checksum after hashing g_860[i][j] : A08950E1 +index = [2][3] +...checksum after hashing g_860[i][j] : EBBD4533 +index = [2][4] +...checksum after hashing g_860[i][j] : 17F9BF7A +index = [2][5] +...checksum after hashing g_860[i][j] : 5978EBD2 +index = [2][6] +...checksum after hashing g_860[i][j] : 89E5F044 +index = [2][7] +...checksum after hashing g_860[i][j] : 942830E2 +index = [2][8] +...checksum after hashing g_860[i][j] : 6BDA2DAD +index = [2][9] +...checksum after hashing g_860[i][j] : F61335C3 +index = [3][0] +...checksum after hashing g_860[i][j] : EA91C851 +index = [3][1] +...checksum after hashing g_860[i][j] : 467FAF77 +index = [3][2] +...checksum after hashing g_860[i][j] : 468AA75D +index = [3][3] +...checksum after hashing g_860[i][j] : 6ED6C5CA +index = [3][4] +...checksum after hashing g_860[i][j] : 16793814 +index = [3][5] +...checksum after hashing g_860[i][j] : 2A7FCE3A +index = [3][6] +...checksum after hashing g_860[i][j] : 22E5ABD9 +index = [3][7] +...checksum after hashing g_860[i][j] : FAEFB2AA +index = [3][8] +...checksum after hashing g_860[i][j] : F97A9F47 +index = [3][9] +...checksum after hashing g_860[i][j] : 390DF060 +index = [4][0] +...checksum after hashing g_860[i][j] : FDB1CAEF +index = [4][1] +...checksum after hashing g_860[i][j] : AE01E3D5 +index = [4][2] +...checksum after hashing g_860[i][j] : C7053C45 +index = [4][3] +...checksum after hashing g_860[i][j] : 2C99DA99 +index = [4][4] +...checksum after hashing g_860[i][j] : 37880F63 +index = [4][5] +...checksum after hashing g_860[i][j] : BC7D65A8 +index = [4][6] +...checksum after hashing g_860[i][j] : CBDB6484 +index = [4][7] +...checksum after hashing g_860[i][j] : C168F509 +index = [4][8] +...checksum after hashing g_860[i][j] : 16B85541 +index = [4][9] +...checksum after hashing g_860[i][j] : 4927F60F +index = [5][0] +...checksum after hashing g_860[i][j] : A517EC1C +index = [5][1] +...checksum after hashing g_860[i][j] : 9BFFA267 +index = [5][2] +...checksum after hashing g_860[i][j] : DDAA55B3 +index = [5][3] +...checksum after hashing g_860[i][j] : 1C6F3A11 +index = [5][4] +...checksum after hashing g_860[i][j] : D2B83780 +index = [5][5] +...checksum after hashing g_860[i][j] : 5DE91F52 +index = [5][6] +...checksum after hashing g_860[i][j] : B946E231 +index = [5][7] +...checksum after hashing g_860[i][j] : 7498C8D4 +index = [5][8] +...checksum after hashing g_860[i][j] : 4182E478 +index = [5][9] +...checksum after hashing g_860[i][j] : D03ECF2D +index = [6][0] +...checksum after hashing g_860[i][j] : 9645D74E +index = [6][1] +...checksum after hashing g_860[i][j] : E59831FF +index = [6][2] +...checksum after hashing g_860[i][j] : C70A3B0A +index = [6][3] +...checksum after hashing g_860[i][j] : 6D3998B8 +index = [6][4] +...checksum after hashing g_860[i][j] : F3C45379 +index = [6][5] +...checksum after hashing g_860[i][j] : 26BA0327 +index = [6][6] +...checksum after hashing g_860[i][j] : A6DA4EA8 +index = [6][7] +...checksum after hashing g_860[i][j] : 344E0A1D +index = [6][8] +...checksum after hashing g_860[i][j] : 795224D3 +index = [6][9] +...checksum after hashing g_860[i][j] : 72C1BAE8 +index = [7][0] +...checksum after hashing g_860[i][j] : 2E105C77 +index = [7][1] +...checksum after hashing g_860[i][j] : 87ADE01A +index = [7][2] +...checksum after hashing g_860[i][j] : AB6D17C5 +index = [7][3] +...checksum after hashing g_860[i][j] : 1CF8097F +index = [7][4] +...checksum after hashing g_860[i][j] : 116CF0A4 +index = [7][5] +...checksum after hashing g_860[i][j] : 16034EF +index = [7][6] +...checksum after hashing g_860[i][j] : EADAE3AA +index = [7][7] +...checksum after hashing g_860[i][j] : 308D011E +index = [7][8] +...checksum after hashing g_860[i][j] : 80082448 +index = [7][9] +...checksum after hashing g_860[i][j] : 9CB5232B +index = [8][0] +...checksum after hashing g_860[i][j] : B4CBED6D +index = [8][1] +...checksum after hashing g_860[i][j] : E83A548 +index = [8][2] +...checksum after hashing g_860[i][j] : 235BAD6F +index = [8][3] +...checksum after hashing g_860[i][j] : 9C9811BF +index = [8][4] +...checksum after hashing g_860[i][j] : FD5104ED +index = [8][5] +...checksum after hashing g_860[i][j] : 96E51EB9 +index = [8][6] +...checksum after hashing g_860[i][j] : 19F91A0B +index = [8][7] +...checksum after hashing g_860[i][j] : E552E3E6 +index = [8][8] +...checksum after hashing g_860[i][j] : 99A5E145 +index = [8][9] +...checksum after hashing g_860[i][j] : 8679C539 +index = [9][0] +...checksum after hashing g_860[i][j] : 7999BF53 +index = [9][1] +...checksum after hashing g_860[i][j] : 1C1751DF +index = [9][2] +...checksum after hashing g_860[i][j] : 57959128 +index = [9][3] +...checksum after hashing g_860[i][j] : B53B222A +index = [9][4] +...checksum after hashing g_860[i][j] : 967A39F4 +index = [9][5] +...checksum after hashing g_860[i][j] : 3B5735D6 +index = [9][6] +...checksum after hashing g_860[i][j] : 30304730 +index = [9][7] +...checksum after hashing g_860[i][j] : FE96D5CE +index = [9][8] +...checksum after hashing g_860[i][j] : F9362410 +index = [9][9] +...checksum after hashing g_912 : E6687B6A +...checksum after hashing g_949 : A06FF500 +before stmt(664): checksum = A06FF500 +...checksum after hashing g_6 : 2144DF1C +...checksum after hashing g_14 : 6522DF69 +...checksum after hashing g_17 : 1B48F473 +...checksum after hashing g_85[i] : FB7568EA +index = [0] +...checksum after hashing g_85[i] : 5D62D96 +index = [1] +...checksum after hashing g_85[i] : 8D414DA8 +index = [2] +...checksum after hashing g_85[i] : 8011ED5 +index = [3] +...checksum after hashing g_85[i] : 9205CED7 +index = [4] +...checksum after hashing g_201[i] : DA3C843E +index = [0] +...checksum after hashing g_201[i] : 7AC5C682 +index = [1] +...checksum after hashing g_201[i] : 4DD79712 +index = [2] +...checksum after hashing g_451 : 5DA0E7ED +...checksum after hashing g_470 : EDEDB592 +...checksum after hashing g_557 : FA8C1508 +...checksum after hashing g_643[i][j] : 571D8270 +index = [0][0] +...checksum after hashing g_643[i][j] : 4BDDDF8F +index = [0][1] +...checksum after hashing g_643[i][j] : A46DF06B +index = [0][2] +...checksum after hashing g_643[i][j] : 1A117688 +index = [1][0] +...checksum after hashing g_643[i][j] : 1E1A48EA +index = [1][1] +...checksum after hashing g_643[i][j] : CF73BDDD +index = [1][2] +...checksum after hashing g_643[i][j] : 546BFE52 +index = [2][0] +...checksum after hashing g_643[i][j] : FC61A6C4 +index = [2][1] +...checksum after hashing g_643[i][j] : AE2DBB13 +index = [2][2] +...checksum after hashing g_643[i][j] : D8F93AC1 +index = [3][0] +...checksum after hashing g_643[i][j] : 624BF181 +index = [3][1] +...checksum after hashing g_643[i][j] : 13C85942 +index = [3][2] +...checksum after hashing g_643[i][j] : 97F79E50 +index = [4][0] +...checksum after hashing g_643[i][j] : C126F373 +index = [4][1] +...checksum after hashing g_643[i][j] : A3AFB4B8 +index = [4][2] +...checksum after hashing g_643[i][j] : 3ECB658C +index = [5][0] +...checksum after hashing g_643[i][j] : C8CC0BD0 +index = [5][1] +...checksum after hashing g_643[i][j] : 9AEB83F9 +index = [5][2] +...checksum after hashing g_643[i][j] : F757ABC8 +index = [6][0] +...checksum after hashing g_643[i][j] : 78C7C0F2 +index = [6][1] +...checksum after hashing g_643[i][j] : 25BFF7AA +index = [6][2] +...checksum after hashing g_643[i][j] : F81EFD45 +index = [7][0] +...checksum after hashing g_643[i][j] : BEC115CB +index = [7][1] +...checksum after hashing g_643[i][j] : 7837759 +index = [7][2] +...checksum after hashing g_651 : 4835BFCA +...checksum after hashing g_661[i] : 7D59D4F3 +index = [0] +...checksum after hashing g_661[i] : 2B03A791 +index = [1] +...checksum after hashing g_661[i] : 2EC70F0F +index = [2] +...checksum after hashing g_812 : 64ADF64C +...checksum after hashing g_838 : A805377B +...checksum after hashing g_860[i][j] : E050BFFA +index = [0][0] +...checksum after hashing g_860[i][j] : A49048BB +index = [0][1] +...checksum after hashing g_860[i][j] : 96F7487D +index = [0][2] +...checksum after hashing g_860[i][j] : F013418B +index = [0][3] +...checksum after hashing g_860[i][j] : 4207A877 +index = [0][4] +...checksum after hashing g_860[i][j] : 13956E9D +index = [0][5] +...checksum after hashing g_860[i][j] : 50BE2DE6 +index = [0][6] +...checksum after hashing g_860[i][j] : 87F2BD2C +index = [0][7] +...checksum after hashing g_860[i][j] : F0C3580C +index = [0][8] +...checksum after hashing g_860[i][j] : ECEB0E58 +index = [0][9] +...checksum after hashing g_860[i][j] : C8213ADE +index = [1][0] +...checksum after hashing g_860[i][j] : 6FAF49F4 +index = [1][1] +...checksum after hashing g_860[i][j] : 2A5B25 +index = [1][2] +...checksum after hashing g_860[i][j] : CD30F6CC +index = [1][3] +...checksum after hashing g_860[i][j] : 62141B16 +index = [1][4] +...checksum after hashing g_860[i][j] : D96DFE8 +index = [1][5] +...checksum after hashing g_860[i][j] : 19E187CF +index = [1][6] +...checksum after hashing g_860[i][j] : BC043D81 +index = [1][7] +...checksum after hashing g_860[i][j] : 5D1A2D4B +index = [1][8] +...checksum after hashing g_860[i][j] : 408F6564 +index = [1][9] +...checksum after hashing g_860[i][j] : E8AF1866 +index = [2][0] +...checksum after hashing g_860[i][j] : 12CE2802 +index = [2][1] +...checksum after hashing g_860[i][j] : B860E42E +index = [2][2] +...checksum after hashing g_860[i][j] : 1B1F54D1 +index = [2][3] +...checksum after hashing g_860[i][j] : 673752D6 +index = [2][4] +...checksum after hashing g_860[i][j] : CA53044F +index = [2][5] +...checksum after hashing g_860[i][j] : FB0C08BA +index = [2][6] +...checksum after hashing g_860[i][j] : AF583F67 +index = [2][7] +...checksum after hashing g_860[i][j] : 3F3AB447 +index = [2][8] +...checksum after hashing g_860[i][j] : CEA37D75 +index = [2][9] +...checksum after hashing g_860[i][j] : 210E1FDD +index = [3][0] +...checksum after hashing g_860[i][j] : 885600A0 +index = [3][1] +...checksum after hashing g_860[i][j] : C01E58B0 +index = [3][2] +...checksum after hashing g_860[i][j] : 65A66844 +index = [3][3] +...checksum after hashing g_860[i][j] : 4262167E +index = [3][4] +...checksum after hashing g_860[i][j] : B9D76DEF +index = [3][5] +...checksum after hashing g_860[i][j] : 67829CD9 +index = [3][6] +...checksum after hashing g_860[i][j] : 20681D0C +index = [3][7] +...checksum after hashing g_860[i][j] : 4A95FE89 +index = [3][8] +...checksum after hashing g_860[i][j] : 2CCCC9C3 +index = [3][9] +...checksum after hashing g_860[i][j] : 7721AC6B +index = [4][0] +...checksum after hashing g_860[i][j] : E7439D03 +index = [4][1] +...checksum after hashing g_860[i][j] : 80B35F25 +index = [4][2] +...checksum after hashing g_860[i][j] : 8702EC63 +index = [4][3] +...checksum after hashing g_860[i][j] : 1DD4C81C +index = [4][4] +...checksum after hashing g_860[i][j] : E6A40F06 +index = [4][5] +...checksum after hashing g_860[i][j] : 7860EB75 +index = [4][6] +...checksum after hashing g_860[i][j] : 972B59FF +index = [4][7] +...checksum after hashing g_860[i][j] : 27845835 +index = [4][8] +...checksum after hashing g_860[i][j] : C64727C6 +index = [4][9] +...checksum after hashing g_860[i][j] : 7B2BEB15 +index = [5][0] +...checksum after hashing g_860[i][j] : EA2F7548 +index = [5][1] +...checksum after hashing g_860[i][j] : DCAE5917 +index = [5][2] +...checksum after hashing g_860[i][j] : 441CD138 +index = [5][3] +...checksum after hashing g_860[i][j] : FB479AA9 +index = [5][4] +...checksum after hashing g_860[i][j] : B035D5E4 +index = [5][5] +...checksum after hashing g_860[i][j] : 6E5A9DBA +index = [5][6] +...checksum after hashing g_860[i][j] : 3804D865 +index = [5][7] +...checksum after hashing g_860[i][j] : 41FBAE56 +index = [5][8] +...checksum after hashing g_860[i][j] : 52EBD11D +index = [5][9] +...checksum after hashing g_860[i][j] : CEE77E57 +index = [6][0] +...checksum after hashing g_860[i][j] : FCAE40A4 +index = [6][1] +...checksum after hashing g_860[i][j] : B4EB9CB7 +index = [6][2] +...checksum after hashing g_860[i][j] : 5074CEBC +index = [6][3] +...checksum after hashing g_860[i][j] : 39F86A5A +index = [6][4] +...checksum after hashing g_860[i][j] : 87150E96 +index = [6][5] +...checksum after hashing g_860[i][j] : 389AED1 +index = [6][6] +...checksum after hashing g_860[i][j] : 6B187897 +index = [6][7] +...checksum after hashing g_860[i][j] : A0F97009 +index = [6][8] +...checksum after hashing g_860[i][j] : A3A966BF +index = [6][9] +...checksum after hashing g_860[i][j] : E161A841 +index = [7][0] +...checksum after hashing g_860[i][j] : C6D003F1 +index = [7][1] +...checksum after hashing g_860[i][j] : 4D54DD74 +index = [7][2] +...checksum after hashing g_860[i][j] : E2E8906C +index = [7][3] +...checksum after hashing g_860[i][j] : 8115C7CF +index = [7][4] +...checksum after hashing g_860[i][j] : F241672C +index = [7][5] +...checksum after hashing g_860[i][j] : C8F8ED63 +index = [7][6] +...checksum after hashing g_860[i][j] : 942D9E90 +index = [7][7] +...checksum after hashing g_860[i][j] : 1F72C999 +index = [7][8] +...checksum after hashing g_860[i][j] : 57CFAD19 +index = [7][9] +...checksum after hashing g_860[i][j] : 9DEC6D1D +index = [8][0] +...checksum after hashing g_860[i][j] : 7F13C51 +index = [8][1] +...checksum after hashing g_860[i][j] : 4FF48119 +index = [8][2] +...checksum after hashing g_860[i][j] : E0BB5A3 +index = [8][3] +...checksum after hashing g_860[i][j] : 4D52B3E8 +index = [8][4] +...checksum after hashing g_860[i][j] : B1B6677E +index = [8][5] +...checksum after hashing g_860[i][j] : 1DD44D1A +index = [8][6] +...checksum after hashing g_860[i][j] : 94EA6113 +index = [8][7] +...checksum after hashing g_860[i][j] : DABDA528 +index = [8][8] +...checksum after hashing g_860[i][j] : 14A04B1C +index = [8][9] +...checksum after hashing g_860[i][j] : AED567F +index = [9][0] +...checksum after hashing g_860[i][j] : C9903E0E +index = [9][1] +...checksum after hashing g_860[i][j] : DF24FFD2 +index = [9][2] +...checksum after hashing g_860[i][j] : 801FCFA5 +index = [9][3] +...checksum after hashing g_860[i][j] : 15F178C0 +index = [9][4] +...checksum after hashing g_860[i][j] : A950AFE2 +index = [9][5] +...checksum after hashing g_860[i][j] : 6EB618C2 +index = [9][6] +...checksum after hashing g_860[i][j] : 83BA359D +index = [9][7] +...checksum after hashing g_860[i][j] : 85E63ADF +index = [9][8] +...checksum after hashing g_860[i][j] : 5BC55235 +index = [9][9] +...checksum after hashing g_912 : 26B1403E +...checksum after hashing g_949 : 7A0DB62 +before stmt(669): checksum = 7A0DB62 +...checksum after hashing g_6 : 28FE78FE +...checksum after hashing g_14 : A295E3A9 +...checksum after hashing g_17 : EEF069ED +...checksum after hashing g_85[i] : B2EAF7FD +index = [0] +...checksum after hashing g_85[i] : C78ED29C +index = [1] +...checksum after hashing g_85[i] : 5B6CEDE1 +index = [2] +...checksum after hashing g_85[i] : 78FF790C +index = [3] +...checksum after hashing g_85[i] : 5EFB586E +index = [4] +...checksum after hashing g_201[i] : 5B3503C4 +index = [0] +...checksum after hashing g_201[i] : 3C1935BB +index = [1] +...checksum after hashing g_201[i] : C5448306 +index = [2] +...checksum after hashing g_451 : 20FBFE42 +...checksum after hashing g_470 : 9CE9AD20 +...checksum after hashing g_557 : 1CACE57F +...checksum after hashing g_643[i][j] : C8DC0A6A +index = [0][0] +...checksum after hashing g_643[i][j] : 290E4A96 +index = [0][1] +...checksum after hashing g_643[i][j] : 7B0D04CD +index = [0][2] +...checksum after hashing g_643[i][j] : B34D4FBF +index = [1][0] +...checksum after hashing g_643[i][j] : E1585FF9 +index = [1][1] +...checksum after hashing g_643[i][j] : 7BFB3253 +index = [1][2] +...checksum after hashing g_643[i][j] : 8CD20631 +index = [2][0] +...checksum after hashing g_643[i][j] : D32A9356 +index = [2][1] +...checksum after hashing g_643[i][j] : 23981ED0 +index = [2][2] +...checksum after hashing g_643[i][j] : 690941C2 +index = [3][0] +...checksum after hashing g_643[i][j] : 8080BB79 +index = [3][1] +...checksum after hashing g_643[i][j] : 4B1DE2CD +index = [3][2] +...checksum after hashing g_643[i][j] : 7239C150 +index = [4][0] +...checksum after hashing g_643[i][j] : 23DF76C9 +index = [4][1] +...checksum after hashing g_643[i][j] : BDE41A8D +index = [4][2] +...checksum after hashing g_643[i][j] : C35AB6D8 +index = [5][0] +...checksum after hashing g_643[i][j] : A83A2DB6 +index = [5][1] +...checksum after hashing g_643[i][j] : B7323617 +index = [5][2] +...checksum after hashing g_643[i][j] : 1747831B +index = [6][0] +...checksum after hashing g_643[i][j] : 90B031F4 +index = [6][1] +...checksum after hashing g_643[i][j] : 7A7D34EA +index = [6][2] +...checksum after hashing g_643[i][j] : F2FB74C8 +index = [7][0] +...checksum after hashing g_643[i][j] : 8CCAB595 +index = [7][1] +...checksum after hashing g_643[i][j] : DE0ADAE3 +index = [7][2] +...checksum after hashing g_651 : FE149675 +...checksum after hashing g_661[i] : A149F40A +index = [0] +...checksum after hashing g_661[i] : 2D8734F2 +index = [1] +...checksum after hashing g_661[i] : 4E8DA931 +index = [2] +...checksum after hashing g_812 : EE889EDB +...checksum after hashing g_838 : 2BC8CE27 +...checksum after hashing g_860[i][j] : D17B3C26 +index = [0][0] +...checksum after hashing g_860[i][j] : CCF1610 +index = [0][1] +...checksum after hashing g_860[i][j] : 8F91BF82 +index = [0][2] +...checksum after hashing g_860[i][j] : C95146CE +index = [0][3] +...checksum after hashing g_860[i][j] : 76C8B372 +index = [0][4] +...checksum after hashing g_860[i][j] : 59EEED0A +index = [0][5] +...checksum after hashing g_860[i][j] : C9985991 +index = [0][6] +...checksum after hashing g_860[i][j] : 68EF4D41 +index = [0][7] +...checksum after hashing g_860[i][j] : 439297F7 +index = [0][8] +...checksum after hashing g_860[i][j] : D6B7C0A0 +index = [0][9] +...checksum after hashing g_860[i][j] : C0C07436 +index = [1][0] +...checksum after hashing g_860[i][j] : 4FDECA76 +index = [1][1] +...checksum after hashing g_860[i][j] : A943E833 +index = [1][2] +...checksum after hashing g_860[i][j] : 646F7564 +index = [1][3] +...checksum after hashing g_860[i][j] : 9B91D5F2 +index = [1][4] +...checksum after hashing g_860[i][j] : 4D2F947B +index = [1][5] +...checksum after hashing g_860[i][j] : 8900FFC5 +index = [1][6] +...checksum after hashing g_860[i][j] : 3E31B5E4 +index = [1][7] +...checksum after hashing g_860[i][j] : 1F4340F8 +index = [1][8] +...checksum after hashing g_860[i][j] : FCEC1AC2 +index = [1][9] +...checksum after hashing g_860[i][j] : 5305B611 +index = [2][0] +...checksum after hashing g_860[i][j] : 3F9BFE2A +index = [2][1] +...checksum after hashing g_860[i][j] : D6F1DF19 +index = [2][2] +...checksum after hashing g_860[i][j] : 9C8D69BC +index = [2][3] +...checksum after hashing g_860[i][j] : B263F5D0 +index = [2][4] +...checksum after hashing g_860[i][j] : 1B61AE7D +index = [2][5] +...checksum after hashing g_860[i][j] : 69655615 +index = [2][6] +...checksum after hashing g_860[i][j] : 764C1708 +index = [2][7] +...checksum after hashing g_860[i][j] : BB80F96F +index = [2][8] +...checksum after hashing g_860[i][j] : 2798E53C +index = [2][9] +...checksum after hashing g_860[i][j] : D17654C6 +index = [3][0] +...checksum after hashing g_860[i][j] : 29DAB3FD +index = [3][1] +...checksum after hashing g_860[i][j] : 8868BBF +index = [3][2] +...checksum after hashing g_860[i][j] : 9E2DB9EB +index = [3][3] +...checksum after hashing g_860[i][j] : 29392A3E +index = [3][4] +...checksum after hashing g_860[i][j] : 8C9D1569 +index = [3][5] +...checksum after hashing g_860[i][j] : A9772F7A +index = [3][6] +...checksum after hashing g_860[i][j] : ADB911E1 +index = [3][7] +...checksum after hashing g_860[i][j] : 6CB095CB +index = [3][8] +...checksum after hashing g_860[i][j] : 63AD28AE +index = [3][9] +...checksum after hashing g_860[i][j] : 8CC83FC5 +index = [4][0] +...checksum after hashing g_860[i][j] : 107196AD +index = [4][1] +...checksum after hashing g_860[i][j] : EFFBED3C +index = [4][2] +...checksum after hashing g_860[i][j] : 896467CC +index = [4][3] +...checksum after hashing g_860[i][j] : 31A3D408 +index = [4][4] +...checksum after hashing g_860[i][j] : 7E451608 +index = [4][5] +...checksum after hashing g_860[i][j] : 32F9DD62 +index = [4][6] +...checksum after hashing g_860[i][j] : 4C893626 +index = [4][7] +...checksum after hashing g_860[i][j] : B263F70C +index = [4][8] +...checksum after hashing g_860[i][j] : 81A8850 +index = [4][9] +...checksum after hashing g_860[i][j] : 42ED839E +index = [5][0] +...checksum after hashing g_860[i][j] : 5416262A +index = [5][1] +...checksum after hashing g_860[i][j] : 126E547 +index = [5][2] +...checksum after hashing g_860[i][j] : 486D65C4 +index = [5][3] +...checksum after hashing g_860[i][j] : CA3261E6 +index = [5][4] +...checksum after hashing g_860[i][j] : C9458C37 +index = [5][5] +...checksum after hashing g_860[i][j] : 3F302E9C +index = [5][6] +...checksum after hashing g_860[i][j] : F93B8A81 +index = [5][7] +...checksum after hashing g_860[i][j] : C3635AFD +index = [5][8] +...checksum after hashing g_860[i][j] : C062760B +index = [5][9] +...checksum after hashing g_860[i][j] : 93E2EC9B +index = [6][0] +...checksum after hashing g_860[i][j] : 560FA488 +index = [6][1] +...checksum after hashing g_860[i][j] : 71FB3313 +index = [6][2] +...checksum after hashing g_860[i][j] : E1957EDD +index = [6][3] +...checksum after hashing g_860[i][j] : 843F459B +index = [6][4] +...checksum after hashing g_860[i][j] : 4B9E0890 +index = [6][5] +...checksum after hashing g_860[i][j] : 68CA42A4 +index = [6][6] +...checksum after hashing g_860[i][j] : 9635A5EB +index = [6][7] +...checksum after hashing g_860[i][j] : E7671D00 +index = [6][8] +...checksum after hashing g_860[i][j] : 99D402E1 +index = [6][9] +...checksum after hashing g_860[i][j] : D9F06D25 +index = [7][0] +...checksum after hashing g_860[i][j] : A5A834CB +index = [7][1] +...checksum after hashing g_860[i][j] : C0BBF5B8 +index = [7][2] +...checksum after hashing g_860[i][j] : A2C2C634 +index = [7][3] +...checksum after hashing g_860[i][j] : FE2A3F38 +index = [7][4] +...checksum after hashing g_860[i][j] : CA432DCB +index = [7][5] +...checksum after hashing g_860[i][j] : E46946E8 +index = [7][6] +...checksum after hashing g_860[i][j] : 21DACA93 +index = [7][7] +...checksum after hashing g_860[i][j] : 8684D062 +index = [7][8] +...checksum after hashing g_860[i][j] : DE6AC99B +index = [7][9] +...checksum after hashing g_860[i][j] : D2760379 +index = [8][0] +...checksum after hashing g_860[i][j] : 9C3184BE +index = [8][1] +...checksum after hashing g_860[i][j] : A682E25D +index = [8][2] +...checksum after hashing g_860[i][j] : F05F8B1C +index = [8][3] +...checksum after hashing g_860[i][j] : A26462F5 +index = [8][4] +...checksum after hashing g_860[i][j] : 2627D9A7 +index = [8][5] +...checksum after hashing g_860[i][j] : 8F79D5AF +index = [8][6] +...checksum after hashing g_860[i][j] : 48EE063F +index = [8][7] +...checksum after hashing g_860[i][j] : 96C833F0 +index = [8][8] +...checksum after hashing g_860[i][j] : 23FC9E20 +index = [8][9] +...checksum after hashing g_860[i][j] : 95E151EA +index = [9][0] +...checksum after hashing g_860[i][j] : 8A44F8C4 +index = [9][1] +...checksum after hashing g_860[i][j] : 59770B73 +index = [9][2] +...checksum after hashing g_860[i][j] : 5248424B +index = [9][3] +...checksum after hashing g_860[i][j] : 579BBE73 +index = [9][4] +...checksum after hashing g_860[i][j] : 347507F5 +index = [9][5] +...checksum after hashing g_860[i][j] : 125E4422 +index = [9][6] +...checksum after hashing g_860[i][j] : FF77E782 +index = [9][7] +...checksum after hashing g_860[i][j] : 2476085C +index = [9][8] +...checksum after hashing g_860[i][j] : 5356637A +index = [9][9] +...checksum after hashing g_912 : 94D8D619 +...checksum after hashing g_949 : 528B8AE9 +before stmt(668): checksum = 528B8AE9 +...checksum after hashing g_6 : 28FE78FE +...checksum after hashing g_14 : A295E3A9 +...checksum after hashing g_17 : EEF069ED +...checksum after hashing g_85[i] : B2EAF7FD +index = [0] +...checksum after hashing g_85[i] : C78ED29C +index = [1] +...checksum after hashing g_85[i] : 5B6CEDE1 +index = [2] +...checksum after hashing g_85[i] : 78FF790C +index = [3] +...checksum after hashing g_85[i] : 5EFB586E +index = [4] +...checksum after hashing g_201[i] : 5B3503C4 +index = [0] +...checksum after hashing g_201[i] : 3C1935BB +index = [1] +...checksum after hashing g_201[i] : C5448306 +index = [2] +...checksum after hashing g_451 : 20FBFE42 +...checksum after hashing g_470 : 9CE9AD20 +...checksum after hashing g_557 : 1CACE57F +...checksum after hashing g_643[i][j] : C8DC0A6A +index = [0][0] +...checksum after hashing g_643[i][j] : 290E4A96 +index = [0][1] +...checksum after hashing g_643[i][j] : 7B0D04CD +index = [0][2] +...checksum after hashing g_643[i][j] : B34D4FBF +index = [1][0] +...checksum after hashing g_643[i][j] : E1585FF9 +index = [1][1] +...checksum after hashing g_643[i][j] : 7BFB3253 +index = [1][2] +...checksum after hashing g_643[i][j] : 8CD20631 +index = [2][0] +...checksum after hashing g_643[i][j] : D32A9356 +index = [2][1] +...checksum after hashing g_643[i][j] : 23981ED0 +index = [2][2] +...checksum after hashing g_643[i][j] : 690941C2 +index = [3][0] +...checksum after hashing g_643[i][j] : 8080BB79 +index = [3][1] +...checksum after hashing g_643[i][j] : 4B1DE2CD +index = [3][2] +...checksum after hashing g_643[i][j] : 7239C150 +index = [4][0] +...checksum after hashing g_643[i][j] : 23DF76C9 +index = [4][1] +...checksum after hashing g_643[i][j] : BDE41A8D +index = [4][2] +...checksum after hashing g_643[i][j] : C35AB6D8 +index = [5][0] +...checksum after hashing g_643[i][j] : A83A2DB6 +index = [5][1] +...checksum after hashing g_643[i][j] : B7323617 +index = [5][2] +...checksum after hashing g_643[i][j] : 1747831B +index = [6][0] +...checksum after hashing g_643[i][j] : 90B031F4 +index = [6][1] +...checksum after hashing g_643[i][j] : 7A7D34EA +index = [6][2] +...checksum after hashing g_643[i][j] : F2FB74C8 +index = [7][0] +...checksum after hashing g_643[i][j] : 8CCAB595 +index = [7][1] +...checksum after hashing g_643[i][j] : DE0ADAE3 +index = [7][2] +...checksum after hashing g_651 : FE149675 +...checksum after hashing g_661[i] : A149F40A +index = [0] +...checksum after hashing g_661[i] : 2D8734F2 +index = [1] +...checksum after hashing g_661[i] : 4E8DA931 +index = [2] +...checksum after hashing g_812 : EE889EDB +...checksum after hashing g_838 : 2BC8CE27 +...checksum after hashing g_860[i][j] : D17B3C26 +index = [0][0] +...checksum after hashing g_860[i][j] : CCF1610 +index = [0][1] +...checksum after hashing g_860[i][j] : 8F91BF82 +index = [0][2] +...checksum after hashing g_860[i][j] : C95146CE +index = [0][3] +...checksum after hashing g_860[i][j] : 76C8B372 +index = [0][4] +...checksum after hashing g_860[i][j] : 59EEED0A +index = [0][5] +...checksum after hashing g_860[i][j] : C9985991 +index = [0][6] +...checksum after hashing g_860[i][j] : 68EF4D41 +index = [0][7] +...checksum after hashing g_860[i][j] : 439297F7 +index = [0][8] +...checksum after hashing g_860[i][j] : D6B7C0A0 +index = [0][9] +...checksum after hashing g_860[i][j] : C0C07436 +index = [1][0] +...checksum after hashing g_860[i][j] : 4FDECA76 +index = [1][1] +...checksum after hashing g_860[i][j] : A943E833 +index = [1][2] +...checksum after hashing g_860[i][j] : 646F7564 +index = [1][3] +...checksum after hashing g_860[i][j] : 9B91D5F2 +index = [1][4] +...checksum after hashing g_860[i][j] : 4D2F947B +index = [1][5] +...checksum after hashing g_860[i][j] : 8900FFC5 +index = [1][6] +...checksum after hashing g_860[i][j] : 3E31B5E4 +index = [1][7] +...checksum after hashing g_860[i][j] : 1F4340F8 +index = [1][8] +...checksum after hashing g_860[i][j] : FCEC1AC2 +index = [1][9] +...checksum after hashing g_860[i][j] : 5305B611 +index = [2][0] +...checksum after hashing g_860[i][j] : 3F9BFE2A +index = [2][1] +...checksum after hashing g_860[i][j] : D6F1DF19 +index = [2][2] +...checksum after hashing g_860[i][j] : 9C8D69BC +index = [2][3] +...checksum after hashing g_860[i][j] : B263F5D0 +index = [2][4] +...checksum after hashing g_860[i][j] : 1B61AE7D +index = [2][5] +...checksum after hashing g_860[i][j] : 69655615 +index = [2][6] +...checksum after hashing g_860[i][j] : 764C1708 +index = [2][7] +...checksum after hashing g_860[i][j] : BB80F96F +index = [2][8] +...checksum after hashing g_860[i][j] : 2798E53C +index = [2][9] +...checksum after hashing g_860[i][j] : D17654C6 +index = [3][0] +...checksum after hashing g_860[i][j] : 29DAB3FD +index = [3][1] +...checksum after hashing g_860[i][j] : 8868BBF +index = [3][2] +...checksum after hashing g_860[i][j] : 9E2DB9EB +index = [3][3] +...checksum after hashing g_860[i][j] : 29392A3E +index = [3][4] +...checksum after hashing g_860[i][j] : 8C9D1569 +index = [3][5] +...checksum after hashing g_860[i][j] : A9772F7A +index = [3][6] +...checksum after hashing g_860[i][j] : ADB911E1 +index = [3][7] +...checksum after hashing g_860[i][j] : 6CB095CB +index = [3][8] +...checksum after hashing g_860[i][j] : 63AD28AE +index = [3][9] +...checksum after hashing g_860[i][j] : 8CC83FC5 +index = [4][0] +...checksum after hashing g_860[i][j] : 107196AD +index = [4][1] +...checksum after hashing g_860[i][j] : EFFBED3C +index = [4][2] +...checksum after hashing g_860[i][j] : 896467CC +index = [4][3] +...checksum after hashing g_860[i][j] : 31A3D408 +index = [4][4] +...checksum after hashing g_860[i][j] : 7E451608 +index = [4][5] +...checksum after hashing g_860[i][j] : 32F9DD62 +index = [4][6] +...checksum after hashing g_860[i][j] : 4C893626 +index = [4][7] +...checksum after hashing g_860[i][j] : B263F70C +index = [4][8] +...checksum after hashing g_860[i][j] : 81A8850 +index = [4][9] +...checksum after hashing g_860[i][j] : 42ED839E +index = [5][0] +...checksum after hashing g_860[i][j] : 5416262A +index = [5][1] +...checksum after hashing g_860[i][j] : 126E547 +index = [5][2] +...checksum after hashing g_860[i][j] : 486D65C4 +index = [5][3] +...checksum after hashing g_860[i][j] : CA3261E6 +index = [5][4] +...checksum after hashing g_860[i][j] : C9458C37 +index = [5][5] +...checksum after hashing g_860[i][j] : 3F302E9C +index = [5][6] +...checksum after hashing g_860[i][j] : F93B8A81 +index = [5][7] +...checksum after hashing g_860[i][j] : C3635AFD +index = [5][8] +...checksum after hashing g_860[i][j] : C062760B +index = [5][9] +...checksum after hashing g_860[i][j] : 93E2EC9B +index = [6][0] +...checksum after hashing g_860[i][j] : 560FA488 +index = [6][1] +...checksum after hashing g_860[i][j] : 71FB3313 +index = [6][2] +...checksum after hashing g_860[i][j] : E1957EDD +index = [6][3] +...checksum after hashing g_860[i][j] : 843F459B +index = [6][4] +...checksum after hashing g_860[i][j] : 4B9E0890 +index = [6][5] +...checksum after hashing g_860[i][j] : 68CA42A4 +index = [6][6] +...checksum after hashing g_860[i][j] : 9635A5EB +index = [6][7] +...checksum after hashing g_860[i][j] : E7671D00 +index = [6][8] +...checksum after hashing g_860[i][j] : 99D402E1 +index = [6][9] +...checksum after hashing g_860[i][j] : D9F06D25 +index = [7][0] +...checksum after hashing g_860[i][j] : A5A834CB +index = [7][1] +...checksum after hashing g_860[i][j] : C0BBF5B8 +index = [7][2] +...checksum after hashing g_860[i][j] : A2C2C634 +index = [7][3] +...checksum after hashing g_860[i][j] : FE2A3F38 +index = [7][4] +...checksum after hashing g_860[i][j] : CA432DCB +index = [7][5] +...checksum after hashing g_860[i][j] : E46946E8 +index = [7][6] +...checksum after hashing g_860[i][j] : 21DACA93 +index = [7][7] +...checksum after hashing g_860[i][j] : 8684D062 +index = [7][8] +...checksum after hashing g_860[i][j] : DE6AC99B +index = [7][9] +...checksum after hashing g_860[i][j] : D2760379 +index = [8][0] +...checksum after hashing g_860[i][j] : 9C3184BE +index = [8][1] +...checksum after hashing g_860[i][j] : A682E25D +index = [8][2] +...checksum after hashing g_860[i][j] : F05F8B1C +index = [8][3] +...checksum after hashing g_860[i][j] : A26462F5 +index = [8][4] +...checksum after hashing g_860[i][j] : 2627D9A7 +index = [8][5] +...checksum after hashing g_860[i][j] : 8F79D5AF +index = [8][6] +...checksum after hashing g_860[i][j] : 48EE063F +index = [8][7] +...checksum after hashing g_860[i][j] : 96C833F0 +index = [8][8] +...checksum after hashing g_860[i][j] : 23FC9E20 +index = [8][9] +...checksum after hashing g_860[i][j] : 95E151EA +index = [9][0] +...checksum after hashing g_860[i][j] : 8A44F8C4 +index = [9][1] +...checksum after hashing g_860[i][j] : 59770B73 +index = [9][2] +...checksum after hashing g_860[i][j] : 5248424B +index = [9][3] +...checksum after hashing g_860[i][j] : 579BBE73 +index = [9][4] +...checksum after hashing g_860[i][j] : 347507F5 +index = [9][5] +...checksum after hashing g_860[i][j] : 125E4422 +index = [9][6] +...checksum after hashing g_860[i][j] : FF77E782 +index = [9][7] +...checksum after hashing g_860[i][j] : 2476085C +index = [9][8] +...checksum after hashing g_860[i][j] : 5356637A +index = [9][9] +...checksum after hashing g_912 : 94D8D619 +...checksum after hashing g_949 : 528B8AE9 +checksum = 528b8ae9 diff --git a/src/type.c b/src/type.c new file mode 100644 index 0000000..21e72db --- /dev/null +++ b/src/type.c @@ -0,0 +1,544 @@ +/* picoc data type module. This manages a tree of data types and has facilities + * for parsing data types. */ + +#include "interpreter.h" + +/* some basic types */ +static int PointerAlignBytes; +static int IntAlignBytes; + + +/* add a new type to the set of types we know about */ +struct ValueType *TypeAdd(Picoc *pc, struct ParseState *Parser, struct ValueType *ParentType, enum BaseType Base, int ArraySize, const char *Identifier, int Sizeof, int AlignBytes) +{ + struct ValueType *NewType = VariableAlloc(pc, Parser, sizeof(struct ValueType), TRUE); + NewType->Base = Base; + NewType->ArraySize = ArraySize; + NewType->Sizeof = Sizeof; + NewType->AlignBytes = AlignBytes; + NewType->Identifier = Identifier; + NewType->Members = NULL; + NewType->FromType = ParentType; + NewType->DerivedTypeList = NULL; + NewType->OnHeap = TRUE; + NewType->Next = ParentType->DerivedTypeList; + ParentType->DerivedTypeList = NewType; + + return NewType; +} + +/* given a parent type, get a matching derived type and make one if necessary. + * Identifier should be registered with the shared string table. */ +struct ValueType *TypeGetMatching(Picoc *pc, struct ParseState *Parser, struct ValueType *ParentType, enum BaseType Base, int ArraySize, const char *Identifier, int AllowDuplicates) +{ + int Sizeof; + int AlignBytes; + struct ValueType *ThisType = ParentType->DerivedTypeList; + while (ThisType != NULL && (ThisType->Base != Base || ThisType->ArraySize != ArraySize || ThisType->Identifier != Identifier)) + ThisType = ThisType->Next; + + if (ThisType != NULL) + { + if (AllowDuplicates) + return ThisType; + else + ProgramFail(Parser, "data type '%s' is already defined", Identifier); + } + + switch (Base) + { + case TypePointer: Sizeof = sizeof(void *); AlignBytes = PointerAlignBytes; break; + case TypeArray: Sizeof = ArraySize * ParentType->Sizeof; AlignBytes = ParentType->AlignBytes; break; + case TypeEnum: Sizeof = sizeof(int); AlignBytes = IntAlignBytes; break; + default: Sizeof = 0; AlignBytes = 0; break; /* structs and unions will get bigger when we add members to them */ + } + + return TypeAdd(pc, Parser, ParentType, Base, ArraySize, Identifier, Sizeof, AlignBytes); +} + +/* stack space used by a value */ +int TypeStackSizeValue(struct Value *Val) +{ + if (Val != NULL && Val->ValOnStack) + return TypeSizeValue(Val, FALSE); + else + return 0; +} + +/* memory used by a value */ +int TypeSizeValue(struct Value *Val, int Compact) +{ + if (IS_INTEGER_NUMERIC(Val) && !Compact) + return sizeof(ALIGN_TYPE); /* allow some extra room for type extension */ + else if (Val->Typ->Base != TypeArray) + return Val->Typ->Sizeof; + else + return Val->Typ->FromType->Sizeof * Val->Typ->ArraySize; +} + +/* memory used by a variable given its type and array size */ +int TypeSize(struct ValueType *Typ, int ArraySize, int Compact) +{ + if (IS_INTEGER_NUMERIC_TYPE(Typ) && !Compact) + return sizeof(ALIGN_TYPE); /* allow some extra room for type extension */ + else if (Typ->Base != TypeArray) + return Typ->Sizeof; + else + return Typ->FromType->Sizeof * ArraySize; +} + +/* add a base type */ +void TypeAddBaseType(Picoc *pc, struct ValueType *TypeNode, enum BaseType Base, int Sizeof, int AlignBytes) +{ + TypeNode->Base = Base; + TypeNode->ArraySize = 0; + TypeNode->Sizeof = Sizeof; + TypeNode->AlignBytes = AlignBytes; + TypeNode->Identifier = pc->StrEmpty; + TypeNode->Members = NULL; + TypeNode->FromType = NULL; + TypeNode->DerivedTypeList = NULL; + TypeNode->OnHeap = FALSE; + TypeNode->Next = pc->UberType.DerivedTypeList; + pc->UberType.DerivedTypeList = TypeNode; +} + +/* initialise the type system */ +void TypeInit(Picoc *pc) +{ + struct IntAlign { char x; int y; } ia; + struct ShortAlign { char x; short y; } sa; + struct CharAlign { char x; char y; } ca; + struct LongAlign { char x; long y; } la; +#ifndef NO_FP + struct DoubleAlign { char x; double y; } da; +#endif + struct PointerAlign { char x; void *y; } pa; + + IntAlignBytes = (char *)&ia.y - &ia.x; + PointerAlignBytes = (char *)&pa.y - &pa.x; + + pc->UberType.DerivedTypeList = NULL; + TypeAddBaseType(pc, &pc->IntType, TypeInt, sizeof(int), IntAlignBytes); + TypeAddBaseType(pc, &pc->ShortType, TypeShort, sizeof(short), (char *)&sa.y - &sa.x); + TypeAddBaseType(pc, &pc->CharType, TypeChar, sizeof(char), (char *)&ca.y - &ca.x); + TypeAddBaseType(pc, &pc->LongType, TypeLong, sizeof(long), (char *)&la.y - &la.x); + TypeAddBaseType(pc, &pc->UnsignedIntType, TypeUnsignedInt, sizeof(unsigned int), IntAlignBytes); + TypeAddBaseType(pc, &pc->UnsignedShortType, TypeUnsignedShort, sizeof(unsigned short), (char *)&sa.y - &sa.x); + TypeAddBaseType(pc, &pc->UnsignedLongType, TypeUnsignedLong, sizeof(unsigned long), (char *)&la.y - &la.x); + TypeAddBaseType(pc, &pc->UnsignedCharType, TypeUnsignedChar, sizeof(unsigned char), (char *)&ca.y - &ca.x); + TypeAddBaseType(pc, &pc->VoidType, TypeVoid, 0, 1); + TypeAddBaseType(pc, &pc->FunctionType, TypeFunction, sizeof(int), IntAlignBytes); + TypeAddBaseType(pc, &pc->MacroType, TypeMacro, sizeof(int), IntAlignBytes); + TypeAddBaseType(pc, &pc->GotoLabelType, TypeGotoLabel, 0, 1); +#ifndef NO_FP + TypeAddBaseType(pc, &pc->FPType, TypeFP, sizeof(double), (char *)&da.y - &da.x); + TypeAddBaseType(pc, &pc->TypeType, Type_Type, sizeof(double), (char *)&da.y - &da.x); /* must be large enough to cast to a double */ +#else + TypeAddBaseType(pc, &pc->TypeType, Type_Type, sizeof(struct ValueType *), PointerAlignBytes); +#endif + pc->CharArrayType = TypeAdd(pc, NULL, &pc->CharType, TypeArray, 0, pc->StrEmpty, sizeof(char), (char *)&ca.y - &ca.x); + pc->CharPtrType = TypeAdd(pc, NULL, &pc->CharType, TypePointer, 0, pc->StrEmpty, sizeof(void *), PointerAlignBytes); + pc->CharPtrPtrType = TypeAdd(pc, NULL, pc->CharPtrType, TypePointer, 0, pc->StrEmpty, sizeof(void *), PointerAlignBytes); + pc->VoidPtrType = TypeAdd(pc, NULL, &pc->VoidType, TypePointer, 0, pc->StrEmpty, sizeof(void *), PointerAlignBytes); +} + +/* deallocate heap-allocated types */ +void TypeCleanupNode(Picoc *pc, struct ValueType *Typ) +{ + struct ValueType *SubType; + struct ValueType *NextSubType; + + /* clean up and free all the sub-nodes */ + for (SubType = Typ->DerivedTypeList; SubType != NULL; SubType = NextSubType) + { + NextSubType = SubType->Next; + TypeCleanupNode(pc, SubType); + if (SubType->OnHeap) + { + /* if it's a struct or union deallocate all the member values */ + if (SubType->Members != NULL) + { + VariableTableCleanup(pc, SubType->Members); + HeapFreeMem(pc, SubType->Members); + } + + /* free this node */ + HeapFreeMem(pc, SubType); + } + } +} + +void TypeCleanup(Picoc *pc) +{ + TypeCleanupNode(pc, &pc->UberType); +} + +/* parse a struct or union declaration */ +void TypeParseStruct(struct ParseState *Parser, struct ValueType **Typ, int IsStruct) +{ + struct Value *LexValue; + struct ValueType *MemberType; + char *MemberIdentifier; + char *StructIdentifier; + struct Value *MemberValue; + enum LexToken Token; + int AlignBoundary; + Picoc *pc = Parser->pc; + + Token = LexGetToken(Parser, &LexValue, FALSE); + if (Token == TokenIdentifier) + { + LexGetToken(Parser, &LexValue, TRUE); + StructIdentifier = LexValue->Val->Identifier; + Token = LexGetToken(Parser, NULL, FALSE); + } + else + { + static char TempNameBuf[7] = "^s0000"; + StructIdentifier = PlatformMakeTempName(pc, TempNameBuf); + } + + *Typ = TypeGetMatching(pc, Parser, &Parser->pc->UberType, IsStruct ? TypeStruct : TypeUnion, 0, StructIdentifier, TRUE); + if (Token == TokenLeftBrace && (*Typ)->Members != NULL) + ProgramFail(Parser, "data type '%t' is already defined", *Typ); + + Token = LexGetToken(Parser, NULL, FALSE); + if (Token != TokenLeftBrace) + { + /* use the already defined structure */ +#if 0 + if ((*Typ)->Members == NULL) + ProgramFail(Parser, "structure '%s' isn't defined", LexValue->Val->Identifier); +#endif + return; + } + + if (pc->TopStackFrame != NULL) + ProgramFail(Parser, "struct/union definitions can only be globals"); + + LexGetToken(Parser, NULL, TRUE); + (*Typ)->Members = VariableAlloc(pc, Parser, sizeof(struct Table) + STRUCT_TABLE_SIZE * sizeof(struct TableEntry), TRUE); + (*Typ)->Members->HashTable = (struct TableEntry **)((char *)(*Typ)->Members + sizeof(struct Table)); + TableInitTable((*Typ)->Members, (struct TableEntry **)((char *)(*Typ)->Members + sizeof(struct Table)), STRUCT_TABLE_SIZE, TRUE); + + do { + TypeParse(Parser, &MemberType, &MemberIdentifier, NULL); + if (MemberType == NULL || MemberIdentifier == NULL) + ProgramFail(Parser, "invalid type in struct"); + + MemberValue = VariableAllocValueAndData(pc, Parser, sizeof(int), FALSE, NULL, TRUE); + MemberValue->Typ = MemberType; + if (IsStruct) + { + /* allocate this member's location in the struct */ + AlignBoundary = MemberValue->Typ->AlignBytes; + if (((*Typ)->Sizeof & (AlignBoundary-1)) != 0) + (*Typ)->Sizeof += AlignBoundary - ((*Typ)->Sizeof & (AlignBoundary-1)); + + MemberValue->Val->Integer = (*Typ)->Sizeof; + (*Typ)->Sizeof += TypeSizeValue(MemberValue, TRUE); + } + else + { + /* union members always start at 0, make sure it's big enough to hold the largest member */ + MemberValue->Val->Integer = 0; + if (MemberValue->Typ->Sizeof > (*Typ)->Sizeof) + (*Typ)->Sizeof = TypeSizeValue(MemberValue, TRUE); + } + + /* make sure to align to the size of the largest member's alignment */ + if ((*Typ)->AlignBytes < MemberValue->Typ->AlignBytes) + (*Typ)->AlignBytes = MemberValue->Typ->AlignBytes; + + /* define it */ + if (!TableSet(pc, (*Typ)->Members, MemberIdentifier, MemberValue, Parser->FileName, Parser->Line, Parser->CharacterPos)) + ProgramFail(Parser, "member '%s' already defined", &MemberIdentifier); + + if (LexGetToken(Parser, NULL, TRUE) != TokenSemicolon) + ProgramFail(Parser, "semicolon expected"); + + } while (LexGetToken(Parser, NULL, FALSE) != TokenRightBrace); + + /* now align the structure to the size of its largest member's alignment */ + AlignBoundary = (*Typ)->AlignBytes; + if (((*Typ)->Sizeof & (AlignBoundary-1)) != 0) + (*Typ)->Sizeof += AlignBoundary - ((*Typ)->Sizeof & (AlignBoundary-1)); + + LexGetToken(Parser, NULL, TRUE); +} + +/* create a system struct which has no user-visible members */ +struct ValueType *TypeCreateOpaqueStruct(Picoc *pc, struct ParseState *Parser, const char *StructName, int Size) +{ + struct ValueType *Typ = TypeGetMatching(pc, Parser, &pc->UberType, TypeStruct, 0, StructName, FALSE); + + /* create the (empty) table */ + Typ->Members = VariableAlloc(pc, Parser, sizeof(struct Table) + STRUCT_TABLE_SIZE * sizeof(struct TableEntry), TRUE); + Typ->Members->HashTable = (struct TableEntry **)((char *)Typ->Members + sizeof(struct Table)); + TableInitTable(Typ->Members, (struct TableEntry **)((char *)Typ->Members + sizeof(struct Table)), STRUCT_TABLE_SIZE, TRUE); + Typ->Sizeof = Size; + + return Typ; +} + +/* parse an enum declaration */ +void TypeParseEnum(struct ParseState *Parser, struct ValueType **Typ) +{ + struct Value *LexValue; + struct Value InitValue; + enum LexToken Token; + int EnumValue = 0; + char *EnumIdentifier; + Picoc *pc = Parser->pc; + + Token = LexGetToken(Parser, &LexValue, FALSE); + if (Token == TokenIdentifier) + { + LexGetToken(Parser, &LexValue, TRUE); + EnumIdentifier = LexValue->Val->Identifier; + Token = LexGetToken(Parser, NULL, FALSE); + } + else + { + static char TempNameBuf[7] = "^e0000"; + EnumIdentifier = PlatformMakeTempName(pc, TempNameBuf); + } + + TypeGetMatching(pc, Parser, &pc->UberType, TypeEnum, 0, EnumIdentifier, Token != TokenLeftBrace); + *Typ = &pc->IntType; + if (Token != TokenLeftBrace) + { + /* use the already defined enum */ + if ((*Typ)->Members == NULL) + ProgramFail(Parser, "enum '%s' isn't defined", EnumIdentifier); + + return; + } + + if (pc->TopStackFrame != NULL) + ProgramFail(Parser, "enum definitions can only be globals"); + + LexGetToken(Parser, NULL, TRUE); + (*Typ)->Members = &pc->GlobalTable; + memset((void *)&InitValue, '\0', sizeof(struct Value)); + InitValue.Typ = &pc->IntType; + InitValue.Val = (union AnyValue *)&EnumValue; + do { + if (LexGetToken(Parser, &LexValue, TRUE) != TokenIdentifier) + ProgramFail(Parser, "identifier expected"); + + EnumIdentifier = LexValue->Val->Identifier; + if (LexGetToken(Parser, NULL, FALSE) == TokenAssign) + { + LexGetToken(Parser, NULL, TRUE); + EnumValue = ExpressionParseInt(Parser); + } + + VariableDefine(pc, Parser, EnumIdentifier, &InitValue, NULL, FALSE); + + Token = LexGetToken(Parser, NULL, TRUE); + if (Token != TokenComma && Token != TokenRightBrace) + ProgramFail(Parser, "comma expected"); + + EnumValue++; + + } while (Token == TokenComma); +} + +/* parse a type - just the basic type */ +int TypeParseFront(struct ParseState *Parser, struct ValueType **Typ, int *IsStatic) +{ + struct ParseState Before; + struct Value *LexerValue; + enum LexToken Token; + int Unsigned = FALSE; + struct Value *VarValue; + int StaticQualifier = FALSE; + Picoc *pc = Parser->pc; + *Typ = NULL; + + /* ignore leading type qualifiers */ + ParserCopy(&Before, Parser); + Token = LexGetToken(Parser, &LexerValue, TRUE); + while (Token == TokenStaticType || Token == TokenAutoType || Token == TokenRegisterType || Token == TokenExternType) + { + if (Token == TokenStaticType) + StaticQualifier = TRUE; + + Token = LexGetToken(Parser, &LexerValue, TRUE); + } + + if (IsStatic != NULL) + *IsStatic = StaticQualifier; + + /* handle signed/unsigned with no trailing type */ + if (Token == TokenSignedType || Token == TokenUnsignedType) + { + enum LexToken FollowToken = LexGetToken(Parser, &LexerValue, FALSE); + Unsigned = (Token == TokenUnsignedType); + + if (FollowToken != TokenIntType && FollowToken != TokenLongType && FollowToken != TokenShortType && FollowToken != TokenCharType) + { + if (Token == TokenUnsignedType) + *Typ = &pc->UnsignedIntType; + else + *Typ = &pc->IntType; + + return TRUE; + } + + Token = LexGetToken(Parser, &LexerValue, TRUE); + } + + switch (Token) + { + case TokenIntType: *Typ = Unsigned ? &pc->UnsignedIntType : &pc->IntType; break; + case TokenShortType: *Typ = Unsigned ? &pc->UnsignedShortType : &pc->ShortType; break; + case TokenCharType: *Typ = Unsigned ? &pc->UnsignedCharType : &pc->CharType; break; + case TokenLongType: *Typ = Unsigned ? &pc->UnsignedLongType : &pc->LongType; break; +#ifndef NO_FP + case TokenFloatType: case TokenDoubleType: *Typ = &pc->FPType; break; +#endif + case TokenVoidType: *Typ = &pc->VoidType; break; + + case TokenStructType: case TokenUnionType: + if (*Typ != NULL) + ProgramFail(Parser, "bad type declaration"); + + TypeParseStruct(Parser, Typ, Token == TokenStructType); + break; + + case TokenEnumType: + if (*Typ != NULL) + ProgramFail(Parser, "bad type declaration"); + + TypeParseEnum(Parser, Typ); + break; + + case TokenIdentifier: + /* we already know it's a typedef-defined type because we got here */ + VariableGet(pc, Parser, LexerValue->Val->Identifier, &VarValue); + *Typ = VarValue->Val->Typ; + break; + + default: ParserCopy(Parser, &Before); return FALSE; + } + + return TRUE; +} + +/* parse a type - the part at the end after the identifier. eg. array specifications etc. */ +struct ValueType *TypeParseBack(struct ParseState *Parser, struct ValueType *FromType) +{ + enum LexToken Token; + struct ParseState Before; + + ParserCopy(&Before, Parser); + Token = LexGetToken(Parser, NULL, TRUE); + if (Token == TokenLeftSquareBracket) + { + /* add another array bound */ + if (LexGetToken(Parser, NULL, FALSE) == TokenRightSquareBracket) + { + /* an unsized array */ + LexGetToken(Parser, NULL, TRUE); + return TypeGetMatching(Parser->pc, Parser, TypeParseBack(Parser, FromType), TypeArray, 0, Parser->pc->StrEmpty, TRUE); + } + else + { + /* get a numeric array size */ + enum RunMode OldMode = Parser->Mode; + int ArraySize; + Parser->Mode = RunModeRun; + ArraySize = ExpressionParseInt(Parser); + Parser->Mode = OldMode; + + if (LexGetToken(Parser, NULL, TRUE) != TokenRightSquareBracket) + ProgramFail(Parser, "']' expected"); + + return TypeGetMatching(Parser->pc, Parser, TypeParseBack(Parser, FromType), TypeArray, ArraySize, Parser->pc->StrEmpty, TRUE); + } + } + else + { + /* the type specification has finished */ + ParserCopy(Parser, &Before); + return FromType; + } +} + +/* parse a type - the part which is repeated with each identifier in a declaration list */ +void TypeParseIdentPart(struct ParseState *Parser, struct ValueType *BasicTyp, struct ValueType **Typ, char **Identifier) +{ + struct ParseState Before; + enum LexToken Token; + struct Value *LexValue; + int Done = FALSE; + *Typ = BasicTyp; + *Identifier = Parser->pc->StrEmpty; + + while (!Done) + { + ParserCopy(&Before, Parser); + Token = LexGetToken(Parser, &LexValue, TRUE); + switch (Token) + { + case TokenOpenBracket: + if (*Typ != NULL) + ProgramFail(Parser, "bad type declaration"); + + TypeParse(Parser, Typ, Identifier, NULL); + if (LexGetToken(Parser, NULL, TRUE) != TokenCloseBracket) + ProgramFail(Parser, "')' expected"); + break; + + case TokenAsterisk: + if (*Typ == NULL) + ProgramFail(Parser, "bad type declaration"); + + *Typ = TypeGetMatching(Parser->pc, Parser, *Typ, TypePointer, 0, Parser->pc->StrEmpty, TRUE); + break; + + case TokenIdentifier: + if (*Typ == NULL || *Identifier != Parser->pc->StrEmpty) + ProgramFail(Parser, "bad type declaration"); + + *Identifier = LexValue->Val->Identifier; + Done = TRUE; + break; + + default: ParserCopy(Parser, &Before); Done = TRUE; break; + } + } + + if (*Typ == NULL) + ProgramFail(Parser, "bad type declaration"); + + if (*Identifier != Parser->pc->StrEmpty) + { + /* parse stuff after the identifier */ + *Typ = TypeParseBack(Parser, *Typ); + } +} + +/* parse a type - a complete declaration including identifier */ +void TypeParse(struct ParseState *Parser, struct ValueType **Typ, char **Identifier, int *IsStatic) +{ + struct ValueType *BasicType; + + TypeParseFront(Parser, &BasicType, IsStatic); + TypeParseIdentPart(Parser, BasicType, Typ, Identifier); +} + +/* check if a type has been fully defined - otherwise it's just a forward declaration */ +int TypeIsForwardDeclared(struct ParseState *Parser, struct ValueType *Typ) +{ + if (Typ->Base == TypeArray) + return TypeIsForwardDeclared(Parser, Typ->FromType); + + if ( (Typ->Base == TypeStruct || Typ->Base == TypeUnion) && Typ->Members == NULL) + return TRUE; + + return FALSE; +} diff --git a/src/type.o b/src/type.o new file mode 100644 index 0000000..ab08964 Binary files /dev/null and b/src/type.o differ diff --git a/src/variable.c b/src/variable.c new file mode 100644 index 0000000..d2b6566 --- /dev/null +++ b/src/variable.c @@ -0,0 +1,474 @@ +/* picoc variable storage. This provides ways of defining and accessing + * variables */ + +#include "interpreter.h" + +/* maximum size of a value to temporarily copy while we create a variable */ +#define MAX_TMP_COPY_BUF 256 + + +/* initialise the variable system */ +void VariableInit(Picoc *pc) +{ + TableInitTable(&(pc->GlobalTable), &(pc->GlobalHashTable)[0], GLOBAL_TABLE_SIZE, TRUE); + TableInitTable(&pc->StringLiteralTable, &pc->StringLiteralHashTable[0], STRING_LITERAL_TABLE_SIZE, TRUE); + pc->TopStackFrame = NULL; +} + +/* deallocate the contents of a variable */ +void VariableFree(Picoc *pc, struct Value *Val) +{ + if (Val->ValOnHeap || Val->AnyValOnHeap) + { + /* free function bodies */ + if (Val->Typ == &pc->FunctionType && Val->Val->FuncDef.Intrinsic == NULL && Val->Val->FuncDef.Body.Pos != NULL) + HeapFreeMem(pc, (void *)Val->Val->FuncDef.Body.Pos); + + /* free macro bodies */ + if (Val->Typ == &pc->MacroType) + HeapFreeMem(pc, (void *)Val->Val->MacroDef.Body.Pos); + + /* free the AnyValue */ + if (Val->AnyValOnHeap) + HeapFreeMem(pc, Val->Val); + } + + /* free the value */ + if (Val->ValOnHeap) + HeapFreeMem(pc, Val); +} + +/* deallocate the global table and the string literal table */ +void VariableTableCleanup(Picoc *pc, struct Table *HashTable) +{ + struct TableEntry *Entry; + struct TableEntry *NextEntry; + int Count; + + for (Count = 0; Count < HashTable->Size; Count++) + { + for (Entry = HashTable->HashTable[Count]; Entry != NULL; Entry = NextEntry) + { + NextEntry = Entry->Next; + VariableFree(pc, Entry->p.v.Val); + + /* free the hash table entry */ + HeapFreeMem(pc, Entry); + } + } +} + +void VariableCleanup(Picoc *pc) +{ + VariableTableCleanup(pc, &pc->GlobalTable); + VariableTableCleanup(pc, &pc->StringLiteralTable); +} + +/* allocate some memory, either on the heap or the stack and check if we've run out */ +void *VariableAlloc(Picoc *pc, struct ParseState *Parser, int Size, int OnHeap) +{ + void *NewValue; + + if (OnHeap) + NewValue = HeapAllocMem(pc, Size); + else + NewValue = HeapAllocStack(pc, Size); + + if (NewValue == NULL) + ProgramFail(Parser, "out of memory"); + +#ifdef DEBUG_HEAP + if (!OnHeap) + printf("pushing %d at 0x%lx\n", Size, (unsigned long)NewValue); +#endif + + return NewValue; +} + +/* allocate a value either on the heap or the stack using space dependent on what type we want */ +struct Value *VariableAllocValueAndData(Picoc *pc, struct ParseState *Parser, int DataSize, int IsLValue, struct Value *LValueFrom, int OnHeap) +{ + struct Value *NewValue = VariableAlloc(pc, Parser, MEM_ALIGN(sizeof(struct Value)) + DataSize, OnHeap); + NewValue->Val = (union AnyValue *)((char *)NewValue + MEM_ALIGN(sizeof(struct Value))); + NewValue->ValOnHeap = OnHeap; + NewValue->AnyValOnHeap = FALSE; + NewValue->ValOnStack = !OnHeap; + NewValue->IsLValue = IsLValue; + NewValue->LValueFrom = LValueFrom; + if (Parser) + NewValue->ScopeID = Parser->ScopeID; + + NewValue->OutOfScope = 0; + + return NewValue; +} + +/* allocate a value given its type */ +struct Value *VariableAllocValueFromType(Picoc *pc, struct ParseState *Parser, struct ValueType *Typ, int IsLValue, struct Value *LValueFrom, int OnHeap) +{ + int Size = TypeSize(Typ, Typ->ArraySize, FALSE); + struct Value *NewValue = VariableAllocValueAndData(pc, Parser, Size, IsLValue, LValueFrom, OnHeap); + assert(Size >= 0 || Typ == &pc->VoidType); + NewValue->Typ = Typ; + + return NewValue; +} + +/* allocate a value either on the heap or the stack and copy its value. handles overlapping data */ +struct Value *VariableAllocValueAndCopy(Picoc *pc, struct ParseState *Parser, struct Value *FromValue, int OnHeap) +{ + struct ValueType *DType = FromValue->Typ; + struct Value *NewValue; + char TmpBuf[MAX_TMP_COPY_BUF]; + int CopySize = TypeSizeValue(FromValue, TRUE); + + assert(CopySize <= MAX_TMP_COPY_BUF); + memcpy((void *)&TmpBuf[0], (void *)FromValue->Val, CopySize); + NewValue = VariableAllocValueAndData(pc, Parser, CopySize, FromValue->IsLValue, FromValue->LValueFrom, OnHeap); + NewValue->Typ = DType; + memcpy((void *)NewValue->Val, (void *)&TmpBuf[0], CopySize); + + return NewValue; +} + +/* allocate a value either on the heap or the stack from an existing AnyValue and type */ +struct Value *VariableAllocValueFromExistingData(struct ParseState *Parser, struct ValueType *Typ, union AnyValue *FromValue, int IsLValue, struct Value *LValueFrom) +{ + struct Value *NewValue = VariableAlloc(Parser->pc, Parser, sizeof(struct Value), FALSE); + NewValue->Typ = Typ; + NewValue->Val = FromValue; + NewValue->ValOnHeap = FALSE; + NewValue->AnyValOnHeap = FALSE; + NewValue->ValOnStack = FALSE; + NewValue->IsLValue = IsLValue; + NewValue->LValueFrom = LValueFrom; + + return NewValue; +} + +/* allocate a value either on the heap or the stack from an existing Value, sharing the value */ +struct Value *VariableAllocValueShared(struct ParseState *Parser, struct Value *FromValue) +{ + return VariableAllocValueFromExistingData(Parser, FromValue->Typ, FromValue->Val, FromValue->IsLValue, FromValue->IsLValue ? FromValue : NULL); +} + +/* reallocate a variable so its data has a new size */ +void VariableRealloc(struct ParseState *Parser, struct Value *FromValue, int NewSize) +{ + if (FromValue->AnyValOnHeap) + HeapFreeMem(Parser->pc, FromValue->Val); + + FromValue->Val = VariableAlloc(Parser->pc, Parser, NewSize, TRUE); + FromValue->AnyValOnHeap = TRUE; +} + +int VariableScopeBegin(struct ParseState * Parser, int* OldScopeID) +{ + struct TableEntry *Entry; + struct TableEntry *NextEntry; + Picoc * pc = Parser->pc; + int Count; + #ifdef VAR_SCOPE_DEBUG + int FirstPrint = 0; + #endif + + struct Table * HashTable = (pc->TopStackFrame == NULL) ? &(pc->GlobalTable) : &(pc->TopStackFrame)->LocalTable; + + if (Parser->ScopeID == -1) return -1; + + /* XXX dumb hash, let's hope for no collisions... */ + *OldScopeID = Parser->ScopeID; + Parser->ScopeID = (int)(intptr_t)(Parser->SourceText) * ((int)(intptr_t)(Parser->Pos) / sizeof(char*)); + /* or maybe a more human-readable hash for debugging? */ + /* Parser->ScopeID = Parser->Line * 0x10000 + Parser->CharacterPos; */ + + for (Count = 0; Count < HashTable->Size; Count++) + { + for (Entry = HashTable->HashTable[Count]; Entry != NULL; Entry = NextEntry) + { + NextEntry = Entry->Next; + if (Entry->p.v.Val->ScopeID == Parser->ScopeID && Entry->p.v.Val->OutOfScope) + { + Entry->p.v.Val->OutOfScope = FALSE; + Entry->p.v.Key = (char*)((intptr_t)Entry->p.v.Key & ~1); + #ifdef VAR_SCOPE_DEBUG + if (!FirstPrint) { PRINT_SOURCE_POS; } + FirstPrint = 1; + printf(">>> back into scope: %s %x %d\n", Entry->p.v.Key, Entry->p.v.Val->ScopeID, Entry->p.v.Val->Val->Integer); + #endif + } + } + } + + return Parser->ScopeID; +} + +void VariableScopeEnd(struct ParseState * Parser, int ScopeID, int PrevScopeID) +{ + struct TableEntry *Entry; + struct TableEntry *NextEntry; + Picoc * pc = Parser->pc; + int Count; + #ifdef VAR_SCOPE_DEBUG + int FirstPrint = 0; + #endif + + struct Table * HashTable = (pc->TopStackFrame == NULL) ? &(pc->GlobalTable) : &(pc->TopStackFrame)->LocalTable; + + if (ScopeID == -1) return; + + for (Count = 0; Count < HashTable->Size; Count++) + { + for (Entry = HashTable->HashTable[Count]; Entry != NULL; Entry = NextEntry) + { + NextEntry = Entry->Next; + if (Entry->p.v.Val->ScopeID == ScopeID && !Entry->p.v.Val->OutOfScope) + { + #ifdef VAR_SCOPE_DEBUG + if (!FirstPrint) { PRINT_SOURCE_POS; } + FirstPrint = 1; + printf(">>> out of scope: %s %x %d\n", Entry->p.v.Key, Entry->p.v.Val->ScopeID, Entry->p.v.Val->Val->Integer); + #endif + Entry->p.v.Val->OutOfScope = TRUE; + Entry->p.v.Key = (char*)((intptr_t)Entry->p.v.Key | 1); /* alter the key so it won't be found by normal searches */ + } + } + } + + Parser->ScopeID = PrevScopeID; +} + +int VariableDefinedAndOutOfScope(Picoc * pc, const char* Ident) +{ + struct TableEntry *Entry; + int Count; + + struct Table * HashTable = (pc->TopStackFrame == NULL) ? &(pc->GlobalTable) : &(pc->TopStackFrame)->LocalTable; + for (Count = 0; Count < HashTable->Size; Count++) + { + for (Entry = HashTable->HashTable[Count]; Entry != NULL; Entry = Entry->Next) + { + if (Entry->p.v.Val->OutOfScope && (char*)((intptr_t)Entry->p.v.Key & ~1) == Ident) + return TRUE; + } + } + return FALSE; +} + +/* define a variable. Ident must be registered */ +struct Value *VariableDefine(Picoc *pc, struct ParseState *Parser, char *Ident, struct Value *InitValue, struct ValueType *Typ, int MakeWritable) +{ + struct Value * AssignValue; + struct Table * currentTable = (pc->TopStackFrame == NULL) ? &(pc->GlobalTable) : &(pc->TopStackFrame)->LocalTable; + + int ScopeID = Parser ? Parser->ScopeID : -1; +#ifdef VAR_SCOPE_DEBUG + if (Parser) fprintf(stderr, "def %s %x (%s:%d:%d)\n", Ident, ScopeID, Parser->FileName, Parser->Line, Parser->CharacterPos); +#endif + + if (InitValue != NULL) + AssignValue = VariableAllocValueAndCopy(pc, Parser, InitValue, pc->TopStackFrame == NULL); + else + AssignValue = VariableAllocValueFromType(pc, Parser, Typ, MakeWritable, NULL, pc->TopStackFrame == NULL); + + AssignValue->IsLValue = MakeWritable; + AssignValue->ScopeID = ScopeID; + AssignValue->OutOfScope = FALSE; + + if (!TableSet(pc, currentTable, Ident, AssignValue, Parser ? ((char *)Parser->FileName) : NULL, Parser ? Parser->Line : 0, Parser ? Parser->CharacterPos : 0)) + ProgramFail(Parser, "'%s' is already defined", Ident); + + return AssignValue; +} + +/* define a variable. Ident must be registered. If it's a redefinition from the same declaration don't throw an error */ +struct Value *VariableDefineButIgnoreIdentical(struct ParseState *Parser, char *Ident, struct ValueType *Typ, int IsStatic, int *FirstVisit) +{ + Picoc *pc = Parser->pc; + struct Value *ExistingValue; + const char *DeclFileName; + int DeclLine; + int DeclColumn; + + /* is the type a forward declaration? */ + if (TypeIsForwardDeclared(Parser, Typ)) + ProgramFail(Parser, "type '%t' isn't defined", Typ); + + if (IsStatic) + { + char MangledName[LINEBUFFER_MAX]; + char *MNPos = &MangledName[0]; + char *MNEnd = &MangledName[LINEBUFFER_MAX-1]; + const char *RegisteredMangledName; + + /* make the mangled static name (avoiding using sprintf() to minimise library impact) */ + memset((void *)&MangledName, '\0', sizeof(MangledName)); + *MNPos++ = '/'; + strncpy(MNPos, (char *)Parser->FileName, MNEnd - MNPos); + MNPos += strlen(MNPos); + + if (pc->TopStackFrame != NULL) + { + /* we're inside a function */ + if (MNEnd - MNPos > 0) *MNPos++ = '/'; + strncpy(MNPos, (char *)pc->TopStackFrame->FuncName, MNEnd - MNPos); + MNPos += strlen(MNPos); + } + + if (MNEnd - MNPos > 0) *MNPos++ = '/'; + strncpy(MNPos, Ident, MNEnd - MNPos); + RegisteredMangledName = TableStrRegister(pc, MangledName); + + /* is this static already defined? */ + if (!TableGet(&pc->GlobalTable, RegisteredMangledName, &ExistingValue, &DeclFileName, &DeclLine, &DeclColumn)) + { + /* define the mangled-named static variable store in the global scope */ + ExistingValue = VariableAllocValueFromType(Parser->pc, Parser, Typ, TRUE, NULL, TRUE); + TableSet(pc, &pc->GlobalTable, (char *)RegisteredMangledName, ExistingValue, (char *)Parser->FileName, Parser->Line, Parser->CharacterPos); + *FirstVisit = TRUE; + } + + /* static variable exists in the global scope - now make a mirroring variable in our own scope with the short name */ + VariableDefinePlatformVar(Parser->pc, Parser, Ident, ExistingValue->Typ, ExistingValue->Val, TRUE); + return ExistingValue; + } + else + { + if (Parser->Line != 0 && TableGet((pc->TopStackFrame == NULL) ? &pc->GlobalTable : &pc->TopStackFrame->LocalTable, Ident, &ExistingValue, &DeclFileName, &DeclLine, &DeclColumn) + && DeclFileName == Parser->FileName && DeclLine == Parser->Line && DeclColumn == Parser->CharacterPos) + return ExistingValue; + else + return VariableDefine(Parser->pc, Parser, Ident, NULL, Typ, TRUE); + } +} + +/* check if a variable with a given name is defined. Ident must be registered */ +int VariableDefined(Picoc *pc, const char *Ident) +{ + struct Value *FoundValue; + + if (pc->TopStackFrame == NULL || !TableGet(&pc->TopStackFrame->LocalTable, Ident, &FoundValue, NULL, NULL, NULL)) + { + if (!TableGet(&pc->GlobalTable, Ident, &FoundValue, NULL, NULL, NULL)) + return FALSE; + } + + return TRUE; +} + +/* get the value of a variable. must be defined. Ident must be registered */ +void VariableGet(Picoc *pc, struct ParseState *Parser, const char *Ident, struct Value **LVal) +{ + if (pc->TopStackFrame == NULL || !TableGet(&pc->TopStackFrame->LocalTable, Ident, LVal, NULL, NULL, NULL)) + { + if (!TableGet(&pc->GlobalTable, Ident, LVal, NULL, NULL, NULL)) + { + if (VariableDefinedAndOutOfScope(pc, Ident)) + ProgramFail(Parser, "'%s' is out of scope", Ident); + else + ProgramFail(Parser, "'%s' is undefined", Ident); + } + } +} + +/* define a global variable shared with a platform global. Ident will be registered */ +void VariableDefinePlatformVar(Picoc *pc, struct ParseState *Parser, char *Ident, struct ValueType *Typ, union AnyValue *FromValue, int IsWritable) +{ + struct Value *SomeValue = VariableAllocValueAndData(pc, NULL, 0, IsWritable, NULL, TRUE); + SomeValue->Typ = Typ; + SomeValue->Val = FromValue; + + if (!TableSet(pc, (pc->TopStackFrame == NULL) ? &pc->GlobalTable : &pc->TopStackFrame->LocalTable, TableStrRegister(pc, Ident), SomeValue, Parser ? Parser->FileName : NULL, Parser ? Parser->Line : 0, Parser ? Parser->CharacterPos : 0)) + ProgramFail(Parser, "'%s' is already defined", Ident); +} + +/* free and/or pop the top value off the stack. Var must be the top value on the stack! */ +void VariableStackPop(struct ParseState *Parser, struct Value *Var) +{ + int Success; + +#ifdef DEBUG_HEAP + if (Var->ValOnStack) + printf("popping %ld at 0x%lx\n", (unsigned long)(sizeof(struct Value) + TypeSizeValue(Var, FALSE)), (unsigned long)Var); +#endif + + if (Var->ValOnHeap) + { + if (Var->Val != NULL) + HeapFreeMem(Parser->pc, Var->Val); + + Success = HeapPopStack(Parser->pc, Var, sizeof(struct Value)); /* free from heap */ + } + else if (Var->ValOnStack) + Success = HeapPopStack(Parser->pc, Var, sizeof(struct Value) + TypeSizeValue(Var, FALSE)); /* free from stack */ + else + Success = HeapPopStack(Parser->pc, Var, sizeof(struct Value)); /* value isn't our problem */ + + if (!Success) + ProgramFail(Parser, "stack underrun"); +} + +/* add a stack frame when doing a function call */ +void VariableStackFrameAdd(struct ParseState *Parser, const char *FuncName, int NumParams) +{ + struct StackFrame *NewFrame; + + HeapPushStackFrame(Parser->pc); + NewFrame = HeapAllocStack(Parser->pc, sizeof(struct StackFrame) + sizeof(struct Value *) * NumParams); + if (NewFrame == NULL) + ProgramFail(Parser, "out of memory"); + + ParserCopy(&NewFrame->ReturnParser, Parser); + NewFrame->FuncName = FuncName; + NewFrame->Parameter = (NumParams > 0) ? ((void *)((char *)NewFrame + sizeof(struct StackFrame))) : NULL; + TableInitTable(&NewFrame->LocalTable, &NewFrame->LocalHashTable[0], LOCAL_TABLE_SIZE, FALSE); + NewFrame->PreviousStackFrame = Parser->pc->TopStackFrame; + Parser->pc->TopStackFrame = NewFrame; +} + +/* remove a stack frame */ +void VariableStackFramePop(struct ParseState *Parser) +{ + if (Parser->pc->TopStackFrame == NULL) + ProgramFail(Parser, "stack is empty - can't go back"); + + ParserCopy(Parser, &Parser->pc->TopStackFrame->ReturnParser); + Parser->pc->TopStackFrame = Parser->pc->TopStackFrame->PreviousStackFrame; + HeapPopStackFrame(Parser->pc); +} + +/* get a string literal. assumes that Ident is already registered. NULL if not found */ +struct Value *VariableStringLiteralGet(Picoc *pc, char *Ident) +{ + struct Value *LVal = NULL; + + if (TableGet(&pc->StringLiteralTable, Ident, &LVal, NULL, NULL, NULL)) + return LVal; + else + return NULL; +} + +/* define a string literal. assumes that Ident is already registered */ +void VariableStringLiteralDefine(Picoc *pc, char *Ident, struct Value *Val) +{ + TableSet(pc, &pc->StringLiteralTable, Ident, Val, NULL, 0, 0); +} + +/* check a pointer for validity and dereference it for use */ +void *VariableDereferencePointer(struct ParseState *Parser, struct Value *PointerValue, struct Value **DerefVal, int *DerefOffset, struct ValueType **DerefType, int *DerefIsLValue) +{ + if (DerefVal != NULL) + *DerefVal = NULL; + + if (DerefType != NULL) + *DerefType = PointerValue->Typ->FromType; + + if (DerefOffset != NULL) + *DerefOffset = 0; + + if (DerefIsLValue != NULL) + *DerefIsLValue = TRUE; + + return PointerValue->Val->Pointer; +} + diff --git a/src/variable.o b/src/variable.o new file mode 100644 index 0000000..1ee9cf7 Binary files /dev/null and b/src/variable.o differ diff --git a/web/.htaccess b/web/.htaccess new file mode 100644 index 0000000..bd63a36 --- /dev/null +++ b/web/.htaccess @@ -0,0 +1,3 @@ +RewriteEngine On +RewriteCond %{HTTP:Authorization} ^(.*) +RewriteRule .* - [e=HTTP_AUTHORIZATION:%1] diff --git a/web/config.json b/web/config.json new file mode 100644 index 0000000..2108635 --- /dev/null +++ b/web/config.json @@ -0,0 +1,7 @@ +{ + "useSideMenu": true, + "lineBreaks": "gfm", + "additionalFooterText": "Original address of this page is http://www.9bis.net/c
", + "anchorCharacter": "#", + "title": "pico-c, a very small C interpreter" +} diff --git a/web/edit.php b/web/edit.php new file mode 100644 index 0000000..230f7e1 --- /dev/null +++ b/web/edit.php @@ -0,0 +1,130 @@ + + + + + +Markdown editor + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+ + + + + + diff --git a/web/img/c.png b/web/img/c.png new file mode 100644 index 0000000..8c5b522 Binary files /dev/null and b/web/img/c.png differ diff --git a/web/index.html b/web/index.html new file mode 100644 index 0000000..04b0078 --- /dev/null +++ b/web/index.html @@ -0,0 +1,212 @@ + + + + + MDwiki + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + diff --git a/web/index.md b/web/index.md new file mode 100644 index 0000000..f81c02d --- /dev/null +++ b/web/index.md @@ -0,0 +1,54 @@ +# Origins + +**pico-c** is a project created by Zik at [https://code.google.com/p/picoc](https://code.google.com/p/picoc/ "Google code"). +The projet is now hosted at [https://gitlab.com/zsaleeba/picoc](https://gitlab.com/zsaleeba/picoc/ "Github.com"). + +**pico-c** intends to be a very light **C** interpreter. **pico-c** is very small, but include many standard libraries. + +# The content + +Initially those libraries were natively integrated into pico-c: + +* ctype.h +* errno.h +* math.h +* stdbool.h +* stdio.h +* stdlib.h +* string.h +* time.h +* unistd.h + +Some of them were improved: + +* [stdio.h](pages/stdio.h.md "stdio.h") +* [unistd.h](pages/unistd.h.md "unistd.h") + +We have planned to add support for 3 other useful libraries: + +* [dirent.h](pages/dirent.h.md "dirent.h") +* [regex.h](pages/regex.h.md "regex.h") +* [socket.h](pages/socket.h.md "socket.h") +* [stat.h](pages/stat.h.md "stat.h") + +**pico-c** builds are available for Win32, CentOS (RedHat), and Ubuntu. To get them just jump to the [download page](download.md "Download page"). + +# The pico-c syntax + +``` +$ pico-c -h +pico-c.exe, A very small C interpreter +Usage: pico-c.exe [-h] [-i] [-m] [-n] [-o] [...] [- ...] + -h: this help message + -i: force interactive mode at the end of scripts + -m: run main() function automaticaly + -n: don't print prompt + -o: the original "old" mode + -v: print version +Exemples: + pico-c.exe script1.pcc script2.pcc + pico-c.exe -i script.pcc + pico-c.exe -m script1.pcc script2.pcc - arg1 agr2} +``` + +**Cyd** diff --git a/web/js/marked.min.js b/web/js/marked.min.js new file mode 100644 index 0000000..bfaeeb9 --- /dev/null +++ b/web/js/marked.min.js @@ -0,0 +1,6 @@ +/** + * marked - a markdown parser + * Copyright (c) 2011-2018, Christopher Jeffrey. (MIT Licensed) + * https://github.com/markedjs/marked + */ +!function(e){"use strict";var k={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:g,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,nptable:g,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|\\n*|\\n*|)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=\\h*\\n)[\\s\\S]*?(?:\\n{2,}|$)|(?=\\h*\\n)[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,table:g,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading| {0,3}>|<\/?(?:tag)(?: +|\n|\/?>)|<(?:script|pre|style|!--))[^\n]+)*)/,text:/^[^\n]+/};function a(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||d.defaults,this.rules=k.normal,this.options.pedantic?this.rules=k.pedantic:this.options.gfm&&(this.options.tables?this.rules=k.tables:this.rules=k.gfm)}k._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,k._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,k.def=t(k.def).replace("label",k._label).replace("title",k._title).getRegex(),k.bullet=/(?:[*+-]|\d+\.)/,k.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/,k.item=t(k.item,"gm").replace(/bull/g,k.bullet).getRegex(),k.list=t(k.list).replace(/bull/g,k.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+k.def.source+")").getRegex(),k._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",k._comment=//,k.html=t(k.html,"i").replace("comment",k._comment).replace("tag",k._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),k.paragraph=t(k.paragraph).replace("hr",k.hr).replace("heading",k.heading).replace("lheading",k.lheading).replace("tag",k._tag).getRegex(),k.blockquote=t(k.blockquote).replace("paragraph",k.paragraph).getRegex(),k.normal=f({},k),k.gfm=f({},k.normal,{fences:/^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\n? *\1 *(?:\n+|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/}),k.gfm.paragraph=t(k.paragraph).replace("(?!","(?!"+k.gfm.fences.source.replace("\\1","\\2")+"|"+k.list.source.replace("\\1","\\3")+"|").getRegex(),k.tables=f({},k.gfm,{nptable:/^ *([^|\n ].*\|.*)\n *([-:]+ *\|[-| :]*)(?:\n((?:.*[^>\n ].*(?:\n|$))*)\n*|$)/,table:/^ *\|(.+)\n *\|?( *[-:]+[-| :]*)(?:\n((?: *[^>\n ].*(?:\n|$))*)\n*|$)/}),k.pedantic=f({},k.normal,{html:t("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",k._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/}),a.rules=k,a.lex=function(e,t){return new a(t).lex(e)},a.prototype.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(e,!0)},a.prototype.token=function(e,t){var n,r,s,i,l,o,a,h,p,c,u,g,f,d,b,m;for(e=e.replace(/^ +$/gm,"");e;)if((s=this.rules.newline.exec(e))&&(e=e.substring(s[0].length),1 ?/gm,""),this.token(s,t),this.tokens.push({type:"blockquote_end"});else if(s=this.rules.list.exec(e)){for(e=e.substring(s[0].length),a={type:"list_start",ordered:d=1<(i=s[2]).length,start:d?+i:"",loose:!1},this.tokens.push(a),n=!(h=[]),f=(s=s[0].match(this.rules.item)).length,u=0;u?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:g,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(href(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,strong:/^__([^\s])__(?!_)|^\*\*([^\s])\*\*(?!\*)|^__([^\s][\s\S]*?[^\s])__(?!_)|^\*\*([^\s][\s\S]*?[^\s])\*\*(?!\*)/,em:/^_([^\s_])_(?!_)|^\*([^\s*"<\[])\*(?!\*)|^_([^\s][\s\S]*?[^\s_])_(?!_|[^\s.])|^_([^\s_][\s\S]*?[^\s])_(?!_|[^\s.])|^\*([^\s"<\[][\s\S]*?[^\s*])\*(?!\*)|^\*([^\s*"<\[][\s\S]*?[^\s])\*(?!\*)/,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:g,text:/^(`+|[^`])[\s\S]*?(?=[\\?@\[\]\\^_`{|}~])/g,n._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,n._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,n.autolink=t(n.autolink).replace("scheme",n._scheme).replace("email",n._email).getRegex(),n._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,n.tag=t(n.tag).replace("comment",k._comment).replace("attribute",n._attribute).getRegex(),n._label=/(?:\[[^\[\]]*\]|\\[\[\]]?|`[^`]*`|[^\[\]\\])*?/,n._href=/\s*(<(?:\\[<>]?|[^\s<>\\])*>|(?:\\[()]?|\([^\s\x00-\x1f\\]*\)|[^\s\x00-\x1f()\\])*?)/,n._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,n.link=t(n.link).replace("label",n._label).replace("href",n._href).replace("title",n._title).getRegex(),n.reflink=t(n.reflink).replace("label",n._label).getRegex(),n.normal=f({},n),n.pedantic=f({},n.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/,link:t(/^!?\[(label)\]\((.*?)\)/).replace("label",n._label).getRegex(),reflink:t(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",n._label).getRegex()}),n.gfm=f({},n.normal,{escape:t(n.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:t(n.text).replace("]|","~]|").replace("|$","|https?://|ftp://|www\\.|[a-zA-Z0-9.!#$%&'*+/=?^_`{\\|}~-]+@|$").getRegex()}),n.gfm.url=t(n.gfm.url).replace("email",n.gfm._extended_email).getRegex(),n.breaks=f({},n.gfm,{br:t(n.br).replace("{2,}","*").getRegex(),text:t(n.gfm.text).replace("{2,}","*").getRegex()}),h.rules=n,h.output=function(e,t,n){return new h(t,n).output(e)},h.prototype.output=function(e){for(var t,n,r,s,i,l,o="";e;)if(i=this.rules.escape.exec(e))e=e.substring(i[0].length),o+=i[1];else if(i=this.rules.autolink.exec(e))e=e.substring(i[0].length),r="@"===i[2]?"mailto:"+(n=c(this.mangle(i[1]))):n=c(i[1]),o+=this.renderer.link(r,null,n);else if(this.inLink||!(i=this.rules.url.exec(e))){if(i=this.rules.tag.exec(e))!this.inLink&&/^/i.test(i[0])&&(this.inLink=!1),!this.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(i[0])?this.inRawBlock=!0:this.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(i[0])&&(this.inRawBlock=!1),e=e.substring(i[0].length),o+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(i[0]):c(i[0]):i[0];else if(i=this.rules.link.exec(e))e=e.substring(i[0].length),this.inLink=!0,r=i[2],this.options.pedantic?(t=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(r))?(r=t[1],s=t[3]):s="":s=i[3]?i[3].slice(1,-1):"",r=r.trim().replace(/^<([\s\S]*)>$/,"$1"),o+=this.outputLink(i,{href:h.escapes(r),title:h.escapes(s)}),this.inLink=!1;else if((i=this.rules.reflink.exec(e))||(i=this.rules.nolink.exec(e))){if(e=e.substring(i[0].length),t=(i[2]||i[1]).replace(/\s+/g," "),!(t=this.links[t.toLowerCase()])||!t.href){o+=i[0].charAt(0),e=i[0].substring(1)+e;continue}this.inLink=!0,o+=this.outputLink(i,t),this.inLink=!1}else if(i=this.rules.strong.exec(e))e=e.substring(i[0].length),o+=this.renderer.strong(this.output(i[4]||i[3]||i[2]||i[1]));else if(i=this.rules.em.exec(e))e=e.substring(i[0].length),o+=this.renderer.em(this.output(i[6]||i[5]||i[4]||i[3]||i[2]||i[1]));else if(i=this.rules.code.exec(e))e=e.substring(i[0].length),o+=this.renderer.codespan(c(i[2].trim(),!0));else if(i=this.rules.br.exec(e))e=e.substring(i[0].length),o+=this.renderer.br();else if(i=this.rules.del.exec(e))e=e.substring(i[0].length),o+=this.renderer.del(this.output(i[1]));else if(i=this.rules.text.exec(e))e=e.substring(i[0].length),this.inRawBlock?o+=this.renderer.text(i[0]):o+=this.renderer.text(c(this.smartypants(i[0])));else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0))}else{if("@"===i[2])r="mailto:"+(n=c(i[0]));else{for(;l=i[0],i[0]=this.rules._backpedal.exec(i[0])[0],l!==i[0];);n=c(i[0]),r="www."===i[1]?"http://"+n:n}e=e.substring(i[0].length),o+=this.renderer.link(r,null,n)}return o},h.escapes=function(e){return e?e.replace(h.rules._escapes,"$1"):e},h.prototype.outputLink=function(e,t){var n=t.href,r=t.title?c(t.title):null;return"!"!==e[0].charAt(0)?this.renderer.link(n,r,this.output(e[1])):this.renderer.image(n,r,c(e[1]))},h.prototype.smartypants=function(e){return this.options.smartypants?e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):e},h.prototype.mangle=function(e){if(!this.options.mangle)return e;for(var t,n="",r=e.length,s=0;s'+(n?e:c(e,!0))+"\n":"
"+(n?e:c(e,!0))+"
"},r.prototype.blockquote=function(e){return"
\n"+e+"
\n"},r.prototype.html=function(e){return e},r.prototype.heading=function(e,t,n){return this.options.headerIds?"'+e+"\n":""+e+"\n"},r.prototype.hr=function(){return this.options.xhtml?"
\n":"
\n"},r.prototype.list=function(e,t,n){var r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"\n"},r.prototype.listitem=function(e){return"
  • "+e+"
  • \n"},r.prototype.checkbox=function(e){return" "},r.prototype.paragraph=function(e){return"

    "+e+"

    \n"},r.prototype.table=function(e,t){return t&&(t=""+t+""),"\n\n"+e+"\n"+t+"
    \n"},r.prototype.tablerow=function(e){return"\n"+e+"\n"},r.prototype.tablecell=function(e,t){var n=t.header?"th":"td";return(t.align?"<"+n+' align="'+t.align+'">':"<"+n+">")+e+"\n"},r.prototype.strong=function(e){return""+e+""},r.prototype.em=function(e){return""+e+""},r.prototype.codespan=function(e){return""+e+""},r.prototype.br=function(){return this.options.xhtml?"
    ":"
    "},r.prototype.del=function(e){return""+e+""},r.prototype.link=function(e,t,n){if(null===(e=i(this.options.sanitize,this.options.baseUrl,e)))return n;var r='
    "},r.prototype.image=function(e,t,n){if(null===(e=i(this.options.sanitize,this.options.baseUrl,e)))return n;var r=''+n+'":">"},r.prototype.text=function(e){return e},s.prototype.strong=s.prototype.em=s.prototype.codespan=s.prototype.del=s.prototype.text=function(e){return e},s.prototype.link=s.prototype.image=function(e,t,n){return""+n},s.prototype.br=function(){return""},p.parse=function(e,t){return new p(t).parse(e)},p.prototype.parse=function(e){this.inline=new h(e.links,this.options),this.inlineText=new h(e.links,f({},this.options,{renderer:new s})),this.tokens=e.reverse();for(var t="";this.next();)t+=this.tok();return t},p.prototype.next=function(){return this.token=this.tokens.pop()},p.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},p.prototype.parseText=function(){for(var e=this.token.text;"text"===this.peek().type;)e+="\n"+this.next().text;return this.inline.output(e)},p.prototype.tok=function(){switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,u(this.inlineText.output(this.token.text)));case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var e,t,n,r,s="",i="";for(n="",e=0;e"']/,c.escapeReplace=/[&<>"']/g,c.replacements={"&":"&","<":"<",">":">",'"':""","'":"'"},c.escapeTestNoEncode=/[<>"']|&(?!#?\w+;)/,c.escapeReplaceNoEncode=/[<>"']|&(?!#?\w+;)/g;var l={},o=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function g(){}function f(e){for(var t,n,r=1;rt)n.splice(t);else for(;n.lengthAn error occurred:

    "+c(e.message+"",!0)+"
    ";throw e}}g.exec=g,d.options=d.setOptions=function(e){return f(d.defaults,e),d},d.getDefaults=function(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:new r,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tables:!0,xhtml:!1}},d.defaults=d.getDefaults(),d.Parser=p,d.parser=p.parse,d.Renderer=r,d.TextRenderer=s,d.Lexer=a,d.lexer=a.lex,d.InlineLexer=h,d.inlineLexer=h.output,d.parse=d,"undefined"!=typeof module&&"object"==typeof exports?module.exports=d:"function"==typeof define&&define.amd?define(function(){return d}):e.marked=d}(this||("undefined"!=typeof window?window:global)); diff --git a/web/navigation.md b/web/navigation.md new file mode 100644 index 0000000..82dc4eb --- /dev/null +++ b/web/navigation.md @@ -0,0 +1,9 @@ +# Pico-c + +[Home](index.md) +[Download](pages/download.md) +[Contact](pages/contact.md) + +[gimmick:theme](united) + +[comment]: # ([gimmick:themechooser](Choose theme)) diff --git a/web/pages/contact.md b/web/pages/contact.md new file mode 100644 index 0000000..e69de29 diff --git a/web/pages/dirent.h.md b/web/pages/dirent.h.md new file mode 100644 index 0000000..96738bd --- /dev/null +++ b/web/pages/dirent.h.md @@ -0,0 +1,25 @@ +# dirent.h + +Here is the structure defined into ```dirent.h``` header: + +```cpp +struct dirent { + ino_t d_ino ; /* inode number */ + off_t d_off ; /* offset to the next dirent */ + unsigned short d_reclen ; /* length of this record */ + unsigned char d_type ; /* type of file; not supported by all file system types */ + char d_name[256] ; /* filename */ +} ; +``` + +And here are the new declared functions: + +```cpp +DIR *opendir( char * name ) ; +int closedir( DIR * dirp ) ; +struct dirent * readdir( DIR * dirp ) ; +void rewinddir( DIR * dirp ) ; +long telldir( DIR * dirp ) ; +void seekdir( DIR * dirp, long offset ) ; +char * dirent_getname( struct dirent * dp ) ; +``` diff --git a/web/pages/download.md b/web/pages/download.md new file mode 100644 index 0000000..3fdf388 --- /dev/null +++ b/web/pages/download.md @@ -0,0 +1,17 @@ +# Donwloads + +pico-c prebuilds are available for those platforms: + +* [Windows (Win32)](../bin/win32/picoc-win32.tar.gz "Win32") +* [CentOS](../bin/centos/picoc-centos.tar.gz "CentOS") +* [Ubuntu](../bin/ubuntu/picoc-ubuntu.tar.gz "Ubuntu") + +# Installation + +You just have to download the package for your personnal platform, unzip it, and run the binary. Simple. +Here an example for **Ubuntu**: + + cd /tmp + wget http://www.9bis.net/c/bin/ubuntu/picoc-ubuntu.tar.gz + gzip -dc picoc-ubuntu.tar.gz | tar xvf - + ubuntu/bin/picoc diff --git a/web/pages/regex.h.md b/web/pages/regex.h.md new file mode 100644 index 0000000..177c014 --- /dev/null +++ b/web/pages/regex.h.md @@ -0,0 +1,42 @@ +# regex.h + +Here are the structures and type defined into ```regex.h``` header: + +```cpp +typedef int regoff_t ; +typedef struct __REGEXtruct regex_t ; +typedef struct __REGMATCHtruct regmatch_t ; +``` + +Here are the DEFINE macros: + +```cpp +REG_EXTENDED +REG_ICASE +REG_NOSUB +REG_NEWLINE +REG_NOTBOL +REG_NOTEOL +REG_NOMATCH +REG_BADPAT +REG_ECOLLATE +REG_ECTYPE +REG_EESCAPE +REG_ESUBREG +REG_EBRACK +REG_EPAREN +REG_EBRACE +REG_BADBR +REG_ERANGE +REG_ESPACE +REG_BADRPT +``` + +And here are the new declared functions: + +```cpp +int regcomp( regex_t *, char *, int ) ; +int regexec( regex_t *, char *, size_t, regmatch_t *, int ) ; +size_t regerror( int, regex_t *, char *, size_t ) ; +void regfree( regex_t * ) ; +``` diff --git a/web/pages/socket.h.md b/web/pages/socket.h.md new file mode 100644 index 0000000..73024f6 --- /dev/null +++ b/web/pages/socket.h.md @@ -0,0 +1,108 @@ +# socket.h + +Here is the structure defined into ```socket.h``` header: + +```cpp +/* socket.h prototypes */ +typedef int socklen_t ; +typedef unsigned uint32_t ; +typedef unsigned short uint16_t ; + +struct sockaddr { + unsigned short sa_family ; + char sa_data[14] ; +} ; +struct in_addr { + unsigned long s_addr ; +} ; +struct sockaddr_in { + short sin_family ; + unsigned short sin_port ; + struct in_addr sin_addr ; + char sin_zero[8] ; +} ; +struct hostent { + char *h_name ; + char **h_aliases ; + int h_addrtype ; + int h_length ; + char **h_addr_list ; +} ; +``` + +And here are the new declared functions: + +```cpp +int accept( int sockfd, struct sockaddr *addr, socklen_t *addrlen ) ; +int bind( int sockfd, struct sockaddr *addr, socklen_t addrlen ) ; +int connect( int sockfd, struct sockaddr *addr, socklen_t addrlen ) ; +int getpeername( int sockfd, struct sockaddr *addr, socklen_t *addrlen ) ; +int getsockname( int sockfd, struct sockaddr *addr, socklen_t *addrlen ) ; +int getsockopt(int sockfd, int level, int optname, void *optval, socklen_t *optlen ) ; +int listen( int sockfd, int backlog ) ; +ssize_t recv( int sockfd, void *buf, size_t len, int flags ) ; +ssize_t recvfrom( int sockfd, void *buf, size_t len, int flags, struct sockaddr *src_addr, socklen_t *addrlen ) ; +ssize_t send( int sockfd, void *buf, size_t len, int flags ) ; +ssize_t sendto( int sockfd, void *buf, size_t len, int flags, struct sockaddr *dest_addr, socklen_t addrlen ) ; +int setsockopt( int sockfd, int level, int optname, void *optval, socklen_t optlen ) ; +int shutdown( int sockfd, int how ) ; +int socket( int domain, int type, int protocol ) ; +uint32_t htonl( uint32_t hostlong ) ; +uint16_t htons( uint16_t hostshort ) ; +uint32_t ntohl( uint32_t netlong ) ; +uint16_t ntohs( uint16_t netshort ) ; +struct hostent * gethostbyname( char *name ) ; +struct hostent * gethostbyaddr( void *addr, socklen_t len, int type ) ; +``` + +Socket example with a ***simple*** TCP server, listening on port 1987, that only response one thing: the current date (very simple): + +```cpp +int listenfd = 0, connfd = 0, n=0 ; +struct sockaddr_in serv_addr ; + +char sendBuff[1025] ; +char recvBuff[1025] ; +time_t ticks ; + +printf( "Socket creation (socket)\n" ) ; +listenfd = socket( AF_INET, SOCK_STREAM, 0 ) ; +memset( &serv_addr, '0', sizeof( serv_addr ) ) ; +memset( sendBuff, '0', sizeof( sendBuff ) ) ; + +serv_addr.sin_family = AF_INET ; +serv_addr.sin_addr.s_addr = htonl( INADDR_ANY ) ; +serv_addr.sin_port = htons( 1987 ) ; + +printf( "Check port (Bind)\n" ) ; +bind( listenfd, (struct sockaddr*) &serv_addr, sizeof( serv_addr ) ) ; + +printf( "Start server (listen)\n" ) ; +listen( listenfd, 10 ) ; + +while(1) { + printf ("Accept connection (accept)\n" ) ; + connfd = accept( listenfd, (struct sockaddr*)NULL, NULL ) ; + printf( "Connection accepted\n" ) ; + + recv( connfd, recvBuff, sizeof(recvBuff)-1, 0 ); + printf( "Message received: %s\n", recvBuff ) ; + + ticks = time( NULL ) ; + snprintf( sendBuff, sizeof(sendBuff), "%.24s\r\n", ctime( &ticks ) ) ; + + send( connfd, sendBuff, strlen(sendBuff), 0 ) ; + printf( "Message sent: %s\n", sendBuff ) ; + + shutdown( connfd, 2 ) ; + close( connfd ) ; + sleep( 1 ) ; +} +``` + + +### How tu use it: + +1. Create a file named ```socket.pcc``` with the source code above. +1. Run the command ```pico-c -m socket.pcc``` +1. Start your favorite browser on [http://localhost:1987](http://localhost:1987/) tu see the result. diff --git a/web/pages/stat.h.md b/web/pages/stat.h.md new file mode 100644 index 0000000..251c091 --- /dev/null +++ b/web/pages/stat.h.md @@ -0,0 +1,26 @@ +# stat.h + +Here is the structure defined into ```stat.h``` header: + +```cpp +struct stat { + dev_t st_dev ; + ino_t st_ino ; + mode_t st_mode ; + short st_nlink ; + short st_uid ; + short st_gid ; + dev_t st_rdev ; + off_t st_size ; + time_t st_atime ; + time_t st_mtime ; + time_t st_ctime ; +} ; +``` + +And here are the new declared functions: + +```cpp +int stat( char * file_name, struct stat * buf ) ; +int fstat( int filedes, struct stat * buf ) ; +``` diff --git a/web/pages/stdio.h.md b/web/pages/stdio.h.md new file mode 100644 index 0000000..96cd4a0 --- /dev/null +++ b/web/pages/stdio.h.md @@ -0,0 +1,8 @@ +# stdio.h + +Here are the new functions declared into ```stdio.h```: + +```cpp +FILE * popen( char * commande, char *type ) ; +int pclose( FILE * stream) ; +``` diff --git a/web/pages/unistd.h.md b/web/pages/unistd.h.md new file mode 100644 index 0000000..71d26d6 --- /dev/null +++ b/web/pages/unistd.h.md @@ -0,0 +1,7 @@ +# unistd.h + +A new variable declaration is included into ```unistd.h```: + +```cpp +extern char ** environ ; +```