file
stringlengths 18
26
| data
stringlengths 2
1.05M
|
---|---|
the_stack_data/182952738.c | #include <stddef.h>
#include <stdio.h>
int x0;
char x1 = 'x';
int x2 = 12345;
double x3 = 3.14159;
char x4[4] = { 'a', 'b', 'c', 'd' };
int x5[10] = { 1, 2, 3 };
struct { int y; int z; } x6 = { 4, 5 };
struct { int y; char z; } x7 = { 6, 'u' };
struct { char y; int z; } x8 = { 'v', 7 };
struct { char y[9]; double z; } x9 = { { 'a', 'b' }, 2.718 };
struct {
struct { char y; int z; } u;
double v;
} x10 = { { 'v', 7 }, 2.718 };
float x11 = 1 + 1 / 3.14159;
double x12 = 1 / 3.14159 + 1;
typedef enum { AAA , BBB } MyEnum;
const MyEnum x13[2] = { AAA, BBB };
int * x14 = &x2;
struct { char * y; int * z; float * u; double * v; } x15 = { x4, x5, &x11, &x12 };
unsigned char * x16[3] = {
(unsigned char *) (x4 + 1),
(unsigned char *) &x4[2],
((unsigned char *) x4) + 3 };
char x17[] = "Hello!";
char * x18 = "Hello!";
char * x19[2] = { "Hello", "world!" };
char x20[3] = "Hello!";
char x21[10] = "Hello!";
char * x22 = &(x10.u.y);
/* Initializer can refer to ident just declared */
struct list { int hd; struct list * tl; } x23 = { sizeof(x23), &x23 };
/* Watch out for aliases of char types */
typedef unsigned char byte;
byte x24[] = "/*B*/";
/* Another tricky case with string literals */
char * x25[] = { "/tmp" };
/* One more */
char x26[] = { "world" };
/* Wide strings (issue #71) */
wchar_t x27[] = L"abc";
wchar_t x28[2] = L"abc";
wchar_t x29[10] = L"abc";
static void print_chars(char * s, int sz)
{
int i;
for (i = 0; i < sz; i++) {
if (s[i] >= 32 && s[i] < 127)
printf("'%c', ", s[i]);
else
printf("%d, ", s[i]);
}
}
static void print_wchars(wchar_t * s, int sz)
{
int i;
for (i = 0; i < sz; i++) {
if (s[i] >= 32 && s[i] < 127)
printf("'%c', ", (char) s[i]);
else
printf("%d, ", (int) s[i]);
}
}
int main()
{
int i;
printf("x0 = %d\n", x0);
printf("x1 = '%c'\n", x1);
printf("x2 = %d\n", x2);
printf("x3 = %.5f\n", x3);
printf("x4 = { '%c', '%c', '%c', '%c' }\n",
x4[0], x4[1], x4[2], x4[3]);
printf("x5 = { ");
for (i = 0; i < 10; i++) printf("%d, ", x5[i]);
printf("}\n");
printf("x6 = { %d, %d }\n", x6.y, x6.z);
printf("x7 = { %d, '%c' }\n", x7.y, x7.z);
printf("x8 = { '%c', %d }\n", x8.y, x8.z);
printf("x9 = { { ");
print_chars(x9.y, 9);
printf("}, %.3f }\n", x9.z);
printf("x10 = { { '%c', %d }, %.3f }\n",
x10.u.y, x10.u.z, x10.v);
printf("x11 = %.10f\n", x11);
printf("x12 = %.10f\n", x12);
printf("x13 = { %d, %d }\n", x13[0], x13[1]);
if (x14 == &x2) printf("x14 ok\n"); else printf("x14 error\n");
if (x15.y == x4 && x15.z == x5 && x15.u == &x11 && x15.v == &x12)
printf("x15 ok\n");
else
printf("x15 error\n");
if (x16[0] == (unsigned char *) x4 + 1
&& x16[1] == (unsigned char *) x4 + 2
&& x16[2] == (unsigned char *) x4 + 3)
printf("x16 ok\n");
else
printf("x16 error\n");
printf("x17[%d] = { ", (int) sizeof(x17));
print_chars(x17, sizeof(x17));
printf("}\n");
printf("x18 = \"%s\"\n", x18);
printf("x19 = { \"%s\", \"%s\" }\n", x19[0], x19[1]);
printf("x20 = { ");
print_chars(x20, sizeof(x20));
printf("}\n");
printf("x21 = { ");
print_chars(x21, sizeof(x21));
printf("}\n");
if (x22 == &(x10.u.y))
printf("x22 ok\n");
else
printf("x22 error\n");
printf("x23 = { hd = %d, tl = %s }\n",
x23.hd, x23.tl == &x23 ? "ok" : "ERROR");
printf("x24[%d] = { ", (int) sizeof(x24));
print_chars((char *) x24, sizeof(x24));
printf("}\n");
printf("x25[%d] = { \"%s\" }\n", (int) sizeof(x25), x25[0]);
printf("x26[%d] = { ", (int) sizeof(x26));
print_chars(x26, sizeof(x26));
printf("}\n");
printf("x27[%d] = { ", (int) (sizeof(x27) / sizeof(wchar_t)));
print_wchars(x27, sizeof(x27) / sizeof(wchar_t));
printf("}\n");
printf("x28[%d] = { ", (int) (sizeof(x28) / sizeof(wchar_t)));
print_wchars(x28, sizeof(x28) / sizeof(wchar_t));
printf("}\n");
printf("x29[%d] = { ", (int) (sizeof(x29) / sizeof(wchar_t)));
print_wchars(x29, sizeof(x29) / sizeof(wchar_t));
printf("}\n");
return 0;
}
|
the_stack_data/22011806.c | #include <stdio.h>
const int MAX = 130;
int fatherAge(){
int age ;
for(age=20;age<MAX;age++){
if(age%12!=0) continue;
else if(age%7!=0) continue;
else if(age/6+age/12+age/7+5+age/2+4==age) return age;
}
return -1;
}
int main(){
int Age = fatherAge();
int nowAge = Age-4;
printf("%d",nowAge);
return 0;
} |
the_stack_data/181392580.c | /* { dg-do compile } */
/* { dg-options "-funswitch-loops" } */
void foo(double);
void CreateDefaultTexture(double mnMinimum, double mnMaximum,
unsigned short nCreateWhat)
{
double d = 0.0;
for(;;)
{
if(nCreateWhat & (0x0001)
&& mnMinimum != 0.0)
d = mnMinimum;
if(nCreateWhat & (0x0002)
&& mnMaximum != 0.0)
d = mnMaximum;
foo(d);
}
}
|
the_stack_data/603770.c | #include<stdio.h>
#define max 50
void selectsort(int array[],int n);
void printsort(int array[],int n);
void printunsort(int array[],int start,int n);
void swap(int i,int j);
int main()
{
int i,n,array[max];
printf("Number of Inputs:");
scanf("%d",&n);
for(i=0;i<n;i++)
{
scanf("%d",&array[i]);
}
printf("\nUnsorted Array\t:");
for(i=0;i<n;i++)
{
printf("%d\t ",array[i]);
}
printf("\n");
selectsort(array,n);
return 0;
}
void selectsort(int array[],int n)
{
printf("\n\t\t________Selection Sort_______\n");
int min,i,j,temp;
for(i=0;i<n-1;i++)
{
min=i; //set minimum value to maximum of sorted array
for(j=i+1;j<n;j++)
{
if(array[min]>array[j]) //check minimum from unsorted array
{
min=j;
}
}
if(min!=i){
swap(array[i],array[min]);
}
temp=array[min]; //swap min with array[i]
array[min]=array[i];
array[i]=temp;
printsort(array,i+1);
printunsort(array,i+1,n);
}
printsort(array,i+1);
}
void printunsort(int array[],int start,int n)
{
int i;
printf("Unsorted Array:\t ");
for (i=start; i < n; i++)
printf("--------");
printf("\n\t\t|");
for (i=start; i < n; i++)
printf(" %d\t| ", array[i]);
printf("\n\t\t ");
for (i=start; i < n; i++)
printf("--------");
printf("\n");
}
void printsort(int array[], int n)
{
int i;
printf("\n");
printf("Sorted Array:\t ");
for (i=0; i < n; i++)
printf("--------");
printf("\n\t\t|");
for (i=0; i < n; i++)
printf(" %d\t| ", array[i]);
printf("\n\t\t ");
for (i=0; i < n; i++)
printf("--------");
printf("\n");
}
void swap(int i,int j)
{
printf("\nswap(%d,%d)",i,j);
}
|
the_stack_data/1154764.c | #include<stdio.h>
#include<omp.h>
int DATA = 30;
int main(){
int id;
omp_set_dynamic(0);
#pragma omp parallel num_threads(3)
{
id = omp_get_thread_num();
// Reader thread 1
if(id == 0){
#pragma omp critical
{
printf(" Reader thread 1. DATA = %d", DATA);
fgetc(stdin);
}
}
// Reader thread 2
else if(id == 1){
#pragma omp critical
{
printf(" Reader thread 2. DATA = %d", DATA);
fgetc(stdin);
}
}
// Writer thread
else{
#pragma omp critical
{
DATA *= 2;
printf(" Writer thread. Doubling the value, DATA = %d", DATA);
fgetc(stdin);
}
}
}
return 0;
}
|
the_stack_data/22104.c | /* f2c.h -- Standard Fortran to C header file */
/** barf [ba:rf] 2. "He suggested using FORTRAN, and everybody barfed."
- From The Shogakukan DICTIONARY OF NEW ENGLISH (Second edition) */
#ifndef F2C_INCLUDE
#define F2C_INCLUDE
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <complex.h>
#ifdef complex
#undef complex
#endif
#ifdef I
#undef I
#endif
#if defined(_WIN64)
typedef long long BLASLONG;
typedef unsigned long long BLASULONG;
#else
typedef long BLASLONG;
typedef unsigned long BLASULONG;
#endif
#ifdef LAPACK_ILP64
typedef BLASLONG blasint;
#if defined(_WIN64)
#define blasabs(x) llabs(x)
#else
#define blasabs(x) labs(x)
#endif
#else
typedef int blasint;
#define blasabs(x) abs(x)
#endif
typedef blasint integer;
typedef unsigned int uinteger;
typedef char *address;
typedef short int shortint;
typedef float real;
typedef double doublereal;
typedef struct { real r, i; } complex;
typedef struct { doublereal r, i; } doublecomplex;
static inline _Complex float Cf(complex *z) {return z->r + z->i*_Complex_I;}
static inline _Complex double Cd(doublecomplex *z) {return z->r + z->i*_Complex_I;}
static inline _Complex float * _pCf(complex *z) {return (_Complex float*)z;}
static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*)z;}
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
typedef int logical;
typedef short int shortlogical;
typedef char logical1;
typedef char integer1;
#define TRUE_ (1)
#define FALSE_ (0)
/* Extern is for use with -E */
#ifndef Extern
#define Extern extern
#endif
/* I/O stuff */
typedef int flag;
typedef int ftnlen;
typedef int ftnint;
/*external read, write*/
typedef struct
{ flag cierr;
ftnint ciunit;
flag ciend;
char *cifmt;
ftnint cirec;
} cilist;
/*internal read, write*/
typedef struct
{ flag icierr;
char *iciunit;
flag iciend;
char *icifmt;
ftnint icirlen;
ftnint icirnum;
} icilist;
/*open*/
typedef struct
{ flag oerr;
ftnint ounit;
char *ofnm;
ftnlen ofnmlen;
char *osta;
char *oacc;
char *ofm;
ftnint orl;
char *oblnk;
} olist;
/*close*/
typedef struct
{ flag cerr;
ftnint cunit;
char *csta;
} cllist;
/*rewind, backspace, endfile*/
typedef struct
{ flag aerr;
ftnint aunit;
} alist;
/* inquire */
typedef struct
{ flag inerr;
ftnint inunit;
char *infile;
ftnlen infilen;
ftnint *inex; /*parameters in standard's order*/
ftnint *inopen;
ftnint *innum;
ftnint *innamed;
char *inname;
ftnlen innamlen;
char *inacc;
ftnlen inacclen;
char *inseq;
ftnlen inseqlen;
char *indir;
ftnlen indirlen;
char *infmt;
ftnlen infmtlen;
char *inform;
ftnint informlen;
char *inunf;
ftnlen inunflen;
ftnint *inrecl;
ftnint *innrec;
char *inblank;
ftnlen inblanklen;
} inlist;
#define VOID void
union Multitype { /* for multiple entry points */
integer1 g;
shortint h;
integer i;
/* longint j; */
real r;
doublereal d;
complex c;
doublecomplex z;
};
typedef union Multitype Multitype;
struct Vardesc { /* for Namelist */
char *name;
char *addr;
ftnlen *dims;
int type;
};
typedef struct Vardesc Vardesc;
struct Namelist {
char *name;
Vardesc **vars;
int nvars;
};
typedef struct Namelist Namelist;
#define abs(x) ((x) >= 0 ? (x) : -(x))
#define dabs(x) (fabs(x))
#define f2cmin(a,b) ((a) <= (b) ? (a) : (b))
#define f2cmax(a,b) ((a) >= (b) ? (a) : (b))
#define dmin(a,b) (f2cmin(a,b))
#define dmax(a,b) (f2cmax(a,b))
#define bit_test(a,b) ((a) >> (b) & 1)
#define bit_clear(a,b) ((a) & ~((uinteger)1 << (b)))
#define bit_set(a,b) ((a) | ((uinteger)1 << (b)))
#define abort_() { sig_die("Fortran abort routine called", 1); }
#define c_abs(z) (cabsf(Cf(z)))
#define c_cos(R,Z) { pCf(R)=ccos(Cf(Z)); }
#define c_div(c, a, b) {pCf(c) = Cf(a)/Cf(b);}
#define z_div(c, a, b) {pCd(c) = Cd(a)/Cd(b);}
#define c_exp(R, Z) {pCf(R) = cexpf(Cf(Z));}
#define c_log(R, Z) {pCf(R) = clogf(Cf(Z));}
#define c_sin(R, Z) {pCf(R) = csinf(Cf(Z));}
//#define c_sqrt(R, Z) {*(R) = csqrtf(Cf(Z));}
#define c_sqrt(R, Z) {pCf(R) = csqrtf(Cf(Z));}
#define d_abs(x) (fabs(*(x)))
#define d_acos(x) (acos(*(x)))
#define d_asin(x) (asin(*(x)))
#define d_atan(x) (atan(*(x)))
#define d_atn2(x, y) (atan2(*(x),*(y)))
#define d_cnjg(R, Z) { pCd(R) = conj(Cd(Z)); }
#define r_cnjg(R, Z) { pCf(R) = conj(Cf(Z)); }
#define d_cos(x) (cos(*(x)))
#define d_cosh(x) (cosh(*(x)))
#define d_dim(__a, __b) ( *(__a) > *(__b) ? *(__a) - *(__b) : 0.0 )
#define d_exp(x) (exp(*(x)))
#define d_imag(z) (cimag(Cd(z)))
#define r_imag(z) (cimag(Cf(z)))
#define d_int(__x) (*(__x)>0 ? floor(*(__x)) : -floor(- *(__x)))
#define r_int(__x) (*(__x)>0 ? floor(*(__x)) : -floor(- *(__x)))
#define d_lg10(x) ( 0.43429448190325182765 * log(*(x)) )
#define r_lg10(x) ( 0.43429448190325182765 * log(*(x)) )
#define d_log(x) (log(*(x)))
#define d_mod(x, y) (fmod(*(x), *(y)))
#define u_nint(__x) ((__x)>=0 ? floor((__x) + .5) : -floor(.5 - (__x)))
#define d_nint(x) u_nint(*(x))
#define u_sign(__a,__b) ((__b) >= 0 ? ((__a) >= 0 ? (__a) : -(__a)) : -((__a) >= 0 ? (__a) : -(__a)))
#define d_sign(a,b) u_sign(*(a),*(b))
#define r_sign(a,b) u_sign(*(a),*(b))
#define d_sin(x) (sin(*(x)))
#define d_sinh(x) (sinh(*(x)))
#define d_sqrt(x) (sqrt(*(x)))
#define d_tan(x) (tan(*(x)))
#define d_tanh(x) (tanh(*(x)))
#define i_abs(x) abs(*(x))
#define i_dnnt(x) ((integer)u_nint(*(x)))
#define i_len(s, n) (n)
#define i_nint(x) ((integer)u_nint(*(x)))
#define i_sign(a,b) ((integer)u_sign((integer)*(a),(integer)*(b)))
#define pow_dd(ap, bp) ( pow(*(ap), *(bp)))
#define pow_si(B,E) spow_ui(*(B),*(E))
#define pow_ri(B,E) spow_ui(*(B),*(E))
#define pow_di(B,E) dpow_ui(*(B),*(E))
#define pow_zi(p, a, b) {pCd(p) = zpow_ui(Cd(a), *(b));}
#define pow_ci(p, a, b) {pCf(p) = cpow_ui(Cf(a), *(b));}
#define pow_zz(R,A,B) {pCd(R) = cpow(Cd(A),*(B));}
#define s_cat(lpp, rpp, rnp, np, llp) { ftnlen i, nc, ll; char *f__rp, *lp; ll = (llp); lp = (lpp); for(i=0; i < (int)*(np); ++i) { nc = ll; if((rnp)[i] < nc) nc = (rnp)[i]; ll -= nc; f__rp = (rpp)[i]; while(--nc >= 0) *lp++ = *(f__rp)++; } while(--ll >= 0) *lp++ = ' '; }
#define s_cmp(a,b,c,d) ((integer)strncmp((a),(b),f2cmin((c),(d))))
#define s_copy(A,B,C,D) { int __i,__m; for (__i=0, __m=f2cmin((C),(D)); __i<__m && (B)[__i] != 0; ++__i) (A)[__i] = (B)[__i]; }
#define sig_die(s, kill) { exit(1); }
#define s_stop(s, n) {exit(0);}
static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
#define z_abs(z) (cabs(Cd(z)))
#define z_exp(R, Z) {pCd(R) = cexp(Cd(Z));}
#define z_sqrt(R, Z) {pCd(R) = csqrt(Cd(Z));}
#define myexit_() break;
#define mycycle() continue;
#define myceiling(w) {ceil(w)}
#define myhuge(w) {HUGE_VAL}
//#define mymaxloc_(w,s,e,n) {if (sizeof(*(w)) == sizeof(double)) dmaxloc_((w),*(s),*(e),n); else dmaxloc_((w),*(s),*(e),n);}
#define mymaxloc(w,s,e,n) {dmaxloc_(w,*(s),*(e),n)}
/* procedure parameter types for -A and -C++ */
#define F2C_proc_par_types 1
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
typedef logical (*L_fp)();
#endif
static float spow_ui(float x, integer n) {
float pow=1.0; unsigned long int u;
if(n != 0) {
if(n < 0) n = -n, x = 1/x;
for(u = n; ; ) {
if(u & 01) pow *= x;
if(u >>= 1) x *= x;
else break;
}
}
return pow;
}
static double dpow_ui(double x, integer n) {
double pow=1.0; unsigned long int u;
if(n != 0) {
if(n < 0) n = -n, x = 1/x;
for(u = n; ; ) {
if(u & 01) pow *= x;
if(u >>= 1) x *= x;
else break;
}
}
return pow;
}
static _Complex float cpow_ui(_Complex float x, integer n) {
_Complex float pow=1.0; unsigned long int u;
if(n != 0) {
if(n < 0) n = -n, x = 1/x;
for(u = n; ; ) {
if(u & 01) pow *= x;
if(u >>= 1) x *= x;
else break;
}
}
return pow;
}
static _Complex double zpow_ui(_Complex double x, integer n) {
_Complex double pow=1.0; unsigned long int u;
if(n != 0) {
if(n < 0) n = -n, x = 1/x;
for(u = n; ; ) {
if(u & 01) pow *= x;
if(u >>= 1) x *= x;
else break;
}
}
return pow;
}
static integer pow_ii(integer x, integer n) {
integer pow; unsigned long int u;
if (n <= 0) {
if (n == 0 || x == 1) pow = 1;
else if (x != -1) pow = x == 0 ? 1/x : 0;
else n = -n;
}
if ((n > 0) || !(n == 0 || x == 1 || x != -1)) {
u = n;
for(pow = 1; ; ) {
if(u & 01) pow *= x;
if(u >>= 1) x *= x;
else break;
}
}
return pow;
}
static integer dmaxloc_(double *w, integer s, integer e, integer *n)
{
double m; integer i, mi;
for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
if (w[i-1]>m) mi=i ,m=w[i-1];
return mi-s+1;
}
static integer smaxloc_(float *w, integer s, integer e, integer *n)
{
float m; integer i, mi;
for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
if (w[i-1]>m) mi=i ,m=w[i-1];
return mi-s+1;
}
static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
integer n = *n_, incx = *incx_, incy = *incy_, i;
_Complex float zdotc = 0.0;
if (incx == 1 && incy == 1) {
for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
zdotc += conjf(Cf(&x[i])) * Cf(&y[i]);
}
} else {
for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
zdotc += conjf(Cf(&x[i*incx])) * Cf(&y[i*incy]);
}
}
pCf(z) = zdotc;
}
static inline void zdotc_(doublecomplex *z, integer *n_, doublecomplex *x, integer *incx_, doublecomplex *y, integer *incy_) {
integer n = *n_, incx = *incx_, incy = *incy_, i;
_Complex double zdotc = 0.0;
if (incx == 1 && incy == 1) {
for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
zdotc += conj(Cd(&x[i])) * Cd(&y[i]);
}
} else {
for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
zdotc += conj(Cd(&x[i*incx])) * Cd(&y[i*incy]);
}
}
pCd(z) = zdotc;
}
static inline void cdotu_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
integer n = *n_, incx = *incx_, incy = *incy_, i;
_Complex float zdotc = 0.0;
if (incx == 1 && incy == 1) {
for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
zdotc += Cf(&x[i]) * Cf(&y[i]);
}
} else {
for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
zdotc += Cf(&x[i*incx]) * Cf(&y[i*incy]);
}
}
pCf(z) = zdotc;
}
static inline void zdotu_(doublecomplex *z, integer *n_, doublecomplex *x, integer *incx_, doublecomplex *y, integer *incy_) {
integer n = *n_, incx = *incx_, incy = *incy_, i;
_Complex double zdotc = 0.0;
if (incx == 1 && incy == 1) {
for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
zdotc += Cd(&x[i]) * Cd(&y[i]);
}
} else {
for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
zdotc += Cd(&x[i*incx]) * Cd(&y[i*incy]);
}
}
pCd(z) = zdotc;
}
#endif
/* -- translated by f2c (version 20000121).
You must link the resulting object file with the libraries:
-lf2c -lm (in that order)
*/
/* Table of constant values */
static integer c__1 = 1;
static doublereal c_b11 = 1.;
/* > \brief \b DPTRFS */
/* =========== DOCUMENTATION =========== */
/* Online html documentation available at */
/* http://www.netlib.org/lapack/explore-html/ */
/* > \htmlonly */
/* > Download DPTRFS + dependencies */
/* > <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dptrfs.
f"> */
/* > [TGZ]</a> */
/* > <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dptrfs.
f"> */
/* > [ZIP]</a> */
/* > <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dptrfs.
f"> */
/* > [TXT]</a> */
/* > \endhtmlonly */
/* Definition: */
/* =========== */
/* SUBROUTINE DPTRFS( N, NRHS, D, E, DF, EF, B, LDB, X, LDX, FERR, */
/* BERR, WORK, INFO ) */
/* INTEGER INFO, LDB, LDX, N, NRHS */
/* DOUBLE PRECISION B( LDB, * ), BERR( * ), D( * ), DF( * ), */
/* $ E( * ), EF( * ), FERR( * ), WORK( * ), */
/* $ X( LDX, * ) */
/* > \par Purpose: */
/* ============= */
/* > */
/* > \verbatim */
/* > */
/* > DPTRFS improves the computed solution to a system of linear */
/* > equations when the coefficient matrix is symmetric positive definite */
/* > and tridiagonal, and provides error bounds and backward error */
/* > estimates for the solution. */
/* > \endverbatim */
/* Arguments: */
/* ========== */
/* > \param[in] N */
/* > \verbatim */
/* > N is INTEGER */
/* > The order of the matrix A. N >= 0. */
/* > \endverbatim */
/* > */
/* > \param[in] NRHS */
/* > \verbatim */
/* > NRHS is INTEGER */
/* > The number of right hand sides, i.e., the number of columns */
/* > of the matrix B. NRHS >= 0. */
/* > \endverbatim */
/* > */
/* > \param[in] D */
/* > \verbatim */
/* > D is DOUBLE PRECISION array, dimension (N) */
/* > The n diagonal elements of the tridiagonal matrix A. */
/* > \endverbatim */
/* > */
/* > \param[in] E */
/* > \verbatim */
/* > E is DOUBLE PRECISION array, dimension (N-1) */
/* > The (n-1) subdiagonal elements of the tridiagonal matrix A. */
/* > \endverbatim */
/* > */
/* > \param[in] DF */
/* > \verbatim */
/* > DF is DOUBLE PRECISION array, dimension (N) */
/* > The n diagonal elements of the diagonal matrix D from the */
/* > factorization computed by DPTTRF. */
/* > \endverbatim */
/* > */
/* > \param[in] EF */
/* > \verbatim */
/* > EF is DOUBLE PRECISION array, dimension (N-1) */
/* > The (n-1) subdiagonal elements of the unit bidiagonal factor */
/* > L from the factorization computed by DPTTRF. */
/* > \endverbatim */
/* > */
/* > \param[in] B */
/* > \verbatim */
/* > B is DOUBLE PRECISION array, dimension (LDB,NRHS) */
/* > The right hand side matrix B. */
/* > \endverbatim */
/* > */
/* > \param[in] LDB */
/* > \verbatim */
/* > LDB is INTEGER */
/* > The leading dimension of the array B. LDB >= f2cmax(1,N). */
/* > \endverbatim */
/* > */
/* > \param[in,out] X */
/* > \verbatim */
/* > X is DOUBLE PRECISION array, dimension (LDX,NRHS) */
/* > On entry, the solution matrix X, as computed by DPTTRS. */
/* > On exit, the improved solution matrix X. */
/* > \endverbatim */
/* > */
/* > \param[in] LDX */
/* > \verbatim */
/* > LDX is INTEGER */
/* > The leading dimension of the array X. LDX >= f2cmax(1,N). */
/* > \endverbatim */
/* > */
/* > \param[out] FERR */
/* > \verbatim */
/* > FERR is DOUBLE PRECISION array, dimension (NRHS) */
/* > The forward error bound for each solution vector */
/* > X(j) (the j-th column of the solution matrix X). */
/* > If XTRUE is the true solution corresponding to X(j), FERR(j) */
/* > is an estimated upper bound for the magnitude of the largest */
/* > element in (X(j) - XTRUE) divided by the magnitude of the */
/* > largest element in X(j). */
/* > \endverbatim */
/* > */
/* > \param[out] BERR */
/* > \verbatim */
/* > BERR is DOUBLE PRECISION array, dimension (NRHS) */
/* > The componentwise relative backward error of each solution */
/* > vector X(j) (i.e., the smallest relative change in */
/* > any element of A or B that makes X(j) an exact solution). */
/* > \endverbatim */
/* > */
/* > \param[out] WORK */
/* > \verbatim */
/* > WORK is DOUBLE PRECISION array, dimension (2*N) */
/* > \endverbatim */
/* > */
/* > \param[out] INFO */
/* > \verbatim */
/* > INFO is INTEGER */
/* > = 0: successful exit */
/* > < 0: if INFO = -i, the i-th argument had an illegal value */
/* > \endverbatim */
/* > \par Internal Parameters: */
/* ========================= */
/* > */
/* > \verbatim */
/* > ITMAX is the maximum number of steps of iterative refinement. */
/* > \endverbatim */
/* Authors: */
/* ======== */
/* > \author Univ. of Tennessee */
/* > \author Univ. of California Berkeley */
/* > \author Univ. of Colorado Denver */
/* > \author NAG Ltd. */
/* > \date December 2016 */
/* > \ingroup doublePTcomputational */
/* ===================================================================== */
/* Subroutine */ int dptrfs_(integer *n, integer *nrhs, doublereal *d__,
doublereal *e, doublereal *df, doublereal *ef, doublereal *b, integer
*ldb, doublereal *x, integer *ldx, doublereal *ferr, doublereal *berr,
doublereal *work, integer *info)
{
/* System generated locals */
integer b_dim1, b_offset, x_dim1, x_offset, i__1, i__2;
doublereal d__1, d__2, d__3;
/* Local variables */
doublereal safe1, safe2;
integer i__, j;
doublereal s;
extern /* Subroutine */ int daxpy_(integer *, doublereal *, doublereal *,
integer *, doublereal *, integer *);
integer count;
doublereal bi;
extern doublereal dlamch_(char *);
doublereal cx, dx, ex;
integer ix;
extern integer idamax_(integer *, doublereal *, integer *);
integer nz;
doublereal safmin;
extern /* Subroutine */ int xerbla_(char *, integer *, ftnlen);
doublereal lstres;
extern /* Subroutine */ int dpttrs_(integer *, integer *, doublereal *,
doublereal *, doublereal *, integer *, integer *);
doublereal eps;
/* -- LAPACK computational 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 */
/* ===================================================================== */
/* Test the input parameters. */
/* Parameter adjustments */
--d__;
--e;
--df;
--ef;
b_dim1 = *ldb;
b_offset = 1 + b_dim1 * 1;
b -= b_offset;
x_dim1 = *ldx;
x_offset = 1 + x_dim1 * 1;
x -= x_offset;
--ferr;
--berr;
--work;
/* Function Body */
*info = 0;
if (*n < 0) {
*info = -1;
} else if (*nrhs < 0) {
*info = -2;
} else if (*ldb < f2cmax(1,*n)) {
*info = -8;
} else if (*ldx < f2cmax(1,*n)) {
*info = -10;
}
if (*info != 0) {
i__1 = -(*info);
xerbla_("DPTRFS", &i__1, (ftnlen)6);
return 0;
}
/* Quick return if possible */
if (*n == 0 || *nrhs == 0) {
i__1 = *nrhs;
for (j = 1; j <= i__1; ++j) {
ferr[j] = 0.;
berr[j] = 0.;
/* L10: */
}
return 0;
}
/* NZ = maximum number of nonzero elements in each row of A, plus 1 */
nz = 4;
eps = dlamch_("Epsilon");
safmin = dlamch_("Safe minimum");
safe1 = nz * safmin;
safe2 = safe1 / eps;
/* Do for each right hand side */
i__1 = *nrhs;
for (j = 1; j <= i__1; ++j) {
count = 1;
lstres = 3.;
L20:
/* Loop until stopping criterion is satisfied. */
/* Compute residual R = B - A * X. Also compute */
/* abs(A)*abs(x) + abs(b) for use in the backward error bound. */
if (*n == 1) {
bi = b[j * b_dim1 + 1];
dx = d__[1] * x[j * x_dim1 + 1];
work[*n + 1] = bi - dx;
work[1] = abs(bi) + abs(dx);
} else {
bi = b[j * b_dim1 + 1];
dx = d__[1] * x[j * x_dim1 + 1];
ex = e[1] * x[j * x_dim1 + 2];
work[*n + 1] = bi - dx - ex;
work[1] = abs(bi) + abs(dx) + abs(ex);
i__2 = *n - 1;
for (i__ = 2; i__ <= i__2; ++i__) {
bi = b[i__ + j * b_dim1];
cx = e[i__ - 1] * x[i__ - 1 + j * x_dim1];
dx = d__[i__] * x[i__ + j * x_dim1];
ex = e[i__] * x[i__ + 1 + j * x_dim1];
work[*n + i__] = bi - cx - dx - ex;
work[i__] = abs(bi) + abs(cx) + abs(dx) + abs(ex);
/* L30: */
}
bi = b[*n + j * b_dim1];
cx = e[*n - 1] * x[*n - 1 + j * x_dim1];
dx = d__[*n] * x[*n + j * x_dim1];
work[*n + *n] = bi - cx - dx;
work[*n] = abs(bi) + abs(cx) + abs(dx);
}
/* Compute componentwise relative backward error from formula */
/* f2cmax(i) ( abs(R(i)) / ( abs(A)*abs(X) + abs(B) )(i) ) */
/* where abs(Z) is the componentwise absolute value of the matrix */
/* or vector Z. If the i-th component of the denominator is less */
/* than SAFE2, then SAFE1 is added to the i-th components of the */
/* numerator and denominator before dividing. */
s = 0.;
i__2 = *n;
for (i__ = 1; i__ <= i__2; ++i__) {
if (work[i__] > safe2) {
/* Computing MAX */
d__2 = s, d__3 = (d__1 = work[*n + i__], abs(d__1)) / work[
i__];
s = f2cmax(d__2,d__3);
} else {
/* Computing MAX */
d__2 = s, d__3 = ((d__1 = work[*n + i__], abs(d__1)) + safe1)
/ (work[i__] + safe1);
s = f2cmax(d__2,d__3);
}
/* L40: */
}
berr[j] = s;
/* Test stopping criterion. Continue iterating if */
/* 1) The residual BERR(J) is larger than machine epsilon, and */
/* 2) BERR(J) decreased by at least a factor of 2 during the */
/* last iteration, and */
/* 3) At most ITMAX iterations tried. */
if (berr[j] > eps && berr[j] * 2. <= lstres && count <= 5) {
/* Update solution and try again. */
dpttrs_(n, &c__1, &df[1], &ef[1], &work[*n + 1], n, info);
daxpy_(n, &c_b11, &work[*n + 1], &c__1, &x[j * x_dim1 + 1], &c__1)
;
lstres = berr[j];
++count;
goto L20;
}
/* Bound error from formula */
/* norm(X - XTRUE) / norm(X) .le. FERR = */
/* norm( abs(inv(A))* */
/* ( abs(R) + NZ*EPS*( abs(A)*abs(X)+abs(B) ))) / norm(X) */
/* where */
/* norm(Z) is the magnitude of the largest component of Z */
/* inv(A) is the inverse of A */
/* abs(Z) is the componentwise absolute value of the matrix or */
/* vector Z */
/* NZ is the maximum number of nonzeros in any row of A, plus 1 */
/* EPS is machine epsilon */
/* The i-th component of abs(R)+NZ*EPS*(abs(A)*abs(X)+abs(B)) */
/* is incremented by SAFE1 if the i-th component of */
/* abs(A)*abs(X) + abs(B) is less than SAFE2. */
i__2 = *n;
for (i__ = 1; i__ <= i__2; ++i__) {
if (work[i__] > safe2) {
work[i__] = (d__1 = work[*n + i__], abs(d__1)) + nz * eps *
work[i__];
} else {
work[i__] = (d__1 = work[*n + i__], abs(d__1)) + nz * eps *
work[i__] + safe1;
}
/* L50: */
}
ix = idamax_(n, &work[1], &c__1);
ferr[j] = work[ix];
/* Estimate the norm of inv(A). */
/* Solve M(A) * x = e, where M(A) = (m(i,j)) is given by */
/* m(i,j) = abs(A(i,j)), i = j, */
/* m(i,j) = -abs(A(i,j)), i .ne. j, */
/* and e = [ 1, 1, ..., 1 ]**T. Note M(A) = M(L)*D*M(L)**T. */
/* Solve M(L) * x = e. */
work[1] = 1.;
i__2 = *n;
for (i__ = 2; i__ <= i__2; ++i__) {
work[i__] = work[i__ - 1] * (d__1 = ef[i__ - 1], abs(d__1)) + 1.;
/* L60: */
}
/* Solve D * M(L)**T * x = b. */
work[*n] /= df[*n];
for (i__ = *n - 1; i__ >= 1; --i__) {
work[i__] = work[i__] / df[i__] + work[i__ + 1] * (d__1 = ef[i__],
abs(d__1));
/* L70: */
}
/* Compute norm(inv(A)) = f2cmax(x(i)), 1<=i<=n. */
ix = idamax_(n, &work[1], &c__1);
ferr[j] *= (d__1 = work[ix], abs(d__1));
/* Normalize error. */
lstres = 0.;
i__2 = *n;
for (i__ = 1; i__ <= i__2; ++i__) {
/* Computing MAX */
d__2 = lstres, d__3 = (d__1 = x[i__ + j * x_dim1], abs(d__1));
lstres = f2cmax(d__2,d__3);
/* L80: */
}
if (lstres != 0.) {
ferr[j] /= lstres;
}
/* L90: */
}
return 0;
/* End of DPTRFS */
} /* dptrfs_ */
|
the_stack_data/181393608.c | #include <stdio.h>
#include <float.h>
int main(void)
{
const float GALLON_PER_LITRE = 3.785;
const float MILE_PER_KM = 1.609;
float miles, gallons, kilometres, litres;
printf("Enter the number of miles travelled: ");
scanf("%f", &miles);
printf("Enter the number of gallons consumed: ");
scanf("%f", &gallons);
printf("Miles travelled per gallon is: %.1f\n", miles / gallons);
kilometres = miles * GALLON_PER_LITRE;
litres = gallons * MILE_PER_KM;
printf("Litres consumed per 100 kilometres is: %.1f\n",
(litres / kilometres) * 100);
return 0;
}
|
the_stack_data/132954148.c | #include <stdlib.h>
#include <stdio.h>
#include <time.h>
void immettiM(int *b) {
do { // Prendo in input il valore di M (utilizzo un puntatore a intero)
printf("Inserire il valore di M: ");
scanf("%d", b);
while(getchar()!='\n');
if(*b == 0) {
break;
} else if(*b<4 || *b>20) {
printf("Inserire un valore tra 4 e 20\n");
}
} while(*b<4 || *b>20);
}
void immettiNumero(char *pnum) {
printf("Inserire il numero binario positivo\n");
scanf("%s", pnum); // Prendo in input il numero in binario (utilizzo un puntatore a carattere)
}
void convertiStringa(char str[], int bin[], int M) {
int count=0;
for(int j=0; j<20; j++) { // Conto quante cifre sono state inserite dall'utente grazie ad un contatore
if((int)str[j] == '\0') { // Ogni array termina sempre con '\0'
break;
}
count++;
}
if(count!=M) {
printf("Il numero inserito non è di %d cifre (%d)\n", M, count);
exit(1);
}
for(int i=0; i<M; i++) { // Controllo se il numero è composto esclusivamente da 0 e 1 e riempio l'array di int
if((int)str[M-1-i] != '0' && (int)str[M-1-i] != '1') {
printf("Il numero inserito non è in forma binaria\n");
exit(1);
} else if((int)str[M-1-i] == '0') {
bin[i] = 0;
} else if((int)str[M-1-i] == '1') {
bin[i] = 1;
}
}
}
void calccompl2(int bin[], int compl2[], int M) { // Calcolo il complemento a 2
for(int i=0; i<M; i++) { // Inverto tutti i valori
if(bin[M-1-i] == 0) {
compl2[M-1-i] = 1;
} else {
compl2[M-1-i] = 0;
}
}
for(int j=0; j<M; j++) { // Aggiungo 1 a partire dalla cifra meno significativa
if(compl2[j] == 0) {
compl2[j] = 1;
break;
} else {
compl2[j] = 0;
}
}
}
void stampanumero(char testo[], int *pnum, int M) { // Stampo su schermo il testo preso dal main
int i = 0;
do {
printf("%c", testo[i]);
i++;
} while(testo[i]!='\0');
for(int j=M-1; j>=0; j--) {
printf("%d", *(pnum + j));
}
printf("\n");
}
void generaNumero(int num[]) { // Genero il numero casuale
for(int i=0; i<20; i++) {
num[i] = lrand48()%2; // lrand48()%2 da come valori solo 0 e 1
}
}
void salvaFile(int num[], int M) {
FILE* fp = fopen("compl2.dat", "w"); // Puntatore a file in modalità writing
if(fp==NULL) { // Controllo possibili errori durante l'apertura del file
printf("Errore nell'apertura del file\n");
exit(1);
}
double fn = 0;
for(int i=0; i<M; i++) {
fn = fprintf(fp, "%d %d\n", i, num[i]); // Stampo su file
if(fn<=0) { // Controllo possibili errori per la stampa su file
printf("Errore nella stampa sul file\n");
exit(1);
}
}
}
int main() {
int numbin[20] = {0}, numcompl2[20] = {0}, M, *pM = &M, seed=time(0);
srand48(seed); // Inizializzo l'srand48
char numstr[20], *pnumstr = numstr;
numstr[0] = '\0'; // Svuoto la stringa
immettiM(pM);
if(M == 0) {
M = 20;
generaNumero(numbin);
calccompl2(numbin, numcompl2, M);
char testo1[] = "Il numero in binario è: ", testo2[] = "Il numero in complemento a 2 è: ";
int *pcom2 = &numcompl2[0], *pbin = &numbin[0];
stampanumero(testo1, pbin, M);
stampanumero(testo2, pcom2, M);
salvaFile(numcompl2, M);
} else {
immettiNumero(pnumstr);
convertiStringa(numstr, numbin, M);
calccompl2(numbin, numcompl2, M);
char testo1[] = "Il numero in binario è: ", testo2[] = "Il numero in complemento a 2 è: ";
int *pcom2 = &numcompl2[0], *pbin = &numbin[0];
stampanumero(testo1, pbin, M);
stampanumero(testo2, pcom2, M);
}
return 0;
} |
the_stack_data/134671.c | /* 1018 锤子剪刀布 (20 分)
解析:
1. 多行字符输入的时候,换行符需要单独一行处理,免得识别有问题:
if (scanf("%c %c", &hands[i][0], &hands[i][1]) != 2)
return EXIT_FAILURE;
if (scanf("%c", &temp) != 1)
return EXIT_FAILURE;
2. 求数组中最大值的位置,使用一个最小值哨兵。
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <limits.h>
enum Sample
{
B = 0,
C = 1,
J = 2,
Z = 3
};
typedef struct
{
int is_win;
enum Sample sample;
} Result;
Result comp(char a, char b)
{
Result result = {0, Z};
if (a == 'C')
{
switch (b)
{
case 'C':
result.is_win = 0;
result.sample = Z;
return result;
case 'J':
result.is_win = 1;
result.sample = C;
return result;
case 'B':
result.is_win = -1;
result.sample = B;
return result;
}
}
else if (a == 'J')
{
switch (b)
{
case 'C':
result.is_win = -1;
result.sample = C;
return result;
case 'J':
result.is_win = 0;
result.sample = Z;
return result;
case 'B':
result.is_win = 1;
result.sample = J;
return result;
}
}
else
{
switch (b)
{
case 'C':
result.is_win = 1;
result.sample = B;
return result;
case 'J':
result.is_win = -1;
result.sample = J;
return result;
case 'B':
result.is_win = 0;
result.sample = Z;
return result;
}
};
return result;
}
int main(int argc, char *argv[])
{
// 处理输入
long n;
if (scanf("%ld", &n) != 1)
return EXIT_FAILURE;
char temp;
if (scanf("%c", &temp) != 1)
return EXIT_FAILURE;
char hands[n][2];
for (long i = 0; i < n; i++)
{
if (scanf("%c %c", &hands[i][0], &hands[i][1]) != 2)
return EXIT_FAILURE;
if (scanf("%c", &temp) != 1)
return EXIT_FAILURE;
}
// 统计
int jia[3] = {0}, jia_sample[3] = {0};
int yi[3] = {0}, yi_sample[3] = {0};
for (long i = 0; i < n; i++)
{
Result result = comp(hands[i][0], hands[i][1]);
if (result.is_win == 1)
{
jia[0]++;
yi[2]++;
jia_sample[result.sample]++;
}
else if (result.is_win == 0)
{
jia[1]++;
yi[1]++;
}
else
{
jia[2]++;
yi[0]++;
yi_sample[result.sample]++;
}
}
// 求数组中最大值的位置
int max_jia = INT_MIN, max_yi = INT_MIN;
char max_jia_sample = 'Z', max_yi_sample = 'Z';
char samples[3] = {'B', 'C', 'J'};
for (int i = 0; i < 3; i++)
{
if (jia_sample[i] > max_jia)
{
max_jia = jia_sample[i];
max_jia_sample = samples[i];
}
if (yi_sample[i] > max_yi)
{
max_yi = yi_sample[i];
max_yi_sample = samples[i];
}
}
// 处理输出
printf("%d %d %d\n", jia[0], jia[1], jia[2]);
printf("%d %d %d\n", yi[0], yi[1], yi[2]);
printf("%c %c\n", max_jia_sample, max_yi_sample);
return EXIT_SUCCESS;
}
|
the_stack_data/113137.c | // REQUIRES: darwin
// RUN: %clang -fprofile-instr-generate -fcoverage-mapping -o %t.exe %s
// RUN: echo "garbage" > %t.profraw
// RUN: env LLVM_PROFILE_FILE="%c%t.profraw" %run %t.exe
// RUN: llvm-profdata show --counts --all-functions %t.profraw | FileCheck %s -check-prefix=CHECK-COUNTS
// RUN: llvm-profdata merge -o %t.profdata %t.profraw
// RUN: llvm-cov report %t.exe -instr-profile %t.profdata | FileCheck %s -check-prefix=CHECK-COVERAGE
// CHECK-COUNTS: Counters:
// CHECK-COUNTS-NEXT: main:
// CHECK-COUNTS-NEXT: Hash: 0x{{.*}}
// CHECK-COUNTS-NEXT: Counters: 2
// CHECK-COUNTS-NEXT: Function count: 1
// CHECK-COUNTS-NEXT: Block counts: [1]
// CHECK-COUNTS-NEXT: Instrumentation level: Front-end
// CHECK-COUNTS-NEXT: Functions shown: 1
// CHECK-COUNTS-NEXT: Total functions: 1
// CHECK-COUNTS-NEXT: Maximum function count: 1
// CHECK-COUNTS-NEXT: Maximum internal block count: 1
// CHECK-COVERAGE: Filename Regions Missed Regions Cover Functions Missed Functions Executed Lines Missed Lines Cover
// CHECK-COVERAGE-NEXT: ---
// CHECK-COVERAGE-NEXT: basic.c 4 1 75.00% 1 0 100.00% 5 2 60.00%
// CHECK-COVERAGE-NEXT: ---
// CHECK-COVERAGE-NEXT: TOTAL 4 1 75.00% 1 0 100.00% 5 2 60.00%
extern int __llvm_profile_is_continuous_mode_enabled(void);
int main() {
if (__llvm_profile_is_continuous_mode_enabled())
return 0;
return 1;
}
|
the_stack_data/45449596.c | unsigned int font[2][2] =
{
{ 0, 1},
{ 2, 3}
};
unsigned char font2[2][2] =
{
{ 0, 1},
{ 2, 3}
};
static char y[] = { 1, 2, 3 };
|
the_stack_data/75138049.c | #include <stdio.h>
#include <stdlib.h>
#define SIZE 20
char* transform_string(char s[]);
// 反轉字母大小寫
char* transform_string(char s[]) {
// 判斷字串每個字元
for (int i = 0; i < SIZE; i++)
// 大寫 變成 小寫
if (s[i] >= 'A' && s[i] <= 'Z')
s[i] = s[i] - 'A' + 'a';
// 小寫 變成 大寫
else if (s[i] >= 'a' && s[i] <= 'z')
s[i] = s[i] - 'a' + 'A';
return s;
}
int main(int argc, char *argv[]) {
char str[SIZE] = {}; /* str = 輸入字串 */
while (str[0] != '-' || str[1] != '1') {
// 輸入
printf("Input (Input '-1' to exit): ");
scanf("%s", str);
// 輸出
printf("Output: %s\n", transform_string(str));
}
// 保持顯示輸出
system("Pause");
return 0;
} |
the_stack_data/1064293.c | /* -*- mode: C++; c-basic-offset: 4; tab-width: 4 -*-
*
* Copyright (c) 2006 Apple Computer, Inc. All rights reserved.
*
* @APPLE_LICENSE_HEADER_START@
*
* This file contains Original Code and/or Modifications of Original Code
* as defined in and that are subject to the Apple Public Source License
* Version 2.0 (the 'License'). You may not use this file except in
* compliance with the License. Please obtain a copy of the License at
* http://www.opensource.apple.com/apsl/ and read it before using this
* file.
*
* The Original Code and all software distributed under the License are
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
* Please see the License for the specific language governing rights and
* limitations under the License.
*
* @APPLE_LICENSE_HEADER_END@
*/
// function called by a loaded bundle
int bar()
{
return 1;
}
|
the_stack_data/54982.c | #define DAYS 30
#define HOURS 24
int main(void) {
const double temperature_readings [DAYS][HOURS] = { 0.0 };
return 0;
}
|
the_stack_data/57759.c | /* Taxonomy Classification: 0000000100000600000200 */
/*
* WRITE/READ 0 write
* WHICH BOUND 0 upper
* DATA TYPE 0 char
* MEMORY LOCATION 0 stack
* SCOPE 0 same
* CONTAINER 0 no
* POINTER 0 no
* INDEX COMPLEXITY 1 variable
* ADDRESS COMPLEXITY 0 constant
* LENGTH COMPLEXITY 0 N/A
* ADDRESS ALIAS 0 none
* INDEX ALIAS 0 none
* LOCAL CONTROL FLOW 0 none
* SECONDARY CONTROL FLOW 6 function pointer
* LOOP STRUCTURE 0 no
* LOOP COMPLEXITY 0 N/A
* ASYNCHRONY 0 no
* TAINT 0 no
* RUNTIME ENV. DEPENDENCE 0 no
* MAGNITUDE 2 8 bytes
* CONTINUOUS/DISCRETE 0 discrete
* SIGNEDNESS 0 no
*/
/*
Copyright 2004 M.I.T.
Permission is hereby granted, without written agreement or royalty fee, to use,
copy, modify, and distribute this software and its documentation for any
purpose, provided that the above copyright notice and the following three
paragraphs appear in all copies of this software.
IN NO EVENT SHALL M.I.T. BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL,
INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF THIS SOFTWARE
AND ITS DOCUMENTATION, EVEN IF M.I.T. HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMANGE.
M.I.T. SPECIFICALLY DISCLAIMS ANY WARRANTIES INCLUDING, BUT NOT LIMITED TO
THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE,
AND NON-INFRINGEMENT.
THE SOFTWARE IS PROVIDED ON AN "AS-IS" BASIS AND M.I.T. HAS NO OBLIGATION TO
PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
*/
int function1()
{
return 17;
}
int main(int argc, char *argv[])
{
int i;
int (*fptr)();
char buf[10];
fptr = function1;
i = fptr();
/* BAD */
buf[i] = 'A';
return 0;
}
|
the_stack_data/169.c | //@ ltl invariant negative: (<> ((<> AP(x_9 - x_1 >= 11)) U AP(x_26 - x_22 >= 15)));
float x_0;
float x_1;
float x_2;
float x_3;
float x_4;
float x_5;
float x_6;
float x_7;
float x_8;
float x_9;
float x_10;
float x_11;
float x_12;
float x_13;
float x_14;
float x_15;
float x_16;
float x_17;
float x_18;
float x_19;
float x_20;
float x_21;
float x_22;
float x_23;
float x_24;
float x_25;
float x_26;
float x_27;
float x_28;
float x_29;
float x_30;
float x_31;
int main()
{
float x_0_;
float x_1_;
float x_2_;
float x_3_;
float x_4_;
float x_5_;
float x_6_;
float x_7_;
float x_8_;
float x_9_;
float x_10_;
float x_11_;
float x_12_;
float x_13_;
float x_14_;
float x_15_;
float x_16_;
float x_17_;
float x_18_;
float x_19_;
float x_20_;
float x_21_;
float x_22_;
float x_23_;
float x_24_;
float x_25_;
float x_26_;
float x_27_;
float x_28_;
float x_29_;
float x_30_;
float x_31_;
while(1) {
x_0_ = (((((6.0 + x_0) > (12.0 + x_2)? (6.0 + x_0) : (12.0 + x_2)) > ((7.0 + x_4) > (4.0 + x_6)? (7.0 + x_4) : (4.0 + x_6))? ((6.0 + x_0) > (12.0 + x_2)? (6.0 + x_0) : (12.0 + x_2)) : ((7.0 + x_4) > (4.0 + x_6)? (7.0 + x_4) : (4.0 + x_6))) > (((19.0 + x_10) > (19.0 + x_13)? (19.0 + x_10) : (19.0 + x_13)) > ((3.0 + x_14) > (8.0 + x_17)? (3.0 + x_14) : (8.0 + x_17))? ((19.0 + x_10) > (19.0 + x_13)? (19.0 + x_10) : (19.0 + x_13)) : ((3.0 + x_14) > (8.0 + x_17)? (3.0 + x_14) : (8.0 + x_17)))? (((6.0 + x_0) > (12.0 + x_2)? (6.0 + x_0) : (12.0 + x_2)) > ((7.0 + x_4) > (4.0 + x_6)? (7.0 + x_4) : (4.0 + x_6))? ((6.0 + x_0) > (12.0 + x_2)? (6.0 + x_0) : (12.0 + x_2)) : ((7.0 + x_4) > (4.0 + x_6)? (7.0 + x_4) : (4.0 + x_6))) : (((19.0 + x_10) > (19.0 + x_13)? (19.0 + x_10) : (19.0 + x_13)) > ((3.0 + x_14) > (8.0 + x_17)? (3.0 + x_14) : (8.0 + x_17))? ((19.0 + x_10) > (19.0 + x_13)? (19.0 + x_10) : (19.0 + x_13)) : ((3.0 + x_14) > (8.0 + x_17)? (3.0 + x_14) : (8.0 + x_17)))) > ((((16.0 + x_18) > (8.0 + x_20)? (16.0 + x_18) : (8.0 + x_20)) > ((5.0 + x_21) > (8.0 + x_22)? (5.0 + x_21) : (8.0 + x_22))? ((16.0 + x_18) > (8.0 + x_20)? (16.0 + x_18) : (8.0 + x_20)) : ((5.0 + x_21) > (8.0 + x_22)? (5.0 + x_21) : (8.0 + x_22))) > (((12.0 + x_26) > (20.0 + x_28)? (12.0 + x_26) : (20.0 + x_28)) > ((7.0 + x_29) > (6.0 + x_30)? (7.0 + x_29) : (6.0 + x_30))? ((12.0 + x_26) > (20.0 + x_28)? (12.0 + x_26) : (20.0 + x_28)) : ((7.0 + x_29) > (6.0 + x_30)? (7.0 + x_29) : (6.0 + x_30)))? (((16.0 + x_18) > (8.0 + x_20)? (16.0 + x_18) : (8.0 + x_20)) > ((5.0 + x_21) > (8.0 + x_22)? (5.0 + x_21) : (8.0 + x_22))? ((16.0 + x_18) > (8.0 + x_20)? (16.0 + x_18) : (8.0 + x_20)) : ((5.0 + x_21) > (8.0 + x_22)? (5.0 + x_21) : (8.0 + x_22))) : (((12.0 + x_26) > (20.0 + x_28)? (12.0 + x_26) : (20.0 + x_28)) > ((7.0 + x_29) > (6.0 + x_30)? (7.0 + x_29) : (6.0 + x_30))? ((12.0 + x_26) > (20.0 + x_28)? (12.0 + x_26) : (20.0 + x_28)) : ((7.0 + x_29) > (6.0 + x_30)? (7.0 + x_29) : (6.0 + x_30))))? ((((6.0 + x_0) > (12.0 + x_2)? (6.0 + x_0) : (12.0 + x_2)) > ((7.0 + x_4) > (4.0 + x_6)? (7.0 + x_4) : (4.0 + x_6))? ((6.0 + x_0) > (12.0 + x_2)? (6.0 + x_0) : (12.0 + x_2)) : ((7.0 + x_4) > (4.0 + x_6)? (7.0 + x_4) : (4.0 + x_6))) > (((19.0 + x_10) > (19.0 + x_13)? (19.0 + x_10) : (19.0 + x_13)) > ((3.0 + x_14) > (8.0 + x_17)? (3.0 + x_14) : (8.0 + x_17))? ((19.0 + x_10) > (19.0 + x_13)? (19.0 + x_10) : (19.0 + x_13)) : ((3.0 + x_14) > (8.0 + x_17)? (3.0 + x_14) : (8.0 + x_17)))? (((6.0 + x_0) > (12.0 + x_2)? (6.0 + x_0) : (12.0 + x_2)) > ((7.0 + x_4) > (4.0 + x_6)? (7.0 + x_4) : (4.0 + x_6))? ((6.0 + x_0) > (12.0 + x_2)? (6.0 + x_0) : (12.0 + x_2)) : ((7.0 + x_4) > (4.0 + x_6)? (7.0 + x_4) : (4.0 + x_6))) : (((19.0 + x_10) > (19.0 + x_13)? (19.0 + x_10) : (19.0 + x_13)) > ((3.0 + x_14) > (8.0 + x_17)? (3.0 + x_14) : (8.0 + x_17))? ((19.0 + x_10) > (19.0 + x_13)? (19.0 + x_10) : (19.0 + x_13)) : ((3.0 + x_14) > (8.0 + x_17)? (3.0 + x_14) : (8.0 + x_17)))) : ((((16.0 + x_18) > (8.0 + x_20)? (16.0 + x_18) : (8.0 + x_20)) > ((5.0 + x_21) > (8.0 + x_22)? (5.0 + x_21) : (8.0 + x_22))? ((16.0 + x_18) > (8.0 + x_20)? (16.0 + x_18) : (8.0 + x_20)) : ((5.0 + x_21) > (8.0 + x_22)? (5.0 + x_21) : (8.0 + x_22))) > (((12.0 + x_26) > (20.0 + x_28)? (12.0 + x_26) : (20.0 + x_28)) > ((7.0 + x_29) > (6.0 + x_30)? (7.0 + x_29) : (6.0 + x_30))? ((12.0 + x_26) > (20.0 + x_28)? (12.0 + x_26) : (20.0 + x_28)) : ((7.0 + x_29) > (6.0 + x_30)? (7.0 + x_29) : (6.0 + x_30)))? (((16.0 + x_18) > (8.0 + x_20)? (16.0 + x_18) : (8.0 + x_20)) > ((5.0 + x_21) > (8.0 + x_22)? (5.0 + x_21) : (8.0 + x_22))? ((16.0 + x_18) > (8.0 + x_20)? (16.0 + x_18) : (8.0 + x_20)) : ((5.0 + x_21) > (8.0 + x_22)? (5.0 + x_21) : (8.0 + x_22))) : (((12.0 + x_26) > (20.0 + x_28)? (12.0 + x_26) : (20.0 + x_28)) > ((7.0 + x_29) > (6.0 + x_30)? (7.0 + x_29) : (6.0 + x_30))? ((12.0 + x_26) > (20.0 + x_28)? (12.0 + x_26) : (20.0 + x_28)) : ((7.0 + x_29) > (6.0 + x_30)? (7.0 + x_29) : (6.0 + x_30)))));
x_1_ = (((((14.0 + x_0) > (5.0 + x_1)? (14.0 + x_0) : (5.0 + x_1)) > ((18.0 + x_4) > (5.0 + x_7)? (18.0 + x_4) : (5.0 + x_7))? ((14.0 + x_0) > (5.0 + x_1)? (14.0 + x_0) : (5.0 + x_1)) : ((18.0 + x_4) > (5.0 + x_7)? (18.0 + x_4) : (5.0 + x_7))) > (((9.0 + x_8) > (7.0 + x_10)? (9.0 + x_8) : (7.0 + x_10)) > ((20.0 + x_11) > (13.0 + x_12)? (20.0 + x_11) : (13.0 + x_12))? ((9.0 + x_8) > (7.0 + x_10)? (9.0 + x_8) : (7.0 + x_10)) : ((20.0 + x_11) > (13.0 + x_12)? (20.0 + x_11) : (13.0 + x_12)))? (((14.0 + x_0) > (5.0 + x_1)? (14.0 + x_0) : (5.0 + x_1)) > ((18.0 + x_4) > (5.0 + x_7)? (18.0 + x_4) : (5.0 + x_7))? ((14.0 + x_0) > (5.0 + x_1)? (14.0 + x_0) : (5.0 + x_1)) : ((18.0 + x_4) > (5.0 + x_7)? (18.0 + x_4) : (5.0 + x_7))) : (((9.0 + x_8) > (7.0 + x_10)? (9.0 + x_8) : (7.0 + x_10)) > ((20.0 + x_11) > (13.0 + x_12)? (20.0 + x_11) : (13.0 + x_12))? ((9.0 + x_8) > (7.0 + x_10)? (9.0 + x_8) : (7.0 + x_10)) : ((20.0 + x_11) > (13.0 + x_12)? (20.0 + x_11) : (13.0 + x_12)))) > ((((4.0 + x_13) > (1.0 + x_15)? (4.0 + x_13) : (1.0 + x_15)) > ((7.0 + x_17) > (19.0 + x_24)? (7.0 + x_17) : (19.0 + x_24))? ((4.0 + x_13) > (1.0 + x_15)? (4.0 + x_13) : (1.0 + x_15)) : ((7.0 + x_17) > (19.0 + x_24)? (7.0 + x_17) : (19.0 + x_24))) > (((12.0 + x_26) > (1.0 + x_27)? (12.0 + x_26) : (1.0 + x_27)) > ((13.0 + x_28) > (19.0 + x_29)? (13.0 + x_28) : (19.0 + x_29))? ((12.0 + x_26) > (1.0 + x_27)? (12.0 + x_26) : (1.0 + x_27)) : ((13.0 + x_28) > (19.0 + x_29)? (13.0 + x_28) : (19.0 + x_29)))? (((4.0 + x_13) > (1.0 + x_15)? (4.0 + x_13) : (1.0 + x_15)) > ((7.0 + x_17) > (19.0 + x_24)? (7.0 + x_17) : (19.0 + x_24))? ((4.0 + x_13) > (1.0 + x_15)? (4.0 + x_13) : (1.0 + x_15)) : ((7.0 + x_17) > (19.0 + x_24)? (7.0 + x_17) : (19.0 + x_24))) : (((12.0 + x_26) > (1.0 + x_27)? (12.0 + x_26) : (1.0 + x_27)) > ((13.0 + x_28) > (19.0 + x_29)? (13.0 + x_28) : (19.0 + x_29))? ((12.0 + x_26) > (1.0 + x_27)? (12.0 + x_26) : (1.0 + x_27)) : ((13.0 + x_28) > (19.0 + x_29)? (13.0 + x_28) : (19.0 + x_29))))? ((((14.0 + x_0) > (5.0 + x_1)? (14.0 + x_0) : (5.0 + x_1)) > ((18.0 + x_4) > (5.0 + x_7)? (18.0 + x_4) : (5.0 + x_7))? ((14.0 + x_0) > (5.0 + x_1)? (14.0 + x_0) : (5.0 + x_1)) : ((18.0 + x_4) > (5.0 + x_7)? (18.0 + x_4) : (5.0 + x_7))) > (((9.0 + x_8) > (7.0 + x_10)? (9.0 + x_8) : (7.0 + x_10)) > ((20.0 + x_11) > (13.0 + x_12)? (20.0 + x_11) : (13.0 + x_12))? ((9.0 + x_8) > (7.0 + x_10)? (9.0 + x_8) : (7.0 + x_10)) : ((20.0 + x_11) > (13.0 + x_12)? (20.0 + x_11) : (13.0 + x_12)))? (((14.0 + x_0) > (5.0 + x_1)? (14.0 + x_0) : (5.0 + x_1)) > ((18.0 + x_4) > (5.0 + x_7)? (18.0 + x_4) : (5.0 + x_7))? ((14.0 + x_0) > (5.0 + x_1)? (14.0 + x_0) : (5.0 + x_1)) : ((18.0 + x_4) > (5.0 + x_7)? (18.0 + x_4) : (5.0 + x_7))) : (((9.0 + x_8) > (7.0 + x_10)? (9.0 + x_8) : (7.0 + x_10)) > ((20.0 + x_11) > (13.0 + x_12)? (20.0 + x_11) : (13.0 + x_12))? ((9.0 + x_8) > (7.0 + x_10)? (9.0 + x_8) : (7.0 + x_10)) : ((20.0 + x_11) > (13.0 + x_12)? (20.0 + x_11) : (13.0 + x_12)))) : ((((4.0 + x_13) > (1.0 + x_15)? (4.0 + x_13) : (1.0 + x_15)) > ((7.0 + x_17) > (19.0 + x_24)? (7.0 + x_17) : (19.0 + x_24))? ((4.0 + x_13) > (1.0 + x_15)? (4.0 + x_13) : (1.0 + x_15)) : ((7.0 + x_17) > (19.0 + x_24)? (7.0 + x_17) : (19.0 + x_24))) > (((12.0 + x_26) > (1.0 + x_27)? (12.0 + x_26) : (1.0 + x_27)) > ((13.0 + x_28) > (19.0 + x_29)? (13.0 + x_28) : (19.0 + x_29))? ((12.0 + x_26) > (1.0 + x_27)? (12.0 + x_26) : (1.0 + x_27)) : ((13.0 + x_28) > (19.0 + x_29)? (13.0 + x_28) : (19.0 + x_29)))? (((4.0 + x_13) > (1.0 + x_15)? (4.0 + x_13) : (1.0 + x_15)) > ((7.0 + x_17) > (19.0 + x_24)? (7.0 + x_17) : (19.0 + x_24))? ((4.0 + x_13) > (1.0 + x_15)? (4.0 + x_13) : (1.0 + x_15)) : ((7.0 + x_17) > (19.0 + x_24)? (7.0 + x_17) : (19.0 + x_24))) : (((12.0 + x_26) > (1.0 + x_27)? (12.0 + x_26) : (1.0 + x_27)) > ((13.0 + x_28) > (19.0 + x_29)? (13.0 + x_28) : (19.0 + x_29))? ((12.0 + x_26) > (1.0 + x_27)? (12.0 + x_26) : (1.0 + x_27)) : ((13.0 + x_28) > (19.0 + x_29)? (13.0 + x_28) : (19.0 + x_29)))));
x_2_ = (((((1.0 + x_0) > (1.0 + x_1)? (1.0 + x_0) : (1.0 + x_1)) > ((3.0 + x_3) > (15.0 + x_4)? (3.0 + x_3) : (15.0 + x_4))? ((1.0 + x_0) > (1.0 + x_1)? (1.0 + x_0) : (1.0 + x_1)) : ((3.0 + x_3) > (15.0 + x_4)? (3.0 + x_3) : (15.0 + x_4))) > (((8.0 + x_5) > (4.0 + x_7)? (8.0 + x_5) : (4.0 + x_7)) > ((11.0 + x_11) > (13.0 + x_12)? (11.0 + x_11) : (13.0 + x_12))? ((8.0 + x_5) > (4.0 + x_7)? (8.0 + x_5) : (4.0 + x_7)) : ((11.0 + x_11) > (13.0 + x_12)? (11.0 + x_11) : (13.0 + x_12)))? (((1.0 + x_0) > (1.0 + x_1)? (1.0 + x_0) : (1.0 + x_1)) > ((3.0 + x_3) > (15.0 + x_4)? (3.0 + x_3) : (15.0 + x_4))? ((1.0 + x_0) > (1.0 + x_1)? (1.0 + x_0) : (1.0 + x_1)) : ((3.0 + x_3) > (15.0 + x_4)? (3.0 + x_3) : (15.0 + x_4))) : (((8.0 + x_5) > (4.0 + x_7)? (8.0 + x_5) : (4.0 + x_7)) > ((11.0 + x_11) > (13.0 + x_12)? (11.0 + x_11) : (13.0 + x_12))? ((8.0 + x_5) > (4.0 + x_7)? (8.0 + x_5) : (4.0 + x_7)) : ((11.0 + x_11) > (13.0 + x_12)? (11.0 + x_11) : (13.0 + x_12)))) > ((((16.0 + x_13) > (8.0 + x_17)? (16.0 + x_13) : (8.0 + x_17)) > ((20.0 + x_18) > (20.0 + x_21)? (20.0 + x_18) : (20.0 + x_21))? ((16.0 + x_13) > (8.0 + x_17)? (16.0 + x_13) : (8.0 + x_17)) : ((20.0 + x_18) > (20.0 + x_21)? (20.0 + x_18) : (20.0 + x_21))) > (((6.0 + x_24) > (8.0 + x_25)? (6.0 + x_24) : (8.0 + x_25)) > ((7.0 + x_27) > (15.0 + x_30)? (7.0 + x_27) : (15.0 + x_30))? ((6.0 + x_24) > (8.0 + x_25)? (6.0 + x_24) : (8.0 + x_25)) : ((7.0 + x_27) > (15.0 + x_30)? (7.0 + x_27) : (15.0 + x_30)))? (((16.0 + x_13) > (8.0 + x_17)? (16.0 + x_13) : (8.0 + x_17)) > ((20.0 + x_18) > (20.0 + x_21)? (20.0 + x_18) : (20.0 + x_21))? ((16.0 + x_13) > (8.0 + x_17)? (16.0 + x_13) : (8.0 + x_17)) : ((20.0 + x_18) > (20.0 + x_21)? (20.0 + x_18) : (20.0 + x_21))) : (((6.0 + x_24) > (8.0 + x_25)? (6.0 + x_24) : (8.0 + x_25)) > ((7.0 + x_27) > (15.0 + x_30)? (7.0 + x_27) : (15.0 + x_30))? ((6.0 + x_24) > (8.0 + x_25)? (6.0 + x_24) : (8.0 + x_25)) : ((7.0 + x_27) > (15.0 + x_30)? (7.0 + x_27) : (15.0 + x_30))))? ((((1.0 + x_0) > (1.0 + x_1)? (1.0 + x_0) : (1.0 + x_1)) > ((3.0 + x_3) > (15.0 + x_4)? (3.0 + x_3) : (15.0 + x_4))? ((1.0 + x_0) > (1.0 + x_1)? (1.0 + x_0) : (1.0 + x_1)) : ((3.0 + x_3) > (15.0 + x_4)? (3.0 + x_3) : (15.0 + x_4))) > (((8.0 + x_5) > (4.0 + x_7)? (8.0 + x_5) : (4.0 + x_7)) > ((11.0 + x_11) > (13.0 + x_12)? (11.0 + x_11) : (13.0 + x_12))? ((8.0 + x_5) > (4.0 + x_7)? (8.0 + x_5) : (4.0 + x_7)) : ((11.0 + x_11) > (13.0 + x_12)? (11.0 + x_11) : (13.0 + x_12)))? (((1.0 + x_0) > (1.0 + x_1)? (1.0 + x_0) : (1.0 + x_1)) > ((3.0 + x_3) > (15.0 + x_4)? (3.0 + x_3) : (15.0 + x_4))? ((1.0 + x_0) > (1.0 + x_1)? (1.0 + x_0) : (1.0 + x_1)) : ((3.0 + x_3) > (15.0 + x_4)? (3.0 + x_3) : (15.0 + x_4))) : (((8.0 + x_5) > (4.0 + x_7)? (8.0 + x_5) : (4.0 + x_7)) > ((11.0 + x_11) > (13.0 + x_12)? (11.0 + x_11) : (13.0 + x_12))? ((8.0 + x_5) > (4.0 + x_7)? (8.0 + x_5) : (4.0 + x_7)) : ((11.0 + x_11) > (13.0 + x_12)? (11.0 + x_11) : (13.0 + x_12)))) : ((((16.0 + x_13) > (8.0 + x_17)? (16.0 + x_13) : (8.0 + x_17)) > ((20.0 + x_18) > (20.0 + x_21)? (20.0 + x_18) : (20.0 + x_21))? ((16.0 + x_13) > (8.0 + x_17)? (16.0 + x_13) : (8.0 + x_17)) : ((20.0 + x_18) > (20.0 + x_21)? (20.0 + x_18) : (20.0 + x_21))) > (((6.0 + x_24) > (8.0 + x_25)? (6.0 + x_24) : (8.0 + x_25)) > ((7.0 + x_27) > (15.0 + x_30)? (7.0 + x_27) : (15.0 + x_30))? ((6.0 + x_24) > (8.0 + x_25)? (6.0 + x_24) : (8.0 + x_25)) : ((7.0 + x_27) > (15.0 + x_30)? (7.0 + x_27) : (15.0 + x_30)))? (((16.0 + x_13) > (8.0 + x_17)? (16.0 + x_13) : (8.0 + x_17)) > ((20.0 + x_18) > (20.0 + x_21)? (20.0 + x_18) : (20.0 + x_21))? ((16.0 + x_13) > (8.0 + x_17)? (16.0 + x_13) : (8.0 + x_17)) : ((20.0 + x_18) > (20.0 + x_21)? (20.0 + x_18) : (20.0 + x_21))) : (((6.0 + x_24) > (8.0 + x_25)? (6.0 + x_24) : (8.0 + x_25)) > ((7.0 + x_27) > (15.0 + x_30)? (7.0 + x_27) : (15.0 + x_30))? ((6.0 + x_24) > (8.0 + x_25)? (6.0 + x_24) : (8.0 + x_25)) : ((7.0 + x_27) > (15.0 + x_30)? (7.0 + x_27) : (15.0 + x_30)))));
x_3_ = (((((18.0 + x_1) > (11.0 + x_6)? (18.0 + x_1) : (11.0 + x_6)) > ((6.0 + x_7) > (19.0 + x_9)? (6.0 + x_7) : (19.0 + x_9))? ((18.0 + x_1) > (11.0 + x_6)? (18.0 + x_1) : (11.0 + x_6)) : ((6.0 + x_7) > (19.0 + x_9)? (6.0 + x_7) : (19.0 + x_9))) > (((18.0 + x_13) > (4.0 + x_17)? (18.0 + x_13) : (4.0 + x_17)) > ((13.0 + x_19) > (10.0 + x_20)? (13.0 + x_19) : (10.0 + x_20))? ((18.0 + x_13) > (4.0 + x_17)? (18.0 + x_13) : (4.0 + x_17)) : ((13.0 + x_19) > (10.0 + x_20)? (13.0 + x_19) : (10.0 + x_20)))? (((18.0 + x_1) > (11.0 + x_6)? (18.0 + x_1) : (11.0 + x_6)) > ((6.0 + x_7) > (19.0 + x_9)? (6.0 + x_7) : (19.0 + x_9))? ((18.0 + x_1) > (11.0 + x_6)? (18.0 + x_1) : (11.0 + x_6)) : ((6.0 + x_7) > (19.0 + x_9)? (6.0 + x_7) : (19.0 + x_9))) : (((18.0 + x_13) > (4.0 + x_17)? (18.0 + x_13) : (4.0 + x_17)) > ((13.0 + x_19) > (10.0 + x_20)? (13.0 + x_19) : (10.0 + x_20))? ((18.0 + x_13) > (4.0 + x_17)? (18.0 + x_13) : (4.0 + x_17)) : ((13.0 + x_19) > (10.0 + x_20)? (13.0 + x_19) : (10.0 + x_20)))) > ((((12.0 + x_21) > (13.0 + x_22)? (12.0 + x_21) : (13.0 + x_22)) > ((11.0 + x_23) > (1.0 + x_24)? (11.0 + x_23) : (1.0 + x_24))? ((12.0 + x_21) > (13.0 + x_22)? (12.0 + x_21) : (13.0 + x_22)) : ((11.0 + x_23) > (1.0 + x_24)? (11.0 + x_23) : (1.0 + x_24))) > (((14.0 + x_28) > (4.0 + x_29)? (14.0 + x_28) : (4.0 + x_29)) > ((5.0 + x_30) > (16.0 + x_31)? (5.0 + x_30) : (16.0 + x_31))? ((14.0 + x_28) > (4.0 + x_29)? (14.0 + x_28) : (4.0 + x_29)) : ((5.0 + x_30) > (16.0 + x_31)? (5.0 + x_30) : (16.0 + x_31)))? (((12.0 + x_21) > (13.0 + x_22)? (12.0 + x_21) : (13.0 + x_22)) > ((11.0 + x_23) > (1.0 + x_24)? (11.0 + x_23) : (1.0 + x_24))? ((12.0 + x_21) > (13.0 + x_22)? (12.0 + x_21) : (13.0 + x_22)) : ((11.0 + x_23) > (1.0 + x_24)? (11.0 + x_23) : (1.0 + x_24))) : (((14.0 + x_28) > (4.0 + x_29)? (14.0 + x_28) : (4.0 + x_29)) > ((5.0 + x_30) > (16.0 + x_31)? (5.0 + x_30) : (16.0 + x_31))? ((14.0 + x_28) > (4.0 + x_29)? (14.0 + x_28) : (4.0 + x_29)) : ((5.0 + x_30) > (16.0 + x_31)? (5.0 + x_30) : (16.0 + x_31))))? ((((18.0 + x_1) > (11.0 + x_6)? (18.0 + x_1) : (11.0 + x_6)) > ((6.0 + x_7) > (19.0 + x_9)? (6.0 + x_7) : (19.0 + x_9))? ((18.0 + x_1) > (11.0 + x_6)? (18.0 + x_1) : (11.0 + x_6)) : ((6.0 + x_7) > (19.0 + x_9)? (6.0 + x_7) : (19.0 + x_9))) > (((18.0 + x_13) > (4.0 + x_17)? (18.0 + x_13) : (4.0 + x_17)) > ((13.0 + x_19) > (10.0 + x_20)? (13.0 + x_19) : (10.0 + x_20))? ((18.0 + x_13) > (4.0 + x_17)? (18.0 + x_13) : (4.0 + x_17)) : ((13.0 + x_19) > (10.0 + x_20)? (13.0 + x_19) : (10.0 + x_20)))? (((18.0 + x_1) > (11.0 + x_6)? (18.0 + x_1) : (11.0 + x_6)) > ((6.0 + x_7) > (19.0 + x_9)? (6.0 + x_7) : (19.0 + x_9))? ((18.0 + x_1) > (11.0 + x_6)? (18.0 + x_1) : (11.0 + x_6)) : ((6.0 + x_7) > (19.0 + x_9)? (6.0 + x_7) : (19.0 + x_9))) : (((18.0 + x_13) > (4.0 + x_17)? (18.0 + x_13) : (4.0 + x_17)) > ((13.0 + x_19) > (10.0 + x_20)? (13.0 + x_19) : (10.0 + x_20))? ((18.0 + x_13) > (4.0 + x_17)? (18.0 + x_13) : (4.0 + x_17)) : ((13.0 + x_19) > (10.0 + x_20)? (13.0 + x_19) : (10.0 + x_20)))) : ((((12.0 + x_21) > (13.0 + x_22)? (12.0 + x_21) : (13.0 + x_22)) > ((11.0 + x_23) > (1.0 + x_24)? (11.0 + x_23) : (1.0 + x_24))? ((12.0 + x_21) > (13.0 + x_22)? (12.0 + x_21) : (13.0 + x_22)) : ((11.0 + x_23) > (1.0 + x_24)? (11.0 + x_23) : (1.0 + x_24))) > (((14.0 + x_28) > (4.0 + x_29)? (14.0 + x_28) : (4.0 + x_29)) > ((5.0 + x_30) > (16.0 + x_31)? (5.0 + x_30) : (16.0 + x_31))? ((14.0 + x_28) > (4.0 + x_29)? (14.0 + x_28) : (4.0 + x_29)) : ((5.0 + x_30) > (16.0 + x_31)? (5.0 + x_30) : (16.0 + x_31)))? (((12.0 + x_21) > (13.0 + x_22)? (12.0 + x_21) : (13.0 + x_22)) > ((11.0 + x_23) > (1.0 + x_24)? (11.0 + x_23) : (1.0 + x_24))? ((12.0 + x_21) > (13.0 + x_22)? (12.0 + x_21) : (13.0 + x_22)) : ((11.0 + x_23) > (1.0 + x_24)? (11.0 + x_23) : (1.0 + x_24))) : (((14.0 + x_28) > (4.0 + x_29)? (14.0 + x_28) : (4.0 + x_29)) > ((5.0 + x_30) > (16.0 + x_31)? (5.0 + x_30) : (16.0 + x_31))? ((14.0 + x_28) > (4.0 + x_29)? (14.0 + x_28) : (4.0 + x_29)) : ((5.0 + x_30) > (16.0 + x_31)? (5.0 + x_30) : (16.0 + x_31)))));
x_4_ = (((((9.0 + x_0) > (3.0 + x_3)? (9.0 + x_0) : (3.0 + x_3)) > ((16.0 + x_4) > (18.0 + x_7)? (16.0 + x_4) : (18.0 + x_7))? ((9.0 + x_0) > (3.0 + x_3)? (9.0 + x_0) : (3.0 + x_3)) : ((16.0 + x_4) > (18.0 + x_7)? (16.0 + x_4) : (18.0 + x_7))) > (((11.0 + x_9) > (20.0 + x_10)? (11.0 + x_9) : (20.0 + x_10)) > ((17.0 + x_12) > (2.0 + x_13)? (17.0 + x_12) : (2.0 + x_13))? ((11.0 + x_9) > (20.0 + x_10)? (11.0 + x_9) : (20.0 + x_10)) : ((17.0 + x_12) > (2.0 + x_13)? (17.0 + x_12) : (2.0 + x_13)))? (((9.0 + x_0) > (3.0 + x_3)? (9.0 + x_0) : (3.0 + x_3)) > ((16.0 + x_4) > (18.0 + x_7)? (16.0 + x_4) : (18.0 + x_7))? ((9.0 + x_0) > (3.0 + x_3)? (9.0 + x_0) : (3.0 + x_3)) : ((16.0 + x_4) > (18.0 + x_7)? (16.0 + x_4) : (18.0 + x_7))) : (((11.0 + x_9) > (20.0 + x_10)? (11.0 + x_9) : (20.0 + x_10)) > ((17.0 + x_12) > (2.0 + x_13)? (17.0 + x_12) : (2.0 + x_13))? ((11.0 + x_9) > (20.0 + x_10)? (11.0 + x_9) : (20.0 + x_10)) : ((17.0 + x_12) > (2.0 + x_13)? (17.0 + x_12) : (2.0 + x_13)))) > ((((20.0 + x_14) > (4.0 + x_15)? (20.0 + x_14) : (4.0 + x_15)) > ((14.0 + x_18) > (12.0 + x_19)? (14.0 + x_18) : (12.0 + x_19))? ((20.0 + x_14) > (4.0 + x_15)? (20.0 + x_14) : (4.0 + x_15)) : ((14.0 + x_18) > (12.0 + x_19)? (14.0 + x_18) : (12.0 + x_19))) > (((12.0 + x_22) > (20.0 + x_23)? (12.0 + x_22) : (20.0 + x_23)) > ((15.0 + x_24) > (9.0 + x_31)? (15.0 + x_24) : (9.0 + x_31))? ((12.0 + x_22) > (20.0 + x_23)? (12.0 + x_22) : (20.0 + x_23)) : ((15.0 + x_24) > (9.0 + x_31)? (15.0 + x_24) : (9.0 + x_31)))? (((20.0 + x_14) > (4.0 + x_15)? (20.0 + x_14) : (4.0 + x_15)) > ((14.0 + x_18) > (12.0 + x_19)? (14.0 + x_18) : (12.0 + x_19))? ((20.0 + x_14) > (4.0 + x_15)? (20.0 + x_14) : (4.0 + x_15)) : ((14.0 + x_18) > (12.0 + x_19)? (14.0 + x_18) : (12.0 + x_19))) : (((12.0 + x_22) > (20.0 + x_23)? (12.0 + x_22) : (20.0 + x_23)) > ((15.0 + x_24) > (9.0 + x_31)? (15.0 + x_24) : (9.0 + x_31))? ((12.0 + x_22) > (20.0 + x_23)? (12.0 + x_22) : (20.0 + x_23)) : ((15.0 + x_24) > (9.0 + x_31)? (15.0 + x_24) : (9.0 + x_31))))? ((((9.0 + x_0) > (3.0 + x_3)? (9.0 + x_0) : (3.0 + x_3)) > ((16.0 + x_4) > (18.0 + x_7)? (16.0 + x_4) : (18.0 + x_7))? ((9.0 + x_0) > (3.0 + x_3)? (9.0 + x_0) : (3.0 + x_3)) : ((16.0 + x_4) > (18.0 + x_7)? (16.0 + x_4) : (18.0 + x_7))) > (((11.0 + x_9) > (20.0 + x_10)? (11.0 + x_9) : (20.0 + x_10)) > ((17.0 + x_12) > (2.0 + x_13)? (17.0 + x_12) : (2.0 + x_13))? ((11.0 + x_9) > (20.0 + x_10)? (11.0 + x_9) : (20.0 + x_10)) : ((17.0 + x_12) > (2.0 + x_13)? (17.0 + x_12) : (2.0 + x_13)))? (((9.0 + x_0) > (3.0 + x_3)? (9.0 + x_0) : (3.0 + x_3)) > ((16.0 + x_4) > (18.0 + x_7)? (16.0 + x_4) : (18.0 + x_7))? ((9.0 + x_0) > (3.0 + x_3)? (9.0 + x_0) : (3.0 + x_3)) : ((16.0 + x_4) > (18.0 + x_7)? (16.0 + x_4) : (18.0 + x_7))) : (((11.0 + x_9) > (20.0 + x_10)? (11.0 + x_9) : (20.0 + x_10)) > ((17.0 + x_12) > (2.0 + x_13)? (17.0 + x_12) : (2.0 + x_13))? ((11.0 + x_9) > (20.0 + x_10)? (11.0 + x_9) : (20.0 + x_10)) : ((17.0 + x_12) > (2.0 + x_13)? (17.0 + x_12) : (2.0 + x_13)))) : ((((20.0 + x_14) > (4.0 + x_15)? (20.0 + x_14) : (4.0 + x_15)) > ((14.0 + x_18) > (12.0 + x_19)? (14.0 + x_18) : (12.0 + x_19))? ((20.0 + x_14) > (4.0 + x_15)? (20.0 + x_14) : (4.0 + x_15)) : ((14.0 + x_18) > (12.0 + x_19)? (14.0 + x_18) : (12.0 + x_19))) > (((12.0 + x_22) > (20.0 + x_23)? (12.0 + x_22) : (20.0 + x_23)) > ((15.0 + x_24) > (9.0 + x_31)? (15.0 + x_24) : (9.0 + x_31))? ((12.0 + x_22) > (20.0 + x_23)? (12.0 + x_22) : (20.0 + x_23)) : ((15.0 + x_24) > (9.0 + x_31)? (15.0 + x_24) : (9.0 + x_31)))? (((20.0 + x_14) > (4.0 + x_15)? (20.0 + x_14) : (4.0 + x_15)) > ((14.0 + x_18) > (12.0 + x_19)? (14.0 + x_18) : (12.0 + x_19))? ((20.0 + x_14) > (4.0 + x_15)? (20.0 + x_14) : (4.0 + x_15)) : ((14.0 + x_18) > (12.0 + x_19)? (14.0 + x_18) : (12.0 + x_19))) : (((12.0 + x_22) > (20.0 + x_23)? (12.0 + x_22) : (20.0 + x_23)) > ((15.0 + x_24) > (9.0 + x_31)? (15.0 + x_24) : (9.0 + x_31))? ((12.0 + x_22) > (20.0 + x_23)? (12.0 + x_22) : (20.0 + x_23)) : ((15.0 + x_24) > (9.0 + x_31)? (15.0 + x_24) : (9.0 + x_31)))));
x_5_ = (((((19.0 + x_0) > (14.0 + x_1)? (19.0 + x_0) : (14.0 + x_1)) > ((7.0 + x_4) > (10.0 + x_7)? (7.0 + x_4) : (10.0 + x_7))? ((19.0 + x_0) > (14.0 + x_1)? (19.0 + x_0) : (14.0 + x_1)) : ((7.0 + x_4) > (10.0 + x_7)? (7.0 + x_4) : (10.0 + x_7))) > (((15.0 + x_9) > (20.0 + x_11)? (15.0 + x_9) : (20.0 + x_11)) > ((13.0 + x_15) > (9.0 + x_16)? (13.0 + x_15) : (9.0 + x_16))? ((15.0 + x_9) > (20.0 + x_11)? (15.0 + x_9) : (20.0 + x_11)) : ((13.0 + x_15) > (9.0 + x_16)? (13.0 + x_15) : (9.0 + x_16)))? (((19.0 + x_0) > (14.0 + x_1)? (19.0 + x_0) : (14.0 + x_1)) > ((7.0 + x_4) > (10.0 + x_7)? (7.0 + x_4) : (10.0 + x_7))? ((19.0 + x_0) > (14.0 + x_1)? (19.0 + x_0) : (14.0 + x_1)) : ((7.0 + x_4) > (10.0 + x_7)? (7.0 + x_4) : (10.0 + x_7))) : (((15.0 + x_9) > (20.0 + x_11)? (15.0 + x_9) : (20.0 + x_11)) > ((13.0 + x_15) > (9.0 + x_16)? (13.0 + x_15) : (9.0 + x_16))? ((15.0 + x_9) > (20.0 + x_11)? (15.0 + x_9) : (20.0 + x_11)) : ((13.0 + x_15) > (9.0 + x_16)? (13.0 + x_15) : (9.0 + x_16)))) > ((((18.0 + x_18) > (11.0 + x_20)? (18.0 + x_18) : (11.0 + x_20)) > ((11.0 + x_23) > (2.0 + x_25)? (11.0 + x_23) : (2.0 + x_25))? ((18.0 + x_18) > (11.0 + x_20)? (18.0 + x_18) : (11.0 + x_20)) : ((11.0 + x_23) > (2.0 + x_25)? (11.0 + x_23) : (2.0 + x_25))) > (((18.0 + x_26) > (18.0 + x_29)? (18.0 + x_26) : (18.0 + x_29)) > ((9.0 + x_30) > (9.0 + x_31)? (9.0 + x_30) : (9.0 + x_31))? ((18.0 + x_26) > (18.0 + x_29)? (18.0 + x_26) : (18.0 + x_29)) : ((9.0 + x_30) > (9.0 + x_31)? (9.0 + x_30) : (9.0 + x_31)))? (((18.0 + x_18) > (11.0 + x_20)? (18.0 + x_18) : (11.0 + x_20)) > ((11.0 + x_23) > (2.0 + x_25)? (11.0 + x_23) : (2.0 + x_25))? ((18.0 + x_18) > (11.0 + x_20)? (18.0 + x_18) : (11.0 + x_20)) : ((11.0 + x_23) > (2.0 + x_25)? (11.0 + x_23) : (2.0 + x_25))) : (((18.0 + x_26) > (18.0 + x_29)? (18.0 + x_26) : (18.0 + x_29)) > ((9.0 + x_30) > (9.0 + x_31)? (9.0 + x_30) : (9.0 + x_31))? ((18.0 + x_26) > (18.0 + x_29)? (18.0 + x_26) : (18.0 + x_29)) : ((9.0 + x_30) > (9.0 + x_31)? (9.0 + x_30) : (9.0 + x_31))))? ((((19.0 + x_0) > (14.0 + x_1)? (19.0 + x_0) : (14.0 + x_1)) > ((7.0 + x_4) > (10.0 + x_7)? (7.0 + x_4) : (10.0 + x_7))? ((19.0 + x_0) > (14.0 + x_1)? (19.0 + x_0) : (14.0 + x_1)) : ((7.0 + x_4) > (10.0 + x_7)? (7.0 + x_4) : (10.0 + x_7))) > (((15.0 + x_9) > (20.0 + x_11)? (15.0 + x_9) : (20.0 + x_11)) > ((13.0 + x_15) > (9.0 + x_16)? (13.0 + x_15) : (9.0 + x_16))? ((15.0 + x_9) > (20.0 + x_11)? (15.0 + x_9) : (20.0 + x_11)) : ((13.0 + x_15) > (9.0 + x_16)? (13.0 + x_15) : (9.0 + x_16)))? (((19.0 + x_0) > (14.0 + x_1)? (19.0 + x_0) : (14.0 + x_1)) > ((7.0 + x_4) > (10.0 + x_7)? (7.0 + x_4) : (10.0 + x_7))? ((19.0 + x_0) > (14.0 + x_1)? (19.0 + x_0) : (14.0 + x_1)) : ((7.0 + x_4) > (10.0 + x_7)? (7.0 + x_4) : (10.0 + x_7))) : (((15.0 + x_9) > (20.0 + x_11)? (15.0 + x_9) : (20.0 + x_11)) > ((13.0 + x_15) > (9.0 + x_16)? (13.0 + x_15) : (9.0 + x_16))? ((15.0 + x_9) > (20.0 + x_11)? (15.0 + x_9) : (20.0 + x_11)) : ((13.0 + x_15) > (9.0 + x_16)? (13.0 + x_15) : (9.0 + x_16)))) : ((((18.0 + x_18) > (11.0 + x_20)? (18.0 + x_18) : (11.0 + x_20)) > ((11.0 + x_23) > (2.0 + x_25)? (11.0 + x_23) : (2.0 + x_25))? ((18.0 + x_18) > (11.0 + x_20)? (18.0 + x_18) : (11.0 + x_20)) : ((11.0 + x_23) > (2.0 + x_25)? (11.0 + x_23) : (2.0 + x_25))) > (((18.0 + x_26) > (18.0 + x_29)? (18.0 + x_26) : (18.0 + x_29)) > ((9.0 + x_30) > (9.0 + x_31)? (9.0 + x_30) : (9.0 + x_31))? ((18.0 + x_26) > (18.0 + x_29)? (18.0 + x_26) : (18.0 + x_29)) : ((9.0 + x_30) > (9.0 + x_31)? (9.0 + x_30) : (9.0 + x_31)))? (((18.0 + x_18) > (11.0 + x_20)? (18.0 + x_18) : (11.0 + x_20)) > ((11.0 + x_23) > (2.0 + x_25)? (11.0 + x_23) : (2.0 + x_25))? ((18.0 + x_18) > (11.0 + x_20)? (18.0 + x_18) : (11.0 + x_20)) : ((11.0 + x_23) > (2.0 + x_25)? (11.0 + x_23) : (2.0 + x_25))) : (((18.0 + x_26) > (18.0 + x_29)? (18.0 + x_26) : (18.0 + x_29)) > ((9.0 + x_30) > (9.0 + x_31)? (9.0 + x_30) : (9.0 + x_31))? ((18.0 + x_26) > (18.0 + x_29)? (18.0 + x_26) : (18.0 + x_29)) : ((9.0 + x_30) > (9.0 + x_31)? (9.0 + x_30) : (9.0 + x_31)))));
x_6_ = (((((18.0 + x_0) > (15.0 + x_2)? (18.0 + x_0) : (15.0 + x_2)) > ((7.0 + x_6) > (2.0 + x_9)? (7.0 + x_6) : (2.0 + x_9))? ((18.0 + x_0) > (15.0 + x_2)? (18.0 + x_0) : (15.0 + x_2)) : ((7.0 + x_6) > (2.0 + x_9)? (7.0 + x_6) : (2.0 + x_9))) > (((14.0 + x_12) > (15.0 + x_13)? (14.0 + x_12) : (15.0 + x_13)) > ((14.0 + x_14) > (8.0 + x_16)? (14.0 + x_14) : (8.0 + x_16))? ((14.0 + x_12) > (15.0 + x_13)? (14.0 + x_12) : (15.0 + x_13)) : ((14.0 + x_14) > (8.0 + x_16)? (14.0 + x_14) : (8.0 + x_16)))? (((18.0 + x_0) > (15.0 + x_2)? (18.0 + x_0) : (15.0 + x_2)) > ((7.0 + x_6) > (2.0 + x_9)? (7.0 + x_6) : (2.0 + x_9))? ((18.0 + x_0) > (15.0 + x_2)? (18.0 + x_0) : (15.0 + x_2)) : ((7.0 + x_6) > (2.0 + x_9)? (7.0 + x_6) : (2.0 + x_9))) : (((14.0 + x_12) > (15.0 + x_13)? (14.0 + x_12) : (15.0 + x_13)) > ((14.0 + x_14) > (8.0 + x_16)? (14.0 + x_14) : (8.0 + x_16))? ((14.0 + x_12) > (15.0 + x_13)? (14.0 + x_12) : (15.0 + x_13)) : ((14.0 + x_14) > (8.0 + x_16)? (14.0 + x_14) : (8.0 + x_16)))) > ((((8.0 + x_18) > (10.0 + x_19)? (8.0 + x_18) : (10.0 + x_19)) > ((17.0 + x_21) > (10.0 + x_24)? (17.0 + x_21) : (10.0 + x_24))? ((8.0 + x_18) > (10.0 + x_19)? (8.0 + x_18) : (10.0 + x_19)) : ((17.0 + x_21) > (10.0 + x_24)? (17.0 + x_21) : (10.0 + x_24))) > (((17.0 + x_26) > (9.0 + x_27)? (17.0 + x_26) : (9.0 + x_27)) > ((14.0 + x_28) > (12.0 + x_29)? (14.0 + x_28) : (12.0 + x_29))? ((17.0 + x_26) > (9.0 + x_27)? (17.0 + x_26) : (9.0 + x_27)) : ((14.0 + x_28) > (12.0 + x_29)? (14.0 + x_28) : (12.0 + x_29)))? (((8.0 + x_18) > (10.0 + x_19)? (8.0 + x_18) : (10.0 + x_19)) > ((17.0 + x_21) > (10.0 + x_24)? (17.0 + x_21) : (10.0 + x_24))? ((8.0 + x_18) > (10.0 + x_19)? (8.0 + x_18) : (10.0 + x_19)) : ((17.0 + x_21) > (10.0 + x_24)? (17.0 + x_21) : (10.0 + x_24))) : (((17.0 + x_26) > (9.0 + x_27)? (17.0 + x_26) : (9.0 + x_27)) > ((14.0 + x_28) > (12.0 + x_29)? (14.0 + x_28) : (12.0 + x_29))? ((17.0 + x_26) > (9.0 + x_27)? (17.0 + x_26) : (9.0 + x_27)) : ((14.0 + x_28) > (12.0 + x_29)? (14.0 + x_28) : (12.0 + x_29))))? ((((18.0 + x_0) > (15.0 + x_2)? (18.0 + x_0) : (15.0 + x_2)) > ((7.0 + x_6) > (2.0 + x_9)? (7.0 + x_6) : (2.0 + x_9))? ((18.0 + x_0) > (15.0 + x_2)? (18.0 + x_0) : (15.0 + x_2)) : ((7.0 + x_6) > (2.0 + x_9)? (7.0 + x_6) : (2.0 + x_9))) > (((14.0 + x_12) > (15.0 + x_13)? (14.0 + x_12) : (15.0 + x_13)) > ((14.0 + x_14) > (8.0 + x_16)? (14.0 + x_14) : (8.0 + x_16))? ((14.0 + x_12) > (15.0 + x_13)? (14.0 + x_12) : (15.0 + x_13)) : ((14.0 + x_14) > (8.0 + x_16)? (14.0 + x_14) : (8.0 + x_16)))? (((18.0 + x_0) > (15.0 + x_2)? (18.0 + x_0) : (15.0 + x_2)) > ((7.0 + x_6) > (2.0 + x_9)? (7.0 + x_6) : (2.0 + x_9))? ((18.0 + x_0) > (15.0 + x_2)? (18.0 + x_0) : (15.0 + x_2)) : ((7.0 + x_6) > (2.0 + x_9)? (7.0 + x_6) : (2.0 + x_9))) : (((14.0 + x_12) > (15.0 + x_13)? (14.0 + x_12) : (15.0 + x_13)) > ((14.0 + x_14) > (8.0 + x_16)? (14.0 + x_14) : (8.0 + x_16))? ((14.0 + x_12) > (15.0 + x_13)? (14.0 + x_12) : (15.0 + x_13)) : ((14.0 + x_14) > (8.0 + x_16)? (14.0 + x_14) : (8.0 + x_16)))) : ((((8.0 + x_18) > (10.0 + x_19)? (8.0 + x_18) : (10.0 + x_19)) > ((17.0 + x_21) > (10.0 + x_24)? (17.0 + x_21) : (10.0 + x_24))? ((8.0 + x_18) > (10.0 + x_19)? (8.0 + x_18) : (10.0 + x_19)) : ((17.0 + x_21) > (10.0 + x_24)? (17.0 + x_21) : (10.0 + x_24))) > (((17.0 + x_26) > (9.0 + x_27)? (17.0 + x_26) : (9.0 + x_27)) > ((14.0 + x_28) > (12.0 + x_29)? (14.0 + x_28) : (12.0 + x_29))? ((17.0 + x_26) > (9.0 + x_27)? (17.0 + x_26) : (9.0 + x_27)) : ((14.0 + x_28) > (12.0 + x_29)? (14.0 + x_28) : (12.0 + x_29)))? (((8.0 + x_18) > (10.0 + x_19)? (8.0 + x_18) : (10.0 + x_19)) > ((17.0 + x_21) > (10.0 + x_24)? (17.0 + x_21) : (10.0 + x_24))? ((8.0 + x_18) > (10.0 + x_19)? (8.0 + x_18) : (10.0 + x_19)) : ((17.0 + x_21) > (10.0 + x_24)? (17.0 + x_21) : (10.0 + x_24))) : (((17.0 + x_26) > (9.0 + x_27)? (17.0 + x_26) : (9.0 + x_27)) > ((14.0 + x_28) > (12.0 + x_29)? (14.0 + x_28) : (12.0 + x_29))? ((17.0 + x_26) > (9.0 + x_27)? (17.0 + x_26) : (9.0 + x_27)) : ((14.0 + x_28) > (12.0 + x_29)? (14.0 + x_28) : (12.0 + x_29)))));
x_7_ = (((((14.0 + x_0) > (10.0 + x_1)? (14.0 + x_0) : (10.0 + x_1)) > ((1.0 + x_2) > (2.0 + x_3)? (1.0 + x_2) : (2.0 + x_3))? ((14.0 + x_0) > (10.0 + x_1)? (14.0 + x_0) : (10.0 + x_1)) : ((1.0 + x_2) > (2.0 + x_3)? (1.0 + x_2) : (2.0 + x_3))) > (((17.0 + x_5) > (7.0 + x_7)? (17.0 + x_5) : (7.0 + x_7)) > ((10.0 + x_10) > (13.0 + x_11)? (10.0 + x_10) : (13.0 + x_11))? ((17.0 + x_5) > (7.0 + x_7)? (17.0 + x_5) : (7.0 + x_7)) : ((10.0 + x_10) > (13.0 + x_11)? (10.0 + x_10) : (13.0 + x_11)))? (((14.0 + x_0) > (10.0 + x_1)? (14.0 + x_0) : (10.0 + x_1)) > ((1.0 + x_2) > (2.0 + x_3)? (1.0 + x_2) : (2.0 + x_3))? ((14.0 + x_0) > (10.0 + x_1)? (14.0 + x_0) : (10.0 + x_1)) : ((1.0 + x_2) > (2.0 + x_3)? (1.0 + x_2) : (2.0 + x_3))) : (((17.0 + x_5) > (7.0 + x_7)? (17.0 + x_5) : (7.0 + x_7)) > ((10.0 + x_10) > (13.0 + x_11)? (10.0 + x_10) : (13.0 + x_11))? ((17.0 + x_5) > (7.0 + x_7)? (17.0 + x_5) : (7.0 + x_7)) : ((10.0 + x_10) > (13.0 + x_11)? (10.0 + x_10) : (13.0 + x_11)))) > ((((3.0 + x_16) > (20.0 + x_17)? (3.0 + x_16) : (20.0 + x_17)) > ((12.0 + x_18) > (11.0 + x_19)? (12.0 + x_18) : (11.0 + x_19))? ((3.0 + x_16) > (20.0 + x_17)? (3.0 + x_16) : (20.0 + x_17)) : ((12.0 + x_18) > (11.0 + x_19)? (12.0 + x_18) : (11.0 + x_19))) > (((9.0 + x_21) > (12.0 + x_22)? (9.0 + x_21) : (12.0 + x_22)) > ((7.0 + x_26) > (2.0 + x_29)? (7.0 + x_26) : (2.0 + x_29))? ((9.0 + x_21) > (12.0 + x_22)? (9.0 + x_21) : (12.0 + x_22)) : ((7.0 + x_26) > (2.0 + x_29)? (7.0 + x_26) : (2.0 + x_29)))? (((3.0 + x_16) > (20.0 + x_17)? (3.0 + x_16) : (20.0 + x_17)) > ((12.0 + x_18) > (11.0 + x_19)? (12.0 + x_18) : (11.0 + x_19))? ((3.0 + x_16) > (20.0 + x_17)? (3.0 + x_16) : (20.0 + x_17)) : ((12.0 + x_18) > (11.0 + x_19)? (12.0 + x_18) : (11.0 + x_19))) : (((9.0 + x_21) > (12.0 + x_22)? (9.0 + x_21) : (12.0 + x_22)) > ((7.0 + x_26) > (2.0 + x_29)? (7.0 + x_26) : (2.0 + x_29))? ((9.0 + x_21) > (12.0 + x_22)? (9.0 + x_21) : (12.0 + x_22)) : ((7.0 + x_26) > (2.0 + x_29)? (7.0 + x_26) : (2.0 + x_29))))? ((((14.0 + x_0) > (10.0 + x_1)? (14.0 + x_0) : (10.0 + x_1)) > ((1.0 + x_2) > (2.0 + x_3)? (1.0 + x_2) : (2.0 + x_3))? ((14.0 + x_0) > (10.0 + x_1)? (14.0 + x_0) : (10.0 + x_1)) : ((1.0 + x_2) > (2.0 + x_3)? (1.0 + x_2) : (2.0 + x_3))) > (((17.0 + x_5) > (7.0 + x_7)? (17.0 + x_5) : (7.0 + x_7)) > ((10.0 + x_10) > (13.0 + x_11)? (10.0 + x_10) : (13.0 + x_11))? ((17.0 + x_5) > (7.0 + x_7)? (17.0 + x_5) : (7.0 + x_7)) : ((10.0 + x_10) > (13.0 + x_11)? (10.0 + x_10) : (13.0 + x_11)))? (((14.0 + x_0) > (10.0 + x_1)? (14.0 + x_0) : (10.0 + x_1)) > ((1.0 + x_2) > (2.0 + x_3)? (1.0 + x_2) : (2.0 + x_3))? ((14.0 + x_0) > (10.0 + x_1)? (14.0 + x_0) : (10.0 + x_1)) : ((1.0 + x_2) > (2.0 + x_3)? (1.0 + x_2) : (2.0 + x_3))) : (((17.0 + x_5) > (7.0 + x_7)? (17.0 + x_5) : (7.0 + x_7)) > ((10.0 + x_10) > (13.0 + x_11)? (10.0 + x_10) : (13.0 + x_11))? ((17.0 + x_5) > (7.0 + x_7)? (17.0 + x_5) : (7.0 + x_7)) : ((10.0 + x_10) > (13.0 + x_11)? (10.0 + x_10) : (13.0 + x_11)))) : ((((3.0 + x_16) > (20.0 + x_17)? (3.0 + x_16) : (20.0 + x_17)) > ((12.0 + x_18) > (11.0 + x_19)? (12.0 + x_18) : (11.0 + x_19))? ((3.0 + x_16) > (20.0 + x_17)? (3.0 + x_16) : (20.0 + x_17)) : ((12.0 + x_18) > (11.0 + x_19)? (12.0 + x_18) : (11.0 + x_19))) > (((9.0 + x_21) > (12.0 + x_22)? (9.0 + x_21) : (12.0 + x_22)) > ((7.0 + x_26) > (2.0 + x_29)? (7.0 + x_26) : (2.0 + x_29))? ((9.0 + x_21) > (12.0 + x_22)? (9.0 + x_21) : (12.0 + x_22)) : ((7.0 + x_26) > (2.0 + x_29)? (7.0 + x_26) : (2.0 + x_29)))? (((3.0 + x_16) > (20.0 + x_17)? (3.0 + x_16) : (20.0 + x_17)) > ((12.0 + x_18) > (11.0 + x_19)? (12.0 + x_18) : (11.0 + x_19))? ((3.0 + x_16) > (20.0 + x_17)? (3.0 + x_16) : (20.0 + x_17)) : ((12.0 + x_18) > (11.0 + x_19)? (12.0 + x_18) : (11.0 + x_19))) : (((9.0 + x_21) > (12.0 + x_22)? (9.0 + x_21) : (12.0 + x_22)) > ((7.0 + x_26) > (2.0 + x_29)? (7.0 + x_26) : (2.0 + x_29))? ((9.0 + x_21) > (12.0 + x_22)? (9.0 + x_21) : (12.0 + x_22)) : ((7.0 + x_26) > (2.0 + x_29)? (7.0 + x_26) : (2.0 + x_29)))));
x_8_ = (((((5.0 + x_1) > (15.0 + x_2)? (5.0 + x_1) : (15.0 + x_2)) > ((2.0 + x_3) > (11.0 + x_4)? (2.0 + x_3) : (11.0 + x_4))? ((5.0 + x_1) > (15.0 + x_2)? (5.0 + x_1) : (15.0 + x_2)) : ((2.0 + x_3) > (11.0 + x_4)? (2.0 + x_3) : (11.0 + x_4))) > (((1.0 + x_9) > (18.0 + x_11)? (1.0 + x_9) : (18.0 + x_11)) > ((8.0 + x_13) > (6.0 + x_18)? (8.0 + x_13) : (6.0 + x_18))? ((1.0 + x_9) > (18.0 + x_11)? (1.0 + x_9) : (18.0 + x_11)) : ((8.0 + x_13) > (6.0 + x_18)? (8.0 + x_13) : (6.0 + x_18)))? (((5.0 + x_1) > (15.0 + x_2)? (5.0 + x_1) : (15.0 + x_2)) > ((2.0 + x_3) > (11.0 + x_4)? (2.0 + x_3) : (11.0 + x_4))? ((5.0 + x_1) > (15.0 + x_2)? (5.0 + x_1) : (15.0 + x_2)) : ((2.0 + x_3) > (11.0 + x_4)? (2.0 + x_3) : (11.0 + x_4))) : (((1.0 + x_9) > (18.0 + x_11)? (1.0 + x_9) : (18.0 + x_11)) > ((8.0 + x_13) > (6.0 + x_18)? (8.0 + x_13) : (6.0 + x_18))? ((1.0 + x_9) > (18.0 + x_11)? (1.0 + x_9) : (18.0 + x_11)) : ((8.0 + x_13) > (6.0 + x_18)? (8.0 + x_13) : (6.0 + x_18)))) > ((((9.0 + x_19) > (13.0 + x_20)? (9.0 + x_19) : (13.0 + x_20)) > ((17.0 + x_21) > (5.0 + x_22)? (17.0 + x_21) : (5.0 + x_22))? ((9.0 + x_19) > (13.0 + x_20)? (9.0 + x_19) : (13.0 + x_20)) : ((17.0 + x_21) > (5.0 + x_22)? (17.0 + x_21) : (5.0 + x_22))) > (((18.0 + x_25) > (13.0 + x_28)? (18.0 + x_25) : (13.0 + x_28)) > ((10.0 + x_30) > (15.0 + x_31)? (10.0 + x_30) : (15.0 + x_31))? ((18.0 + x_25) > (13.0 + x_28)? (18.0 + x_25) : (13.0 + x_28)) : ((10.0 + x_30) > (15.0 + x_31)? (10.0 + x_30) : (15.0 + x_31)))? (((9.0 + x_19) > (13.0 + x_20)? (9.0 + x_19) : (13.0 + x_20)) > ((17.0 + x_21) > (5.0 + x_22)? (17.0 + x_21) : (5.0 + x_22))? ((9.0 + x_19) > (13.0 + x_20)? (9.0 + x_19) : (13.0 + x_20)) : ((17.0 + x_21) > (5.0 + x_22)? (17.0 + x_21) : (5.0 + x_22))) : (((18.0 + x_25) > (13.0 + x_28)? (18.0 + x_25) : (13.0 + x_28)) > ((10.0 + x_30) > (15.0 + x_31)? (10.0 + x_30) : (15.0 + x_31))? ((18.0 + x_25) > (13.0 + x_28)? (18.0 + x_25) : (13.0 + x_28)) : ((10.0 + x_30) > (15.0 + x_31)? (10.0 + x_30) : (15.0 + x_31))))? ((((5.0 + x_1) > (15.0 + x_2)? (5.0 + x_1) : (15.0 + x_2)) > ((2.0 + x_3) > (11.0 + x_4)? (2.0 + x_3) : (11.0 + x_4))? ((5.0 + x_1) > (15.0 + x_2)? (5.0 + x_1) : (15.0 + x_2)) : ((2.0 + x_3) > (11.0 + x_4)? (2.0 + x_3) : (11.0 + x_4))) > (((1.0 + x_9) > (18.0 + x_11)? (1.0 + x_9) : (18.0 + x_11)) > ((8.0 + x_13) > (6.0 + x_18)? (8.0 + x_13) : (6.0 + x_18))? ((1.0 + x_9) > (18.0 + x_11)? (1.0 + x_9) : (18.0 + x_11)) : ((8.0 + x_13) > (6.0 + x_18)? (8.0 + x_13) : (6.0 + x_18)))? (((5.0 + x_1) > (15.0 + x_2)? (5.0 + x_1) : (15.0 + x_2)) > ((2.0 + x_3) > (11.0 + x_4)? (2.0 + x_3) : (11.0 + x_4))? ((5.0 + x_1) > (15.0 + x_2)? (5.0 + x_1) : (15.0 + x_2)) : ((2.0 + x_3) > (11.0 + x_4)? (2.0 + x_3) : (11.0 + x_4))) : (((1.0 + x_9) > (18.0 + x_11)? (1.0 + x_9) : (18.0 + x_11)) > ((8.0 + x_13) > (6.0 + x_18)? (8.0 + x_13) : (6.0 + x_18))? ((1.0 + x_9) > (18.0 + x_11)? (1.0 + x_9) : (18.0 + x_11)) : ((8.0 + x_13) > (6.0 + x_18)? (8.0 + x_13) : (6.0 + x_18)))) : ((((9.0 + x_19) > (13.0 + x_20)? (9.0 + x_19) : (13.0 + x_20)) > ((17.0 + x_21) > (5.0 + x_22)? (17.0 + x_21) : (5.0 + x_22))? ((9.0 + x_19) > (13.0 + x_20)? (9.0 + x_19) : (13.0 + x_20)) : ((17.0 + x_21) > (5.0 + x_22)? (17.0 + x_21) : (5.0 + x_22))) > (((18.0 + x_25) > (13.0 + x_28)? (18.0 + x_25) : (13.0 + x_28)) > ((10.0 + x_30) > (15.0 + x_31)? (10.0 + x_30) : (15.0 + x_31))? ((18.0 + x_25) > (13.0 + x_28)? (18.0 + x_25) : (13.0 + x_28)) : ((10.0 + x_30) > (15.0 + x_31)? (10.0 + x_30) : (15.0 + x_31)))? (((9.0 + x_19) > (13.0 + x_20)? (9.0 + x_19) : (13.0 + x_20)) > ((17.0 + x_21) > (5.0 + x_22)? (17.0 + x_21) : (5.0 + x_22))? ((9.0 + x_19) > (13.0 + x_20)? (9.0 + x_19) : (13.0 + x_20)) : ((17.0 + x_21) > (5.0 + x_22)? (17.0 + x_21) : (5.0 + x_22))) : (((18.0 + x_25) > (13.0 + x_28)? (18.0 + x_25) : (13.0 + x_28)) > ((10.0 + x_30) > (15.0 + x_31)? (10.0 + x_30) : (15.0 + x_31))? ((18.0 + x_25) > (13.0 + x_28)? (18.0 + x_25) : (13.0 + x_28)) : ((10.0 + x_30) > (15.0 + x_31)? (10.0 + x_30) : (15.0 + x_31)))));
x_9_ = (((((7.0 + x_0) > (7.0 + x_1)? (7.0 + x_0) : (7.0 + x_1)) > ((6.0 + x_3) > (13.0 + x_5)? (6.0 + x_3) : (13.0 + x_5))? ((7.0 + x_0) > (7.0 + x_1)? (7.0 + x_0) : (7.0 + x_1)) : ((6.0 + x_3) > (13.0 + x_5)? (6.0 + x_3) : (13.0 + x_5))) > (((6.0 + x_9) > (14.0 + x_10)? (6.0 + x_9) : (14.0 + x_10)) > ((7.0 + x_11) > (4.0 + x_14)? (7.0 + x_11) : (4.0 + x_14))? ((6.0 + x_9) > (14.0 + x_10)? (6.0 + x_9) : (14.0 + x_10)) : ((7.0 + x_11) > (4.0 + x_14)? (7.0 + x_11) : (4.0 + x_14)))? (((7.0 + x_0) > (7.0 + x_1)? (7.0 + x_0) : (7.0 + x_1)) > ((6.0 + x_3) > (13.0 + x_5)? (6.0 + x_3) : (13.0 + x_5))? ((7.0 + x_0) > (7.0 + x_1)? (7.0 + x_0) : (7.0 + x_1)) : ((6.0 + x_3) > (13.0 + x_5)? (6.0 + x_3) : (13.0 + x_5))) : (((6.0 + x_9) > (14.0 + x_10)? (6.0 + x_9) : (14.0 + x_10)) > ((7.0 + x_11) > (4.0 + x_14)? (7.0 + x_11) : (4.0 + x_14))? ((6.0 + x_9) > (14.0 + x_10)? (6.0 + x_9) : (14.0 + x_10)) : ((7.0 + x_11) > (4.0 + x_14)? (7.0 + x_11) : (4.0 + x_14)))) > ((((11.0 + x_17) > (14.0 + x_19)? (11.0 + x_17) : (14.0 + x_19)) > ((20.0 + x_20) > (16.0 + x_21)? (20.0 + x_20) : (16.0 + x_21))? ((11.0 + x_17) > (14.0 + x_19)? (11.0 + x_17) : (14.0 + x_19)) : ((20.0 + x_20) > (16.0 + x_21)? (20.0 + x_20) : (16.0 + x_21))) > (((11.0 + x_22) > (20.0 + x_23)? (11.0 + x_22) : (20.0 + x_23)) > ((11.0 + x_30) > (13.0 + x_31)? (11.0 + x_30) : (13.0 + x_31))? ((11.0 + x_22) > (20.0 + x_23)? (11.0 + x_22) : (20.0 + x_23)) : ((11.0 + x_30) > (13.0 + x_31)? (11.0 + x_30) : (13.0 + x_31)))? (((11.0 + x_17) > (14.0 + x_19)? (11.0 + x_17) : (14.0 + x_19)) > ((20.0 + x_20) > (16.0 + x_21)? (20.0 + x_20) : (16.0 + x_21))? ((11.0 + x_17) > (14.0 + x_19)? (11.0 + x_17) : (14.0 + x_19)) : ((20.0 + x_20) > (16.0 + x_21)? (20.0 + x_20) : (16.0 + x_21))) : (((11.0 + x_22) > (20.0 + x_23)? (11.0 + x_22) : (20.0 + x_23)) > ((11.0 + x_30) > (13.0 + x_31)? (11.0 + x_30) : (13.0 + x_31))? ((11.0 + x_22) > (20.0 + x_23)? (11.0 + x_22) : (20.0 + x_23)) : ((11.0 + x_30) > (13.0 + x_31)? (11.0 + x_30) : (13.0 + x_31))))? ((((7.0 + x_0) > (7.0 + x_1)? (7.0 + x_0) : (7.0 + x_1)) > ((6.0 + x_3) > (13.0 + x_5)? (6.0 + x_3) : (13.0 + x_5))? ((7.0 + x_0) > (7.0 + x_1)? (7.0 + x_0) : (7.0 + x_1)) : ((6.0 + x_3) > (13.0 + x_5)? (6.0 + x_3) : (13.0 + x_5))) > (((6.0 + x_9) > (14.0 + x_10)? (6.0 + x_9) : (14.0 + x_10)) > ((7.0 + x_11) > (4.0 + x_14)? (7.0 + x_11) : (4.0 + x_14))? ((6.0 + x_9) > (14.0 + x_10)? (6.0 + x_9) : (14.0 + x_10)) : ((7.0 + x_11) > (4.0 + x_14)? (7.0 + x_11) : (4.0 + x_14)))? (((7.0 + x_0) > (7.0 + x_1)? (7.0 + x_0) : (7.0 + x_1)) > ((6.0 + x_3) > (13.0 + x_5)? (6.0 + x_3) : (13.0 + x_5))? ((7.0 + x_0) > (7.0 + x_1)? (7.0 + x_0) : (7.0 + x_1)) : ((6.0 + x_3) > (13.0 + x_5)? (6.0 + x_3) : (13.0 + x_5))) : (((6.0 + x_9) > (14.0 + x_10)? (6.0 + x_9) : (14.0 + x_10)) > ((7.0 + x_11) > (4.0 + x_14)? (7.0 + x_11) : (4.0 + x_14))? ((6.0 + x_9) > (14.0 + x_10)? (6.0 + x_9) : (14.0 + x_10)) : ((7.0 + x_11) > (4.0 + x_14)? (7.0 + x_11) : (4.0 + x_14)))) : ((((11.0 + x_17) > (14.0 + x_19)? (11.0 + x_17) : (14.0 + x_19)) > ((20.0 + x_20) > (16.0 + x_21)? (20.0 + x_20) : (16.0 + x_21))? ((11.0 + x_17) > (14.0 + x_19)? (11.0 + x_17) : (14.0 + x_19)) : ((20.0 + x_20) > (16.0 + x_21)? (20.0 + x_20) : (16.0 + x_21))) > (((11.0 + x_22) > (20.0 + x_23)? (11.0 + x_22) : (20.0 + x_23)) > ((11.0 + x_30) > (13.0 + x_31)? (11.0 + x_30) : (13.0 + x_31))? ((11.0 + x_22) > (20.0 + x_23)? (11.0 + x_22) : (20.0 + x_23)) : ((11.0 + x_30) > (13.0 + x_31)? (11.0 + x_30) : (13.0 + x_31)))? (((11.0 + x_17) > (14.0 + x_19)? (11.0 + x_17) : (14.0 + x_19)) > ((20.0 + x_20) > (16.0 + x_21)? (20.0 + x_20) : (16.0 + x_21))? ((11.0 + x_17) > (14.0 + x_19)? (11.0 + x_17) : (14.0 + x_19)) : ((20.0 + x_20) > (16.0 + x_21)? (20.0 + x_20) : (16.0 + x_21))) : (((11.0 + x_22) > (20.0 + x_23)? (11.0 + x_22) : (20.0 + x_23)) > ((11.0 + x_30) > (13.0 + x_31)? (11.0 + x_30) : (13.0 + x_31))? ((11.0 + x_22) > (20.0 + x_23)? (11.0 + x_22) : (20.0 + x_23)) : ((11.0 + x_30) > (13.0 + x_31)? (11.0 + x_30) : (13.0 + x_31)))));
x_10_ = (((((2.0 + x_0) > (4.0 + x_2)? (2.0 + x_0) : (4.0 + x_2)) > ((18.0 + x_4) > (13.0 + x_5)? (18.0 + x_4) : (13.0 + x_5))? ((2.0 + x_0) > (4.0 + x_2)? (2.0 + x_0) : (4.0 + x_2)) : ((18.0 + x_4) > (13.0 + x_5)? (18.0 + x_4) : (13.0 + x_5))) > (((11.0 + x_6) > (13.0 + x_9)? (11.0 + x_6) : (13.0 + x_9)) > ((3.0 + x_12) > (1.0 + x_16)? (3.0 + x_12) : (1.0 + x_16))? ((11.0 + x_6) > (13.0 + x_9)? (11.0 + x_6) : (13.0 + x_9)) : ((3.0 + x_12) > (1.0 + x_16)? (3.0 + x_12) : (1.0 + x_16)))? (((2.0 + x_0) > (4.0 + x_2)? (2.0 + x_0) : (4.0 + x_2)) > ((18.0 + x_4) > (13.0 + x_5)? (18.0 + x_4) : (13.0 + x_5))? ((2.0 + x_0) > (4.0 + x_2)? (2.0 + x_0) : (4.0 + x_2)) : ((18.0 + x_4) > (13.0 + x_5)? (18.0 + x_4) : (13.0 + x_5))) : (((11.0 + x_6) > (13.0 + x_9)? (11.0 + x_6) : (13.0 + x_9)) > ((3.0 + x_12) > (1.0 + x_16)? (3.0 + x_12) : (1.0 + x_16))? ((11.0 + x_6) > (13.0 + x_9)? (11.0 + x_6) : (13.0 + x_9)) : ((3.0 + x_12) > (1.0 + x_16)? (3.0 + x_12) : (1.0 + x_16)))) > ((((4.0 + x_17) > (15.0 + x_19)? (4.0 + x_17) : (15.0 + x_19)) > ((2.0 + x_23) > (18.0 + x_24)? (2.0 + x_23) : (18.0 + x_24))? ((4.0 + x_17) > (15.0 + x_19)? (4.0 + x_17) : (15.0 + x_19)) : ((2.0 + x_23) > (18.0 + x_24)? (2.0 + x_23) : (18.0 + x_24))) > (((8.0 + x_25) > (11.0 + x_27)? (8.0 + x_25) : (11.0 + x_27)) > ((8.0 + x_30) > (3.0 + x_31)? (8.0 + x_30) : (3.0 + x_31))? ((8.0 + x_25) > (11.0 + x_27)? (8.0 + x_25) : (11.0 + x_27)) : ((8.0 + x_30) > (3.0 + x_31)? (8.0 + x_30) : (3.0 + x_31)))? (((4.0 + x_17) > (15.0 + x_19)? (4.0 + x_17) : (15.0 + x_19)) > ((2.0 + x_23) > (18.0 + x_24)? (2.0 + x_23) : (18.0 + x_24))? ((4.0 + x_17) > (15.0 + x_19)? (4.0 + x_17) : (15.0 + x_19)) : ((2.0 + x_23) > (18.0 + x_24)? (2.0 + x_23) : (18.0 + x_24))) : (((8.0 + x_25) > (11.0 + x_27)? (8.0 + x_25) : (11.0 + x_27)) > ((8.0 + x_30) > (3.0 + x_31)? (8.0 + x_30) : (3.0 + x_31))? ((8.0 + x_25) > (11.0 + x_27)? (8.0 + x_25) : (11.0 + x_27)) : ((8.0 + x_30) > (3.0 + x_31)? (8.0 + x_30) : (3.0 + x_31))))? ((((2.0 + x_0) > (4.0 + x_2)? (2.0 + x_0) : (4.0 + x_2)) > ((18.0 + x_4) > (13.0 + x_5)? (18.0 + x_4) : (13.0 + x_5))? ((2.0 + x_0) > (4.0 + x_2)? (2.0 + x_0) : (4.0 + x_2)) : ((18.0 + x_4) > (13.0 + x_5)? (18.0 + x_4) : (13.0 + x_5))) > (((11.0 + x_6) > (13.0 + x_9)? (11.0 + x_6) : (13.0 + x_9)) > ((3.0 + x_12) > (1.0 + x_16)? (3.0 + x_12) : (1.0 + x_16))? ((11.0 + x_6) > (13.0 + x_9)? (11.0 + x_6) : (13.0 + x_9)) : ((3.0 + x_12) > (1.0 + x_16)? (3.0 + x_12) : (1.0 + x_16)))? (((2.0 + x_0) > (4.0 + x_2)? (2.0 + x_0) : (4.0 + x_2)) > ((18.0 + x_4) > (13.0 + x_5)? (18.0 + x_4) : (13.0 + x_5))? ((2.0 + x_0) > (4.0 + x_2)? (2.0 + x_0) : (4.0 + x_2)) : ((18.0 + x_4) > (13.0 + x_5)? (18.0 + x_4) : (13.0 + x_5))) : (((11.0 + x_6) > (13.0 + x_9)? (11.0 + x_6) : (13.0 + x_9)) > ((3.0 + x_12) > (1.0 + x_16)? (3.0 + x_12) : (1.0 + x_16))? ((11.0 + x_6) > (13.0 + x_9)? (11.0 + x_6) : (13.0 + x_9)) : ((3.0 + x_12) > (1.0 + x_16)? (3.0 + x_12) : (1.0 + x_16)))) : ((((4.0 + x_17) > (15.0 + x_19)? (4.0 + x_17) : (15.0 + x_19)) > ((2.0 + x_23) > (18.0 + x_24)? (2.0 + x_23) : (18.0 + x_24))? ((4.0 + x_17) > (15.0 + x_19)? (4.0 + x_17) : (15.0 + x_19)) : ((2.0 + x_23) > (18.0 + x_24)? (2.0 + x_23) : (18.0 + x_24))) > (((8.0 + x_25) > (11.0 + x_27)? (8.0 + x_25) : (11.0 + x_27)) > ((8.0 + x_30) > (3.0 + x_31)? (8.0 + x_30) : (3.0 + x_31))? ((8.0 + x_25) > (11.0 + x_27)? (8.0 + x_25) : (11.0 + x_27)) : ((8.0 + x_30) > (3.0 + x_31)? (8.0 + x_30) : (3.0 + x_31)))? (((4.0 + x_17) > (15.0 + x_19)? (4.0 + x_17) : (15.0 + x_19)) > ((2.0 + x_23) > (18.0 + x_24)? (2.0 + x_23) : (18.0 + x_24))? ((4.0 + x_17) > (15.0 + x_19)? (4.0 + x_17) : (15.0 + x_19)) : ((2.0 + x_23) > (18.0 + x_24)? (2.0 + x_23) : (18.0 + x_24))) : (((8.0 + x_25) > (11.0 + x_27)? (8.0 + x_25) : (11.0 + x_27)) > ((8.0 + x_30) > (3.0 + x_31)? (8.0 + x_30) : (3.0 + x_31))? ((8.0 + x_25) > (11.0 + x_27)? (8.0 + x_25) : (11.0 + x_27)) : ((8.0 + x_30) > (3.0 + x_31)? (8.0 + x_30) : (3.0 + x_31)))));
x_11_ = (((((17.0 + x_0) > (20.0 + x_1)? (17.0 + x_0) : (20.0 + x_1)) > ((13.0 + x_4) > (15.0 + x_5)? (13.0 + x_4) : (15.0 + x_5))? ((17.0 + x_0) > (20.0 + x_1)? (17.0 + x_0) : (20.0 + x_1)) : ((13.0 + x_4) > (15.0 + x_5)? (13.0 + x_4) : (15.0 + x_5))) > (((4.0 + x_9) > (17.0 + x_10)? (4.0 + x_9) : (17.0 + x_10)) > ((18.0 + x_11) > (14.0 + x_12)? (18.0 + x_11) : (14.0 + x_12))? ((4.0 + x_9) > (17.0 + x_10)? (4.0 + x_9) : (17.0 + x_10)) : ((18.0 + x_11) > (14.0 + x_12)? (18.0 + x_11) : (14.0 + x_12)))? (((17.0 + x_0) > (20.0 + x_1)? (17.0 + x_0) : (20.0 + x_1)) > ((13.0 + x_4) > (15.0 + x_5)? (13.0 + x_4) : (15.0 + x_5))? ((17.0 + x_0) > (20.0 + x_1)? (17.0 + x_0) : (20.0 + x_1)) : ((13.0 + x_4) > (15.0 + x_5)? (13.0 + x_4) : (15.0 + x_5))) : (((4.0 + x_9) > (17.0 + x_10)? (4.0 + x_9) : (17.0 + x_10)) > ((18.0 + x_11) > (14.0 + x_12)? (18.0 + x_11) : (14.0 + x_12))? ((4.0 + x_9) > (17.0 + x_10)? (4.0 + x_9) : (17.0 + x_10)) : ((18.0 + x_11) > (14.0 + x_12)? (18.0 + x_11) : (14.0 + x_12)))) > ((((6.0 + x_15) > (10.0 + x_18)? (6.0 + x_15) : (10.0 + x_18)) > ((18.0 + x_20) > (12.0 + x_21)? (18.0 + x_20) : (12.0 + x_21))? ((6.0 + x_15) > (10.0 + x_18)? (6.0 + x_15) : (10.0 + x_18)) : ((18.0 + x_20) > (12.0 + x_21)? (18.0 + x_20) : (12.0 + x_21))) > (((17.0 + x_24) > (2.0 + x_25)? (17.0 + x_24) : (2.0 + x_25)) > ((16.0 + x_28) > (1.0 + x_30)? (16.0 + x_28) : (1.0 + x_30))? ((17.0 + x_24) > (2.0 + x_25)? (17.0 + x_24) : (2.0 + x_25)) : ((16.0 + x_28) > (1.0 + x_30)? (16.0 + x_28) : (1.0 + x_30)))? (((6.0 + x_15) > (10.0 + x_18)? (6.0 + x_15) : (10.0 + x_18)) > ((18.0 + x_20) > (12.0 + x_21)? (18.0 + x_20) : (12.0 + x_21))? ((6.0 + x_15) > (10.0 + x_18)? (6.0 + x_15) : (10.0 + x_18)) : ((18.0 + x_20) > (12.0 + x_21)? (18.0 + x_20) : (12.0 + x_21))) : (((17.0 + x_24) > (2.0 + x_25)? (17.0 + x_24) : (2.0 + x_25)) > ((16.0 + x_28) > (1.0 + x_30)? (16.0 + x_28) : (1.0 + x_30))? ((17.0 + x_24) > (2.0 + x_25)? (17.0 + x_24) : (2.0 + x_25)) : ((16.0 + x_28) > (1.0 + x_30)? (16.0 + x_28) : (1.0 + x_30))))? ((((17.0 + x_0) > (20.0 + x_1)? (17.0 + x_0) : (20.0 + x_1)) > ((13.0 + x_4) > (15.0 + x_5)? (13.0 + x_4) : (15.0 + x_5))? ((17.0 + x_0) > (20.0 + x_1)? (17.0 + x_0) : (20.0 + x_1)) : ((13.0 + x_4) > (15.0 + x_5)? (13.0 + x_4) : (15.0 + x_5))) > (((4.0 + x_9) > (17.0 + x_10)? (4.0 + x_9) : (17.0 + x_10)) > ((18.0 + x_11) > (14.0 + x_12)? (18.0 + x_11) : (14.0 + x_12))? ((4.0 + x_9) > (17.0 + x_10)? (4.0 + x_9) : (17.0 + x_10)) : ((18.0 + x_11) > (14.0 + x_12)? (18.0 + x_11) : (14.0 + x_12)))? (((17.0 + x_0) > (20.0 + x_1)? (17.0 + x_0) : (20.0 + x_1)) > ((13.0 + x_4) > (15.0 + x_5)? (13.0 + x_4) : (15.0 + x_5))? ((17.0 + x_0) > (20.0 + x_1)? (17.0 + x_0) : (20.0 + x_1)) : ((13.0 + x_4) > (15.0 + x_5)? (13.0 + x_4) : (15.0 + x_5))) : (((4.0 + x_9) > (17.0 + x_10)? (4.0 + x_9) : (17.0 + x_10)) > ((18.0 + x_11) > (14.0 + x_12)? (18.0 + x_11) : (14.0 + x_12))? ((4.0 + x_9) > (17.0 + x_10)? (4.0 + x_9) : (17.0 + x_10)) : ((18.0 + x_11) > (14.0 + x_12)? (18.0 + x_11) : (14.0 + x_12)))) : ((((6.0 + x_15) > (10.0 + x_18)? (6.0 + x_15) : (10.0 + x_18)) > ((18.0 + x_20) > (12.0 + x_21)? (18.0 + x_20) : (12.0 + x_21))? ((6.0 + x_15) > (10.0 + x_18)? (6.0 + x_15) : (10.0 + x_18)) : ((18.0 + x_20) > (12.0 + x_21)? (18.0 + x_20) : (12.0 + x_21))) > (((17.0 + x_24) > (2.0 + x_25)? (17.0 + x_24) : (2.0 + x_25)) > ((16.0 + x_28) > (1.0 + x_30)? (16.0 + x_28) : (1.0 + x_30))? ((17.0 + x_24) > (2.0 + x_25)? (17.0 + x_24) : (2.0 + x_25)) : ((16.0 + x_28) > (1.0 + x_30)? (16.0 + x_28) : (1.0 + x_30)))? (((6.0 + x_15) > (10.0 + x_18)? (6.0 + x_15) : (10.0 + x_18)) > ((18.0 + x_20) > (12.0 + x_21)? (18.0 + x_20) : (12.0 + x_21))? ((6.0 + x_15) > (10.0 + x_18)? (6.0 + x_15) : (10.0 + x_18)) : ((18.0 + x_20) > (12.0 + x_21)? (18.0 + x_20) : (12.0 + x_21))) : (((17.0 + x_24) > (2.0 + x_25)? (17.0 + x_24) : (2.0 + x_25)) > ((16.0 + x_28) > (1.0 + x_30)? (16.0 + x_28) : (1.0 + x_30))? ((17.0 + x_24) > (2.0 + x_25)? (17.0 + x_24) : (2.0 + x_25)) : ((16.0 + x_28) > (1.0 + x_30)? (16.0 + x_28) : (1.0 + x_30)))));
x_12_ = (((((4.0 + x_1) > (6.0 + x_2)? (4.0 + x_1) : (6.0 + x_2)) > ((6.0 + x_4) > (7.0 + x_6)? (6.0 + x_4) : (7.0 + x_6))? ((4.0 + x_1) > (6.0 + x_2)? (4.0 + x_1) : (6.0 + x_2)) : ((6.0 + x_4) > (7.0 + x_6)? (6.0 + x_4) : (7.0 + x_6))) > (((2.0 + x_9) > (10.0 + x_12)? (2.0 + x_9) : (10.0 + x_12)) > ((11.0 + x_15) > (10.0 + x_16)? (11.0 + x_15) : (10.0 + x_16))? ((2.0 + x_9) > (10.0 + x_12)? (2.0 + x_9) : (10.0 + x_12)) : ((11.0 + x_15) > (10.0 + x_16)? (11.0 + x_15) : (10.0 + x_16)))? (((4.0 + x_1) > (6.0 + x_2)? (4.0 + x_1) : (6.0 + x_2)) > ((6.0 + x_4) > (7.0 + x_6)? (6.0 + x_4) : (7.0 + x_6))? ((4.0 + x_1) > (6.0 + x_2)? (4.0 + x_1) : (6.0 + x_2)) : ((6.0 + x_4) > (7.0 + x_6)? (6.0 + x_4) : (7.0 + x_6))) : (((2.0 + x_9) > (10.0 + x_12)? (2.0 + x_9) : (10.0 + x_12)) > ((11.0 + x_15) > (10.0 + x_16)? (11.0 + x_15) : (10.0 + x_16))? ((2.0 + x_9) > (10.0 + x_12)? (2.0 + x_9) : (10.0 + x_12)) : ((11.0 + x_15) > (10.0 + x_16)? (11.0 + x_15) : (10.0 + x_16)))) > ((((17.0 + x_17) > (11.0 + x_18)? (17.0 + x_17) : (11.0 + x_18)) > ((6.0 + x_21) > (5.0 + x_24)? (6.0 + x_21) : (5.0 + x_24))? ((17.0 + x_17) > (11.0 + x_18)? (17.0 + x_17) : (11.0 + x_18)) : ((6.0 + x_21) > (5.0 + x_24)? (6.0 + x_21) : (5.0 + x_24))) > (((18.0 + x_28) > (16.0 + x_29)? (18.0 + x_28) : (16.0 + x_29)) > ((11.0 + x_30) > (7.0 + x_31)? (11.0 + x_30) : (7.0 + x_31))? ((18.0 + x_28) > (16.0 + x_29)? (18.0 + x_28) : (16.0 + x_29)) : ((11.0 + x_30) > (7.0 + x_31)? (11.0 + x_30) : (7.0 + x_31)))? (((17.0 + x_17) > (11.0 + x_18)? (17.0 + x_17) : (11.0 + x_18)) > ((6.0 + x_21) > (5.0 + x_24)? (6.0 + x_21) : (5.0 + x_24))? ((17.0 + x_17) > (11.0 + x_18)? (17.0 + x_17) : (11.0 + x_18)) : ((6.0 + x_21) > (5.0 + x_24)? (6.0 + x_21) : (5.0 + x_24))) : (((18.0 + x_28) > (16.0 + x_29)? (18.0 + x_28) : (16.0 + x_29)) > ((11.0 + x_30) > (7.0 + x_31)? (11.0 + x_30) : (7.0 + x_31))? ((18.0 + x_28) > (16.0 + x_29)? (18.0 + x_28) : (16.0 + x_29)) : ((11.0 + x_30) > (7.0 + x_31)? (11.0 + x_30) : (7.0 + x_31))))? ((((4.0 + x_1) > (6.0 + x_2)? (4.0 + x_1) : (6.0 + x_2)) > ((6.0 + x_4) > (7.0 + x_6)? (6.0 + x_4) : (7.0 + x_6))? ((4.0 + x_1) > (6.0 + x_2)? (4.0 + x_1) : (6.0 + x_2)) : ((6.0 + x_4) > (7.0 + x_6)? (6.0 + x_4) : (7.0 + x_6))) > (((2.0 + x_9) > (10.0 + x_12)? (2.0 + x_9) : (10.0 + x_12)) > ((11.0 + x_15) > (10.0 + x_16)? (11.0 + x_15) : (10.0 + x_16))? ((2.0 + x_9) > (10.0 + x_12)? (2.0 + x_9) : (10.0 + x_12)) : ((11.0 + x_15) > (10.0 + x_16)? (11.0 + x_15) : (10.0 + x_16)))? (((4.0 + x_1) > (6.0 + x_2)? (4.0 + x_1) : (6.0 + x_2)) > ((6.0 + x_4) > (7.0 + x_6)? (6.0 + x_4) : (7.0 + x_6))? ((4.0 + x_1) > (6.0 + x_2)? (4.0 + x_1) : (6.0 + x_2)) : ((6.0 + x_4) > (7.0 + x_6)? (6.0 + x_4) : (7.0 + x_6))) : (((2.0 + x_9) > (10.0 + x_12)? (2.0 + x_9) : (10.0 + x_12)) > ((11.0 + x_15) > (10.0 + x_16)? (11.0 + x_15) : (10.0 + x_16))? ((2.0 + x_9) > (10.0 + x_12)? (2.0 + x_9) : (10.0 + x_12)) : ((11.0 + x_15) > (10.0 + x_16)? (11.0 + x_15) : (10.0 + x_16)))) : ((((17.0 + x_17) > (11.0 + x_18)? (17.0 + x_17) : (11.0 + x_18)) > ((6.0 + x_21) > (5.0 + x_24)? (6.0 + x_21) : (5.0 + x_24))? ((17.0 + x_17) > (11.0 + x_18)? (17.0 + x_17) : (11.0 + x_18)) : ((6.0 + x_21) > (5.0 + x_24)? (6.0 + x_21) : (5.0 + x_24))) > (((18.0 + x_28) > (16.0 + x_29)? (18.0 + x_28) : (16.0 + x_29)) > ((11.0 + x_30) > (7.0 + x_31)? (11.0 + x_30) : (7.0 + x_31))? ((18.0 + x_28) > (16.0 + x_29)? (18.0 + x_28) : (16.0 + x_29)) : ((11.0 + x_30) > (7.0 + x_31)? (11.0 + x_30) : (7.0 + x_31)))? (((17.0 + x_17) > (11.0 + x_18)? (17.0 + x_17) : (11.0 + x_18)) > ((6.0 + x_21) > (5.0 + x_24)? (6.0 + x_21) : (5.0 + x_24))? ((17.0 + x_17) > (11.0 + x_18)? (17.0 + x_17) : (11.0 + x_18)) : ((6.0 + x_21) > (5.0 + x_24)? (6.0 + x_21) : (5.0 + x_24))) : (((18.0 + x_28) > (16.0 + x_29)? (18.0 + x_28) : (16.0 + x_29)) > ((11.0 + x_30) > (7.0 + x_31)? (11.0 + x_30) : (7.0 + x_31))? ((18.0 + x_28) > (16.0 + x_29)? (18.0 + x_28) : (16.0 + x_29)) : ((11.0 + x_30) > (7.0 + x_31)? (11.0 + x_30) : (7.0 + x_31)))));
x_13_ = (((((6.0 + x_0) > (1.0 + x_1)? (6.0 + x_0) : (1.0 + x_1)) > ((1.0 + x_3) > (8.0 + x_8)? (1.0 + x_3) : (8.0 + x_8))? ((6.0 + x_0) > (1.0 + x_1)? (6.0 + x_0) : (1.0 + x_1)) : ((1.0 + x_3) > (8.0 + x_8)? (1.0 + x_3) : (8.0 + x_8))) > (((16.0 + x_10) > (7.0 + x_13)? (16.0 + x_10) : (7.0 + x_13)) > ((10.0 + x_17) > (8.0 + x_19)? (10.0 + x_17) : (8.0 + x_19))? ((16.0 + x_10) > (7.0 + x_13)? (16.0 + x_10) : (7.0 + x_13)) : ((10.0 + x_17) > (8.0 + x_19)? (10.0 + x_17) : (8.0 + x_19)))? (((6.0 + x_0) > (1.0 + x_1)? (6.0 + x_0) : (1.0 + x_1)) > ((1.0 + x_3) > (8.0 + x_8)? (1.0 + x_3) : (8.0 + x_8))? ((6.0 + x_0) > (1.0 + x_1)? (6.0 + x_0) : (1.0 + x_1)) : ((1.0 + x_3) > (8.0 + x_8)? (1.0 + x_3) : (8.0 + x_8))) : (((16.0 + x_10) > (7.0 + x_13)? (16.0 + x_10) : (7.0 + x_13)) > ((10.0 + x_17) > (8.0 + x_19)? (10.0 + x_17) : (8.0 + x_19))? ((16.0 + x_10) > (7.0 + x_13)? (16.0 + x_10) : (7.0 + x_13)) : ((10.0 + x_17) > (8.0 + x_19)? (10.0 + x_17) : (8.0 + x_19)))) > ((((14.0 + x_21) > (8.0 + x_22)? (14.0 + x_21) : (8.0 + x_22)) > ((8.0 + x_23) > (9.0 + x_25)? (8.0 + x_23) : (9.0 + x_25))? ((14.0 + x_21) > (8.0 + x_22)? (14.0 + x_21) : (8.0 + x_22)) : ((8.0 + x_23) > (9.0 + x_25)? (8.0 + x_23) : (9.0 + x_25))) > (((3.0 + x_26) > (15.0 + x_27)? (3.0 + x_26) : (15.0 + x_27)) > ((1.0 + x_30) > (11.0 + x_31)? (1.0 + x_30) : (11.0 + x_31))? ((3.0 + x_26) > (15.0 + x_27)? (3.0 + x_26) : (15.0 + x_27)) : ((1.0 + x_30) > (11.0 + x_31)? (1.0 + x_30) : (11.0 + x_31)))? (((14.0 + x_21) > (8.0 + x_22)? (14.0 + x_21) : (8.0 + x_22)) > ((8.0 + x_23) > (9.0 + x_25)? (8.0 + x_23) : (9.0 + x_25))? ((14.0 + x_21) > (8.0 + x_22)? (14.0 + x_21) : (8.0 + x_22)) : ((8.0 + x_23) > (9.0 + x_25)? (8.0 + x_23) : (9.0 + x_25))) : (((3.0 + x_26) > (15.0 + x_27)? (3.0 + x_26) : (15.0 + x_27)) > ((1.0 + x_30) > (11.0 + x_31)? (1.0 + x_30) : (11.0 + x_31))? ((3.0 + x_26) > (15.0 + x_27)? (3.0 + x_26) : (15.0 + x_27)) : ((1.0 + x_30) > (11.0 + x_31)? (1.0 + x_30) : (11.0 + x_31))))? ((((6.0 + x_0) > (1.0 + x_1)? (6.0 + x_0) : (1.0 + x_1)) > ((1.0 + x_3) > (8.0 + x_8)? (1.0 + x_3) : (8.0 + x_8))? ((6.0 + x_0) > (1.0 + x_1)? (6.0 + x_0) : (1.0 + x_1)) : ((1.0 + x_3) > (8.0 + x_8)? (1.0 + x_3) : (8.0 + x_8))) > (((16.0 + x_10) > (7.0 + x_13)? (16.0 + x_10) : (7.0 + x_13)) > ((10.0 + x_17) > (8.0 + x_19)? (10.0 + x_17) : (8.0 + x_19))? ((16.0 + x_10) > (7.0 + x_13)? (16.0 + x_10) : (7.0 + x_13)) : ((10.0 + x_17) > (8.0 + x_19)? (10.0 + x_17) : (8.0 + x_19)))? (((6.0 + x_0) > (1.0 + x_1)? (6.0 + x_0) : (1.0 + x_1)) > ((1.0 + x_3) > (8.0 + x_8)? (1.0 + x_3) : (8.0 + x_8))? ((6.0 + x_0) > (1.0 + x_1)? (6.0 + x_0) : (1.0 + x_1)) : ((1.0 + x_3) > (8.0 + x_8)? (1.0 + x_3) : (8.0 + x_8))) : (((16.0 + x_10) > (7.0 + x_13)? (16.0 + x_10) : (7.0 + x_13)) > ((10.0 + x_17) > (8.0 + x_19)? (10.0 + x_17) : (8.0 + x_19))? ((16.0 + x_10) > (7.0 + x_13)? (16.0 + x_10) : (7.0 + x_13)) : ((10.0 + x_17) > (8.0 + x_19)? (10.0 + x_17) : (8.0 + x_19)))) : ((((14.0 + x_21) > (8.0 + x_22)? (14.0 + x_21) : (8.0 + x_22)) > ((8.0 + x_23) > (9.0 + x_25)? (8.0 + x_23) : (9.0 + x_25))? ((14.0 + x_21) > (8.0 + x_22)? (14.0 + x_21) : (8.0 + x_22)) : ((8.0 + x_23) > (9.0 + x_25)? (8.0 + x_23) : (9.0 + x_25))) > (((3.0 + x_26) > (15.0 + x_27)? (3.0 + x_26) : (15.0 + x_27)) > ((1.0 + x_30) > (11.0 + x_31)? (1.0 + x_30) : (11.0 + x_31))? ((3.0 + x_26) > (15.0 + x_27)? (3.0 + x_26) : (15.0 + x_27)) : ((1.0 + x_30) > (11.0 + x_31)? (1.0 + x_30) : (11.0 + x_31)))? (((14.0 + x_21) > (8.0 + x_22)? (14.0 + x_21) : (8.0 + x_22)) > ((8.0 + x_23) > (9.0 + x_25)? (8.0 + x_23) : (9.0 + x_25))? ((14.0 + x_21) > (8.0 + x_22)? (14.0 + x_21) : (8.0 + x_22)) : ((8.0 + x_23) > (9.0 + x_25)? (8.0 + x_23) : (9.0 + x_25))) : (((3.0 + x_26) > (15.0 + x_27)? (3.0 + x_26) : (15.0 + x_27)) > ((1.0 + x_30) > (11.0 + x_31)? (1.0 + x_30) : (11.0 + x_31))? ((3.0 + x_26) > (15.0 + x_27)? (3.0 + x_26) : (15.0 + x_27)) : ((1.0 + x_30) > (11.0 + x_31)? (1.0 + x_30) : (11.0 + x_31)))));
x_14_ = (((((5.0 + x_2) > (8.0 + x_3)? (5.0 + x_2) : (8.0 + x_3)) > ((19.0 + x_4) > (8.0 + x_7)? (19.0 + x_4) : (8.0 + x_7))? ((5.0 + x_2) > (8.0 + x_3)? (5.0 + x_2) : (8.0 + x_3)) : ((19.0 + x_4) > (8.0 + x_7)? (19.0 + x_4) : (8.0 + x_7))) > (((2.0 + x_8) > (19.0 + x_10)? (2.0 + x_8) : (19.0 + x_10)) > ((16.0 + x_12) > (2.0 + x_13)? (16.0 + x_12) : (2.0 + x_13))? ((2.0 + x_8) > (19.0 + x_10)? (2.0 + x_8) : (19.0 + x_10)) : ((16.0 + x_12) > (2.0 + x_13)? (16.0 + x_12) : (2.0 + x_13)))? (((5.0 + x_2) > (8.0 + x_3)? (5.0 + x_2) : (8.0 + x_3)) > ((19.0 + x_4) > (8.0 + x_7)? (19.0 + x_4) : (8.0 + x_7))? ((5.0 + x_2) > (8.0 + x_3)? (5.0 + x_2) : (8.0 + x_3)) : ((19.0 + x_4) > (8.0 + x_7)? (19.0 + x_4) : (8.0 + x_7))) : (((2.0 + x_8) > (19.0 + x_10)? (2.0 + x_8) : (19.0 + x_10)) > ((16.0 + x_12) > (2.0 + x_13)? (16.0 + x_12) : (2.0 + x_13))? ((2.0 + x_8) > (19.0 + x_10)? (2.0 + x_8) : (19.0 + x_10)) : ((16.0 + x_12) > (2.0 + x_13)? (16.0 + x_12) : (2.0 + x_13)))) > ((((14.0 + x_15) > (4.0 + x_16)? (14.0 + x_15) : (4.0 + x_16)) > ((1.0 + x_17) > (19.0 + x_19)? (1.0 + x_17) : (19.0 + x_19))? ((14.0 + x_15) > (4.0 + x_16)? (14.0 + x_15) : (4.0 + x_16)) : ((1.0 + x_17) > (19.0 + x_19)? (1.0 + x_17) : (19.0 + x_19))) > (((8.0 + x_20) > (4.0 + x_22)? (8.0 + x_20) : (4.0 + x_22)) > ((15.0 + x_27) > (11.0 + x_29)? (15.0 + x_27) : (11.0 + x_29))? ((8.0 + x_20) > (4.0 + x_22)? (8.0 + x_20) : (4.0 + x_22)) : ((15.0 + x_27) > (11.0 + x_29)? (15.0 + x_27) : (11.0 + x_29)))? (((14.0 + x_15) > (4.0 + x_16)? (14.0 + x_15) : (4.0 + x_16)) > ((1.0 + x_17) > (19.0 + x_19)? (1.0 + x_17) : (19.0 + x_19))? ((14.0 + x_15) > (4.0 + x_16)? (14.0 + x_15) : (4.0 + x_16)) : ((1.0 + x_17) > (19.0 + x_19)? (1.0 + x_17) : (19.0 + x_19))) : (((8.0 + x_20) > (4.0 + x_22)? (8.0 + x_20) : (4.0 + x_22)) > ((15.0 + x_27) > (11.0 + x_29)? (15.0 + x_27) : (11.0 + x_29))? ((8.0 + x_20) > (4.0 + x_22)? (8.0 + x_20) : (4.0 + x_22)) : ((15.0 + x_27) > (11.0 + x_29)? (15.0 + x_27) : (11.0 + x_29))))? ((((5.0 + x_2) > (8.0 + x_3)? (5.0 + x_2) : (8.0 + x_3)) > ((19.0 + x_4) > (8.0 + x_7)? (19.0 + x_4) : (8.0 + x_7))? ((5.0 + x_2) > (8.0 + x_3)? (5.0 + x_2) : (8.0 + x_3)) : ((19.0 + x_4) > (8.0 + x_7)? (19.0 + x_4) : (8.0 + x_7))) > (((2.0 + x_8) > (19.0 + x_10)? (2.0 + x_8) : (19.0 + x_10)) > ((16.0 + x_12) > (2.0 + x_13)? (16.0 + x_12) : (2.0 + x_13))? ((2.0 + x_8) > (19.0 + x_10)? (2.0 + x_8) : (19.0 + x_10)) : ((16.0 + x_12) > (2.0 + x_13)? (16.0 + x_12) : (2.0 + x_13)))? (((5.0 + x_2) > (8.0 + x_3)? (5.0 + x_2) : (8.0 + x_3)) > ((19.0 + x_4) > (8.0 + x_7)? (19.0 + x_4) : (8.0 + x_7))? ((5.0 + x_2) > (8.0 + x_3)? (5.0 + x_2) : (8.0 + x_3)) : ((19.0 + x_4) > (8.0 + x_7)? (19.0 + x_4) : (8.0 + x_7))) : (((2.0 + x_8) > (19.0 + x_10)? (2.0 + x_8) : (19.0 + x_10)) > ((16.0 + x_12) > (2.0 + x_13)? (16.0 + x_12) : (2.0 + x_13))? ((2.0 + x_8) > (19.0 + x_10)? (2.0 + x_8) : (19.0 + x_10)) : ((16.0 + x_12) > (2.0 + x_13)? (16.0 + x_12) : (2.0 + x_13)))) : ((((14.0 + x_15) > (4.0 + x_16)? (14.0 + x_15) : (4.0 + x_16)) > ((1.0 + x_17) > (19.0 + x_19)? (1.0 + x_17) : (19.0 + x_19))? ((14.0 + x_15) > (4.0 + x_16)? (14.0 + x_15) : (4.0 + x_16)) : ((1.0 + x_17) > (19.0 + x_19)? (1.0 + x_17) : (19.0 + x_19))) > (((8.0 + x_20) > (4.0 + x_22)? (8.0 + x_20) : (4.0 + x_22)) > ((15.0 + x_27) > (11.0 + x_29)? (15.0 + x_27) : (11.0 + x_29))? ((8.0 + x_20) > (4.0 + x_22)? (8.0 + x_20) : (4.0 + x_22)) : ((15.0 + x_27) > (11.0 + x_29)? (15.0 + x_27) : (11.0 + x_29)))? (((14.0 + x_15) > (4.0 + x_16)? (14.0 + x_15) : (4.0 + x_16)) > ((1.0 + x_17) > (19.0 + x_19)? (1.0 + x_17) : (19.0 + x_19))? ((14.0 + x_15) > (4.0 + x_16)? (14.0 + x_15) : (4.0 + x_16)) : ((1.0 + x_17) > (19.0 + x_19)? (1.0 + x_17) : (19.0 + x_19))) : (((8.0 + x_20) > (4.0 + x_22)? (8.0 + x_20) : (4.0 + x_22)) > ((15.0 + x_27) > (11.0 + x_29)? (15.0 + x_27) : (11.0 + x_29))? ((8.0 + x_20) > (4.0 + x_22)? (8.0 + x_20) : (4.0 + x_22)) : ((15.0 + x_27) > (11.0 + x_29)? (15.0 + x_27) : (11.0 + x_29)))));
x_15_ = (((((13.0 + x_0) > (8.0 + x_1)? (13.0 + x_0) : (8.0 + x_1)) > ((16.0 + x_3) > (2.0 + x_4)? (16.0 + x_3) : (2.0 + x_4))? ((13.0 + x_0) > (8.0 + x_1)? (13.0 + x_0) : (8.0 + x_1)) : ((16.0 + x_3) > (2.0 + x_4)? (16.0 + x_3) : (2.0 + x_4))) > (((8.0 + x_5) > (18.0 + x_6)? (8.0 + x_5) : (18.0 + x_6)) > ((16.0 + x_7) > (9.0 + x_8)? (16.0 + x_7) : (9.0 + x_8))? ((8.0 + x_5) > (18.0 + x_6)? (8.0 + x_5) : (18.0 + x_6)) : ((16.0 + x_7) > (9.0 + x_8)? (16.0 + x_7) : (9.0 + x_8)))? (((13.0 + x_0) > (8.0 + x_1)? (13.0 + x_0) : (8.0 + x_1)) > ((16.0 + x_3) > (2.0 + x_4)? (16.0 + x_3) : (2.0 + x_4))? ((13.0 + x_0) > (8.0 + x_1)? (13.0 + x_0) : (8.0 + x_1)) : ((16.0 + x_3) > (2.0 + x_4)? (16.0 + x_3) : (2.0 + x_4))) : (((8.0 + x_5) > (18.0 + x_6)? (8.0 + x_5) : (18.0 + x_6)) > ((16.0 + x_7) > (9.0 + x_8)? (16.0 + x_7) : (9.0 + x_8))? ((8.0 + x_5) > (18.0 + x_6)? (8.0 + x_5) : (18.0 + x_6)) : ((16.0 + x_7) > (9.0 + x_8)? (16.0 + x_7) : (9.0 + x_8)))) > ((((20.0 + x_11) > (6.0 + x_12)? (20.0 + x_11) : (6.0 + x_12)) > ((19.0 + x_17) > (17.0 + x_18)? (19.0 + x_17) : (17.0 + x_18))? ((20.0 + x_11) > (6.0 + x_12)? (20.0 + x_11) : (6.0 + x_12)) : ((19.0 + x_17) > (17.0 + x_18)? (19.0 + x_17) : (17.0 + x_18))) > (((16.0 + x_20) > (16.0 + x_22)? (16.0 + x_20) : (16.0 + x_22)) > ((7.0 + x_23) > (9.0 + x_26)? (7.0 + x_23) : (9.0 + x_26))? ((16.0 + x_20) > (16.0 + x_22)? (16.0 + x_20) : (16.0 + x_22)) : ((7.0 + x_23) > (9.0 + x_26)? (7.0 + x_23) : (9.0 + x_26)))? (((20.0 + x_11) > (6.0 + x_12)? (20.0 + x_11) : (6.0 + x_12)) > ((19.0 + x_17) > (17.0 + x_18)? (19.0 + x_17) : (17.0 + x_18))? ((20.0 + x_11) > (6.0 + x_12)? (20.0 + x_11) : (6.0 + x_12)) : ((19.0 + x_17) > (17.0 + x_18)? (19.0 + x_17) : (17.0 + x_18))) : (((16.0 + x_20) > (16.0 + x_22)? (16.0 + x_20) : (16.0 + x_22)) > ((7.0 + x_23) > (9.0 + x_26)? (7.0 + x_23) : (9.0 + x_26))? ((16.0 + x_20) > (16.0 + x_22)? (16.0 + x_20) : (16.0 + x_22)) : ((7.0 + x_23) > (9.0 + x_26)? (7.0 + x_23) : (9.0 + x_26))))? ((((13.0 + x_0) > (8.0 + x_1)? (13.0 + x_0) : (8.0 + x_1)) > ((16.0 + x_3) > (2.0 + x_4)? (16.0 + x_3) : (2.0 + x_4))? ((13.0 + x_0) > (8.0 + x_1)? (13.0 + x_0) : (8.0 + x_1)) : ((16.0 + x_3) > (2.0 + x_4)? (16.0 + x_3) : (2.0 + x_4))) > (((8.0 + x_5) > (18.0 + x_6)? (8.0 + x_5) : (18.0 + x_6)) > ((16.0 + x_7) > (9.0 + x_8)? (16.0 + x_7) : (9.0 + x_8))? ((8.0 + x_5) > (18.0 + x_6)? (8.0 + x_5) : (18.0 + x_6)) : ((16.0 + x_7) > (9.0 + x_8)? (16.0 + x_7) : (9.0 + x_8)))? (((13.0 + x_0) > (8.0 + x_1)? (13.0 + x_0) : (8.0 + x_1)) > ((16.0 + x_3) > (2.0 + x_4)? (16.0 + x_3) : (2.0 + x_4))? ((13.0 + x_0) > (8.0 + x_1)? (13.0 + x_0) : (8.0 + x_1)) : ((16.0 + x_3) > (2.0 + x_4)? (16.0 + x_3) : (2.0 + x_4))) : (((8.0 + x_5) > (18.0 + x_6)? (8.0 + x_5) : (18.0 + x_6)) > ((16.0 + x_7) > (9.0 + x_8)? (16.0 + x_7) : (9.0 + x_8))? ((8.0 + x_5) > (18.0 + x_6)? (8.0 + x_5) : (18.0 + x_6)) : ((16.0 + x_7) > (9.0 + x_8)? (16.0 + x_7) : (9.0 + x_8)))) : ((((20.0 + x_11) > (6.0 + x_12)? (20.0 + x_11) : (6.0 + x_12)) > ((19.0 + x_17) > (17.0 + x_18)? (19.0 + x_17) : (17.0 + x_18))? ((20.0 + x_11) > (6.0 + x_12)? (20.0 + x_11) : (6.0 + x_12)) : ((19.0 + x_17) > (17.0 + x_18)? (19.0 + x_17) : (17.0 + x_18))) > (((16.0 + x_20) > (16.0 + x_22)? (16.0 + x_20) : (16.0 + x_22)) > ((7.0 + x_23) > (9.0 + x_26)? (7.0 + x_23) : (9.0 + x_26))? ((16.0 + x_20) > (16.0 + x_22)? (16.0 + x_20) : (16.0 + x_22)) : ((7.0 + x_23) > (9.0 + x_26)? (7.0 + x_23) : (9.0 + x_26)))? (((20.0 + x_11) > (6.0 + x_12)? (20.0 + x_11) : (6.0 + x_12)) > ((19.0 + x_17) > (17.0 + x_18)? (19.0 + x_17) : (17.0 + x_18))? ((20.0 + x_11) > (6.0 + x_12)? (20.0 + x_11) : (6.0 + x_12)) : ((19.0 + x_17) > (17.0 + x_18)? (19.0 + x_17) : (17.0 + x_18))) : (((16.0 + x_20) > (16.0 + x_22)? (16.0 + x_20) : (16.0 + x_22)) > ((7.0 + x_23) > (9.0 + x_26)? (7.0 + x_23) : (9.0 + x_26))? ((16.0 + x_20) > (16.0 + x_22)? (16.0 + x_20) : (16.0 + x_22)) : ((7.0 + x_23) > (9.0 + x_26)? (7.0 + x_23) : (9.0 + x_26)))));
x_16_ = (((((13.0 + x_0) > (6.0 + x_1)? (13.0 + x_0) : (6.0 + x_1)) > ((3.0 + x_2) > (11.0 + x_6)? (3.0 + x_2) : (11.0 + x_6))? ((13.0 + x_0) > (6.0 + x_1)? (13.0 + x_0) : (6.0 + x_1)) : ((3.0 + x_2) > (11.0 + x_6)? (3.0 + x_2) : (11.0 + x_6))) > (((20.0 + x_7) > (1.0 + x_12)? (20.0 + x_7) : (1.0 + x_12)) > ((15.0 + x_14) > (6.0 + x_15)? (15.0 + x_14) : (6.0 + x_15))? ((20.0 + x_7) > (1.0 + x_12)? (20.0 + x_7) : (1.0 + x_12)) : ((15.0 + x_14) > (6.0 + x_15)? (15.0 + x_14) : (6.0 + x_15)))? (((13.0 + x_0) > (6.0 + x_1)? (13.0 + x_0) : (6.0 + x_1)) > ((3.0 + x_2) > (11.0 + x_6)? (3.0 + x_2) : (11.0 + x_6))? ((13.0 + x_0) > (6.0 + x_1)? (13.0 + x_0) : (6.0 + x_1)) : ((3.0 + x_2) > (11.0 + x_6)? (3.0 + x_2) : (11.0 + x_6))) : (((20.0 + x_7) > (1.0 + x_12)? (20.0 + x_7) : (1.0 + x_12)) > ((15.0 + x_14) > (6.0 + x_15)? (15.0 + x_14) : (6.0 + x_15))? ((20.0 + x_7) > (1.0 + x_12)? (20.0 + x_7) : (1.0 + x_12)) : ((15.0 + x_14) > (6.0 + x_15)? (15.0 + x_14) : (6.0 + x_15)))) > ((((11.0 + x_19) > (18.0 + x_20)? (11.0 + x_19) : (18.0 + x_20)) > ((11.0 + x_21) > (5.0 + x_23)? (11.0 + x_21) : (5.0 + x_23))? ((11.0 + x_19) > (18.0 + x_20)? (11.0 + x_19) : (18.0 + x_20)) : ((11.0 + x_21) > (5.0 + x_23)? (11.0 + x_21) : (5.0 + x_23))) > (((2.0 + x_25) > (3.0 + x_27)? (2.0 + x_25) : (3.0 + x_27)) > ((6.0 + x_30) > (18.0 + x_31)? (6.0 + x_30) : (18.0 + x_31))? ((2.0 + x_25) > (3.0 + x_27)? (2.0 + x_25) : (3.0 + x_27)) : ((6.0 + x_30) > (18.0 + x_31)? (6.0 + x_30) : (18.0 + x_31)))? (((11.0 + x_19) > (18.0 + x_20)? (11.0 + x_19) : (18.0 + x_20)) > ((11.0 + x_21) > (5.0 + x_23)? (11.0 + x_21) : (5.0 + x_23))? ((11.0 + x_19) > (18.0 + x_20)? (11.0 + x_19) : (18.0 + x_20)) : ((11.0 + x_21) > (5.0 + x_23)? (11.0 + x_21) : (5.0 + x_23))) : (((2.0 + x_25) > (3.0 + x_27)? (2.0 + x_25) : (3.0 + x_27)) > ((6.0 + x_30) > (18.0 + x_31)? (6.0 + x_30) : (18.0 + x_31))? ((2.0 + x_25) > (3.0 + x_27)? (2.0 + x_25) : (3.0 + x_27)) : ((6.0 + x_30) > (18.0 + x_31)? (6.0 + x_30) : (18.0 + x_31))))? ((((13.0 + x_0) > (6.0 + x_1)? (13.0 + x_0) : (6.0 + x_1)) > ((3.0 + x_2) > (11.0 + x_6)? (3.0 + x_2) : (11.0 + x_6))? ((13.0 + x_0) > (6.0 + x_1)? (13.0 + x_0) : (6.0 + x_1)) : ((3.0 + x_2) > (11.0 + x_6)? (3.0 + x_2) : (11.0 + x_6))) > (((20.0 + x_7) > (1.0 + x_12)? (20.0 + x_7) : (1.0 + x_12)) > ((15.0 + x_14) > (6.0 + x_15)? (15.0 + x_14) : (6.0 + x_15))? ((20.0 + x_7) > (1.0 + x_12)? (20.0 + x_7) : (1.0 + x_12)) : ((15.0 + x_14) > (6.0 + x_15)? (15.0 + x_14) : (6.0 + x_15)))? (((13.0 + x_0) > (6.0 + x_1)? (13.0 + x_0) : (6.0 + x_1)) > ((3.0 + x_2) > (11.0 + x_6)? (3.0 + x_2) : (11.0 + x_6))? ((13.0 + x_0) > (6.0 + x_1)? (13.0 + x_0) : (6.0 + x_1)) : ((3.0 + x_2) > (11.0 + x_6)? (3.0 + x_2) : (11.0 + x_6))) : (((20.0 + x_7) > (1.0 + x_12)? (20.0 + x_7) : (1.0 + x_12)) > ((15.0 + x_14) > (6.0 + x_15)? (15.0 + x_14) : (6.0 + x_15))? ((20.0 + x_7) > (1.0 + x_12)? (20.0 + x_7) : (1.0 + x_12)) : ((15.0 + x_14) > (6.0 + x_15)? (15.0 + x_14) : (6.0 + x_15)))) : ((((11.0 + x_19) > (18.0 + x_20)? (11.0 + x_19) : (18.0 + x_20)) > ((11.0 + x_21) > (5.0 + x_23)? (11.0 + x_21) : (5.0 + x_23))? ((11.0 + x_19) > (18.0 + x_20)? (11.0 + x_19) : (18.0 + x_20)) : ((11.0 + x_21) > (5.0 + x_23)? (11.0 + x_21) : (5.0 + x_23))) > (((2.0 + x_25) > (3.0 + x_27)? (2.0 + x_25) : (3.0 + x_27)) > ((6.0 + x_30) > (18.0 + x_31)? (6.0 + x_30) : (18.0 + x_31))? ((2.0 + x_25) > (3.0 + x_27)? (2.0 + x_25) : (3.0 + x_27)) : ((6.0 + x_30) > (18.0 + x_31)? (6.0 + x_30) : (18.0 + x_31)))? (((11.0 + x_19) > (18.0 + x_20)? (11.0 + x_19) : (18.0 + x_20)) > ((11.0 + x_21) > (5.0 + x_23)? (11.0 + x_21) : (5.0 + x_23))? ((11.0 + x_19) > (18.0 + x_20)? (11.0 + x_19) : (18.0 + x_20)) : ((11.0 + x_21) > (5.0 + x_23)? (11.0 + x_21) : (5.0 + x_23))) : (((2.0 + x_25) > (3.0 + x_27)? (2.0 + x_25) : (3.0 + x_27)) > ((6.0 + x_30) > (18.0 + x_31)? (6.0 + x_30) : (18.0 + x_31))? ((2.0 + x_25) > (3.0 + x_27)? (2.0 + x_25) : (3.0 + x_27)) : ((6.0 + x_30) > (18.0 + x_31)? (6.0 + x_30) : (18.0 + x_31)))));
x_17_ = (((((3.0 + x_1) > (12.0 + x_3)? (3.0 + x_1) : (12.0 + x_3)) > ((12.0 + x_5) > (5.0 + x_6)? (12.0 + x_5) : (5.0 + x_6))? ((3.0 + x_1) > (12.0 + x_3)? (3.0 + x_1) : (12.0 + x_3)) : ((12.0 + x_5) > (5.0 + x_6)? (12.0 + x_5) : (5.0 + x_6))) > (((5.0 + x_8) > (16.0 + x_9)? (5.0 + x_8) : (16.0 + x_9)) > ((11.0 + x_12) > (8.0 + x_13)? (11.0 + x_12) : (8.0 + x_13))? ((5.0 + x_8) > (16.0 + x_9)? (5.0 + x_8) : (16.0 + x_9)) : ((11.0 + x_12) > (8.0 + x_13)? (11.0 + x_12) : (8.0 + x_13)))? (((3.0 + x_1) > (12.0 + x_3)? (3.0 + x_1) : (12.0 + x_3)) > ((12.0 + x_5) > (5.0 + x_6)? (12.0 + x_5) : (5.0 + x_6))? ((3.0 + x_1) > (12.0 + x_3)? (3.0 + x_1) : (12.0 + x_3)) : ((12.0 + x_5) > (5.0 + x_6)? (12.0 + x_5) : (5.0 + x_6))) : (((5.0 + x_8) > (16.0 + x_9)? (5.0 + x_8) : (16.0 + x_9)) > ((11.0 + x_12) > (8.0 + x_13)? (11.0 + x_12) : (8.0 + x_13))? ((5.0 + x_8) > (16.0 + x_9)? (5.0 + x_8) : (16.0 + x_9)) : ((11.0 + x_12) > (8.0 + x_13)? (11.0 + x_12) : (8.0 + x_13)))) > ((((12.0 + x_14) > (9.0 + x_15)? (12.0 + x_14) : (9.0 + x_15)) > ((14.0 + x_16) > (10.0 + x_21)? (14.0 + x_16) : (10.0 + x_21))? ((12.0 + x_14) > (9.0 + x_15)? (12.0 + x_14) : (9.0 + x_15)) : ((14.0 + x_16) > (10.0 + x_21)? (14.0 + x_16) : (10.0 + x_21))) > (((3.0 + x_22) > (14.0 + x_25)? (3.0 + x_22) : (14.0 + x_25)) > ((16.0 + x_29) > (11.0 + x_30)? (16.0 + x_29) : (11.0 + x_30))? ((3.0 + x_22) > (14.0 + x_25)? (3.0 + x_22) : (14.0 + x_25)) : ((16.0 + x_29) > (11.0 + x_30)? (16.0 + x_29) : (11.0 + x_30)))? (((12.0 + x_14) > (9.0 + x_15)? (12.0 + x_14) : (9.0 + x_15)) > ((14.0 + x_16) > (10.0 + x_21)? (14.0 + x_16) : (10.0 + x_21))? ((12.0 + x_14) > (9.0 + x_15)? (12.0 + x_14) : (9.0 + x_15)) : ((14.0 + x_16) > (10.0 + x_21)? (14.0 + x_16) : (10.0 + x_21))) : (((3.0 + x_22) > (14.0 + x_25)? (3.0 + x_22) : (14.0 + x_25)) > ((16.0 + x_29) > (11.0 + x_30)? (16.0 + x_29) : (11.0 + x_30))? ((3.0 + x_22) > (14.0 + x_25)? (3.0 + x_22) : (14.0 + x_25)) : ((16.0 + x_29) > (11.0 + x_30)? (16.0 + x_29) : (11.0 + x_30))))? ((((3.0 + x_1) > (12.0 + x_3)? (3.0 + x_1) : (12.0 + x_3)) > ((12.0 + x_5) > (5.0 + x_6)? (12.0 + x_5) : (5.0 + x_6))? ((3.0 + x_1) > (12.0 + x_3)? (3.0 + x_1) : (12.0 + x_3)) : ((12.0 + x_5) > (5.0 + x_6)? (12.0 + x_5) : (5.0 + x_6))) > (((5.0 + x_8) > (16.0 + x_9)? (5.0 + x_8) : (16.0 + x_9)) > ((11.0 + x_12) > (8.0 + x_13)? (11.0 + x_12) : (8.0 + x_13))? ((5.0 + x_8) > (16.0 + x_9)? (5.0 + x_8) : (16.0 + x_9)) : ((11.0 + x_12) > (8.0 + x_13)? (11.0 + x_12) : (8.0 + x_13)))? (((3.0 + x_1) > (12.0 + x_3)? (3.0 + x_1) : (12.0 + x_3)) > ((12.0 + x_5) > (5.0 + x_6)? (12.0 + x_5) : (5.0 + x_6))? ((3.0 + x_1) > (12.0 + x_3)? (3.0 + x_1) : (12.0 + x_3)) : ((12.0 + x_5) > (5.0 + x_6)? (12.0 + x_5) : (5.0 + x_6))) : (((5.0 + x_8) > (16.0 + x_9)? (5.0 + x_8) : (16.0 + x_9)) > ((11.0 + x_12) > (8.0 + x_13)? (11.0 + x_12) : (8.0 + x_13))? ((5.0 + x_8) > (16.0 + x_9)? (5.0 + x_8) : (16.0 + x_9)) : ((11.0 + x_12) > (8.0 + x_13)? (11.0 + x_12) : (8.0 + x_13)))) : ((((12.0 + x_14) > (9.0 + x_15)? (12.0 + x_14) : (9.0 + x_15)) > ((14.0 + x_16) > (10.0 + x_21)? (14.0 + x_16) : (10.0 + x_21))? ((12.0 + x_14) > (9.0 + x_15)? (12.0 + x_14) : (9.0 + x_15)) : ((14.0 + x_16) > (10.0 + x_21)? (14.0 + x_16) : (10.0 + x_21))) > (((3.0 + x_22) > (14.0 + x_25)? (3.0 + x_22) : (14.0 + x_25)) > ((16.0 + x_29) > (11.0 + x_30)? (16.0 + x_29) : (11.0 + x_30))? ((3.0 + x_22) > (14.0 + x_25)? (3.0 + x_22) : (14.0 + x_25)) : ((16.0 + x_29) > (11.0 + x_30)? (16.0 + x_29) : (11.0 + x_30)))? (((12.0 + x_14) > (9.0 + x_15)? (12.0 + x_14) : (9.0 + x_15)) > ((14.0 + x_16) > (10.0 + x_21)? (14.0 + x_16) : (10.0 + x_21))? ((12.0 + x_14) > (9.0 + x_15)? (12.0 + x_14) : (9.0 + x_15)) : ((14.0 + x_16) > (10.0 + x_21)? (14.0 + x_16) : (10.0 + x_21))) : (((3.0 + x_22) > (14.0 + x_25)? (3.0 + x_22) : (14.0 + x_25)) > ((16.0 + x_29) > (11.0 + x_30)? (16.0 + x_29) : (11.0 + x_30))? ((3.0 + x_22) > (14.0 + x_25)? (3.0 + x_22) : (14.0 + x_25)) : ((16.0 + x_29) > (11.0 + x_30)? (16.0 + x_29) : (11.0 + x_30)))));
x_18_ = (((((10.0 + x_0) > (12.0 + x_6)? (10.0 + x_0) : (12.0 + x_6)) > ((7.0 + x_10) > (14.0 + x_11)? (7.0 + x_10) : (14.0 + x_11))? ((10.0 + x_0) > (12.0 + x_6)? (10.0 + x_0) : (12.0 + x_6)) : ((7.0 + x_10) > (14.0 + x_11)? (7.0 + x_10) : (14.0 + x_11))) > (((15.0 + x_12) > (6.0 + x_13)? (15.0 + x_12) : (6.0 + x_13)) > ((12.0 + x_14) > (14.0 + x_16)? (12.0 + x_14) : (14.0 + x_16))? ((15.0 + x_12) > (6.0 + x_13)? (15.0 + x_12) : (6.0 + x_13)) : ((12.0 + x_14) > (14.0 + x_16)? (12.0 + x_14) : (14.0 + x_16)))? (((10.0 + x_0) > (12.0 + x_6)? (10.0 + x_0) : (12.0 + x_6)) > ((7.0 + x_10) > (14.0 + x_11)? (7.0 + x_10) : (14.0 + x_11))? ((10.0 + x_0) > (12.0 + x_6)? (10.0 + x_0) : (12.0 + x_6)) : ((7.0 + x_10) > (14.0 + x_11)? (7.0 + x_10) : (14.0 + x_11))) : (((15.0 + x_12) > (6.0 + x_13)? (15.0 + x_12) : (6.0 + x_13)) > ((12.0 + x_14) > (14.0 + x_16)? (12.0 + x_14) : (14.0 + x_16))? ((15.0 + x_12) > (6.0 + x_13)? (15.0 + x_12) : (6.0 + x_13)) : ((12.0 + x_14) > (14.0 + x_16)? (12.0 + x_14) : (14.0 + x_16)))) > ((((10.0 + x_17) > (3.0 + x_20)? (10.0 + x_17) : (3.0 + x_20)) > ((1.0 + x_21) > (16.0 + x_22)? (1.0 + x_21) : (16.0 + x_22))? ((10.0 + x_17) > (3.0 + x_20)? (10.0 + x_17) : (3.0 + x_20)) : ((1.0 + x_21) > (16.0 + x_22)? (1.0 + x_21) : (16.0 + x_22))) > (((7.0 + x_23) > (10.0 + x_26)? (7.0 + x_23) : (10.0 + x_26)) > ((14.0 + x_28) > (9.0 + x_31)? (14.0 + x_28) : (9.0 + x_31))? ((7.0 + x_23) > (10.0 + x_26)? (7.0 + x_23) : (10.0 + x_26)) : ((14.0 + x_28) > (9.0 + x_31)? (14.0 + x_28) : (9.0 + x_31)))? (((10.0 + x_17) > (3.0 + x_20)? (10.0 + x_17) : (3.0 + x_20)) > ((1.0 + x_21) > (16.0 + x_22)? (1.0 + x_21) : (16.0 + x_22))? ((10.0 + x_17) > (3.0 + x_20)? (10.0 + x_17) : (3.0 + x_20)) : ((1.0 + x_21) > (16.0 + x_22)? (1.0 + x_21) : (16.0 + x_22))) : (((7.0 + x_23) > (10.0 + x_26)? (7.0 + x_23) : (10.0 + x_26)) > ((14.0 + x_28) > (9.0 + x_31)? (14.0 + x_28) : (9.0 + x_31))? ((7.0 + x_23) > (10.0 + x_26)? (7.0 + x_23) : (10.0 + x_26)) : ((14.0 + x_28) > (9.0 + x_31)? (14.0 + x_28) : (9.0 + x_31))))? ((((10.0 + x_0) > (12.0 + x_6)? (10.0 + x_0) : (12.0 + x_6)) > ((7.0 + x_10) > (14.0 + x_11)? (7.0 + x_10) : (14.0 + x_11))? ((10.0 + x_0) > (12.0 + x_6)? (10.0 + x_0) : (12.0 + x_6)) : ((7.0 + x_10) > (14.0 + x_11)? (7.0 + x_10) : (14.0 + x_11))) > (((15.0 + x_12) > (6.0 + x_13)? (15.0 + x_12) : (6.0 + x_13)) > ((12.0 + x_14) > (14.0 + x_16)? (12.0 + x_14) : (14.0 + x_16))? ((15.0 + x_12) > (6.0 + x_13)? (15.0 + x_12) : (6.0 + x_13)) : ((12.0 + x_14) > (14.0 + x_16)? (12.0 + x_14) : (14.0 + x_16)))? (((10.0 + x_0) > (12.0 + x_6)? (10.0 + x_0) : (12.0 + x_6)) > ((7.0 + x_10) > (14.0 + x_11)? (7.0 + x_10) : (14.0 + x_11))? ((10.0 + x_0) > (12.0 + x_6)? (10.0 + x_0) : (12.0 + x_6)) : ((7.0 + x_10) > (14.0 + x_11)? (7.0 + x_10) : (14.0 + x_11))) : (((15.0 + x_12) > (6.0 + x_13)? (15.0 + x_12) : (6.0 + x_13)) > ((12.0 + x_14) > (14.0 + x_16)? (12.0 + x_14) : (14.0 + x_16))? ((15.0 + x_12) > (6.0 + x_13)? (15.0 + x_12) : (6.0 + x_13)) : ((12.0 + x_14) > (14.0 + x_16)? (12.0 + x_14) : (14.0 + x_16)))) : ((((10.0 + x_17) > (3.0 + x_20)? (10.0 + x_17) : (3.0 + x_20)) > ((1.0 + x_21) > (16.0 + x_22)? (1.0 + x_21) : (16.0 + x_22))? ((10.0 + x_17) > (3.0 + x_20)? (10.0 + x_17) : (3.0 + x_20)) : ((1.0 + x_21) > (16.0 + x_22)? (1.0 + x_21) : (16.0 + x_22))) > (((7.0 + x_23) > (10.0 + x_26)? (7.0 + x_23) : (10.0 + x_26)) > ((14.0 + x_28) > (9.0 + x_31)? (14.0 + x_28) : (9.0 + x_31))? ((7.0 + x_23) > (10.0 + x_26)? (7.0 + x_23) : (10.0 + x_26)) : ((14.0 + x_28) > (9.0 + x_31)? (14.0 + x_28) : (9.0 + x_31)))? (((10.0 + x_17) > (3.0 + x_20)? (10.0 + x_17) : (3.0 + x_20)) > ((1.0 + x_21) > (16.0 + x_22)? (1.0 + x_21) : (16.0 + x_22))? ((10.0 + x_17) > (3.0 + x_20)? (10.0 + x_17) : (3.0 + x_20)) : ((1.0 + x_21) > (16.0 + x_22)? (1.0 + x_21) : (16.0 + x_22))) : (((7.0 + x_23) > (10.0 + x_26)? (7.0 + x_23) : (10.0 + x_26)) > ((14.0 + x_28) > (9.0 + x_31)? (14.0 + x_28) : (9.0 + x_31))? ((7.0 + x_23) > (10.0 + x_26)? (7.0 + x_23) : (10.0 + x_26)) : ((14.0 + x_28) > (9.0 + x_31)? (14.0 + x_28) : (9.0 + x_31)))));
x_19_ = (((((8.0 + x_2) > (11.0 + x_3)? (8.0 + x_2) : (11.0 + x_3)) > ((17.0 + x_4) > (13.0 + x_7)? (17.0 + x_4) : (13.0 + x_7))? ((8.0 + x_2) > (11.0 + x_3)? (8.0 + x_2) : (11.0 + x_3)) : ((17.0 + x_4) > (13.0 + x_7)? (17.0 + x_4) : (13.0 + x_7))) > (((15.0 + x_10) > (12.0 + x_11)? (15.0 + x_10) : (12.0 + x_11)) > ((9.0 + x_12) > (5.0 + x_14)? (9.0 + x_12) : (5.0 + x_14))? ((15.0 + x_10) > (12.0 + x_11)? (15.0 + x_10) : (12.0 + x_11)) : ((9.0 + x_12) > (5.0 + x_14)? (9.0 + x_12) : (5.0 + x_14)))? (((8.0 + x_2) > (11.0 + x_3)? (8.0 + x_2) : (11.0 + x_3)) > ((17.0 + x_4) > (13.0 + x_7)? (17.0 + x_4) : (13.0 + x_7))? ((8.0 + x_2) > (11.0 + x_3)? (8.0 + x_2) : (11.0 + x_3)) : ((17.0 + x_4) > (13.0 + x_7)? (17.0 + x_4) : (13.0 + x_7))) : (((15.0 + x_10) > (12.0 + x_11)? (15.0 + x_10) : (12.0 + x_11)) > ((9.0 + x_12) > (5.0 + x_14)? (9.0 + x_12) : (5.0 + x_14))? ((15.0 + x_10) > (12.0 + x_11)? (15.0 + x_10) : (12.0 + x_11)) : ((9.0 + x_12) > (5.0 + x_14)? (9.0 + x_12) : (5.0 + x_14)))) > ((((8.0 + x_15) > (20.0 + x_16)? (8.0 + x_15) : (20.0 + x_16)) > ((12.0 + x_17) > (5.0 + x_18)? (12.0 + x_17) : (5.0 + x_18))? ((8.0 + x_15) > (20.0 + x_16)? (8.0 + x_15) : (20.0 + x_16)) : ((12.0 + x_17) > (5.0 + x_18)? (12.0 + x_17) : (5.0 + x_18))) > (((7.0 + x_20) > (20.0 + x_21)? (7.0 + x_20) : (20.0 + x_21)) > ((14.0 + x_28) > (17.0 + x_31)? (14.0 + x_28) : (17.0 + x_31))? ((7.0 + x_20) > (20.0 + x_21)? (7.0 + x_20) : (20.0 + x_21)) : ((14.0 + x_28) > (17.0 + x_31)? (14.0 + x_28) : (17.0 + x_31)))? (((8.0 + x_15) > (20.0 + x_16)? (8.0 + x_15) : (20.0 + x_16)) > ((12.0 + x_17) > (5.0 + x_18)? (12.0 + x_17) : (5.0 + x_18))? ((8.0 + x_15) > (20.0 + x_16)? (8.0 + x_15) : (20.0 + x_16)) : ((12.0 + x_17) > (5.0 + x_18)? (12.0 + x_17) : (5.0 + x_18))) : (((7.0 + x_20) > (20.0 + x_21)? (7.0 + x_20) : (20.0 + x_21)) > ((14.0 + x_28) > (17.0 + x_31)? (14.0 + x_28) : (17.0 + x_31))? ((7.0 + x_20) > (20.0 + x_21)? (7.0 + x_20) : (20.0 + x_21)) : ((14.0 + x_28) > (17.0 + x_31)? (14.0 + x_28) : (17.0 + x_31))))? ((((8.0 + x_2) > (11.0 + x_3)? (8.0 + x_2) : (11.0 + x_3)) > ((17.0 + x_4) > (13.0 + x_7)? (17.0 + x_4) : (13.0 + x_7))? ((8.0 + x_2) > (11.0 + x_3)? (8.0 + x_2) : (11.0 + x_3)) : ((17.0 + x_4) > (13.0 + x_7)? (17.0 + x_4) : (13.0 + x_7))) > (((15.0 + x_10) > (12.0 + x_11)? (15.0 + x_10) : (12.0 + x_11)) > ((9.0 + x_12) > (5.0 + x_14)? (9.0 + x_12) : (5.0 + x_14))? ((15.0 + x_10) > (12.0 + x_11)? (15.0 + x_10) : (12.0 + x_11)) : ((9.0 + x_12) > (5.0 + x_14)? (9.0 + x_12) : (5.0 + x_14)))? (((8.0 + x_2) > (11.0 + x_3)? (8.0 + x_2) : (11.0 + x_3)) > ((17.0 + x_4) > (13.0 + x_7)? (17.0 + x_4) : (13.0 + x_7))? ((8.0 + x_2) > (11.0 + x_3)? (8.0 + x_2) : (11.0 + x_3)) : ((17.0 + x_4) > (13.0 + x_7)? (17.0 + x_4) : (13.0 + x_7))) : (((15.0 + x_10) > (12.0 + x_11)? (15.0 + x_10) : (12.0 + x_11)) > ((9.0 + x_12) > (5.0 + x_14)? (9.0 + x_12) : (5.0 + x_14))? ((15.0 + x_10) > (12.0 + x_11)? (15.0 + x_10) : (12.0 + x_11)) : ((9.0 + x_12) > (5.0 + x_14)? (9.0 + x_12) : (5.0 + x_14)))) : ((((8.0 + x_15) > (20.0 + x_16)? (8.0 + x_15) : (20.0 + x_16)) > ((12.0 + x_17) > (5.0 + x_18)? (12.0 + x_17) : (5.0 + x_18))? ((8.0 + x_15) > (20.0 + x_16)? (8.0 + x_15) : (20.0 + x_16)) : ((12.0 + x_17) > (5.0 + x_18)? (12.0 + x_17) : (5.0 + x_18))) > (((7.0 + x_20) > (20.0 + x_21)? (7.0 + x_20) : (20.0 + x_21)) > ((14.0 + x_28) > (17.0 + x_31)? (14.0 + x_28) : (17.0 + x_31))? ((7.0 + x_20) > (20.0 + x_21)? (7.0 + x_20) : (20.0 + x_21)) : ((14.0 + x_28) > (17.0 + x_31)? (14.0 + x_28) : (17.0 + x_31)))? (((8.0 + x_15) > (20.0 + x_16)? (8.0 + x_15) : (20.0 + x_16)) > ((12.0 + x_17) > (5.0 + x_18)? (12.0 + x_17) : (5.0 + x_18))? ((8.0 + x_15) > (20.0 + x_16)? (8.0 + x_15) : (20.0 + x_16)) : ((12.0 + x_17) > (5.0 + x_18)? (12.0 + x_17) : (5.0 + x_18))) : (((7.0 + x_20) > (20.0 + x_21)? (7.0 + x_20) : (20.0 + x_21)) > ((14.0 + x_28) > (17.0 + x_31)? (14.0 + x_28) : (17.0 + x_31))? ((7.0 + x_20) > (20.0 + x_21)? (7.0 + x_20) : (20.0 + x_21)) : ((14.0 + x_28) > (17.0 + x_31)? (14.0 + x_28) : (17.0 + x_31)))));
x_20_ = (((((18.0 + x_1) > (17.0 + x_3)? (18.0 + x_1) : (17.0 + x_3)) > ((13.0 + x_9) > (10.0 + x_10)? (13.0 + x_9) : (10.0 + x_10))? ((18.0 + x_1) > (17.0 + x_3)? (18.0 + x_1) : (17.0 + x_3)) : ((13.0 + x_9) > (10.0 + x_10)? (13.0 + x_9) : (10.0 + x_10))) > (((6.0 + x_11) > (18.0 + x_12)? (6.0 + x_11) : (18.0 + x_12)) > ((9.0 + x_14) > (13.0 + x_16)? (9.0 + x_14) : (13.0 + x_16))? ((6.0 + x_11) > (18.0 + x_12)? (6.0 + x_11) : (18.0 + x_12)) : ((9.0 + x_14) > (13.0 + x_16)? (9.0 + x_14) : (13.0 + x_16)))? (((18.0 + x_1) > (17.0 + x_3)? (18.0 + x_1) : (17.0 + x_3)) > ((13.0 + x_9) > (10.0 + x_10)? (13.0 + x_9) : (10.0 + x_10))? ((18.0 + x_1) > (17.0 + x_3)? (18.0 + x_1) : (17.0 + x_3)) : ((13.0 + x_9) > (10.0 + x_10)? (13.0 + x_9) : (10.0 + x_10))) : (((6.0 + x_11) > (18.0 + x_12)? (6.0 + x_11) : (18.0 + x_12)) > ((9.0 + x_14) > (13.0 + x_16)? (9.0 + x_14) : (13.0 + x_16))? ((6.0 + x_11) > (18.0 + x_12)? (6.0 + x_11) : (18.0 + x_12)) : ((9.0 + x_14) > (13.0 + x_16)? (9.0 + x_14) : (13.0 + x_16)))) > ((((11.0 + x_17) > (6.0 + x_18)? (11.0 + x_17) : (6.0 + x_18)) > ((12.0 + x_19) > (6.0 + x_21)? (12.0 + x_19) : (6.0 + x_21))? ((11.0 + x_17) > (6.0 + x_18)? (11.0 + x_17) : (6.0 + x_18)) : ((12.0 + x_19) > (6.0 + x_21)? (12.0 + x_19) : (6.0 + x_21))) > (((14.0 + x_26) > (15.0 + x_27)? (14.0 + x_26) : (15.0 + x_27)) > ((7.0 + x_28) > (19.0 + x_31)? (7.0 + x_28) : (19.0 + x_31))? ((14.0 + x_26) > (15.0 + x_27)? (14.0 + x_26) : (15.0 + x_27)) : ((7.0 + x_28) > (19.0 + x_31)? (7.0 + x_28) : (19.0 + x_31)))? (((11.0 + x_17) > (6.0 + x_18)? (11.0 + x_17) : (6.0 + x_18)) > ((12.0 + x_19) > (6.0 + x_21)? (12.0 + x_19) : (6.0 + x_21))? ((11.0 + x_17) > (6.0 + x_18)? (11.0 + x_17) : (6.0 + x_18)) : ((12.0 + x_19) > (6.0 + x_21)? (12.0 + x_19) : (6.0 + x_21))) : (((14.0 + x_26) > (15.0 + x_27)? (14.0 + x_26) : (15.0 + x_27)) > ((7.0 + x_28) > (19.0 + x_31)? (7.0 + x_28) : (19.0 + x_31))? ((14.0 + x_26) > (15.0 + x_27)? (14.0 + x_26) : (15.0 + x_27)) : ((7.0 + x_28) > (19.0 + x_31)? (7.0 + x_28) : (19.0 + x_31))))? ((((18.0 + x_1) > (17.0 + x_3)? (18.0 + x_1) : (17.0 + x_3)) > ((13.0 + x_9) > (10.0 + x_10)? (13.0 + x_9) : (10.0 + x_10))? ((18.0 + x_1) > (17.0 + x_3)? (18.0 + x_1) : (17.0 + x_3)) : ((13.0 + x_9) > (10.0 + x_10)? (13.0 + x_9) : (10.0 + x_10))) > (((6.0 + x_11) > (18.0 + x_12)? (6.0 + x_11) : (18.0 + x_12)) > ((9.0 + x_14) > (13.0 + x_16)? (9.0 + x_14) : (13.0 + x_16))? ((6.0 + x_11) > (18.0 + x_12)? (6.0 + x_11) : (18.0 + x_12)) : ((9.0 + x_14) > (13.0 + x_16)? (9.0 + x_14) : (13.0 + x_16)))? (((18.0 + x_1) > (17.0 + x_3)? (18.0 + x_1) : (17.0 + x_3)) > ((13.0 + x_9) > (10.0 + x_10)? (13.0 + x_9) : (10.0 + x_10))? ((18.0 + x_1) > (17.0 + x_3)? (18.0 + x_1) : (17.0 + x_3)) : ((13.0 + x_9) > (10.0 + x_10)? (13.0 + x_9) : (10.0 + x_10))) : (((6.0 + x_11) > (18.0 + x_12)? (6.0 + x_11) : (18.0 + x_12)) > ((9.0 + x_14) > (13.0 + x_16)? (9.0 + x_14) : (13.0 + x_16))? ((6.0 + x_11) > (18.0 + x_12)? (6.0 + x_11) : (18.0 + x_12)) : ((9.0 + x_14) > (13.0 + x_16)? (9.0 + x_14) : (13.0 + x_16)))) : ((((11.0 + x_17) > (6.0 + x_18)? (11.0 + x_17) : (6.0 + x_18)) > ((12.0 + x_19) > (6.0 + x_21)? (12.0 + x_19) : (6.0 + x_21))? ((11.0 + x_17) > (6.0 + x_18)? (11.0 + x_17) : (6.0 + x_18)) : ((12.0 + x_19) > (6.0 + x_21)? (12.0 + x_19) : (6.0 + x_21))) > (((14.0 + x_26) > (15.0 + x_27)? (14.0 + x_26) : (15.0 + x_27)) > ((7.0 + x_28) > (19.0 + x_31)? (7.0 + x_28) : (19.0 + x_31))? ((14.0 + x_26) > (15.0 + x_27)? (14.0 + x_26) : (15.0 + x_27)) : ((7.0 + x_28) > (19.0 + x_31)? (7.0 + x_28) : (19.0 + x_31)))? (((11.0 + x_17) > (6.0 + x_18)? (11.0 + x_17) : (6.0 + x_18)) > ((12.0 + x_19) > (6.0 + x_21)? (12.0 + x_19) : (6.0 + x_21))? ((11.0 + x_17) > (6.0 + x_18)? (11.0 + x_17) : (6.0 + x_18)) : ((12.0 + x_19) > (6.0 + x_21)? (12.0 + x_19) : (6.0 + x_21))) : (((14.0 + x_26) > (15.0 + x_27)? (14.0 + x_26) : (15.0 + x_27)) > ((7.0 + x_28) > (19.0 + x_31)? (7.0 + x_28) : (19.0 + x_31))? ((14.0 + x_26) > (15.0 + x_27)? (14.0 + x_26) : (15.0 + x_27)) : ((7.0 + x_28) > (19.0 + x_31)? (7.0 + x_28) : (19.0 + x_31)))));
x_21_ = (((((9.0 + x_0) > (6.0 + x_1)? (9.0 + x_0) : (6.0 + x_1)) > ((14.0 + x_2) > (19.0 + x_3)? (14.0 + x_2) : (19.0 + x_3))? ((9.0 + x_0) > (6.0 + x_1)? (9.0 + x_0) : (6.0 + x_1)) : ((14.0 + x_2) > (19.0 + x_3)? (14.0 + x_2) : (19.0 + x_3))) > (((5.0 + x_5) > (10.0 + x_6)? (5.0 + x_5) : (10.0 + x_6)) > ((6.0 + x_7) > (3.0 + x_11)? (6.0 + x_7) : (3.0 + x_11))? ((5.0 + x_5) > (10.0 + x_6)? (5.0 + x_5) : (10.0 + x_6)) : ((6.0 + x_7) > (3.0 + x_11)? (6.0 + x_7) : (3.0 + x_11)))? (((9.0 + x_0) > (6.0 + x_1)? (9.0 + x_0) : (6.0 + x_1)) > ((14.0 + x_2) > (19.0 + x_3)? (14.0 + x_2) : (19.0 + x_3))? ((9.0 + x_0) > (6.0 + x_1)? (9.0 + x_0) : (6.0 + x_1)) : ((14.0 + x_2) > (19.0 + x_3)? (14.0 + x_2) : (19.0 + x_3))) : (((5.0 + x_5) > (10.0 + x_6)? (5.0 + x_5) : (10.0 + x_6)) > ((6.0 + x_7) > (3.0 + x_11)? (6.0 + x_7) : (3.0 + x_11))? ((5.0 + x_5) > (10.0 + x_6)? (5.0 + x_5) : (10.0 + x_6)) : ((6.0 + x_7) > (3.0 + x_11)? (6.0 + x_7) : (3.0 + x_11)))) > ((((18.0 + x_12) > (17.0 + x_14)? (18.0 + x_12) : (17.0 + x_14)) > ((10.0 + x_15) > (9.0 + x_17)? (10.0 + x_15) : (9.0 + x_17))? ((18.0 + x_12) > (17.0 + x_14)? (18.0 + x_12) : (17.0 + x_14)) : ((10.0 + x_15) > (9.0 + x_17)? (10.0 + x_15) : (9.0 + x_17))) > (((4.0 + x_19) > (17.0 + x_20)? (4.0 + x_19) : (17.0 + x_20)) > ((12.0 + x_30) > (11.0 + x_31)? (12.0 + x_30) : (11.0 + x_31))? ((4.0 + x_19) > (17.0 + x_20)? (4.0 + x_19) : (17.0 + x_20)) : ((12.0 + x_30) > (11.0 + x_31)? (12.0 + x_30) : (11.0 + x_31)))? (((18.0 + x_12) > (17.0 + x_14)? (18.0 + x_12) : (17.0 + x_14)) > ((10.0 + x_15) > (9.0 + x_17)? (10.0 + x_15) : (9.0 + x_17))? ((18.0 + x_12) > (17.0 + x_14)? (18.0 + x_12) : (17.0 + x_14)) : ((10.0 + x_15) > (9.0 + x_17)? (10.0 + x_15) : (9.0 + x_17))) : (((4.0 + x_19) > (17.0 + x_20)? (4.0 + x_19) : (17.0 + x_20)) > ((12.0 + x_30) > (11.0 + x_31)? (12.0 + x_30) : (11.0 + x_31))? ((4.0 + x_19) > (17.0 + x_20)? (4.0 + x_19) : (17.0 + x_20)) : ((12.0 + x_30) > (11.0 + x_31)? (12.0 + x_30) : (11.0 + x_31))))? ((((9.0 + x_0) > (6.0 + x_1)? (9.0 + x_0) : (6.0 + x_1)) > ((14.0 + x_2) > (19.0 + x_3)? (14.0 + x_2) : (19.0 + x_3))? ((9.0 + x_0) > (6.0 + x_1)? (9.0 + x_0) : (6.0 + x_1)) : ((14.0 + x_2) > (19.0 + x_3)? (14.0 + x_2) : (19.0 + x_3))) > (((5.0 + x_5) > (10.0 + x_6)? (5.0 + x_5) : (10.0 + x_6)) > ((6.0 + x_7) > (3.0 + x_11)? (6.0 + x_7) : (3.0 + x_11))? ((5.0 + x_5) > (10.0 + x_6)? (5.0 + x_5) : (10.0 + x_6)) : ((6.0 + x_7) > (3.0 + x_11)? (6.0 + x_7) : (3.0 + x_11)))? (((9.0 + x_0) > (6.0 + x_1)? (9.0 + x_0) : (6.0 + x_1)) > ((14.0 + x_2) > (19.0 + x_3)? (14.0 + x_2) : (19.0 + x_3))? ((9.0 + x_0) > (6.0 + x_1)? (9.0 + x_0) : (6.0 + x_1)) : ((14.0 + x_2) > (19.0 + x_3)? (14.0 + x_2) : (19.0 + x_3))) : (((5.0 + x_5) > (10.0 + x_6)? (5.0 + x_5) : (10.0 + x_6)) > ((6.0 + x_7) > (3.0 + x_11)? (6.0 + x_7) : (3.0 + x_11))? ((5.0 + x_5) > (10.0 + x_6)? (5.0 + x_5) : (10.0 + x_6)) : ((6.0 + x_7) > (3.0 + x_11)? (6.0 + x_7) : (3.0 + x_11)))) : ((((18.0 + x_12) > (17.0 + x_14)? (18.0 + x_12) : (17.0 + x_14)) > ((10.0 + x_15) > (9.0 + x_17)? (10.0 + x_15) : (9.0 + x_17))? ((18.0 + x_12) > (17.0 + x_14)? (18.0 + x_12) : (17.0 + x_14)) : ((10.0 + x_15) > (9.0 + x_17)? (10.0 + x_15) : (9.0 + x_17))) > (((4.0 + x_19) > (17.0 + x_20)? (4.0 + x_19) : (17.0 + x_20)) > ((12.0 + x_30) > (11.0 + x_31)? (12.0 + x_30) : (11.0 + x_31))? ((4.0 + x_19) > (17.0 + x_20)? (4.0 + x_19) : (17.0 + x_20)) : ((12.0 + x_30) > (11.0 + x_31)? (12.0 + x_30) : (11.0 + x_31)))? (((18.0 + x_12) > (17.0 + x_14)? (18.0 + x_12) : (17.0 + x_14)) > ((10.0 + x_15) > (9.0 + x_17)? (10.0 + x_15) : (9.0 + x_17))? ((18.0 + x_12) > (17.0 + x_14)? (18.0 + x_12) : (17.0 + x_14)) : ((10.0 + x_15) > (9.0 + x_17)? (10.0 + x_15) : (9.0 + x_17))) : (((4.0 + x_19) > (17.0 + x_20)? (4.0 + x_19) : (17.0 + x_20)) > ((12.0 + x_30) > (11.0 + x_31)? (12.0 + x_30) : (11.0 + x_31))? ((4.0 + x_19) > (17.0 + x_20)? (4.0 + x_19) : (17.0 + x_20)) : ((12.0 + x_30) > (11.0 + x_31)? (12.0 + x_30) : (11.0 + x_31)))));
x_22_ = (((((1.0 + x_3) > (9.0 + x_4)? (1.0 + x_3) : (9.0 + x_4)) > ((8.0 + x_6) > (2.0 + x_8)? (8.0 + x_6) : (2.0 + x_8))? ((1.0 + x_3) > (9.0 + x_4)? (1.0 + x_3) : (9.0 + x_4)) : ((8.0 + x_6) > (2.0 + x_8)? (8.0 + x_6) : (2.0 + x_8))) > (((16.0 + x_12) > (6.0 + x_14)? (16.0 + x_12) : (6.0 + x_14)) > ((8.0 + x_15) > (8.0 + x_16)? (8.0 + x_15) : (8.0 + x_16))? ((16.0 + x_12) > (6.0 + x_14)? (16.0 + x_12) : (6.0 + x_14)) : ((8.0 + x_15) > (8.0 + x_16)? (8.0 + x_15) : (8.0 + x_16)))? (((1.0 + x_3) > (9.0 + x_4)? (1.0 + x_3) : (9.0 + x_4)) > ((8.0 + x_6) > (2.0 + x_8)? (8.0 + x_6) : (2.0 + x_8))? ((1.0 + x_3) > (9.0 + x_4)? (1.0 + x_3) : (9.0 + x_4)) : ((8.0 + x_6) > (2.0 + x_8)? (8.0 + x_6) : (2.0 + x_8))) : (((16.0 + x_12) > (6.0 + x_14)? (16.0 + x_12) : (6.0 + x_14)) > ((8.0 + x_15) > (8.0 + x_16)? (8.0 + x_15) : (8.0 + x_16))? ((16.0 + x_12) > (6.0 + x_14)? (16.0 + x_12) : (6.0 + x_14)) : ((8.0 + x_15) > (8.0 + x_16)? (8.0 + x_15) : (8.0 + x_16)))) > ((((10.0 + x_17) > (16.0 + x_18)? (10.0 + x_17) : (16.0 + x_18)) > ((15.0 + x_19) > (18.0 + x_21)? (15.0 + x_19) : (18.0 + x_21))? ((10.0 + x_17) > (16.0 + x_18)? (10.0 + x_17) : (16.0 + x_18)) : ((15.0 + x_19) > (18.0 + x_21)? (15.0 + x_19) : (18.0 + x_21))) > (((16.0 + x_23) > (2.0 + x_26)? (16.0 + x_23) : (2.0 + x_26)) > ((5.0 + x_27) > (5.0 + x_29)? (5.0 + x_27) : (5.0 + x_29))? ((16.0 + x_23) > (2.0 + x_26)? (16.0 + x_23) : (2.0 + x_26)) : ((5.0 + x_27) > (5.0 + x_29)? (5.0 + x_27) : (5.0 + x_29)))? (((10.0 + x_17) > (16.0 + x_18)? (10.0 + x_17) : (16.0 + x_18)) > ((15.0 + x_19) > (18.0 + x_21)? (15.0 + x_19) : (18.0 + x_21))? ((10.0 + x_17) > (16.0 + x_18)? (10.0 + x_17) : (16.0 + x_18)) : ((15.0 + x_19) > (18.0 + x_21)? (15.0 + x_19) : (18.0 + x_21))) : (((16.0 + x_23) > (2.0 + x_26)? (16.0 + x_23) : (2.0 + x_26)) > ((5.0 + x_27) > (5.0 + x_29)? (5.0 + x_27) : (5.0 + x_29))? ((16.0 + x_23) > (2.0 + x_26)? (16.0 + x_23) : (2.0 + x_26)) : ((5.0 + x_27) > (5.0 + x_29)? (5.0 + x_27) : (5.0 + x_29))))? ((((1.0 + x_3) > (9.0 + x_4)? (1.0 + x_3) : (9.0 + x_4)) > ((8.0 + x_6) > (2.0 + x_8)? (8.0 + x_6) : (2.0 + x_8))? ((1.0 + x_3) > (9.0 + x_4)? (1.0 + x_3) : (9.0 + x_4)) : ((8.0 + x_6) > (2.0 + x_8)? (8.0 + x_6) : (2.0 + x_8))) > (((16.0 + x_12) > (6.0 + x_14)? (16.0 + x_12) : (6.0 + x_14)) > ((8.0 + x_15) > (8.0 + x_16)? (8.0 + x_15) : (8.0 + x_16))? ((16.0 + x_12) > (6.0 + x_14)? (16.0 + x_12) : (6.0 + x_14)) : ((8.0 + x_15) > (8.0 + x_16)? (8.0 + x_15) : (8.0 + x_16)))? (((1.0 + x_3) > (9.0 + x_4)? (1.0 + x_3) : (9.0 + x_4)) > ((8.0 + x_6) > (2.0 + x_8)? (8.0 + x_6) : (2.0 + x_8))? ((1.0 + x_3) > (9.0 + x_4)? (1.0 + x_3) : (9.0 + x_4)) : ((8.0 + x_6) > (2.0 + x_8)? (8.0 + x_6) : (2.0 + x_8))) : (((16.0 + x_12) > (6.0 + x_14)? (16.0 + x_12) : (6.0 + x_14)) > ((8.0 + x_15) > (8.0 + x_16)? (8.0 + x_15) : (8.0 + x_16))? ((16.0 + x_12) > (6.0 + x_14)? (16.0 + x_12) : (6.0 + x_14)) : ((8.0 + x_15) > (8.0 + x_16)? (8.0 + x_15) : (8.0 + x_16)))) : ((((10.0 + x_17) > (16.0 + x_18)? (10.0 + x_17) : (16.0 + x_18)) > ((15.0 + x_19) > (18.0 + x_21)? (15.0 + x_19) : (18.0 + x_21))? ((10.0 + x_17) > (16.0 + x_18)? (10.0 + x_17) : (16.0 + x_18)) : ((15.0 + x_19) > (18.0 + x_21)? (15.0 + x_19) : (18.0 + x_21))) > (((16.0 + x_23) > (2.0 + x_26)? (16.0 + x_23) : (2.0 + x_26)) > ((5.0 + x_27) > (5.0 + x_29)? (5.0 + x_27) : (5.0 + x_29))? ((16.0 + x_23) > (2.0 + x_26)? (16.0 + x_23) : (2.0 + x_26)) : ((5.0 + x_27) > (5.0 + x_29)? (5.0 + x_27) : (5.0 + x_29)))? (((10.0 + x_17) > (16.0 + x_18)? (10.0 + x_17) : (16.0 + x_18)) > ((15.0 + x_19) > (18.0 + x_21)? (15.0 + x_19) : (18.0 + x_21))? ((10.0 + x_17) > (16.0 + x_18)? (10.0 + x_17) : (16.0 + x_18)) : ((15.0 + x_19) > (18.0 + x_21)? (15.0 + x_19) : (18.0 + x_21))) : (((16.0 + x_23) > (2.0 + x_26)? (16.0 + x_23) : (2.0 + x_26)) > ((5.0 + x_27) > (5.0 + x_29)? (5.0 + x_27) : (5.0 + x_29))? ((16.0 + x_23) > (2.0 + x_26)? (16.0 + x_23) : (2.0 + x_26)) : ((5.0 + x_27) > (5.0 + x_29)? (5.0 + x_27) : (5.0 + x_29)))));
x_23_ = (((((1.0 + x_0) > (11.0 + x_2)? (1.0 + x_0) : (11.0 + x_2)) > ((10.0 + x_4) > (9.0 + x_5)? (10.0 + x_4) : (9.0 + x_5))? ((1.0 + x_0) > (11.0 + x_2)? (1.0 + x_0) : (11.0 + x_2)) : ((10.0 + x_4) > (9.0 + x_5)? (10.0 + x_4) : (9.0 + x_5))) > (((18.0 + x_7) > (2.0 + x_11)? (18.0 + x_7) : (2.0 + x_11)) > ((1.0 + x_13) > (10.0 + x_14)? (1.0 + x_13) : (10.0 + x_14))? ((18.0 + x_7) > (2.0 + x_11)? (18.0 + x_7) : (2.0 + x_11)) : ((1.0 + x_13) > (10.0 + x_14)? (1.0 + x_13) : (10.0 + x_14)))? (((1.0 + x_0) > (11.0 + x_2)? (1.0 + x_0) : (11.0 + x_2)) > ((10.0 + x_4) > (9.0 + x_5)? (10.0 + x_4) : (9.0 + x_5))? ((1.0 + x_0) > (11.0 + x_2)? (1.0 + x_0) : (11.0 + x_2)) : ((10.0 + x_4) > (9.0 + x_5)? (10.0 + x_4) : (9.0 + x_5))) : (((18.0 + x_7) > (2.0 + x_11)? (18.0 + x_7) : (2.0 + x_11)) > ((1.0 + x_13) > (10.0 + x_14)? (1.0 + x_13) : (10.0 + x_14))? ((18.0 + x_7) > (2.0 + x_11)? (18.0 + x_7) : (2.0 + x_11)) : ((1.0 + x_13) > (10.0 + x_14)? (1.0 + x_13) : (10.0 + x_14)))) > ((((8.0 + x_15) > (3.0 + x_16)? (8.0 + x_15) : (3.0 + x_16)) > ((18.0 + x_18) > (5.0 + x_20)? (18.0 + x_18) : (5.0 + x_20))? ((8.0 + x_15) > (3.0 + x_16)? (8.0 + x_15) : (3.0 + x_16)) : ((18.0 + x_18) > (5.0 + x_20)? (18.0 + x_18) : (5.0 + x_20))) > (((19.0 + x_22) > (6.0 + x_24)? (19.0 + x_22) : (6.0 + x_24)) > ((13.0 + x_29) > (19.0 + x_31)? (13.0 + x_29) : (19.0 + x_31))? ((19.0 + x_22) > (6.0 + x_24)? (19.0 + x_22) : (6.0 + x_24)) : ((13.0 + x_29) > (19.0 + x_31)? (13.0 + x_29) : (19.0 + x_31)))? (((8.0 + x_15) > (3.0 + x_16)? (8.0 + x_15) : (3.0 + x_16)) > ((18.0 + x_18) > (5.0 + x_20)? (18.0 + x_18) : (5.0 + x_20))? ((8.0 + x_15) > (3.0 + x_16)? (8.0 + x_15) : (3.0 + x_16)) : ((18.0 + x_18) > (5.0 + x_20)? (18.0 + x_18) : (5.0 + x_20))) : (((19.0 + x_22) > (6.0 + x_24)? (19.0 + x_22) : (6.0 + x_24)) > ((13.0 + x_29) > (19.0 + x_31)? (13.0 + x_29) : (19.0 + x_31))? ((19.0 + x_22) > (6.0 + x_24)? (19.0 + x_22) : (6.0 + x_24)) : ((13.0 + x_29) > (19.0 + x_31)? (13.0 + x_29) : (19.0 + x_31))))? ((((1.0 + x_0) > (11.0 + x_2)? (1.0 + x_0) : (11.0 + x_2)) > ((10.0 + x_4) > (9.0 + x_5)? (10.0 + x_4) : (9.0 + x_5))? ((1.0 + x_0) > (11.0 + x_2)? (1.0 + x_0) : (11.0 + x_2)) : ((10.0 + x_4) > (9.0 + x_5)? (10.0 + x_4) : (9.0 + x_5))) > (((18.0 + x_7) > (2.0 + x_11)? (18.0 + x_7) : (2.0 + x_11)) > ((1.0 + x_13) > (10.0 + x_14)? (1.0 + x_13) : (10.0 + x_14))? ((18.0 + x_7) > (2.0 + x_11)? (18.0 + x_7) : (2.0 + x_11)) : ((1.0 + x_13) > (10.0 + x_14)? (1.0 + x_13) : (10.0 + x_14)))? (((1.0 + x_0) > (11.0 + x_2)? (1.0 + x_0) : (11.0 + x_2)) > ((10.0 + x_4) > (9.0 + x_5)? (10.0 + x_4) : (9.0 + x_5))? ((1.0 + x_0) > (11.0 + x_2)? (1.0 + x_0) : (11.0 + x_2)) : ((10.0 + x_4) > (9.0 + x_5)? (10.0 + x_4) : (9.0 + x_5))) : (((18.0 + x_7) > (2.0 + x_11)? (18.0 + x_7) : (2.0 + x_11)) > ((1.0 + x_13) > (10.0 + x_14)? (1.0 + x_13) : (10.0 + x_14))? ((18.0 + x_7) > (2.0 + x_11)? (18.0 + x_7) : (2.0 + x_11)) : ((1.0 + x_13) > (10.0 + x_14)? (1.0 + x_13) : (10.0 + x_14)))) : ((((8.0 + x_15) > (3.0 + x_16)? (8.0 + x_15) : (3.0 + x_16)) > ((18.0 + x_18) > (5.0 + x_20)? (18.0 + x_18) : (5.0 + x_20))? ((8.0 + x_15) > (3.0 + x_16)? (8.0 + x_15) : (3.0 + x_16)) : ((18.0 + x_18) > (5.0 + x_20)? (18.0 + x_18) : (5.0 + x_20))) > (((19.0 + x_22) > (6.0 + x_24)? (19.0 + x_22) : (6.0 + x_24)) > ((13.0 + x_29) > (19.0 + x_31)? (13.0 + x_29) : (19.0 + x_31))? ((19.0 + x_22) > (6.0 + x_24)? (19.0 + x_22) : (6.0 + x_24)) : ((13.0 + x_29) > (19.0 + x_31)? (13.0 + x_29) : (19.0 + x_31)))? (((8.0 + x_15) > (3.0 + x_16)? (8.0 + x_15) : (3.0 + x_16)) > ((18.0 + x_18) > (5.0 + x_20)? (18.0 + x_18) : (5.0 + x_20))? ((8.0 + x_15) > (3.0 + x_16)? (8.0 + x_15) : (3.0 + x_16)) : ((18.0 + x_18) > (5.0 + x_20)? (18.0 + x_18) : (5.0 + x_20))) : (((19.0 + x_22) > (6.0 + x_24)? (19.0 + x_22) : (6.0 + x_24)) > ((13.0 + x_29) > (19.0 + x_31)? (13.0 + x_29) : (19.0 + x_31))? ((19.0 + x_22) > (6.0 + x_24)? (19.0 + x_22) : (6.0 + x_24)) : ((13.0 + x_29) > (19.0 + x_31)? (13.0 + x_29) : (19.0 + x_31)))));
x_24_ = (((((2.0 + x_0) > (9.0 + x_2)? (2.0 + x_0) : (9.0 + x_2)) > ((7.0 + x_6) > (18.0 + x_7)? (7.0 + x_6) : (18.0 + x_7))? ((2.0 + x_0) > (9.0 + x_2)? (2.0 + x_0) : (9.0 + x_2)) : ((7.0 + x_6) > (18.0 + x_7)? (7.0 + x_6) : (18.0 + x_7))) > (((19.0 + x_8) > (8.0 + x_14)? (19.0 + x_8) : (8.0 + x_14)) > ((20.0 + x_15) > (13.0 + x_16)? (20.0 + x_15) : (13.0 + x_16))? ((19.0 + x_8) > (8.0 + x_14)? (19.0 + x_8) : (8.0 + x_14)) : ((20.0 + x_15) > (13.0 + x_16)? (20.0 + x_15) : (13.0 + x_16)))? (((2.0 + x_0) > (9.0 + x_2)? (2.0 + x_0) : (9.0 + x_2)) > ((7.0 + x_6) > (18.0 + x_7)? (7.0 + x_6) : (18.0 + x_7))? ((2.0 + x_0) > (9.0 + x_2)? (2.0 + x_0) : (9.0 + x_2)) : ((7.0 + x_6) > (18.0 + x_7)? (7.0 + x_6) : (18.0 + x_7))) : (((19.0 + x_8) > (8.0 + x_14)? (19.0 + x_8) : (8.0 + x_14)) > ((20.0 + x_15) > (13.0 + x_16)? (20.0 + x_15) : (13.0 + x_16))? ((19.0 + x_8) > (8.0 + x_14)? (19.0 + x_8) : (8.0 + x_14)) : ((20.0 + x_15) > (13.0 + x_16)? (20.0 + x_15) : (13.0 + x_16)))) > ((((8.0 + x_17) > (17.0 + x_19)? (8.0 + x_17) : (17.0 + x_19)) > ((18.0 + x_20) > (15.0 + x_21)? (18.0 + x_20) : (15.0 + x_21))? ((8.0 + x_17) > (17.0 + x_19)? (8.0 + x_17) : (17.0 + x_19)) : ((18.0 + x_20) > (15.0 + x_21)? (18.0 + x_20) : (15.0 + x_21))) > (((16.0 + x_24) > (10.0 + x_25)? (16.0 + x_24) : (10.0 + x_25)) > ((5.0 + x_27) > (18.0 + x_31)? (5.0 + x_27) : (18.0 + x_31))? ((16.0 + x_24) > (10.0 + x_25)? (16.0 + x_24) : (10.0 + x_25)) : ((5.0 + x_27) > (18.0 + x_31)? (5.0 + x_27) : (18.0 + x_31)))? (((8.0 + x_17) > (17.0 + x_19)? (8.0 + x_17) : (17.0 + x_19)) > ((18.0 + x_20) > (15.0 + x_21)? (18.0 + x_20) : (15.0 + x_21))? ((8.0 + x_17) > (17.0 + x_19)? (8.0 + x_17) : (17.0 + x_19)) : ((18.0 + x_20) > (15.0 + x_21)? (18.0 + x_20) : (15.0 + x_21))) : (((16.0 + x_24) > (10.0 + x_25)? (16.0 + x_24) : (10.0 + x_25)) > ((5.0 + x_27) > (18.0 + x_31)? (5.0 + x_27) : (18.0 + x_31))? ((16.0 + x_24) > (10.0 + x_25)? (16.0 + x_24) : (10.0 + x_25)) : ((5.0 + x_27) > (18.0 + x_31)? (5.0 + x_27) : (18.0 + x_31))))? ((((2.0 + x_0) > (9.0 + x_2)? (2.0 + x_0) : (9.0 + x_2)) > ((7.0 + x_6) > (18.0 + x_7)? (7.0 + x_6) : (18.0 + x_7))? ((2.0 + x_0) > (9.0 + x_2)? (2.0 + x_0) : (9.0 + x_2)) : ((7.0 + x_6) > (18.0 + x_7)? (7.0 + x_6) : (18.0 + x_7))) > (((19.0 + x_8) > (8.0 + x_14)? (19.0 + x_8) : (8.0 + x_14)) > ((20.0 + x_15) > (13.0 + x_16)? (20.0 + x_15) : (13.0 + x_16))? ((19.0 + x_8) > (8.0 + x_14)? (19.0 + x_8) : (8.0 + x_14)) : ((20.0 + x_15) > (13.0 + x_16)? (20.0 + x_15) : (13.0 + x_16)))? (((2.0 + x_0) > (9.0 + x_2)? (2.0 + x_0) : (9.0 + x_2)) > ((7.0 + x_6) > (18.0 + x_7)? (7.0 + x_6) : (18.0 + x_7))? ((2.0 + x_0) > (9.0 + x_2)? (2.0 + x_0) : (9.0 + x_2)) : ((7.0 + x_6) > (18.0 + x_7)? (7.0 + x_6) : (18.0 + x_7))) : (((19.0 + x_8) > (8.0 + x_14)? (19.0 + x_8) : (8.0 + x_14)) > ((20.0 + x_15) > (13.0 + x_16)? (20.0 + x_15) : (13.0 + x_16))? ((19.0 + x_8) > (8.0 + x_14)? (19.0 + x_8) : (8.0 + x_14)) : ((20.0 + x_15) > (13.0 + x_16)? (20.0 + x_15) : (13.0 + x_16)))) : ((((8.0 + x_17) > (17.0 + x_19)? (8.0 + x_17) : (17.0 + x_19)) > ((18.0 + x_20) > (15.0 + x_21)? (18.0 + x_20) : (15.0 + x_21))? ((8.0 + x_17) > (17.0 + x_19)? (8.0 + x_17) : (17.0 + x_19)) : ((18.0 + x_20) > (15.0 + x_21)? (18.0 + x_20) : (15.0 + x_21))) > (((16.0 + x_24) > (10.0 + x_25)? (16.0 + x_24) : (10.0 + x_25)) > ((5.0 + x_27) > (18.0 + x_31)? (5.0 + x_27) : (18.0 + x_31))? ((16.0 + x_24) > (10.0 + x_25)? (16.0 + x_24) : (10.0 + x_25)) : ((5.0 + x_27) > (18.0 + x_31)? (5.0 + x_27) : (18.0 + x_31)))? (((8.0 + x_17) > (17.0 + x_19)? (8.0 + x_17) : (17.0 + x_19)) > ((18.0 + x_20) > (15.0 + x_21)? (18.0 + x_20) : (15.0 + x_21))? ((8.0 + x_17) > (17.0 + x_19)? (8.0 + x_17) : (17.0 + x_19)) : ((18.0 + x_20) > (15.0 + x_21)? (18.0 + x_20) : (15.0 + x_21))) : (((16.0 + x_24) > (10.0 + x_25)? (16.0 + x_24) : (10.0 + x_25)) > ((5.0 + x_27) > (18.0 + x_31)? (5.0 + x_27) : (18.0 + x_31))? ((16.0 + x_24) > (10.0 + x_25)? (16.0 + x_24) : (10.0 + x_25)) : ((5.0 + x_27) > (18.0 + x_31)? (5.0 + x_27) : (18.0 + x_31)))));
x_25_ = (((((3.0 + x_2) > (19.0 + x_3)? (3.0 + x_2) : (19.0 + x_3)) > ((8.0 + x_5) > (11.0 + x_8)? (8.0 + x_5) : (11.0 + x_8))? ((3.0 + x_2) > (19.0 + x_3)? (3.0 + x_2) : (19.0 + x_3)) : ((8.0 + x_5) > (11.0 + x_8)? (8.0 + x_5) : (11.0 + x_8))) > (((18.0 + x_9) > (1.0 + x_10)? (18.0 + x_9) : (1.0 + x_10)) > ((1.0 + x_13) > (9.0 + x_14)? (1.0 + x_13) : (9.0 + x_14))? ((18.0 + x_9) > (1.0 + x_10)? (18.0 + x_9) : (1.0 + x_10)) : ((1.0 + x_13) > (9.0 + x_14)? (1.0 + x_13) : (9.0 + x_14)))? (((3.0 + x_2) > (19.0 + x_3)? (3.0 + x_2) : (19.0 + x_3)) > ((8.0 + x_5) > (11.0 + x_8)? (8.0 + x_5) : (11.0 + x_8))? ((3.0 + x_2) > (19.0 + x_3)? (3.0 + x_2) : (19.0 + x_3)) : ((8.0 + x_5) > (11.0 + x_8)? (8.0 + x_5) : (11.0 + x_8))) : (((18.0 + x_9) > (1.0 + x_10)? (18.0 + x_9) : (1.0 + x_10)) > ((1.0 + x_13) > (9.0 + x_14)? (1.0 + x_13) : (9.0 + x_14))? ((18.0 + x_9) > (1.0 + x_10)? (18.0 + x_9) : (1.0 + x_10)) : ((1.0 + x_13) > (9.0 + x_14)? (1.0 + x_13) : (9.0 + x_14)))) > ((((15.0 + x_15) > (7.0 + x_17)? (15.0 + x_15) : (7.0 + x_17)) > ((4.0 + x_20) > (15.0 + x_22)? (4.0 + x_20) : (15.0 + x_22))? ((15.0 + x_15) > (7.0 + x_17)? (15.0 + x_15) : (7.0 + x_17)) : ((4.0 + x_20) > (15.0 + x_22)? (4.0 + x_20) : (15.0 + x_22))) > (((17.0 + x_23) > (15.0 + x_25)? (17.0 + x_23) : (15.0 + x_25)) > ((11.0 + x_29) > (20.0 + x_30)? (11.0 + x_29) : (20.0 + x_30))? ((17.0 + x_23) > (15.0 + x_25)? (17.0 + x_23) : (15.0 + x_25)) : ((11.0 + x_29) > (20.0 + x_30)? (11.0 + x_29) : (20.0 + x_30)))? (((15.0 + x_15) > (7.0 + x_17)? (15.0 + x_15) : (7.0 + x_17)) > ((4.0 + x_20) > (15.0 + x_22)? (4.0 + x_20) : (15.0 + x_22))? ((15.0 + x_15) > (7.0 + x_17)? (15.0 + x_15) : (7.0 + x_17)) : ((4.0 + x_20) > (15.0 + x_22)? (4.0 + x_20) : (15.0 + x_22))) : (((17.0 + x_23) > (15.0 + x_25)? (17.0 + x_23) : (15.0 + x_25)) > ((11.0 + x_29) > (20.0 + x_30)? (11.0 + x_29) : (20.0 + x_30))? ((17.0 + x_23) > (15.0 + x_25)? (17.0 + x_23) : (15.0 + x_25)) : ((11.0 + x_29) > (20.0 + x_30)? (11.0 + x_29) : (20.0 + x_30))))? ((((3.0 + x_2) > (19.0 + x_3)? (3.0 + x_2) : (19.0 + x_3)) > ((8.0 + x_5) > (11.0 + x_8)? (8.0 + x_5) : (11.0 + x_8))? ((3.0 + x_2) > (19.0 + x_3)? (3.0 + x_2) : (19.0 + x_3)) : ((8.0 + x_5) > (11.0 + x_8)? (8.0 + x_5) : (11.0 + x_8))) > (((18.0 + x_9) > (1.0 + x_10)? (18.0 + x_9) : (1.0 + x_10)) > ((1.0 + x_13) > (9.0 + x_14)? (1.0 + x_13) : (9.0 + x_14))? ((18.0 + x_9) > (1.0 + x_10)? (18.0 + x_9) : (1.0 + x_10)) : ((1.0 + x_13) > (9.0 + x_14)? (1.0 + x_13) : (9.0 + x_14)))? (((3.0 + x_2) > (19.0 + x_3)? (3.0 + x_2) : (19.0 + x_3)) > ((8.0 + x_5) > (11.0 + x_8)? (8.0 + x_5) : (11.0 + x_8))? ((3.0 + x_2) > (19.0 + x_3)? (3.0 + x_2) : (19.0 + x_3)) : ((8.0 + x_5) > (11.0 + x_8)? (8.0 + x_5) : (11.0 + x_8))) : (((18.0 + x_9) > (1.0 + x_10)? (18.0 + x_9) : (1.0 + x_10)) > ((1.0 + x_13) > (9.0 + x_14)? (1.0 + x_13) : (9.0 + x_14))? ((18.0 + x_9) > (1.0 + x_10)? (18.0 + x_9) : (1.0 + x_10)) : ((1.0 + x_13) > (9.0 + x_14)? (1.0 + x_13) : (9.0 + x_14)))) : ((((15.0 + x_15) > (7.0 + x_17)? (15.0 + x_15) : (7.0 + x_17)) > ((4.0 + x_20) > (15.0 + x_22)? (4.0 + x_20) : (15.0 + x_22))? ((15.0 + x_15) > (7.0 + x_17)? (15.0 + x_15) : (7.0 + x_17)) : ((4.0 + x_20) > (15.0 + x_22)? (4.0 + x_20) : (15.0 + x_22))) > (((17.0 + x_23) > (15.0 + x_25)? (17.0 + x_23) : (15.0 + x_25)) > ((11.0 + x_29) > (20.0 + x_30)? (11.0 + x_29) : (20.0 + x_30))? ((17.0 + x_23) > (15.0 + x_25)? (17.0 + x_23) : (15.0 + x_25)) : ((11.0 + x_29) > (20.0 + x_30)? (11.0 + x_29) : (20.0 + x_30)))? (((15.0 + x_15) > (7.0 + x_17)? (15.0 + x_15) : (7.0 + x_17)) > ((4.0 + x_20) > (15.0 + x_22)? (4.0 + x_20) : (15.0 + x_22))? ((15.0 + x_15) > (7.0 + x_17)? (15.0 + x_15) : (7.0 + x_17)) : ((4.0 + x_20) > (15.0 + x_22)? (4.0 + x_20) : (15.0 + x_22))) : (((17.0 + x_23) > (15.0 + x_25)? (17.0 + x_23) : (15.0 + x_25)) > ((11.0 + x_29) > (20.0 + x_30)? (11.0 + x_29) : (20.0 + x_30))? ((17.0 + x_23) > (15.0 + x_25)? (17.0 + x_23) : (15.0 + x_25)) : ((11.0 + x_29) > (20.0 + x_30)? (11.0 + x_29) : (20.0 + x_30)))));
x_26_ = (((((16.0 + x_1) > (9.0 + x_2)? (16.0 + x_1) : (9.0 + x_2)) > ((5.0 + x_3) > (6.0 + x_5)? (5.0 + x_3) : (6.0 + x_5))? ((16.0 + x_1) > (9.0 + x_2)? (16.0 + x_1) : (9.0 + x_2)) : ((5.0 + x_3) > (6.0 + x_5)? (5.0 + x_3) : (6.0 + x_5))) > (((4.0 + x_7) > (20.0 + x_8)? (4.0 + x_7) : (20.0 + x_8)) > ((9.0 + x_9) > (15.0 + x_10)? (9.0 + x_9) : (15.0 + x_10))? ((4.0 + x_7) > (20.0 + x_8)? (4.0 + x_7) : (20.0 + x_8)) : ((9.0 + x_9) > (15.0 + x_10)? (9.0 + x_9) : (15.0 + x_10)))? (((16.0 + x_1) > (9.0 + x_2)? (16.0 + x_1) : (9.0 + x_2)) > ((5.0 + x_3) > (6.0 + x_5)? (5.0 + x_3) : (6.0 + x_5))? ((16.0 + x_1) > (9.0 + x_2)? (16.0 + x_1) : (9.0 + x_2)) : ((5.0 + x_3) > (6.0 + x_5)? (5.0 + x_3) : (6.0 + x_5))) : (((4.0 + x_7) > (20.0 + x_8)? (4.0 + x_7) : (20.0 + x_8)) > ((9.0 + x_9) > (15.0 + x_10)? (9.0 + x_9) : (15.0 + x_10))? ((4.0 + x_7) > (20.0 + x_8)? (4.0 + x_7) : (20.0 + x_8)) : ((9.0 + x_9) > (15.0 + x_10)? (9.0 + x_9) : (15.0 + x_10)))) > ((((12.0 + x_15) > (19.0 + x_16)? (12.0 + x_15) : (19.0 + x_16)) > ((8.0 + x_17) > (3.0 + x_18)? (8.0 + x_17) : (3.0 + x_18))? ((12.0 + x_15) > (19.0 + x_16)? (12.0 + x_15) : (19.0 + x_16)) : ((8.0 + x_17) > (3.0 + x_18)? (8.0 + x_17) : (3.0 + x_18))) > (((19.0 + x_23) > (6.0 + x_27)? (19.0 + x_23) : (6.0 + x_27)) > ((16.0 + x_28) > (2.0 + x_31)? (16.0 + x_28) : (2.0 + x_31))? ((19.0 + x_23) > (6.0 + x_27)? (19.0 + x_23) : (6.0 + x_27)) : ((16.0 + x_28) > (2.0 + x_31)? (16.0 + x_28) : (2.0 + x_31)))? (((12.0 + x_15) > (19.0 + x_16)? (12.0 + x_15) : (19.0 + x_16)) > ((8.0 + x_17) > (3.0 + x_18)? (8.0 + x_17) : (3.0 + x_18))? ((12.0 + x_15) > (19.0 + x_16)? (12.0 + x_15) : (19.0 + x_16)) : ((8.0 + x_17) > (3.0 + x_18)? (8.0 + x_17) : (3.0 + x_18))) : (((19.0 + x_23) > (6.0 + x_27)? (19.0 + x_23) : (6.0 + x_27)) > ((16.0 + x_28) > (2.0 + x_31)? (16.0 + x_28) : (2.0 + x_31))? ((19.0 + x_23) > (6.0 + x_27)? (19.0 + x_23) : (6.0 + x_27)) : ((16.0 + x_28) > (2.0 + x_31)? (16.0 + x_28) : (2.0 + x_31))))? ((((16.0 + x_1) > (9.0 + x_2)? (16.0 + x_1) : (9.0 + x_2)) > ((5.0 + x_3) > (6.0 + x_5)? (5.0 + x_3) : (6.0 + x_5))? ((16.0 + x_1) > (9.0 + x_2)? (16.0 + x_1) : (9.0 + x_2)) : ((5.0 + x_3) > (6.0 + x_5)? (5.0 + x_3) : (6.0 + x_5))) > (((4.0 + x_7) > (20.0 + x_8)? (4.0 + x_7) : (20.0 + x_8)) > ((9.0 + x_9) > (15.0 + x_10)? (9.0 + x_9) : (15.0 + x_10))? ((4.0 + x_7) > (20.0 + x_8)? (4.0 + x_7) : (20.0 + x_8)) : ((9.0 + x_9) > (15.0 + x_10)? (9.0 + x_9) : (15.0 + x_10)))? (((16.0 + x_1) > (9.0 + x_2)? (16.0 + x_1) : (9.0 + x_2)) > ((5.0 + x_3) > (6.0 + x_5)? (5.0 + x_3) : (6.0 + x_5))? ((16.0 + x_1) > (9.0 + x_2)? (16.0 + x_1) : (9.0 + x_2)) : ((5.0 + x_3) > (6.0 + x_5)? (5.0 + x_3) : (6.0 + x_5))) : (((4.0 + x_7) > (20.0 + x_8)? (4.0 + x_7) : (20.0 + x_8)) > ((9.0 + x_9) > (15.0 + x_10)? (9.0 + x_9) : (15.0 + x_10))? ((4.0 + x_7) > (20.0 + x_8)? (4.0 + x_7) : (20.0 + x_8)) : ((9.0 + x_9) > (15.0 + x_10)? (9.0 + x_9) : (15.0 + x_10)))) : ((((12.0 + x_15) > (19.0 + x_16)? (12.0 + x_15) : (19.0 + x_16)) > ((8.0 + x_17) > (3.0 + x_18)? (8.0 + x_17) : (3.0 + x_18))? ((12.0 + x_15) > (19.0 + x_16)? (12.0 + x_15) : (19.0 + x_16)) : ((8.0 + x_17) > (3.0 + x_18)? (8.0 + x_17) : (3.0 + x_18))) > (((19.0 + x_23) > (6.0 + x_27)? (19.0 + x_23) : (6.0 + x_27)) > ((16.0 + x_28) > (2.0 + x_31)? (16.0 + x_28) : (2.0 + x_31))? ((19.0 + x_23) > (6.0 + x_27)? (19.0 + x_23) : (6.0 + x_27)) : ((16.0 + x_28) > (2.0 + x_31)? (16.0 + x_28) : (2.0 + x_31)))? (((12.0 + x_15) > (19.0 + x_16)? (12.0 + x_15) : (19.0 + x_16)) > ((8.0 + x_17) > (3.0 + x_18)? (8.0 + x_17) : (3.0 + x_18))? ((12.0 + x_15) > (19.0 + x_16)? (12.0 + x_15) : (19.0 + x_16)) : ((8.0 + x_17) > (3.0 + x_18)? (8.0 + x_17) : (3.0 + x_18))) : (((19.0 + x_23) > (6.0 + x_27)? (19.0 + x_23) : (6.0 + x_27)) > ((16.0 + x_28) > (2.0 + x_31)? (16.0 + x_28) : (2.0 + x_31))? ((19.0 + x_23) > (6.0 + x_27)? (19.0 + x_23) : (6.0 + x_27)) : ((16.0 + x_28) > (2.0 + x_31)? (16.0 + x_28) : (2.0 + x_31)))));
x_27_ = (((((17.0 + x_1) > (5.0 + x_3)? (17.0 + x_1) : (5.0 + x_3)) > ((18.0 + x_5) > (15.0 + x_6)? (18.0 + x_5) : (15.0 + x_6))? ((17.0 + x_1) > (5.0 + x_3)? (17.0 + x_1) : (5.0 + x_3)) : ((18.0 + x_5) > (15.0 + x_6)? (18.0 + x_5) : (15.0 + x_6))) > (((1.0 + x_10) > (13.0 + x_11)? (1.0 + x_10) : (13.0 + x_11)) > ((17.0 + x_15) > (4.0 + x_19)? (17.0 + x_15) : (4.0 + x_19))? ((1.0 + x_10) > (13.0 + x_11)? (1.0 + x_10) : (13.0 + x_11)) : ((17.0 + x_15) > (4.0 + x_19)? (17.0 + x_15) : (4.0 + x_19)))? (((17.0 + x_1) > (5.0 + x_3)? (17.0 + x_1) : (5.0 + x_3)) > ((18.0 + x_5) > (15.0 + x_6)? (18.0 + x_5) : (15.0 + x_6))? ((17.0 + x_1) > (5.0 + x_3)? (17.0 + x_1) : (5.0 + x_3)) : ((18.0 + x_5) > (15.0 + x_6)? (18.0 + x_5) : (15.0 + x_6))) : (((1.0 + x_10) > (13.0 + x_11)? (1.0 + x_10) : (13.0 + x_11)) > ((17.0 + x_15) > (4.0 + x_19)? (17.0 + x_15) : (4.0 + x_19))? ((1.0 + x_10) > (13.0 + x_11)? (1.0 + x_10) : (13.0 + x_11)) : ((17.0 + x_15) > (4.0 + x_19)? (17.0 + x_15) : (4.0 + x_19)))) > ((((7.0 + x_20) > (14.0 + x_21)? (7.0 + x_20) : (14.0 + x_21)) > ((13.0 + x_22) > (17.0 + x_26)? (13.0 + x_22) : (17.0 + x_26))? ((7.0 + x_20) > (14.0 + x_21)? (7.0 + x_20) : (14.0 + x_21)) : ((13.0 + x_22) > (17.0 + x_26)? (13.0 + x_22) : (17.0 + x_26))) > (((3.0 + x_27) > (3.0 + x_28)? (3.0 + x_27) : (3.0 + x_28)) > ((8.0 + x_29) > (14.0 + x_31)? (8.0 + x_29) : (14.0 + x_31))? ((3.0 + x_27) > (3.0 + x_28)? (3.0 + x_27) : (3.0 + x_28)) : ((8.0 + x_29) > (14.0 + x_31)? (8.0 + x_29) : (14.0 + x_31)))? (((7.0 + x_20) > (14.0 + x_21)? (7.0 + x_20) : (14.0 + x_21)) > ((13.0 + x_22) > (17.0 + x_26)? (13.0 + x_22) : (17.0 + x_26))? ((7.0 + x_20) > (14.0 + x_21)? (7.0 + x_20) : (14.0 + x_21)) : ((13.0 + x_22) > (17.0 + x_26)? (13.0 + x_22) : (17.0 + x_26))) : (((3.0 + x_27) > (3.0 + x_28)? (3.0 + x_27) : (3.0 + x_28)) > ((8.0 + x_29) > (14.0 + x_31)? (8.0 + x_29) : (14.0 + x_31))? ((3.0 + x_27) > (3.0 + x_28)? (3.0 + x_27) : (3.0 + x_28)) : ((8.0 + x_29) > (14.0 + x_31)? (8.0 + x_29) : (14.0 + x_31))))? ((((17.0 + x_1) > (5.0 + x_3)? (17.0 + x_1) : (5.0 + x_3)) > ((18.0 + x_5) > (15.0 + x_6)? (18.0 + x_5) : (15.0 + x_6))? ((17.0 + x_1) > (5.0 + x_3)? (17.0 + x_1) : (5.0 + x_3)) : ((18.0 + x_5) > (15.0 + x_6)? (18.0 + x_5) : (15.0 + x_6))) > (((1.0 + x_10) > (13.0 + x_11)? (1.0 + x_10) : (13.0 + x_11)) > ((17.0 + x_15) > (4.0 + x_19)? (17.0 + x_15) : (4.0 + x_19))? ((1.0 + x_10) > (13.0 + x_11)? (1.0 + x_10) : (13.0 + x_11)) : ((17.0 + x_15) > (4.0 + x_19)? (17.0 + x_15) : (4.0 + x_19)))? (((17.0 + x_1) > (5.0 + x_3)? (17.0 + x_1) : (5.0 + x_3)) > ((18.0 + x_5) > (15.0 + x_6)? (18.0 + x_5) : (15.0 + x_6))? ((17.0 + x_1) > (5.0 + x_3)? (17.0 + x_1) : (5.0 + x_3)) : ((18.0 + x_5) > (15.0 + x_6)? (18.0 + x_5) : (15.0 + x_6))) : (((1.0 + x_10) > (13.0 + x_11)? (1.0 + x_10) : (13.0 + x_11)) > ((17.0 + x_15) > (4.0 + x_19)? (17.0 + x_15) : (4.0 + x_19))? ((1.0 + x_10) > (13.0 + x_11)? (1.0 + x_10) : (13.0 + x_11)) : ((17.0 + x_15) > (4.0 + x_19)? (17.0 + x_15) : (4.0 + x_19)))) : ((((7.0 + x_20) > (14.0 + x_21)? (7.0 + x_20) : (14.0 + x_21)) > ((13.0 + x_22) > (17.0 + x_26)? (13.0 + x_22) : (17.0 + x_26))? ((7.0 + x_20) > (14.0 + x_21)? (7.0 + x_20) : (14.0 + x_21)) : ((13.0 + x_22) > (17.0 + x_26)? (13.0 + x_22) : (17.0 + x_26))) > (((3.0 + x_27) > (3.0 + x_28)? (3.0 + x_27) : (3.0 + x_28)) > ((8.0 + x_29) > (14.0 + x_31)? (8.0 + x_29) : (14.0 + x_31))? ((3.0 + x_27) > (3.0 + x_28)? (3.0 + x_27) : (3.0 + x_28)) : ((8.0 + x_29) > (14.0 + x_31)? (8.0 + x_29) : (14.0 + x_31)))? (((7.0 + x_20) > (14.0 + x_21)? (7.0 + x_20) : (14.0 + x_21)) > ((13.0 + x_22) > (17.0 + x_26)? (13.0 + x_22) : (17.0 + x_26))? ((7.0 + x_20) > (14.0 + x_21)? (7.0 + x_20) : (14.0 + x_21)) : ((13.0 + x_22) > (17.0 + x_26)? (13.0 + x_22) : (17.0 + x_26))) : (((3.0 + x_27) > (3.0 + x_28)? (3.0 + x_27) : (3.0 + x_28)) > ((8.0 + x_29) > (14.0 + x_31)? (8.0 + x_29) : (14.0 + x_31))? ((3.0 + x_27) > (3.0 + x_28)? (3.0 + x_27) : (3.0 + x_28)) : ((8.0 + x_29) > (14.0 + x_31)? (8.0 + x_29) : (14.0 + x_31)))));
x_28_ = (((((15.0 + x_0) > (8.0 + x_1)? (15.0 + x_0) : (8.0 + x_1)) > ((2.0 + x_4) > (6.0 + x_5)? (2.0 + x_4) : (6.0 + x_5))? ((15.0 + x_0) > (8.0 + x_1)? (15.0 + x_0) : (8.0 + x_1)) : ((2.0 + x_4) > (6.0 + x_5)? (2.0 + x_4) : (6.0 + x_5))) > (((19.0 + x_6) > (17.0 + x_9)? (19.0 + x_6) : (17.0 + x_9)) > ((17.0 + x_11) > (11.0 + x_12)? (17.0 + x_11) : (11.0 + x_12))? ((19.0 + x_6) > (17.0 + x_9)? (19.0 + x_6) : (17.0 + x_9)) : ((17.0 + x_11) > (11.0 + x_12)? (17.0 + x_11) : (11.0 + x_12)))? (((15.0 + x_0) > (8.0 + x_1)? (15.0 + x_0) : (8.0 + x_1)) > ((2.0 + x_4) > (6.0 + x_5)? (2.0 + x_4) : (6.0 + x_5))? ((15.0 + x_0) > (8.0 + x_1)? (15.0 + x_0) : (8.0 + x_1)) : ((2.0 + x_4) > (6.0 + x_5)? (2.0 + x_4) : (6.0 + x_5))) : (((19.0 + x_6) > (17.0 + x_9)? (19.0 + x_6) : (17.0 + x_9)) > ((17.0 + x_11) > (11.0 + x_12)? (17.0 + x_11) : (11.0 + x_12))? ((19.0 + x_6) > (17.0 + x_9)? (19.0 + x_6) : (17.0 + x_9)) : ((17.0 + x_11) > (11.0 + x_12)? (17.0 + x_11) : (11.0 + x_12)))) > ((((19.0 + x_13) > (17.0 + x_16)? (19.0 + x_13) : (17.0 + x_16)) > ((4.0 + x_18) > (20.0 + x_20)? (4.0 + x_18) : (20.0 + x_20))? ((19.0 + x_13) > (17.0 + x_16)? (19.0 + x_13) : (17.0 + x_16)) : ((4.0 + x_18) > (20.0 + x_20)? (4.0 + x_18) : (20.0 + x_20))) > (((1.0 + x_21) > (9.0 + x_24)? (1.0 + x_21) : (9.0 + x_24)) > ((5.0 + x_26) > (3.0 + x_30)? (5.0 + x_26) : (3.0 + x_30))? ((1.0 + x_21) > (9.0 + x_24)? (1.0 + x_21) : (9.0 + x_24)) : ((5.0 + x_26) > (3.0 + x_30)? (5.0 + x_26) : (3.0 + x_30)))? (((19.0 + x_13) > (17.0 + x_16)? (19.0 + x_13) : (17.0 + x_16)) > ((4.0 + x_18) > (20.0 + x_20)? (4.0 + x_18) : (20.0 + x_20))? ((19.0 + x_13) > (17.0 + x_16)? (19.0 + x_13) : (17.0 + x_16)) : ((4.0 + x_18) > (20.0 + x_20)? (4.0 + x_18) : (20.0 + x_20))) : (((1.0 + x_21) > (9.0 + x_24)? (1.0 + x_21) : (9.0 + x_24)) > ((5.0 + x_26) > (3.0 + x_30)? (5.0 + x_26) : (3.0 + x_30))? ((1.0 + x_21) > (9.0 + x_24)? (1.0 + x_21) : (9.0 + x_24)) : ((5.0 + x_26) > (3.0 + x_30)? (5.0 + x_26) : (3.0 + x_30))))? ((((15.0 + x_0) > (8.0 + x_1)? (15.0 + x_0) : (8.0 + x_1)) > ((2.0 + x_4) > (6.0 + x_5)? (2.0 + x_4) : (6.0 + x_5))? ((15.0 + x_0) > (8.0 + x_1)? (15.0 + x_0) : (8.0 + x_1)) : ((2.0 + x_4) > (6.0 + x_5)? (2.0 + x_4) : (6.0 + x_5))) > (((19.0 + x_6) > (17.0 + x_9)? (19.0 + x_6) : (17.0 + x_9)) > ((17.0 + x_11) > (11.0 + x_12)? (17.0 + x_11) : (11.0 + x_12))? ((19.0 + x_6) > (17.0 + x_9)? (19.0 + x_6) : (17.0 + x_9)) : ((17.0 + x_11) > (11.0 + x_12)? (17.0 + x_11) : (11.0 + x_12)))? (((15.0 + x_0) > (8.0 + x_1)? (15.0 + x_0) : (8.0 + x_1)) > ((2.0 + x_4) > (6.0 + x_5)? (2.0 + x_4) : (6.0 + x_5))? ((15.0 + x_0) > (8.0 + x_1)? (15.0 + x_0) : (8.0 + x_1)) : ((2.0 + x_4) > (6.0 + x_5)? (2.0 + x_4) : (6.0 + x_5))) : (((19.0 + x_6) > (17.0 + x_9)? (19.0 + x_6) : (17.0 + x_9)) > ((17.0 + x_11) > (11.0 + x_12)? (17.0 + x_11) : (11.0 + x_12))? ((19.0 + x_6) > (17.0 + x_9)? (19.0 + x_6) : (17.0 + x_9)) : ((17.0 + x_11) > (11.0 + x_12)? (17.0 + x_11) : (11.0 + x_12)))) : ((((19.0 + x_13) > (17.0 + x_16)? (19.0 + x_13) : (17.0 + x_16)) > ((4.0 + x_18) > (20.0 + x_20)? (4.0 + x_18) : (20.0 + x_20))? ((19.0 + x_13) > (17.0 + x_16)? (19.0 + x_13) : (17.0 + x_16)) : ((4.0 + x_18) > (20.0 + x_20)? (4.0 + x_18) : (20.0 + x_20))) > (((1.0 + x_21) > (9.0 + x_24)? (1.0 + x_21) : (9.0 + x_24)) > ((5.0 + x_26) > (3.0 + x_30)? (5.0 + x_26) : (3.0 + x_30))? ((1.0 + x_21) > (9.0 + x_24)? (1.0 + x_21) : (9.0 + x_24)) : ((5.0 + x_26) > (3.0 + x_30)? (5.0 + x_26) : (3.0 + x_30)))? (((19.0 + x_13) > (17.0 + x_16)? (19.0 + x_13) : (17.0 + x_16)) > ((4.0 + x_18) > (20.0 + x_20)? (4.0 + x_18) : (20.0 + x_20))? ((19.0 + x_13) > (17.0 + x_16)? (19.0 + x_13) : (17.0 + x_16)) : ((4.0 + x_18) > (20.0 + x_20)? (4.0 + x_18) : (20.0 + x_20))) : (((1.0 + x_21) > (9.0 + x_24)? (1.0 + x_21) : (9.0 + x_24)) > ((5.0 + x_26) > (3.0 + x_30)? (5.0 + x_26) : (3.0 + x_30))? ((1.0 + x_21) > (9.0 + x_24)? (1.0 + x_21) : (9.0 + x_24)) : ((5.0 + x_26) > (3.0 + x_30)? (5.0 + x_26) : (3.0 + x_30)))));
x_29_ = (((((19.0 + x_0) > (14.0 + x_5)? (19.0 + x_0) : (14.0 + x_5)) > ((3.0 + x_8) > (6.0 + x_10)? (3.0 + x_8) : (6.0 + x_10))? ((19.0 + x_0) > (14.0 + x_5)? (19.0 + x_0) : (14.0 + x_5)) : ((3.0 + x_8) > (6.0 + x_10)? (3.0 + x_8) : (6.0 + x_10))) > (((3.0 + x_13) > (2.0 + x_17)? (3.0 + x_13) : (2.0 + x_17)) > ((6.0 + x_18) > (20.0 + x_19)? (6.0 + x_18) : (20.0 + x_19))? ((3.0 + x_13) > (2.0 + x_17)? (3.0 + x_13) : (2.0 + x_17)) : ((6.0 + x_18) > (20.0 + x_19)? (6.0 + x_18) : (20.0 + x_19)))? (((19.0 + x_0) > (14.0 + x_5)? (19.0 + x_0) : (14.0 + x_5)) > ((3.0 + x_8) > (6.0 + x_10)? (3.0 + x_8) : (6.0 + x_10))? ((19.0 + x_0) > (14.0 + x_5)? (19.0 + x_0) : (14.0 + x_5)) : ((3.0 + x_8) > (6.0 + x_10)? (3.0 + x_8) : (6.0 + x_10))) : (((3.0 + x_13) > (2.0 + x_17)? (3.0 + x_13) : (2.0 + x_17)) > ((6.0 + x_18) > (20.0 + x_19)? (6.0 + x_18) : (20.0 + x_19))? ((3.0 + x_13) > (2.0 + x_17)? (3.0 + x_13) : (2.0 + x_17)) : ((6.0 + x_18) > (20.0 + x_19)? (6.0 + x_18) : (20.0 + x_19)))) > ((((18.0 + x_20) > (14.0 + x_22)? (18.0 + x_20) : (14.0 + x_22)) > ((5.0 + x_23) > (11.0 + x_25)? (5.0 + x_23) : (11.0 + x_25))? ((18.0 + x_20) > (14.0 + x_22)? (18.0 + x_20) : (14.0 + x_22)) : ((5.0 + x_23) > (11.0 + x_25)? (5.0 + x_23) : (11.0 + x_25))) > (((1.0 + x_26) > (11.0 + x_27)? (1.0 + x_26) : (11.0 + x_27)) > ((17.0 + x_28) > (6.0 + x_29)? (17.0 + x_28) : (6.0 + x_29))? ((1.0 + x_26) > (11.0 + x_27)? (1.0 + x_26) : (11.0 + x_27)) : ((17.0 + x_28) > (6.0 + x_29)? (17.0 + x_28) : (6.0 + x_29)))? (((18.0 + x_20) > (14.0 + x_22)? (18.0 + x_20) : (14.0 + x_22)) > ((5.0 + x_23) > (11.0 + x_25)? (5.0 + x_23) : (11.0 + x_25))? ((18.0 + x_20) > (14.0 + x_22)? (18.0 + x_20) : (14.0 + x_22)) : ((5.0 + x_23) > (11.0 + x_25)? (5.0 + x_23) : (11.0 + x_25))) : (((1.0 + x_26) > (11.0 + x_27)? (1.0 + x_26) : (11.0 + x_27)) > ((17.0 + x_28) > (6.0 + x_29)? (17.0 + x_28) : (6.0 + x_29))? ((1.0 + x_26) > (11.0 + x_27)? (1.0 + x_26) : (11.0 + x_27)) : ((17.0 + x_28) > (6.0 + x_29)? (17.0 + x_28) : (6.0 + x_29))))? ((((19.0 + x_0) > (14.0 + x_5)? (19.0 + x_0) : (14.0 + x_5)) > ((3.0 + x_8) > (6.0 + x_10)? (3.0 + x_8) : (6.0 + x_10))? ((19.0 + x_0) > (14.0 + x_5)? (19.0 + x_0) : (14.0 + x_5)) : ((3.0 + x_8) > (6.0 + x_10)? (3.0 + x_8) : (6.0 + x_10))) > (((3.0 + x_13) > (2.0 + x_17)? (3.0 + x_13) : (2.0 + x_17)) > ((6.0 + x_18) > (20.0 + x_19)? (6.0 + x_18) : (20.0 + x_19))? ((3.0 + x_13) > (2.0 + x_17)? (3.0 + x_13) : (2.0 + x_17)) : ((6.0 + x_18) > (20.0 + x_19)? (6.0 + x_18) : (20.0 + x_19)))? (((19.0 + x_0) > (14.0 + x_5)? (19.0 + x_0) : (14.0 + x_5)) > ((3.0 + x_8) > (6.0 + x_10)? (3.0 + x_8) : (6.0 + x_10))? ((19.0 + x_0) > (14.0 + x_5)? (19.0 + x_0) : (14.0 + x_5)) : ((3.0 + x_8) > (6.0 + x_10)? (3.0 + x_8) : (6.0 + x_10))) : (((3.0 + x_13) > (2.0 + x_17)? (3.0 + x_13) : (2.0 + x_17)) > ((6.0 + x_18) > (20.0 + x_19)? (6.0 + x_18) : (20.0 + x_19))? ((3.0 + x_13) > (2.0 + x_17)? (3.0 + x_13) : (2.0 + x_17)) : ((6.0 + x_18) > (20.0 + x_19)? (6.0 + x_18) : (20.0 + x_19)))) : ((((18.0 + x_20) > (14.0 + x_22)? (18.0 + x_20) : (14.0 + x_22)) > ((5.0 + x_23) > (11.0 + x_25)? (5.0 + x_23) : (11.0 + x_25))? ((18.0 + x_20) > (14.0 + x_22)? (18.0 + x_20) : (14.0 + x_22)) : ((5.0 + x_23) > (11.0 + x_25)? (5.0 + x_23) : (11.0 + x_25))) > (((1.0 + x_26) > (11.0 + x_27)? (1.0 + x_26) : (11.0 + x_27)) > ((17.0 + x_28) > (6.0 + x_29)? (17.0 + x_28) : (6.0 + x_29))? ((1.0 + x_26) > (11.0 + x_27)? (1.0 + x_26) : (11.0 + x_27)) : ((17.0 + x_28) > (6.0 + x_29)? (17.0 + x_28) : (6.0 + x_29)))? (((18.0 + x_20) > (14.0 + x_22)? (18.0 + x_20) : (14.0 + x_22)) > ((5.0 + x_23) > (11.0 + x_25)? (5.0 + x_23) : (11.0 + x_25))? ((18.0 + x_20) > (14.0 + x_22)? (18.0 + x_20) : (14.0 + x_22)) : ((5.0 + x_23) > (11.0 + x_25)? (5.0 + x_23) : (11.0 + x_25))) : (((1.0 + x_26) > (11.0 + x_27)? (1.0 + x_26) : (11.0 + x_27)) > ((17.0 + x_28) > (6.0 + x_29)? (17.0 + x_28) : (6.0 + x_29))? ((1.0 + x_26) > (11.0 + x_27)? (1.0 + x_26) : (11.0 + x_27)) : ((17.0 + x_28) > (6.0 + x_29)? (17.0 + x_28) : (6.0 + x_29)))));
x_30_ = (((((4.0 + x_0) > (5.0 + x_2)? (4.0 + x_0) : (5.0 + x_2)) > ((14.0 + x_3) > (10.0 + x_5)? (14.0 + x_3) : (10.0 + x_5))? ((4.0 + x_0) > (5.0 + x_2)? (4.0 + x_0) : (5.0 + x_2)) : ((14.0 + x_3) > (10.0 + x_5)? (14.0 + x_3) : (10.0 + x_5))) > (((19.0 + x_6) > (19.0 + x_7)? (19.0 + x_6) : (19.0 + x_7)) > ((5.0 + x_8) > (15.0 + x_12)? (5.0 + x_8) : (15.0 + x_12))? ((19.0 + x_6) > (19.0 + x_7)? (19.0 + x_6) : (19.0 + x_7)) : ((5.0 + x_8) > (15.0 + x_12)? (5.0 + x_8) : (15.0 + x_12)))? (((4.0 + x_0) > (5.0 + x_2)? (4.0 + x_0) : (5.0 + x_2)) > ((14.0 + x_3) > (10.0 + x_5)? (14.0 + x_3) : (10.0 + x_5))? ((4.0 + x_0) > (5.0 + x_2)? (4.0 + x_0) : (5.0 + x_2)) : ((14.0 + x_3) > (10.0 + x_5)? (14.0 + x_3) : (10.0 + x_5))) : (((19.0 + x_6) > (19.0 + x_7)? (19.0 + x_6) : (19.0 + x_7)) > ((5.0 + x_8) > (15.0 + x_12)? (5.0 + x_8) : (15.0 + x_12))? ((19.0 + x_6) > (19.0 + x_7)? (19.0 + x_6) : (19.0 + x_7)) : ((5.0 + x_8) > (15.0 + x_12)? (5.0 + x_8) : (15.0 + x_12)))) > ((((2.0 + x_16) > (11.0 + x_18)? (2.0 + x_16) : (11.0 + x_18)) > ((6.0 + x_19) > (20.0 + x_20)? (6.0 + x_19) : (20.0 + x_20))? ((2.0 + x_16) > (11.0 + x_18)? (2.0 + x_16) : (11.0 + x_18)) : ((6.0 + x_19) > (20.0 + x_20)? (6.0 + x_19) : (20.0 + x_20))) > (((19.0 + x_23) > (15.0 + x_27)? (19.0 + x_23) : (15.0 + x_27)) > ((18.0 + x_28) > (2.0 + x_30)? (18.0 + x_28) : (2.0 + x_30))? ((19.0 + x_23) > (15.0 + x_27)? (19.0 + x_23) : (15.0 + x_27)) : ((18.0 + x_28) > (2.0 + x_30)? (18.0 + x_28) : (2.0 + x_30)))? (((2.0 + x_16) > (11.0 + x_18)? (2.0 + x_16) : (11.0 + x_18)) > ((6.0 + x_19) > (20.0 + x_20)? (6.0 + x_19) : (20.0 + x_20))? ((2.0 + x_16) > (11.0 + x_18)? (2.0 + x_16) : (11.0 + x_18)) : ((6.0 + x_19) > (20.0 + x_20)? (6.0 + x_19) : (20.0 + x_20))) : (((19.0 + x_23) > (15.0 + x_27)? (19.0 + x_23) : (15.0 + x_27)) > ((18.0 + x_28) > (2.0 + x_30)? (18.0 + x_28) : (2.0 + x_30))? ((19.0 + x_23) > (15.0 + x_27)? (19.0 + x_23) : (15.0 + x_27)) : ((18.0 + x_28) > (2.0 + x_30)? (18.0 + x_28) : (2.0 + x_30))))? ((((4.0 + x_0) > (5.0 + x_2)? (4.0 + x_0) : (5.0 + x_2)) > ((14.0 + x_3) > (10.0 + x_5)? (14.0 + x_3) : (10.0 + x_5))? ((4.0 + x_0) > (5.0 + x_2)? (4.0 + x_0) : (5.0 + x_2)) : ((14.0 + x_3) > (10.0 + x_5)? (14.0 + x_3) : (10.0 + x_5))) > (((19.0 + x_6) > (19.0 + x_7)? (19.0 + x_6) : (19.0 + x_7)) > ((5.0 + x_8) > (15.0 + x_12)? (5.0 + x_8) : (15.0 + x_12))? ((19.0 + x_6) > (19.0 + x_7)? (19.0 + x_6) : (19.0 + x_7)) : ((5.0 + x_8) > (15.0 + x_12)? (5.0 + x_8) : (15.0 + x_12)))? (((4.0 + x_0) > (5.0 + x_2)? (4.0 + x_0) : (5.0 + x_2)) > ((14.0 + x_3) > (10.0 + x_5)? (14.0 + x_3) : (10.0 + x_5))? ((4.0 + x_0) > (5.0 + x_2)? (4.0 + x_0) : (5.0 + x_2)) : ((14.0 + x_3) > (10.0 + x_5)? (14.0 + x_3) : (10.0 + x_5))) : (((19.0 + x_6) > (19.0 + x_7)? (19.0 + x_6) : (19.0 + x_7)) > ((5.0 + x_8) > (15.0 + x_12)? (5.0 + x_8) : (15.0 + x_12))? ((19.0 + x_6) > (19.0 + x_7)? (19.0 + x_6) : (19.0 + x_7)) : ((5.0 + x_8) > (15.0 + x_12)? (5.0 + x_8) : (15.0 + x_12)))) : ((((2.0 + x_16) > (11.0 + x_18)? (2.0 + x_16) : (11.0 + x_18)) > ((6.0 + x_19) > (20.0 + x_20)? (6.0 + x_19) : (20.0 + x_20))? ((2.0 + x_16) > (11.0 + x_18)? (2.0 + x_16) : (11.0 + x_18)) : ((6.0 + x_19) > (20.0 + x_20)? (6.0 + x_19) : (20.0 + x_20))) > (((19.0 + x_23) > (15.0 + x_27)? (19.0 + x_23) : (15.0 + x_27)) > ((18.0 + x_28) > (2.0 + x_30)? (18.0 + x_28) : (2.0 + x_30))? ((19.0 + x_23) > (15.0 + x_27)? (19.0 + x_23) : (15.0 + x_27)) : ((18.0 + x_28) > (2.0 + x_30)? (18.0 + x_28) : (2.0 + x_30)))? (((2.0 + x_16) > (11.0 + x_18)? (2.0 + x_16) : (11.0 + x_18)) > ((6.0 + x_19) > (20.0 + x_20)? (6.0 + x_19) : (20.0 + x_20))? ((2.0 + x_16) > (11.0 + x_18)? (2.0 + x_16) : (11.0 + x_18)) : ((6.0 + x_19) > (20.0 + x_20)? (6.0 + x_19) : (20.0 + x_20))) : (((19.0 + x_23) > (15.0 + x_27)? (19.0 + x_23) : (15.0 + x_27)) > ((18.0 + x_28) > (2.0 + x_30)? (18.0 + x_28) : (2.0 + x_30))? ((19.0 + x_23) > (15.0 + x_27)? (19.0 + x_23) : (15.0 + x_27)) : ((18.0 + x_28) > (2.0 + x_30)? (18.0 + x_28) : (2.0 + x_30)))));
x_31_ = (((((19.0 + x_0) > (7.0 + x_3)? (19.0 + x_0) : (7.0 + x_3)) > ((18.0 + x_5) > (1.0 + x_6)? (18.0 + x_5) : (1.0 + x_6))? ((19.0 + x_0) > (7.0 + x_3)? (19.0 + x_0) : (7.0 + x_3)) : ((18.0 + x_5) > (1.0 + x_6)? (18.0 + x_5) : (1.0 + x_6))) > (((8.0 + x_8) > (4.0 + x_11)? (8.0 + x_8) : (4.0 + x_11)) > ((17.0 + x_14) > (5.0 + x_15)? (17.0 + x_14) : (5.0 + x_15))? ((8.0 + x_8) > (4.0 + x_11)? (8.0 + x_8) : (4.0 + x_11)) : ((17.0 + x_14) > (5.0 + x_15)? (17.0 + x_14) : (5.0 + x_15)))? (((19.0 + x_0) > (7.0 + x_3)? (19.0 + x_0) : (7.0 + x_3)) > ((18.0 + x_5) > (1.0 + x_6)? (18.0 + x_5) : (1.0 + x_6))? ((19.0 + x_0) > (7.0 + x_3)? (19.0 + x_0) : (7.0 + x_3)) : ((18.0 + x_5) > (1.0 + x_6)? (18.0 + x_5) : (1.0 + x_6))) : (((8.0 + x_8) > (4.0 + x_11)? (8.0 + x_8) : (4.0 + x_11)) > ((17.0 + x_14) > (5.0 + x_15)? (17.0 + x_14) : (5.0 + x_15))? ((8.0 + x_8) > (4.0 + x_11)? (8.0 + x_8) : (4.0 + x_11)) : ((17.0 + x_14) > (5.0 + x_15)? (17.0 + x_14) : (5.0 + x_15)))) > ((((17.0 + x_18) > (2.0 + x_19)? (17.0 + x_18) : (2.0 + x_19)) > ((12.0 + x_24) > (9.0 + x_25)? (12.0 + x_24) : (9.0 + x_25))? ((17.0 + x_18) > (2.0 + x_19)? (17.0 + x_18) : (2.0 + x_19)) : ((12.0 + x_24) > (9.0 + x_25)? (12.0 + x_24) : (9.0 + x_25))) > (((5.0 + x_26) > (12.0 + x_27)? (5.0 + x_26) : (12.0 + x_27)) > ((1.0 + x_29) > (11.0 + x_30)? (1.0 + x_29) : (11.0 + x_30))? ((5.0 + x_26) > (12.0 + x_27)? (5.0 + x_26) : (12.0 + x_27)) : ((1.0 + x_29) > (11.0 + x_30)? (1.0 + x_29) : (11.0 + x_30)))? (((17.0 + x_18) > (2.0 + x_19)? (17.0 + x_18) : (2.0 + x_19)) > ((12.0 + x_24) > (9.0 + x_25)? (12.0 + x_24) : (9.0 + x_25))? ((17.0 + x_18) > (2.0 + x_19)? (17.0 + x_18) : (2.0 + x_19)) : ((12.0 + x_24) > (9.0 + x_25)? (12.0 + x_24) : (9.0 + x_25))) : (((5.0 + x_26) > (12.0 + x_27)? (5.0 + x_26) : (12.0 + x_27)) > ((1.0 + x_29) > (11.0 + x_30)? (1.0 + x_29) : (11.0 + x_30))? ((5.0 + x_26) > (12.0 + x_27)? (5.0 + x_26) : (12.0 + x_27)) : ((1.0 + x_29) > (11.0 + x_30)? (1.0 + x_29) : (11.0 + x_30))))? ((((19.0 + x_0) > (7.0 + x_3)? (19.0 + x_0) : (7.0 + x_3)) > ((18.0 + x_5) > (1.0 + x_6)? (18.0 + x_5) : (1.0 + x_6))? ((19.0 + x_0) > (7.0 + x_3)? (19.0 + x_0) : (7.0 + x_3)) : ((18.0 + x_5) > (1.0 + x_6)? (18.0 + x_5) : (1.0 + x_6))) > (((8.0 + x_8) > (4.0 + x_11)? (8.0 + x_8) : (4.0 + x_11)) > ((17.0 + x_14) > (5.0 + x_15)? (17.0 + x_14) : (5.0 + x_15))? ((8.0 + x_8) > (4.0 + x_11)? (8.0 + x_8) : (4.0 + x_11)) : ((17.0 + x_14) > (5.0 + x_15)? (17.0 + x_14) : (5.0 + x_15)))? (((19.0 + x_0) > (7.0 + x_3)? (19.0 + x_0) : (7.0 + x_3)) > ((18.0 + x_5) > (1.0 + x_6)? (18.0 + x_5) : (1.0 + x_6))? ((19.0 + x_0) > (7.0 + x_3)? (19.0 + x_0) : (7.0 + x_3)) : ((18.0 + x_5) > (1.0 + x_6)? (18.0 + x_5) : (1.0 + x_6))) : (((8.0 + x_8) > (4.0 + x_11)? (8.0 + x_8) : (4.0 + x_11)) > ((17.0 + x_14) > (5.0 + x_15)? (17.0 + x_14) : (5.0 + x_15))? ((8.0 + x_8) > (4.0 + x_11)? (8.0 + x_8) : (4.0 + x_11)) : ((17.0 + x_14) > (5.0 + x_15)? (17.0 + x_14) : (5.0 + x_15)))) : ((((17.0 + x_18) > (2.0 + x_19)? (17.0 + x_18) : (2.0 + x_19)) > ((12.0 + x_24) > (9.0 + x_25)? (12.0 + x_24) : (9.0 + x_25))? ((17.0 + x_18) > (2.0 + x_19)? (17.0 + x_18) : (2.0 + x_19)) : ((12.0 + x_24) > (9.0 + x_25)? (12.0 + x_24) : (9.0 + x_25))) > (((5.0 + x_26) > (12.0 + x_27)? (5.0 + x_26) : (12.0 + x_27)) > ((1.0 + x_29) > (11.0 + x_30)? (1.0 + x_29) : (11.0 + x_30))? ((5.0 + x_26) > (12.0 + x_27)? (5.0 + x_26) : (12.0 + x_27)) : ((1.0 + x_29) > (11.0 + x_30)? (1.0 + x_29) : (11.0 + x_30)))? (((17.0 + x_18) > (2.0 + x_19)? (17.0 + x_18) : (2.0 + x_19)) > ((12.0 + x_24) > (9.0 + x_25)? (12.0 + x_24) : (9.0 + x_25))? ((17.0 + x_18) > (2.0 + x_19)? (17.0 + x_18) : (2.0 + x_19)) : ((12.0 + x_24) > (9.0 + x_25)? (12.0 + x_24) : (9.0 + x_25))) : (((5.0 + x_26) > (12.0 + x_27)? (5.0 + x_26) : (12.0 + x_27)) > ((1.0 + x_29) > (11.0 + x_30)? (1.0 + x_29) : (11.0 + x_30))? ((5.0 + x_26) > (12.0 + x_27)? (5.0 + x_26) : (12.0 + x_27)) : ((1.0 + x_29) > (11.0 + x_30)? (1.0 + x_29) : (11.0 + x_30)))));
x_0 = x_0_;
x_1 = x_1_;
x_2 = x_2_;
x_3 = x_3_;
x_4 = x_4_;
x_5 = x_5_;
x_6 = x_6_;
x_7 = x_7_;
x_8 = x_8_;
x_9 = x_9_;
x_10 = x_10_;
x_11 = x_11_;
x_12 = x_12_;
x_13 = x_13_;
x_14 = x_14_;
x_15 = x_15_;
x_16 = x_16_;
x_17 = x_17_;
x_18 = x_18_;
x_19 = x_19_;
x_20 = x_20_;
x_21 = x_21_;
x_22 = x_22_;
x_23 = x_23_;
x_24 = x_24_;
x_25 = x_25_;
x_26 = x_26_;
x_27 = x_27_;
x_28 = x_28_;
x_29 = x_29_;
x_30 = x_30_;
x_31 = x_31_;
}
return 0;
}
|
the_stack_data/18888016.c | #include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <strings.h>
int main(int argc, char *argv[])
{
if(argc<2){
fprintf(stderr,"Too few arguments provided");
exit(EXIT_FAILURE);
}
FILE *file;
if(!(file=fopen(argv[1],"r"))){
fprintf(stderr,"cant open %s file",argv[1]);
exit(EXIT_FAILURE);
}
char ch=0;
while(getc(file)!=EOF) ch++;
fclose(file);
printf("%d characters in %s",ch,argv[1]);
return 0;
}
|
the_stack_data/206393497.c | // Empty Descending Stack implementation in C
#include <stdio.h>
#include <stdlib.h>
#define MAX 5
int count = 0;
// Creating a stack
struct stack {
int items[MAX];
int top;
};
typedef struct stack st;
void createEmptyStack(st *s) {
s->top = MAX;
}
// Check if the stack is full
int isfull(st *s) {
if (s->top == -1)
return 1;
else
return 0;
}
// Check if the stack is empty
int isempty(st *s) {
if (s->top == MAX)
return 1;
else
return 0;
}
// Add elements into stack
void push(st *s, int newitem) {
if (isfull(s)) {
printf("STACK FULL");
} else {
s->top--;
s->items[s->top] = newitem;
}
count++;
}
// Remove element from stack
void pop(st *s) {
if (isempty(s)) {
printf("\n STACK EMPTY \n");
} else {
printf("Item popped= %d", s->items[s->top]);
s->top++;
}
count--;
printf("\n");
}
// Print elements of stack
void printStack(st *s) {
printf("Stack: ");
for (int i = MAX-1; i > MAX-count-1; i--) {
printf("%d %p ", s->items[i], &(s->items[i]));
}
printf("\n");
}
// Driver code
int main() {
int ch;
st *s = (st *)malloc(sizeof(st));
createEmptyStack(s);
push(s, 1);
push(s, 2);
push(s, 3);
push(s, 4);
printStack(s);
pop(s);
printf("\nAfter popping out\n");
printStack(s);
} |
the_stack_data/90559.c | /*
Copyright (C) 1991-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it andor
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http:www.gnu.org/licenses/>.
*/
/*
This header is separate from features.h so that the compiler can
include it implicitly at the start of every compilation. It must
not itself include <features.h> or any other header that includes
<features.h> because the implicit include comes before any feature
test macros that may be defined in a source file before it first
explicitly includes a system header. GCC knows the name of this
header in order to preinclude it.
*/
/*
glibc's intent is to support the IEC 559 math functionality, real
and complex. If the GCC (4.9 and later) predefined macros
specifying compiler intent are available, use them to determine
whether the overall intent is to support these features; otherwise,
presume an older compiler has intent to support these features and
define these macros by default.
*/
/*
wchar_t uses Unicode 10.0.0. Version 10.0 of the Unicode Standard is
synchronized with ISOIEC 10646:2017, fifth edition, plus
the following additions from Amendment 1 to the fifth edition:
- 56 emoji characters
- 285 hentaigana
- 3 additional Zanabazar Square characters
*/
/*
Copyright (c) 2017, Lawrence Livermore National Security, LLC.
Produced at the Lawrence Livermore National Laboratory
Written by Chunhua Liao, Pei-Hung Lin, Joshua Asplund,
Markus Schordan, and Ian Karlin
(email: [email protected], [email protected], [email protected],
[email protected], [email protected])
LLNL-CODE-732144
All rights reserved.
This file is part of DataRaceBench. For details, see
https:github.comLLNL/dataracebench. Please also see the LICENSE file
for our additional BSD notice.
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 disclaimer below.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the disclaimer (as noted below)
in the documentation and/or other materials provided with the
distribution.
* Neither the name of the LLNS/LLNL 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 LAWRENCE LIVERMORE NATIONAL
SECURITY, LLC, THE U.S. DEPARTMENT OF ENERGY 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 <stdio.h>
/*
loop missing the linear clause
* Data race pair: j@67:7 vs. j@68:5
*/
int main()
{
int len = 100;
double a[len], b[len], c[len];
int i, j = 0;
int _ret_val_0;
#pragma cetus private(i)
#pragma loop name main#0
#pragma cetus parallel
#pragma omp parallel for private(i)
for (i=0; i<len; i ++ )
{
a[i]=(((double)i)/2.0);
b[i]=(((double)i)/3.0);
c[i]=(((double)i)/7.0);
}
#pragma cetus private(i)
#pragma loop name main#1
#pragma cetus reduction(+: c[i+j])
#pragma cetus parallel
#pragma omp parallel for private(i) reduction(+: c[i+j])
for (i=0; i<len; i ++ )
{
c[i+j]+=(a[i]*b[i]);
}
j+=len;
printf("c[50]=%f\n", c[50]);
_ret_val_0=0;
return _ret_val_0;
}
|
the_stack_data/71397.c | // KMSAN: uninit-value in ghash_setkey
// https://syzkaller.appspot.com/bug?id=f52d29f1bf448bac0db8ee99e5371fad053b3db5
// status:invalid
// autogenerated by syzkaller (http://github.com/google/syzkaller)
#define _GNU_SOURCE
#include <endian.h>
#include <linux/futex.h>
#include <pthread.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <sys/syscall.h>
#include <unistd.h>
static void execute_one();
extern unsigned long long procid;
void loop()
{
while (1) {
execute_one();
}
}
struct thread_t {
int created, running, call;
pthread_t th;
};
static struct thread_t threads[16];
static void execute_call(int call);
static int running;
static int collide;
static void* thr(void* arg)
{
struct thread_t* th = (struct thread_t*)arg;
for (;;) {
while (!__atomic_load_n(&th->running, __ATOMIC_ACQUIRE))
syscall(SYS_futex, &th->running, FUTEX_WAIT, 0, 0);
execute_call(th->call);
__atomic_fetch_sub(&running, 1, __ATOMIC_RELAXED);
__atomic_store_n(&th->running, 0, __ATOMIC_RELEASE);
syscall(SYS_futex, &th->running, FUTEX_WAKE);
}
return 0;
}
static void execute(int num_calls)
{
int call, thread;
running = 0;
for (call = 0; call < num_calls; call++) {
for (thread = 0; thread < sizeof(threads) / sizeof(threads[0]); thread++) {
struct thread_t* th = &threads[thread];
if (!th->created) {
th->created = 1;
pthread_attr_t attr;
pthread_attr_init(&attr);
pthread_attr_setstacksize(&attr, 128 << 10);
pthread_create(&th->th, &attr, thr, th);
}
if (!__atomic_load_n(&th->running, __ATOMIC_ACQUIRE)) {
th->call = call;
__atomic_fetch_add(&running, 1, __ATOMIC_RELAXED);
__atomic_store_n(&th->running, 1, __ATOMIC_RELEASE);
syscall(SYS_futex, &th->running, FUTEX_WAKE);
if (collide && call % 2)
break;
struct timespec ts;
ts.tv_sec = 0;
ts.tv_nsec = 20 * 1000 * 1000;
syscall(SYS_futex, &th->running, FUTEX_WAIT, 1, &ts);
if (running)
usleep((call == num_calls - 1) ? 10000 : 1000);
break;
}
}
}
}
uint64_t r[1] = {0xffffffffffffffff};
void execute_call(int call)
{
long res;
switch (call) {
case 0:
res = syscall(__NR_socket, 0x26, 5, 0);
if (res != -1)
r[0] = res;
break;
case 1:
*(uint16_t*)0x20000000 = 0x26;
memcpy((void*)0x20000002,
"\x61\x65\x61\x64\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", 14);
*(uint32_t*)0x20000010 = 0;
*(uint32_t*)0x20000014 = 0;
memcpy((void*)0x20000018,
"\x67\x63\x6d\x28\x61\x65\x73\x2d\x61\x73\x6d\x29\x00\x00\x00\x00"
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00",
64);
syscall(__NR_bind, r[0], 0x20000000, 0x58);
break;
case 2:
memcpy((void*)0x200000c0,
"\x71\xe6\x7a\x15\xcd\xf0\x31\x1c\xfc\x09\x3a\x52\xa7\xd8\x6b\xd1",
16);
syscall(__NR_setsockopt, r[0], 0x117, 1, 0x200000c0, 0x10);
break;
}
}
void execute_one()
{
execute(3);
collide = 1;
execute(3);
}
int main()
{
syscall(__NR_mmap, 0x20000000, 0x1000000, 3, 0x32, -1, 0);
for (;;) {
loop();
}
}
|
the_stack_data/716892.c | #include <assert.h>
int global;
void other_func1(int z, int my_func(int b, int c))
{
my_func(1, 2);
}
void other_func2(int z, int my_func(int b, int c), int y)
{
}
void my_f1(int array[*]);
void my_f1(int array[])
{
}
int whatnot(int p1, int p2)
{
global=p2;
}
int main()
{
int *p;
my_f1(p);
other_func1(1, whatnot);
assert(global==2);
}
|
the_stack_data/20449165.c | extern void callmesecond();
static void callmealias() __attribute__((weakref ("callmesecond")));
void
b()
{
callmealias();
}
|
the_stack_data/48615.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#ifdef unix
#include <unistd.h>
#define SEED getpid() + time(NULL)
#else
#define SEED time(NULL)
#endif
#define ARRAY_N 1000
void swap(int [], int, int);
int median(int [], int, int);
int left(int [], int, int);
void quickSort(int [], int, int, int (*)(int [], int, int));
void printArray(int [], int);
int main()
{
srand(SEED);
int n = ARRAY_N;
int array[ARRAY_N];
for (int i = 0; i < n; ++i) {
array[i] = rand() % 100 + 1;
}
int* arr = malloc(n * sizeof(*arr));
clock_t start;
clock_t end;
memcpy(arr, array, n * sizeof(*array));
start = clock();
quickSort(arr, 0, n-1, left);
end = clock();
printf("left: %d\n", end - start);
memcpy(arr, array, n * sizeof(*array));
start = clock();
quickSort(arr, 0, n-1, median);
end = clock();
printf("median: %d\n", end - start);
free(arr);
return 0;
}
/* RESULTS:
* n = 100
* left: 10
* median: 10
*
* left: 11
* median: 10
*
* n = 10000
* left: 1709
* median: 1541
*
* left: 1681
* median: 1565
*
* n = 1000000
* left: 3190169
* median: 2914469
*
* left: 3191781
* median: 2926509
*/
void swap(int arr[], int a, int b)
{
int temp = arr[a];
arr[a] = arr[b];
arr[b] = temp;
}
int median(int arr[], int L, int R)
{
int m = (L + R)/2;
if (arr[m] > arr[L]) {
swap(arr, L, m);
}
if (arr[L] > arr[R]) {
swap(arr, L, R);
}
if (arr[m] > arr[R]) {
swap(arr, m, R);
}
int pivot = arr[L];
int i = R;
for (int j = R; j >= L + 1; --j) {
if (arr[j] >= pivot) {
swap(arr, i, j);
--i;
}
}
swap(arr, i, L);
return i;
}
int left(int arr[], int L, int R)
{
int pivot = arr[L];
int i = R;
for (int j = R; j >= L + 1; --j) {
if (arr[j] >= pivot) {
swap(arr, i, j);
--i;
}
}
swap(arr, i, L);
return i;
}
void quickSort(int arr[], int L, int R, int (*partition)(int [], int, int))
{
if (L < R) {
int q = partition(arr, L, R);
quickSort(arr, L, q, partition);
quickSort(arr, q + 1, R, partition);
}
}
void printArray(int arr[], int n)
{
for (int i = 0; i < n; ++i) {
printf("%d ", arr[i]);
}
printf("\n");
}
// vim: fen
|
the_stack_data/22013555.c | // Copyright (c) 2015-2016 Nuxi, https://nuxi.nl/
//
// SPDX-License-Identifier: BSD-2-Clause
#include <stdint.h>
#include <wchar.h>
// The wcwidth() uses the same concept as the isw*() functions, where it
// performs a binary search over a table with 32-bit entries to
// determine the return value for the wide character provided.
//
// The wcwidth() function is supposed to return a non-negative value iff
// the character is printable or is the null character. This means that
// it uses a table similar to iswprint(). As we now also need to store
// the width of the characters, extents now use only 9 bits for the
// length. The two spare bits between the starting codepoint and the
// length of the extent are used to encode the width of the characters
// covered by the extent.
int wcwidth(wchar_t wc) {
static const uint32_t extents[] = {
0x00000000, 0x0001025e, 0x0005020c, 0x00056800, 0x000573ff, 0x00157251,
0x0018006f, 0x001b8207, 0x001bd205, 0x001c2206, 0x001c6200, 0x001c7213,
0x001d1adf, 0x00241806, 0x002452a5, 0x00298a25, 0x002aca06, 0x002b0a26,
0x002c4a01, 0x002c6a02, 0x002c882c, 0x002df200, 0x002df800, 0x002e0200,
0x002e0801, 0x002e1a00, 0x002e2001, 0x002e3200, 0x002e3800, 0x002e821a,
0x002f8204, 0x00300005, 0x00303209, 0x0030800a, 0x0030da00, 0x0030e000,
0x0030f22c, 0x00325814, 0x0033020f, 0x00338000, 0x00338a64, 0x0036b007,
0x0036f200, 0x0036f805, 0x00372a01, 0x00373801, 0x00374a00, 0x00375003,
0x0037721f, 0x00387800, 0x00388200, 0x00388800, 0x0038921d, 0x0039801a,
0x003a6a58, 0x003d300a, 0x003d8a00, 0x003e022a, 0x003f5808, 0x003fa206,
0x00400215, 0x0040b003, 0x0040d200, 0x0040d808, 0x00412200, 0x00412802,
0x00414200, 0x00414804, 0x0041820e, 0x00420218, 0x0042c802, 0x0042f200,
0x00450214, 0x0045b207, 0x0046a02e, 0x00481a36, 0x0049d000, 0x0049da00,
0x0049e000, 0x0049ea03, 0x004a0807, 0x004a4a03, 0x004a6800, 0x004a7202,
0x004a8806, 0x004ac209, 0x004b1001, 0x004b221c, 0x004c0800, 0x004c1201,
0x004c2a07, 0x004c7a01, 0x004c9a15, 0x004d5206, 0x004d9200, 0x004db203,
0x004de000, 0x004dea03, 0x004e0803, 0x004e3a01, 0x004e5a01, 0x004e6800,
0x004e7200, 0x004eba00, 0x004ee201, 0x004efa02, 0x004f1001, 0x004f3215,
0x00500801, 0x00501a00, 0x00502a05, 0x00507a01, 0x00509a15, 0x00515206,
0x00519201, 0x0051aa01, 0x0051c201, 0x0051e000, 0x0051f202, 0x00520801,
0x00523801, 0x00525802, 0x00528800, 0x0052ca03, 0x0052f200, 0x00533209,
0x00538001, 0x00539202, 0x0053a800, 0x00540801, 0x00541a00, 0x00542a08,
0x00547a02, 0x00549a15, 0x00555206, 0x00559201, 0x0055aa04, 0x0055e000,
0x0055ea03, 0x00560804, 0x00563801, 0x00564a00, 0x00565a01, 0x00566800,
0x00568200, 0x00570201, 0x00571001, 0x0057320b, 0x0057ca00, 0x00580800,
0x00581201, 0x00582a07, 0x00587a01, 0x00589a15, 0x00595206, 0x00599201,
0x0059aa04, 0x0059e000, 0x0059ea01, 0x0059f800, 0x005a0200, 0x005a0803,
0x005a3a01, 0x005a5a01, 0x005a6800, 0x005ab000, 0x005aba00, 0x005ae201,
0x005afa02, 0x005b1001, 0x005b3211, 0x005c1000, 0x005c1a00, 0x005c2a05,
0x005c7202, 0x005c9203, 0x005cca01, 0x005ce200, 0x005cf201, 0x005d1a01,
0x005d4202, 0x005d720b, 0x005df201, 0x005e0000, 0x005e0a01, 0x005e3202,
0x005e5202, 0x005e6800, 0x005e8200, 0x005eba00, 0x005f3214, 0x00600000,
0x00600a02, 0x00602a07, 0x00607202, 0x00609216, 0x0061520f, 0x0061ea00,
0x0061f002, 0x00620a03, 0x00623002, 0x00625003, 0x0062a801, 0x0062c202,
0x00630201, 0x00631001, 0x00633209, 0x0063c208, 0x00640800, 0x00641201,
0x00642a07, 0x00647202, 0x00649216, 0x00655209, 0x0065aa04, 0x0065e000,
0x0065ea01, 0x0065f800, 0x00660204, 0x00663000, 0x00663a01, 0x00665201,
0x00666001, 0x0066aa01, 0x0066f200, 0x00670201, 0x00671001, 0x00673209,
0x00678a01, 0x00680800, 0x00681201, 0x00682a07, 0x00687202, 0x00689228,
0x0069ea03, 0x006a0803, 0x006a3202, 0x006a5202, 0x006a6800, 0x006a7201,
0x006aa20d, 0x006b1001, 0x006b3219, 0x006c1201, 0x006c2a11, 0x006cd217,
0x006d9a08, 0x006dea00, 0x006e0206, 0x006e5000, 0x006e7a02, 0x006e9002,
0x006eb000, 0x006ec207, 0x006f3209, 0x006f9202, 0x00700a2f, 0x00718800,
0x00719201, 0x0071a006, 0x0071fa07, 0x00723807, 0x00727a0c, 0x00740a01,
0x00742200, 0x00743a01, 0x00745200, 0x00746a00, 0x0074a203, 0x0074ca06,
0x00750a02, 0x00752a00, 0x00753a00, 0x00755201, 0x00756a03, 0x00758800,
0x00759201, 0x0075a005, 0x0075d801, 0x0075ea00, 0x00760204, 0x00763200,
0x00764005, 0x00768209, 0x0076e203, 0x00780217, 0x0078c001, 0x0078d21a,
0x0079a800, 0x0079b200, 0x0079b800, 0x0079c200, 0x0079c800, 0x0079d20d,
0x007a4a23, 0x007b880d, 0x007bfa00, 0x007c0004, 0x007c2a00, 0x007c3001,
0x007c4204, 0x007c680a, 0x007cc823, 0x007df207, 0x007e3000, 0x007e3a05,
0x007e720c, 0x0080022c, 0x00816803, 0x00818a00, 0x00819005, 0x0081c200,
0x0081c801, 0x0081da01, 0x0081e801, 0x0081fa18, 0x0082c001, 0x0082d203,
0x0082f002, 0x00830a0f, 0x00838803, 0x0083aa0c, 0x00841000, 0x00841a01,
0x00842801, 0x00843a05, 0x00846800, 0x0084720e, 0x0084e800, 0x0084f227,
0x00863a00, 0x00866a00, 0x0086822f, 0x0088045f, 0x008b02e8, 0x00925203,
0x00928206, 0x0092c200, 0x0092d203, 0x00930228, 0x00945203, 0x00948220,
0x00959203, 0x0095c206, 0x00960200, 0x00961203, 0x0096420e, 0x0096c238,
0x00989203, 0x0098c242, 0x009ae802, 0x009b021c, 0x009c0219, 0x009d0255,
0x009fc205, 0x00a003ff, 0x00b0029c, 0x00b50258, 0x00b8020c, 0x00b87203,
0x00b89002, 0x00b90211, 0x00b99002, 0x00b9aa01, 0x00ba0211, 0x00ba9001,
0x00bb020c, 0x00bb7202, 0x00bb9001, 0x00bc0233, 0x00bda001, 0x00bdb200,
0x00bdb806, 0x00bdf207, 0x00be3000, 0x00be3a01, 0x00be480a, 0x00bea208,
0x00bee800, 0x00bf0209, 0x00bf8209, 0x00c0020a, 0x00c05803, 0x00c08209,
0x00c10257, 0x00c40204, 0x00c42801, 0x00c43a21, 0x00c54800, 0x00c55200,
0x00c58245, 0x00c8021e, 0x00c90002, 0x00c91a03, 0x00c93801, 0x00c94a02,
0x00c98201, 0x00c99000, 0x00c99a05, 0x00c9c802, 0x00ca0200, 0x00ca2229,
0x00cb8204, 0x00cc022b, 0x00cd8219, 0x00ce820a, 0x00cef238, 0x00d0b801,
0x00d0ca01, 0x00d0d800, 0x00d0f237, 0x00d2b000, 0x00d2ba00, 0x00d2c006,
0x00d30000, 0x00d30a00, 0x00d31000, 0x00d31a01, 0x00d32807, 0x00d36a05,
0x00d39809, 0x00d3f800, 0x00d40209, 0x00d48209, 0x00d5020d, 0x00d5800e,
0x00d80003, 0x00d8222f, 0x00d9a000, 0x00d9aa00, 0x00d9b004, 0x00d9da00,
0x00d9e000, 0x00d9ea04, 0x00da1000, 0x00da1a08, 0x00da821a, 0x00db5808,
0x00dba208, 0x00dc0001, 0x00dc121f, 0x00dd1003, 0x00dd3201, 0x00dd4001,
0x00dd5200, 0x00dd5802, 0x00dd7237, 0x00df3000, 0x00df3a00, 0x00df4001,
0x00df5202, 0x00df6800, 0x00df7200, 0x00df7802, 0x00df9201, 0x00dfe22f,
0x00e16007, 0x00e1a201, 0x00e1b001, 0x00e1da0e, 0x00e26a3b, 0x00e60207,
0x00e68002, 0x00e69a00, 0x00e6a00c, 0x00e70a00, 0x00e71006, 0x00e74a03,
0x00e76800, 0x00e77205, 0x00e7a000, 0x00e7aa01, 0x00e7c001, 0x00e802bf,
0x00ee0035, 0x00efd804, 0x00f00315, 0x00f8c205, 0x00f90225, 0x00fa4205,
0x00fa8207, 0x00faca00, 0x00fada00, 0x00faea00, 0x00fafa1e, 0x00fc0234,
0x00fdb20e, 0x00fe320d, 0x00feb205, 0x00feea12, 0x00ff9202, 0x00ffb208,
0x0100020a, 0x01005804, 0x01008217, 0x01015004, 0x01017a30, 0x01030004,
0x01033009, 0x01038201, 0x0103a21a, 0x0104820c, 0x0105021e, 0x01068020,
0x0108028b, 0x010c8389, 0x0118d401, 0x0118e20c, 0x01194c01, 0x01195abd,
0x011f4c03, 0x011f6a02, 0x011f8400, 0x011f8a01, 0x011f9c00, 0x011fa20a,
0x01200226, 0x0122020a, 0x0123039c, 0x012fec01, 0x012ffa14, 0x0130a401,
0x0130b231, 0x0132440b, 0x0132a22a, 0x0133fc00, 0x01340212, 0x01349c00,
0x0134a20c, 0x01350c00, 0x01351207, 0x01355401, 0x01356210, 0x0135ec01,
0x0135fa04, 0x01362401, 0x01363207, 0x01367400, 0x01367a04, 0x0136a400,
0x0136aa14, 0x01375400, 0x01375a06, 0x01379401, 0x0137a200, 0x0137ac00,
0x0137b203, 0x0137d400, 0x0137da01, 0x0137ec00, 0x0137f206, 0x01382c00,
0x01383203, 0x01385401, 0x0138621b, 0x01394400, 0x01394a22, 0x013a6400,
0x013a6a00, 0x013a7400, 0x013a7a03, 0x013a9c02, 0x013ab200, 0x013abc00,
0x013ac23c, 0x013cac02, 0x013cc217, 0x013d8400, 0x013d8a0d, 0x013dfc00,
0x013e03ff, 0x014e035a, 0x0158dc01, 0x0158ea32, 0x015a8400, 0x015a8a03,
0x015aac00, 0x015ab21d, 0x015bb21f, 0x015cc221, 0x015dea0b, 0x015e5207,
0x015f6203, 0x0160022e, 0x0161822e, 0x0163028e, 0x01677802, 0x01679201,
0x0167ca2c, 0x01693a00, 0x01696a00, 0x01698237, 0x016b7a01, 0x016bf800,
0x016c0216, 0x016d0206, 0x016d4206, 0x016d8206, 0x016dc206, 0x016e0206,
0x016e4206, 0x016e8206, 0x016ec206, 0x016f001f, 0x01700244, 0x01740419,
0x0174dc58, 0x017804d5, 0x017f840b, 0x01800429, 0x01815003, 0x01817410,
0x0181fa00, 0x01820c55, 0x0184c801, 0x0184dc64, 0x01882c28, 0x01898c5d,
0x018c842a, 0x018e0423, 0x018f842e, 0x01910427, 0x01924207, 0x019284ae,
0x01980500, 0x026dac00, 0x026e023f, 0x02700400, 0x04feac00, 0x050005ff,
0x051005ff, 0x0520048c, 0x05248436, 0x0526835b, 0x0532022e, 0x05337803,
0x05339a00, 0x0533a009, 0x0533f21f, 0x0534f001, 0x0535024f, 0x05378001,
0x05379205, 0x053802ae, 0x053d8207, 0x053fba0a, 0x05401000, 0x05401a02,
0x05403000, 0x05403a03, 0x05405800, 0x05406218, 0x05412801, 0x05413a04,
0x05418209, 0x05420237, 0x05440243, 0x05462001, 0x0546720b, 0x05470011,
0x0547920b, 0x05480225, 0x05493007, 0x05497218, 0x054a380a, 0x054a9201,
0x054afa00, 0x054b041c, 0x054c0002, 0x054c1a2f, 0x054d9800, 0x054da201,
0x054db003, 0x054dd201, 0x054de000, 0x054dea10, 0x054e7a0a, 0x054ef206,
0x054f2800, 0x054f3218, 0x05500228, 0x05514805, 0x05517a01, 0x05518801,
0x05519a01, 0x0551a801, 0x05520202, 0x05521800, 0x05522207, 0x05526000,
0x05526a00, 0x05528209, 0x0552e21f, 0x0553e000, 0x0553ea32, 0x05558000,
0x05558a00, 0x05559002, 0x0555aa01, 0x0555b801, 0x0555ca04, 0x0555f001,
0x05560200, 0x05560800, 0x05561200, 0x0556da10, 0x05576001, 0x05577207,
0x0557b000, 0x05580a05, 0x05584a05, 0x05588a05, 0x05590206, 0x05594206,
0x05598235, 0x055b8274, 0x055f2800, 0x055f3201, 0x055f4000, 0x055f4a03,
0x055f6800, 0x055f8209, 0x05600400, 0x06bd1c00, 0x06bd8216, 0x06be5a30,
0x06c00200, 0x06dbfa01, 0x06dffa01, 0x06fffa01, 0x07c7fa00, 0x07c8056d,
0x07d38469, 0x07d80206, 0x07d89a04, 0x07d8ea00, 0x07d8f000, 0x07d8fa17,
0x07d9c204, 0x07d9f200, 0x07da0201, 0x07da1a01, 0x07da327b, 0x07de9b6c,
0x07ea823f, 0x07ec9235, 0x07ef820d, 0x07f0000f, 0x07f08409, 0x07f1000f,
0x07f18422, 0x07f2a412, 0x07f34403, 0x07f38204, 0x07f3b286, 0x07f7f800,
0x07f80c5f, 0x07fb0a5d, 0x07fe1205, 0x07fe5205, 0x07fe9205, 0x07fed202,
0x07ff0406, 0x07ff4206, 0x07ffc802, 0x07ffe201, 0x0800020b, 0x08006a19,
0x08014212, 0x0801e201, 0x0801fa0e, 0x0802820d, 0x0804027a, 0x08080202,
0x08083a2c, 0x0809ba57, 0x080c820b, 0x080d0200, 0x080e822c, 0x080fe800,
0x0814021c, 0x08150230, 0x08170000, 0x08170a1a, 0x08180223, 0x0819821a,
0x081a8225, 0x081bb004, 0x081c021d, 0x081cfa24, 0x081e420d, 0x0820029d,
0x08250209, 0x08258223, 0x0826c223, 0x08280227, 0x08298233, 0x082b7a00,
0x08300336, 0x083a0215, 0x083b0207, 0x08400205, 0x08404200, 0x0840522b,
0x0841ba01, 0x0841e200, 0x0841fa16, 0x0842ba47, 0x08453a08, 0x08470212,
0x0847a201, 0x0847da20, 0x0848fa1a, 0x0849fa00, 0x084c0237, 0x084de213,
0x084e922e, 0x08500802, 0x08502801, 0x08506003, 0x08508203, 0x0850aa02,
0x0850ca1a, 0x0851c002, 0x0851f800, 0x08520207, 0x08528208, 0x0853023f,
0x08560224, 0x08572801, 0x08575a0b, 0x08580235, 0x0859ca1c, 0x085ac21a,
0x085bc219, 0x085cca03, 0x085d4a06, 0x08600248, 0x08640232, 0x08660232,
0x0867d205, 0x0873021e, 0x08800200, 0x08800800, 0x08801235, 0x0881c00e,
0x08823a06, 0x0882921d, 0x0883f802, 0x08841230, 0x08859803, 0x0885ba01,
0x0885c801, 0x0885da01, 0x0885e800, 0x0885f203, 0x08868218, 0x08878209,
0x08880002, 0x08881a23, 0x08893804, 0x08896200, 0x08896807, 0x0889b20d,
0x088a8222, 0x088b9800, 0x088ba202, 0x088c0001, 0x088c1233, 0x088db008,
0x088dfa0a, 0x088e5002, 0x088e6a00, 0x088e820f, 0x088f0a13, 0x08900211,
0x08909a1b, 0x08917802, 0x08919201, 0x0891a000, 0x0891aa00, 0x0891b001,
0x0891c205, 0x0891f000, 0x08940206, 0x08944200, 0x08945203, 0x08947a0e,
0x0894fa0a, 0x0895822e, 0x0896f800, 0x08970202, 0x08971807, 0x08978209,
0x08980001, 0x08981201, 0x08982a07, 0x08987a01, 0x08989a15, 0x08995206,
0x08999201, 0x0899aa04, 0x0899e000, 0x0899ea02, 0x089a0000, 0x089a0a03,
0x089a3a01, 0x089a5a02, 0x089a8200, 0x089aba00, 0x089aea06, 0x089b3006,
0x089b8004, 0x08a00237, 0x08a1c007, 0x08a20201, 0x08a21002, 0x08a22a00,
0x08a23000, 0x08a23a12, 0x08a2da00, 0x08a2ea00, 0x08a40232, 0x08a59805,
0x08a5ca00, 0x08a5d000, 0x08a5da03, 0x08a5f801, 0x08a60a00, 0x08a61001,
0x08a62203, 0x08a68209, 0x08ac0231, 0x08ad9003, 0x08adc203, 0x08ade001,
0x08adf200, 0x08adf801, 0x08ae0a1a, 0x08aee001, 0x08b00232, 0x08b19807,
0x08b1da01, 0x08b1e800, 0x08b1f200, 0x08b1f801, 0x08b20a03, 0x08b28209,
0x08b3020c, 0x08b4022a, 0x08b55800, 0x08b56200, 0x08b56800, 0x08b57201,
0x08b58005, 0x08b5b200, 0x08b5b800, 0x08b60209, 0x08b80219, 0x08b8e802,
0x08b90201, 0x08b91003, 0x08b93200, 0x08b93804, 0x08b9820f, 0x08c50252,
0x08c7fa00, 0x08d60238, 0x08e00208, 0x08e05225, 0x08e18006, 0x08e1c005,
0x08e1f200, 0x08e1f800, 0x08e20205, 0x08e2821c, 0x08e3821f, 0x08e49015,
0x08e54a00, 0x08e55006, 0x08e58a00, 0x08e59001, 0x08e5a200, 0x08e5a801,
0x090003ff, 0x09100399, 0x0920026e, 0x09238204, 0x092402c3, 0x098003ff,
0x099003ff, 0x09a0022e, 0x0a2003ff, 0x0a300246, 0x0b4003ff, 0x0b500238,
0x0b52021e, 0x0b530209, 0x0b537201, 0x0b56821d, 0x0b578004, 0x0b57aa00,
0x0b58022f, 0x0b598006, 0x0b59ba0e, 0x0b5a8209, 0x0b5ada06, 0x0b5b1a14,
0x0b5bea12, 0x0b780244, 0x0b7a822e, 0x0b7c7803, 0x0b7c9a0c, 0x0b7f0400,
0x0b800400, 0x0c3f6400, 0x0c4005ff, 0x0c5004f2, 0x0d800401, 0x0de0026a,
0x0de3820c, 0x0de40208, 0x0de48209, 0x0de4e200, 0x0de4e801, 0x0de4fa00,
0x0de50003, 0x0e8002f5, 0x0e880226, 0x0e894a3d, 0x0e8b3802, 0x0e8b5208,
0x0e8b980f, 0x0e8c1a01, 0x0e8c2806, 0x0e8c621d, 0x0e8d5003, 0x0e8d723a,
0x0e900241, 0x0e921002, 0x0e922a00, 0x0e980256, 0x0e9b0211, 0x0ea00254,
0x0ea2b246, 0x0ea4f201, 0x0ea51200, 0x0ea52a01, 0x0ea54a03, 0x0ea5720b,
0x0ea5da00, 0x0ea5ea06, 0x0ea62a40, 0x0ea83a03, 0x0ea86a07, 0x0ea8b206,
0x0ea8f21b, 0x0ea9da03, 0x0eaa0204, 0x0eaa3200, 0x0eaa5206, 0x0eaa9353,
0x0eb54323, 0x0ebe73ff, 0x0ece7231, 0x0ed00036, 0x0ed1ba03, 0x0ed1d831,
0x0ed36a07, 0x0ed3a800, 0x0ed3b20d, 0x0ed42000, 0x0ed42a06, 0x0ed4d804,
0x0ed5080e, 0x0f000006, 0x0f004010, 0x0f00d806, 0x0f011801, 0x0f013004,
0x0f4002c4, 0x0f463a08, 0x0f468006, 0x0f480243, 0x0f4a2006, 0x0f4a8209,
0x0f4af201, 0x0f700203, 0x0f702a1a, 0x0f710a01, 0x0f712200, 0x0f713a00,
0x0f714a09, 0x0f71a203, 0x0f71ca00, 0x0f71da00, 0x0f721200, 0x0f723a00,
0x0f724a00, 0x0f725a00, 0x0f726a02, 0x0f728a01, 0x0f72a200, 0x0f72ba00,
0x0f72ca00, 0x0f72da00, 0x0f72ea00, 0x0f72fa00, 0x0f730a01, 0x0f732200,
0x0f733a03, 0x0f736206, 0x0f73a203, 0x0f73ca03, 0x0f73f200, 0x0f740209,
0x0f745a10, 0x0f750a02, 0x0f752a04, 0x0f755a10, 0x0f778201, 0x0f800203,
0x0f802400, 0x0f802a26, 0x0f818263, 0x0f85020e, 0x0f858a0e, 0x0f860a0d,
0x0f867c00, 0x0f868a24, 0x0f88020c, 0x0f88821e, 0x0f89823b, 0x0f8b821d,
0x0f8c7400, 0x0f8c7a01, 0x0f8c8c09, 0x0f8cda11, 0x0f8f3219, 0x0f900402,
0x0f90842b, 0x0f920408, 0x0f928401, 0x0f980420, 0x0f990a0b, 0x0f996c08,
0x0f99b200, 0x0f99bc45, 0x0f9bea00, 0x0f9bf415, 0x0f9ca20b, 0x0f9d042a,
0x0f9e5a03, 0x0f9e7c04, 0x0f9ea20b, 0x0f9f0410, 0x0f9f8a02, 0x0f9fa400,
0x0f9faa02, 0x0f9fc446, 0x0fa1fa00, 0x0fa20400, 0x0fa20a00, 0x0fa214ba,
0x0fa7ea01, 0x0fa7fc3e, 0x0fa9f20c, 0x0faa5c03, 0x0faa7a00, 0x0faa8417,
0x0fab4211, 0x0fabd400, 0x0fabda19, 0x0facac01, 0x0facba0c, 0x0fad2400,
0x0fad2a55, 0x0fafdc54, 0x0fb2822f, 0x0fb40445, 0x0fb63205, 0x0fb66400,
0x0fb66a02, 0x0fb68402, 0x0fb7020a, 0x0fb75c01, 0x0fb78203, 0x0fb7a402,
0x0fb80273, 0x0fbc0254, 0x0fc0020b, 0x0fc08237, 0x0fc28209, 0x0fc30227,
0x0fc4821d, 0x0fc8840e, 0x0fc90407, 0x0fc98400, 0x0fc99c0b, 0x0fca040b,
0x0fca840e, 0x0fcc0411, 0x0fce0400, 0x10000400, 0x1536b400, 0x15380400,
0x15b9a400, 0x15ba0400, 0x15c0ec00, 0x15c10400, 0x16750c00, 0x17c005ff,
0x17d0041d, 0x70000800, 0x7001005f, 0x700800ef, 0x78000200, 0x7fffea00,
0x80000200, 0x87ffea00,
};
uint32_t ch = wc;
uint32_t key = (ch << 11) | 0x7ff;
size_t min = 0;
size_t max = __arraycount(extents) - 1;
do {
size_t mid = (min + max + 1) / 2;
if (key < extents[mid])
max = mid - 1;
else
min = mid;
} while (min < max);
return ch >= (extents[min] >> 11) &&
ch <= (extents[min] >> 11) + (extents[min] & 0x1ff)
? (int)((extents[min] >> 9) & 0x3)
: -1;
}
|
the_stack_data/326538.c | /*
На числовой прямой окрасили N отрезков. Известны координаты левого и правого концов каждого отрезка [Li,Ri].
Найти сумму длин частей числовой прямой, окрашенных ровно в один слой. N≤10000. Li,Ri — целые числа в диапазоне [0,109].
*/
#include <stdio.h>
#include <stdlib.h>
const int IN = 1;
const int OUT = -1;
typedef struct Vault_t {
long long x;
long long type;
} Vault;
int Vault_comparator(const Vault **first_ptr, const Vault **second_ptr) {
const Vault *first = *first_ptr;
const Vault *second = *second_ptr;
return first->x - second->x;
}
// Получив отсортированные точки с их типом (открывают или закрывают отрезок), сможем, итерируясь по ним,
// понять, какова длина, закрашенная необходимым кол-вом отрезков одновременно
long long scanline_balace_x(const Vault **arr, const size_t elem_count, const int balance_x) {
int balance = 0;
long long ret = 0;
for (size_t i = 0; i < elem_count; ++i) {
if (balance == balance_x) {
ret += arr[i]->x - arr[i - 1]->x;
}
balance += arr[i]->type;
}
return ret;
}
int main() {
int n = 0;
scanf("%d", &n);
Vault **arr = calloc(n * 2, sizeof(Vault*));
for (int i = 0; i < 2 * n; i += 2) {
arr[i] = calloc(1, sizeof(Vault));
arr[i + 1] = calloc(1, sizeof(Vault));
long long x1, x2;
scanf("%lld %lld", &x1, &x2);
arr[i]->x = x1;
arr[i]->type = IN;
arr[i + 1]->x = x2;
arr[i + 1]->type = OUT;
}
qsort(arr, 2 * n, sizeof(Vault*), Vault_comparator);
/*for (int i = 0; i < 2 * n; ++i) {
printf("%d) %lld %lld\n", i, arr[i]->x, arr[i]->type);
}*/
printf("%lld\n", scanline_balace_x((const Vault**)arr, 2 * n, 1));
for (int i = 0; i < 2 * n; ++i) {
free(arr[i]);
}
free(arr);
return 0;
}
// O(nlogn) - сортировка и сканлайн за линию |
the_stack_data/429233.c | #include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <pthread.h>
#include <unistd.h>
#define CACHE_LINE_SIZE 64
#define CACHE_ALIGNED __attribute__((aligned(CACHE_LINE_SIZE)))
#define DOUBLE_CACHE_ALIGNED __attribute__((aligned(2 * CACHE_LINE_SIZE)))
struct timeval start;
#define DEFINE_RESOURCE(Record, refNum, idxNum, arrNum, type1, nextRecord, type2, pointer, listNum) \
int PSLY_##Record##_IDXNUM = idxNum; \
int PSLY_##Record##_IDXBIT = ((1 << idxNum) - 1); \
\
int PSLY_##Record##_ARRNUM = arrNum; \
int PSLY_##Record##_ARRAYNUM = (1 << arrNum); \
int PSLY_##Record##_ARRAYBITS = ((1 << arrNum) -1); \
int PSLY_##Record##_ARRBIT = (((1 << arrNum) - 1) << idxNum); \
int PSLY_##Record##_ARRBITR = ((1 << arrNum) - 1); \
\
int PSLY_##Record##_ARRIDXBIT = ((((1 << arrNum) - 1) << idxNum) | ((1 << idxNum) - 1)); \
\
int PSLY_##Record##_NEXTIDXNUM = idxNum; \
int PSLY_##Record##_NEXTIDXBIT = ((1 << idxNum) - 1); \
\
int PSLY_##Record##_NEXTTAILNUM = 1; \
int PSLY_##Record##_NEXTTAILBIT = (((1 << 1) - 1) << idxNum); \
\
int PSLY_##Record##_NEXTVERSIONNUM = (32 - 1 - idxNum); \
int PSLY_##Record##_NEXTVERSIONBIT = ((~0)^((((1 << 1) - 1) << idxNum) | ((1 << idxNum) - 1))); \
int PSLY_##Record##_NEXTVERSIONONE = (1 + ((((1 << 1) - 1) << idxNum) | ((1 << idxNum) - 1))); \
\
\
int PSLY_##Record##_TAILIDXNUM = idxNum; \
int PSLY_##Record##_TAILIDXBIT = ((1 << idxNum) - 1); \
\
int PSLY_##Record##_TAILVERSIONNUM = (32 - idxNum); \
int PSLY_##Record##_TAILVERSIONBIT = ((~0) ^ ((1 << idxNum) - 1)); \
int PSLY_##Record##_TAILVERSIONONE = (1 + ((1 << idxNum) - 1)); \
\
\
int PSLY_##Record##_HEADIDXNUM = idxNum; \
int PSLY_##Record##_HEADIDXBIT = ((1 << idxNum) - 1); \
\
int PSLY_##Record##_HEADVERSIONNUM = (32 - idxNum); \
int PSLY_##Record##_HEADVERSIONBIT = ((~0) ^ ((1 << idxNum) - 1)); \
int PSLY_##Record##_HEADVERSIONONE = (1 + ((1 << idxNum) - 1)); \
typedef struct Record { \
int volatile next ; \
int self ; \
type1 volatile nextRecord ; \
type2 volatile pointer ; \
} Record ; \
\
typedef struct Record##Queue { \
int volatile head ; \
int volatile tail ; \
} Record##Queue ; \
static Record* volatile psly_##Record##s[1 << arrNum]; \
static Record##Queue volatile psly_##Record##_queues[1 << arrNum]; \
static int volatile recordTake = 0; \
\
Record* idx_##Record(int index) { \
return psly_##Record##s[(index & PSLY_##Record##_ARRBIT) >> PSLY_##Record##_IDXNUM] + (index & PSLY_##Record##_IDXBIT); \
} \
\
\
Record* get_##Record() { \
for(int i = 0; i < PSLY_##Record##_ARRAYNUM; ++i) {\
int array = __sync_fetch_and_add(&recordTake, 1) & PSLY_##Record##_ARRAYBITS;\
RecordQueue* queue = psly_##Record##_queues + array;\
Record* arr = psly_##Record##s[array];\
for(;;){\
int headIndex = (queue->head);\
int indexHead = headIndex & PSLY_##Record##_HEADIDXBIT;\
Record* head = arr + indexHead;\
int tailIndex = (queue->tail);\
int indexTail = tailIndex & PSLY_##Record##_TAILIDXBIT;\
int nextIndex = (head->next);\
\
if(headIndex == (queue->head)) {\
if(indexHead == indexTail){\
if((nextIndex & PSLY_##Record##_NEXTTAILBIT) == PSLY_##Record##_NEXTTAILBIT)\
break;\
__sync_bool_compare_and_swap(&queue->tail, tailIndex, (((tailIndex & PSLY_##Record##_TAILVERSIONBIT) + PSLY_##Record##_TAILVERSIONONE ) & PSLY_##Record##_TAILVERSIONBIT)|(nextIndex & PSLY_##Record##_TAILIDXBIT)); \
} else {\
if(__sync_bool_compare_and_swap(&queue->head, headIndex, (((headIndex & PSLY_##Record##_HEADVERSIONBIT) + PSLY_##Record##_HEADVERSIONONE) & PSLY_##Record##_HEADVERSIONBIT)|(nextIndex & PSLY_##Record##_HEADIDXBIT))) {\
return head;\
}\
}\
}\
}\
}\
\
for(int i = 0; i < PSLY_##Record##_ARRAYNUM; ++i) {\
int array = i;\
RecordQueue* queue = psly_##Record##_queues + array;\
Record* arr = psly_##Record##s[array];\
for(;;){\
int headIndex = (queue->head);\
int indexHead = headIndex & PSLY_##Record##_HEADIDXBIT;\
Record* head = arr + indexHead;\
int tailIndex = (queue->tail);\
int indexTail = tailIndex & PSLY_##Record##_TAILIDXBIT;\
\
int nextIndex = (head->next);\
\
if(headIndex == (queue->head)) {\
if(indexHead == indexTail){\
if((nextIndex & PSLY_##Record##_NEXTTAILBIT) == PSLY_##Record##_NEXTTAILBIT)\
break;\
__sync_bool_compare_and_swap(&queue->tail, tailIndex, (((tailIndex & PSLY_##Record##_TAILVERSIONBIT) + PSLY_##Record##_TAILVERSIONONE ) & PSLY_##Record##_TAILVERSIONBIT)|(nextIndex & PSLY_##Record##_TAILIDXBIT)); \
} else {\
if(__sync_bool_compare_and_swap(&queue->head, headIndex, (((headIndex & PSLY_##Record##_HEADVERSIONBIT) + PSLY_##Record##_HEADVERSIONONE) & PSLY_##Record##_HEADVERSIONBIT)|(nextIndex & PSLY_##Record##_HEADIDXBIT))) {\
return head;\
}\
}\
}\
\
}\
}\
return NULL;\
}\
\
void return_##Record(Record* record) {\
long local = (record->next);\
local |= PSLY_##Record##_NEXTTAILBIT;\
/*record->next |= PSLY_##Record##_NEXTTAILBIT;*/\
record->next = local;\
int self = record->self;\
int array = (self >> PSLY_##Record##_IDXNUM) & PSLY_##Record##_ARRBITR;\
Record* arr = psly_##Record##s[array];\
RecordQueue* queue = psly_##Record##_queues + array;\
for(;;) {\
int tailIndex = (queue->tail);\
int indexTail = tailIndex & PSLY_##Record##_TAILIDXBIT;\
Record* tail = arr + indexTail;\
int nextIndex = (tail->next);\
\
if(tailIndex == (queue->tail)){\
if((nextIndex & PSLY_##Record##_NEXTTAILBIT) == PSLY_##Record##_NEXTTAILBIT) {\
if(__sync_bool_compare_and_swap(&tail->next, nextIndex, (((nextIndex & PSLY_##Record##_NEXTVERSIONBIT) + PSLY_##Record##_NEXTVERSIONONE) & PSLY_##Record##_NEXTVERSIONBIT)|(self & PSLY_##Record##_NEXTIDXBIT))){\
__sync_bool_compare_and_swap(&queue->tail, tailIndex, (((tailIndex & PSLY_##Record##_TAILVERSIONBIT) + PSLY_##Record##_TAILVERSIONONE) & PSLY_##Record##_TAILVERSIONBIT)|(self & PSLY_##Record##_TAILIDXBIT));\
return;\
}\
} else {\
__sync_bool_compare_and_swap(&queue->tail, tailIndex, (((tailIndex & PSLY_##Record##_TAILVERSIONBIT) + PSLY_##Record##_TAILVERSIONONE) & PSLY_##Record##_TAILVERSIONBIT)|(nextIndex & PSLY_##Record##_TAILIDXBIT));\
}\
}\
}\
} \
int IDXNUM_ = idxNum; \
long IDXBIT_= ((1 << idxNum) - 1); \
\
int ARRNUM_ = arrNum; \
long ARRBIT_ = (((1 << arrNum) - 1) << idxNum); \
long ARRIDXBIT_= (((1 << idxNum) - 1) | (((1 << arrNum) - 1) << idxNum)); \
\
int REFCB = refNum;\
int REFCBITS_ = ((1 << refNum) - 1);\
long REFCBITS = (((long)(-1)) << (64 - refNum));\
long REFONE = (((long)1) << (64 - refNum));\
long DELETED = 0x0000000000000000;\
int RECBW = (64 - refNum);\
\
int NODEB = ((64 - refNum - arrNum - idxNum) >> 1);\
long NODEBITS = (((((long)1) << (64 - refNum)) -1 ) ^ (((((long)1) << (64 - refNum)) - 1) >> ((64 - refNum - arrNum - idxNum) >> 1)));\
long NODEONE = ((((((((long)1) << (64 - refNum)) -1 ) ^ (((((long)1) << (64 - refNum)) - 1) >> ((64 - refNum - arrNum - idxNum) >> 1))) - 1) & (((((long)1) << (64 - refNum)) -1 ) ^ (((((long)1) << (64 - refNum)) - 1) >> ((64 - refNum - arrNum - idxNum) >> 1)))) ^ (((((long)1) << (64 - refNum)) -1 ) ^ (((((long)1) << (64 - refNum)) - 1) >> ((64 - refNum - arrNum - idxNum) >> 1))));\
\
int NEXTB = ((64 - refNum - arrNum - idxNum) >> 1);\
long NEXTBITS = ((((((((((long)1) << (64 - refNum)) -1 ) ^ (((((long)1) << (64 - refNum)) - 1) >> ((64 - refNum - arrNum - idxNum) >> 1))) - 1) & (((((long)1) << (64 - refNum)) -1 ) ^ (((((long)1) << (64 - refNum)) - 1) >> ((64 - refNum - arrNum - idxNum) >> 1)))) ^ (((((long)1) << (64 - refNum)) -1 ) ^ (((((long)1) << (64 - refNum)) - 1) >> ((64 - refNum - arrNum - idxNum) >> 1)))) - 1) ^ ((((((((((long)1) << (64 - refNum)) -1 ) ^ (((((long)1) << (64 - refNum)) - 1) >> ((64 - refNum - arrNum - idxNum) >> 1))) - 1) & (((((long)1) << (64 - refNum)) -1 ) ^ (((((long)1) << (64 - refNum)) - 1) >> ((64 - refNum - arrNum - idxNum) >> 1)))) ^ (((((long)1) << (64 - refNum)) -1 ) ^ (((((long)1) << (64 - refNum)) - 1) >> ((64 - refNum - arrNum - idxNum) >> 1)))) - 1) >> ((64 - refNum - arrNum - idxNum) >> 1)));\
long NEXTONE = (((((((((((((long)1) << (64 - refNum)) -1 ) ^ (((((long)1) << (64 - refNum)) - 1) >> ((64 - refNum - arrNum - idxNum) >> 1))) - 1) & (((((long)1) << (64 - refNum)) -1 ) ^ (((((long)1) << (64 - refNum)) - 1) >> ((64 - refNum - arrNum - idxNum) >> 1)))) ^ (((((long)1) << (64 - refNum)) -1 ) ^ (((((long)1) << (64 - refNum)) - 1) >> ((64 - refNum - arrNum - idxNum) >> 1)))) - 1) ^ ((((((((((long)1) << (64 - refNum)) -1 ) ^ (((((long)1) << (64 - refNum)) - 1) >> ((64 - refNum - arrNum - idxNum) >> 1))) - 1) & (((((long)1) << (64 - refNum)) -1 ) ^ (((((long)1) << (64 - refNum)) - 1) >> ((64 - refNum - arrNum - idxNum) >> 1)))) ^ (((((long)1) << (64 - refNum)) -1 ) ^ (((((long)1) << (64 - refNum)) - 1) >> ((64 - refNum - arrNum - idxNum) >> 1)))) - 1) >> ((64 - refNum - arrNum - idxNum) >> 1))) - 1) & ((((((((((long)1) << (64 - refNum)) -1 ) ^ (((((long)1) << (64 - refNum)) - 1) >> ((64 - refNum - arrNum - idxNum) >> 1))) - 1) & (((((long)1) << (64 - refNum)) -1 ) ^ (((((long)1) << (64 - refNum)) - 1) >> ((64 - refNum - arrNum - idxNum) >> 1)))) ^ (((((long)1) << (64 - refNum)) -1 ) ^ (((((long)1) << (64 - refNum)) - 1) >> ((64 - refNum - arrNum - idxNum) >> 1)))) - 1) ^ ((((((((((long)1) << (64 - refNum)) -1 ) ^ (((((long)1) << (64 - refNum)) - 1) >> ((64 - refNum - arrNum - idxNum) >> 1))) - 1) & (((((long)1) << (64 - refNum)) -1 ) ^ (((((long)1) << (64 - refNum)) - 1) >> ((64 - refNum - arrNum - idxNum) >> 1)))) ^ (((((long)1) << (64 - refNum)) -1 ) ^ (((((long)1) << (64 - refNum)) - 1) >> ((64 - refNum - arrNum - idxNum) >> 1)))) - 1) >> ((64 - refNum - arrNum - idxNum) >> 1)))) ^ ((((((((((long)1) << (64 - refNum)) -1 ) ^ (((((long)1) << (64 - refNum)) - 1) >> ((64 - refNum - arrNum - idxNum) >> 1))) - 1) & (((((long)1) << (64 - refNum)) -1 ) ^ (((((long)1) << (64 - refNum)) - 1) >> ((64 - refNum - arrNum - idxNum) >> 1)))) ^ (((((long)1) << (64 - refNum)) -1 ) ^ (((((long)1) << (64 - refNum)) - 1) >> ((64 - refNum - arrNum - idxNum) >> 1)))) - 1) ^ ((((((((((long)1) << (64 - refNum)) -1 ) ^ (((((long)1) << (64 - refNum)) - 1) >> ((64 - refNum - arrNum - idxNum) >> 1))) - 1) & (((((long)1) << (64 - refNum)) -1 ) ^ (((((long)1) << (64 - refNum)) - 1) >> ((64 - refNum - arrNum - idxNum) >> 1)))) ^ (((((long)1) << (64 - refNum)) -1 ) ^ (((((long)1) << (64 - refNum)) - 1) >> ((64 - refNum - arrNum - idxNum) >> 1)))) - 1) >> ((64 - refNum - arrNum - idxNum) >> 1))));\
long NEXTTT = (((((((((((long)1) << (64 - refNum)) -1 ) ^ (((((long)1) << (64 - refNum)) - 1) >> ((64 - refNum - arrNum - idxNum) >> 1))) - 1) & (((((long)1) << (64 - refNum)) -1 ) ^ (((((long)1) << (64 - refNum)) - 1) >> ((64 - refNum - arrNum - idxNum) >> 1)))) ^ (((((long)1) << (64 - refNum)) -1 ) ^ (((((long)1) << (64 - refNum)) - 1) >> ((64 - refNum - arrNum - idxNum) >> 1)))) - 1) ^ ((((((((((long)1) << (64 - refNum)) -1 ) ^ (((((long)1) << (64 - refNum)) - 1) >> ((64 - refNum - arrNum - idxNum) >> 1))) - 1) & (((((long)1) << (64 - refNum)) -1 ) ^ (((((long)1) << (64 - refNum)) - 1) >> ((64 - refNum - arrNum - idxNum) >> 1)))) ^ (((((long)1) << (64 - refNum)) -1 ) ^ (((((long)1) << (64 - refNum)) - 1) >> ((64 - refNum - arrNum - idxNum) >> 1)))) - 1) >> ((64 - refNum - arrNum - idxNum) >> 1))) | ((((1 << arrNum) - 1) << idxNum)|((1 << idxNum) - 1)));\
\
int RESTART = 2;\
int KEEPPREV = 1;\
int NONE = 0;\
\
int RECORD = 0x00000004;\
int SEARCH = 0x00000002;\
int REMOVE = 0x00000001;\
\
typedef struct RecordList {\
Record* volatile head ;\
Record* volatile tail ;\
} RecordList ;\
\
typedef struct RecordMap {\
volatile RecordList* lists[listNum] ;\
} RecordMap ;\
\
static volatile RecordMap map;\
\
long nxtAddrV(long old, Record* replace) {\
return (old & REFCBITS) | (old & NODEBITS) | ((old + NEXTONE) & NEXTBITS) | (replace->self & ARRIDXBIT_);\
}\
\
long plusRecord(long old) {\
return ((old + REFONE) & REFCBITS) | (old & NODEBITS) | (old & NEXTBITS) | (old & ARRIDXBIT_);\
}\
\
long newNext(long old, Record* replace) {\
return REFONE | ((old + NODEONE) & NODEBITS) | (old & NEXTBITS) | (replace->self & ARRIDXBIT_);\
}\
\
int psly_handle_records(RecordList* list, void* pointer, int flag) { \
long key = (long) pointer;\
Record* head = list->head;\
Record* tail = list->tail;\
Record* my = NULL;\
long localN;\
int removed = 0;\
Record* prev; \
long prevBefore;\
Restart: \
prev = head;\
long prevNext = (prev->nextRecord);\
Record* curr = idx_Record(prevNext);\
long currNext;\
Record* found = NULL;\
long foundNext;\
for(;;){\
KeepPrev:\
currNext = curr->nextRecord;\
void* currPointer = (curr->pointer);\
long New = (prev->nextRecord);\
if((prevNext & NODEBITS) != (New & NODEBITS) || (New & REFCBITS) == DELETED)\
goto Restart;\
if((prevNext & NEXTTT) != (New & NEXTTT)) {\
JUSTNEXTCHANGE: \
prevNext = New;\
curr = idx_Record(prevNext);\
goto KeepPrev;\
}\
prevNext = New;\
long currKey = (long) currPointer;\
if(curr == tail || currKey > key) {\
if(flag == SEARCH) \
return 0;\
if(flag == REMOVE && (prevNext & ARRIDXBIT_) == (curr->self & ARRIDXBIT_))\
return 0;\
Record* append;\
/*CasAppend:*/\
if(flag == RECORD) {\
if(my == NULL) {\
my = get_Record();\
localN = (my->nextRecord);\
my->pointer = pointer;\
}\
my->nextRecord = newNext(localN, curr);\
append = my;\
} else {\
append = curr;\
}\
CasAppend:\
if((prevBefore = __sync_val_compare_and_swap(&prev->nextRecord, prevNext, nxtAddrV(prevNext, append))) == prevNext ) {\
long local = prevNext;\
while((local & ARRIDXBIT_) != (curr->self & ARRIDXBIT_)){\
Record* first = idx_Record(local);\
first->pointer = NULL;\
local = (first->nextRecord);\
return_Record(first);\
}\
if(flag == RECORD)\
return 1;\
else\
return 0;\
}\
New = prevBefore;\
if((prevNext & NODEBITS) != (New & NODEBITS) || (New & REFCBITS) == DELETED)\
goto Restart;\
if((prevNext & NEXTTT) != (New & NEXTTT)) \
goto JUSTNEXTCHANGE;\
prevNext = New;\
goto CasAppend; \
} else {\
if(flag == SEARCH && currKey == key) \
return (currNext >> RECBW) & REFCBITS_;\
\
New = (curr->nextRecord);\
if((currNext & NODEBITS) != (New & NODEBITS)) {\
New = (prev->nextRecord);\
if((prevNext & NODEBITS) != (New & NODEBITS) || (New & REFCBITS) == DELETED)\
goto Restart;\
goto JUSTNEXTCHANGE;\
}\
currNext = New;\
if((currNext & REFCBITS) == DELETED) {\
curr = idx_Record(currNext);\
continue;\
}\
if(currKey != key) {\
prev = curr;\
prevNext = currNext;\
} else {\
if(removed)\
return 0;\
\
found = curr;\
foundNext = currNext;\
if(flag == REMOVE) {\
long refNum_;\
if(((refNum_ = __sync_sub_and_fetch(&found->nextRecord, REFONE)) & REFCBITS) != DELETED)\
return (refNum_ >> RECBW) & REFCBITS_;\
removed = 1;\
currNext = refNum_;\
} else {\
for(;;) {\
long refNum_; \
if((prevBefore = __sync_val_compare_and_swap(&found->nextRecord, foundNext, refNum_ = plusRecord(foundNext))) == foundNext) {\
if(my != NULL) {\
my->nextRecord = localN;\
return_Record(my);\
}\
return (refNum_ >> RECBW) & REFCBITS_; \
}\
New = prevBefore;\
if((foundNext & NODEBITS) != (New & NODEBITS)) {\
New = (prev->nextRecord);\
if((prevNext & NODEBITS) != (New & NODEBITS) || (New & REFCBITS) == DELETED)\
goto Restart;\
goto JUSTNEXTCHANGE;\
}\
if((New & REFCBITS) == DELETED) {\
currNext = New;\
break;\
}\
foundNext = New;\
}\
}\
}\
curr = idx_Record(currNext);\
} \
}\
}\
\
int psly_record(void* pointer) {\
long key = (long) pointer;\
RecordList* list = map.lists[key & (listNum-1)];\
return psly_handle_records(list, pointer, RECORD); \
}\
\
int psly_remove(void* pointer) {\
long key =(long) pointer;\
RecordList* list = map.lists[key & (listNum-1)];\
return psly_handle_records(list, pointer, REMOVE);\
}\
\
int psly_search(void* pointer) {\
long key =(long) pointer;\
RecordList* list = map.lists[key & (listNum-1)];\
return psly_handle_records(list, pointer, SEARCH); \
}
#define INIT_RESOURCE(Record, listNum) \
for(int i = 0; i < (1 << PSLY_##Record##_ARRNUM); ++i){ \
Record* record; \
void * ptr;\
int ret = posix_memalign(&ptr, 4096, (1 << PSLY_##Record##_IDXNUM) * sizeof(Record));\
psly_##Record##s[i] = record = ptr; \
memset(record, 0, (1 << PSLY_##Record##_IDXNUM) * sizeof(Record)); \
for(int j = 0; j < (1 << PSLY_##Record##_IDXNUM) - 1; ++j){ \
record->self = (i << PSLY_##Record##_IDXNUM) | j; \
record->next = j+1; \
record->pointer = NULL;\
record->nextRecord = (j % 2 == 1)?39415:39419;\
/*printf("%ld\n", record->nextRecord);*/\
record += 1; \
} \
record->self = (i << PSLY_##Record##_IDXNUM) | ((1 << PSLY_##Record##_IDXNUM) - 1); \
record->next = PSLY_##Record##_NEXTTAILBIT; \
record->pointer = NULL;\
record->nextRecord = 39415;\
psly_##Record##_queues[i].head = 0; \
psly_##Record##_queues[i].tail = (1 << PSLY_##Record##_IDXNUM) - 1; \
} \
for(int i = 0; i < listNum; ++i) { \
void* ptr;\
int ret = posix_memalign(&ptr, 4096, sizeof(RecordList));\
Record* head = get_Record();\
Record* tail = get_Record();\
head->nextRecord = newNext(head->nextRecord, tail); \
map.lists[i] = ptr;\
map.lists[i]->head = head; \
map.lists[i]->tail = tail; \
}
#define UNINIT_RESOURCE(Record, listNum, num_, errQueues) \
int count = 0;\
for(int i = 0; i < (1 << PSLY_##Record##_ARRNUM); ++i){ \
Record* f = psly_##Record##s[i] + (psly_##Record##_queues[i].head & PSLY_##Record##_HEADIDXBIT);\
Record* t = psly_##Record##s[i] + (psly_##Record##_queues[i].tail & PSLY_##Record##_HEADIDXBIT);\
++count;\
while(f != t) {\
++count;\
f = psly_##Record##s[i] + (f->next & PSLY_##Record##_HEADIDXBIT);\
}\
/* free(psly_##Record##s[i]);*/ \
} \
int ll;\
printf("%d Records in queues\n", ll = count + num_ + listNum * 2);\
if(ll != (1 << (PSLY_##Record##_IDXNUM + PSLY_##Record##_ARRNUM)))\
*errQueues = 1;\
for(int i = 0; i < listNum; ++i) {\
/*free(map.lists[i]);*/\
}
#define \
DEFINE_RESOURCE_FOR_HAZARD(Record, refNum, idxNum, arrNum, listNum) \
DEFINE_RESOURCE(Record, refNum, idxNum, arrNum, long, nextRecord, void*, pointer, listNum)
#define LISTNUM 65536
DEFINE_RESOURCE_FOR_HAZARD(Record, 16, 16, 6, LISTNUM)
pthread_barrier_t b;
int count;
int count2;
int noCount;
int flagStart;
#define numOfItems 131072
#define listN (LISTNUM-1)
int refCount[numOfItems];
int recordremove;
pthread_barrier_t barrier;
pthread_mutex_t mutex;
long totalOperation;
int fl;
pthread_barrier_t barrier;
void* recordremoveRoutine(void *argv) {
int seed = (int) argv;
srand(seed);
int key;
if((fl % 3) != 0) {
for(int i = 0; i < recordremove; ++i) {
key = rand() & (numOfItems - 1);
int refc = refCount[key];
for(;;) {
if(refc < REFCBITS_) {
if( __sync_bool_compare_and_swap(refCount + key, refc, refc + 1)) {
psly_record(key * (listN));
__sync_fetch_and_add(&totalOperation, 1);
if((fl % 3) == 1) {
psly_remove(key * (listN));
__sync_fetch_and_sub(refCount + key, 1);
__sync_fetch_and_add(&totalOperation, 1);
}
break;
}
refc = refCount[key];
} else break;
}
}
}
if((fl % 3) == 0){
key = rand() & (numOfItems - 1);
int f = key & 1;
for(int i = 0; i < recordremove; ++i) {
int refc = refCount[key];
for(;;) {
if(refc <= REFCBITS_ && refc > 0) {
if( __sync_bool_compare_and_swap(refCount + key, refc, refc - 1)) {
psly_remove(key * (listN));
__sync_fetch_and_add(&totalOperation, 1);
// break;
}
refc = refCount[key];
} else break;
}
//printf("%d f\n", f);
if( f == 1)
key = (key + 1) & (numOfItems - 1);
else
key = (key - 1) & (numOfItems - 1);
}
}
pthread_barrier_wait(&barrier);
pthread_mutex_lock(&mutex);
pthread_mutex_unlock(&mutex);
/*pthread_barrier_wait(&barrier);
pthread_mutex_lock(&mutex);
pthread_mutex_unlock(&mutex);*/
}
#define NUMOFTHREAD 10240
int main(int argc, char** argv) {
long allOp = 0;
int errQueueNum = 0;
int errFlag = 0;
int errCount = 0;
INIT_RESOURCE(Record, LISTNUM);
for(;;) {
totalOperation = 0;
++fl;
/* for(int i = 0; i < numOfItems; ++i) {
refCount[i] = 0;
}*/
// INIT_RESOURCE(Record, LISTNUM);
if(argc != 3)
return 1;
int num = atoi(argv[1]);
recordremove = atoi(argv[2]);
float time_use=0;
struct timeval end;
pthread_t pids[NUMOFTHREAD];
pthread_barrier_init(&barrier, NULL, num + 1);
pthread_mutex_init(&mutex, NULL);
gettimeofday(&start, NULL);
printf("\n\n\n");
pthread_mutex_lock(&mutex);
gettimeofday(&start, NULL);
pthread_setconcurrency(sysconf(_SC_NPROCESSORS_ONLN));
for(int i = 0; i < num; ++i)
pthread_create(pids + i, NULL, recordremoveRoutine, (void*) i);
pthread_barrier_wait(&barrier);
for(int i = 0; i < numOfItems; ++i) {
int re = psly_search(i * (listN));
// if(i < 8) printf("%d:%d\n", refCount[i], re);
if(refCount[i] != re)
++errCount;
}
pthread_mutex_unlock(&mutex);
for(int i = 0; i < num; ++i)
pthread_join(pids[i], NULL);
int total = num * recordremove;
int add = 0;
for(int i = 0; i < numOfItems; ++i) {
int re;
if(refCount[i] != (re = psly_search(i * (listN)))) {
++errCount;
}
}
if(errCount != 0)
errFlag = 1;
printf("err numbers: %d\n", errCount);
printf("total: %d, adds: %d\n", total, add);
allOp += total;
printf("actual op: %ld all:%ld fl:%d(%d)\n", totalOperation, allOp, fl, fl % 3);
gettimeofday(&end,NULL);
time_use=(end.tv_sec-start.tv_sec)+(end.tv_usec-start.tv_usec) / 1000000.0;//微秒
printf("total_use: %f, numOfItems: %d\n\n", time_use, numOfItems);
int k = 0;
for(int i = 0; i < LISTNUM; ++i) {
Record* head = idx_Record(map.lists[i]->head->nextRecord);
Record* tail = map.lists[i]->tail;
while(head != tail) {
++k;
head = idx_Record(head->nextRecord);
}
}
UNINIT_RESOURCE(Record, LISTNUM, k, &errQueueNum);
printf("%d:%d times queues Wrong! now %d, %d, %d\n", errQueueNum, errFlag, LISTNUM, k, LISTNUM == k);
sleep(3);
}
return 0;
}
|
the_stack_data/1098842.c | //Faça um programa que leia um inteiro N≥1 da entrada padrão. Na sequência leia N números reais.
//Seu programa deve imprimir, com duas casas decimais e nessa ordem:
//
//menor valor;
//maior valor;
//média.
//Seu programa não pode armazenar os valores em um vetor!
#include <stdio.h>
int main()
{
int i, n;
float soma, media, aux, maior, menor;
soma = 0.0;
aux = 0;
media = 0;
scanf("%d", &n);
for (i=0; i < n; i++)
{
scanf("%f", &aux);
if (i == 0)
{
maior = aux;
menor = aux;
}
if (aux > maior)
{
maior = aux;
}
if (aux < menor)
{
menor = aux;
}
soma += aux;
aux = 0;
}
media = (float) soma / n;
printf("%.2f\n", menor);
printf("%.2f\n", maior);
printf("%.2f\n", media);
return 0;
} |
the_stack_data/149615.c | #include <stdio.h>
#define MAXLINE 1000
int get_line(char line[], int maxline);
void copy(char from[], char to[]);
int main(void)
{
int len;
char line[MAXLINE];
int maxlen;
char maxline[MAXLINE];
maxlen = 0;
while ((len = get_line(line, MAXLINE)) > 0)
{
if (maxlen < len)
{
maxlen = len;
copy(line, maxline);
}
printf("line_length: %d\n", len);
}
if (maxlen > 0)
{
printf("%s", maxline);
}
return 0;
}
int get_line(char line[], int maxline)
{
int c, i;
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';
while(c != EOF && c != '\n')
{
++i;
c = getchar();
}
return i;
}
void copy(char from[], char to[])
{
int i = 0;
while ((to[i] = from[i]) != '\0')
{
++i;
}
}
|
the_stack_data/9512510.c | #include <stdio.h>
enum day
{
sunday = 1,
monday,
tuesday = 5,
wednesday,
thursday = 10,
friday,
saturday
};
int main()
{
enum day temp = 100;
printf("%d\n", temp);
return 0;
}
|
the_stack_data/111077363.c | #include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/mman.h>
int main(int argc, char *argv[])
{
int fd;
volatile uint32_t *spi;
if((fd = open("/dev/mem", O_RDWR)) < 0)
{
perror("open");
return EXIT_FAILURE;
}
spi = mmap(NULL, sysconf(_SC_PAGESIZE), PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0x40002000);
*spi = 0x555555;
*spi = 0xAAAAAA;
return EXIT_SUCCESS;
}
|
the_stack_data/107899.c | #include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <locale.h>
#define nl 5
#define nc 5
/*
22) Elabore um algoritmo para ler uma matriz M 5x5. Calcule e mostre a quantidade de elementos
fora do intervalo [5, 15]
*/
int main(int argc, char *argv[]) {
setlocale(LC_ALL, "Portuguese");
srand(time(NULL));
int M[nl][nc];
int cont;
printf("Matriz: \n");
for (int i = 0; i < nl; i++)
{
for (int j = 0; j < nc; j++)
{
M[i][j] = rand() % 20;
printf("%d ", M[i][j]);
}
printf("\n");
}
for (int i = 0; i < nl; i++)
{
for (int j = 0; j < nc; j++)
{
if ((M[i][j] < 5) || (M[i][j] > 15))
{
printf("\nElemento menor que 5 ou maior que 15 -> M[%d][%d]: %d\n", i, j, M[i][j]);
cont++;
}
}
}
printf("\nContador de Elementos: %d\n", cont);
return 0;
}
|
the_stack_data/153266866.c | /*
* MatProps.c
*
* Created on: Dec 12, 2016
* Author: abauville
*/
/*
//---------------------------------------------------------------------------
// set tensor and units correction for rheological profiles
#undef __FUNCT__
#define __FUNCT__ "SetProfileCorrection"
PetscErrorCode SetProfileCorrection(PetscScalar *B, PetscScalar n, self.tensorCorrection self.tensorCorrection, PetscInt self.self.MPa)
PetscScalar F2, Bi
# Lab. experiments are typically done under simple shear or uni-axial
# compression, which requires a correction in order to use them in tensorial format.
# An explanation is given in the textbook of Taras Gerya, chapter 6, p. 71-78.
PetscFunctionBegin
Bi = *B
# Tensor correction
# In LaMEM this is added to the pre-factor and not to the effective viscosity as in T. Gerya
if (self.tensorCorrection == "UniAxial") F2 = pow(0.5,(n-1)/n) / pow(3,(n+1)/(2*n)) // F2 = 1/2^((n-1)/n)/3^((n+1)/2/n)
else if (self.tensorCorrection == "SimpleShear") F2 = pow(0.5,(2*n-1)/n) // F2 = 1/2^((2*n-1)/n)
else if (self.tensorCorrection == "None") F2 = 0.5
else
SETERRQ(PETSC_COMM_SELF, PETSC_ERR_USER, "Unknown tensor correction in creep mechanism profile!")
# Units correction from [self.MPa^(-n)s^(-1)] to [Pa^(-n)s^(-1)] if required
if (MPa) Bi = pow(2*F2,-n) * pow(1e6*pow(Bi,-1/n),-n)
else Bi = pow(2*F2,-n) * Bi
(*B) = Bi
PetscFunctionReturn(0)
*/
|
the_stack_data/9513698.c | #include <stdio.h>
printArray(int array[], int arraySize) {
int i;
for (i=0; i<arraySize; i++) {
if (i == arraySize-1) {
printf("%d\n", array[i]);
}
else {
printf("%d, ", array[i]);
}
}
}
main() {
int i;
int arraySize;
printf("What would you like the size of the array to be? ");
scanf("%d", &arraySize);
int array[arraySize];
for (i=0; i<arraySize; i++) {
int element;
printf("Enter element %d: ", i);
scanf("%d", &element);
array[i] = element;
}
printf("Array before sorting = ");
printArray(array, arraySize);
for (i=0; i<arraySize; i++) {
int element = array[i];
int j = i;
while (j > 0 && array[j-1] > element) {
array[j] = array[j-1];
j = j - 1;
}
array[j] = element;
printf("Array after iteration %d = ", i);
printArray(array, arraySize);
}
printf("Array after sorting = ");
printArray(array, arraySize);
}
|
the_stack_data/165765647.c | /* $OpenBSD: wctob.c,v 1.1 2010/07/27 16:59:04 stsp Exp $ */
/*-
* Copyright (c) 2002-2004 Tim J. Robbins.
* 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 AUTHOR 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 AUTHOR 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 <sys/cdefs.h>
#include <limits.h>
#include <stdio.h>
#include <string.h>
#include <wchar.h>
int
wctob(wint_t c)
{
mbstate_t mbs;
char buf[MB_LEN_MAX];
memset(&mbs, 0, sizeof(mbs));
if (c == WEOF || wcrtomb(buf, c, &mbs) != 1)
return (EOF);
return ((unsigned char)*buf);
}
|
the_stack_data/231391901.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main()
{
double budget;
scanf("%lf", &budget);
char season[20];
scanf("%s", season);
double price = 0.0;
char car[20], car_class[20];
if(budget <= 100) {
strcpy(car_class, "Economy class");
if(strcmp(season, "Summer") == 0) {
strcpy(car, "Cabrio");
price = budget * 0.35;
}
else if(strcmp(season, "Winter") == 0) {
strcpy(car, "Jeep");
price = budget * 0.65;
}
}
else if(budget >= 100 && budget <= 500) {
strcpy(car_class, "Compact class");
if(strcmp(season, "Summer") == 0) {
strcpy(car, "Cabrio");
price = budget * 0.45;
}
else if(strcmp(season, "Winter") == 0) {
strcpy(car, "Jeep");
price = budget * 0.80;
}
}
else if(budget > 500) {
strcpy(car_class, "Luxury class");
strcpy(car, "Jeep");
price = budget * 0.90;
}
printf("%s\n", car_class);
printf("%s - %.2lf", car, price);
return 0;
}
|
the_stack_data/98360.c | #include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#define BF_SZ 10000
struct node{
int *arr;
int arr_size;
struct node* prev;
struct node* next;
};
struct linked_list{
struct node *head;
struct node *tail;
int num_elems;
};
struct node* add_node(struct linked_list *list, int size_of_node);
void free_list(struct linked_list *list);
int max(int n1, int n2);
void remove_newline(char *buffer);
int main(){
char buffer[BF_SZ];
FILE *fp;
struct linked_list *list = (struct linked_list*)malloc(sizeof(struct linked_list));
list->head = NULL;
list->tail = NULL;
list->num_elems = 0;
printf("Enter the name of the input file: ");
fgets(buffer, BF_SZ, stdin);
remove_newline(buffer);
fp = fopen(buffer, "r");
if(fp == NULL){
perror("Could not open file");
return 1;
}
int curr_elems = 1;
while(fgets(buffer, BF_SZ, fp)){
remove_newline(buffer);
struct node* node = add_node(list, curr_elems);
char *p = buffer;
for(int i=0; i<curr_elems; i++){
int number = atoi(p);
node->arr[i] = number;
if(i != curr_elems-1){
do{
p++;
}while(*p != ' ');
p++;
}
}
curr_elems++;
}
fclose(fp);
printf("There are a total of %d rows.\n", list->num_elems);
struct node* curr = list->tail;
while(curr->prev != NULL){
struct node* prev = curr->prev;
for(int i=0; i<prev->arr_size; i++){
prev->arr[i] += max(curr->arr[i], curr->arr[i+1]);
}
curr = prev;
}
printf("If you can trust me, the result you are looking for is %d.\n", curr->arr[0]);
free_list(list);
free(list);
return 0;
}
void remove_newline(char *buffer){
char *p = buffer;
while(*p != '\0'){
if(*p == '\n'){
*p = '\0';
break;
}
p++;
}
}
int max(int n1, int n2){
return n1 > n2 ? n1 : n2;
}
void free_list(struct linked_list *list){
struct node* curr = list->head;
while(curr != NULL){
free(curr->arr);
struct node* next = curr->next;
free(curr);
curr = next;
}
list->head = NULL;
list->tail = NULL;
list->num_elems = 0;
}
struct node* add_node(struct linked_list *list, int size_of_node){
struct node* res = (struct node*)malloc(sizeof(struct node));
res->arr = (int*)malloc(sizeof(int)*size_of_node);
res->arr_size = size_of_node;
res->prev = NULL;
res->next = NULL;
if(list->num_elems == 0){
list->head = res;
list->tail = res;
}else{
list->tail->next = res;
res->prev = list->tail;
list->tail = res;
}
list->num_elems++;
return res;
}
|
the_stack_data/140764920.c | #include <stdio.h>
#include <stdlib.h>
int mutex = 1;
// Number of full slots as 0
int full = 0;
// Number of empty slots as size
// of buffer
int empty = 10, x = 0;
// Function for producer
void producer()
{
// Decrease mutex value by 1
--mutex;
// Increase the number of full
// slots by 1
++full;
// Decrease the number of empty
// slots by 1
--empty;
// Item produced
x++;
printf("\nProducer produces "
"item %d",
x);
// Increase mutex value by 1
++mutex;
}
// Function for consumer
void consumer()
{
// Decrease mutex value by 1
--mutex;
// Decrease the number of full
// slots by 1
--full;
// Increase the number of empty
// slots by 1
++empty;
printf("\nConsumer consumes "
"item %d",
x);
x--;
// Increase mutex value by 1
++mutex;
}
int main()
{
int n, i;
printf("\n1.Producer"
"\n2.Consumer"
"\n3.Exit");
#pragma omp critical
for (i = 1; i > 0; i++) {
printf("\nEnter your choice:");
scanf("%d", &n);
// Switch Cases
switch (n) {
case 1:
// If mutex is 1 and empty
// is non-zero, then it is
// possible to produce
if ((mutex == 1)
&& (empty != 0)) {
producer();
}
// Otherwise, print buffer
// is full
else {
printf("Buffer is full!");
}
break;
case 2:
// If mutex is 1 and full
// is non-zero, then it is
// possible to consume
if ((mutex == 1)
&& (full != 0)) {
consumer();
}
// Otherwise, print Buffer
// is empty
else {
printf("\nBuffer is empty!");
}
break;
// Exit Condition
case 3:
exit(0);
break;
}
}
return 0;
}
|
the_stack_data/1007033.c | int main()
{
printf("Hello World !!!\n");
return 0;
}
|
the_stack_data/7067.c | /* The fp-bit.c function __floatunsisf had a latent bug where guard bits
could be lost leading to incorrect rounding. */
/* Origin: Joseph Myers <[email protected]> */
extern void abort (void);
extern void exit (int);
#if __INT_MAX__ >= 0x7fffffff
volatile unsigned u = 0x80000081;
#else
volatile unsigned long u = 0x80000081;
#endif
volatile float f1, f2;
int main (void)
{
f1 = (float) u;
f2 = (float) 0x80000081;
if (f1 != f2)
abort ();
exit (0);
}
|
the_stack_data/3263577.c | //TRIPLET
//https://github.com/L-F-Z/ADT_Code
//Developed by UCAS ADT_Code Group
#include <stdio.h>
#include <stdlib.h>
#include <malloc.h>
//----------|Status|-----------
typedef int Status;
#define TRUE 1
#define FALSE 0
#define OK 1
#define ERROR 0
#define INFEASIBLE -1
#define OVERFLOW -2
//-----------------------------
//---------|Typedef|-----------
typedef int ElemType; //三元组存储的数据类型
typedef ElemType *Triplet; //由InitTriplet分配3个元素储存空间
//-----------------------------
//---------|FuncList|----------
Status InitTriplet(Triplet*, ElemType, ElemType, ElemType);
//构造三元组,依次置T的3个元素的初值为v1,v2和v3;
Status DestroyTriplet(Triplet*);
//销毁三元组T
Status Get(Triplet, int, ElemType*);
//用e返回T的第i元的值
Status Put(Triplet*, int, ElemType);
//置T的第i元的值为e
Status IsAscending(Triplet);
//如果T的三个元素按升序排序,则返回1,否则返回0
Status IsDescending(Triplet);
//如果T的三个元素按降序排序,则返回1,否则返回0
Status Max(Triplet, ElemType*);
//用e返回指向T的最大元素的值
Status Min(Triplet, ElemType*);
//用e返回指向T的最小元素的值
Status PrintTriplet(Triplet);
//打印三元组T
//-----------------------------
int main()
{
return 0;
}
//-----------------------------
Status InitTriplet(Triplet *T, ElemType v1, ElemType v2, ElemType v3)
{
//构造三元组,依次置T的3个元素的初值为v1,v2和v3;
*T = (ElemType *)malloc(3 * sizeof(ElemType)); //分配3个元素的储存空间
if(!*T) exit(OVERFLOW); //分配储存空间失败
(*T)[0] = v1; (*T)[1] = v2; (*T)[2] = v3;
return OK;
}//InitTriplet
Status DestroyTriplet(Triplet *T)
{
//销毁三元组T
free(*T);
*T = NULL;
return OK;
}//DestroyTriplet
Status Get(Triplet T, int i, ElemType *e)
{
//用e返回T的第i元的值
//i的合法值为1<=i<=3
if(i < 1 || i > 3) return ERROR;
*e = T[i - 1];
return OK;
}//Get
Status Put(Triplet *T, int i, ElemType e)
{
//置T的第i元的值为e
//i的合法值为1<=i<=3
if(i < 1 || i > 3) return ERROR;
(*T)[i - 1] = e;
return OK;
}//Put
Status IsAscending(Triplet T)
{
//如果T的三个元素按升序排序,则返回1,否则返回0
return (T[0] <= T[1]) && (T[1] <= T[2]);
}//IsAscending
Status IsDescending(Triplet T)
{
//如果T的三个元素按降序排序,则返回1,否则返回0
return (T[0] >= T[1]) && (T[1] >= T[2]);
}//IsDescending
Status Max(Triplet T, ElemType *e)
{
//用e返回指向T的最大元素的值
*e = (T[0] >= T[1]) ?
((T[0] >= T[2]) ? T[0] :T[2]):
((T[1] >= T[2]) ? T[1] :T[2]);
return OK;
}//Max
Status Min(Triplet T, ElemType *e)
{
//用e返回指向T的最小元素的值
*e = (T[0] <= T[1]) ?
((T[0] <= T[2]) ? T[0] :T[2]):
((T[1] <= T[2]) ? T[1] :T[2]);
return OK;
}//Min
Status PrintTriplet(Triplet T)
{
//打印三元组T
int i;
for(i = 0; i < 3; i++)
printf("%d\t", T[i]); //issue: Should Depend on the ElemType
printf("\n");
} |
the_stack_data/418188.c | //*****************************************************************************
//
// startup_ccs.c - Startup code for use with TI's Code Composer Studio.
//
// Copyright (c) 2012 Texas Instruments Incorporated. All rights reserved.
// Software License Agreement
//
// Texas Instruments (TI) is supplying this software for use solely and
// exclusively on TI's microcontroller products. The software is owned by
// TI and/or its suppliers, and is protected under applicable copyright
// laws. You may not combine this software with "viral" open-source
// software in order to form a larger program.
//
// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS.
// NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT
// NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. TI SHALL NOT, UNDER ANY
// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL
// DAMAGES, FOR ANY REASON WHATSOEVER.
//
// This is part of revision 9453 of the MDL-LM4F211CNCD Firmware Package.
//
//*****************************************************************************
//*****************************************************************************
//
// Forward declaration of the default fault handlers.
//
//*****************************************************************************
void ResetISR(void);
static void NmiSR(void);
static void FaultISR(void);
static void IntDefaultHandler(void);
//*****************************************************************************
//
// External declaration for the reset handler that is to be called when the
// processor is started
//
//*****************************************************************************
extern void _c_int00(void);
//*****************************************************************************
//
// Linker variable that marks the top of the stack.
//
//*****************************************************************************
extern unsigned long __STACK_TOP;
//*****************************************************************************
//
// The vector table. Note that the proper constructs must be placed on this to
// ensure that it ends up at physical address 0x0000.0000 or at the start of
// the program if located at a start address other than 0.
//
//*****************************************************************************
#pragma DATA_SECTION(g_pfnVectors, ".intvecs")
void (* const g_pfnVectors[])(void) =
{
(void (*)(void))((unsigned long)&__STACK_TOP),
// The initial stack pointer
ResetISR, // The reset handler
NmiSR, // The NMI handler
FaultISR, // The hard fault handler
IntDefaultHandler, // The MPU fault handler
IntDefaultHandler, // The bus fault handler
IntDefaultHandler, // The usage fault handler
0, // Reserved
0, // Reserved
0, // Reserved
0, // Reserved
IntDefaultHandler, // SVCall handler
IntDefaultHandler, // Debug monitor handler
0, // Reserved
IntDefaultHandler, // The PendSV handler
IntDefaultHandler, // The SysTick handler
IntDefaultHandler, // GPIO Port A
IntDefaultHandler, // GPIO Port B
IntDefaultHandler, // GPIO Port C
IntDefaultHandler, // GPIO Port D
IntDefaultHandler, // GPIO Port E
IntDefaultHandler, // UART0 Rx and Tx
IntDefaultHandler, // UART1 Rx and Tx
IntDefaultHandler, // SSI0 Rx and Tx
IntDefaultHandler, // I2C0 Master and Slave
IntDefaultHandler, // PWM Fault
IntDefaultHandler, // PWM Generator 0
IntDefaultHandler, // PWM Generator 1
IntDefaultHandler, // PWM Generator 2
IntDefaultHandler, // Quadrature Encoder 0
IntDefaultHandler, // ADC Sequence 0
IntDefaultHandler, // ADC Sequence 1
IntDefaultHandler, // ADC Sequence 2
IntDefaultHandler, // ADC Sequence 3
IntDefaultHandler, // Watchdog timer
IntDefaultHandler, // Timer 0 subtimer A
IntDefaultHandler, // Timer 0 subtimer B
IntDefaultHandler, // Timer 1 subtimer A
IntDefaultHandler, // Timer 1 subtimer B
IntDefaultHandler, // Timer 2 subtimer A
IntDefaultHandler, // Timer 2 subtimer B
IntDefaultHandler, // Analog Comparator 0
IntDefaultHandler, // Analog Comparator 1
IntDefaultHandler, // Analog Comparator 2
IntDefaultHandler, // System Control (PLL, OSC, BO)
IntDefaultHandler, // FLASH Control
IntDefaultHandler, // GPIO Port F
IntDefaultHandler, // GPIO Port G
IntDefaultHandler, // GPIO Port H
IntDefaultHandler, // UART2 Rx and Tx
IntDefaultHandler, // SSI1 Rx and Tx
IntDefaultHandler, // Timer 3 subtimer A
IntDefaultHandler, // Timer 3 subtimer B
IntDefaultHandler, // I2C1 Master and Slave
IntDefaultHandler, // Quadrature Encoder 1
IntDefaultHandler, // CAN0
IntDefaultHandler, // CAN1
IntDefaultHandler, // CAN2
IntDefaultHandler, // Ethernet
IntDefaultHandler, // Hibernate
IntDefaultHandler, // USB0
IntDefaultHandler, // PWM Generator 3
IntDefaultHandler, // uDMA Software Transfer
IntDefaultHandler, // uDMA Error
IntDefaultHandler, // ADC1 Sequence 0
IntDefaultHandler, // ADC1 Sequence 1
IntDefaultHandler, // ADC1 Sequence 2
IntDefaultHandler, // ADC1 Sequence 3
IntDefaultHandler, // I2S0
IntDefaultHandler, // External Bus Interface 0
IntDefaultHandler, // GPIO Port J
IntDefaultHandler, // GPIO Port K
IntDefaultHandler, // GPIO Port L
IntDefaultHandler, // SSI2 Rx and Tx
IntDefaultHandler, // SSI3 Rx and Tx
IntDefaultHandler, // UART3 Rx and Tx
IntDefaultHandler, // UART4 Rx and Tx
IntDefaultHandler, // UART5 Rx and Tx
IntDefaultHandler, // UART6 Rx and Tx
IntDefaultHandler, // UART7 Rx and Tx
0, // Reserved
0, // Reserved
0, // Reserved
0, // Reserved
IntDefaultHandler, // I2C2 Master and Slave
IntDefaultHandler, // I2C3 Master and Slave
IntDefaultHandler, // Timer 4 subtimer A
IntDefaultHandler, // Timer 4 subtimer B
0, // Reserved
0, // Reserved
0, // Reserved
0, // Reserved
0, // Reserved
0, // Reserved
0, // Reserved
0, // Reserved
0, // Reserved
0, // Reserved
0, // Reserved
0, // Reserved
0, // Reserved
0, // Reserved
0, // Reserved
0, // Reserved
0, // Reserved
0, // Reserved
0, // Reserved
0, // Reserved
IntDefaultHandler, // Timer 5 subtimer A
IntDefaultHandler, // Timer 5 subtimer B
IntDefaultHandler, // Wide Timer 0 subtimer A
IntDefaultHandler, // Wide Timer 0 subtimer B
IntDefaultHandler, // Wide Timer 1 subtimer A
IntDefaultHandler, // Wide Timer 1 subtimer B
IntDefaultHandler, // Wide Timer 2 subtimer A
IntDefaultHandler, // Wide Timer 2 subtimer B
IntDefaultHandler, // Wide Timer 3 subtimer A
IntDefaultHandler, // Wide Timer 3 subtimer B
IntDefaultHandler, // Wide Timer 4 subtimer A
IntDefaultHandler, // Wide Timer 4 subtimer B
IntDefaultHandler, // Wide Timer 5 subtimer A
IntDefaultHandler, // Wide Timer 5 subtimer B
IntDefaultHandler, // FPU
IntDefaultHandler, // PECI 0
IntDefaultHandler, // LPC 0
IntDefaultHandler, // I2C4 Master and Slave
IntDefaultHandler, // I2C5 Master and Slave
IntDefaultHandler, // GPIO Port M
IntDefaultHandler, // GPIO Port N
IntDefaultHandler, // Quadrature Encoder 2
IntDefaultHandler, // Fan 0
0, // Reserved
IntDefaultHandler, // GPIO Port P (Summary or P0)
IntDefaultHandler, // GPIO Port P1
IntDefaultHandler, // GPIO Port P2
IntDefaultHandler, // GPIO Port P3
IntDefaultHandler, // GPIO Port P4
IntDefaultHandler, // GPIO Port P5
IntDefaultHandler, // GPIO Port P6
IntDefaultHandler, // GPIO Port P7
IntDefaultHandler, // GPIO Port Q (Summary or Q0)
IntDefaultHandler, // GPIO Port Q1
IntDefaultHandler, // GPIO Port Q2
IntDefaultHandler, // GPIO Port Q3
IntDefaultHandler, // GPIO Port Q4
IntDefaultHandler, // GPIO Port Q5
IntDefaultHandler, // GPIO Port Q6
IntDefaultHandler, // GPIO Port Q7
IntDefaultHandler, // GPIO Port R
IntDefaultHandler, // GPIO Port S
IntDefaultHandler, // PWM 1 Generator 0
IntDefaultHandler, // PWM 1 Generator 1
IntDefaultHandler, // PWM 1 Generator 2
IntDefaultHandler, // PWM 1 Generator 3
IntDefaultHandler // PWM 1 Fault
};
//*****************************************************************************
//
// This is the code that gets called when the processor first starts execution
// following a reset event. Only the absolutely necessary set is performed,
// after which the application supplied entry() routine is called. Any fancy
// actions (such as making decisions based on the reset cause register, and
// resetting the bits in that register) are left solely in the hands of the
// application.
//
//*****************************************************************************
void
ResetISR(void)
{
//
// Jump to the CCS C initialization routine. This will enable the
// floating-point unit as well, so that does not need to be done here.
//
__asm(" .global _c_int00\n"
" b.w _c_int00");
}
//*****************************************************************************
//
// This is the code that gets called when the processor receives a NMI. This
// simply enters an infinite loop, preserving the system state for examination
// by a debugger.
//
//*****************************************************************************
static void
NmiSR(void)
{
//
// Enter an infinite loop.
//
while(1)
{
}
}
//*****************************************************************************
//
// This is the code that gets called when the processor receives a fault
// interrupt. This simply enters an infinite loop, preserving the system state
// for examination by a debugger.
//
//*****************************************************************************
static void
FaultISR(void)
{
//
// Enter an infinite loop.
//
while(1)
{
}
}
//*****************************************************************************
//
// This is the code that gets called when the processor receives an unexpected
// interrupt. This simply enters an infinite loop, preserving the system state
// for examination by a debugger.
//
//*****************************************************************************
static void
IntDefaultHandler(void)
{
//
// Go into an infinite loop.
//
while(1)
{
}
}
|
the_stack_data/78626.c | // INFO: task hung in nbd_ioctl
// https://syzkaller.appspot.com/bug?id=53eda674e6d403bf1e6297c9cba45d3705f1ad1c
// status:open
// autogenerated by syzkaller (https://github.com/google/syzkaller)
#define _GNU_SOURCE
#include <dirent.h>
#include <endian.h>
#include <errno.h>
#include <fcntl.h>
#include <signal.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/prctl.h>
#include <sys/stat.h>
#include <sys/syscall.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <time.h>
#include <unistd.h>
static void sleep_ms(uint64_t ms)
{
usleep(ms * 1000);
}
static uint64_t current_time_ms(void)
{
struct timespec ts;
if (clock_gettime(CLOCK_MONOTONIC, &ts))
exit(1);
return (uint64_t)ts.tv_sec * 1000 + (uint64_t)ts.tv_nsec / 1000000;
}
static bool write_file(const char* file, const char* what, ...)
{
char buf[1024];
va_list args;
va_start(args, what);
vsnprintf(buf, sizeof(buf), what, args);
va_end(args);
buf[sizeof(buf) - 1] = 0;
int len = strlen(buf);
int fd = open(file, O_WRONLY | O_CLOEXEC);
if (fd == -1)
return false;
if (write(fd, buf, len) != len) {
int err = errno;
close(fd);
errno = err;
return false;
}
close(fd);
return true;
}
static long syz_open_dev(volatile long a0, volatile long a1, volatile long a2)
{
if (a0 == 0xc || a0 == 0xb) {
char buf[128];
sprintf(buf, "/dev/%s/%d:%d", a0 == 0xc ? "char" : "block", (uint8_t)a1,
(uint8_t)a2);
return open(buf, O_RDWR, 0);
} else {
char buf[1024];
char* hash;
strncpy(buf, (char*)a0, sizeof(buf) - 1);
buf[sizeof(buf) - 1] = 0;
while ((hash = strchr(buf, '#'))) {
*hash = '0' + (char)(a1 % 10);
a1 /= 10;
}
return open(buf, a2, 0);
}
}
static void kill_and_wait(int pid, int* status)
{
kill(-pid, SIGKILL);
kill(pid, SIGKILL);
int i;
for (i = 0; i < 100; i++) {
if (waitpid(-1, status, WNOHANG | __WALL) == pid)
return;
usleep(1000);
}
DIR* dir = opendir("/sys/fs/fuse/connections");
if (dir) {
for (;;) {
struct dirent* ent = readdir(dir);
if (!ent)
break;
if (strcmp(ent->d_name, ".") == 0 || strcmp(ent->d_name, "..") == 0)
continue;
char abort[300];
snprintf(abort, sizeof(abort), "/sys/fs/fuse/connections/%s/abort",
ent->d_name);
int fd = open(abort, O_WRONLY);
if (fd == -1) {
continue;
}
if (write(fd, abort, 1) < 0) {
}
close(fd);
}
closedir(dir);
} else {
}
while (waitpid(-1, status, __WALL) != pid) {
}
}
static void setup_test()
{
prctl(PR_SET_PDEATHSIG, SIGKILL, 0, 0, 0);
setpgrp();
write_file("/proc/self/oom_score_adj", "1000");
}
static void execute_one(void);
#define WAIT_FLAGS __WALL
static void loop(void)
{
int iter;
for (iter = 0;; iter++) {
int pid = fork();
if (pid < 0)
exit(1);
if (pid == 0) {
setup_test();
execute_one();
exit(0);
}
int status = 0;
uint64_t start = current_time_ms();
for (;;) {
if (waitpid(-1, &status, WNOHANG | WAIT_FLAGS) == pid)
break;
sleep_ms(1);
if (current_time_ms() - start < 5 * 1000)
continue;
kill_and_wait(pid, &status);
break;
}
}
}
uint64_t r[2] = {0xffffffffffffffff, 0xffffffffffffffff};
void execute_one(void)
{
intptr_t res = 0;
res = syscall(__NR_socket, 0x10, 2, 0);
if (res != -1)
r[0] = res;
memcpy((void*)0x20000080, "/dev/nbd#\000", 10);
res = syz_open_dev(0x20000080, 0, 0);
if (res != -1)
r[1] = res;
syscall(__NR_ioctl, r[1], 0xab00, r[0]);
syscall(__NR_ioctl, r[1], 0xab03, 0);
}
int main(void)
{
syscall(__NR_mmap, 0x20000000, 0x1000000, 3, 0x32, -1, 0);
loop();
return 0;
}
|
the_stack_data/243893454.c | /*Using if else statements, write a program that
reads input up to #, replaces each period
with an exclamation mark, replaces each exclamation
mark initially present with two exclamation marks,
and reports at the end the number of substitutions it has made.*/
#include <stdio.h>
#define STOP_CHAR '#'
int main(void)
{
char ch;
int count = 0;
while ((ch = getchar()) != STOP_CHAR)
{
if (ch == '.')
{
ch = '!';
//putchar('!');
count++;
} else if (ch == '!')
{
putchar('!');
count++;
}
putchar(ch);
}
printf("Total number of substitions: %d", count);
return 0;
} |
the_stack_data/140766473.c | #include <time.h>
#include <stdio.h>
#include <stdlib.h>
int main()
{
struct tm *tm_ptr;
time_t the_time;
(void) time(&the_time);
tm_ptr = gmtime(&the_time);
printf("Raw time is %ld\n", the_time);
printf("gmtime gives:\n");
printf("date: %02d/%02d/%02d\n",
tm_ptr->tm_year, tm_ptr->tm_mon+1, tm_ptr->tm_mday);
printf("time: %02d:%02d:%02d\n",
tm_ptr->tm_hour, tm_ptr->tm_min, tm_ptr->tm_sec);
exit(0);
}
|
the_stack_data/51699805.c | /**
******************************************************************************
* @file com_mdm.c
* @author MCD Application Team
* @brief This file implements communication with International Circuit Card
******************************************************************************
* @attention
*
* <h2><center>© Copyright (c) 2020 STMicroelectronics.
* All rights reserved.</center></h2>
*
* This software component is licensed by ST under Ultimate Liberty license
* SLA0044, the "License"; You may not use this file except in compliance with
* the License. You may obtain a copy of the License at:
* www.st.com/SLA0044
*
******************************************************************************
*/
#if defined(USE_COM_MDM)
/* Includes ------------------------------------------------------------------*/
#include "com_mdm.h"
#include <string.h>
#include <stdlib.h>
#include "rtosal.h"
#include "com_err.h"
#include "com_sockets_net_compat.h"
#include "com_trace.h"
#include "cellular_service_os.h"
#include "dc_common.h"
#include "cellular_control_api.h"
#include "cellular_service_datacache.h"
/* Private defines -----------------------------------------------------------*/
/* Private typedef -----------------------------------------------------------*/
typedef enum
{
COM_MDM_NOT_USED = 0,
COM_MDM_USED
} com_mdm_handle_state_t;
typedef struct
{
com_mdm_handle_state_t handle;
} com_mdm_desc_t;
/* Private macros ------------------------------------------------------------*/
/* Private variables ---------------------------------------------------------*/
/* Descriptor of com_mdm status */
static com_mdm_desc_t com_mdm_desc;
/* storage of registered application callback for MDM URC */
static com_mdm_urc_callback_t com_mdm_app_cb;
/* Global variables ----------------------------------------------------------*/
/* Private function prototypes -----------------------------------------------*/
/* Local callback for MDM URC */
void com_mdm_cb(CS_comMdm_status_t comMdmd_event_infos);
/* Private function Definition -----------------------------------------------*/
void com_mdm_cb(CS_comMdm_status_t comMdmd_event_infos)
{
UNUSED(comMdmd_event_infos);
if (com_mdm_app_cb != NULL)
{
/* if the application MDM URC call back is registered/defined, then call it */
com_mdm_app_cb();
}
}
/* Functions Definition ------------------------------------------------------*/
/**
* @brief register callback for mdm urc
* @note register a function as callback for mdm urc receive from modem
* @param callback - The call back to be registered. May be NULL to unregister callback
* @retval -
* @note the provided call back function should execute a minimum of code.
* Application should create an event or message to trigger a receive of a message to be treated later
*/
com_err_t com_mdm_subscribe_event(uint8_t handle, com_mdm_urc_callback_t callback)
{
com_err_t error = COM_ERR_GENERAL;
CS_Status_t cs_return;
if ((handle < 1U) && (com_mdm_desc.handle == COM_MDM_USED))
{
/* handle parameter is valid : */
/* -not bigger than number session max */
/* -handle is actually used */
/* Subscribe com_mdm callback to MDM URC event */
cs_return = osCS_ComMdm_subscribe_event(com_mdm_cb);
if (cs_return == CELLULAR_OK)
{
/* store the application callback given in parameter */
com_mdm_app_cb = callback;
error = COM_ERR_OK;
}
else
{
error = COM_ERR_GENERAL;
}
}
return (error);
}
/**
* @brief open mdm session, and return mdm handle
* @note com_mdm_open has to be called before using any com_mdm_* function
* @param -
* @retval - the mdm handle
* @note a handle value different from COM_MDM_HANDLE_ERROR is a valid handle value
* a handle value equals COM_MDM_HANDLE_ERROR represents an error : no more handle availables.
* Using a handle COM_MDM_HANDLE_ERROR in other com_mdm_* functions will result as an error.
*/
uint8_t com_mdm_open(void)
{
uint8_t i = 0;
uint8_t handle = COM_MDM_HANDLE_ERROR;
if (com_mdm_desc.handle == COM_MDM_NOT_USED)
{
/* An available handle exists, use it */
com_mdm_desc.handle = COM_MDM_USED;
handle = i;
}
/* Return the found available handle, or COM_MDM_HANDLE_ERROR if no available handle found */
return (handle);
}
/**
* @brief sends a MDM command to the Modem.
* @note
* @param[in] handle - the mdm handle to use, given by com_mdm_open
* @param[in] command - the string command to be send
* @param[in] length - the length of the command tyo be send
* @param[out] command_err_code - the error code returned by the command
* @retval - error code
* @note command sent correctly when error code is COM_ERR_OK
* command not sent correctly when error code is COM_ERR_GENERAL
* handle is unknown when error code is COM_ERR_DESCRIPTOR
*/
com_err_t com_mdm_send(uint8_t handle, com_char_t *command, uint32_t length, int32_t *command_err_code)
{
com_err_t error = COM_ERR_DESCRIPTOR;
CS_Status_t cs_return;
CS_Tx_Buffer_t cs_tx_buffer;
if ((handle < 1U) && (com_mdm_desc.handle == COM_MDM_USED))
{
cs_tx_buffer.p_buffer = command;
cs_tx_buffer.buffer_size = length;
cs_return = osCS_ComMdm_send(&cs_tx_buffer, command_err_code);
if (cs_return == CELLULAR_OK)
{
error = COM_ERR_OK;
}
else
{
error = COM_ERR_GENERAL;
}
}
return (error);
}
/**
* @brief initiate a full transaction (send + answer receive) for a MDM command to the Modem.
* @note
* @param[in] handle - the mdm handle to use, given by com_mdm_open
* @param[in] cmd_buff - the string command to be send
* @param[in] cmd_length - the length of the command to be send
* @param[in] rsp_buff - the string response received
* @param[in] rsp_length - the length of rsp_buff
* @param[out] command_err_code - the error code returned by the command
* @retval - error code
* @note command sent correctly when error code is COM_ERR_OK
* command not sent correctly when error code is COM_ERR_GENERAL
* handle is unknown when error code is COM_ERR_DESCRIPTOR
*/
com_err_t com_mdm_transaction(uint8_t handle, com_char_t *cmd_buff, uint32_t cmd_length,
com_char_t *rsp_buf, uint32_t rsp_length, int32_t *command_err_code)
{
com_err_t error = COM_ERR_DESCRIPTOR;
CS_Status_t cs_return;
CS_Tx_Buffer_t cs_tx_buffer;
CS_Rx_Buffer_t cs_rx_buffer;
if ((handle < 1U) && (com_mdm_desc.handle == COM_MDM_USED))
{
cs_tx_buffer.p_buffer = cmd_buff;
cs_tx_buffer.buffer_size = cmd_length;
cs_rx_buffer.p_buffer = rsp_buf;
cs_rx_buffer.max_buffer_size = rsp_length;
cs_return = osCS_ComMdm_transaction(&cs_tx_buffer, &cs_rx_buffer, command_err_code);
if (cs_return == CELLULAR_OK)
{
error = COM_ERR_OK;
}
else
{
error = COM_ERR_GENERAL;
}
}
return (error);
}
/**
* @brief read message from modem to the rsp buffer provided by the application.
* @note
* @param[in] handle - the mdm handle to use, given by com_mdm_open
* @param[in] resp - the string response received
* @param[in] length - the length of the resp buffer
* @param[out] command_err_code - the error code returned by the command
* @retval - error code
* @note command sent correctly when error code is COM_ERR_OK
* message is not receive correctly when error code is COM_ERR_GENERAL
* handle is unknown when error code is COM_ERR_DESCRIPTOR
*/
com_err_t com_mdm_receive(uint8_t handle, com_char_t *resp, uint32_t length, int32_t *command_err_code)
{
com_err_t error = COM_ERR_DESCRIPTOR;
CS_Status_t cs_return;
CS_Rx_Buffer_t cs_rx_buffer;
if ((handle < 1U) && (com_mdm_desc.handle == COM_MDM_USED))
{
cs_rx_buffer.p_buffer = resp;
cs_rx_buffer.max_buffer_size = length;
cs_return = osCS_ComMdm_receive(&cs_rx_buffer, command_err_code);
if (cs_return == CELLULAR_OK)
{
error = COM_ERR_OK;
}
else
{
error = COM_ERR_GENERAL;
}
}
return (error);
}
/**
* @brief close mdm session, and release mdm handle
* @note after a call to com_mdm_close no call to any com_mdm_* function should be done
* @param - the mdm handle to be released
* @retval - error code
* @note Handle is correctly released when error code is COM_ERR_OK
* handle can't be reseased when error code is COM_ERR_DESCRIPTOR
*/
com_err_t com_mdm_close(uint8_t handle)
{
com_err_t error = COM_ERR_DESCRIPTOR;
CS_Status_t cs_return;
if ((handle < 1U) && (com_mdm_desc.handle == COM_MDM_USED))
{
/* handle parameter is valid : */
/* -not bigger than number session max */
/* -handle is actually used */
/* set handle status to not used */
com_mdm_desc.handle = COM_MDM_NOT_USED;
if (com_mdm_app_cb != NULL)
{
/* a callback is registered, unsubscribe com_mdm callback to MDM URC event */
cs_return = osCS_ComMdm_subscribe_event(NULL);
if (cs_return == CELLULAR_OK)
{
/* reset the stored application callback */
com_mdm_app_cb = NULL;
error = COM_ERR_OK;
}
else
{
error = COM_ERR_GENERAL;
}
}
else
{
error = COM_ERR_OK;
}
}
return (error);
}
/*** Component Initialization/Start *******************************************/
/*** Used by com_core module - Not an User Interface **************************/
/**
* @brief Component initialization
* @note must be called only one time :
* - before using any other functions of com_mdm*
* @param -
* @retval bool - true/false init ok/nok
*/
void com_mdm_init(void)
{
/* Initialize com_mdm descriptor */
com_mdm_desc.handle = COM_MDM_NOT_USED;
/* Initialize registered application callback */
com_mdm_app_cb = NULL;
}
/**
* @brief Component start
* @note must be called only one time:
- after com_mdm_init
- and before using any other functions of com_mdm_*
* @param -
* @retval -
*/
void com_mdm_start(void)
{
__NOP();
}
#endif /* defined(USE_COM_MDM) */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
|
the_stack_data/12137.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define LENGTH 100000
/* Spell It Right (20) */
char* words[] = {
"zero", "one", "two", "three", "four",
"five", "six", "seven", "eight", "nine",
};
char N[LENGTH];
int main() {
memset(N, 0, sizeof(N));
char c;
while(~scanf("%c",&c)) {
if (c == '\n') break;
N[0] += c & 0x0F; /* high precise add */
for(int i=0; i<LENGTH; i++) /* carry on */
if (N[i] >= 10) {
N[i+1] += N[i] / 10;
N[i] %= 10;
} else break;
}
int i = LENGTH - 1;
while (i && !N[i]) i--; /* find highest non-zero */
for (;i>=0;i--) {
printf("%s", words[N[i]]);
if (i) printf(" ");
}
} |
the_stack_data/921369.c | //shivanshigupta
//India
#include<stdio.h>
int main(){
printf("Aku Cinta Kamu");
return 0;
}
|
the_stack_data/35671.c | #include <assert.h>
#include <fcntl.h>
#include <stdio.h>
#include <sys/stat.h>
#include <unistd.h>
int main()
{
struct stat s;
int ret = stat("in.c", &s);
assert (ret == 0);
printf("%d\n", s.st_mode);
return 0;
}
|
the_stack_data/159515552.c | #include <X11/Xlib.h>
#include <stdio.h>
#include <stdlib.h>
Display *dpy;
void start();
void grab();
void loop();
void stop();
void die();
int main() {
start();
grab();
loop();
stop();
return 0;
}
void die(char *exit_msg) {
fprintf(stderr, "%s\n", exit_msg); /* write a debug msg before exiting */
exit(EXIT_FAILURE);
}
void start() {
if (!(dpy = XOpenDisplay(0))) {
die("failed to open a display");
}
}
void loop() {
while(1);
}
void grab() {
}
void stop() {
XCloseDisplay(dpy);
}
|
the_stack_data/243891907.c | #include <stdio.h>
int main(){
printf("Hello World\n");
return 0;
}
|
the_stack_data/1164757.c | #include <stdlib.h>
#include <stdio.h>
#include <stdbool.h>
#define BUF_SIZE 4
bool is_vowel(char c) {
/*
* Returns true if c is a vowel (upper or lower case), and
* false otherwise.
*/
if ((c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u' || c == 'A' || c == 'E' || c == 'I' || c == 'O' || c == 'U') == 1) {
return true;
}
return false;
}
int copy_non_vowels(int num_chars, char* in_buf, char* out_buf) {
/*
* Copy all the non-vowels from in_buf to out_buf.
* num_chars indicates how many characters are in in_buf,
* and this function should return the number of non-vowels that
* that were copied over.
*/
int counter = 0;
for (int i = 0; i < num_chars; i++)
{
if(in_buf[i + 1] == '\0' || in_buf[i + 1] == EOF){
// printf("it has a null terminator at: \n");
// printf("%d\n", i);
break;
}
if (!is_vowel(in_buf[i]))
{
// printf("%c\n",in_buf[i]);
out_buf[counter] = in_buf[i];
counter++;
}
}
// out_buf[counter] = '\0';
return counter;
}
void disemvowel(FILE* inputFile, FILE* outputFile) {
/*
* Copy all the non-vowels from inputFile to outputFile.
* Create input and output buffers, and use fread() to repeatedly read
* in a buffer of data, copy the non-vowels to the output buffer, and
* use fwrite to write that out.
*/
//buffer arrays
char buffer[BUF_SIZE];
char buffer2[BUF_SIZE];
//2 cases, with an output file and without an output file
if(inputFile && outputFile) {
//takes chunks of data and disemvowels them all seperately before writing them to the output file
while(fread(buffer,1,BUF_SIZE,inputFile) == BUF_SIZE) {
int final_size = copy_non_vowels(sizeof(buffer),buffer,buffer2);
fwrite(buffer2, 1, final_size, outputFile);
}
} else {
//takes chunks of data and disemvowels them all seperately before outputing them in standard out
while(fread(buffer,1,BUF_SIZE,inputFile) == BUF_SIZE) {
int final_size = copy_non_vowels(sizeof(buffer),buffer,buffer2);
fwrite(buffer2,1,final_size,stdout);
}
}
}
int main(int argc, char *argv[]) {
// Code that processes the command line arguments
// and sets up inputFile and outputFile.
FILE *inputFile = fopen(argv[1], "r");
FILE *outputFile;
//if there is a specified output file
if(argc == 3){
outputFile = fopen(argv[2], "w+");
}
//2 cases, with an input file and without an input file (takes from standard in if without input)
if(inputFile){
disemvowel(inputFile, outputFile);
} else {
disemvowel(stdin, outputFile);
}
if(inputFile) fclose(inputFile);
if(outputFile) fclose(outputFile);
return 0;
}
|
the_stack_data/6387064.c | #include<stdio.h>
/*print Fahrenheit-Celsius table
for fahr =0,20...,300;floating-point version*/
main()
{
float fahr,celsius;
int lower,upper,step;
lower=0; /*lower limit of temperature table*/
upper=300; /*upper limit*/
step=20; /*step size*/
fahr=lower;
printf("fahrenheit\tcelsius\n-----------------------\n");
while(fahr <=upper){
celsius=(5.0/9.0)*(fahr-32.0);
printf("%5.0f%16.1f\n",fahr,celsius);
fahr=fahr+step;
}
} |
the_stack_data/3261824.c | /* $Id$ */
atoi(s)
register char *s;
{
register int total = 0;
register unsigned digit;
int minus = 0;
while (*s == ' ' || *s == '\t')
s++;
if (*s == '+') s++;
else if (*s == '-') {
s++;
minus = 1;
}
while ((digit = *s++ - '0') < 10) {
total *= 10;
total += digit;
}
return(minus ? -total : total);
}
|
the_stack_data/87638214.c | /* PR optimization/12510 */
/* Origin: Lars Skovlund <[email protected]> */
/* Reduced testcase by Volker Reichelt <[email protected]> */
/* Verify that one splitting pass is not missing on x86 at -O1 */
/* { dg-do compile } */
/* { dg-options "-O -mcpu=i686" { target i?86-*-* } } */
extern foo(double);
void bar(double x, double y)
{
foo (x);
if (y) x = y ? 0 : 1/y;
else if (y) x = y < 1 ? 1 : y;
else x = 1/y < 1 ? 1 : x;
foo (x);
}
|
the_stack_data/150139855.c | #include<stdio.h>
#include<stdlib.h>
#include<signal.h>
#include<unistd.h>
void trata_sinal(int signo)
{
if (signo == SIGINT)
printf("\nRecebido SIGINT\n");
exit(0);
}
int main(void)
{
if (signal(SIGINT, trata_sinal) == SIG_ERR)
printf("\nNao captura SIGINT\n");
while(1)
pause();
}
|
the_stack_data/810516.c | #include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <time.h>
char *read_line(int fd, int block_size) {
char c[block_size];
char *buf = NULL;
int len = 0;
while (1) {
int amount_read = read(fd, c, block_size);
if (amount_read <= 0) {
break;
}
/* Copy the read message to the buffer. */
buf = realloc(buf, len + block_size);
memcpy(buf + len, c, amount_read);
len += amount_read;
/* Check if we reached the end of the message. */
for (int i = 0; i < block_size; i++) {
if ((c[i] == '\r') || (c[i] == '\n') || (c[i] == '\0')) {
c[i] = '\0';
memcpy(buf + len - amount_read, c, amount_read);
goto ret;
}
}
}
ret:
buf = realloc(buf, len + 1);
buf[len] = '\0';
return buf;
};
/* This function is used to combine a command's argument and the working_dir
* attribute of a connection into a full path.
*/
char *construct_full_path(char *file_name, char *working_dir) {
if (!file_name || !working_dir) {
return NULL;
}
char *fpath = malloc(strlen(file_name) + strlen(working_dir) + 2);
if (fpath == NULL) {
return NULL;
}
fpath[0] = '.';
fpath[1] = '\0';
/* conn->working_dir always begins with a slash*/
strcat(fpath, working_dir);
strcat(fpath, file_name);
return fpath;
};
/* Returns a random, unprivilidged, valid port number to be used. */
int gen_port() {
srand(time(NULL));
int port = (rand() + 1025) % 0xffff;
return port;
};
/* Given the argc and argv that is passed to main(), get the port. Default 2121.*/
int get_port_arg(int argc, char *argv[]) {
if ((argc < 3) || (argv == NULL)) {
return 2121;
}
for (int i = 1; i < (argc - 1); i++) {
if (argv[i] == NULL) {
continue;
}
if (!strcmp(argv[i], "-p")) {
return atoi(argv[i + 1]);
}
}
return 2121;
};
/* Same as above, except this gets the directory to be served. Default "./" */
char *get_dir_arg(int argc, char *argv[]) {
if ((argc < 3) || (argv == NULL)) {
return "./";
}
for (int i = 1; i < (argc - 1); i++) {
if (argv[i] == NULL) {
continue;
}
if (!strcmp(argv[i], "-d")) {
return argv[i + 1];
}
}
return "./";
};
/* Same as above, except gets the file usernames and passwords are kept in.
* Default "./users"
*/
char *get_users_arg(int argc, char *argv[]) {
if ((argc < 3) || (argv == NULL)) {
return "./users";
}
for (int i = 1; i < (argc - 1); i++) {
if (argv[i] == NULL) {
continue;
}
if (!strcmp(argv[i], "-u")) {
return argv[i + 1];
}
}
return "./users";
};
|
the_stack_data/48575491.c | #include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <memory.h>
#define N 10000
#define read(x) int x; scanf("%d", &x)
bool hash[N];
int main() {
memset(hash, false, sizeof(hash));
read(n);
int maxs = 0, cnt = 0;
while (n--) {
read(m);
int s = 0;
while (m) {
s += m % 10;
m /= 10;
}
if (s > maxs) maxs = s;
if (!hash[s]) cnt++;
hash[s] = true;
}
printf("%d\n", cnt);
if (cnt) for (int i=0; i<=maxs; i++)
if (hash[i]) {
printf("%d", i);
if (--cnt) printf(" ");
}
}
|
the_stack_data/90765792.c | int printf(const char *, ...);
static int test1(void) {
struct A { char text[4]; } a = {"Hei"};
struct B { int i; } b = {42};
union U {
struct A a;
struct B b;
} u1 = {a},
u2 = {.b = b};
struct C {
union U u;
} s1 = {u1},
s2 = {a},
s3 = {"Oi"};
printf("%s\n", u1.a.text);
printf("%d\n", u2.b.i);
printf("%s\n", s1.u.a.text);
printf("%s\n", s2.u.a.text);
printf("%s\n", s3.u.a.text);
return 0;
}
static int test2(void) {
struct A { unsigned char data; } a = {'c'};
struct B {
struct A a;
int i;
} b = {a, 42};
struct C {
struct B b;
} c = {b};
return printf("{{{%c}, %d}}\n", c.b.a.data, c.b.i);
}
int main(void) {
return test1() + test2();
}
|
the_stack_data/231393452.c | #include <stdio.h>
int main()
{
printf(" *\n ***\n *****\n *******\n HHOHH\n ZZZZZ");
return 0;
}
|
the_stack_data/662883.c | /**
******************************************************************************
* @file stm32f7xx_ll_usart.c
* @author MCD Application Team
* @brief USART LL module driver.
******************************************************************************
* @attention
*
* Copyright (c) 2017 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
#if defined(USE_FULL_LL_DRIVER)
/* Includes ------------------------------------------------------------------*/
#include "stm32f7xx_ll_usart.h"
#include "stm32f7xx_ll_rcc.h"
#include "stm32f7xx_ll_bus.h"
#ifdef USE_FULL_ASSERT
#include "stm32_assert.h"
#else
#define assert_param(expr) ((void)0U)
#endif /* USE_FULL_ASSERT */
/** @addtogroup STM32F7xx_LL_Driver
* @{
*/
#if defined (USART1) || defined (USART2) || defined (USART3) || defined (USART6) || defined (UART4) || defined (UART5) || defined (UART7) || defined (UART8)
/** @addtogroup USART_LL
* @{
*/
/* Private types -------------------------------------------------------------*/
/* Private variables ---------------------------------------------------------*/
/* Private constants ---------------------------------------------------------*/
/* Private macros ------------------------------------------------------------*/
/** @addtogroup USART_LL_Private_Macros
* @{
*/
/* __BAUDRATE__ The maximum Baud Rate is derived from the maximum clock available
* divided by the smallest oversampling used on the USART (i.e. 8) */
#define IS_LL_USART_BAUDRATE(__BAUDRATE__) ((__BAUDRATE__) <= 27000000U)
/* __VALUE__ In case of oversampling by 16 and 8, BRR content must be greater than or equal to 16d. */
#define IS_LL_USART_BRR_MIN(__VALUE__) ((__VALUE__) >= 16U)
#define IS_LL_USART_DIRECTION(__VALUE__) (((__VALUE__) == LL_USART_DIRECTION_NONE) \
|| ((__VALUE__) == LL_USART_DIRECTION_RX) \
|| ((__VALUE__) == LL_USART_DIRECTION_TX) \
|| ((__VALUE__) == LL_USART_DIRECTION_TX_RX))
#define IS_LL_USART_PARITY(__VALUE__) (((__VALUE__) == LL_USART_PARITY_NONE) \
|| ((__VALUE__) == LL_USART_PARITY_EVEN) \
|| ((__VALUE__) == LL_USART_PARITY_ODD))
#define IS_LL_USART_DATAWIDTH(__VALUE__) (((__VALUE__) == LL_USART_DATAWIDTH_7B) \
|| ((__VALUE__) == LL_USART_DATAWIDTH_8B) \
|| ((__VALUE__) == LL_USART_DATAWIDTH_9B))
#define IS_LL_USART_OVERSAMPLING(__VALUE__) (((__VALUE__) == LL_USART_OVERSAMPLING_16) \
|| ((__VALUE__) == LL_USART_OVERSAMPLING_8))
#define IS_LL_USART_LASTBITCLKOUTPUT(__VALUE__) (((__VALUE__) == LL_USART_LASTCLKPULSE_NO_OUTPUT) \
|| ((__VALUE__) == LL_USART_LASTCLKPULSE_OUTPUT))
#define IS_LL_USART_CLOCKPHASE(__VALUE__) (((__VALUE__) == LL_USART_PHASE_1EDGE) \
|| ((__VALUE__) == LL_USART_PHASE_2EDGE))
#define IS_LL_USART_CLOCKPOLARITY(__VALUE__) (((__VALUE__) == LL_USART_POLARITY_LOW) \
|| ((__VALUE__) == LL_USART_POLARITY_HIGH))
#define IS_LL_USART_CLOCKOUTPUT(__VALUE__) (((__VALUE__) == LL_USART_CLOCK_DISABLE) \
|| ((__VALUE__) == LL_USART_CLOCK_ENABLE))
#define IS_LL_USART_STOPBITS(__VALUE__) (((__VALUE__) == LL_USART_STOPBITS_0_5) \
|| ((__VALUE__) == LL_USART_STOPBITS_1) \
|| ((__VALUE__) == LL_USART_STOPBITS_1_5) \
|| ((__VALUE__) == LL_USART_STOPBITS_2))
#define IS_LL_USART_HWCONTROL(__VALUE__) (((__VALUE__) == LL_USART_HWCONTROL_NONE) \
|| ((__VALUE__) == LL_USART_HWCONTROL_RTS) \
|| ((__VALUE__) == LL_USART_HWCONTROL_CTS) \
|| ((__VALUE__) == LL_USART_HWCONTROL_RTS_CTS))
/**
* @}
*/
/* Private function prototypes -----------------------------------------------*/
/* Exported functions --------------------------------------------------------*/
/** @addtogroup USART_LL_Exported_Functions
* @{
*/
/** @addtogroup USART_LL_EF_Init
* @{
*/
/**
* @brief De-initialize USART registers (Registers restored to their default values).
* @param USARTx USART Instance
* @retval An ErrorStatus enumeration value:
* - SUCCESS: USART registers are de-initialized
* - ERROR: USART registers are not de-initialized
*/
ErrorStatus LL_USART_DeInit(USART_TypeDef *USARTx)
{
ErrorStatus status = SUCCESS;
/* Check the parameters */
assert_param(IS_UART_INSTANCE(USARTx));
if (USARTx == USART1)
{
/* Force reset of USART clock */
LL_APB2_GRP1_ForceReset(LL_APB2_GRP1_PERIPH_USART1);
/* Release reset of USART clock */
LL_APB2_GRP1_ReleaseReset(LL_APB2_GRP1_PERIPH_USART1);
}
else if (USARTx == USART2)
{
/* Force reset of USART clock */
LL_APB1_GRP1_ForceReset(LL_APB1_GRP1_PERIPH_USART2);
/* Release reset of USART clock */
LL_APB1_GRP1_ReleaseReset(LL_APB1_GRP1_PERIPH_USART2);
}
else if (USARTx == USART3)
{
/* Force reset of USART clock */
LL_APB1_GRP1_ForceReset(LL_APB1_GRP1_PERIPH_USART3);
/* Release reset of USART clock */
LL_APB1_GRP1_ReleaseReset(LL_APB1_GRP1_PERIPH_USART3);
}
else if (USARTx == UART4)
{
/* Force reset of UART clock */
LL_APB1_GRP1_ForceReset(LL_APB1_GRP1_PERIPH_UART4);
/* Release reset of UART clock */
LL_APB1_GRP1_ReleaseReset(LL_APB1_GRP1_PERIPH_UART4);
}
else if (USARTx == UART5)
{
/* Force reset of UART clock */
LL_APB1_GRP1_ForceReset(LL_APB1_GRP1_PERIPH_UART5);
/* Release reset of UART clock */
LL_APB1_GRP1_ReleaseReset(LL_APB1_GRP1_PERIPH_UART5);
}
else if (USARTx == USART6)
{
/* Force reset of USART clock */
LL_APB2_GRP1_ForceReset(LL_APB2_GRP1_PERIPH_USART6);
/* Release reset of USART clock */
LL_APB2_GRP1_ReleaseReset(LL_APB2_GRP1_PERIPH_USART6);
}
else if (USARTx == UART7)
{
/* Force reset of UART clock */
LL_APB1_GRP1_ForceReset(LL_APB1_GRP1_PERIPH_UART7);
/* Release reset of UART clock */
LL_APB1_GRP1_ReleaseReset(LL_APB1_GRP1_PERIPH_UART7);
}
else if (USARTx == UART8)
{
/* Force reset of UART clock */
LL_APB1_GRP1_ForceReset(LL_APB1_GRP1_PERIPH_UART8);
/* Release reset of UART clock */
LL_APB1_GRP1_ReleaseReset(LL_APB1_GRP1_PERIPH_UART8);
}
else
{
status = ERROR;
}
return (status);
}
/**
* @brief Initialize USART registers according to the specified
* parameters in USART_InitStruct.
* @note As some bits in USART configuration registers can only be written when
* the USART is disabled (USART_CR1_UE bit =0), USART Peripheral should be in disabled state prior calling
* this function. Otherwise, ERROR result will be returned.
* @note Baud rate value stored in USART_InitStruct BaudRate field, should be valid (different from 0).
* @param USARTx USART Instance
* @param USART_InitStruct pointer to a LL_USART_InitTypeDef structure
* that contains the configuration information for the specified USART peripheral.
* @retval An ErrorStatus enumeration value:
* - SUCCESS: USART registers are initialized according to USART_InitStruct content
* - ERROR: Problem occurred during USART Registers initialization
*/
ErrorStatus LL_USART_Init(USART_TypeDef *USARTx, LL_USART_InitTypeDef *USART_InitStruct)
{
ErrorStatus status = ERROR;
uint32_t periphclk = LL_RCC_PERIPH_FREQUENCY_NO;
/* Check the parameters */
assert_param(IS_UART_INSTANCE(USARTx));
assert_param(IS_LL_USART_BAUDRATE(USART_InitStruct->BaudRate));
assert_param(IS_LL_USART_DATAWIDTH(USART_InitStruct->DataWidth));
assert_param(IS_LL_USART_STOPBITS(USART_InitStruct->StopBits));
assert_param(IS_LL_USART_PARITY(USART_InitStruct->Parity));
assert_param(IS_LL_USART_DIRECTION(USART_InitStruct->TransferDirection));
assert_param(IS_LL_USART_HWCONTROL(USART_InitStruct->HardwareFlowControl));
assert_param(IS_LL_USART_OVERSAMPLING(USART_InitStruct->OverSampling));
/* USART needs to be in disabled state, in order to be able to configure some bits in
CRx registers */
if (LL_USART_IsEnabled(USARTx) == 0U)
{
/*---------------------------- USART CR1 Configuration ---------------------
* Configure USARTx CR1 (USART Word Length, Parity, Mode and Oversampling bits) with parameters:
* - DataWidth: USART_CR1_M bits according to USART_InitStruct->DataWidth value
* - Parity: USART_CR1_PCE, USART_CR1_PS bits according to USART_InitStruct->Parity value
* - TransferDirection: USART_CR1_TE, USART_CR1_RE bits according to USART_InitStruct->TransferDirection value
* - Oversampling: USART_CR1_OVER8 bit according to USART_InitStruct->OverSampling value.
*/
MODIFY_REG(USARTx->CR1,
(USART_CR1_M | USART_CR1_PCE | USART_CR1_PS |
USART_CR1_TE | USART_CR1_RE | USART_CR1_OVER8),
(USART_InitStruct->DataWidth | USART_InitStruct->Parity |
USART_InitStruct->TransferDirection | USART_InitStruct->OverSampling));
/*---------------------------- USART CR2 Configuration ---------------------
* Configure USARTx CR2 (Stop bits) with parameters:
* - Stop Bits: USART_CR2_STOP bits according to USART_InitStruct->StopBits value.
* - CLKEN, CPOL, CPHA and LBCL bits are to be configured using LL_USART_ClockInit().
*/
LL_USART_SetStopBitsLength(USARTx, USART_InitStruct->StopBits);
/*---------------------------- USART CR3 Configuration ---------------------
* Configure USARTx CR3 (Hardware Flow Control) with parameters:
* - HardwareFlowControl: USART_CR3_RTSE, USART_CR3_CTSE bits according to
* USART_InitStruct->HardwareFlowControl value.
*/
LL_USART_SetHWFlowCtrl(USARTx, USART_InitStruct->HardwareFlowControl);
/*---------------------------- USART BRR Configuration ---------------------
* Retrieve Clock frequency used for USART Peripheral
*/
if (USARTx == USART1)
{
periphclk = LL_RCC_GetUSARTClockFreq(LL_RCC_USART1_CLKSOURCE);
}
else if (USARTx == USART2)
{
periphclk = LL_RCC_GetUSARTClockFreq(LL_RCC_USART2_CLKSOURCE);
}
else if (USARTx == USART3)
{
periphclk = LL_RCC_GetUSARTClockFreq(LL_RCC_USART3_CLKSOURCE);
}
else if (USARTx == UART4)
{
periphclk = LL_RCC_GetUARTClockFreq(LL_RCC_UART4_CLKSOURCE);
}
else if (USARTx == UART5)
{
periphclk = LL_RCC_GetUARTClockFreq(LL_RCC_UART5_CLKSOURCE);
}
else if (USARTx == USART6)
{
periphclk = LL_RCC_GetUSARTClockFreq(LL_RCC_USART6_CLKSOURCE);
}
else if (USARTx == UART7)
{
periphclk = LL_RCC_GetUARTClockFreq(LL_RCC_UART7_CLKSOURCE);
}
else if (USARTx == UART8)
{
periphclk = LL_RCC_GetUARTClockFreq(LL_RCC_UART8_CLKSOURCE);
}
else
{
/* Nothing to do, as error code is already assigned to ERROR value */
}
/* Configure the USART Baud Rate :
- valid baud rate value (different from 0) is required
- Peripheral clock as returned by RCC service, should be valid (different from 0).
*/
if ((periphclk != LL_RCC_PERIPH_FREQUENCY_NO)
&& (USART_InitStruct->BaudRate != 0U))
{
status = SUCCESS;
LL_USART_SetBaudRate(USARTx,
periphclk,
USART_InitStruct->OverSampling,
USART_InitStruct->BaudRate);
/* Check BRR is greater than or equal to 16d */
assert_param(IS_LL_USART_BRR_MIN(USARTx->BRR));
}
}
/* Endif (=> USART not in Disabled state => return ERROR) */
return (status);
}
/**
* @brief Set each @ref LL_USART_InitTypeDef field to default value.
* @param USART_InitStruct pointer to a @ref LL_USART_InitTypeDef structure
* whose fields will be set to default values.
* @retval None
*/
void LL_USART_StructInit(LL_USART_InitTypeDef *USART_InitStruct)
{
/* Set USART_InitStruct fields to default values */
USART_InitStruct->BaudRate = 9600U;
USART_InitStruct->DataWidth = LL_USART_DATAWIDTH_8B;
USART_InitStruct->StopBits = LL_USART_STOPBITS_1;
USART_InitStruct->Parity = LL_USART_PARITY_NONE ;
USART_InitStruct->TransferDirection = LL_USART_DIRECTION_TX_RX;
USART_InitStruct->HardwareFlowControl = LL_USART_HWCONTROL_NONE;
USART_InitStruct->OverSampling = LL_USART_OVERSAMPLING_16;
}
/**
* @brief Initialize USART Clock related settings according to the
* specified parameters in the USART_ClockInitStruct.
* @note As some bits in USART configuration registers can only be written when
* the USART is disabled (USART_CR1_UE bit =0), USART Peripheral should be in disabled state prior calling
* this function. Otherwise, ERROR result will be returned.
* @param USARTx USART Instance
* @param USART_ClockInitStruct pointer to a @ref LL_USART_ClockInitTypeDef structure
* that contains the Clock configuration information for the specified USART peripheral.
* @retval An ErrorStatus enumeration value:
* - SUCCESS: USART registers related to Clock settings are initialized according
* to USART_ClockInitStruct content
* - ERROR: Problem occurred during USART Registers initialization
*/
ErrorStatus LL_USART_ClockInit(USART_TypeDef *USARTx, LL_USART_ClockInitTypeDef *USART_ClockInitStruct)
{
ErrorStatus status = SUCCESS;
/* Check USART Instance and Clock signal output parameters */
assert_param(IS_UART_INSTANCE(USARTx));
assert_param(IS_LL_USART_CLOCKOUTPUT(USART_ClockInitStruct->ClockOutput));
/* USART needs to be in disabled state, in order to be able to configure some bits in
CRx registers */
if (LL_USART_IsEnabled(USARTx) == 0U)
{
/* If USART Clock signal is disabled */
if (USART_ClockInitStruct->ClockOutput == LL_USART_CLOCK_DISABLE)
{
/* Deactivate Clock signal delivery :
* - Disable Clock Output: USART_CR2_CLKEN cleared
*/
LL_USART_DisableSCLKOutput(USARTx);
}
else
{
/* Ensure USART instance is USART capable */
assert_param(IS_USART_INSTANCE(USARTx));
/* Check clock related parameters */
assert_param(IS_LL_USART_CLOCKPOLARITY(USART_ClockInitStruct->ClockPolarity));
assert_param(IS_LL_USART_CLOCKPHASE(USART_ClockInitStruct->ClockPhase));
assert_param(IS_LL_USART_LASTBITCLKOUTPUT(USART_ClockInitStruct->LastBitClockPulse));
/*---------------------------- USART CR2 Configuration -----------------------
* Configure USARTx CR2 (Clock signal related bits) with parameters:
* - Enable Clock Output: USART_CR2_CLKEN set
* - Clock Polarity: USART_CR2_CPOL bit according to USART_ClockInitStruct->ClockPolarity value
* - Clock Phase: USART_CR2_CPHA bit according to USART_ClockInitStruct->ClockPhase value
* - Last Bit Clock Pulse Output: USART_CR2_LBCL bit according to USART_ClockInitStruct->LastBitClockPulse value.
*/
MODIFY_REG(USARTx->CR2,
USART_CR2_CLKEN | USART_CR2_CPHA | USART_CR2_CPOL | USART_CR2_LBCL,
USART_CR2_CLKEN | USART_ClockInitStruct->ClockPolarity |
USART_ClockInitStruct->ClockPhase | USART_ClockInitStruct->LastBitClockPulse);
}
}
/* Else (USART not in Disabled state => return ERROR */
else
{
status = ERROR;
}
return (status);
}
/**
* @brief Set each field of a @ref LL_USART_ClockInitTypeDef type structure to default value.
* @param USART_ClockInitStruct pointer to a @ref LL_USART_ClockInitTypeDef structure
* whose fields will be set to default values.
* @retval None
*/
void LL_USART_ClockStructInit(LL_USART_ClockInitTypeDef *USART_ClockInitStruct)
{
/* Set LL_USART_ClockInitStruct fields with default values */
USART_ClockInitStruct->ClockOutput = LL_USART_CLOCK_DISABLE;
USART_ClockInitStruct->ClockPolarity = LL_USART_POLARITY_LOW; /* Not relevant when ClockOutput =
LL_USART_CLOCK_DISABLE */
USART_ClockInitStruct->ClockPhase = LL_USART_PHASE_1EDGE; /* Not relevant when ClockOutput =
LL_USART_CLOCK_DISABLE */
USART_ClockInitStruct->LastBitClockPulse = LL_USART_LASTCLKPULSE_NO_OUTPUT; /* Not relevant when ClockOutput =
LL_USART_CLOCK_DISABLE */
}
/**
* @}
*/
/**
* @}
*/
/**
* @}
*/
#endif /* USART1 || USART2 || USART3 || USART6 || UART4 || UART5 || UART7 || UART8 */
/**
* @}
*/
#endif /* USE_FULL_LL_DRIVER */
|
the_stack_data/104642.c | #include <sys/types.h>
#include <stdint.h>
#include <stddef.h>
#undef KEY
#if defined(__i386)
# define KEY '_','_','i','3','8','6'
#elif defined(__x86_64)
# define KEY '_','_','x','8','6','_','6','4'
#elif defined(__ppc__)
# define KEY '_','_','p','p','c','_','_'
#elif defined(__ppc64__)
# define KEY '_','_','p','p','c','6','4','_','_'
#elif defined(__aarch64__)
# define KEY '_','_','a','a','r','c','h','6','4','_','_'
#elif defined(__ARM_ARCH_7A__)
# define KEY '_','_','A','R','M','_','A','R','C','H','_','7','A','_','_'
#elif defined(__ARM_ARCH_7S__)
# define KEY '_','_','A','R','M','_','A','R','C','H','_','7','S','_','_'
#endif
#define SIZE (sizeof(signed long long))
static char info_size[] = {'I', 'N', 'F', 'O', ':', 's','i','z','e','[',
('0' + ((SIZE / 10000)%10)),
('0' + ((SIZE / 1000)%10)),
('0' + ((SIZE / 100)%10)),
('0' + ((SIZE / 10)%10)),
('0' + (SIZE % 10)),
']',
#ifdef KEY
' ','k','e','y','[', KEY, ']',
#endif
'\0'};
#ifdef __CLASSIC_C__
int main(argc, argv) int argc; char *argv[];
#else
int main(int argc, char *argv[])
#endif
{
int require = 0;
require += info_size[argc];
(void)argv;
return require;
}
|
the_stack_data/1135897.c | #include <errno.h>
#include <sys/sem.h>
int r_semop(int semid, struct sembuf *sops, int nsops) {
while (semop(semid, sops, nsops) == -1)
if (errno != EINTR)
return -1;
return 0;
}
|
the_stack_data/48574719.c | #include <unistd.h>
#include <fcntl.h>
#include <stdio.h>
int main()
{
int fd;
int link_result;
char buf[255];
mode_t mode = S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH;
char *filename = "./symlink_org.txt";
fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC, mode);
link_result = symlink("symlink_org.txt", "symlink.txt");
if (link_result == -1)
{
printf("error\n");
return link_result;
}
link_result = readlink("symlink.txt", buf, 255);
if (link_result == -1)
{
printf("error\n");
return link_result;
}
buf[link_result] = '\0';
printf("symlink.txt : READLINK = %s\n", buf);
return 0;
}
|
the_stack_data/123104.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdlib.h>
#include <stdbool.h>
#include <errno.h>
#include <sys/time.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <net/route.h>
#define LOCAL_IP "127.0.0.1"
int main(int argc, char* argv[])
{
bool wait = false;
int opt, port;
while ((opt = getopt(argc, argv, "w")) != -1) {
switch (opt) {
case 'w':
wait = true;
break;
default:
break;
}
}
if (argc > optind) {
port = atoi(argv[optind]);
if (port <= 0) {
printf("unsupported port %d\n", port);
return -1;
}
} else {
port = 15003;
}
printf("日志监听端口: %d\n", port);
struct sockaddr_in addr;
memset(&addr, 0x00, sizeof(struct sockaddr_in));
addr.sin_family = AF_INET;
addr.sin_addr.s_addr = inet_addr(LOCAL_IP);
addr.sin_port = htons(port);
char buffer[1024*10];
memset(buffer, 0x00, sizeof(buffer));
size_t len;
int fd = -1, ret;
recreate:
if (fd > 0) {
close(fd);
}
fd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (fd == -1) {
perror("socket");
return -1;
}
reconnect:
ret = connect(fd, (struct sockaddr*)&addr, sizeof(addr));
if (ret == -1 && errno != EISCONN) {
if (wait) {
usleep(100);
goto reconnect;
}
perror("connect");
return -1;
}
printf("\n\n");
while (true) {
len = recv(fd, buffer, sizeof(buffer) - 16, 0);
if (len == -1) {
if (wait) {
goto reconnect;
} else {
perror("recv");
return -1;
}
} else if (len > 0) {
buffer[len] = '\0';
printf("%s", buffer);
fflush(stdout);
} else if (len == 0) {
printf("\nDisconnected.\n\n");
if (wait) {
goto recreate;
} else {
break;
}
}
}
close(fd);
return 0;
}
|
the_stack_data/89199201.c | #include <stdio.h>
void printNumsBackwards(int start, int end);
int factorial(int n);
float f2m(float fl);
float m2f(float ml);
float average(int a, int b, int c);
int main() {
// Definitions
int a, b, c;
int s, e;
float f;
float m;
float res;
// Print numbers backwards
printf("\nEnter start: ");
scanf(" %d", &s);
printf("Enter end: ");
scanf(" %d", &e);
printNumsBackwards(s, e);
// Feet to meters
printf("\nEnter length in feet: ");
scanf(" %f", &f);
float fres = f2m(f);
printf(" %f feet is %f meters\n", f, fres);
// Meters to feet
printf("Enter length in meters: ");
scanf(" %f", &m);
float mres = m2f(m);
printf(" %f meters is %f feet\n", m, mres);
// Factorial
printf("Enter factorial: ");
scanf(" %d", &s);
e = factorial(s);
printf("Answer: %d\n", e);
// Values
printf("Enter value 1: ");
scanf(" %d", &a);
printf("Enter value 2: ");
scanf(" %d", &b);
printf("Enter value 3: ");
scanf(" %d", &c);
res = average(a, b, c);
printf("Average of values: %f\n", res);
printf("Thank you, that is all.\n\n");
}
// printNumsBackwards
void printNumsBackwards(int start, int end) {
int i = start;
if (start < end) {
printf("Error - Start is not larger than end!\n\n");
return;
}
while (i >= end) {
printf(" %d ", i);
i--;
}
}
// Feet2Meters
float f2m(float fl) {
float ml = fl / 3.281;
return ml;
}
// Meters2Feet
float m2f(float ml) {
float fl = ml * 3.281;
return fl;
}
// Factorial
int factorial(int n) {
int index = n;
int result = 1;
while (index > 0) {
result = result * index;
index = index - 1;
}
return result;
}
// Average
float average(int a, int b, int c) {
float result = (a + b + c) / 3.0;
return result;
} |
the_stack_data/86076623.c | // ----------------------------------------------------------------------------
//
// -------------------------------- C Basic Mixer --------------------------------
//
// ----------------------------------------------------------------------------
//
// Purpose : To study the effects of performing operations on
// mixed data types.
//
// Author : Paul Zoski
// Date : 4/3/99
// Modified: reformatted, JL Popyack Jan. 2002, Jan. 2003.
// Modified: rewritten by Jun Yuan-Murray, 2016, August.
//
// ----------------------------------------------------------------------------
#include <stdio.h>
// ----------------------------------------------------------------------------
//
// ------------------------------- Main Program -------------------------------
//
// ----------------------------------------------------------------------------
void conditionmixer() {
int i = 6;
char ch = 'm';
printf("3==4 = %d\n", 3==4);
printf("3==3 = %d\n", 3==3);
printf("!0 = %d\n", !0);
printf("!(-1) = %d\n", !(-1));
printf("%d\n", ch < 'z' && ch > 'a');
printf("%d\n", !(ch-'z')?1:0);
printf("%d\n", 2 * 3 == 6 || (i = i + 1));
printf("%d\n", i);
}
void typemixer() {
int i=1, j=10, k=20 ;
char a='a', B='B', dollarSign='$';
// ---------------------------------------------------------------------
// The variables were already assigned values. Let's check them out.
// ---------------------------------------------------------------------
printf ("i = %d \tj=%d \t\t k=%d\n", i, j, k);
printf ("a = %c \tB=%c \t\t dollarSign=%c\n", a, B, dollarSign);
// ---------------------------------------------------------------------
// And now the fun stuff ....
// ---------------------------------------------------------------------
// ---------------------------------------------------------------------
// an integer plus a character
printf("a+j=%d\n", a+j);
// ---------------------------------------------------------------------
char newChar;
newChar = a+j;
// ---------------------------------------------------------------------
// huh? What's going on here?
printf("a+j=%c\n", newChar);
printf("B-6=%d\n", B-6);
}
int main( void )
{
typemixer();
conditionmixer();
return 0;
}
|
the_stack_data/248582054.c | #include <limits.h>
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[]) {
int cases;
scanf("%d", &cases);
int barbers, N;
int *barber_speed;
int test_case, i;
int customer, my_barber;
int skippable, skip_time;
int *time_remaining;
int time_step, min_time_remaining;
for (test_case = 1; test_case <= cases; ++test_case) {
//printf("Case %d\n", test_case);
scanf("%d %d", &barbers, &N);
barber_speed = (int *)malloc(sizeof(int) * barbers);
time_remaining = (int *)malloc(sizeof(int) * barbers);
skippable = 0, skip_time = 1;
for (i = 0; i < barbers; ++i) {
scanf("%d", barber_speed + i);
time_remaining[i] = 0;
skip_time *= barber_speed[i];
}
for (i = 0; i < barbers; ++i)
skippable += skip_time / barber_speed[i];
N %= skippable;
if (N == 0)
N += skippable;
//printf("Barbers ready. Starting Haircuts\n");
customer = 1;
my_barber = -1;
time_step = 1;
while (1) {
// for each barber
min_time_remaining = INT_MAX;
for (i = 0; i < barbers; ++i) {
time_remaining[i] -= time_step;
//printf("barber %d time remaining %d\n", i, time_remaining[i]);
// if they are finished, assign a new customer
if (time_remaining[i] <= 0) {
if (customer == N) {
my_barber = i;
break;
}
//printf("assigning customer %d to barber %d\n", customer, i);
time_remaining[i] = barber_speed[i];
++customer;
}
if (my_barber >= 0)
break;
min_time_remaining = min_time_remaining < time_remaining[i] ? min_time_remaining : time_remaining[i];
}
if (my_barber >= 0)
break;
time_step = min_time_remaining;
}
printf("Case #%d: %d\n", test_case, my_barber + 1);
free(time_remaining);
free(barber_speed);
}
}
|
the_stack_data/178265686.c | /*
* Date: 06/07/2015
* Created by: Ton Chanh Le ([email protected])
*/
typedef enum {false, true} bool;
extern int __VERIFIER_nondet_int(void);
int main()
{
int x;
int y;
x = __VERIFIER_nondet_int();
y = __VERIFIER_nondet_int();
if (x + y >= 0) {
while (x > 0) {
x = x + x + y;
y = y + 1;
}
}
return 0;
}
|
the_stack_data/916575.c | #include <math.h>
#include <stdio.h>
#define ANNUAL_INTEREST 1.1
double CalculateInterest(double start, double interestPct, int period) {
return start * pow(interestPct, period);
}
double MoneyRound(double num) {
// round to 2 dp
return round(num * 100) / 100;
}
int printTableHeader() {
printf("%-10s%-10s%-10s%-10s%-10s\n", "Year", "Start", "Paid in", "Interest", "Final");
}
int printData(const int year,
const double startingYearBalance,
const double paidIn,
const double endBalance) {
printf("%-10d%-10.2lf%-10.2lf%-10.2lf%-10.2lf\n", year, MoneyRound(startingYearBalance), paidIn,
endBalance - startingYearBalance - paidIn, endBalance);
}
int main() {
double payIn = 0, currentBalance = 0;
int years = 0;
printf("How much will you pay in every year?");
scanf("%lf", &payIn);
printf("How many years will you save for?");
scanf("%d", &years);
payIn = MoneyRound(payIn);
printTableHeader();
for (int year = 1; year <= years; year++) {
const double startingBalance = currentBalance;
currentBalance += payIn;
currentBalance = CalculateInterest(currentBalance, ANNUAL_INTEREST, 1);
printData(year, startingBalance, payIn, currentBalance);
}
return 0;
}
|
the_stack_data/181394027.c | #include <stdlib.h>
/**
* Note: The returned array must be malloced, assume caller calls free().
*/
int *processQueries(int *queries, int queriesSize, int m, int *returnSize) {
int *P = malloc(m * sizeof(*P)),
*result = malloc(queriesSize * sizeof(*result));
// fill P up:
for (int i = 1; i < m + 1; i++)
*(P + i - 1) = i;
for (int i = 0; i < queriesSize; i++) {
// Find query in P and put into result.
int q = queries[i], q_idx = 0;
while (*(P + q_idx++) != q)
;
*(result + i) = q_idx - 1;
// Remove-place at beginning with one loop.
int i = 0, previous = q;
while (1) {
int tmp = *(P + i);
*(P + i++) = previous;
previous = tmp;
// break when we reach old q (which should now be replaced.)
if (previous == q)
break;
}
}
free(P);
*returnSize = queriesSize;
return result;
}
|
the_stack_data/552234.c | /*
* Generated with test/generate_buildtest.pl, to check that such a simple
* program builds.
*/
#include <openssl/opensslconf.h>
#ifndef OPENSSL_NO_STDIO
# include <stdio.h>
#endif
#ifndef OPENSSL_NO_COMP
# include <openssl/comp.h>
#endif
int main(void)
{
return 0;
}
|
the_stack_data/64200604.c | #include <stdio.h>
#define DIM1 5
#define DIM2 2
/*
Scrivere un programma in C che chiede all'utente i dati di due
matrici di interi, la prima 5x5 e la seconda 2x2. Il programma
calcola e visualizza il numero di volte che la seconda matrice è
contenuta nella prima.
*/
int main() {
int a[DIM1][DIM1], b[DIM2][DIM2], i, j, ii, jj, count, contenuta;
for (i = 0; i < DIM1; i++)
for (j = 0; j < DIM1; j++)
scanf("%d", &a[i][j]);
for (i = 0; i < DIM2; i++)
for (j = 0; j < DIM2; j++)
scanf("%d", &b[i][j]);
for (i = 0, count = 0; i <= DIM1 - DIM2; i++) {
for (j = 0; j <= DIM1 - DIM2; j++) {
contenuta = 1;
for (ii = 0; ii < DIM2 && contenuta; ii++) {
for (jj = 0; jj < DIM2 && contenuta; jj++) {
if (a[i + ii][j + jj] != b[ii][jj])
contenuta = 0;
}
}
if (contenuta)
count++;
}
}
printf("%d\n", count);
return 0;
}
|
the_stack_data/1045072.c | #include <time.h>
#include <stdio.h>
#include <sqlite3.h>
static int callback(void *NotUsed, int argc, char **argv, char **azColName){
int i;
for(i=0; i<argc; i++){
printf("%s = %s\n", azColName[i], argv[i] ? argv[i] : "NULL");
}
printf("\n");
return 0;
}
int test(){
sqlite3 *db;
char *zErrMsg = 0;
int rc;
int i;
const char *commands[] = {
"CREATE TABLE t2(a INTEGER, b INTEGER, c VARCHAR(100));",
"INSERT INTO t2 VALUES(1,13153,'thirteen thousand one hundred fifty three');",
"INSERT INTO t2 VALUES(1,987,'some other number');",
"SELECT count(*) FROM t2;",
"SELECT a, b, c FROM t2;",
NULL
};
rc = sqlite3_open(":memory:", &db);
if( rc ){
fprintf(stderr, "Can't open database: %s\n", sqlite3_errmsg(db));
sqlite3_close(db);
exit(1);
}
for (i = 0; commands[i]; i++) {
rc = sqlite3_exec(db, commands[i], callback, 0, &zErrMsg);
if( rc!=SQLITE_OK ){
fprintf(stderr, "SQL error on %d: %s\n", i, zErrMsg);
sqlite3_free(zErrMsg);
exit(1);
}
}
sqlite3_close(db);
return 0;
}
int main(){
sqlite3 *db;
char *zErrMsg = 0;
int rc, i;
clock_t t;
rc = sqlite3_open(":memory:", &db);
if( rc ){
fprintf(stderr, "Can't open database: %s\n", sqlite3_errmsg(db));
sqlite3_close(db);
exit(1);
}
#define RUN(cmd) \
{ \
rc = sqlite3_exec(db, cmd, callback, 0, &zErrMsg); \
if( rc!=SQLITE_OK ){ \
fprintf(stderr, "SQL error on %d: %s\n", i, zErrMsg); \
sqlite3_free(zErrMsg); \
exit(1); \
} \
}
#define TIME(msg) \
{ \
printf(msg " : took %d ms\n", (1000*(clock()-t))/CLOCKS_PER_SEC); \
t = clock(); \
}
t = clock();
TIME("'startup'");
RUN("CREATE TABLE t1(a INTEGER, b INTEGER, c VARCHAR(100));");
TIME("create table");
RUN("BEGIN;");
// 25000 INSERTs in a transaction
for (i = 0; i < 5000; i++) {
RUN("INSERT INTO t1 VALUES(1,12345,'one 1 one 1 one 1');");
RUN("INSERT INTO t1 VALUES(2,23422,'two two two two');");
RUN("INSERT INTO t1 VALUES(3,31233,'three three 33333333333 three');");
RUN("INSERT INTO t1 VALUES(4,41414,'FOUR four 4 phor FOUR 44444');");
RUN("INSERT INTO t1 VALUES(5,52555,'five 5 FIVE Five phayve 55 5 5 5 5 55 5');");
}
TIME("25,000 inserts");
RUN("COMMIT;");
TIME("commit");
// Counts
RUN("SELECT count(*) FROM t1;");
RUN("SELECT count(*) FROM t1 WHERE a == 4");
RUN("SELECT count(*) FROM t1 WHERE b > 20000 AND b < 50000;");
RUN("SELECT count(*) FROM t1 WHERE c like '%three%';");
TIME("selects");
// Index
RUN("CREATE INDEX iiaa ON t1(a);");
RUN("CREATE INDEX iibb ON t1(b);");
TIME("create indexes");
RUN("SELECT count(*) FROM t1 WHERE a == 4");
RUN("SELECT count(*) FROM t1 WHERE b > 20000 AND b < 50000;");
TIME("selects with indexes");
sqlite3_close(db);
return test();
}
|
the_stack_data/132953767.c | // REQUIRES: nozlib
// RUN: %clang -### -fintegrated-as -gz -c %s 2>&1 | FileCheck %s -check-prefix CHECK-WARN
// RUN: %clang -### -fintegrated-as -gz=none -c %s 2>&1 | FileCheck -allow-empty -check-prefix CHECK-NOWARN %s
// CHECK-WARN: warning: cannot compress debug sections (zlib not installed)
// CHECK-NOWARN-NOT: warning: cannot compress debug sections (zlib not installed)
|
the_stack_data/200144301.c | #include<stdio.h>
int main()
{
int heights[26],max= 0,count = 0;
for(int i = 0;i<26;i++)
{
scanf("%d",&heights[i]);
}
char a[10];
scanf("%s",a);
for(int i = 0;a[i] != '\0';i++,count++)
{
if(heights[((int)a[i])-97] > max)
{
max = heights[((int)a[i])-97];
}
}
printf("%d",max*count);
}
|
the_stack_data/712066.c | #include <stdlib.h>
#include <math.h>
double do_pair_sum(double* restrict var, long ncells)
{
// Pair-wise sum
double *pwsum = (double *)malloc(ncells/2*sizeof(double));
long nmax = ncells/2;
for (long i = 0; i<nmax; i++){
pwsum[i] = var[i*2]+var[i*2+1];
}
for (long j = 1; j<log2(ncells); j++){
nmax /= 2;
for (long i = 0; i<nmax; i++){
pwsum[i] = pwsum[i*2]+pwsum[i*2+1];
}
}
double sum = pwsum[0];
free(pwsum);
return(sum);
}
|
the_stack_data/40761527.c | #include<stdio.h>
void main()
{
int a[3][3],g=0,i,j;
//input the values
for(i=0;i<3;i++)
{
for(j=0;j<3;j++)
{
printf("Input Elements of Array... row=%d , column=%d :",&i,&j);
scanf("%d",&a[i][j]);
}
}
for(i=0;i<3;i++)
{
for(j=0;j<3;j++)
{
if(i!=j){
if(a[i][j]==a[j][i]){g++;}
}
}
}
if(g==pow(3,2)-3){printf("Is a Symmetric Matrix");}
else{
printf("Not a Symmetric Matrix");
}
}
|
the_stack_data/87637202.c | #include <pthread.h>
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <errno.h>
#include <assert.h>
#define PHILOS 5
#define DELAY 5000
#define FOOD 50
void *philosopher (void *id);
int food_on_table ();
//Mutexes
pthread_mutex_t chopstick[PHILOS];
pthread_mutex_t food_lock;
//Threads
pthread_t philo[PHILOS];
int sleep_seconds = 0;
int main (int argn, char **argv)
{
long i;
if (argn == 2)
sleep_seconds = atoi (argv[1]);
//Inicia mutexes
pthread_mutex_init (&food_lock, NULL);
for (i = 0; i < PHILOS; i++)
pthread_mutex_init (&chopstick[i], NULL);
//Cria threads
for (i = 0; i < PHILOS; i++)
pthread_create (&philo[i], NULL, philosopher, (void *)i);
//Join threads
for (i = 0; i < PHILOS; i++)
pthread_join (philo[i], NULL);
return 0;
}
int food_on_table (int eat)
{
static int food = FOOD;
int myfood;
if(eat == 1){
pthread_mutex_lock (&food_lock);
if(food > 0){
food--;
myfood = food;
}
pthread_mutex_unlock (&food_lock);
}
else{
pthread_mutex_lock (&food_lock);
myfood = food;
pthread_mutex_unlock (&food_lock);
}
return myfood;
}
//Thread
void * philosopher (void *num)
{
long id = (long)num;
long i, left_chopstick, right_chopstick, f;
int hasLeft, hasRight;
left_chopstick = id;
right_chopstick = (id + 1)%PHILOS;
while (food_on_table (0)) {
f = food_on_table(1) + 1;
int foi = 0;
while(foi == 0){
hasLeft = pthread_mutex_trylock (&chopstick[left_chopstick]);
if(hasLeft == 0){
hasRight = pthread_mutex_trylock (&chopstick[right_chopstick]);
if(hasRight == 0){
foi = 1;
printf ("Philosopher %ld: got left chopstick %ld\n", id, left_chopstick);
printf ("Philosopher %ld: got right chopstick %ld\n", id, right_chopstick);
printf ("Philosopher %ld: eating -- food %ld.\n", id, f);
pthread_mutex_unlock (&chopstick[left_chopstick]);
pthread_mutex_unlock (&chopstick[right_chopstick]);
// int thinking_time=rand()%10;
// printf ("Philosopher %ld is done eating and is now thinking for %d secs.\n", id, thinking_time);
// sleep (thinking_time);
}
else{
pthread_mutex_unlock (&chopstick[left_chopstick]);
}
}
}
}
return (NULL);
}
|
the_stack_data/114718.c | /* gcc main.c -o chall -no-pie -fno-stack-protector */
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
void win() {
/* Call me :pleading_face: */
char *args[] = {"/bin/sh", NULL};
execve(args[0], args, NULL);
}
void readn(char *ptr, int size) {
/* Read data up to `size` bytes into `ptr` */
for (int i = 0; i != size; i++, ptr++) {
read(0, ptr, 1);
if (*ptr == '\n') break;
}
}
int main() {
int size;
char *buf;
/* Input size */
printf("size: ");
scanf("%d%*c", &size);
/* Input data */
printf("data: ");
buf = alloca(size);
readn(buf, size);
return 0;
}
__attribute__((constructor))
void setup() {
setvbuf(stdin, NULL, _IONBF, 0);
setvbuf(stdout, NULL, _IONBF, 0);
}
|
the_stack_data/6388072.c | /****************************************************************************
*
* Copyright (c) 2015 PX4 Development Team. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* 3. Neither the name PX4 nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
****************************************************************************/
/**
* @file tailsitter_params.c
* Parameters for vtol attitude controller.
*
* @author Roman Bapst <[email protected]>
* @author David Vorsin <[email protected]>
*/
/**
* Duration of front transition phase 2
*
* Time in seconds it should take for the rotors to rotate forward completely from the point
* when the plane has picked up enough airspeed and is ready to go into fixed wind mode.
*
* @unit s
* @min 0.1
* @max 5.0
* @increment 0.01
* @decimal 3
* @group VTOL Attitude Control
PARAM_DEFINE_FLOAT(VT_TRANS_P2_DUR, 0.5f);*/
|
the_stack_data/198579766.c | #include<stdio.h>
#include<unistd.h>
#include<stdlib.h>
#include<stdbool.h>
#include<string.h>
int main(int argc, const char* argv[])
{
while(true)
{
if(argc<=1)
{
write(STDOUT_FILENO,"y\n",2);
}
else
{
int i;
for(i=1;i<argc;i++)
{
write(STDOUT_FILENO,argv[i],strlen(argv[i]));
if(argv[i] != argv[argc-1])
{
write(STDOUT_FILENO," ",1);
}
}
write(STDOUT_FILENO,"\n",1);
}
}
return EXIT_SUCCESS;
}
|
the_stack_data/59512406.c | #include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#define NUM_THREADS 20
pthread_mutex_t lock;
int deposito = 100;
void *PrintHello(void *threadid)
{
long tid;
int localdeposito;
pthread_mutex_lock(&lock);
localdeposito = deposito;
tid = (long)threadid;
printf("Hello World! It's me, thread #%ld!\n", tid);
//deposito += 100;
printf("another print");
deposito = localdeposito + 100;
pthread_mutex_unlock(&lock);
pthread_exit(NULL);
}
int main(int argc, char *argv[])
{
pthread_t threads[NUM_THREADS];
int rc;
long t;
for(t=0;t<NUM_THREADS;t++){
printf("In main: creating thread %ld\n", t);
rc = pthread_create(&threads[t], NULL, PrintHello, (void *)t);
if (rc){
printf("ERROR; return code from pthread_create() is %d\n", rc);
exit(-1);
}
}
for(t=0; t<NUM_THREADS; t++) {
rc = pthread_join(threads[t], NULL);
if (rc) {
printf("ERROR; return code from pthread_join() is %d\n", rc);
exit(-1);
}
}
printf("mi dinero es %d\n", deposito);
/* Last thing that main() should do */
pthread_exit(NULL);
} |
the_stack_data/220455804.c | /* { dg-do run } */
/* { dg-options "-fno-common" { target hppa*-*-hpux* } } */
extern void abort (void);
typedef long long T;
typedef T vl_t __attribute__((vector_size(2 * sizeof (T))));
vl_t ul[4], vl[4] = { { 1, 2 }, { 3, 4 }, { 5, 6 }, { 7, 8 } };
static void
mul_vl_l(vl_t *u, vl_t *v, T x, int m)
{
vl_t w;
T *p = (T *)&w;
p[0] = p[1] = x;
while (m--)
*u++ = *v++ * w;
}
int
main(int argc, char *argv[])
{
int i;
T *pl;
pl = (T *) &ul;
mul_vl_l(ul, vl, 2, 4);
for (i = 0; i < 8; i++)
if (pl[i] != 2 * (i + 1))
abort ();
return 0;
}
|
the_stack_data/43886884.c | /*************************************************************************
Program: torsions
File: torsions.c
Version: V1.2aSTANDALONE
Date: 13.01.97
Function: Generate a complete set of backbone torsion angles for a
protein.
Copyright: (c) Andrew C.R. Martin 1994-7
Author: Dr. Andrew C. R. Martin
Address: Biomolecular Structure and Modelling Unit,
Department of Biochemistry and Molecular Biology,
University College,
Gower Street,
London.
WC1E 6BT.
Phone: (Home) +44(0)1372 275775
(Work) +44(0)171 419 3284
EMail: [email protected]
**************************************************************************
This code is protected by copyright.
The routines: main(), ShowTorsions() and Usage() may be freely copied
and distributed for no charge providing this header is included. The
code for these routines may be modified as required, but any
modifications must be documented so that the person responsible can be
identified. If someone else breaks this code, I don't want to be blamed
for code that does not work!
All other routines come from the library known as Bioplib and may not
be used outside the context of this program, torsions.c. However, a
licence for use in other programs may be obtained from the author,
Dr. Andrew C.R. Martin. More details of Bioplib and the licence
agreement may be obtained from the WWW using the URL
http://ww.biochem.ucl.ac.uk/~martin and reading the section on
Libraries.
**************************************************************************
Description:
============
**************************************************************************
Usage:
======
**************************************************************************
Notes:
======
**************************************************************************
Revision History:
=================
V1.0 10.06.94 Original
V1.1 16.08.94 Added -m option for Martin's output format
V1.1STANDALONE 02.06.95 Extracted support routines from library
V1.2STANDALONE 12.06.95 Added -c option for pseudo-CA torsions
V1.2aSTANDALONE 13.01.97 New versions of doReadPDB() and fsscanf()
which cope better with blank lines
*************************************************************************/
/* Includes
*/
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <stdlib.h>
#include <stdarg.h>
#include <ctype.h>
/************************************************************************/
/* Defines
*/
#define NUMAAKNOWN 24
/* From <bioplib/MathType.h> */
typedef double REAL;
#ifndef PI
#define PI (4.0 * atan(1.0))
#endif
/* From <bioplib/SysDefs.h> */
#ifndef SYS_TYPES_H /* Unix: <sys/types.h>, MS-DOS: <sys\types.h> */
#ifndef _TYPES_ /* Ditto */
typedef short BOOL;
#endif
#endif
#ifndef TRUE
#define TRUE 1
#define FALSE 0
#endif
/* From <bioplib/macros.h> */
#define NEXT(x) (x)=(x)->next
#define FREELIST(y,z) while((y)!=NULL) \
{ z *_freelist_macro_q; \
_freelist_macro_q = (y)->next; \
free((char *)(y)); \
(y) = _freelist_macro_q; \
}
#define ALLOCNEXT(x,y) do { (x)->next=(y *)malloc(sizeof(y));\
if((x)->next != NULL) { (x)->next->next=NULL; }\
NEXT(x); } while(0)
#define INIT(x,y) do { x=(y *)malloc(sizeof(y)); \
if(x != NULL) x->next = NULL; } while(0)
#define KILLLEADSPACES(y,x) \
do \
{ for((y)=(x); *(y) == ' ' || *(y) == '\t'; (y)++) ; } \
while(0)
/* From <bioplib/pdb.h> */
#define MAXPARTIAL 8
#define SMALL 0.000001
typedef struct pdb_entry
{
REAL x,y,z,occ,bval;
struct pdb_entry *next;
int atnum;
int resnum;
char junk[8];
char atnam[8];
char resnam[8];
char insert[8];
char chain[8];
} PDB;
#define SELECT(x,w) (x) = (char *)malloc(5 * sizeof(char)); \
if((x) != NULL) strncpy((x),(w),5)
/************************************************************************/
/* Globals
*/
BOOL gPDBPartialOcc;
BOOL gPDBMultiNMR;
static char sTab1[] = {'A','C','D','E','F',
'G','H','I','K','L',
'M','N','P','Q','R',
'S','T','V','W','Y',
'E','B','Z','X'
};
static char sTab3[][8] = {"ALA ","CYS ","ASP ","GLU ","PHE ",
"GLY ","HIS ","ILE ","LYS ","LEU ",
"MET ","ASN ","PRO ","GLN ","ARG ",
"SER ","THR ","VAL ","TRP ","TYR ",
"PCA ","ASX ","GLX ","UNK "
};
/************************************************************************/
/* Prototypes
*/
PDB *ReadPDB(FILE *fp, int *natom);
PDB *doReadPDB(FILE *fp, int *natom, BOOL AllAtoms, int OccRank,
int ModelNum);
PDB *SelectAtomsPDB(PDB *pdbin, int nsel, char **sel, int *natom);
static BOOL StoreOccRankAtom(int OccRank, PDB multi[MAXPARTIAL],
int NPartial, PDB **ppdb, PDB **pp,
int *natom);
static char *FixAtomName(char *name);
REAL phi(REAL xi, REAL yi, REAL zi, REAL xj, REAL yj, REAL zj,
REAL xk, REAL yk, REAL zk, REAL xl, REAL yl, REAL zl);
char throne(char *three);
int fsscanf(char *buffer, char *format, ...);
void CopyPDB(PDB *out, PDB *in);
int chindex(char *string, char ch);
void padterm(char *string, int length);
int main(int argc, char **argv);
void ShowTorsions(FILE *out, PDB *pdb, REAL *tors, BOOL Radians,
BOOL MartinFormat);
void Usage(void);
/************************************************************************/
/*>int main(int argc, char **argv)
-------------------------------
Main program for converting a PDB file to torsions.
10.06.94 Original By: ACRM
16.08.94 Added -m option
12.06.95 Added -c option
*/
int main(int argc, char **argv)
{
FILE *in = stdin,
*out = stdout;
PDB *fullpdb,
*pdb,
*p,
*p1,
*p2,
*p3,
*p4;
int natoms,
TorNum;
char *sel[4];
REAL tors[3];
BOOL Radians = FALSE,
MartinFormat = FALSE,
CATorsions = FALSE;
argc--;
argv++;
/* Handle any switches */
if(argc)
{
while(argv[0][0] == '-')
{
switch(argv[0][1])
{
case 'h':
Usage();
return(0);
break;
case 'r':
Radians = TRUE;
break;
case 'm':
MartinFormat = TRUE;
break;
case 'c':
CATorsions = TRUE;
break;
default:
Usage();
return(1);
break;
}
argc--;
argv++;
}
}
if(argc > 2)
{
Usage();
return(1);
}
/* Handle any filenames */
if(argc)
{
if((in=fopen(argv[0],"r"))==NULL)
{
fprintf(stderr,"Unable to open input file: %s\n",argv[0]);
return(1);
}
argc--;
argv++;
if(argc)
{
if((out=fopen(argv[0],"w"))==NULL)
{
fprintf(stderr,"Unable to open output file: %s\n",argv[0]);
return(1);
}
}
}
/* Read in the structure */
if((fullpdb = ReadPDB(in, &natoms))==NULL)
{
fprintf(stderr,"No atoms read from PDB file\n");
return(1);
}
/* Set up the atom selection and select them */
SELECT(sel[0],"CA ");
if(!CATorsions)
{
SELECT(sel[1],"N ");
SELECT(sel[2],"C ");
}
if((pdb = SelectAtomsPDB(fullpdb,(CATorsions?1:3),sel,&natoms))==NULL)
{
fprintf(stderr,"Unable to select backbone atoms from PDB \
file (no memory?)\n");
return(1);
}
/* Print title */
if(CATorsions)
{
fprintf(out,"Res_N CA_N--CA_(N+1)\n");
}
else
{
if(MartinFormat)
fprintf(out,"Residue PHI PSI OMEGA\n");
else
fprintf(out," PHI PSI OMEGA\n");
}
fprintf(out,"--------------------------------------\n");
/* Walk the linked list and calculate torsions */
tors[0] = tors[1] = tors[2] = 9999.0;
p1 = p2 = p3 = p4 = NULL;
if(CATorsions)
{
for(p=pdb; p!=NULL; NEXT(p))
{
p1 = p2;
p2 = p3;
p3 = p4;
p4 = p;
if(p1 && p2 && p3 && p4) /* Got all 4 atoms */
{
tors[0] = phi(p1->x, p1->y, p1->z,
p2->x, p2->y, p2->z,
p3->x, p3->y, p3->z,
p4->x, p4->y, p4->z);
if(!Radians) tors[0] *= 180.0 / PI;
fprintf(out," %c %8.3f\n",throne(p2->resnam),tors[0]);
}
else if(p1==NULL && p2==NULL && p3==NULL && p4) /* Got 1 atom */
{
fprintf(out," %c -\n",throne(p4->resnam));
}
}
/* Finish off by printing the last 2 residues */
fprintf(out," %c -\n",throne(p3->resnam));
fprintf(out," %c -\n",throne(p4->resnam));
}
else
{
for(p=pdb; p!=NULL; NEXT(p))
{
if(!strncmp(p->atnam,"C ",4))
{
ShowTorsions(out, p, tors, Radians, MartinFormat);
tors[0] = tors[1] = tors[2] = 9999.0;
}
/* Get pointers to four atoms in sequence */
p1 = p;
p2 = p->next;
if(p2 != NULL) p3 = p2->next;
if(p3 != NULL) p4 = p3->next;
if(p1==NULL || p2==NULL || p3==NULL || p4==NULL)
{
ShowTorsions(out, p, tors, Radians, MartinFormat);
break;
}
if(!strncmp(p->atnam,"N ",4))
TorNum = 1;
else if(!strncmp(p->atnam,"CA ",4))
TorNum = 2;
else if(!strncmp(p->atnam,"C ",4))
TorNum = 0;
tors[TorNum] = phi(p1->x, p1->y, p1->z,
p2->x, p2->y, p2->z,
p3->x, p3->y, p3->z,
p4->x, p4->y, p4->z);
}
}
return 0;
}
/************************************************************************/
/*>void ShowTorsions(FILE *out, PDB *pdb, REAL *tors, BOOL Radians,
BOOL MartinFormat)
----------------------------------------------------------------
Input: FILE *out Output file
PDB *pdb PDB record pointer
REAL *tors Array of torsion angles
BOOL Radians Should output be in radians
BOOL MartinFormat Output in Martin's required format
Displays the torsion angles converting to degrees if Radians flag
not set.
10.06.94 Original By: ACRM
16.08.94 Added MartinFormat
*/
void ShowTorsions(FILE *out, PDB *pdb, REAL *tors, BOOL Radians,
BOOL MartinFormat)
{
if(!Radians)
{
int i;
for(i=0; i<3; i++)
{
if(tors[i] < (REAL)9990.0)
tors[i] *= (REAL)180.0/PI;
}
}
if(MartinFormat)
{
fprintf(out," %c ", throne(pdb->resnam));
if(tors[0] > (REAL)9998.0)
{
fprintf(out," - %8.3f %8.3f\n",tors[1],tors[2]);
}
else if(tors[1] > (REAL)9998.0)
{
fprintf(out,"%8.3f - - \n",tors[0]);
}
else
{
fprintf(out,"%8.3f %8.3f %8.3f\n",tors[0], tors[1], tors[2]);
}
}
else
{
fprintf(out,"%5d%c %-4s %8.3f %8.3f %8.3f\n",
pdb->resnum, pdb->insert[0], pdb->resnam,
tors[0], tors[1], tors[2]);
}
}
/************************************************************************/
/*>void Usage(void)
----------------
Displays a usage message
10.06.94 original By: ACRM
16.08.94 Added -m
12.06.95 Added -c
*/
void Usage(void)
{
fprintf(stderr,"\ntorsions V1.2. (c) 1994-5 Andrew Martin, UCL. \
Freely Distributable\n");
fprintf(stderr,"Generates a set of backbone torsions from a PDB \
file.\n\n");
fprintf(stderr,"Usage: torsions [-h] [-r] [<in.pdb> [<out.tor>]]\n");
fprintf(stderr," -h This help message\n");
fprintf(stderr," -r Give results in radians\n");
fprintf(stderr," -m Output format required by Martin \
Reczko\n");
fprintf(stderr," -c Generate CA-CA pseudo-torsions\n");
fprintf(stderr,"I/O is to stdin/stdout if unspecified.\n\n");
}
/************************************************************************/
/*>PDB *ReadPDB(FILE *fp, int *natom)
----------------------------------
Input: FILE *fp A pointer to type FILE in which the
.PDB file is stored.
Output: int *natom Number of atoms read. -1 if error.
Returns: PDB *pdb A pointer to the first allocated item of
the PDB linked list
Reads a PDB file into a PDB linked list
08.07.93 Written as entry for doReadPDB()
09.07.93 Modified to return pointer to PDB
17.03.94 Modified to handle OccRank
06.03.95 Added value for NMR model to read (1 = first)
*/
PDB *ReadPDB(FILE *fp,
int *natom)
{
return(doReadPDB(fp, natom, TRUE, 1, 1));
}
/************************************************************************/
/*>PDB *doReadPDB(FILE *fp, int *natom, BOOL AllAtoms, int OccRank,
int ModelNum)
----------------------------------------------------------------
Input: FILE *fp A pointer to type FILE in which the
.PDB file is stored.
BOOL AllAtoms TRUE: ATOM & HETATM records
FALSE: ATOM records only
int OccRank Occupancy ranking
int ModelNum NMR Model number (0 = all)
Output: int *natom Number of atoms read. -1 if error.
Returns: PDB *pdb A pointer to the first allocated item of
the PDB linked list
Reads a PDB file into a PDB linked list. The OccRank value indicates
occupancy ranking to read for partial occupancy atoms.
If any partial occupancy atoms are read the global flag
gPDBPartialOcc is set to TRUE.
04.11.88 V1.0 Original
07.02.89 V1.1 Ignore records which aren't ATOM or HETATM
28.03.90 V1.2 Altered field widths to match PDB standard better
See notes above for deviations
28.06.90 V1.2a Buffer size increased to 85 chars.
15.02.91 V1.2b Changed comment header to match new standard.
07.01.92 V1.3 Ignores blank lines properly
11.05.92 V1.4 Check on EOF in while() loop, memset() buffer.
ANSIed.
01.06.92 V1.5 Documented for autodoc
19.06.92 V1.6 Corrected use of stdlib
01.10.92 V1.7 Changed to use fgets()
10.06.93 V1.9 Returns 0 on failure rather than exiting
Replaced SIZE with sizeof(PDB) directly
17.06.93 V2.0 Rewritten to use fsscanf()
08.07.93 V2.1 Split from ReadPDB()
09.07.93 V2.2 Modified to return pointer to PDB. Rewrote allocation
scheme.
17.03.94 V2.3 Handles partial occupancies
Sets natom to -1 if there was an error to distinguish
from no atoms.
Handles atom names which start in column 13 rather
than column 14. This is allowed in the standard, but
very rare.
Sets flag for partials.
06.04.94 V2.4 Atom names starting in column 13 have their first
character moved to the end if it is a digit.
03.10.94 V2.5 Check residue number as well as atom name when running
through alternative atoms for partial occupancy
Moved increment of NPartial, so only done if there
is space in the array. If OccRank is 0, all atoms are
read regardless of occupancy.
06.03.95 V2.7 Added value for NMR model to read (0 = all)
No longer static. Sets gPDBMultiNMR if ENDMDL records
found.
13.01.97 V2.8 Added check on return from fsscanf. Blank lines used
to result in duplication of the previous line since
fsscanf() does not reset the variables on receiving
a blank line. Also fixed in fsscanf().
*/
PDB *doReadPDB(FILE *fp,
int *natom,
BOOL AllAtoms,
int OccRank,
int ModelNum)
{
char junk[8],
atnambuff[8],
*atnam,
resnam[8],
chain[4],
insert[4],
buffer[160],
CurAtom[8],
CurIns;
int atnum,
resnum,
CurRes,
NPartial,
ModelCount = 1;
double x,y,z,
occ,
bval;
PDB *pdb = NULL,
*p,
multi[MAXPARTIAL]; /* Temporary storage for partial occ */
*natom = 0;
CurAtom[0] = '\0';
NPartial = 0;
gPDBPartialOcc = FALSE;
gPDBMultiNMR = FALSE;
while(fgets(buffer,159,fp))
{
if(ModelNum != 0) /* We are interested in model numbers */
{
if(!strncmp(buffer,"ENDMDL",6))
{
ModelCount++;
}
if(ModelCount < ModelNum) /* Haven't reached the right model */
continue;
else if(ModelCount > ModelNum) /* Gone past the right model */
break;
}
if(!strncmp(buffer,"ENDMDL",6))
gPDBMultiNMR = TRUE;
if(fsscanf(buffer,"%6s%5d%1x%5s%4s%1s%4d%1s%3x%8lf%8lf%8lf%6lf%6lf",
junk,&atnum,atnambuff,resnam,chain,&resnum,insert,
&x,&y,&z,&occ,&bval) != EOF)
{
if((!strncmp(junk,"ATOM ",6)) ||
(!strncmp(junk,"HETATM",6) && AllAtoms))
{
/* Fix the atom name accounting for start in column 13 or 14*/
atnam = FixAtomName(atnambuff);
/* Check for full occupancy. If occupancy is 0.0 assume that
it is actually fully occupied; the column just hasn't been
filled in correctly
04.10.94 Read all atoms if OccRank is 0
*/
if(occ > (double)0.999 ||
occ < (double)SMALL ||
OccRank == 0)
{
/* Trim the atom name to 4 characters */
atnam[4] = '\0';
if(NPartial != 0)
{
if(!StoreOccRankAtom(OccRank,multi,NPartial,&pdb,&p,
natom))
{
if(pdb != NULL) FREELIST(pdb, PDB);
*natom = (-1);
return(NULL);
}
/* Set partial occupancy counter to 0 */
NPartial = 0;
}
/* Allocate space in the linked list */
if(pdb == NULL)
{
INIT(pdb, PDB);
p = pdb;
}
else
{
ALLOCNEXT(p, PDB);
}
/* Failed to allocate space; free up list so far & return*/
if(p==NULL)
{
if(pdb != NULL) FREELIST(pdb, PDB);
*natom = (-1);
return(NULL);
}
/* Increment the number of atoms */
(*natom)++;
/* Store the information read */
p->atnum = atnum;
p->resnum = resnum;
p->x = (REAL)x;
p->y = (REAL)y;
p->z = (REAL)z;
p->occ = (REAL)occ;
p->bval = (REAL)bval;
p->next = NULL;
strcpy(p->junk, junk);
strcpy(p->atnam, atnam);
strcpy(p->resnam, resnam);
strcpy(p->chain, chain);
strcpy(p->insert, insert);
}
else /* Partial occupancy */
{
/* Set flag to say we've got a partial occupancy atom */
gPDBPartialOcc = TRUE;
/* First in a group, store atom name */
if(NPartial == 0)
{
CurIns = insert[0];
CurRes = resnum;
strncpy(CurAtom,atnam,8);
}
if(strncmp(CurAtom,atnam,strlen(CurAtom)-1) ||
resnum != CurRes ||
CurIns != insert[0])
{
/* Atom name has changed
Select and store the OccRank highest occupancy atom
*/
if(!StoreOccRankAtom(OccRank,multi,NPartial,&pdb,&p,
natom))
{
if(pdb != NULL) FREELIST(pdb, PDB);
*natom = (-1);
return(NULL);
}
/* Reset the partial atom counter */
NPartial = 0;
strncpy(CurAtom,atnam,8);
CurRes = resnum;
CurIns = insert[0];
}
if(NPartial < MAXPARTIAL)
{
/* Store the partial atom data */
multi[NPartial].atnum = atnum;
multi[NPartial].resnum = resnum;
multi[NPartial].x = (REAL)x;
multi[NPartial].y = (REAL)y;
multi[NPartial].z = (REAL)z;
multi[NPartial].occ = (REAL)occ;
multi[NPartial].bval = (REAL)bval;
multi[NPartial].next = NULL;
strcpy(multi[NPartial].junk, junk);
strcpy(multi[NPartial].atnam, atnam);
strcpy(multi[NPartial].resnam, resnam);
strcpy(multi[NPartial].chain, chain);
strcpy(multi[NPartial].insert, insert);
NPartial++;
}
}
}
}
}
if(NPartial != 0)
{
if(!StoreOccRankAtom(OccRank,multi,NPartial,&pdb,&p,natom))
{
if(pdb != NULL) FREELIST(pdb, PDB);
*natom = (-1);
return(NULL);
}
}
/* Return pointer to start of linked list */
return(pdb);
}
/************************************************************************/
/*>static BOOL StoreOccRankAtom(int OccRank, PDB multi[MAXPARTIAL],
int NPartial, PDB **ppdb, PDB **pp,
int *natom)
----------------------------------------------------------------
Input: int OccRank Occupancy ranking required (>=1)
PDB multi[] Array of PDB records for alternative atom
positions
int NPartial Number of items in multi array
I/O: PDB **ppdb Start of PDB linked list (or NULL)
PDB **pp Current position in PDB linked list (or NULL)
int *natom Number of atoms read
Returns: BOOL Memory allocation success
Takes an array of PDB records which represent alternative atom
positions for an atom. Select the OccRank'th highest occupancy and
add this one into the PDB linked list.
To be called by doReadPDB().
17.03.94 Original By: ACRM
*/
static BOOL StoreOccRankAtom(int OccRank, PDB multi[MAXPARTIAL],
int NPartial, PDB **ppdb, PDB **pp,
int *natom)
{
int i,
j,
IMaxOcc;
REAL MaxOcc,
LastOcc = (REAL)0.0;
if(OccRank < 1) OccRank = 1;
for(i=0; i<OccRank; i++)
{
MaxOcc = (REAL)0.0;
IMaxOcc = 0;
for(j=0; j<NPartial; j++)
{
if(multi[j].occ >= MaxOcc)
{
MaxOcc = multi[j].occ;
IMaxOcc = j;
}
}
multi[IMaxOcc].occ = (REAL)0.0;
if(MaxOcc < (REAL)SMALL) break;
LastOcc = MaxOcc;
}
/* If we ran out of rankings, take the last one to be found */
if(MaxOcc < (REAL)SMALL)
MaxOcc = LastOcc;
/* Store this atom
Allocate space in the linked list
*/
if(*ppdb == NULL)
{
INIT((*ppdb), PDB);
*pp = *ppdb;
}
else
{
ALLOCNEXT(*pp, PDB);
}
/* Failed to allocate space; error return. */
if(*pp==NULL)
return(FALSE);
/* Increment the number of atoms */
(*natom)++;
/* Store the information read */
(*pp)->atnum = multi[IMaxOcc].atnum;
(*pp)->resnum = multi[IMaxOcc].resnum;
(*pp)->x = multi[IMaxOcc].x;
(*pp)->y = multi[IMaxOcc].y;
(*pp)->z = multi[IMaxOcc].z;
(*pp)->occ = MaxOcc;
(*pp)->bval = multi[IMaxOcc].bval;
(*pp)->next = NULL;
strcpy((*pp)->junk, multi[IMaxOcc].junk);
strcpy((*pp)->atnam, multi[IMaxOcc].atnam);
strcpy((*pp)->resnam, multi[IMaxOcc].resnam);
strcpy((*pp)->chain, multi[IMaxOcc].chain);
strcpy((*pp)->insert, multi[IMaxOcc].insert);
/* Patch the atom name to remove the alternate letter */
if(strlen((*pp)->atnam) > 4)
((*pp)->atnam)[4] = '\0';
else
((*pp)->atnam)[3] = ' ';
return(TRUE);
}
/************************************************************************/
/*>static char *FixAtomName(char *name)
------------------------------------
Input: char *name Atom name read from file
Returns: char * Fixed atom name (pointer into name)
Fixes an atom name by removing leading spaces, or moving a leading
digit to the end of the string. Used by doReadPDB()
06.04.94 Original By: ACRM
*/
static char *FixAtomName(char *name)
{
char *newname;
int len;
/* Default behaviour, just return the input string */
newname = name;
if(name[0] == ' ')
{
/* Name starts in column 14, just remove leading spaces */
KILLLEADSPACES(newname,name);
}
else /* Name starts in column 13 */
{
/* If the first character is a digit, move it to the end */
if(isdigit(name[0]))
{
if((len = chindex(name,' ')) == (-1))
{
/* We didn't find a space in the name, so add the character
onto the end of the string and re-terminate
*/
len = strlen(name);
newname = name+1;
name[len] = name[0];
name[len+1] = '\0';
}
else
{
/* We did find a space in the name, so put the first
character there
*/
newname = name+1;
name[len] = name[0];
}
}
}
return(newname);
}
/************************************************************************/
/*>PDB *SelectAtomsPDB(PDB *pdbin, int nsel, char **sel, int *natom)
-----------------------------------------------------------------
Input: pdbin *PDB Input list
nsel int Number of atom types to keep
sel **char List of atom types to keep
Output: natom *int Number of atoms kept
Returns: *PDB Output list
Take a PDB linked list and returns a list containing only those atom
types specfied in the sel array.
To set up the list of atoms to keep, define an array of pointers
to char:
e.g. char *sel[10]
Then define the atoms in the list thus:
SELECT(sel[0],"N ");
SELECT(sel[1],"CA ");
SELECT(sel[2],"C ");
SELECT(sel[3],"O ");
Ensure the spaces are used!!
N.B. The routine is non-destructive; i.e. the original PDB linked
list is intact after the selection process
01.03.90 Original By: ACRM
28.03.90 Modified to match new version of pdb.h
24.05.90 Fixed so the variables passed in as sel[] don't
*have* to be 4 chars.
17.05.93 Modified for book. Returns BOOL.
09.07.93 Modified to return PDB pointer. Changed allocation
scheme. Changed back to sel[] variables *must* be 4
chars.
*/
PDB *SelectAtomsPDB(PDB *pdbin, int nsel, char **sel, int *natom)
{
PDB *pdbout = NULL,
*p,
*q;
int i;
*natom = 0;
/* Step through the input PDB linked list */
for(p=pdbin; p!= NULL; NEXT(p))
{
/* Step through the selection list */
for(i=0; i<nsel; i++)
{
/* See if there is a match */
if(!strncmp(p->atnam,sel[i],4))
{
/* Alloacte a new entry */
if(pdbout==NULL)
{
INIT(pdbout, PDB);
q = pdbout;
}
else
{
ALLOCNEXT(q, PDB);
}
/* If failed, free anything allocated and return */
if(q==NULL)
{
if(pdbout != NULL) FREELIST(pdbout,PDB);
*natom = 0;
return(NULL);
}
/* Increment atom count */
(*natom)++;
/* Copy the record to the output list (sets ->next to NULL) */
CopyPDB(q, p);
break;
}
}
}
/* Return pointer to start of output list */
return(pdbout);
}
/************************************************************************/
/*>REAL phi(REAL xi,REAL yi,REAL zi,REAL xj,REAL yj,REAL zj,
REAL xk,REAL yk,REAL zk,REAL xl,REAL yl,REAL zl)
---------------------------------------------------------
Input: REAL xi,yi,zi Input coordinates
xj,yj,zj
xk,yk,zk
xl,yl,zl
Returns: REAL The torsion angle between the 4 atoms
Calculates the torsion angle described by 4 sets of coordinates.
04.03.91 Original By: ACRM
16.06.93 Changed float to REAL
*/
REAL phi(REAL xi,
REAL yi,
REAL zi,
REAL xj,
REAL yj,
REAL zj,
REAL xk,
REAL yk,
REAL zk,
REAL xl,
REAL yl,
REAL zl)
{
REAL xij,yij,zij,
xkj,ykj,zkj,
xkl,ykl,zkl,
dxi,dyi,dzi,
gxi,gyi,gzi,
bi,bk,ct,
boi2,boj2,
z1,z2,ap,s,
bioj,bjoi;
/* Calculate the vectors C,B,C */
xij = xi - xj;
yij = yi - yj;
zij = zi - zj;
xkj = xk - xj;
ykj = yk - yj;
zkj = zk - zj;
xkl = xk - xl;
ykl = yk - yl;
zkl = zk - zl;
/* Calculate the normals to the two planes n1 and n2
this is given as the cross products:
AB x BC
--------- = n1
|AB x BC|
BC x CD
--------- = n2
|BC x CD|
*/
dxi = yij * zkj - zij * ykj; /* Normal to plane 1 */
dyi = zij * xkj - xij * zkj;
dzi = xij * ykj - yij * xkj;
gxi = zkj * ykl - ykj * zkl; /* Mormal to plane 2 */
gyi = xkj * zkl - zkj * xkl;
gzi = ykj * xkl - xkj * ykl;
/* Calculate the length of the two normals */
bi = dxi * dxi + dyi * dyi + dzi * dzi;
bk = gxi * gxi + gyi * gyi + gzi * gzi;
ct = dxi * gxi + dyi * gyi + dzi * gzi;
boi2 = 1./bi;
boj2 = 1./bk;
bi = (REAL)sqrt((double)bi);
bk = (REAL)sqrt((double)bk);
z1 = 1./bi;
z2 = 1./bk;
bioj = bi * z2;
bjoi = bk * z1;
ct = ct * z1 * z2;
if (ct > 1.0) ct = 1.0;
if (ct < (-1.0)) ct = -1.0;
ap = acos(ct);
s = xkj * (dzi * gyi - dyi * gzi)
+ ykj * (dxi * gzi - dzi * gxi)
+ zkj * (dyi * gxi - dxi * gyi);
if (s < 0.0) ap = -ap;
ap = (ap > 0.0) ? PI-ap : -(PI+ap);
return(ap);
}
/************************************************************************/
/*>char throne(char *three)
------------------------
Input: char *three Three letter code
Returns: char One letter code
Converts 3-letter code to 1-letter code.
Handles ASX and GLX as X
29.09.92 Original By: ACRM
11.03.94 Modified to handle ASX and GLX in the tables
*/
char throne(char *three)
{
int j;
if(three[2] == 'X')
return('X');
for(j=0;j<NUMAAKNOWN;j++)
if(!strncmp(sTab3[j],three,3)) return(sTab1[j]);
/* Only get here if the three letter code was not found */
return('X');
}
/************************************************************************/
/*>void CopyPDB(PDB *out, PDB *in)
-------------------------------
Input: PDB *in Input PDB record pointer
Output: PDB *out Output PDB record pointer
Copy a PDB record, except that the ->next is set to NULL;
12.05.92 Original By: ACRM
*/
void CopyPDB(PDB *out,
PDB *in)
{
strcpy(out->junk, in->junk);
strcpy(out->atnam, in->atnam);
strcpy(out->resnam, in->resnam);
strcpy(out->insert, in->insert);
strcpy(out->chain, in->chain);
out->atnum = in->atnum;
out->resnum = in->resnum;
out->x = in->x;
out->y = in->y;
out->z = in->z;
out->occ = in->occ;
out->bval = in->bval;
out->next = NULL;
}
/************************************************************************/
/*>int chindex(char *string, char ch)
----------------------------------
Input: char *string A string
ch A character for which to search
Returns: int The offset of ch in string.
Returns the offset of a character in a string. -1 if not found. This is
used in a similar manner to strchr(), but gives an offset in the string
rather than a pointer to the character.
10.02.91 Original
28.05.92 ANSIed
06.10.93 Changed name to chindex() to avoid UNIX name clash
*/
int chindex(char *string,
char ch)
{
int count;
for(count=0;count<strlen(string);count++)
if(string[count] == ch) break;
if(count >= strlen(string)) count = -1;
return(count);
}
/************************************************************************/
/*>int fsscanf(char *buffer, char *format, ...)
--------------------------------------------
Input: char *buffer Buffer from which to read information
char *format Format string (like scanf() et al., but see
restrictions below)
Output: ... Scanned output variables
Returns: int Number of values read (EOF if end of file or
no specifiers found in format string)
Hard formatted version of sscanf(). Implements FORTRAN-like rigid
column reading out of a string.
The only parsing characters recognised are:
%<n>f A single precision floating point number of width <n>
%<n>lf A double precision floating point number of width <n>
%<n>d An integer of width <n>
%<n>ld A long integer of width <n>
%<n>u An unsigned of width <n>
%<n>lu An unsigned long of width <n>
%<n>s A string of width <n>
%c A character (of width 1)
%<n>x <n> spaces (like FORTRAN).
With the exception of the %c parser, the column width, <n>,
*must* be specified.
Blank fields read as numbers are given a value of zero.
17.06.93 Original By: ACRM
12.07.93 Added %u and %lu. Corrected %s and %c to blank rather than
NULL strings if buffer runs out. Pads string if buffer ran
out in the middle. Takes \n in buffer as end of string.
24.11.95 `value' was a fixed 40 character buffer. Now changed to
allocate a suitable number of characters as required.
13.01.97 Previously if reading from a blank line the output variables
were unmodified since an EOF return was done immediately.
Now the immediate EOF return only happens if the input
buffer is a NULL variable and the EOF on blank string is
moved to the end such that all output variables are set to
zero or blank before the EOF return.
*/
int fsscanf(char *buffer, char *format, ...)
{
va_list ap;
char *FormStart,
*BuffStart,
*stop,
form[16], /* Store a single formatting code */
*value = NULL, /* Store an item */
*ptr,
type;
int i,
MaxValLength = 40, /* Initial max value width */
*IntPtr,
NArg = 0,
width = 0;
BOOL LongType = FALSE;
double *DblPtr;
float *FloatPtr;
long *LongPtr;
unsigned *UPtr;
unsigned long *ULongPtr;
/* Return if line is blank */
if(!buffer) return(EOF);
/* Allocate initial memory for storing a value */
if((value=(char *)malloc((1+MaxValLength)*sizeof(char)))==NULL)
return(0);
/* Start the variable argument processing */
va_start(ap, format);
/* Intialise FormStart to the start of the format string and BuffStart
to start of input buffer
*/
FormStart = format;
BuffStart = buffer;
for(;;)
{
/* Flag for long variables */
LongType = FALSE;
/* Find the start of a % group from the format string */
while(*FormStart && *FormStart != '%') FormStart++;
if(!(*FormStart)) break; /* Exit routine */
/* Find the next occurence of a % */
stop = FormStart+1;
while(*stop && *stop != '%') stop++;
/* Copy these format characters into our working buffer */
for(i=0; FormStart != stop; i++)
form[i] = *(FormStart++);
form[i] = '\0';
/* Find the type we're dealing with */
ptr = form + i;
while(*ptr == '\0' || *ptr == ' ' || *ptr == '\t') ptr--;
type = toupper(*ptr);
/* Set long flag if appropriate */
if((*(ptr-1) == 'l') || (*(ptr-1) == 'L'))
LongType = TRUE;
/* If it's not a character, read the width from the form string */
width = 0;
if(type == 'C')
{
width = 1;
}
else
{
for(ptr = form+1; *ptr && isdigit(*ptr); ptr++)
{
width *= 10;
width += (*ptr) - '0';
}
}
/* See if our buffer is wide enough for this item. If not, make
more space
*/
if(width > MaxValLength)
{
if((value = (char *)realloc(value, (width+1) * sizeof(char)))
==NULL)
{
/* Unable to do allocation */
va_end(ap);
return(0);
}
MaxValLength = width;
}
/* Extract width characters from the input buffer. If the input
buffer has run out, value will be a NULL string.
*/
stop = BuffStart + width;
for(i=0; *BuffStart && *BuffStart != '\n' && BuffStart != stop; i++)
value[i] = *(BuffStart++);
value[i] = '\0';
/* Act on each type */
switch(type)
{
case 'F': /* A double precision or float */
if(LongType)
{
DblPtr = va_arg(ap, double *);
if(sscanf(value,"%lf", DblPtr) == (-1))
*DblPtr = (double)0.0;
}
else
{
FloatPtr = va_arg(ap, float *);
if(sscanf(value,"%f", FloatPtr) == (-1))
*FloatPtr = (float)0.0;
}
break;
case 'D': /* An integer or long int */
if(LongType)
{
LongPtr = va_arg(ap, long *);
if(sscanf(value,"%ld", LongPtr) == (-1))
*LongPtr = 0L;
}
else
{
IntPtr = va_arg(ap, int *);
if(sscanf(value,"%d", IntPtr) == (-1))
*IntPtr = 0;
}
break;
case 'U': /* An unsigned or unsigned long */
if(LongType)
{
ULongPtr = va_arg(ap, unsigned long *);
if(sscanf(value,"%lu", ULongPtr) == (-1))
*ULongPtr = 0L;
}
else
{
UPtr = va_arg(ap, unsigned *);
if(sscanf(value,"%u", UPtr) == (-1))
*UPtr = 0;
}
break;
case 'S': /* A string */
ptr = va_arg(ap, char *);
if(value[0]) /* Input buffer not empty */
{
*(value + width) = '\0';
strncpy(ptr, value, width+1);
/* If the input buffer ran out in this string, pad with
spaces and terminate.
*/
if(strlen(ptr) < width) padterm(ptr, width);
}
else /* Input buffer empty */
{
for(i=0; i<width; i++)
*(ptr + i) = ' ';
*(ptr + width) = '\0';
}
break;
case 'C': /* A character (insert a space if buffer empty) */
*(va_arg(ap, char *)) = (value[0] ? value[0]: ' ');
break;
case 'X': /* A column to skip */
/* Fall through to default action */
default:
/* Do nothing */
;
}
/* If not a blank column, increment arg count */
if(type != 'X') NArg++;
}
/* End variable argument parsing */
va_end(ap);
/* Free the allocated buffer */
free(value);
/* Return number of values read or EOF if it was a blank input */
if(buffer[0] == '\0' || buffer[0] == '\n') return(EOF);
return(NArg);
}
/************************************************************************/
/*>void padterm(char *string, int length)
---------------------------------------
I/O: char *string String to be padded with spaces
Input: int length Required size for string
Pads a string with spaces to length characters, then terminates it.
06.09.91 Original By: ACRM
*/
void padterm(char *string,
int length)
{
int i;
for(i=strlen(string); i<length; i++)
string[i] = ' ';
string[length] = '\0';
}
|
the_stack_data/115490.c | #include <assert.h>
struct Foo { char *a; };
int main()
{
struct Foo foo = { "foo" };
assert(foo.a[0] == 'f');
assert(foo.a[1] == 'o');
assert(foo.a[2] == 'o');
return 0;
}
|
the_stack_data/77630.c | // RUN: not %clang_cc1 -triple armv5--- -target-cpu not-a-cpu -fsyntax-only %s 2>&1 | FileCheck %s --check-prefix ARM
// ARM: error: unknown target CPU 'not-a-cpu'
// ARM: note: valid target CPU values are:
// ARM-SAME: arm2
// RUN: not %clang_cc1 -triple arm64--- -target-cpu not-a-cpu -fsyntax-only %s 2>&1 | FileCheck %s --check-prefix AARCH64
// AARCH64: error: unknown target CPU 'not-a-cpu'
// AARCH64: note: valid target CPU values are:
// AARCH64-SAME: cortex-a35,
// RUN: not %clang_cc1 -triple i386--- -target-cpu not-a-cpu -fsyntax-only %s 2>&1 | FileCheck %s --check-prefix X86
// X86: error: unknown target CPU 'not-a-cpu'
// X86: note: valid target CPU values are: i386, i486, winchip-c6, winchip2, c3,
// X86-SAME: i586, pentium, pentium-mmx, pentiumpro, i686, pentium2, pentium3,
// X86-SAME: pentium3m, pentium-m, c3-2, yonah, pentium4, pentium4m, prescott,
// X86-SAME: nocona, core2, penryn, bonnell, atom, silvermont, slm, goldmont, goldmont-plus, tremont,
// X86-SAME: nehalem, corei7, westmere, sandybridge, corei7-avx, ivybridge,
// X86-SAME: core-avx-i, haswell, core-avx2, broadwell, skylake, skylake-avx512,
// X86-SAME: skx, cascadelake, cannonlake, icelake-client, icelake-server, knl, knm, lakemont, k6, k6-2, k6-3,
// X86-SAME: athlon, athlon-tbird, athlon-xp, athlon-mp, athlon-4, k8, athlon64,
// X86-SAME: athlon-fx, opteron, k8-sse3, athlon64-sse3, opteron-sse3, amdfam10,
// X86-SAME: barcelona, btver1, btver2, bdver1, bdver2, bdver3, bdver4, znver1,
// X86-SAME: x86-64, geode
// RUN: not %clang_cc1 -triple x86_64--- -target-cpu not-a-cpu -fsyntax-only %s 2>&1 | FileCheck %s --check-prefix X86_64
// X86_64: error: unknown target CPU 'not-a-cpu'
// X86_64: note: valid target CPU values are: nocona, core2, penryn, bonnell,
// X86_64-SAME: atom, silvermont, slm, goldmont, goldmont-plus, tremont, nehalem, corei7, westmere,
// X86_64-SAME: sandybridge, corei7-avx, ivybridge, core-avx-i, haswell,
// X86_64-SAME: core-avx2, broadwell, skylake, skylake-avx512, skx, cascadelake, cannonlake,
// X86_64-SAME: icelake-client, icelake-server, knl, knm, k8, athlon64, athlon-fx, opteron, k8-sse3,
// X86_64-SAME: athlon64-sse3, opteron-sse3, amdfam10, barcelona, btver1,
// X86_64-SAME: btver2, bdver1, bdver2, bdver3, bdver4, znver1, x86-64
// RUN: not %clang_cc1 -triple nvptx--- -target-cpu not-a-cpu -fsyntax-only %s 2>&1 | FileCheck %s --check-prefix NVPTX
// NVPTX: error: unknown target CPU 'not-a-cpu'
// NVPTX: note: valid target CPU values are: sm_20, sm_21, sm_30, sm_32, sm_35,
// NVPTX-SAME: sm_37, sm_50, sm_52, sm_53, sm_60, sm_61, sm_62, sm_70, sm_72
// RUN: not %clang_cc1 -triple r600--- -target-cpu not-a-cpu -fsyntax-only %s 2>&1 | FileCheck %s --check-prefix R600
// R600: error: unknown target CPU 'not-a-cpu'
// R600: note: valid target CPU values are: r600, rv630, rv635, r630, rs780,
// R600-SAME: rs880, rv610, rv620, rv670, rv710, rv730, rv740, rv770, cedar,
// R600-SAME: palm, cypress, hemlock, juniper, redwood, sumo, sumo2, barts,
// R600-SAME: caicos, aruba, cayman, turks
// RUN: not %clang_cc1 -triple amdgcn--- -target-cpu not-a-cpu -fsyntax-only %s 2>&1 | FileCheck %s --check-prefix AMDGCN
// AMDGCN: error: unknown target CPU 'not-a-cpu'
// AMDGCN: note: valid target CPU values are: gfx600, tahiti, gfx601, hainan,
// AMDGCN-SAME: oland, pitcairn, verde, gfx700, kaveri, gfx701, hawaii, gfx702,
// AMDGCN-SAME: gfx703, kabini, mullins, gfx704, bonaire, gfx801, carrizo,
// AMDGCN-SAME: gfx802, iceland, tonga, gfx803, fiji, polaris10, polaris11,
// AMDGCN-SAME: gfx810, stoney, gfx900, gfx902
// RUN: not %clang_cc1 -triple wasm64--- -target-cpu not-a-cpu -fsyntax-only %s 2>&1 | FileCheck %s --check-prefix WEBASM
// WEBASM: error: unknown target CPU 'not-a-cpu'
// WEBASM: note: valid target CPU values are: mvp, bleeding-edge, generic
// RUN: not %clang_cc1 -triple systemz--- -target-cpu not-a-cpu -fsyntax-only %s 2>&1 | FileCheck %s --check-prefix SYSTEMZ
// SYSTEMZ: error: unknown target CPU 'not-a-cpu'
// SYSTEMZ: note: valid target CPU values are: arch8, z10, arch9, z196, arch10,
// SYSTEMZ-SAME: zEC12, arch11, z13, arch12, z14
// RUN: not %clang_cc1 -triple sparc--- -target-cpu not-a-cpu -fsyntax-only %s 2>&1 | FileCheck %s --check-prefix SPARC
// SPARC: error: unknown target CPU 'not-a-cpu'
// SPARC: note: valid target CPU values are: v8, supersparc, sparclite, f934,
// SPARC-SAME: hypersparc, sparclite86x, sparclet, tsc701, v9, ultrasparc,
// SPARC-SAME: ultrasparc3, niagara, niagara2, niagara3, niagara4, ma2100,
// SPARC-SAME: ma2150, ma2155, ma2450, ma2455, ma2x5x, ma2080, ma2085, ma2480,
// SPARC-SAME: ma2485, ma2x8x, myriad2, myriad2.1, myriad2.2, myriad2.3, leon2,
// SPARC-SAME: at697e, at697f, leon3, ut699, gr712rc, leon4, gr740
// RUN: not %clang_cc1 -triple sparcv9--- -target-cpu not-a-cpu -fsyntax-only %s 2>&1 | FileCheck %s --check-prefix SPARCV9
// SPARCV9: error: unknown target CPU 'not-a-cpu'
// SPARCV9: note: valid target CPU values are: v9, ultrasparc, ultrasparc3, niagara, niagara2, niagara3, niagara4
// RUN: not %clang_cc1 -triple powerpc--- -target-cpu not-a-cpu -fsyntax-only %s 2>&1 | FileCheck %s --check-prefix PPC
// PPC: error: unknown target CPU 'not-a-cpu'
// PPC: note: valid target CPU values are: generic, 440, 450, 601, 602, 603,
// PPC-SAME: 603e, 603ev, 604, 604e, 620, 630, g3, 7400, g4, 7450, g4+, 750,
// PPC-SAME: 970, g5, a2, a2q, e500mc, e5500, power3, pwr3, power4, pwr4,
// PPC-SAME: power5, pwr5, power5x, pwr5x, power6, pwr6, power6x, pwr6x, power7,
// PPC-SAME: pwr7, power8, pwr8, power9, pwr9, powerpc, ppc, powerpc64, ppc64,
// PPC-SAME: powerpc64le, ppc64le
// RUN: not %clang_cc1 -triple mips--- -target-cpu not-a-cpu -fsyntax-only %s 2>&1 | FileCheck %s --check-prefix MIPS
// MIPS: error: unknown target CPU 'not-a-cpu'
// MIPS: note: valid target CPU values are: mips1, mips2, mips3, mips4, mips5,
// MIPS-SAME: mips32, mips32r2, mips32r3, mips32r5, mips32r6, mips64, mips64r2,
// MIPS-SAME: mips64r3, mips64r5, mips64r6, octeon, p5600
// RUN: not %clang_cc1 -triple lanai--- -target-cpu not-a-cpu -fsyntax-only %s 2>&1 | FileCheck %s --check-prefix LANAI
// LANAI: error: unknown target CPU 'not-a-cpu'
// LANAI: note: valid target CPU values are: v11
// RUN: not %clang_cc1 -triple hexagon--- -target-cpu not-a-cpu -fsyntax-only %s 2>&1 | FileCheck %s --check-prefix HEXAGON
// HEXAGON: error: unknown target CPU 'not-a-cpu'
// HEXAGON: note: valid target CPU values are: hexagonv5, hexagonv55,
// HEXAGON-SAME: hexagonv60, hexagonv62, hexagonv65
// RUN: not %clang_cc1 -triple bpf--- -target-cpu not-a-cpu -fsyntax-only %s 2>&1 | FileCheck %s --check-prefix BPF
// BPF: error: unknown target CPU 'not-a-cpu'
// BPF: note: valid target CPU values are: generic, v1, v2, probe
// RUN: not %clang_cc1 -triple avr--- -target-cpu not-a-cpu -fsyntax-only %s 2>&1 | FileCheck %s --check-prefix AVR
// AVR: error: unknown target CPU 'not-a-cpu'
// AVR: note: valid target CPU values are: avr1, avr2, avr25, avr3, avr31,
// AVR-SAME: avr35, avr4, avr5, avr51, avr6, avrxmega1, avrxmega2, avrxmega3,
// AVR-SAME: avrxmega4, avrxmega5, avrxmega6, avrxmega7, avrtiny, at90s1200,
// AVR-SAME: attiny11, attiny12, attiny15, attiny28, at90s2313, at90s2323,
// AVR-SAME: at90s2333, at90s2343, attiny22, attiny26, at86rf401, at90s4414,
// AVR-SAME: t90s4433, at90s4434, at90s8515, at90c8534, at90s8535, ata5272,
// AVR-SAME: ttiny13, attiny13a, attiny2313, attiny2313a, attiny24, attiny24a,
// AVR-SAME: ttiny4313, attiny44, attiny44a, attiny84, attiny84a, attiny25,
// AVR-SAME: ttiny45, attiny85, attiny261, attiny261a, attiny461, attiny461a,
// AVR-SAME: ttiny861, attiny861a, attiny87, attiny43u, attiny48, attiny88,
// AVR-SAME: ttiny828, at43usb355, at76c711, atmega103, at43usb320, attiny167,
// AVR-SAME: t90usb82, at90usb162, ata5505, atmega8u2, atmega16u2,
// AVR-SAME: atmega32u2, attiny1634, atmega8, ata6289, atmega8a, ata6285,
// AVR-SAME: ata6286, atmega48, atmega48a, atmega48pa, atmega48p, atmega88,
// AVR-SAME: atmega88a, atmega88p, atmega88pa, atmega8515, atmega8535,
// AVR-SAME: atmega8hva, at90pwm1, at90pwm2, at90pwm2b, at90pwm3, at90pwm3b,
// AVR-SAME: at90pwm81, ata5790, ata5795, atmega16, atmega16a, atmega161,
// AVR-SAME: atmega162, atmega163, atmega164a, atmega164p, atmega164pa,
// AVR-SAME: atmega165, atmega165a, atmega165p, atmega165pa, atmega168,
// AVR-SAME: atmega168a, atmega168p, atmega168pa, atmega169, atmega169a,
// AVR-SAME: atmega169p, atmega169pa, atmega32, atmega32a, atmega323,
// AVR-SAME: atmega324a, atmega324p, atmega324pa, atmega325, atmega325a,
// AVR-SAME: atmega325p, atmega325pa, atmega3250, atmega3250a, atmega3250p,
// AVR-SAME: atmega3250pa, atmega328, atmega328p, atmega329, atmega329a,
// AVR-SAME: atmega329p, atmega329pa, atmega3290, atmega3290a, atmega3290p,
// AVR-SAME: atmega3290pa, atmega406, atmega64, atmega64a, atmega640, atmega644,
// AVR-SAME: atmega644a, atmega644p, atmega644pa, atmega645, atmega645a,
// AVR-SAME: tmega645p, atmega649, atmega649a, atmega649p, atmega6450,
// AVR-SAME: tmega6450a, atmega6450p, atmega6490, atmega6490a, atmega6490p,
// AVR-SAME: tmega64rfr2, atmega644rfr2, atmega16hva, atmega16hva2,
// AVR-SAME: tmega16hvb, atmega16hvbrevb, atmega32hvb, atmega32hvbrevb,
// AVR-SAME: tmega64hve, at90can32, at90can64, at90pwm161, at90pwm216,
// AVR-SAME: t90pwm316, atmega32c1, atmega64c1, atmega16m1, atmega32m1,
// AVR-SAME: tmega64m1, atmega16u4, atmega32u4, atmega32u6, at90usb646,
// AVR-SAME: t90usb647, at90scr100, at94k, m3000, atmega128, atmega128a,
// AVR-SAME: tmega1280, atmega1281, atmega1284, atmega1284p, atmega128rfa1,
// AVR-SAME: tmega128rfr2, atmega1284rfr2, at90can128, at90usb1286,
// AVR-SAME: t90usb1287, atmega2560, atmega2561, atmega256rfr2, atmega2564rfr2,
// AVR-SAME: txmega16a4, atxmega16a4u, atxmega16c4, atxmega16d4, atxmega32a4,
// AVR-SAME: txmega32a4u, atxmega32c4, atxmega32d4, atxmega32e5, atxmega16e5,
// AVR-SAME: txmega8e5, atxmega32x1, atxmega64a3, atxmega64a3u, atxmega64a4u,
// AVR-SAME: txmega64b1, atxmega64b3, atxmega64c3, atxmega64d3, atxmega64d4,
// AVR-SAME: txmega64a1, atxmega64a1u, atxmega128a3, atxmega128a3u,
// AVR-SAME: txmega128b1, atxmega128b3, atxmega128c3, atxmega128d3,
// AVR-SAME: txmega128d4, atxmega192a3, atxmega192a3u, atxmega192c3,
// AVR-SAME: txmega192d3, atxmega256a3, atxmega256a3u, atxmega256a3b,
// AVR-SAME: txmega256a3bu, atxmega256c3, atxmega256d3, atxmega384c3,
// AVR-SAME: txmega384d3, atxmega128a1, atxmega128a1u, atxmega128a4u,
// AVR-SAME: ttiny4, attiny5, attiny9, attiny10, attiny20, attiny40, attiny102,
// AVR-SAME: attiny104
|
the_stack_data/170453693.c | /*
* Copyright (c) 2008-2013 Alper Akcan <[email protected]>
*
* This program is free software. It comes without any warranty, to
* the extent permitted by applicable law. You can redistribute it
* and/or modify it under the terms of the Do What The Fuck You Want
* To Public License, Version 2, as published by Sam Hocevar. See
* http://www.wtfpl.net/ for more details.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main (int argc, char *argv[])
{
void *rc;
(void) argc;
(void) argv;
rc = calloc(1, 1024);
if (rc == NULL) {
fprintf(stderr, "calloc failed\n");
exit(-1);
}
return 0;
}
|
the_stack_data/50176.c | #ifdef BUILD_NEON
#ifdef BUILD_NEON_INTRINSICS
#include <arm_neon.h>
#endif
#endif
/* blend pixel --> dst */
#ifdef BUILD_NEON
#ifdef BUILD_NEON_INTRINSICS
static void
_op_blend_rel_p_dp_neon(DATA32 *s, DATA8 *m, DATA32 c, DATA32 *d, int l) {
uint16x8_t cs0_16x8;
uint16x8_t cs1_16x8;
uint16x8_t ld0_16x8;
uint16x8_t ld1_16x8;
uint32x4_t c_32x4;
uint32x4_t cond_32x4;
uint32x4_t cs_32x4;
uint32x4_t d_32x4;
uint32x4_t l_32x4;
uint32x4_t ld_32x4;
uint32x4_t s_32x4;
uint32x4_t x0_32x4;
uint32x4_t x1_32x4;
uint8x16_t c_8x16;
uint8x16_t cs_8x16;
uint8x16_t d_8x16;
uint8x16_t l_8x16;
uint8x16_t ld_8x16;
uint8x16_t s_8x16;
uint8x16_t x0_8x16;
uint8x16_t x1_8x16;
uint8x8_t c0_8x8;
uint8x8_t c1_8x8;
uint8x8_t cs0_8x8;
uint8x8_t cs1_8x8;
uint8x8_t d0_8x8;
uint8x8_t d1_8x8;
uint8x8_t l0_8x8;
uint8x8_t l1_8x8;
uint8x8_t ld0_8x8;
uint8x8_t ld1_8x8;
uint8x8_t s0_8x8;
uint8x8_t s1_8x8;
x1_8x16 = vdupq_n_u8(0x1);
x1_32x4 = vreinterpretq_u32_u8(x1_8x16);
x0_8x16 = vdupq_n_u8(0x0);
x0_32x4 = vreinterpretq_u32_u8(x0_8x16);
DATA32 *end = d + (l & ~3);
while (d < end)
{
// load 4 elements from d
d_32x4 = vld1q_u32(d);
d_8x16 = vreinterpretq_u8_u32(d_32x4);
d0_8x8 = vget_low_u8(d_8x16);
d1_8x8 = vget_high_u8(d_8x16);
// load 4 elements from s
s_32x4 = vld1q_u32(s);
s_8x16 = vreinterpretq_u8_u32(s_32x4);
s0_8x8 = vget_low_u8(s_8x16);
s1_8x8 = vget_high_u8(s_8x16);
// calculate l = 256 - (*s >> 24)
l_32x4 = vshrq_n_u32(s_32x4, 24);
l_32x4 = vmulq_u32(x1_32x4, l_32x4);
l_8x16 = vreinterpretq_u8_u32(l_32x4);
l_8x16 = vsubq_u8(x0_8x16, l_8x16);
l0_8x8 = vget_low_u8(l_8x16);
l1_8x8 = vget_high_u8(l_8x16);
// multiply MUL_256(l, *d)
ld0_16x8 = vmull_u8(l0_8x8, d0_8x8);
ld1_16x8 = vmull_u8(l1_8x8, d1_8x8);
ld0_8x8 = vshrn_n_u16(ld0_16x8,8);
ld1_8x8 = vshrn_n_u16(ld1_16x8,8);
ld_8x16 = vcombine_u8(ld0_8x8, ld1_8x8);
ld_32x4 = vreinterpretq_u32_u8(ld_8x16);
// select d where l should be 256
cond_32x4 = vceqq_u32(l_32x4, x0_32x4);
ld_32x4 = vbslq_u32(cond_32x4, d_32x4, ld_32x4);
// calculate 1 + (*d >> 24)
c_32x4 = vshrq_n_u32(d_32x4, 24);
c_32x4 = vmulq_u32(x1_32x4, c_32x4);
c_8x16 = vreinterpretq_u8_u32(c_32x4);
c_8x16 = vaddq_u8(c_8x16, x1_8x16);
c0_8x8 = vget_low_u8(c_8x16);
c1_8x8 = vget_high_u8(c_8x16);
// multiply MUL_256(l, *d)
cs0_16x8 = vmull_u8(c0_8x8, s0_8x8);
cs1_16x8 = vmull_u8(c1_8x8, s1_8x8);
cs0_8x8 = vshrn_n_u16(cs0_16x8,8);
cs1_8x8 = vshrn_n_u16(cs1_16x8,8);
cs_8x16 = vcombine_u8(cs0_8x8, cs1_8x8);
cs_32x4 = vreinterpretq_u32_u8(cs_8x16);
// select s where c should be 256
c_32x4 = vreinterpretq_u32_u8(c_8x16);
cond_32x4 = vceqq_u32(c_32x4, x0_32x4);
cs_32x4 = vbslq_u32(cond_32x4, s_32x4, cs_32x4);
// add up everything
d_32x4 = vaddq_u32(cs_32x4, ld_32x4);
// save result
vst1q_u32(d, d_32x4);
d+=4;
s+=4;
}
end += (l & 3);
while (d < end)
{
l = 256 - (*s >> 24);
c = 1 + (*d >> 24);
*d = MUL_256(c, *s) + MUL_256(l, *d);
d++;
s++;
}
}
static void
_op_blend_rel_pan_dp_neon(DATA32 *s, DATA8 *m, DATA32 c, DATA32 *d, int l) {
uint16x8_t cs0_16x8;
uint16x8_t cs1_16x8;
uint32x4_t c_32x4;
uint32x4_t cond_32x4;
uint32x4_t cs_32x4;
uint32x4_t d_32x4;
uint32x4_t s_32x4;
uint32x4_t x0_32x4;
uint32x4_t x1_32x4;
uint8x16_t c_8x16;
uint8x16_t cs_8x16;
uint8x16_t s_8x16;
uint8x16_t x0_8x16;
uint8x16_t x1_8x16;
uint8x8_t c0_8x8;
uint8x8_t c1_8x8;
uint8x8_t cs0_8x8;
uint8x8_t cs1_8x8;
uint8x8_t s0_8x8;
uint8x8_t s1_8x8;
x1_8x16 = vdupq_n_u8(0x1);
x1_32x4 = vreinterpretq_u32_u8(x1_8x16);
x0_8x16 = vdupq_n_u8(0x0);
x0_32x4 = vreinterpretq_u32_u8(x0_8x16);
DATA32 *end = d + (l & ~3);
while (d < end)
{
// load 4 elements from d
d_32x4 = vld1q_u32(d);
// load 4 elements from s
s_32x4 = vld1q_u32(s);
s_8x16 = vreinterpretq_u8_u32(s_32x4);
s0_8x8 = vget_low_u8(s_8x16);
s1_8x8 = vget_high_u8(s_8x16);
// calculate 1 + (*d >> 24)
c_32x4 = vshrq_n_u32(d_32x4, 24);
c_32x4 = vmulq_u32(x1_32x4, c_32x4);
c_8x16 = vreinterpretq_u8_u32(c_32x4);
c_8x16 = vaddq_u8(c_8x16, x1_8x16);
c0_8x8 = vget_low_u8(c_8x16);
c1_8x8 = vget_high_u8(c_8x16);
// multiply MUL_256(l, *d)
cs0_16x8 = vmull_u8(c0_8x8, s0_8x8);
cs1_16x8 = vmull_u8(c1_8x8, s1_8x8);
cs0_8x8 = vshrn_n_u16(cs0_16x8,8);
cs1_8x8 = vshrn_n_u16(cs1_16x8,8);
cs_8x16 = vcombine_u8(cs0_8x8, cs1_8x8);
cs_32x4 = vreinterpretq_u32_u8(cs_8x16);
// select s where c should be 256
c_32x4 = vreinterpretq_u32_u8(c_8x16);
cond_32x4 = vceqq_u32(c_32x4, x0_32x4);
cs_32x4 = vbslq_u32(cond_32x4, s_32x4, cs_32x4);
// save result
vst1q_u32(d, cs_32x4);
d+=4;
s+=4;
}
end += (l & 3);
while (d < end)
{
c = 1 + (*d >> 24);
*d++ = MUL_256(c, *s);
s++;
}
}
#endif
#endif
#ifdef BUILD_NEON
static void
_op_blend_p_dp_neon(DATA32 *s, DATA8 *m, DATA32 c, DATA32 *d, int l) {
#ifdef BUILD_NEON_INTRINSICS
uint16x8_t ad00_16x8;
uint16x8_t ad01_16x8;
uint16x8_t ad10_16x8;
uint16x8_t ad11_16x8;
uint32x4_t ad0_32x4;
uint32x4_t ad1_32x4;
uint32x4_t alpha0_32x4;
uint32x4_t alpha1_32x4;
uint32x4_t cond0_32x4;
uint32x4_t cond1_32x4;
uint32x4_t d0_32x4;
uint32x4_t d1_32x4;
uint32x4_t s0_32x4;
uint32x4_t s1_32x4;
uint32x4_t x0_32x4;
uint32x4_t x1_32x4;
uint8x16_t ad0_8x16;
uint8x16_t ad1_8x16;
uint8x16_t alpha0_8x16;
uint8x16_t alpha1_8x16;
uint8x16_t d0_8x16;
uint8x16_t d1_8x16;
uint8x16_t x0_8x16;
uint8x16_t x1_8x16;
uint8x8_t ad00_8x8;
uint8x8_t ad01_8x8;
uint8x8_t ad10_8x8;
uint8x8_t ad11_8x8;
uint8x8_t alpha00_8x8;
uint8x8_t alpha01_8x8;
uint8x8_t alpha10_8x8;
uint8x8_t alpha11_8x8;
uint8x8_t d00_8x8;
uint8x8_t d01_8x8;
uint8x8_t d10_8x8;
uint8x8_t d11_8x8;
x1_8x16 = vdupq_n_u8(0x1);
x1_32x4 = vreinterpretq_u32_u8(x1_8x16);
x0_8x16 = vdupq_n_u8(0x0);
x0_32x4 = vreinterpretq_u32_u8(x0_8x16);
DATA32 *start = d;
int size = l;
DATA32 *end = start + (size & ~7);
while (start < end)
{
s0_32x4 = vld1q_u32(s);
s1_32x4 = vld1q_u32(s+4);
d0_32x4 = vld1q_u32(start);
d1_32x4 = vld1q_u32(start+4);
d0_8x16 = vreinterpretq_u8_u32(d0_32x4);
d1_8x16 = vreinterpretq_u8_u32(d1_32x4);
d00_8x8 = vget_low_u8(d0_8x16);
d01_8x8 = vget_high_u8(d0_8x16);
d10_8x8 = vget_low_u8(d1_8x16);
d11_8x8 = vget_high_u8(d1_8x16);
alpha0_32x4 = vshrq_n_u32(s0_32x4, 24);
alpha1_32x4 = vshrq_n_u32(s1_32x4, 24);
alpha0_32x4 = vmulq_u32(x1_32x4, alpha0_32x4);
alpha1_32x4 = vmulq_u32(x1_32x4, alpha1_32x4);
alpha0_8x16 = vreinterpretq_u8_u32(alpha0_32x4);
alpha1_8x16 = vreinterpretq_u8_u32(alpha1_32x4);
alpha0_8x16 = vsubq_u8(x0_8x16, alpha0_8x16);
alpha1_8x16 = vsubq_u8(x0_8x16, alpha1_8x16);
alpha0_32x4 = vreinterpretq_u32_u8(alpha0_8x16);
alpha1_32x4 = vreinterpretq_u32_u8(alpha1_8x16);
alpha10_8x8 = vget_low_u8(alpha1_8x16);
alpha11_8x8 = vget_high_u8(alpha1_8x16);
alpha00_8x8 = vget_low_u8(alpha0_8x16);
alpha01_8x8 = vget_high_u8(alpha0_8x16);
ad00_16x8 = vmull_u8(alpha00_8x8, d00_8x8);
ad01_16x8 = vmull_u8(alpha01_8x8, d01_8x8);
ad10_16x8 = vmull_u8(alpha10_8x8, d10_8x8);
ad11_16x8 = vmull_u8(alpha11_8x8, d11_8x8);
ad00_8x8 = vshrn_n_u16(ad00_16x8,8);
ad01_8x8 = vshrn_n_u16(ad01_16x8,8);
ad10_8x8 = vshrn_n_u16(ad10_16x8,8);
ad11_8x8 = vshrn_n_u16(ad11_16x8,8);
ad0_8x16 = vcombine_u8(ad00_8x8, ad01_8x8);
ad1_8x16 = vcombine_u8(ad10_8x8, ad11_8x8);
ad0_32x4 = vreinterpretq_u32_u8(ad0_8x16);
ad1_32x4 = vreinterpretq_u32_u8(ad1_8x16);
cond0_32x4 = vceqq_u32(alpha0_32x4, x0_32x4);
cond1_32x4 = vceqq_u32(alpha1_32x4, x0_32x4);
ad0_32x4 = vbslq_u32(cond0_32x4, d0_32x4, ad0_32x4);
ad1_32x4 = vbslq_u32(cond1_32x4, d1_32x4, ad1_32x4);
d0_32x4 = vaddq_u32(s0_32x4, ad0_32x4);
d1_32x4 = vaddq_u32(s1_32x4, ad1_32x4);
vst1q_u32(start, d0_32x4);
vst1q_u32(start+4, d1_32x4);
s+=8;
start+=8;
}
end += (size & 7);
while (start < end)
{
int alpha;
alpha = 256 - (*s >> 24);
*start = *s++ + MUL_256(alpha, *start);
start++;
}
#else
#define AP "blend_p_dp_"
asm volatile (
".fpu neon \n\t"
//** init
"vmov.i8 q8, $0x1 \n\t"
AP "loopchoose: \n\t"
// If aligned already - straight to octs
"andS %[tmp], %[d],$0x1f \n\t"
"beq "AP"octloops \n\t"
"andS %[tmp], %[d],$0xf \n\t"
"beq "AP"quadloops \n\t"
"andS %[tmp], %[d],$0x4 \n\t"
"beq "AP"dualloop \n\t"
// Only ever executes once, fall through to dual
AP "singleloop: \n\t"
"vld1.32 d0[0], [%[s]]! \n\t"
"vld1.32 d4[0], [%[d]] \n\t"
"vmvn.u8 d8, d0 \n\t"
"vshr.u32 d8, d8, #24 \n\t"
"vmul.u32 d8, d16, d8 \n\t"
"vmovl.u8 q9, d4 \n\t"
"vmull.u8 q6, d4,d8 \n\t"
"vadd.u16 q6, q6, q9 \n\t"
"vshrn.u16 d8, q6, #8 \n\t"
// Add to 's'
"vqadd.u8 q2, q4,q0 \n\t"
"vst1.32 d4[0], [%[d]] \n\t"
"add %[d], #4 \n\t"
// Can we go the fast path?
"andS %[tmp], %[d],$0x1f \n\t"
"beq "AP"octloops \n\t"
"andS %[tmp], %[d],$0x0f \n\t"
"beq "AP"quadloops \n\t"
AP "dualloop: \n\t"
"sub %[tmp], %[e], %[d] \n\t"
"cmp %[tmp], #32 \n\t"
"blt "AP"loopout \n\t"
AP "dualloopint: \n\t"
//** Dual Loop
"vldm %[s]!, {d0} \n\t"
"vldr d4, [%[d]] \n\t"
"vmvn.u8 d8, d0 \n\t"
"vshr.u32 d8, d8, #24 \n\t"
"vmul.u32 d8, d16, d8 \n\t"
"vmovl.u8 q9, d4 \n\t"
"vmull.u8 q6, d4,d8 \n\t"
"vadd.u16 q6, q6, q9 \n\t"
"vshrn.u16 d8, q6, #8 \n\t"
// Add to 's'
"vqadd.u8 d4, d8,d0 \n\t"
"vstr d4, [%[d]] \n\t"
"add %[d], #8 \n\t"
"ands %[tmp], %[d], $0x1f \n\t"
"beq "AP"octloops \n\t"
AP"quadloops: \n\t"
"sub %[tmp], %[e], %[d] \n\t"
"cmp %[tmp], #32 \n\t"
"blt "AP"loopout \n\t"
"vldm %[s]!, {d0,d1) \n\t"
"vldm %[d], {d4,d5} \n\t"
// Copy s.a into q2 (>> 24) & subtract from 255
"vmvn.u8 q4, q0 \n\t"
"vshr.u32 q4, q4,$0x18 \n\t"
// Multiply into all fields
"vmul.u32 q4, q8,q4 \n\t"
"vmovl.u8 q9, d4 \n\t"
"vmovl.u8 q10, d5 \n\t"
// a * d (clobbering 'd'/q7)
"vmull.u8 q6, d4,d8 \n\t"
"vmull.u8 q2, d5,d9 \n\t"
"vadd.u16 q6, q6, q9 \n\t"
"vadd.u16 q2, q2, q10 \n\t"
// Shift & narrow it
"vshrn.u16 d8, q6, #8 \n\t"
"vshrn.u16 d9, q2, #8 \n\t"
// Add to s
"vqadd.u8 q2, q4,q0 \n\t"
// Write it
"vstm %[d]!, {d4,d5} \n\t"
AP "octloops: \n\t"
"sub %[tmp], %[e], %[d] \n\t"
"cmp %[tmp], #32 \n\t"
"ble "AP"loopout \n\t"
"sub %[tmp],%[e],#64 \n\t"
AP "octloopint:\n\t"
//** Oct loop
"vldm %[s]!, {d0,d1,d2,d3) \n\t"
"vldm %[d], {d4,d5,d6,d7} \n\t"
"pld [%[s], #64] \n\t"
// Copy s.a into q2 (>> 24) & subtract from 255
"vmvn.u8 q4, q0 \n\t"
"vmvn.u8 q5, q1 \n\t"
"vshr.u32 q4, q4,$0x18 \n\t"
"vshr.u32 q5, q5,$0x18\n\t"
// Multiply into all fields
"vmul.u32 q4, q8,q4 \n\t"
"vmul.u32 q5, q8,q5 \n\t"
"vmovl.u8 q9, d4 \n\t"
"vmovl.u8 q10, d5 \n\t"
"vmovl.u8 q11, d6 \n\t"
"vmovl.u8 q12, d7 \n\t"
// a * d (clobbering 'd'/q7)
"vmull.u8 q6, d4,d8 \n\t"
"vmull.u8 q2, d5,d9 \n\t"
"vmull.u8 q7, d6,d10 \n\t"
"vmull.u8 q3, d7,d11 \n\t"
"vadd.u16 q6, q6, q9 \n\t"
"vadd.u16 q2, q2, q10 \n\t"
"vadd.u16 q7, q7, q11 \n\t"
"vadd.u16 q3, q3, q12 \n\t"
"cmp %[tmp], %[d]\n\t"
// Shift & narrow it
"vshrn.u16 d8, q6, #8 \n\t"
"vshrn.u16 d9, q2, #8 \n\t"
"vshrn.u16 d10, q7, #8 \n\t"
"vshrn.u16 d11, q3, #8 \n\t"
// Add to s
"vqadd.u8 q2, q4,q0 \n\t"
"vqadd.u8 q3, q5,q1 \n\t"
// Write it
"vstm %[d]!, {d4,d5,d6,d7} \n\t"
"bhi "AP"octloopint\n\t"
AP "loopout: \n\t"
"cmp %[d], %[e] \n\t"
"beq "AP"done \n\t"
"sub %[tmp],%[e], %[d] \n\t"
"cmp %[tmp],$0x04 \n\t"
"ble "AP"singleloop2 \n\t"
AP "dualloop2: \n\t"
"sub %[tmp],%[e],$0x7 \n\t"
AP "dualloop2int: \n\t"
//** Trailing double
"vldm %[s]!, {d0} \n\t"
"vldm %[d], {d4} \n\t"
"vmvn.u8 d8, d0 \n\t"
"vshr.u32 d8, d8, #24 \n\t"
"vmul.u32 d8, d16, d8 \n\t"
"vmovl.u8 q9, d4 \n\t"
"vmull.u8 q6, d4,d8 \n\t"
"vadd.u16 q6, q6, q9 \n\t"
"vshrn.u16 d8, q6, #8 \n\t"
// Add to 's'
"vqadd.u8 d4, d8,d0 \n\t"
"vstr.32 d4, [%[d]] \n\t"
"add %[d], #8 \n\t"
"cmp %[tmp], %[d] \n\t"
"bhi "AP"dualloop2int \n\t"
// Single ??
"cmp %[e], %[d] \n\t"
"beq "AP"done \n\t"
AP"singleloop2: \n\t"
"vld1.32 d0[0], [%[s]] \n\t"
"vld1.32 d4[0], [%[d]] \n\t"
"vmvn.u8 d8, d0 \n\t"
"vshr.u32 d8, d8, #24 \n\t"
"vmul.u32 d8, d8, d16 \n\t"
"vmovl.u8 q9, d4 \n\t"
"vmull.u8 q6, d8,d4 \n\t"
"vadd.u16 q6, q6, q9 \n\t"
"vshrn.u16 d8, q6, #8 \n\t"
// Add to 's'
"vqadd.u8 d0, d0,d8 \n\t"
"vst1.32 d0[0], [%[d]] \n\t"
//** Trailing single
AP"done:\n\t"
//"sub %[tmp], %[e], #4 \n\t"
//"vmov.i32 d0, $0xffff0000 \n\t"
//"vst1.32 d0[0], [%[tmp]] \n\t"
: // output regs
// Input
: [e] "r" (d + l), [d] "r" (d), [s] "r" (s), [c] "r" (c),
[tmp] "r" (7)
: "q0", "q1", "q2","q3", "q4","q5","q6", "q7","q8","memory" // clobbered
);
#undef AP
#endif
}
static void
_op_blend_pas_dp_neon(DATA32 *s, DATA8 *m, DATA32 c, DATA32 *d, int l) {
#ifdef BUILD_NEON_INTRINSICS
uint16x8_t ad00_16x8;
uint16x8_t ad01_16x8;
uint16x8_t ad10_16x8;
uint16x8_t ad11_16x8;
uint32x4_t ad0_32x4;
uint32x4_t ad1_32x4;
uint32x4_t alpha0_32x4;
uint32x4_t alpha1_32x4;
uint32x4_t cond0_32x4;
uint32x4_t cond1_32x4;
uint32x4_t d0_32x4;
uint32x4_t d1_32x4;
uint32x4_t s0_32x4;
uint32x4_t s1_32x4;
uint32x4_t x0_32x4;
uint32x4_t x1_32x4;
uint8x16_t ad0_8x16;
uint8x16_t ad1_8x16;
uint8x16_t alpha0_8x16;
uint8x16_t alpha1_8x16;
uint8x16_t d0_8x16;
uint8x16_t d1_8x16;
uint8x16_t x0_8x16;
uint8x16_t x1_8x16;
uint8x8_t ad00_8x8;
uint8x8_t ad01_8x8;
uint8x8_t ad10_8x8;
uint8x8_t ad11_8x8;
uint8x8_t alpha00_8x8;
uint8x8_t alpha01_8x8;
uint8x8_t alpha10_8x8;
uint8x8_t alpha11_8x8;
uint8x8_t d00_8x8;
uint8x8_t d01_8x8;
uint8x8_t d10_8x8;
uint8x8_t d11_8x8;
x1_8x16 = vdupq_n_u8(0x1);
x1_32x4 = vreinterpretq_u32_u8(x1_8x16);
x0_8x16 = vdupq_n_u8(0x0);
x0_32x4 = vreinterpretq_u32_u8(x0_8x16);
DATA32 *start = d;
int size = l;
DATA32 *end = start + (size & ~7);
while (start < end)
{
s0_32x4 = vld1q_u32(s);
s1_32x4 = vld1q_u32(s+4);
d0_32x4 = vld1q_u32(start);
d1_32x4 = vld1q_u32(start+4);
d0_8x16 = vreinterpretq_u8_u32(d0_32x4);
d1_8x16 = vreinterpretq_u8_u32(d1_32x4);
d00_8x8 = vget_low_u8(d0_8x16);
d01_8x8 = vget_high_u8(d0_8x16);
d10_8x8 = vget_low_u8(d1_8x16);
d11_8x8 = vget_high_u8(d1_8x16);
alpha0_32x4 = vshrq_n_u32(s0_32x4, 24);
alpha1_32x4 = vshrq_n_u32(s1_32x4, 24);
alpha0_32x4 = vmulq_u32(x1_32x4, alpha0_32x4);
alpha1_32x4 = vmulq_u32(x1_32x4, alpha1_32x4);
alpha0_8x16 = vreinterpretq_u8_u32(alpha0_32x4);
alpha1_8x16 = vreinterpretq_u8_u32(alpha1_32x4);
alpha0_8x16 = vsubq_u8(x0_8x16, alpha0_8x16);
alpha1_8x16 = vsubq_u8(x0_8x16, alpha1_8x16);
alpha0_32x4 = vreinterpretq_u32_u8(alpha0_8x16);
alpha1_32x4 = vreinterpretq_u32_u8(alpha1_8x16);
alpha10_8x8 = vget_low_u8(alpha1_8x16);
alpha11_8x8 = vget_high_u8(alpha1_8x16);
alpha00_8x8 = vget_low_u8(alpha0_8x16);
alpha01_8x8 = vget_high_u8(alpha0_8x16);
ad00_16x8 = vmull_u8(alpha00_8x8, d00_8x8);
ad01_16x8 = vmull_u8(alpha01_8x8, d01_8x8);
ad10_16x8 = vmull_u8(alpha10_8x8, d10_8x8);
ad11_16x8 = vmull_u8(alpha11_8x8, d11_8x8);
ad00_8x8 = vshrn_n_u16(ad00_16x8,8);
ad01_8x8 = vshrn_n_u16(ad01_16x8,8);
ad10_8x8 = vshrn_n_u16(ad10_16x8,8);
ad11_8x8 = vshrn_n_u16(ad11_16x8,8);
ad0_8x16 = vcombine_u8(ad00_8x8, ad01_8x8);
ad1_8x16 = vcombine_u8(ad10_8x8, ad11_8x8);
ad0_32x4 = vreinterpretq_u32_u8(ad0_8x16);
ad1_32x4 = vreinterpretq_u32_u8(ad1_8x16);
cond0_32x4 = vceqq_u32(alpha0_32x4, x0_32x4);
cond1_32x4 = vceqq_u32(alpha1_32x4, x0_32x4);
ad0_32x4 = vbslq_u32(cond0_32x4, d0_32x4, ad0_32x4);
ad1_32x4 = vbslq_u32(cond1_32x4, d1_32x4, ad1_32x4);
d0_32x4 = vaddq_u32(s0_32x4, ad0_32x4);
d1_32x4 = vaddq_u32(s1_32x4, ad1_32x4);
vst1q_u32(start, d0_32x4);
vst1q_u32(start+4, d1_32x4);
s+=8;
start+=8;
}
end += (size & 7);
while (start < end)
{
int alpha;
alpha = 256 - (*s >> 24);
*start = *s++ + MUL_256(alpha, *start);
start++;
}
#else
#define AP "blend_pas_dp_"
DATA32 *e = d + l,*tmp = e + 32,*pl=(void*)912;
asm volatile (
".fpu neon \n\t"
"vmov.i8 q8, #1 \n\t"
AP"loopchoose: \n\t"
// If aliged - go as fast we can
"andS %[tmp], %[d], #31 \n\t"
"beq "AP"quadstart \n\t"
// See if we can at least do our double loop
"andS %[tmp], %[d], $0x7 \n\t"
"beq "AP"dualstart \n\t"
// Ugly single word version
AP "singleloop: \n\t"
"vld1.32 d0[0], [%[s]]! \n\t"
"vld1.32 d4[0], [%[d]] \n\t"
"vmvn.u8 d8, d0 \n\t"
"vshr.u32 d8, d8,$0x18 \n\t"
// Mulitply into all fields
"vmul.u32 d8, d8, d16 \n\t"
"vmovl.u8 q9, d4 \n\t"
// Multiply out
"vmull.u8 q6, d8, d4 \n\t"
"vadd.u16 q6, q6, q9 \n\t"
"vshrn.u16 d8, q6, #8 \n\t"
// Add to s
"vqadd.u8 d0, d0,d8 \n\t"
"vst1.32 d0[0], [%[d]]! \n\t"
AP"dualstart: \n\t"
"sub %[tmp], %[e], %[d] \n\t"
"cmp %[tmp], #32 \n\t"
"blt "AP"loopout \n\t"
// If aligned - go as fast we can
"andS %[tmp], %[d], #31 \n\t"
"beq "AP"quadstart \n\t"
AP"dualloop: \n\t"
"vldm %[s]!, {d0) \n\t"
"vldm %[d], {d4} \n\t"
// Subtract from 255 (ie negate) and extract alpha channel
"vmvn.u8 d8, d0 \n\t"
"vshr.u32 d8, d8,$0x18 \n\t"
// Mulitply into all fields
"vmul.u32 d8, d8, d16 \n\t"
"vmovl.u8 q9, d4 \n\t"
// Multiply out
"vmull.u8 q6, d8, d4 \n\t"
"vadd.u16 q6, q6, q9 \n\t"
"vshrn.u16 d8, q6, #8 \n\t"
// Add to s
"vqadd.u8 d0, d0,d8 \n\t"
"vstm %[d]!, {d0} \n\t"
"andS %[tmp], %[d], $0x1f \n\t"
"bne "AP"dualloop \n\t"
AP"quadstart: \n\t"
"sub %[tmp], %[e], %[d] \n\t"
"cmp %[tmp], #32 \n\t"
"blt "AP"loopout \n\t"
"sub %[tmp], %[e], #31 \n\t"
AP"quadloop:\n\t"
"vldm %[s]!, {d0,d1,d2,d3) \n\t"
"vldm %[d], {d4,d5,d6,d7} \n\t"
// Subtract from 255 (ie negate) and extract alpha channel
"vmvn.u8 q4, q0 \n\t"
"vmvn.u8 q5, q1 \n\t"
"vshr.u32 q4, q4,$0x18 \n\t"
"vshr.u32 q5, q5,$0x18 \n\t"
// Prepare to preload
"add %[pl], %[s], #32 \n\t"
// Mulitply into all fields
"vmul.u32 q4, q4, q8 \n\t"
"vmul.u32 q5, q5, q8 \n\t"
"pld [%[pl]] \n\t"
"vmovl.u8 q9, d4 \n\t"
"vmovl.u8 q10, d5 \n\t"
"vmovl.u8 q11, d6 \n\t"
"vmovl.u8 q12, d7 \n\t"
// Multiply out
"vmull.u8 q6, d8, d4 \n\t"
"vmull.u8 q7, d10, d6 \n\t"
"vmull.u8 q2, d9, d5 \n\t"
"vmull.u8 q3, d11, d7 \n\t"
"vadd.u16 q6, q6, q9 \n\t"
"vadd.u16 q2, q2, q10 \n\t"
"vadd.u16 q7, q7, q11 \n\t"
"vadd.u16 q3, q3, q12 \n\t"
"add %[pl], %[d], #32 \n\t"
"vshrn.u16 d8, q6, #8 \n\t"
"vshrn.u16 d10, q7, #8 \n\t"
"vshrn.u16 d9, q2, #8 \n\t"
"vshrn.u16 d11, q3, #8 \n\t"
"pld [%[pl]] \n\t"
"cmp %[tmp], %[pl] \n\t"
// Add to s
"vqadd.u8 q0, q0,q4 \n\t"
"vqadd.u8 q1, q1,q5 \n\t"
"vstm %[d]!, {d0,d1,d2,d3} \n\t"
"bhi "AP"quadloop \n\t"
AP "loopout: \n\t"
"cmp %[d], %[e] \n\t"
"beq "AP"done \n\t"
"sub %[tmp],%[e], %[d] \n\t"
"cmp %[tmp],$0x04 \n\t"
"beq "AP"singleloop2 \n\t"
"sub %[tmp],%[e],$0x7 \n\t"
AP"dualloop2: \n\t"
"vldm %[s]!, {d0) \n\t"
"vldm %[d], {d4} \n\t"
// Subtract from 255 (ie negate) and extract alpha channel
"vmvn.u8 d8, d0 \n\t"
"vshr.u32 d8, d8,$0x18 \n\t"
// Mulitply into all fields
"vmul.u32 d8, d8, d16 \n\t"
"vmovl.u8 q9, d4 \n\t"
// Multiply out
"vmull.u8 q6, d8, d4 \n\t"
"vadd.u16 q6, q6, q9 \n\t"
"vshrn.u16 d8, q6, #8 \n\t"
// Add to s
"vqadd.u8 d0, d0,d8 \n\t"
"vstm %[d]!, {d0} \n\t"
"cmp %[tmp], %[d] \n\t"
"bhi "AP"dualloop2 \n\t"
// Single ??
"cmp %[e], %[d] \n\t"
"beq "AP"done \n\t"
AP "singleloop2: \n\t"
"vld1.32 d0[0], [%[s]] \n\t"
"vld1.32 d4[0], [%[d]] \n\t"
"vmvn.u8 d8, d0 \n\t"
"vshr.u32 d8, d8,$0x18 \n\t"
// Mulitply into all fields
"vmul.u32 d8, d8, d16 \n\t"
// Multiply out
"vmovl.u8 q9, d4 \n\t"
"vmull.u8 q6, d8, d4 \n\t"
"vadd.u16 q6, q6, q9 \n\t"
"vshrn.u16 d8, q6, #8 \n\t"
// Add to s
"vqadd.u8 d0, d0,d8 \n\t"
"vst1.32 d0[0], [%[d]] \n\t"
AP "done:\n\t"
: /* Out */
: /* In */ [s] "r" (s), [e] "r" (e), [d] "r" (d), [tmp] "r" (tmp),
[pl] "r" (pl)
: /* Clobbered */
"q0","q1","q2","q3","q4","q5","q6","q7","q8","memory"
);
#undef AP
#endif
}
#endif
|
the_stack_data/691244.c | #include<time.h>
#include<stdio.h>
#include<unistd.h>
#define SLEEP_TIME 10
#define SLEEP_CLOCKS 10
void mal()
{
printf("malware\n");
}
void good()
{
printf("goodware\n");
}
int main()
{
clock_t t0 = clock();
sleep(SLEEP_TIME);
clock_t t1 = clock();
if((t1-t0)>SLEEP_CLOCKS)
{
mal();
}else{
good();
}
return 0;
}
|
the_stack_data/8071.c | //file: _insn_test_v1dotpu_X0.c
//op=253
#include <stdio.h>
#include <stdlib.h>
void func_exit(void) {
printf("%s\n", __func__);
exit(0);
}
void func_call(void) {
printf("%s\n", __func__);
exit(0);
}
unsigned long mem[2] = { 0xb9d12319fbf02182, 0x42d3871d0b55e0e5 };
int main(void) {
unsigned long a[4] = { 0, 0 };
asm __volatile__ (
"moveli r20, 7058\n"
"shl16insli r20, r20, -10273\n"
"shl16insli r20, r20, -27400\n"
"shl16insli r20, r20, 410\n"
"moveli r27, -1572\n"
"shl16insli r27, r27, 7162\n"
"shl16insli r27, r27, -2477\n"
"shl16insli r27, r27, -2756\n"
"moveli r46, -23264\n"
"shl16insli r46, r46, 16614\n"
"shl16insli r46, r46, 28637\n"
"shl16insli r46, r46, 17411\n"
"{ v1dotpu r20, r27, r46 ; fnop }\n"
"move %0, r20\n"
"move %1, r27\n"
"move %2, r46\n"
:"=r"(a[0]),"=r"(a[1]),"=r"(a[2]));
printf("%016lx\n", a[0]);
printf("%016lx\n", a[1]);
printf("%016lx\n", a[2]);
return 0;
}
|
the_stack_data/1220835.c | #include<stdio.h>
int main ( void ) {
int n = 0, numbers, menor;
printf("digite um numero: ");
scanf("%d", &n);
for(int i = 0; i < n; i++) {
printf("digite um numero: ");
scanf("%d", &numbers);
if ( numbers < menor ) {
menor = numbers;
}
}
printf("Menor numero digitado: %d", menor);
}
|
the_stack_data/40763874.c | #include <stdio.h>
#include <stdlib.h>
/* test04.c (smp test 04) */
/* 2015-04-21 O. NISHII */
/* fixed address */
#define CPU1_INSTR_HEAD 0x14001000
#define CPU1_SP_INIT 0x14004ffc
#define SHAREMEM_DDR_HEAD 0x14010000
#define ADRS_LOCK_VAR 0x14010020
extern int get_lock_cpu0 ( );
/* created as assembler program with TAS.B inst. */
char instbuf[160];
/* 0 1 2 3 4 5 6 7 8 9 */
int global_mem[20] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
int main( )
{
int release_lock_cpu0( );
int i, j, limit, poll_count = 0;
unsigned int instr0, instr1;
void *ptr_void;
volatile int *ptr_array_a32, *ptr_inst, *ptr_data;
volatile char *ptr_lock;
FILE *fp1;
ptr_void = malloc(1024 * 1024 * 10);
printf("smp test test04\n");
printf("%x 10MB area kept\n", (unsigned int) ptr_void);
printf("global_mem head is %x\n", (unsigned int)(&global_mem[0]));
ptr_array_a32 = (int *)SHAREMEM_DDR_HEAD ;
if(
(ptr_array_a32 < (int*)(ptr_void) ) ||
(ptr_array_a32 > ((int*)(ptr_void) + (1024 * 1024 * 10) - 16))) {
printf("fixed address variable out of range of allocated mem.\n");
return(1);
}
printf("input spin lock cpu0, cpu1 count\n");
scanf("%d", &limit);
/* step 1: set CPU1 instructions to DDR */
ptr_inst = (int *)CPU1_INSTR_HEAD;
fp1 = fopen ("te04c1.xxd", "r");
for(i = 0; i < 102 ; i++) {
fgets(instbuf, 160, fp1);
if(i >= 16) {
for(j = 0; j < 4; j++) {
sscanf(&instbuf[10 * j + 9], "%x", &instr0);
sscanf(&instbuf[10 * j + 14], "%x", &instr1);
*(ptr_inst) = (int)((instr0 << 16) | instr1);
ptr_inst++;
}
}
}
fclose(fp1);
printf("end set CPU1 instructions\n");
/* step 2: clear array[0] - array[5] */
for (i = 0; i < 6; i ++) {
*(ptr_array_a32 + i) = 0;
}
ptr_lock = (char *)ADRS_LOCK_VAR;
*ptr_lock = 0;
*(ptr_array_a32 + 4) = (int)(& global_mem[0]);
*(ptr_array_a32 + 6) = limit;
/* step 3: setup CPU1 boot */
ptr_data = (int *)0x8000;
*ptr_data = CPU1_INSTR_HEAD;
ptr_data = (int *)0x8004;
*ptr_data = CPU1_SP_INIT;
for(i = 0; i < 10; i++) {
}
printf("end setup CPU1 boot\n");
ptr_data = (int *)0xabcd0640;
*ptr_data = 1;
/* step 4: increment array[0] & array[1] with spin-lock */
for(i = 0; i < limit; i++) {
get_lock_cpu0( );
(*(ptr_array_a32 + 0)) ++;
(*(ptr_array_a32 + 1)) ++;
release_lock_cpu0( );
/* make inner loop execution time not constant, that increases logic */
/* state coverage more (as expectation) */
if((i % 3) == 0) {
global_mem[3] ++;
if((i % 5) == 0) {
global_mem[5] ++;
if((i % 7) == 0) {
global_mem[7] ++;
}
}
}
} /* end of (for i = ... */
/* step 5 wait for cpu1 execuion completion */
while(*(ptr_array_a32 + 5) == 0) {
poll_count ++;
}
/* step 6 display result */
printf("results\n");
printf(" here, cpu#0 increments array[0] & array[1] with lock\n");
printf(" cpu#1 increments array[1] & array[2] with lock\n");
for(i = 0; i < 3; i++) {
printf("array[%d] = %d\n", i, *(ptr_array_a32 + i));
}
printf("global_mem[ 3] = %d\n", global_mem[ 3]);
printf("global_mem[ 5] = %d\n", global_mem[ 5]);
printf("global_mem[ 6] = %d\n", global_mem[ 6]);
printf("global_mem[ 7] = %d\n", global_mem[ 7]);
printf("global_mem[10] = %d\n", global_mem[10]);
printf("global_mem[14] = %d\n", global_mem[14]);
printf("cpu0 poll count (for completion) = %d\n", poll_count);
return(0);
}
int release_lock_cpu0 ( )
{
volatile char *ptr_lock_var;
ptr_lock_var = (char *)ADRS_LOCK_VAR;
*ptr_lock_var = 0;
return(0);
}
|
the_stack_data/577821.c |
#define PYTHON_EXCEPTION_HANDLE do { \
if (PyErr_Occurred()) { \
char buf[LOG_BUF_SIZE] = {0}; \
char line[LOG_LINE_SIZE] = {0}; \
PyObject *ptype, *pvalue, *ptraceback; \
PyErr_Fetch(&ptype, &pvalue, &ptraceback); \
snprintf(buf, LOG_BUF_SIZE, "============Exception trace============\n%s:%s\n" \
"Traceback (most recent call last):\n", PyExceptionClass_Name(ptype), \
PyUnicode_AsUTF8(pvalue)); \
for (PyTracebackObject *tb = (PyTracebackObject *)ptraceback; tb != NULL; tb = tb->tb_next) {\
snprintf(line, LOG_LINE_SIZE, "File \"%.500s\", line %d, in %.500s\n", \
PyUnicode_AsUTF8(tb->tb_frame->f_code->co_filename), tb->tb_lineno, \
PyUnicode_AsUTF8(tb->tb_frame->f_code->co_name)); \
line[LOG_LINE_SIZE-1] = 0; \
int n = LOG_BUF_SIZE - strlen(line) - 1; \
if (n <= 0) { \
buf[LOG_BUF_SIZE-1] = 0; \
break; \
} \
strncat(buf, line, n); \
} \
printf("%s", buf); \
SEND_INFO_FUNCTION(S_STRATEGY_ABORT_INFO, strlen(buf), buf); \
Py_XDECREF(ptype); \
Py_XDECREF(pvalue); \
Py_XDECREF(ptraceback); \
}\
} while(0)
|
the_stack_data/1101050.c | /*
* clock_test. A simple program to test the latency of the clock_gettime() call
*
* Compile: gcc clock_test.c -lm -o clock_test
*
*/
#include <getopt.h> /* for getopt() */
#include <limits.h> /* for LONG_MAX */
#include <math.h> /* for pow(), sqrt() */
#include <stdio.h> /* for printf() */
#include <stdlib.h> /* for qsort() */
#include <time.h> /* for time_t */
#define NUM_TESTS 101 /* default samples, make it odd for a clean median */
#define DELAY 10000000 /* default delay between samples in ns, 10 ms is good */
int compare_long( const void *ap, const void *bp)
{
long a = *((long *)ap);
long b = *((long *)bp);
if ( a < b ) return -1;
if ( a > b ) return 1;
return 0;
}
int main(int argc, char **argv)
{
int i;
int opt; /* for getopts() */
int verbose = 0;
int samples = NUM_TESTS;
long delay = DELAY;
long *diffs = NULL;
long min = LONG_MAX, max = 0, sum = 0, mean = 0, median = 0;
double stddev = 0.0;
while ((opt = getopt(argc, argv, "d:hvn:")) != -1) {
switch (opt) {
case 'd':
delay = atol(optarg);
break;
case 'n':
samples = atoi(optarg);
/* make odd, for a good median */
if ( (samples & 1) == 0) {
samples += 1;
}
break;
case 'v':
verbose = 1;
break;
case 'h':
/* fall through */
default: /* '?' */
fprintf(stderr, "Usage: %s [-h] [-d nsec] [-n samples] [-v]\n\n", argv[0]);
fprintf(stderr, "-d nsec : nano seconde paus between samples\n");
fprintf(stderr, "-h : help\n");
fprintf(stderr, "-n samples : Number of samples, default %d\n", NUM_TESTS);
fprintf(stderr, "-v : verbose\n");
exit(EXIT_FAILURE);
}
}
diffs = alloca( sizeof(long) * (samples + 2)); /* add 2 for off by one errors */
/* collect test data */
for ( i = 0 ; i < samples; i++ ) {
struct timespec now, now1, sleep, sleep1;
(void)clock_gettime(CLOCK_REALTIME, &now);
(void)clock_gettime(CLOCK_REALTIME, &now1);
diffs[i] = now1.tv_nsec - now.tv_nsec;
if ( now1.tv_sec != now.tv_sec ) {
/* clock roll over, fix it */
diffs[i] += 1000000000; /* add one second */
}
/* instead of hammering, sleep between tests, let the cache get cold */
sleep.tv_sec = 0;
sleep.tv_nsec = delay; /* sleep delay */
/* sleep1 unused, should not be returning early */
nanosleep(&sleep, &sleep1);
}
/* analyze test data */
/* print diffs, calculate min and max */
for ( i = 0 ; i < samples; i++ ) {
if ( verbose > 0 ) {
printf("diff %ld\n", diffs[i]);
}
sum += diffs[i];
if ( diffs[i] < min ) min = diffs[i];
if ( diffs[i] > max ) max = diffs[i];
}
mean = sum / (samples - 1);
qsort( diffs, samples, sizeof(long), compare_long);
median = diffs[(samples / 2) + 1];
for ( i = 0 ; i < samples; i++ ) {
stddev += pow(diffs[i] - mean, 2);
}
stddev = sqrt(stddev/samples);
printf("samples %d, delay %ld ns\n", samples, delay);
printf("min %ld ns, max %ld ns, mean %ld ns, median %ld ns, StdDev %ld ns\n",
min, max, mean, median, (long)stddev);
}
|
the_stack_data/97376.c | /*
!==========================================================================
function gsw_sound_speed_t_exact(sa,t,p)
!==========================================================================
! Calculates the speed of sound in seawater
!
! sa : Absolute Salinity [g/kg]
! t : in-situ temperature [deg C]
! p : sea pressure [dbar]
!
! gsw_sound_speed_t_exact : sound speed [m/s]
*/
double
gsw_sound_speed_t_exact(double sa, double t, double p)
{
int n0=0, n1=1, n2=2;
double g_tt, g_tp;
g_tt = gsw_gibbs(n0,n2,n0,sa,t,p);
g_tp = gsw_gibbs(n0,n1,n1,sa,t,p);
return (gsw_gibbs(n0,n0,n1,sa,t,p) *
sqrt(g_tt/(g_tp*g_tp - g_tt*gsw_gibbs(n0,n0,n2,sa,t,p))));
}
|
the_stack_data/656044.c | #include <stdio.h>
#include <string.h>
#include <stdlib.h>
typedef struct node
{
int data;
struct node *next;
} node;
node *head = NULL;
node *create(node *);
void display(node *);
node *insert_beg(node *);
node *insert_end(node *);
node *insert_anyloc(node *);
node *delt_beg(node *);
node *delt_end(node *);
node *delt_anyloc(node *);
int main()
{
int choice = 0;
printf("Singly Linked List All Operations\n");
while (choice < 9)
{
printf("\nChoice\n");
printf("1 : Create a Linked List \n");
printf("2 : Insert at beginning into Linked List \n");
printf("3 : Insert at end of the Linked List \n");
printf("4 : Insert at any location of the Linked List\n");
printf("5 : Delete at beginning into Linked List \n");
printf("6 : Delete at end of the Linked List \n");
printf("7 : Delete at any location of the Linked List\n");
printf("8 : Display Linked List \n");
printf("Others : Exit()\n");
printf("Enter your choice:");
scanf("%d", &choice);
switch (choice)
{
case 1:
head = create(head);
printf("Linked list created.....");
break;
case 2:
head = insert_beg(head);
break;
case 3:
head = insert_end(head);
break;
case 4:
head = insert_anyloc(head);
break;
case 5:
head = delt_beg(head);
break;
case 6:
head = delt_end(head);
break;
case 7:
head = delt_anyloc(head);
break;
case 8:
display(head);
break;
default:
break;
}
}
return 0;
}
node *create(node *head)
{
int d;
printf("Enter numbers , -1 to end : ");
scanf("%d", &d);
while (d != -1)
{
node *n = (node *)malloc(sizeof(node));
n->data = d;
n->next = NULL;
if (head == NULL)
{
head = n;
}
else
{
node *t = head;
while (t->next != NULL)
{
t = t->next;
}
t->next = n;
}
printf("Enter numbers , -1 to end : ");
scanf("%d", &d);
}
return head;
}
void display(node *head)
{
node *t = head;
while (t != NULL)
{
printf("%d -> ", t->data);
t = t->next;
}
printf("\n");
}
node *insert_beg(node *head)
{
node *n = (node *)malloc(sizeof(node));
int d;
printf("Input data : ");
scanf("%d", &d);
n->data = d;
n->next = head;
head = n;
return head;
}
node *insert_end(node *head)
{
node *n = (node *)malloc(sizeof(node));
int d;
printf("Input data : ");
scanf("%d", &d);
n->data = d;
n->next = NULL;
node *t = head;
while (t->next != NULL)
{
t = t->next;
}
t->next = n;
return head;
}
node *insert_anyloc(node *head)
{
node *n = (node *)malloc(sizeof(node));
int d;
printf("Input data : ");
scanf("%d", &d);
n->data = d;
n->next = NULL;
node *curr, *t;
curr = head;
while (curr->data == d)
{
t = curr->next;
curr->next = n;
n->next = t;
}
return head;
}
node *delt_beg(node *head)
{
node *t = head;
head = (head)->next;
free(t);
return head;
}
node *delt_end(node *head)
{
node *t, *p;
t = head;
while (t->next != NULL)
{
p = t;
t = t->next;
}
p->next = NULL;
free(t);
return head;
}
node *delt_anyloc(node *head)
{
int d;
printf("Enter data to be deleted: ");
scanf("%d", &d);
node *t, *p;
t = head;
while (t->data != d)
{
p = t;
t = t->next;
}
p->next = t->next;
free(t);
return head;
} |
the_stack_data/62636585.c | #include <errno.h>
#include <sched.h>
#include <spawn.h>
int posix_spawnattr_getschedparam(const posix_spawnattr_t* restrict attr,
struct sched_param* restrict schedparam) {
return ENOSYS;
}
int posix_spawnattr_setschedparam(posix_spawnattr_t* restrict attr,
const struct sched_param* restrict schedparam) {
return ENOSYS;
}
int posix_spawnattr_getschedpolicy(const posix_spawnattr_t* restrict attr, int* restrict policy) {
return ENOSYS;
}
int posix_spawnattr_setschedpolicy(posix_spawnattr_t* attr, int policy) { return ENOSYS; }
|
the_stack_data/167330261.c | #include <stdio.h>
#include <fcntl.h>
#include <unistd.h>
int main (void) {
int fd1, fd2, fd3;
fd1 = open ("test.txt", O_CREAT | O_RDWR, 0600);
printf ("fd1 = %d\n", fd1);
write (fd1, "Cosa sta", 8);
fd2 = dup (fd1); /* Effettua una copia di fd1 sul descriptor fd2*/
printf ("fd2 = %d\n", fd2);
write (fd2, " accadendo", 10);
close (0); /* Chiude lo standard input */
fd3 = dup (fd1); /* Effettua un’altra copia di fd1 e poichè esegue lo scanner dal file descriptor 0 e controlla che siano disponibili, e poichè abbiamo chiuso il canale 0 prenderà questo*/
printf ("fd3 = %d\n", fd3);
write (0, " al contenuto", 13);
dup2 (3, 2); /* Duplica il canale 3 sul canale 2 */
write (2, "?\n", 2);
return 0;
}
|
the_stack_data/875211.c | //Exercise 1-7, print value of EOF (output was -1)
#include <stdio.h>
int main(){
printf("%d\n",EOF);
}
|
the_stack_data/111078375.c | #ifndef __LP64__
#include "rs_core.rsh"
#include "rs_graphics.rsh"
#include "rs_structs.h"
/**
* Mesh
*/
extern uint32_t __attribute__((overloadable))
rsgMeshGetVertexAllocationCount(rs_mesh m) {
Mesh_t *mesh = (Mesh_t *)m.p;
if (mesh == NULL) {
return 0;
}
return mesh->mHal.state.vertexBuffersCount;
}
extern uint32_t __attribute__((overloadable))
rsgMeshGetPrimitiveCount(rs_mesh m) {
Mesh_t *mesh = (Mesh_t *)m.p;
if (mesh == NULL) {
return 0;
}
return mesh->mHal.state.primitivesCount;
}
extern rs_allocation __attribute__((overloadable))
rsgMeshGetVertexAllocation(rs_mesh m, uint32_t index) {
Mesh_t *mesh = (Mesh_t *)m.p;
if (mesh == NULL || index >= mesh->mHal.state.vertexBuffersCount) {
rs_allocation nullAlloc = RS_NULL_OBJ;
return nullAlloc;
}
rs_allocation returnAlloc = {mesh->mHal.state.vertexBuffers[index]};
rs_allocation rs_retval = RS_NULL_OBJ;
rsSetObject(&rs_retval, returnAlloc);
return rs_retval;
}
extern rs_allocation __attribute__((overloadable))
rsgMeshGetIndexAllocation(rs_mesh m, uint32_t index) {
Mesh_t *mesh = (Mesh_t *)m.p;
if (mesh == NULL || index >= mesh->mHal.state.primitivesCount) {
rs_allocation nullAlloc = RS_NULL_OBJ;
return nullAlloc;
}
rs_allocation returnAlloc = {mesh->mHal.state.indexBuffers[index]};
rs_allocation rs_retval = RS_NULL_OBJ;
rsSetObject(&rs_retval, returnAlloc);
return rs_retval;
}
extern rs_primitive __attribute__((overloadable))
rsgMeshGetPrimitive(rs_mesh m, uint32_t index) {
Mesh_t *mesh = (Mesh_t *)m.p;
if (mesh == NULL || index >= mesh->mHal.state.primitivesCount) {
return RS_PRIMITIVE_INVALID;
}
return mesh->mHal.state.primitives[index];
}
#endif
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.