file
stringlengths
18
26
data
stringlengths
3
1.04M
the_stack_data/569568.c
/* $OpenBSD: merge.c,v 1.9 2011/03/06 00:55:38 deraadt Exp $ */ /*- * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. * * This code is derived from software contributed to Berkeley by * Peter McIlroy. * * 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 University 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 REGENTS 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 REGENTS 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. */ /* * Hybrid exponential search/linear search merge sort with hybrid * natural/pairwise first pass. Requires about .3% more comparisons * for random data than LSMS with pairwise first pass alone. * It works for objects as small as two bytes. */ #define NATURAL #define THRESHOLD 16 /* Best choice for natural merge cut-off. */ /* #define NATURAL to get hybrid natural merge. * (The default is pairwise merging.) */ #include <sys/types.h> #include <errno.h> #include <stdlib.h> #include <string.h> static void setup(u_char *, u_char *, size_t, size_t, int (*)()); static void insertionsort(u_char *, size_t, size_t, int (*)()); #define ISIZE sizeof(int) #define PSIZE sizeof(u_char *) #define ICOPY_LIST(src, dst, last) \ do \ *(int*)dst = *(int*)src, src += ISIZE, dst += ISIZE; \ while(src < last) #define ICOPY_ELT(src, dst, i) \ do \ *(int*) dst = *(int*) src, src += ISIZE, dst += ISIZE; \ while (i -= ISIZE) #define CCOPY_LIST(src, dst, last) \ do \ *dst++ = *src++; \ while (src < last) #define CCOPY_ELT(src, dst, i) \ do \ *dst++ = *src++; \ while (i -= 1) /* * Find the next possible pointer head. (Trickery for forcing an array * to do double duty as a linked list when objects do not align with word * boundaries. */ /* Assumption: PSIZE is a power of 2. */ #define EVAL(p) (u_char **) \ ((u_char *)0 + \ (((u_char *)p + PSIZE - 1 - (u_char *) 0) & ~(PSIZE - 1))) /* * Arguments are as for qsort. */ int mergesort(void *base, size_t nmemb, size_t size, int (*cmp)(const void *, const void *)) { int i, sense; int big, iflag; u_char *f1, *f2, *t, *b, *tp2, *q, *l1, *l2; u_char *list2, *list1, *p2, *p, *last, **p1; if (size < PSIZE / 2) { /* Pointers must fit into 2 * size. */ errno = EINVAL; return (-1); } /* * XXX * Stupid subtraction for the Cray. */ iflag = 0; if (!(size % ISIZE) && !(((char *)base - (char *)0) % ISIZE)) iflag = 1; if ((list2 = malloc(nmemb * size + PSIZE)) == NULL) return (-1); list1 = base; setup(list1, list2, nmemb, size, cmp); last = list2 + nmemb * size; i = big = 0; while (*EVAL(list2) != last) { l2 = list1; p1 = EVAL(list1); for (tp2 = p2 = list2; p2 != last; p1 = EVAL(l2)) { p2 = *EVAL(p2); f1 = l2; f2 = l1 = list1 + (p2 - list2); if (p2 != last) p2 = *EVAL(p2); l2 = list1 + (p2 - list2); while (f1 < l1 && f2 < l2) { if ((*cmp)(f1, f2) <= 0) { q = f2; b = f1, t = l1; sense = -1; } else { q = f1; b = f2, t = l2; sense = 0; } if (!big) { /* here i = 0 */ while ((b += size) < t && cmp(q, b) >sense) if (++i == 6) { big = 1; goto EXPONENTIAL; } } else { EXPONENTIAL: for (i = size; ; i <<= 1) if ((p = (b + i)) >= t) { if ((p = t - size) > b && (*cmp)(q, p) <= sense) t = p; else b = p; break; } else if ((*cmp)(q, p) <= sense) { t = p; if (i == size) big = 0; goto FASTCASE; } else b = p; while (t > b+size) { i = (((t - b) / size) >> 1) * size; if ((*cmp)(q, p = b + i) <= sense) t = p; else b = p; } goto COPY; FASTCASE: while (i > size) if ((*cmp)(q, p = b + (i >>= 1)) <= sense) t = p; else b = p; COPY: b = t; } i = size; if (q == f1) { if (iflag) { ICOPY_LIST(f2, tp2, b); ICOPY_ELT(f1, tp2, i); } else { CCOPY_LIST(f2, tp2, b); CCOPY_ELT(f1, tp2, i); } } else { if (iflag) { ICOPY_LIST(f1, tp2, b); ICOPY_ELT(f2, tp2, i); } else { CCOPY_LIST(f1, tp2, b); CCOPY_ELT(f2, tp2, i); } } } if (f2 < l2) { if (iflag) ICOPY_LIST(f2, tp2, l2); else CCOPY_LIST(f2, tp2, l2); } else if (f1 < l1) { if (iflag) ICOPY_LIST(f1, tp2, l1); else CCOPY_LIST(f1, tp2, l1); } *p1 = l2; } tp2 = list1; /* swap list1, list2 */ list1 = list2; list2 = tp2; last = list2 + nmemb*size; } if (base == list2) { memmove(list2, list1, nmemb*size); list2 = list1; } free(list2); return (0); } #define swap(a, b) { \ s = b; \ i = size; \ do { \ tmp = *a; *a++ = *s; *s++ = tmp; \ } while (--i); \ a -= size; \ } #define reverse(bot, top) { \ s = top; \ do { \ i = size; \ do { \ tmp = *bot; *bot++ = *s; *s++ = tmp; \ } while (--i); \ s -= size2; \ } while(bot < s); \ } /* * Optional hybrid natural/pairwise first pass. Eats up list1 in runs of * increasing order, list2 in a corresponding linked list. Checks for runs * when THRESHOLD/2 pairs compare with same sense. (Only used when NATURAL * is defined. Otherwise simple pairwise merging is used.) */ void setup(u_char *list1, u_char *list2, size_t n, size_t size, int (*cmp)(const void *, const void *)) { int i, length, size2, sense; u_char tmp, *f1, *f2, *s, *l2, *last, *p2; size2 = size*2; if (n <= 5) { insertionsort(list1, n, size, cmp); *EVAL(list2) = (u_char*) list2 + n*size; return; } /* * Avoid running pointers out of bounds; limit n to evens * for simplicity. */ i = 4 + (n & 1); insertionsort(list1 + (n - i) * size, i, size, cmp); last = list1 + size * (n - i); *EVAL(list2 + (last - list1)) = list2 + n * size; #ifdef NATURAL p2 = list2; f1 = list1; sense = (cmp(f1, f1 + size) > 0); for (; f1 < last; sense = !sense) { length = 2; /* Find pairs with same sense. */ for (f2 = f1 + size2; f2 < last; f2 += size2) { if ((cmp(f2, f2+ size) > 0) != sense) break; length += 2; } if (length < THRESHOLD) { /* Pairwise merge */ do { p2 = *EVAL(p2) = f1 + size2 - list1 + list2; if (sense > 0) swap (f1, f1 + size); } while ((f1 += size2) < f2); } else { /* Natural merge */ l2 = f2; for (f2 = f1 + size2; f2 < l2; f2 += size2) { if ((cmp(f2-size, f2) > 0) != sense) { p2 = *EVAL(p2) = f2 - list1 + list2; if (sense > 0) reverse(f1, f2-size); f1 = f2; } } if (sense > 0) reverse (f1, f2-size); f1 = f2; if (f2 < last || cmp(f2 - size, f2) > 0) p2 = *EVAL(p2) = f2 - list1 + list2; else p2 = *EVAL(p2) = list2 + n*size; } } #else /* pairwise merge only. */ for (f1 = list1, p2 = list2; f1 < last; f1 += size2) { p2 = *EVAL(p2) = p2 + size2; if (cmp (f1, f1 + size) > 0) swap(f1, f1 + size); } #endif /* NATURAL */ } /* * This is to avoid out-of-bounds addresses in sorting the * last 4 elements. */ static void insertionsort(u_char *a, size_t n, size_t size, int (*cmp)(const void *, const void *)) { u_char *ai, *s, *t, *u, tmp; int i; for (ai = a+size; --n >= 1; ai += size) for (t = ai; t > a; t -= size) { u = t - size; if (cmp(u, t) <= 0) break; swap(u, t); } }
the_stack_data/39731.c
//Mura3132 //Algeria #include<stdio.h> int main(void){ printf("Aku Cinta Kamu\n"); return 0; }
the_stack_data/131280.c
/*** * This code is a part of EvoApproxLib library (ehw.fit.vutbr.cz/approxlib) distributed under The MIT License. * When used, please cite the following article(s): V. Mrazek, L. Sekanina, Z. Vasicek "Libraries of Approximate Circuits: Automated Design and Application in CNN Accelerators" IEEE Journal on Emerging and Selected Topics in Circuits and Systems, Vol 10, No 4, 2020 * This file contains a circuit from a sub-set of pareto optimal circuits with respect to the pwr and mae parameters ***/ // MAE% = 24.51 % // MAE = 4016 // WCE% = 98.05 % // WCE = 16065 // WCRE% = 100.00 % // EP% = 98.05 % // MRE% = 100.00 % // MSE = 28960.286e3 // PDK45_PWR = 0.000 mW // PDK45_AREA = 0.0 um2 // PDK45_DELAY = 0.00 ns #include <stdint.h> #include <stdlib.h> uint64_t mul8x6u_51C(const uint64_t A,const uint64_t B) { uint64_t O; O = 0; O |= (0&1) << 0; O |= (0&1) << 1; O |= (0&1) << 2; O |= (0&1) << 3; O |= (0&1) << 4; O |= (0&1) << 5; O |= (0&1) << 6; O |= (0&1) << 7; O |= (0&1) << 8; O |= (0&1) << 9; O |= (0&1) << 10; O |= (0&1) << 11; O |= (0&1) << 12; O |= (0&1) << 13; return O; }
the_stack_data/430955.c
#include <stdio.h> #include <math.h> #include <stdint.h> #include <stdlib.h> static const double R = 44100; /* sample rate (samples per second) */ static const double maxamp = 1.0; /* max. amplitude */ typedef double (*instr_func)(double t, int note); struct timeline { size_t n; size_t end; float *left, *right; float min, max; }; static struct timeline * timeline_init(size_t n) { struct timeline *t; t = malloc(sizeof(struct timeline)); if (!t) { goto tmalloc_failed; } t->left = calloc(n, sizeof(float)); if (!t->left) { goto left_malloc_failed; } t->right = calloc(n, sizeof(float)); if (!t->right) { goto right_malloc_failed; } t->n = n; t->end = 0; return t; right_malloc_failed: free(t->left); left_malloc_failed: free(t); tmalloc_failed: return NULL; } static void timeline_free(struct timeline *tl) { free(tl->left); free(tl->right); tl->left = tl->right = NULL; tl->n = tl->end = 0; free(tl); } static void timeline_play(struct timeline *tl) { size_t t; for (t=0; t<tl->end; t++) { int16_t tone; if (tl->left[t] > maxamp) { tone = INT16_MAX; } else if (tl->left[t] < -maxamp) { tone = -INT16_MAX; } else { tone = tl->left[t] * INT16_MAX; } fwrite(&tone, sizeof(int16_t), 1, stdout); if (tl->right[t] > maxamp) { tone = INT16_MAX; } else if (tl->right[t] < -maxamp) { tone = -INT16_MAX; } else { tone = tl->right[t] * INT16_MAX; } fwrite(&tone, sizeof(int16_t), 1, stdout); } } static double freq(int n) { double f; f = pow(2.0, ((double)n - 49.0) / 12.0) * 440.0; return f; } static double instr_kick(double t, int note) { double tone = exp(-t*4) * sin(2*M_PI*t*freq(note) * exp(-t*20)); return tone; } static double instr_metal(double t, int note) { double tone = exp(-t*4) * (sin(2*M_PI*t*freq(note)) + sin(2*M_PI*t*freq(note)*2.13232) + sin(2*M_PI*t*freq(note)*6.12342)); return tone; } static double instr_tom(double t, int note) { double tone = exp(-t*4) * sin(2*M_PI*t*freq(note) * exp(-t*20)) + exp(-t*2) * sin(2*M_PI*t*freq(note) * exp(-t*5)); return tone; } static double instr_cym(double t, int note) { double tone = exp(-t*70) * tan(2*M_PI*t*freq(note) * exp(-t*70)); return tone; } static double instr_cym2(double t, int note) { double tone = exp(-t*10) * sin(2*M_PI*t*freq(note) * exp(-t*10)); return tone; } static double instr_piano(double t, int note) { double tone; t *= 2.0 * M_PI * freq(note); tone = sin(t) * exp(-0.0004 * t); tone += sin(2.0 * t) * exp(-0.0004 * t) / 2.0; tone += sin(3.0 * t) * exp(-0.0004 * t) / 4.0; tone += sin(4.0 * t) * exp(-0.0004 * t) / 8.0; tone += sin(5.0 * t) * exp(-0.0004 * t) / 16.0; tone += sin(6.0 * t) * exp(-0.0004 * t) / 32.0; tone += tone * tone * tone; return tone; } static void add_note(struct timeline *tl, double start, int note, double duration, double loudness, instr_func instr) { size_t tstart, tend, t; tstart = start * R; tend = tstart + duration * R; for (t=tstart; t<tend; t++) { double tone; double k; k = (t - tstart) / R; tone = (*instr)(k, note); tone *= loudness; if (t >= tl->n) { break; } /* first channel */ tl->left[t] += tone; /* second channel */ tl->right[t] += tone; } if (t > tl->end) { tl->end = t; } } int main() { int bpm = 190; double vol = 0.5; double notelen = 60.0 / bpm / 4.0; double where = 0.0; size_t i, j, k; struct timeline *tl; tl = timeline_init(100 * R); if (!tl) { return EXIT_FAILURE; } /* drums */ where = 0.0; for (k=0; k<4; k++) { for (i=0; i<3; i++) { add_note(tl, where, 800, notelen * 8, vol * 0.15, &instr_cym2); add_note(tl, where + notelen, 90, notelen * 8, vol * 0.01, &instr_metal); for (j=0; j<4; j++) { add_note(tl, where, 30, notelen * 2, vol, &instr_kick); where += notelen * 1; add_note(tl, where, 30, notelen * 2, vol, &instr_kick); where += notelen * 1; add_note(tl, where, 30, notelen * 2, vol, &instr_kick); add_note(tl, where, 30, notelen * 2, vol, &instr_tom); add_note(tl, where, 700, notelen * 2, vol * 0.02, &instr_cym); where += notelen * 2; } } for (i=0; i<4; i++) { add_note(tl, where, 800, notelen * 8, vol * 0.15, &instr_cym2); add_note(tl, where + notelen, 110, notelen * 8, vol * 0.008, &instr_metal); for (j=0; j<4; j++) { add_note(tl, where, 40 - i * 3, notelen * 2, vol * 0.2, &instr_tom); add_note(tl, where, 800, notelen * 2, vol * 0.01, &instr_cym); where += notelen * 1; } } } /* piano */ where = 0.0; for (j=0; j<2; j++) { for (k=0; k<4; k++) { for (i=0; i<4; i++) { add_note(tl, where, 40, notelen * 6, vol * 0.03, &instr_piano); add_note(tl, where, 44, notelen * 6, vol * 0.03, &instr_piano); add_note(tl, where, 47, notelen * 6, vol * 0.03, &instr_piano); add_note(tl, where, 52, notelen * 6, vol * 0.03, &instr_piano); where += notelen * 2; } where += notelen * 8; } for (k=0; k<4; k++) { for (i=0; i<4; i++) { add_note(tl, where, 37 + 0, notelen * 6, vol * 0.03, &instr_piano); add_note(tl, where, 37 + 4, notelen * 6, vol * 0.03, &instr_piano); add_note(tl, where, 37 + 7, notelen * 6, vol * 0.03, &instr_piano); add_note(tl, where, 37 + 12, notelen * 6, vol * 0.03, &instr_piano); where += notelen * 2; } where += notelen * 8; } } /* bass */ where = 0.0; for (j=0; j<2; j++) { for (i=0; i<15; i++) { add_note(tl, where, 40 - 12*2, notelen * 2, vol * 0.2, &instr_piano); where += notelen * 2; add_note(tl, where, 40 - 7 - 12*2, notelen * 2, vol * 0.2, &instr_piano); where += notelen * 2; } add_note(tl, where, 40 - 12*2, notelen * 2, vol * 0.2, &instr_piano); where += notelen * 2; add_note(tl, where, 40 - 1 - 12*2, notelen * 2, vol * 0.2, &instr_piano); where += notelen * 2; for (i=0; i<15; i++) { add_note(tl, where, 37 - 12*2, notelen * 2, vol * 0.2, &instr_piano); where += notelen * 2; add_note(tl, where, 37 - 7 - 12*2, notelen * 2, vol * 0.2, &instr_piano); where += notelen * 2; } add_note(tl, where, 37 - 12*2, notelen * 2, vol * 0.2, &instr_piano); where += notelen * 2; add_note(tl, where, 37 + 2 - 12*2, notelen * 2, vol * 0.2, &instr_piano); where += notelen * 2; } timeline_play(tl); timeline_free(tl); return EXIT_SUCCESS; }
the_stack_data/220456952.c
#include <stdio.h> static struct sss{ char f; } a[10]; int main (void) { printf ("++++Array of struct with char:\n"); printf ("size=%d,align=%d,displ-a[5]=%d,align-a[5]=%d\n", sizeof (a), __alignof__ (a), (char*)&a[5] - (char*)a, __alignof__ (a[5])); return 0; }
the_stack_data/62637980.c
// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. #include <stdio.h> #include <stdlib.h> #include <string.h> //////////////////////////////////////////////////////////////////////////////// // 7.19.2 Streams //////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// // 7.19.3 Files //////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// // 7.19.4 Operations on files //////////////////////////////////////////////////////////////////////////////// // 7.19.4.1 The remove function int remove(const char *filename); // 7.19.4.3 The tmpfile function FILE* tmpfile(void); // 7.19.4.4 The tmpnam function char* tmpnam(char *s); //////////////////////////////////////////////////////////////////////////////// // 7.19.5 File access functions //////////////////////////////////////////////////////////////////////////////// // 7.19.5.1 The fclose function int fclose(FILE *stream); // 7.19.5.2 The fflush function int fflush(FILE *stream); // 7.19.5.3 The fopen function FILE *fopen(const char * restrict filename, const char * restrict mode); // 7.19.5.4 The freopen function FILE *freopen(const char * restrict filename, const char * restrict mode, FILE * restrict stream); // 7.19.5.6 The setvbuf function int setvbuf(FILE * restrict stream, char * restrict buf, int mode, size_t size); //////////////////////////////////////////////////////////////////////////////// // 7.19.6 Formatted input/output functions //////////////////////////////////////////////////////////////////////////////// // 7.19.6.1 The fprintf function int fprintf(FILE * restrict stream, const char * restrict format, ...); // 7.19.6.2 The fscanf function int fscanf(FILE * restrict stream, const char * restrict format, ...); // 7.19.6.3 The printf function int printf(const char * restrict format, ...); // 7.19.6.4 The scanf function int scanf(const char * restrict format, ...); // 7.19.6.5 The snprintf function int snprintf(char * restrict s, size_t n, const char * restrict format, ...); // 7.19.6.6 The sprintf function int sprintf(char * restrict s, const char * restrict format, ...); // 7.19.6.7 The sscanf function int sscanf(const char * restrict s, const char * restrict format, ...); // 7.19.6.8 The vfprintf function int vfprintf(FILE * restrict stream, const char * restrict format, va_list arg); // 7.19.6.9 The vfscanf function int vfscanf(FILE * restrict stream, const char * restrict format, va_list arg); // 7.19.6.10 The vprintf function int vprintf(const char * restrict format, va_list arg); // 7.19.6.11 The vscanf function int vscanf(const char * restrict format, va_list arg); // 7.19.6.12 The vsnprintf function int vsnprintf(char * restrict s, size_t n, const char * restrict format, va_list arg); // 7.19.6.13 The vsprintf function int vsprintf(char * restrict s, const char * restrict format, va_list arg); // 7.19.6.14 The vsscanf function int vsscanf(const char * restrict s, const char * restrict format, va_list arg); //////////////////////////////////////////////////////////////////////////////// // 7.19.7 Character input/output functions //////////////////////////////////////////////////////////////////////////////// // 7.19.7.1 The fgetc function int fgetc(FILE *stream); // 7.19.7.2 The fgets function char *fgets(char * restrict s, int n, FILE * restrict stream); // 7.19.7.3 The fputc function int fputc(int c, FILE *stream); // 7.19.7.4 The fputs function int fputs(const char * restrict s, FILE * restrict stream); // 7.19.7.5 The getc function int getc(FILE *stream); // 7.19.7.6 The getchar function int getchar(void); // 7.19.7.7 The gets function char *gets(char *s); // 7.19.7.8 The putc function int putc(int c, FILE *stream); // 7.19.7.9 The putchar function int putchar(int c); // 7.19.7.10 The puts function int puts(const char *s) { #if defined(__linux__) && defined(__LP64__) int ret; const unsigned long sys_write = 1; __asm("syscall" : "=a" (ret) : "a" (sys_write), "D" (1 /* stdout */), "S" (s), "d" (strlen(s)) : "rcx", "r11"); return ret; #elif defined(__APPLE__) const unsigned int sys_write = (2 << 24) + 4; int ret; __asm("syscall" : "=a" (ret) : "a" (sys_write), "D" (1 /* stdout */), "S" (s), "d" (strlen(s)) : "rcx", "r11"); return ret; #else # error "This OS is not 64-bit Linux or macOS (not yet supported)." #endif } // 7.19.7.11 The ungetc function int ungetc(int c, FILE *stream); //////////////////////////////////////////////////////////////////////////////// // 7.19.8 Direct input/output functions //////////////////////////////////////////////////////////////////////////////// // 7.19.8.1 The fread function size_t fread(void * restrict ptr, size_t size, size_t nmemb, FILE * restrict stream); // 7.19.8.2 The fwrite function size_t fwrite(const void * restrict ptr, size_t size, size_t nmemb, FILE * restrict stream); //////////////////////////////////////////////////////////////////////////////// // 7.19.9 File positioning functions //////////////////////////////////////////////////////////////////////////////// // 7.19.9.1 The fgetpos function int fgetpos(FILE * restrict stream, fpos_t * restrict pos); // 7.19.9.2 The fseek function int fseek(FILE *stream, long int offset, int whence); // 7.19.9.3 The fsetpos function int fsetpos(FILE *stream, const fpos_t *pos); // 7.19.9.4 The ftell function long int ftell(FILE *stream); // 7.19.9.5 The rewind function void rewind(FILE *stream); //////////////////////////////////////////////////////////////////////////////// // 7.19.10 Error-handling functions //////////////////////////////////////////////////////////////////////////////// // 7.19.10.1 The clearerr function void clearerr(FILE *stream); // 7.19.10.2 The feof function int feof(FILE *stream); // 7.19.10.3 The ferror function int ferror(FILE *stream); // 7.19.10.4 The perror function void perror(const char *s);
the_stack_data/212643194.c
static inline int find_next_bit(const unsigned long *vaddr, int size, int offset); static inline int find_first_bit(const unsigned long *vaddr, unsigned size) { int res; return res < size ? res : size; } void main(void) { unsigned long size, offset, res_1, res_2; const unsigned long *addr; if (size < offset) return; res_1 = find_first_bit(addr, size); // check return value of find_first_bit if (res_1 > size) { // error - should be unreached res_2 = find_next_bit(addr, 1, 2); } }
the_stack_data/59511550.c
#define _GNU_SOURCE #include <stdlib.h> #include <sys/sysinfo.h> int getloadavg(double *a, int n) { struct sysinfo si; if (n <= 0) return n ? -1 : 0; sysinfo(&si); if (n > 3) n = 3; for (int i=0; i<n; i++) a[i] = 1.0/(1<<SI_LOAD_SHIFT) * si.loads[i]; return n; }
the_stack_data/150143193.c
// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py // RUN: %clang_cc1 -triple riscv32 -target-feature +zknd -emit-llvm %s -o - \ // RUN: | FileCheck %s -check-prefix=RV32ZKND // RV32ZKND-LABEL: @aes32dsi( // RV32ZKND-NEXT: entry: // RV32ZKND-NEXT: [[RS1_ADDR:%.*]] = alloca i32, align 4 // RV32ZKND-NEXT: [[RS2_ADDR:%.*]] = alloca i32, align 4 // RV32ZKND-NEXT: store i32 [[RS1:%.*]], i32* [[RS1_ADDR]], align 4 // RV32ZKND-NEXT: store i32 [[RS2:%.*]], i32* [[RS2_ADDR]], align 4 // RV32ZKND-NEXT: [[TMP0:%.*]] = load i32, i32* [[RS1_ADDR]], align 4 // RV32ZKND-NEXT: [[TMP1:%.*]] = load i32, i32* [[RS2_ADDR]], align 4 // RV32ZKND-NEXT: [[TMP2:%.*]] = call i32 @llvm.riscv.aes32dsi(i32 [[TMP0]], i32 [[TMP1]], i8 3) // RV32ZKND-NEXT: ret i32 [[TMP2]] // int aes32dsi(int rs1, int rs2) { return __builtin_riscv_aes32dsi_32(rs1, rs2, 3); } // RV32ZKND-LABEL: @aes32dsmi( // RV32ZKND-NEXT: entry: // RV32ZKND-NEXT: [[RS1_ADDR:%.*]] = alloca i32, align 4 // RV32ZKND-NEXT: [[RS2_ADDR:%.*]] = alloca i32, align 4 // RV32ZKND-NEXT: store i32 [[RS1:%.*]], i32* [[RS1_ADDR]], align 4 // RV32ZKND-NEXT: store i32 [[RS2:%.*]], i32* [[RS2_ADDR]], align 4 // RV32ZKND-NEXT: [[TMP0:%.*]] = load i32, i32* [[RS1_ADDR]], align 4 // RV32ZKND-NEXT: [[TMP1:%.*]] = load i32, i32* [[RS2_ADDR]], align 4 // RV32ZKND-NEXT: [[TMP2:%.*]] = call i32 @llvm.riscv.aes32dsmi(i32 [[TMP0]], i32 [[TMP1]], i8 3) // RV32ZKND-NEXT: ret i32 [[TMP2]] // int aes32dsmi(int rs1, int rs2) { return __builtin_riscv_aes32dsmi_32(rs1, rs2, 3); }
the_stack_data/7949044.c
#include <stdio.h> #include <string.h> long hash(char *word,int *counter); int main() { char word[200]; int lenght,counter=0; long result; scanf("%s", word); lenght=strlen(word); for(counter=0;counter<lenght;counter++){ result = hash(&word[counter], &counter); } printf("%ld", result); return 0; } long hash(char *word,int *counter){ int counter2=0; static long sum=42; char ascii; for(;counter2<=255;counter2++){ ascii = counter2; if (ascii == *word) { sum += counter2*(*counter+1); } } return sum; }
the_stack_data/130108.c
/* On a separate file to allow compiling the main test suite with -O0 and ensure that optimizations won't optimize function calls away. */ #include <inttypes.h> #include <stdlib.h> /* http://stackoverflow.com/questions/1965487/does-the-restrict-keyword-provide-significant-benefits-in-gcc-g */ void f1(uint8_t *p1, uint8_t *p2, size_t size) { size_t i; for (i = 0; i < size; ++i) { p1[i] = 4; p2[i] = 9; } } void f2(uint8_t *restrict p1, uint8_t *restrict p2, size_t size) { size_t i; for (i = 0; i < size; ++i) { p1[i] = 4; p2[i] = 9; } }
the_stack_data/154826969.c
#include <string.h> int memcmp(const void *a_, const void *b_, size_t n) { const char *a = a_, *b = b_; if(n) do { if(*a > *b) return 1; if(*a < *b) return -1; a++, b++; n--; } while(n && *a); return 0; }
the_stack_data/40762471.c
/* * The MIT License (MIT) * * Copyright (c) 2013 Keichi Takahashi [email protected] * * 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. */ /* Substantially derived from * https://github.com/keichi/tiny-lldpd * also under the MIT license */ #include <signal.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <syslog.h> #include <unistd.h> #include <net/ethernet.h> #include <net/if.h> #include <netinet/if_ether.h> #include <netinet/in.h> #include <netpacket/packet.h> #include <sys/socket.h> #define MAXINTERFACES 8 const char *ifnames[MAXINTERFACES] = {0}; int ninterfaces = 0; uint8_t sendbuf[1024]; const uint8_t lldpaddr[ETH_ALEN] = {0x01, 0x80, 0xc2, 0x00, 0x00, 0x0e}; #define ETH_P_LLDP 0x88cc #define TLV_END 0 #define TLV_CHASSIS_ID 1 #define TLV_PORT_ID 2 #define TLV_TTL 3 #define TLV_PORT_DESCRIPTION 4 #define TLV_SYSTEM_NAME 5 #define CHASSIS_ID_MAC_ADDRESS 4 #define PORT_ID_MAC_ADDRESS 3 static int write_lldp_tlv_header(void *p, int type, int length) { *((uint16_t *)p) = htons((type & 0x7f) << 9 | (length & 0x1ff)); return 2; } static int write_lldp_type_subtype_tlv(size_t offset, uint8_t type, uint8_t subtype, int length, const void *data) { uint8_t *p = sendbuf + offset; if ((offset + 2 + 1 + length) > sizeof(sendbuf)) { fprintf(stderr, "LLDP frame too large %zd > %zd\n", (offset + 2 + 1 + length), sizeof(sendbuf)); exit(1); } p += write_lldp_tlv_header(p, type, length + 1); *p++ = subtype; memcpy(p, data, length); p += length; return (p - sendbuf); } static int write_lldp_type_tlv(size_t offset, uint8_t type, int length, const void *data) { uint8_t *p = sendbuf + offset; if ((offset + 2 + length) > sizeof(sendbuf)) { fprintf(stderr, "LLDP frame too large %zd > %zd\n", (offset + 2 + length), sizeof(sendbuf)); exit(1); } p += write_lldp_tlv_header(p, type, length); memcpy(p, data, length); p += length; return (p - sendbuf); } static int write_lldp_end_tlv(size_t offset) { uint8_t *p = sendbuf + offset; if ((offset + 2) > sizeof(sendbuf)) { fprintf(stderr, "LLDP frame too large %zd > %zd\n", (offset + 2), sizeof(sendbuf)); exit(1); } offset += write_lldp_tlv_header(p, TLV_END, 0); return offset; } static void mac_str_to_bytes(const char *macstr, uint8_t *mac) { if (sscanf(macstr, "%hhx:%hhx:%hhx:%hhx:%hhx:%hhx", &mac[0], &mac[1], &mac[2], &mac[3], &mac[4], &mac[5]) != 6) { fprintf(stderr, "Invalid MAC address: %s\n", macstr); exit(1); } } static size_t format_lldp_packet(const char *macaddr, const char *ifname, const char *serial) { uint8_t saddr[ETH_ALEN]; size_t offset = 0; struct ether_header *eh = (struct ether_header *)sendbuf; uint16_t ttl; mac_str_to_bytes(macaddr, saddr); memset(sendbuf, 0, sizeof(sendbuf)); eh = (struct ether_header *)sendbuf; memcpy(eh->ether_shost, saddr, sizeof(eh->ether_shost)); memcpy(eh->ether_dhost, lldpaddr, sizeof(eh->ether_dhost)); eh->ether_type = htons(ETH_P_LLDP); offset = sizeof(*eh); offset = write_lldp_type_subtype_tlv(offset, TLV_CHASSIS_ID, CHASSIS_ID_MAC_ADDRESS, ETH_ALEN, saddr); offset = write_lldp_type_subtype_tlv(offset, TLV_PORT_ID, PORT_ID_MAC_ADDRESS, ETH_ALEN, saddr); ttl = htons(120); offset = write_lldp_type_tlv(offset, TLV_TTL, sizeof(ttl), &ttl); offset = write_lldp_type_tlv(offset, TLV_PORT_DESCRIPTION, strlen(ifname), ifname); offset = write_lldp_type_tlv(offset, TLV_SYSTEM_NAME, strlen(serial), serial); offset = write_lldp_end_tlv(offset); return offset; } #ifndef UNIT_TESTS static void send_lldp_packet(int s, size_t len, const char *ifname) { struct sockaddr_ll sll; memset(&sll, 0, sizeof(sll)); sll.sll_family = PF_PACKET; sll.sll_ifindex = if_nametoindex(ifname); sll.sll_hatype = ARPHRD_ETHER; sll.sll_halen = ETH_ALEN; sll.sll_pkttype = PACKET_OTHERHOST; memcpy(sll.sll_addr, lldpaddr, ETH_ALEN); if (sendto(s, sendbuf, len, 0, (struct sockaddr*)&sll, sizeof(sll)) < 0) { fprintf(stderr, "LLDP sendto failed\n"); exit(1); } } static void usage(const char *progname) { fprintf(stderr, "usage: %s -i eth# -m 00:11:22:33:44:55 -s G0123456789\n", progname); exit(1); } int main(int argc, char *argv[]) { const char *macaddr = NULL; const char *serial = NULL; int c; int s; while ((c = getopt(argc, argv, "i:m:s:")) != -1) { switch (c) { case 'i': if (ninterfaces == (MAXINTERFACES - 1)) { usage(argv[0]); } ifnames[ninterfaces++] = optarg; break; case 'm': macaddr = optarg; break; case 's': serial = optarg; break; default: usage(argv[0]); break; } } if (ninterfaces == 0 || macaddr == NULL || serial == NULL) { usage(argv[0]); } if ((s = socket(PF_PACKET, SOCK_RAW, htons(ETH_P_ALL))) < 0) { fprintf(stderr, "socket(PF_PACKET) failed\n"); exit(1); } while (1) { int i; for (i = 0; i < ninterfaces; ++i) { if (ifnames[i] != NULL) { size_t len = format_lldp_packet(macaddr, ifnames[i], serial); send_lldp_packet(s, len, ifnames[i]); } usleep(10000 + (rand() % 80000)); } usleep(500000 + (rand() % 1000000)); } return 0; } #endif /* UNIT_TESTS */
the_stack_data/59513803.c
#include <stdlib.h> /** * Note: The returned array must be malloced, assume caller calls free(). */ int *findDisappearedNumbers(int *nums, int numsSize, int *returnSize) { int *tmp = malloc(numsSize * sizeof(*tmp)); for (int i = 1; i <= numsSize; i++) *(tmp + i - 1) = i; int length = 0; for (int i = 0; i < numsSize; i++) { int index = nums[i]; if (*(tmp + index - 1) == 0) length++; *(tmp + index - 1) = 0; } *returnSize = length; int *ret = malloc(length * sizeof(*ret)); for (int i = 0, j = 0; i < numsSize; i++) { if (tmp[i]) ret[j++] = tmp[i]; } free(tmp); return ret; }
the_stack_data/64200989.c
// file_eof.c --open a file and display it #include <stdio.h> #include <stdlib.h> // for exit() int main(){ int ch; FILE * fp; char fname[50]; // to hold the file name printf("Enter the name of the file: "); scanf("%s", fname); fp = fopen(fname, "r"); // open file for reading if (fp == NULL) // attempt falied { printf("Failed to open file. Bye\n"); exit(1); // quit program } // getc(fp) gets a character from the open file while ((ch = getc(fp)) != EOF) putchar(ch); fclose(fp); // close the file return 0; }
the_stack_data/672654.c
int many(int a, int b, int c, int d, int e, int f, int g, int h, int i, int j) { putchar(64 + a); putchar(64 + b); putchar(64 + c); putchar(64 + d); putchar(64 + e); putchar(64 + f); putchar(64 + g); putchar(64 + h); putchar(64 + i); putchar(64 + j); putchar(10); if (a < 10) many(b, c, d, e, f, g, h, i, j, a); return 0; } int main() { many(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); return 0; }
the_stack_data/43887481.c
#include <fcntl.h> #include <sys/stat.h> #include <sys/types.h> #include <sys/wait.h> #include <stdio.h> #include <unistd.h> #include <string.h> #include <stdlib.h> #define MAX_INPUT_SIZE 1024 int countOccurances(char *string, char item) { int found = 0; int i; for(i = 0; i < strlen(string); i++ ) { char on = string[i]; if(on == item) found++; } return found; } void replace(char *string, char replace, char with) { int i = 0; while(string[i] != '\0') { if(string[i] == replace) string[i] = with; i++; } } char ** split(char *string, char at) { int occurances = countOccurances(string, at); int occuranceOn = 0; char **output = malloc(occurances * sizeof(char*)); char atstring[2]; atstring[0] = at; char *tok = strtok(string, atstring); while(tok != NULL) { output[occuranceOn] = tok; occuranceOn++; tok = strtok(NULL, atstring); } return output; } void execute(char **command, int size, int inbg, char *outFile) { char *cmds[size + 1]; int x = 0; for(; x <= size; x++) cmds[x] = command[x]; cmds[x] = NULL; pid_t pid = fork(); if(pid == 0) { if(outFile) { int fd = open(outFile, O_CREAT | O_RDWR | O_TRUNC, 0666); dup2(fd, 1); } if(execvp(cmds[0], cmds)) { fprintf(stderr, "Invalid Command: %s\n", command[0]); exit(1); } else { exit(0); } } else { int status; if(inbg) waitpid(pid, &status, WNOHANG); else { waitpid(pid, &status, 0); } } } char *getOutFile(char *command) { int on = 0; for(; on < strlen(command); on++) { if (command[on] == '>') break; } on ++; char *fileName = malloc(sizeof(command) * sizeof(char)); int i; for(i = 0; on < strlen(command); i++) { fileName[i] = command[on]; on++; } if(fileName[0] == ' ') { char *out = malloc(sizeof(fileName) * sizeof(char)); for(i = 1; i < strlen(fileName); i++) out[i - 1] = fileName[i]; return out; } return fileName; } void parseCommand(char *command) { int inbg = 0; char *outFile = NULL; replace(command, '\n', '\0'); if(countOccurances(command, '&')) { replace(command, '&', '\0'); inbg = 1; } if(countOccurances(command, '>')) { outFile = getOutFile(command); replace(command, '>', '\0'); } int occurances = countOccurances(command, ' '); char **tokenized; int size = 0; // Number of elements in array - 1 if(occurances > 0) { size = occurances; tokenized = split(command, ' '); } else if(strlen(command) > 0) { tokenized = malloc(2 * sizeof(char*)); tokenized[0] = command; } if(strcmp(tokenized[0], "quit") == 0 || strcmp(tokenized[0], "quit ") == 0 || strcmp(tokenized[0], "quit\n") == 0) { while(1) // Ensures that it quits exit(0); } else if(strcmp(tokenized[0], "barrier") == 0 || strcmp(tokenized[0], "barrier ") == 0 || strcmp(tokenized[0], "barrier\n") == 0) { int status; pid_t wid; while((wid = wait(&status)) > 0); } else { execute(tokenized, size, inbg, outFile); } } int isEmpty(char *command) { int empty = 1; int i = 0; for(; i < strlen(command); i++) { if(command[i] != ' ') { empty = 0; break; } } return empty; } void startShell() { while(1) { char command[MAX_INPUT_SIZE]; printf("prompt> "); fgets(command, MAX_INPUT_SIZE, stdin); replace(command, '\n', '\0'); if(strlen(command) > 0 && !isEmpty(command)) { parseCommand(command); } } } void executeBatch(char *batch_file) { FILE *fp; char *line; size_t length = 0; ssize_t read_size; fp = fopen(batch_file, "r"); if (fp == NULL) { fprintf(stderr, "Invalid File Name: %s\n", batch_file); exit(1); } while ((read_size = getline(&line, &length, fp)) != -1) { if(strlen(line) <= 0 || isEmpty(line) || strcmp(line, "\n") == 0 || strcmp(line, " ") == 0) { continue; } printf("%s", line); parseCommand(line); } } int main(int argc, char *argv[]) { if (argc == 1) { startShell(); } else if (argc == 2) { char *batch_file = argv[1]; executeBatch(batch_file); } else { printf("Invalid number of arguments\n"); exit(1); } return 0; }
the_stack_data/220454401.c
//Q4.Wap input a string and copy it into another string in reverse order without using library function #include<stdio.h> int main() { int len=0; char str[100],rev[100]; printf("Enter the string: "); gets(str); for(int i=0;str[i]!='\0';i++)len++; for(int i=len-1;i>=0;i--)rev[len-i-1]=str[i]; printf("The copied reversed string: "); puts(rev); return 0; }
the_stack_data/161081662.c
#include<string.h> #include<unistd.h> #include<sys/socket.h> #include<sys/types.h> #include<netinet/in.h> #include<stdlib.h> #include<stdio.h> void swap(char *x, char *y) { char temp; temp = *x; *x = *y; *y = temp; } void permute(char *a, int l, int r) { int i; if (l == r) printf("%s\n", a); else { for (i = l; i <= r; i++) { swap((a+l), (a+i)); permute(a, l+1, r); swap((a+l), (a+i)); //backtrack } } } int main() { int s,r,recb,sntb,x; int ca; printf("INPUT port number: "); scanf("%d", &x); socklen_t len; struct sockaddr_in server,client; char buff[50]; s=socket(AF_INET,SOCK_DGRAM,0); if(s==-1) { printf("\nSocket creation error."); exit(0); } printf("\nSocket created.\n"); server.sin_family=AF_INET; server.sin_port=htons(x); server.sin_addr.s_addr=htonl(INADDR_ANY); len=sizeof(client); ca=sizeof(client); r=bind(s,(struct sockaddr*)&server,sizeof(server)); if(r==-1) { printf("\nBinding error."); exit(0); } printf("\nSocket binded.\n"); while(1){ recb=recvfrom(s,buff,sizeof(buff),0,(struct sockaddr*)&client,&ca); if(recb==-1) { printf("\nMessage Recieving Failed"); close(s); exit(0); } printf("\nMessage Recieved: "); printf("%s", buff); if(!strcmp(buff,"stop")) break; printf("\nPermutations of the string are: \n"); int n=strlen(buff); permute(buff, 0, n-1); } close(s); }
the_stack_data/655112.c
#include <stdio.h> #include <stdlib.h> struct node { int data; struct node *next; }; void display(struct node *start); struct node *create(); struct node *add(struct node *start, int data); struct node *append(struct node *start, int data); struct node *add_after(struct node *start, int data, int pos); struct node *add_before(struct node *start, int data, int pos); struct node *add_at_pos(struct node *start, int data, int pos); struct node *delete(struct node *start, int pos); struct node *reverse(struct node *start); int count(struct node *start); int search(struct node *start, int data); int main() { int choice, data, pos; struct node *start; printf("1.Create Linked List\n2.Display\n"); printf("3.Add At Beginning\n4.Add At End\n5.Add After\n6.Add Before\n"); printf("6.Add at Position\n8.Delete\n9.Reverse\n10.Count\n11.Search\n12.Exit\n"); do { printf("Enter Choice: "); scanf("%d", &choice); switch (choice) { case 1: start = create(); printf("Linked List Created Successfully\n"); break; case 2: display(start); break; case 3: printf("Enter Data: "); scanf("%d", &data); start = add(start, data); break; case 4: printf("Enter Data: "); scanf("%d", &data); start = append(start, data); break; case 5: printf("Enter Data: "); scanf("%d", &data); printf("Enter Position: "); scanf("%d", &pos); start = add_after(start, data, pos); break; case 6: printf("Enter Data: "); scanf("%d", &data); printf("Enter Position: "); scanf("%d", &pos); start = add_before(start, data, pos); break; case 7: printf("Enter Data: "); scanf("%d", &data); printf("Enter Position: "); scanf("%d", &pos); start = add_at_pos(start, data, pos); break; case 8: printf("Enter Position: "); scanf("%d", &pos); start = delete(start, pos); break; case 9: start = reverse(start); printf("Reversal Success!\n"); break; case 10: data = count(start); printf("Length of Linked List is %d\n", data); break; case 11: printf("Enter Data To Search: "); scanf("%d", &data); pos = search(start, data); if(pos != -1) printf("Position of %d is %d\n", data, pos); break; case 12: exit(0); default: printf("Wrong Choice\n"); } } while (choice != 12); } struct node *create() { struct node *start = NULL; int size, i, j; printf("Enter Size: "); scanf("%d", &size); printf("Enter Elements: "); for (i = 0; i < size; i++) { scanf("%d", &j); start = append(start, j); } return start; } struct node *append(struct node *start, int data) { struct node *temp = (struct node *) malloc(sizeof(struct node)); struct node *p = start; if (start == NULL) { temp->data = data; temp->next = NULL; start = temp; return start; } temp->data = data; temp->next = NULL; while (p->next != NULL) p = p->next; p->next = temp; return start; } void display(struct node *start) { struct node *p = start; if (start == NULL) { printf("Linked List is Empty\n"); return; } while (p != NULL) { printf("%d ---> ", p->data); p = p->next; } printf("NULL\n"); } struct node *add(struct node *start, int data) { struct node *temp = (struct node *) malloc(sizeof(struct node)); temp->data = data; temp->next = start; start = temp; return start; } struct node *add_after(struct node *start, int data, int pos) { struct node *temp = (struct node *) malloc(sizeof(struct node)); struct node *p = start; int cnt = 0; if (pos == 0) { start = add(start, data); return start; } while (p->next != NULL) { if (cnt == pos) { temp->data = data; temp->next = p->next; p->next = temp; return start; } p = p->next; cnt++; } printf("Wrong Position Given!\n"); return start; } struct node *add_before(struct node *start, int data, int pos) { struct node *temp = (struct node *) malloc(sizeof(struct node)); struct node *p = start; int cnt = 0; if (pos == 0){ start = add(start, data); return start; } while (p->next != NULL) { if (cnt == pos - 1) { temp->data = data; temp->next = p->next; p->next = temp; return start; } cnt++; p = p->next; } printf("Wrong Position Given!\n"); return start; } struct node *add_at_pos(struct node *start, int data, int pos){ struct node *p = start; int cnt = 0; if(pos == 0){ start->data = data; return start; } while(p->next != NULL){ if (cnt == pos){ p->data = data; return start; } p = p->next; cnt++; } printf("Wrong Position Given\n"); return start; } struct node *delete(struct node *start, int pos){ struct node *p = start; int cnt = 0; if (pos == 0){ start = start->next; return start; } pos--; while (p->next != NULL){ if(cnt == pos){ p->next = p->next->next; return start; } p = p->next; cnt++; } printf("Wrong Position Given!\n"); return start; } struct node *reverse(struct node *start){ struct node *p, *prev, *next; prev = NULL; p = start; while(p != NULL){ next = p->next; p->next = prev; prev = p; p = next; } start = prev; return start; } int count(struct node *start){ struct node *p = start; int cnt = 0; while(p != NULL){ cnt += 1; p = p->next; } return cnt; } int search(struct node *start, int data){ struct node *p = start; int cnt = 0; while(p != NULL){ if (p->data == data) return cnt; p = p->next; cnt += 1; } printf("Data Not in List!\n"); return -1; }
the_stack_data/114895.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <openssl/md5.h> #define LINE_SIZE 32 unsigned char *gen_md5(char *filename) { FILE *pFile; pFile = fopen(filename, "r"); int nread; unsigned char *hash = (unsigned char *)calloc(1, MD5_DIGEST_LENGTH); MD5_CTX ctx; MD5_Init(&ctx); char buf[LINE_SIZE]; memset(buf, 0, LINE_SIZE); if(pFile) { while ((nread = fread(buf, 1, sizeof buf, pFile)) > 0) { //fwrite(buf, nread, 1, stdout); memset(buf, 0, LINE_SIZE); MD5_Update(&ctx, (const void *)buf, nread); } if (ferror(pFile)) { /* deal with error */ } fclose(pFile); } MD5_Final(hash, &ctx); return hash; } int main() { /* unsigned char *data = "Hello, world!\n"; char result[MD5_DIGEST_LENGTH*2]; memset(result,0, MD5_DIGEST_LENGTH*2); MD5_CTX ctx; MD5_Init(&ctx); MD5_Update(&ctx, (const void *)"hello, ", 7); MD5_Update(&ctx, (const void *)"world ", 6); unsigned char hash[MD5_DIGEST_LENGTH]; MD5_Final(hash, &ctx); int i; char tmp[4]; for(i=0; i<MD5_DIGEST_LENGTH; i++) { sprintf(tmp, "%02x", hash[i]); strcat(result, tmp); printf("%02x", hash[i]); } printf("\n%s\n", result); */ unsigned char *hash = gen_md5("client.c"); unsigned char *hash1 = gen_md5("client.c"); if(strcmp(hash,hash1) == 0) printf("yes\n"); /* char result[MD5_DIGEST_LENGTH*2]; memset(result,0, MD5_DIGEST_LENGTH*2); int i; char tmp[4]; for(i=0; i<MD5_DIGEST_LENGTH; i++) { printf("%02x", hash[i]); sprintf(tmp, "%02x", hash[i]); strcat(result, tmp); } printf("\n%s\n", result); */ return 0; }
the_stack_data/94220.c
#include <stdio.h> #include <string.h> #include <sys/stat.h> #include <sys/types.h> #include <sys/socket.h> #include <pthread.h> #include <netinet/in.h> #include <arpa/inet.h> #include <fcntl.h> #include <unistd.h> #define request "request" #define logout "logout" #define conct "connect" #define wait "wait" #define kill "kill" #define die "die" //Mark Sathish Pairdha //16CS01032 struct maintain { int port; char ip[100]; }list [100]; int ind = 0; int s, n; char rec_buffer[100],send_buffer[100]; int *ptr[2]; pthread_t tid[2]; void * keep_receiving() { while(1) { recv(s,&rec_buffer,sizeof(rec_buffer),MSG_PEEK); if(strlen(rec_buffer) == 0) continue; recv(s,&rec_buffer,sizeof(rec_buffer),0); if(strcmp(rec_buffer,"end")==0) { strcpy(send_buffer,die); send(s,&send_buffer,sizeof(send_buffer),0); if(pthread_cancel(tid[1]) == 0) printf("keep_receiving cancelled keep_sending"); else printf("keep_receiving failed"); printf("\n"); int ret = 0; pthread_exit(&ret); } printf("Reply > %s\n",rec_buffer); } } void * keep_sending() { while(1) { printf("> : "); scanf("%s", send_buffer); send(s,&send_buffer,sizeof(send_buffer),0); if(strcmp(send_buffer,"end")==0) { if(pthread_cancel(tid[0]) == 0) printf("keep_sending cancelled keep_receiving"); else printf("keep_sending failed"); printf("\n"); memset(send_buffer,0,sizeof(send_buffer)); int ret = 0; pthread_exit(&ret); } } } void update_list() { send(s,&request,sizeof(request),0); int num; recv(s,&num,sizeof(num),0); ind = 0; printf("ID ---> ______IP______ : PORT\n"); while(num--) { char ip[100]; int port; recv(s,&ip,sizeof(ip),0); recv(s,&port,sizeof(port),0); strcpy(list[ind].ip,ip); list[ind].port = port; printf("%d ---> %-15s : %d\n", ind, ip, port); ind++; } } int main() { struct sockaddr_in client,server; s=socket(AF_INET,SOCK_STREAM,0); server.sin_family=AF_INET; server.sin_port=15512; server.sin_addr.s_addr=inet_addr("127.0.0.1"); printf("\nClient side has been setup successfully...\n"); n=sizeof(server); int status = connect(s,(struct sockaddr *)&server,n); if(status == -1) { printf("Connection failure\n"); return 1; } while(1) { printf("\n\n1> Get the list of clients\n2> Connect to a client\n3> Wait for connection\n4> Logout\n\n"); int dec; scanf("%d", &dec); if(dec == 1) { update_list(); } else if(dec==2) { update_list(); send(s,&conct,sizeof(conct),0); printf("\n\nEnter the id of client you want to connect to : "); int conn; scanf("%d", &conn); if(conn >= ind) { printf("The client ID is wrong\n"); continue; } send(s,&list[conn].ip,sizeof(list[conn].ip),0); send(s,&list[conn].port,sizeof(list[conn].port),0); pthread_create(&tid[0], NULL, keep_receiving, NULL); pthread_create(&tid[1], NULL, keep_sending, NULL); if(pthread_join(tid[0],(void**)&(ptr[0])) != 0) printf("pthread_join 1 error"); if(pthread_join(tid[1],(void**)&(ptr[0])) != 0) printf("pthread_join 2 error"); } else if(dec==3) { int conn; send(s,&wait,sizeof(wait),0); recv(s,&conn,sizeof(conn),0); printf("Got a chat request\n"); send(s,&conn,sizeof(conn),0); pthread_create(&tid[0], NULL, keep_receiving, NULL); pthread_create(&tid[1], NULL, keep_sending, NULL); if(pthread_join(tid[0],(void**)&(ptr[0])) != 0) printf("pthread_join 1 error"); if(pthread_join(tid[1],(void**)&(ptr[0])) != 0) printf("pthread_join 2 error"); } else if(dec==4) { send(s,&logout,sizeof(logout),0); close(s); break; } else { printf("Wrong choice\n"); } } return 0; }
the_stack_data/1125640.c
#include <stdio.h> #ifdef x64 #define t long long #else #define t int #endif void test(int a, double b, char* c) { char *p = (char*)&a; printf("%p %p %p \n", &a, &b, &c); printf("%p %s", (p+8), *(char**)(p+8+8)); //return; } void test1(char* s, char *st, ...) { char *ppt = (char*)&s; printf("%p %p %p %p \n", ppt, &s, &st, ppt+8); printf("%s \n", *(char**)(ppt)); printf("%d \n", *(int*)(ppt+8));//无法正常输出 //return; } int main() { char *p="Hello world"; test1("111", "eee", 1336); void *s=&p; printf("%s \n", *(char**)s); //test(2, 2.2, "Hello world"); return 0; } //Problem document
the_stack_data/179830623.c
#include <string.h> #include <stdio.h> #include <stdlib.h> #include <math.h> int main(int argc, char *argv[]) { // open file for reading FILE *inputFile = fopen("Prob01.in.txt", "r"); int score; int testCases; // read number of test cases fscanf(inputFile, "%d\n", &testCases); // execute test cases while(testCases > 0){ // read score - %d returns an integer number // &score is the address of the score variable fscanf(inputFile, "%d\n", &score); // check score if(score >= 70){ printf("PASS\n"); } else{ printf("FAIL\n"); } testCases = testCases - 1; } // close the file fclose(inputFile); }
the_stack_data/74766.c
/* * Copyright (c) 1999-2000 Tony Givargis. Permission to copy is granted * provided that this header remains intact. This software is provided * with no warranties. * * Version : 2.8 */ /*--------------------------------------------------------------------------*/ #include <assert.h> #include <stdio.h> #include <string.h> /*--------------------------------------------------------------------------*/ typedef struct { char *name; int msb; int lsb; int skip; } InsForm; /*--------------------------------------------------------------------------*/ extern const char *RomHeader; extern const char *RomFooter; extern const char *InsBitTbl[]; extern const InsForm InsFormTbl[]; /*--------------------------------------------------------------------------*/ unsigned Hex2Short(const char *buf) { int i; if( sscanf(buf, "%x", &i) != 1 ) { printf("hex file error\n"); exit(1); } return i; } /*--------------------------------------------------------------------------*/ int Load(char *buf, unsigned char *rom, unsigned romSize, unsigned *prgSize) { unsigned len, base, type, i; unsigned char checksum = 0; char hex[16]; if( buf[0] != ':' ) { printf("hex file error\n"); exit(1); } hex[0] = buf[1]; hex[1] = buf[2]; hex[2] = 0; len = Hex2Short(hex); hex[0] = buf[3]; hex[1] = buf[4]; hex[2] = buf[5]; hex[3] = buf[6]; hex[4] = 0; base = Hex2Short(hex); hex[0] = buf[7]; hex[1] = buf[8]; hex[2] = 0; if( (type = Hex2Short(hex)) == 1 ) return 1; if ( (base + len) > (*prgSize) ) { (*prgSize) = base + len + 2; } if( (*prgSize) >= romSize || (base + len) >= romSize ) { printf("program too large\n"); exit(1); } for(i=0; i<len; i++) { hex[0] = buf[ 9 + i * 2]; hex[1] = buf[10 + i * 2]; rom[base + i] = (unsigned char)Hex2Short(hex); } for(i=0; buf[i * 2 + 1] && buf[i * 2 + 2]; i++) { hex[0] = buf[i * 2 + 1]; hex[1] = buf[i * 2 + 2]; checksum += (unsigned char)Hex2Short(hex); } if( checksum != 0 ) { printf("checksum failed\n"); exit(1); } return 0; } /*--------------------------------------------------------------------------*/ int Match(const char *binary, int msb, int lsb, const char *bit) { char buf[16]; strcpy(buf, &binary[7-msb]); buf[8-lsb] = 0; return strcmp(bit, buf) == 0; } /*--------------------------------------------------------------------------*/ char *Comment(const char *binary) { static char buf[32]; static int skip = 0; int i; if( skip == 0 ) { for(i=0; i<111; i++) { if( Match(binary, InsFormTbl[i].msb, InsFormTbl[i].lsb, InsBitTbl[i]) ) { sprintf(buf, "\t-- %s", InsFormTbl[i].name); skip = InsFormTbl[i].skip; return buf; } } } else { skip--; } return ""; } /*--------------------------------------------------------------------------*/ char *ToBinary(unsigned char b) { static char buf[9]; int i; for(i=0; i<8; i++) { buf[i] = b & (0x80 >> i) ? '1' : '0'; } buf[9] = 0; return buf; } /*--------------------------------------------------------------------------*/ void WriteVhdl(unsigned char *rom, unsigned prgSize, const char *fileName) { FILE* fh = fopen("i8051_rom.vhd", "w"); char *binary; unsigned i; assert( fh != 0 ); fprintf(fh, "-- %s \n\n%s", fileName, RomHeader); fprintf(fh, " type ROM_TYPE is array (0 to %i)", prgSize - 1); fprintf(fh, " of UNSIGNED (7 downto 0);\n\n"); fprintf(fh, " constant PROGRAM : ROM_TYPE := (\n\n"); for(i=0; i<prgSize-1; i++) { binary = ToBinary(rom[i]); fprintf(fh, "\t\"%s\",%s\n", binary, Comment(binary)); } binary = ToBinary(rom[prgSize-1]); fprintf(fh, "\t\"%s\");%s\n%s", binary, Comment(binary), RomFooter); } /*--------------------------------------------------------------------------*/ int main(int argc, char *argv[]) { FILE *fh; char buf[256]; unsigned char rom[4096]; unsigned prgSize = 0; memset(rom, 0, sizeof(rom)); if( argc != 2 || (fh = fopen(argv[1], "r")) == 0 ) { printf("file argument invalid\n"); exit(1); } while( !feof(fh) ) { fgets(buf, sizeof(buf), fh); if( Load(buf, rom, sizeof(rom), &prgSize) ) break; } WriteVhdl(rom, prgSize, argv[1]); return 0; } /*--------------------------------------------------------------------------*/ const char *RomHeader = "library IEEE;\n" "use IEEE.STD_LOGIC_1164.all;\n" "use IEEE.STD_LOGIC_ARITH.all;\n" "use WORK.I8051_LIB.all;\n" "\n" "entity I8051_ROM is\n" " port(rst : in STD_LOGIC;\n" " clk : in STD_LOGIC;\n" " addr : in UNSIGNED (11 downto 0);\n" " data : out UNSIGNED (7 downto 0);\n" " rd : in STD_LOGIC);\n" "end I8051_ROM;\n" "\n" "architecture BHV of I8051_ROM is\n" "\n"; /*--------------------------------------------------------------------------*/ const char *RomFooter = "begin\n" "\n" " process(rst, clk)\n" " begin\n" " if( rst = '1' ) then\n" "\n" " data <= CD_8;\n" " elsif( clk'event and clk = '1' ) then\n" "\n" " if( rd = '1' ) then\n" "\n" " data <= PROGRAM(conv_integer(addr));\n" " else\n" "\n" " data <= CD_8;\n" " end if;\n" " end if;\n" " end process;\n" "end BHV;"; /*--------------------------------------------------------------------------*/ const char *InsBitTbl[] = { "10001", "00101", "00100101", "0010011", "00100100", "00111", "00110101", "0011011", "00110100", "00001", "01011", "01010101", "0101011", "01010100", "01010010", "01010011", "10000010", "10110000", "10110101", "10110100", "10111", "1011011", "11100100", "11000011", "11000010", "11110100", "10110011", "10110010", "11010100", "00010100", "00011", "00010101", "0001011", "10000100", "11011", "11010101", "00000100", "00001", "00000101", "0000011", "10100011", "00100000", "00010000", "01000000", "01110011", "00110000", "01010000", "01110000", "01100000", "00010010", "00000010", "11101", "11100101", "1110011", "01110100", "11111", "10101", "01111", "11110101", "10001", "10000101", "1000011", "01110101", "1111011", "1010011", "0111011", "10100010", "10010010", "10010000", "10010011", "10000011", "1110001", "11100000", "1111001", "11110000", "10100100", "00000000", "01001", "01000101", "0100011", "01000100", "01000010", "01000011", "01110010", "10100000", "11010000", "11000000", "00100010", "00110010", "00100011", "00110011", "00000011", "00010011", "11010011", "11010010", "10000000", "10011", "10010101", "1001011", "10010100", "11000100", "11001", "11000101", "1100011", "1101011", "01101", "01100101", "0110011", "01100100", "01100010", "01100011", }; /*--------------------------------------------------------------------------*/ const InsForm InsFormTbl[] = { { "ACALL ", 4, 0, 1 }, { "ADD_1 ", 7, 3, 0 }, { "ADD_2 ", 7, 0, 1 }, { "ADD_3 ", 7, 1, 0 }, { "ADD_4 ", 7, 0, 1 }, { "ADDC_1 ", 7, 3, 0 }, { "ADDC_2 ", 7, 0, 1 }, { "ADDC_3 ", 7, 1, 0 }, { "ADDC_4 ", 7, 0, 1 }, { "AJMP ", 4, 0, 1 }, { "ANL_1 ", 7, 3, 0 }, { "ANL_2 ", 7, 0, 1 }, { "ANL_3 ", 7, 1, 0 }, { "ANL_4 ", 7, 0, 1 }, { "ANL_5 ", 7, 0, 1 }, { "ANL_6 ", 7, 0, 2 }, { "ANL_7 ", 7, 0, 1 }, { "ANL_8 ", 7, 0, 1 }, { "CJNE_1 ", 7, 0, 2 }, { "CJNE_2 ", 7, 0, 2 }, { "CJNE_3 ", 7, 3, 2 }, { "CJNE_4 ", 7, 1, 2 }, { "CLR_1 ", 7, 0, 0 }, { "CLR_2 ", 7, 0, 0 }, { "CLR_3 ", 7, 0, 1 }, { "CPL_1 ", 7, 0, 0 }, { "CPL_2 ", 7, 0, 0 }, { "CPL_3 ", 7, 0, 1 }, { "DA ", 7, 0, 0 }, { "DEC_1 ", 7, 0, 0 }, { "DEC_2 ", 7, 3, 0 }, { "DEC_3 ", 7, 0, 1 }, { "DEC_4 ", 7, 1, 0 }, { "DIV ", 7, 0, 0 }, { "DJNZ_1 ", 7, 3, 1 }, { "DJNZ_2 ", 7, 0, 2 }, { "INC_1 ", 7, 0, 0 }, { "INC_2 ", 7, 3, 0 }, { "INC_3 ", 7, 0, 1 }, { "INC_4 ", 7, 1, 0 }, { "INC_5 ", 7, 0, 0 }, { "JB ", 7, 0, 2 }, { "JBC ", 7, 0, 2 }, { "JC ", 7, 0, 1 }, { "JMP ", 7, 0, 0 }, { "JNB ", 7, 0, 2 }, { "JNC ", 7, 0, 1 }, { "JNZ ", 7, 0, 1 }, { "JZ ", 7, 0, 1 }, { "LCALL ", 7, 0, 2 }, { "LJMP ", 7, 0, 2 }, { "MOV_1 ", 7, 3, 0 }, { "MOV_2 ", 7, 0, 1 }, { "MOV_3 ", 7, 1, 0 }, { "MOV_4 ", 7, 0, 1 }, { "MOV_5 ", 7, 3, 0 }, { "MOV_6 ", 7, 3, 1 }, { "MOV_7 ", 7, 3, 1 }, { "MOV_8 ", 7, 0, 1 }, { "MOV_9 ", 7, 3, 1 }, { "MOV_10 ", 7, 0, 2 }, { "MOV_11 ", 7, 1, 1 }, { "MOV_12 ", 7, 0, 2 }, { "MOV_13 ", 7, 1, 0 }, { "MOV_14 ", 7, 1, 1 }, { "MOV_15 ", 7, 1, 1 }, { "MOV_16 ", 7, 0, 1 }, { "MOV_17 ", 7, 0, 1 }, { "MOV_18 ", 7, 0, 2 }, { "MOVC_1 ", 7, 0, 0 }, { "MOVC_2 ", 7, 0, 0 }, { "MOVX_1 ", 7, 1, 0 }, { "MOVX_2 ", 7, 0, 0 }, { "MOVX_3 ", 7, 1, 0 }, { "MOVX_4 ", 7, 0, 0 }, { "MUL ", 7, 0, 0 }, { "NOP ", 7, 0, 0 }, { "ORL_1 ", 7, 3, 0 }, { "ORL_2 ", 7, 0, 1 }, { "ORL_3 ", 7, 1, 0 }, { "ORL_4 ", 7, 0, 1 }, { "ORL_5 ", 7, 0, 1 }, { "ORL_6 ", 7, 0, 2 }, { "ORL_7 ", 7, 0, 1 }, { "ORL_8 ", 7, 0, 1 }, { "POP ", 7, 0, 1 }, { "PUSH ", 7, 0, 1 }, { "RET ", 7, 0, 0 }, { "RETI ", 7, 0, 0 }, { "RL ", 7, 0, 0 }, { "RLC ", 7, 0, 0 }, { "RR ", 7, 0, 0 }, { "RRC ", 7, 0, 0 }, { "SETB_1 ", 7, 0, 0 }, { "SETB_2 ", 7, 0, 1 }, { "SJMP ", 7, 0, 1 }, { "SUBB_1 ", 7, 3, 0 }, { "SUBB_2 ", 7, 0, 1 }, { "SUBB_3 ", 7, 1, 0 }, { "SUBB_4 ", 7, 0, 1 }, { "SWAP ", 7, 0, 0 }, { "XCH_1 ", 7, 3, 0 }, { "XCH_2 ", 7, 0, 1 }, { "XCH_3 ", 7, 1, 0 }, { "XCHD ", 7, 1, 0 }, { "XRL_1 ", 7, 3, 0 }, { "XRL_2 ", 7, 0, 1 }, { "XRL_3 ", 7, 1, 0 }, { "XRL_4 ", 7, 0, 1 }, { "XRL_5 ", 7, 0, 1 }, { "XRL_6 ", 7, 0, 2 } };
the_stack_data/220455789.c
extern int retval; int __attribute__ ((visibility ("protected"))) func1 (void) { return retval; }
the_stack_data/53020.c
#include <stdio.h> // http://homepages.dcc.ufmg.br/~lucasresenderc/pdf/RetasEmPosGeral.pdf int main() { int t, n; scanf("%d", &t); while (t) { scanf("%d", &n); printf("%d\n", (n*n+n+2)/2); t--; } return 0; }
the_stack_data/43886709.c
/* Nama : Zidan Rafindra Utomo NIM : 24060121130051 tgl pengerjaan: 3 april 2022 */ #include <stdio.h> int main(){ // kamus int N, i,sum; // Algoritma //input scanf("%d",&N); sum = 0; //proses for(i=0;i<=N;i++){ sum+=i; } printf("%d", sum); return 0; }
the_stack_data/225144063.c
// we have l<=i and i<=k // We want at the end, l<=k void main() { int i, j, k, l, m; int *p; m=10; if (l<=i && i<=k) { if (j==0) p = &i; else p = &j; //without points-to informaion, we lost everything //with points-to informaion, we have l<=k *p=10; return; } }
the_stack_data/145755.c
#include <stdio.h> #include <stdlib.h> int main(){ int vet[5] = {32, 19, 10, 1, 11}, indice; indice = vetMaiorIndice(vet); printf("\n\nIndice >>>>>> %i\n\n",indice); return 0; } int vetMaiorIndice(int vetor[]){ int i, x=0, maior; maior = vetor[x]; for(i = 0; i < 5; i++){ if(maior < vetor[i]){ maior = vetor[i]; x = i; } } return x; }
the_stack_data/67324339.c
/* * Copyright (c) 2015 Wind River Systems, Inc. * * SPDX-License-Identifier: Apache-2.0 */ /* * @file * @brief Execute initialization routines referenced in .init_array section */ typedef void (*func_ptr)(void); extern func_ptr __init_array_start[]; extern func_ptr __init_array_end[]; /** * @brief Execute initialization routines referenced in .init_array section * * @return N/A */ void __do_init_array_aux(void) { for (func_ptr *func = __init_array_start; func < __init_array_end; func++) { (*func)(); } }
the_stack_data/117329230.c
// // t2.c // week_1 // // Created by Nguyen Le Khanh Ngoc on 03/09/2020. // Copyright © 2020 Nguyen Le Khanh Ngoc. All rights reserved. // #include <stdio.h> int main(){ int i = 111; puts(i); return 0; }
the_stack_data/26700743.c
/* $OpenBSD: s_cacoshf.c,v 1.1 2008/09/07 20:36:09 martynas Exp $ */ /* * Copyright (c) 2008 Stephen L. Moshier <[email protected]> * * 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. */ /* cacoshf * * Complex inverse hyperbolic cosine * * * * SYNOPSIS: * * float complex cacoshf(); * float complex z, w; * * w = cacoshf (z); * * * * DESCRIPTION: * * acosh z = i acos z . * * ACCURACY: * * Relative error: * arithmetic domain # trials peak rms * IEEE -10,+10 30000 1.6e-14 2.1e-15 * */ #include <complex.h> #include <math.h> float complex cacoshf(float complex z) { float complex w; w = I * cacosf (z); return (w); }
the_stack_data/165766711.c
#include<stdio.h> #include<stdatomic.h> #include<pthread.h> _Atomic int acnt; void *adding(void *input) { acnt++; pthread_exit(NULL); } int main() { pthread_t tid[10]; for(int i=0; i<10; i++) pthread_create(&tid[i],NULL,adding,NULL); for(int i=0; i<10; i++) pthread_join(tid[i],NULL); printf("the value of cnt is %d\n", acnt); return 0; }
the_stack_data/57949152.c
#include <stdio.h> void swap(int*, int*); void main() { int a, b; printf("Enter any two numbers: "); scanf("%d %d", &a, &b); printf("\nValue before swap, a: %d, b: %d", a, b); swap(&a, &b); printf("\nValue after swap, a: %d, b: %d", a, b); } void swap(int *a, int *b) { int temp = *a; *a = *b; *b = temp; }
the_stack_data/231392857.c
#include <stdio.h> #include <string.h> //Fucntion to check the string and return the final height char checkUpDowns (char elev[], int height) { int ctrUp, ctrDown = 0; // length of the string of the trail entered by the user int elevLength = strlen(elev); // printf("%d\n", elevLength - 1); // looping over the trail string and checking for 'up' and 'down' for (int i = 0 ; i < elevLength - 1 ; i++) { //Checking for up substring and increasing the height by 5m if (elev[i] == 'u' && elev[i+1] == 'p') { ctrUp++; height += 5; } //Checking for down substring and decreasing the height by -5m if (elev[i] == 'd' && elev[i+1] == 'o' && elev[i+2] == 'w' && elev[i+3] == 'n') { ctrDown++; height -= 5; } } // printf("Up Counter: %d\n", ctrUp); // printf("Down Counter: %d\n", ctrDown); //Printing the final height printf("Final Height: %d%c\n", height, 'm' ); return 1; } int main(int x){ char elev[100];//The trail fgets(elev, 100, stdin); int h = 0; //The current height //Function that takes the trail string and returns the final height checkUpDowns(elev, h); //No need to the below statement here // printf("%d\n", h); //printf("%s", elev); return 0; }
the_stack_data/70449455.c
void dtrsv(const int M,const int N,const double alpha,const double *A,const int lda, double *X,const int incX,const double beta,const double *Y,const int incY) { int i,j; /*@; BEGIN(nest1=MM_pat[type="double"]) @*/ for (i = 0; i < M; i += 1) { for (j = 0; j < i; j += 1) { X[i] -= A[j*lda+i] * Y[j]; } X[i] = Y[i] / A[i*lda+i]; } }
the_stack_data/165767499.c
int NameConflictTest1() { return 0; }
the_stack_data/9511446.c
// Make sure that preconditions do not core dump when an init // returning function does not return anything... but the returned // value is used. Undefined value for the C standard int empty02() { } int caller() { int i, j; for(i=0; i<10;i++) j += empty02(); return j; }
the_stack_data/48574894.c
#include <stdio.h> #include <string.h> /* reverse: reverse strings in place */ void reverse( char s[] ) { int c, i, j; for( i = 0, j = strlen(s) - 1; i < j; i++, j-- ) { c = s[i]; s[i] = s[j]; s[j] = c; } } /* itoa: n to characters in s */ void my_itoa( int n, char s[] ) { int i, sign; if (( sign = n ) < 0 ) n = -n; i=0; do { s[i++] = n % 10 + '0'; } while (( n /= 10 ) > 0); if( sign < 0 ) s[i++] = '-'; s[i] = '\0'; printf( "%s\n" , s ); reverse(s); }
the_stack_data/51699788.c
#include <stdio.h> #include <math.h> int main(){ int number, x, i, prev, flag; flag = 1; printf("Enter number of elements: "); scanf("%d", &number); for (i=0; i < number; i++){ scanf("%d", &x); if (x < prev && i != 0){ flag = 0; } prev = x; } if (flag == 1) { printf("It is increasing\n"); } else printf("It is not increasing\n"); return 0; }
the_stack_data/159514957.c
// 不是我写的代码,但当时没记录出处。至少23!的计算结果与百度一致。 // 如果直接循环乘,用double只能坚持到21,从22开始就会开始进行舍入;long double能坚持到22,但23位时不精确的部分会发生奇怪的变化 #include <stdio.h> #include <stdlib.h> int main(void) { int Data[40] = {1, 1}; /*Store the 40 bit data*/ int Digit = 1; int N; scanf("%d", &N); for (int i = 1; i <= N; i++) { for (int j = 1; j <= Digit; j++) Data[j] *= i; for (int j = 1; j <= Digit; j++) if (Data[j] > 10) for (int r = 1; r <= Digit; r++) { if (Data[Digit] > 10) Digit++; Data[r + 1] += Data[r] / 10; Data[r] = Data[r] % 10; } printf("%d!=", i); for (int k = Digit; k > 0; k--) printf("%d", Data[k]); printf("\n"); } } /* 输出: 1!=1 2!=2 3!=6 4!=24 5!=120 */
the_stack_data/154587.c
/* * --INFO-- * Address: ........ * Size: 00000C */ void OSGetPhysicalMemSize(void) { // UNUSED FUNCTION } /* * --INFO-- * Address: ........ * Size: 00000C */ void OSGetConsoleSimulatedMemSize(void) { // UNUSED FUNCTION } /* * --INFO-- * Address: 800EF794 * Size: 00003C */ void OnReset(void) { /* .loc_0x0: mflr r0 cmpwi r3, 0 stw r0, 0x4(r1) stwu r1, -0x8(r1) beq- .loc_0x28 lis r3, 0xCC00 li r0, 0xFF sth r0, 0x4010(r3) lis r3, 0xF000 bl -0x7B8 .loc_0x28: li r3, 0x1 lwz r0, 0xC(r1) addi r1, r1, 0x8 mtlr r0 blr */ } /* * --INFO-- * Address: 800EF7D0 * Size: 00006C */ void MEMIntrruptHandler(void) { /* .loc_0x0: mflr r0 lis r3, 0xCC00 stw r0, 0x4(r1) addi r8, r3, 0x4000 li r0, 0 stwu r1, -0x8(r1) lhz r7, 0x4024(r3) lis r3, 0x804F lhz r6, 0x22(r8) addi r3, r3, 0x6670 lhz r5, 0x1E(r8) rlwimi r6,r7,16,6,15 sth r0, 0x20(r8) lwz r12, 0x3C(r3) cmplwi r12, 0 beq- .loc_0x54 mtlr r12 li r3, 0xF crclr 6, 0x6 blrl b .loc_0x5C .loc_0x54: li r3, 0xF bl -0x1D78 .loc_0x5C: lwz r0, 0xC(r1) addi r1, r1, 0x8 mtlr r0 blr */ } /* * --INFO-- * Address: 800EF83C * Size: 0000C4 */ void OSProtectRange(void) { /* .loc_0x0: mflr r0 stw r0, 0x4(r1) stwu r1, -0x30(r1) stmw r26, 0x18(r1) addi r26, r3, 0 cmplwi r26, 0x4 bge- .loc_0xB0 add r3, r4, r5 addi r0, r3, 0x3FF rlwinm r27,r4,0,0,21 rlwinm r29,r0,0,0,21 addi r3, r27, 0 rlwinm r31,r6,0,30,31 sub r4, r29, r27 bl -0x315C bl -0xC40 lis r0, 0x8000 srw r30, r0, r26 addi r28, r3, 0 addi r3, r30, 0 bl -0x88C lis r3, 0xCC00 addi r5, r3, 0x4000 rlwinm r3,r26,2,0,29 rlwinm r0,r27,22,16,31 sthx r0, r5, r3 rlwinm r4,r29,22,16,31 add r3, r5, r3 sth r4, 0x2(r3) addi r4, r5, 0x10 rlwinm r6,r26,1,0,30 li r0, 0x3 lhz r5, 0x10(r5) slw r3, r0, r6 slw r0, r31, r6 andc r5, r5, r3 or r5, r5, r0 cmplwi r31, 0x3 sth r5, 0x0(r4) beq- .loc_0xA8 mr r3, r30 bl -0x858 .loc_0xA8: mr r3, r28 bl -0xC88 .loc_0xB0: lmw r26, 0x18(r1) lwz r0, 0x34(r1) addi r1, r1, 0x30 mtlr r0 blr */ } /* * --INFO-- * Address: 800EF900 * Size: 000080 */ void Config24MB(void) { /* .loc_0x0: li r7, 0 lis r4, 0 addi r4, r4, 0x2 lis r3, 0x8000 addi r3, r3, 0x1FF lis r6, 0x100 addi r6, r6, 0x2 lis r5, 0x8100 addi r5, r5, 0xFF isync mtdbatu 0, r7 mtdbatl 0, r4 mtdbatu 0, r3 isync mtibatu 0, r7 mtibatl 0, r4 mtibatu 0, r3 isync mtdbatu 2, r7 mtdbatl 2, r6 mtdbatu 2, r5 isync mtibatu 2, r7 mtibatl 2, r6 mtibatu 2, r5 isync mfmsr r3 ori r3, r3, 0x30 mtsrr1 r3 mflr r3 mtsrr0 r3 rfi */ } /* * --INFO-- * Address: 800EF980 * Size: 000080 */ void Config48MB(void) { /* .loc_0x0: li r7, 0 lis r4, 0 addi r4, r4, 0x2 lis r3, 0x8000 addi r3, r3, 0x3FF lis r6, 0x200 addi r6, r6, 0x2 lis r5, 0x8200 addi r5, r5, 0x1FF isync mtdbatu 0, r7 mtdbatl 0, r4 mtdbatu 0, r3 isync mtibatu 0, r7 mtibatl 0, r4 mtibatu 0, r3 isync mtdbatu 2, r7 mtdbatl 2, r6 mtdbatu 2, r5 isync mtibatu 2, r7 mtibatl 2, r6 mtibatu 2, r5 isync mfmsr r3 ori r3, r3, 0x30 mtsrr1 r3 mflr r3 mtsrr0 r3 rfi */ } /* * --INFO-- * Address: 800EFA00 * Size: 000018 */ void RealMode(void) { /* .loc_0x0: rlwinm r3,r3,0,2,31 mtsrr0 r3 mfmsr r3 rlwinm r3,r3,0,28,25 mtsrr1 r3 rfi */ } /* * --INFO-- * Address: 800EFA18 * Size: 000118 */ void __OSInitMemoryProtection(void) { /* .loc_0x0: mflr r0 stw r0, 0x4(r1) stwu r1, -0x50(r1) stmw r27, 0x3C(r1) lis r27, 0x8000 lwz r31, 0xF0(r27) bl -0xDF8 lis r4, 0xCC00 addi r28, r4, 0x4000 li r0, 0 sth r0, 0x20(r28) li r0, 0xFF mr r30, r3 sth r0, 0x10(r28) lis r3, 0xF000 bl -0xA54 lis r3, 0x800F subi r29, r3, 0x830 mr r4, r29 li r3, 0 bl -0xDE4 mr r4, r29 li r3, 0x1 bl -0xDF0 mr r4, r29 li r3, 0x2 bl -0xDFC mr r4, r29 li r3, 0x3 bl -0xE08 mr r4, r29 li r3, 0x4 bl -0xE14 lis r3, 0x804B subi r3, r3, 0x6210 bl 0x800 lwz r3, 0xF0(r27) lwz r0, 0x28(r27) cmplw r3, r0 bge- .loc_0xC0 subis r0, r3, 0x180 cmplwi r0, 0 bne- .loc_0xC0 lis r3, 0x8180 lis r4, 0x180 bl -0x33E0 li r0, 0x2 sth r0, 0x28(r28) .loc_0xC0: lis r0, 0x180 cmplw r31, r0 bgt- .loc_0xDC lis r3, 0x800F subi r3, r3, 0x700 bl -0xEC b .loc_0xF4 .loc_0xDC: lis r0, 0x300 cmplw r31, r0 bgt- .loc_0xF4 lis r3, 0x800F subi r3, r3, 0x680 bl -0x108 .loc_0xF4: lis r3, 0x800 bl -0xA88 mr r3, r30 bl -0xEB8 lmw r27, 0x3C(r1) lwz r0, 0x54(r1) addi r1, r1, 0x50 mtlr r0 blr */ }
the_stack_data/4131.c
#include <stdio.h> int main() { int a; int p; int t; a = 1; p = 0; t = 0; do { printf("%d\n", a); t = a; a = t + p; p = t; } while (a < 100); return 0; }
the_stack_data/68886732.c
/* Copyright (c) 2017, Piotr Durlej * 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. * * 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. */ #include <signal.h> #include <unistd.h> #include <errno.h> int raise(int sig) { return kill(getpid(), sig); }
the_stack_data/97011939.c
#include <stdio.h> //#define float_print(x) printf("%f\n", x) int main() { // float a = (((2.0/3.96)*(9.64/5.62))/((9.68*6.87)*(7.78*1.62))); // float_print( a ); // puts("expected 0.0010335912454337171 "); // float d = (((5.84/7.38)*(2.28/4.33))-((4.91/1.27)*(7.36+3.72))); // float_print( d ); // puts("expected -42.42016964490716 "); // float g = (((3.25*2.05)+(7.62*2.5))+((5.66+0.63)-(6.66*9.67))); // float_print( g ); // puts("expected -32.39970000000001 "); // float j = (((3.25/1.4)/(0.47*9.79))/(3.89+(5.51*5.23))); // float_print( j ); // puts("expected 0.015425174335384179 "); // float m = (((6.14/0.46)/1.13)*((2.21/3.52)-(0.43*1.4))); // float_print( m ); // puts("expected 0.305238903074609 "); // float p = (3.31-(4.97*(2.22/5.09))); // float_print( p ); // puts("expected 1.142337917485265 "); // float s = (((9.55+0.58)*(8.63*3.52))/((9.79/3.59)*(4.66-3.93))); // float_print( s ); // puts("expected 154.57946547637377 "); // float v = (((2.3/4.1)*(1.69*1.98))+((7.16/6.97)/9.18)); // float_print( v ); // puts("expected 1.9890385117668943 "); // float y = (((2.4-4.77)*(8.93/4.01))*((2.89-6.02)+(3.52/1.75))); // float_print( y ); // puts("expected 5.903630317064477 "); int i; int mul = 1; float ans = 0; for (i = 1; i <= 10; i++) { ans += 1.0/mul; mul *= i; } float_print(ans); }
the_stack_data/72013065.c
#if LAB >= 4 /* * Directory walking and scanning for the PIOS user-space file system. * * Copyright (C) 2010 Yale University. * See section "MIT License" in the file LICENSES for licensing terms. * * Primary author: Bryan Ford */ #include <inc/file.h> #include <inc/stat.h> #include <inc/errno.h> #include <inc/string.h> #include <inc/assert.h> #include <inc/dirent.h> int dir_walk(const char *path, mode_t createmode) { assert(path != 0 && *path != 0); // Start at the current or root directory as appropriate int dino = files->cwd; if (*path == '/') { dino = FILEINO_ROOTDIR; do { path++; } while (*path == '/'); // skip leading slashes if (*path == 0) return dino; // Just looking up root directory } // Search for the appropriate entry in this directory searchdir: assert(fileino_isdir(dino)); assert(fileino_isdir(files->fi[dino].dino)); // Look for a regular directory entry with a matching name. int ino, len; for (ino = 1; ino < FILE_INODES; ino++) { if (!fileino_alloced(ino) || files->fi[ino].dino != dino) continue; // not an entry in directory 'dino' // Does this inode's name match our next path component? len = strlen(files->fi[ino].de.d_name); if (memcmp(path, files->fi[ino].de.d_name, len) != 0) continue; // no match found: if (path[len] == 0) { // Exact match at end of path - but does it exist? if (fileino_exists(ino)) return ino; // yes - return it // no - existed, but was deleted. re-create? if (!createmode) { errno = ENOENT; return -1; } files->fi[ino].ver++; // an exclusive change files->fi[ino].mode = createmode; files->fi[ino].size = 0; return ino; } if (path[len] != '/') continue; // no match // Make sure this dirent refers to a directory if (!fileino_isdir(ino)) { errno = ENOTDIR; return -1; } // Skip slashes to find next component do { len++; } while (path[len] == '/'); if (path[len] == 0) return ino; // matched directory at end of path // Walk the next directory in the path dino = ino; path += len; goto searchdir; } // Looking for one of the special entries '.' or '..'? if (path[0] == '.' && (path[1] == 0 || path[1] == '/')) { len = 1; ino = dino; // just leads to this same directory goto found; } if (path[0] == '.' && path[1] == '.' && (path[2] == 0 || path[2] == '/')) { len = 2; ino = files->fi[dino].dino; // leads to root directory goto found; } // Path component not found - see if we should create it if (!createmode || strchr(path, '/') != NULL) { errno = ENOENT; return -1; } if (strlen(path) > NAME_MAX) { errno = ENAMETOOLONG; return -1; } // Allocate a new inode and create this entry with the given mode. ino = fileino_alloc(); if (ino < 0) return -1; assert(fileino_isvalid(ino) && !fileino_alloced(ino)); strcpy(files->fi[ino].de.d_name, path); files->fi[ino].dino = dino; files->fi[ino].ver = 0; files->fi[ino].mode = createmode; files->fi[ino].size = 0; return ino; } // Open a directory for scanning. // For simplicity, DIR is simply a filedesc like other file descriptors, // except we interpret fd->ofs as an inode number for scanning, // instead of as a byte offset as in a regular file. DIR *opendir(const char *path) { filedesc *fd = filedesc_open(NULL, path, O_RDONLY, 0); if (fd == NULL) return NULL; // Make sure it's a directory assert(fileino_exists(fd->ino)); fileinode *fi = &files->fi[fd->ino]; if (!S_ISDIR(fi->mode)) { filedesc_close(fd); errno = ENOTDIR; return NULL; } return fd; } int closedir(DIR *dir) { filedesc_close(dir); return 0; } // Scan an open directory filedesc and return the next entry. // Returns a pointer to the next matching file inode's 'dirent' struct, // or NULL if the directory being scanned contains no more entries. struct dirent *readdir(DIR *dir) { #if SOL >= 4 assert(filedesc_isopen(dir)); int ino; while ((ino = dir->ofs++) < FILE_INODES) { if (!fileino_exists(ino) || files->fi[ino].dino != dir->ino) continue; return &files->fi[ino].de; // Return inode's dirent } return NULL; // End of directory #else // ! SOL >= 4 // Lab 4: insert your directory scanning code here. // Hint: a fileinode's 'dino' field indicates // what directory the file is in; // this function shouldn't return entries from other directories! warn("readdir() not implemented"); return NULL; #endif // ! SOL >= 4 } void rewinddir(DIR *dir) { dir->ofs = 0; } void seekdir(DIR *dir, long ofs) { dir->ofs = ofs; } long telldir(DIR *dir) { return dir->ofs; } #if LAB >= 9 int rename(const char *oldpath, const char *newpath) { panic("rename() not implemented"); } int unlink(const char *path) { warn("unlink() not implemented"); errno = ENOSYS; return -1; } #endif #endif // LAB >= 4
the_stack_data/43888497.c
/* * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy * in the file LICENSE in the source distribution or at * https://www.openssl.org/source/license.html */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <limits.h> #include <openssl/crypto.h> void *CRYPTO_malloc(size_t num, const char *file, int line) { return malloc(num); } void *CRYPTO_zalloc(size_t num, const char *file, int line) { void *ret; ret = CRYPTO_malloc(num, file, line); if (ret != NULL) memset(ret, 0, num); return ret; } void *CRYPTO_realloc(void *str, size_t num, const char *file, int line) { return realloc(str, num); } void *CRYPTO_clear_realloc(void *str, size_t old_len, size_t num, const char *file, int line) { void *ret = NULL; if (str == NULL) return CRYPTO_malloc(num, file, line); if (num == 0) { CRYPTO_clear_free(str, old_len, file, line); return NULL; } /* Can't shrink the buffer since memcpy below copies |old_len| bytes. */ if (num < old_len) { OPENSSL_cleanse((char*)str + num, old_len - num); return str; } ret = CRYPTO_malloc(num, file, line); if (ret != NULL) { memcpy(ret, str, old_len); CRYPTO_clear_free(str, old_len, file, line); } return ret; } void CRYPTO_free(void *str, const char *file, int line) { free(str); } void CRYPTO_clear_free(void *str, size_t num, const char *file, int line) { if (str == NULL) return; if (num) OPENSSL_cleanse(str, num); CRYPTO_free(str, file, line); } void OPENSSL_cleanse(void* str, size_t num) { memset(str, 0, num); } char* CRYPTO_strdup(const char* str, const char* file, int line) { char* ret; if (str == NULL) return NULL; ret = CRYPTO_malloc(strlen(str) + 1, file, line); if (ret != NULL) strcpy(ret, str); return ret; } int OPENSSL_hexchar2int(unsigned char c) { #ifdef CHARSET_EBCDIC c = os_toebcdic[c]; #endif switch (c) { case '0': return 0; case '1': return 1; case '2': return 2; case '3': return 3; case '4': return 4; case '5': return 5; case '6': return 6; case '7': return 7; case '8': return 8; case '9': return 9; case 'a': case 'A': return 0x0A; case 'b': case 'B': return 0x0B; case 'c': case 'C': return 0x0C; case 'd': case 'D': return 0x0D; case 'e': case 'E': return 0x0E; case 'f': case 'F': return 0x0F; } return -1; }
the_stack_data/3262972.c
/* Sample UDP server */ #include <sys/socket.h> #include <netinet/in.h> #include <stdio.h> int main(int argc, char**argv) { int sockfd,n; struct sockaddr_in servaddr,cliaddr; socklen_t len; char mesg[1000]; int ct = 0; sockfd=socket(AF_INET,SOCK_DGRAM,0); bzero(&servaddr,sizeof(servaddr)); servaddr.sin_family = AF_INET; servaddr.sin_addr.s_addr=htonl(INADDR_ANY); servaddr.sin_port=htons(3200); bind(sockfd,(struct sockaddr *)&servaddr,sizeof(servaddr)); for (;;) { len = sizeof(cliaddr); n = recvfrom(sockfd,mesg,1000,0,(struct sockaddr *)&cliaddr,&len); printf("-------------------------------------------------------\n"); mesg[n] = 0; printf("Received the following:\n"); printf("%s\n",mesg); printf("-------------------------------------------------------\n"); /* -- This requires a valid UDP key before it can be enabled */ { char buf[10]; ct = sprintf(buf, "SET,UDP,,192.168.1.48,3200,EBE23F9E"); sendto(sockfd,buf,ct,0,(struct sockaddr *)&cliaddr,sizeof(cliaddr)); printf("Sending SET,UDP Command\n"); } } }
the_stack_data/118658.c
#include <stdio.h> #include <stdlib.h> struct Node { int element; struct Node *next; }; // Sentinel contains all functions to make a simple List, Queue or Stack struct Sentinel { struct Node *head; struct Node *tail; int length; void (*insert)(struct Sentinel *self, struct Node *t, struct Node *x); int (*del)(struct Sentinel *self, struct Node *x); struct Node *(*search)(struct Sentinel *self, int pos); void (*push)(struct Sentinel *self, struct Node *t); int (*pop)(struct Sentinel *self); void (*enqueue)(struct Sentinel *self, struct Node *t); int (*dequeue)(struct Sentinel *self); }; // Functions to create the structs and check for errors in malloc struct Sentinel *init(); void *ec_malloc(unsigned int); void free_struct(struct Sentinel *sentinel); struct Node *new_node(int element); void insert(struct Sentinel *self, struct Node *t, struct Node *x); int del(struct Sentinel *self, struct Node *x); struct Node *search(struct Sentinel *self, int pos); void push(struct Sentinel *self, struct Node *t); int pop(struct Sentinel *self); void enqueue(struct Sentinel *self, struct Node *t); int dequeue(struct Sentinel *self); // BFS Related Code void bfs(struct Sentinel **graph, int start); int visited[100]; int main() { // Create a dynamic array of lists with 100 elements struct Sentinel **graph = (struct Sentinel **) ec_malloc(sizeof(struct Sentinel *) * 100); // Initialize each list with 100 elements for (int i = 0; i < 100; i++) graph[i] = init(); // Read the amount of edges int edges; scanf("%d", &edges); for (int i = 0; i < edges; i++) { int u, v; scanf("%d%d", &u, &v); // Insert nodes in graph graph[u]->insert(graph[u], new_node(v), graph[u]->tail); } int start; scanf("%d", &start); bfs(graph, start); for (int i = 0; i < 100; i++) free_struct(graph[i]); return 0; } void bfs(struct Sentinel **graph, int start) { // Create queue and push start value struct Sentinel *queue = init(); queue->push(queue, new_node(start)); visited[start] = 1; // While queue is not empty, read the current node in queue and check its neighbors for unvisited nodes while (queue->length != 0) { int current = queue->pop(queue); printf("%d\n", current); for (int i = 0; i < graph[current]->length; i++) { struct Node *curNode = graph[current]->search(graph[current], i); if (curNode == NULL) continue; int cur = curNode->element; if (visited[cur] == 0) { queue->push(queue, new_node(cur)); visited[cur] = 1; } } } free_struct(queue); } void *ec_malloc(unsigned int size) { void *ptr = malloc(size); if (ptr == NULL) exit(-1); return ptr; } void free_struct(struct Sentinel *sentinel) { free(sentinel->head); free(sentinel->tail); free(sentinel); } struct Sentinel *init() { struct Sentinel *t = (struct Sentinel *) ec_malloc(sizeof(struct Sentinel)); t->head = (struct Node *) ec_malloc(sizeof(struct Node)); t->tail = (struct Node *) ec_malloc(sizeof(struct Node)); t->head->next = t->tail->next = NULL; t->length = 0; // Bind function pointers in struct to actual functions t->insert = insert; t->del = del; t->search = search; t->push = push; t->pop = pop; t->enqueue = enqueue; t->dequeue = dequeue; return t; } struct Node *new_node(int element) { struct Node *t = (struct Node *) ec_malloc(sizeof(struct Node)); t->element = element; t->next = NULL; return t; } void insert(struct Sentinel *self, struct Node *t, struct Node *x) { if (self->head->next == NULL) self->head->next = self->tail->next = t; else if (x == self->tail) { self->tail->next->next = t; self->tail->next = t; } else { t->next = x->next; x->next = t; } self->length++; } int del(struct Sentinel *self, struct Node *x) { struct Node *t; if (self->head->next == NULL || x->next == NULL) return 0; else { t = x->next; if (t->next == NULL) { self->tail->next = x; x->next = NULL; } else { x->next = t->next; } self->length--; } int value = t->element; free(t); return value; } struct Node *search(struct Sentinel *self, int pos) { int i = 0; struct Node *cur = self->head->next; if (cur == NULL) return NULL; while (i != pos && cur->next != NULL) { cur = cur->next; i++; } if (i == pos) return cur; else return NULL; } void push(struct Sentinel *self, struct Node *t) { self->insert(self, t, self->head); } int pop(struct Sentinel *self) { return self->del(self, self->head); } void enqueue(struct Sentinel *self, struct Node *t) { self->insert(self, t, self->tail); } int dequeue(struct Sentinel *self) { return self->del(self, self->head); }
the_stack_data/159516404.c
/* * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. * See the copyright notice in the ACK home directory, in the file "Copyright". */ /* $Header$ */ #include <stdlib.h> long labs(register long l) { return l >= 0 ? l : -l; }
the_stack_data/243892851.c
// MIT License // // Copyright (c) 2020 Nayar Systems // Copyright (c) 2020 Jacob Lambert // // 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. // // Original code taken from: https://github.com/jdlambert/micro_tz_db // which was forked from https://github.com/nayarsystems/posix_tz_db #include <stdio.h> typedef struct { const char *name; const char *posix_str; } esp_rmaker_tz_db_pair_t; static const esp_rmaker_tz_db_pair_t esp_rmaker_tz_db_tzs[] = { {"Africa/Abidjan", "GMT0"}, {"Africa/Accra", "GMT0"}, {"Africa/Addis_Ababa", "EAT-3"}, {"Africa/Algiers", "CET-1"}, {"Africa/Asmara", "EAT-3"}, {"Africa/Bamako", "GMT0"}, {"Africa/Bangui", "WAT-1"}, {"Africa/Banjul", "GMT0"}, {"Africa/Bissau", "GMT0"}, {"Africa/Blantyre", "CAT-2"}, {"Africa/Brazzaville", "WAT-1"}, {"Africa/Bujumbura", "CAT-2"}, {"Africa/Cairo", "EET-2"}, {"Africa/Casablanca", "<+01>-1"}, {"Africa/Ceuta", "CET-1CEST,M3.5.0,M10.5.0/3"}, {"Africa/Conakry", "GMT0"}, {"Africa/Dakar", "GMT0"}, {"Africa/Dar_es_Salaam", "EAT-3"}, {"Africa/Djibouti", "EAT-3"}, {"Africa/Douala", "WAT-1"}, {"Africa/El_Aaiun", "<+01>-1"}, {"Africa/Freetown", "GMT0"}, {"Africa/Gaborone", "CAT-2"}, {"Africa/Harare", "CAT-2"}, {"Africa/Johannesburg", "SAST-2"}, {"Africa/Juba", "EAT-3"}, {"Africa/Kampala", "EAT-3"}, {"Africa/Khartoum", "CAT-2"}, {"Africa/Kigali", "CAT-2"}, {"Africa/Kinshasa", "WAT-1"}, {"Africa/Lagos", "WAT-1"}, {"Africa/Libreville", "WAT-1"}, {"Africa/Lome", "GMT0"}, {"Africa/Luanda", "WAT-1"}, {"Africa/Lubumbashi", "CAT-2"}, {"Africa/Lusaka", "CAT-2"}, {"Africa/Malabo", "WAT-1"}, {"Africa/Maputo", "CAT-2"}, {"Africa/Maseru", "SAST-2"}, {"Africa/Mbabane", "SAST-2"}, {"Africa/Mogadishu", "EAT-3"}, {"Africa/Monrovia", "GMT0"}, {"Africa/Nairobi", "EAT-3"}, {"Africa/Ndjamena", "WAT-1"}, {"Africa/Niamey", "WAT-1"}, {"Africa/Nouakchott", "GMT0"}, {"Africa/Ouagadougou", "GMT0"}, {"Africa/Porto-Novo", "WAT-1"}, {"Africa/Sao_Tome", "GMT0"}, {"Africa/Tripoli", "EET-2"}, {"Africa/Tunis", "CET-1"}, {"Africa/Windhoek", "CAT-2"}, {"America/Adak", "HST10HDT,M3.2.0,M11.1.0"}, {"America/Anchorage", "AKST9AKDT,M3.2.0,M11.1.0"}, {"America/Anguilla", "AST4"}, {"America/Antigua", "AST4"}, {"America/Araguaina", "<-03>3"}, {"America/Argentina/Buenos_Aires", "<-03>3"}, {"America/Argentina/Catamarca", "<-03>3"}, {"America/Argentina/Cordoba", "<-03>3"}, {"America/Argentina/Jujuy", "<-03>3"}, {"America/Argentina/La_Rioja", "<-03>3"}, {"America/Argentina/Mendoza", "<-03>3"}, {"America/Argentina/Rio_Gallegos", "<-03>3"}, {"America/Argentina/Salta", "<-03>3"}, {"America/Argentina/San_Juan", "<-03>3"}, {"America/Argentina/San_Luis", "<-03>3"}, {"America/Argentina/Tucuman", "<-03>3"}, {"America/Argentina/Ushuaia", "<-03>3"}, {"America/Aruba", "AST4"}, {"America/Asuncion", "<-04>4<-03>,M10.1.0/0,M3.4.0/0"}, {"America/Atikokan", "EST5"}, {"America/Bahia", "<-03>3"}, {"America/Bahia_Banderas", "CST6CDT,M4.1.0,M10.5.0"}, {"America/Barbados", "AST4"}, {"America/Belem", "<-03>3"}, {"America/Belize", "CST6"}, {"America/Blanc-Sablon", "AST4"}, {"America/Boa_Vista", "<-04>4"}, {"America/Bogota", "<-05>5"}, {"America/Boise", "MST7MDT,M3.2.0,M11.1.0"}, {"America/Cambridge_Bay", "MST7MDT,M3.2.0,M11.1.0"}, {"America/Campo_Grande", "<-04>4"}, {"America/Cancun", "EST5"}, {"America/Caracas", "<-04>4"}, {"America/Cayenne", "<-03>3"}, {"America/Cayman", "EST5"}, {"America/Chicago", "CST6CDT,M3.2.0,M11.1.0"}, {"America/Chihuahua", "MST7MDT,M4.1.0,M10.5.0"}, {"America/Costa_Rica", "CST6"}, {"America/Creston", "MST7"}, {"America/Cuiaba", "<-04>4"}, {"America/Curacao", "AST4"}, {"America/Danmarkshavn", "GMT0"}, {"America/Dawson", "MST7"}, {"America/Dawson_Creek", "MST7"}, {"America/Denver", "MST7MDT,M3.2.0,M11.1.0"}, {"America/Detroit", "EST5EDT,M3.2.0,M11.1.0"}, {"America/Dominica", "AST4"}, {"America/Edmonton", "MST7MDT,M3.2.0,M11.1.0"}, {"America/Eirunepe", "<-05>5"}, {"America/El_Salvador", "CST6"}, {"America/Fortaleza", "<-03>3"}, {"America/Fort_Nelson", "MST7"}, {"America/Glace_Bay", "AST4ADT,M3.2.0,M11.1.0"}, {"America/Godthab", "<-03>3<-02>,M3.5.0/-2,M10.5.0/-1"}, {"America/Goose_Bay", "AST4ADT,M3.2.0,M11.1.0"}, {"America/Grand_Turk", "EST5EDT,M3.2.0,M11.1.0"}, {"America/Grenada", "AST4"}, {"America/Guadeloupe", "AST4"}, {"America/Guatemala", "CST6"}, {"America/Guayaquil", "<-05>5"}, {"America/Guyana", "<-04>4"}, {"America/Halifax", "AST4ADT,M3.2.0,M11.1.0"}, {"America/Havana", "CST5CDT,M3.2.0/0,M11.1.0/1"}, {"America/Hermosillo", "MST7"}, {"America/Indiana/Indianapolis", "EST5EDT,M3.2.0,M11.1.0"}, {"America/Indiana/Knox", "CST6CDT,M3.2.0,M11.1.0"}, {"America/Indiana/Marengo", "EST5EDT,M3.2.0,M11.1.0"}, {"America/Indiana/Petersburg", "EST5EDT,M3.2.0,M11.1.0"}, {"America/Indiana/Tell_City", "CST6CDT,M3.2.0,M11.1.0"}, {"America/Indiana/Vevay", "EST5EDT,M3.2.0,M11.1.0"}, {"America/Indiana/Vincennes", "EST5EDT,M3.2.0,M11.1.0"}, {"America/Indiana/Winamac", "EST5EDT,M3.2.0,M11.1.0"}, {"America/Inuvik", "MST7MDT,M3.2.0,M11.1.0"}, {"America/Iqaluit", "EST5EDT,M3.2.0,M11.1.0"}, {"America/Jamaica", "EST5"}, {"America/Juneau", "AKST9AKDT,M3.2.0,M11.1.0"}, {"America/Kentucky/Louisville", "EST5EDT,M3.2.0,M11.1.0"}, {"America/Kentucky/Monticello", "EST5EDT,M3.2.0,M11.1.0"}, {"America/Kralendijk", "AST4"}, {"America/La_Paz", "<-04>4"}, {"America/Lima", "<-05>5"}, {"America/Los_Angeles", "PST8PDT,M3.2.0,M11.1.0"}, {"America/Lower_Princes", "AST4"}, {"America/Maceio", "<-03>3"}, {"America/Managua", "CST6"}, {"America/Manaus", "<-04>4"}, {"America/Marigot", "AST4"}, {"America/Martinique", "AST4"}, {"America/Matamoros", "CST6CDT,M3.2.0,M11.1.0"}, {"America/Mazatlan", "MST7MDT,M4.1.0,M10.5.0"}, {"America/Menominee", "CST6CDT,M3.2.0,M11.1.0"}, {"America/Merida", "CST6CDT,M4.1.0,M10.5.0"}, {"America/Metlakatla", "AKST9AKDT,M3.2.0,M11.1.0"}, {"America/Mexico_City", "CST6CDT,M4.1.0,M10.5.0"}, {"America/Miquelon", "<-03>3<-02>,M3.2.0,M11.1.0"}, {"America/Moncton", "AST4ADT,M3.2.0,M11.1.0"}, {"America/Monterrey", "CST6CDT,M4.1.0,M10.5.0"}, {"America/Montevideo", "<-03>3"}, {"America/Montreal", "EST5EDT,M3.2.0,M11.1.0"}, {"America/Montserrat", "AST4"}, {"America/Nassau", "EST5EDT,M3.2.0,M11.1.0"}, {"America/New_York", "EST5EDT,M3.2.0,M11.1.0"}, {"America/Nipigon", "EST5EDT,M3.2.0,M11.1.0"}, {"America/Nome", "AKST9AKDT,M3.2.0,M11.1.0"}, {"America/Noronha", "<-02>2"}, {"America/North_Dakota/Beulah", "CST6CDT,M3.2.0,M11.1.0"}, {"America/North_Dakota/Center", "CST6CDT,M3.2.0,M11.1.0"}, {"America/North_Dakota/New_Salem", "CST6CDT,M3.2.0,M11.1.0"}, {"America/Ojinaga", "MST7MDT,M3.2.0,M11.1.0"}, {"America/Panama", "EST5"}, {"America/Pangnirtung", "EST5EDT,M3.2.0,M11.1.0"}, {"America/Paramaribo", "<-03>3"}, {"America/Phoenix", "MST7"}, {"America/Port-au-Prince", "EST5EDT,M3.2.0,M11.1.0"}, {"America/Port_of_Spain", "AST4"}, {"America/Porto_Velho", "<-04>4"}, {"America/Puerto_Rico", "AST4"}, {"America/Punta_Arenas", "<-03>3"}, {"America/Rainy_River", "CST6CDT,M3.2.0,M11.1.0"}, {"America/Rankin_Inlet", "CST6CDT,M3.2.0,M11.1.0"}, {"America/Recife", "<-03>3"}, {"America/Regina", "CST6"}, {"America/Resolute", "CST6CDT,M3.2.0,M11.1.0"}, {"America/Rio_Branco", "<-05>5"}, {"America/Santarem", "<-03>3"}, {"America/Santiago", "<-04>4<-03>,M9.1.6/24,M4.1.6/24"}, {"America/Santo_Domingo", "AST4"}, {"America/Sao_Paulo", "<-03>3"}, {"America/Scoresbysund", "<-01>1<+00>,M3.5.0/0,M10.5.0/1"}, {"America/Sitka", "AKST9AKDT,M3.2.0,M11.1.0"}, {"America/St_Barthelemy", "AST4"}, {"America/St_Johns", "NST3:30NDT,M3.2.0,M11.1.0"}, {"America/St_Kitts", "AST4"}, {"America/St_Lucia", "AST4"}, {"America/St_Thomas", "AST4"}, {"America/St_Vincent", "AST4"}, {"America/Swift_Current", "CST6"}, {"America/Tegucigalpa", "CST6"}, {"America/Thule", "AST4ADT,M3.2.0,M11.1.0"}, {"America/Thunder_Bay", "EST5EDT,M3.2.0,M11.1.0"}, {"America/Tijuana", "PST8PDT,M3.2.0,M11.1.0"}, {"America/Toronto", "EST5EDT,M3.2.0,M11.1.0"}, {"America/Tortola", "AST4"}, {"America/Vancouver", "PST8PDT,M3.2.0,M11.1.0"}, {"America/Whitehorse", "MST7"}, {"America/Winnipeg", "CST6CDT,M3.2.0,M11.1.0"}, {"America/Yakutat", "AKST9AKDT,M3.2.0,M11.1.0"}, {"America/Yellowknife", "MST7MDT,M3.2.0,M11.1.0"}, {"Antarctica/Casey", "<+08>-8"}, {"Antarctica/Davis", "<+07>-7"}, {"Antarctica/DumontDUrville", "<+10>-10"}, {"Antarctica/Macquarie", "<+11>-11"}, {"Antarctica/Mawson", "<+05>-5"}, {"Antarctica/McMurdo", "NZST-12NZDT,M9.5.0,M4.1.0/3"}, {"Antarctica/Palmer", "<-03>3"}, {"Antarctica/Rothera", "<-03>3"}, {"Antarctica/Syowa", "<+03>-3"}, {"Antarctica/Troll", "<+00>0<+02>-2,M3.5.0/1,M10.5.0/3"}, {"Antarctica/Vostok", "<+06>-6"}, {"Arctic/Longyearbyen", "CET-1CEST,M3.5.0,M10.5.0/3"}, {"Asia/Aden", "<+03>-3"}, {"Asia/Almaty", "<+06>-6"}, {"Asia/Amman", "EET-2EEST,M3.5.4/24,M10.5.5/1"}, {"Asia/Anadyr", "<+12>-12"}, {"Asia/Aqtau", "<+05>-5"}, {"Asia/Aqtobe", "<+05>-5"}, {"Asia/Ashgabat", "<+05>-5"}, {"Asia/Atyrau", "<+05>-5"}, {"Asia/Baghdad", "<+03>-3"}, {"Asia/Bahrain", "<+03>-3"}, {"Asia/Baku", "<+04>-4"}, {"Asia/Bangkok", "<+07>-7"}, {"Asia/Barnaul", "<+07>-7"}, {"Asia/Beirut", "EET-2EEST,M3.5.0/0,M10.5.0/0"}, {"Asia/Bishkek", "<+06>-6"}, {"Asia/Brunei", "<+08>-8"}, {"Asia/Chita", "<+09>-9"}, {"Asia/Choibalsan", "<+08>-8"}, {"Asia/Colombo", "<+0530>-5:30"}, {"Asia/Damascus", "EET-2EEST,M3.5.5/0,M10.5.5/0"}, {"Asia/Dhaka", "<+06>-6"}, {"Asia/Dili", "<+09>-9"}, {"Asia/Dubai", "<+04>-4"}, {"Asia/Dushanbe", "<+05>-5"}, {"Asia/Famagusta", "EET-2EEST,M3.5.0/3,M10.5.0/4"}, {"Asia/Gaza", "EET-2EEST,M3.5.5/0,M10.5.6/1"}, {"Asia/Hebron", "EET-2EEST,M3.5.5/0,M10.5.6/1"}, {"Asia/Ho_Chi_Minh", "<+07>-7"}, {"Asia/Hong_Kong", "HKT-8"}, {"Asia/Hovd", "<+07>-7"}, {"Asia/Irkutsk", "<+08>-8"}, {"Asia/Jakarta", "WIB-7"}, {"Asia/Jayapura", "WIT-9"}, {"Asia/Jerusalem", "IST-2IDT,M3.4.4/26,M10.5.0"}, {"Asia/Kabul", "<+0430>-4:30"}, {"Asia/Kamchatka", "<+12>-12"}, {"Asia/Karachi", "PKT-5"}, {"Asia/Kathmandu", "<+0545>-5:45"}, {"Asia/Khandyga", "<+09>-9"}, {"Asia/Kolkata", "IST-5:30"}, {"Asia/Krasnoyarsk", "<+07>-7"}, {"Asia/Kuala_Lumpur", "<+08>-8"}, {"Asia/Kuching", "<+08>-8"}, {"Asia/Kuwait", "<+03>-3"}, {"Asia/Macau", "CST-8"}, {"Asia/Magadan", "<+11>-11"}, {"Asia/Makassar", "WITA-8"}, {"Asia/Manila", "PST-8"}, {"Asia/Muscat", "<+04>-4"}, {"Asia/Nicosia", "EET-2EEST,M3.5.0/3,M10.5.0/4"}, {"Asia/Novokuznetsk", "<+07>-7"}, {"Asia/Novosibirsk", "<+07>-7"}, {"Asia/Omsk", "<+06>-6"}, {"Asia/Oral", "<+05>-5"}, {"Asia/Phnom_Penh", "<+07>-7"}, {"Asia/Pontianak", "WIB-7"}, {"Asia/Pyongyang", "KST-9"}, {"Asia/Qatar", "<+03>-3"}, {"Asia/Qyzylorda", "<+05>-5"}, {"Asia/Riyadh", "<+03>-3"}, {"Asia/Sakhalin", "<+11>-11"}, {"Asia/Samarkand", "<+05>-5"}, {"Asia/Seoul", "KST-9"}, {"Asia/Shanghai", "CST-8"}, {"Asia/Singapore", "<+08>-8"}, {"Asia/Srednekolymsk", "<+11>-11"}, {"Asia/Taipei", "CST-8"}, {"Asia/Tashkent", "<+05>-5"}, {"Asia/Tbilisi", "<+04>-4"}, {"Asia/Tehran", "<+0330>-3:30<+0430>,J79/24,J263/24"}, {"Asia/Thimphu", "<+06>-6"}, {"Asia/Tokyo", "JST-9"}, {"Asia/Tomsk", "<+07>-7"}, {"Asia/Ulaanbaatar", "<+08>-8"}, {"Asia/Urumqi", "<+06>-6"}, {"Asia/Ust-Nera", "<+10>-10"}, {"Asia/Vientiane", "<+07>-7"}, {"Asia/Vladivostok", "<+10>-10"}, {"Asia/Yakutsk", "<+09>-9"}, {"Asia/Yangon", "<+0630>-6:30"}, {"Asia/Yekaterinburg", "<+05>-5"}, {"Asia/Yerevan", "<+04>-4"}, {"Atlantic/Azores", "<-01>1<+00>,M3.5.0/0,M10.5.0/1"}, {"Atlantic/Bermuda", "AST4ADT,M3.2.0,M11.1.0"}, {"Atlantic/Canary", "WET0WEST,M3.5.0/1,M10.5.0"}, {"Atlantic/Cape_Verde", "<-01>1"}, {"Atlantic/Faroe", "WET0WEST,M3.5.0/1,M10.5.0"}, {"Atlantic/Madeira", "WET0WEST,M3.5.0/1,M10.5.0"}, {"Atlantic/Reykjavik", "GMT0"}, {"Atlantic/South_Georgia", "<-02>2"}, {"Atlantic/Stanley", "<-03>3"}, {"Atlantic/St_Helena", "GMT0"}, {"Australia/Adelaide", "ACST-9:30ACDT,M10.1.0,M4.1.0/3"}, {"Australia/Brisbane", "AEST-10"}, {"Australia/Broken_Hill", "ACST-9:30ACDT,M10.1.0,M4.1.0/3"}, {"Australia/Currie", "AEST-10AEDT,M10.1.0,M4.1.0/3"}, {"Australia/Darwin", "ACST-9:30"}, {"Australia/Eucla", "<+0845>-8:45"}, {"Australia/Hobart", "AEST-10AEDT,M10.1.0,M4.1.0/3"}, {"Australia/Lindeman", "AEST-10"}, {"Australia/Lord_Howe", "<+1030>-10:30<+11>-11,M10.1.0,M4.1.0"}, {"Australia/Melbourne", "AEST-10AEDT,M10.1.0,M4.1.0/3"}, {"Australia/Perth", "AWST-8"}, {"Australia/Sydney", "AEST-10AEDT,M10.1.0,M4.1.0/3"}, {"Europe/Amsterdam", "CET-1CEST,M3.5.0,M10.5.0/3"}, {"Europe/Andorra", "CET-1CEST,M3.5.0,M10.5.0/3"}, {"Europe/Astrakhan", "<+04>-4"}, {"Europe/Athens", "EET-2EEST,M3.5.0/3,M10.5.0/4"}, {"Europe/Belgrade", "CET-1CEST,M3.5.0,M10.5.0/3"}, {"Europe/Berlin", "CET-1CEST,M3.5.0,M10.5.0/3"}, {"Europe/Bratislava", "CET-1CEST,M3.5.0,M10.5.0/3"}, {"Europe/Brussels", "CET-1CEST,M3.5.0,M10.5.0/3"}, {"Europe/Bucharest", "EET-2EEST,M3.5.0/3,M10.5.0/4"}, {"Europe/Budapest", "CET-1CEST,M3.5.0,M10.5.0/3"}, {"Europe/Busingen", "CET-1CEST,M3.5.0,M10.5.0/3"}, {"Europe/Chisinau", "EET-2EEST,M3.5.0,M10.5.0/3"}, {"Europe/Copenhagen", "CET-1CEST,M3.5.0,M10.5.0/3"}, {"Europe/Dublin", "IST-1GMT0,M10.5.0,M3.5.0/1"}, {"Europe/Gibraltar", "CET-1CEST,M3.5.0,M10.5.0/3"}, {"Europe/Guernsey", "GMT0BST,M3.5.0/1,M10.5.0"}, {"Europe/Helsinki", "EET-2EEST,M3.5.0/3,M10.5.0/4"}, {"Europe/Isle_of_Man", "GMT0BST,M3.5.0/1,M10.5.0"}, {"Europe/Istanbul", "<+03>-3"}, {"Europe/Jersey", "GMT0BST,M3.5.0/1,M10.5.0"}, {"Europe/Kaliningrad", "EET-2"}, {"Europe/Kiev", "EET-2EEST,M3.5.0/3,M10.5.0/4"}, {"Europe/Kirov", "<+03>-3"}, {"Europe/Lisbon", "WET0WEST,M3.5.0/1,M10.5.0"}, {"Europe/Ljubljana", "CET-1CEST,M3.5.0,M10.5.0/3"}, {"Europe/London", "GMT0BST,M3.5.0/1,M10.5.0"}, {"Europe/Luxembourg", "CET-1CEST,M3.5.0,M10.5.0/3"}, {"Europe/Madrid", "CET-1CEST,M3.5.0,M10.5.0/3"}, {"Europe/Malta", "CET-1CEST,M3.5.0,M10.5.0/3"}, {"Europe/Mariehamn", "EET-2EEST,M3.5.0/3,M10.5.0/4"}, {"Europe/Minsk", "<+03>-3"}, {"Europe/Monaco", "CET-1CEST,M3.5.0,M10.5.0/3"}, {"Europe/Moscow", "MSK-3"}, {"Europe/Oslo", "CET-1CEST,M3.5.0,M10.5.0/3"}, {"Europe/Paris", "CET-1CEST,M3.5.0,M10.5.0/3"}, {"Europe/Podgorica", "CET-1CEST,M3.5.0,M10.5.0/3"}, {"Europe/Prague", "CET-1CEST,M3.5.0,M10.5.0/3"}, {"Europe/Riga", "EET-2EEST,M3.5.0/3,M10.5.0/4"}, {"Europe/Rome", "CET-1CEST,M3.5.0,M10.5.0/3"}, {"Europe/Samara", "<+04>-4"}, {"Europe/San_Marino", "CET-1CEST,M3.5.0,M10.5.0/3"}, {"Europe/Sarajevo", "CET-1CEST,M3.5.0,M10.5.0/3"}, {"Europe/Saratov", "<+04>-4"}, {"Europe/Simferopol", "MSK-3"}, {"Europe/Skopje", "CET-1CEST,M3.5.0,M10.5.0/3"}, {"Europe/Sofia", "EET-2EEST,M3.5.0/3,M10.5.0/4"}, {"Europe/Stockholm", "CET-1CEST,M3.5.0,M10.5.0/3"}, {"Europe/Tallinn", "EET-2EEST,M3.5.0/3,M10.5.0/4"}, {"Europe/Tirane", "CET-1CEST,M3.5.0,M10.5.0/3"}, {"Europe/Ulyanovsk", "<+04>-4"}, {"Europe/Uzhgorod", "EET-2EEST,M3.5.0/3,M10.5.0/4"}, {"Europe/Vaduz", "CET-1CEST,M3.5.0,M10.5.0/3"}, {"Europe/Vatican", "CET-1CEST,M3.5.0,M10.5.0/3"}, {"Europe/Vienna", "CET-1CEST,M3.5.0,M10.5.0/3"}, {"Europe/Vilnius", "EET-2EEST,M3.5.0/3,M10.5.0/4"}, {"Europe/Volgograd", "<+04>-4"}, {"Europe/Warsaw", "CET-1CEST,M3.5.0,M10.5.0/3"}, {"Europe/Zagreb", "CET-1CEST,M3.5.0,M10.5.0/3"}, {"Europe/Zaporozhye", "EET-2EEST,M3.5.0/3,M10.5.0/4"}, {"Europe/Zurich", "CET-1CEST,M3.5.0,M10.5.0/3"}, {"Indian/Antananarivo", "EAT-3"}, {"Indian/Chagos", "<+06>-6"}, {"Indian/Christmas", "<+07>-7"}, {"Indian/Cocos", "<+0630>-6:30"}, {"Indian/Comoro", "EAT-3"}, {"Indian/Kerguelen", "<+05>-5"}, {"Indian/Mahe", "<+04>-4"}, {"Indian/Maldives", "<+05>-5"}, {"Indian/Mauritius", "<+04>-4"}, {"Indian/Mayotte", "EAT-3"}, {"Indian/Reunion", "<+04>-4"}, {"Pacific/Apia", "<+13>-13<+14>,M9.5.0/3,M4.1.0/4"}, {"Pacific/Auckland", "NZST-12NZDT,M9.5.0,M4.1.0/3"}, {"Pacific/Bougainville", "<+11>-11"}, {"Pacific/Chatham", "<+1245>-12:45<+1345>,M9.5.0/2:45,M4.1.0/3:45"}, {"Pacific/Chuuk", "<+10>-10"}, {"Pacific/Easter", "<-06>6<-05>,M9.1.6/22,M4.1.6/22"}, {"Pacific/Efate", "<+11>-11"}, {"Pacific/Enderbury", "<+13>-13"}, {"Pacific/Fakaofo", "<+13>-13"}, {"Pacific/Fiji", "<+12>-12<+13>,M11.2.0,M1.2.3/99"}, {"Pacific/Funafuti", "<+12>-12"}, {"Pacific/Galapagos", "<-06>6"}, {"Pacific/Gambier", "<-09>9"}, {"Pacific/Guadalcanal", "<+11>-11"}, {"Pacific/Guam", "ChST-10"}, {"Pacific/Honolulu", "HST10"}, {"Pacific/Kiritimati", "<+14>-14"}, {"Pacific/Kosrae", "<+11>-11"}, {"Pacific/Kwajalein", "<+12>-12"}, {"Pacific/Majuro", "<+12>-12"}, {"Pacific/Marquesas", "<-0930>9:30"}, {"Pacific/Midway", "SST11"}, {"Pacific/Nauru", "<+12>-12"}, {"Pacific/Niue", "<-11>11"}, {"Pacific/Norfolk", "<+11>-11<+12>,M10.1.0,M4.1.0/3"}, {"Pacific/Noumea", "<+11>-11"}, {"Pacific/Pago_Pago", "SST11"}, {"Pacific/Palau", "<+09>-9"}, {"Pacific/Pitcairn", "<-08>8"}, {"Pacific/Pohnpei", "<+11>-11"}, {"Pacific/Port_Moresby", "<+10>-10"}, {"Pacific/Rarotonga", "<-10>10"}, {"Pacific/Saipan", "ChST-10"}, {"Pacific/Tahiti", "<-10>10"}, {"Pacific/Tarawa", "<+12>-12"}, {"Pacific/Tongatapu", "<+13>-13"}, {"Pacific/Wake", "<+12>-12"}, {"Pacific/Wallis", "<+12>-12"} }; static char lower(char start) { if ('A' <= start && start <= 'Z') { return start - 'A' + 'a'; } return start; } /** * Basically strcmp, but accounting for spaces that have become underscores * @param[in] target - the 0-terminated string on the left hand side of the comparison * @param[in] other - the 0-terminated string on the right hand side of the comparison * @return > 0 if target comes before other alphabetically, * ==0 if they're the same, * < 0 if other comes before target alphabetically * (we don't expect NULL arguments, but, -1 if either is NULL) **/ static int tz_name_cmp(const char * target, const char * other) { if (!target || !other) { return -1; } while (*target) { if (lower(*target) != lower(*other)) { break; } do { target++; } while (*target == '_'); do { other++; } while (*other == '_'); } return lower(*target) - lower(*other); } const char *esp_rmaker_tz_db_get_posix_str(const char *name) { int lo = 0, hi = sizeof(esp_rmaker_tz_db_tzs) / sizeof(esp_rmaker_tz_db_pair_t); while (lo < hi) { int mid = (lo + hi) / 2; esp_rmaker_tz_db_pair_t mid_pair = esp_rmaker_tz_db_tzs[mid]; int comparison = tz_name_cmp(name, mid_pair.name); if (comparison == 0) { return mid_pair.posix_str; } else if (comparison < 0) { hi = mid; } else { lo = mid + 1; } } return NULL; }
the_stack_data/62638996.c
// Problem : UVA 488 - Triangle Wave // Author : timwilliam // Compiled : 05/30/2021 #include <stdio.h> #include <stdlib.h> int main(void){ int T, A, F, i, j, k, temp; scanf("%d", &T); while(T--){ getchar(); scanf("%d", &A); scanf("%d", &F); printf("\n"); // frequency for(i = 0; i < F; i++){ // amplitude temp = 1; for(j = 1; j <= (2 * A - 1); j++){ for(k = 0; k < temp; k++) printf("%d", temp); printf("\n"); if(j < A) temp++; else if(j >= A) temp--; } printf("\n"); } } }
the_stack_data/242331306.c
/* test pragma under the true body of if statement * two cases: inside {} or directly attached to true/false body * * Liao, 10/1/2008 * */ extern void process(int); extern void process2(int); int item[100]; int cutoff = 100; void foo(int i) { /*pragma needs scope fixes */ if (i%2==0) #pragma omp task if (i < cutoff) process (item[i]); else #pragma omp task process2(item[i]); /*pragma within explicit scopes */ if (i%2==0) { #pragma omp task process (item[i]); } else { #pragma omp task process2(item[i]); } }
the_stack_data/11061.c
/** * Function to add two ints * * Compile with * * gcc -Wall -Wextra -o add add.c * * or * * clang -Wall -Wextra -o add add.c * * Then run with * * ./add */ #include <stdio.h> int add(int a, int b) { return a + b; } int main(void) { int result = add(3, 4); printf("3 + 4 = %d", result); return 0; }
the_stack_data/36727.c
/*! Print on console using ARM PrimeCell UART (PL011) [simple mode!] */ #ifdef PL011 #include "pl011.h" #include <types/io.h> #include <lib/string.h> #include <types/basic.h> #include <arch/device.h> #include <arch/interrupt.h> #include <kernel/errno.h> static int uart_init (uint flags, void *params, device_t *dev ); static int uart_destroy ( uint flags, void *params, device_t *dev ); static int uart_interrupt_handler ( int irq_num, void *dev ); static void uart_write ( arch_uart_t *up ); static int uart_send ( void *data, size_t size, uint flags, device_t *dev ); static void uart_read ( arch_uart_t *up ); static int uart_recv ( void *data, size_t size, uint flags, device_t *dev ); /*! Init console */ static int uart_init ( uint flags, void *params, device_t *dev ) { volatile unsigned int *uart_ibrd, *uart_fbrd; volatile unsigned int *uart_lcr_h, *uart_cr, *uart_imsc; arch_uart_t *up; ASSERT ( dev ); up = dev->params; uart_ibrd = (unsigned int *) (up->base + UART_IBRD); uart_fbrd = (unsigned int *) (up->base + UART_FBRD); uart_lcr_h = (unsigned int *) (up->base + UART_LCR_H); uart_cr = (unsigned int *) (up->base + UART_CR); uart_imsc = (unsigned int *) (up->base + UART_IMSC); *uart_cr = 0; *uart_ibrd = UART_IBRD_V; *uart_fbrd = UART_FBRD_V; *uart_lcr_h = UART_LCR_H_WL; /* not using FIFO! */ *uart_imsc = UART_IMSC_RXIM | UART_IMSC_TXIM; *uart_cr = UART_CR_RXE | UART_CR_TXE | UART_CR_UARTEN; return 0; } /*! Disable UART device */ static int uart_destroy ( uint flags, void *params, device_t *dev ) { volatile unsigned int *uart_cr; arch_uart_t *up; ASSERT ( dev ); up = dev->params; uart_cr = (unsigned int *) (up->base + UART_CR); *uart_cr = 0; /* disable UART */ return 0; } /*! Interrupt handler for UART device */ static int uart_interrupt_handler ( int irq_num, void *dev ) { volatile unsigned int *uart_icr; device_t *uart = dev; arch_uart_t *up; ASSERT ( dev ); up = uart->params; /* not checking for errors; just get received character to software * buffer and send next from send buffer if previous is sent */ /* clear interrupts */ uart_icr = (unsigned int *) (up->base + UART_ICR); *uart_icr = UART_IMSC_RXIM | UART_IMSC_TXIM; /* "synchronize" UART with software buffer */ uart_write ( uart->params ); uart_read ( uart->params ); return 0; } /*! If there is data in software buffer, send it to UART */ static void uart_write ( arch_uart_t *up ) { volatile unsigned int *uart_dr; volatile unsigned int *uart_fr; ASSERT ( up ); uart_dr = (unsigned int *) (up->base + UART_DR); uart_fr = (unsigned int *) (up->base + UART_FR); /* If UART is ready to transmit and software buffer is not empty */ while ( up->outsz > 0 && ( (*uart_fr) & UART_FR_TXFF ) == 0 ) { *uart_dr = (unsigned int) up->outbuff[up->outf]; INC_MOD ( up->outf, up->outbufsz ); up->outsz--; } } /*! Send data to uart */ static int uart_send ( void *data, size_t size, uint flags, device_t *dev ) { arch_uart_t *up; uint8 *d; ASSERT ( dev ); up = dev->params; d = data; /* first, copy to software buffer */ while ( size > 0 && up->outsz < up->outbufsz ) { if ( *d == 0 && flags == CONSOLE_PRINT ) { size = 0; break; } up->outbuff[up->outl] = *d++; INC_MOD ( up->outl, up->outbufsz ); up->outsz++; size--; } /* second, copy from software buffer to uart */ uart_write ( up ); return size; /* 0 if all sent, otherwise not send part length */ } /*! Read data from UART to software buffer */ static void uart_read ( arch_uart_t *up ) { volatile unsigned int *uart_dr; volatile unsigned int *uart_fr; ASSERT ( up ); uart_dr = (unsigned int *) (UART0_BASE + UART_DR); uart_fr = (unsigned int *) (UART0_BASE + UART_FR); /* While UART is not empty and software buffer is not full */ while ( ( (*uart_fr) & UART_FR_RXFE ) == 0 && up->insz < up->inbufsz ) { up->inbuff[up->inl] = *uart_dr; INC_MOD ( up->inl, up->inbufsz ); up->insz++; } } /*! Read from UART (using software buffer) */ static int uart_recv ( void *data, size_t size, uint flags, device_t *dev ) { arch_uart_t *up; uint8 *d; int i; ASSERT ( dev ); up = dev->params; /* first, copy from uart to software buffer */ uart_read ( up ); /* second, copy from software buffer to data */ d = data; i = 0; while ( i < size && up->insz > 0 ) { d[i] = up->inbuff[up->inf]; INC_MOD ( up->inf, up->inbufsz ); up->insz--; i++; } return i; /* bytes read */ } /*! Get status */ static int uart_status ( uint flags, device_t *dev ) { arch_uart_t *up; int rflags = 0; ASSERT ( dev ); up = dev->params; /* look up software buffers */ if ( up->insz > 0 ) rflags |= DEV_IN_READY; if ( up->outsz < up->outbufsz ) rflags |= DEV_OUT_READY; return rflags; } /*! uart0 device & parameters */ static uint8 uart0_inbuf[BUFFER_SIZE]; static uint8 uart0_outbuf[BUFFER_SIZE]; static arch_uart_t uart0_params = (arch_uart_t) { .base = UART0_BASE, .inbuff = uart0_inbuf, .inbufsz=BUFFER_SIZE, .inf = 0, .inl = 0, .insz = 0, .outbuff = uart0_outbuf, .outbufsz=BUFFER_SIZE, .outf = 0, .outl = 0, .outsz = 0 }; /*! uart0 as device_t -----------------------------------------------------*/ device_t pl011_dev = (device_t) { .dev_name = "PL011", .irq_num = IRQ_OFFSET + UART0IRQL, .irq_handler = uart_interrupt_handler, .init = uart_init, .destroy = uart_destroy, .send = uart_send, .recv = uart_recv, .status = uart_status, .flags = DEV_TYPE_SHARED | DEV_TYPE_CONSOLE, .params = (void *) &uart0_params }; #endif /* PL011 */
the_stack_data/140765525.c
/* * ======================================================================================= * * Author: Jan Eitzinger (je), [email protected] * Copyright (c) 2020 RRZE, University Erlangen-Nuremberg * * 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 <stdlib.h> #include <stdio.h> #include <sched.h> #include <unistd.h> #include <sys/types.h> #include <pthread.h> #include <sys/syscall.h> #define MAX_NUM_THREADS 128 #define gettid() syscall(SYS_gettid) static int getProcessorID(cpu_set_t *cpu_set) { int processorId; for (processorId = 0; processorId < MAX_NUM_THREADS; processorId++) { if (CPU_ISSET(processorId, cpu_set)) { break; } } return processorId; } int affinity_getProcessorId() { cpu_set_t cpu_set; CPU_ZERO(&cpu_set); sched_getaffinity(gettid(), sizeof(cpu_set_t), &cpu_set); return getProcessorID(&cpu_set); } void affinity_pinThread(int processorId) { cpu_set_t cpuset; pthread_t thread; thread = pthread_self(); CPU_ZERO(&cpuset); CPU_SET(processorId, &cpuset); pthread_setaffinity_np(thread, sizeof(cpu_set_t), &cpuset); } void affinity_pinProcess(int processorId) { cpu_set_t cpuset; CPU_ZERO(&cpuset); CPU_SET(processorId, &cpuset); sched_setaffinity(0, sizeof(cpu_set_t), &cpuset); }
the_stack_data/107714.c
_Atomic struct s { int x; } s; int main(void) { return s.x; }
the_stack_data/120052.c
/* Spurious uninitialized variable warnings, case 2. Taken from cpphash.c (macroexpand) */ /* { dg-do compile } */ /* { dg-options "-Wuninitialized" } */ struct definition { int nargs; int rest_args; }; struct cpp_reader; enum cpp_token { CPP_EOF, CPP_POP, CPP_COMMA, CPP_RPAREN }; extern enum cpp_token macarg (struct cpp_reader *, int); void macroexpand (struct cpp_reader *pfile, struct definition *defn) { int nargs = defn->nargs; if (nargs >= 0) { enum cpp_token token; /* { dg-bogus "token" "uninitialized variable warning" } */ int i, rest_args; i = 0; rest_args = 0; do { if (rest_args) continue; if (i < nargs || (nargs == 0 && i == 0)) { /* if we are working on last arg which absorbs rest of args... */ if (i == nargs - 1 && defn->rest_args) rest_args = 1; token = macarg (pfile, rest_args); } else token = macarg (pfile, 0); if (token == CPP_EOF || token == CPP_POP) return; i++; } while (token == CPP_COMMA); } }
the_stack_data/25138579.c
/* { dg-do compile } */ double __fabs(double a) { return a; } double __fmadd(double a, double b, double c) { return a*b+c; } double test(double f32a, double f32b, double f32c) { f32c = __fabs(f32a); return __fmadd(f32a, f32b, f32c); }
the_stack_data/149998.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]/df(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; /* > \brief \b SLANTP returns the value of the 1-norm, or the Frobenius norm, or the infinity norm, or the ele ment of largest absolute value of a triangular matrix supplied in packed form. */ /* =========== DOCUMENTATION =========== */ /* Online html documentation available at */ /* http://www.netlib.org/lapack/explore-html/ */ /* > \htmlonly */ /* > Download SLANTP + dependencies */ /* > <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/slantp. f"> */ /* > [TGZ]</a> */ /* > <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/slantp. f"> */ /* > [ZIP]</a> */ /* > <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/slantp. f"> */ /* > [TXT]</a> */ /* > \endhtmlonly */ /* Definition: */ /* =========== */ /* REAL FUNCTION SLANTP( NORM, UPLO, DIAG, N, AP, WORK ) */ /* CHARACTER DIAG, NORM, UPLO */ /* INTEGER N */ /* REAL AP( * ), WORK( * ) */ /* > \par Purpose: */ /* ============= */ /* > */ /* > \verbatim */ /* > */ /* > SLANTP returns the value of the one norm, or the Frobenius norm, or */ /* > the infinity norm, or the element of largest absolute value of a */ /* > triangular matrix A, supplied in packed form. */ /* > \endverbatim */ /* > */ /* > \return SLANTP */ /* > \verbatim */ /* > */ /* > SLANTP = ( f2cmax(abs(A(i,j))), NORM = 'M' or 'm' */ /* > ( */ /* > ( norm1(A), NORM = '1', 'O' or 'o' */ /* > ( */ /* > ( normI(A), NORM = 'I' or 'i' */ /* > ( */ /* > ( normF(A), NORM = 'F', 'f', 'E' or 'e' */ /* > */ /* > where norm1 denotes the one norm of a matrix (maximum column sum), */ /* > normI denotes the infinity norm of a matrix (maximum row sum) and */ /* > normF denotes the Frobenius norm of a matrix (square root of sum of */ /* > squares). Note that f2cmax(abs(A(i,j))) is not a consistent matrix norm. */ /* > \endverbatim */ /* Arguments: */ /* ========== */ /* > \param[in] NORM */ /* > \verbatim */ /* > NORM is CHARACTER*1 */ /* > Specifies the value to be returned in SLANTP as described */ /* > above. */ /* > \endverbatim */ /* > */ /* > \param[in] UPLO */ /* > \verbatim */ /* > UPLO is CHARACTER*1 */ /* > Specifies whether the matrix A is upper or lower triangular. */ /* > = 'U': Upper triangular */ /* > = 'L': Lower triangular */ /* > \endverbatim */ /* > */ /* > \param[in] DIAG */ /* > \verbatim */ /* > DIAG is CHARACTER*1 */ /* > Specifies whether or not the matrix A is unit triangular. */ /* > = 'N': Non-unit triangular */ /* > = 'U': Unit triangular */ /* > \endverbatim */ /* > */ /* > \param[in] N */ /* > \verbatim */ /* > N is INTEGER */ /* > The order of the matrix A. N >= 0. When N = 0, SLANTP is */ /* > set to zero. */ /* > \endverbatim */ /* > */ /* > \param[in] AP */ /* > \verbatim */ /* > AP is REAL array, dimension (N*(N+1)/2) */ /* > The upper or lower triangular matrix A, packed columnwise in */ /* > a linear array. The j-th column of A is stored in the array */ /* > AP as follows: */ /* > if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j; */ /* > if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n. */ /* > Note that when DIAG = 'U', the elements of the array AP */ /* > corresponding to the diagonal elements of the matrix A are */ /* > not referenced, but are assumed to be one. */ /* > \endverbatim */ /* > */ /* > \param[out] WORK */ /* > \verbatim */ /* > WORK is REAL array, dimension (MAX(1,LWORK)), */ /* > where LWORK >= N when NORM = 'I'; otherwise, WORK is not */ /* > referenced. */ /* > \endverbatim */ /* Authors: */ /* ======== */ /* > \author Univ. of Tennessee */ /* > \author Univ. of California Berkeley */ /* > \author Univ. of Colorado Denver */ /* > \author NAG Ltd. */ /* > \date December 2016 */ /* > \ingroup realOTHERauxiliary */ /* ===================================================================== */ real slantp_(char *norm, char *uplo, char *diag, integer *n, real *ap, real * work) { /* System generated locals */ integer i__1, i__2; real ret_val, r__1; /* Local variables */ extern /* Subroutine */ int scombssq_(real *, real *); integer i__, j, k; logical udiag; extern logical lsame_(char *, char *); real value; extern logical sisnan_(real *); real colssq[2]; extern /* Subroutine */ int slassq_(integer *, real *, integer *, real *, real *); real sum, ssq[2]; /* -- LAPACK auxiliary routine (version 3.7.0) -- */ /* -- LAPACK is a software package provided by Univ. of Tennessee, -- */ /* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- */ /* December 2016 */ /* ===================================================================== */ /* Parameter adjustments */ --work; --ap; /* Function Body */ if (*n == 0) { value = 0.f; } else if (lsame_(norm, "M")) { /* Find f2cmax(abs(A(i,j))). */ k = 1; if (lsame_(diag, "U")) { value = 1.f; if (lsame_(uplo, "U")) { i__1 = *n; for (j = 1; j <= i__1; ++j) { i__2 = k + j - 2; for (i__ = k; i__ <= i__2; ++i__) { sum = (r__1 = ap[i__], abs(r__1)); if (value < sum || sisnan_(&sum)) { value = sum; } /* L10: */ } k += j; /* L20: */ } } else { i__1 = *n; for (j = 1; j <= i__1; ++j) { i__2 = k + *n - j; for (i__ = k + 1; i__ <= i__2; ++i__) { sum = (r__1 = ap[i__], abs(r__1)); if (value < sum || sisnan_(&sum)) { value = sum; } /* L30: */ } k = k + *n - j + 1; /* L40: */ } } } else { value = 0.f; if (lsame_(uplo, "U")) { i__1 = *n; for (j = 1; j <= i__1; ++j) { i__2 = k + j - 1; for (i__ = k; i__ <= i__2; ++i__) { sum = (r__1 = ap[i__], abs(r__1)); if (value < sum || sisnan_(&sum)) { value = sum; } /* L50: */ } k += j; /* L60: */ } } else { i__1 = *n; for (j = 1; j <= i__1; ++j) { i__2 = k + *n - j; for (i__ = k; i__ <= i__2; ++i__) { sum = (r__1 = ap[i__], abs(r__1)); if (value < sum || sisnan_(&sum)) { value = sum; } /* L70: */ } k = k + *n - j + 1; /* L80: */ } } } } else if (lsame_(norm, "O") || *(unsigned char *) norm == '1') { /* Find norm1(A). */ value = 0.f; k = 1; udiag = lsame_(diag, "U"); if (lsame_(uplo, "U")) { i__1 = *n; for (j = 1; j <= i__1; ++j) { if (udiag) { sum = 1.f; i__2 = k + j - 2; for (i__ = k; i__ <= i__2; ++i__) { sum += (r__1 = ap[i__], abs(r__1)); /* L90: */ } } else { sum = 0.f; i__2 = k + j - 1; for (i__ = k; i__ <= i__2; ++i__) { sum += (r__1 = ap[i__], abs(r__1)); /* L100: */ } } k += j; if (value < sum || sisnan_(&sum)) { value = sum; } /* L110: */ } } else { i__1 = *n; for (j = 1; j <= i__1; ++j) { if (udiag) { sum = 1.f; i__2 = k + *n - j; for (i__ = k + 1; i__ <= i__2; ++i__) { sum += (r__1 = ap[i__], abs(r__1)); /* L120: */ } } else { sum = 0.f; i__2 = k + *n - j; for (i__ = k; i__ <= i__2; ++i__) { sum += (r__1 = ap[i__], abs(r__1)); /* L130: */ } } k = k + *n - j + 1; if (value < sum || sisnan_(&sum)) { value = sum; } /* L140: */ } } } else if (lsame_(norm, "I")) { /* Find normI(A). */ k = 1; if (lsame_(uplo, "U")) { if (lsame_(diag, "U")) { i__1 = *n; for (i__ = 1; i__ <= i__1; ++i__) { work[i__] = 1.f; /* L150: */ } i__1 = *n; for (j = 1; j <= i__1; ++j) { i__2 = j - 1; for (i__ = 1; i__ <= i__2; ++i__) { work[i__] += (r__1 = ap[k], abs(r__1)); ++k; /* L160: */ } ++k; /* L170: */ } } else { i__1 = *n; for (i__ = 1; i__ <= i__1; ++i__) { work[i__] = 0.f; /* L180: */ } i__1 = *n; for (j = 1; j <= i__1; ++j) { i__2 = j; for (i__ = 1; i__ <= i__2; ++i__) { work[i__] += (r__1 = ap[k], abs(r__1)); ++k; /* L190: */ } /* L200: */ } } } else { if (lsame_(diag, "U")) { i__1 = *n; for (i__ = 1; i__ <= i__1; ++i__) { work[i__] = 1.f; /* L210: */ } i__1 = *n; for (j = 1; j <= i__1; ++j) { ++k; i__2 = *n; for (i__ = j + 1; i__ <= i__2; ++i__) { work[i__] += (r__1 = ap[k], abs(r__1)); ++k; /* L220: */ } /* L230: */ } } else { i__1 = *n; for (i__ = 1; i__ <= i__1; ++i__) { work[i__] = 0.f; /* L240: */ } i__1 = *n; for (j = 1; j <= i__1; ++j) { i__2 = *n; for (i__ = j; i__ <= i__2; ++i__) { work[i__] += (r__1 = ap[k], abs(r__1)); ++k; /* L250: */ } /* L260: */ } } } value = 0.f; i__1 = *n; for (i__ = 1; i__ <= i__1; ++i__) { sum = work[i__]; if (value < sum || sisnan_(&sum)) { value = sum; } /* L270: */ } } else if (lsame_(norm, "F") || lsame_(norm, "E")) { /* Find normF(A). */ /* SSQ(1) is scale */ /* SSQ(2) is sum-of-squares */ /* For better accuracy, sum each column separately. */ if (lsame_(uplo, "U")) { if (lsame_(diag, "U")) { ssq[0] = 1.f; ssq[1] = (real) (*n); k = 2; i__1 = *n; for (j = 2; j <= i__1; ++j) { colssq[0] = 0.f; colssq[1] = 1.f; i__2 = j - 1; slassq_(&i__2, &ap[k], &c__1, colssq, &colssq[1]); scombssq_(ssq, colssq); k += j; /* L280: */ } } else { ssq[0] = 0.f; ssq[1] = 1.f; k = 1; i__1 = *n; for (j = 1; j <= i__1; ++j) { colssq[0] = 0.f; colssq[1] = 1.f; slassq_(&j, &ap[k], &c__1, colssq, &colssq[1]); scombssq_(ssq, colssq); k += j; /* L290: */ } } } else { if (lsame_(diag, "U")) { ssq[0] = 1.f; ssq[1] = (real) (*n); k = 2; i__1 = *n - 1; for (j = 1; j <= i__1; ++j) { colssq[0] = 0.f; colssq[1] = 1.f; i__2 = *n - j; slassq_(&i__2, &ap[k], &c__1, colssq, &colssq[1]); scombssq_(ssq, colssq); k = k + *n - j + 1; /* L300: */ } } else { ssq[0] = 0.f; ssq[1] = 1.f; k = 1; i__1 = *n; for (j = 1; j <= i__1; ++j) { colssq[0] = 0.f; colssq[1] = 1.f; i__2 = *n - j + 1; slassq_(&i__2, &ap[k], &c__1, colssq, &colssq[1]); scombssq_(ssq, colssq); k = k + *n - j + 1; /* L310: */ } } } value = ssq[0] * sqrt(ssq[1]); } ret_val = value; return ret_val; /* End of SLANTP */ } /* slantp_ */
the_stack_data/269275.c
#include "stdio.h" #include "unistd.h" int main() { char *argv[4]; argv[0] = "cal"; argv[1] = "1"; argv[2] = "2020"; argv[3] = (char *) 0; printf("cal 1 2020 に変身\n"); // ユーザーごとに設定されているパスをそのまま使える // "/usr/bin/cal" じゃなくて "cal" でおk execvp("cal", argv); }
the_stack_data/173579030.c
/* Railroads */ #include <stdio.h> #include <string.h> #include <stdlib.h> typedef char bool; #define TRUE 1 #define FALSE 0 #define MAXINT 10000 #define MAXV 100 #define MAXDEGREE 1000 #define MAXCITIES 100 #define MAXNAME 50 typedef struct { int dept; int arrival; } time; typedef struct { int v; time t; } edge; typedef struct { edge edges[MAXV][MAXDEGREE]; int degrees[MAXV]; int nvertices; } graph; char city_names[MAXCITIES][MAXNAME]; time distance[MAXV]; int parent[MAXV]; int compare(const void *x, const void *y) { return (strcmp((char *)x, (char *)y)); } int binary_search(char key[], int first, int last) { int pos, cmp; if (first > last) return (-1); pos = (first + last) / 2; cmp = strcmp(city_names[pos], key); if (!cmp) return (pos); else if (cmp > 0) return (binary_search(key, first, pos-1)); else return (binary_search(key, pos+1, last)); } void initialize_graph(graph *g) { int i; for (i = 0; i < g->nvertices; i++) g -> degrees[i] = 0; } void read_cities(int c) { int i; for (i = 0; i < c; i++) scanf("%s", city_names[i]); } void construct_graph(graph *g) { int t, ti, t_start, t_end, start, end; int i, j, pos; char name[MAXNAME]; initialize_graph(g); scanf("%d", &t); for (i = 0; i < t; i++) { scanf("%d", &ti); scanf("%d %s", &t_start, name); start = binary_search(name, 0, g->nvertices-1); for (j = 1; j < ti; j++) { scanf("%d %s", &t_end, name); end = binary_search(name, 0, g->nvertices-1); g -> edges[start][g->degrees[start]].v = end; g -> edges[start][g->degrees[start]].t.dept = t_start; g -> edges[start][g->degrees[start]].t.arrival = t_end; g->degrees[start]++; start = end; t_start = t_end; } } } void dijkstra(graph *g, int start, int t) { int i, j; bool intree[MAXV]; int v; int w; int arrival, dept, limit; int dist; for (i = 0; i < g->nvertices; i++) { intree[i] = FALSE; distance[i].arrival = MAXINT; distance[i].dept = -1; parent[i] = -1; } distance[start].arrival = 0; v = start; while (intree[v] == FALSE) { intree[v] = TRUE; for (i = 0; i < g->degrees[v]; i++) { if (v == start) limit = t; else limit = distance[v].arrival; if (g->edges[v][i].t.dept >= limit) { w = g -> edges[v][i].v; arrival = g -> edges[v][i].t.arrival; if (distance[w].arrival > arrival) { distance[w].arrival = arrival; parent[w] = v; if (v == start) distance[w].dept = g -> edges[v][i].t.dept; else distance[w].dept = distance[v].dept; } else if (distance[w].arrival == arrival) if (g->edges[v][i].t.dept > distance[w].dept) distance[w].dept = g->edges[v][i].t.dept; } } v = 0; dist = MAXINT; for (i = 0; i < g->nvertices; i++) if ((intree[i] == FALSE) && (dist > distance[i].arrival)) { dist = distance[i].arrival; v = i; } } } int get_dept(graph *g, int start, int end) { int i; int v; int max; v = parent[end]; max = -1; if (v == start) { for (i = 0; i < g->degrees[v]; i++) if (g -> edges[v][i].v == end) if (g -> edges[v][i].t.arrival <= distance[end].arrival) if (g -> edges[v][i].t.dept > max) max = g -> edges[v][i].t.dept; return (max); } else { for (i = 0; i < g->degrees[v]; i++) if (g -> edges[v][i].v == end) if ((g -> edges[v][i].t.dept >= distance[v].arrival) && ((g -> edges[v][i].t.dept <= distance[end].arrival))) if (g -> edges[v][i].t.dept > max) max = g -> edges[v][i].t.dept; distance[v].arrival = max; return (get_dept(g, start, v)); } } void print_graph(graph *g) { int i, j; for (i = 0; i < g -> nvertices; i++) { printf("%d: ", i); for (j = 0; j < g->degrees[i]; j++) printf(" %d-%d-%d", g -> edges[i][j].v, g -> edges[i][j].t.dept, g -> edges[i][j].t.arrival); putchar('\n'); } } int main() { int cases, i; int c, start, end, t; char name[MAXNAME]; graph g; scanf("%d", &cases); for (i = 1; i <= cases; i++) { scanf("%d", &c); getchar(); read_cities(c); qsort(city_names, c, sizeof(char)*MAXNAME, compare); g.nvertices = c; construct_graph(&g); scanf("%d", &t); getchar(); scanf("%s", name); start = binary_search(name, 0, c-1); scanf("%s", name); end = binary_search(name, 0, c-1); dijkstra(&g, start, t); printf("Scenario %d\n", i); if (distance[end].arrival == MAXINT) printf("No connection\n\n"); else { distance[end].dept = get_dept(&g, start, end); printf("Departure %04d %s\n", distance[end].dept, city_names[start]); printf("Arrival %04d %s\n\n", distance[end].arrival, city_names[end]); } } return 0; }
the_stack_data/361188.c
/* This testcase is part of GDB, the GNU debugger. Copyright 2008-2019 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define _GNU_SOURCE #include <time.h> #include <sys/syscall.h> #include <unistd.h> void marker1 (void) { } void marker2 (void) { } time_t time_global = -1; int main (void) { marker1 (); syscall (SYS_time, &time_global); marker2 (); return 0; }
the_stack_data/9513915.c
struct s { int x; int y; }; int main() { struct s v; v.x = 1; v.y = 1; return v.x - v.y; }
the_stack_data/31388491.c
#include <stdio.h> int main(void) { int num; num = 50000; printf("%d\n", num * num); /* Maybe 2 500 000 000 ? */ return 0; }
the_stack_data/153267463.c
#include <stdio.h> #include <stdlib.h> #define YCF_YIELD() int sub_fun(char x){ YCF_YIELD(); x = x + 1; /* x == 1*/ return (x == 10 ? 0 : 1); } int fun(char x){ if(sub_fun(0)){ printf("hej\n"); } if(0) printf("NO"); else if(sub_fun(0)){ printf("hej 2\n"); } if(sub_fun(10)){ printf("hej 3\n"); } else { printf("HEJ\n"); } while(sub_fun(9)){ printf("hoo\n"); } do{ printf("haa\n"); }while(sub_fun(9)); return x; } void* allocator(size_t size, void* context){ (void)context; return malloc(size); } void freer(void* data, void* context){ (void)context; free(data); } int main( int argc, const char* argv[] ) { #ifdef YCF_YIELD_CODE_GENERATED void* wb = NULL; long nr_of_reductions = 1; #endif int ret = 0; #ifdef YCF_YIELD_CODE_GENERATED do{ ret = fun_ycf_gen_yielding(&nr_of_reductions,&wb,NULL,allocator,freer,NULL,0,NULL,1); if(wb != NULL){ printf("TRAPPED\n"); } }while(wb != NULL); if(wb != NULL){ free(wb); } #else fun(1); #endif printf("RETURNED %d\n", ret); return 0; }
the_stack_data/82951115.c
#include<stdio.h> int main() { int n,r,c; printf ("Enter N ="); scanf ("%d",&n); for (r=1 ; r<=n ; r++) { for (c=1 ; c<=n-r ; c++) { printf (" "); } for (c=1 ; c<=r ; c++) { printf ("%01d",c); } printf("\n"); } }
the_stack_data/43888999.c
/* * *Author: NagaChaitanya Vellanki * * * truncate example * */ #include<stdio.h> #include<stdlib.h> #include<sys/stat.h> #include<fcntl.h> #include<unistd.h> #include<errno.h> #include<string.h> int main(int argc, char *argv[]) { int fd; off_t offset = 0; char file_name[] = "/home/matti-nillu/cprograms/foo"; fd = open("foo", O_RDWR | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR); if(fd == -1) { fprintf(stderr, "Error on open\n"); exit(EXIT_FAILURE); } if(write(fd, "foobar", 6) == -1) { fprintf(stderr, "Error on write\n"); exit(EXIT_FAILURE); } if(truncate(file_name, offset) == -1) { fprintf(stderr, "Error on truncate\n"); fprintf(stderr, "%s\n", strerror(errno)); exit(EXIT_FAILURE); } if(write(fd, "foobargoo", 9) == -1) { fprintf(stderr, "Error on write\n"); exit(EXIT_FAILURE); } if(ftruncate(fd, offset) == -1) { fprintf(stderr, "Error on ftruncate\n"); fprintf(stderr, "%s\n", strerror(errno)); exit(EXIT_FAILURE); } if(close(fd) == -1) { fprintf(stderr, "Error on close\n"); exit(EXIT_FAILURE); } exit(EXIT_SUCCESS); }
the_stack_data/87638097.c
// gcc -o glXtest -L /usr/X11R6/lib glXtest.c -lX11 -lGL #include <GL/glx.h> #include <GL/gl.h> #include <unistd.h> #include <assert.h> #ifndef TRUE # define TRUE 1 #endif #ifndef FALSE # define FALSE 0 #endif static int attributeListSgl[] = { GLX_RGBA, GLX_RED_SIZE, 1, GLX_GREEN_SIZE, 1, GLX_BLUE_SIZE, 1, None }; static int attributeListDbl[] = { GLX_RGBA, GLX_DOUBLEBUFFER, GLX_RED_SIZE, 1, GLX_GREEN_SIZE, 1, GLX_BLUE_SIZE, 1, None }; static Bool WaitForNotify(Display *d, XEvent *e, char *arg) { return (e->type == MapNotify) && (e->xmap.window == (Window)arg); } int main(int argc, char **argv) { Display *dpy; XVisualInfo *vi; Colormap cmap; XSetWindowAttributes swa; Window win; GLXContext cx; XEvent event; int swap_flag = FALSE; dpy = XOpenDisplay(0); assert ( dpy ); vi = glXChooseVisual(dpy, DefaultScreen(dpy), attributeListSgl); if (vi == NULL) { vi = glXChooseVisual(dpy, DefaultScreen(dpy), attributeListDbl); swap_flag = TRUE; } assert ( vi ); cx = glXCreateContext(dpy, vi, 0, GL_TRUE); assert ( cx ); cmap = XCreateColormap(dpy, RootWindow(dpy, vi->screen), vi->visual, AllocNone); assert ( cmap ); swa.colormap = cmap; swa.border_pixel = 0; swa.event_mask = StructureNotifyMask; win = XCreateWindow(dpy, RootWindow(dpy, vi->screen), 0, 0, 100, 100, 0, vi->depth, InputOutput, vi->visual, CWBorderPixel|CWColormap|CWEventMask, &swa); assert ( win ); XMapWindow(dpy, win); XIfEvent(dpy, &event, WaitForNotify, (char*)win); glXMakeCurrent(dpy, win, cx); glClearColor(1,1,0,1); glClear(GL_COLOR_BUFFER_BIT); glFlush(); if (swap_flag) glXSwapBuffers(dpy,win); sleep(10); }
the_stack_data/97011437.c
#include <stdlib.h> #include <stdio.h> #include <sys/types.h> #include <sys/uio.h> #include <unistd.h> #include <fcntl.h> int main(int argh, char **argv){ char *fileName = argv[1]; char buffer; int fd = open(fileName, O_RDONLY); if(fd < 0){ printf("No se puede abrir \n"); exit(1); } while(read(fd,&buffer,1)){ printf("%c",buffer); } close(fd); exit(0); }
the_stack_data/920262.c
/* * Sample solution for HP CodeWars 2012 * Problem 15 * "Queueing Theory" */ #include <stdio.h> #include <ctype.h> #define Q_COUNT 9 struct request { int position; int size; char word[50]; }; struct queue { int next_enq; int next_deq; struct request req[50]; }; int main(void) { struct queue Q[Q_COUNT] = {{0}}; char data[50]; char input[50]; int length, lines, dq_count; int q_num, q_pos, in_pos; int request_id, position; int x, count; char ch; int dequeue_num; // Initialize output buffer for(x=0;x<sizeof(data);x++) { data[x] = ' '; } // Read first line if(fgets(input, sizeof(input), stdin) == NULL) { printf("no input\n"); return 0; } sscanf(input, "%d%d", &length, &lines); if(length>sizeof(data)) { printf("data too small (have %ld need %d)\n", sizeof(data), length); return 0; } dq_count = lines; do{ if(fgets(input, sizeof(input), stdin) == NULL) { printf("couldn't get the next line\n"); return 0; } /* Parse input: * Two char for queue ID, followed by * space, followed by * position (one or two digits), followed by * word */ q_num = input[1] - '1'; q_pos = 0; q_pos = input[3] - '0'; in_pos = 5; if(isdigit(input[4])) { q_pos = (q_pos*10) + (input[4] - '0'); in_pos = 6; } request_id = Q[q_num].next_enq; Q[q_num].req[request_id].position = q_pos; x = 0; while(isalpha(input[in_pos])) { Q[q_num].req[request_id].word[x] = input[in_pos]; x++; in_pos++; } Q[q_num].req[request_id].size = x; Q[q_num].next_enq += 1; } while(--lines); // Read last line if(fgets(input , sizeof(input),stdin) == NULL) { printf("could not get last line\n"); return 0; } /* * Parse last line and dequeue * Format is two char for queue ID, followed by space(s), repeating */ in_pos = 1; do{ dequeue_num = input[in_pos] - '1'; in_pos += 3; request_id = Q[dequeue_num].next_deq; position = Q[dequeue_num].req[request_id].position; count = Q[dequeue_num].req[request_id].size; for(x=0; x < count; x++) { ch = Q[dequeue_num].req[request_id].word[x]; data[position] = ch; position++; } Q[dequeue_num].next_deq += 1; } while(--dq_count); // Print result for(x=0;x<50;x++) { printf("%c", data[x]); } printf("\n"); return 0; }
the_stack_data/159514459.c
/* * ARM signal handling routines * * Copyright 2002 Marcus Meissner, SuSE Linux AG * Copyright 2010-2013, 2015 André Hentschel * * This 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. * * This 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 this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ #ifdef __arm__ #include "config.h" #include "wine/port.h" #include <assert.h> #include <signal.h> #include <stdlib.h> #include <stdarg.h> #include <stdio.h> #ifdef HAVE_UNISTD_H # include <unistd.h> #endif #ifdef HAVE_SYS_PARAM_H # include <sys/param.h> #endif #ifdef HAVE_SYSCALL_H # include <syscall.h> #else # ifdef HAVE_SYS_SYSCALL_H # include <sys/syscall.h> # endif #endif #ifdef HAVE_SYS_SIGNAL_H # include <sys/signal.h> #endif #ifdef HAVE_SYS_UCONTEXT_H # include <sys/ucontext.h> #endif #define NONAMELESSUNION #define NONAMELESSSTRUCT #include "ntstatus.h" #define WIN32_NO_STATUS #include "windef.h" #include "winternl.h" #include "wine/library.h" #include "wine/exception.h" #include "ntdll_misc.h" #include "wine/debug.h" #include "winnt.h" WINE_DEFAULT_DEBUG_CHANNEL(seh); static pthread_key_t teb_key; /*********************************************************************** * signal context platform-specific definitions */ #ifdef linux #if defined(__ANDROID__) && !defined(HAVE_SYS_UCONTEXT_H) typedef struct ucontext { unsigned long uc_flags; struct ucontext *uc_link; stack_t uc_stack; struct sigcontext uc_mcontext; sigset_t uc_sigmask; unsigned long uc_regspace[128] __attribute__((__aligned__(8))); } ucontext_t; #endif /* All Registers access - only for local access */ # define REG_sig(reg_name, context) ((context)->uc_mcontext.reg_name) # define REGn_sig(reg_num, context) ((context)->uc_mcontext.arm_r##reg_num) /* Special Registers access */ # define SP_sig(context) REG_sig(arm_sp, context) /* Stack pointer */ # define LR_sig(context) REG_sig(arm_lr, context) /* Link register */ # define PC_sig(context) REG_sig(arm_pc, context) /* Program counter */ # define CPSR_sig(context) REG_sig(arm_cpsr, context) /* Current State Register */ # define IP_sig(context) REG_sig(arm_ip, context) /* Intra-Procedure-call scratch register */ # define FP_sig(context) REG_sig(arm_fp, context) /* Frame pointer */ /* Exceptions */ # define ERROR_sig(context) REG_sig(error_code, context) # define TRAP_sig(context) REG_sig(trap_no, context) #elif defined(__FreeBSD__) /* All Registers access - only for local access */ # define REGn_sig(reg_num, context) ((context)->uc_mcontext.__gregs[reg_num]) /* Special Registers access */ # define SP_sig(context) REGn_sig(_REG_SP, context) /* Stack pointer */ # define LR_sig(context) REGn_sig(_REG_LR, context) /* Link register */ # define PC_sig(context) REGn_sig(_REG_PC, context) /* Program counter */ # define CPSR_sig(context) REGn_sig(_REG_CPSR, context) /* Current State Register */ # define IP_sig(context) REGn_sig(_REG_R12, context) /* Intra-Procedure-call scratch register */ # define FP_sig(context) REGn_sig(_REG_FP, context) /* Frame pointer */ #endif /* linux */ enum arm_trap_code { TRAP_ARM_UNKNOWN = -1, /* Unknown fault (TRAP_sig not defined) */ TRAP_ARM_PRIVINFLT = 6, /* Invalid opcode exception */ TRAP_ARM_PAGEFLT = 14, /* Page fault */ TRAP_ARM_ALIGNFLT = 17, /* Alignment check exception */ }; typedef void (WINAPI *raise_func)( EXCEPTION_RECORD *rec, CONTEXT *context ); typedef int (*wine_signal_handler)(unsigned int sig); static wine_signal_handler handlers[256]; struct UNWIND_INFO { WORD function_length; WORD unknown1 : 7; WORD count : 5; WORD unknown2 : 4; }; /*********************************************************************** * get_trap_code * * Get the trap code for a signal. */ static inline enum arm_trap_code get_trap_code( const ucontext_t *sigcontext ) { #ifdef TRAP_sig return TRAP_sig(sigcontext); #else return TRAP_ARM_UNKNOWN; /* unknown trap code */ #endif } /*********************************************************************** * get_error_code * * Get the error code for a signal. */ static inline WORD get_error_code( const ucontext_t *sigcontext ) { #ifdef ERROR_sig return ERROR_sig(sigcontext); #else return 0; #endif } /*********************************************************************** * dispatch_signal */ static inline int dispatch_signal(unsigned int sig) { if (handlers[sig] == NULL) return 0; return handlers[sig](sig); } /******************************************************************* * is_valid_frame */ static inline BOOL is_valid_frame( void *frame ) { if ((ULONG_PTR)frame & 3) return FALSE; return (frame >= NtCurrentTeb()->Tib.StackLimit && (void **)frame < (void **)NtCurrentTeb()->Tib.StackBase - 1); } /*********************************************************************** * save_context * * Set the register values from a sigcontext. */ static void save_context( CONTEXT *context, const ucontext_t *sigcontext ) { #define C(x) context->R##x = REGn_sig(x,sigcontext) /* Save normal registers */ C(0); C(1); C(2); C(3); C(4); C(5); C(6); C(7); C(8); C(9); C(10); #undef C context->ContextFlags = CONTEXT_FULL; context->Sp = SP_sig(sigcontext); /* Stack pointer */ context->Lr = LR_sig(sigcontext); /* Link register */ context->Pc = PC_sig(sigcontext); /* Program Counter */ context->Cpsr = CPSR_sig(sigcontext); /* Current State Register */ context->Ip = IP_sig(sigcontext); /* Intra-Procedure-call scratch register */ context->Fp = FP_sig(sigcontext); /* Frame pointer */ } /*********************************************************************** * restore_context * * Build a sigcontext from the register values. */ static void restore_context( const CONTEXT *context, ucontext_t *sigcontext ) { #define C(x) REGn_sig(x,sigcontext) = context->R##x /* Restore normal registers */ C(0); C(1); C(2); C(3); C(4); C(5); C(6); C(7); C(8); C(9); C(10); #undef C SP_sig(sigcontext) = context->Sp; /* Stack pointer */ LR_sig(sigcontext) = context->Lr ; /* Link register */ PC_sig(sigcontext) = context->Pc; /* Program Counter */ CPSR_sig(sigcontext) = context->Cpsr; /* Current State Register */ IP_sig(sigcontext) = context->Ip; /* Intra-Procedure-call scratch register */ FP_sig(sigcontext) = context->Fp; /* Frame pointer */ } /*********************************************************************** * save_fpu * * Set the FPU context from a sigcontext. */ static inline void save_fpu( CONTEXT *context, const ucontext_t *sigcontext ) { FIXME("not implemented\n"); } /*********************************************************************** * restore_fpu * * Restore the FPU context to a sigcontext. */ static inline void restore_fpu( CONTEXT *context, const ucontext_t *sigcontext ) { FIXME("not implemented\n"); } /************************************************************************** * __chkstk (NTDLL.@) * * Incoming r4 contains words to allocate, converting to bytes then return */ __ASM_GLOBAL_FUNC( __chkstk, "lsl r4, r4, #2\n\t" "bx lr" ) /*********************************************************************** * RtlCaptureContext (NTDLL.@) */ /* FIXME: Use the Stack instead of the actual register values */ __ASM_STDCALL_FUNC( RtlCaptureContext, 4, ".arm\n\t" "stmfd SP!, {r1}\n\t" "mov r1, #0x0200000\n\t"/* CONTEXT_ARM */ "add r1, r1, #0x3\n\t" /* CONTEXT_FULL */ "str r1, [r0]\n\t" /* context->ContextFlags */ "ldmfd SP!, {r1}\n\t" "str r0, [r0, #0x4]\n\t" /* context->R0 */ "str r1, [r0, #0x8]\n\t" /* context->R1 */ "str r2, [r0, #0xc]\n\t" /* context->R2 */ "str r3, [r0, #0x10]\n\t" /* context->R3 */ "str r4, [r0, #0x14]\n\t" /* context->R4 */ "str r5, [r0, #0x18]\n\t" /* context->R5 */ "str r6, [r0, #0x1c]\n\t" /* context->R6 */ "str r7, [r0, #0x20]\n\t" /* context->R7 */ "str r8, [r0, #0x24]\n\t" /* context->R8 */ "str r9, [r0, #0x28]\n\t" /* context->R9 */ "str r10, [r0, #0x2c]\n\t" /* context->R10 */ "str r11, [r0, #0x30]\n\t" /* context->Fp */ "str IP, [r0, #0x34]\n\t" /* context->Ip */ "str SP, [r0, #0x38]\n\t" /* context->Sp */ "str LR, [r0, #0x3c]\n\t" /* context->Lr */ "str PC, [r0, #0x40]\n\t" /* context->Pc */ "mrs r1, CPSR\n\t" "str r1, [r0, #0x44]\n\t" /* context->Cpsr */ "bx lr" ) /*********************************************************************** * set_cpu_context * * Set the new CPU context. */ /* FIXME: What about the CPSR? */ void set_cpu_context( const CONTEXT *context ); __ASM_GLOBAL_FUNC( set_cpu_context, "mov IP, r0\n\t" "ldr r0, [IP, #0x4]\n\t" /* context->R0 */ "ldr r1, [IP, #0x8]\n\t" /* context->R1 */ "ldr r2, [IP, #0xc]\n\t" /* context->R2 */ "ldr r3, [IP, #0x10]\n\t" /* context->R3 */ "ldr r4, [IP, #0x14]\n\t" /* context->R4 */ "ldr r5, [IP, #0x18]\n\t" /* context->R5 */ "ldr r6, [IP, #0x1c]\n\t" /* context->R6 */ "ldr r7, [IP, #0x20]\n\t" /* context->R7 */ "ldr r8, [IP, #0x24]\n\t" /* context->R8 */ "ldr r9, [IP, #0x28]\n\t" /* context->R9 */ "ldr r10, [IP, #0x2c]\n\t" /* context->R10 */ "ldr r11, [IP, #0x30]\n\t" /* context->Fp */ "ldr SP, [IP, #0x38]\n\t" /* context->Sp */ "ldr LR, [IP, #0x3c]\n\t" /* context->Lr */ "ldr PC, [IP, #0x40]\n\t" /* context->Pc */ ) /*********************************************************************** * copy_context * * Copy a register context according to the flags. */ static void copy_context( CONTEXT *to, const CONTEXT *from, DWORD flags ) { flags &= ~CONTEXT_ARM; /* get rid of CPU id */ if (flags & CONTEXT_CONTROL) { to->Sp = from->Sp; to->Lr = from->Lr; to->Pc = from->Pc; to->Cpsr = from->Cpsr; } if (flags & CONTEXT_INTEGER) { to->R0 = from->R0; to->R1 = from->R1; to->R2 = from->R2; to->R3 = from->R3; to->R4 = from->R4; to->R5 = from->R5; to->R6 = from->R6; to->R7 = from->R7; to->R8 = from->R8; to->R9 = from->R9; to->R10 = from->R10; to->Ip = from->Ip; to->Fp = from->Fp; } } /*********************************************************************** * context_to_server * * Convert a register context to the server format. */ NTSTATUS context_to_server( context_t *to, const CONTEXT *from ) { DWORD flags = from->ContextFlags & ~CONTEXT_ARM; /* get rid of CPU id */ memset( to, 0, sizeof(*to) ); to->cpu = CPU_ARM; if (flags & CONTEXT_CONTROL) { to->flags |= SERVER_CTX_CONTROL; to->ctl.arm_regs.sp = from->Sp; to->ctl.arm_regs.lr = from->Lr; to->ctl.arm_regs.pc = from->Pc; to->ctl.arm_regs.cpsr = from->Cpsr; } if (flags & CONTEXT_INTEGER) { to->flags |= SERVER_CTX_INTEGER; to->integer.arm_regs.r[0] = from->R0; to->integer.arm_regs.r[1] = from->R1; to->integer.arm_regs.r[2] = from->R2; to->integer.arm_regs.r[3] = from->R3; to->integer.arm_regs.r[4] = from->R4; to->integer.arm_regs.r[5] = from->R5; to->integer.arm_regs.r[6] = from->R6; to->integer.arm_regs.r[7] = from->R7; to->integer.arm_regs.r[8] = from->R8; to->integer.arm_regs.r[9] = from->R9; to->integer.arm_regs.r[10] = from->R10; to->integer.arm_regs.r[11] = from->Fp; to->integer.arm_regs.r[12] = from->Ip; } return STATUS_SUCCESS; } /*********************************************************************** * context_from_server * * Convert a register context from the server format. */ NTSTATUS context_from_server( CONTEXT *to, const context_t *from ) { if (from->cpu != CPU_ARM) return STATUS_INVALID_PARAMETER; to->ContextFlags = CONTEXT_ARM; if (from->flags & SERVER_CTX_CONTROL) { to->ContextFlags |= CONTEXT_CONTROL; to->Sp = from->ctl.arm_regs.sp; to->Lr = from->ctl.arm_regs.lr; to->Pc = from->ctl.arm_regs.pc; to->Cpsr = from->ctl.arm_regs.cpsr; } if (from->flags & SERVER_CTX_INTEGER) { to->ContextFlags |= CONTEXT_INTEGER; to->R0 = from->integer.arm_regs.r[0]; to->R1 = from->integer.arm_regs.r[1]; to->R2 = from->integer.arm_regs.r[2]; to->R3 = from->integer.arm_regs.r[3]; to->R4 = from->integer.arm_regs.r[4]; to->R5 = from->integer.arm_regs.r[5]; to->R6 = from->integer.arm_regs.r[6]; to->R7 = from->integer.arm_regs.r[7]; to->R8 = from->integer.arm_regs.r[8]; to->R9 = from->integer.arm_regs.r[9]; to->R10 = from->integer.arm_regs.r[10]; to->Fp = from->integer.arm_regs.r[11]; to->Ip = from->integer.arm_regs.r[12]; } return STATUS_SUCCESS; } /*********************************************************************** * NtSetContextThread (NTDLL.@) * ZwSetContextThread (NTDLL.@) */ NTSTATUS WINAPI NtSetContextThread( HANDLE handle, const CONTEXT *context ) { NTSTATUS ret; BOOL self; ret = set_thread_context( handle, context, &self ); if (self && ret == STATUS_SUCCESS) set_cpu_context( context ); return ret; } /*********************************************************************** * NtGetContextThread (NTDLL.@) * ZwGetContextThread (NTDLL.@) */ NTSTATUS WINAPI NtGetContextThread( HANDLE handle, CONTEXT *context ) { NTSTATUS ret; DWORD needed_flags = context->ContextFlags; BOOL self = (handle == GetCurrentThread()); if (!self) { if ((ret = get_thread_context( handle, context, &self ))) return ret; needed_flags &= ~context->ContextFlags; } if (self && needed_flags) { CONTEXT ctx; RtlCaptureContext( &ctx ); copy_context( context, &ctx, ctx.ContextFlags & needed_flags ); context->ContextFlags |= ctx.ContextFlags & needed_flags; } return STATUS_SUCCESS; } extern void raise_func_trampoline_thumb( EXCEPTION_RECORD *rec, CONTEXT *context, raise_func func ); __ASM_GLOBAL_FUNC( raise_func_trampoline_thumb, ".thumb\n\t" "blx r2\n\t" "bkpt") extern void raise_func_trampoline_arm( EXCEPTION_RECORD *rec, CONTEXT *context, raise_func func ); __ASM_GLOBAL_FUNC( raise_func_trampoline_arm, ".arm\n\t" "blx r2\n\t" "bkpt") /*********************************************************************** * setup_exception_record * * Setup the exception record and context on the thread stack. */ static EXCEPTION_RECORD *setup_exception( ucontext_t *sigcontext, raise_func func ) { struct stack_layout { CONTEXT context; EXCEPTION_RECORD rec; } *stack; DWORD exception_code = 0; stack = (struct stack_layout *)(SP_sig(sigcontext) & ~3); stack--; /* push the stack_layout structure */ stack->rec.ExceptionRecord = NULL; stack->rec.ExceptionCode = exception_code; stack->rec.ExceptionFlags = EXCEPTION_CONTINUABLE; stack->rec.ExceptionAddress = (LPVOID)PC_sig(sigcontext); stack->rec.NumberParameters = 0; save_context( &stack->context, sigcontext ); /* now modify the sigcontext to return to the raise function */ SP_sig(sigcontext) = (DWORD)stack; if (CPSR_sig(sigcontext) & 0x20) PC_sig(sigcontext) = (DWORD)raise_func_trampoline_thumb; else PC_sig(sigcontext) = (DWORD)raise_func_trampoline_arm; REGn_sig(0, sigcontext) = (DWORD)&stack->rec; /* first arg for raise_func */ REGn_sig(1, sigcontext) = (DWORD)&stack->context; /* second arg for raise_func */ REGn_sig(2, sigcontext) = (DWORD)func; /* the raise_func as third arg for the trampoline */ return &stack->rec; } /********************************************************************** * raise_segv_exception */ static void WINAPI raise_segv_exception( EXCEPTION_RECORD *rec, CONTEXT *context ) { NTSTATUS status; switch(rec->ExceptionCode) { case EXCEPTION_ACCESS_VIOLATION: if (rec->NumberParameters == 2) { if (!(rec->ExceptionCode = virtual_handle_fault( (void *)rec->ExceptionInformation[1], rec->ExceptionInformation[0], FALSE ))) goto done; } break; } status = NtRaiseException( rec, context, TRUE ); if (status) raise_status( status, rec ); done: set_cpu_context( context ); } /********************************************************************** * call_stack_handlers * * Call the stack handlers chain. */ static NTSTATUS call_stack_handlers( EXCEPTION_RECORD *rec, CONTEXT *context ) { EXCEPTION_REGISTRATION_RECORD *frame, *dispatch, *nested_frame; DWORD res; frame = NtCurrentTeb()->Tib.ExceptionList; nested_frame = NULL; while (frame != (EXCEPTION_REGISTRATION_RECORD*)~0UL) { /* Check frame address */ if (!is_valid_frame( frame )) { rec->ExceptionFlags |= EH_STACK_INVALID; break; } /* Call handler */ TRACE( "calling handler at %p code=%x flags=%x\n", frame->Handler, rec->ExceptionCode, rec->ExceptionFlags ); res = frame->Handler( rec, frame, context, &dispatch ); TRACE( "handler at %p returned %x\n", frame->Handler, res ); if (frame == nested_frame) { /* no longer nested */ nested_frame = NULL; rec->ExceptionFlags &= ~EH_NESTED_CALL; } switch(res) { case ExceptionContinueExecution: if (!(rec->ExceptionFlags & EH_NONCONTINUABLE)) return STATUS_SUCCESS; return STATUS_NONCONTINUABLE_EXCEPTION; case ExceptionContinueSearch: break; case ExceptionNestedException: if (nested_frame < dispatch) nested_frame = dispatch; rec->ExceptionFlags |= EH_NESTED_CALL; break; default: return STATUS_INVALID_DISPOSITION; } frame = frame->Prev; } return STATUS_UNHANDLED_EXCEPTION; } /******************************************************************* * raise_exception * * Implementation of NtRaiseException. */ static NTSTATUS raise_exception( EXCEPTION_RECORD *rec, CONTEXT *context, BOOL first_chance ) { NTSTATUS status; if (first_chance) { DWORD c; TRACE( "code=%x flags=%x addr=%p pc=%08x tid=%04x\n", rec->ExceptionCode, rec->ExceptionFlags, rec->ExceptionAddress, context->Pc, GetCurrentThreadId() ); for (c = 0; c < rec->NumberParameters; c++) TRACE( " info[%d]=%08lx\n", c, rec->ExceptionInformation[c] ); if (rec->ExceptionCode == EXCEPTION_WINE_STUB) { if (rec->ExceptionInformation[1] >> 16) MESSAGE( "wine: Call from %p to unimplemented function %s.%s, aborting\n", rec->ExceptionAddress, (char*)rec->ExceptionInformation[0], (char*)rec->ExceptionInformation[1] ); else MESSAGE( "wine: Call from %p to unimplemented function %s.%ld, aborting\n", rec->ExceptionAddress, (char*)rec->ExceptionInformation[0], rec->ExceptionInformation[1] ); } else { TRACE( " r0=%08x r1=%08x r2=%08x r3=%08x r4=%08x r5=%08x\n", context->R0, context->R1, context->R2, context->R3, context->R4, context->R5 ); TRACE( " r6=%08x r7=%08x r8=%08x r9=%08x r10=%08x fp=%08x\n", context->R6, context->R7, context->R8, context->R9, context->R10, context->Fp ); TRACE( " ip=%08x sp=%08x lr=%08x pc=%08x cpsr=%08x\n", context->Ip, context->Sp, context->Lr, context->Pc, context->Cpsr ); } status = send_debug_event( rec, TRUE, context ); if (status == DBG_CONTINUE || status == DBG_EXCEPTION_HANDLED) return STATUS_SUCCESS; if (call_vectored_handlers( rec, context ) == EXCEPTION_CONTINUE_EXECUTION) return STATUS_SUCCESS; if ((status = call_stack_handlers( rec, context )) != STATUS_UNHANDLED_EXCEPTION) return status; } /* last chance exception */ status = send_debug_event( rec, FALSE, context ); if (status != DBG_CONTINUE) { if (rec->ExceptionFlags & EH_STACK_INVALID) ERR("Exception frame is not in stack limits => unable to dispatch exception.\n"); else if (rec->ExceptionCode == STATUS_NONCONTINUABLE_EXCEPTION) ERR("Process attempted to continue execution after noncontinuable exception.\n"); else ERR("Unhandled exception code %x flags %x addr %p\n", rec->ExceptionCode, rec->ExceptionFlags, rec->ExceptionAddress ); NtTerminateProcess( NtCurrentProcess(), rec->ExceptionCode ); } return STATUS_SUCCESS; } /********************************************************************** * segv_handler * * Handler for SIGSEGV and related errors. */ static void segv_handler( int signal, siginfo_t *info, void *ucontext ) { EXCEPTION_RECORD *rec; ucontext_t *context = ucontext; /* check for page fault inside the thread stack */ if (get_trap_code(context) == TRAP_ARM_PAGEFLT && (char *)info->si_addr >= (char *)NtCurrentTeb()->DeallocationStack && (char *)info->si_addr < (char *)NtCurrentTeb()->Tib.StackBase && virtual_handle_stack_fault( info->si_addr )) { /* check if this was the last guard page */ if ((char *)info->si_addr < (char *)NtCurrentTeb()->DeallocationStack + 2*4096) { rec = setup_exception( context, raise_segv_exception ); rec->ExceptionCode = EXCEPTION_STACK_OVERFLOW; } return; } rec = setup_exception( context, raise_segv_exception ); if (rec->ExceptionCode == EXCEPTION_STACK_OVERFLOW) return; switch(get_trap_code(context)) { case TRAP_ARM_PRIVINFLT: /* Invalid opcode exception */ rec->ExceptionCode = EXCEPTION_ILLEGAL_INSTRUCTION; break; case TRAP_ARM_PAGEFLT: /* Page fault */ rec->ExceptionCode = EXCEPTION_ACCESS_VIOLATION; rec->NumberParameters = 2; rec->ExceptionInformation[0] = (get_error_code(context) & 0x800) != 0; rec->ExceptionInformation[1] = (ULONG_PTR)info->si_addr; break; case TRAP_ARM_ALIGNFLT: /* Alignment check exception */ rec->ExceptionCode = EXCEPTION_DATATYPE_MISALIGNMENT; break; case TRAP_ARM_UNKNOWN: /* Unknown fault code */ rec->ExceptionCode = EXCEPTION_ACCESS_VIOLATION; rec->NumberParameters = 2; rec->ExceptionInformation[0] = 0; rec->ExceptionInformation[1] = 0xffffffff; break; default: ERR("Got unexpected trap %d\n", get_trap_code(context)); rec->ExceptionCode = EXCEPTION_ILLEGAL_INSTRUCTION; break; } } /********************************************************************** * trap_handler * * Handler for SIGTRAP. */ static void trap_handler( int signal, siginfo_t *info, void *ucontext ) { EXCEPTION_RECORD rec; CONTEXT context; NTSTATUS status; switch ( info->si_code ) { case TRAP_TRACE: rec.ExceptionCode = EXCEPTION_SINGLE_STEP; break; case TRAP_BRKPT: default: rec.ExceptionCode = EXCEPTION_BREAKPOINT; break; } save_context( &context, ucontext ); rec.ExceptionFlags = EXCEPTION_CONTINUABLE; rec.ExceptionRecord = NULL; rec.ExceptionAddress = (LPVOID)context.Pc; rec.NumberParameters = 0; status = raise_exception( &rec, &context, TRUE ); if (status) raise_status( status, &rec ); restore_context( &context, ucontext ); } /********************************************************************** * fpe_handler * * Handler for SIGFPE. */ static void fpe_handler( int signal, siginfo_t *siginfo, void *sigcontext ) { EXCEPTION_RECORD rec; CONTEXT context; NTSTATUS status; save_fpu( &context, sigcontext ); save_context( &context, sigcontext ); switch (siginfo->si_code & 0xffff ) { #ifdef FPE_FLTSUB case FPE_FLTSUB: rec.ExceptionCode = EXCEPTION_ARRAY_BOUNDS_EXCEEDED; break; #endif #ifdef FPE_INTDIV case FPE_INTDIV: rec.ExceptionCode = EXCEPTION_INT_DIVIDE_BY_ZERO; break; #endif #ifdef FPE_INTOVF case FPE_INTOVF: rec.ExceptionCode = EXCEPTION_INT_OVERFLOW; break; #endif #ifdef FPE_FLTDIV case FPE_FLTDIV: rec.ExceptionCode = EXCEPTION_FLT_DIVIDE_BY_ZERO; break; #endif #ifdef FPE_FLTOVF case FPE_FLTOVF: rec.ExceptionCode = EXCEPTION_FLT_OVERFLOW; break; #endif #ifdef FPE_FLTUND case FPE_FLTUND: rec.ExceptionCode = EXCEPTION_FLT_UNDERFLOW; break; #endif #ifdef FPE_FLTRES case FPE_FLTRES: rec.ExceptionCode = EXCEPTION_FLT_INEXACT_RESULT; break; #endif #ifdef FPE_FLTINV case FPE_FLTINV: #endif default: rec.ExceptionCode = EXCEPTION_FLT_INVALID_OPERATION; break; } rec.ExceptionFlags = EXCEPTION_CONTINUABLE; rec.ExceptionRecord = NULL; rec.ExceptionAddress = (LPVOID)context.Pc; rec.NumberParameters = 0; status = raise_exception( &rec, &context, TRUE ); if (status) raise_status( status, &rec ); restore_context( &context, sigcontext ); restore_fpu( &context, sigcontext ); } /********************************************************************** * int_handler * * Handler for SIGINT. */ static void int_handler( int signal, siginfo_t *siginfo, void *sigcontext ) { if (!dispatch_signal(SIGINT)) { EXCEPTION_RECORD rec; CONTEXT context; NTSTATUS status; save_context( &context, sigcontext ); rec.ExceptionCode = CONTROL_C_EXIT; rec.ExceptionFlags = EXCEPTION_CONTINUABLE; rec.ExceptionRecord = NULL; rec.ExceptionAddress = (LPVOID)context.Pc; rec.NumberParameters = 0; status = raise_exception( &rec, &context, TRUE ); if (status) raise_status( status, &rec ); restore_context( &context, sigcontext ); } } /********************************************************************** * abrt_handler * * Handler for SIGABRT. */ static void abrt_handler( int signal, siginfo_t *siginfo, void *sigcontext ) { EXCEPTION_RECORD rec; CONTEXT context; NTSTATUS status; save_context( &context, sigcontext ); rec.ExceptionCode = EXCEPTION_WINE_ASSERTION; rec.ExceptionFlags = EH_NONCONTINUABLE; rec.ExceptionRecord = NULL; rec.ExceptionAddress = (LPVOID)context.Pc; rec.NumberParameters = 0; status = raise_exception( &rec, &context, TRUE ); if (status) raise_status( status, &rec ); restore_context( &context, sigcontext ); } /********************************************************************** * quit_handler * * Handler for SIGQUIT. */ static void quit_handler( int signal, siginfo_t *siginfo, void *sigcontext ) { abort_thread(0); } /********************************************************************** * usr1_handler * * Handler for SIGUSR1, used to signal a thread that it got suspended. */ static void usr1_handler( int signal, siginfo_t *siginfo, void *sigcontext ) { CONTEXT context; save_context( &context, sigcontext ); wait_suspend( &context ); restore_context( &context, sigcontext ); } /*********************************************************************** * __wine_set_signal_handler (NTDLL.@) */ int CDECL __wine_set_signal_handler(unsigned int sig, wine_signal_handler wsh) { if (sig >= sizeof(handlers) / sizeof(handlers[0])) return -1; if (handlers[sig] != NULL) return -2; handlers[sig] = wsh; return 0; } /********************************************************************** * signal_alloc_thread */ NTSTATUS signal_alloc_thread( TEB **teb ) { static size_t sigstack_zero_bits; SIZE_T size; NTSTATUS status; if (!sigstack_zero_bits) { size_t min_size = page_size; /* find the first power of two not smaller than min_size */ while ((1u << sigstack_zero_bits) < min_size) sigstack_zero_bits++; assert( sizeof(TEB) <= min_size ); } size = 1 << sigstack_zero_bits; *teb = NULL; if (!(status = NtAllocateVirtualMemory( NtCurrentProcess(), (void **)teb, sigstack_zero_bits, &size, MEM_COMMIT | MEM_TOP_DOWN, PAGE_READWRITE ))) { (*teb)->Tib.Self = &(*teb)->Tib; (*teb)->Tib.ExceptionList = (void *)~0UL; } return status; } /********************************************************************** * signal_free_thread */ void signal_free_thread( TEB *teb ) { SIZE_T size; if (teb->DeallocationStack) { size = 0; NtFreeVirtualMemory( GetCurrentProcess(), &teb->DeallocationStack, &size, MEM_RELEASE ); } size = 0; NtFreeVirtualMemory( NtCurrentProcess(), (void **)&teb, &size, MEM_RELEASE ); } /********************************************************************** * signal_init_thread */ void signal_init_thread( TEB *teb ) { static BOOL init_done; if (!init_done) { pthread_key_create( &teb_key, NULL ); init_done = TRUE; } #if defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_8A__) /* Win32/ARM applications expect the TEB pointer to be in the TPIDRURW register. */ __asm__ __volatile__( "mcr p15, 0, %0, c13, c0, 2" : : "r" (teb) ); #endif pthread_setspecific( teb_key, teb ); } /********************************************************************** * signal_init_process */ void signal_init_process( CONTEXT *context, LPTHREAD_START_ROUTINE entry ) { struct sigaction sig_act; sig_act.sa_mask = server_block_set; sig_act.sa_flags = SA_RESTART | SA_SIGINFO; sig_act.sa_sigaction = int_handler; if (sigaction( SIGINT, &sig_act, NULL ) == -1) goto error; sig_act.sa_sigaction = fpe_handler; if (sigaction( SIGFPE, &sig_act, NULL ) == -1) goto error; sig_act.sa_sigaction = abrt_handler; if (sigaction( SIGABRT, &sig_act, NULL ) == -1) goto error; sig_act.sa_sigaction = quit_handler; if (sigaction( SIGQUIT, &sig_act, NULL ) == -1) goto error; sig_act.sa_sigaction = usr1_handler; if (sigaction( SIGUSR1, &sig_act, NULL ) == -1) goto error; sig_act.sa_sigaction = segv_handler; if (sigaction( SIGSEGV, &sig_act, NULL ) == -1) goto error; if (sigaction( SIGILL, &sig_act, NULL ) == -1) goto error; #ifdef SIGBUS if (sigaction( SIGBUS, &sig_act, NULL ) == -1) goto error; #endif #ifdef SIGTRAP sig_act.sa_sigaction = trap_handler; if (sigaction( SIGTRAP, &sig_act, NULL ) == -1) goto error; #endif /* FIXME: set the initial context */ return; error: perror("sigaction"); exit(1); } /********************************************************************** * __wine_enter_vm86 (NTDLL.@) */ void __wine_enter_vm86( CONTEXT *context ) { MESSAGE("vm86 mode not supported on this platform\n"); } /********************************************************************** * RtlAddFunctionTable (NTDLL.@) */ BOOLEAN CDECL RtlAddFunctionTable( RUNTIME_FUNCTION *table, DWORD count, DWORD addr ) { FIXME( "%p %u %x: stub\n", table, count, addr ); return TRUE; } /********************************************************************** * RtlDeleteFunctionTable (NTDLL.@) */ BOOLEAN CDECL RtlDeleteFunctionTable( RUNTIME_FUNCTION *table ) { FIXME( "%p: stub\n", table ); return TRUE; } /********************************************************************** * find_function_info */ static RUNTIME_FUNCTION *find_function_info( ULONG_PTR pc, HMODULE module, RUNTIME_FUNCTION *func, ULONG size ) { int min = 0; int max = size/sizeof(*func) - 1; while (min <= max) { int pos = (min + max) / 2; DWORD begin = (func[pos].BeginAddress & ~1), end; if (func[pos].u.s.Flag) end = begin + func[pos].u.s.FunctionLength * 2; else { struct UNWIND_INFO *info; info = (struct UNWIND_INFO *)((char *)module + func[pos].u.UnwindData); end = begin + info->function_length * 2; } if ((char *)pc < (char *)module + begin) max = pos - 1; else if ((char *)pc >= (char *)module + end) min = pos + 1; else return func + pos; } return NULL; } /********************************************************************** * RtlLookupFunctionEntry (NTDLL.@) */ PRUNTIME_FUNCTION WINAPI RtlLookupFunctionEntry( ULONG_PTR pc, DWORD *base, UNWIND_HISTORY_TABLE *table ) { LDR_MODULE *module; RUNTIME_FUNCTION *func; ULONG size; /* FIXME: should use the history table to make things faster */ if (LdrFindEntryForAddress( (void *)pc, &module )) { WARN( "module not found for %lx\n", pc ); return NULL; } if (!(func = RtlImageDirectoryEntryToData( module->BaseAddress, TRUE, IMAGE_DIRECTORY_ENTRY_EXCEPTION, &size ))) { WARN( "no exception table found in module %p pc %lx\n", module->BaseAddress, pc ); return NULL; } func = find_function_info( pc, module->BaseAddress, func, size ); if (func) *base = (DWORD)module->BaseAddress; return func; } /*********************************************************************** * RtlUnwind (NTDLL.@) */ void WINAPI RtlUnwind( void *endframe, void *target_ip, EXCEPTION_RECORD *rec, void *retval ) { CONTEXT context; EXCEPTION_RECORD record; EXCEPTION_REGISTRATION_RECORD *frame, *dispatch; DWORD res; RtlCaptureContext( &context ); context.R0 = (DWORD)retval; /* build an exception record, if we do not have one */ if (!rec) { record.ExceptionCode = STATUS_UNWIND; record.ExceptionFlags = 0; record.ExceptionRecord = NULL; record.ExceptionAddress = (void *)context.Pc; record.NumberParameters = 0; rec = &record; } rec->ExceptionFlags |= EH_UNWINDING | (endframe ? 0 : EH_EXIT_UNWIND); TRACE( "code=%x flags=%x\n", rec->ExceptionCode, rec->ExceptionFlags ); /* get chain of exception frames */ frame = NtCurrentTeb()->Tib.ExceptionList; while ((frame != (EXCEPTION_REGISTRATION_RECORD*)~0UL) && (frame != endframe)) { /* Check frame address */ if (endframe && ((void*)frame > endframe)) raise_status( STATUS_INVALID_UNWIND_TARGET, rec ); if (!is_valid_frame( frame )) raise_status( STATUS_BAD_STACK, rec ); /* Call handler */ TRACE( "calling handler at %p code=%x flags=%x\n", frame->Handler, rec->ExceptionCode, rec->ExceptionFlags ); res = frame->Handler(rec, frame, &context, &dispatch); TRACE( "handler at %p returned %x\n", frame->Handler, res ); switch(res) { case ExceptionContinueSearch: break; case ExceptionCollidedUnwind: frame = dispatch; break; default: raise_status( STATUS_INVALID_DISPOSITION, rec ); break; } frame = __wine_pop_frame( frame ); } } /******************************************************************* * NtRaiseException (NTDLL.@) */ NTSTATUS WINAPI NtRaiseException( EXCEPTION_RECORD *rec, CONTEXT *context, BOOL first_chance ) { NTSTATUS status = raise_exception( rec, context, first_chance ); if (status == STATUS_SUCCESS) NtSetContextThread( GetCurrentThread(), context ); return status; } /*********************************************************************** * RtlRaiseException (NTDLL.@) */ void WINAPI RtlRaiseException( EXCEPTION_RECORD *rec ) { CONTEXT context; NTSTATUS status; RtlCaptureContext( &context ); rec->ExceptionAddress = (LPVOID)context.Pc; status = raise_exception( rec, &context, TRUE ); if (status) raise_status( status, rec ); } /************************************************************************* * RtlCaptureStackBackTrace (NTDLL.@) */ USHORT WINAPI RtlCaptureStackBackTrace( ULONG skip, ULONG count, PVOID *buffer, ULONG *hash ) { FIXME( "(%d, %d, %p, %p) stub!\n", skip, count, buffer, hash ); return 0; } /*********************************************************************** * call_thread_entry_point */ void call_thread_entry_point( LPTHREAD_START_ROUTINE entry, void *arg ) { __TRY { exit_thread( entry( arg )); } __EXCEPT(unhandled_exception_filter) { NtTerminateThread( GetCurrentThread(), GetExceptionCode() ); } __ENDTRY abort(); /* should not be reached */ } /*********************************************************************** * RtlExitUserThread (NTDLL.@) */ void WINAPI RtlExitUserThread( ULONG status ) { exit_thread( status ); } /*********************************************************************** * abort_thread */ void abort_thread( int status ) { terminate_thread( status ); } /********************************************************************** * DbgBreakPoint (NTDLL.@) */ void WINAPI DbgBreakPoint(void) { kill(getpid(), SIGTRAP); } /********************************************************************** * DbgUserBreakPoint (NTDLL.@) */ void WINAPI DbgUserBreakPoint(void) { kill(getpid(), SIGTRAP); } /********************************************************************** * NtCurrentTeb (NTDLL.@) */ TEB * WINAPI NtCurrentTeb(void) { return pthread_getspecific( teb_key ); } #endif /* __arm__ */
the_stack_data/34514089.c
int removeElement(int *nums, int numsSize, int val) { if (numsSize == 0) return 0; int count = 0; int i; for (i = 0; i < numsSize; i++) { if (nums[i] != val) { nums[count++] = nums[i]; } } return count; }
the_stack_data/154889.c
#include <stdio.h> #include <limits.h> long long l[10000]; long long K, N; long long piece(long long p) { if(p == 0) return LLONG_MAX; int i; long long ans = 0; for(i=0;i<K;i++) ans += l[i] / p; return ans; } long long Bsearch(long long s, long long e) { if(s+1 == e) { if(piece(e) >= N) return e; else return s; } if(s == e) return s; long long h = (s+e)/2; if(piece(h) >= N) Bsearch(h,e); else Bsearch(s,h); } int main(void) { scanf("%lld %lld", &K, &N); int i; for(i=0;i<K;i++) scanf("%lld", &l[i]); printf("%lld\n", Bsearch((long long)1, (long long)INT_MAX)); return 0; }
the_stack_data/165767997.c
//Classification: p/ZD/aS+dS/A(D(v),v)/rc/cd //Written by: Igor Eremeev #include <malloc.h> int recursion(int p) { if (p > 5) { return (p); } p++; return (recursion(p)); } int main(void) { int *p; int a = -2; int b; p = (int *)malloc(sizeof(int)); *p = 6; if (a < -3) { a = recursion (a); } b = 1 / (a - *p); return 0; }
the_stack_data/123387.c
/* SDL_mixer: An audio mixer library based on the SDL library Copyright (C) 1997-2013 Sam Lantinga <[email protected]> This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. This is the source needed to decode an Ogg Vorbis into a waveform. This file by Vaclav Slavik ([email protected]). */ /* $Id$ */ #ifdef OGG_MUSIC #include <stdio.h> #include <stdlib.h> #include <string.h> #include "SDL_mutex.h" #include "SDL_endian.h" #include "SDL_timer.h" #include "SDL_mixer.h" #include "dynamic_ogg.h" #include "load_ogg.h" static size_t sdl_read_func(void *ptr, size_t size, size_t nmemb, void *datasource) { return SDL_RWread((SDL_RWops*)datasource, ptr, size, nmemb); } static int sdl_seek_func(void *datasource, ogg_int64_t offset, int whence) { return (int)SDL_RWseek((SDL_RWops*)datasource, offset, whence); } static int sdl_close_func_freesrc(void *datasource) { return SDL_RWclose((SDL_RWops*)datasource); } static int sdl_close_func_nofreesrc(void *datasource) { SDL_RWseek((SDL_RWops*)datasource, 0, RW_SEEK_SET); return 0; } static long sdl_tell_func(void *datasource) { return (long)SDL_RWtell((SDL_RWops*)datasource); } /* don't call this directly; use Mix_LoadWAV_RW() for now. */ SDL_AudioSpec *Mix_LoadOGG_RW (SDL_RWops *src, int freesrc, SDL_AudioSpec *spec, Uint8 **audio_buf, Uint32 *audio_len) { OggVorbis_File vf; ov_callbacks callbacks; vorbis_info *info; Uint8 *buf; int bitstream = -1; long samplesize; long samples; int read, to_read; int must_close = 1; int was_error = 1; if ( (!src) || (!audio_buf) || (!audio_len) ) /* sanity checks. */ goto done; if ( !Mix_Init(MIX_INIT_OGG) ) goto done; callbacks.read_func = sdl_read_func; callbacks.seek_func = sdl_seek_func; callbacks.tell_func = sdl_tell_func; callbacks.close_func = freesrc ? sdl_close_func_freesrc : sdl_close_func_nofreesrc; if (vorbis.ov_open_callbacks(src, &vf, NULL, 0, callbacks) != 0) { SDL_SetError("OGG bitstream is not valid Vorbis stream!"); goto done; } must_close = 0; info = vorbis.ov_info(&vf, -1); *audio_buf = NULL; *audio_len = 0; memset(spec, '\0', sizeof (SDL_AudioSpec)); spec->format = AUDIO_S16; spec->channels = info->channels; spec->freq = info->rate; spec->samples = 4096; /* buffer size */ samples = (long)vorbis.ov_pcm_total(&vf, -1); *audio_len = spec->size = samples * spec->channels * 2; *audio_buf = (Uint8 *)SDL_malloc(*audio_len); if (*audio_buf == NULL) goto done; buf = *audio_buf; to_read = *audio_len; #ifdef OGG_USE_TREMOR for (read = vorbis.ov_read(&vf, (char *)buf, to_read, &bitstream); read > 0; read = vorbis.ov_read(&vf, (char *)buf, to_read, &bitstream)) #else for (read = vorbis.ov_read(&vf, (char *)buf, to_read, 0/*LE*/, 2/*16bit*/, 1/*signed*/, &bitstream); read > 0; read = vorbis.ov_read(&vf, (char *)buf, to_read, 0, 2, 1, &bitstream)) #endif { if (read == OV_HOLE || read == OV_EBADLINK) break; /* error */ to_read -= read; buf += read; } vorbis.ov_clear(&vf); was_error = 0; /* Don't return a buffer that isn't a multiple of samplesize */ samplesize = ((spec->format & 0xFF)/8)*spec->channels; *audio_len &= ~(samplesize-1); done: if (freesrc && src && must_close) { SDL_RWclose(src); } if (was_error) { spec = NULL; } return(spec); } /* Mix_LoadOGG_RW */ /* end of load_ogg.c ... */ #endif
the_stack_data/9511948.c
/* Copyright 2004-2012, Martian Software, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ /** */ #ifdef WIN32 #include <direct.h> #include <winsock2.h> #else #include <arpa/inet.h> #include <netdb.h> #include <netinet/in.h> #include <sys/socket.h> #include <sys/types.h> #endif #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <fcntl.h> #define NAILGUN_VERSION "0.9.0" #define BUFSIZE (2048) #ifdef WIN32 HANDLE NG_STDIN_FILENO; HANDLE NG_STDOUT_FILENO; HANDLE NG_STDERR_FILENO; #define FILE_SEPARATOR '\\' #define MSG_WAITALL 0 #else #define NG_STDIN_FILENO STDIN_FILENO #define NG_STDOUT_FILENO STDOUT_FILENO #define NG_STDERR_FILENO STDERR_FILENO #define FILE_SEPARATOR '/' typedef int HANDLE; typedef unsigned int SOCKET; /* buffer used for reading an writing chunk data */ char buf[BUFSIZE]; #endif #ifndef MIN #define MIN(a,b) ((a<b)?(a):(b)) #endif #ifdef WIN32 #define NAILGUN_FILESEPARATOR "NAILGUN_FILESEPARATOR=\\" #define NAILGUN_PATHSEPARATOR "NAILGUN_PATHSEPARATOR=;" #else #define NAILGUN_FILESEPARATOR "NAILGUN_FILESEPARATOR=/" #define NAILGUN_PATHSEPARATOR "NAILGUN_PATHSEPARATOR=:" #endif #define NAILGUN_CLIENT_NAME_EXE "ng.exe" #define NAILGUN_PORT_DEFAULT "2113" #define NAILGUN_CLIENT_NAME "ng" #define CHUNK_HEADER_LEN (5) #define NAILGUN_SOCKET_FAILED (231) #define NAILGUN_CONNECT_FAILED (230) #define NAILGUN_UNEXPECTED_CHUNKTYPE (229) #define NAILGUN_EXCEPTION_ON_SERVER (228) #define NAILGUN_CONNECTION_BROKEN (227) #define NAILGUN_BAD_ARGUMENTS (226) #define CHUNKTYPE_STDIN '0' #define CHUNKTYPE_STDOUT '1' #define CHUNKTYPE_STDERR '2' #define CHUNKTYPE_STDIN_EOF '.' #define CHUNKTYPE_ARG 'A' #define CHUNKTYPE_LONGARG 'L' #define CHUNKTYPE_ENV 'E' #define CHUNKTYPE_DIR 'D' #define CHUNKTYPE_CMD 'C' #define CHUNKTYPE_EXIT 'X' #define CHUNKTYPE_STARTINPUT 'S' /* the following is required to compile for hp-ux originally posted at http://jira.codehaus.org/browse/JRUBY-2346 */ #ifndef MSG_WAITALL #define MSG_WAITALL 0x40 /* wait for full request or error */ #endif /* the socket connected to the nailgun server */ int nailgunsocket = 0; /* buffer used for receiving and writing nail output chunks */ char buf[BUFSIZE]; /* track whether or not we've been told to send stdin to server */ int startedInput = 0; /** * Clean up the application. */ void cleanUpAndExit (int exitCode) { #ifdef WIN32 CancelIo(STDIN_FILENO); WSACleanup(); if (nailgunsocket) { closesocket(nailgunsocket); } #else close(nailgunsocket); #endif exit(exitCode); } #ifdef WIN32 /** * Handles an error. * Shows the message for the latest error then exits. */ void handleError () { LPVOID lpMsgBuf; int error = GetLastError(); FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, error, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), /* Default language */ (LPTSTR) &lpMsgBuf, 0, NULL); /* Display the string. */ MessageBox( NULL, (LPCTSTR)lpMsgBuf, "Error", MB_OK | MB_ICONERROR ); /* Free the buffer. */ LocalFree( lpMsgBuf ); cleanUpAndExit(error); } #endif /** * Writes everything in the specified buffer to the specified * socket handle. * * @param s the socket descriptor * @param buf the buffer containing the data to send * @param len the number of bytes to send. Also used to * return the number of bytes sent. * @return total bytes written or 0 if failure */ int sendAll(SOCKET s, char *buf, int len) { int total = 0; int bytesleft = len; int n = 0; while(total < len) { n = send(s, buf+total, bytesleft, 0); if (n == -1) { break; } total += n; bytesleft -= n; } return n==-1 ? 0:total; } /** * Sends a chunk header noting the specified payload size and chunk type. * * @param size the payload size * @param chunkType the chunk type identifier */ void sendHeader(unsigned int size, char chunkType) { /* buffer used for reading and writing chunk headers */ char header[CHUNK_HEADER_LEN]; header[0] = (size >> 24) & 0xff; header[1] = (size >> 16) & 0xff; header[2] = (size >> 8) & 0xff; header[3] = size & 0xff; header[4] = chunkType; sendAll(nailgunsocket, header, CHUNK_HEADER_LEN); } /** * Sends the contents of the specified file as a long argument (--nailgun-filearg) * This is sent as one or more chunks of type CHUNK_LONGARG. The end of the argument * is indicated by an empty chunk. * * @param filename the name of the file to send. * @return nonzero on failure */ int sendFileArg(char *filename) { int i, f; if ((f = open(filename, O_RDONLY)) < 0) { perror("--nailgun-filearg"); return 1; } i = read(f, buf, BUFSIZE); while (i > 0) { sendHeader(i, CHUNKTYPE_LONGARG); sendAll(nailgunsocket, buf, i); i = read(f, buf, BUFSIZE); } if (i < 0) { perror("--nailgun-filearg"); return 1; } sendHeader(0, CHUNKTYPE_LONGARG); close(f); return 0; } /** * Sends a null-terminated string with the specified chunk type. * * @param chunkType the chunk type identifier * @param text the null-terminated string to send */ void sendText(char chunkType, char *text) { int len = text ? strlen(text) : 0; sendHeader(len, chunkType); sendAll(nailgunsocket, text, len); } /** * Exits the client if the nailgun server ungracefully shut down the connection. */ void handleSocketClose() { cleanUpAndExit(NAILGUN_CONNECTION_BROKEN); } /** * Receives len bytes from the nailgun socket and copies them to the specified file descriptor. * Used to route data to stdout or stderr on the client. * * @param destFD the destination file descriptor (stdout or stderr) * @param len the number of bytes to copy */ void recvToFD(HANDLE destFD, char *buf, unsigned long len) { unsigned long bytesRead = 0; int bytesCopied; while (bytesRead < len) { unsigned long bytesRemaining = len - bytesRead; int bytesToRead = (BUFSIZE < bytesRemaining) ? BUFSIZE : bytesRemaining; int thisPass = 0; thisPass = recv(nailgunsocket, buf, bytesToRead, MSG_WAITALL); if (thisPass < bytesToRead) handleSocketClose(); bytesRead += thisPass; bytesCopied = 0; while(bytesCopied < thisPass) { #ifdef WIN32 DWORD thisWrite = 0; WriteFile(destFD, buf + bytesCopied, thisPass - bytesCopied, &thisWrite, NULL); if (thisWrite < 0) { break; } bytesCopied += thisWrite; #else bytesCopied += write(destFD, buf + bytesCopied, thisPass - bytesCopied); #endif } } } /** * Processes an exit chunk from the server. This is just a string * containing the exit code in decimal format. It should fit well * within our buffer, so assume that it does. * * @param len the current length of the buffer containing the exit code. */ void processExit(char *buf, unsigned long len) { int exitcode; int bytesToRead = (BUFSIZE - 1 < len) ? BUFSIZE - 1 : len; int bytesRead = recv(nailgunsocket, buf, bytesToRead, MSG_WAITALL); if (bytesRead < 0) { handleSocketClose(); } buf[bytesRead] = 0; exitcode = atoi(buf); cleanUpAndExit(exitcode); } /** * Sends len bytes from buf to the nailgun server in a stdin chunk. * * @param buf the bytes to send * @param len the number of bytes to send */ void sendStdin(char *buf, unsigned int len) { sendHeader(len, CHUNKTYPE_STDIN); sendAll(nailgunsocket, buf, len); } /** * Sends a stdin-eof chunk to the nailgun server */ void processEof() { sendHeader(0, CHUNKTYPE_STDIN_EOF); } #ifdef WIN32 /** * Thread main for reading from stdin and sending */ DWORD WINAPI processStdin (LPVOID lpParameter) { /* buffer used for reading and sending stdin chunks */ char wbuf[BUFSIZE]; for (;;) { DWORD numberOfBytes = 0; if (!ReadFile(NG_STDIN_FILENO, wbuf, BUFSIZE, &numberOfBytes, NULL)) { if (numberOfBytes != 0) { handleError(); } } if (numberOfBytes > 0) { sendStdin(wbuf, numberOfBytes); } else { processEof(); break; } } return 0; } #else /** * Reads from stdin and transmits it to the nailgun server in a stdin chunk. * Sends a stdin-eof chunk if necessary. * * @return zero if eof has been reached. */ int processStdin() { int bytesread = read(STDIN_FILENO, buf, BUFSIZE); if (bytesread > 0) { sendStdin(buf, bytesread); } else if (bytesread == 0) { processEof(); } return(bytesread); } #endif #ifdef WIN32 /** * Initialise Windows sockets */ void initSockets () { WSADATA win_socket_data; /* required to initialise winsock */ WSAStartup(2, &win_socket_data); } #endif #ifdef WIN32 /** * Initialise the asynchronous io. */ void initIo () { /* create non-blocking console io */ AllocConsole(); NG_STDIN_FILENO = GetStdHandle(STD_INPUT_HANDLE); NG_STDOUT_FILENO = GetStdHandle(STD_OUTPUT_HANDLE); NG_STDERR_FILENO = GetStdHandle(STD_ERROR_HANDLE); } #endif #ifdef WIN32 /** * Initialise the asynchronous io. */ void winStartInput () { SECURITY_ATTRIBUTES securityAttributes; DWORD threadId = 0; securityAttributes.bInheritHandle = TRUE; securityAttributes.lpSecurityDescriptor = NULL; securityAttributes.nLength = 0; if (!CreateThread(&securityAttributes, 0, &processStdin, NULL, 0, &threadId)) { handleError(); } } #endif /** * Processes data from the nailgun server. */ void processnailgunstream() { /*for (;;) {*/ int bytesRead = 0; unsigned long len; char chunkType; bytesRead = recv(nailgunsocket, buf, CHUNK_HEADER_LEN, MSG_WAITALL); if (bytesRead < CHUNK_HEADER_LEN) { handleSocketClose(); } len = ((buf[0] << 24) & 0xff000000) | ((buf[1] << 16) & 0x00ff0000) | ((buf[2] << 8) & 0x0000ff00) | ((buf[3]) & 0x000000ff); chunkType = buf[4]; switch(chunkType) { case CHUNKTYPE_STDOUT: recvToFD(NG_STDOUT_FILENO, buf, len); break; case CHUNKTYPE_STDERR: recvToFD(NG_STDERR_FILENO, buf, len); break; case CHUNKTYPE_EXIT: processExit(buf, len); break; case CHUNKTYPE_STARTINPUT: if (!startedInput) { #ifdef WIN32 winStartInput(); #endif startedInput = 1; } break; default: fprintf(stderr, "Unexpected chunk type %d ('%c')\n", chunkType, chunkType); cleanUpAndExit(NAILGUN_UNEXPECTED_CHUNKTYPE); } /*}*/ } /** * Trims any path info from the beginning of argv[0] to determine * the name used to launch the client. * * @param s argv[0] */ char *shortClientName(char *s) { char *result = strrchr(s, FILE_SEPARATOR); return ((result == NULL) ? s : result + 1); } /** * Returns true if the specified string is the name of the nailgun * client. The comparison is made case-insensitively for windows. * * @param s the program name to check */ int isNailgunClientName(char *s) { #ifdef WIN32 return (!strcasecmp(s, NAILGUN_CLIENT_NAME) || !strcasecmp(s, NAILGUN_CLIENT_NAME_EXE)); #else return(!(strcmp(s, NAILGUN_CLIENT_NAME))); #endif } /** * Displays usage info and bails */ void usage(int exitcode) { fprintf(stderr, "NailGun v%s\n\n", NAILGUN_VERSION); fprintf(stderr, "Usage: ng class [--nailgun-options] [args]\n"); fprintf(stderr, " (to execute a class)\n"); fprintf(stderr, " or: ng alias [--nailgun-options] [args]\n"); fprintf(stderr, " (to execute an aliased class)\n"); fprintf(stderr, " or: alias [--nailgun-options] [args]\n"); fprintf(stderr, " (to execute an aliased class, where \"alias\"\n"); fprintf(stderr, " is both the alias for the class and a symbolic\n"); fprintf(stderr, " link to the ng client)\n\n"); fprintf(stderr, "where options include:\n"); fprintf(stderr, " --nailgun-D<name>=<value> set/override a client environment variable\n"); fprintf(stderr, " --nailgun-version print product version and exit\n"); fprintf(stderr, " --nailgun-showversion print product version and continue\n"); fprintf(stderr, " --nailgun-server to specify the address of the nailgun server\n"); fprintf(stderr, " (default is NAILGUN_SERVER environment variable\n"); fprintf(stderr, " if set, otherwise localhost)\n"); fprintf(stderr, " --nailgun-port to specify the port of the nailgun server\n"); fprintf(stderr, " (default is NAILGUN_PORT environment variable\n"); fprintf(stderr, " if set, otherwise 2113)\n"); fprintf(stderr, " --nailgun-filearg FILE places the entire contents of FILE into the\n"); fprintf(stderr, " next argument, which is interpreted as a string\n"); fprintf(stderr, " using the server's default character set. May be\n"); fprintf(stderr, " specified more than once.\n"); fprintf(stderr, " --nailgun-help print this message and exit\n"); cleanUpAndExit(exitcode); } int main(int argc, char *argv[], char *env[]) { int i; struct sockaddr_in server_addr; char *nailgun_server; /* server as specified by user */ char *nailgun_port; /* port as specified by user */ char *cwd; u_short port; /* port */ struct hostent *hostinfo; char *cmd; int firstArgIndex; /* the first argument _to pass to the server_ */ #ifndef WIN32 fd_set readfds; int eof = 0; #endif #ifdef WIN32 initSockets(); #endif /* start with environment variable. default to localhost if not defined. */ nailgun_server = getenv("NAILGUN_SERVER"); if (nailgun_server == NULL) { nailgun_server = "127.0.0.1"; } /* start with environment variable. default to normal nailgun port if not defined */ nailgun_port = getenv("NAILGUN_PORT"); if (nailgun_port == NULL) { nailgun_port = NAILGUN_PORT_DEFAULT; } /* look at the command used to launch this program. if it was "ng", then the actual command to issue to the server must be specified as another argument. if it wasn't ng, assume that the desired command name was symlinked to ng in the user's filesystem, and use the symlink name (without path info) as the command for the server. */ cmd = shortClientName(argv[0]); if (isNailgunClientName(cmd)) { cmd = NULL; } /* if executing just the ng client with no arguments or -h|--help, then display usage and exit. Don't handle -h|--help if a command other than ng or ng.exe was used, since the appropriate nail should then handle --help. */ if (cmd == NULL && (argc == 1 || (argc == 2 && strcmp("--help", argv[1]) == 0) || (argc == 2 && strcmp("-h", argv[1]) == 0))) usage(0); firstArgIndex = 1; /* quite possibly the lamest commandline parsing ever. look for the two args we care about (--nailgun-server and --nailgun-port) and NULL them and their parameters after reading them if found. later, when we send args to the server, skip the null args. */ for (i = 1; i < argc; ++i) { if (!strcmp("--nailgun-server", argv[i])) { if (i == argc - 1) usage(NAILGUN_BAD_ARGUMENTS); nailgun_server = argv[i + 1]; argv[i] = argv[i + 1] = NULL; ++i; } else if(!strcmp("--nailgun-port", argv[i])) { if (i == argc - 1) usage(NAILGUN_BAD_ARGUMENTS); nailgun_port = argv[i + 1]; argv[i] = argv[i + 1]= NULL; ++i; } else if (!strcmp("--nailgun-filearg", argv[i])) { /* just verify usage here. do the rest when sending args. */ if (i == argc - 1) usage (NAILGUN_BAD_ARGUMENTS); } else if (!strcmp("--nailgun-version", argv[i])) { printf("NailGun client version %s\n", NAILGUN_VERSION); cleanUpAndExit(0); } else if (!strcmp("--nailgun-showversion", argv[i])) { printf("NailGun client version %s\n", NAILGUN_VERSION); argv[i] = NULL; } else if (!strcmp("--nailgun-help", argv[i])) { usage(0); } else if (cmd == NULL) { cmd = argv[i]; firstArgIndex = i + 1; } } /* if there's no command, we should only display usage info if the version number was not displayed. */ if (cmd == NULL) { usage(NAILGUN_BAD_ARGUMENTS); } /* jump through a series of connection hoops */ hostinfo = gethostbyname(nailgun_server); if (hostinfo == NULL) { fprintf(stderr, "Unknown host: %s\n", nailgun_server); cleanUpAndExit(NAILGUN_CONNECT_FAILED); } port = atoi(nailgun_port); if ((nailgunsocket = socket(AF_INET, SOCK_STREAM, 0)) == -1) { perror("socket"); cleanUpAndExit(NAILGUN_SOCKET_FAILED); } server_addr.sin_family = AF_INET; server_addr.sin_port = htons(port); server_addr.sin_addr = *(struct in_addr *) hostinfo->h_addr; memset(&(server_addr.sin_zero), '\0', 8); if (connect(nailgunsocket, (struct sockaddr *)&server_addr, sizeof(struct sockaddr)) == -1) { perror("connect"); cleanUpAndExit(NAILGUN_CONNECT_FAILED); } /* ok, now we're connected. first send all of the command line arguments for the server, if any. remember that we may have marked some arguments NULL if we read them to specify the nailgun server and/or port */ for(i = firstArgIndex; i < argc; ++i) { if (argv[i] != NULL) { if (!strcmp("--nailgun-filearg", argv[i])) { sendFileArg(argv[++i]); } else sendText(CHUNKTYPE_ARG, argv[i]); } } /* now send environment */ sendText(CHUNKTYPE_ENV, NAILGUN_FILESEPARATOR); sendText(CHUNKTYPE_ENV, NAILGUN_PATHSEPARATOR); for(i = 0; env[i]; ++i) { sendText(CHUNKTYPE_ENV, env[i]); } /* now send the working directory */ cwd = getcwd(NULL, 0); sendText(CHUNKTYPE_DIR, cwd); free(cwd); /* and finally send the command. this marks the point at which streams are linked between client and server. */ sendText(CHUNKTYPE_CMD, cmd); /* initialise the std-* handles and the thread to send stdin to the server */ #ifdef WIN32 initIo(); #endif /* stream forwarding loop */ while(1) { #ifndef WIN32 FD_ZERO(&readfds); /* don't select on stdin if we've already reached its end */ if (startedInput && !eof) { FD_SET(NG_STDIN_FILENO, &readfds); } FD_SET(nailgunsocket, &readfds); if (select (nailgunsocket + 1, &readfds, NULL, NULL, NULL) == -1) { perror("select"); } if (FD_ISSET(nailgunsocket, &readfds)) { #endif processnailgunstream(); #ifndef WIN32 } else if (FD_ISSET(NG_STDIN_FILENO, &readfds)) { if (!processStdin()) { FD_CLR(NG_STDIN_FILENO, &readfds); eof = 1; } } #endif } /* normal termination is triggered by the server, and so occurs in processExit(), above */ }
the_stack_data/90764699.c
#include<stdio.h> int main(int argc, char const *argv[]) { int n,index[26],i,j,k,len,maxlen=0,flag=0,count=0; scanf("%d",&n); char s[n],prev,a,b; scanf("%s",s); for (i = 0; i < 26; i++) index[i]=0; for(i=0;s[i]!=0;i++) { if(index[s[i]-'a']==0) { index[s[i]-'a']=1; count++; } } if(count<2){ printf("0\n"); return 0; } for(i=0;i<26;i++) { if(index[i]==0) continue; for(j=i+1;j<26;j++) { if(index[j]==0) continue; a='a'+i; b='a'+j; prev=-1; len=0; flag=1; for (k=0;s[k]!=0; k++) { if(s[k]==a||s[k]==b) { if(prev==-1) prev=s[k]; else if(prev==s[k]) { flag=0; break; } prev=s[k]; len++; } } if(flag) if(len>maxlen) maxlen=len; } } printf("%d\n",maxlen); return 0; }
the_stack_data/231392559.c
/*--------------------------------------------------------------------*/ /*--- Reading of syms & debug info from Mach-O files. ---*/ /*--- readmacho.c ---*/ /*--------------------------------------------------------------------*/ /* This file is part of Valgrind, a dynamic binary instrumentation framework. Copyright (C) 2005-2015 Apple Inc. Greg Parker [email protected] 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. The GNU General Public License is contained in the file COPYING. */ #if defined(VGO_darwin) #include "pub_core_basics.h" #include "pub_core_vki.h" #include "pub_core_libcbase.h" #include "pub_core_libcprint.h" #include "pub_core_libcassert.h" #include "pub_core_libcfile.h" #include "pub_core_libcproc.h" #include "pub_core_aspacemgr.h" /* for mmaping debuginfo files */ #include "pub_core_machine.h" /* VG_ELF_CLASS */ #include "pub_core_options.h" #include "pub_core_oset.h" #include "pub_core_tooliface.h" /* VG_(needs) */ #include "pub_core_xarray.h" #include "pub_core_clientstate.h" #include "pub_core_debuginfo.h" #include "priv_misc.h" #include "priv_image.h" #include "priv_d3basics.h" #include "priv_tytypes.h" #include "priv_storage.h" #include "priv_readmacho.h" #include "priv_readdwarf.h" #include "priv_readdwarf3.h" /* --- !!! --- EXTERNAL HEADERS start --- !!! --- */ #include <mach-o/loader.h> #include <mach-o/nlist.h> #include <mach-o/fat.h> /* --- !!! --- EXTERNAL HEADERS end --- !!! --- */ #if VG_WORDSIZE == 4 # define MAGIC MH_MAGIC # define MACH_HEADER mach_header # define LC_SEGMENT_CMD LC_SEGMENT # define SEGMENT_COMMAND segment_command # define SECTION section # define NLIST nlist #else # define MAGIC MH_MAGIC_64 # define MACH_HEADER mach_header_64 # define LC_SEGMENT_CMD LC_SEGMENT_64 # define SEGMENT_COMMAND segment_command_64 # define SECTION section_64 # define NLIST nlist_64 #endif /*------------------------------------------------------------*/ /*--- ---*/ /*--- Mach-O file mapping/unmapping helpers ---*/ /*--- ---*/ /*------------------------------------------------------------*/ /* A DiSlice is used to handle the thin/fat distinction for MachO images. (1) the entire mapped-in ("primary") image, fat headers, kitchen sink, whatnot: the entire file. This is the DiImage* that is the backing for the DiSlice. (2) the Mach-O object of interest, which is presumably somewhere inside the primary image. map_image_aboard() below, which generates this info, will carefully check that the macho_ fields denote a section of memory that falls entirely inside the primary image. */ Bool ML_(is_macho_object_file)( const void* buf, SizeT szB ) { /* (JRS: the Mach-O headers might not be in this mapped data, because we only mapped a page for this initial check, or at least not very much, and what's at the start of the file is in general a so-called fat header. The Mach-O object we're interested in could be arbitrarily far along the image, and so we can't assume its header will fall within this page.) */ /* But we can say that either it's a fat object, in which case it begins with a fat header, or it's unadorned Mach-O, in which case it starts with a normal header. At least do what checks we can to establish whether or not we're looking at something sane. */ const struct fat_header* fh_be = buf; const struct MACH_HEADER* mh = buf; vg_assert(buf); if (szB < sizeof(struct fat_header)) return False; if (VG_(ntohl)(fh_be->magic) == FAT_MAGIC) return True; if (szB < sizeof(struct MACH_HEADER)) return False; if (mh->magic == MAGIC) return True; return False; } /* Unmap an image mapped in by map_image_aboard. */ static void unmap_image ( /*MOD*/DiSlice* sli ) { vg_assert(sli); if (ML_(sli_is_valid)(*sli)) { ML_(img_done)(sli->img); *sli = DiSlice_INVALID; } } /* Open the given file, find the thin part if necessary, do some checks, and return a DiSlice containing details of both the thin part and (implicitly, via the contained DiImage*) the fat part. returns DiSlice_INVALID if it fails. If it succeeds, the returned slice is guaranteed to refer to a valid(ish) Mach-O image. */ static DiSlice map_image_aboard ( DebugInfo* di, /* only for err msgs */ const HChar* filename ) { DiSlice sli = DiSlice_INVALID; /* First off, try to map the thing in. */ DiImage* mimg = ML_(img_from_local_file)(filename); if (mimg == NULL) { VG_(message)(Vg_UserMsg, "warning: connection to image %s failed\n", filename ); VG_(message)(Vg_UserMsg, " no symbols or debug info loaded\n" ); return DiSlice_INVALID; } /* Now we have a viable DiImage* for it. Look for the embedded Mach-O object. If not findable, close the image and fail. */ DiOffT fh_be_ioff = 0; struct fat_header fh_be; struct fat_header fh; // Assume initially that we have a thin image, and narrow // the bounds if it turns out to be fat. This stores |mimg| as // |sli.img|, so NULL out |mimg| after this point, for the sake of // clarity. sli = ML_(sli_from_img)(mimg); mimg = NULL; // Check for fat header. if (ML_(img_size)(sli.img) < sizeof(struct fat_header)) { ML_(symerr)(di, True, "Invalid Mach-O file (0 too small)."); goto close_and_fail; } // Fat header is always BIG-ENDIAN ML_(img_get)(&fh_be, sli.img, fh_be_ioff, sizeof(fh_be)); VG_(memset)(&fh, 0, sizeof(fh)); fh.magic = VG_(ntohl)(fh_be.magic); fh.nfat_arch = VG_(ntohl)(fh_be.nfat_arch); if (fh.magic == FAT_MAGIC) { // Look for a good architecture. if (ML_(img_size)(sli.img) < sizeof(struct fat_header) + fh.nfat_arch * sizeof(struct fat_arch)) { ML_(symerr)(di, True, "Invalid Mach-O file (1 too small)."); goto close_and_fail; } DiOffT arch_be_ioff; Int f; for (f = 0, arch_be_ioff = sizeof(struct fat_header); f < fh.nfat_arch; f++, arch_be_ioff += sizeof(struct fat_arch)) { # if defined(VGA_ppc) Int cputype = CPU_TYPE_POWERPC; # elif defined(VGA_ppc64be) Int cputype = CPU_TYPE_POWERPC64BE; # elif defined(VGA_ppc64le) Int cputype = CPU_TYPE_POWERPC64LE; # elif defined(VGA_x86) Int cputype = CPU_TYPE_X86; # elif defined(VGA_amd64) Int cputype = CPU_TYPE_X86_64; # else # error "unknown architecture" # endif struct fat_arch arch_be; struct fat_arch arch; ML_(img_get)(&arch_be, sli.img, arch_be_ioff, sizeof(arch_be)); VG_(memset)(&arch, 0, sizeof(arch)); arch.cputype = VG_(ntohl)(arch_be.cputype); arch.cpusubtype = VG_(ntohl)(arch_be.cpusubtype); arch.offset = VG_(ntohl)(arch_be.offset); arch.size = VG_(ntohl)(arch_be.size); if (arch.cputype == cputype) { if (ML_(img_size)(sli.img) < arch.offset + arch.size) { ML_(symerr)(di, True, "Invalid Mach-O file (2 too small)."); goto close_and_fail; } /* Found a suitable arch. Narrow down the slice accordingly. */ sli.ioff = arch.offset; sli.szB = arch.size; break; } } if (f == fh.nfat_arch) { ML_(symerr)(di, True, "No acceptable architecture found in fat file."); goto close_and_fail; } } /* Sanity check what we found. */ /* assured by logic above */ vg_assert(ML_(img_size)(sli.img) >= sizeof(struct fat_header)); if (sli.szB < sizeof(struct MACH_HEADER)) { ML_(symerr)(di, True, "Invalid Mach-O file (3 too small)."); goto close_and_fail; } if (sli.szB > ML_(img_size)(sli.img)) { ML_(symerr)(di, True, "Invalid Mach-O file (thin bigger than fat)."); goto close_and_fail; } if (sli.ioff >= 0 && sli.ioff + sli.szB <= ML_(img_size)(sli.img)) { /* thin entirely within fat, as expected */ } else { ML_(symerr)(di, True, "Invalid Mach-O file (thin not inside fat)."); goto close_and_fail; } /* Peer at the Mach header for the thin object, starting at the beginning of the slice, to check it's at least marginally sane. */ struct MACH_HEADER mh; ML_(cur_read_get)(&mh, ML_(cur_from_sli)(sli), sizeof(mh)); if (mh.magic != MAGIC) { ML_(symerr)(di, True, "Invalid Mach-O file (bad magic)."); goto close_and_fail; } if (sli.szB < sizeof(struct MACH_HEADER) + mh.sizeofcmds) { ML_(symerr)(di, True, "Invalid Mach-O file (4 too small)."); goto close_and_fail; } /* "main image is plausible" */ vg_assert(sli.img); vg_assert(ML_(img_size)(sli.img) > 0); /* "thin image exists and is a sub-part (or all) of main image" */ vg_assert(sli.ioff >= 0); vg_assert(sli.szB > 0); vg_assert(sli.ioff + sli.szB <= ML_(img_size)(sli.img)); return sli; /* success */ /*NOTREACHED*/ close_and_fail: unmap_image(&sli); return DiSlice_INVALID; /* bah! */ } /*------------------------------------------------------------*/ /*--- ---*/ /*--- Mach-O symbol table reading ---*/ /*--- ---*/ /*------------------------------------------------------------*/ /* Read a symbol table (nlist). Add the resulting candidate symbols to 'syms'; the caller will post-process them and hand them off to ML_(addSym) itself. */ static void read_symtab( /*OUT*/XArray* /* DiSym */ syms, struct _DebugInfo* di, DiCursor symtab_cur, UInt symtab_count, DiCursor strtab_cur, UInt strtab_sz ) { Int i; DiSym disym; // "start_according_to_valgrind" static const HChar* s_a_t_v = NULL; /* do not make non-static */ for (i = 0; i < symtab_count; i++) { struct NLIST nl; ML_(cur_read_get)(&nl, ML_(cur_plus)(symtab_cur, i * sizeof(struct NLIST)), sizeof(nl)); Addr sym_addr = 0; if ((nl.n_type & N_TYPE) == N_SECT) { sym_addr = di->text_bias + nl.n_value; /*} else if ((nl.n_type & N_TYPE) == N_ABS) { GrP fixme don't ignore absolute symbols? sym_addr = nl.n_value; */ } else { continue; } if (di->trace_symtab) { HChar* str = ML_(cur_read_strdup)( ML_(cur_plus)(strtab_cur, nl.n_un.n_strx), "di.read_symtab.1"); VG_(printf)("nlist raw: avma %010lx %s\n", sym_addr, str ); ML_(dinfo_free)(str); } /* If no part of the symbol falls within the mapped range, ignore it. */ if (sym_addr <= di->text_avma || sym_addr >= di->text_avma+di->text_size) { continue; } /* skip names which point outside the string table; following these risks segfaulting Valgrind */ if (nl.n_un.n_strx < 0 || nl.n_un.n_strx >= strtab_sz) { continue; } HChar* name = ML_(cur_read_strdup)( ML_(cur_plus)(strtab_cur, nl.n_un.n_strx), "di.read_symtab.2"); /* skip nameless symbols; these appear to be common, but useless */ if (*name == 0) { ML_(dinfo_free)(name); continue; } VG_(bzero_inline)(&disym, sizeof(disym)); disym.avmas.main = sym_addr; SET_TOCPTR_AVMA(disym, 0); SET_LOCAL_EP_AVMA(disym, 0); disym.pri_name = ML_(addStr)(di, name, -1); disym.sec_names = NULL; disym.size = // let canonicalize fix it di->text_avma+di->text_size - sym_addr; disym.isText = True; disym.isIFunc = False; disym.isGlobal = False; // Lots of user function names get prepended with an underscore. Eg. the // function 'f' becomes the symbol '_f'. And the "below main" // function is called "start". So we skip the leading underscore, and // if we see 'start' and --show-below-main=no, we rename it as // "start_according_to_valgrind", which makes it easy to spot later // and display as "(below main)". if (disym.pri_name[0] == '_') { disym.pri_name++; } else if (!VG_(clo_show_below_main) && VG_STREQ(disym.pri_name, "start")) { if (s_a_t_v == NULL) s_a_t_v = ML_(addStr)(di, "start_according_to_valgrind", -1); vg_assert(s_a_t_v); disym.pri_name = s_a_t_v; } vg_assert(disym.pri_name); VG_(addToXA)( syms, &disym ); ML_(dinfo_free)(name); } } /* Compare DiSyms by their start address, and for equal addresses, use the primary name as a secondary sort key. */ static Int cmp_DiSym_by_start_then_name ( const void* v1, const void* v2 ) { const DiSym* s1 = (const DiSym*)v1; const DiSym* s2 = (const DiSym*)v2; if (s1->avmas.main < s2->avmas.main) return -1; if (s1->avmas.main > s2->avmas.main) return 1; return VG_(strcmp)(s1->pri_name, s2->pri_name); } /* 'cand' is a bunch of candidate symbols obtained by reading nlist-style symbol table entries. Their ends may overlap, so sort them and truncate them accordingly. The code in this routine is copied almost verbatim from read_symbol_table() in readxcoff.c. */ static void tidy_up_cand_syms ( /*MOD*/XArray* /* of DiSym */ syms, Bool trace_symtab ) { Word nsyms, i, j, k, m; nsyms = VG_(sizeXA)(syms); VG_(setCmpFnXA)(syms, cmp_DiSym_by_start_then_name); VG_(sortXA)(syms); /* We only know for sure the start addresses (actual VMAs) of symbols, and an overestimation of their end addresses. So sort by start address, then clip each symbol so that its end address does not overlap with the next one along. There is a small refinement: if a group of symbols have the same address, treat them as a group: find the next symbol along that has a higher start address, and clip all of the group accordingly. This clips the group as a whole so as not to overlap following symbols. This leaves prefersym() in storage.c, which is not nlist-specific, to later decide which of the symbols in the group to keep. Another refinement is that we need to get rid of symbols which, after clipping, have identical starts, ends, and names. So the sorting uses the name as a secondary key. */ for (i = 0; i < nsyms; i++) { for (k = i+1; k < nsyms && ((DiSym*)VG_(indexXA)(syms,i))->avmas.main == ((DiSym*)VG_(indexXA)(syms,k))->avmas.main; k++) ; /* So now [i .. k-1] is a group all with the same start address. Clip their ending addresses so they don't overlap [k]. In the normal case (no overlaps), k == i+1. */ if (k < nsyms) { DiSym* next = (DiSym*)VG_(indexXA)(syms,k); for (m = i; m < k; m++) { DiSym* here = (DiSym*)VG_(indexXA)(syms,m); vg_assert(here->avmas.main < next->avmas.main); if (here->avmas.main + here->size > next->avmas.main) here->size = next->avmas.main - here->avmas.main; } } i = k-1; vg_assert(i <= nsyms); } j = 0; if (nsyms > 0) { j = 1; for (i = 1; i < nsyms; i++) { DiSym *s_j1, *s_j, *s_i; vg_assert(j <= i); s_j1 = (DiSym*)VG_(indexXA)(syms, j-1); s_j = (DiSym*)VG_(indexXA)(syms, j); s_i = (DiSym*)VG_(indexXA)(syms, i); if (s_i->avmas.main != s_j1->avmas.main || s_i->size != s_j1->size || 0 != VG_(strcmp)(s_i->pri_name, s_j1->pri_name)) { *s_j = *s_i; j++; } else { if (trace_symtab) VG_(printf)("nlist cleanup: dump duplicate avma %010lx %s\n", s_i->avmas.main, s_i->pri_name ); } } } vg_assert(j >= 0 && j <= nsyms); VG_(dropTailXA)(syms, nsyms - j); } /*------------------------------------------------------------*/ /*--- ---*/ /*--- Mach-O top-level processing ---*/ /*--- ---*/ /*------------------------------------------------------------*/ #if !defined(APPLE_DSYM_EXT_AND_SUBDIRECTORY) #define APPLE_DSYM_EXT_AND_SUBDIRECTORY ".dSYM/Contents/Resources/DWARF/" #endif static Bool file_exists_p(const HChar *path) { struct vg_stat sbuf; SysRes res = VG_(stat)(path, &sbuf); return sr_isError(res) ? False : True; } /* Search for an existing dSYM file as a possible separate debug file. Adapted from gdb. */ static HChar * find_separate_debug_file (const HChar *executable_name) { const HChar *basename_str; HChar *dot_ptr; HChar *slash_ptr; HChar *dsymfile; /* Make sure the object file name itself doesn't contain ".dSYM" in it or we will end up with an infinite loop where after we add a dSYM symbol file, it will then enter this function asking if there is a debug file for the dSYM file itself. */ if (VG_(strcasestr) (executable_name, ".dSYM") == NULL) { /* Check for the existence of a .dSYM file for a given executable. */ basename_str = VG_(basename) (executable_name); dsymfile = ML_(dinfo_zalloc)("di.readmacho.dsymfile", VG_(strlen) (executable_name) + VG_(strlen) (APPLE_DSYM_EXT_AND_SUBDIRECTORY) + VG_(strlen) (basename_str) + 1 ); /* First try for the dSYM in the same directory as the original file. */ VG_(strcpy) (dsymfile, executable_name); VG_(strcat) (dsymfile, APPLE_DSYM_EXT_AND_SUBDIRECTORY); VG_(strcat) (dsymfile, basename_str); if (file_exists_p (dsymfile)) return dsymfile; /* Now search for any parent directory that has a '.' in it so we can find Mac OS X applications, bundles, plugins, and any other kinds of files. Mac OS X application bundles wil have their program in "/some/path/MyApp.app/Contents/MacOS/MyApp" (or replace ".app" with ".bundle" or ".plugin" for other types of bundles). So we look for any prior '.' character and try appending the apple dSYM extension and subdirectory and see if we find an existing dSYM file (in the above MyApp example the dSYM would be at either: "/some/path/MyApp.app.dSYM/Contents/Resources/DWARF/MyApp" or "/some/path/MyApp.dSYM/Contents/Resources/DWARF/MyApp". */ VG_(strcpy) (dsymfile, VG_(dirname) (executable_name)); while ((dot_ptr = VG_(strrchr) (dsymfile, '.'))) { /* Find the directory delimiter that follows the '.' character since we now look for a .dSYM that follows any bundle extension. */ slash_ptr = VG_(strchr) (dot_ptr, '/'); if (slash_ptr) { /* NULL terminate the string at the '/' character and append the path down to the dSYM file. */ *slash_ptr = '\0'; VG_(strcat) (slash_ptr, APPLE_DSYM_EXT_AND_SUBDIRECTORY); VG_(strcat) (slash_ptr, basename_str); if (file_exists_p (dsymfile)) return dsymfile; } /* NULL terminate the string at the '.' character and append the path down to the dSYM file. */ *dot_ptr = '\0'; VG_(strcat) (dot_ptr, APPLE_DSYM_EXT_AND_SUBDIRECTORY); VG_(strcat) (dot_ptr, basename_str); if (file_exists_p (dsymfile)) return dsymfile; /* NULL terminate the string at the '.' locatated by the strrchr() function again. */ *dot_ptr = '\0'; /* We found a previous extension '.' character and did not find a dSYM file so now find previous directory delimiter so we don't try multiple times on a file name that may have a version number in it such as "/some/path/MyApp.6.0.4.app". */ slash_ptr = VG_(strrchr) (dsymfile, '/'); if (!slash_ptr) break; /* NULL terminate the string at the previous directory character and search again. */ *slash_ptr = '\0'; } } return NULL; } /* Given a DiSlice covering the entire Mach-O thin image, find the DiSlice for the specified (segname, sectname) pairing, if possible. Also return the section's .addr field in *svma if svma is non-NULL. */ static DiSlice getsectdata ( DiSlice img, const HChar *segname, const HChar *sectname, /*OUT*/Addr* svma ) { DiCursor cur = ML_(cur_from_sli)(img); struct MACH_HEADER mh; ML_(cur_step_get)(&mh, &cur, sizeof(mh)); Int c; for (c = 0; c < mh.ncmds; c++) { struct load_command cmd; ML_(cur_read_get)(&cmd, cur, sizeof(cmd)); if (cmd.cmd == LC_SEGMENT_CMD) { struct SEGMENT_COMMAND seg; ML_(cur_read_get)(&seg, cur, sizeof(seg)); if (0 == VG_(strncmp)(&seg.segname[0], segname, sizeof(seg.segname))) { DiCursor sects_cur = ML_(cur_plus)(cur, sizeof(seg)); Int s; for (s = 0; s < seg.nsects; s++) { struct SECTION sect; ML_(cur_step_get)(&sect, &sects_cur, sizeof(sect)); if (0 == VG_(strncmp)(sect.sectname, sectname, sizeof(sect.sectname))) { DiSlice res = img; res.ioff = sect.offset; res.szB = sect.size; if (svma) *svma = (Addr)sect.addr; return res; } } } } cur = ML_(cur_plus)(cur, cmd.cmdsize); } return DiSlice_INVALID; } /* Brute force just simply search for uuid[0..15] in |sli| */ static Bool check_uuid_matches ( DiSlice sli, UChar* uuid ) { if (sli.szB < 16) return False; /* Work through the slice in 1 KB chunks. */ UChar first = uuid[0]; DiOffT min_off = sli.ioff; DiOffT max1_off = sli.ioff + sli.szB; DiOffT curr_off = min_off; vg_assert(min_off < max1_off); while (1) { vg_assert(curr_off >= min_off && curr_off <= max1_off); if (curr_off == max1_off) break; DiOffT avail = max1_off - curr_off; vg_assert(avail > 0 && avail <= max1_off); if (avail > 1024) avail = 1024; UChar buf[1024]; SizeT nGot = ML_(img_get_some)(buf, sli.img, curr_off, avail); vg_assert(nGot >= 1 && nGot <= avail); UInt i; /* Scan through the 1K chunk we got, looking for the start char. */ for (i = 0; i < (UInt)nGot; i++) { if (LIKELY(buf[i] != first)) continue; /* first char matches. See if we can get 16 bytes at this offset, and compare. */ if (curr_off + i < max1_off && max1_off - (curr_off + i) >= 16) { UChar buff16[16]; ML_(img_get)(&buff16[0], sli.img, curr_off + i, 16); if (0 == VG_(memcmp)(&buff16[0], &uuid[0], 16)) return True; } } curr_off += nGot; } return False; } /* Heuristic kludge: return True if this looks like an installed standard library; hence we shouldn't consider automagically running dsymutil on it. */ static Bool is_systemish_library_name ( const HChar* name ) { vg_assert(name); if (0 == VG_(strncasecmp)(name, "/usr/", 5) || 0 == VG_(strncasecmp)(name, "/bin/", 5) || 0 == VG_(strncasecmp)(name, "/sbin/", 6) || 0 == VG_(strncasecmp)(name, "/opt/", 5) || 0 == VG_(strncasecmp)(name, "/sw/", 4) || 0 == VG_(strncasecmp)(name, "/System/", 8) || 0 == VG_(strncasecmp)(name, "/Library/", 9) || 0 == VG_(strncasecmp)(name, "/Applications/", 14)) { return True; } else { return False; } } Bool ML_(read_macho_debug_info)( struct _DebugInfo* di ) { DiSlice msli = DiSlice_INVALID; // the main image DiSlice dsli = DiSlice_INVALID; // the debuginfo image DiCursor sym_cur = DiCursor_INVALID; DiCursor dysym_cur = DiCursor_INVALID; HChar* dsymfilename = NULL; Bool have_uuid = False; UChar uuid[16]; Word i; const DebugInfoMapping* rx_map = NULL; const DebugInfoMapping* rw_map = NULL; /* mmap the object file to look for di->soname and di->text_bias and uuid and nlist */ /* This should be ensured by our caller (that we're in the accept state). */ vg_assert(di->fsm.have_rx_map); vg_assert(di->fsm.have_rw_map); for (i = 0; i < VG_(sizeXA)(di->fsm.maps); i++) { const DebugInfoMapping* map = VG_(indexXA)(di->fsm.maps, i); if (map->rx && !rx_map) rx_map = map; if (map->rw && !rw_map) rw_map = map; if (rx_map && rw_map) break; } vg_assert(rx_map); vg_assert(rw_map); if (VG_(clo_verbosity) > 1) VG_(message)(Vg_DebugMsg, "%s (rx at %#lx, rw at %#lx)\n", di->fsm.filename, rx_map->avma, rw_map->avma ); VG_(memset)(&uuid, 0, sizeof(uuid)); msli = map_image_aboard( di, di->fsm.filename ); if (!ML_(sli_is_valid)(msli)) { ML_(symerr)(di, False, "Connect to main image failed."); goto fail; } vg_assert(msli.img != NULL && msli.szB > 0); /* Poke around in the Mach-O header, to find some important stuff. */ // Find LC_SYMTAB and LC_DYSYMTAB, if present. // Read di->soname from LC_ID_DYLIB if present, // or from LC_ID_DYLINKER if present, // or use "NONE". // Get di->text_bias (aka slide) based on the corresponding LC_SEGMENT // Get uuid for later dsym search di->text_bias = 0; { DiCursor cmd_cur = ML_(cur_from_sli)(msli); struct MACH_HEADER mh; ML_(cur_step_get)(&mh, &cmd_cur, sizeof(mh)); /* Now cur_cmd points just after the Mach header, right at the start of the load commands, which is where we need it to start the following loop. */ Int c; for (c = 0; c < mh.ncmds; c++) { struct load_command cmd; ML_(cur_read_get)(&cmd, cmd_cur, sizeof(cmd)); if (cmd.cmd == LC_SYMTAB) { sym_cur = cmd_cur; } else if (cmd.cmd == LC_DYSYMTAB) { dysym_cur = cmd_cur; } else if (cmd.cmd == LC_ID_DYLIB && mh.filetype == MH_DYLIB) { // GrP fixme bundle? struct dylib_command dcmd; ML_(cur_read_get)(&dcmd, cmd_cur, sizeof(dcmd)); DiCursor dylibname_cur = ML_(cur_plus)(cmd_cur, dcmd.dylib.name.offset); HChar* dylibname = ML_(cur_read_strdup)(dylibname_cur, "di.rmdi.1"); HChar* soname = VG_(strrchr)(dylibname, '/'); if (!soname) soname = dylibname; else soname++; di->soname = ML_(dinfo_strdup)("di.readmacho.dylibname", soname); ML_(dinfo_free)(dylibname); } else if (cmd.cmd==LC_ID_DYLINKER && mh.filetype==MH_DYLINKER) { struct dylinker_command dcmd; ML_(cur_read_get)(&dcmd, cmd_cur, sizeof(dcmd)); DiCursor dylinkername_cur = ML_(cur_plus)(cmd_cur, dcmd.name.offset); HChar* dylinkername = ML_(cur_read_strdup)(dylinkername_cur, "di.rmdi.2"); HChar* soname = VG_(strrchr)(dylinkername, '/'); if (!soname) soname = dylinkername; else soname++; di->soname = ML_(dinfo_strdup)("di.readmacho.dylinkername", soname); ML_(dinfo_free)(dylinkername); } // A comment from Julian about why varinfo[35] fail: // // My impression is, from comparing the output of otool -l for these // executables with the logic in ML_(read_macho_debug_info), // specifically the part that begins "else if (cmd->cmd == // LC_SEGMENT_CMD) {", that it's a complete hack which just happens // to work ok for text symbols. In particular, it appears to assume // that in a "struct load_command" of type LC_SEGMENT_CMD, the first // "struct SEGMENT_COMMAND" inside it is going to contain the info we // need. However, otool -l shows, and also the Apple docs state, // that a struct load_command may contain an arbitrary number of // struct SEGMENT_COMMANDs, so I'm not sure why it's OK to merely // snarf the first. But I'm not sure about this. // // The "Try for __DATA" block below simply adds acquisition of data // svma/bias values using the same assumption. It also needs // (probably) to deal with bss sections, but I don't understand how // this all ties together really, so it requires further study. // // If you can get your head around the relationship between MachO // segments, sections and load commands, this might be relatively // easy to fix properly. // // Basically we need to come up with plausible numbers for di-> // {text,data,bss}_{avma,svma}, from which the _bias numbers are // then trivially derived. Then I think the debuginfo reader should // work pretty well. else if (cmd.cmd == LC_SEGMENT_CMD) { struct SEGMENT_COMMAND seg; ML_(cur_read_get)(&seg, cmd_cur, sizeof(seg)); /* Try for __TEXT */ if (!di->text_present && 0 == VG_(strcmp)(&seg.segname[0], "__TEXT") /* DDD: is the next line a kludge? -- JRS */ && seg.fileoff == 0 && seg.filesize != 0) { di->text_present = True; di->text_svma = (Addr)seg.vmaddr; di->text_avma = rx_map->avma; di->text_size = seg.vmsize; di->text_bias = di->text_avma - di->text_svma; /* Make the _debug_ values be the same as the svma/bias for the primary object, since there is no secondary (debuginfo) object, but nevertheless downstream biasing of Dwarf3 relies on the _debug_ values. */ di->text_debug_svma = di->text_svma; di->text_debug_bias = di->text_bias; } /* Try for __DATA */ if (!di->data_present && 0 == VG_(strcmp)(&seg.segname[0], "__DATA") /* && DDD:seg->fileoff == 0 */ && seg.filesize != 0) { di->data_present = True; di->data_svma = (Addr)seg.vmaddr; di->data_avma = rw_map->avma; di->data_size = seg.vmsize; di->data_bias = di->data_avma - di->data_svma; di->data_debug_svma = di->data_svma; di->data_debug_bias = di->data_bias; } } else if (cmd.cmd == LC_UUID) { ML_(cur_read_get)(&uuid, cmd_cur, sizeof(uuid)); have_uuid = True; } // Move the cursor along cmd_cur = ML_(cur_plus)(cmd_cur, cmd.cmdsize); } } if (!di->soname) { di->soname = ML_(dinfo_strdup)("di.readmacho.noname", "NONE"); } if (di->trace_symtab) { VG_(printf)("\n"); VG_(printf)("SONAME = %s\n", di->soname); VG_(printf)("\n"); } /* Now we have the base object to hand. Read symbols from it. */ // We already asserted that .. vg_assert(msli.img != NULL && msli.szB > 0); if (ML_(cur_is_valid)(sym_cur) && ML_(cur_is_valid)(dysym_cur)) { struct symtab_command symcmd; struct dysymtab_command dysymcmd; ML_(cur_read_get)(&symcmd, sym_cur, sizeof(symcmd)); ML_(cur_read_get)(&dysymcmd, dysym_cur, sizeof(dysymcmd)); /* Read nlist symbol table */ DiCursor syms = DiCursor_INVALID; DiCursor strs = DiCursor_INVALID; XArray* /* DiSym */ candSyms = NULL; Word nCandSyms; if (msli.szB < symcmd.stroff + symcmd.strsize || msli.szB < symcmd.symoff + symcmd.nsyms * sizeof(struct NLIST)) { ML_(symerr)(di, False, "Invalid Mach-O file (5 too small)."); goto fail; } if (dysymcmd.ilocalsym + dysymcmd.nlocalsym > symcmd.nsyms || dysymcmd.iextdefsym + dysymcmd.nextdefsym > symcmd.nsyms) { ML_(symerr)(di, False, "Invalid Mach-O file (bad symbol table)."); goto fail; } syms = ML_(cur_plus)(ML_(cur_from_sli)(msli), symcmd.symoff); strs = ML_(cur_plus)(ML_(cur_from_sli)(msli), symcmd.stroff); if (VG_(clo_verbosity) > 1) VG_(message)(Vg_DebugMsg, " reading syms from primary file (%d %d)\n", dysymcmd.nextdefsym, dysymcmd.nlocalsym ); /* Read candidate symbols into 'candSyms', so we can truncate overlapping ends and generally tidy up, before presenting them to ML_(addSym). */ candSyms = VG_(newXA)( ML_(dinfo_zalloc), "di.readmacho.candsyms.1", ML_(dinfo_free), sizeof(DiSym) ); // extern symbols read_symtab(candSyms, di, ML_(cur_plus)(syms, dysymcmd.iextdefsym * sizeof(struct NLIST)), dysymcmd.nextdefsym, strs, symcmd.strsize); // static and private_extern symbols read_symtab(candSyms, di, ML_(cur_plus)(syms, dysymcmd.ilocalsym * sizeof(struct NLIST)), dysymcmd.nlocalsym, strs, symcmd.strsize); /* tidy up the cand syms -- trim overlapping ends. May resize candSyms. */ tidy_up_cand_syms( candSyms, di->trace_symtab ); /* and finally present them to ML_(addSym) */ nCandSyms = VG_(sizeXA)( candSyms ); for (i = 0; i < nCandSyms; i++) { DiSym* cand = (DiSym*) VG_(indexXA)( candSyms, i ); vg_assert(cand->pri_name != NULL); vg_assert(cand->sec_names == NULL); if (di->trace_symtab) VG_(printf)("nlist final: acquire avma %010lx-%010lx %s\n", cand->avmas.main, cand->avmas.main + cand->size - 1, cand->pri_name ); ML_(addSym)( di, cand ); } VG_(deleteXA)( candSyms ); } /* If there's no UUID in the primary, don't even bother to try and read any DWARF, since we won't be able to verify it matches. Our policy is not to load debug info unless we can verify that it matches the primary. Just declare success at this point. And don't complain to the user, since that would cause us to complain on objects compiled without -g. (Some versions of XCode are observed to omit a UUID entry for object linked(?) without -g. Others don't appear to omit it.) */ if (!have_uuid) goto success; /* mmap the dSYM file to look for DWARF debug info. If successful, use the .macho_img and .macho_img_szB in dsli. */ dsymfilename = find_separate_debug_file( di->fsm.filename ); /* Try to load it. */ if (dsymfilename) { Bool valid; if (VG_(clo_verbosity) > 1) VG_(message)(Vg_DebugMsg, " dSYM= %s\n", dsymfilename); dsli = map_image_aboard( di, dsymfilename ); if (!ML_(sli_is_valid)(dsli)) { ML_(symerr)(di, False, "Connect to debuginfo image failed " "(first attempt)."); goto fail; } /* check it has the right uuid. */ vg_assert(have_uuid); valid = dsli.img && dsli.szB > 0 && check_uuid_matches( dsli, uuid ); if (valid) goto read_the_dwarf; if (VG_(clo_verbosity) > 1) VG_(message)(Vg_DebugMsg, " dSYM does not have " "correct UUID (out of date?)\n"); } /* There was no dsym file, or it doesn't match. We'll have to try regenerating it, unless --dsymutil=no, in which case just complain instead. */ /* If this looks like a lib that we shouldn't run dsymutil on, just give up. (possible reasons: is system lib, or in /usr etc, or the dsym dir would not be writable by the user, or we're running as root) */ vg_assert(di->fsm.filename); if (is_systemish_library_name(di->fsm.filename)) goto success; if (!VG_(clo_dsymutil)) { if (VG_(clo_verbosity) == 1) { VG_(message)(Vg_DebugMsg, "%s:\n", di->fsm.filename); } if (VG_(clo_verbosity) > 0) VG_(message)(Vg_DebugMsg, "%sdSYM directory %s; consider using " "--dsymutil=yes\n", VG_(clo_verbosity) > 1 ? " " : "", dsymfilename ? "has wrong UUID" : "is missing"); goto success; } /* Run dsymutil */ { Int r; const HChar* dsymutil = "/usr/bin/dsymutil "; HChar* cmd = ML_(dinfo_zalloc)( "di.readmacho.tmp1", VG_(strlen)(dsymutil) + VG_(strlen)(di->fsm.filename) + 32 /* misc */ ); VG_(strcpy)(cmd, dsymutil); if (0) VG_(strcat)(cmd, "--verbose "); VG_(strcat)(cmd, "\""); VG_(strcat)(cmd, di->fsm.filename); VG_(strcat)(cmd, "\""); VG_(message)(Vg_DebugMsg, "run: %s\n", cmd); r = VG_(system)( cmd ); if (r) VG_(message)(Vg_DebugMsg, "run: %s FAILED\n", dsymutil); ML_(dinfo_free)(cmd); dsymfilename = find_separate_debug_file(di->fsm.filename); } /* Try again to load it. */ if (dsymfilename) { Bool valid; if (VG_(clo_verbosity) > 1) VG_(message)(Vg_DebugMsg, " dsyms= %s\n", dsymfilename); dsli = map_image_aboard( di, dsymfilename ); if (!ML_(sli_is_valid)(dsli)) { ML_(symerr)(di, False, "Connect to debuginfo image failed " "(second attempt)."); goto fail; } /* check it has the right uuid. */ vg_assert(have_uuid); vg_assert(have_uuid); valid = dsli.img && dsli.szB > 0 && check_uuid_matches( dsli, uuid ); if (!valid) { if (VG_(clo_verbosity) > 0) { VG_(message)(Vg_DebugMsg, "WARNING: did not find expected UUID %02X%02X%02X%02X" "-%02X%02X-%02X%02X-%02X%02X-%02X%02X%02X%02X%02X%02X" " in dSYM dir\n", (UInt)uuid[0], (UInt)uuid[1], (UInt)uuid[2], (UInt)uuid[3], (UInt)uuid[4], (UInt)uuid[5], (UInt)uuid[6], (UInt)uuid[7], (UInt)uuid[8], (UInt)uuid[9], (UInt)uuid[10], (UInt)uuid[11], (UInt)uuid[12], (UInt)uuid[13], (UInt)uuid[14], (UInt)uuid[15] ); VG_(message)(Vg_DebugMsg, "WARNING: for %s\n", di->fsm.filename); } unmap_image( &dsli ); /* unmap_image zeroes out dsli, so it's safe for "fail:" to re-try unmap_image. */ goto fail; } } /* Right. Finally we have our best try at the dwarf image, so go on to reading stuff out of it. */ read_the_dwarf: if (ML_(sli_is_valid)(dsli) && dsli.szB > 0) { // "_mscn" is "mach-o section" DiSlice debug_info_mscn = getsectdata(dsli, "__DWARF", "__debug_info", NULL); DiSlice debug_abbv_mscn = getsectdata(dsli, "__DWARF", "__debug_abbrev", NULL); DiSlice debug_line_mscn = getsectdata(dsli, "__DWARF", "__debug_line", NULL); DiSlice debug_str_mscn = getsectdata(dsli, "__DWARF", "__debug_str", NULL); DiSlice debug_ranges_mscn = getsectdata(dsli, "__DWARF", "__debug_ranges", NULL); DiSlice debug_loc_mscn = getsectdata(dsli, "__DWARF", "__debug_loc", NULL); /* It appears (jrs, 2014-oct-19) that section "__eh_frame" in segment "__TEXT" appears in both the main and dsym files, but only the main one gives the right results. Since it's in the __TEXT segment, we calculate the __eh_frame avma using its svma and the text bias, and that sounds reasonable. */ Addr eh_frame_svma = 0; DiSlice eh_frame_mscn = getsectdata(msli, "__TEXT", "__eh_frame", &eh_frame_svma); if (ML_(sli_is_valid)(eh_frame_mscn)) { vg_assert(di->text_bias == di->text_debug_bias); ML_(read_callframe_info_dwarf3)(di, eh_frame_mscn, eh_frame_svma + di->text_bias, True/*is_ehframe*/); } if (ML_(sli_is_valid)(debug_info_mscn)) { if (VG_(clo_verbosity) > 1) { if (0) VG_(message)(Vg_DebugMsg, "Reading dwarf3 for %s (%#lx) from %s" " (%lld %lld %lld %lld %lld %lld)\n", di->fsm.filename, di->text_avma, dsymfilename, debug_info_mscn.szB, debug_abbv_mscn.szB, debug_line_mscn.szB, debug_str_mscn.szB, debug_ranges_mscn.szB, debug_loc_mscn.szB ); VG_(message)(Vg_DebugMsg, " reading dwarf3 from dsyms file\n"); } /* The old reader: line numbers and unwind info only */ ML_(read_debuginfo_dwarf3) ( di, debug_info_mscn, DiSlice_INVALID, /* .debug_types */ debug_abbv_mscn, debug_line_mscn, debug_str_mscn, DiSlice_INVALID /* ALT .debug_str */ ); /* The new reader: read the DIEs in .debug_info to acquire information on variable types and locations or inline info. But only if the tool asks for it, or the user requests it on the command line. */ if (VG_(clo_read_var_info) /* the user or tool asked for it */ || VG_(clo_read_inline_info)) { ML_(new_dwarf3_reader)( di, debug_info_mscn, DiSlice_INVALID, /* .debug_types */ debug_abbv_mscn, debug_line_mscn, debug_str_mscn, debug_ranges_mscn, debug_loc_mscn, DiSlice_INVALID, /* ALT .debug_info */ DiSlice_INVALID, /* ALT .debug_abbv */ DiSlice_INVALID, /* ALT .debug_line */ DiSlice_INVALID /* ALT .debug_str */ ); } } } if (dsymfilename) ML_(dinfo_free)(dsymfilename); success: unmap_image(&msli); unmap_image(&dsli); return True; /* NOTREACHED */ fail: ML_(symerr)(di, True, "Error reading Mach-O object."); unmap_image(&msli); unmap_image(&dsli); return False; } #endif // defined(VGO_darwin) /*--------------------------------------------------------------------*/ /*--- end ---*/ /*--------------------------------------------------------------------*/
the_stack_data/105749.c
#include <stdio.h> #include <signal.h> #include <unistd.h> #include <time.h> #include <stdlib.h> #include <dirent.h> #include <string.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> //optional #include <sys/inotify.h> #include <inttypes.h> #include <limits.h> #include <errno.h> #include <sys/time.h> #define EVENT_SIZE ( sizeof (struct inotify_event) ) #define EVENT_BUF_LEN ( 1024 * ( EVENT_SIZE + 16 ) ) #define FILE_INFO_LEN ( sizeof(FINFO)) static char *path; static int period; typedef struct{ char name[256]; int type; //0->dir, 1->reg, 2->other ino_t inode; } FINFO; int length; int fd; int wd; fd_set rfds; struct timeval tv; int retval; char buffer[EVENT_BUF_LEN]; DIR *dir; int old_dir_num = 0; //old directory file # int new_dir_num = 0; // new directory file # int temp_dir_num = 0; // temp directory file # FINFO *old_file_info; // old files info FINFO *new_file_info; // new files info FINFO *temp_file_info; // temp files info, w8 to be transfered to new_file_info FINFO *change_file_info; // temp files info, w8 to be transfered to new_file_info FINFO get_member(FINFO *dir_list, char *file_name, int length){ FINFO fail = {"miss", -1, 0}; for (int i = 0; i < length; i++) { if (strcmp(dir_list[i].name, file_name) == 0){ return dir_list[i]; } } return fail; } int dir_grabber(DIR *dir){ struct dirent *dp; char * file_name; int file_type; ino_t file_inode; int file_num = 0; FINFO current_node; while ((dp=readdir(dir)) != NULL) { if ( !strcmp(dp->d_name, ".") || !strcmp(dp->d_name, "..") ) {} else { file_num++; strcpy(current_node.name, dp->d_name); current_node.type = dp->d_type; current_node.inode = dp->d_ino; temp_file_info = (FINFO *)realloc(temp_file_info, file_num * FILE_INFO_LEN); temp_file_info[file_num - 1] = current_node; } } temp_dir_num = file_num; return file_num; } void reporter(){ int i = 0; FINFO old; FINFO new; FD_ZERO(&rfds); FD_SET(fd, &rfds); tv.tv_sec = 0; tv.tv_usec = 10; retval = select(fd+1, &rfds, NULL, NULL, &tv); if(retval > 0) { length = read( fd, buffer, EVENT_BUF_LEN); } else{ return; } if ( length < 0 ) { perror( "read" ); } /*actually read return the list of change events happens. Here, read the change event one by one and process it accordingly.*/ while ( i < length ) { struct inotify_event *event = ( struct inotify_event * ) &buffer[ i ]; if ( event->len ) { old = get_member(old_file_info, event->name, old_dir_num); new = get_member(new_file_info, event->name, new_dir_num); if ( event->mask & IN_CREATE ) { if (old.type != -1){// if in old if (new.type != -1){//if in old & new if (old.type == new.type && old.inode == new.inode){ } else{ print_crt(new); } } else{//in old but not in new } } else{// not in old if (new.type != -1){//if not in old but in new print_crt(new); } else{//not in old and not in new } } } else if ( event->mask & IN_DELETE ) { if (old.type != -1){// if in old if (new.type != -1){//if in old & new if (old.type == new.type && old.inode == new.inode){ } else{ print_del(old); } } else{//in old but not in new print_del(old); } } else{// not in old if (new.type != -1){//if not in old but in new } else{//not in old and not in new } } } else if ( event->mask & IN_MODIFY ) { if (old.type != -1){// if in old if (new.type != -1){//if in old & new if (old.type == new.type && old.inode == new.inode){ print_mod(new); } else{ } } else{//in old but not in new } } else{// not in old if (new.type != -1){//if not in old but in new } else{//not in old and not in new } } } else if ( event->mask & IN_ATTRIB ) { if (old.type != -1){// if in old if (new.type != -1){//if in old & new if (old.type == new.type && old.inode == new.inode){ print_mod(new); } else{ } } else{//in old but not in new } } else{// not in old if (new.type != -1){//if not in old but in new } else{//not in old and not in new } } } else if ( event->mask & IN_MOVED_FROM ) { if (old.type != -1){// if in old if (new.type != -1){//if in old & new if (old.type == new.type && old.inode == new.inode){ } else{ print_del(old); } } else{//in old but not in new print_del(old); } } else{// not in old if (new.type != -1){//if not in old but in new } else{//not in old and not in new } } } else if ( event->mask & IN_MOVED_TO ) { if (old.type != -1){// if in old if (new.type != -1){//if in old & new if (old.type == new.type && old.inode == new.inode){ } else{ print_crt(new); } } else{//in old but not in new } } else{// not in old if (new.type != -1){//if not in old but in new print_crt(new); } else{//not in old and not in new } } } else if ( event->mask & IN_IGNORED) { if (old.type != -1){// if in old if (new.type != -1){//if in old & new if (old.type == new.type && old.inode == new.inode){ } else{ print_crt(new); } } else{//in old but not in new } } else{// not in old if (new.type != -1){//if not in old but in new print_crt(new); } else{//not in old and not in new } } } } i += EVENT_SIZE + event->len; } } //#define SIG_BLOCK 0 /* Block signals. */ //#define SIG_UNBLOCK 1 /* Unblock signals. */ //#define SIG_SETMASK 2 /* Set the set of blocked signals. */ static void sig_handler(int signo){ sigset_t signal_set; sigemptyset(&signal_set); if (signo == SIGINT){ sigaddset(&signal_set, SIGALRM); sigaddset(&signal_set, SIGUSR1); sigprocmask(0, &signal_set, NULL); system("date"); dir = opendir(path); if (ENOENT == errno){ //directory does not exist printf("Directory has been deleted!\n"); exit(1); } dir_grabber(dir); closedir(dir); struct_move(); reporter(); sigprocmask(1, &signal_set, NULL); exit(1); } else if (signo == SIGALRM){ sigaddset(&signal_set, SIGINT); sigaddset(&signal_set, SIGUSR1); sigprocmask(0, &signal_set, NULL); system("date"); dir = opendir(path); if (ENOENT == errno){ //directory does not exist printf("Directory has been deleted!\n"); exit(1); } dir_grabber(dir); closedir(dir); struct_move(); reporter(); signal (SIGALRM, sig_handler); alarm(period); sigprocmask(1, &signal_set, NULL); } else if (signo == SIGUSR1){ sigaddset(&signal_set, SIGALRM); sigaddset(&signal_set, SIGINT); sigprocmask(0, &signal_set, NULL); system("date"); dir = opendir(path); if (ENOENT == errno){ //directory does not exist printf("Directory has been deleted!\n"); exit(1); } dir_grabber(dir); closedir(dir); struct_move(); reporter(); signal(SIGUSR1, sig_handler); sigprocmask(1, &signal_set, NULL); } /*reset handler reason//// https://cboard.cprogramming.com/linux-programming/150239-when-re-enable-signal-handlers.html The signal() function defines the handling of the next received signal only, after which the default handling is reinstated. So it is necessary for the signal handler to call signal() if the program needs to continue handling signals using a non-default handler. *////////// } int main(int argc, char *argv[]) { sigset_t mask_set; int leng = 0; period = atoi(argv[1]); path = argv[2]; signal(SIGALRM, sig_handler); signal(SIGUSR1, sig_handler); signal(SIGINT, sig_handler); sigemptyset(&mask_set); // init all struct array with null pointer old_file_info = (FINFO *)malloc(0); new_file_info = (FINFO *)malloc(0); temp_file_info = (FINFO *)malloc(0); change_file_info = (FINFO *)malloc(0); // init for first report dir = opendir(path); if (ENOENT == errno){ //directory does not exist printf("Directory does not exist!\n"); exit(1); } leng = dir_grabber(dir); struct_move(); system("date"); print_dir(new_file_info, new_dir_num); closedir(dir); fd = inotify_init(); wd = inotify_add_watch( fd, path, IN_CREATE | IN_DELETE | IN_MODIFY | IN_MOVED_FROM | IN_MOVED_TO | IN_ATTRIB); if ( fd < 0 ) { perror( "inotify_init" ); } alarm(period); while(1){ //sigsuspend(&mask_set); dir = opendir(path); if (ENOENT == errno){ //directory does not exist printf("Directory does not exist!\n"); exit(1); } closedir(dir); } return 0; } void struct_copy(FINFO *dst, FINFO *src,int length){ for (int i = 0; i < length; i++) { dst[i].type = src[i].type; dst[i].inode = src[i].inode; strcpy(dst[i].name, src[i].name); } } void print_dir(FINFO *dir, int length){ for (int i = 0; i < length; i++) { printf("\"%s\" \"%s\"\n", (dir[i].type == 4) ? "d" : (dir[i].type == 8) ? "+" : (1) ? "o" : "???",dir[i].name); } } void print_crt(FINFO a_file){ printf("\"%s\" \"%s\"\n", (a_file.type == 4) ? "d" : (a_file.type == 8) ? "+" : (1) ? "o" : "???",a_file.name); } void print_del(FINFO a_file){ printf("\"%s\" \"%s\"\n", (a_file.type == 4) ? "-" : (a_file.type == 8) ? "-" : (1) ? "-" : "???",a_file.name); } void print_mod(FINFO a_file){ printf("\"%s\" \"%s\"\n", (a_file.type == 4) ? "*" : (a_file.type == 8) ? "*" : (1) ? "*" : "???",a_file.name); } void struct_move(){ old_file_info = (FINFO *)realloc(old_file_info, new_dir_num * FILE_INFO_LEN); old_dir_num = new_dir_num; struct_copy(old_file_info, new_file_info, new_dir_num); new_file_info = (FINFO *)realloc(new_file_info, temp_dir_num * FILE_INFO_LEN); new_dir_num = temp_dir_num; struct_copy(new_file_info, temp_file_info, new_dir_num); temp_file_info = (FINFO *)realloc(temp_file_info, 0); temp_dir_num = 0; }
the_stack_data/90765511.c
#include <stdio.h> int main(void) { int m, n; int total = 0, cnt = 0; scanf("%d %d", &m, &n); int i = n < m ? n : m; do { if (i % 2 == 0) { printf("%d ", i); cnt++; total += i; } i++; } while (i <= (n < m ? m : n)); printf("cnt=%d sum=%d\n", cnt, total); i = n < m ? n : m; cnt = 0; total = 0; do { if (i % 3 == 0) { printf("%d ", i); cnt++; total += i; } i++; } while (i <= (n < m ? m : n)); printf("cnt=%d sum=%d\n", cnt, total); return 0; }
the_stack_data/48575612.c
/* Optimized slide_hash for POWER processors * Copyright (C) 2019-2020 IBM Corporation * Author: Matheus Castanho <[email protected]> * For conditions of distribution and use, see copyright notice in zlib.h */ #ifdef POWER8_VSX_SLIDEHASH #include <altivec.h> #include "zbuild.h" #include "deflate.h" static inline void slide_hash_power8_loop(deflate_state *s, unsigned n_elems, Pos *table_end) { vector unsigned short vw, vm, *vp; unsigned chunks; /* Each vector register (chunk) corresponds to 128 bits == 8 Posf, * so instead of processing each of the n_elems in the hash table * individually, we can do it in chunks of 8 with vector instructions. * * This function is only called from slide_hash_power8(), and both calls * pass n_elems as a power of 2 higher than 2^7, as defined by * deflateInit2_(), so n_elems will always be a multiple of 8. */ chunks = n_elems >> 3; Assert(n_elems % 8 == 0, "Weird hash table size!"); /* This type casting is safe since s->w_size is always <= 64KB * as defined by deflateInit2_() and Posf == unsigned short */ vw[0] = (Pos) s->w_size; vw = vec_splat(vw,0); vp = (vector unsigned short *) table_end; do { /* Processing 8 elements at a time */ vp--; vm = *vp; /* This is equivalent to: m >= w_size ? m - w_size : 0 * Since we are using a saturated unsigned subtraction, any * values that are > w_size will be set to 0, while the others * will be subtracted by w_size. */ *vp = vec_subs(vm,vw); } while (--chunks); } void Z_INTERNAL slide_hash_power8(deflate_state *s) { unsigned int n; Pos *p; n = HASH_SIZE; p = &s->head[n]; slide_hash_power8_loop(s,n,p); n = s->w_size; p = &s->prev[n]; slide_hash_power8_loop(s,n,p); } #endif /* POWER8_VSX_SLIDEHASH */
the_stack_data/1110001.c
#include <stdio.h> #include <string.h> #include <stdlib.h> #include <stdbool.h> /* Progetto di Algoritmi e Principi dell'informatica di Stefano Formicola v1.0 */ // Inizio Costanti #define MAX_RES_NAME 256 //ovvero 255 più il carattere terminatore della stringa #define MAX_TREE_HEIGHT 255 //altezza massima dell'albero #define MAX_RES_NUM 1024 //massimo numero di risorse per nodo (directory) #define HASHTABLE_DIM 128 //dimensioni della tabella hash di ogni directory - l'hashing è risolto con concatenazione #define MAX_PATH_LENGHT (255*256)+1 //tiene conto della presenza di 255 simboli '/' più il terminatore #define BLOCK_SIZE 512 //dimensioni di default per un blocco nella write o array di puntatori nella find // Fine Costanti typedef struct node{ char name[MAX_RES_NAME]; //nome del file o della directory char *data; //puntatore ai dati di un file, stringa - NULL per cartelle bool is_file; //valore booleano per distinguere file da directory struct node **resources; //puntatore a risorse, se è un file è NULL, se è una dir è un vettore di puntatori int free_resources; //risorse libere della directory, NULL per i file struct node *next_brother; //fratello con lo stesso valore hash int height; //alteza della directory o risorsa nell'albero } node; typedef struct pointers{ node *father; //puntatore al padre di un nodo son node *son; //puntatore a un nodo } pointers; // Inizio prototipi funzioni { int command_to_number(char *); unsigned hash(char *); node *Luke_NodeWalker(char *, char *); pointers getResourcePointers(char *); void create(char *); void create_dir(char *); void res_write(char *); void res_read(char *); void res_delete(char *); void delete_r(char *); void res_delete_r(node *); void find(node *, char *, char *, unsigned); int addToFoundPaths(char *); char *concatenate(char *, char *); int compare(const void *, const void *); // Fine prototipi funzioni } // Variabili globali node root; int slash = '/'; char **found_paths = NULL; // fine variabili globali int main() { int arg = 10; char command[15]; char string[MAX_PATH_LENGHT]; strcpy(root.name, "/"); root.free_resources = MAX_RES_NUM; root.is_file = false; root.data = NULL; root.next_brother = NULL; root.resources = NULL; root.height = 1; while(arg>0) { scanf("%s", command); //acquisisce il comando if (strcmp(command, "exit") == 0) { return 0; } scanf("%*c"); //acquisisce il carattere spazio scanf("%s", string); arg = command_to_number(command); switch(arg) { case 1: //create create(string); break; case 2: //create_dir create_dir(string); break; case 3: //read res_read(string); break; case 4: //write res_write(string); break; case 5: //delete res_delete(string); break; case 6: //delete_r delete_r(string); break; case 7: //find find(&root, string, strdup("/"), hash(string)); break; default: printf("no\n"); } } } void find(node *father, char *name, char *path, unsigned hashvalue) { /* La find parte da root, nome file/dir, path, valore hash della risorsa. Visita in profondità ogni figlio e concatena i vari nomi di percorso */ static int count = 0; node *pointer = NULL; char *temp = NULL; if(strcmp(path, "/") != 0) { strcat(path, "/"); //da aggiungere per ogni avanzamento in profondità nell'albero del fs, tranne nel caso di livello 1 (root) } if(father->is_file == false&&father->resources != NULL) { for (int i = 0; i<HASHTABLE_DIM; i++) { pointer = father->resources[i]; while(pointer != NULL) { if (pointer->is_file == false) { find(pointer, name, concatenate(path, pointer->name), hashvalue); } pointer = pointer->next_brother; } } pointer = father->resources[hashvalue]; } while(pointer != NULL&&strcmp(pointer->name, name) != 0) { pointer = pointer->next_brother; } if(pointer != NULL) { // risorsa trovata temp = concatenate(path, name); count = addToFoundPaths(temp); } if(path != NULL) { free(path); } if(temp != NULL) { free(temp); } if(father == &root) { if(found_paths != NULL) { qsort(found_paths, count, sizeof(char*), compare); for (int j = 0; j<count; j++) { printf("ok %s\n", found_paths[j]); free(found_paths[j]); found_paths[j] = NULL; } free(found_paths); found_paths = NULL; count = 0; } else{ printf("no\n"); } } } int compare(const void *p1, const void *p2) { char **s1 = (char**)p1; char **s2 = (char**)p2; return (strcmp(*s1, *s2)); } char *concatenate(char *a, char *b) { char *c = NULL; if(a != NULL&&b != NULL) { while(c == NULL) { c = (char*) calloc(strlen(a)+strlen(b)+2, sizeof(char)); } strcpy(c, a); strcat(c, b); } return c; } int addToFoundPaths(char *string) { static int count = 0; while(found_paths == NULL) { count = 0; found_paths = calloc(BLOCK_SIZE, sizeof(char*)); } if((count%BLOCK_SIZE) == 0&&count != 0) { char **temp = NULL; while(temp == NULL) { temp = (char*) realloc(found_paths, BLOCK_SIZE*sizeof(char*)); } found_paths = temp; } while(found_paths[count] == NULL) { found_paths[count] = (char*) calloc(MAX_PATH_LENGHT, sizeof(char)); } strcpy(found_paths[count], string); count++; return count; } void create(char *path) { char *filename = strrchr(path, slash); node *temp = NULL; pointers pointers; if (strcmp(path, "/") == 0||strcmp(path, "\0") == 0||filename == NULL) { //errore in input oppure si cerca di creare la root printf("no\n"); } else{ pointers = getResourcePointers(path); filename++; if (pointers.father == NULL) { //precedentemente anche filename == NULL printf("no\n"); } else { //esiste il nodo padre, posso procedere a creare il file if(strlen(filename)<MAX_RES_NAME) { if(pointers.father->is_file == false&&(pointers.father->height<MAX_TREE_HEIGHT)) { unsigned hashvalue = hash(filename); if (pointers.father->resources == NULL) { //il padre non ha ancora figli, creo la tabella hash di puntatori ai figli pointers.father->resources = (node**) (calloc(HASHTABLE_DIM, sizeof(node*))); //tabella hash dei figli creata e iniziallizzata a NULL temp = (node*)malloc(sizeof(node)); pointers.father->resources[hashvalue] = temp; strcpy(temp->name, filename); temp->is_file = true; temp->free_resources = 0; temp->resources = NULL; temp->next_brother = NULL; temp->data = NULL; temp->height = (pointers.father->height)+1; pointers.father->free_resources--; printf("ok\n"); } else{ //il padre ha già altri figli if(pointers.son == NULL) { // la cartella non esiste, procedo a crearla if(pointers.father->free_resources != 0) { temp = (node*) malloc(sizeof(node)); strcpy(temp->name, filename); temp->next_brother = pointers.father->resources[hashvalue]; temp->is_file = true; temp->data = NULL; temp->free_resources = 0; temp->resources = NULL; temp->height = (pointers.father->height) + 1; pointers.father->resources[hashvalue] = temp; pointers.father->free_resources--; printf("ok\n"); } else{ printf("no\n"); //eccede i limiti del filesystem (MAX_RES_NUM) } } else{ printf("no\n"); //la cartella già esiste } } } else{ printf("no\n"); //si tenta di scrivere su un file o si eccedono i limiti del fs } } else{ //si eccedono i limiti del fs printf("no\n"); } } } } void create_dir(char *path) { char *name = strrchr(path, slash); node *temp; pointers pointers; if (strcmp(path, "/") == 0 || strcmp(path, "\0") == 0 || name == NULL) { //errore in input oppure si cerca di creare la root printf("no\n"); } else{ pointers = getResourcePointers(path); name++; if(pointers.father == NULL) { //percorso non trovato printf("no\n"); } else{ if(strlen(name)<MAX_RES_NAME) { if(pointers.father->is_file == false&&(pointers.father->height<MAX_TREE_HEIGHT)) { unsigned hashvalue = hash(name); if(pointers.father->resources == NULL) { //il padre non ha ancora figli, creo la tabella hash di puntatori ai figli pointers.father->resources = (node**) (calloc(HASHTABLE_DIM, sizeof(node*))); // tabella hash ai figli creata e iniziallizzata a NULL pointers.father->resources[hashvalue] = (node *) malloc(sizeof(node)); strcpy(pointers.father->resources[hashvalue]->name,name); pointers.father->resources[hashvalue]->is_file = false; pointers.father->resources[hashvalue]->data = NULL; pointers.father->resources[hashvalue]->free_resources = MAX_RES_NUM; pointers.father->resources[hashvalue]->resources = NULL; pointers.father->resources[hashvalue]->next_brother = NULL; pointers.father->resources[hashvalue]->height = pointers.father->height + 1; pointers.father->free_resources--; printf("ok\n"); } else{ //il padre ha già altri figli if(pointers.son == NULL) { // la cartella non esiste, procedo a crearla if(pointers.father->free_resources != 0) { temp = (node*) malloc(sizeof(node)); strcpy(temp->name,name); temp->is_file = false; temp->data = NULL; temp->free_resources = MAX_RES_NUM; temp->resources = NULL; temp->height = pointers.father->height +1; temp->next_brother = pointers.father->resources[hashvalue]; pointers.father->resources[hashvalue] = temp; pointers.father->free_resources--; printf("ok\n"); } else{ printf("no\n"); // la cartella ha raggiunto il limite di MAX_RES_NUM figli } } else{ //la cartella già esiste printf("no\n"); } } } else{ //si tenta di scrivere su un file o si eccedono i limiti del fs printf("no\n"); } } else{ //si eccedono i limiti del fs printf("no\n"); } } } } void res_write(char *path) { char *data = NULL; void *temp = NULL; int count = -1; pointers pointers = getResourcePointers(path); //Allocazione dinamica della stringa da memorizzare nel file, count è il contatore del vettore di caratteri che contiene la stringa while(data == NULL) { data = (char*)malloc(sizeof(char)*BLOCK_SIZE); } scanf("%*c"); //acquisisce il carattere spazio scanf("%*c"); //acquisisce virgoletta do{ count++; if ((count%BLOCK_SIZE) == 0&&(count != 0)) { while(temp == NULL) { temp = realloc(data, sizeof(char)*BLOCK_SIZE); } data = (char*)temp; } scanf("%c", &data[count]); } while(data[count] != '"'); data[count] = '\0'; //elimina la seconda virgoletta if(pointers.son != NULL) { //il file da scrivere esiste if(pointers.son->is_file == true) { if(pointers.son->data != NULL) { //sovrascrivo il file free(pointers.son->data); pointers.son->data = NULL; } pointers.son->data = strdup(data); printf("ok %lu\n", strlen(pointers.son->data)); } else{ // non è un file, non scrivo printf("no\n"); } } else{ //path non esistente printf("no\n"); } free(data); } void res_read(char *path) { pointers pointers = getResourcePointers(path); if(pointers.son != NULL) { // la risorsa esiste if(pointers.son->is_file == true) { // ed è un file if(pointers.son->data != NULL) { printf("contenuto %s\n", pointers.son->data); } else{ printf("contenuto \n"); //non è stata eseguita una write } } else{ // non è un file printf("no\n"); } } else{ //file non trovato printf("no\n"); } } void res_delete(char *path) { //resource delete char *name = strrchr(path, slash); unsigned hashvalue = 0; node *father = NULL; node *temp; if(name != NULL) { name++; hashvalue = hash(name); father = Luke_NodeWalker(path, name); } if(father != NULL) { if(father->resources != NULL) { node *last_brother = NULL; temp = father->resources[hashvalue]; while(temp != NULL&&strcmp(temp->name, name) != 0) { last_brother = temp; temp = temp->next_brother; } if(temp != NULL&&(temp->resources == NULL)) { //esiste la risorsa e non ha figli if(last_brother != NULL) { //nodo all'interno della lista last_brother->next_brother = temp->next_brother; } else{ //nodo in testa alla lista father->resources[hashvalue] = temp->next_brother; } if(temp->data != NULL) { //cancello i dati scritti sul file free(temp->data); } free(temp); //cancello la risorsa father->free_resources++; if(father->free_resources == MAX_RES_NUM) { //rendo la directory padre cancellabile se non ha più figli free(father->resources); father->resources = NULL; } printf("ok\n"); } else{ printf("no\n"); //la risorsa non esiste oppure ha figli } } else{ printf("no\n"); //file inesistente } } else{ printf("no\n"); //path non trovato } } void delete_r(char *path) { char *name = strrchr(path, slash); unsigned hashvalue = 0; node *father = NULL; node *resource; if(name != NULL) { name++; hashvalue = hash(name); father = Luke_NodeWalker(path, name); } if(father != NULL) { if(father->resources != NULL) { resource = father->resources[hashvalue]; node *last_brother = NULL; while(resource != NULL&&strcmp(resource->name, name) != 0) { //scorro la lista dei figli con uguale hashvalue per cercare la risorsa da cancellare last_brother = resource; resource = resource->next_brother; } if(resource != NULL) { //esiste la risorsa da cancellare if(last_brother == NULL) { //la risorsa da cancellare è in testa alla lista father->resources[hashvalue] = resource->next_brother; res_delete_r(resource); father->free_resources++; } else{ //la risorsa da cancellare non è in testa alla lista last_brother->next_brother = resource->next_brother; father->free_resources++; res_delete_r(resource); } if(father->free_resources == MAX_RES_NUM) { //rendo la directory padre cancellabile se non ha più figli free(father->resources); father->resources = NULL; } printf("ok\n"); } else{ printf("no\n"); //non esiste la risorsa da cancellare } } else{ printf("no\n"); //path inesistente: esiste il padre ma non ha risorse } } else{ printf("no\n"); //path inesistente } } void res_delete_r(node *resource) { /* Dato il puntatore al nodo da cancellare con delete ricorsiva, se questo è una directory con figli viene chiamata la res_delete_r sui figli, scorrendo l'hashtable dei figli. Se il puntatore è o un file o una directory senza figli, con puntatore all'hashtable nullo, allora viene fatta la free dei dati e della risorsa. */ node *next = NULL; if(resource != NULL) { if(resource->resources != NULL) { // è una directory con figli for (int res_count = 0; res_count<HASHTABLE_DIM; res_count++) { if(resource->resources[res_count] != NULL) { do{ next = resource->resources[res_count]->next_brother; res_delete_r(resource->resources[res_count]); resource->resources[res_count] = next; }while (next != NULL); } } free(resource->resources); } if(resource->data != NULL) { free(resource->data); } free(resource); } } node *Luke_NodeWalker(char *path, char *son) { /* Parametri passati alla funzione: stringa percorso della risorsa e nome della risorsa. Partendo da root tramite strtok divido la stringa del percorso in sottostringhe delimitate da '/' e mi servo di queste per muovermi all'interno del filesystem. Il token è un puntatore alla sottostringa, strtok modifica la stringa originale aggiungendo il terminatore '/0' al posto del '/' consentendomi di usare le sottostringhe senza allocare memoria. Quando token e son sono uguali, ovvero puntano alla stessa porzione di memoria del primo carattere del nome della risorsa, il ciclo while si ferma poichè sono arrivato alla directory padre. */ unsigned hashvalue; node *pointer = &root; char *token = strtok(path, "/"); while(token != NULL&&token != son&&pointer != NULL) { hashvalue = hash(token); if (pointer->resources != NULL) { pointer = pointer->resources[hashvalue]; while(pointer != NULL&&strcmp(pointer->name, token) != 0) { pointer = pointer->next_brother; //se pointer == NULL la risorsa non è stata trovata, termina il ciclo } token = strtok(NULL, "/"); } else{ return NULL; //pointer->resources == NULL, percorso non trovato } } return pointer; //esco dal ciclo while quando arrivo al padre della risorsa su cui operare } pointers getResourcePointers(char *path) { /* Dato path e nome file o directory cerco la risorsa file o directory e restituisco i puntatori a padre e figlio. Se il puntatore al padre è diverso da NULL e ha risorse allora procedo a cercare il nodo figlio. Se, alla fine della coda di risorse con lo stesso hashvalue, pointer è NULL restituisco son = NULL, altrimenti se il confronto con il nome dà esito positivo restituisco il puntatore alla risorsa. */ pointers toReturn; toReturn.father = NULL; toReturn.son = NULL; unsigned hashvalue = 0; char *name = strrchr(path, slash); //punta all'ultimo simbolo di slash if(name != NULL) { name++; //punta al nome della risorsa hashvalue = hash(name); toReturn.father = Luke_NodeWalker(path, name); } if(toReturn.father != NULL) { if (toReturn.father->resources != NULL) { toReturn.son = toReturn.father->resources[hashvalue]; while(toReturn.son != NULL&&(strcmp(toReturn.son->name, name)) != 0) { toReturn.son = toReturn.son->next_brother; } } } return toReturn; } int command_to_number(char *s) { if(strcmp(s, "create") == 0) return 1; if(strcmp(s, "create_dir") == 0) return 2; if(strcmp(s, "read") == 0) return 3; if(strcmp(s, "write") == 0) return 4; if(strcmp(s, "delete") == 0) return 5; if(strcmp(s, "delete_r") == 0) return 6; if(strcmp(s, "find") == 0) return 7; else return 8; } unsigned hash(char *c) { /*Funzione hash per codificare il nome del file o della directory nell'array di puntatori ai nodi figli delle risorse. La funzione, ispirata a quella presente sul libro C programming language, tratta ogni carattere della stringa come numero con la codifica ASCII, lo addiziona a hash_val moltiplicato per il numero primo 31 e scala il valore alla dimensione dell'hashtable con l'operazione di modulo. */ unsigned hash_val = 0; if(c != NULL) { for(hash_val = 0; *c != '\0'; c++) { hash_val = (*c+31*hash_val)%HASHTABLE_DIM; } } return hash_val % HASHTABLE_DIM; }
the_stack_data/86327.c
// ============================================================== // File generated by Vivado(TM) HLS - High-Level Synthesis from C, C++ and SystemC // Version: 2015.2 // Copyright (C) 2015 Xilinx Inc. All rights reserved. // // ============================================================== #1 "D:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2/imf1.c" #1 "<built-in>" #1 "<command-line>" #1 "D:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2/imf1.c" #1 "D:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2/duc.h" 1 #1 "C:/opt/winprog/Xilinx/Vivado_HLS/2015.2/include/ap_cint.h" 1 #62 "C:/opt/winprog/Xilinx/Vivado_HLS/2015.2/include/ap_cint.h" #1 "c:\\opt\\winprog\\xilinx\\vivado_hls\\2015.2\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/string.h" 1 3 #15 "c:\\opt\\winprog\\xilinx\\vivado_hls\\2015.2\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/string.h" 3 #1 "c:\\opt\\winprog\\xilinx\\vivado_hls\\2015.2\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/_mingw.h" 1 3 #32 "c:\\opt\\winprog\\xilinx\\vivado_hls\\2015.2\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/_mingw.h" 3 #33 "c:\\opt\\winprog\\xilinx\\vivado_hls\\2015.2\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/_mingw.h" 3 #16 "c:\\opt\\winprog\\xilinx\\vivado_hls\\2015.2\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/string.h" 2 3 #24 "c:\\opt\\winprog\\xilinx\\vivado_hls\\2015.2\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/string.h" 3 #1 "c:\\opt\\winprog\\xilinx\\vivado_hls\\2015.2\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/stddef.h" 1 3 4 #212 "c:\\opt\\winprog\\xilinx\\vivado_hls\\2015.2\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/stddef.h" 3 4 typedef unsigned int size_t; #324 "c:\\opt\\winprog\\xilinx\\vivado_hls\\2015.2\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/stddef.h" 3 4 typedef short unsigned int wchar_t; #25 "c:\\opt\\winprog\\xilinx\\vivado_hls\\2015.2\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/string.h" 2 3 #36 "c:\\opt\\winprog\\xilinx\\vivado_hls\\2015.2\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/string.h" 3 void* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) memchr (const void*, int, size_t) __attribute__ ((__pure__)); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) memcmp (const void*, const void*, size_t) __attribute__ ((__pure__)); void* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) memcpy (void*, const void*, size_t); void* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) memmove (void*, const void*, size_t); void* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) memset (void*, int, size_t); char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) strcat (char*, const char*); char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) strchr (const char*, int) __attribute__ ((__pure__)); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) strcmp (const char*, const char*) __attribute__ ((__pure__)); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) strcoll (const char*, const char*); char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) strcpy (char*, const char*); size_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) strcspn (const char*, const char*) __attribute__ ((__pure__)); char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) strerror (int); size_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) strlen (const char*) __attribute__ ((__pure__)); char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) strncat (char*, const char*, size_t); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) strncmp (const char*, const char*, size_t) __attribute__ ((__pure__)); char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) strncpy (char*, const char*, size_t); char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) strpbrk (const char*, const char*) __attribute__ ((__pure__)); char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) strrchr (const char*, int) __attribute__ ((__pure__)); size_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) strspn (const char*, const char*) __attribute__ ((__pure__)); char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) strstr (const char*, const char*) __attribute__ ((__pure__)); char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) strtok (char*, const char*); size_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) strxfrm (char*, const char*, size_t); char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _strerror (const char *); void* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _memccpy (void*, const void*, int, size_t); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _memicmp (const void*, const void*, size_t); char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _strdup (const char*) __attribute__ ((__malloc__)); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _strcmpi (const char*, const char*); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _stricmp (const char*, const char*); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _stricoll (const char*, const char*); char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _strlwr (char*); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _strnicmp (const char*, const char*, size_t); char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _strnset (char*, int, size_t); char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _strrev (char*); char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _strset (char*, int); char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _strupr (char*); void __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _swab (const char*, char*, size_t); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _strncoll(const char*, const char*, size_t); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _strnicoll(const char*, const char*, size_t); #90 "c:\\opt\\winprog\\xilinx\\vivado_hls\\2015.2\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/string.h" 3 void* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) memccpy (void*, const void*, int, size_t); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) memicmp (const void*, const void*, size_t); char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) strdup (const char*) __attribute__ ((__malloc__)); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) strcmpi (const char*, const char*); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) stricmp (const char*, const char*); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) strcasecmp (const char*, const char *); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) stricoll (const char*, const char*); char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) strlwr (char*); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) strnicmp (const char*, const char*, size_t); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) strncasecmp (const char *, const char *, size_t); char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) strnset (char*, int, size_t); char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) strrev (char*); char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) strset (char*, int); char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) strupr (char*); void __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) swab (const char*, char*, size_t); #126 "c:\\opt\\winprog\\xilinx\\vivado_hls\\2015.2\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/string.h" 3 wchar_t* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wcscat (wchar_t*, const wchar_t*); wchar_t* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wcschr (const wchar_t*, wchar_t); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wcscmp (const wchar_t*, const wchar_t*); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wcscoll (const wchar_t*, const wchar_t*); wchar_t* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wcscpy (wchar_t*, const wchar_t*); size_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wcscspn (const wchar_t*, const wchar_t*); size_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wcslen (const wchar_t*); wchar_t* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wcsncat (wchar_t*, const wchar_t*, size_t); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wcsncmp(const wchar_t*, const wchar_t*, size_t); wchar_t* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wcsncpy(wchar_t*, const wchar_t*, size_t); wchar_t* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wcspbrk(const wchar_t*, const wchar_t*); wchar_t* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wcsrchr(const wchar_t*, wchar_t); size_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wcsspn(const wchar_t*, const wchar_t*); wchar_t* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wcsstr(const wchar_t*, const wchar_t*); wchar_t* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wcstok(wchar_t*, const wchar_t*); size_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wcsxfrm(wchar_t*, const wchar_t*, size_t); #152 "c:\\opt\\winprog\\xilinx\\vivado_hls\\2015.2\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/string.h" 3 wchar_t* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wcsdup (const wchar_t*); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wcsicmp (const wchar_t*, const wchar_t*); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wcsicoll (const wchar_t*, const wchar_t*); wchar_t* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wcslwr (wchar_t*); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wcsnicmp (const wchar_t*, const wchar_t*, size_t); wchar_t* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wcsnset (wchar_t*, wchar_t, size_t); wchar_t* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wcsrev (wchar_t*); wchar_t* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wcsset (wchar_t*, wchar_t); wchar_t* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wcsupr (wchar_t*); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wcsncoll(const wchar_t*, const wchar_t*, size_t); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wcsnicoll(const wchar_t*, const wchar_t*, size_t); #173 "c:\\opt\\winprog\\xilinx\\vivado_hls\\2015.2\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/string.h" 3 int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wcscmpi (const wchar_t * __ws1, const wchar_t * __ws2); wchar_t* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wcsdup (const wchar_t*); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wcsicmp (const wchar_t*, const wchar_t*); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wcsicoll (const wchar_t*, const wchar_t*); wchar_t* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wcslwr (wchar_t*); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wcsnicmp (const wchar_t*, const wchar_t*, size_t); wchar_t* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wcsnset (wchar_t*, wchar_t, size_t); wchar_t* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wcsrev (wchar_t*); wchar_t* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wcsset (wchar_t*, wchar_t); wchar_t* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wcsupr (wchar_t*); #63 "C:/opt/winprog/Xilinx/Vivado_HLS/2015.2/include/ap_cint.h" 2 #1 "c:\\opt\\winprog\\xilinx\\vivado_hls\\2015.2\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/stdio.h" 1 3 #26 "c:\\opt\\winprog\\xilinx\\vivado_hls\\2015.2\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/stdio.h" 3 #1 "c:\\opt\\winprog\\xilinx\\vivado_hls\\2015.2\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/stddef.h" 1 3 4 #353 "c:\\opt\\winprog\\xilinx\\vivado_hls\\2015.2\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/stddef.h" 3 4 typedef short unsigned int wint_t; #27 "c:\\opt\\winprog\\xilinx\\vivado_hls\\2015.2\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/stdio.h" 2 3 #1 "c:\\opt\\winprog\\xilinx\\vivado_hls\\2015.2\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/stdarg.h" 1 3 4 #40 "c:\\opt\\winprog\\xilinx\\vivado_hls\\2015.2\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/stdarg.h" 3 4 typedef __builtin_va_list __gnuc_va_list; #29 "c:\\opt\\winprog\\xilinx\\vivado_hls\\2015.2\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/stdio.h" 2 3 #129 "c:\\opt\\winprog\\xilinx\\vivado_hls\\2015.2\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/stdio.h" 3 typedef struct _iobuf { char* _ptr; int _cnt; char* _base; int _flag; int _file; int _charbuf; int _bufsiz; char* _tmpfname; } FILE; #154 "c:\\opt\\winprog\\xilinx\\vivado_hls\\2015.2\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/stdio.h" 3 extern __attribute__ ((__dllimport__)) FILE _iob[]; #169 "c:\\opt\\winprog\\xilinx\\vivado_hls\\2015.2\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/stdio.h" 3 FILE* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) fopen (const char*, const char*); FILE* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) freopen (const char*, const char*, FILE*); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) fflush (FILE*); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) fclose (FILE*); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) remove (const char*); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) rename (const char*, const char*); FILE* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) tmpfile (void); char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) tmpnam (char*); char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _tempnam (const char*, const char*); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _rmtmp(void); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _unlink (const char*); char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) tempnam (const char*, const char*); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) rmtmp(void); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) unlink (const char*); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) setvbuf (FILE*, char*, int, size_t); void __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) setbuf (FILE*, char*); #204 "c:\\opt\\winprog\\xilinx\\vivado_hls\\2015.2\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/stdio.h" 3 extern int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) __mingw_fprintf(FILE*, const char*, ...); extern int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) __mingw_printf(const char*, ...); extern int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) __mingw_sprintf(char*, const char*, ...); extern int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) __mingw_snprintf(char*, size_t, const char*, ...); extern int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) __mingw_vfprintf(FILE*, const char*, __gnuc_va_list); extern int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) __mingw_vprintf(const char*, __gnuc_va_list); extern int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) __mingw_vsprintf(char*, const char*, __gnuc_va_list); extern int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) __mingw_vsnprintf(char*, size_t, const char*, __gnuc_va_list); #293 "c:\\opt\\winprog\\xilinx\\vivado_hls\\2015.2\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/stdio.h" 3 int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) fprintf (FILE*, const char*, ...); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) printf (const char*, ...); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) sprintf (char*, const char*, ...); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) vfprintf (FILE*, const char*, __gnuc_va_list); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) vprintf (const char*, __gnuc_va_list); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) vsprintf (char*, const char*, __gnuc_va_list); #308 "c:\\opt\\winprog\\xilinx\\vivado_hls\\2015.2\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/stdio.h" 3 int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) __msvcrt_fprintf(FILE*, const char*, ...); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) __msvcrt_printf(const char*, ...); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) __msvcrt_sprintf(char*, const char*, ...); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) __msvcrt_vfprintf(FILE*, const char*, __gnuc_va_list); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) __msvcrt_vprintf(const char*, __gnuc_va_list); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) __msvcrt_vsprintf(char*, const char*, __gnuc_va_list); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _snprintf (char*, size_t, const char*, ...); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _vsnprintf (char*, size_t, const char*, __gnuc_va_list); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _vscprintf (const char*, __gnuc_va_list); #331 "c:\\opt\\winprog\\xilinx\\vivado_hls\\2015.2\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/stdio.h" 3 int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) snprintf (char *, size_t, const char *, ...); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) vsnprintf (char *, size_t, const char *, __gnuc_va_list); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) vscanf (const char * __restrict__, __gnuc_va_list); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) vfscanf (FILE * __restrict__, const char * __restrict__, __gnuc_va_list); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) vsscanf (const char * __restrict__, const char * __restrict__, __gnuc_va_list); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) fscanf (FILE*, const char*, ...); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) scanf (const char*, ...); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) sscanf (const char*, const char*, ...); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) fgetc (FILE*); char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) fgets (char*, int, FILE*); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) fputc (int, FILE*); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) fputs (const char*, FILE*); char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) gets (char*); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) puts (const char*); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) ungetc (int, FILE*); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _filbuf (FILE*); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _flsbuf (int, FILE*); extern __inline__ int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) getc (FILE* __F) { return (--__F->_cnt >= 0) ? (int) (unsigned char) *__F->_ptr++ : _filbuf (__F); } extern __inline__ int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) putc (int __c, FILE* __F) { return (--__F->_cnt >= 0) ? (int) (unsigned char) (*__F->_ptr++ = (char)__c) : _flsbuf (__c, __F); } extern __inline__ int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) getchar (void) { return (--(&_iob[0])->_cnt >= 0) ? (int) (unsigned char) *(&_iob[0])->_ptr++ : _filbuf ((&_iob[0])); } extern __inline__ int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) putchar(int __c) { return (--(&_iob[1])->_cnt >= 0) ? (int) (unsigned char) (*(&_iob[1])->_ptr++ = (char)__c) : _flsbuf (__c, (&_iob[1]));} #412 "c:\\opt\\winprog\\xilinx\\vivado_hls\\2015.2\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/stdio.h" 3 size_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) fread (void*, size_t, size_t, FILE*); size_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) fwrite (const void*, size_t, size_t, FILE*); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) fseek (FILE*, long, int); long __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) ftell (FILE*); void __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) rewind (FILE*); #455 "c:\\opt\\winprog\\xilinx\\vivado_hls\\2015.2\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/stdio.h" 3 typedef long long fpos_t; int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) fgetpos (FILE*, fpos_t*); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) fsetpos (FILE*, const fpos_t*); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) feof (FILE*); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) ferror (FILE*); #480 "c:\\opt\\winprog\\xilinx\\vivado_hls\\2015.2\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/stdio.h" 3 void __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) clearerr (FILE*); void __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) perror (const char*); FILE* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _popen (const char*, const char*); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _pclose (FILE*); FILE* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) popen (const char*, const char*); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) pclose (FILE*); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _flushall (void); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _fgetchar (void); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _fputchar (int); FILE* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _fdopen (int, const char*); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _fileno (FILE*); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _fcloseall (void); FILE* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _fsopen (const char*, const char*, int); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _getmaxstdio (void); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _setmaxstdio (int); #522 "c:\\opt\\winprog\\xilinx\\vivado_hls\\2015.2\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/stdio.h" 3 int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) fgetchar (void); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) fputchar (int); FILE* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) fdopen (int, const char*); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) fileno (FILE*); #534 "c:\\opt\\winprog\\xilinx\\vivado_hls\\2015.2\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/stdio.h" 3 #1 "c:\\opt\\winprog\\xilinx\\vivado_hls\\2015.2\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/sys/types.h" 1 3 #21 "c:\\opt\\winprog\\xilinx\\vivado_hls\\2015.2\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/sys/types.h" 3 #1 "c:\\opt\\winprog\\xilinx\\vivado_hls\\2015.2\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/stddef.h" 1 3 4 #150 "c:\\opt\\winprog\\xilinx\\vivado_hls\\2015.2\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/stddef.h" 3 4 typedef int ptrdiff_t; #22 "c:\\opt\\winprog\\xilinx\\vivado_hls\\2015.2\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/sys/types.h" 2 3 typedef long __time32_t; typedef long long __time64_t; #45 "c:\\opt\\winprog\\xilinx\\vivado_hls\\2015.2\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/sys/types.h" 3 typedef __time32_t time_t; typedef long _off_t; typedef _off_t off_t; typedef unsigned int _dev_t; typedef _dev_t dev_t; typedef short _ino_t; typedef _ino_t ino_t; typedef int _pid_t; typedef _pid_t pid_t; typedef unsigned short _mode_t; typedef _mode_t mode_t; typedef int _sigset_t; typedef _sigset_t sigset_t; typedef int _ssize_t; typedef _ssize_t ssize_t; typedef long long fpos64_t; typedef long long off64_t; typedef unsigned int useconds_t; #535 "c:\\opt\\winprog\\xilinx\\vivado_hls\\2015.2\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/stdio.h" 2 3 extern __inline__ FILE* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) fopen64 (const char* filename, const char* mode) { return fopen (filename, mode); } int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) fseeko64 (FILE*, off64_t, int); extern __inline__ off64_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) ftello64 (FILE * stream) { fpos_t pos; if (fgetpos(stream, &pos)) return -1LL; else return ((off64_t) pos); } #563 "c:\\opt\\winprog\\xilinx\\vivado_hls\\2015.2\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/stdio.h" 3 int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) fwprintf (FILE*, const wchar_t*, ...); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wprintf (const wchar_t*, ...); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _snwprintf (wchar_t*, size_t, const wchar_t*, ...); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) vfwprintf (FILE*, const wchar_t*, __gnuc_va_list); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) vwprintf (const wchar_t*, __gnuc_va_list); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _vsnwprintf (wchar_t*, size_t, const wchar_t*, __gnuc_va_list); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _vscwprintf (const wchar_t*, __gnuc_va_list); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) fwscanf (FILE*, const wchar_t*, ...); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wscanf (const wchar_t*, ...); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) swscanf (const wchar_t*, const wchar_t*, ...); wint_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) fgetwc (FILE*); wint_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) fputwc (wchar_t, FILE*); wint_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) ungetwc (wchar_t, FILE*); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) swprintf (wchar_t*, const wchar_t*, ...); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) vswprintf (wchar_t*, const wchar_t*, __gnuc_va_list); wchar_t* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) fgetws (wchar_t*, int, FILE*); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) fputws (const wchar_t*, FILE*); wint_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) getwc (FILE*); wint_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) getwchar (void); wchar_t* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _getws (wchar_t*); wint_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) putwc (wint_t, FILE*); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _putws (const wchar_t*); wint_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) putwchar (wint_t); FILE* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wfdopen(int, const wchar_t *); FILE* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wfopen (const wchar_t*, const wchar_t*); FILE* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wfreopen (const wchar_t*, const wchar_t*, FILE*); FILE* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wfsopen (const wchar_t*, const wchar_t*, int); wchar_t* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wtmpnam (wchar_t*); wchar_t* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wtempnam (const wchar_t*, const wchar_t*); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wrename (const wchar_t*, const wchar_t*); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wremove (const wchar_t*); void __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wperror (const wchar_t*); FILE* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wpopen (const wchar_t*, const wchar_t*); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) snwprintf (wchar_t* s, size_t n, const wchar_t* format, ...); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) vsnwprintf (wchar_t* s, size_t n, const wchar_t* format, __gnuc_va_list arg); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) vwscanf (const wchar_t * __restrict__, __gnuc_va_list); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) vfwscanf (FILE * __restrict__, const wchar_t * __restrict__, __gnuc_va_list); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) vswscanf (const wchar_t * __restrict__, const wchar_t * __restrict__, __gnuc_va_list); #625 "c:\\opt\\winprog\\xilinx\\vivado_hls\\2015.2\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/stdio.h" 3 FILE* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wpopen (const wchar_t*, const wchar_t*); wint_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _fgetwchar (void); wint_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _fputwchar (wint_t); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _getw (FILE*); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _putw (int, FILE*); wint_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) fgetwchar (void); wint_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) fputwchar (wint_t); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) getw (FILE*); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) putw (int, FILE*); #64 "C:/opt/winprog/Xilinx/Vivado_HLS/2015.2/include/ap_cint.h" 2 #77 "C:/opt/winprog/Xilinx/Vivado_HLS/2015.2/include/ap_cint.h" #1 "C:/opt/winprog/Xilinx/Vivado_HLS/2015.2/include/etc/autopilot_apint.h" 1 #57 "C:/opt/winprog/Xilinx/Vivado_HLS/2015.2/include/etc/autopilot_apint.h" #1 "C:/opt/winprog/Xilinx/Vivado_HLS/2015.2/include/etc/autopilot_dt.h" 1 #97 "C:/opt/winprog/Xilinx/Vivado_HLS/2015.2/include/etc/autopilot_dt.h" #1 "C:/opt/winprog/Xilinx/Vivado_HLS/2015.2/include/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; 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; 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:/opt/winprog/Xilinx/Vivado_HLS/2015.2/include/etc/autopilot_dt.h" 2 #1 "C:/opt/winprog/Xilinx/Vivado_HLS/2015.2/include/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:/opt/winprog/Xilinx/Vivado_HLS/2015.2/include/etc/autopilot_dt.h" 2 #108 "C:/opt/winprog/Xilinx/Vivado_HLS/2015.2/include/etc/autopilot_dt.h" #1 "C:/opt/winprog/Xilinx/Vivado_HLS/2015.2/include/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; 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; 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:/opt/winprog/Xilinx/Vivado_HLS/2015.2/include/etc/autopilot_dt.h" 2 #1 "C:/opt/winprog/Xilinx/Vivado_HLS/2015.2/include/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:/opt/winprog/Xilinx/Vivado_HLS/2015.2/include/etc/autopilot_dt.h" 2 #131 "C:/opt/winprog/Xilinx/Vivado_HLS/2015.2/include/etc/autopilot_dt.h" typedef int __attribute__ ((bitwidth(64))) int64; typedef unsigned int __attribute__ ((bitwidth(64))) uint64; #58 "C:/opt/winprog/Xilinx/Vivado_HLS/2015.2/include/etc/autopilot_apint.h" 2 #1 "C:/opt/winprog/Xilinx/Vivado_HLS/2015.2/include/etc/autopilot_ssdm_bits.h" 1 #64 "C:/opt/winprog/Xilinx/Vivado_HLS/2015.2/include/etc/autopilot_ssdm_bits.h" #1 "c:\\opt\\winprog\\xilinx\\vivado_hls\\2015.2\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/assert.h" 1 3 #38 "c:\\opt\\winprog\\xilinx\\vivado_hls\\2015.2\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/assert.h" 3 void __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _assert (const char*, const char*, int) __attribute__ ((__noreturn__)); #65 "C:/opt/winprog/Xilinx/Vivado_HLS/2015.2/include/etc/autopilot_ssdm_bits.h" 2 #1 "c:\\opt\\winprog\\xilinx\\vivado_hls\\2015.2\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/stdlib.h" 1 3 #21 "c:\\opt\\winprog\\xilinx\\vivado_hls\\2015.2\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/stdlib.h" 3 #1 "c:\\opt\\winprog\\xilinx\\vivado_hls\\2015.2\\msys\\bin\\../lib/gcc/mingw32/4.6.2/include/stddef.h" 1 3 4 #22 "c:\\opt\\winprog\\xilinx\\vivado_hls\\2015.2\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/stdlib.h" 2 3 #71 "c:\\opt\\winprog\\xilinx\\vivado_hls\\2015.2\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/stdlib.h" 3 extern int _argc; extern char** _argv; extern int* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) __p___argc(void); extern char*** __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) __p___argv(void); extern wchar_t*** __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) __p___wargv(void); #112 "c:\\opt\\winprog\\xilinx\\vivado_hls\\2015.2\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/stdlib.h" 3 extern __attribute__ ((__dllimport__)) int __mb_cur_max; #137 "c:\\opt\\winprog\\xilinx\\vivado_hls\\2015.2\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/stdlib.h" 3 int* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _errno(void); int* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) __doserrno(void); #149 "c:\\opt\\winprog\\xilinx\\vivado_hls\\2015.2\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/stdlib.h" 3 extern char *** __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) __p__environ(void); extern wchar_t *** __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) __p__wenviron(void); #172 "c:\\opt\\winprog\\xilinx\\vivado_hls\\2015.2\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/stdlib.h" 3 extern __attribute__ ((__dllimport__)) int _sys_nerr; #196 "c:\\opt\\winprog\\xilinx\\vivado_hls\\2015.2\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/stdlib.h" 3 extern __attribute__ ((__dllimport__)) char* _sys_errlist[]; #209 "c:\\opt\\winprog\\xilinx\\vivado_hls\\2015.2\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/stdlib.h" 3 extern unsigned __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) int* __p__osver(void); extern unsigned __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) int* __p__winver(void); extern unsigned __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) int* __p__winmajor(void); extern unsigned __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) int* __p__winminor(void); extern __attribute__ ((__dllimport__)) unsigned int _osver; extern __attribute__ ((__dllimport__)) unsigned int _winver; extern __attribute__ ((__dllimport__)) unsigned int _winmajor; extern __attribute__ ((__dllimport__)) unsigned int _winminor; #260 "c:\\opt\\winprog\\xilinx\\vivado_hls\\2015.2\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/stdlib.h" 3 char** __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) __p__pgmptr(void); wchar_t** __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) __p__wpgmptr(void); #293 "c:\\opt\\winprog\\xilinx\\vivado_hls\\2015.2\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/stdlib.h" 3 extern __attribute__ ((__dllimport__)) int _fmode; #303 "c:\\opt\\winprog\\xilinx\\vivado_hls\\2015.2\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/stdlib.h" 3 double __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) atof (const char*); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) atoi (const char*); long __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) atol (const char*); double __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wtof (const wchar_t *); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wtoi (const wchar_t *); long __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wtol (const wchar_t *); double __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) __strtod (const char*, char**); extern double __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) strtod (const char* __restrict__ __nptr, char** __restrict__ __endptr); float __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) strtof (const char * __restrict__, char ** __restrict__); long double __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) strtold (const char * __restrict__, char ** __restrict__); long __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) strtol (const char*, char**, int); unsigned long __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) strtoul (const char*, char**, int); long __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wcstol (const wchar_t*, wchar_t**, int); unsigned long __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wcstoul (const wchar_t*, wchar_t**, int); double __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wcstod (const wchar_t*, wchar_t**); float __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wcstof( const wchar_t * __restrict__, wchar_t ** __restrict__); long double __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wcstold (const wchar_t * __restrict__, wchar_t ** __restrict__); wchar_t* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wgetenv(const wchar_t*); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wputenv(const wchar_t*); void __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wsearchenv(const wchar_t*, const wchar_t*, wchar_t*); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wsystem(const wchar_t*); void __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wmakepath(wchar_t*, const wchar_t*, const wchar_t*, const wchar_t*, const wchar_t*); void __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wsplitpath (const wchar_t*, wchar_t*, wchar_t*, wchar_t*, wchar_t*); wchar_t* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wfullpath (wchar_t*, const wchar_t*, size_t); size_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wcstombs (char*, const wchar_t*, size_t); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wctomb (char*, wchar_t); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) mblen (const char*, size_t); size_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) mbstowcs (wchar_t*, const char*, size_t); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) mbtowc (wchar_t*, const char*, size_t); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) rand (void); void __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) srand (unsigned int); void* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) calloc (size_t, size_t) __attribute__ ((__malloc__)); void* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) malloc (size_t) __attribute__ ((__malloc__)); void* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) realloc (void*, size_t); void __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) free (void*); void __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) abort (void) __attribute__ ((__noreturn__)); void __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) exit (int) __attribute__ ((__noreturn__)); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) atexit (void (*)(void)); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) system (const char*); char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) getenv (const char*); void* __attribute__((__cdecl__)) bsearch (const void*, const void*, size_t, size_t, int (*)(const void*, const void*)); void __attribute__((__cdecl__)) qsort(void*, size_t, size_t, int (*)(const void*, const void*)); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) abs (int) __attribute__ ((__const__)); long __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) labs (long) __attribute__ ((__const__)); #385 "c:\\opt\\winprog\\xilinx\\vivado_hls\\2015.2\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/stdlib.h" 3 typedef struct { int quot, rem; } div_t; typedef struct { long quot, rem; } ldiv_t; div_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) div (int, int) __attribute__ ((__const__)); ldiv_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) ldiv (long, long) __attribute__ ((__const__)); void __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _beep (unsigned int, unsigned int) __attribute__ ((__deprecated__)); void __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _seterrormode (int) __attribute__ ((__deprecated__)); void __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _sleep (unsigned long) __attribute__ ((__deprecated__)); void __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _exit (int) __attribute__ ((__noreturn__)); typedef int (* _onexit_t)(void); _onexit_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _onexit( _onexit_t ); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _putenv (const char*); void __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _searchenv (const char*, const char*, char*); char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _ecvt (double, int, int*, int*); char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _fcvt (double, int, int*, int*); char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _gcvt (double, int, char*); void __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _makepath (char*, const char*, const char*, const char*, const char*); void __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _splitpath (const char*, char*, char*, char*, char*); char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _fullpath (char*, const char*, size_t); char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _itoa (int, char*, int); char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _ltoa (long, char*, int); char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _ultoa(unsigned long, char*, int); wchar_t* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _itow (int, wchar_t*, int); wchar_t* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _ltow (long, wchar_t*, int); wchar_t* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _ultow (unsigned long, wchar_t*, int); long long __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _atoi64(const char *); char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _i64toa(long long, char *, int); char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _ui64toa(unsigned long long, char *, int); long long __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _wtoi64(const wchar_t *); wchar_t* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _i64tow(long long, wchar_t *, int); wchar_t* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _ui64tow(unsigned long long, wchar_t *, int); unsigned int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) (_rotl)(unsigned int, int) __attribute__ ((__const__)); unsigned int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) (_rotr)(unsigned int, int) __attribute__ ((__const__)); unsigned long __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) (_lrotl)(unsigned long, int) __attribute__ ((__const__)); unsigned long __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) (_lrotr)(unsigned long, int) __attribute__ ((__const__)); int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _set_error_mode (int); #477 "c:\\opt\\winprog\\xilinx\\vivado_hls\\2015.2\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/stdlib.h" 3 int __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) putenv (const char*); void __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) searchenv (const char*, const char*, char*); char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) itoa (int, char*, int); char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) ltoa (long, char*, int); char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) ecvt (double, int, int*, int*); char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) fcvt (double, int, int*, int*); char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) gcvt (double, int, char*); #497 "c:\\opt\\winprog\\xilinx\\vivado_hls\\2015.2\\msys\\bin\\../lib/gcc/mingw32/4.6.2/../../../../include/stdlib.h" 3 void __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _Exit(int) __attribute__ ((__noreturn__)); typedef struct { long long quot, rem; } lldiv_t; lldiv_t __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) lldiv (long long, long long) __attribute__ ((__const__)); long long __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) llabs(long long); long long __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) strtoll (const char* __restrict__, char** __restrict, int); unsigned long long __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) strtoull (const char* __restrict__, char** __restrict__, int); long long __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) atoll (const char *); long long __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) wtoll (const wchar_t *); char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) lltoa (long long, char *, int); char* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) ulltoa (unsigned long long , char *, int); wchar_t* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) lltow (long long, wchar_t *, int); wchar_t* __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) ulltow (unsigned long long, wchar_t *, int); #73 "C:/opt/winprog/Xilinx/Vivado_HLS/2015.2/include/etc/autopilot_ssdm_bits.h" 2 #59 "C:/opt/winprog/Xilinx/Vivado_HLS/2015.2/include/etc/autopilot_apint.h" 2 #78 "C:/opt/winprog/Xilinx/Vivado_HLS/2015.2/include/ap_cint.h" 2 #4 "D:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2/duc.h" 2 #40 "D:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2/duc.h" typedef uint16 acc_t; typedef uint5 phi_t; typedef int16 dds_t; typedef uint11 rnd_t; typedef int18 srrc_data_t; typedef int18 srrc_coef_t; typedef int38 srrc_acc_t; typedef int18 imf1_data_t; typedef int18 imf1_coef_t; typedef int38 imf1_acc_t; typedef int18 imf2_data_t; typedef int18 imf2_coef_t; typedef int38 imf2_acc_t; typedef int18 imf3_data_t; typedef int18 imf3_coef_t; typedef int38 imf3_acc_t; typedef int18 mix_data_t; void duc ( srrc_data_t din_i, acc_t freq, mix_data_t *dout_i, mix_data_t *dout_q ); int37 mult ( int18 c, int19 d ); int37 symtap ( int18 a, int18 b, int18 c ); srrc_acc_t srrc_mac ( int18 c, int18 d, int40 s ); imf1_acc_t mac1 ( imf1_coef_t c, imf1_data_t d, imf1_acc_t s ); imf2_acc_t mac2 ( imf2_coef_t c, imf2_data_t d, imf2_acc_t s ); int48 mac ( int18 c, int18 d, int48 s ); void srrc ( srrc_data_t *y, srrc_data_t x ); void imf1 ( imf1_data_t *y, imf1_data_t x ); void imf2 ( imf2_data_t *y, imf2_data_t x ); void imf3 ( imf2_data_t *y, imf2_data_t x ); void mixer ( acc_t freq, mix_data_t Din, mix_data_t *Dout_I, mix_data_t *Dout_Q ); void dds ( acc_t freq, dds_t *sin, dds_t *cosine ); rnd_t rnd(); #2 "D:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2/imf1.c" 2 void imf1 ( imf1_data_t *y, imf1_data_t x ) { const imf1_coef_t c[24]={ #1 "D:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2/imf1_coef.h" 1 -224, 1139, -3642, 9343, -22689, 81597, 81597, -22689, 9343, -3642, 1139, -224, 0, 0, 0, 0, 0, 131071, 0, 0, 0, 0, 0, 0 #9 "D:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab2/imf1.c" 2 }; static imf1_acc_t shift_reg_p[25][2]; static imf1_data_t in = 0; static uint1 init = 1; static uint1 cnt = 0; static uint1 ch = 0; static uint5 i = 0; imf1_acc_t acc; L1: if (i==0) { in = x; } uint5 inc = i+1; acc = mac1(c[i], in, (init || i==11 || i==23) ? 0 : shift_reg_p[inc][ch]); shift_reg_p[i][ch] = acc; if (i==23) { if (ch) init = 0; ch = ch ^ cnt; cnt = !cnt; } if ((i==0) || (i==12)) { *y = acc >> 17; } i = (i == 23) ? 0 : inc; }
the_stack_data/106992.c
/* * Copyright (c) 2004,2012 Kustaa Nyholm / SpareTimeLabs * * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this list * of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, this * list of conditions and the following disclaimer in the documentation and/or other * materials provided with the distribution. * * Neither the name of the Kustaa Nyholm or SpareTimeLabs 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. */ #include "printf.h" typedef void (*putcf) (void*,char); static putcf stdout_putf; static void* stdout_putp; #ifdef PRINTF_LONG_SUPPORT static void uli2a(unsigned long int num, unsigned int base, int uc,char * bf) { int n=0; unsigned int d=1; while (num/d >= base) d*=base; while (d!=0) { int dgt = num / d; num%=d; d/=base; if (n || dgt>0|| d==0) { *bf++ = dgt+(dgt<10 ? '0' : (uc ? 'A' : 'a')-10); ++n; } } *bf=0; } static void li2a (long num, char * bf) { if (num<0) { num=-num; *bf++ = '-'; } uli2a(num,10,0,bf); } #endif static void ui2a(unsigned int num, unsigned int base, int uc,char * bf) { int n=0; unsigned int d=1; while (num/d >= base) d*=base; while (d!=0) { int dgt = num / d; num%= d; d/=base; if (n || dgt>0 || d==0) { *bf++ = dgt+(dgt<10 ? '0' : (uc ? 'A' : 'a')-10); ++n; } } *bf=0; } static void i2a (int num, char * bf) { if (num<0) { num=-num; *bf++ = '-'; } ui2a(num,10,0,bf); } static int a2d(char ch) { if (ch>='0' && ch<='9') return ch-'0'; else if (ch>='a' && ch<='f') return ch-'a'+10; else if (ch>='A' && ch<='F') return ch-'A'+10; else return -1; } static char a2i(char ch, char** src,int base,int* nump) { char* p= *src; int num=0; int digit; while ((digit=a2d(ch))>=0) { if (digit>base) break; num=num*base+digit; ch=*p++; } *src=p; *nump=num; return ch; } static void putchw(void* putp,putcf putf,int n, char z, char* bf) { char fc=z? '0' : ' '; char ch; char* p=bf; while (*p++ && n > 0) n--; while (n-- > 0) putf(putp,fc); while ((ch = *bf++) != '\0') /* This line is modified by Y. Huang to avoid assignment in condition warning */ putf(putp,ch); } void tfp_format(void* putp,putcf putf,char *fmt, va_list va) { char bf[12]; char ch; while ((ch = *(fmt++)) != '\0') { /* This line is modified by Y. Huang to avoid assignment in condition warning */ if (ch!='%') putf(putp,ch); else { char lz=0; #ifdef PRINTF_LONG_SUPPORT char lng=0; #endif int w=0; ch=*(fmt++); if (ch=='0') { ch=*(fmt++); lz=1; } if (ch>='0' && ch<='9') { ch=a2i(ch,&fmt,10,&w); } #ifdef PRINTF_LONG_SUPPORT if (ch=='l') { ch=*(fmt++); lng=1; } #endif switch (ch) { case 0: goto abort; case 'u' : { #ifdef PRINTF_LONG_SUPPORT if (lng) uli2a(va_arg(va, unsigned long int),10,0,bf); else #endif ui2a(va_arg(va, unsigned int),10,0,bf); putchw(putp,putf,w,lz,bf); break; } case 'd' : { #ifdef PRINTF_LONG_SUPPORT if (lng) li2a(va_arg(va, unsigned long int),bf); else #endif i2a(va_arg(va, int),bf); putchw(putp,putf,w,lz,bf); break; } case 'x': case 'X' : #ifdef PRINTF_LONG_SUPPORT if (lng) uli2a(va_arg(va, unsigned long int),16,(ch=='X'),bf); else #endif ui2a(va_arg(va, unsigned int),16,(ch=='X'),bf); putchw(putp,putf,w,lz,bf); break; case 'c' : putf(putp,(char)(va_arg(va, int))); break; case 's' : putchw(putp,putf,w,0,va_arg(va, char*)); break; case '%' : putf(putp,ch); default: break; } } } abort:; } void init_printf(void* putp,void (*putf) (void*,char)) { stdout_putf=putf; stdout_putp=putp; } void tfp_printf(char *fmt, ...) { va_list va; va_start(va,fmt); tfp_format(stdout_putp,stdout_putf,fmt,va); va_end(va); } static void putcp(void* p,char c) { *(*((char**)p))++ = c; } void tfp_sprintf(char* s,char *fmt, ...) { va_list va; va_start(va,fmt); tfp_format(&s,putcp,fmt,va); putcp(&s,0); va_end(va); }
the_stack_data/647015.c
/* ** EPITECH PROJECT, 2020 ** print_char_in_hex ** File description: ** print_in_hex */ void my_putchar(char const c); void my_putnbr_base(int nb, char const *base); void print_char_in_hex(unsigned char c) { char hexa[16] = "0123456789abcdef"; if (!c) return; my_putchar('\\'); if (c <= 0xF) my_putchar('0'); my_putnbr_base(c, hexa); }
the_stack_data/41127.c
#include <stdio.h> #include <stdlib.h> int fatorial(int n){ int resp; printf("\nfat (%i)", n); resp = (n == 1) ? 1 : n * fatorial(n-1); printf("\nfat n(%i): %i", n, resp); return resp; } int main(int argc, char *argv[]) { int n = 5; printf("\nFATORIAL RECURSIVO(%i): %i", n, fatorial(n)); return 0; }
the_stack_data/25138877.c
#include <stdio.h> #include <stdlib.h> #include <string.h> void cov_serialize(long double, unsigned char*, int); long double cov_deserialize(char*, int); void cov_log(long double, char*, char*); void cov_spec_log(long double, long double, char*); void cov_arr_log(long double[], int, char*, char*); void cov_spec_arr_log(long double[], int, long double, char*); void cov_check(char*, char*, char*); void cov_arr_check(char*, char*, int length); int main(int argc, char *argv[]) { long double a = 2.2L; long double b = 2.2L; long double c = b + b + a; cov_log(c, "result", argv[2]); // log.cov cov_check(argv[2], argv[1], argv[3]); // log.cov, spec.cov, result.out printf("%1.15Le\n", c); printf("%1.15Le\n", (long double)a); return 0; } void cov_serialize(long double f, unsigned char* buf, int length) { int i; union { unsigned char bytes[10]; long double val; } bfconvert; bfconvert.val = f; for (i = 0; i < length; i++) { buf[i] = bfconvert.bytes[i]; } } long double cov_deserialize(char* buf, int length) { int i; unsigned int u; union { unsigned char bytes[10]; long double val; } bfconvert; for (i = 0; i < length; i++) { sscanf(buf, "%02X", &u); bfconvert.bytes[i] = u; buf += 2; } return bfconvert.val; } void cov_log(long double ld, char* msg, char* fn) { int ld_size, i; unsigned char* buf; FILE* file; file = fopen(fn, "a"); ld_size = 10; buf = malloc(ld_size); if (strlen(msg) > 0) fprintf(file, "#%s\n", msg); cov_serialize(ld, buf, ld_size); for (i = 0; i < ld_size; i++) { fprintf(file, "%02X", buf[i]); } fprintf(file, "\n"); fclose(file); } void cov_spec_log(long double ideal, long double delta, char* fn) { cov_log(ideal, "ideal", fn); cov_log(delta, "delta", fn); } void cov_arr_log(long double lds[], int size, char* msg, char* fn) { int ld_size, i, j; unsigned char* buf; FILE *file; file = fopen(fn, "a"); ld_size = 10; buf = malloc(ld_size); if (strlen(msg) > 0) fprintf(file, "#%s\n", msg); for (i = 0; i < size; i++) { long double ld = lds[i]; cov_serialize(ld, buf, ld_size); if (i > 0) fprintf(file, " "); for (j = 0; j < ld_size; j++) { fprintf(file, "%02X", buf[j]); } } fprintf(file, "\n"); fclose(file); } void cov_spec_arr_log(long double ideal[], int size, long double delta, char* fn) { cov_arr_log(ideal, size, "ideal", fn); cov_log(delta, "delta", fn); } void cov_check(char* log, char* spec, char* result) { char line[80], estimate_hex[80], ideal_hex[80], delta_hex[80]; long double estimate, ideal, delta, diff; FILE *log_file, *spec_file, *result_file; int ld_size; ld_size = 10; // reading log file log_file = fopen(log, "rt"); while (fgets(line, 80, log_file) != NULL) { if (line[0] != '#') strcpy(estimate_hex, line); } fclose(log_file); spec_file = fopen(spec, "rt"); while (fgets(line, 80, spec_file) != NULL) { if (strncmp(line, "#ideal", 6) == 0) { fgets(ideal_hex, 80, spec_file); } else if (strncmp(line, "#delta", 6) == 0) { fgets(delta_hex, 80, spec_file); } } fclose(spec_file); // compare log and spec results estimate = cov_deserialize(estimate_hex, ld_size); ideal = cov_deserialize(ideal_hex, ld_size); delta = cov_deserialize(delta_hex, ld_size); if (estimate > ideal) diff = estimate - ideal; else diff = ideal - estimate; result_file = fopen(result, "w"); if (delta >= diff) fprintf(result_file, "true\n"); else fprintf(result_file, "false\n"); fclose(result_file); } void cov_arr_check(char* log, char* spec, int length) { char line[1000]; char *word, *sep, *brkt, *brkb; long double estimate[length], ideal[length], delta; FILE *log_file, *spec_file; int ld_size, cnt, i, predicate; sep = " "; ld_size = 10; // reading log file log_file = fopen(log, "rt"); while (fgets(line, 1000, log_file) != NULL) { if (line[0] != '#') { cnt = 0; for (word = strtok_r(line, sep, &brkt); word; word = strtok_r(NULL, sep, &brkt)){ estimate[cnt] = cov_deserialize(word, ld_size); cnt++; } } } fclose(log_file); // reading spec file spec_file = fopen(spec, "rt"); while (fgets(line, 1000, log_file) != NULL) { if (strncmp(line, "#ideal", 6) == 0) { cnt = 0; fgets(line, 1000, spec_file); for (word = strtok_r(line, sep, &brkb); word; word = strtok_r(NULL, sep, &brkb)){ ideal[cnt] = cov_deserialize(word, ld_size); cnt++; } } else if (strncmp(line, "#delta", 6) == 0) { fgets(line, 80, spec_file); delta = cov_deserialize(line, ld_size); } } fclose(spec_file); predicate = 1; for (i = 0; i < length; i++) { long double diff; if (estimate[i] > ideal[i]) diff = estimate[i] - ideal[i]; else diff = ideal[i] - estimate[i]; if (delta < diff) { predicate = 0; break; } } if (predicate) printf("true\n"); else printf("false\n"); }
the_stack_data/187644400.c
#include<stdio.h> int main(){ int i,size,sum=0; long int array[]={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20}; size=sizeof(array)/sizeof(array[0]); int n=size-1,sum2=0; for(i=0;i<size;i++){ if(i==(size/2)){ break; } else{ sum=sum+array[i]; sum2=sum2+array[n]; n--; } } printf("%d",(sum+sum2)); return 0; }
the_stack_data/149496.c
#include <errno.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <stdarg.h> #include <sys/stat.h> #define HW_FILE "/app/helloworld.txt" struct swrap { struct stat s; unsigned long long overflow; }; static inline void check(_Bool condition, const char *msg, ...) { if (!condition) { va_list ap; va_start(ap, msg); vfprintf(stderr, msg, ap); va_end(ap); fprintf(stderr, "\nTEST_FAILED\n"); exit(1); } } int main(int argc, char** argv) { struct swrap s; s.overflow = -1ULL; int ret = stat(HW_FILE, &s.s); check(ret == 0, "stat file %s: %s\n", HW_FILE, strerror(errno)); check(s.overflow == -1ULL, "stat overflowed buffer: %llx", s.overflow); check(s.s.st_size == 24, "stat returned incorrect size: %d", (int)s.s.st_size); check(s.s.st_mode == S_IFREG | S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH, "stat returned incorrect mode: 0%o", (int)s.s.st_mode); check(s.s.st_uid == 0, "stat returned incorrect user id: %d", (int)s.s.st_uid); check(s.s.st_gid == 0, "stat returned incorrect group: %d", (int)s.s.st_gid); check(s.s.st_nlink == 1, "stat returned incorrect number of hard links: %d", (int)s.s.st_nlink); fprintf(stderr, "TEST_PASSED\n"); return 0; }
the_stack_data/66661.c
#include<stdio.h> int main() { int number,check; scanf("%d",&number); check= number & (number-1); if(check==0) printf("YES"); else printf("NO"); }
the_stack_data/680215.c
// RUN: %clang_cc1 -triple armv8-none-linux-gnueabi \ // RUN: -emit-llvm -o - %s | opt -S -mem2reg | FileCheck %s int crc32b(int a, char b) { return __builtin_arm_crc32b(a,b); // CHECK: [[T0:%[0-9]+]] = zext i8 %b to i32 // CHECK: call i32 @llvm.arm.crc32b(i32 %a, i32 [[T0]]) } int crc32cb(int a, char b) { return __builtin_arm_crc32cb(a,b); // CHECK: [[T0:%[0-9]+]] = zext i8 %b to i32 // CHECK: call i32 @llvm.arm.crc32cb(i32 %a, i32 [[T0]]) } int crc32h(int a, short b) { return __builtin_arm_crc32h(a,b); // CHECK: [[T0:%[0-9]+]] = zext i16 %b to i32 // CHECK: call i32 @llvm.arm.crc32h(i32 %a, i32 [[T0]]) } int crc32ch(int a, short b) { return __builtin_arm_crc32ch(a,b); // CHECK: [[T0:%[0-9]+]] = zext i16 %b to i32 // CHECK: call i32 @llvm.arm.crc32ch(i32 %a, i32 [[T0]]) } int crc32w(int a, int b) { return __builtin_arm_crc32w(a,b); // CHECK: call i32 @llvm.arm.crc32w(i32 %a, i32 %b) } int crc32cw(int a, int b) { return __builtin_arm_crc32cw(a,b); // CHECK: call i32 @llvm.arm.crc32cw(i32 %a, i32 %b) } int crc32d(int a, long long b) { return __builtin_arm_crc32d(a,b); // CHECK: [[T0:%[0-9]+]] = trunc i64 %b to i32 // CHECK: [[T1:%[0-9]+]] = lshr i64 %b, 32 // CHECK: [[T2:%[0-9]+]] = trunc i64 [[T1]] to i32 // CHECK: [[T3:%[0-9]+]] = call i32 @llvm.arm.crc32w(i32 %a, i32 [[T0]]) // CHECK: call i32 @llvm.arm.crc32w(i32 [[T3]], i32 [[T2]]) } int crc32cd(int a, long long b) { return __builtin_arm_crc32cd(a,b); // CHECK: [[T0:%[0-9]+]] = trunc i64 %b to i32 // CHECK: [[T1:%[0-9]+]] = lshr i64 %b, 32 // CHECK: [[T2:%[0-9]+]] = trunc i64 [[T1]] to i32 // CHECK: [[T3:%[0-9]+]] = call i32 @llvm.arm.crc32cw(i32 %a, i32 [[T0]]) // CHECK: call i32 @llvm.arm.crc32cw(i32 [[T3]], i32 [[T2]]) }
the_stack_data/9512793.c
// // Created by kang on 19-2-14. // #include <stdio.h> #include <unistd.h> void func() { printf("------step 1------\n"); printf("------step 2------\n"); printf("------step 3------\n"); printf("------step 4------\n"); printf("------step 5------\n"); return; } int main() { printf("---write data to R15(5473)---\n"); __asm__ __volatile__("movq $5473, %R15"); // 手动写数据到R15寄存器 printf("---write data to R15 fin------\n"); printf("---read data from R14--------\n"); long v; __asm__ __volatile__("movq %%R14, %0" : "=r"(v)); printf("---read data %ld from R14----\n", v); printf("---exam memmory-----------\n"); long value = 1024; printf("address:%ld\n", &value); printf("---modify memory----------\n"); printf("now value is %ld\n", value); printf("---memory fin-------------\n"); printf("------backtrace and step--\n"); func(); printf("--backtrace and step fin--\n"); printf("------sheep fin-----------\n"); return 0; }
the_stack_data/168893761.c
#include <stdio.h> #include <stdlib.h> extern char **environ; int main(int argc, char *argv[]) { int i=0; for (i = 0; environ[i]; ++i) { printf("%s\n", environ[i]); } return 0; }
the_stack_data/631893.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #define MAXLEN 256 int main() { char *r = "winnie"; char *s; char q[MAXLEN]; int stat; char *delimiter = " "; char *token; char *save; char *copy; s = (char *) malloc(sizeof(char) * MAXLEN); strcat(s,"tigger"); /* initialize string s */ strcat(q, "pooh"); printf("String r = %s length of r = %d\n",r, strlen(r)); strcpy(q, r); // r is copied to q strcat(s, r); printf("r = %s s = %s q = %s \n",r, s, q); stat = strcmp(r,s); if (stat < 0) printf("r < s (lexicographically)\n"); else if (stat == 0) printf("r == s (lexicographically)\n"); else printf("r > s (lexicographically)\n"); free(s); s = (char *) malloc(sizeof(char)*MAXLEN); strcpy(s, " tigger pooh abracadabra woo ;; woo & choo choo"); /* save a copy because strtok will eat it up */ save = (char *) malloc(sizeof(char)*(strlen(s)+1)); strcpy(save, s); printf("starting to tokenize the string: %s \n", s); /* tokenize the string q */ token = strtok(s, delimiter); /* use space as a delimiter */ /* you should copy the token to a local space since right now token is * pointing to inside the string s, which is liable to change. This is * especially needed if you will pass the token around to other functions. */ copy = (char *) malloc (sizeof(char)*(strlen(token)+1)); strcpy(copy, token); while (token != NULL) { printf("next token = %s\n", token); token = strtok(NULL, delimiter); } strcpy(s, save); /* restore s */ printf("starting to tokenize the string: %s \n", s); /* tokenize the string s */ token = strsep(&s, " ;"); /* use space as a delimiter */ while (token != NULL) { printf("next token = %s\n", token); token = strsep(&s, " ;"); } exit(0); }
the_stack_data/97013964.c
int smallestRangeI(int* A, int ASize, int K){ int min = 10000, max = 0; for (int i = 0; i < ASize; i ++) { if (A[i] < min) min = A[i]; if (A[i] > max) max = A[i]; } int pad = (max - K) - (min + K); return pad < 0 ? 0 : pad; }
the_stack_data/330346.c
#include <stdio.h> #define MAXLINE 1000 int max; char line[MAXLINE]; char longest[MAXLINE]; int getline_tst(void); void copy(void); int main() { int len; extern int max; extern char longest[]; max = 0; while ((len = getline_tst()) > 0) { if (len > max) { max = len; copy(); } } if (max > 0) { printf("%s", longest); } return 0; } int getline_tst(void) { int c, i; extern char line[]; for (i = 0; i < MAXLINE -1 && (c = getchar()) != EOF && c != '\n'; ++i) { line[i] = c; } if (c == '\n') { line[i] = c; ++i; } line[i] = '\0'; return i; } void copy(void) { int i = 0; extern char line[], longest[]; while ((longest[i] = line[i]) != '\0') ++i; }
the_stack_data/62638498.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]/df(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) */ /* > \brief \b STPLQT */ /* =========== DOCUMENTATION =========== */ /* Online html documentation available at */ /* http://www.netlib.org/lapack/explore-html/ */ /* > \htmlonly */ /* > Download DTPQRT + dependencies */ /* > <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/stplqt. f"> */ /* > [TGZ]</a> */ /* > <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/stplqt. f"> */ /* > [ZIP]</a> */ /* > <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/stplqt. f"> */ /* > [TXT]</a> */ /* > \endhtmlonly */ /* Definition: */ /* =========== */ /* SUBROUTINE STPLQT( M, N, L, MB, A, LDA, B, LDB, T, LDT, WORK, */ /* INFO ) */ /* INTEGER INFO, LDA, LDB, LDT, N, M, L, MB */ /* REAL A( LDA, * ), B( LDB, * ), T( LDT, * ), WORK( * ) */ /* > \par Purpose: */ /* ============= */ /* > */ /* > \verbatim */ /* > */ /* > DTPLQT computes a blocked LQ factorization of a real */ /* > "triangular-pentagonal" matrix C, which is composed of a */ /* > triangular block A and pentagonal block B, using the compact */ /* > WY representation for Q. */ /* > \endverbatim */ /* Arguments: */ /* ========== */ /* > \param[in] M */ /* > \verbatim */ /* > M is INTEGER */ /* > The number of rows of the matrix B, and the order of the */ /* > triangular matrix A. */ /* > M >= 0. */ /* > \endverbatim */ /* > */ /* > \param[in] N */ /* > \verbatim */ /* > N is INTEGER */ /* > The number of columns of the matrix B. */ /* > N >= 0. */ /* > \endverbatim */ /* > */ /* > \param[in] L */ /* > \verbatim */ /* > L is INTEGER */ /* > The number of rows of the lower trapezoidal part of B. */ /* > MIN(M,N) >= L >= 0. See Further Details. */ /* > \endverbatim */ /* > */ /* > \param[in] MB */ /* > \verbatim */ /* > MB is INTEGER */ /* > The block size to be used in the blocked QR. M >= MB >= 1. */ /* > \endverbatim */ /* > */ /* > \param[in,out] A */ /* > \verbatim */ /* > A is REAL array, dimension (LDA,M) */ /* > On entry, the lower triangular M-by-M matrix A. */ /* > On exit, the elements on and below the diagonal of the array */ /* > contain the lower triangular matrix L. */ /* > \endverbatim */ /* > */ /* > \param[in] LDA */ /* > \verbatim */ /* > LDA is INTEGER */ /* > The leading dimension of the array A. LDA >= f2cmax(1,M). */ /* > \endverbatim */ /* > */ /* > \param[in,out] B */ /* > \verbatim */ /* > B is REAL array, dimension (LDB,N) */ /* > On entry, the pentagonal M-by-N matrix B. The first N-L columns */ /* > are rectangular, and the last L columns are lower trapezoidal. */ /* > On exit, B contains the pentagonal matrix V. See Further Details. */ /* > \endverbatim */ /* > */ /* > \param[in] LDB */ /* > \verbatim */ /* > LDB is INTEGER */ /* > The leading dimension of the array B. LDB >= f2cmax(1,M). */ /* > \endverbatim */ /* > */ /* > \param[out] T */ /* > \verbatim */ /* > T is REAL array, dimension (LDT,N) */ /* > The lower triangular block reflectors stored in compact form */ /* > as a sequence of upper triangular blocks. See Further Details. */ /* > \endverbatim */ /* > */ /* > \param[in] LDT */ /* > \verbatim */ /* > LDT is INTEGER */ /* > The leading dimension of the array T. LDT >= MB. */ /* > \endverbatim */ /* > */ /* > \param[out] WORK */ /* > \verbatim */ /* > WORK is REAL array, dimension (MB*M) */ /* > \endverbatim */ /* > */ /* > \param[out] INFO */ /* > \verbatim */ /* > INFO is INTEGER */ /* > = 0: successful exit */ /* > < 0: if INFO = -i, the i-th argument had an illegal value */ /* > \endverbatim */ /* Authors: */ /* ======== */ /* > \author Univ. of Tennessee */ /* > \author Univ. of California Berkeley */ /* > \author Univ. of Colorado Denver */ /* > \author NAG Ltd. */ /* > \date June 2017 */ /* > \ingroup doubleOTHERcomputational */ /* > \par Further Details: */ /* ===================== */ /* > */ /* > \verbatim */ /* > */ /* > The input matrix C is a M-by-(M+N) matrix */ /* > */ /* > C = [ A ] [ B ] */ /* > */ /* > */ /* > where A is an lower triangular M-by-M matrix, and B is M-by-N pentagonal */ /* > matrix consisting of a M-by-(N-L) rectangular matrix B1 on left of a M-by-L */ /* > upper trapezoidal matrix B2: */ /* > [ B ] = [ B1 ] [ B2 ] */ /* > [ B1 ] <- M-by-(N-L) rectangular */ /* > [ B2 ] <- M-by-L lower trapezoidal. */ /* > */ /* > The lower trapezoidal matrix B2 consists of the first L columns of a */ /* > M-by-M lower triangular matrix, where 0 <= L <= MIN(M,N). If L=0, */ /* > B is rectangular M-by-N; if M=L=N, B is lower triangular. */ /* > */ /* > The matrix W stores the elementary reflectors H(i) in the i-th row */ /* > above the diagonal (of A) in the M-by-(M+N) input matrix C */ /* > [ C ] = [ A ] [ B ] */ /* > [ A ] <- lower triangular M-by-M */ /* > [ B ] <- M-by-N pentagonal */ /* > */ /* > so that W can be represented as */ /* > [ W ] = [ I ] [ V ] */ /* > [ I ] <- identity, M-by-M */ /* > [ V ] <- M-by-N, same form as B. */ /* > */ /* > Thus, all of information needed for W is contained on exit in B, which */ /* > we call V above. Note that V has the same form as B; that is, */ /* > [ V ] = [ V1 ] [ V2 ] */ /* > [ V1 ] <- M-by-(N-L) rectangular */ /* > [ V2 ] <- M-by-L lower trapezoidal. */ /* > */ /* > The rows of V represent the vectors which define the H(i)'s. */ /* > */ /* > The number of blocks is B = ceiling(M/MB), where each */ /* > block is of order MB except for the last block, which is of order */ /* > IB = M - (M-1)*MB. For each of the B blocks, a upper triangular block */ /* > reflector factor is computed: T1, T2, ..., TB. The MB-by-MB (and IB-by-IB */ /* > for the last block) T's are stored in the MB-by-N matrix T as */ /* > */ /* > T = [T1 T2 ... TB]. */ /* > \endverbatim */ /* > */ /* ===================================================================== */ /* Subroutine */ int stplqt_(integer *m, integer *n, integer *l, integer *mb, real *a, integer *lda, real *b, integer *ldb, real *t, integer *ldt, real *work, integer *info) { /* System generated locals */ integer a_dim1, a_offset, b_dim1, b_offset, t_dim1, t_offset, i__1, i__2, i__3, i__4; /* Local variables */ integer i__, iinfo, ib, lb, nb; extern /* Subroutine */ int xerbla_(char *, integer *, ftnlen), stprfb_( char *, char *, char *, char *, integer *, integer *, integer *, integer *, real *, integer *, real *, integer *, real *, integer * , real *, integer *, real *, integer *), stplqt2_(integer *, integer *, integer *, real *, integer *, real *, integer *, real *, integer *, integer *); /* -- 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 arguments */ /* Parameter adjustments */ a_dim1 = *lda; a_offset = 1 + a_dim1 * 1; a -= a_offset; b_dim1 = *ldb; b_offset = 1 + b_dim1 * 1; b -= b_offset; t_dim1 = *ldt; t_offset = 1 + t_dim1 * 1; t -= t_offset; --work; /* Function Body */ *info = 0; if (*m < 0) { *info = -1; } else if (*n < 0) { *info = -2; } else if (*l < 0 || *l > f2cmin(*m,*n) && f2cmin(*m,*n) >= 0) { *info = -3; } else if (*mb < 1 || *mb > *m && *m > 0) { *info = -4; } else if (*lda < f2cmax(1,*m)) { *info = -6; } else if (*ldb < f2cmax(1,*m)) { *info = -8; } else if (*ldt < *mb) { *info = -10; } if (*info != 0) { i__1 = -(*info); xerbla_("STPLQT", &i__1, (ftnlen)6); return 0; } /* Quick return if possible */ if (*m == 0 || *n == 0) { return 0; } i__1 = *m; i__2 = *mb; for (i__ = 1; i__2 < 0 ? i__ >= i__1 : i__ <= i__1; i__ += i__2) { /* Compute the QR factorization of the current block */ /* Computing MIN */ i__3 = *m - i__ + 1; ib = f2cmin(i__3,*mb); /* Computing MIN */ i__3 = *n - *l + i__ + ib - 1; nb = f2cmin(i__3,*n); if (i__ >= *l) { lb = 0; } else { lb = nb - *n + *l - i__ + 1; } stplqt2_(&ib, &nb, &lb, &a[i__ + i__ * a_dim1], lda, &b[i__ + b_dim1], ldb, &t[i__ * t_dim1 + 1], ldt, &iinfo); /* Update by applying H**T to B(I+IB:M,:) from the right */ if (i__ + ib <= *m) { i__3 = *m - i__ - ib + 1; i__4 = *m - i__ - ib + 1; stprfb_("R", "N", "F", "R", &i__3, &nb, &ib, &lb, &b[i__ + b_dim1] , ldb, &t[i__ * t_dim1 + 1], ldt, &a[i__ + ib + i__ * a_dim1], lda, &b[i__ + ib + b_dim1], ldb, &work[1], &i__4); } } return 0; /* End of STPLQT */ } /* stplqt_ */
the_stack_data/884706.c
#include<stdio.h> #include<string.h> int main() { int flag=2,i,count,j; char arr0[330],arr1[70],arr2[330]; printf("ENTER STRING 1: "); gets(arr0); strcpy(arr2,arr0); printf("\nENTER STRING 2: "); gets(arr1); for(i=0; arr0[i]!='\0'; ++i); count=i; for(i=0; arr1[i]!='\0'; ++i) arr0[i+count]=arr1[i]; arr0[i+count]='\0'; printf("\nTHE CONCATINATED STRING IS::%s\n",arr0); printf("\n\nUSING STRCPY FUNCION is ::"); strcat(arr2,arr1); printf("%s",arr2); printf("\n\t\t\t\t\tANKIT(D-6)\n"); return 0; }