file
stringlengths
18
26
data
stringlengths
3
1.04M
the_stack_data/14201655.c
// SPDX-License-Identifier: Apache-2.0 // Copyright 2016 Eotvos Lorand University, Budapest, Hungary #include <unistd.h> #ifdef T4P4S_DEBUG #include "backend.h" #include <pthread.h> pthread_mutex_t dbg_mutex; void dbg_fprint_bytes(FILE* out_file, void* bytes, int byte_count) { #ifndef T4P4S_DEBUG_PKT_MAXBYTES int reasonable_upper_limit = 80; #else int reasonable_upper_limit = T4P4S_DEBUG_PKT_MAXBYTES; #endif if (byte_count <= 0) return; if (byte_count > reasonable_upper_limit) { fprintf(out_file, "(showing %dB) ", reasonable_upper_limit); } for (int i = 0; i < (byte_count <= reasonable_upper_limit ? byte_count : reasonable_upper_limit); ++i) { fprintf(out_file, i%2 == 0 ? "%02x" : "%02x ", ((uint8_t*)bytes)[i]); } if (byte_count > reasonable_upper_limit) { fprintf(out_file, "..."); } } #endif void sleep_millis(int millis) { usleep(millis * 1000); }
the_stack_data/437819.c
#include <stdio.h> #include <stdlib.h> void quick_sort(int* arr, int arr_len) { int size = arr_len; int k = 0; int c = arr[(int)(arr_len / 2)]; int tmp = 0; do { while (arr[k] < c) k++; while (arr[arr_len] > c) arr_len--; if (k <= arr_len) { tmp = arr[k]; arr[k] = arr[arr_len]; arr[arr_len] = tmp; k++; arr_len--; } } while (k <= arr_len); if (arr_len > 0) quick_sort(arr, arr_len); if (arr_len > 0) quick_sort(arr + k, size - k); } int main() { int n; scanf("%d", &n); int arr[n]; for (int i = 0; i < n; i++) { scanf("%d", &arr[i]); } quick_sort(arr, n); for (int i = 0; i < n; i++) { printf("%d ", (arr[i])); } printf("\n"); }
the_stack_data/987.c
#include <stdio.h> #include <time.h> #include <stdlib.h> void main(void) { srand(time(NULL)); //生成随机数种子,rand函数根据此种子,再来生成随机数 // srand(1); //rand生成的随机数不变 printf("%d", rand()); }
the_stack_data/151704776.c
/* * * This software is Copyright (c) 2012 Dhiru Kholia <dhiru at openwall.com> * with some code (c) 2012 Lukas Odzioba <[email protected]> * and improvements (c) 2014 by magnum and JimF. * * This is hereby released to the general public under the following terms: * Redistribution and use in source and binary forms, with or without * modification, are permitted. */ #ifdef HAVE_OPENCL #if FMT_EXTERNS_H extern struct fmt_main fmt_opencl_zip; #elif FMT_REGISTERS_H john_register_one(&fmt_opencl_zip); #else #include <string.h> #include <stdint.h> #include <openssl/des.h> #ifdef _OPENMP #include <omp.h> #endif #include "arch.h" #include "formats.h" #include "common.h" #include "misc.h" #include "common-opencl.h" #include "pkzip.h" #include "dyna_salt.h" #include "hmac_sha.h" #include "options.h" #define OPENCL_FORMAT 1 #include "pbkdf2_hmac_sha1.h" #define FORMAT_LABEL "zip-opencl" #define FORMAT_NAME "ZIP" #define ALGORITHM_NAME "PBKDF2-SHA1 OpenCL" #define MIN_KEYS_PER_CRYPT 1 #define MAX_KEYS_PER_CRYPT 1 #define SWAP(n) \ (((n) << 24) | (((n) & 0xff00) << 8) | (((n) >> 8) & 0xff00) | ((n) >> 24)) #define BINARY_ALIGN sizeof(uint32_t) #define PLAINTEXT_LENGTH 64 #define SALT_SIZE sizeof(my_salt*) #define SALT_ALIGN sizeof(size_t) typedef struct { uint32_t length; uint8_t v[PLAINTEXT_LENGTH]; } zip_password; typedef struct { uint32_t v[(2 * KEY_LENGTH(3) + PWD_VER_LENGTH + 3) / 4]; } zip_hash; typedef struct { uint32_t iterations; uint32_t outlen; uint32_t skip_bytes; uint8_t length; uint8_t salt[64]; } zip_salt; typedef struct my_salt_t { dyna_salt dsalt; uint32_t comp_len; struct { uint16_t type : 4; uint16_t mode : 4; } v; unsigned char passverify[2]; unsigned char salt[SALT_LENGTH(3)]; //uint64_t data_key; // MSB of md5(data blob). We lookup using this. unsigned char datablob[1]; } my_salt; static my_salt *saved_salt; static unsigned char (*crypt_key)[((WINZIP_BINARY_SIZE + 4)/4)*4]; // ensure 32-bit alignment static cl_int cl_error; static zip_password *inbuffer; static zip_hash *outbuffer; static zip_salt currentsalt; static cl_mem mem_in, mem_out, mem_setting; static struct fmt_main *self; static size_t insize, outsize, settingsize; #define STEP 0 #define SEED 256 // This file contains auto-tuning routine(s). Has to be included after formats definitions. #include "opencl_autotune.h" #include "memdbg.h" static const char * warn[] = { "xfer: ", ", crypt: ", ", xfer: " }; /* ------- Helper functions ------- */ static size_t get_task_max_work_group_size() { return autotune_get_task_max_work_group_size(FALSE, 0, crypt_kernel); } static void create_clobj(size_t gws, struct fmt_main *self) { insize = sizeof(zip_password) * gws; outsize = sizeof(zip_hash) * gws; settingsize = sizeof(zip_salt); inbuffer = mem_calloc(1, insize); outbuffer = mem_alloc(outsize); crypt_key = mem_calloc(gws, sizeof(*crypt_key)); mem_in = clCreateBuffer(context[gpu_id], CL_MEM_READ_ONLY, insize, NULL, &cl_error); HANDLE_CLERROR(cl_error, "Error allocating mem in"); mem_setting = clCreateBuffer(context[gpu_id], CL_MEM_READ_ONLY, settingsize, NULL, &cl_error); HANDLE_CLERROR(cl_error, "Error allocating mem setting"); mem_out = clCreateBuffer(context[gpu_id], CL_MEM_WRITE_ONLY, outsize, NULL, &cl_error); HANDLE_CLERROR(cl_error, "Error allocating mem out"); HANDLE_CLERROR(clSetKernelArg(crypt_kernel, 0, sizeof(mem_in), &mem_in), "Error while setting mem_in kernel argument"); HANDLE_CLERROR(clSetKernelArg(crypt_kernel, 1, sizeof(mem_out), &mem_out), "Error while setting mem_out kernel argument"); HANDLE_CLERROR(clSetKernelArg(crypt_kernel, 2, sizeof(mem_setting), &mem_setting), "Error while setting mem_salt kernel argument"); } static void release_clobj(void) { if (crypt_key) { HANDLE_CLERROR(clReleaseMemObject(mem_in), "Release mem in"); HANDLE_CLERROR(clReleaseMemObject(mem_setting), "Release mem setting"); HANDLE_CLERROR(clReleaseMemObject(mem_out), "Release mem out"); MEM_FREE(crypt_key); MEM_FREE(inbuffer); MEM_FREE(outbuffer); } } static void done(void) { if (autotuned) { release_clobj(); HANDLE_CLERROR(clReleaseKernel(crypt_kernel), "Release kernel"); HANDLE_CLERROR(clReleaseProgram(program[gpu_id]), "Release Program"); autotuned--; } } static void init(struct fmt_main *_self) { self = _self; opencl_prepare_dev(gpu_id); } static void reset(struct db_main *db) { if (!autotuned) { char build_opts[64]; snprintf(build_opts, sizeof(build_opts), "-DKEYLEN=%d -DSALTLEN=%d -DOUTLEN=%d", PLAINTEXT_LENGTH, (int)sizeof(currentsalt.salt), (int)sizeof(outbuffer->v)); opencl_init("$JOHN/kernels/pbkdf2_hmac_sha1_unsplit_kernel.cl", gpu_id, build_opts); crypt_kernel = clCreateKernel(program[gpu_id], "derive_key", &cl_error); HANDLE_CLERROR(cl_error, "Error creating kernel"); // Initialize openCL tuning (library) for this format. opencl_init_auto_setup(SEED, 0, NULL, warn, 1, self, create_clobj, release_clobj, sizeof(zip_password), 0, db); // Auto tune execution from shared/included code. autotune_run(self, 1, 0, 1000); } } static void *get_salt(char *ciphertext) { int i; my_salt salt, *psalt; static unsigned char *ptr; /* extract data from "ciphertext" */ c8 *copy_mem = strdup(ciphertext); c8 *cp, *p; if (!ptr) ptr = mem_alloc_tiny(sizeof(my_salt*),sizeof(my_salt*)); p = copy_mem + WINZIP_TAG_LENGTH+1; /* skip over "$zip2$*" */ memset(&salt, 0, sizeof(salt)); cp = strtokm(p, "*"); // type salt.v.type = atoi((const char*)cp); cp = strtokm(NULL, "*"); // mode salt.v.mode = atoi((const char*)cp); cp = strtokm(NULL, "*"); // file_magic enum (ignored) cp = strtokm(NULL, "*"); // salt for (i = 0; i < SALT_LENGTH(salt.v.mode); i++) salt.salt[i] = (atoi16[ARCH_INDEX(cp[i<<1])]<<4) | atoi16[ARCH_INDEX(cp[(i<<1)+1])]; cp = strtokm(NULL, "*"); // validator salt.passverify[0] = (atoi16[ARCH_INDEX(cp[0])]<<4) | atoi16[ARCH_INDEX(cp[1])]; salt.passverify[1] = (atoi16[ARCH_INDEX(cp[2])]<<4) | atoi16[ARCH_INDEX(cp[3])]; cp = strtokm(NULL, "*"); // data len sscanf((const char *)cp, "%x", &salt.comp_len); // later we will store the data blob in our own static data structure, and place the 64 bit LSB of the // MD5 of the data blob into a field in the salt. For the first POC I store the entire blob and just // make sure all my test data is small enough to fit. cp = strtokm(NULL, "*"); // data blob // Ok, now create the allocated salt record we are going to return back to John, using the dynamic // sized data buffer. psalt = (my_salt*)mem_calloc(1, sizeof(my_salt) + salt.comp_len); psalt->v.type = salt.v.type; psalt->v.mode = salt.v.mode; psalt->comp_len = salt.comp_len; psalt->dsalt.salt_alloc_needs_free = 1; // we used mem_calloc, so JtR CAN free our pointer when done with them. memcpy(psalt->salt, salt.salt, sizeof(salt.salt)); psalt->passverify[0] = salt.passverify[0]; psalt->passverify[1] = salt.passverify[1]; // set the JtR core linkage stuff for this dyna_salt psalt->dsalt.salt_cmp_offset = SALT_CMP_OFF(my_salt, comp_len); psalt->dsalt.salt_cmp_size = SALT_CMP_SIZE(my_salt, comp_len, datablob, psalt->comp_len); if (strcmp((const char*)cp, "ZFILE")) { for (i = 0; i < psalt->comp_len; i++) psalt->datablob[i] = (atoi16[ARCH_INDEX(cp[i<<1])]<<4) | atoi16[ARCH_INDEX(cp[(i<<1)+1])]; } else { c8 *Fn, *Oh, *Ob; long len; uint32_t id; FILE *fp; Fn = strtokm(NULL, "*"); Oh = strtokm(NULL, "*"); Ob = strtokm(NULL, "*"); fp = fopen((const char*)Fn, "rb"); if (!fp) { psalt->v.type = 1; // this will tell the format to 'skip' this salt, it is garbage goto Bail; } sscanf((const char*)Oh, "%lx", &len); if (fseek(fp, len, SEEK_SET)) { fclose(fp); psalt->v.type = 1; goto Bail; } id = fget32LE(fp); if (id != 0x04034b50U) { fclose(fp); psalt->v.type = 1; goto Bail; } sscanf((const char*)Ob, "%lx", &len); if (fseek(fp, len, SEEK_SET)) { fclose(fp); psalt->v.type = 1; goto Bail; } if (fread(psalt->datablob, 1, psalt->comp_len, fp) != psalt->comp_len) { fclose(fp); psalt->v.type = 1; goto Bail; } fclose(fp); } Bail:; MEM_FREE(copy_mem); memcpy(ptr, &psalt, sizeof(my_salt*)); return (void*)ptr; } static void set_salt(void *salt) { saved_salt = *((my_salt**)salt); memcpy((char*)currentsalt.salt, saved_salt->salt, SALT_LENGTH(saved_salt->v.mode)); currentsalt.length = SALT_LENGTH(saved_salt->v.mode); currentsalt.iterations = KEYING_ITERATIONS; currentsalt.outlen = PWD_VER_LENGTH; currentsalt.skip_bytes = 2 * KEY_LENGTH(saved_salt->v.mode); HANDLE_CLERROR(clEnqueueWriteBuffer(queue[gpu_id], mem_setting, CL_FALSE, 0, settingsize, &currentsalt, 0, NULL, NULL), "Copy setting to gpu"); } #undef set_key static void set_key(char *key, int index) { uint8_t length = strlen(key); if (length > PLAINTEXT_LENGTH) length = PLAINTEXT_LENGTH; inbuffer[index].length = length; memcpy(inbuffer[index].v, key, length); } static char *get_key(int index) { static char ret[PLAINTEXT_LENGTH + 1]; uint8_t length = inbuffer[index].length; memcpy(ret, inbuffer[index].v, length); ret[length] = '\0'; return ret; } static int crypt_all(int *pcount, struct db_salt *salt) { const int count = *pcount; int index; size_t *lws = local_work_size ? &local_work_size : NULL; global_work_size = GET_MULTIPLE_OR_BIGGER(count, local_work_size); if (saved_salt->v.type) { // This salt passed valid() but failed get_salt(). // Should never happen. memset(crypt_key, 0, count * WINZIP_BINARY_SIZE); return count; } /// Copy data to gpu BENCH_CLERROR(clEnqueueWriteBuffer(queue[gpu_id], mem_in, CL_FALSE, 0, insize, inbuffer, 0, NULL, multi_profilingEvent[0]), "Copy data to gpu"); /// Run kernel BENCH_CLERROR(clEnqueueNDRangeKernel(queue[gpu_id], crypt_kernel, 1, NULL, &global_work_size, lws, 0, NULL, multi_profilingEvent[1]), "Run kernel"); /// Read the result back BENCH_CLERROR(clEnqueueReadBuffer(queue[gpu_id], mem_out, CL_TRUE, 0, outsize, outbuffer, 0, NULL, multi_profilingEvent[2]), "Copy result back"); if (ocl_autotune_running) return count; #ifdef _OPENMP #pragma omp parallel for #endif for (index = 0; index < count; index++) { if (!memcmp((unsigned char*)outbuffer[index].v, saved_salt->passverify, 2)) { unsigned char pwd_ver[4+64]; pbkdf2_sha1(inbuffer[index].v, inbuffer[index].length, saved_salt->salt, SALT_LENGTH(saved_salt->v.mode), KEYING_ITERATIONS, pwd_ver, KEY_LENGTH(saved_salt->v.mode), KEY_LENGTH(saved_salt->v.mode)); hmac_sha1(pwd_ver, KEY_LENGTH(saved_salt->v.mode), (const unsigned char*)saved_salt->datablob, saved_salt->comp_len, crypt_key[index], WINZIP_BINARY_SIZE); } else memset(crypt_key[index], 0, WINZIP_BINARY_SIZE); } return count; } static int cmp_all(void *binary, int count) { int i; for (i = 0; i < count; i++) if (((uint32_t*)&(crypt_key[i]))[0] == ((uint32_t*)binary)[0]) return 1; return 0; } static int cmp_one(void *binary, int index) { return (((uint32_t*)&(crypt_key[index]))[0] == ((uint32_t*)binary)[0]); } static int cmp_exact(char *source, int index) { void *b = winzip_common_binary(source); return !memcmp(b, crypt_key[index], sizeof(crypt_key[index])); } struct fmt_main fmt_opencl_zip = { { FORMAT_LABEL, FORMAT_NAME, ALGORITHM_NAME, WINZIP_BENCHMARK_COMMENT, WINZIP_BENCHMARK_LENGTH, 0, PLAINTEXT_LENGTH, WINZIP_BINARY_SIZE, BINARY_ALIGN, SALT_SIZE, SALT_ALIGN, MIN_KEYS_PER_CRYPT, MAX_KEYS_PER_CRYPT, FMT_CASE | FMT_8_BIT | FMT_OMP | FMT_DYNA_SALT | FMT_HUGE_INPUT, { NULL }, { WINZIP_FORMAT_TAG }, winzip_common_tests }, { init, done, reset, fmt_default_prepare, winzip_common_valid, winzip_common_split, winzip_common_binary, get_salt, { NULL }, fmt_default_source, { fmt_default_binary_hash }, fmt_default_dyna_salt_hash, NULL, set_salt, set_key, get_key, fmt_default_clear_keys, crypt_all, { fmt_default_get_hash }, cmp_all, cmp_one, cmp_exact } }; #endif /* plugin stanza */ #endif /* HAVE_OPENCL */
the_stack_data/128108.c
//Chris Wells 2015 //956335 //December 02, 2014 //characters.c //Purpose: #include <stdio.h> #include <stdlib.h> #include <time.h> #include <math.h> #include <ctype.h> //Begin main function void main() { char a, b; //Declare character variables //Request character from user printf("Please enter a character: "); scanf("%c", &a); //Digit if( isdigit(a) != 0 ) printf("\nThe character entered is a digit."); else printf("\nThe character entered is not a digit."); //Letter if( isalpha(a) != 0 ) printf("\nThe character entered is a letter."); else printf("\nThe character entered is not a letter."); //Alphanumerical character if( isalnum(a) != 0 ) printf("\nThe character entered is an alphanumeric character."); else printf("\nThe character entered is not an alphanumeric character."); //Lowercase if( islower(a) != 0 ) printf("\nThe character entered is a lowercase letter."); else printf("\nThe character entered is not a lowercase letter."); //Uppercase if( isupper(a) != 0 ) printf("\nThe character entered is a uppercase letter."); else printf("\nThe character entered is not a uppercase letter."); //Space if( isspace(a) != 0 ) printf("\nThe character entered is a space."); else printf("\nThe character entered is not a space."); //Punctuation mark if( ispunct(a) != 0 ) printf("\nThe character entered is a punctuation mark."); else printf("\nThe character entered is not a punctuation mark."); //Switch case if character is a letter if( islower(a) ) b = toupper(a); else b = tolower(a); //Print out character printf("\nThe character entered is: %c", b); }
the_stack_data/440317.c
# include<stdio.h> # include<math.h> # define g 9.8 int main() { int v,h; long double ans; while(1) { scanf("%d%d",&v,&h); if(v==-1 && h==-1) break; ans = sqrt ( (2*v*v/g) * (h+((v*v)/(2*g))));; printf("%.6Lf\n",ans); } return 0; }
the_stack_data/7951044.c
/* segfault -- intentionally triggers a segmentation fault Copyright (C) 2020 JIK, LLC. Written by: cth103 <[email protected]> */ int main() { char *buf = "jik"; *buf = (char) "tim"; return 1; }
the_stack_data/234519157.c
// The Computer Language Benchmarks Game // http://benchmarksgame.alioth.debian.org/ // // Contributed by Jeremy Zerfas // This controls the width of lines that are output by this program. #define MAXIMUM_LINE_WIDTH 60 // This program will generate the random nucleotide sequences in parallel which // are worked on in blocks of lines. The number of lines in those blocks is // controlled by this setting. #define LINES_PER_BLOCK 1024 #define CHARACTERS_PER_BLOCK (MAXIMUM_LINE_WIDTH*LINES_PER_BLOCK) // The numbers of blocks to use is controlled by this setting. This program // limits itself to using at most three threads (see explanation further below) // so similarly only three blocks are used. #define BLOCKS_TO_USE 3 #include <stdint.h> #include <string.h> #include <stdio.h> #include <stdlib.h> #ifdef _OPENMP #include <omp.h> #endif // intptr_t should be the native integer type on most sane systems. typedef intptr_t intnative_t; typedef struct{ char letter; float probability; } nucleotide_info; // Repeatedly print string_To_Repeat until it has printed // number_Of_Characters_To_Create. The output is also wrapped to // MAXIMUM_LINE_WIDTH columns. static void repeat_And_Wrap_String(const char string_To_Repeat[], const intnative_t number_Of_Characters_To_Create){ const intnative_t string_To_Repeat_Length=strlen(string_To_Repeat); // Create an extended_String_To_Repeat which is a copy of string_To_Repeat // but extended with another copy of the first MAXIMUM_LINE_WIDTH characters // of string_To_Repeat appended to the end. Later on this allows us to // generate a line of output just by doing simple memory copies using an // appropriate offset into extended_String_To_Repeat. char extended_String_To_Repeat[string_To_Repeat_Length+MAXIMUM_LINE_WIDTH]; for(intnative_t column=0; column<string_To_Repeat_Length+MAXIMUM_LINE_WIDTH; column++) extended_String_To_Repeat[column]= string_To_Repeat[column%string_To_Repeat_Length]; intnative_t offset=0; char line[MAXIMUM_LINE_WIDTH+1]; line[MAXIMUM_LINE_WIDTH]='\n'; for(intnative_t current_Number_Of_Characters_To_Create= number_Of_Characters_To_Create; current_Number_Of_Characters_To_Create>0;){ // Figure out the length of the line we need to write. If it's less than // MAXIMUM_LINE_WIDTH then we also need to add a line feed in the right // spot too. intnative_t line_Length=MAXIMUM_LINE_WIDTH; if(current_Number_Of_Characters_To_Create<MAXIMUM_LINE_WIDTH){ line_Length=current_Number_Of_Characters_To_Create; line[line_Length]='\n'; } memcpy(line, extended_String_To_Repeat+offset, line_Length); // Update the offset, reducing it by string_To_Repeat_Length if // necessary. offset+=line_Length; if(offset>string_To_Repeat_Length) offset-=string_To_Repeat_Length; // Output the line to stdout and update the // current_Number_Of_Characters_To_Create. fwrite(line, line_Length+1, 1, stdout); current_Number_Of_Characters_To_Create-=line_Length; } } // Generate a floating point pseudorandom number from 0.0 to max using a linear // congruential generator. #define IM 139968 #define IA 3877 #define IC 29573 uint32_t seed=42; inline float get_LCG_Pseudorandom_Number(const float max){ seed=(seed*IA + IC)%IM; return max/IM*seed; } // Output any blocks that are ready to be output. Checks the block_Statuses of // up to number_Of_Blocks starting at next_Block_To_Output. void output_Blocks(char (* const blocks)[CHARACTERS_PER_BLOCK+LINES_PER_BLOCK], intnative_t * const block_Statuses, intnative_t * const next_Block_To_Output, const intnative_t number_Of_Blocks){ // Iterate over all the blocks at the start of the circular queue which are // ready to be output. for(; block_Statuses[*next_Block_To_Output]>0; *next_Block_To_Output=(*next_Block_To_Output+1)%number_Of_Blocks){ // Iterate over each line in the next_Block_To_Output. char * line=blocks[*next_Block_To_Output]; for(intnative_t block_Characters_Left_To_Output= block_Statuses[*next_Block_To_Output]; block_Characters_Left_To_Output>0;){ // Add a line feed to the end of the line. line[MAXIMUM_LINE_WIDTH]='\n'; // Determine what the line_Length should be and if necessary add a // line feed at the end. intnative_t line_Length=MAXIMUM_LINE_WIDTH; if(block_Characters_Left_To_Output<MAXIMUM_LINE_WIDTH){ line_Length=block_Characters_Left_To_Output; line[line_Length]='\n'; } // Write one line of the block. fwrite(line, line_Length+1, 1, stdout); // Decrement block_Characters_Left_To_Output and advance to the next // line. block_Characters_Left_To_Output-=line_Length; line+=line_Length+1; } // Mark the block as unused now. block_Statuses[*next_Block_To_Output]=-1; } } // Print a pseudorandom DNA sequence that is number_Of_Characters_To_Create // characters long and made up of the nucleotides specified in // nucleotides_Information and occurring at the frequencies specified in // nucleotides_Information. The output is also wrapped to MAXIMUM_LINE_WIDTH // columns. static void generate_And_Wrap_Pseudorandom_DNA_Sequence( const nucleotide_info nucleotides_Information[], const intnative_t number_Of_Nucleotides, const intnative_t number_Of_Characters_To_Create){ // Cumulate the probabilities. Note that the probability is being multiplied // by IM because later on we'll also be calling the random number generator // with a value that is multiplied by IM. Since the random number generator // does a division by IM this allows the compiler to cancel out the // multiplication and division by IM with each other without requiring any // changes to the random number generator code whose code was explicitly // defined in the rules. float cumulative_Probabilities[number_Of_Nucleotides], cumulative_Probability=0.0; for(intnative_t i=0; i<number_Of_Nucleotides; i++){ cumulative_Probability+=nucleotides_Information[i].probability; cumulative_Probabilities[i]=cumulative_Probability*IM; } // blocks is a circular queue that stores the blocks while they are being // processed. next_Block_To_Output contains the index of the first block in // the queue which is also the next block that should be output once it is // ready. char blocks[BLOCKS_TO_USE][CHARACTERS_PER_BLOCK+LINES_PER_BLOCK]; intnative_t next_Block_To_Output=0; // block_Statuses contains a status value for each block in the circular // queue. // -A value of -1 means that block is not in use. // -A value of 0 means that block is in use and being processed. // -A positive value means that block is ready to be output and the value // is its length. intnative_t block_Statuses[BLOCKS_TO_USE]; for(intnative_t i=0; i<BLOCKS_TO_USE; block_Statuses[i++]=-1); intnative_t current_Number_Of_Characters_To_Create= number_Of_Characters_To_Create; // Limit the number_Of_Threads_To_Use to three threads since the bottleneck // for this program is the speed at which the pseudorandom generator can be // ran at which is only fast enough to keep about two other threads busy. // Using more threads will start slowing down the program due to the // overhead from additional thread management and resource usage. Using more // threads will also use more CPU time too since normally waiting OpenMP // threads will use spinlocks. #ifdef _OPENMP intnative_t number_Of_Threads_To_Use=omp_get_num_procs(); if(number_Of_Threads_To_Use>3) number_Of_Threads_To_Use=3; omp_set_num_threads(number_Of_Threads_To_Use); #endif #pragma omp parallel for schedule(guided) for(intnative_t current_Block_Number=0; current_Block_Number< (number_Of_Characters_To_Create+CHARACTERS_PER_BLOCK-1)/ CHARACTERS_PER_BLOCK; current_Block_Number++){ intnative_t block_To_Use, block_Length; float pseudorandom_Numbers[CHARACTERS_PER_BLOCK]; // Only one thread can be outputting blocks or generating pseudorandom // numbers at a time in order to ensure they are done in the correct // order. #pragma omp critical { // Find the first unused block (if any) and set that as the // block_To_Use for outputting the nucleotide sequence to. block_To_Use=next_Block_To_Output; for(intnative_t i=0; i<BLOCKS_TO_USE; i++, block_To_Use=(block_To_Use+1)%BLOCKS_TO_USE){ if(block_Statuses[block_To_Use]==-1) break; } // If no unused block was found then block_To_Use will be restored // to next_Block_To_Output and we will have to wait for it to finish // processing, output that block, and then use that block. while(block_Statuses[block_To_Use]==0){ #pragma omp flush(block_Statuses) } // Output any blocks that are ready to be output. output_Blocks(blocks, block_Statuses, &next_Block_To_Output, BLOCKS_TO_USE); // Update the status for block_To_Use to reflect that it is now // being processed. block_Statuses[block_To_Use]++; // Figure out what the block_Length should be and decrement // current_Number_Of_Characters_To_Create by that amount. block_Length=CHARACTERS_PER_BLOCK; if(current_Number_Of_Characters_To_Create<CHARACTERS_PER_BLOCK) block_Length=current_Number_Of_Characters_To_Create; current_Number_Of_Characters_To_Create-=block_Length; // Get the pseudorandom_Numbers to use for this block. for(intnative_t pseudorandom_Number_Index=0; pseudorandom_Number_Index<block_Length; pseudorandom_Numbers[pseudorandom_Number_Index++]= get_LCG_Pseudorandom_Number(IM)); } // Start processing the pseudorandom_Numbers and generate the // corresponding block of nucleotides that will be output later by // filling block_To_Use with characters from nucleotides_Information[] // that are selected by looking up the pseudorandom number. char * line=blocks[block_To_Use]; for(intnative_t column=0, pseudorandom_Number_Index=0; pseudorandom_Number_Index<block_Length; pseudorandom_Number_Index++){ const float r=pseudorandom_Numbers[pseudorandom_Number_Index]; // Count the number of nucleotides with a probability less than what // was selected by the random number generator and then use that // count as an index for the nucleotide to select. It's arguable // whether this qualifies as a linear search but I guess you can say // that you're doing a linear search for all the nucleotides with a // probability less than what was selected by the random number // generator and then just counting how many matches were found. // With a small number of nucleotides this can be faster than doing // a more normal linear search (although in some cases it may // generate different results) and a couple of the other programs // already do this as well so we will too. intnative_t count=0; for(intnative_t i=0; i<number_Of_Nucleotides; i++) if(cumulative_Probabilities[i]<=r) count++; line[column]=nucleotides_Information[count].letter; // If we reach the end of the line, reset the column counter and // advance to the next line. if(++column==MAXIMUM_LINE_WIDTH){ column=0; line+=MAXIMUM_LINE_WIDTH+1; } } // Update the block_Statuses so that this block_To_Use gets output // later. block_Statuses[block_To_Use]=block_Length; } // Output the remaining blocks. output_Blocks(blocks, block_Statuses, &next_Block_To_Output, BLOCKS_TO_USE); } int main(int argc, char ** argv){ const intnative_t n=atoi(argv[1]); fputs(">ONE Homo sapiens alu\n", stdout); const char homo_Sapiens_Alu[]= "GGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTC" "AGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCG" "TGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGG" "AGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAA"; repeat_And_Wrap_String(homo_Sapiens_Alu, 2*n); fputs(">TWO IUB ambiguity codes\n", stdout); nucleotide_info iub_Nucleotides_Information[]={ {'a', 0.27}, {'c', 0.12}, {'g', 0.12}, {'t', 0.27}, {'B', 0.02}, {'D', 0.02}, {'H', 0.02}, {'K', 0.02}, {'M', 0.02}, {'N', 0.02}, {'R', 0.02}, {'S', 0.02}, {'V', 0.02}, {'W', 0.02}, {'Y', 0.02}}; generate_And_Wrap_Pseudorandom_DNA_Sequence(iub_Nucleotides_Information, sizeof(iub_Nucleotides_Information)/sizeof(nucleotide_info), 3*n); fputs(">THREE Homo sapiens frequency\n", stdout); nucleotide_info homo_Sapien_Nucleotides_Information[]={ {'a', 0.3029549426680}, {'c', 0.1979883004921}, {'g', 0.1975473066391}, {'t', 0.3015094502008}}; generate_And_Wrap_Pseudorandom_DNA_Sequence( homo_Sapien_Nucleotides_Information, sizeof(homo_Sapien_Nucleotides_Information)/sizeof(nucleotide_info), 5*n); return 0; }
the_stack_data/190767554.c
#define SQUARE_FUN(NAME, TYPE) \ TYPE \ NAME (TYPE X) \ { \ printf ("Squareing\n"); \ return X*X; \ } SQUARE_FUN(isquare, int) SQUARE_FUN(dsquare, double) SQUARE_FUN(lsquare, long)
the_stack_data/129280.c
#include <stdbool.h> #include <stdlib.h> #define STACK_SIZE 100 int contents[STACK_SIZE]; int top = 0; void make_empty(void) { top = 0; } bool is_empty(void) { return top == 0; } bool is_full(void) { return top == STACK_SIZE; } void stack_overflow() { printf("stack is full!\n"); exit(1); } void stack_underflow() { printf("stack is empty!\n"); exit(2); } void push(int i) { if (is_full()) stack_overflow(); else contents[top++] = i; } int pop(void) { if (is_empty()) stack_underflow(); else return contents[--top]; return 0; }
the_stack_data/21731.c
#include <stdio.h> #include <time.h> #include <stdlib.h> /* Author: Ciara Lynch Algorithm: Quick Sort */ void quick_sort(int randnum[],int first,int last); int main() { /*Assinging the amount of numbers the algorithm will be sorting*/ int dataset = 100; /*Random Numbers array size is equal to dataset*/ int *randnum = (int*) malloc(dataset * sizeof(int)); int i = 0, n = 0; clock_t starttime, endtime; double sorttime; /*Opens numbers.txt*/ FILE* fptr; /*Opens Text file from either halfsorted or random numbers*/ fptr = fopen("numbers.txt", "r"); while (fscanf(fptr, "%d", &randnum[i]) == 1) { n++; i++; } /*Starts timer for algorithm*/ starttime = clock(); quick_sort(randnum, 0, n - 1); /*Stops timer*/ endtime = clock(); sorttime = ((double)(endtime - starttime)) / CLOCKS_PER_SEC; /*prints time and how many numbers sorted by set algorithm*/ printf("Quick Sort of %d Numbers = %f seconds\n", n, sorttime); /*Prints sorted numbers to its relevant text file*/ fptr = fopen("quick_sort.txt", "w"); for (i = 0; i < dataset; i++) fprintf(fptr,"%d ", randnum[i]); /*Closes file*/ fclose(fptr); /*frees memory*/ free(randnum); return 0; } void quick_sort(int randnum[],int first,int last) { int i, j, pivot, swap; if(first<last) { /*positions*/ pivot=first; i=first; j=last; while(i<j) { while(randnum[i]<=randnum[pivot]&&i<last) i++; while(randnum[j]>randnum[pivot]) j--; if(i<j) { swap=randnum[i]; randnum[i]=randnum[j]; randnum[j]=swap; } } swap=randnum[pivot]; randnum[pivot]=randnum[j]; randnum[j]=swap; quick_sort(randnum,first,j-1); quick_sort(randnum,j+1,last); } } /*Refrenced my CA117 python script*/ /* def quicksort(A, n, l): if n >= l: return q = partition(A, n, l) quicksort(A, n, q - 1) quicksort(A, q + 1, l) def partition(A, n, l): q = j = n while j < l: if A[j] <= A[l]: A[q], A[j] = A[j], A[q] q += 1 j += 1 A[q], A[l] = A[l], A[q] return q */
the_stack_data/148577657.c
int main() { int a = 68; a = a%6; return a; }
the_stack_data/143591.c
#include <pthread.h> pthread_t c; int d; void *e(void *) { d = 6; } int main() { if(nondet_bool()) { pthread_create(&c, 0, e, 0); return 0; } d = 3; assert(d == 3); return 0; }
the_stack_data/50138448.c
/** @file pa_devs.c @ingroup examples_src @brief List available devices, including device information. @author Phil Burk http://www.softsynth.com @note Define PA_USE_ASIO=0 to compile this code on Windows without ASIO support. */ /* * $Id: pa_devs.c 1817 2012-02-22 12:44:10Z robiwan $ * * This program uses the PortAudio Portable Audio Library. * For more information see: http://www.portaudio.com * Copyright (c) 1999-2000 Ross Bencina and Phil Burk * * 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. */ /* * The text above constitutes the entire PortAudio license; however, * the PortAudio community also makes the following non-binding requests: * * Any person wishing to distribute modifications to the Software is * requested to send the modifications to the original developer so that * they can be incorporated into the canonical version. It is also * requested that these non-binding requests be included along with the * license above. */ #include <stdio.h> #include <math.h> #include "portaudio.h" #ifdef WIN32 #include <windows.h> #if PA_USE_ASIO #include "pa_asio.h" #endif #endif /*******************************************************************/ static void PrintSupportedStandardSampleRates( const PaStreamParameters *inputParameters, const PaStreamParameters *outputParameters ) { static double standardSampleRates[] = { 8000.0, 9600.0, 11025.0, 12000.0, 16000.0, 22050.0, 24000.0, 32000.0, 44100.0, 48000.0, 88200.0, 96000.0, 192000.0, -1 /* negative terminated list */ }; int i, printCount; PaError err; printCount = 0; for( i=0; standardSampleRates[i] > 0; i++ ) { err = Pa_IsFormatSupported( inputParameters, outputParameters, standardSampleRates[i] ); if( err == paFormatIsSupported ) { if( printCount == 0 ) { printf( "\t%8.2f", standardSampleRates[i] ); printCount = 1; } else if( printCount == 4 ) { printf( ",\n\t%8.2f", standardSampleRates[i] ); printCount = 1; } else { printf( ", %8.2f", standardSampleRates[i] ); ++printCount; } } } if( !printCount ) printf( "None\n" ); else printf( "\n" ); } /*******************************************************************/ int main(void); int main(void) { int i, numDevices, defaultDisplayed; const PaDeviceInfo *deviceInfo; PaStreamParameters inputParameters, outputParameters; PaError err; err = Pa_Initialize(); if( err != paNoError ) { printf( "ERROR: Pa_Initialize returned 0x%x\n", err ); goto error; } printf( "PortAudio version number = %d\nPortAudio version text = '%s'\n", Pa_GetVersion(), Pa_GetVersionText() ); numDevices = Pa_GetDeviceCount(); if( numDevices < 0 ) { printf( "ERROR: Pa_GetDeviceCount returned 0x%x\n", numDevices ); err = numDevices; goto error; } printf( "Number of devices = %d\n", numDevices ); for( i=0; i<numDevices; i++ ) { deviceInfo = Pa_GetDeviceInfo( i ); printf( "--------------------------------------- device #%d\n", i ); /* Mark global and API specific default devices */ defaultDisplayed = 0; if( i == Pa_GetDefaultInputDevice() ) { printf( "[ Default Input" ); defaultDisplayed = 1; } else if( i == Pa_GetHostApiInfo( deviceInfo->hostApi )->defaultInputDevice ) { const PaHostApiInfo *hostInfo = Pa_GetHostApiInfo( deviceInfo->hostApi ); printf( "[ Default %s Input", hostInfo->name ); defaultDisplayed = 1; } if( i == Pa_GetDefaultOutputDevice() ) { printf( (defaultDisplayed ? "," : "[") ); printf( " Default Output" ); defaultDisplayed = 1; } else if( i == Pa_GetHostApiInfo( deviceInfo->hostApi )->defaultOutputDevice ) { const PaHostApiInfo *hostInfo = Pa_GetHostApiInfo( deviceInfo->hostApi ); printf( (defaultDisplayed ? "," : "[") ); printf( " Default %s Output", hostInfo->name ); defaultDisplayed = 1; } if( defaultDisplayed ) printf( " ]\n" ); /* print device info fields */ #ifdef WIN32 { /* Use wide char on windows, so we can show UTF-8 encoded device names */ wchar_t wideName[MAX_PATH]; MultiByteToWideChar(CP_UTF8, 0, deviceInfo->name, -1, wideName, MAX_PATH-1); wprintf( L"Name = %s\n", wideName ); } #else printf( "Name = %s\n", deviceInfo->name ); #endif printf( "Host API = %s\n", Pa_GetHostApiInfo( deviceInfo->hostApi )->name ); printf( "Max inputs = %d", deviceInfo->maxInputChannels ); printf( ", Max outputs = %d\n", deviceInfo->maxOutputChannels ); printf( "Default low input latency = %8.4f\n", deviceInfo->defaultLowInputLatency ); printf( "Default low output latency = %8.4f\n", deviceInfo->defaultLowOutputLatency ); printf( "Default high input latency = %8.4f\n", deviceInfo->defaultHighInputLatency ); printf( "Default high output latency = %8.4f\n", deviceInfo->defaultHighOutputLatency ); #ifdef WIN32 #if PA_USE_ASIO /* ASIO specific latency information */ if( Pa_GetHostApiInfo( deviceInfo->hostApi )->type == paASIO ){ long minLatency, maxLatency, preferredLatency, granularity; err = PaAsio_GetAvailableLatencyValues( i, &minLatency, &maxLatency, &preferredLatency, &granularity ); printf( "ASIO minimum buffer size = %ld\n", minLatency ); printf( "ASIO maximum buffer size = %ld\n", maxLatency ); printf( "ASIO preferred buffer size = %ld\n", preferredLatency ); if( granularity == -1 ) printf( "ASIO buffer granularity = power of 2\n" ); else printf( "ASIO buffer granularity = %ld\n", granularity ); } #endif /* PA_USE_ASIO */ #endif /* WIN32 */ printf( "Default sample rate = %8.2f\n", deviceInfo->defaultSampleRate ); /* poll for standard sample rates */ inputParameters.device = i; inputParameters.channelCount = deviceInfo->maxInputChannels; inputParameters.sampleFormat = paInt16; inputParameters.suggestedLatency = 0; /* ignored by Pa_IsFormatSupported() */ inputParameters.hostApiSpecificStreamInfo = NULL; outputParameters.device = i; outputParameters.channelCount = deviceInfo->maxOutputChannels; outputParameters.sampleFormat = paInt16; outputParameters.suggestedLatency = 0; /* ignored by Pa_IsFormatSupported() */ outputParameters.hostApiSpecificStreamInfo = NULL; if( inputParameters.channelCount > 0 ) { printf("Supported standard sample rates\n for half-duplex 16 bit %d channel input = \n", inputParameters.channelCount ); PrintSupportedStandardSampleRates( &inputParameters, NULL ); } if( outputParameters.channelCount > 0 ) { printf("Supported standard sample rates\n for half-duplex 16 bit %d channel output = \n", outputParameters.channelCount ); PrintSupportedStandardSampleRates( NULL, &outputParameters ); } if( inputParameters.channelCount > 0 && outputParameters.channelCount > 0 ) { printf("Supported standard sample rates\n for full-duplex 16 bit %d channel input, %d channel output = \n", inputParameters.channelCount, outputParameters.channelCount ); PrintSupportedStandardSampleRates( &inputParameters, &outputParameters ); } } Pa_Terminate(); printf("----------------------------------------------\n"); return 0; error: Pa_Terminate(); fprintf( stderr, "Error number: %d\n", err ); fprintf( stderr, "Error message: %s\n", Pa_GetErrorText( err ) ); return err; }
the_stack_data/15763742.c
#include<stdio.h> #include<string.h> char str[200]; char* MergeStrings(char *str1,char *str2) { int len1=strlen(str1),len2=strlen(str2); strcpy(str,str1); char temp; int j=0,i; for(i=len1;i<len1+len2;i++) { str[i]=str2[j]; j++; } for(i=0;i<len1+len2-1;i++) { for(j=0;j<len1+len2-1;j++) if(str[j]>str[j+1]) { temp=str[j]; str[j]=str[j+1]; str[j+1]=temp; } } return str; } int main() { char str1[100],str2[100],*str3; scanf("%s%s",str1,str2); str3=MergeStrings(str1,str2); printf("%s",str3); return 0; }
the_stack_data/142619.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #define SHORT_INPUT "d07_short_input" #define INPUT "d07_input" int fuel(int* crabs, int pos, int prev, int dir); void print_crabs(int* crabs); int crab_size = 0; int main(int ac) { int input = ac > 1; FILE *fp = fopen(input ? INPUT : SHORT_INPUT, "r"); if (fp == NULL) { printf("cant read file\n"); return 1; } // sum, and crab count int n, sum = 0; while (1) { fscanf(fp, "%i", &n); sum += n; crab_size++; if (fgetc(fp) == EOF) break; } rewind(fp); int avg = sum/crab_size; // average value // load crabs int crabs[crab_size], i = 0; while (1) { fscanf(fp, "%i", &crabs[i++]); if (fgetc(fp) == EOF) break; } /* idea calc avg and fuel to get to avg if avg + 1 better, search that way while better if avg - 1 better, same smallest = best */ int fuel_avg = 0, diff; for (int i = 0; i < crab_size; i++) { diff = abs(crabs[i] - avg); fuel_avg += diff * (diff + 1 ) / 2; } int left = fuel(crabs, avg - 1, fuel_avg, -1); int right = fuel(crabs, avg + 1, fuel_avg, +1); int ans = fuel_avg; if (left < ans) ans = left; if (right < ans) ans = right; printf("optimal fuel = %i\n", ans); } int fuel(int* crabs, int pos, int prev, int dir) { int ans = 0; for (int i = 0; i < crab_size; i++) { int dif = abs(crabs[i] - pos); ans += dif * (dif + 1) / 2; } if (prev < ans) return prev; return fuel(crabs, pos + dir, ans, dir); } void print_crabs(int* crabs) { for (int i = 0; i < crab_size; i++) printf("%i ", crabs[i]); printf("\n"); }
the_stack_data/104828729.c
#include <stdio.h> #include <unistd.h> #include <fcntl.h> #include <stdlib.h> int main(void) { long long int frame_table[128]={0}; long long int frame_time; int jank_num,i; FILE *sfdata_file; int output_fp; char sf_buf[256]; char output_buf[16]; long long int a,b; long long int now_frame_time; while(1){ sfdata_file = popen("dumpsys SurfaceFlinger --latency", "r"); fgets(sf_buf, sizeof(sf_buf), sfdata_file); sscanf(sf_buf, "%lld", &frame_time); for ( i=0 ; i<127 ; i++ ) { fgets(sf_buf, sizeof(sf_buf), sfdata_file); sscanf(sf_buf, "%lld%lld%lld",&a,&frame_table[i],&b); } jank_num=0; for ( i=1 ; i<127 ; i++ ) { now_frame_time=frame_table[i]-frame_table[i-1]; if (now_frame_time < 99999999999999 && now_frame_time > frame_time) { jank_num=jank_num+1; } } pclose(sfdata_file); if ((access("/data/Cuprum_Custom/jank_num",0))!=-1) { output_fp = open("/data/Cuprum_Custom/jank_num", O_WRONLY); sprintf(output_buf,"%d\n",jank_num); write(output_fp,output_buf,sizeof(output_buf)); close(output_fp); } else { system("echo 0 > /data/Cuprum_Custom/jank_num"); } if (jank_num > 0) { system("dumpsys SurfaceFlinger --latency-clear"); } usleep(50000); } return 0; }
the_stack_data/1013173.c
/* PR target/65648 */ int a = 0, *b = 0, c = 0; static int d = 0; short e = 1; static long long f = 0; long long *i = &f; unsigned char j = 0; __attribute__((noinline, noclone)) void foo (int x, int *y) { asm volatile ("" : : "r" (x), "r" (y) : "memory"); } __attribute__((noinline, noclone)) void bar (const char *x, long long y) { asm volatile ("" : : "r" (x), "r" (&y) : "memory"); if (y != 0) __builtin_abort (); } int main () { int k = 0; b = &k; j = (!a) - (c <= e); *i = j; foo (a, &k); bar ("", f); return 0; }
the_stack_data/967332.c
#include <stdio.h> int main() { int vet[5] = {1, 2, 3, 4, 5}; int *p = &vet; printf("\n\n"); // Letra 2A) printf("Letra 2A\n"); printf("end vet: %p\n", &vet); printf("end p: %p\n", p); // Letra 2B) printf("\nLetra 2B\n"); for (int i = 0; i < 5; i++) { printf("%d ", p[i]); } // Letra 2C) printf("\n\nLetra 2C\n"); for (int i = 0; i < 5; i++) { printf("%d ", *(p + 1)); } // Letra 2D) printf("\n\nLetra 2D-1\n"); for (int i = 0; i < 5; i++) { printf("%d ", vet[i]); } printf("\n\nLetra 2D-2\n"); for (int i = 0; i < 5; i++) { printf("%d ", *(vet + i)); } printf("\n\n"); return 0; }
the_stack_data/176704512.c
/* From PR target/16176 */ struct __attribute__ ((packed)) s { struct s *next; }; struct s * __attribute__ ((noinline)) maybe_next (struct s *s, int t) { if (t) s = s->next; return s; } int main () { struct s s1, s2; s1.next = &s2; if (maybe_next (&s1, 1) != &s2) abort (); exit (0); }
the_stack_data/26699832.c
/* this file contains the actual definitions of */ /* the IIDs and CLSIDs */ /* link this file in with the server and any clients */ /* File created by MIDL compiler version 3.03.0110 */ /* at Tue Nov 25 10:32:38 1997 */ /* Compiler settings for scarddat.idl: Os (OptLev=s), W1, Zp8, env=Win32, ms_ext, c_ext error checks: none */ //@@MIDL_FILE_HEADING( ) #ifdef __cplusplus extern "C"{ #endif #ifndef __IID_DEFINED__ #define __IID_DEFINED__ typedef struct _IID { unsigned long x; unsigned short s1; unsigned short s2; unsigned char c[8]; } IID; #endif // __IID_DEFINED__ #ifndef CLSID_DEFINED #define CLSID_DEFINED typedef IID CLSID; #endif // CLSID_DEFINED const IID IID_IByteBuffer = {0xE126F8FE,0xA7AF,0x11D0,{0xB8,0x8A,0x00,0xC0,0x4F,0xD4,0x24,0xB9}}; const IID IID_ISCardTypeConv = {0x53B6AA63,0x3F56,0x11D0,{0x91,0x6B,0x00,0xAA,0x00,0xC1,0x80,0x68}}; const IID IID_ISCardCmd = {0xD5778AE3,0x43DE,0x11D0,{0x91,0x71,0x00,0xAA,0x00,0xC1,0x80,0x68}}; const IID LIBID_SCardDatLib = {0xD5778AE1,0x43DE,0x11D0,{0x91,0x71,0x00,0xAA,0x00,0xC1,0x80,0x68}}; const CLSID CLSID_ByteBuffer = {0xE126F8FF,0xA7AF,0x11D0,{0xB8,0x8A,0x00,0xC0,0x4F,0xD4,0x24,0xB9}}; const CLSID CLSID_CSCardTypeConv = {0x53B6AA67,0x3F56,0x11D0,{0x91,0x6B,0x00,0xAA,0x00,0xC1,0x80,0x68}}; const CLSID CLSID_CSCardCmd = {0xD5778AE7,0x43DE,0x11D0,{0x91,0x71,0x00,0xAA,0x00,0xC1,0x80,0x68}}; #ifdef __cplusplus } #endif
the_stack_data/675718.c
/* Donovan Ye * CS 11 C Track * Lab 2 */ #include <stdio.h> #include <string.h> #include <assert.h> #define ABS(a) ((a < 0) ? -a : a) /* Function for absolute value */ #define YEAR_UPPER 39999 #define YEAR_LOWER 1582 #define METONIC_CYCLE 19 #define CENTURY_YEARS 100 #define SUNDAY 1 /* Function prototypes */ int calculate_Easter_date(int year); int is_Sunday(int day, int month, int year); /* * calculate_Easter_date: returns the day of they year Easter falls * argument: year: integer year in [1582, 39999] * return: positive (April) or negative(March) value for the day of the month * Returns 0 if year is not in [1582, 39999] */ int calculate_Easter_date(int year) { int golden_year, century, skipped_leap_years, correction_factor, sunday, epact, march_full_moon, easter; /* Return 0 if out of range */ if (year < YEAR_LOWER || year > YEAR_UPPER) { return 0; } /* The golden year in the metonic cycle */ golden_year = (year % METONIC_CYCLE) + 1; /* The century the year is in */ century = (year / CENTURY_YEARS) + 1; /* The number of leap years skipped */ skipped_leap_years = (3 * century / 4) - 12; /* Correction factor because the moon does not orbit * the Earth in exactly 235x in metonic cycle. */ correction_factor = ((8 * century + 5) / 25) - 5; /* A Sunday based only on the year and skipped leap years */ sunday = (5 * year / 4) - skipped_leap_years - 10; /* Epact: days since moon was new */ epact = \ (11 * golden_year + 20 + correction_factor - skipped_leap_years) % 30; if ((epact == 25 && golden_year > 11) || (epact == 24)) { epact++; } /* The date of the full moon in March */ march_full_moon = 44 - epact; if (march_full_moon < 21) { march_full_moon += 30; } /* Adjust Sunday based on epact, correction factor, golden year, and * the date of the full moon in March to get actual Sunday. */ easter = march_full_moon + 7 - ((sunday + march_full_moon) % 7); /* If the value is greater than 31, it is in April so we return as positive * Otherwise, it is in March and so we return it as negative. */ if (easter > 31) { return easter - 31; } else { return -easter; } } /* * is_Sunday: checks whether given day and month falls on a Sunday using * Zeller's Congruence. * args: day: day of month month: month of the year starting with March (3 = March, 4 = April, ... , 13 = January, 14 = February) year: year of the day/month to check for Sunday * return: boolean of whether day of the month is a Sunday or not */ int is_Sunday(int day, int month, int year) { int day_of_week, year_of_century, zero_based_century; /* We want to start counting at March and change January to 13 and * February to 14. If we adjust to 13 or 14, decrement the year. */ if (month < 3) { month += 12; year--; } /* The years since the start of the century */ year_of_century = year % CENTURY_YEARS; /* The century the year is in zero indexed. */ zero_based_century = year / CENTURY_YEARS; /* Zeller's Congruence * h = (q + floor(13(m + 1) / 5) + K + floor(K / 4) + floor(J / 4) + 5J) mod 7 * h = day of week (0 = Saturday, 1 = Sunday, ... ) * q = day of the month * m = month (3 = March, 4 = April, ... , 13 = January, 14 = February) * K = year of the century * J = zero based century */ day_of_week = (day + ((13 * (month + 1)) / 5) + \ year_of_century + year_of_century / 4 + \ zero_based_century / 4 + 5 * zero_based_century) % 7; /* Check that the day of the week produced by the formula is Sunday. */ return day_of_week == 1; } int main(void) { while(1) { int day, month_n, year, result, easter; char month[6]; /* Scan input from stdin */ result = scanf("%d", &year); /* If end of the file, then end loop */ if (result == EOF) { break; } /* Calculate easter and assign proper month or handle error. */ easter = calculate_Easter_date(year); day = ABS(easter); if (easter < 0) { strcpy(month, "March"); month_n = 3; } else if (easter > 0) { strcpy(month, "April"); month_n = 4; } else { /* Output error to stderr */ fprintf(stderr, "Year %d is not within expected range.", year); } /* Check that the day is actually a Sunday */ assert(is_Sunday(day, month_n, year)); /* Output Year - Month Day to stdout */ printf("%d - %s %d\n", year, month, day); } return 0; }
the_stack_data/156394166.c
#include <stdio.h> void g(int ArgN, char *Val) { #pragma spf transform inline printf("Arg=%d Val=%s\n", ArgN, Val); } int main(int argc, char **argv) { #pragma spf transform inline g(argc - 1, argv[argc - 1]); return 0; } //CHECK: In included file: //CHECK: warning: disable inline expansion of non-user defined function
the_stack_data/152743.c
//***************************************************************************** // //! @file coremark.c //! //! @brief EEMBC COREMARK test. //! //! Purpose: This example runs the official EEMBC COREMARK test. //! //! The Coremark run begins by first outputing a banner (to the UART) //! indicating that it has started. It then does a complete disable //! and power down of the UART for accurate power measuring during the run. //! //! The Coremkark implementation performs 2000 ITERATIONS (specified in //! ambiq_core_config.h), which is plenty of time for correct operation //! of the benchmark. //! //! Once the run has completed, the UART is reenabled and the results printed. //! //! Text is output to the UART at 115,200 BAUD, 8 bit, no parity. //! Please note that text end-of-line is a newline (LF) character only. //! Therefore, the UART terminal must be set to simulate a CR/LF. // //***************************************************************************** //***************************************************************************** // // Copyright (c) 2021, Ambiq Micro, Inc. // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // // 1. Redistributions of source code must retain the above copyright notice, // this list of conditions and the following disclaimer. // // 2. Redistributions in binary form must reproduce the above copyright // notice, this list of conditions and the following disclaimer in the // documentation and/or other materials provided with the distribution. // // 3. Neither the name of the copyright holder nor the names of its // contributors may be used to endorse or promote products derived from this // software without specific prior written permission. // // Third party software included in this distribution is subject to the // additional license terms as defined in the /docs/licenses directory. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // // This is part of revision release_sdk_3_0_0-742e5ac27c of the AmbiqSuite Development Package. // //*****************************************************************************
the_stack_data/988662.c
void concat ( char *str, char ch ) { register int i = strlen( str ); /* Armazena o tamanho atual da String */ *( str + i ) = ch; /* Adicionando o caractere no fim da String */ *( str + ( i + 1 ) ) = '\0'; /* Marcando o novo final da String */ } /* concat */ main ( int argc, char *argv[] ) { char str[ 50 ], c; strcpy( str, "Teste" ); concat( str, '1' ); concat( str, '2' ); concat( str, '3' ); concat( str, '.' ); concat( str, '.' ); concat( str, '.' ); printf( "\n\nSTRING: %s\n\n", str ); } /* main */
the_stack_data/54824422.c
#include <assert.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/time.h> #include <sys/wait.h> #include <unistd.h> //////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// int main(void) { int rc = fork(); if (rc < 0) { // fork failed; exit fprintf(stderr, "fork failed\n"); exit(1); } else if (rc == 0) { // child (new process) // printf("hello, I am child (pid:%d)\n", (int) getpid()); printf("hello\n"); } else { // parent goes down this path (original process) // printf("hello, I am parent of %d (pid:%d)\n", // rc, (int) getpid()); sleep(1); printf("goodbye\n"); } return 0; }
the_stack_data/193893776.c
// This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. // See gfxfont.h for newer custom bitmap font info. #ifndef FONT5X7_H #define FONT5X7_H //#define PROGMEM // Standard ASCII 5x7 font static const unsigned char font[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00, 0x18, 0x3C, 0x18, 0x00, 0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00, 0x18, 0x24, 0x18, 0x00, 0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x30, 0x48, 0x3A, 0x06, 0x0E, 0x26, 0x29, 0x79, 0x29, 0x26, 0x40, 0x7F, 0x05, 0x05, 0x07, 0x40, 0x7F, 0x05, 0x25, 0x3F, 0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x14, 0x22, 0x7F, 0x22, 0x14, 0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00, 0x66, 0x89, 0x95, 0x6A, 0x60, 0x60, 0x60, 0x60, 0x60, 0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x08, 0x04, 0x7E, 0x04, 0x08, 0x10, 0x20, 0x7E, 0x20, 0x10, 0x08, 0x08, 0x2A, 0x1C, 0x08, 0x08, 0x1C, 0x2A, 0x08, 0x08, 0x1E, 0x10, 0x10, 0x10, 0x10, 0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x30, 0x38, 0x3E, 0x38, 0x30, 0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x00, 0x00, 0x00, 0x07, 0x00, 0x07, 0x00, 0x14, 0x7F, 0x14, 0x7F, 0x14, 0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x23, 0x13, 0x08, 0x64, 0x62, 0x36, 0x49, 0x56, 0x20, 0x50, 0x00, 0x08, 0x07, 0x03, 0x00, 0x00, 0x1C, 0x22, 0x41, 0x00, 0x00, 0x41, 0x22, 0x1C, 0x00, 0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x08, 0x08, 0x3E, 0x08, 0x08, 0x00, 0x80, 0x70, 0x30, 0x00, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x00, 0x60, 0x60, 0x00, 0x20, 0x10, 0x08, 0x04, 0x02, 0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00, 0x42, 0x7F, 0x40, 0x00, 0x72, 0x49, 0x49, 0x49, 0x46, 0x21, 0x41, 0x49, 0x4D, 0x33, 0x18, 0x14, 0x12, 0x7F, 0x10, 0x27, 0x45, 0x45, 0x45, 0x39, 0x3C, 0x4A, 0x49, 0x49, 0x31, 0x41, 0x21, 0x11, 0x09, 0x07, 0x36, 0x49, 0x49, 0x49, 0x36, 0x46, 0x49, 0x49, 0x29, 0x1E, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x40, 0x34, 0x00, 0x00, 0x00, 0x08, 0x14, 0x22, 0x41, 0x14, 0x14, 0x14, 0x14, 0x14, 0x00, 0x41, 0x22, 0x14, 0x08, 0x02, 0x01, 0x59, 0x09, 0x06, 0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x7C, 0x12, 0x11, 0x12, 0x7C, 0x7F, 0x49, 0x49, 0x49, 0x36, 0x3E, 0x41, 0x41, 0x41, 0x22, 0x7F, 0x41, 0x41, 0x41, 0x3E, 0x7F, 0x49, 0x49, 0x49, 0x41, 0x7F, 0x09, 0x09, 0x09, 0x01, 0x3E, 0x41, 0x41, 0x51, 0x73, 0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00, 0x41, 0x7F, 0x41, 0x00, 0x20, 0x40, 0x41, 0x3F, 0x01, 0x7F, 0x08, 0x14, 0x22, 0x41, 0x7F, 0x40, 0x40, 0x40, 0x40, 0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x7F, 0x04, 0x08, 0x10, 0x7F, 0x3E, 0x41, 0x41, 0x41, 0x3E, 0x7F, 0x09, 0x09, 0x09, 0x06, 0x3E, 0x41, 0x51, 0x21, 0x5E, 0x7F, 0x09, 0x19, 0x29, 0x46, 0x26, 0x49, 0x49, 0x49, 0x32, 0x03, 0x01, 0x7F, 0x01, 0x03, 0x3F, 0x40, 0x40, 0x40, 0x3F, 0x1F, 0x20, 0x40, 0x20, 0x1F, 0x3F, 0x40, 0x38, 0x40, 0x3F, 0x63, 0x14, 0x08, 0x14, 0x63, 0x03, 0x04, 0x78, 0x04, 0x03, 0x61, 0x59, 0x49, 0x4D, 0x43, 0x00, 0x7F, 0x41, 0x41, 0x41, 0x02, 0x04, 0x08, 0x10, 0x20, 0x00, 0x41, 0x41, 0x41, 0x7F, 0x04, 0x02, 0x01, 0x02, 0x04, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x03, 0x07, 0x08, 0x00, 0x20, 0x54, 0x54, 0x78, 0x40, 0x7F, 0x28, 0x44, 0x44, 0x38, 0x38, 0x44, 0x44, 0x44, 0x28, 0x38, 0x44, 0x44, 0x28, 0x7F, 0x38, 0x54, 0x54, 0x54, 0x18, 0x00, 0x08, 0x7E, 0x09, 0x02, 0x18, 0xA4, 0xA4, 0x9C, 0x78, 0x7F, 0x08, 0x04, 0x04, 0x78, 0x00, 0x44, 0x7D, 0x40, 0x00, 0x20, 0x40, 0x40, 0x3D, 0x00, 0x7F, 0x10, 0x28, 0x44, 0x00, 0x00, 0x41, 0x7F, 0x40, 0x00, 0x7C, 0x04, 0x78, 0x04, 0x78, 0x7C, 0x08, 0x04, 0x04, 0x78, 0x38, 0x44, 0x44, 0x44, 0x38, 0xFC, 0x18, 0x24, 0x24, 0x18, 0x18, 0x24, 0x24, 0x18, 0xFC, 0x7C, 0x08, 0x04, 0x04, 0x08, 0x48, 0x54, 0x54, 0x54, 0x24, 0x04, 0x04, 0x3F, 0x44, 0x24, 0x3C, 0x40, 0x40, 0x20, 0x7C, 0x1C, 0x20, 0x40, 0x20, 0x1C, 0x3C, 0x40, 0x30, 0x40, 0x3C, 0x44, 0x28, 0x10, 0x28, 0x44, 0x4C, 0x90, 0x90, 0x90, 0x7C, 0x44, 0x64, 0x54, 0x4C, 0x44, 0x00, 0x08, 0x36, 0x41, 0x00, 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, 0x41, 0x36, 0x08, 0x00, 0x02, 0x01, 0x02, 0x04, 0x02, 0x3C, 0x26, 0x23, 0x26, 0x3C, 0x1E, 0xA1, 0xA1, 0x61, 0x12, 0x3A, 0x40, 0x40, 0x20, 0x7A, 0x38, 0x54, 0x54, 0x55, 0x59, 0x21, 0x55, 0x55, 0x79, 0x41, 0x22, 0x54, 0x54, 0x78, 0x42, // a-umlaut 0x21, 0x55, 0x54, 0x78, 0x40, 0x20, 0x54, 0x55, 0x79, 0x40, 0x0C, 0x1E, 0x52, 0x72, 0x12, 0x39, 0x55, 0x55, 0x55, 0x59, 0x39, 0x54, 0x54, 0x54, 0x59, 0x39, 0x55, 0x54, 0x54, 0x58, 0x00, 0x00, 0x45, 0x7C, 0x41, 0x00, 0x02, 0x45, 0x7D, 0x42, 0x00, 0x01, 0x45, 0x7C, 0x40, 0x7D, 0x12, 0x11, 0x12, 0x7D, // A-umlaut 0xF0, 0x28, 0x25, 0x28, 0xF0, 0x7C, 0x54, 0x55, 0x45, 0x00, 0x20, 0x54, 0x54, 0x7C, 0x54, 0x7C, 0x0A, 0x09, 0x7F, 0x49, 0x32, 0x49, 0x49, 0x49, 0x32, 0x3A, 0x44, 0x44, 0x44, 0x3A, // o-umlaut 0x32, 0x4A, 0x48, 0x48, 0x30, 0x3A, 0x41, 0x41, 0x21, 0x7A, 0x3A, 0x42, 0x40, 0x20, 0x78, 0x00, 0x9D, 0xA0, 0xA0, 0x7D, 0x3D, 0x42, 0x42, 0x42, 0x3D, // O-umlaut 0x3D, 0x40, 0x40, 0x40, 0x3D, 0x3C, 0x24, 0xFF, 0x24, 0x24, 0x48, 0x7E, 0x49, 0x43, 0x66, 0x2B, 0x2F, 0xFC, 0x2F, 0x2B, 0xFF, 0x09, 0x29, 0xF6, 0x20, 0xC0, 0x88, 0x7E, 0x09, 0x03, 0x20, 0x54, 0x54, 0x79, 0x41, 0x00, 0x00, 0x44, 0x7D, 0x41, 0x30, 0x48, 0x48, 0x4A, 0x32, 0x38, 0x40, 0x40, 0x22, 0x7A, 0x00, 0x7A, 0x0A, 0x0A, 0x72, 0x7D, 0x0D, 0x19, 0x31, 0x7D, 0x26, 0x29, 0x29, 0x2F, 0x28, 0x26, 0x29, 0x29, 0x29, 0x26, 0x30, 0x48, 0x4D, 0x40, 0x20, 0x38, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x38, 0x2F, 0x10, 0xC8, 0xAC, 0xBA, 0x2F, 0x10, 0x28, 0x34, 0xFA, 0x00, 0x00, 0x7B, 0x00, 0x00, 0x08, 0x14, 0x2A, 0x14, 0x22, 0x22, 0x14, 0x2A, 0x14, 0x08, 0x55, 0x00, 0x55, 0x00, 0x55, // #176 (25% block) missing in old code 0xAA, 0x55, 0xAA, 0x55, 0xAA, // 50% block 0xFF, 0x55, 0xFF, 0x55, 0xFF, // 75% block 0x00, 0x00, 0x00, 0xFF, 0x00, 0x10, 0x10, 0x10, 0xFF, 0x00, 0x14, 0x14, 0x14, 0xFF, 0x00, 0x10, 0x10, 0xFF, 0x00, 0xFF, 0x10, 0x10, 0xF0, 0x10, 0xF0, 0x14, 0x14, 0x14, 0xFC, 0x00, 0x14, 0x14, 0xF7, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0xFF, 0x14, 0x14, 0xF4, 0x04, 0xFC, 0x14, 0x14, 0x17, 0x10, 0x1F, 0x10, 0x10, 0x1F, 0x10, 0x1F, 0x14, 0x14, 0x14, 0x1F, 0x00, 0x10, 0x10, 0x10, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x10, 0x10, 0x10, 0x10, 0x1F, 0x10, 0x10, 0x10, 0x10, 0xF0, 0x10, 0x00, 0x00, 0x00, 0xFF, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0xFF, 0x10, 0x00, 0x00, 0x00, 0xFF, 0x14, 0x00, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0x00, 0x1F, 0x10, 0x17, 0x00, 0x00, 0xFC, 0x04, 0xF4, 0x14, 0x14, 0x17, 0x10, 0x17, 0x14, 0x14, 0xF4, 0x04, 0xF4, 0x00, 0x00, 0xFF, 0x00, 0xF7, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0xF7, 0x00, 0xF7, 0x14, 0x14, 0x14, 0x17, 0x14, 0x10, 0x10, 0x1F, 0x10, 0x1F, 0x14, 0x14, 0x14, 0xF4, 0x14, 0x10, 0x10, 0xF0, 0x10, 0xF0, 0x00, 0x00, 0x1F, 0x10, 0x1F, 0x00, 0x00, 0x00, 0x1F, 0x14, 0x00, 0x00, 0x00, 0xFC, 0x14, 0x00, 0x00, 0xF0, 0x10, 0xF0, 0x10, 0x10, 0xFF, 0x10, 0xFF, 0x14, 0x14, 0x14, 0xFF, 0x14, 0x10, 0x10, 0x10, 0x1F, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x38, 0x44, 0x44, 0x38, 0x44, 0xFC, 0x4A, 0x4A, 0x4A, 0x34, // sharp-s or beta 0x7E, 0x02, 0x02, 0x06, 0x06, 0x02, 0x7E, 0x02, 0x7E, 0x02, 0x63, 0x55, 0x49, 0x41, 0x63, 0x38, 0x44, 0x44, 0x3C, 0x04, 0x40, 0x7E, 0x20, 0x1E, 0x20, 0x06, 0x02, 0x7E, 0x02, 0x02, 0x99, 0xA5, 0xE7, 0xA5, 0x99, 0x1C, 0x2A, 0x49, 0x2A, 0x1C, 0x4C, 0x72, 0x01, 0x72, 0x4C, 0x30, 0x4A, 0x4D, 0x4D, 0x30, 0x30, 0x48, 0x78, 0x48, 0x30, 0xBC, 0x62, 0x5A, 0x46, 0x3D, 0x3E, 0x49, 0x49, 0x49, 0x00, 0x7E, 0x01, 0x01, 0x01, 0x7E, 0x2A, 0x2A, 0x2A, 0x2A, 0x2A, 0x44, 0x44, 0x5F, 0x44, 0x44, 0x40, 0x51, 0x4A, 0x44, 0x40, 0x40, 0x44, 0x4A, 0x51, 0x40, 0x00, 0x00, 0xFF, 0x01, 0x03, 0xE0, 0x80, 0xFF, 0x00, 0x00, 0x08, 0x08, 0x6B, 0x6B, 0x08, 0x36, 0x12, 0x36, 0x24, 0x36, 0x06, 0x0F, 0x09, 0x0F, 0x06, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x10, 0x10, 0x00, 0x30, 0x40, 0xFF, 0x01, 0x01, 0x00, 0x1F, 0x01, 0x01, 0x1E, 0x00, 0x19, 0x1D, 0x17, 0x12, 0x00, 0x3C, 0x3C, 0x3C, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00 // #255 NBSP }; #endif // FONT5X7_H
the_stack_data/254860.c
/**/ #include <stdio.h> #include <string.h> int main() { char word[40]; int i=0; int count=0; printf("Please enter a string > "); fgets(word, 19, stdin); while(i<strlen(word)) { if(word[i]=='a' ||word[i]=='o' ||word[i]=='e' ||word[i]=='i' ||word[i]=='u' ||word[i]=='y') count++; i++; } printf("The number of syllables is %d.\n", count); return 0; }
the_stack_data/57951152.c
int qux(void) {return 0;}
the_stack_data/29824528.c
void foo (int x, int c, char h); int f(void) { return 0; } int x = 3; int deklaracijaBezDefinicije(int x); // deklaracija bez definicije int main(void) { int a = 5; const char c = 'i'; int niz[3]; void foo (int x, int c, char h); int x = 5; int y = x + 1; a = a+3; if (a > 2) { int a; int b; a = b; x = 4; } return f(); } int fact(int bzvz); void foo (int x, int c, char h) { int i = fact(x); int a = a+1; void foo3 (void); int niz1[5] = { 1, 2, 3 }; //int niz[10] = a; // ne smije s desne strane biti niz, moze jedino biti konstantni niz for (i = 0; i < 5; i++) break; while(1) { break; i = i + 2; } // return 5; // vraca int a treba vracati void return; // break; // break izvan petlje } char proba3(void) { x = 4; // globalni x; if (0) { x = 6; // globalni x; return 'a'; } else { return (char)97; // return 97; // int se ne moze implicitno u char castati } } char proba(void) { return (char)97; } int proba2(void) { // i = 5; // nije deklarirano return 'a'; } int fact(int n) { foo(1,2,'h'); if (n > 0) return n * fact(n-1); else return 1; } void foo3(void) { int i = 8; main2(); // funkcija main2 je definirana tek kasnije, a nema deklaracije prije koja bi popravila ovu gresku return; } void f2(int x, int a[]){ x = x + 1; a[0] = a[0] + 1; } /* int f2(int y) // vec postoji definicija funkcije s istim imenom { return 5; } */ // char f2; // vec postoji funkcija s istim imenom int main2(void) { int x = 2147483647; int y; //int a = 2147483648; // nije u rasponu int-a (int)'a'; (const char)x; (const int)'a'; (char)((const int)300 + (int)'a'); (int)(char)(const int)(const char)(x + y); return 0; }
the_stack_data/83236.c
/************************************************************************** * Copyright © 2016 VMware, Inc., Palo Alto, CA., USA * All Rights Reserved. * * 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, sub license, 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 (including the * next paragraph) 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 NON-INFRINGEMENT. IN NO EVENT SHALL * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS 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. * **************************************************************************/ #ifdef HAVE_CONFIG_H #include "config.h" #endif #ifdef HAVE_LIBUDEV #include "vmwgfx_driver.h" #include <xf86Crtc.h> #include "vmwgfx_rr_inlines.h" #include "../src/common_compat.h" #ifndef X_DEBUG #define X_DEBUG X_NOTICE #endif /** * struct vmwgfx_layout_box - Struct representing a GUI layout rect * * @x: X value of the origin. * @y: Y value of the origin. * @width: Width of the rect. * @height: Height of the rect. */ struct vmwgfx_layout_box { int x, y, width, height; }; /** * struct vmwgfx_layout - Struct representing a complete GUI layout * * @connected: Number of connected outputs. * @root_width: Width of full desktop. * @root_height: Height of full desktop. * @boxes: Array of GUI layout rects. */ struct vmwgfx_layout { int connected; int root_width; int root_height; struct vmwgfx_layout_box boxes[]; }; /** * vmwgfx_layout_debug - Log debug info of a layout struct. * * @pScrn: ScrnInfoPtr: Pointer to the ScrnInfo struct for the screen the * layout should be logged for. * @l1: Pointer to a valid struct vmwgfx_layout. */ static void vmwgfx_layout_debug(ScrnInfoPtr pScrn, const struct vmwgfx_layout *l1) { int i; xf86DrvMsg(pScrn->scrnIndex, X_DEBUG, "New layout.\n"); for (i = 0; i < l1->connected; ++i) xf86DrvMsg(pScrn->scrnIndex, X_DEBUG, "%d: %d %d %d %d\n", i, l1->boxes[i].x, l1->boxes[i].y, l1->boxes[i].width, l1->boxes[i].height); xf86DrvMsg(pScrn->scrnIndex, X_DEBUG, "\n"); } /** * vmwgfx_layouts_equal - Determine whether two layouts are equal. * * @l1: Pointer to the first struct vmwgfx_layout. * @l2: Pointer to the second struct vmwgfx_layout. * * Returns: TRUE if the layouts are equal. FALSE otherwise. */ static Bool vmwgfx_layouts_equal(const struct vmwgfx_layout *l1, const struct vmwgfx_layout *l2) { if (l1->connected != l2->connected) return FALSE; if (!l1->connected) return TRUE; return !memcmp(l1->boxes, l2->boxes, l1->connected*sizeof(struct vmwgfx_layout_box)); } /** * vmwgfx_layout_from_kms - Construct a struct vmwgfx_layout from KMS info. * * @pScrn: Pointer to a ScrnInfo struct. * * Returns: A pointer to a newly allocated struct vmwgfx_layout if * successful. NULL otherwise. */ struct vmwgfx_layout * vmwgfx_layout_from_kms(ScrnInfoPtr pScrn) { xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn); int i, connected; struct vmwgfx_layout *layout; size_t size; int min_x = INT_MAX, max_x = INT_MIN, min_y = INT_MAX, max_y = INT_MIN; for (i = 0; i < config->num_output; ++i) { xf86OutputPtr output = config->output[i]; if (!vmwgfx_output_has_origin(output)) return NULL; if (output->status != XF86OutputStatusConnected) break; } connected = i; size = offsetof(struct vmwgfx_layout, boxes) + connected * sizeof(struct vmwgfx_layout_box); layout = calloc(1, size); if (!layout) return NULL; layout->connected = connected; for (i = 0; i < connected; ++i) { struct vmwgfx_layout_box *box = &layout->boxes[i]; xf86OutputPtr output = config->output[i]; DisplayModePtr mode = output->probed_modes; if (mode == NULL) { free(layout); return NULL; } vmwgfx_output_origin(output, &box->x, &box->y); box->width = output->probed_modes->HDisplay; box->height = output->probed_modes->VDisplay; min_x = min(min_x, box->x); min_y = min(min_y, box->y); max_x = max(max_x, box->x + box->width); max_y = max(max_y, box->y + box->height); } layout->root_width = max_x; layout->root_height = max_y; return layout; } /** * vmwgfx_layout_configuration - Set up the screen modesetting configuration * from a struct vmwgfx_layout. * * @pScrn: Pointer to a ScrnInfo struct. * @layout: Layout to use for the new configuration. * * Sets up a new modesetting configuration. Note that the configuration needs * to be committed using xf86SetDesiredModes(). */ void vmwgfx_layout_configuration(ScrnInfoPtr pScrn, struct vmwgfx_layout *layout) { xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn); struct vmwgfx_layout_box *box; xf86OutputPtr output; xf86CrtcPtr crtc; int i, j; for (j = 0; j < config->num_crtc; ++j) { crtc = config->crtc[j]; crtc->enabled = FALSE; } for (i = 0, box = layout->boxes; i < config->num_output; ++i, ++box) { output = config->output[i]; output->crtc = NULL; if (i >= layout->connected) continue; for (j = 0; j < config->num_crtc; ++j) { crtc = config->crtc[j]; if (!crtc->enabled && (output->possible_crtcs & (1 << j))) { crtc->enabled = TRUE; output->crtc = crtc; break; } } if (!output->crtc) continue; crtc = output->crtc; xf86SaveModeContents(&crtc->desiredMode, output->probed_modes); crtc->desiredRotation = RR_Rotate_0; crtc->desiredX = box->x; crtc->desiredY = box->y; crtc->desiredTransformPresent = FALSE; } } /** * vmwgfx_layout_handler - Obtain and set a new layout. * * @pScrn: Pointer to a ScrnInfo struct. * * Obtains a new layout from DRM. If the layout differs from the current one, * Try to set the new layout. If that fails, (typically due to root pixmap * resizing issues) try hard to revert to the old layout. Finally * update RandR in a way that tries to block racing display managers * from setting up the layout in a different way. */ void vmwgfx_layout_handler(ScrnInfoPtr pScrn) { ScreenPtr pScreen = xf86ScrnToScreen(pScrn); modesettingPtr ms = modesettingPTR(pScrn); struct vmwgfx_layout *layout; if (!pScreen) return; /* * Construct a layout from the new information and determine whether we * need to take action */ layout = vmwgfx_layout_from_kms(pScrn); if (layout && (!ms->layout || !vmwgfx_layouts_equal(ms->layout, layout))) { vmwgfx_layout_debug(pScrn, layout); vmwgfx_outputs_off(pScrn); xf86DisableUnusedFunctions(pScrn); if (!vmwgfx_rr_screen_set_size(pScreen, layout->root_width, layout->root_height)) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Resizing screen failed.\n"); vmwgfx_outputs_on(pScrn); free(layout); } else { vmwgfx_layout_configuration(pScrn, layout); if (ms->layout) free(ms->layout); ms->layout = layout; } xf86SetDesiredModes(pScrn); vmwgfx_notify_rr(pScreen); } else if (layout) { free(layout); } } #endif /* HAVE_LIBUDEV */
the_stack_data/103883.c
struct S { int member; }; struct S foo() { struct S s = { 1 }; return s; } int printf(char *, ...); int main() { struct S s = foo(); printf("%d", s.member); }
the_stack_data/115764616.c
/* * Copyright (c) 2011, 2012, 2013, 2014 Jonas 'Sortie' Termansen. * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * string/strchrnul.c * Searches a string for a specific character. */ #include <stdbool.h> #include <string.h> char* strchrnul(const char* str, int uc) { const unsigned char* ustr = (const unsigned char*) str; for ( size_t i = 0; true; i++) if ( ustr[i] == (unsigned char) uc || !ustr[i] ) return (char*) str + i; }
the_stack_data/90762953.c
#include <stdio.h> #include <stdlib.h> extern int fee_count, fie_count, foe_count, fum_count; extern int yylex( void ); int main( int argc, char ** argv ) { yylex( ); printf( "%d %d %d %d\n", fee_count, fie_count, foe_count, fum_count ); exit( 0 ); }
the_stack_data/63770.c
main() { static char static_char_array[1]; static char *static_char_pointer; static char static_char; char char_array[1]; char *char_pointer; char character; char *cp, c; c = cp - static_char_array; /* error */ c = cp - static_char_pointer; c = cp - &static_char; /* error */ c = cp - char_array; c = cp - char_pointer; c = cp - &character; }
the_stack_data/44036.c
#define STB_VORBIS_NO_STDIO // Ogg Vorbis I audio decoder -- version 0.99996 // // Written in April 2007 by Sean Barrett, sponsored by RAD Game Tools. // // Placed in the public domain April 2007 by the author: no copyright is // claimed, and you may use it for any purpose you like. // // No warranty for any purpose is expressed or implied by the author (nor // by RAD Game Tools). Report bugs and send enhancements to the author. // // Get the latest version and other information at: // http://nothings.org/stb_vorbis/ // Todo: // // - seeking (note you can seek yourself using the pushdata API) // // Limitations: // // - floor 0 not supported (used in old ogg vorbis files) // - lossless sample-truncation at beginning ignored // - cannot concatenate multiple vorbis streams // - sample positions are 32-bit, limiting seekable 192Khz // files to around 6 hours (Ogg supports 64-bit) // // All of these limitations may be removed in future versions. ////////////////////////////////////////////////////////////////////////////// // // HEADER BEGINS HERE // #ifndef STB_VORBIS_INCLUDE_STB_VORBIS_H #define STB_VORBIS_INCLUDE_STB_VORBIS_H #if defined(STB_VORBIS_NO_CRT) && !defined(STB_VORBIS_NO_STDIO) #define STB_VORBIS_NO_STDIO 1 #endif #ifndef STB_VORBIS_NO_STDIO #include <stdio.h> #endif #ifdef __cplusplus extern "C" { #endif /////////// THREAD SAFETY // Individual stb_vorbis* handles are not thread-safe; you cannot decode from // them from multiple threads at the same time. However, you can have multiple // stb_vorbis* handles and decode from them independently in multiple thrads. /////////// MEMORY ALLOCATION // normally stb_vorbis uses malloc() to allocate memory at startup, // and alloca() to allocate temporary memory during a frame on the // stack. (Memory consumption will depend on the amount of setup // data in the file and how you set the compile flags for speed // vs. size. In my test files the maximal-size usage is ~150KB.) // // You can modify the wrapper functions in the source (setup_malloc, // setup_temp_malloc, temp_malloc) to change this behavior, or you // can use a simpler allocation model: you pass in a buffer from // which stb_vorbis will allocate _all_ its memory (including the // temp memory). "open" may fail with a VORBIS_outofmem if you // do not pass in enough data; there is no way to determine how // much you do need except to succeed (at which point you can // query get_info to find the exact amount required. yes I know // this is lame). // // If you pass in a non-NULL buffer of the type below, allocation // will occur from it as described above. Otherwise just pass NULL // to use malloc()/alloca() typedef struct { char *alloc_buffer; int alloc_buffer_length_in_bytes; } stb_vorbis_alloc; /////////// FUNCTIONS USEABLE WITH ALL INPUT MODES typedef struct stb_vorbis stb_vorbis; typedef struct { unsigned int sample_rate; int channels; unsigned int setup_memory_required; unsigned int setup_temp_memory_required; unsigned int temp_memory_required; int max_frame_size; } stb_vorbis_info; // get general information about the file extern stb_vorbis_info stb_vorbis_get_info(stb_vorbis *f); // get the last error detected (clears it, too) extern int stb_vorbis_get_error(stb_vorbis *f); // close an ogg vorbis file and free all memory in use extern void stb_vorbis_close(stb_vorbis *f); // this function returns the offset (in samples) from the beginning of the // file that will be returned by the next decode, if it is known, or -1 // otherwise. after a flush_pushdata() call, this may take a while before // it becomes valid again. // NOT WORKING YET after a seek with PULLDATA API extern int stb_vorbis_get_sample_offset(stb_vorbis *f); // returns the current seek point within the file, or offset from the beginning // of the memory buffer. In pushdata mode it returns 0. extern unsigned int stb_vorbis_get_file_offset(stb_vorbis *f); /////////// PUSHDATA API #ifndef STB_VORBIS_NO_PUSHDATA_API // this API allows you to get blocks of data from any source and hand // them to stb_vorbis. you have to buffer them; stb_vorbis will tell // you how much it used, and you have to give it the rest next time; // and stb_vorbis may not have enough data to work with and you will // need to give it the same data again PLUS more. Note that the Vorbis // specification does not bound the size of an individual frame. extern stb_vorbis *stb_vorbis_open_pushdata( unsigned char *datablock, int datablock_length_in_bytes, int *datablock_memory_consumed_in_bytes, int *error, stb_vorbis_alloc *alloc_buffer); // create a vorbis decoder by passing in the initial data block containing // the ogg&vorbis headers (you don't need to do parse them, just provide // the first N bytes of the file--you're told if it's not enough, see below) // on success, returns an stb_vorbis *, does not set error, returns the amount of // data parsed/consumed on this call in *datablock_memory_consumed_in_bytes; // on failure, returns NULL on error and sets *error, does not change *datablock_memory_consumed // if returns NULL and *error is VORBIS_need_more_data, then the input block was // incomplete and you need to pass in a larger block from the start of the file extern int stb_vorbis_decode_frame_pushdata( stb_vorbis *f, unsigned char *datablock, int datablock_length_in_bytes, int *channels, // place to write number of float * buffers float ***output, // place to write float ** array of float * buffers int *samples // place to write number of output samples ); // decode a frame of audio sample data if possible from the passed-in data block // // return value: number of bytes we used from datablock // possible cases: // 0 bytes used, 0 samples output (need more data) // N bytes used, 0 samples output (resynching the stream, keep going) // N bytes used, M samples output (one frame of data) // note that after opening a file, you will ALWAYS get one N-bytes,0-sample // frame, because Vorbis always "discards" the first frame. // // Note that on resynch, stb_vorbis will rarely consume all of the buffer, // instead only datablock_length_in_bytes-3 or less. This is because it wants // to avoid missing parts of a page header if they cross a datablock boundary, // without writing state-machiney code to record a partial detection. // // The number of channels returned are stored in *channels (which can be // NULL--it is always the same as the number of channels reported by // get_info). *output will contain an array of float* buffers, one per // channel. In other words, (*output)[0][0] contains the first sample from // the first channel, and (*output)[1][0] contains the first sample from // the second channel. extern void stb_vorbis_flush_pushdata(stb_vorbis *f); // inform stb_vorbis that your next datablock will not be contiguous with // previous ones (e.g. you've seeked in the data); future attempts to decode // frames will cause stb_vorbis to resynchronize (as noted above), and // once it sees a valid Ogg page (typically 4-8KB, as large as 64KB), it // will begin decoding the _next_ frame. // // if you want to seek using pushdata, you need to seek in your file, then // call stb_vorbis_flush_pushdata(), then start calling decoding, then once // decoding is returning you data, call stb_vorbis_get_sample_offset, and // if you don't like the result, seek your file again and repeat. #endif ////////// PULLING INPUT API #ifndef STB_VORBIS_NO_PULLDATA_API // This API assumes stb_vorbis is allowed to pull data from a source-- // either a block of memory containing the _entire_ vorbis stream, or a // FILE * that you or it create, or possibly some other reading mechanism // if you go modify the source to replace the FILE * case with some kind // of callback to your code. (But if you don't support seeking, you may // just want to go ahead and use pushdata.) #if !defined(STB_VORBIS_NO_STDIO) && !defined(STB_VORBIS_NO_INTEGER_CONVERSION) extern int stb_vorbis_decode_filename(char *filename, int *channels, short **output); #endif extern int stb_vorbis_decode_memory(unsigned char *mem, int len, int *channels, short **output); // decode an entire file and output the data interleaved into a malloc()ed // buffer stored in *output. The return value is the number of samples // decoded, or -1 if the file could not be opened or was not an ogg vorbis file. // When you're done with it, just free() the pointer returned in *output. extern stb_vorbis * stb_vorbis_open_memory(unsigned char *data, int len, int *error, stb_vorbis_alloc *alloc_buffer); // create an ogg vorbis decoder from an ogg vorbis stream in memory (note // this must be the entire stream!). on failure, returns NULL and sets *error #ifndef STB_VORBIS_NO_STDIO extern stb_vorbis * stb_vorbis_open_filename(char *filename, int *error, stb_vorbis_alloc *alloc_buffer); // create an ogg vorbis decoder from a filename via fopen(). on failure, // returns NULL and sets *error (possibly to VORBIS_file_open_failure). extern stb_vorbis * stb_vorbis_open_file(FILE *f, int close_handle_on_close, int *error, stb_vorbis_alloc *alloc_buffer); // create an ogg vorbis decoder from an open FILE *, looking for a stream at // the _current_ seek point (ftell). on failure, returns NULL and sets *error. // note that stb_vorbis must "own" this stream; if you seek it in between // calls to stb_vorbis, it will become confused. Morever, if you attempt to // perform stb_vorbis_seek_*() operations on this file, it will assume it // owns the _entire_ rest of the file after the start point. Use the next // function, stb_vorbis_open_file_section(), to limit it. extern stb_vorbis * stb_vorbis_open_file_section(FILE *f, int close_handle_on_close, int *error, stb_vorbis_alloc *alloc_buffer, unsigned int len); // create an ogg vorbis decoder from an open FILE *, looking for a stream at // the _current_ seek point (ftell); the stream will be of length 'len' bytes. // on failure, returns NULL and sets *error. note that stb_vorbis must "own" // this stream; if you seek it in between calls to stb_vorbis, it will become // confused. #endif extern int stb_vorbis_seek_frame(stb_vorbis *f, unsigned int sample_number); extern int stb_vorbis_seek(stb_vorbis *f, unsigned int sample_number); // NOT WORKING YET // these functions seek in the Vorbis file to (approximately) 'sample_number'. // after calling seek_frame(), the next call to get_frame_*() will include // the specified sample. after calling stb_vorbis_seek(), the next call to // stb_vorbis_get_samples_* will start with the specified sample. If you // do not need to seek to EXACTLY the target sample when using get_samples_*, // you can also use seek_frame(). extern void stb_vorbis_seek_start(stb_vorbis *f); // this function is equivalent to stb_vorbis_seek(f,0), but it // actually works extern unsigned int stb_vorbis_stream_length_in_samples(stb_vorbis *f); extern float stb_vorbis_stream_length_in_seconds(stb_vorbis *f); // these functions return the total length of the vorbis stream extern int stb_vorbis_get_frame_float(stb_vorbis *f, int *channels, float ***output); // decode the next frame and return the number of samples. the number of // channels returned are stored in *channels (which can be NULL--it is always // the same as the number of channels reported by get_info). *output will // contain an array of float* buffers, one per channel. These outputs will // be overwritten on the next call to stb_vorbis_get_frame_*. // // You generally should not intermix calls to stb_vorbis_get_frame_*() // and stb_vorbis_get_samples_*(), since the latter calls the former. #ifndef STB_VORBIS_NO_INTEGER_CONVERSION extern int stb_vorbis_get_frame_short_interleaved(stb_vorbis *f, int num_c, short *buffer, int num_shorts); extern int stb_vorbis_get_frame_short (stb_vorbis *f, int num_c, short **buffer, int num_samples); #endif // decode the next frame and return the number of samples per channel. the // data is coerced to the number of channels you request according to the // channel coercion rules (see below). You must pass in the size of your // buffer(s) so that stb_vorbis will not overwrite the end of the buffer. // The maximum buffer size needed can be gotten from get_info(); however, // the Vorbis I specification implies an absolute maximum of 4096 samples // per channel. Note that for interleaved data, you pass in the number of // shorts (the size of your array), but the return value is the number of // samples per channel, not the total number of samples. // Channel coercion rules: // Let M be the number of channels requested, and N the number of channels present, // and Cn be the nth channel; let stereo L be the sum of all L and center channels, // and stereo R be the sum of all R and center channels (channel assignment from the // vorbis spec). // M N output // 1 k sum(Ck) for all k // 2 * stereo L, stereo R // k l k > l, the first l channels, then 0s // k l k <= l, the first k channels // Note that this is not _good_ surround etc. mixing at all! It's just so // you get something useful. extern int stb_vorbis_get_samples_float_interleaved(stb_vorbis *f, int channels, float *buffer, int num_floats); extern int stb_vorbis_get_samples_float(stb_vorbis *f, int channels, float **buffer, int num_samples); // gets num_samples samples, not necessarily on a frame boundary--this requires // buffering so you have to supply the buffers. DOES NOT APPLY THE COERCION RULES. // Returns the number of samples stored per channel; it may be less than requested // at the end of the file. If there are no more samples in the file, returns 0. #ifndef STB_VORBIS_NO_INTEGER_CONVERSION extern int stb_vorbis_get_samples_short_interleaved(stb_vorbis *f, int channels, short *buffer, int num_shorts); extern int stb_vorbis_get_samples_short(stb_vorbis *f, int channels, short **buffer, int num_samples); #endif // gets num_samples samples, not necessarily on a frame boundary--this requires // buffering so you have to supply the buffers. Applies the coercion rules above // to produce 'channels' channels. Returns the number of samples stored per channel; // it may be less than requested at the end of the file. If there are no more // samples in the file, returns 0. #endif //////// ERROR CODES enum STBVorbisError { VORBIS__no_error, VORBIS_need_more_data=1, // not a real error VORBIS_invalid_api_mixing, // can't mix API modes VORBIS_outofmem, // not enough memory VORBIS_feature_not_supported, // uses floor 0 VORBIS_too_many_channels, // STB_VORBIS_MAX_CHANNELS is too small VORBIS_file_open_failure, // fopen() failed VORBIS_seek_without_length, // can't seek in unknown-length file VORBIS_unexpected_eof=10, // file is truncated? VORBIS_seek_invalid, // seek past EOF // decoding errors (corrupt/invalid stream) -- you probably // don't care about the exact details of these // vorbis errors: VORBIS_invalid_setup=20, VORBIS_invalid_stream, // ogg errors: VORBIS_missing_capture_pattern=30, VORBIS_invalid_stream_structure_version, VORBIS_continued_packet_flag_invalid, VORBIS_incorrect_stream_serial_number, VORBIS_invalid_first_page, VORBIS_bad_packet_type, VORBIS_cant_find_last_page, VORBIS_seek_failed, }; #ifdef __cplusplus } #endif #endif // STB_VORBIS_INCLUDE_STB_VORBIS_H // // HEADER ENDS HERE // ////////////////////////////////////////////////////////////////////////////// #ifndef STB_VORBIS_HEADER_ONLY // global configuration settings (e.g. set these in the project/makefile), // or just set them in this file at the top (although ideally the first few // should be visible when the header file is compiled too, although it's not // crucial) // STB_VORBIS_NO_PUSHDATA_API // does not compile the code for the various stb_vorbis_*_pushdata() // functions // #define STB_VORBIS_NO_PUSHDATA_API // STB_VORBIS_NO_PULLDATA_API // does not compile the code for the non-pushdata APIs // #define STB_VORBIS_NO_PULLDATA_API // STB_VORBIS_NO_STDIO // does not compile the code for the APIs that use FILE *s internally // or externally (implied by STB_VORBIS_NO_PULLDATA_API) // #define STB_VORBIS_NO_STDIO // STB_VORBIS_NO_INTEGER_CONVERSION // does not compile the code for converting audio sample data from // float to integer (implied by STB_VORBIS_NO_PULLDATA_API) // #define STB_VORBIS_NO_INTEGER_CONVERSION // STB_VORBIS_NO_FAST_SCALED_FLOAT // does not use a fast float-to-int trick to accelerate float-to-int on // most platforms which requires endianness be defined correctly. //#define STB_VORBIS_NO_FAST_SCALED_FLOAT // STB_VORBIS_MAX_CHANNELS [number] // globally define this to the maximum number of channels you need. // The spec does not put a restriction on channels except that // the count is stored in a byte, so 255 is the hard limit. // Reducing this saves about 16 bytes per value, so using 16 saves // (255-16)*16 or around 4KB. Plus anything other memory usage // I forgot to account for. Can probably go as low as 8 (7.1 audio), // 6 (5.1 audio), or 2 (stereo only). #ifndef STB_VORBIS_MAX_CHANNELS #define STB_VORBIS_MAX_CHANNELS 2 // enough for anyone? #endif // STB_VORBIS_PUSHDATA_CRC_COUNT [number] // after a flush_pushdata(), stb_vorbis begins scanning for the // next valid page, without backtracking. when it finds something // that looks like a page, it streams through it and verifies its // CRC32. Should that validation fail, it keeps scanning. But it's // possible that _while_ streaming through to check the CRC32 of // one candidate page, it sees another candidate page. This #define // determines how many "overlapping" candidate pages it can search // at once. Note that "real" pages are typically ~4KB to ~8KB, whereas // garbage pages could be as big as 64KB, but probably average ~16KB. // So don't hose ourselves by scanning an apparent 64KB page and // missing a ton of real ones in the interim; so minimum of 2 #ifndef STB_VORBIS_PUSHDATA_CRC_COUNT #define STB_VORBIS_PUSHDATA_CRC_COUNT 4 #endif // STB_VORBIS_FAST_HUFFMAN_LENGTH [number] // sets the log size of the huffman-acceleration table. Maximum // supported value is 24. with larger numbers, more decodings are O(1), // but the table size is larger so worse cache missing, so you'll have // to probe (and try multiple ogg vorbis files) to find the sweet spot. #ifndef STB_VORBIS_FAST_HUFFMAN_LENGTH #define STB_VORBIS_FAST_HUFFMAN_LENGTH 10 #endif // STB_VORBIS_FAST_BINARY_LENGTH [number] // sets the log size of the binary-search acceleration table. this // is used in similar fashion to the fast-huffman size to set initial // parameters for the binary search // STB_VORBIS_FAST_HUFFMAN_INT // The fast huffman tables are much more efficient if they can be // stored as 16-bit results instead of 32-bit results. This restricts // the codebooks to having only 65535 possible outcomes, though. // (At least, accelerated by the huffman table.) #ifndef STB_VORBIS_FAST_HUFFMAN_INT #define STB_VORBIS_FAST_HUFFMAN_SHORT #endif // STB_VORBIS_NO_HUFFMAN_BINARY_SEARCH // If the 'fast huffman' search doesn't succeed, then stb_vorbis falls // back on binary searching for the correct one. This requires storing // extra tables with the huffman codes in sorted order. Defining this // symbol trades off space for speed by forcing a linear search in the // non-fast case, except for "sparse" codebooks. // #define STB_VORBIS_NO_HUFFMAN_BINARY_SEARCH // STB_VORBIS_DIVIDES_IN_RESIDUE // stb_vorbis precomputes the result of the scalar residue decoding // that would otherwise require a divide per chunk. you can trade off // space for time by defining this symbol. // #define STB_VORBIS_DIVIDES_IN_RESIDUE // STB_VORBIS_DIVIDES_IN_CODEBOOK // vorbis VQ codebooks can be encoded two ways: with every case explicitly // stored, or with all elements being chosen from a small range of values, // and all values possible in all elements. By default, stb_vorbis expands // this latter kind out to look like the former kind for ease of decoding, // because otherwise an integer divide-per-vector-element is required to // unpack the index. If you define STB_VORBIS_DIVIDES_IN_CODEBOOK, you can // trade off storage for speed. //#define STB_VORBIS_DIVIDES_IN_CODEBOOK // STB_VORBIS_CODEBOOK_SHORTS // The vorbis file format encodes VQ codebook floats as ax+b where a and // b are floating point per-codebook constants, and x is a 16-bit int. // Normally, stb_vorbis decodes them to floats rather than leaving them // as 16-bit ints and computing ax+b while decoding. This is a speed/space // tradeoff; you can save space by defining this flag. #ifndef STB_VORBIS_CODEBOOK_SHORTS #define STB_VORBIS_CODEBOOK_FLOATS #endif // STB_VORBIS_DIVIDE_TABLE // this replaces small integer divides in the floor decode loop with // table lookups. made less than 1% difference, so disabled by default. // STB_VORBIS_NO_INLINE_DECODE // disables the inlining of the scalar codebook fast-huffman decode. // might save a little codespace; useful for debugging // #define STB_VORBIS_NO_INLINE_DECODE // STB_VORBIS_NO_DEFER_FLOOR // Normally we only decode the floor without synthesizing the actual // full curve. We can instead synthesize the curve immediately. This // requires more memory and is very likely slower, so I don't think // you'd ever want to do it except for debugging. // #define STB_VORBIS_NO_DEFER_FLOOR ////////////////////////////////////////////////////////////////////////////// #ifdef STB_VORBIS_NO_PULLDATA_API #define STB_VORBIS_NO_INTEGER_CONVERSION #define STB_VORBIS_NO_STDIO #endif #if defined(STB_VORBIS_NO_CRT) && !defined(STB_VORBIS_NO_STDIO) #define STB_VORBIS_NO_STDIO 1 #endif #ifndef STB_VORBIS_NO_INTEGER_CONVERSION #ifndef STB_VORBIS_NO_FAST_SCALED_FLOAT // only need endianness for fast-float-to-int, which we don't // use for pushdata #ifndef STB_VORBIS_BIG_ENDIAN #define STB_VORBIS_ENDIAN 0 #else #define STB_VORBIS_ENDIAN 1 #endif #endif #endif #ifndef STB_VORBIS_NO_STDIO #include <stdio.h> #endif #ifndef STB_VORBIS_NO_CRT #include <stdlib.h> #include <string.h> #include <assert.h> #include <math.h> #if !(defined(__APPLE__) || defined(MACOSX) || defined(macintosh) || defined(Macintosh)) #include <malloc.h> #endif #else #define NULL 0 #endif #ifndef _MSC_VER #if __GNUC__ #define __forceinline inline #else #define __forceinline #endif #endif #if STB_VORBIS_MAX_CHANNELS > 256 #error "Value of STB_VORBIS_MAX_CHANNELS outside of allowed range" #endif #if STB_VORBIS_FAST_HUFFMAN_LENGTH > 24 #error "Value of STB_VORBIS_FAST_HUFFMAN_LENGTH outside of allowed range" #endif #define MAX_BLOCKSIZE_LOG 13 // from specification #define MAX_BLOCKSIZE (1 << MAX_BLOCKSIZE_LOG) typedef unsigned char uint8; typedef signed char int8; typedef unsigned short uint16; typedef signed short int16; typedef unsigned int uint32; typedef signed int int32; #ifndef TRUE #define TRUE 1 #define FALSE 0 #endif #ifdef STB_VORBIS_CODEBOOK_FLOATS typedef float codetype; #else typedef uint16 codetype; #endif // @NOTE // // Some arrays below are tagged "//varies", which means it's actually // a variable-sized piece of data, but rather than malloc I assume it's // small enough it's better to just allocate it all together with the // main thing // // Most of the variables are specified with the smallest size I could pack // them into. It might give better performance to make them all full-sized // integers. It should be safe to freely rearrange the structures or change // the sizes larger--nothing relies on silently truncating etc., nor the // order of variables. #define FAST_HUFFMAN_TABLE_SIZE (1 << STB_VORBIS_FAST_HUFFMAN_LENGTH) #define FAST_HUFFMAN_TABLE_MASK (FAST_HUFFMAN_TABLE_SIZE - 1) typedef struct { int dimensions, entries; uint8 *codeword_lengths; float minimum_value; float delta_value; uint8 value_bits; uint8 lookup_type; uint8 sequence_p; uint8 sparse; uint32 lookup_values; codetype *multiplicands; uint32 *codewords; #ifdef STB_VORBIS_FAST_HUFFMAN_SHORT int16 fast_huffman[FAST_HUFFMAN_TABLE_SIZE]; #else int32 fast_huffman[FAST_HUFFMAN_TABLE_SIZE]; #endif uint32 *sorted_codewords; int *sorted_values; int sorted_entries; } Codebook; typedef struct { uint8 order; uint16 rate; uint16 bark_map_size; uint8 amplitude_bits; uint8 amplitude_offset; uint8 number_of_books; uint8 book_list[16]; // varies } Floor0; typedef struct { uint8 partitions; uint8 partition_class_list[32]; // varies uint8 class_dimensions[16]; // varies uint8 class_subclasses[16]; // varies uint8 class_masterbooks[16]; // varies int16 subclass_books[16][8]; // varies uint16 Xlist[31*8+2]; // varies uint8 sorted_order[31*8+2]; uint8 neighbors[31*8+2][2]; uint8 floor1_multiplier; uint8 rangebits; int values; } Floor1; typedef union { Floor0 floor0; Floor1 floor1; } Floor; typedef struct { uint32 begin, end; uint32 part_size; uint8 classifications; uint8 classbook; uint8 **classdata; int16 (*residue_books)[8]; } Residue; typedef struct { uint8 magnitude; uint8 angle; uint8 mux; } MappingChannel; typedef struct { uint16 coupling_steps; MappingChannel *chan; uint8 submaps; uint8 submap_floor[15]; // varies uint8 submap_residue[15]; // varies } Mapping; typedef struct { uint8 blockflag; uint8 mapping; uint16 windowtype; uint16 transformtype; } Mode; typedef struct { uint32 goal_crc; // expected crc if match int bytes_left; // bytes left in packet uint32 crc_so_far; // running crc int bytes_done; // bytes processed in _current_ chunk uint32 sample_loc; // granule pos encoded in page } CRCscan; typedef struct { uint32 page_start, page_end; uint32 after_previous_page_start; uint32 first_decoded_sample; uint32 last_decoded_sample; } ProbedPage; struct stb_vorbis { // user-accessible info unsigned int sample_rate; int channels; unsigned int setup_memory_required; unsigned int temp_memory_required; unsigned int setup_temp_memory_required; // input config #ifndef STB_VORBIS_NO_STDIO FILE *f; uint32 f_start; int close_on_free; #endif uint8 *stream; uint8 *stream_start; uint8 *stream_end; uint32 stream_len; uint8 push_mode; uint32 first_audio_page_offset; ProbedPage p_first, p_last; // memory management stb_vorbis_alloc alloc; int setup_offset; int temp_offset; // run-time results int eof; enum STBVorbisError error; // user-useful data // header info int blocksize[2]; int blocksize_0, blocksize_1; int codebook_count; Codebook *codebooks; int floor_count; uint16 floor_types[64]; // varies Floor *floor_config; int residue_count; uint16 residue_types[64]; // varies Residue *residue_config; int mapping_count; Mapping *mapping; int mode_count; Mode mode_config[64]; // varies uint32 total_samples; // decode buffer float *channel_buffers[STB_VORBIS_MAX_CHANNELS]; float *outputs [STB_VORBIS_MAX_CHANNELS]; float *previous_window[STB_VORBIS_MAX_CHANNELS]; int previous_length; #ifndef STB_VORBIS_NO_DEFER_FLOOR int16 *finalY[STB_VORBIS_MAX_CHANNELS]; #else float *floor_buffers[STB_VORBIS_MAX_CHANNELS]; #endif uint32 current_loc; // sample location of next frame to decode int current_loc_valid; // per-blocksize precomputed data // twiddle factors float *A[2],*B[2],*C[2]; float *window[2]; uint16 *bit_reverse[2]; // current page/packet/segment streaming info uint32 serial; // stream serial number for verification int last_page; int segment_count; uint8 segments[255]; uint8 page_flag; uint8 bytes_in_seg; uint8 first_decode; int next_seg; int last_seg; // flag that we're on the last segment int last_seg_which; // what was the segment number of the last seg? uint32 acc; int valid_bits; int packet_bytes; int end_seg_with_known_loc; uint32 known_loc_for_packet; int discard_samples_deferred; uint32 samples_output; // push mode scanning int page_crc_tests; // only in push_mode: number of tests active; -1 if not searching #ifndef STB_VORBIS_NO_PUSHDATA_API CRCscan scan[STB_VORBIS_PUSHDATA_CRC_COUNT]; #endif // sample-access int channel_buffer_start; int channel_buffer_end; }; extern int my_prof(int slot); //#define stb_prof my_prof #ifndef stb_prof #define stb_prof(x) 0 #endif #if defined(STB_VORBIS_NO_PUSHDATA_API) #define IS_PUSH_MODE(f) FALSE #elif defined(STB_VORBIS_NO_PULLDATA_API) #define IS_PUSH_MODE(f) TRUE #else #define IS_PUSH_MODE(f) ((f)->push_mode) #endif typedef struct stb_vorbis vorb; static int error(vorb *f, enum STBVorbisError e) { f->error = e; if (!f->eof && e != VORBIS_need_more_data) { f->error=e; // breakpoint for debugging } return 0; } // these functions are used for allocating temporary memory // while decoding. if you can afford the stack space, use // alloca(); otherwise, provide a temp buffer and it will // allocate out of those. #define array_size_required(count,size) (count*(sizeof(void *)+(size))) #define temp_alloc(f,size) (f->alloc.alloc_buffer ? setup_temp_malloc(f,size) : alloca(size)) #ifdef dealloca #define temp_free(f,p) (f->alloc.alloc_buffer ? 0 : dealloca(size)) #else #define temp_free(f,p) 0 #endif #define temp_alloc_save(f) ((f)->temp_offset) #define temp_alloc_restore(f,p) ((f)->temp_offset = (p)) #define temp_block_array(f,count,size) make_block_array(temp_alloc(f,array_size_required(count,size)), count, size) // given a sufficiently large block of memory, make an array of pointers to subblocks of it static void *make_block_array(void *mem, int count, int size) { int i; void ** p = (void **) mem; char *q = (char *) (p + count); for (i=0; i < count; ++i) { p[i] = q; q += size; } return p; } static void *setup_malloc(vorb *f, int sz) { sz = (sz+3) & ~3; f->setup_memory_required += sz; if (f->alloc.alloc_buffer) { void *p = (char *) f->alloc.alloc_buffer + f->setup_offset; if (f->setup_offset + sz > f->temp_offset) return NULL; f->setup_offset += sz; return p; } return sz ? malloc(sz) : NULL; } static void setup_free(vorb *f, void *p) { if (f->alloc.alloc_buffer) return; // do nothing; setup mem is not a stack free(p); } static void *setup_temp_malloc(vorb *f, int sz) { sz = (sz+3) & ~3; if (f->alloc.alloc_buffer) { if (f->temp_offset - sz < f->setup_offset) return NULL; f->temp_offset -= sz; return (char *) f->alloc.alloc_buffer + f->temp_offset; } return malloc(sz); } static void setup_temp_free(vorb *f, void *p, size_t sz) { if (f->alloc.alloc_buffer) { f->temp_offset += (sz+3)&~3; return; } free(p); } #define CRC32_POLY 0x04c11db7 // from spec static uint32 crc_table[256]; static void crc32_init(void) { int i,j; uint32 s; for(i=0; i < 256; i++) { for (s=i<<24, j=0; j < 8; ++j) s = (s << 1) ^ (s >= (1<<31) ? CRC32_POLY : 0); crc_table[i] = s; } } static __forceinline uint32 crc32_update(uint32 crc, uint8 byte) { return (crc << 8) ^ crc_table[byte ^ (crc >> 24)]; } // used in setup, and for huffman that doesn't go fast path static unsigned int bit_reverse(unsigned int n) { n = ((n & 0xAAAAAAAA) >> 1) | ((n & 0x55555555) << 1); n = ((n & 0xCCCCCCCC) >> 2) | ((n & 0x33333333) << 2); n = ((n & 0xF0F0F0F0) >> 4) | ((n & 0x0F0F0F0F) << 4); n = ((n & 0xFF00FF00) >> 8) | ((n & 0x00FF00FF) << 8); return (n >> 16) | (n << 16); } static float square(float x) { return x*x; } // this is a weird definition of log2() for which log2(1) = 1, log2(2) = 2, log2(4) = 3 // as required by the specification. fast(?) implementation from stb.h // @OPTIMIZE: called multiple times per-packet with "constants"; move to setup static int ilog(int32 n) { static signed char log2_4[16] = { 0,1,2,2,3,3,3,3,4,4,4,4,4,4,4,4 }; // 2 compares if n < 16, 3 compares otherwise (4 if signed or n > 1<<29) if (n < (1U << 14)) if (n < (1U << 4)) return 0 + log2_4[n ]; else if (n < (1U << 9)) return 5 + log2_4[n >> 5]; else return 10 + log2_4[n >> 10]; else if (n < (1U << 24)) if (n < (1U << 19)) return 15 + log2_4[n >> 15]; else return 20 + log2_4[n >> 20]; else if (n < (1U << 29)) return 25 + log2_4[n >> 25]; else if (n < (1U << 31)) return 30 + log2_4[n >> 30]; else return 0; // signed n returns 0 } #ifndef M_PI #define M_PI 3.14159265358979323846264f // from CRC #endif // code length assigned to a value with no huffman encoding #define NO_CODE 255 /////////////////////// LEAF SETUP FUNCTIONS ////////////////////////// // // these functions are only called at setup, and only a few times // per file static float float32_unpack(uint32 x) { // from the specification uint32 mantissa = x & 0x1fffff; uint32 sign = x & 0x80000000; uint32 exp = (x & 0x7fe00000) >> 21; double res = sign ? -(double)mantissa : (double)mantissa; return (float) ldexp((float)res, exp-788); } // zlib & jpeg huffman tables assume that the output symbols // can either be arbitrarily arranged, or have monotonically // increasing frequencies--they rely on the lengths being sorted; // this makes for a very simple generation algorithm. // vorbis allows a huffman table with non-sorted lengths. This // requires a more sophisticated construction, since symbols in // order do not map to huffman codes "in order". static void add_entry(Codebook *c, uint32 huff_code, int symbol, int count, int len, uint32 *values) { if (!c->sparse) { c->codewords [symbol] = huff_code; } else { c->codewords [count] = huff_code; c->codeword_lengths[count] = len; values [count] = symbol; } } static int compute_codewords(Codebook *c, uint8 *len, int n, uint32 *values) { int i,k,m=0; uint32 available[32]; memset(available, 0, sizeof(available)); // find the first entry for (k=0; k < n; ++k) if (len[k] < NO_CODE) break; if (k == n) { assert(c->sorted_entries == 0); return TRUE; } // add to the list add_entry(c, 0, k, m++, len[k], values); // add all available leaves for (i=1; i <= len[k]; ++i) available[i] = 1 << (32-i); // note that the above code treats the first case specially, // but it's really the same as the following code, so they // could probably be combined (except the initial code is 0, // and I use 0 in available[] to mean 'empty') for (i=k+1; i < n; ++i) { uint32 res; int z = len[i], y; if (z == NO_CODE) continue; // find lowest available leaf (should always be earliest, // which is what the specification calls for) // note that this property, and the fact we can never have // more than one free leaf at a given level, isn't totally // trivial to prove, but it seems true and the assert never // fires, so! while (z > 0 && !available[z]) --z; if (z == 0) { assert(0); return FALSE; } res = available[z]; available[z] = 0; add_entry(c, bit_reverse(res), i, m++, len[i], values); // propogate availability up the tree if (z != len[i]) { for (y=len[i]; y > z; --y) { assert(available[y] == 0); available[y] = res + (1 << (32-y)); } } } return TRUE; } // accelerated huffman table allows fast O(1) match of all symbols // of length <= STB_VORBIS_FAST_HUFFMAN_LENGTH static void compute_accelerated_huffman(Codebook *c) { int i, len; for (i=0; i < FAST_HUFFMAN_TABLE_SIZE; ++i) c->fast_huffman[i] = -1; len = c->sparse ? c->sorted_entries : c->entries; #ifdef STB_VORBIS_FAST_HUFFMAN_SHORT if (len > 32767) len = 32767; // largest possible value we can encode! #endif for (i=0; i < len; ++i) { if (c->codeword_lengths[i] <= STB_VORBIS_FAST_HUFFMAN_LENGTH) { uint32 z = c->sparse ? bit_reverse(c->sorted_codewords[i]) : c->codewords[i]; // set table entries for all bit combinations in the higher bits while (z < FAST_HUFFMAN_TABLE_SIZE) { c->fast_huffman[z] = i; z += 1 << c->codeword_lengths[i]; } } } } static int uint32_compare(const void *p, const void *q) { uint32 x = * (uint32 *) p; uint32 y = * (uint32 *) q; return x < y ? -1 : x > y; } static int include_in_sort(Codebook *c, uint8 len) { if (c->sparse) { assert(len != NO_CODE); return TRUE; } if (len == NO_CODE) return FALSE; if (len > STB_VORBIS_FAST_HUFFMAN_LENGTH) return TRUE; return FALSE; } // if the fast table above doesn't work, we want to binary // search them... need to reverse the bits static void compute_sorted_huffman(Codebook *c, uint8 *lengths, uint32 *values) { int i, len; // build a list of all the entries // OPTIMIZATION: don't include the short ones, since they'll be caught by FAST_HUFFMAN. // this is kind of a frivolous optimization--I don't see any performance improvement, // but it's like 4 extra lines of code, so. if (!c->sparse) { int k = 0; for (i=0; i < c->entries; ++i) if (include_in_sort(c, lengths[i])) c->sorted_codewords[k++] = bit_reverse(c->codewords[i]); assert(k == c->sorted_entries); } else { for (i=0; i < c->sorted_entries; ++i) c->sorted_codewords[i] = bit_reverse(c->codewords[i]); } qsort(c->sorted_codewords, c->sorted_entries, sizeof(c->sorted_codewords[0]), uint32_compare); c->sorted_codewords[c->sorted_entries] = 0xffffffff; len = c->sparse ? c->sorted_entries : c->entries; // now we need to indicate how they correspond; we could either // #1: sort a different data structure that says who they correspond to // #2: for each sorted entry, search the original list to find who corresponds // #3: for each original entry, find the sorted entry // #1 requires extra storage, #2 is slow, #3 can use binary search! for (i=0; i < len; ++i) { int huff_len = c->sparse ? lengths[values[i]] : lengths[i]; if (include_in_sort(c,huff_len)) { uint32 code = bit_reverse(c->codewords[i]); int x=0, n=c->sorted_entries; while (n > 1) { // invariant: sc[x] <= code < sc[x+n] int m = x + (n >> 1); if (c->sorted_codewords[m] <= code) { x = m; n -= (n>>1); } else { n >>= 1; } } assert(c->sorted_codewords[x] == code); if (c->sparse) { c->sorted_values[x] = values[i]; c->codeword_lengths[x] = huff_len; } else { c->sorted_values[x] = i; } } } } // only run while parsing the header (3 times) static int vorbis_validate(uint8 *data) { static uint8 vorbis[6] = { 'v', 'o', 'r', 'b', 'i', 's' }; return memcmp(data, vorbis, 6) == 0; } // called from setup only, once per code book // (formula implied by specification) static int lookup1_values(int entries, int dim) { int r = (int) floor(exp((float) log((float) entries) / dim)); if ((int) floor(pow((float) r+1, dim)) <= entries) // (int) cast for MinGW warning; ++r; // floor() to avoid _ftol() when non-CRT assert(pow((float) r+1, dim) > entries); assert((int) floor(pow((float) r, dim)) <= entries); // (int),floor() as above return r; } // called twice per file static void compute_twiddle_factors(int n, float *A, float *B, float *C) { int n4 = n >> 2, n8 = n >> 3; int k,k2; for (k=k2=0; k < n4; ++k,k2+=2) { A[k2 ] = (float) cos(4*k*M_PI/n); A[k2+1] = (float) -sin(4*k*M_PI/n); B[k2 ] = (float) cos((k2+1)*M_PI/n/2) * 0.5f; B[k2+1] = (float) sin((k2+1)*M_PI/n/2) * 0.5f; } for (k=k2=0; k < n8; ++k,k2+=2) { C[k2 ] = (float) cos(2*(k2+1)*M_PI/n); C[k2+1] = (float) -sin(2*(k2+1)*M_PI/n); } } static void compute_window(int n, float *window) { int n2 = n >> 1, i; for (i=0; i < n2; ++i) window[i] = (float) sin(0.5 * M_PI * square((float) sin((i - 0 + 0.5) / n2 * 0.5 * M_PI))); } static void compute_bitreverse(int n, uint16 *rev) { int ld = ilog(n) - 1; // ilog is off-by-one from normal definitions int i, n8 = n >> 3; for (i=0; i < n8; ++i) rev[i] = (bit_reverse(i) >> (32-ld+3)) << 2; } static int init_blocksize(vorb *f, int b, int n) { int n2 = n >> 1, n4 = n >> 2, n8 = n >> 3; f->A[b] = (float *) setup_malloc(f, sizeof(float) * n2); f->B[b] = (float *) setup_malloc(f, sizeof(float) * n2); f->C[b] = (float *) setup_malloc(f, sizeof(float) * n4); if (!f->A[b] || !f->B[b] || !f->C[b]) return error(f, VORBIS_outofmem); compute_twiddle_factors(n, f->A[b], f->B[b], f->C[b]); f->window[b] = (float *) setup_malloc(f, sizeof(float) * n2); if (!f->window[b]) return error(f, VORBIS_outofmem); compute_window(n, f->window[b]); f->bit_reverse[b] = (uint16 *) setup_malloc(f, sizeof(uint16) * n8); if (!f->bit_reverse[b]) return error(f, VORBIS_outofmem); compute_bitreverse(n, f->bit_reverse[b]); return TRUE; } static void neighbors(uint16 *x, int n, int *plow, int *phigh) { int low = -1; int high = 65536; int i; for (i=0; i < n; ++i) { if (x[i] > low && x[i] < x[n]) { *plow = i; low = x[i]; } if (x[i] < high && x[i] > x[n]) { *phigh = i; high = x[i]; } } } // this has been repurposed so y is now the original index instead of y typedef struct { uint16 x,y; } Point; int point_compare(const void *p, const void *q) { Point *a = (Point *) p; Point *b = (Point *) q; return a->x < b->x ? -1 : a->x > b->x; } // /////////////////////// END LEAF SETUP FUNCTIONS ////////////////////////// #if defined(STB_VORBIS_NO_STDIO) #define USE_MEMORY(z) TRUE #else #define USE_MEMORY(z) ((z)->stream) #endif static uint8 get8(vorb *z) { if (USE_MEMORY(z)) { if (z->stream >= z->stream_end) { z->eof = TRUE; return 0; } return *z->stream++; } #ifndef STB_VORBIS_NO_STDIO { int c = fgetc(z->f); if (c == EOF) { z->eof = TRUE; return 0; } return c; } #endif } static uint32 get32(vorb *f) { uint32 x; x = get8(f); x += get8(f) << 8; x += get8(f) << 16; x += get8(f) << 24; return x; } static int getn(vorb *z, uint8 *data, int n) { if (USE_MEMORY(z)) { if (z->stream+n > z->stream_end) { z->eof = 1; return 0; } memcpy(data, z->stream, n); z->stream += n; return 1; } #ifndef STB_VORBIS_NO_STDIO if (fread(data, n, 1, z->f) == 1) return 1; else { z->eof = 1; return 0; } #endif } static void skip(vorb *z, int n) { if (USE_MEMORY(z)) { z->stream += n; if (z->stream >= z->stream_end) z->eof = 1; return; } #ifndef STB_VORBIS_NO_STDIO { long x = ftell(z->f); fseek(z->f, x+n, SEEK_SET); } #endif } static int set_file_offset(stb_vorbis *f, unsigned int loc) { #ifndef STB_VORBIS_NO_PUSHDATA_API if (f->push_mode) return 0; #endif f->eof = 0; if (USE_MEMORY(f)) { if (f->stream_start + loc >= f->stream_end || f->stream_start + loc < f->stream_start) { f->stream = f->stream_end; f->eof = 1; return 0; } else { f->stream = f->stream_start + loc; return 1; } } #ifndef STB_VORBIS_NO_STDIO if (loc + f->f_start < loc || loc >= 0x80000000) { loc = 0x7fffffff; f->eof = 1; } else { loc += f->f_start; } if (!fseek(f->f, loc, SEEK_SET)) return 1; f->eof = 1; fseek(f->f, f->f_start, SEEK_END); return 0; #endif } static uint8 ogg_page_header[4] = { 0x4f, 0x67, 0x67, 0x53 }; static int capture_pattern(vorb *f) { if (0x4f != get8(f)) return FALSE; if (0x67 != get8(f)) return FALSE; if (0x67 != get8(f)) return FALSE; if (0x53 != get8(f)) return FALSE; return TRUE; } #define PAGEFLAG_continued_packet 1 #define PAGEFLAG_first_page 2 #define PAGEFLAG_last_page 4 static int start_page_no_capturepattern(vorb *f) { uint32 loc0,loc1,n,i; // stream structure version if (0 != get8(f)) return error(f, VORBIS_invalid_stream_structure_version); // header flag f->page_flag = get8(f); // absolute granule position loc0 = get32(f); loc1 = get32(f); // @TODO: validate loc0,loc1 as valid positions? // stream serial number -- vorbis doesn't interleave, so discard get32(f); //if (f->serial != get32(f)) return error(f, VORBIS_incorrect_stream_serial_number); // page sequence number n = get32(f); f->last_page = n; // CRC32 get32(f); // page_segments f->segment_count = get8(f); if (!getn(f, f->segments, f->segment_count)) return error(f, VORBIS_unexpected_eof); // assume we _don't_ know any the sample position of any segments f->end_seg_with_known_loc = -2; if (loc0 != ~0 || loc1 != ~0) { // determine which packet is the last one that will complete for (i=f->segment_count-1; i >= 0; --i) if (f->segments[i] < 255) break; // 'i' is now the index of the _last_ segment of a packet that ends if (i >= 0) { f->end_seg_with_known_loc = i; f->known_loc_for_packet = loc0; } } if (f->first_decode) { int i,len; ProbedPage p; len = 0; for (i=0; i < f->segment_count; ++i) len += f->segments[i]; len += 27 + f->segment_count; p.page_start = f->first_audio_page_offset; p.page_end = p.page_start + len; p.after_previous_page_start = p.page_start; p.first_decoded_sample = 0; p.last_decoded_sample = loc0; f->p_first = p; } f->next_seg = 0; return TRUE; } static int start_page(vorb *f) { if (!capture_pattern(f)) return error(f, VORBIS_missing_capture_pattern); return start_page_no_capturepattern(f); } static int start_packet(vorb *f) { while (f->next_seg == -1) { if (!start_page(f)) return FALSE; if (f->page_flag & PAGEFLAG_continued_packet) return error(f, VORBIS_continued_packet_flag_invalid); } f->last_seg = FALSE; f->valid_bits = 0; f->packet_bytes = 0; f->bytes_in_seg = 0; // f->next_seg is now valid return TRUE; } static int maybe_start_packet(vorb *f) { if (f->next_seg == -1) { int x = get8(f); if (f->eof) return FALSE; // EOF at page boundary is not an error! if (0x4f != x ) return error(f, VORBIS_missing_capture_pattern); if (0x67 != get8(f)) return error(f, VORBIS_missing_capture_pattern); if (0x67 != get8(f)) return error(f, VORBIS_missing_capture_pattern); if (0x53 != get8(f)) return error(f, VORBIS_missing_capture_pattern); if (!start_page_no_capturepattern(f)) return FALSE; if (f->page_flag & PAGEFLAG_continued_packet) { // set up enough state that we can read this packet if we want, // e.g. during recovery f->last_seg = FALSE; f->bytes_in_seg = 0; return error(f, VORBIS_continued_packet_flag_invalid); } } return start_packet(f); } static int next_segment(vorb *f) { int len; if (f->last_seg) return 0; if (f->next_seg == -1) { f->last_seg_which = f->segment_count-1; // in case start_page fails if (!start_page(f)) { f->last_seg = 1; return 0; } if (!(f->page_flag & PAGEFLAG_continued_packet)) return error(f, VORBIS_continued_packet_flag_invalid); } len = f->segments[f->next_seg++]; if (len < 255) { f->last_seg = TRUE; f->last_seg_which = f->next_seg-1; } if (f->next_seg >= f->segment_count) f->next_seg = -1; assert(f->bytes_in_seg == 0); f->bytes_in_seg = len; return len; } #define EOP (-1) #define INVALID_BITS (-1) static int get8_packet_raw(vorb *f) { if (!f->bytes_in_seg) if (f->last_seg) return EOP; else if (!next_segment(f)) return EOP; assert(f->bytes_in_seg > 0); --f->bytes_in_seg; ++f->packet_bytes; return get8(f); } static int get8_packet(vorb *f) { int x = get8_packet_raw(f); f->valid_bits = 0; return x; } static void flush_packet(vorb *f) { while (get8_packet_raw(f) != EOP); } // @OPTIMIZE: this is the secondary bit decoder, so it's probably not as important // as the huffman decoder? static uint32 get_bits(vorb *f, int n) { uint32 z; if (f->valid_bits < 0) return 0; if (f->valid_bits < n) { if (n > 24) { // the accumulator technique below would not work correctly in this case z = get_bits(f, 24); z += get_bits(f, n-24) << 24; return z; } if (f->valid_bits == 0) f->acc = 0; while (f->valid_bits < n) { int z = get8_packet_raw(f); if (z == EOP) { f->valid_bits = INVALID_BITS; return 0; } f->acc += z << f->valid_bits; f->valid_bits += 8; } } if (f->valid_bits < 0) return 0; z = f->acc & ((1 << n)-1); f->acc >>= n; f->valid_bits -= n; return z; } static int32 get_bits_signed(vorb *f, int n) { uint32 z = get_bits(f, n); if (z & (1 << (n-1))) z += ~((1 << n) - 1); return (int32) z; } // @OPTIMIZE: primary accumulator for huffman // expand the buffer to as many bits as possible without reading off end of packet // it might be nice to allow f->valid_bits and f->acc to be stored in registers, // e.g. cache them locally and decode locally static __forceinline void prep_huffman(vorb *f) { if (f->valid_bits <= 24) { if (f->valid_bits == 0) f->acc = 0; do { int z; if (f->last_seg && !f->bytes_in_seg) return; z = get8_packet_raw(f); if (z == EOP) return; f->acc += z << f->valid_bits; f->valid_bits += 8; } while (f->valid_bits <= 24); } } enum { VORBIS_packet_id = 1, VORBIS_packet_comment = 3, VORBIS_packet_setup = 5, }; static int codebook_decode_scalar_raw(vorb *f, Codebook *c) { int i; prep_huffman(f); assert(c->sorted_codewords || c->codewords); // cases to use binary search: sorted_codewords && !c->codewords // sorted_codewords && c->entries > 8 if (c->entries > 8 ? c->sorted_codewords!=NULL : !c->codewords) { // binary search uint32 code = bit_reverse(f->acc); int x=0, n=c->sorted_entries, len; while (n > 1) { // invariant: sc[x] <= code < sc[x+n] int m = x + (n >> 1); if (c->sorted_codewords[m] <= code) { x = m; n -= (n>>1); } else { n >>= 1; } } // x is now the sorted index if (!c->sparse) x = c->sorted_values[x]; // x is now sorted index if sparse, or symbol otherwise len = c->codeword_lengths[x]; if (f->valid_bits >= len) { f->acc >>= len; f->valid_bits -= len; return x; } f->valid_bits = 0; return -1; } // if small, linear search assert(!c->sparse); for (i=0; i < c->entries; ++i) { if (c->codeword_lengths[i] == NO_CODE) continue; if (c->codewords[i] == (f->acc & ((1 << c->codeword_lengths[i])-1))) { if (f->valid_bits >= c->codeword_lengths[i]) { f->acc >>= c->codeword_lengths[i]; f->valid_bits -= c->codeword_lengths[i]; return i; } f->valid_bits = 0; return -1; } } error(f, VORBIS_invalid_stream); f->valid_bits = 0; return -1; } static int codebook_decode_scalar(vorb *f, Codebook *c) { int i; if (f->valid_bits < STB_VORBIS_FAST_HUFFMAN_LENGTH) prep_huffman(f); // fast huffman table lookup i = f->acc & FAST_HUFFMAN_TABLE_MASK; i = c->fast_huffman[i]; if (i >= 0) { f->acc >>= c->codeword_lengths[i]; f->valid_bits -= c->codeword_lengths[i]; if (f->valid_bits < 0) { f->valid_bits = 0; return -1; } return i; } return codebook_decode_scalar_raw(f,c); } #ifndef STB_VORBIS_NO_INLINE_DECODE #define DECODE_RAW(var, f,c) \ if (f->valid_bits < STB_VORBIS_FAST_HUFFMAN_LENGTH) \ prep_huffman(f); \ var = f->acc & FAST_HUFFMAN_TABLE_MASK; \ var = c->fast_huffman[var]; \ if (var >= 0) { \ int n = c->codeword_lengths[var]; \ f->acc >>= n; \ f->valid_bits -= n; \ if (f->valid_bits < 0) { f->valid_bits = 0; var = -1; } \ } else { \ var = codebook_decode_scalar_raw(f,c); \ } #else #define DECODE_RAW(var,f,c) var = codebook_decode_scalar(f,c); #endif #define DECODE(var,f,c) \ DECODE_RAW(var,f,c) \ if (c->sparse) var = c->sorted_values[var]; #ifndef STB_VORBIS_DIVIDES_IN_CODEBOOK #define DECODE_VQ(var,f,c) DECODE_RAW(var,f,c) #else #define DECODE_VQ(var,f,c) DECODE(var,f,c) #endif // CODEBOOK_ELEMENT_FAST is an optimization for the CODEBOOK_FLOATS case // where we avoid one addition #ifndef STB_VORBIS_CODEBOOK_FLOATS #define CODEBOOK_ELEMENT(c,off) (c->multiplicands[off] * c->delta_value + c->minimum_value) #define CODEBOOK_ELEMENT_FAST(c,off) (c->multiplicands[off] * c->delta_value) #define CODEBOOK_ELEMENT_BASE(c) (c->minimum_value) #else #define CODEBOOK_ELEMENT(c,off) (c->multiplicands[off]) #define CODEBOOK_ELEMENT_FAST(c,off) (c->multiplicands[off]) #define CODEBOOK_ELEMENT_BASE(c) (0) #endif static int codebook_decode_start(vorb *f, Codebook *c, int len) { int z = -1; // type 0 is only legal in a scalar context if (c->lookup_type == 0) error(f, VORBIS_invalid_stream); else { DECODE_VQ(z,f,c); if (c->sparse) assert(z < c->sorted_entries); if (z < 0) { // check for EOP if (!f->bytes_in_seg) if (f->last_seg) return z; error(f, VORBIS_invalid_stream); } } return z; } static int codebook_decode(vorb *f, Codebook *c, float *output, int len) { int i,z = codebook_decode_start(f,c,len); if (z < 0) return FALSE; if (len > c->dimensions) len = c->dimensions; #ifdef STB_VORBIS_DIVIDES_IN_CODEBOOK if (c->lookup_type == 1) { float last = CODEBOOK_ELEMENT_BASE(c); int div = 1; for (i=0; i < len; ++i) { int off = (z / div) % c->lookup_values; float val = CODEBOOK_ELEMENT_FAST(c,off) + last; output[i] += val; if (c->sequence_p) last = val + c->minimum_value; div *= c->lookup_values; } return TRUE; } #endif z *= c->dimensions; if (c->sequence_p) { float last = CODEBOOK_ELEMENT_BASE(c); for (i=0; i < len; ++i) { float val = CODEBOOK_ELEMENT_FAST(c,z+i) + last; output[i] += val; last = val + c->minimum_value; } } else { float last = CODEBOOK_ELEMENT_BASE(c); for (i=0; i < len; ++i) { output[i] += CODEBOOK_ELEMENT_FAST(c,z+i) + last; } } return TRUE; } static int codebook_decode_step(vorb *f, Codebook *c, float *output, int len, int step) { int i,z = codebook_decode_start(f,c,len); float last = CODEBOOK_ELEMENT_BASE(c); if (z < 0) return FALSE; if (len > c->dimensions) len = c->dimensions; #ifdef STB_VORBIS_DIVIDES_IN_CODEBOOK if (c->lookup_type == 1) { int div = 1; for (i=0; i < len; ++i) { int off = (z / div) % c->lookup_values; float val = CODEBOOK_ELEMENT_FAST(c,off) + last; output[i*step] += val; if (c->sequence_p) last = val; div *= c->lookup_values; } return TRUE; } #endif z *= c->dimensions; for (i=0; i < len; ++i) { float val = CODEBOOK_ELEMENT_FAST(c,z+i) + last; output[i*step] += val; if (c->sequence_p) last = val; } return TRUE; } static int codebook_decode_deinterleave_repeat(vorb *f, Codebook *c, float **outputs, int ch, int *c_inter_p, int *p_inter_p, int len, int total_decode) { int c_inter = *c_inter_p; int p_inter = *p_inter_p; int i,z, effective = c->dimensions; // type 0 is only legal in a scalar context if (c->lookup_type == 0) return error(f, VORBIS_invalid_stream); while (total_decode > 0) { float last = CODEBOOK_ELEMENT_BASE(c); DECODE_VQ(z,f,c); #ifndef STB_VORBIS_DIVIDES_IN_CODEBOOK assert(!c->sparse || z < c->sorted_entries); #endif if (z < 0) { if (!f->bytes_in_seg) if (f->last_seg) return FALSE; return error(f, VORBIS_invalid_stream); } // if this will take us off the end of the buffers, stop short! // we check by computing the length of the virtual interleaved // buffer (len*ch), our current offset within it (p_inter*ch)+(c_inter), // and the length we'll be using (effective) if (c_inter + p_inter*ch + effective > len * ch) { effective = len*ch - (p_inter*ch - c_inter); } #ifdef STB_VORBIS_DIVIDES_IN_CODEBOOK if (c->lookup_type == 1) { int div = 1; for (i=0; i < effective; ++i) { int off = (z / div) % c->lookup_values; float val = CODEBOOK_ELEMENT_FAST(c,off) + last; outputs[c_inter][p_inter] += val; if (++c_inter == ch) { c_inter = 0; ++p_inter; } if (c->sequence_p) last = val; div *= c->lookup_values; } } else #endif { z *= c->dimensions; if (c->sequence_p) { for (i=0; i < effective; ++i) { float val = CODEBOOK_ELEMENT_FAST(c,z+i) + last; outputs[c_inter][p_inter] += val; if (++c_inter == ch) { c_inter = 0; ++p_inter; } last = val; } } else { for (i=0; i < effective; ++i) { float val = CODEBOOK_ELEMENT_FAST(c,z+i) + last; outputs[c_inter][p_inter] += val; if (++c_inter == ch) { c_inter = 0; ++p_inter; } } } } total_decode -= effective; } *c_inter_p = c_inter; *p_inter_p = p_inter; return TRUE; } #ifndef STB_VORBIS_DIVIDES_IN_CODEBOOK static int codebook_decode_deinterleave_repeat_2(vorb *f, Codebook *c, float **outputs, int *c_inter_p, int *p_inter_p, int len, int total_decode) { int c_inter = *c_inter_p; int p_inter = *p_inter_p; int i,z, effective = c->dimensions; // type 0 is only legal in a scalar context if (c->lookup_type == 0) return error(f, VORBIS_invalid_stream); while (total_decode > 0) { float last = CODEBOOK_ELEMENT_BASE(c); DECODE_VQ(z,f,c); if (z < 0) { if (!f->bytes_in_seg) if (f->last_seg) return FALSE; return error(f, VORBIS_invalid_stream); } // if this will take us off the end of the buffers, stop short! // we check by computing the length of the virtual interleaved // buffer (len*ch), our current offset within it (p_inter*ch)+(c_inter), // and the length we'll be using (effective) if (c_inter + p_inter*2 + effective > len * 2) { effective = len*2 - (p_inter*2 - c_inter); } { z *= c->dimensions; stb_prof(11); if (c->sequence_p) { // haven't optimized this case because I don't have any examples for (i=0; i < effective; ++i) { float val = CODEBOOK_ELEMENT_FAST(c,z+i) + last; outputs[c_inter][p_inter] += val; if (++c_inter == 2) { c_inter = 0; ++p_inter; } last = val; } } else { i=0; if (c_inter == 1) { float val = CODEBOOK_ELEMENT_FAST(c,z+i) + last; outputs[c_inter][p_inter] += val; c_inter = 0; ++p_inter; ++i; } { float *z0 = outputs[0]; float *z1 = outputs[1]; for (; i+1 < effective;) { z0[p_inter] += CODEBOOK_ELEMENT_FAST(c,z+i) + last; z1[p_inter] += CODEBOOK_ELEMENT_FAST(c,z+i+1) + last; ++p_inter; i += 2; } } if (i < effective) { float val = CODEBOOK_ELEMENT_FAST(c,z+i) + last; outputs[c_inter][p_inter] += val; if (++c_inter == 2) { c_inter = 0; ++p_inter; } } } } total_decode -= effective; } *c_inter_p = c_inter; *p_inter_p = p_inter; return TRUE; } #endif static int predict_point(int x, int x0, int x1, int y0, int y1) { int dy = y1 - y0; int adx = x1 - x0; // @OPTIMIZE: force int division to round in the right direction... is this necessary on x86? int err = abs(dy) * (x - x0); int off = err / adx; return dy < 0 ? y0 - off : y0 + off; } // the following table is block-copied from the specification static float inverse_db_table[256] = { 1.0649863e-07f, 1.1341951e-07f, 1.2079015e-07f, 1.2863978e-07f, 1.3699951e-07f, 1.4590251e-07f, 1.5538408e-07f, 1.6548181e-07f, 1.7623575e-07f, 1.8768855e-07f, 1.9988561e-07f, 2.1287530e-07f, 2.2670913e-07f, 2.4144197e-07f, 2.5713223e-07f, 2.7384213e-07f, 2.9163793e-07f, 3.1059021e-07f, 3.3077411e-07f, 3.5226968e-07f, 3.7516214e-07f, 3.9954229e-07f, 4.2550680e-07f, 4.5315863e-07f, 4.8260743e-07f, 5.1396998e-07f, 5.4737065e-07f, 5.8294187e-07f, 6.2082472e-07f, 6.6116941e-07f, 7.0413592e-07f, 7.4989464e-07f, 7.9862701e-07f, 8.5052630e-07f, 9.0579828e-07f, 9.6466216e-07f, 1.0273513e-06f, 1.0941144e-06f, 1.1652161e-06f, 1.2409384e-06f, 1.3215816e-06f, 1.4074654e-06f, 1.4989305e-06f, 1.5963394e-06f, 1.7000785e-06f, 1.8105592e-06f, 1.9282195e-06f, 2.0535261e-06f, 2.1869758e-06f, 2.3290978e-06f, 2.4804557e-06f, 2.6416497e-06f, 2.8133190e-06f, 2.9961443e-06f, 3.1908506e-06f, 3.3982101e-06f, 3.6190449e-06f, 3.8542308e-06f, 4.1047004e-06f, 4.3714470e-06f, 4.6555282e-06f, 4.9580707e-06f, 5.2802740e-06f, 5.6234160e-06f, 5.9888572e-06f, 6.3780469e-06f, 6.7925283e-06f, 7.2339451e-06f, 7.7040476e-06f, 8.2047000e-06f, 8.7378876e-06f, 9.3057248e-06f, 9.9104632e-06f, 1.0554501e-05f, 1.1240392e-05f, 1.1970856e-05f, 1.2748789e-05f, 1.3577278e-05f, 1.4459606e-05f, 1.5399272e-05f, 1.6400004e-05f, 1.7465768e-05f, 1.8600792e-05f, 1.9809576e-05f, 2.1096914e-05f, 2.2467911e-05f, 2.3928002e-05f, 2.5482978e-05f, 2.7139006e-05f, 2.8902651e-05f, 3.0780908e-05f, 3.2781225e-05f, 3.4911534e-05f, 3.7180282e-05f, 3.9596466e-05f, 4.2169667e-05f, 4.4910090e-05f, 4.7828601e-05f, 5.0936773e-05f, 5.4246931e-05f, 5.7772202e-05f, 6.1526565e-05f, 6.5524908e-05f, 6.9783085e-05f, 7.4317983e-05f, 7.9147585e-05f, 8.4291040e-05f, 8.9768747e-05f, 9.5602426e-05f, 0.00010181521f, 0.00010843174f, 0.00011547824f, 0.00012298267f, 0.00013097477f, 0.00013948625f, 0.00014855085f, 0.00015820453f, 0.00016848555f, 0.00017943469f, 0.00019109536f, 0.00020351382f, 0.00021673929f, 0.00023082423f, 0.00024582449f, 0.00026179955f, 0.00027881276f, 0.00029693158f, 0.00031622787f, 0.00033677814f, 0.00035866388f, 0.00038197188f, 0.00040679456f, 0.00043323036f, 0.00046138411f, 0.00049136745f, 0.00052329927f, 0.00055730621f, 0.00059352311f, 0.00063209358f, 0.00067317058f, 0.00071691700f, 0.00076350630f, 0.00081312324f, 0.00086596457f, 0.00092223983f, 0.00098217216f, 0.0010459992f, 0.0011139742f, 0.0011863665f, 0.0012634633f, 0.0013455702f, 0.0014330129f, 0.0015261382f, 0.0016253153f, 0.0017309374f, 0.0018434235f, 0.0019632195f, 0.0020908006f, 0.0022266726f, 0.0023713743f, 0.0025254795f, 0.0026895994f, 0.0028643847f, 0.0030505286f, 0.0032487691f, 0.0034598925f, 0.0036847358f, 0.0039241906f, 0.0041792066f, 0.0044507950f, 0.0047400328f, 0.0050480668f, 0.0053761186f, 0.0057254891f, 0.0060975636f, 0.0064938176f, 0.0069158225f, 0.0073652516f, 0.0078438871f, 0.0083536271f, 0.0088964928f, 0.009474637f, 0.010090352f, 0.010746080f, 0.011444421f, 0.012188144f, 0.012980198f, 0.013823725f, 0.014722068f, 0.015678791f, 0.016697687f, 0.017782797f, 0.018938423f, 0.020169149f, 0.021479854f, 0.022875735f, 0.024362330f, 0.025945531f, 0.027631618f, 0.029427276f, 0.031339626f, 0.033376252f, 0.035545228f, 0.037855157f, 0.040315199f, 0.042935108f, 0.045725273f, 0.048696758f, 0.051861348f, 0.055231591f, 0.058820850f, 0.062643361f, 0.066714279f, 0.071049749f, 0.075666962f, 0.080584227f, 0.085821044f, 0.091398179f, 0.097337747f, 0.10366330f, 0.11039993f, 0.11757434f, 0.12521498f, 0.13335215f, 0.14201813f, 0.15124727f, 0.16107617f, 0.17154380f, 0.18269168f, 0.19456402f, 0.20720788f, 0.22067342f, 0.23501402f, 0.25028656f, 0.26655159f, 0.28387361f, 0.30232132f, 0.32196786f, 0.34289114f, 0.36517414f, 0.38890521f, 0.41417847f, 0.44109412f, 0.46975890f, 0.50028648f, 0.53279791f, 0.56742212f, 0.60429640f, 0.64356699f, 0.68538959f, 0.72993007f, 0.77736504f, 0.82788260f, 0.88168307f, 0.9389798f, 1.0f }; // @OPTIMIZE: if you want to replace this bresenham line-drawing routine, // note that you must produce bit-identical output to decode correctly; // this specific sequence of operations is specified in the spec (it's // drawing integer-quantized frequency-space lines that the encoder // expects to be exactly the same) // ... also, isn't the whole point of Bresenham's algorithm to NOT // have to divide in the setup? sigh. #ifndef STB_VORBIS_NO_DEFER_FLOOR #define LINE_OP(a,b) a *= b #else #define LINE_OP(a,b) a = b #endif #ifdef STB_VORBIS_DIVIDE_TABLE #define DIVTAB_NUMER 32 #define DIVTAB_DENOM 64 int8 integer_divide_table[DIVTAB_NUMER][DIVTAB_DENOM]; // 2KB #endif static __forceinline void draw_line(float *output, int x0, int y0, int x1, int y1, int n) { int dy = y1 - y0; int adx = x1 - x0; int ady = abs(dy); int base; int x=x0,y=y0; int err = 0; int sy; #ifdef STB_VORBIS_DIVIDE_TABLE if (adx < DIVTAB_DENOM && ady < DIVTAB_NUMER) { if (dy < 0) { base = -integer_divide_table[ady][adx]; sy = base-1; } else { base = integer_divide_table[ady][adx]; sy = base+1; } } else { base = dy / adx; if (dy < 0) sy = base - 1; else sy = base+1; } #else base = dy / adx; if (dy < 0) sy = base - 1; else sy = base+1; #endif ady -= abs(base) * adx; if (x1 > n) x1 = n; LINE_OP(output[x], inverse_db_table[y]); for (++x; x < x1; ++x) { err += ady; if (err >= adx) { err -= adx; y += sy; } else y += base; LINE_OP(output[x], inverse_db_table[y]); } } static int residue_decode(vorb *f, Codebook *book, float *target, int offset, int n, int rtype) { int k; if (rtype == 0) { int step = n / book->dimensions; for (k=0; k < step; ++k) if (!codebook_decode_step(f, book, target+offset+k, n-offset-k, step)) return FALSE; } else { for (k=0; k < n; ) { if (!codebook_decode(f, book, target+offset, n-k)) return FALSE; k += book->dimensions; offset += book->dimensions; } } return TRUE; } static void decode_residue(vorb *f, float *residue_buffers[], int ch, int n, int rn, uint8 *do_not_decode) { int i,j,pass; Residue *r = f->residue_config + rn; int rtype = f->residue_types[rn]; int c = r->classbook; int classwords = f->codebooks[c].dimensions; int n_read = r->end - r->begin; int part_read = n_read / r->part_size; int temp_alloc_point = temp_alloc_save(f); #ifndef STB_VORBIS_DIVIDES_IN_RESIDUE uint8 ***part_classdata = (uint8 ***) temp_block_array(f,f->channels, part_read * sizeof(**part_classdata)); #else int **classifications = (int **) temp_block_array(f,f->channels, part_read * sizeof(**classifications)); #endif stb_prof(2); for (i=0; i < ch; ++i) if (!do_not_decode[i]) memset(residue_buffers[i], 0, sizeof(float) * n); if (rtype == 2 && ch != 1) { int len = ch * n; for (j=0; j < ch; ++j) if (!do_not_decode[j]) break; if (j == ch) goto done; stb_prof(3); for (pass=0; pass < 8; ++pass) { int pcount = 0, class_set = 0; if (ch == 2) { stb_prof(13); while (pcount < part_read) { int z = r->begin + pcount*r->part_size; int c_inter = (z & 1), p_inter = z>>1; if (pass == 0) { Codebook *c = f->codebooks+r->classbook; int q; DECODE(q,f,c); if (q == EOP) goto done; #ifndef STB_VORBIS_DIVIDES_IN_RESIDUE part_classdata[0][class_set] = r->classdata[q]; #else for (i=classwords-1; i >= 0; --i) { classifications[0][i+pcount] = q % r->classifications; q /= r->classifications; } #endif } stb_prof(5); for (i=0; i < classwords && pcount < part_read; ++i, ++pcount) { int z = r->begin + pcount*r->part_size; #ifndef STB_VORBIS_DIVIDES_IN_RESIDUE int c = part_classdata[0][class_set][i]; #else int c = classifications[0][pcount]; #endif int b = r->residue_books[c][pass]; if (b >= 0) { Codebook *book = f->codebooks + b; stb_prof(20); // accounts for X time #ifdef STB_VORBIS_DIVIDES_IN_CODEBOOK if (!codebook_decode_deinterleave_repeat(f, book, residue_buffers, ch, &c_inter, &p_inter, n, r->part_size)) goto done; #else // saves 1% if (!codebook_decode_deinterleave_repeat_2(f, book, residue_buffers, &c_inter, &p_inter, n, r->part_size)) goto done; #endif stb_prof(7); } else { z += r->part_size; c_inter = z & 1; p_inter = z >> 1; } } stb_prof(8); #ifndef STB_VORBIS_DIVIDES_IN_RESIDUE ++class_set; #endif } } else if (ch == 1) { while (pcount < part_read) { int z = r->begin + pcount*r->part_size; int c_inter = 0, p_inter = z; if (pass == 0) { Codebook *c = f->codebooks+r->classbook; int q; DECODE(q,f,c); if (q == EOP) goto done; #ifndef STB_VORBIS_DIVIDES_IN_RESIDUE part_classdata[0][class_set] = r->classdata[q]; #else for (i=classwords-1; i >= 0; --i) { classifications[0][i+pcount] = q % r->classifications; q /= r->classifications; } #endif } for (i=0; i < classwords && pcount < part_read; ++i, ++pcount) { int z = r->begin + pcount*r->part_size; #ifndef STB_VORBIS_DIVIDES_IN_RESIDUE int c = part_classdata[0][class_set][i]; #else int c = classifications[0][pcount]; #endif int b = r->residue_books[c][pass]; if (b >= 0) { Codebook *book = f->codebooks + b; stb_prof(22); if (!codebook_decode_deinterleave_repeat(f, book, residue_buffers, ch, &c_inter, &p_inter, n, r->part_size)) goto done; stb_prof(3); } else { z += r->part_size; c_inter = 0; p_inter = z; } } #ifndef STB_VORBIS_DIVIDES_IN_RESIDUE ++class_set; #endif } } else { while (pcount < part_read) { int z = r->begin + pcount*r->part_size; int c_inter = z % ch, p_inter = z/ch; if (pass == 0) { Codebook *c = f->codebooks+r->classbook; int q; DECODE(q,f,c); if (q == EOP) goto done; #ifndef STB_VORBIS_DIVIDES_IN_RESIDUE part_classdata[0][class_set] = r->classdata[q]; #else for (i=classwords-1; i >= 0; --i) { classifications[0][i+pcount] = q % r->classifications; q /= r->classifications; } #endif } for (i=0; i < classwords && pcount < part_read; ++i, ++pcount) { int z = r->begin + pcount*r->part_size; #ifndef STB_VORBIS_DIVIDES_IN_RESIDUE int c = part_classdata[0][class_set][i]; #else int c = classifications[0][pcount]; #endif int b = r->residue_books[c][pass]; if (b >= 0) { Codebook *book = f->codebooks + b; stb_prof(22); if (!codebook_decode_deinterleave_repeat(f, book, residue_buffers, ch, &c_inter, &p_inter, n, r->part_size)) goto done; stb_prof(3); } else { z += r->part_size; c_inter = z % ch; p_inter = z / ch; } } #ifndef STB_VORBIS_DIVIDES_IN_RESIDUE ++class_set; #endif } } } goto done; } stb_prof(9); for (pass=0; pass < 8; ++pass) { int pcount = 0, class_set=0; while (pcount < part_read) { if (pass == 0) { for (j=0; j < ch; ++j) { if (!do_not_decode[j]) { Codebook *c = f->codebooks+r->classbook; int temp; DECODE(temp,f,c); if (temp == EOP) goto done; #ifndef STB_VORBIS_DIVIDES_IN_RESIDUE part_classdata[j][class_set] = r->classdata[temp]; #else for (i=classwords-1; i >= 0; --i) { classifications[j][i+pcount] = temp % r->classifications; temp /= r->classifications; } #endif } } } for (i=0; i < classwords && pcount < part_read; ++i, ++pcount) { for (j=0; j < ch; ++j) { if (!do_not_decode[j]) { #ifndef STB_VORBIS_DIVIDES_IN_RESIDUE int c = part_classdata[j][class_set][i]; #else int c = classifications[j][pcount]; #endif int b = r->residue_books[c][pass]; if (b >= 0) { float *target = residue_buffers[j]; int offset = r->begin + pcount * r->part_size; int n = r->part_size; Codebook *book = f->codebooks + b; if (!residue_decode(f, book, target, offset, n, rtype)) goto done; } } } } #ifndef STB_VORBIS_DIVIDES_IN_RESIDUE ++class_set; #endif } } done: stb_prof(0); temp_alloc_restore(f,temp_alloc_point); } #if 0 // slow way for debugging void inverse_mdct_slow(float *buffer, int n) { int i,j; int n2 = n >> 1; float *x = (float *) malloc(sizeof(*x) * n2); memcpy(x, buffer, sizeof(*x) * n2); for (i=0; i < n; ++i) { float acc = 0; for (j=0; j < n2; ++j) // formula from paper: //acc += n/4.0f * x[j] * (float) cos(M_PI / 2 / n * (2 * i + 1 + n/2.0)*(2*j+1)); // formula from wikipedia //acc += 2.0f / n2 * x[j] * (float) cos(M_PI/n2 * (i + 0.5 + n2/2)*(j + 0.5)); // these are equivalent, except the formula from the paper inverts the multiplier! // however, what actually works is NO MULTIPLIER!?! //acc += 64 * 2.0f / n2 * x[j] * (float) cos(M_PI/n2 * (i + 0.5 + n2/2)*(j + 0.5)); acc += x[j] * (float) cos(M_PI / 2 / n * (2 * i + 1 + n/2.0)*(2*j+1)); buffer[i] = acc; } free(x); } #elif 0 // same as above, but just barely able to run in real time on modern machines void inverse_mdct_slow(float *buffer, int n, vorb *f, int blocktype) { float mcos[16384]; int i,j; int n2 = n >> 1, nmask = (n << 2) -1; float *x = (float *) malloc(sizeof(*x) * n2); memcpy(x, buffer, sizeof(*x) * n2); for (i=0; i < 4*n; ++i) mcos[i] = (float) cos(M_PI / 2 * i / n); for (i=0; i < n; ++i) { float acc = 0; for (j=0; j < n2; ++j) acc += x[j] * mcos[(2 * i + 1 + n2)*(2*j+1) & nmask]; buffer[i] = acc; } free(x); } #else // transform to use a slow dct-iv; this is STILL basically trivial, // but only requires half as many ops void dct_iv_slow(float *buffer, int n) { float mcos[16384]; float x[2048]; int i,j; int n2 = n >> 1, nmask = (n << 3) - 1; memcpy(x, buffer, sizeof(*x) * n); for (i=0; i < 8*n; ++i) mcos[i] = (float) cos(M_PI / 4 * i / n); for (i=0; i < n; ++i) { float acc = 0; for (j=0; j < n; ++j) acc += x[j] * mcos[((2 * i + 1)*(2*j+1)) & nmask]; //acc += x[j] * cos(M_PI / n * (i + 0.5) * (j + 0.5)); buffer[i] = acc; } free(x); } void inverse_mdct_slow(float *buffer, int n, vorb *f, int blocktype) { int i, n4 = n >> 2, n2 = n >> 1, n3_4 = n - n4; float temp[4096]; memcpy(temp, buffer, n2 * sizeof(float)); dct_iv_slow(temp, n2); // returns -c'-d, a-b' for (i=0; i < n4 ; ++i) buffer[i] = temp[i+n4]; // a-b' for ( ; i < n3_4; ++i) buffer[i] = -temp[n3_4 - i - 1]; // b-a', c+d' for ( ; i < n ; ++i) buffer[i] = -temp[i - n3_4]; // c'+d } #endif #ifndef LIBVORBIS_MDCT #define LIBVORBIS_MDCT 0 #endif #if LIBVORBIS_MDCT // directly call the vorbis MDCT using an interface documented // by Jeff Roberts... useful for performance comparison typedef struct { int n; int log2n; float *trig; int *bitrev; float scale; } mdct_lookup; extern void mdct_init(mdct_lookup *lookup, int n); extern void mdct_clear(mdct_lookup *l); extern void mdct_backward(mdct_lookup *init, float *in, float *out); mdct_lookup M1,M2; void inverse_mdct(float *buffer, int n, vorb *f, int blocktype) { mdct_lookup *M; if (M1.n == n) M = &M1; else if (M2.n == n) M = &M2; else if (M1.n == 0) { mdct_init(&M1, n); M = &M1; } else { if (M2.n) __asm int 3; mdct_init(&M2, n); M = &M2; } mdct_backward(M, buffer, buffer); } #endif // the following were split out into separate functions while optimizing; // they could be pushed back up but eh. __forceinline showed no change; // they're probably already being inlined. static void imdct_step3_iter0_loop(int n, float *e, int i_off, int k_off, float *A) { float *ee0 = e + i_off; float *ee2 = ee0 + k_off; int i; assert((n & 3) == 0); for (i=(n>>2); i > 0; --i) { float k00_20, k01_21; k00_20 = ee0[ 0] - ee2[ 0]; k01_21 = ee0[-1] - ee2[-1]; ee0[ 0] += ee2[ 0];//ee0[ 0] = ee0[ 0] + ee2[ 0]; ee0[-1] += ee2[-1];//ee0[-1] = ee0[-1] + ee2[-1]; ee2[ 0] = k00_20 * A[0] - k01_21 * A[1]; ee2[-1] = k01_21 * A[0] + k00_20 * A[1]; A += 8; k00_20 = ee0[-2] - ee2[-2]; k01_21 = ee0[-3] - ee2[-3]; ee0[-2] += ee2[-2];//ee0[-2] = ee0[-2] + ee2[-2]; ee0[-3] += ee2[-3];//ee0[-3] = ee0[-3] + ee2[-3]; ee2[-2] = k00_20 * A[0] - k01_21 * A[1]; ee2[-3] = k01_21 * A[0] + k00_20 * A[1]; A += 8; k00_20 = ee0[-4] - ee2[-4]; k01_21 = ee0[-5] - ee2[-5]; ee0[-4] += ee2[-4];//ee0[-4] = ee0[-4] + ee2[-4]; ee0[-5] += ee2[-5];//ee0[-5] = ee0[-5] + ee2[-5]; ee2[-4] = k00_20 * A[0] - k01_21 * A[1]; ee2[-5] = k01_21 * A[0] + k00_20 * A[1]; A += 8; k00_20 = ee0[-6] - ee2[-6]; k01_21 = ee0[-7] - ee2[-7]; ee0[-6] += ee2[-6];//ee0[-6] = ee0[-6] + ee2[-6]; ee0[-7] += ee2[-7];//ee0[-7] = ee0[-7] + ee2[-7]; ee2[-6] = k00_20 * A[0] - k01_21 * A[1]; ee2[-7] = k01_21 * A[0] + k00_20 * A[1]; A += 8; ee0 -= 8; ee2 -= 8; } } static void imdct_step3_inner_r_loop(int lim, float *e, int d0, int k_off, float *A, int k1) { int i; float k00_20, k01_21; float *e0 = e + d0; float *e2 = e0 + k_off; for (i=lim >> 2; i > 0; --i) { k00_20 = e0[-0] - e2[-0]; k01_21 = e0[-1] - e2[-1]; e0[-0] += e2[-0];//e0[-0] = e0[-0] + e2[-0]; e0[-1] += e2[-1];//e0[-1] = e0[-1] + e2[-1]; e2[-0] = (k00_20)*A[0] - (k01_21) * A[1]; e2[-1] = (k01_21)*A[0] + (k00_20) * A[1]; A += k1; k00_20 = e0[-2] - e2[-2]; k01_21 = e0[-3] - e2[-3]; e0[-2] += e2[-2];//e0[-2] = e0[-2] + e2[-2]; e0[-3] += e2[-3];//e0[-3] = e0[-3] + e2[-3]; e2[-2] = (k00_20)*A[0] - (k01_21) * A[1]; e2[-3] = (k01_21)*A[0] + (k00_20) * A[1]; A += k1; k00_20 = e0[-4] - e2[-4]; k01_21 = e0[-5] - e2[-5]; e0[-4] += e2[-4];//e0[-4] = e0[-4] + e2[-4]; e0[-5] += e2[-5];//e0[-5] = e0[-5] + e2[-5]; e2[-4] = (k00_20)*A[0] - (k01_21) * A[1]; e2[-5] = (k01_21)*A[0] + (k00_20) * A[1]; A += k1; k00_20 = e0[-6] - e2[-6]; k01_21 = e0[-7] - e2[-7]; e0[-6] += e2[-6];//e0[-6] = e0[-6] + e2[-6]; e0[-7] += e2[-7];//e0[-7] = e0[-7] + e2[-7]; e2[-6] = (k00_20)*A[0] - (k01_21) * A[1]; e2[-7] = (k01_21)*A[0] + (k00_20) * A[1]; e0 -= 8; e2 -= 8; A += k1; } } static void imdct_step3_inner_s_loop(int n, float *e, int i_off, int k_off, float *A, int a_off, int k0) { int i; float A0 = A[0]; float A1 = A[0+1]; float A2 = A[0+a_off]; float A3 = A[0+a_off+1]; float A4 = A[0+a_off*2+0]; float A5 = A[0+a_off*2+1]; float A6 = A[0+a_off*3+0]; float A7 = A[0+a_off*3+1]; float k00,k11; float *ee0 = e +i_off; float *ee2 = ee0+k_off; for (i=n; i > 0; --i) { k00 = ee0[ 0] - ee2[ 0]; k11 = ee0[-1] - ee2[-1]; ee0[ 0] = ee0[ 0] + ee2[ 0]; ee0[-1] = ee0[-1] + ee2[-1]; ee2[ 0] = (k00) * A0 - (k11) * A1; ee2[-1] = (k11) * A0 + (k00) * A1; k00 = ee0[-2] - ee2[-2]; k11 = ee0[-3] - ee2[-3]; ee0[-2] = ee0[-2] + ee2[-2]; ee0[-3] = ee0[-3] + ee2[-3]; ee2[-2] = (k00) * A2 - (k11) * A3; ee2[-3] = (k11) * A2 + (k00) * A3; k00 = ee0[-4] - ee2[-4]; k11 = ee0[-5] - ee2[-5]; ee0[-4] = ee0[-4] + ee2[-4]; ee0[-5] = ee0[-5] + ee2[-5]; ee2[-4] = (k00) * A4 - (k11) * A5; ee2[-5] = (k11) * A4 + (k00) * A5; k00 = ee0[-6] - ee2[-6]; k11 = ee0[-7] - ee2[-7]; ee0[-6] = ee0[-6] + ee2[-6]; ee0[-7] = ee0[-7] + ee2[-7]; ee2[-6] = (k00) * A6 - (k11) * A7; ee2[-7] = (k11) * A6 + (k00) * A7; ee0 -= k0; ee2 -= k0; } } static __forceinline void iter_54(float *z) { float k00,k11,k22,k33; float y0,y1,y2,y3; k00 = z[ 0] - z[-4]; y0 = z[ 0] + z[-4]; y2 = z[-2] + z[-6]; k22 = z[-2] - z[-6]; z[-0] = y0 + y2; // z0 + z4 + z2 + z6 z[-2] = y0 - y2; // z0 + z4 - z2 - z6 // done with y0,y2 k33 = z[-3] - z[-7]; z[-4] = k00 + k33; // z0 - z4 + z3 - z7 z[-6] = k00 - k33; // z0 - z4 - z3 + z7 // done with k33 k11 = z[-1] - z[-5]; y1 = z[-1] + z[-5]; y3 = z[-3] + z[-7]; z[-1] = y1 + y3; // z1 + z5 + z3 + z7 z[-3] = y1 - y3; // z1 + z5 - z3 - z7 z[-5] = k11 - k22; // z1 - z5 + z2 - z6 z[-7] = k11 + k22; // z1 - z5 - z2 + z6 } static void imdct_step3_inner_s_loop_ld654(int n, float *e, int i_off, float *A, int base_n) { int k_off = -8; int a_off = base_n >> 3; float A2 = A[0+a_off]; float *z = e + i_off; float *base = z - 16 * n; while (z > base) { float k00,k11; k00 = z[-0] - z[-8]; k11 = z[-1] - z[-9]; z[-0] = z[-0] + z[-8]; z[-1] = z[-1] + z[-9]; z[-8] = k00; z[-9] = k11 ; k00 = z[ -2] - z[-10]; k11 = z[ -3] - z[-11]; z[ -2] = z[ -2] + z[-10]; z[ -3] = z[ -3] + z[-11]; z[-10] = (k00+k11) * A2; z[-11] = (k11-k00) * A2; k00 = z[-12] - z[ -4]; // reverse to avoid a unary negation k11 = z[ -5] - z[-13]; z[ -4] = z[ -4] + z[-12]; z[ -5] = z[ -5] + z[-13]; z[-12] = k11; z[-13] = k00; k00 = z[-14] - z[ -6]; // reverse to avoid a unary negation k11 = z[ -7] - z[-15]; z[ -6] = z[ -6] + z[-14]; z[ -7] = z[ -7] + z[-15]; z[-14] = (k00+k11) * A2; z[-15] = (k00-k11) * A2; iter_54(z); iter_54(z-8); z -= 16; } } static void inverse_mdct(float *buffer, int n, vorb *f, int blocktype) { int n2 = n >> 1, n4 = n >> 2, n8 = n >> 3, l; int n3_4 = n - n4, ld; // @OPTIMIZE: reduce register pressure by using fewer variables? int save_point = temp_alloc_save(f); float *buf2 = (float *) temp_alloc(f, n2 * sizeof(*buf2)); float *u=NULL,*v=NULL; // twiddle factors float *A = f->A[blocktype]; // IMDCT algorithm from "The use of multirate filter banks for coding of high quality digital audio" // See notes about bugs in that paper in less-optimal implementation 'inverse_mdct_old' after this function. // kernel from paper // merged: // copy and reflect spectral data // step 0 // note that it turns out that the items added together during // this step are, in fact, being added to themselves (as reflected // by step 0). inexplicable inefficiency! this became obvious // once I combined the passes. // so there's a missing 'times 2' here (for adding X to itself). // this propogates through linearly to the end, where the numbers // are 1/2 too small, and need to be compensated for. { float *d,*e, *AA, *e_stop; d = &buf2[n2-2]; AA = A; e = &buffer[0]; e_stop = &buffer[n2]; while (e != e_stop) { d[1] = (e[0] * AA[0] - e[2]*AA[1]); d[0] = (e[0] * AA[1] + e[2]*AA[0]); d -= 2; AA += 2; e += 4; } e = &buffer[n2-3]; while (d >= buf2) { d[1] = (-e[2] * AA[0] - -e[0]*AA[1]); d[0] = (-e[2] * AA[1] + -e[0]*AA[0]); d -= 2; AA += 2; e -= 4; } } // now we use symbolic names for these, so that we can // possibly swap their meaning as we change which operations // are in place u = buffer; v = buf2; // step 2 (paper output is w, now u) // this could be in place, but the data ends up in the wrong // place... _somebody_'s got to swap it, so this is nominated { float *AA = &A[n2-8]; float *d0,*d1, *e0, *e1; e0 = &v[n4]; e1 = &v[0]; d0 = &u[n4]; d1 = &u[0]; while (AA >= A) { float v40_20, v41_21; v41_21 = e0[1] - e1[1]; v40_20 = e0[0] - e1[0]; d0[1] = e0[1] + e1[1]; d0[0] = e0[0] + e1[0]; d1[1] = v41_21*AA[4] - v40_20*AA[5]; d1[0] = v40_20*AA[4] + v41_21*AA[5]; v41_21 = e0[3] - e1[3]; v40_20 = e0[2] - e1[2]; d0[3] = e0[3] + e1[3]; d0[2] = e0[2] + e1[2]; d1[3] = v41_21*AA[0] - v40_20*AA[1]; d1[2] = v40_20*AA[0] + v41_21*AA[1]; AA -= 8; d0 += 4; d1 += 4; e0 += 4; e1 += 4; } } // step 3 ld = ilog(n) - 1; // ilog is off-by-one from normal definitions // optimized step 3: // the original step3 loop can be nested r inside s or s inside r; // it's written originally as s inside r, but this is dumb when r // iterates many times, and s few. So I have two copies of it and // switch between them halfway. // this is iteration 0 of step 3 imdct_step3_iter0_loop(n >> 4, u, n2-1-n4*0, -(n >> 3), A); imdct_step3_iter0_loop(n >> 4, u, n2-1-n4*1, -(n >> 3), A); // this is iteration 1 of step 3 imdct_step3_inner_r_loop(n >> 5, u, n2-1 - n8*0, -(n >> 4), A, 16); imdct_step3_inner_r_loop(n >> 5, u, n2-1 - n8*1, -(n >> 4), A, 16); imdct_step3_inner_r_loop(n >> 5, u, n2-1 - n8*2, -(n >> 4), A, 16); imdct_step3_inner_r_loop(n >> 5, u, n2-1 - n8*3, -(n >> 4), A, 16); l=2; for (; l < (ld-3)>>1; ++l) { int k0 = n >> (l+2), k0_2 = k0>>1; int lim = 1 << (l+1); int i; for (i=0; i < lim; ++i) imdct_step3_inner_r_loop(n >> (l+4), u, n2-1 - k0*i, -k0_2, A, 1 << (l+3)); } for (; l < ld-6; ++l) { int k0 = n >> (l+2), k1 = 1 << (l+3), k0_2 = k0>>1; int rlim = n >> (l+6), r; int lim = 1 << (l+1); int i_off; float *A0 = A; i_off = n2-1; for (r=rlim; r > 0; --r) { imdct_step3_inner_s_loop(lim, u, i_off, -k0_2, A0, k1, k0); A0 += k1*4; i_off -= 8; } } // iterations with count: // ld-6,-5,-4 all interleaved together // the big win comes from getting rid of needless flops // due to the constants on pass 5 & 4 being all 1 and 0; // combining them to be simultaneous to improve cache made little difference imdct_step3_inner_s_loop_ld654(n >> 5, u, n2-1, A, n); // output is u // step 4, 5, and 6 // cannot be in-place because of step 5 { uint16 *bitrev = f->bit_reverse[blocktype]; // weirdly, I'd have thought reading sequentially and writing // erratically would have been better than vice-versa, but in // fact that's not what my testing showed. (That is, with // j = bitreverse(i), do you read i and write j, or read j and write i.) float *d0 = &v[n4-4]; float *d1 = &v[n2-4]; while (d0 >= v) { int k4; k4 = bitrev[0]; d1[3] = u[k4+0]; d1[2] = u[k4+1]; d0[3] = u[k4+2]; d0[2] = u[k4+3]; k4 = bitrev[1]; d1[1] = u[k4+0]; d1[0] = u[k4+1]; d0[1] = u[k4+2]; d0[0] = u[k4+3]; d0 -= 4; d1 -= 4; bitrev += 2; } } // (paper output is u, now v) // data must be in buf2 assert(v == buf2); // step 7 (paper output is v, now v) // this is now in place { float *C = f->C[blocktype]; float *d, *e; d = v; e = v + n2 - 4; while (d < e) { float a02,a11,b0,b1,b2,b3; a02 = d[0] - e[2]; a11 = d[1] + e[3]; b0 = C[1]*a02 + C[0]*a11; b1 = C[1]*a11 - C[0]*a02; b2 = d[0] + e[ 2]; b3 = d[1] - e[ 3]; d[0] = b2 + b0; d[1] = b3 + b1; e[2] = b2 - b0; e[3] = b1 - b3; a02 = d[2] - e[0]; a11 = d[3] + e[1]; b0 = C[3]*a02 + C[2]*a11; b1 = C[3]*a11 - C[2]*a02; b2 = d[2] + e[ 0]; b3 = d[3] - e[ 1]; d[2] = b2 + b0; d[3] = b3 + b1; e[0] = b2 - b0; e[1] = b1 - b3; C += 4; d += 4; e -= 4; } } // data must be in buf2 // step 8+decode (paper output is X, now buffer) // this generates pairs of data a la 8 and pushes them directly through // the decode kernel (pushing rather than pulling) to avoid having // to make another pass later // this cannot POSSIBLY be in place, so we refer to the buffers directly { float *d0,*d1,*d2,*d3; float *B = f->B[blocktype] + n2 - 8; float *e = buf2 + n2 - 8; d0 = &buffer[0]; d1 = &buffer[n2-4]; d2 = &buffer[n2]; d3 = &buffer[n-4]; while (e >= v) { float p0,p1,p2,p3; p3 = e[6]*B[7] - e[7]*B[6]; p2 = -e[6]*B[6] - e[7]*B[7]; d0[0] = p3; d1[3] = - p3; d2[0] = p2; d3[3] = p2; p1 = e[4]*B[5] - e[5]*B[4]; p0 = -e[4]*B[4] - e[5]*B[5]; d0[1] = p1; d1[2] = - p1; d2[1] = p0; d3[2] = p0; p3 = e[2]*B[3] - e[3]*B[2]; p2 = -e[2]*B[2] - e[3]*B[3]; d0[2] = p3; d1[1] = - p3; d2[2] = p2; d3[1] = p2; p1 = e[0]*B[1] - e[1]*B[0]; p0 = -e[0]*B[0] - e[1]*B[1]; d0[3] = p1; d1[0] = - p1; d2[3] = p0; d3[0] = p0; B -= 8; e -= 8; d0 += 4; d2 += 4; d1 -= 4; d3 -= 4; } } temp_alloc_restore(f,save_point); } #if 0 // this is the original version of the above code, if you want to optimize it from scratch void inverse_mdct_naive(float *buffer, int n) { float s; float A[1 << 12], B[1 << 12], C[1 << 11]; int i,k,k2,k4, n2 = n >> 1, n4 = n >> 2, n8 = n >> 3, l; int n3_4 = n - n4, ld; // how can they claim this only uses N words?! // oh, because they're only used sparsely, whoops float u[1 << 13], X[1 << 13], v[1 << 13], w[1 << 13]; // set up twiddle factors for (k=k2=0; k < n4; ++k,k2+=2) { A[k2 ] = (float) cos(4*k*M_PI/n); A[k2+1] = (float) -sin(4*k*M_PI/n); B[k2 ] = (float) cos((k2+1)*M_PI/n/2); B[k2+1] = (float) sin((k2+1)*M_PI/n/2); } for (k=k2=0; k < n8; ++k,k2+=2) { C[k2 ] = (float) cos(2*(k2+1)*M_PI/n); C[k2+1] = (float) -sin(2*(k2+1)*M_PI/n); } // IMDCT algorithm from "The use of multirate filter banks for coding of high quality digital audio" // Note there are bugs in that pseudocode, presumably due to them attempting // to rename the arrays nicely rather than representing the way their actual // implementation bounces buffers back and forth. As a result, even in the // "some formulars corrected" version, a direct implementation fails. These // are noted below as "paper bug". // copy and reflect spectral data for (k=0; k < n2; ++k) u[k] = buffer[k]; for ( ; k < n ; ++k) u[k] = -buffer[n - k - 1]; // kernel from paper // step 1 for (k=k2=k4=0; k < n4; k+=1, k2+=2, k4+=4) { v[n-k4-1] = (u[k4] - u[n-k4-1]) * A[k2] - (u[k4+2] - u[n-k4-3])*A[k2+1]; v[n-k4-3] = (u[k4] - u[n-k4-1]) * A[k2+1] + (u[k4+2] - u[n-k4-3])*A[k2]; } // step 2 for (k=k4=0; k < n8; k+=1, k4+=4) { w[n2+3+k4] = v[n2+3+k4] + v[k4+3]; w[n2+1+k4] = v[n2+1+k4] + v[k4+1]; w[k4+3] = (v[n2+3+k4] - v[k4+3])*A[n2-4-k4] - (v[n2+1+k4]-v[k4+1])*A[n2-3-k4]; w[k4+1] = (v[n2+1+k4] - v[k4+1])*A[n2-4-k4] + (v[n2+3+k4]-v[k4+3])*A[n2-3-k4]; } // step 3 ld = ilog(n) - 1; // ilog is off-by-one from normal definitions for (l=0; l < ld-3; ++l) { int k0 = n >> (l+2), k1 = 1 << (l+3); int rlim = n >> (l+4), r4, r; int s2lim = 1 << (l+2), s2; for (r=r4=0; r < rlim; r4+=4,++r) { for (s2=0; s2 < s2lim; s2+=2) { u[n-1-k0*s2-r4] = w[n-1-k0*s2-r4] + w[n-1-k0*(s2+1)-r4]; u[n-3-k0*s2-r4] = w[n-3-k0*s2-r4] + w[n-3-k0*(s2+1)-r4]; u[n-1-k0*(s2+1)-r4] = (w[n-1-k0*s2-r4] - w[n-1-k0*(s2+1)-r4]) * A[r*k1] - (w[n-3-k0*s2-r4] - w[n-3-k0*(s2+1)-r4]) * A[r*k1+1]; u[n-3-k0*(s2+1)-r4] = (w[n-3-k0*s2-r4] - w[n-3-k0*(s2+1)-r4]) * A[r*k1] + (w[n-1-k0*s2-r4] - w[n-1-k0*(s2+1)-r4]) * A[r*k1+1]; } } if (l+1 < ld-3) { // paper bug: ping-ponging of u&w here is omitted memcpy(w, u, sizeof(u)); } } // step 4 for (i=0; i < n8; ++i) { int j = bit_reverse(i) >> (32-ld+3); assert(j < n8); if (i == j) { // paper bug: original code probably swapped in place; if copying, // need to directly copy in this case int i8 = i << 3; v[i8+1] = u[i8+1]; v[i8+3] = u[i8+3]; v[i8+5] = u[i8+5]; v[i8+7] = u[i8+7]; } else if (i < j) { int i8 = i << 3, j8 = j << 3; v[j8+1] = u[i8+1], v[i8+1] = u[j8 + 1]; v[j8+3] = u[i8+3], v[i8+3] = u[j8 + 3]; v[j8+5] = u[i8+5], v[i8+5] = u[j8 + 5]; v[j8+7] = u[i8+7], v[i8+7] = u[j8 + 7]; } } // step 5 for (k=0; k < n2; ++k) { w[k] = v[k*2+1]; } // step 6 for (k=k2=k4=0; k < n8; ++k, k2 += 2, k4 += 4) { u[n-1-k2] = w[k4]; u[n-2-k2] = w[k4+1]; u[n3_4 - 1 - k2] = w[k4+2]; u[n3_4 - 2 - k2] = w[k4+3]; } // step 7 for (k=k2=0; k < n8; ++k, k2 += 2) { v[n2 + k2 ] = ( u[n2 + k2] + u[n-2-k2] + C[k2+1]*(u[n2+k2]-u[n-2-k2]) + C[k2]*(u[n2+k2+1]+u[n-2-k2+1]))/2; v[n-2 - k2] = ( u[n2 + k2] + u[n-2-k2] - C[k2+1]*(u[n2+k2]-u[n-2-k2]) - C[k2]*(u[n2+k2+1]+u[n-2-k2+1]))/2; v[n2+1+ k2] = ( u[n2+1+k2] - u[n-1-k2] + C[k2+1]*(u[n2+1+k2]+u[n-1-k2]) - C[k2]*(u[n2+k2]-u[n-2-k2]))/2; v[n-1 - k2] = (-u[n2+1+k2] + u[n-1-k2] + C[k2+1]*(u[n2+1+k2]+u[n-1-k2]) - C[k2]*(u[n2+k2]-u[n-2-k2]))/2; } // step 8 for (k=k2=0; k < n4; ++k,k2 += 2) { X[k] = v[k2+n2]*B[k2 ] + v[k2+1+n2]*B[k2+1]; X[n2-1-k] = v[k2+n2]*B[k2+1] - v[k2+1+n2]*B[k2 ]; } // decode kernel to output // determined the following value experimentally // (by first figuring out what made inverse_mdct_slow work); then matching that here // (probably vorbis encoder premultiplies by n or n/2, to save it on the decoder?) s = 0.5; // theoretically would be n4 // [[[ note! the s value of 0.5 is compensated for by the B[] in the current code, // so it needs to use the "old" B values to behave correctly, or else // set s to 1.0 ]]] for (i=0; i < n4 ; ++i) buffer[i] = s * X[i+n4]; for ( ; i < n3_4; ++i) buffer[i] = -s * X[n3_4 - i - 1]; for ( ; i < n ; ++i) buffer[i] = -s * X[i - n3_4]; } #endif static float *get_window(vorb *f, int len) { len <<= 1; if (len == f->blocksize_0) return f->window[0]; if (len == f->blocksize_1) return f->window[1]; assert(0); return NULL; } #ifndef STB_VORBIS_NO_DEFER_FLOOR typedef int16 YTYPE; #else typedef int YTYPE; #endif static int do_floor(vorb *f, Mapping *map, int i, int n, float *target, YTYPE *finalY, uint8 *step2_flag) { int n2 = n >> 1; int s = map->chan[i].mux, floor; floor = map->submap_floor[s]; if (f->floor_types[floor] == 0) { return error(f, VORBIS_invalid_stream); } else { Floor1 *g = &f->floor_config[floor].floor1; int j,q; int lx = 0, ly = finalY[0] * g->floor1_multiplier; for (q=1; q < g->values; ++q) { j = g->sorted_order[q]; #ifndef STB_VORBIS_NO_DEFER_FLOOR if (finalY[j] >= 0) #else if (step2_flag[j]) #endif { int hy = finalY[j] * g->floor1_multiplier; int hx = g->Xlist[j]; draw_line(target, lx,ly, hx,hy, n2); lx = hx, ly = hy; } } if (lx < n2) // optimization of: draw_line(target, lx,ly, n,ly, n2); for (j=lx; j < n2; ++j) LINE_OP(target[j], inverse_db_table[ly]); } return TRUE; } static int vorbis_decode_initial(vorb *f, int *p_left_start, int *p_left_end, int *p_right_start, int *p_right_end, int *mode) { Mode *m; int i, n, prev, next, window_center; f->channel_buffer_start = f->channel_buffer_end = 0; retry: if (f->eof) return FALSE; if (!maybe_start_packet(f)) return FALSE; // check packet type if (get_bits(f,1) != 0) { if (IS_PUSH_MODE(f)) return error(f,VORBIS_bad_packet_type); while (EOP != get8_packet(f)); goto retry; } if (f->alloc.alloc_buffer) assert(f->alloc.alloc_buffer_length_in_bytes == f->temp_offset); i = get_bits(f, ilog(f->mode_count-1)); if (i == EOP) return FALSE; if (i >= f->mode_count) return FALSE; *mode = i; m = f->mode_config + i; if (m->blockflag) { n = f->blocksize_1; prev = get_bits(f,1); next = get_bits(f,1); } else { prev = next = 0; n = f->blocksize_0; } // WINDOWING window_center = n >> 1; if (m->blockflag && !prev) { *p_left_start = (n - f->blocksize_0) >> 2; *p_left_end = (n + f->blocksize_0) >> 2; } else { *p_left_start = 0; *p_left_end = window_center; } if (m->blockflag && !next) { *p_right_start = (n*3 - f->blocksize_0) >> 2; *p_right_end = (n*3 + f->blocksize_0) >> 2; } else { *p_right_start = window_center; *p_right_end = n; } return TRUE; } static int vorbis_decode_packet_rest(vorb *f, int *len, Mode *m, int left_start, int left_end, int right_start, int right_end, int *p_left) { Mapping *map; int i,j,k,n,n2; int zero_channel[256]; int really_zero_channel[256]; int window_center; // WINDOWING n = f->blocksize[m->blockflag]; window_center = n >> 1; map = &f->mapping[m->mapping]; // FLOORS n2 = n >> 1; stb_prof(1); for (i=0; i < f->channels; ++i) { int s = map->chan[i].mux, floor; zero_channel[i] = FALSE; floor = map->submap_floor[s]; if (f->floor_types[floor] == 0) { return error(f, VORBIS_invalid_stream); } else { Floor1 *g = &f->floor_config[floor].floor1; if (get_bits(f, 1)) { short *finalY; uint8 step2_flag[256]; static int range_list[4] = { 256, 128, 86, 64 }; int range = range_list[g->floor1_multiplier-1]; int offset = 2; finalY = f->finalY[i]; finalY[0] = get_bits(f, ilog(range)-1); finalY[1] = get_bits(f, ilog(range)-1); for (j=0; j < g->partitions; ++j) { int pclass = g->partition_class_list[j]; int cdim = g->class_dimensions[pclass]; int cbits = g->class_subclasses[pclass]; int csub = (1 << cbits)-1; int cval = 0; if (cbits) { Codebook *c = f->codebooks + g->class_masterbooks[pclass]; DECODE(cval,f,c); } for (k=0; k < cdim; ++k) { int book = g->subclass_books[pclass][cval & csub]; cval = cval >> cbits; if (book >= 0) { int temp; Codebook *c = f->codebooks + book; DECODE(temp,f,c); finalY[offset++] = temp; } else finalY[offset++] = 0; } } if (f->valid_bits == INVALID_BITS) goto error; // behavior according to spec step2_flag[0] = step2_flag[1] = 1; for (j=2; j < g->values; ++j) { int low, high, pred, highroom, lowroom, room, val; low = g->neighbors[j][0]; high = g->neighbors[j][1]; //neighbors(g->Xlist, j, &low, &high); pred = predict_point(g->Xlist[j], g->Xlist[low], g->Xlist[high], finalY[low], finalY[high]); val = finalY[j]; highroom = range - pred; lowroom = pred; if (highroom < lowroom) room = highroom * 2; else room = lowroom * 2; if (val) { step2_flag[low] = step2_flag[high] = 1; step2_flag[j] = 1; if (val >= room) if (highroom > lowroom) finalY[j] = val - lowroom + pred; else finalY[j] = pred - val + highroom - 1; else if (val & 1) finalY[j] = pred - ((val+1)>>1); else finalY[j] = pred + (val>>1); } else { step2_flag[j] = 0; finalY[j] = pred; } } #ifdef STB_VORBIS_NO_DEFER_FLOOR do_floor(f, map, i, n, f->floor_buffers[i], finalY, step2_flag); #else // defer final floor computation until _after_ residue for (j=0; j < g->values; ++j) { if (!step2_flag[j]) finalY[j] = -1; } #endif } else { error: zero_channel[i] = TRUE; } // So we just defer everything else to later // at this point we've decoded the floor into buffer } } stb_prof(0); // at this point we've decoded all floors if (f->alloc.alloc_buffer) assert(f->alloc.alloc_buffer_length_in_bytes == f->temp_offset); // re-enable coupled channels if necessary memcpy(really_zero_channel, zero_channel, sizeof(really_zero_channel[0]) * f->channels); for (i=0; i < map->coupling_steps; ++i) if (!zero_channel[map->chan[i].magnitude] || !zero_channel[map->chan[i].angle]) { zero_channel[map->chan[i].magnitude] = zero_channel[map->chan[i].angle] = FALSE; } // RESIDUE DECODE for (i=0; i < map->submaps; ++i) { float *residue_buffers[STB_VORBIS_MAX_CHANNELS]; int r,t; uint8 do_not_decode[256]; int ch = 0; for (j=0; j < f->channels; ++j) { if (map->chan[j].mux == i) { if (zero_channel[j]) { do_not_decode[ch] = TRUE; residue_buffers[ch] = NULL; } else { do_not_decode[ch] = FALSE; residue_buffers[ch] = f->channel_buffers[j]; } ++ch; } } r = map->submap_residue[i]; t = f->residue_types[r]; decode_residue(f, residue_buffers, ch, n2, r, do_not_decode); } if (f->alloc.alloc_buffer) assert(f->alloc.alloc_buffer_length_in_bytes == f->temp_offset); // INVERSE COUPLING stb_prof(14); for (i = map->coupling_steps-1; i >= 0; --i) { int n2 = n >> 1; float *m = f->channel_buffers[map->chan[i].magnitude]; float *a = f->channel_buffers[map->chan[i].angle ]; for (j=0; j < n2; ++j) { float a2,m2; if (m[j] > 0) if (a[j] > 0) m2 = m[j], a2 = m[j] - a[j]; else a2 = m[j], m2 = m[j] + a[j]; else if (a[j] > 0) m2 = m[j], a2 = m[j] + a[j]; else a2 = m[j], m2 = m[j] - a[j]; m[j] = m2; a[j] = a2; } } // finish decoding the floors #ifndef STB_VORBIS_NO_DEFER_FLOOR stb_prof(15); for (i=0; i < f->channels; ++i) { if (really_zero_channel[i]) { memset(f->channel_buffers[i], 0, sizeof(*f->channel_buffers[i]) * n2); } else { do_floor(f, map, i, n, f->channel_buffers[i], f->finalY[i], NULL); } } #else for (i=0; i < f->channels; ++i) { if (really_zero_channel[i]) { memset(f->channel_buffers[i], 0, sizeof(*f->channel_buffers[i]) * n2); } else { for (j=0; j < n2; ++j) f->channel_buffers[i][j] *= f->floor_buffers[i][j]; } } #endif // INVERSE MDCT stb_prof(16); for (i=0; i < f->channels; ++i) inverse_mdct(f->channel_buffers[i], n, f, m->blockflag); stb_prof(0); // this shouldn't be necessary, unless we exited on an error // and want to flush to get to the next packet flush_packet(f); if (f->first_decode) { // assume we start so first non-discarded sample is sample 0 // this isn't to spec, but spec would require us to read ahead // and decode the size of all current frames--could be done, // but presumably it's not a commonly used feature f->current_loc = -n2; // start of first frame is positioned for discard // we might have to discard samples "from" the next frame too, // if we're lapping a large block then a small at the start? f->discard_samples_deferred = n - right_end; f->current_loc_valid = TRUE; f->first_decode = FALSE; } else if (f->discard_samples_deferred) { left_start += f->discard_samples_deferred; *p_left = left_start; f->discard_samples_deferred = 0; } else if (f->previous_length == 0 && f->current_loc_valid) { // we're recovering from a seek... that means we're going to discard // the samples from this packet even though we know our position from // the last page header, so we need to update the position based on // the discarded samples here // but wait, the code below is going to add this in itself even // on a discard, so we don't need to do it here... } // check if we have ogg information about the sample # for this packet if (f->last_seg_which == f->end_seg_with_known_loc) { // if we have a valid current loc, and this is final: if (f->current_loc_valid && (f->page_flag & PAGEFLAG_last_page)) { uint32 current_end = f->known_loc_for_packet - (n-right_end); // then let's infer the size of the (probably) short final frame if (current_end < f->current_loc + right_end) { if (current_end < f->current_loc) { // negative truncation, that's impossible! *len = 0; } else { *len = current_end - f->current_loc; } *len += left_start; f->current_loc += *len; return TRUE; } } // otherwise, just set our sample loc // guess that the ogg granule pos refers to the _middle_ of the // last frame? // set f->current_loc to the position of left_start f->current_loc = f->known_loc_for_packet - (n2-left_start); f->current_loc_valid = TRUE; } if (f->current_loc_valid) f->current_loc += (right_start - left_start); if (f->alloc.alloc_buffer) assert(f->alloc.alloc_buffer_length_in_bytes == f->temp_offset); *len = right_end; // ignore samples after the window goes to 0 return TRUE; } static int vorbis_decode_packet(vorb *f, int *len, int *p_left, int *p_right) { int mode, left_end, right_end; if (!vorbis_decode_initial(f, p_left, &left_end, p_right, &right_end, &mode)) return 0; return vorbis_decode_packet_rest(f, len, f->mode_config + mode, *p_left, left_end, *p_right, right_end, p_left); } static int vorbis_finish_frame(stb_vorbis *f, int len, int left, int right) { int prev,i,j; // we use right&left (the start of the right- and left-window sin()-regions) // to determine how much to return, rather than inferring from the rules // (same result, clearer code); 'left' indicates where our sin() window // starts, therefore where the previous window's right edge starts, and // therefore where to start mixing from the previous buffer. 'right' // indicates where our sin() ending-window starts, therefore that's where // we start saving, and where our returned-data ends. // mixin from previous window if (f->previous_length) { int i,j, n = f->previous_length; float *w = get_window(f, n); for (i=0; i < f->channels; ++i) { for (j=0; j < n; ++j) f->channel_buffers[i][left+j] = f->channel_buffers[i][left+j]*w[ j] + f->previous_window[i][ j]*w[n-1-j]; } } prev = f->previous_length; // last half of this data becomes previous window f->previous_length = len - right; // @OPTIMIZE: could avoid this copy by double-buffering the // output (flipping previous_window with channel_buffers), but // then previous_window would have to be 2x as large, and // channel_buffers couldn't be temp mem (although they're NOT // currently temp mem, they could be (unless we want to level // performance by spreading out the computation)) for (i=0; i < f->channels; ++i) for (j=0; right+j < len; ++j) f->previous_window[i][j] = f->channel_buffers[i][right+j]; if (!prev) // there was no previous packet, so this data isn't valid... // this isn't entirely true, only the would-have-overlapped data // isn't valid, but this seems to be what the spec requires return 0; // truncate a short frame if (len < right) right = len; f->samples_output += right-left; return right - left; } static void vorbis_pump_first_frame(stb_vorbis *f) { int len, right, left; if (vorbis_decode_packet(f, &len, &left, &right)) vorbis_finish_frame(f, len, left, right); } #ifndef STB_VORBIS_NO_PUSHDATA_API static int is_whole_packet_present(stb_vorbis *f, int end_page) { // make sure that we have the packet available before continuing... // this requires a full ogg parse, but we know we can fetch from f->stream // instead of coding this out explicitly, we could save the current read state, // read the next packet with get8() until end-of-packet, check f->eof, then // reset the state? but that would be slower, esp. since we'd have over 256 bytes // of state to restore (primarily the page segment table) int s = f->next_seg, first = TRUE; uint8 *p = f->stream; if (s != -1) { // if we're not starting the packet with a 'continue on next page' flag for (; s < f->segment_count; ++s) { p += f->segments[s]; if (f->segments[s] < 255) // stop at first short segment break; } // either this continues, or it ends it... if (end_page) if (s < f->segment_count-1) return error(f, VORBIS_invalid_stream); if (s == f->segment_count) s = -1; // set 'crosses page' flag if (p > f->stream_end) return error(f, VORBIS_need_more_data); first = FALSE; } for (; s == -1;) { uint8 *q; int n; // check that we have the page header ready if (p + 26 >= f->stream_end) return error(f, VORBIS_need_more_data); // validate the page if (memcmp(p, ogg_page_header, 4)) return error(f, VORBIS_invalid_stream); if (p[4] != 0) return error(f, VORBIS_invalid_stream); if (first) { // the first segment must NOT have 'continued_packet', later ones MUST if (f->previous_length) if ((p[5] & PAGEFLAG_continued_packet)) return error(f, VORBIS_invalid_stream); // if no previous length, we're resynching, so we can come in on a continued-packet, // which we'll just drop } else { if (!(p[5] & PAGEFLAG_continued_packet)) return error(f, VORBIS_invalid_stream); } n = p[26]; // segment counts q = p+27; // q points to segment table p = q + n; // advance past header // make sure we've read the segment table if (p > f->stream_end) return error(f, VORBIS_need_more_data); for (s=0; s < n; ++s) { p += q[s]; if (q[s] < 255) break; } if (end_page) if (s < n-1) return error(f, VORBIS_invalid_stream); if (s == f->segment_count) s = -1; // set 'crosses page' flag if (p > f->stream_end) return error(f, VORBIS_need_more_data); first = FALSE; } return TRUE; } #endif // !STB_VORBIS_NO_PUSHDATA_API static int start_decoder(vorb *f) { uint8 header[6], x,y; int len,i,j,k, max_submaps = 0; int longest_floorlist=0; // first page, first packet if (!start_page(f)) return FALSE; // validate page flag if (!(f->page_flag & PAGEFLAG_first_page)) return error(f, VORBIS_invalid_first_page); if (f->page_flag & PAGEFLAG_last_page) return error(f, VORBIS_invalid_first_page); if (f->page_flag & PAGEFLAG_continued_packet) return error(f, VORBIS_invalid_first_page); // check for expected packet length if (f->segment_count != 1) return error(f, VORBIS_invalid_first_page); if (f->segments[0] != 30) return error(f, VORBIS_invalid_first_page); // read packet // check packet header if (get8(f) != VORBIS_packet_id) return error(f, VORBIS_invalid_first_page); if (!getn(f, header, 6)) return error(f, VORBIS_unexpected_eof); if (!vorbis_validate(header)) return error(f, VORBIS_invalid_first_page); // vorbis_version if (get32(f) != 0) return error(f, VORBIS_invalid_first_page); f->channels = get8(f); if (!f->channels) return error(f, VORBIS_invalid_first_page); if (f->channels > STB_VORBIS_MAX_CHANNELS) return error(f, VORBIS_too_many_channels); f->sample_rate = get32(f); if (!f->sample_rate) return error(f, VORBIS_invalid_first_page); get32(f); // bitrate_maximum get32(f); // bitrate_nominal get32(f); // bitrate_minimum x = get8(f); { int log0,log1; log0 = x & 15; log1 = x >> 4; f->blocksize_0 = 1 << log0; f->blocksize_1 = 1 << log1; if (log0 < 6 || log0 > 13) return error(f, VORBIS_invalid_setup); if (log1 < 6 || log1 > 13) return error(f, VORBIS_invalid_setup); if (log0 > log1) return error(f, VORBIS_invalid_setup); } // framing_flag x = get8(f); if (!(x & 1)) return error(f, VORBIS_invalid_first_page); // second packet! if (!start_page(f)) return FALSE; if (!start_packet(f)) return FALSE; do { len = next_segment(f); skip(f, len); f->bytes_in_seg = 0; } while (len); // third packet! if (!start_packet(f)) return FALSE; #ifndef STB_VORBIS_NO_PUSHDATA_API if (IS_PUSH_MODE(f)) { if (!is_whole_packet_present(f, TRUE)) { // convert error in ogg header to write type if (f->error == VORBIS_invalid_stream) f->error = VORBIS_invalid_setup; return FALSE; } } #endif crc32_init(); // always init it, to avoid multithread race conditions if (get8_packet(f) != VORBIS_packet_setup) return error(f, VORBIS_invalid_setup); for (i=0; i < 6; ++i) header[i] = get8_packet(f); if (!vorbis_validate(header)) return error(f, VORBIS_invalid_setup); // codebooks f->codebook_count = get_bits(f,8) + 1; f->codebooks = (Codebook *) setup_malloc(f, sizeof(*f->codebooks) * f->codebook_count); if (f->codebooks == NULL) return error(f, VORBIS_outofmem); memset(f->codebooks, 0, sizeof(*f->codebooks) * f->codebook_count); for (i=0; i < f->codebook_count; ++i) { uint32 *values; int ordered, sorted_count; int total=0; uint8 *lengths; Codebook *c = f->codebooks+i; x = get_bits(f, 8); if (x != 0x42) return error(f, VORBIS_invalid_setup); x = get_bits(f, 8); if (x != 0x43) return error(f, VORBIS_invalid_setup); x = get_bits(f, 8); if (x != 0x56) return error(f, VORBIS_invalid_setup); x = get_bits(f, 8); c->dimensions = (get_bits(f, 8)<<8) + x; x = get_bits(f, 8); y = get_bits(f, 8); c->entries = (get_bits(f, 8)<<16) + (y<<8) + x; ordered = get_bits(f,1); c->sparse = ordered ? 0 : get_bits(f,1); if (c->sparse) lengths = (uint8 *) setup_temp_malloc(f, c->entries); else lengths = c->codeword_lengths = (uint8 *) setup_malloc(f, c->entries); if (!lengths) return error(f, VORBIS_outofmem); if (ordered) { int current_entry = 0; int current_length = get_bits(f,5) + 1; while (current_entry < c->entries) { int limit = c->entries - current_entry; int n = get_bits(f, ilog(limit)); if (current_entry + n > (int) c->entries) { return error(f, VORBIS_invalid_setup); } memset(lengths + current_entry, current_length, n); current_entry += n; ++current_length; } } else { for (j=0; j < c->entries; ++j) { int present = c->sparse ? get_bits(f,1) : 1; if (present) { lengths[j] = get_bits(f, 5) + 1; ++total; } else { lengths[j] = NO_CODE; } } } if (c->sparse && total >= c->entries >> 2) { // convert sparse items to non-sparse! if (c->entries > (int) f->setup_temp_memory_required) f->setup_temp_memory_required = c->entries; c->codeword_lengths = (uint8 *) setup_malloc(f, c->entries); memcpy(c->codeword_lengths, lengths, c->entries); setup_temp_free(f, lengths, c->entries); // note this is only safe if there have been no intervening temp mallocs! lengths = c->codeword_lengths; c->sparse = 0; } // compute the size of the sorted tables if (c->sparse) { sorted_count = total; //assert(total != 0); } else { sorted_count = 0; #ifndef STB_VORBIS_NO_HUFFMAN_BINARY_SEARCH for (j=0; j < c->entries; ++j) if (lengths[j] > STB_VORBIS_FAST_HUFFMAN_LENGTH && lengths[j] != NO_CODE) ++sorted_count; #endif } c->sorted_entries = sorted_count; values = NULL; if (!c->sparse) { c->codewords = (uint32 *) setup_malloc(f, sizeof(c->codewords[0]) * c->entries); if (!c->codewords) return error(f, VORBIS_outofmem); } else { unsigned int size; if (c->sorted_entries) { c->codeword_lengths = (uint8 *) setup_malloc(f, c->sorted_entries); if (!c->codeword_lengths) return error(f, VORBIS_outofmem); c->codewords = (uint32 *) setup_temp_malloc(f, sizeof(*c->codewords) * c->sorted_entries); if (!c->codewords) return error(f, VORBIS_outofmem); values = (uint32 *) setup_temp_malloc(f, sizeof(*values) * c->sorted_entries); if (!values) return error(f, VORBIS_outofmem); } size = c->entries + (sizeof(*c->codewords) + sizeof(*values)) * c->sorted_entries; if (size > f->setup_temp_memory_required) f->setup_temp_memory_required = size; } if (!compute_codewords(c, lengths, c->entries, values)) { if (c->sparse) setup_temp_free(f, values, 0); return error(f, VORBIS_invalid_setup); } if (c->sorted_entries) { // allocate an extra slot for sentinels c->sorted_codewords = (uint32 *) setup_malloc(f, sizeof(*c->sorted_codewords) * (c->sorted_entries+1)); // allocate an extra slot at the front so that c->sorted_values[-1] is defined // so that we can catch that case without an extra if c->sorted_values = ( int *) setup_malloc(f, sizeof(*c->sorted_values ) * (c->sorted_entries+1)); if (c->sorted_values) { ++c->sorted_values; c->sorted_values[-1] = -1; } compute_sorted_huffman(c, lengths, values); } if (c->sparse) { setup_temp_free(f, values, sizeof(*values)*c->sorted_entries); setup_temp_free(f, c->codewords, sizeof(*c->codewords)*c->sorted_entries); setup_temp_free(f, lengths, c->entries); c->codewords = NULL; } compute_accelerated_huffman(c); c->lookup_type = get_bits(f, 4); if (c->lookup_type > 2) return error(f, VORBIS_invalid_setup); if (c->lookup_type > 0) { uint16 *mults; c->minimum_value = float32_unpack(get_bits(f, 32)); c->delta_value = float32_unpack(get_bits(f, 32)); c->value_bits = get_bits(f, 4)+1; c->sequence_p = get_bits(f,1); if (c->lookup_type == 1) { c->lookup_values = lookup1_values(c->entries, c->dimensions); } else { c->lookup_values = c->entries * c->dimensions; } mults = (uint16 *) setup_temp_malloc(f, sizeof(mults[0]) * c->lookup_values); if (mults == NULL) return error(f, VORBIS_outofmem); for (j=0; j < (int) c->lookup_values; ++j) { int q = get_bits(f, c->value_bits); if (q == EOP) { setup_temp_free(f,mults,sizeof(mults[0])*c->lookup_values); return error(f, VORBIS_invalid_setup); } mults[j] = q; } #ifndef STB_VORBIS_DIVIDES_IN_CODEBOOK if (c->lookup_type == 1) { int len, sparse = c->sparse; // pre-expand the lookup1-style multiplicands, to avoid a divide in the inner loop if (sparse) { if (c->sorted_entries == 0) goto skip; c->multiplicands = (codetype *) setup_malloc(f, sizeof(c->multiplicands[0]) * c->sorted_entries * c->dimensions); } else c->multiplicands = (codetype *) setup_malloc(f, sizeof(c->multiplicands[0]) * c->entries * c->dimensions); if (c->multiplicands == NULL) { setup_temp_free(f,mults,sizeof(mults[0])*c->lookup_values); return error(f, VORBIS_outofmem); } len = sparse ? c->sorted_entries : c->entries; for (j=0; j < len; ++j) { int z = sparse ? c->sorted_values[j] : j, div=1; for (k=0; k < c->dimensions; ++k) { int off = (z / div) % c->lookup_values; c->multiplicands[j*c->dimensions + k] = #ifndef STB_VORBIS_CODEBOOK_FLOATS mults[off]; #else mults[off]*c->delta_value + c->minimum_value; // in this case (and this case only) we could pre-expand c->sequence_p, // and throw away the decode logic for it; have to ALSO do // it in the case below, but it can only be done if // STB_VORBIS_CODEBOOK_FLOATS // !STB_VORBIS_DIVIDES_IN_CODEBOOK #endif div *= c->lookup_values; } } setup_temp_free(f, mults,sizeof(mults[0])*c->lookup_values); c->lookup_type = 2; } else #endif { c->multiplicands = (codetype *) setup_malloc(f, sizeof(c->multiplicands[0]) * c->lookup_values); #ifndef STB_VORBIS_CODEBOOK_FLOATS memcpy(c->multiplicands, mults, sizeof(c->multiplicands[0]) * c->lookup_values); #else for (j=0; j < (int) c->lookup_values; ++j) c->multiplicands[j] = mults[j] * c->delta_value + c->minimum_value; setup_temp_free(f, mults,sizeof(mults[0])*c->lookup_values); #endif } skip:; #ifdef STB_VORBIS_CODEBOOK_FLOATS if (c->lookup_type == 2 && c->sequence_p) { for (j=1; j < (int) c->lookup_values; ++j) c->multiplicands[j] = c->multiplicands[j-1]; c->sequence_p = 0; } #endif } } // time domain transfers (notused) x = get_bits(f, 6) + 1; for (i=0; i < x; ++i) { uint32 z = get_bits(f, 16); if (z != 0) return error(f, VORBIS_invalid_setup); } // Floors f->floor_count = get_bits(f, 6)+1; f->floor_config = (Floor *) setup_malloc(f, f->floor_count * sizeof(*f->floor_config)); for (i=0; i < f->floor_count; ++i) { f->floor_types[i] = get_bits(f, 16); if (f->floor_types[i] > 1) return error(f, VORBIS_invalid_setup); if (f->floor_types[i] == 0) { Floor0 *g = &f->floor_config[i].floor0; g->order = get_bits(f,8); g->rate = get_bits(f,16); g->bark_map_size = get_bits(f,16); g->amplitude_bits = get_bits(f,6); g->amplitude_offset = get_bits(f,8); g->number_of_books = get_bits(f,4) + 1; for (j=0; j < g->number_of_books; ++j) g->book_list[j] = get_bits(f,8); return error(f, VORBIS_feature_not_supported); } else { Point p[31*8+2]; Floor1 *g = &f->floor_config[i].floor1; int max_class = -1; g->partitions = get_bits(f, 5); for (j=0; j < g->partitions; ++j) { g->partition_class_list[j] = get_bits(f, 4); if (g->partition_class_list[j] > max_class) max_class = g->partition_class_list[j]; } for (j=0; j <= max_class; ++j) { g->class_dimensions[j] = get_bits(f, 3)+1; g->class_subclasses[j] = get_bits(f, 2); if (g->class_subclasses[j]) { g->class_masterbooks[j] = get_bits(f, 8); if (g->class_masterbooks[j] >= f->codebook_count) return error(f, VORBIS_invalid_setup); } for (k=0; k < 1 << g->class_subclasses[j]; ++k) { g->subclass_books[j][k] = get_bits(f,8)-1; if (g->subclass_books[j][k] >= f->codebook_count) return error(f, VORBIS_invalid_setup); } } g->floor1_multiplier = get_bits(f,2)+1; g->rangebits = get_bits(f,4); g->Xlist[0] = 0; g->Xlist[1] = 1 << g->rangebits; g->values = 2; for (j=0; j < g->partitions; ++j) { int c = g->partition_class_list[j]; for (k=0; k < g->class_dimensions[c]; ++k) { g->Xlist[g->values] = get_bits(f, g->rangebits); ++g->values; } } // precompute the sorting for (j=0; j < g->values; ++j) { p[j].x = g->Xlist[j]; p[j].y = j; } qsort(p, g->values, sizeof(p[0]), point_compare); for (j=0; j < g->values; ++j) g->sorted_order[j] = (uint8) p[j].y; // precompute the neighbors for (j=2; j < g->values; ++j) { int low,hi; neighbors(g->Xlist, j, &low,&hi); g->neighbors[j][0] = low; g->neighbors[j][1] = hi; } if (g->values > longest_floorlist) longest_floorlist = g->values; } } // Residue f->residue_count = get_bits(f, 6)+1; f->residue_config = (Residue *) setup_malloc(f, f->residue_count * sizeof(*f->residue_config)); for (i=0; i < f->residue_count; ++i) { uint8 residue_cascade[64]; Residue *r = f->residue_config+i; f->residue_types[i] = get_bits(f, 16); if (f->residue_types[i] > 2) return error(f, VORBIS_invalid_setup); r->begin = get_bits(f, 24); r->end = get_bits(f, 24); r->part_size = get_bits(f,24)+1; r->classifications = get_bits(f,6)+1; r->classbook = get_bits(f,8); for (j=0; j < r->classifications; ++j) { uint8 high_bits=0; uint8 low_bits=get_bits(f,3); if (get_bits(f,1)) high_bits = get_bits(f,5); residue_cascade[j] = high_bits*8 + low_bits; } r->residue_books = (short (*)[8]) setup_malloc(f, sizeof(r->residue_books[0]) * r->classifications); for (j=0; j < r->classifications; ++j) { for (k=0; k < 8; ++k) { if (residue_cascade[j] & (1 << k)) { r->residue_books[j][k] = get_bits(f, 8); if (r->residue_books[j][k] >= f->codebook_count) return error(f, VORBIS_invalid_setup); } else { r->residue_books[j][k] = -1; } } } // precompute the classifications[] array to avoid inner-loop mod/divide // call it 'classdata' since we already have r->classifications r->classdata = (uint8 **) setup_malloc(f, sizeof(*r->classdata) * f->codebooks[r->classbook].entries); if (!r->classdata) return error(f, VORBIS_outofmem); memset(r->classdata, 0, sizeof(*r->classdata) * f->codebooks[r->classbook].entries); for (j=0; j < f->codebooks[r->classbook].entries; ++j) { int classwords = f->codebooks[r->classbook].dimensions; int temp = j; r->classdata[j] = (uint8 *) setup_malloc(f, sizeof(r->classdata[j][0]) * classwords); for (k=classwords-1; k >= 0; --k) { r->classdata[j][k] = temp % r->classifications; temp /= r->classifications; } } } f->mapping_count = get_bits(f,6)+1; f->mapping = (Mapping *) setup_malloc(f, f->mapping_count * sizeof(*f->mapping)); for (i=0; i < f->mapping_count; ++i) { Mapping *m = f->mapping + i; int mapping_type = get_bits(f,16); if (mapping_type != 0) return error(f, VORBIS_invalid_setup); m->chan = (MappingChannel *) setup_malloc(f, f->channels * sizeof(*m->chan)); if (get_bits(f,1)) m->submaps = get_bits(f,4); else m->submaps = 1; if (m->submaps > max_submaps) max_submaps = m->submaps; if (get_bits(f,1)) { m->coupling_steps = get_bits(f,8)+1; for (k=0; k < m->coupling_steps; ++k) { m->chan[k].magnitude = get_bits(f, ilog(f->channels)-1); m->chan[k].angle = get_bits(f, ilog(f->channels)-1); if (m->chan[k].magnitude >= f->channels) return error(f, VORBIS_invalid_setup); if (m->chan[k].angle >= f->channels) return error(f, VORBIS_invalid_setup); if (m->chan[k].magnitude == m->chan[k].angle) return error(f, VORBIS_invalid_setup); } } else m->coupling_steps = 0; // reserved field if (get_bits(f,2)) return error(f, VORBIS_invalid_setup); if (m->submaps > 1) { for (j=0; j < f->channels; ++j) { m->chan[j].mux = get_bits(f, 4); if (m->chan[j].mux >= m->submaps) return error(f, VORBIS_invalid_setup); } } else // @SPECIFICATION: this case is missing from the spec for (j=0; j < f->channels; ++j) m->chan[j].mux = 0; for (j=0; j < m->submaps; ++j) { get_bits(f,8); // discard m->submap_floor[j] = get_bits(f,8); m->submap_residue[j] = get_bits(f,8); if (m->submap_floor[j] >= f->floor_count) return error(f, VORBIS_invalid_setup); if (m->submap_residue[j] >= f->residue_count) return error(f, VORBIS_invalid_setup); } } // Modes f->mode_count = get_bits(f, 6)+1; for (i=0; i < f->mode_count; ++i) { Mode *m = f->mode_config+i; m->blockflag = get_bits(f,1); m->windowtype = get_bits(f,16); m->transformtype = get_bits(f,16); m->mapping = get_bits(f,8); if (m->windowtype != 0) return error(f, VORBIS_invalid_setup); if (m->transformtype != 0) return error(f, VORBIS_invalid_setup); if (m->mapping >= f->mapping_count) return error(f, VORBIS_invalid_setup); } flush_packet(f); f->previous_length = 0; for (i=0; i < f->channels; ++i) { f->channel_buffers[i] = (float *) setup_malloc(f, sizeof(float) * f->blocksize_1); f->previous_window[i] = (float *) setup_malloc(f, sizeof(float) * f->blocksize_1/2); f->finalY[i] = (int16 *) setup_malloc(f, sizeof(int16) * longest_floorlist); #ifdef STB_VORBIS_NO_DEFER_FLOOR f->floor_buffers[i] = (float *) setup_malloc(f, sizeof(float) * f->blocksize_1/2); #endif } if (!init_blocksize(f, 0, f->blocksize_0)) return FALSE; if (!init_blocksize(f, 1, f->blocksize_1)) return FALSE; f->blocksize[0] = f->blocksize_0; f->blocksize[1] = f->blocksize_1; #ifdef STB_VORBIS_DIVIDE_TABLE if (integer_divide_table[1][1]==0) for (i=0; i < DIVTAB_NUMER; ++i) for (j=1; j < DIVTAB_DENOM; ++j) integer_divide_table[i][j] = i / j; #endif // compute how much temporary memory is needed // 1. { uint32 imdct_mem = (f->blocksize_1 * sizeof(float) >> 1); uint32 classify_mem; int i,max_part_read=0; for (i=0; i < f->residue_count; ++i) { Residue *r = f->residue_config + i; int n_read = r->end - r->begin; int part_read = n_read / r->part_size; if (part_read > max_part_read) max_part_read = part_read; } #ifndef STB_VORBIS_DIVIDES_IN_RESIDUE classify_mem = f->channels * (sizeof(void*) + max_part_read * sizeof(uint8 *)); #else classify_mem = f->channels * (sizeof(void*) + max_part_read * sizeof(int *)); #endif f->temp_memory_required = classify_mem; if (imdct_mem > f->temp_memory_required) f->temp_memory_required = imdct_mem; } f->first_decode = TRUE; if (f->alloc.alloc_buffer) { assert(f->temp_offset == f->alloc.alloc_buffer_length_in_bytes); // check if there's enough temp memory so we don't error later if (f->setup_offset + sizeof(*f) + f->temp_memory_required > (unsigned) f->temp_offset) return error(f, VORBIS_outofmem); } f->first_audio_page_offset = stb_vorbis_get_file_offset(f); return TRUE; } static void vorbis_deinit(stb_vorbis *p) { int i,j; for (i=0; i < p->residue_count; ++i) { Residue *r = p->residue_config+i; if (r->classdata) { for (j=0; j < p->codebooks[r->classbook].entries; ++j) setup_free(p, r->classdata[j]); setup_free(p, r->classdata); } setup_free(p, r->residue_books); } if (p->codebooks) { for (i=0; i < p->codebook_count; ++i) { Codebook *c = p->codebooks + i; setup_free(p, c->codeword_lengths); setup_free(p, c->multiplicands); setup_free(p, c->codewords); setup_free(p, c->sorted_codewords); // c->sorted_values[-1] is the first entry in the array setup_free(p, c->sorted_values ? c->sorted_values-1 : NULL); } setup_free(p, p->codebooks); } setup_free(p, p->floor_config); setup_free(p, p->residue_config); for (i=0; i < p->mapping_count; ++i) setup_free(p, p->mapping[i].chan); setup_free(p, p->mapping); for (i=0; i < p->channels; ++i) { setup_free(p, p->channel_buffers[i]); setup_free(p, p->previous_window[i]); #ifdef STB_VORBIS_NO_DEFER_FLOOR setup_free(p, p->floor_buffers[i]); #endif setup_free(p, p->finalY[i]); } for (i=0; i < 2; ++i) { setup_free(p, p->A[i]); setup_free(p, p->B[i]); setup_free(p, p->C[i]); setup_free(p, p->window[i]); } #ifndef STB_VORBIS_NO_STDIO if (p->close_on_free) fclose(p->f); #endif } void stb_vorbis_close(stb_vorbis *p) { if (p == NULL) return; vorbis_deinit(p); setup_free(p,p); } static void vorbis_init(stb_vorbis *p, stb_vorbis_alloc *z) { memset(p, 0, sizeof(*p)); // NULL out all malloc'd pointers to start if (z) { p->alloc = *z; p->alloc.alloc_buffer_length_in_bytes = (p->alloc.alloc_buffer_length_in_bytes+3) & ~3; p->temp_offset = p->alloc.alloc_buffer_length_in_bytes; } p->eof = 0; p->error = VORBIS__no_error; p->stream = NULL; p->codebooks = NULL; p->page_crc_tests = -1; #ifndef STB_VORBIS_NO_STDIO p->close_on_free = FALSE; p->f = NULL; #endif } int stb_vorbis_get_sample_offset(stb_vorbis *f) { if (f->current_loc_valid) return f->current_loc; else return -1; } stb_vorbis_info stb_vorbis_get_info(stb_vorbis *f) { stb_vorbis_info d; d.channels = f->channels; d.sample_rate = f->sample_rate; d.setup_memory_required = f->setup_memory_required; d.setup_temp_memory_required = f->setup_temp_memory_required; d.temp_memory_required = f->temp_memory_required; d.max_frame_size = f->blocksize_1 >> 1; return d; } int stb_vorbis_get_error(stb_vorbis *f) { int e = f->error; f->error = VORBIS__no_error; return e; } static stb_vorbis * vorbis_alloc(stb_vorbis *f) { stb_vorbis *p = (stb_vorbis *) setup_malloc(f, sizeof(*p)); return p; } #ifndef STB_VORBIS_NO_PUSHDATA_API void stb_vorbis_flush_pushdata(stb_vorbis *f) { f->previous_length = 0; f->page_crc_tests = 0; f->discard_samples_deferred = 0; f->current_loc_valid = FALSE; f->first_decode = FALSE; f->samples_output = 0; f->channel_buffer_start = 0; f->channel_buffer_end = 0; } static int vorbis_search_for_page_pushdata(vorb *f, uint8 *data, int data_len) { int i,n; for (i=0; i < f->page_crc_tests; ++i) f->scan[i].bytes_done = 0; // if we have room for more scans, search for them first, because // they may cause us to stop early if their header is incomplete if (f->page_crc_tests < STB_VORBIS_PUSHDATA_CRC_COUNT) { if (data_len < 4) return 0; data_len -= 3; // need to look for 4-byte sequence, so don't miss // one that straddles a boundary for (i=0; i < data_len; ++i) { if (data[i] == 0x4f) { if (0==memcmp(data+i, ogg_page_header, 4)) { int j,len; uint32 crc; // make sure we have the whole page header if (i+26 >= data_len || i+27+data[i+26] >= data_len) { // only read up to this page start, so hopefully we'll // have the whole page header start next time data_len = i; break; } // ok, we have it all; compute the length of the page len = 27 + data[i+26]; for (j=0; j < data[i+26]; ++j) len += data[i+27+j]; // scan everything up to the embedded crc (which we must 0) crc = 0; for (j=0; j < 22; ++j) crc = crc32_update(crc, data[i+j]); // now process 4 0-bytes for ( ; j < 26; ++j) crc = crc32_update(crc, 0); // len is the total number of bytes we need to scan n = f->page_crc_tests++; f->scan[n].bytes_left = len-j; f->scan[n].crc_so_far = crc; f->scan[n].goal_crc = data[i+22] + (data[i+23] << 8) + (data[i+24]<<16) + (data[i+25]<<24); // if the last frame on a page is continued to the next, then // we can't recover the sample_loc immediately if (data[i+27+data[i+26]-1] == 255) f->scan[n].sample_loc = ~0; else f->scan[n].sample_loc = data[i+6] + (data[i+7] << 8) + (data[i+ 8]<<16) + (data[i+ 9]<<24); f->scan[n].bytes_done = i+j; if (f->page_crc_tests == STB_VORBIS_PUSHDATA_CRC_COUNT) break; // keep going if we still have room for more } } } } for (i=0; i < f->page_crc_tests;) { uint32 crc; int j; int n = f->scan[i].bytes_done; int m = f->scan[i].bytes_left; if (m > data_len - n) m = data_len - n; // m is the bytes to scan in the current chunk crc = f->scan[i].crc_so_far; for (j=0; j < m; ++j) crc = crc32_update(crc, data[n+j]); f->scan[i].bytes_left -= m; f->scan[i].crc_so_far = crc; if (f->scan[i].bytes_left == 0) { // does it match? if (f->scan[i].crc_so_far == f->scan[i].goal_crc) { // Houston, we have page data_len = n+m; // consumption amount is wherever that scan ended f->page_crc_tests = -1; // drop out of page scan mode f->previous_length = 0; // decode-but-don't-output one frame f->next_seg = -1; // start a new page f->current_loc = f->scan[i].sample_loc; // set the current sample location // to the amount we'd have decoded had we decoded this page f->current_loc_valid = f->current_loc != ~0; return data_len; } // delete entry f->scan[i] = f->scan[--f->page_crc_tests]; } else { ++i; } } return data_len; } // return value: number of bytes we used int stb_vorbis_decode_frame_pushdata( stb_vorbis *f, // the file we're decoding uint8 *data, int data_len, // the memory available for decoding int *channels, // place to write number of float * buffers float ***output, // place to write float ** array of float * buffers int *samples // place to write number of output samples ) { int i; int len,right,left; if (!IS_PUSH_MODE(f)) return error(f, VORBIS_invalid_api_mixing); if (f->page_crc_tests >= 0) { *samples = 0; return vorbis_search_for_page_pushdata(f, data, data_len); } f->stream = data; f->stream_end = data + data_len; f->error = VORBIS__no_error; // check that we have the entire packet in memory if (!is_whole_packet_present(f, FALSE)) { *samples = 0; return 0; } if (!vorbis_decode_packet(f, &len, &left, &right)) { // save the actual error we encountered enum STBVorbisError error = f->error; if (error == VORBIS_bad_packet_type) { // flush and resynch f->error = VORBIS__no_error; while (get8_packet(f) != EOP) if (f->eof) break; *samples = 0; return f->stream - data; } if (error == VORBIS_continued_packet_flag_invalid) { if (f->previous_length == 0) { // we may be resynching, in which case it's ok to hit one // of these; just discard the packet f->error = VORBIS__no_error; while (get8_packet(f) != EOP) if (f->eof) break; *samples = 0; return f->stream - data; } } // if we get an error while parsing, what to do? // well, it DEFINITELY won't work to continue from where we are! stb_vorbis_flush_pushdata(f); // restore the error that actually made us bail f->error = error; *samples = 0; return 1; } // success! len = vorbis_finish_frame(f, len, left, right); for (i=0; i < f->channels; ++i) f->outputs[i] = f->channel_buffers[i] + left; if (channels) *channels = f->channels; *samples = len; *output = f->outputs; return f->stream - data; } stb_vorbis *stb_vorbis_open_pushdata( unsigned char *data, int data_len, // the memory available for decoding int *data_used, // only defined if result is not NULL int *error, stb_vorbis_alloc *alloc) { stb_vorbis *f, p; vorbis_init(&p, alloc); p.stream = data; p.stream_end = data + data_len; p.push_mode = TRUE; if (!start_decoder(&p)) { if (p.eof) *error = VORBIS_need_more_data; else *error = p.error; return NULL; } f = vorbis_alloc(&p); if (f) { *f = p; *data_used = f->stream - data; *error = 0; return f; } else { vorbis_deinit(&p); return NULL; } } #endif // STB_VORBIS_NO_PUSHDATA_API unsigned int stb_vorbis_get_file_offset(stb_vorbis *f) { #ifndef STB_VORBIS_NO_PUSHDATA_API if (f->push_mode) return 0; #endif if (USE_MEMORY(f)) return f->stream - f->stream_start; #ifndef STB_VORBIS_NO_STDIO return ftell(f->f) - f->f_start; #endif } #ifndef STB_VORBIS_NO_PULLDATA_API // // DATA-PULLING API // static uint32 vorbis_find_page(stb_vorbis *f, uint32 *end, uint32 *last) { for(;;) { int n; if (f->eof) return 0; n = get8(f); if (n == 0x4f) { // page header unsigned int retry_loc = stb_vorbis_get_file_offset(f); int i; // check if we're off the end of a file_section stream if (retry_loc - 25 > f->stream_len) return 0; // check the rest of the header for (i=1; i < 4; ++i) if (get8(f) != ogg_page_header[i]) break; if (f->eof) return 0; if (i == 4) { uint8 header[27]; uint32 i, crc, goal, len; for (i=0; i < 4; ++i) header[i] = ogg_page_header[i]; for (; i < 27; ++i) header[i] = get8(f); if (f->eof) return 0; if (header[4] != 0) goto invalid; goal = header[22] + (header[23] << 8) + (header[24]<<16) + (header[25]<<24); for (i=22; i < 26; ++i) header[i] = 0; crc = 0; for (i=0; i < 27; ++i) crc = crc32_update(crc, header[i]); len = 0; for (i=0; i < header[26]; ++i) { int s = get8(f); crc = crc32_update(crc, s); len += s; } if (len && f->eof) return 0; for (i=0; i < len; ++i) crc = crc32_update(crc, get8(f)); // finished parsing probable page if (crc == goal) { // we could now check that it's either got the last // page flag set, OR it's followed by the capture // pattern, but I guess TECHNICALLY you could have // a file with garbage between each ogg page and recover // from it automatically? So even though that paranoia // might decrease the chance of an invalid decode by // another 2^32, not worth it since it would hose those // invalid-but-useful files? if (end) *end = stb_vorbis_get_file_offset(f); if (last) if (header[5] & 0x04) *last = 1; else *last = 0; set_file_offset(f, retry_loc-1); return 1; } } invalid: // not a valid page, so rewind and look for next one set_file_offset(f, retry_loc); } } } // seek is implemented with 'interpolation search'--this is like // binary search, but we use the data values to estimate the likely // location of the data item (plus a bit of a bias so when the // estimation is wrong we don't waste overly much time) #define SAMPLE_unknown 0xffffffff // ogg vorbis, in its insane infinite wisdom, only provides // information about the sample at the END of the page. // therefore we COULD have the data we need in the current // page, and not know it. we could just use the end location // as our only knowledge for bounds, seek back, and eventually // the binary search finds it. or we can try to be smart and // not waste time trying to locate more pages. we try to be // smart, since this data is already in memory anyway, so // doing needless I/O would be crazy! static int vorbis_analyze_page(stb_vorbis *f, ProbedPage *z) { uint8 header[27], lacing[255]; uint8 packet_type[255]; int num_packet, packet_start, previous =0; int i,len; uint32 samples; // record where the page starts z->page_start = stb_vorbis_get_file_offset(f); // parse the header getn(f, header, 27); assert(header[0] == 'O' && header[1] == 'g' && header[2] == 'g' && header[3] == 'S'); getn(f, lacing, header[26]); // determine the length of the payload len = 0; for (i=0; i < header[26]; ++i) len += lacing[i]; // this implies where the page ends z->page_end = z->page_start + 27 + header[26] + len; // read the last-decoded sample out of the data z->last_decoded_sample = header[6] + (header[7] << 8) + (header[8] << 16) + (header[9] << 16); if (header[5] & 4) { // if this is the last page, it's not possible to work // backwards to figure out the first sample! whoops! fuck. z->first_decoded_sample = SAMPLE_unknown; set_file_offset(f, z->page_start); return 1; } // scan through the frames to determine the sample-count of each one... // our goal is the sample # of the first fully-decoded sample on the // page, which is the first decoded sample of the 2nd page num_packet=0; packet_start = ((header[5] & 1) == 0); for (i=0; i < header[26]; ++i) { if (packet_start) { uint8 n,b,m; if (lacing[i] == 0) goto bail; // trying to read from zero-length packet n = get8(f); // if bottom bit is non-zero, we've got corruption if (n & 1) goto bail; n >>= 1; b = ilog(f->mode_count-1); m = n >> b; n &= (1 << b)-1; if (n >= f->mode_count) goto bail; if (num_packet == 0 && f->mode_config[n].blockflag) previous = (m & 1); packet_type[num_packet++] = f->mode_config[n].blockflag; skip(f, lacing[i]-1); } else skip(f, lacing[i]); packet_start = (lacing[i] < 255); } // now that we know the sizes of all the pages, we can start determining // how much sample data there is. samples = 0; // for the last packet, we step by its whole length, because the definition // is that we encoded the end sample loc of the 'last packet completed', // where 'completed' refers to packets being split, and we are left to guess // what 'end sample loc' means. we assume it means ignoring the fact that // the last half of the data is useless without windowing against the next // packet... (so it's not REALLY complete in that sense) if (num_packet > 1) samples += f->blocksize[packet_type[num_packet-1]]; for (i=num_packet-2; i >= 1; --i) { // now, for this packet, how many samples do we have that // do not overlap the following packet? if (packet_type[i] == 1) if (packet_type[i+1] == 1) samples += f->blocksize_1 >> 1; else samples += ((f->blocksize_1 - f->blocksize_0) >> 2) + (f->blocksize_0 >> 1); else samples += f->blocksize_0 >> 1; } // now, at this point, we've rewound to the very beginning of the // _second_ packet. if we entirely discard the first packet after // a seek, this will be exactly the right sample number. HOWEVER! // we can't as easily compute this number for the LAST page. The // only way to get the sample offset of the LAST page is to use // the end loc from the previous page. But what that returns us // is _exactly_ the place where we get our first non-overlapped // sample. (I think. Stupid spec for being ambiguous.) So for // consistency it's better to do that here, too. However, that // will then require us to NOT discard all of the first frame we // decode, in some cases, which means an even weirder frame size // and extra code. what a fucking pain. // we're going to discard the first packet if we // start the seek here, so we don't care about it. (we could actually // do better; if the first packet is long, and the previous packet // is short, there's actually data in the first half of the first // packet that doesn't need discarding... but not worth paying the // effort of tracking that of that here and in the seeking logic) // except crap, if we infer it from the _previous_ packet's end // location, we DO need to use that definition... and we HAVE to // infer the start loc of the LAST packet from the previous packet's // end location. fuck you, ogg vorbis. z->first_decoded_sample = z->last_decoded_sample - samples; // restore file state to where we were set_file_offset(f, z->page_start); return 1; // restore file state to where we were bail: set_file_offset(f, z->page_start); return 0; } static int vorbis_seek_frame_from_page(stb_vorbis *f, uint32 page_start, uint32 first_sample, uint32 target_sample, int fine) { int left_start, left_end, right_start, right_end, mode,i; int frame=0; uint32 frame_start; int frames_to_skip, data_to_skip; // first_sample is the sample # of the first sample that doesn't // overlap the previous page... note that this requires us to // _partially_ discard the first packet! bleh. set_file_offset(f, page_start); f->next_seg = -1; // force page resync frame_start = first_sample; // frame start is where the previous packet's last decoded sample // was, which corresponds to left_end... EXCEPT if the previous // packet was long and this packet is short? Probably a bug here. // now, we can start decoding frames... we'll only FAKE decode them, // until we find the frame that contains our sample; then we'll rewind, // and try again for (;;) { int start; if (!vorbis_decode_initial(f, &left_start, &left_end, &right_start, &right_end, &mode)) return error(f, VORBIS_seek_failed); if (frame == 0) start = left_end; else start = left_start; // the window starts at left_start; the last valid sample we generate // before the next frame's window start is right_start-1 if (target_sample < frame_start + right_start-start) break; flush_packet(f); if (f->eof) return error(f, VORBIS_seek_failed); frame_start += right_start - start; ++frame; } // ok, at this point, the sample we want is contained in frame #'frame' // to decode frame #'frame' normally, we have to decode the // previous frame first... but if it's the FIRST frame of the page // we can't. if it's the first frame, it means it falls in the part // of the first frame that doesn't overlap either of the other frames. // so, if we have to handle that case for the first frame, we might // as well handle it for all of them, so: if (target_sample > frame_start + (left_end - left_start)) { // so what we want to do is go ahead and just immediately decode // this frame, but then make it so the next get_frame_float() uses // this already-decoded data? or do we want to go ahead and rewind, // and leave a flag saying to skip the first N data? let's do that frames_to_skip = frame; // if this is frame #1, skip 1 frame (#0) data_to_skip = left_end - left_start; } else { // otherwise, we want to skip frames 0, 1, 2, ... frame-2 // (which means frame-2+1 total frames) then decode frame-1, // then leave frame pending frames_to_skip = frame - 1; assert(frames_to_skip >= 0); data_to_skip = -1; } set_file_offset(f, page_start); f->next_seg = - 1; // force page resync for (i=0; i < frames_to_skip; ++i) { maybe_start_packet(f); flush_packet(f); } if (data_to_skip >= 0) { int i,j,n = f->blocksize_0 >> 1; f->discard_samples_deferred = data_to_skip; for (i=0; i < f->channels; ++i) for (j=0; j < n; ++j) f->previous_window[i][j] = 0; f->previous_length = n; frame_start += data_to_skip; } else { f->previous_length = 0; vorbis_pump_first_frame(f); } // at this point, the NEXT decoded frame will generate the desired sample if (fine) { // so if we're doing sample accurate streaming, we want to go ahead and decode it! if (target_sample != frame_start) { int n; stb_vorbis_get_frame_float(f, &n, NULL); assert(target_sample > frame_start); assert(f->channel_buffer_start + (int) (target_sample-frame_start) < f->channel_buffer_end); f->channel_buffer_start += (target_sample - frame_start); } } return 0; } static int vorbis_seek_base(stb_vorbis *f, unsigned int sample_number, int fine) { ProbedPage p[2],q; if (IS_PUSH_MODE(f)) return error(f, VORBIS_invalid_api_mixing); // do we know the location of the last page? if (f->p_last.page_start == 0) { uint32 z = stb_vorbis_stream_length_in_samples(f); if (z == 0) return error(f, VORBIS_cant_find_last_page); } p[0] = f->p_first; p[1] = f->p_last; if (sample_number >= f->p_last.last_decoded_sample) sample_number = f->p_last.last_decoded_sample-1; if (sample_number < f->p_first.last_decoded_sample) { vorbis_seek_frame_from_page(f, p[0].page_start, 0, sample_number, fine); return 0; } else { int attempts=0; while (p[0].page_end < p[1].page_start) { uint32 probe; uint32 start_offset, end_offset; uint32 start_sample, end_sample; // copy these into local variables so we can tweak them // if any are unknown start_offset = p[0].page_end; end_offset = p[1].after_previous_page_start; // an address known to seek to page p[1] start_sample = p[0].last_decoded_sample; end_sample = p[1].last_decoded_sample; // currently there is no such tweaking logic needed/possible? if (start_sample == SAMPLE_unknown || end_sample == SAMPLE_unknown) return error(f, VORBIS_seek_failed); // now we want to lerp between these for the target samples... // step 1: we need to bias towards the page start... if (start_offset + 4000 < end_offset) end_offset -= 4000; // now compute an interpolated search loc probe = start_offset + (int) floor((float) (end_offset - start_offset) / (end_sample - start_sample) * (sample_number - start_sample)); // next we need to bias towards binary search... // code is a little wonky to allow for full 32-bit unsigned values if (attempts >= 4) { uint32 probe2 = start_offset + ((end_offset - start_offset) >> 1); if (attempts >= 8) probe = probe2; else if (probe < probe2) probe = probe + ((probe2 - probe) >> 1); else probe = probe2 + ((probe - probe2) >> 1); } ++attempts; set_file_offset(f, probe); if (!vorbis_find_page(f, NULL, NULL)) return error(f, VORBIS_seek_failed); if (!vorbis_analyze_page(f, &q)) return error(f, VORBIS_seek_failed); q.after_previous_page_start = probe; // it's possible we've just found the last page again if (q.page_start == p[1].page_start) { p[1] = q; continue; } if (sample_number < q.last_decoded_sample) p[1] = q; else p[0] = q; } if (p[0].last_decoded_sample <= sample_number && sample_number < p[1].last_decoded_sample) { vorbis_seek_frame_from_page(f, p[1].page_start, p[0].last_decoded_sample, sample_number, fine); return 0; } return error(f, VORBIS_seek_failed); } } int stb_vorbis_seek_frame(stb_vorbis *f, unsigned int sample_number) { return vorbis_seek_base(f, sample_number, FALSE); } int stb_vorbis_seek(stb_vorbis *f, unsigned int sample_number) { return vorbis_seek_base(f, sample_number, TRUE); } void stb_vorbis_seek_start(stb_vorbis *f) { if (IS_PUSH_MODE(f)) { error(f, VORBIS_invalid_api_mixing); return; } set_file_offset(f, f->first_audio_page_offset); f->previous_length = 0; f->first_decode = TRUE; f->next_seg = -1; vorbis_pump_first_frame(f); } unsigned int stb_vorbis_stream_length_in_samples(stb_vorbis *f) { unsigned int restore_offset, previous_safe; unsigned int end, last_page_loc; if (IS_PUSH_MODE(f)) return error(f, VORBIS_invalid_api_mixing); if (!f->total_samples) { int last; uint32 lo,hi; char header[6]; // first, store the current decode position so we can restore it restore_offset = stb_vorbis_get_file_offset(f); // now we want to seek back 64K from the end (the last page must // be at most a little less than 64K, but let's allow a little slop) if (f->stream_len >= 65536 && f->stream_len-65536 >= f->first_audio_page_offset) previous_safe = f->stream_len - 65536; else previous_safe = f->first_audio_page_offset; set_file_offset(f, previous_safe); // previous_safe is now our candidate 'earliest known place that seeking // to will lead to the final page' if (!vorbis_find_page(f, &end, (int unsigned *)&last)) { // if we can't find a page, we're hosed! f->error = VORBIS_cant_find_last_page; f->total_samples = 0xffffffff; goto done; } // check if there are more pages last_page_loc = stb_vorbis_get_file_offset(f); // stop when the last_page flag is set, not when we reach eof; // this allows us to stop short of a 'file_section' end without // explicitly checking the length of the section while (!last) { set_file_offset(f, end); if (!vorbis_find_page(f, &end, (int unsigned *)&last)) { // the last page we found didn't have the 'last page' flag // set. whoops! break; } previous_safe = last_page_loc+1; last_page_loc = stb_vorbis_get_file_offset(f); } set_file_offset(f, last_page_loc); // parse the header getn(f, (unsigned char *)header, 6); // extract the absolute granule position lo = get32(f); hi = get32(f); if (lo == 0xffffffff && hi == 0xffffffff) { f->error = VORBIS_cant_find_last_page; f->total_samples = SAMPLE_unknown; goto done; } if (hi) lo = 0xfffffffe; // saturate f->total_samples = lo; f->p_last.page_start = last_page_loc; f->p_last.page_end = end; f->p_last.last_decoded_sample = lo; f->p_last.first_decoded_sample = SAMPLE_unknown; f->p_last.after_previous_page_start = previous_safe; done: set_file_offset(f, restore_offset); } return f->total_samples == SAMPLE_unknown ? 0 : f->total_samples; } float stb_vorbis_stream_length_in_seconds(stb_vorbis *f) { return stb_vorbis_stream_length_in_samples(f) / (float) f->sample_rate; } int stb_vorbis_get_frame_float(stb_vorbis *f, int *channels, float ***output) { int len, right,left,i; if (IS_PUSH_MODE(f)) return error(f, VORBIS_invalid_api_mixing); if (!vorbis_decode_packet(f, &len, &left, &right)) { f->channel_buffer_start = f->channel_buffer_end = 0; return 0; } len = vorbis_finish_frame(f, len, left, right); for (i=0; i < f->channels; ++i) f->outputs[i] = f->channel_buffers[i] + left; f->channel_buffer_start = left; f->channel_buffer_end = left+len; if (channels) *channels = f->channels; if (output) *output = f->outputs; return len; } #ifndef STB_VORBIS_NO_STDIO stb_vorbis * stb_vorbis_open_file_section(FILE *file, int close_on_free, int *error, stb_vorbis_alloc *alloc, unsigned int length) { stb_vorbis *f, p; vorbis_init(&p, alloc); p.f = file; p.f_start = ftell(file); p.stream_len = length; p.close_on_free = close_on_free; if (start_decoder(&p)) { f = vorbis_alloc(&p); if (f) { *f = p; vorbis_pump_first_frame(f); return f; } } if (error) *error = p.error; vorbis_deinit(&p); return NULL; } stb_vorbis * stb_vorbis_open_file(FILE *file, int close_on_free, int *error, stb_vorbis_alloc *alloc) { unsigned int len, start; start = ftell(file); fseek(file, 0, SEEK_END); len = ftell(file) - start; fseek(file, start, SEEK_SET); return stb_vorbis_open_file_section(file, close_on_free, error, alloc, len); } stb_vorbis * stb_vorbis_open_filename(char *filename, int *error, stb_vorbis_alloc *alloc) { FILE *f = fopen(filename, "rb"); if (f) return stb_vorbis_open_file(f, TRUE, error, alloc); if (error) *error = VORBIS_file_open_failure; return NULL; } #endif // STB_VORBIS_NO_STDIO stb_vorbis * stb_vorbis_open_memory(unsigned char *data, int len, int *error, stb_vorbis_alloc *alloc) { stb_vorbis *f, p; if (data == NULL) return NULL; vorbis_init(&p, alloc); p.stream = data; p.stream_end = data + len; p.stream_start = p.stream; p.stream_len = len; p.push_mode = FALSE; if (start_decoder(&p)) { f = vorbis_alloc(&p); if (f) { *f = p; vorbis_pump_first_frame(f); return f; } } if (error) *error = p.error; vorbis_deinit(&p); return NULL; } #ifndef STB_VORBIS_NO_INTEGER_CONVERSION #define PLAYBACK_MONO 1 #define PLAYBACK_LEFT 2 #define PLAYBACK_RIGHT 4 #define L (PLAYBACK_LEFT | PLAYBACK_MONO) #define C (PLAYBACK_LEFT | PLAYBACK_RIGHT | PLAYBACK_MONO) #define R (PLAYBACK_RIGHT | PLAYBACK_MONO) static int8 channel_position[7][6] = { { 0 }, { C }, { L, R }, { L, C, R }, { L, R, L, R }, { L, C, R, L, R }, { L, C, R, L, R, C }, }; #ifndef STB_VORBIS_NO_FAST_SCALED_FLOAT typedef union { float f; int i; } float_conv; typedef char stb_vorbis_float_size_test[sizeof(float)==4 && sizeof(int) == 4]; #define FASTDEF(x) float_conv x // add (1<<23) to convert to int, then divide by 2^SHIFT, then add 0.5/2^SHIFT to round #define MAGIC(SHIFT) (1.5f * (1 << (23-SHIFT)) + 0.5f/(1 << SHIFT)) #define ADDEND(SHIFT) (((150-SHIFT) << 23) + (1 << 22)) #define FAST_SCALED_FLOAT_TO_INT(temp,x,s) (temp.f = (x) + MAGIC(s), temp.i - ADDEND(s)) #define check_endianness() #else #define FAST_SCALED_FLOAT_TO_INT(temp,x,s) ((int) ((x) * (1 << (s)))) #define check_endianness() #define FASTDEF(x) #endif static void copy_samples(short *dest, float *src, int len) { int i; check_endianness(); for (i=0; i < len; ++i) { FASTDEF(temp); int v = FAST_SCALED_FLOAT_TO_INT(temp, src[i],15); if ((unsigned int) (v + 32768) > 65535) v = v < 0 ? -32768 : 32767; dest[i] = v; } } static void compute_samples(int mask, short *output, int num_c, float **data, int d_offset, int len) { #define BUFFER_SIZE 32 float buffer[BUFFER_SIZE]; int i,j,o,n = BUFFER_SIZE; check_endianness(); for (o = 0; o < len; o += BUFFER_SIZE) { memset(buffer, 0, sizeof(buffer)); if (o + n > len) n = len - o; for (j=0; j < num_c; ++j) { if (channel_position[num_c][j] & mask) { for (i=0; i < n; ++i) buffer[i] += data[j][d_offset+o+i]; } } for (i=0; i < n; ++i) { FASTDEF(temp); int v = FAST_SCALED_FLOAT_TO_INT(temp,buffer[i],15); if ((unsigned int) (v + 32768) > 65535) v = v < 0 ? -32768 : 32767; output[o+i] = v; } } } static int channel_selector[3][2] = { {0}, {PLAYBACK_MONO}, {PLAYBACK_LEFT, PLAYBACK_RIGHT} }; static void compute_stereo_samples(short *output, int num_c, float **data, int d_offset, int len) { #define BUFFER_SIZE 32 float buffer[BUFFER_SIZE]; int i,j,o,n = BUFFER_SIZE >> 1; // o is the offset in the source data check_endianness(); for (o = 0; o < len; o += BUFFER_SIZE >> 1) { // o2 is the offset in the output data int o2 = o << 1; memset(buffer, 0, sizeof(buffer)); if (o + n > len) n = len - o; for (j=0; j < num_c; ++j) { int m = channel_position[num_c][j] & (PLAYBACK_LEFT | PLAYBACK_RIGHT); if (m == (PLAYBACK_LEFT | PLAYBACK_RIGHT)) { for (i=0; i < n; ++i) { buffer[i*2+0] += data[j][d_offset+o+i]; buffer[i*2+1] += data[j][d_offset+o+i]; } } else if (m == PLAYBACK_LEFT) { for (i=0; i < n; ++i) { buffer[i*2+0] += data[j][d_offset+o+i]; } } else if (m == PLAYBACK_RIGHT) { for (i=0; i < n; ++i) { buffer[i*2+1] += data[j][d_offset+o+i]; } } } for (i=0; i < (n<<1); ++i) { FASTDEF(temp); int v = FAST_SCALED_FLOAT_TO_INT(temp,buffer[i],15); if ((unsigned int) (v + 32768) > 65535) v = v < 0 ? -32768 : 32767; output[o2+i] = v; } } } static void convert_samples_short(int buf_c, short **buffer, int b_offset, int data_c, float **data, int d_offset, int samples) { int i; if (buf_c != data_c && buf_c <= 2 && data_c <= 6) { static int channel_selector[3][2] = { {0}, {PLAYBACK_MONO}, {PLAYBACK_LEFT, PLAYBACK_RIGHT} }; for (i=0; i < buf_c; ++i) compute_samples(channel_selector[buf_c][i], buffer[i]+b_offset, data_c, data, d_offset, samples); } else { int limit = buf_c < data_c ? buf_c : data_c; for (i=0; i < limit; ++i) copy_samples(buffer[i]+b_offset, data[i], samples); for ( ; i < buf_c; ++i) memset(buffer[i]+b_offset, 0, sizeof(short) * samples); } } int stb_vorbis_get_frame_short(stb_vorbis *f, int num_c, short **buffer, int num_samples) { float **output; int len = stb_vorbis_get_frame_float(f, NULL, &output); if (len > num_samples) len = num_samples; if (len) convert_samples_short(num_c, buffer, 0, f->channels, output, 0, len); return len; } static void convert_channels_short_interleaved(int buf_c, short *buffer, int data_c, float **data, int d_offset, int len) { int i; check_endianness(); if (buf_c != data_c && buf_c <= 2 && data_c <= 6) { assert(buf_c == 2); for (i=0; i < buf_c; ++i) compute_stereo_samples(buffer, data_c, data, d_offset, len); } else { int limit = buf_c < data_c ? buf_c : data_c; int j; for (j=0; j < len; ++j) { for (i=0; i < limit; ++i) { FASTDEF(temp); float f = data[i][d_offset+j]; int v = FAST_SCALED_FLOAT_TO_INT(temp, f,15);//data[i][d_offset+j],15); if ((unsigned int) (v + 32768) > 65535) v = v < 0 ? -32768 : 32767; *buffer++ = v; } for ( ; i < buf_c; ++i) *buffer++ = 0; } } } int stb_vorbis_get_frame_short_interleaved(stb_vorbis *f, int num_c, short *buffer, int num_shorts) { float **output; int len; if (num_c == 1) return stb_vorbis_get_frame_short(f,num_c,&buffer, num_shorts); len = stb_vorbis_get_frame_float(f, NULL, &output); if (len) { if (len*num_c > num_shorts) len = num_shorts / num_c; convert_channels_short_interleaved(num_c, buffer, f->channels, output, 0, len); } return len; } int stb_vorbis_get_samples_short_interleaved(stb_vorbis *f, int channels, short *buffer, int num_shorts) { float **outputs; int len = num_shorts / channels; int n=0; int z = f->channels; if (z > channels) z = channels; while (n < len) { int k = f->channel_buffer_end - f->channel_buffer_start; if (n+k >= len) k = len - n; if (k) convert_channels_short_interleaved(channels, buffer, f->channels, f->channel_buffers, f->channel_buffer_start, k); buffer += k*channels; n += k; f->channel_buffer_start += k; if (n == len) break; if (!stb_vorbis_get_frame_float(f, NULL, &outputs)) break; } return n; } int stb_vorbis_get_samples_short(stb_vorbis *f, int channels, short **buffer, int len) { float **outputs; int n=0; int z = f->channels; if (z > channels) z = channels; while (n < len) { int k = f->channel_buffer_end - f->channel_buffer_start; if (n+k >= len) k = len - n; if (k) convert_samples_short(channels, buffer, n, f->channels, f->channel_buffers, f->channel_buffer_start, k); n += k; f->channel_buffer_start += k; if (n == len) break; if (!stb_vorbis_get_frame_float(f, NULL, &outputs)) break; } return n; } #ifndef STB_VORBIS_NO_STDIO int stb_vorbis_decode_filename(char *filename, int *channels, short **output) { int data_len, offset, total, limit, error; short *data; stb_vorbis *v = stb_vorbis_open_filename(filename, &error, NULL); if (v == NULL) return -1; limit = v->channels * 4096; *channels = v->channels; offset = data_len = 0; total = limit; data = (short *) malloc(total * sizeof(*data)); if (data == NULL) { stb_vorbis_close(v); return -2; } for (;;) { int n = stb_vorbis_get_frame_short_interleaved(v, v->channels, data+offset, total-offset); if (n == 0) break; data_len += n; offset += n * v->channels; if (offset + limit > total) { short *data2; total *= 2; data2 = (short *) realloc(data, total * sizeof(*data)); if (data2 == NULL) { free(data); stb_vorbis_close(v); return -2; } data = data2; } } *output = data; return data_len; } #endif // NO_STDIO int stb_vorbis_decode_memory(uint8 *mem, int len, int *channels, short **output) { int data_len, offset, total, limit, error; short *data; stb_vorbis *v = stb_vorbis_open_memory(mem, len, &error, NULL); if (v == NULL) return -1; limit = v->channels * 4096; *channels = v->channels; offset = data_len = 0; total = limit; data = (short *) malloc(total * sizeof(*data)); if (data == NULL) { stb_vorbis_close(v); return -2; } for (;;) { int n = stb_vorbis_get_frame_short_interleaved(v, v->channels, data+offset, total-offset); if (n == 0) break; data_len += n; offset += n * v->channels; if (offset + limit > total) { short *data2; total *= 2; data2 = (short *) realloc(data, total * sizeof(*data)); if (data2 == NULL) { free(data); stb_vorbis_close(v); return -2; } data = data2; } } *output = data; return data_len; } #endif int stb_vorbis_get_samples_float_interleaved(stb_vorbis *f, int channels, float *buffer, int num_floats) { float **outputs; int len = num_floats / channels; int n=0; int z = f->channels; if (z > channels) z = channels; while (n < len) { int i,j; int k = f->channel_buffer_end - f->channel_buffer_start; if (n+k >= len) k = len - n; for (j=0; j < k; ++j) { for (i=0; i < z; ++i) *buffer++ = f->channel_buffers[i][f->channel_buffer_start+j]; for ( ; i < channels; ++i) *buffer++ = 0; } n += k; f->channel_buffer_start += k; if (n == len) break; if (!stb_vorbis_get_frame_float(f, NULL, &outputs)) break; } return n; } int stb_vorbis_get_samples_float(stb_vorbis *f, int channels, float **buffer, int num_samples) { float **outputs; int n=0; int z = f->channels; if (z > channels) z = channels; while (n < num_samples) { int i; int k = f->channel_buffer_end - f->channel_buffer_start; if (n+k >= num_samples) k = num_samples - n; if (k) { for (i=0; i < z; ++i) memcpy(buffer[i]+n, f->channel_buffers+f->channel_buffer_start, sizeof(float)*k); for ( ; i < channels; ++i) memset(buffer[i]+n, 0, sizeof(float) * k); } n += k; f->channel_buffer_start += k; if (n == num_samples) break; if (!stb_vorbis_get_frame_float(f, NULL, &outputs)) break; } return n; } #endif // STB_VORBIS_NO_PULLDATA_API #endif // STB_VORBIS_HEADER_ONLY
the_stack_data/145453033.c
int a[3] = {0, 1, 2}; int main() { if (a[0] != 0) return 1; if (a[1] != 1) return 2; if (a[2] != 2) return 3; return 0; }
the_stack_data/211080833.c
/* * Copyright (c) 2005-2017 National Technology & Engineering Solutions * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with * NTESS, the U.S. Government retains certain rights in this software. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials provided * with the distribution. * * * Neither the name of NTESS nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ /* Copy a range of a double vector to a double vector */ void cpvec(double *copy, int beg, int end, double *vec) { int i; copy = copy + beg; vec = vec + beg; for (i = end - beg + 1; i; i--) { *copy++ = *vec++; } } /* Copy a range of a float vector to a double vector */ void float_to_double(double *copy, int beg, int end, float *vec) { int i; copy = copy + beg; vec = vec + beg; for (i = end - beg + 1; i; i--) { *copy++ = *vec++; } } /* Copy a range of a double vector to a float vector */ void double_to_float(float *copy, int beg, int end, double *vec) { int i; copy = copy + beg; vec = vec + beg; for (i = end - beg + 1; i; i--) { *copy++ = *vec++; } }
the_stack_data/148578641.c
/* ACM 727 Equation * mythnc * 2012/01/13 09:44:34 * run time: 0.136 */ #include <stdio.h> #include <string.h> #define LINEMAX 10 #define MAXSTACK 50 void postfix(void); void pop(void); void push(char *); char stack[LINEMAX][MAXSTACK]; int count; int main(void) { scanf("%*d"); getchar(); getchar(); postfix(); return 0; } /* postfix: infix to postfix */ void postfix(void) { char line[LINEMAX]; count = 0; while (fgets(line, LINEMAX, stdin)) { line[strlen(line) - 1] = '\0'; /* operator */ if (line[0] == '+' || line[0] == '-' && strlen(line) == 1) { while (count > 0 && stack[count - 1][0] != '(') pop(); push(line); } else if (line[0] == '*' || line[0] == '/') { while (count > 0 && stack[count - 1][0] != '(' && stack[count - 1][0] != '+' && stack[count - 1][0] != '-') pop(); push(line); } else if (line[0] == '(') push(line); else if (line[0] == ')') { while (stack[count - 1][0] != '(') pop(); count--; } /* terminal condition */ else if (line[0] == '\0') { while (count != 0) pop(); printf("\n\n"); } /* operand */ else printf("%s", line); } while (count != 0) pop(); putchar('\n'); } /* pop: print out the top element */ void pop(void) { printf("%s", stack[--count]); } /* push: push line to stack */ void push(char *line) { strcpy(stack[count++], line); }
the_stack_data/232956578.c
#include <stdlib.h> #include <unistd.h> #include <stdio.h> #include <sys/msg.h> #include <sys/wait.h> #include <string.h> /* message structure */ struct message { long mtype; char mtext[8192]; }; int main(void) { /* create message queue */ int msqid = msgget(IPC_PRIVATE, IPC_CREAT | 0600); if (msqid == -1) { perror("msgget"); return EXIT_FAILURE; } /* fork a child process */ pid_t pid = fork(); if (pid == 0) { /* child */ struct message message; message.mtype = 23; memset(&(message.mtext), 0, 8192 * sizeof(char)); (void)strcpy(message.mtext, "Hello parent!"); /* send message to queue */ if (msgsnd(msqid, &message, sizeof(long) + (strlen(message.mtext) * sizeof(char)) + 1, 0) == -1) { perror("msgsnd"); return EXIT_FAILURE; } } else { /* parent */ /* wait for child to finish */ (void)waitpid(pid, NULL, 0); /* receive message from queue */ struct message message; if (msgrcv(msqid, &message, 8192, 0, 0) == -1) { perror("msgrcv"); return EXIT_FAILURE; } printf("%s\n", message.mtext); /* destroy message queue */ if (msgctl(msqid, IPC_RMID, NULL) == -1) { perror("msgctl"); return EXIT_FAILURE; } } return EXIT_SUCCESS; }
the_stack_data/90761788.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 i, n; int sum = 0; printf("Enter number:"); scanf("%d", &n); for(i=1; i<=n; i++) { sum = sum + i; } printf("Sum is %d", sum); return 0; }
the_stack_data/126296.c
#include <stdio.h> // matrizes = Arrays multi-dimensionais int main() { char nome [3][50]; //três linhas com 50 colunas for(int i = 0; i < 3; i++) { printf("Qual o seu nome? "); gets(nome[i]); } for (int i = 0; i < 3; i++) { printf("Olá %s\n", nome[i]); } return 0; }
the_stack_data/190768542.c
#include "printf.h" #include <stdint.h> struct page_info { uint32_t usable : 1; uint32_t inuse : 1; uint32_t is_head: 1; uint32_t order : 4; struct page_info *next; struct page_info *last; } __attribute__ ((packed, aligned(4))); static struct page_info *pages; static struct page_info *buddies[13]; static void init_page_array() { pages = (void *)0x1000000ul; unsigned long array_size = 512 * 1024 * 1024 / 4096 * sizeof(struct page_info); unsigned long preserved_pages = 32 * 1024 * 1024 / 4096; int i = 0; for (i = 0; i < preserved_pages; i++) { pages[i].usable = 0; pages[i].inuse = 1; } for (; i < 512 * 1024 * 1024 / 4096; i++) { pages[i].usable = 1; pages[i].inuse = 0; } } /*static void alloc_preserved()*/ /*{*/ /* unsigned long array_size = 512 * 1024 * 1024 / 4096 * sizeof(struct page_info);*/ /* unsigned long preserved_pages = array_size / 4096 + 1 + 16 * 1024 * 1024 / 4096;*/ /* while(preserved_pages > (1ul << 13))*/ /* {*/ /* preserved_pages - (1ul << 13); */ /* }*/ /*}*/ void set_not_inuse(int order, struct page_info *page) { for (int i = 0; i < (1ul << order); i++) { page[i].inuse = 0; } } void set_inuse(int order, struct page_info *page) { for (int i = 0; i < (1ul << order); i++) { page[i].inuse = 1; } } void set_order(int order, struct page_info *page) { for (int i = 0; i < (1ul << order); i++) { page[i].order = order; } } unsigned long page_addr_index(struct page_info *page) { return ((unsigned long)page - 0x1000000ul) / sizeof(struct page_info); } unsigned long page_addr_to_real_addr(struct page_info *page) { return page_addr_index(page) * 4096; } struct page_info* real_addr_to_page_addr(unsigned long real_addr) { return (struct page_info*)(real_addr / 4096 * sizeof(struct page_info) + 0x1000000ul); } void insert_page(int order,struct page_info *page) { set_order(order,page); /* page->is_head = 1;*/ struct page_info *current_page; current_page = buddies[order]; /* print_buddy(order);*/ if (!current_page) { buddies[order] = page; } else if (page < current_page) { buddies[order] = page; page->next = current_page; current_page->last = page; } else { struct page_info *next_page; next_page = current_page->next; while (next_page && page > next_page) { current_page = next_page; next_page = current_page->next; } current_page->next = page; page->last = current_page; page->next = next_page; next_page->last = page; } /* print_buddy(order);*/ } struct page_info* pop_page(int order) { struct page_info *pop_out = buddies[order]; buddies[order] = pop_out->next; buddies[order]->last = 0; pop_out->next = 0; return pop_out; } /*struct page_info* get_last_page(struct page_info *page)*/ /*{*/ /* int order = page->order;*/ /* return (struct page_info*)((unsigned long)page - (1ul<<order) * sizeof(struct page_info));*/ /* */ /*}*/ /*struct page_info* get_next_page(struct page_info *page)*/ /*{*/ /* int order = page->order;*/ /* return (struct page_info*)((unsigned long)page + (1ul<<order) * sizeof(struct page_info));*/ /* */ /*}*/ struct page_info* _alloc_page(int order) { int i = 0; while(!buddies[order + i] && order + i < 13) { i++; } if (i+order == 13) { return 0; } else { while(i > 0) { struct page_info *pop_out = pop_page(order + i); insert_page(order + i -1, pop_out); insert_page(order + i -1, pop_out + (1ul << (order + i -1))); i--; } struct page_info *page; page = pop_page(order); set_inuse(order,page); page->is_head = 1; return page; } } unsigned long alloc_page(int order) { struct page_info *page_addr = _alloc_page(order); if (page_addr == 0) { return 0; } else { return page_addr_to_real_addr(page_addr); } } void remove_page(struct page_info *page) { int order = page->order; if (!page->last) { //printk("free1: %h, last_page: %h, last order: %h\n", page, last_page, last_page->order); buddies[order] = page->next; if (page->next) page->next->last = 0; page->next = 0; /* printk("free1: %h, page_order: %h, page next: %h\n", page, page->order, page->next);*/ /* printk("after remove:%h\n",buddies[page->order]);*/ } else { //printk("free2: %h, last_page: %h, last order: %h\n", page, last_page, last_page->order); page->last->next = page->next; if (page->next) page->next->last = page->last; /* printk("free2: %h, page_order: %h, page next: %h\n", page, page->order, page->next);*/ /* printk("after remove:%h\n",buddies[page->order]);*/ } page->next = 0; page->last = 0; page->order = -1; } void merge_page(struct page_info *page) { int order; int index; /* cannot merge if it is already the highest order*/ while(1) { order = page->order; index = page_addr_index(page); if (order == 12) { break; } /* if ((index - ((index >> (order + 1)) << (order + 1))))*/ /* printk("order: %h\n", order);*/ /* merge with the next page block*/ //if ((index - ((index >> order) << order)) == 0 && page->next) if ((index - ((index >> (order + 1)) << (order + 1))) == 0 && page->next && page + (1u<<order) == page->next) { /* printk("merge next\n");*/ /* printk("next page: %d, inuse: %h\n",page_addr_index(page->next),page->next->inuse);*/ page->next->is_head = 0; remove_page(page->next); remove_page(page); insert_page(order + 1, page); } /* merge with the last page block*/ else if ((index - ((index >> (order + 1)) << (order + 1))) != 0 && page->last && page->last + (1u<<order) == page) { /* printk("merge last\n");*/ page->is_head = 0; remove_page(page->last); remove_page(page); page->last->next = 0; page->last = 0; insert_page(order + 1, page - (1u<<order)); /* printk("after merge buddy %d: %d",order + 1, page_addr_index(buddies[order+1]));*/ page = page - (1u<<order); } else { break; } } } void _free_page(struct page_info *page) { if (page->is_head == 0) { /* printk("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");*/ return; } else { /* printk("free order: %h, free page: %d\n", page->order, page_addr_index(page));*/ set_not_inuse(page->order,page); insert_page(page->order,page); merge_page(page); } } void free_page(unsigned long address) { _free_page(real_addr_to_page_addr(address)); } int cal_order(unsigned int size) { int order; for (order = 0; order < 13; order++){ if (size <= (1 << (12 + order))) return order; } return order; } void init_buddy() { init_page_array(); int i = 32 * 1024 * 1024 / 4096; while (i < 512 * 1024 * 1024 / 4096) { insert_page(12,pages + i); i += 1ul << 12; } } void print_buddies() { for(int i = 0; i < 13 ; i ++){ printk("buddy%h\n",i); if (!buddies[i]) printk("Empty"); else { struct page_info *cur = buddies[i]; do { printk("%d ",page_addr_index(cur)); cur = cur->next; } while(cur); } printk("\n*******************\n"); } } void print_buddy(int order) { printk("buddy%h\n",order); if (!buddies[order]) printk("Empty"); else { struct page_info *cur = buddies[order]; do { printk("%d ",page_addr_index(cur)); cur = cur->next; } while(cur); } printk("\n"); } /*void test(){*/ /* init_buddy();*/ /* unsigned long page;*/ /* page = _alloc_page(0);*/ /* printk("allocated page: %h",page);*/ /* */ /*}*/
the_stack_data/100140296.c
#if LAB >= 4 /* * More-or-less Unix-compatible process fork and wait functions, * which PIOS implements completely in the user space C library. * * Copyright (C) 2010 Yale University. * See section "MIT License" in the file LICENSES for licensing terms. * * Primary author: Bryan Ford */ #include <inc/file.h> #include <inc/stat.h> #include <inc/unistd.h> #include <inc/string.h> #include <inc/syscall.h> #include <inc/assert.h> #include <inc/errno.h> #include <inc/mmu.h> #include <inc/vm.h> #define ALLVA ((void*) VM_USERLO) #define ALLSIZE (VM_USERHI - VM_USERLO) bool reconcile(pid_t pid, filestate *cfiles); bool reconcile_inode(pid_t pid, filestate *cfiles, int pino, int cino); bool reconcile_merge(pid_t pid, filestate *cfiles, int pino, int cino); pid_t fork(void) { int i; // Find a free child process slot. // We just use child process slot numbers as Unix PIDs, // even though child slots are process-local in PIOS // whereas PIDs are global in Unix. // This means that commands like 'ps' and 'kill' // have to be shell-builtin commands under PIOS. pid_t pid; for (pid = 1; pid < 256; pid++) if (files->child[pid].state == PROC_FREE) break; if (pid == 256) { warn("fork: no child process available"); errno = EAGAIN; return -1; } // Set up the register state for the child struct procstate ps; memset(&ps, 0, sizeof(ps)); // Use some assembly magic to propagate registers to child // and generate an appropriate starting eip // WWY: we need to mark all registers here int isparent; asm volatile( " movq %%rsi,%0;" " movq %%rdi,%1;" " movq %%rbp,%2;" " movq %%rsp,%3;" " movq $1f,%4;" " movl $1,%5;" "1: " : "=m" (ps.tf.rsi), "=m" (ps.tf.rdi), "=m" (ps.tf.rbp), "=m" (ps.tf.rsp), "=m" (ps.tf.rip), "=a" (isparent) : : "rbx", "rcx", "rdx", "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15"); if (!isparent) { #if LAB >= 9 files->thself = pid; #endif // Clear our child state array, since we have no children yet. memset(&files->child, 0, sizeof(files->child)); files->child[0].state = PROC_RESERVED; for (i = 1; i < FILE_INODES; i++) if (fileino_alloced(i)) { files->fi[i].rino = i; // 1-to-1 mapping files->fi[i].rver = files->fi[i].ver; files->fi[i].rlen = files->fi[i].size; } return 0; // indicate that we're the child. } // Copy our entire user address space into the child and start it. ps.tf.rax = 0; // isparent == 0 in the child sys_put(SYS_REGS | SYS_COPY | SYS_START, pid, &ps, ALLVA, ALLVA, ALLSIZE); // Record the inode generation numbers of all inodes at fork time, // so that we can reconcile them later when we synchronize with it. memset(&files->child[pid], 0, sizeof(files->child[pid])); files->child[pid].state = PROC_FORKED; return pid; } pid_t wait(int *status) { return waitpid(-1, status, 0); } pid_t waitpid(pid_t pid, int *status, int options) { assert(pid >= -1 && pid < 256); // Find a process to wait for. // Of course for interactive or load-balancing purposes // we would like to have a way to wait for // whichever child process happens to finish first - // that requires a (nondeterministic) kernel API extension. if (pid <= 0) for (pid = 1; pid < 256; pid++) if (files->child[pid].state == PROC_FORKED) break; if (pid == 256 || files->child[pid].state != PROC_FORKED) { errno = ECHILD; return -1; } // Repeatedly synchronize with the chosen child until it exits. while (1) { // Wait for the child to finish whatever it's doing, // and extract its CPU and process/file state. struct procstate ps; sys_get(SYS_COPY | SYS_REGS, pid, &ps, (void*)FILESVA, (void*)VM_SCRATCHLO, PTSIZE); filestate *cfiles = (filestate*)VM_SCRATCHLO; // Did the child take a trap? if (ps.tf.trapno != T_SYSCALL) { // Yes - terminate the child WITHOUT reconciling, // since the child's results are probably invalid. warn("child %d took trap %x, rip %x\n", pid, ps.tf.trapno, ps.tf.rip); if (status != NULL) *status = WSIGNALED | ps.tf.trapno; done: // unregister mid for child sys_mid_unregister(pid); // Clear out the child's address space. sys_put(SYS_ZERO, pid, NULL, ALLVA, ALLVA, ALLSIZE); files->child[pid].state = PROC_FREE; return pid; } // Reconcile our file system state with the child's. bool didio = reconcile(pid, cfiles); // Has the child exited gracefully? if (cfiles->exited) { if (status != NULL) *status = WEXITED | (cfiles->status & 0xff); goto done; } // If the child is waiting for new input // and the reconciliation above didn't provide anything new, // then wait for something new from OUR parent in turn. if (!didio) sys_ret(); // Reconcile again, to forward any new I/O to the child. (void)reconcile(pid, cfiles); // Push the child's updated file state back into the child. sys_put(SYS_COPY | SYS_START, pid, NULL, (void*)VM_SCRATCHLO, (void*)FILESVA, PTSIZE); } } // Reconcile our file system state, whose metadata is in 'files', // with the file system state of child 'pid', whose metadata is in 'cfiles'. // Returns nonzero if any changes were propagated, false otherwise. bool reconcile(pid_t pid, filestate *cfiles) { bool didio = 0; int i; // Compute a parent-to-child and child-to-parent inode mapping table. int p2c[FILE_INODES], c2p[FILE_INODES]; memset(p2c, 0, sizeof(p2c)); memset(c2p, 0, sizeof(c2p)); p2c[FILEINO_CONSIN] = c2p[FILEINO_CONSIN] = FILEINO_CONSIN; p2c[FILEINO_CONSOUT] = c2p[FILEINO_CONSOUT] = FILEINO_CONSOUT; p2c[FILEINO_ROOTDIR] = c2p[FILEINO_ROOTDIR] = FILEINO_ROOTDIR; // First make sure all the child's allocated inodes // have a mapping in the parent, creating mappings as needed. // Also keep track of the parent inodes we find mappings for. int cino; for (cino = 1; cino < FILE_INODES; cino++) { fileinode *cfi = &cfiles->fi[cino]; if (cfi->de.d_name[0] == 0) continue; // not allocated in the child if (cfi->mode == 0 && cfi->rino == 0) continue; // existed only ephemerally in child if (cfi->rino == 0) { // No corresponding parent inode known: find/create one. // The parent directory should already have a mapping. if (cfi->dino <= 0 || cfi->dino >= FILE_INODES || c2p[cfi->dino] == 0) { warn("reconcile: cino %d has invalid parent", cino); continue; // don't reconcile it } cfi->rino = fileino_create(files, c2p[cfi->dino], cfi->de.d_name); if (cfi->rino <= 0) continue; // no free inodes! } // Check the validity of the child's existing mapping. // If something's fishy, just don't reconcile it, // since we don't want the child to kill the parent this way. int pino = cfi->rino; fileinode *pfi = &files->fi[pino]; if (pino <= 0 || pino >= FILE_INODES || p2c[pfi->dino] != cfi->dino || strcmp(pfi->de.d_name, cfi->de.d_name) != 0 || cfi->rver > pfi->ver || cfi->rver > cfi->ver) { warn("reconcile: mapping %d/%d: " "dir %d/%d name %s/%s ver %d/%d(%d)", pino, cino, pfi->dino, cfi->dino, pfi->de.d_name, cfi->de.d_name, pfi->ver, cfi->ver, cfi->rver); continue; } // Record the mapping. p2c[pino] = cino; c2p[cino] = pino; } // Now make sure all the parent's allocated inodes // have a mapping in the child, creating mappings as needed. int pino; for (pino = 1; pino < FILE_INODES; pino++) { fileinode *pfi = &files->fi[pino]; if (pfi->de.d_name[0] == 0 || pfi->mode == 0) continue; // not in use or already deleted if (p2c[pino] != 0) continue; // already mapped cino = fileino_create(cfiles, p2c[pfi->dino], pfi->de.d_name); if (cino <= 0) continue; // no free inodes! cfiles->fi[cino].rino = pino; p2c[pino] = cino; c2p[cino] = pino; } // Finally, reconcile each corresponding pair of inodes. for (pino = 1; pino < FILE_INODES; pino++) { if (!p2c[pino]) continue; // no corresponding inode in child cino = p2c[pino]; assert(c2p[cino] == pino); didio |= reconcile_inode(pid, cfiles, pino, cino); } return didio; } bool reconcile_inode(pid_t pid, filestate *cfiles, int pino, int cino) { assert(pino > 0 && pino < FILE_INODES); assert(cino > 0 && cino < FILE_INODES); fileinode *pfi = &files->fi[pino]; fileinode *cfi = &cfiles->fi[cino]; // Find the reference version number and length for reconciliation int rver = cfi->rver; int rlen = cfi->rlen; // Check some invariants that should hold between // the parent's and child's current version numbers and lengths // and the reference version number and length stored in the child. // XXX should protect the parent better from state corruption by child. assert(cfi->ver >= rver); // version # only increases assert(pfi->ver >= rver); if (cfi->ver == rver) // within a version, length only grows assert(cfi->size >= rlen); if (pfi->ver == rver) assert(pfi->size >= rlen); #if SOL >= 4 // If no exclusive changes made in either parent or child, // then just merge any non-exclusive, append-only updates. if (pfi->ver == rver && cfi->ver == rver) return reconcile_merge(pid, cfiles, pino, cino); //cprintf("reconcile %s %d/%d: ver %d/%d(%d) len %d/%d(%d)\n", // pfi->de.d_name, pino, cino, // pfi->ver, cfi->ver, rver, // pfi->size, cfi->size, rlen); assert(pfi->size <= FILE_MAXSIZE); assert(cfi->size <= FILE_MAXSIZE); // If both inodes have been changed and at least one was exclusive, // then we have a conflict - just mark both inodes conflicted. if ((pfi->ver > rver || pfi->size > rlen) && (cfi->ver > rver || cfi->size > rlen)) { warn("reconcile_inode: parent/child conflict: %s (%d/%d)", pfi->de.d_name, pino, cino); pfi->mode |= S_IFCONF; cfi->mode |= S_IFCONF; pfi->ver = cfi->ver = cfi->rver = MAX(pfi->ver, cfi->ver); return 1; // Changes of sorts were "propagated" } // No conflict: copy the latest version to the other. if (pfi->ver > rver || pfi->size > rlen) { // Parent's version is newer: copy to child. cfi->ver = pfi->ver; cfi->mode = pfi->mode; cfi->size = pfi->size; sys_put(SYS_COPY, pid, NULL, FILEDATA(pino), FILEDATA(cino), PTSIZE); } else { // Child's version is newer: copy to parent. pfi->ver = cfi->ver; pfi->mode = cfi->mode; pfi->size = cfi->size; sys_get(SYS_COPY, pid, NULL, FILEDATA(cino), FILEDATA(pino), PTSIZE); } // Reset child's reconciliation state. cfi->rver = pfi->ver; cfi->rlen = pfi->size; return 1; #else // ! SOL >= 4 // Lab 4: insert your code here to reconcile the two inodes: // copy the parent's file to the child if only the parent's has changed, // copy the child's file to the parent if only the child's has changed, // and mark both files conflicted if both have been modified. // Then be sure to update the reconciliation state // so that the next reconciliation will start from this point. // // Note: if only one process has made an exclusive modification // that bumps the inode's version number, // and the other process has NOT bumped its inode's version number // but has performed append-only writes increasing the file's length, // that situation still constitutes a conflict // because we don't have a clean way to resolve it automatically. warn("reconcile_inode not implemented"); return 0; #endif // ! SOL >= 4 } bool reconcile_merge(pid_t pid, filestate *cfiles, int pino, int cino) { fileinode *pfi = &files->fi[pino]; fileinode *cfi = &cfiles->fi[cino]; assert(pino > 0 && pino < FILE_INODES); assert(cino > 0 && cino < FILE_INODES); assert(pfi->ver == cfi->ver); assert(pfi->mode == cfi->mode); if (!S_ISREG(pfi->mode)) return 0; // only regular files have data to merge #if SOL >= 4 // How much did the file grow in the src & dst since last reconcile? int rlen = cfi->rlen; int plen = pfi->size; int clen = cfi->size; int pgrow = plen - rlen; int cgrow = clen - rlen; assert(pgrow >= 0 && pgrow <= FILE_MAXSIZE); assert(cgrow >= 0 && cgrow <= FILE_MAXSIZE); if (pgrow == 0 && cgrow == 0) return 0; // nothing to merge //cprintf("reconcile_merge %s %d/%d: ver %d/%d(%d) len %d/%d(%d)\n", // pfi->de.d_name, pino, cino, // pfi->ver, cfi->ver, cfi->rver, // pfi->size, cfi->size, rlen); assert(pfi->size <= FILE_MAXSIZE); assert(cfi->size <= FILE_MAXSIZE); // Map if necessary and find src & dst file data areas. // The child's inode table is sitting at VM_SCRATCHLO, // so map the file data temporarily at VM_SCRATCHLO+PTSIZE. void *pp = FILEDATA(pino); void *cp = (void*)VM_SCRATCHLO+PTSIZE; sys_get(SYS_COPY, pid, NULL, FILEDATA(cino), cp, PTSIZE); // Would the new file size be too big after reconcile? Conflict! int newlen = rlen + pgrow + cgrow; assert(newlen == plen + cgrow); assert(newlen == clen + pgrow); if (newlen > FILE_MAXSIZE) { pfi->mode |= S_IFCONF; cfi->mode |= S_IFCONF; return 1; // I/O of sorts did occur } // Make sure the perms are adequate in both copies of file int pagelen = ROUNDUP(newlen, PAGESIZE); sys_get(SYS_PERM | SYS_RW, 0, NULL, NULL, pp, pagelen); sys_get(SYS_PERM | SYS_RW, 0, NULL, NULL, cp, pagelen); // Copy the newly-added parts of the file in both directions. // Note that if both parent and child appended simultaneously, // the appended chunks will be left in opposite order in the two! // This is unavoidable if we want to allow simultaneous appends // and don't want to change already-written portions: // it's a price we pay for this relaxed consistency model. memcpy(pp + plen, cp + rlen, cgrow); memcpy(cp + clen, pp + rlen, pgrow); pfi->size = newlen; assert(newlen == plen + cgrow); cfi->size = newlen; assert(newlen == clen + pgrow); cfi->rlen = newlen; assert(newlen == rlen + pgrow + cgrow); // Copy child's updated file data back into the child sys_put(SYS_COPY, pid, NULL, cp, FILEDATA(cino), PTSIZE); // File merged! return 1; #else // ! SOL >= 4 // Lab 4: insert your code here to merge inclusive appends: // copy the parent's appends since last reconciliation into the child, // and the child's appends since last reconciliation into the parent. // Parent and child should be left with files of the same size, // although the writes they contain may be in a different order. warn("reconcile_merge not implemented"); return 0; #endif // ! SOL >= 4 } #endif // LAB >= 4
the_stack_data/126703980.c
#include <stdio.h> int main() { int len = 1, n, num[256] = { 1 }; scanf("%d", &n); while (n) { for (int i = 0; i < len; i ++) num[i] *= n; for (int i = 0; i < len; i ++) num[i+1] += num[i] / 1000000, num[i] %= 1000000; if (num[len]) len ++; n --; } printf("%d", num[-- len]); while (len) printf("%06d", num[-- len]); return 0; }
the_stack_data/187643842.c
#include <stdio.h> void scilab_rt_plot3d_d2d2d2d0d0s0d2d2_(int in00, int in01, double matrixin0[in00][in01], int in10, int in11, double matrixin1[in10][in11], int in20, int in21, double matrixin2[in20][in21], double scalarin0, double scalarin1, char* scalarin2, int in30, int in31, double matrixin3[in30][in31], int in40, int in41, double matrixin4[in40][in41]) { int i; int j; double val0 = 0; double val1 = 0; double val2 = 0; double val3 = 0; double val4 = 0; for (i = 0; i < in00; ++i) { for (j = 0; j < in01; ++j) { val0 += matrixin0[i][j]; } } printf("%f", val0); for (i = 0; i < in10; ++i) { for (j = 0; j < in11; ++j) { val1 += matrixin1[i][j]; } } printf("%f", val1); for (i = 0; i < in20; ++i) { for (j = 0; j < in21; ++j) { val2 += matrixin2[i][j]; } } printf("%f", val2); printf("%f", scalarin0); printf("%f", scalarin1); printf("%s", scalarin2); for (i = 0; i < in30; ++i) { for (j = 0; j < in31; ++j) { val3 += matrixin3[i][j]; } } printf("%f", val3); for (i = 0; i < in40; ++i) { for (j = 0; j < in41; ++j) { val4 += matrixin4[i][j]; } } printf("%f", val4); }
the_stack_data/386582.c
#include <time.h> #ifndef REGTEST time_t time(time_t* t) { if(t) *t = -1; return -1; } #endif #ifdef TEST #include "_PDCLIB_test.h" int main( void ) { return TEST_RESULTS; } #endif
the_stack_data/100658.c
// RUN: %clang_cc1 -triple i386-apple-darwin9 %s -emit-llvm -o - | FileCheck -check-prefix CHECK-X32 %s // CHECK-X32: %struct.s0 = type { i64, i64, i32, [12 x i32] } // CHECK-X32: %struct.s1 = type { [15 x i32], %struct.s0 } // RUN: %clang_cc1 -triple x86_64-apple-darwin9 %s -emit-llvm -o - | FileCheck -check-prefix CHECK-X64 %s // CHECK-X64: %struct.s0 = type <{ i64, i64, i32, [12 x i32] }> // CHECK-X64: %struct.s1 = type <{ [15 x i32], %struct.s0 }> // rdar://problem/7095436 #pragma pack(4) struct s0 { long long a __attribute__((aligned(8))); long long b __attribute__((aligned(8))); unsigned int c __attribute__((aligned(8))); int d[12]; } a; struct s1 { int a[15]; struct s0 b; } b;
the_stack_data/32950629.c
#include <stdio.h> int main() { int x, y, t; printf("Enter two integers\n"); scanf("%d%d", &x, &y); printf("Before Swapping\nFirst integer = %d\nSecond integer = %d\n", x, y); t = x; x = y; y = t; printf("After Swapping\nFirst integer = %d\nSecond integer = %d\n", x, y); return 0; }
the_stack_data/82949115.c
#include <stdio.h> #include <stdlib.h> struct node{ int data; struct node* next; }; typedef struct node* Node; /* Function to load the numbers onto the linked list Return a pointer to the head of the list */ Node loadNum(); /* Function to print the number in position pos head is guaranteed to be non-NULL */ /* Function to print the number in position pos head is guaranteed to be non-NULL */ void printNum(Node head,int pos) { int i = 1; Node temp = head; while( i != pos ){ temp = temp->next; if( temp == NULL){ printf("-1"); return; } i++; } printf("%d",temp->data); } /* Function to release the memory after every iteration */ void releaseMem(Node head); int main() { int i,T; int pos; Node head; scanf("%d",&T); for (i = 0; i < T; i++){ head = loadNum(); scanf("%d",&pos); printNum(head, pos); if(i<T-1) printf("\n"); // Will add a new line for after all output // except for last. releaseMem(head); } return 0; } /* Function to load the numbers onto the linked list Return a pointer to the head of the list */ Node loadNum(){ Node head,ptr,temp; head=NULL; do{ ptr=(struct node*)malloc(sizeof(struct node)); scanf("%d",&ptr->data); printf("hello"); ptr->next=NULL; if(head==NULL) { head=ptr; } else{ temp=head; while(temp->next!=NULL){ temp=temp->next; } temp->next=ptr; } }while(ptr->data != -1); return (head); } /* Function to release the memory after every iteration */ void releaseMem(Node head){ Node prev=head; while(head!=NULL){ head=head->next; free(prev); prev=head; } free(head); }
the_stack_data/291733.c
#include <stdio.h> #include <stdbool.h> #include <stdlib.h> //FIXME /*************************** Example: Grammar: E --> i E' E' --> + i E' | e ***************************/ char l; bool E_alpha(); bool E_alpha_1(); bool E_alpha_2(); void error(){ printf("Error\n"); exit(-1); } // Match function bool match(char t) { if (l == t) { l = getchar(); return true; } else error(); } // Definition of E' as per the given production bool E_alpha(){ if(E_alpha_1() || E_alpha_2()){ return true; } } // Definition of E_1' as per the given production bool E_alpha_2() { if (l == 'i') return match('i'); } // Definition of E_2' as per the given production bool E_alpha_1() { if (l == '+') { if(match('+') && match('i') && E_alpha()) return true; } } // Definition of E, as per the given production bool E() { if (l == 'i') { if (match('i') && E_alpha()){ return true; } }else{ error(); } } int main() { do { l = getchar(); // E is a start symbol. E(); } while (l != '\n' && l != EOF); if (l == '\n') printf("Parsing Successful\n"); }
the_stack_data/611397.c
#include <stdio.h> /*default io stream*/ #include <stdbool.h> /*bool type in c99*/ #include <stdlib.h> /*srand(), rand()*/ #include <time.h> /*time(NULL)*/ void error(char *msg); bool InputRowCol(unsigned int *Row, unsigned int *Col, unsigned int *Y, unsigned int *X); unsigned int** CreateMap(unsigned int *Row, unsigned int *Col); unsigned int** FreeMap(unsigned int **map); void InitMap(unsigned int **map, unsigned int *Row, unsigned int *Col, unsigned int *Y, unsigned int *X); void RandomWalk(unsigned int **map, unsigned int *moveStep, unsigned int *Row, unsigned int *Col, unsigned int *Y, unsigned int *X); void OutPutResult(unsigned int **map, unsigned int *moveStep, unsigned int *Row, unsigned int *Col, unsigned int *Y, unsigned int *X); int main(int argc, char *argv[]){ unsigned int **map = NULL; unsigned int Row = 0, Col = 0; unsigned int x = 0, y = 0; unsigned int moveStep = 0; while( InputRowCol(&Row, &Col, &y, &x) ){ map = CreateMap(&Row, &Col); InitMap(map, &Row, &Col, &y, &x); RandomWalk(map, &moveStep, &Row, &Col, &y, &x); OutPutResult(map, &moveStep, &Row, &Col,&y,&x); map = FreeMap(map); } return 0; } void error(char *msg){ fprintf(stderr,"%s",msg); exit(1); } bool InputRowCol(unsigned int *Row, unsigned int *Col, unsigned int *Y, unsigned int *X){ while(1){ printf("\nPlease Enter the dimension of map\n" "(input format:[Row] [Col] [Y] [X]),\n" "(Range:Rol->(2:40], Col->[2:20], Y->[0,Row), X->[0.Col))\n" "(exit input: 0 0 0 0)\n" ": "); scanf("%u %u %u %u",Row,Col,Y,X); if( *Row == 0 && *Col == 0 && *Y == 0 && *X == 0){ printf("exit file\n"); return false; } else if( (*Row <= 2 || *Row > 40) || (*Col < 2 || *Col > 20) ) fprintf(stderr,"Error Input, ([Row],[Col])=([2:40],[2:20])\n"); else if( ( *Y < 0 || *Y >= *Row ) || ( *X < 0 || *X >= *Col) ) fprintf(stderr,"X or Y out of the range of Rol or Col\n"); else return true; } } unsigned int** CreateMap(unsigned int *Row, unsigned int *Col){ unsigned int *longMap = malloc(sizeof(unsigned int)*(*Row)*(*Col)); unsigned int **map = malloc(sizeof(unsigned int *)*(*Row)); if( (longMap == NULL) || (map == NULL) ) error("Error in malloc space"); for(unsigned int j = 0 ; j < (*Row) ; ++j ){ map[j] = longMap + j*(*Col) ; } return map; } unsigned int** FreeMap(unsigned int **map){ free(*map); free(map); return map; } void InitMap(unsigned int **map, unsigned int *Row, unsigned int *Col, unsigned int *Y, unsigned int *X){ for( unsigned int Rindex = 0 ; Rindex < (*Row) ; ++Rindex ) for( unsigned int Cindex = 0 ; Cindex < (*Col) ; ++Cindex ) map[Rindex][Cindex] = 0; map[*Y][*X] = 1; } void RandomWalk(unsigned int **map, unsigned int *moveStep, unsigned int *Row, unsigned int *Col, unsigned int *Y, unsigned int *X){ unsigned int ibug = *X; unsigned int jbug = *Y; unsigned int itmpt = 0, jtmpt = 0; unsigned int noZero = (*Row) * (*Col) - 1 ; int imove[8] = {-1, 0, 1, 1, 1, 0,-1,-1}; int jmove[8] = { 1, 1, 1, 0,-1,-1,-1, 0}; (*moveStep) = 0; srand(time(NULL)); for(;(noZero!=0) && ((*moveStep+1)<=50000);){ itmpt = ibug + imove[(unsigned int)(rand()/(RAND_MAX+1.0)*8.0)]; jtmpt = jbug + jmove[(unsigned int)(rand()/(RAND_MAX+1.0)*8.0)]; if( (itmpt < 0 || itmpt > (*Col-1)) || (jtmpt < 0 || jtmpt > (*Row-1)) ) continue; ++(*moveStep); if( !map[jtmpt][itmpt] ) --noZero; ++map[jtmpt][itmpt]; ibug = itmpt; jbug = jtmpt; } } void OutPutResult(unsigned int **map, unsigned int *moveStep, unsigned int *Row, unsigned int *Col, unsigned int *Y, unsigned int *X){ printf("\n "); for(unsigned int Cindex = 0 ; Cindex < *Col ; ++Cindex) printf("%5uC",Cindex); printf("\n\n"); for(unsigned int Rindex = 0 ; Rindex < *Row ; ++Rindex ){ printf("%5uR",Rindex); for(unsigned int Cindex = 0 ; Cindex < *Col ; ++Cindex) printf("%6u",map[Rindex][Cindex]); printf("\n"); } printf("\nRow:%u, Col:%u, Y:%u, X:%u\n",*Row,*Col,*Y,*X); printf("Total Move Step: %u\n",*moveStep); }
the_stack_data/844944.c
#include <stdio.h> #define LOWER 0 /* lower limit of table */ #define UPPER 300 /* upper limit */ #define STEP 20 /* step size */ /* print Fahrenheit-Celsius table */ main() { int fahr; for (fahr = LOWER; fahr <= UPPER; fahr = fahr + STEP) printf("%3d %6.1f\n", fahr, (5.0/9.0)*(fahr-32)); }
the_stack_data/151998.c
/*BEGIN_LEGAL Intel Open Source License Copyright (c) 2002-2017 Intel Corporation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of the Intel Corporation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE INTEL 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. END_LEGAL */ #include <unistd.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> intptr_t target_space; intptr_t swizzle_space; intptr_t page_mask; int Swizzled(void *ptr) { return ((intptr_t)ptr & page_mask) == swizzle_space; } void MyFree(void * p) { if (Swizzled(p)) { fprintf (stderr, "Error MyFree got swizzled %p\n", p); fflush (stderr); } } void * MyAlloc(void *ptr) { return ptr; // returned value will be swizzled } void * mmemcpy(void * to, const void * from, size_t n, void ** toout, void **fromout) { void * d0, *d1, *d2; __asm__ __volatile__( "cld; rep ; movsl; testb $2,%b4; je 1f; movsw;" "1:testb $1,%b4;je 2f;" "movsb;" "2:" : "=&c" (d0), "=&D" (d1), "=&S" (d2):"0" (n/4), "q" (n),"1" ((long) to),"2" ((long) from) : "memory"); *toout = d1; *fromout = d2; return (to); } void memindex(void * ad) { void * ptr = 0; __asm__ __volatile__("movl $0,(%0,%1,1)" :: "r"(ptr),"r"(ad)); } int n = 8; int main() { char buffer2[20]; char buffer3[20]; void * al; void *toout,*fromout; int page_size = getpagesize(); page_mask = ~((intptr_t)page_size-1); // Get some page aligned memory void * x = malloc(page_size * 2); target_space = ((intptr_t)x + page_size - 1) & page_mask; void * mm = (void*)target_space; al = MyAlloc(mm); // cause the swizzle swizzle_space = (intptr_t)al & page_mask; if (swizzle_space == target_space) { fprintf (stderr,"Error al not swizzled\n"); } ((char*)al)[0] = 1; buffer2[0] = 2; buffer3[0] = 3; mmemcpy(buffer2, al, n, &toout, &fromout); fprintf(stderr, "al[0] %d buffer2[0] %d toout - to %lx fromout - from %lx\n", ((char*)al)[0], buffer2[0], (unsigned long)toout - (unsigned long)buffer2, (unsigned long)fromout- (unsigned long)al); if (!Swizzled (al)) { fprintf (stderr,"Error1 al not swizzled\n"); } if (!Swizzled (fromout)) { fprintf (stderr,"Error2 fromout not swizzled\n"); } mmemcpy(al, buffer3, n, &toout, &fromout); if (!Swizzled (al)) { fprintf (stderr,"Error3 al not swizzled\n"); fflush (stderr); } if (!Swizzled (toout)) { fprintf (stderr,"Error4 toout not swizzled\n"); fflush (stderr); } fprintf(stderr, "al[0] %d buffer3[0] %d toout - to %lx fromout - from %lx\n",((char*)al)[0], buffer3[0], (unsigned long)toout-(unsigned long)al, (unsigned long)fromout - (unsigned long)buffer3); fflush (stderr); memindex(al); MyFree(al); return 0; }
the_stack_data/1181183.c
/* * * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file. * * Copyright 2007-2020 Broadcom Inc. All rights reserved. * * File: macsec_cmn.c * Purpose: MACSEC software module intergation support */ #ifdef INCLUDE_MACSEC #include <shared/bsl.h> #include <soc/mem.h> #include <soc/debug.h> #include <soc/cm.h> #include <soc/drv.h> #include <soc/register.h> #include <soc/memory.h> #include <soc/phy.h> #include <soc/ll.h> #include <soc/ptable.h> #include <soc/tucana.h> #include <soc/firebolt.h> #include <soc/xaui.h> #include <soc/phyctrl.h> #include <soc/phyreg.h> #include <soc/macsecphy.h> #include <sal/core/libc.h> #include <bcm/debug.h> #include <bcm_int/common/macsec_cmn.h> #include <bcm_int/control.h> #include <bcm_int/esw_dispatch.h> #define UNIT_VALID(unit) \ { \ if (!BCM_UNIT_VALID(unit)) { return BCM_E_UNIT; } \ } static bmacsec_error_t error_tbl[] = { BCM_E_NONE, BCM_E_INTERNAL, BCM_E_MEMORY, BCM_E_PARAM, BCM_E_EMPTY, BCM_E_FULL, BCM_E_NOT_FOUND, BCM_E_EXISTS, BCM_E_TIMEOUT, BCM_E_FAIL, BCM_E_DISABLED, BCM_E_BADID, BCM_E_RESOURCE, BCM_E_CONFIG, BCM_E_UNAVAIL, BCM_E_INIT, BCM_E_PORT, }; /* * Convert MACSEC return codes to BCM return code. */ #define BCM_ERROR(e) error_tbl[-(e)] typedef struct _bcm_macsec_cb_args_s { void *user_arg; bcm_macsec_port_traverse_cb user_cb_port; bcm_macsec_chan_traverse_cb user_cb_chan; bcm_macsec_secure_assoc_traverse_cb user_cb_assoc; bcm_macsec_flow_traverse_cb user_cb_flow; int unit; int port; } _bcm_macsec_cb_args_t; static int macsec_cb_registered = 0; /* * Function: * bcm_common_macsec_init * Purpose: * Intiialize MACSEC for the specified unit. */ int _bcm_common_macsec_init(int unit) { static int _bmacsec_init_done = 0; /* * Do MACSEC init and MDIO registration for the MACSEC module. */ if (!_bmacsec_init_done) { /* Initilaize the MACSEC module */ bmacsec_init(); /* register MDIO routines */ bmacsec_dev_mmi_mdio_register(soc_macsecphy_miim_read, soc_macsecphy_miim_write); /* Initialize the default print vectors. */ bmacsec_config_print_set(BMACSEC_PRINT_PRINTF, bsl_printf); _bmacsec_init_done = 1; } return BCM_E_NONE; } /* * Local port traverse handler to filter out ports belonging to specified * unit. */ STATIC int _bcm_macsec_port_traverse_cb(bmacsec_port_t p, bmacsec_core_t dev_core, bmacsec_dev_addr_t dev_addr, int dev_port, bmacsec_dev_io_f devio_f, void *user_data) { int rv = BMACSEC_E_NONE ; _bcm_macsec_cb_args_t *ua; bcm_macsec_port_traverse_cb callback; ua = (_bcm_macsec_cb_args_t*) user_data; if (SOC_MACSEC_PORTID2UNIT(p) == ua->unit) { callback = ua->user_cb_port; rv = callback(SOC_MACSEC_PORTID2UNIT(p), SOC_MACSEC_PORTID2PORT(p), dev_core, dev_addr, dev_port, devio_f, ua->user_arg); } return rv; } /* * Function: * bcm_macsec_port_traverse * Purpose: * Destroy a MACSEC Port */ int bcm_common_macsec_port_traverse(int unit, bcm_macsec_port_traverse_cb callback, void *user_data) { int rv = BCM_E_UNAVAIL; _bcm_macsec_cb_args_t ua; UNIT_VALID(unit); ua.user_arg = user_data; ua.user_cb_port = callback; ua.unit = unit; rv = bmacsec_port_traverse(_bcm_macsec_port_traverse_cb, (void*) &ua); return BCM_ERROR(rv); } /* * Function: * bcm_macsec_port_config_set * Purpose: * Set the MACSEC Port configuration. */ int bcm_common_macsec_port_config_set(int unit, bcm_port_t port, bcm_macsec_port_config_t *cfg) { int rv = BCM_E_UNAVAIL; bmacsec_port_t p; UNIT_VALID(unit); p = SOC_MACSEC_PORTID(unit, port); rv = bmacsec_port_config_set(p, cfg); return BCM_ERROR(rv); } /* * Function: * bcm_macsec_port_config_get * Purpose: * Get the current MACSEC Port configuration. */ int bcm_common_macsec_port_config_get(int unit, bcm_port_t port, bcm_macsec_port_config_t *cfg) { int rv = BCM_E_UNAVAIL; bmacsec_port_t p; UNIT_VALID(unit); p = SOC_MACSEC_PORTID(unit, port); rv = bmacsec_port_config_get(p, cfg); return BCM_ERROR(rv); } /* * Function: * bcm_macsec_port_capability_get * Purpose: * Get the MACSEC Port capability */ int bcm_common_macsec_port_capability_get(int unit, bcm_port_t port, bcm_macsec_port_capability_t *cap) { int rv = BCM_E_UNAVAIL; bmacsec_port_t p; UNIT_VALID(unit); p = SOC_MACSEC_PORTID(unit, port); rv = bmacsec_port_capability_get(p, cap); return BCM_ERROR(rv); } /* * Function: * macsec_secure_chan_create * Purpose: * Create MACSEC secure channel */ int bcm_common_macsec_secure_chan_create(int unit, bcm_port_t port, uint32 flags, bcm_macsec_secure_chan_t *chan, int *chanId) { int rv = BCM_E_UNAVAIL; bmacsec_port_t p; UNIT_VALID(unit); p = SOC_MACSEC_PORTID(unit, port); rv = bmacsec_secure_chan_create(p, flags, chan, chanId); return BCM_ERROR(rv); } /* * Function: * macsec_secure_chan_get * Purpose: * Return current MACSEC secure channel corresponding to channel-id */ int bcm_common_macsec_secure_chan_get(int unit, bcm_port_t port, int chanId, bcm_macsec_secure_chan_t *chan) { int rv = BCM_E_UNAVAIL; bmacsec_port_t p; UNIT_VALID(unit); p = SOC_MACSEC_PORTID(unit, port); rv = bmacsec_secure_chan_get(p, chanId, chan); return BCM_ERROR(rv); } /* * Function: * bcm_macsec_secure_chan_destroy * Purpose: * Destroy a secure channel. This function will free any resources * associated with the secure channel, including any secure assocs. */ int bcm_common_macsec_secure_chan_destroy(int unit, bcm_port_t port, int chanId) { int rv = BCM_E_UNAVAIL; bmacsec_port_t p; UNIT_VALID(unit); p = SOC_MACSEC_PORTID(unit, port); rv = bmacsec_secure_chan_destroy(p, chanId); return BCM_ERROR(rv); } /* * Local secure channel traver handler to call user provided callback * function for only the secure channels belonging to specified port. */ STATIC int _bcm_macsec_secure_chan_cb(bmacsec_port_t p, bmacsec_secure_chan_t *chan, int chanId, void *user_data) { int rv = BMACSEC_E_NONE ; _bcm_macsec_cb_args_t *ua; bcm_macsec_chan_traverse_cb callback; ua = (_bcm_macsec_cb_args_t*) user_data; if ((SOC_MACSEC_PORTID2UNIT(p) == ua->unit) && (SOC_MACSEC_PORTID2PORT(p) == ua->port)) { callback = ua->user_cb_chan; rv = callback(SOC_MACSEC_PORTID2UNIT(p), SOC_MACSEC_PORTID2PORT(p), chan, chanId, ua->user_arg); } return rv; } /* * Function: * macsec_secure_chan_traverse * Purpose: * This function will traverse over all the secure channels that * are associated with the specified macsec port and call the * user provided callback function for each of the secure channel. */ int bcm_common_macsec_secure_chan_traverse(int unit, bcm_port_t port, bcm_macsec_chan_traverse_cb callback, void *user_data) { int rv = BCM_E_UNAVAIL; bmacsec_port_t p; _bcm_macsec_cb_args_t ua; UNIT_VALID(unit); ua.user_arg = user_data; ua.user_cb_chan = callback; ua.unit = unit; ua.port = port; p = SOC_MACSEC_PORTID(unit, port); rv = bmacsec_secure_chan_traverse(p, _bcm_macsec_secure_chan_cb, (void*) &ua); return BCM_ERROR(rv); } /* * Function: * macsec_secure_assoc_create * Purpose: * This function will create an secure association bound to a * secure channel. */ int bcm_common_macsec_secure_assoc_create(int unit, bcm_port_t port, uint32 flags, int chanId, bcm_macsec_secure_assoc_t *assoc, int *assocId) { int rv = BCM_E_UNAVAIL; bmacsec_port_t p; UNIT_VALID(unit); p = SOC_MACSEC_PORTID(unit, port); rv = bmacsec_secure_assoc_create(p, flags, chanId, assoc, assocId); return BCM_ERROR(rv); } /* * Function: * macsec_secure_assoc_get * Purpose: * This function returns the secure assoc for the specified * assoc-id. */ int bcm_common_macsec_secure_assoc_get(int unit, bcm_port_t port, int assocId, bcm_macsec_secure_assoc_t *assoc, int *chanId) { int rv = BCM_E_UNAVAIL; bmacsec_port_t p; UNIT_VALID(unit); p = SOC_MACSEC_PORTID(unit, port); rv = bmacsec_secure_assoc_get(p, assocId, assoc, chanId); return BCM_ERROR(rv); } /* * Function: * macsec_secure_assoc_destroy * Purpose: * This function destroys the secure assoc correspondig to * assoc-id. */ int bcm_common_macsec_secure_assoc_destroy(int unit, bcm_port_t port, int assocId) { int rv = BCM_E_UNAVAIL; bmacsec_port_t p; UNIT_VALID(unit); p = SOC_MACSEC_PORTID(unit, port); rv = bmacsec_secure_assoc_destroy(p, assocId); return BCM_ERROR(rv); } /* * Local secure assoc traver handler to filter assocs and call the user provided * callback function for only the assocs belonging to spcified port. */ STATIC int _bcm_macsec_secure_assoc_cb(bmacsec_port_t p, bcm_macsec_secure_assoc_t *chan, int chanId, int assocId, void *user_data) { int rv = BMACSEC_E_NONE ; _bcm_macsec_cb_args_t *ua; bcm_macsec_secure_assoc_traverse_cb callback; ua = (_bcm_macsec_cb_args_t*) user_data; if ((SOC_MACSEC_PORTID2UNIT(p) == ua->unit) && (SOC_MACSEC_PORTID2PORT(p) == ua->port)) { callback = ua->user_cb_assoc; rv = callback(SOC_MACSEC_PORTID2UNIT(p), SOC_MACSEC_PORTID2PORT(p), chan, chanId, assocId, (void*) ua->user_arg); } return rv; } /* * Function: * macsec_secure_assoc_traverse * Purpose: * Traverse all the secure assoc for the specified secure channel * and calls user provided callabck function with information * about the assoc in macsec_secure_assoc_t structure and its * corresponding assoc-id. */ int bcm_common_macsec_secure_assoc_traverse(int unit, bcm_port_t port, int chanId, bcm_macsec_secure_assoc_traverse_cb callback, void *user_data) { int rv = BCM_E_UNAVAIL; bmacsec_port_t p; _bcm_macsec_cb_args_t ua; UNIT_VALID(unit); ua.user_arg = user_data; ua.user_cb_assoc = callback; ua.unit = unit; ua.port = port; p = SOC_MACSEC_PORTID(unit, port); rv = bmacsec_secure_assoc_traverse(p, chanId, _bcm_macsec_secure_assoc_cb, (void*) &ua); return BCM_ERROR(rv); } /* * Function: * macsec_flow_create * Purpose: * This fucntion creates/updates a flow and assigns the * actions for the flow. */ int bcm_common_macsec_flow_create(int unit, bcm_port_t port, uint32 flags, bcm_macsec_flow_match_t *flow, bcm_macsec_flow_action_t *action, int *flowId) { int rv = BCM_E_UNAVAIL; bmacsec_port_t p; UNIT_VALID(unit); p = SOC_MACSEC_PORTID(unit, port); rv = bmacsec_flow_create(p, flags, flow, action, flowId); return BCM_ERROR(rv); } /* * Function: * macsec_flow_get * Purpose: * Return flow and corresponding action for the specified flowId */ int bcm_common_macsec_flow_get(int unit, bcm_port_t port, int flowId, bcm_macsec_flow_match_t *flow, bcm_macsec_flow_action_t *action) { int rv = BCM_E_UNAVAIL; bmacsec_port_t p; UNIT_VALID(unit); p = SOC_MACSEC_PORTID(unit, port); rv = bmacsec_flow_get(p, flowId, flow, action); return BCM_ERROR(rv); } /* * Function: * macsec_flow_destroy * Purpose: * Destroy the flow corresponding to flowId. */ int bcm_common_macsec_flow_destroy(int unit, bcm_port_t port, int flowId) { int rv = BCM_E_UNAVAIL; bmacsec_port_t p; UNIT_VALID(unit); p = SOC_MACSEC_PORTID(unit, port); rv = bmacsec_flow_destroy(p, flowId); return BCM_ERROR(rv); } /* * Local flow traver handler to filter the flows belonging to specified port. */ STATIC int _bcm_macsec_flow_cb(bmacsec_port_t p, bcm_macsec_flow_match_t *flow, bcm_macsec_flow_action_t *action, int flowId, void *user_data) { int rv = BMACSEC_E_NONE ; _bcm_macsec_cb_args_t *ua; bcm_macsec_flow_traverse_cb callback; ua = (_bcm_macsec_cb_args_t*) user_data; if ((SOC_MACSEC_PORTID2UNIT(p) == ua->unit) && (SOC_MACSEC_PORTID2PORT(p) == ua->port)) { callback = ua->user_cb_flow; rv = callback(SOC_MACSEC_PORTID2UNIT(p), SOC_MACSEC_PORTID2PORT(p), flow, action, flowId, ua->user_arg); } return rv; } /* * Function: * macsec_flow_traverse * Purpose: * Traverse all the flows and call user provided callback * for each flow. */ int bcm_common_macsec_flow_traverse(int unit, bcm_port_t port, bcm_macsec_flow_traverse_cb callbk, void *user_data) { int rv = BCM_E_UNAVAIL; bmacsec_port_t p; _bcm_macsec_cb_args_t ua; UNIT_VALID(unit); ua.user_arg = user_data; ua.user_cb_flow = callbk; ua.unit = unit; ua.port = port; p = SOC_MACSEC_PORTID(unit, port); rv = bmacsec_flow_traverse(p, _bcm_macsec_flow_cb, (void*) &ua); return BCM_ERROR(rv); } /* * Function: * bcm_macsec_stat_clear * Purpose: * Clear stats for the specified port. */ int bcm_common_macsec_stat_clear(int unit, bcm_port_t port) { int rv = BCM_E_UNAVAIL; bmacsec_port_t p; UNIT_VALID(unit); p = SOC_MACSEC_PORTID(unit, port); rv = bmacsec_stat_clear(p); return BCM_ERROR(rv); } int bcm_common_macsec_stat_get(int unit, bcm_port_t port, bcm_macsec_stat_t stat, int chanId, int assocId, uint64 *val) { int rv = BCM_E_UNAVAIL; bmacsec_port_t p; UNIT_VALID(unit); p = SOC_MACSEC_PORTID(unit, port); rv = bmacsec_stat_get(p, stat, chanId, assocId, (buint64_t *)val); return BCM_ERROR(rv); } int bcm_common_macsec_stat_get32(int unit, bcm_port_t port, bcm_macsec_stat_t stat, int chanId, int assocId, uint32 *val) { int rv = BCM_E_UNAVAIL; bmacsec_port_t p; UNIT_VALID(unit); p = SOC_MACSEC_PORTID(unit, port); rv = bmacsec_stat_get32(p, stat, chanId, assocId, (buint32_t*)val); return BCM_ERROR(rv); } int bcm_common_macsec_stat_set(int unit, bcm_port_t port, bcm_macsec_stat_t stat, int chanId, int assocId, uint64 val) { int rv = BCM_E_UNAVAIL; bmacsec_port_t p; buint64_t bval; BMACSEC_COMPILER_64_SET(bval, COMPILER_64_HI(val), COMPILER_64_LO(val)); UNIT_VALID(unit); p = SOC_MACSEC_PORTID(unit, port); rv = bmacsec_stat_set(p, stat, chanId, assocId, bval); return BCM_ERROR(rv); } int bcm_common_macsec_stat_set32(int unit, bcm_port_t port, bcm_macsec_stat_t stat, int chanId, int assocId, uint32 val) { int rv = BCM_E_UNAVAIL; bmacsec_port_t p; UNIT_VALID(unit); p = SOC_MACSEC_PORTID(unit, port); rv = bmacsec_stat_set32(p, stat, chanId, assocId, val); return BCM_ERROR(rv); } typedef struct _bcm_macsec_event_data_s { bcm_macsec_event_cb callback; uint32 event_map; } _bcm_macsec_event_data_t; STATIC _bcm_macsec_event_data_t _macsec_event_data[BCM_UNITS_MAX]; STATIC int _bcm_macsec_event_cb(bmacsec_port_t p, /* Port ID */ bmacsec_event_t event, /* Event */ int chanId, /* secure channel ID*/ int assocId, void *user_data) { int unit; bcm_macsec_event_cb callback; _bcm_macsec_event_data_t *event_data; unit = SOC_MACSEC_PORTID2UNIT(p); event_data = &_macsec_event_data[unit]; callback = (bcm_macsec_event_cb) event_data->callback; if (callback && (event_data->event_map & (1 << (uint32) event))) { callback(SOC_MACSEC_PORTID2UNIT(p), SOC_MACSEC_PORTID2PORT(p), event, chanId, assocId, user_data); } return BMACSEC_E_NONE; } int bcm_common_macsec_event_register(int unit, bcm_macsec_event_cb cb, void *user_data) { int rv = BCM_E_NONE; _bcm_macsec_event_data_t *event_data; UNIT_VALID(unit); event_data = &_macsec_event_data[unit]; event_data->callback = cb; event_data->event_map = 0; if (macsec_cb_registered == 0) { rv = bmacsec_event_register(_bcm_macsec_event_cb, user_data); if (rv == BMACSEC_E_NONE) { macsec_cb_registered = 1; } } return BCM_ERROR(rv); } int bcm_common_macsec_event_unregister(int unit, bcm_macsec_event_cb cb) { int rv = BCM_E_NONE, unregister = 1, ii; _bcm_macsec_event_data_t *event_data; UNIT_VALID(unit); event_data = &_macsec_event_data[unit]; if (event_data->callback) { event_data->callback = NULL; } for (ii = 0; ii < BCM_UNITS_MAX; ii++) { event_data = &_macsec_event_data[ii]; if (event_data->callback) { unregister = 0; break; } } if (unregister) { macsec_cb_registered = 0; rv = bmacsec_event_unregister(_bcm_macsec_event_cb); } return BCM_ERROR(rv); } int bcm_common_macsec_event_enable_set(int unit, bcm_macsec_event_t event, int enable) { int rv = BCM_E_NONE, disable, ii; _bcm_macsec_event_data_t *event_data; UNIT_VALID(unit); event_data = &_macsec_event_data[unit]; if (enable) { event_data->event_map |= (1 << (uint32) event); rv = bmacsec_event_enable_set(event, enable); } else { event_data->event_map &= ~(1 << (uint32) event); disable = 1; for (ii = 0; ii < BCM_UNITS_MAX; ii++) { event_data = &_macsec_event_data[ii]; if (event_data->event_map & (1 << (uint32) event)) { disable = 0; break; } } if (disable) { rv = bmacsec_event_enable_set(event, enable); } } return BCM_ERROR(rv); } int bcm_common_macsec_event_enable_get(int unit, bcm_macsec_event_t event, int *enable) { int rv = BCM_E_NONE; _bcm_macsec_event_data_t *event_data; UNIT_VALID(unit); event_data = &_macsec_event_data[unit]; *enable = (event_data->event_map & (1 << (uint32) event)) ? 1 : 0; return BCM_ERROR(rv); } /* * Configure MACSEC print function for debug. */ int bcm_common_macsec_config_print(uint32 level) { int rv = BCM_E_NONE; uint32 flag = BMACSEC_PRINT_PRINTF; #if defined(BROADCOM_DEBUG) if (LOG_CHECK(BSL_LS_BCM_MACSEC | BSL_INFO)) { flag |= BMACSEC_PRINT_DEBUG; } #endif /* BROADCOM_DEBUG */ rv = bmacsec_config_print_set(flag, bsl_printf); return BCM_ERROR(rv); } #else typedef int _macsec_cmn_not_empty; /* Make ISO compilers happy. */ #endif /* INCLUDE_MACSEC */
the_stack_data/215768956.c
// RUN: %clang_cc1 -analyze -analyzer-store=region -analyzer-constraints=range -fblocks -analyzer-opt-analyze-nested-blocks -analyzer-checker=core,alpha.deadcode.IdempotentOperations -analyzer-max-loop 3 -verify %s // RUN: %clang_cc1 -analyze -analyzer-store=region -analyzer-constraints=range -fblocks -analyzer-opt-analyze-nested-blocks -analyzer-checker=core,alpha.deadcode.IdempotentOperations -analyzer-max-loop 4 -verify %s // RUN: %clang_cc1 -analyze -analyzer-store=region -analyzer-constraints=range -fblocks -analyzer-opt-analyze-nested-blocks -analyzer-checker=core,alpha.deadcode.IdempotentOperations %s -verify void always_warning() { int *p = 0; *p = 0xDEADBEEF; } // expected-warning{{Dereference of null pointer (loaded from variable 'p')}} // This test case previously caused a bogus idempotent operation warning // due to us not properly culling warnings due to incomplete analysis of loops. int pr8403() { int i; for(i=0; i<10; i++) { int j; for(j=0; j+1<i; j++) { } } return 0; }
the_stack_data/197810.c
// Exercise: L3_9 // Author: Kevin Carvalho de Jesus #include <stdio.h> #include <stdlib.h> #include <math.h> #define True 1 #define False 0 int verificapH(float pH); int verificaGotaChuvaAcida(float pH); float porcentagem(float total, float valor); void imprimeResultadosAnalise(float porcentagemGotasChuvaAcida, float porcentagemGotasChuvaNormal); int main(void) { int A, D, T; int qtdAdcido = 0, qtdBasico = 0, qtdNeutro = 0; float totalGotas, chuvaAcida = 0, chuvaNormal = 0; float pH, maisAcido = 7, maisBasico = 7, maisNeutro; scanf("%d %d %d", &A, &D, &T); int i, nGotas = (A * D * T); for (i = 0; i < nGotas; i++) { scanf("%f", &pH); if (i == 0) maisNeutro = pH; if (fabs(pH - 7) < fabs(maisNeutro - 7)) maisNeutro = pH; if (verificapH(pH) == 0) qtdNeutro++; if (verificapH(pH) == 1) qtdAdcido++; if (verificapH(pH) == 2) qtdBasico++; if (pH < maisAcido) maisAcido = pH; if (pH > maisBasico) maisBasico = pH; if (verificaGotaChuvaAcida(pH)) chuvaAcida++; else chuvaNormal++; } totalGotas = chuvaNormal + chuvaAcida; if (nGotas == 0) printf("Nenhuma gota foi avaliada"); else { printf("%d %d %d %.2f %.2f %.2f\n", qtdAdcido, qtdBasico, qtdNeutro, maisAcido, maisBasico, maisNeutro); imprimeResultadosAnalise(porcentagem(totalGotas, chuvaAcida), porcentagem(totalGotas, chuvaNormal)); } return 0; } int verificapH(float pH) { if (pH == 7) return 0; else if (pH < 7) return 1; else return 2; } int verificaGotaChuvaAcida(float pH) { return (pH < 5.7) ? True : False; } float porcentagem(float total, float valor) { return (valor * 100) / total; } void imprimeResultadosAnalise(float porcentagemGotasChuvaAcida, float porcentagemGotasChuvaNormal) { if (porcentagemGotasChuvaAcida >= 75.00) printf("Chuva Acida %.2f%% %.2f%%", porcentagemGotasChuvaAcida, porcentagemGotasChuvaNormal); else if (porcentagemGotasChuvaNormal >= 75.00) printf("Chuva Normal %.2f%% %.2f%%", porcentagemGotasChuvaAcida, porcentagemGotasChuvaNormal); else printf("Chuva com indicios de chuva acida %.2f%% %.2f%%", porcentagemGotasChuvaAcida, porcentagemGotasChuvaNormal); }
the_stack_data/138052.c
/***************************************************************************//** * @file * @brief Non-secure simple delay functions. ******************************************************************************* * # License * <b>Copyright 2022 Silicon Laboratories Inc. www.silabs.com</b> ******************************************************************************* * * The licensor of this software is Silicon Laboratories Inc. Your use of this * software is governed by the terms of Silicon Labs Master Software License * Agreement (MSLA) available at * www.silabs.com/about-us/legal/master-software-license-agreement. This * software is distributed to you in Source Code format and is governed by the * sections of the MSLA applicable to Source Code. * ******************************************************************************/ // ----------------------------------------------------------------------------- // Includes #include <inttypes.h> #include <stddef.h> #include <stdbool.h> // ----------------------------------------------------------------------------- // NSC functions extern void delay_nsc_init(void); extern void delay_nsc_microseconds(uint32_t usecs); extern void delay_nsc_milliseconds(uint32_t msecs, bool blocking); extern bool delay_nsc_expired(void); // ----------------------------------------------------------------------------- // NS functions void delay_init(void) { delay_nsc_init(); } void delay_microseconds(uint32_t usecs) { delay_nsc_microseconds(usecs); } void delay_milliseconds(uint32_t msecs, bool blocking) { delay_nsc_milliseconds(msecs, blocking); } bool delay_expired(void) { return delay_nsc_expired(); }
the_stack_data/57951019.c
/* Dizideki Elemanların Ortalaması */ #include <stdio.h> #include <locale.h> #define MAX_SIZE 100 int main() { setlocale(LC_ALL, "Turkish"); float dizi[MAX_SIZE]; int i, N; float toplam=0; printf("Dizinin Boyutunu Giriniz: "); scanf("%d", &N); for (i = 0; i < N; i++) { printf("%.2d. Elemanı Giriniz: ", i + 1); scanf("%f", &dizi[i]); toplam += dizi[i]; } printf("\nGirilen Elemanların Ortalaması= %f\n", toplam / N); return 0; }
the_stack_data/29824463.c
#include <stdio.h> int main(void) { float loan, rate, payment; int num_of_pay; printf("Enter amount of loan: "); scanf("%f", &loan); printf("Enter interest rate: "); scanf("%f", &rate); printf("Enter monthly payment: "); scanf("%f", &payment); printf("Enter number of payment: "); scanf("%d", &num_of_pay); for (int i = 1; i <= num_of_pay; i++) { printf("Balance remaining after %d(th) payment: $%.2f\n", i, loan = loan - payment + loan * rate / 100.0f / 12.0f); } return 0; } // Enter amount of loan: 20000.00 // Enter interest rate: 6.0 // Enter monthly payment: 1386.6 // Enter number of payment: 10
the_stack_data/3136.c
#include <stdlib.h> const int N = 100; int main() { int *buf = malloc(N * sizeof(*buf)); char *lb = (((char *)buf) - __CPROVER_POINTER_OFFSET(buf)); char *ub = (((char *)buf) - __CPROVER_POINTER_OFFSET(buf)) + __CPROVER_OBJECT_SIZE(buf) - 1; }
the_stack_data/334094.c
#include<stdio.h> #define MAX_PRODUCTION2_NUM 512 #define MAX_PRODUCTION1_NUM 128 #define MAX_VN_NUM 128 #define MAX_VT_NUM 128 #define MAX_STRING_LENGTH 1024 typedef struct SubTree { /* trees[vn] 代表可由 vn 推导而出的语法树数目 */ unsigned trees[MAX_VN_NUM]; } SubTree; /* <parent>::=<child1><child2> */ typedef struct VnProduction { int parent, child1, child2; // vn } VnProduction; /* <parent>::=<child> */ typedef struct VtProduction { int parent; // vn char child; // vt } VtProduction; /* dp数组 dp[i][j].trees[vn] 代表 solve(i,j) 可由 vn 推导而出的语法树数目 */ SubTree dp[MAX_STRING_LENGTH][MAX_STRING_LENGTH]; int vnProductions_cnt, vtProductions_cnt; VtProduction vtProductions[MAX_PRODUCTION1_NUM]; VnProduction vnProductions[MAX_PRODUCTION2_NUM]; int slen; char solve[MAX_STRING_LENGTH]; void input() { freopen("input.txt", "r", stdin); int vnNum; scanf("%d\n", &vnNum); scanf("%d\n", &vnProductions_cnt); for (int i = 0; i < vnProductions_cnt; i++) scanf("<%d>::=<%d><%d>\n", &vnProductions[i].parent, &vnProductions[i].child1, &vnProductions[i].child2); scanf("%d\n", &vtProductions_cnt); for (int i = 0; i < vtProductions_cnt; i++) scanf("<%d>::=%c\n", &vtProductions[i].parent, &vtProductions[i].child); scanf("%d\n", &slen); scanf("%s\n", solve); } int main() { input(); /* 初始化 对于 len = 1 的情况 */ for (int i = 0; i < slen; i++) { char c = solve[i]; for (int vt_index = 0; vt_index < vtProductions_cnt; vt_index++) { VtProduction tmp = vtProductions[vt_index]; if (c == tmp.child) dp[i][i].trees[tmp.parent]++; } } /* 三重 dp 转移方程: dp(i,j).trees[parent] = dp(i,k).trees[c1] * dp(k,j).trees[c2] */ /* 前提是 <parent>::=<c1><c2> */ for (int len = 2; len <= slen; len++) { for (int left = 0; left <= slen - len; left++) { for (int right = left + 1; right < left + len; right++) { unsigned *all = &(dp[left][left + len - 1].trees[0]); unsigned *leftPart = &(dp[left][right - 1].trees[0]); unsigned *rightPart = &(dp[right][left + len - 1].trees[0]); for (int vn_index = 0; vn_index < vnProductions_cnt; vn_index++) { VnProduction tmp = vnProductions[vn_index]; all[tmp.parent] += leftPart[tmp.child1] * rightPart[tmp.child2]; } } } } /* 输出以 0 开始的语法树数目 */ printf("%u\n", dp[0][slen - 1].trees[0]); return 0; }
the_stack_data/12638489.c
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <string.h> #define MAXOP 100 #define NUMBER '0' #define MATH_COMMAND '#' int getop(char []); void push(double); double pop(void); void clear(void); int main() { int type; double op1, op2; char s[MAXOP]; while ((type = getop(s)) != EOF) { switch(type) { case NUMBER: push(atof(s)); break; case MATH_COMMAND: if (strcmp(s, "msin") == 0) push(sin(pop())); else if (strcmp(s, "mpow") == 0) { op2 = pop(); push(pow(pop(), op2)); } else if (strcmp(s, "mexp") == 0) push(exp(pop())); else printf("error: unknown math command %s", s); break; case '+': push(pop() + pop()); break; case '*': push(pop() * pop()); break; case '%': op2 = pop(); push(fmod(pop(), op2)); 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 '\n': printf("\t%.8g\n", pop()); break; case 'd': op1 = pop(); push(op1); push(op1); break; case 's': op1 = pop(); op2 = pop(); push(op1); push(op2); break; case 'p': op1 = pop(); printf("\t%.8g\n", op1); push(op1); break; case 'c': clear(); break; default: printf("error: unknown command %s\n", s); break; } } return 0; } #define MAXVAL 100 int sp = 0; double val[MAXVAL]; void push(double f) { if (sp < MAXVAL) val[sp++] = f; else printf("error: stack full, can't push %g\n", f); } double pop(void) { if (sp > 0) return val[--sp]; else { printf("error: stack empty\n"); return 0.0; } } void clear(void) { sp = 0; } #include <ctype.h> int getch(void); void ungetch(int); int getop(char s[]) { int i, c; int math_command = 0; while ((s[0] = c = getch()) == ' ' || c == '\t') ; s[1] = '\0'; if (!isdigit(c) && c != '.' && c != '-' && c != 'm') return c; i = 0; if (c == '-') while (isdigit(s[++i] = c = getch())) ; if (isdigit(c)) while (isdigit(s[++i] = c = getch())) ; if (c == '.') while (isdigit(s[++i] = c = getch())) ; if (c == 'm') { math_command = 1; while (isalpha(s[++i] = c = getch())) ; } s[i] = '\0'; if (c != EOF) ungetch(c); if (strcmp(s, "-") == 0) return '-'; else if (strcmp(s, "m") == 0) { math_command = 0; return 'm'; } else if (math_command == 1) { return MATH_COMMAND; } return NUMBER; } #define BUFSIZE 100 char buf[BUFSIZE]; int bufp = 0; int getch(void) { return (bufp > 0) ? buf[--bufp] : getchar(); } void ungetch(int c) { if (bufp >= BUFSIZE) printf("ungetch: too many characters\n"); else buf[bufp++] = c; }
the_stack_data/153580.c
#include <stdio.h> int main() { printf("Hello World!\n"); }
the_stack_data/54824569.c
/* strcspn( const char *, const char * ) This file is part of the Public Domain C Library (PDCLib). Permission is granted to use, modify, and / or redistribute at will. */ #include <string.h> #ifndef REGTEST size_t strcspn( const char * s1, const char * s2 ) { size_t len = 0; const char * p; while ( s1[len] ) { p = s2; while ( *p ) { if ( s1[len] == *p++ ) { return len; } } ++len; } return len; } #endif #ifdef TEST #include "_PDCLIB_test.h" int main( void ) { TESTCASE( strcspn( abcde, "x" ) == 5 ); TESTCASE( strcspn( abcde, "xyz" ) == 5 ); TESTCASE( strcspn( abcde, "zyx" ) == 5 ); TESTCASE( strcspn( abcdx, "x" ) == 4 ); TESTCASE( strcspn( abcdx, "xyz" ) == 4 ); TESTCASE( strcspn( abcdx, "zyx" ) == 4 ); TESTCASE( strcspn( abcde, "a" ) == 0 ); TESTCASE( strcspn( abcde, "abc" ) == 0 ); TESTCASE( strcspn( abcde, "cba" ) == 0 ); return TEST_RESULTS; } #endif
the_stack_data/57950391.c
// SKIP PARAM: --set ana.activated[+] apron #include <assert.h> int f(int x) { return x + 1; } int main(void) { int y = 42; y = f(y); // combine should forget callee's y after substituting arg vars with args to avoid bottom in #ret substitute assert(y); return 0; }
the_stack_data/152608.c
#include <stdio.h> #include <stdlib.h> #include <time.h> #include <math.h> #include <stdint.h> #include <omp.h> int **vertices1; int **vertices2; int *adjDeg1; int *adjDeg2; int *visited1; int *visited2; int **shortestPath1; int **shortestPath2; int *saturation1; int *saturation2; int *color1; int *color2; int *vertexNumber1; int *vertexNumber2; int colorMax = 0; int generateRandomNumber() { int check = rand()%2; return check; } void printTime(clock_t start, clock_t end) { printf("Time taken: %lf seconds\n", ((double) (end - start)) / CLOCKS_PER_SEC); } void memoryAllocate(int number1, int number2) { int numberOfVertices1 = number1; int numberOfVertices2 = number2; adjDeg1 = (int *)malloc(numberOfVertices1 * sizeof(int)); adjDeg2 = (int *)malloc(numberOfVertices2 * sizeof(int)); vertices1 = (int **)malloc(numberOfVertices1*sizeof(int *)); vertices2 = (int **)malloc(numberOfVertices2*sizeof(int *)); shortestPath1 = (int **)malloc(numberOfVertices1*sizeof(int *)); shortestPath2 = (int **)malloc(numberOfVertices2*sizeof(int *)); visited1 = (int *)malloc(numberOfVertices1*sizeof(int)); visited2 = (int *)malloc(numberOfVertices2*sizeof(int)); saturation1 = (int *)malloc(numberOfVertices1*sizeof(int)); saturation2 = (int *)malloc(numberOfVertices2*sizeof(int)); color1 = (int *)malloc(numberOfVertices1*sizeof(int)); vertexNumber1 = (int *)malloc(numberOfVertices1*sizeof(int)); vertexNumber2 = (int *)malloc(numberOfVertices2*sizeof(int)); color2 = (int *)malloc(numberOfVertices2*sizeof(int)); for(int i=0; i<numberOfVertices1; i++) { vertices1[i] = (int *)malloc(numberOfVertices1 * sizeof(int)); shortestPath1[i] = (int *)malloc(numberOfVertices1 * sizeof(int)); } for(int i=0; i<numberOfVertices2; i++) { vertices2[i] = (int *)malloc(numberOfVertices2 * sizeof(int)); shortestPath2[i] = (int *)malloc(numberOfVertices2 * sizeof(int)); } } void addEdge1(int numberOfVertices1) { int check; for(int i=0; i<numberOfVertices1; i++) { for(int j=i+1; j<numberOfVertices1; j++) { if(i == j) { vertices1[i][j] = 0; } else { check = generateRandomNumber(); if(check == 1) { vertices1[i][j] = 1; vertices1[j][i] = 1; } else { vertices1[i][j] = 0; vertices1[j][i] = 0; } } } } } void addEdge2(int numberOfVertices2) { int check; for(int i=0; i<numberOfVertices2; i++) { for(int j=0; j<numberOfVertices2; j++) { if(i == j) { vertices2[i][j] = 0; } else { check = generateRandomNumber(); if(check == 1) { vertices2[i][j] = 1; vertices2[j][i] = 1; } else { vertices2[i][j] = 0; vertices2[j][i] = 0; } } } } } void adjacencyDegree1(int numberOfVertices1) { for(int i=0; i<numberOfVertices1; i++) { int count = 0; for(int j=0; j<numberOfVertices1; j++) { if(vertices1[i][j] == 1) { count++; } } adjDeg1[i] = count; } } void adjacencyDegree2(int numberOfVertices2) { for(int i=0; i<numberOfVertices2; i++) { int count = 0; for(int j=0; j<numberOfVertices2; j++) { if(vertices2[i][j] == 1) { count++; } } adjDeg2[i] = count; } } void initializeShortest1(int numberOfVertices1) { for(int i=0; i<numberOfVertices1; i++) { for(int j=0; j<numberOfVertices1; j++) { shortestPath1[i][j] = vertices1[i][j]; } } } void initializeShortest2(int numberOfVertices2) { for(int i=0; i<numberOfVertices2; i++) { for(int j=0; j<numberOfVertices2; j++) { shortestPath2[i][j] = vertices2[i][j]; } } } void markShortestPath1(int numberOfVertices1, int i, int j, int k) { for(i=0; i<numberOfVertices1; i++) { for(j=0; j<numberOfVertices1; j++) { if((i != j) && (shortestPath1[i][j] == 0)) { for(k=0; j<numberOfVertices1; k++) { if((shortestPath1[k][j] != 0) && (shortestPath1[i][k] != 0)) { shortestPath1[i][j] = shortestPath1[i][k] + 1; break; } } } } } } void markShortestPath2(int numberOfVertices2, int i, int j, int k) { for(i=0; i<numberOfVertices2; i++) { for(j=0; j<numberOfVertices2; j++) { if((i != j) && (shortestPath2[i][j] == 0)) { for(k=0; j<numberOfVertices2; k++) { if((shortestPath2[k][j] != 0) && (shortestPath2[i][k] != 0)) { shortestPath2[i][j] = shortestPath2[i][k] + 1; break; } } } } } } void updateShortestPath(int numberOfVertices1, int numberOfVertices2) { int i,j,k; initializeShortest1(numberOfVertices1); initializeShortest2(numberOfVertices2); /*for(i=0; i<numberOfVertices1; i++) { markShortestPath1(numberOfVertices1,i,j,k); } for(i=0; i<numberOfVertices2; i++) { markShortestPath2(numberOfVertices2,i,j,k); } */ } void initializeSaturation(int numberOfVertices1, int numberOfVertices2) { for(int i=0; i<numberOfVertices1; i++) { saturation1[i] = 1; color1[i] = 0; vertexNumber1[i] = i; } for(int i=0; i<numberOfVertices2; i++) { saturation2[i] = 1; color2[i] = 0; vertexNumber2[i] = i; } } int maxAdjDeg1(int numberOfVertices1) { int max = 0; int vertexIndex = 0; for(int i=0; i<numberOfVertices1; i++) { if(max < adjDeg1[i]) { max = adjDeg1[i]; vertexIndex = i; } } return vertexIndex; } int maxAdjDeg2(int numberOfVertices2) { int max = 0; int vertexIndex = 0; for(int i=0; i<numberOfVertices2; i++) { if(max < adjDeg2[i]) { max = adjDeg2[i]; vertexIndex = i; } } return vertexIndex; } int saturationDegree1(int numberOfVertices1) { int maxSatDeg = -1, vertexIndex = -1; int x; int size = -1; int adjDegMax = -1; int count =0; for(int i=0; i<numberOfVertices1; i++) { if(color1[i] == 0) { x = adjDeg1[i]; if(x == 0) { size = 0; } int colorCheck[numberOfVertices1]; for(int j=0; j<numberOfVertices1; j++) { if(vertices1[i][j] == 1) { colorCheck[j] = color1[j]; } } for(int j=0; j<numberOfVertices1; j++) { for(int k=0; k<numberOfVertices1; k++) { if(colorCheck[j] == k) { count++; break; } } } size = count; if(maxSatDeg < size) { maxSatDeg = size; vertexIndex = i; adjDegMax = x; } if((maxSatDeg == size) && (x > adjDegMax)) { adjDegMax = x; maxSatDeg = size; vertexIndex = i; } } } return vertexIndex; } int saturationDegree2(int numberOfVertices2) { int maxSatDeg = -1, vertexIndex = -1; int x; int size = -1; int adjDegMax = -1; int count =0; for(int i=0; i<numberOfVertices2; i++) { if(color2[i] == 0) { x = adjDeg2[i]; if(x == 0) { size = 0; } int colorCheck[numberOfVertices2]; for(int j=0; j<numberOfVertices2; j++) { if(vertices2[i][j] == 1) { colorCheck[j] = color2[j]; } } for(int j=0; j<numberOfVertices2; j++) { for(int k=0; k<numberOfVertices2; k++) { if(colorCheck[j] == k) { count++; break; } } } size = count; if(maxSatDeg < size) { maxSatDeg = size; vertexIndex = i; adjDegMax = x; } if((maxSatDeg == size) && (x > adjDegMax)) { adjDegMax = x; maxSatDeg = size; vertexIndex = i; } } } return vertexIndex; } void addColorToVertex1(int vertexToBeColored, int numberOfVertices1) { int flag = 0; int checkColor[numberOfVertices1]; for(int j=0; j<numberOfVertices1; j++) { if(vertices1[vertexToBeColored][j] == 1) { checkColor[j] = color1[j]; } } for(int j=0; j<=numberOfVertices1; j++) { for(int i=1; i<=numberOfVertices1; i++) { if(checkColor[j] == i) { continue; } else { color1[vertexToBeColored] = i; if (colorMax < i) { colorMax = i; flag = 1; break; } } } if(flag == 1) break; } } void addColorToVertex2(int vertexToBeColored, int numberOfVertices2) { int flag = 0; int checkColor[numberOfVertices2]; for(int j=0; j<numberOfVertices2; j++) { if(vertices2[vertexToBeColored][j] == 1) { checkColor[j] = color2[j]; } } for(int j=0; j<=numberOfVertices2; j++) { for(int i=1; i<=numberOfVertices2; i++) { if(checkColor[j] == i) { continue; } else { color2[vertexToBeColored] = i; if (colorMax < i) { colorMax = i; flag = 1; break; } } } if(flag == 1) break; } } void colorVertex1(int numberOfVertices1) { int first; first = maxAdjDeg1(numberOfVertices1); color1[first] =1; int vertexToBeColored; vertexToBeColored = saturationDegree1(numberOfVertices1); while(vertexToBeColored != -1) { addColorToVertex1(vertexToBeColored,numberOfVertices1); // calls a function to add color to the other vertices vertexToBeColored = saturationDegree1(numberOfVertices1); } } void colorVertex2(int numberOfVertices2) { int first; first = maxAdjDeg2(numberOfVertices2); color1[first] =1; int vertexToBeColored; vertexToBeColored = saturationDegree2(numberOfVertices2); while(vertexToBeColored != -1) { addColorToVertex2(vertexToBeColored,numberOfVertices2); // calls a function to add color to the other vertices vertexToBeColored = saturationDegree2(numberOfVertices2); } } void initializeVisited(int numberOfVertices1, int numberOfVertices2) { for(int i=0; i<numberOfVertices1; i++) { visited1[i] = 0; } for(int i=0; i<numberOfVertices2; i++) { visited2[i] = 0; } } void printGraph1(int numberOfVertices1) { printf("\n"); for(int i=0; i<numberOfVertices1; i++) { for(int j=0; j<numberOfVertices1; j++) { printf("%d\t",vertices1[i][j]); } printf("\n"); } } void printGraph2(int numberOfVertices2) { printf("\n"); for(int i=0; i<numberOfVertices2; i++) { for(int j=0; j<numberOfVertices2; j++) { printf("%d\t",vertices2[i][j]); } printf("\n"); } } void printColor(int numberOfVertices1, int numberOfVertices2) { printf("\n"); for(int i=0; i<numberOfVertices1; i++) { printf("%d\t",color1[i]); } printf("\n"); for(int i=0; i<numberOfVertices2; i++) { printf("%d\t",color2[i]); } } void generateGraph(int numberOfVertices1, int numberOfVertices2) { addEdge1(numberOfVertices1); addEdge2(numberOfVertices2); adjacencyDegree1(numberOfVertices1); adjacencyDegree2(numberOfVertices2); initializeVisited(numberOfVertices1,numberOfVertices2); updateShortestPath(numberOfVertices1,numberOfVertices2); initializeSaturation(numberOfVertices1,numberOfVertices2); colorVertex1(numberOfVertices1); colorVertex2(numberOfVertices2); //printColor(numberOfVertices1, numberOfVertices2); //printGraph1(numberOfVertices1); //printGraph2(numberOfVertices2); } // do permutation to check all combinations int checkIsomorphism(int numberOfVertices1, int numberOfVertices2, int numberThreads) { int numberOfThreads = numberThreads; //numberOfThreads = omp_get_num_threads(); //printf("\n number of Threads %d ", numberOfThreads); //scanf("%d",&numberOfThreads); omp_set_num_threads(numberOfThreads); #pragma omp parallel for(int i=0; i<numberOfVertices1; i++) { int checkDeg = adjDeg1[i]; int count = 0; for(int j=0; j<numberOfVertices2; j++) { if((adjDeg2[j] == checkDeg) && (visited2[j] == 0)) { for(int k=0; k<numberOfVertices2; k++) { if(vertices1[i][k] == vertices2[j][k]) { count++; } } } if(count == numberOfVertices2) { visited2[j] = 1; } } } for(int i=0; i<numberOfVertices2; i++) { if(visited2[i] == 0) { return 0; } } return 1; } int main(int argc, char *argv[]) { int numberThreads; if(argc != 2) { printf(" \n Enter number of threads to be used in command line argument "); exit(1); } numberThreads=atoi(argv[1]); if(numberThreads<1) { printf(" \n Number of threads specified should be more than 1 "); exit(1); } int number1 = 2000,number2 = 2000; int check; clock_t startTime,endTime; /*printf("\nEnter number of vertices for graph 1\n"); scanf("%d",&number1); printf("\nEnter number of vertices for graph 2\n"); scanf("%d",&number2); */ memoryAllocate(number1,number2); startTime = clock(); generateGraph(number1,number2); check = checkIsomorphism(number1,number2,numberThreads); if(check == 0) { printf("\n Not IsoMorphic \n "); } else printf("\n IsoMorphic \n"); endTime = clock(); printTime(startTime,endTime); return 0; }
the_stack_data/72014062.c
/* * Copyright © 2008 Red Hat, Inc. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Soft- * ware"), to deal in the Software without restriction, including without * limitation the rights to use, copy, modify, merge, publish, distribute, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, provided that the above copyright * notice(s) and this permission notice appear in all copies of the Soft- * ware and that both the above copyright notice(s) and this permission * notice appear in supporting documentation. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- * ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY * RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN * THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSE- * QUENTIAL 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 PERFOR- * MANCE OF THIS SOFTWARE. * * Except as contained in this notice, the name of a copyright holder shall * not be used in advertising or otherwise to promote the sale, use or * other dealings in this Software without prior written authorization of * the copyright holder. * * Authors: * Kristian Høgsberg ([email protected]) */ #ifdef GLX_DIRECT_RENDERING #include <stdio.h> #include <X11/Xlibint.h> #include <X11/extensions/Xext.h> #include <X11/extensions/extutil.h> #include <X11/extensions/dri2proto.h> #include "xf86drm.h" #include "dri2.h" #include "glxclient.h" #include "GL/glxext.h" /* Allow the build to work with an older versions of dri2proto.h and * dri2tokens.h. */ #if DRI2_MINOR < 1 #undef DRI2_MINOR #define DRI2_MINOR 1 #define X_DRI2GetBuffersWithFormat 7 #endif static char dri2ExtensionName[] = DRI2_NAME; static XExtensionInfo *dri2Info; static XEXT_GENERATE_CLOSE_DISPLAY (DRI2CloseDisplay, dri2Info) static Bool DRI2WireToEvent(Display *dpy, XEvent *event, xEvent *wire); static Status DRI2EventToWire(Display *dpy, XEvent *event, xEvent *wire); static int DRI2Error(Display *display, xError *err, XExtCodes *codes, int *ret_code); static /* const */ XExtensionHooks dri2ExtensionHooks = { NULL, /* create_gc */ NULL, /* copy_gc */ NULL, /* flush_gc */ NULL, /* free_gc */ NULL, /* create_font */ NULL, /* free_font */ DRI2CloseDisplay, /* close_display */ DRI2WireToEvent, /* wire_to_event */ DRI2EventToWire, /* event_to_wire */ DRI2Error, /* error */ NULL, /* error_string */ }; static XEXT_GENERATE_FIND_DISPLAY (DRI2FindDisplay, dri2Info, dri2ExtensionName, &dri2ExtensionHooks, 0, NULL) static Bool DRI2WireToEvent(Display *dpy, XEvent *event, xEvent *wire) { XExtDisplayInfo *info = DRI2FindDisplay(dpy); struct glx_drawable *glxDraw; XextCheckExtension(dpy, info, dri2ExtensionName, False); switch ((wire->u.u.type & 0x7f) - info->codes->first_event) { #ifdef X_DRI2SwapBuffers case DRI2_BufferSwapComplete: { GLXBufferSwapComplete *aevent = (GLXBufferSwapComplete *)event; xDRI2BufferSwapComplete2 *awire = (xDRI2BufferSwapComplete2 *)wire; __GLXDRIdrawable *pdraw; pdraw = dri2GetGlxDrawableFromXDrawableId(dpy, awire->drawable); /* Ignore swap events if we're not looking for them */ aevent->type = dri2GetSwapEventType(dpy, awire->drawable); if(!aevent->type) return False; aevent->serial = _XSetLastRequestRead(dpy, (xGenericReply *) wire); aevent->send_event = (awire->type & 0x80) != 0; aevent->display = dpy; aevent->drawable = awire->drawable; switch (awire->event_type) { case DRI2_EXCHANGE_COMPLETE: aevent->event_type = GLX_EXCHANGE_COMPLETE_INTEL; break; case DRI2_BLIT_COMPLETE: aevent->event_type = GLX_COPY_COMPLETE_INTEL; break; case DRI2_FLIP_COMPLETE: aevent->event_type = GLX_FLIP_COMPLETE_INTEL; break; default: /* unknown swap completion type */ return False; } aevent->ust = ((CARD64)awire->ust_hi << 32) | awire->ust_lo; aevent->msc = ((CARD64)awire->msc_hi << 32) | awire->msc_lo; glxDraw = GetGLXDrawable(dpy, pdraw->drawable); if (awire->sbc < glxDraw->lastEventSbc) glxDraw->eventSbcWrap += 0x100000000; glxDraw->lastEventSbc = awire->sbc; aevent->sbc = awire->sbc + glxDraw->eventSbcWrap; return True; } #endif #ifdef DRI2_InvalidateBuffers case DRI2_InvalidateBuffers: { xDRI2InvalidateBuffers *awire = (xDRI2InvalidateBuffers *)wire; dri2InvalidateBuffers(dpy, awire->drawable); return False; } #endif default: /* client doesn't support server event */ break; } return False; } /* We don't actually support this. It doesn't make sense for clients to * send each other DRI2 events. */ static Status DRI2EventToWire(Display *dpy, XEvent *event, xEvent *wire) { XExtDisplayInfo *info = DRI2FindDisplay(dpy); XextCheckExtension(dpy, info, dri2ExtensionName, False); switch (event->type) { default: /* client doesn't support server event */ break; } return Success; } static int DRI2Error(Display *display, xError *err, XExtCodes *codes, int *ret_code) { if (err->majorCode == codes->major_opcode && err->errorCode == BadDrawable && err->minorCode == X_DRI2CopyRegion) return True; /* If the X drawable was destroyed before the GLX drawable, the * DRI2 drawble will be gone by the time we call * DRI2DestroyDrawable. So just ignore BadDrawable here. */ if (err->majorCode == codes->major_opcode && err->errorCode == BadDrawable && err->minorCode == X_DRI2DestroyDrawable) return True; /* If the server is non-local DRI2Connect will raise BadRequest. * Swallow this so that DRI2Connect can signal this in its return code */ if (err->majorCode == codes->major_opcode && err->minorCode == X_DRI2Connect && err->errorCode == BadRequest) { *ret_code = False; return True; } return False; } Bool DRI2QueryExtension(Display * dpy, int *eventBase, int *errorBase) { XExtDisplayInfo *info = DRI2FindDisplay(dpy); if (XextHasExtension(info)) { *eventBase = info->codes->first_event; *errorBase = info->codes->first_error; return True; } return False; } Bool DRI2QueryVersion(Display * dpy, int *major, int *minor) { XExtDisplayInfo *info = DRI2FindDisplay(dpy); xDRI2QueryVersionReply rep; xDRI2QueryVersionReq *req; int i, nevents; XextCheckExtension(dpy, info, dri2ExtensionName, False); LockDisplay(dpy); GetReq(DRI2QueryVersion, req); req->reqType = info->codes->major_opcode; req->dri2ReqType = X_DRI2QueryVersion; req->majorVersion = DRI2_MAJOR; req->minorVersion = DRI2_MINOR; if (!_XReply(dpy, (xReply *) & rep, 0, xFalse)) { UnlockDisplay(dpy); SyncHandle(); return False; } *major = rep.majorVersion; *minor = rep.minorVersion; UnlockDisplay(dpy); SyncHandle(); switch (rep.minorVersion) { case 1: nevents = 0; break; case 2: nevents = 1; break; case 3: default: nevents = 2; break; } for (i = 0; i < nevents; i++) { XESetWireToEvent (dpy, info->codes->first_event + i, DRI2WireToEvent); XESetEventToWire (dpy, info->codes->first_event + i, DRI2EventToWire); } return True; } Bool DRI2Connect(Display * dpy, XID window, char **driverName, char **deviceName) { XExtDisplayInfo *info = DRI2FindDisplay(dpy); xDRI2ConnectReply rep; xDRI2ConnectReq *req; char *prime; XextCheckExtension(dpy, info, dri2ExtensionName, False); LockDisplay(dpy); GetReq(DRI2Connect, req); req->reqType = info->codes->major_opcode; req->dri2ReqType = X_DRI2Connect; req->window = window; req->driverType = DRI2DriverDRI; #ifdef DRI2DriverPrimeShift prime = getenv("DRI_PRIME"); if (prime) { uint32_t primeid; errno = 0; primeid = strtoul(prime, NULL, 0); if (errno == 0) req->driverType |= ((primeid & DRI2DriverPrimeMask) << DRI2DriverPrimeShift); } #endif if (!_XReply(dpy, (xReply *) & rep, 0, xFalse)) { UnlockDisplay(dpy); SyncHandle(); return False; } if (rep.driverNameLength == 0 && rep.deviceNameLength == 0) { UnlockDisplay(dpy); SyncHandle(); return False; } *driverName = Xmalloc(rep.driverNameLength + 1); if (*driverName == NULL) { _XEatData(dpy, ((rep.driverNameLength + 3) & ~3) + ((rep.deviceNameLength + 3) & ~3)); UnlockDisplay(dpy); SyncHandle(); return False; } _XReadPad(dpy, *driverName, rep.driverNameLength); (*driverName)[rep.driverNameLength] = '\0'; *deviceName = Xmalloc(rep.deviceNameLength + 1); if (*deviceName == NULL) { Xfree(*driverName); _XEatData(dpy, ((rep.deviceNameLength + 3) & ~3)); UnlockDisplay(dpy); SyncHandle(); return False; } _XReadPad(dpy, *deviceName, rep.deviceNameLength); (*deviceName)[rep.deviceNameLength] = '\0'; UnlockDisplay(dpy); SyncHandle(); return True; } Bool DRI2Authenticate(Display * dpy, XID window, drm_magic_t magic) { XExtDisplayInfo *info = DRI2FindDisplay(dpy); xDRI2AuthenticateReq *req; xDRI2AuthenticateReply rep; XextCheckExtension(dpy, info, dri2ExtensionName, False); LockDisplay(dpy); GetReq(DRI2Authenticate, req); req->reqType = info->codes->major_opcode; req->dri2ReqType = X_DRI2Authenticate; req->window = window; req->magic = magic; if (!_XReply(dpy, (xReply *) & rep, 0, xFalse)) { UnlockDisplay(dpy); SyncHandle(); return False; } UnlockDisplay(dpy); SyncHandle(); return rep.authenticated; } void DRI2CreateDrawable(Display * dpy, XID drawable) { XExtDisplayInfo *info = DRI2FindDisplay(dpy); xDRI2CreateDrawableReq *req; XextSimpleCheckExtension(dpy, info, dri2ExtensionName); LockDisplay(dpy); GetReq(DRI2CreateDrawable, req); req->reqType = info->codes->major_opcode; req->dri2ReqType = X_DRI2CreateDrawable; req->drawable = drawable; UnlockDisplay(dpy); SyncHandle(); } void DRI2DestroyDrawable(Display * dpy, XID drawable) { XExtDisplayInfo *info = DRI2FindDisplay(dpy); xDRI2DestroyDrawableReq *req; XextSimpleCheckExtension(dpy, info, dri2ExtensionName); XSync(dpy, False); LockDisplay(dpy); GetReq(DRI2DestroyDrawable, req); req->reqType = info->codes->major_opcode; req->dri2ReqType = X_DRI2DestroyDrawable; req->drawable = drawable; UnlockDisplay(dpy); SyncHandle(); } DRI2Buffer * DRI2GetBuffers(Display * dpy, XID drawable, int *width, int *height, unsigned int *attachments, int count, int *outCount) { XExtDisplayInfo *info = DRI2FindDisplay(dpy); xDRI2GetBuffersReply rep; xDRI2GetBuffersReq *req; DRI2Buffer *buffers; xDRI2Buffer repBuffer; CARD32 *p; int i; XextCheckExtension(dpy, info, dri2ExtensionName, False); LockDisplay(dpy); GetReqExtra(DRI2GetBuffers, count * 4, req); req->reqType = info->codes->major_opcode; req->dri2ReqType = X_DRI2GetBuffers; req->drawable = drawable; req->count = count; p = (CARD32 *) & req[1]; for (i = 0; i < count; i++) p[i] = attachments[i]; if (!_XReply(dpy, (xReply *) & rep, 0, xFalse)) { UnlockDisplay(dpy); SyncHandle(); return NULL; } *width = rep.width; *height = rep.height; *outCount = rep.count; buffers = Xmalloc(rep.count * sizeof buffers[0]); if (buffers == NULL) { _XEatData(dpy, rep.count * sizeof repBuffer); UnlockDisplay(dpy); SyncHandle(); return NULL; } for (i = 0; i < rep.count; i++) { _XReadPad(dpy, (char *) &repBuffer, sizeof repBuffer); buffers[i].attachment = repBuffer.attachment; buffers[i].name = repBuffer.name; buffers[i].pitch = repBuffer.pitch; buffers[i].cpp = repBuffer.cpp; buffers[i].flags = repBuffer.flags; } UnlockDisplay(dpy); SyncHandle(); return buffers; } DRI2Buffer * DRI2GetBuffersWithFormat(Display * dpy, XID drawable, int *width, int *height, unsigned int *attachments, int count, int *outCount) { XExtDisplayInfo *info = DRI2FindDisplay(dpy); xDRI2GetBuffersReply rep; xDRI2GetBuffersReq *req; DRI2Buffer *buffers; xDRI2Buffer repBuffer; CARD32 *p; int i; XextCheckExtension(dpy, info, dri2ExtensionName, False); LockDisplay(dpy); GetReqExtra(DRI2GetBuffers, count * (4 * 2), req); req->reqType = info->codes->major_opcode; req->dri2ReqType = X_DRI2GetBuffersWithFormat; req->drawable = drawable; req->count = count; p = (CARD32 *) & req[1]; for (i = 0; i < (count * 2); i++) p[i] = attachments[i]; if (!_XReply(dpy, (xReply *) & rep, 0, xFalse)) { UnlockDisplay(dpy); SyncHandle(); return NULL; } *width = rep.width; *height = rep.height; *outCount = rep.count; buffers = Xmalloc(rep.count * sizeof buffers[0]); if (buffers == NULL) { _XEatData(dpy, rep.count * sizeof repBuffer); UnlockDisplay(dpy); SyncHandle(); return NULL; } for (i = 0; i < rep.count; i++) { _XReadPad(dpy, (char *) &repBuffer, sizeof repBuffer); buffers[i].attachment = repBuffer.attachment; buffers[i].name = repBuffer.name; buffers[i].pitch = repBuffer.pitch; buffers[i].cpp = repBuffer.cpp; buffers[i].flags = repBuffer.flags; } UnlockDisplay(dpy); SyncHandle(); return buffers; } void DRI2CopyRegion(Display * dpy, XID drawable, XserverRegion region, CARD32 dest, CARD32 src) { XExtDisplayInfo *info = DRI2FindDisplay(dpy); xDRI2CopyRegionReq *req; xDRI2CopyRegionReply rep; XextSimpleCheckExtension(dpy, info, dri2ExtensionName); LockDisplay(dpy); GetReq(DRI2CopyRegion, req); req->reqType = info->codes->major_opcode; req->dri2ReqType = X_DRI2CopyRegion; req->drawable = drawable; req->region = region; req->dest = dest; req->src = src; _XReply(dpy, (xReply *) & rep, 0, xFalse); UnlockDisplay(dpy); SyncHandle(); } #ifdef X_DRI2SwapBuffers static void load_swap_req(xDRI2SwapBuffersReq *req, CARD64 target, CARD64 divisor, CARD64 remainder) { req->target_msc_hi = target >> 32; req->target_msc_lo = target & 0xffffffff; req->divisor_hi = divisor >> 32; req->divisor_lo = divisor & 0xffffffff; req->remainder_hi = remainder >> 32; req->remainder_lo = remainder & 0xffffffff; } static CARD64 vals_to_card64(CARD32 lo, CARD32 hi) { return (CARD64)hi << 32 | lo; } void DRI2SwapBuffers(Display *dpy, XID drawable, CARD64 target_msc, CARD64 divisor, CARD64 remainder, CARD64 *count) { XExtDisplayInfo *info = DRI2FindDisplay(dpy); xDRI2SwapBuffersReq *req; xDRI2SwapBuffersReply rep; XextSimpleCheckExtension (dpy, info, dri2ExtensionName); LockDisplay(dpy); GetReq(DRI2SwapBuffers, req); req->reqType = info->codes->major_opcode; req->dri2ReqType = X_DRI2SwapBuffers; req->drawable = drawable; load_swap_req(req, target_msc, divisor, remainder); _XReply(dpy, (xReply *)&rep, 0, xFalse); *count = vals_to_card64(rep.swap_lo, rep.swap_hi); UnlockDisplay(dpy); SyncHandle(); } #endif #ifdef X_DRI2GetMSC Bool DRI2GetMSC(Display *dpy, XID drawable, CARD64 *ust, CARD64 *msc, CARD64 *sbc) { XExtDisplayInfo *info = DRI2FindDisplay(dpy); xDRI2GetMSCReq *req; xDRI2MSCReply rep; XextCheckExtension (dpy, info, dri2ExtensionName, False); LockDisplay(dpy); GetReq(DRI2GetMSC, req); req->reqType = info->codes->major_opcode; req->dri2ReqType = X_DRI2GetMSC; req->drawable = drawable; if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) { UnlockDisplay(dpy); SyncHandle(); return False; } *ust = vals_to_card64(rep.ust_lo, rep.ust_hi); *msc = vals_to_card64(rep.msc_lo, rep.msc_hi); *sbc = vals_to_card64(rep.sbc_lo, rep.sbc_hi); UnlockDisplay(dpy); SyncHandle(); return True; } #endif #ifdef X_DRI2WaitMSC static void load_msc_req(xDRI2WaitMSCReq *req, CARD64 target, CARD64 divisor, CARD64 remainder) { req->target_msc_hi = target >> 32; req->target_msc_lo = target & 0xffffffff; req->divisor_hi = divisor >> 32; req->divisor_lo = divisor & 0xffffffff; req->remainder_hi = remainder >> 32; req->remainder_lo = remainder & 0xffffffff; } Bool DRI2WaitMSC(Display *dpy, XID drawable, CARD64 target_msc, CARD64 divisor, CARD64 remainder, CARD64 *ust, CARD64 *msc, CARD64 *sbc) { XExtDisplayInfo *info = DRI2FindDisplay(dpy); xDRI2WaitMSCReq *req; xDRI2MSCReply rep; XextCheckExtension (dpy, info, dri2ExtensionName, False); LockDisplay(dpy); GetReq(DRI2WaitMSC, req); req->reqType = info->codes->major_opcode; req->dri2ReqType = X_DRI2WaitMSC; req->drawable = drawable; load_msc_req(req, target_msc, divisor, remainder); if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) { UnlockDisplay(dpy); SyncHandle(); return False; } *ust = ((CARD64)rep.ust_hi << 32) | (CARD64)rep.ust_lo; *msc = ((CARD64)rep.msc_hi << 32) | (CARD64)rep.msc_lo; *sbc = ((CARD64)rep.sbc_hi << 32) | (CARD64)rep.sbc_lo; UnlockDisplay(dpy); SyncHandle(); return True; } #endif #ifdef X_DRI2WaitSBC static void load_sbc_req(xDRI2WaitSBCReq *req, CARD64 target) { req->target_sbc_hi = target >> 32; req->target_sbc_lo = target & 0xffffffff; } Bool DRI2WaitSBC(Display *dpy, XID drawable, CARD64 target_sbc, CARD64 *ust, CARD64 *msc, CARD64 *sbc) { XExtDisplayInfo *info = DRI2FindDisplay(dpy); xDRI2WaitSBCReq *req; xDRI2MSCReply rep; XextCheckExtension (dpy, info, dri2ExtensionName, False); LockDisplay(dpy); GetReq(DRI2WaitSBC, req); req->reqType = info->codes->major_opcode; req->dri2ReqType = X_DRI2WaitSBC; req->drawable = drawable; load_sbc_req(req, target_sbc); if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) { UnlockDisplay(dpy); SyncHandle(); return False; } *ust = ((CARD64)rep.ust_hi << 32) | rep.ust_lo; *msc = ((CARD64)rep.msc_hi << 32) | rep.msc_lo; *sbc = ((CARD64)rep.sbc_hi << 32) | rep.sbc_lo; UnlockDisplay(dpy); SyncHandle(); return True; } #endif #ifdef X_DRI2SwapInterval void DRI2SwapInterval(Display *dpy, XID drawable, int interval) { XExtDisplayInfo *info = DRI2FindDisplay(dpy); xDRI2SwapIntervalReq *req; XextSimpleCheckExtension (dpy, info, dri2ExtensionName); LockDisplay(dpy); GetReq(DRI2SwapInterval, req); req->reqType = info->codes->major_opcode; req->dri2ReqType = X_DRI2SwapInterval; req->drawable = drawable; req->interval = interval; UnlockDisplay(dpy); SyncHandle(); } #endif #endif /* GLX_DIRECT_RENDERING */
the_stack_data/70450696.c
#include <stdio.h> #include <stdlib.h> void diaSemana(int n); void diaSemana(int n){ switch(n){ case 1: printf("Domingo"); break; case 2: printf("Segunda-feira"); break; case 3: printf("Terça-feira"); break; case 4: printf("Quarta-feira"); break; case 5: printf("Quinta-feira"); break; case 6: printf("Sexta-feira"); break; case 7: printf("Sabado"); break; } } int main(int argc, char *argv[]){ int n; scanf("%d", &n); while(n < 1 || n > 7){ printf("O numero deve ser >=1 e <=7!\n"); scanf("%d", &n); } diaSemana(n); return 0; }
the_stack_data/50137515.c
//===--- Jacobi.c --------- Jacobi Iterative Method ---------------*- C -*-===// // // This file implements Jacobi iterative method which is an iterative method // used to solve partial differential equations. // //===----------------------------------------------------------------------===// #include <math.h> #include <stdio.h> #include <stdlib.h> #define Max(A, B) ((A) > (B) ? (A) : (B)) #define MAXEPS 0.5 void init(int L, double (* restrict A)[L], double (* restrict B)[L]) { for (int I = 0; I < L; ++I) for (int J = 0; J < L; ++J) { A[I][J] = 0; if (I == 0 || J == 0 || I == L - 1 || J == L - 1) B[I][J] = 0; else B[I][J] = 3 + I + J; } } double iter(int L, double (* restrict A)[L], double (* restrict B)[L]) { double Eps = 0; for (int I = 1; I < L - 1; ++I) for (int J = 1; J < L - 1; ++J) { double Tmp = fabs(B[I][J] - A[I][J]); Eps = Max(Tmp, Eps); A[I][J] = B[I][J]; } for (int I = 1; I < L - 1; ++I) for (int J = 1; J < L - 1; ++J) B[I][J] = (A[I - 1][J] + A[I][J - 1] + A[I][J + 1] + A[I + 1][J]) / 4.0; return Eps; } int main(int Argc, char **Argv) { int L = atoi(Argv[1]); int ITMAX = atoi(Argv[2]); double (*A)[L] = malloc(L * L * sizeof(double)); double (*B)[L] = malloc(L * L * sizeof(double)); init(L, A, B); for (int It = 1; It <= ITMAX; ++It) { double Eps = iter(L, A, B); printf("It=%4i Eps=%e\n", It, Eps); if (Eps < MAXEPS) break; } free(A); free(B); return 0; } //CHECK: Jacobi.func.c:35:3: remark: parallel execution of loop is possible //CHECK: for (int I = 1; I < L - 1; ++I) //CHECK: ^ //CHECK: Jacobi.func.c:35:3: warning: unable to create parallel directive //CHECK: Jacobi.func.c:27:65: note: unable to localize inout variable //CHECK: double iter(int L, double (* restrict A)[L], double (* restrict B)[L]) { //CHECK: ^ //CHECK: Jacobi.func.c:29:3: remark: parallel execution of loop is possible //CHECK: for (int I = 1; I < L - 1; ++I) //CHECK: ^ //CHECK: Jacobi.func.c:29:3: warning: unable to create parallel directive //CHECK: Jacobi.func.c:27:65: note: unable to localize inout variable //CHECK: double iter(int L, double (* restrict A)[L], double (* restrict B)[L]) { //CHECK: ^ //CHECK: Jacobi.func.c:17:3: remark: parallel execution of loop is possible //CHECK: for (int I = 0; I < L; ++I) //CHECK: ^ //CHECK: Jacobi.func.c:17:3: warning: unable to create parallel directive //CHECK: Jacobi.func.c:16:63: note: unable to localize inout variable //CHECK: void init(int L, double (* restrict A)[L], double (* restrict B)[L]) { //CHECK: ^ //CHECK: 3 warnings generated.
the_stack_data/90762818.c
/* Generated by CIL v. 1.7.0 */ /* print_CIL_Input is false */ struct _IO_FILE; struct timeval; extern void signal(int sig , void *func ) ; extern float strtof(char const *str , char const *endptr ) ; typedef struct _IO_FILE FILE; extern int atoi(char const *s ) ; extern double strtod(char const *str , char const *endptr ) ; extern int fclose(void *stream ) ; extern void *fopen(char const *filename , char const *mode ) ; extern void abort() ; extern void exit(int status ) ; extern int raise(int sig ) ; extern int fprintf(struct _IO_FILE *stream , char const *format , ...) ; extern int strcmp(char const *a , char const *b ) ; extern int rand() ; extern unsigned long strtoul(char const *str , char const *endptr , int base ) ; void RandomFunc(unsigned int input[1] , unsigned int output[1] ) ; extern int strncmp(char const *s1 , char const *s2 , unsigned long maxlen ) ; extern int gettimeofday(struct timeval *tv , void *tz , ...) ; extern int printf(char const *format , ...) ; int main(int argc , char *argv[] ) ; void megaInit(void) ; extern unsigned long strlen(char const *s ) ; extern long strtol(char const *str , char const *endptr , int base ) ; extern unsigned long strnlen(char const *s , unsigned long maxlen ) ; extern void *memcpy(void *s1 , void const *s2 , unsigned long size ) ; struct timeval { long tv_sec ; long tv_usec ; }; extern void *malloc(unsigned long size ) ; extern int scanf(char const *format , ...) ; void megaInit(void) { { } } void RandomFunc(unsigned int input[1] , unsigned int output[1] ) { unsigned int state[1] ; unsigned int local2 ; unsigned int local1 ; char copy11 ; char copy12 ; { state[0UL] = (input[0UL] - 51238316UL) - 339126204U; local1 = 0UL; while (local1 < 1UL) { local2 = 0UL; while (local2 < 1UL) { if (state[0UL] == local2 * local1) { copy11 = *((char *)(& state[0UL]) + 1); *((char *)(& state[0UL]) + 1) = *((char *)(& state[0UL]) + 0); *((char *)(& state[0UL]) + 0) = copy11; state[0UL] += state[0UL]; } else { state[local2] |= ((state[local1] + state[local2]) & 31U) << 3UL; copy12 = *((char *)(& state[0UL]) + 2); *((char *)(& state[0UL]) + 2) = *((char *)(& state[0UL]) + 1); *((char *)(& state[0UL]) + 1) = copy12; copy12 = *((char *)(& state[0UL]) + 1); *((char *)(& state[0UL]) + 1) = *((char *)(& state[0UL]) + 0); *((char *)(& state[0UL]) + 0) = copy12; } local2 += 2UL; } local1 ++; } output[0UL] = state[0UL] - 2721922656U; } } int main(int argc , char *argv[] ) { unsigned int input[1] ; unsigned int output[1] ; int randomFuns_i5 ; unsigned int randomFuns_value6 ; int randomFuns_main_i7 ; { megaInit(); if (argc != 2) { printf("Call this program with %i arguments\n", 1); exit(-1); } else { } randomFuns_i5 = 0; while (randomFuns_i5 < 1) { randomFuns_value6 = (unsigned int )strtoul(argv[randomFuns_i5 + 1], 0, 10); input[randomFuns_i5] = randomFuns_value6; randomFuns_i5 ++; } RandomFunc(input, output); if (output[0] == 1182110555U) { printf("You win!\n"); } else { } randomFuns_main_i7 = 0; while (randomFuns_main_i7 < 1) { printf("%u\n", output[randomFuns_main_i7]); randomFuns_main_i7 ++; } } }
the_stack_data/107952304.c
/* This file is written by Lepidum Co., Ltd. Copyright (c) 2005-2006 by Lepidum Co., Ltd. */ typedef int t; int f(int (t)); int f(int (*)(t)); int main(void) { int (t) = 10; return 0; }
the_stack_data/37638866.c
#include <errno.h> #include <fcntl.h> #include <stdio.h> #include <string.h> #include <unistd.h> int copy2files(int fromfd1, int tofd1, int fromfd2, int tofd2); int main(int argc, char *argv[]) { int bytescopied; int fd1, fd2; if (argc != 3) { fprintf(stderr, "Usage: %s file1 file2\n", argv[0]); return 1; } if ((fd1 = open(argv[1], O_RDONLY)) == -1) { fprintf(stderr, "Failed to open file %s:%s\n", argv[1], strerror(errno)); return 1; } if ((fd2 = open(argv[2], O_RDONLY)) == -1) { fprintf(stderr, "Failed to open file %s:%s\n", argv[2], strerror(errno)); return 1; } bytescopied = copy2files(fd1, STDOUT_FILENO, fd2, STDOUT_FILENO); fprintf(stderr, "Bytes copied: %d\n", bytescopied); return 0; }
the_stack_data/664481.c
#include<stdio.h> #include<stdlib.h> #include<X11/X.h> #include<X11/Xlib.h> #include<GL/gl.h> #include<GL/glx.h> #include<GL/glu.h> #include<math.h> #include<limits.h> #include<string.h> #define PLOT_COLOR 0.0, 0.7, 0.9 #define AXIS_COLOR 0.25, 0.25, 0.25 #define SAMPLE_TYPE float Display *dpy; Window root; GLint att[] = {GLX_RGBA, GLX_DEPTH_SIZE, 24, GLX_DOUBLEBUFFER, None}; XVisualInfo *vi; Colormap cmap; XSetWindowAttributes swa; Window win; GLXContext glc; XWindowAttributes gwa; XEvent xev; int channels; int buffer_size; float colors[4][3] = {{1.0, 0.5, 0.5}, {0.0, 0.9, 0.5}, {1.0, 0.9, 0.5}, {0.0, 0.7, 0.9}}; /* Reads samples from the standard input and deinterlaces them into a buffer for each channel. Rewrites each sample to the standard output */ void read_to_buffers(SAMPLE_TYPE ** buffers, int buffer_size, int channels) { int samples_read, i, j; for (samples_read = 0; samples_read < buffer_size; samples_read++) { for(i = 0; i < channels; i++) { /* Read a sample into channel i */ char sample[sizeof(SAMPLE_TYPE)]; for(j = 0; j < sizeof(SAMPLE_TYPE); j++) { /* Read each byte of the sample and store it */ int n = read(0, &sample[j], 1); if ( n < 0 ) { perror("Could not read"); exit(1); } else if ( n == 0) { fprintf(stderr, "Standard input closed\n"); exit(0); } if (write(1, &sample[j], 1) < 0) { perror("Could not write"); exit(1); } } /* Copy sample into channel buffer */ memcpy(&buffers[i][samples_read], sample, sizeof(SAMPLE_TYPE)); } } } /* Draws each buffer channel */ void drawBuffer(SAMPLE_TYPE ** buffers) { glClearColor(0.0, 0.0, 0.0, 0.0); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glMatrixMode(GL_PROJECTION); glLoadIdentity(); glOrtho(-1., 1., -1., 1., 1., 20.); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); gluLookAt(0., 0., 5., 0., 0., 0., 0., 1., 0.); int i, j; double deltaX = 2.0 / buffer_size; for(i = 0; i < channels; i++) { double y0 = (channels - 1 - 2.0 * i)/channels; /* Draw axis */ glBegin(GL_LINES); glColor3f(AXIS_COLOR); glVertex2f(-1, y0); glVertex2f(1, y0); glEnd(); /* Draw points */ glBegin(GL_LINE_STRIP); glColor3f(colors[i%4][0], colors[i%4][1], colors[i%4][2]); for(j = 0; j < buffer_size; j++) { double value, x, y; value = buffers[i][j]; value = value / SHRT_MAX * 64; // Normalize (value in [-1, 1]) value = value / (channels + 0.1); // Fit in window sub-division y = y0 + value; x = -1 + j*deltaX; //glVertex2f(x, y0); glVertex2f(x, y); } glEnd(); } } int main(int argc, char *argv[]) { /* Process input arguments */ if(argc != 3) { fprintf(stderr, "(%s) Usage: plot BUFFER_SIZE CHANNELS\n", argv[0]); fprintf(stderr, "(%s) Usage: plots interlaced data into CHANNELS channels\n", argv[0]); exit(1); } char * endptr; buffer_size = strtol(argv[1], &endptr, 10); if(*endptr != '\0' || buffer_size < 1) { fprintf(stderr, "(%s) ERROR: first argument must be a positive integer\n", argv[0]); exit(1); } fprintf(stderr, "(%s) Buffer size: %d\n", argv[0], buffer_size); channels = strtol(argv[2], &endptr, 10); if(*endptr != '\0' || channels < 1) { fprintf(stderr, "(%s) ERROR: first argument must be a positive integer\n", argv[0]); exit(1); } fprintf(stderr, "(%s) Number of channels: %d\n", argv[0], channels); /* Set up buffers */ SAMPLE_TYPE * buffers[channels]; int i; for (i = 0; i < channels; i++) { buffers[i] = (SAMPLE_TYPE *) malloc(sizeof(SAMPLE_TYPE) * buffer_size); } /* Set up display */ dpy = XOpenDisplay(NULL); if(dpy == NULL) { fprintf(stderr, "Cannot connect to X server\n"); exit(0); } root = DefaultRootWindow(dpy); vi = glXChooseVisual(dpy, 0, att); if(vi == NULL) { fprintf(stderr, "No appropriate visual found\n"); exit(0); } else { fprintf(stderr, "visual %p selected\n", (void *)vi->visualid); } cmap = XCreateColormap(dpy, root, vi->visual, AllocNone); swa.colormap = cmap; swa.event_mask = ExposureMask | KeyPressMask; win = XCreateWindow(dpy, root, 0, 0, 1024, 600, 0, vi->depth, InputOutput, vi->visual, CWColormap | CWEventMask, &swa); XMapWindow(dpy, win); XStoreName(dpy, win, "Plot"); glc = glXCreateContext(dpy, vi, NULL, GL_TRUE); glXMakeCurrent(dpy, win, glc); glEnable(GL_DEPTH_TEST); /* Main loop */ while(1) { read_to_buffers(buffers, buffer_size, channels); XGetWindowAttributes(dpy, win, &gwa); glViewport(0, 0, gwa.width, gwa.height); drawBuffer(buffers); glXSwapBuffers(dpy, win); } }
the_stack_data/104827674.c
#include <stdio.h> #define SIZE 10000000 #define MOD 524287 int n, a[SIZE], t[SIZE / 2], i, ti, f; long long c; void count(int *l, int *r) { if (r - l <= 1) return; int *m = l + (r - l) / 2; count(l, m); count(m, r); int i, j = 0, ls = m - l, rs = r - m; for (i = 0; i != ls; ++i) *(t + i) = *(l + i); for (i = 0; i != ls && j != rs; l++) { if (*(t + i) <= *(m + j)) { *l = *(t + i); i++; c += j; } else { *l = *(m + j); j++; } } for (; i != ls; i++, l++) { *l = *(t + i); c += j; } } int main() { scanf("%d", &n); for (i = 0; i != n; ++i) scanf("%d", a + i); count(a, a + n); printf("%lld", c % MOD); return 0; }
the_stack_data/997665.c
int romanToInt(char* s) { const char* str = s; int i = 0; char oldChar = '\0'; int retVal = 0; for (; str[i] != '\0'; i++) { switch (str[i]) { case 'M': retVal += 1000; if (oldChar == 'C') { retVal -= 2 * 100; } break; case 'D': retVal += 500; if (oldChar == 'C') { retVal -= 2 * 100; } break; case 'C': retVal += 100; if (oldChar == 'X') { retVal -= 2 * 10; } break; case 'L': retVal += 50; if (oldChar == 'X') { retVal -= 2 * 10; } break; case 'X': retVal += 10; if (oldChar == 'I') { retVal -= 2 * 1; } break; case 'V': retVal += 5; if (oldChar == 'I') { retVal -= 2 * 1; } break; case 'I': retVal += 1; break; default: break; } oldChar = str[i]; } return retVal; }
the_stack_data/232954960.c
int main(int argc, char **argv) { int a[4] = {1,2,3,4}; int b[4] = {1,1,1,1}; for (int i = 0; i < 1; ++i) { if (i < 2) { return -1; } } #pragma omp parallel for for (int i = 0; i < 4; ++i) { a[i] = 3*a[i]; #pragma omp parallel for for(int j = 0; j < 4; ++j) { b[j] = b[j] + a[i]; } } return 0; }
the_stack_data/187643909.c
/* Photoy2k sprite offset "decryption"*/ /**/ /* ASIC28 gets a sprite number and an encrypted sprite offset and returns*/ /* a decrypted sprite offset. Only bits 1, 3, 8 and 13 (0x210a) change.*/ /**/ /* The encrypted sprite offset comes from the rom. There are 10-bytes*/ /* structures at address:*/ /* 224eb4 + nb*10 for sprites 0..1f3f*/ /* 23773e + (nb_1f40)*10 for sprites 1f40..3bff*/ /**/ /* struct is:*/ /* +0 u32 encrypted sprite offset*/ /* +4 u8 width*/ /* +5 u8 height*/ /* +6 u32 always 0*/ /**/ /* Following table gives the decrypted sprite offset given the sprite number.*/ /* The actual decryption algorithm is unknown.*/ unsigned int pgmy2ks[0x3c00] = { 0x000000, 0x00007c, 0x0000f8, 0x000174, 0x0001f0, 0x00026c, 0x0002e8, 0x000364, 0x0003e0, 0x00045c, 0x0004d8, 0x000554, 0x0005d0, 0x00064c, 0x0006c8, 0x000744, 0x0007c0, 0x00083c, 0x0008b8, 0x000934, 0x0009b0, 0x000a2c, 0x000aa8, 0x000b24, 0x000ba0, 0x000c1c, 0x000c98, 0x000d14, 0x000d90, 0x000e0c, 0x000e88, 0x000f04, 0x000f80, 0x000ffc, 0x001078, 0x0010f4, 0x001170, 0x0011ec, 0x001268, 0x0012e4, 0x001360, 0x0013dc, 0x001458, 0x0014d4, 0x001550, 0x0015cc, 0x001648, 0x0016c4, 0x001740, 0x0017bc, 0x001838, 0x0018b4, 0x001930, 0x0019ac, 0x001a28, 0x001aa4, 0x001b20, 0x001b9c, 0x001c18, 0x001c94, 0x001d10, 0x001d8c, 0x001e08, 0x001e84, 0x001f00, 0x001f7c, 0x001ff8, 0x002074, 0x0020f0, 0x00216c, 0x0021e8, 0x002264, 0x0022e0, 0x00235c, 0x0023d8, 0x002454, 0x0024d0, 0x00254c, 0x0025c8, 0x002644, 0x0026c0, 0x00273c, 0x0027b8, 0x002834, 0x0028b0, 0x00292c, 0x0029a8, 0x002a24, 0x002aa0, 0x002b1c, 0x002b98, 0x002c14, 0x002c90, 0x002d0c, 0x002d88, 0x002e04, 0x002e80, 0x002efc, 0x002f78, 0x002ff4, 0x003070, 0x0030ec, 0x003168, 0x0031e4, 0x003260, 0x0032dc, 0x003358, 0x0033d4, 0x003450, 0x0034cc, 0x003548, 0x0035c4, 0x003640, 0x0036bc, 0x003738, 0x0037b4, 0x003830, 0x0038ac, 0x003928, 0x0039a4, 0x003a20, 0x003a9c, 0x003b18, 0x003b94, 0x003c10, 0x003c8c, 0x003d08, 0x003d84, 0x003e00, 0x003e7c, 0x003ef8, 0x003f74, 0x003ff0, 0x00406c, 0x0040e8, 0x004164, 0x0041e0, 0x00425c, 0x0042d8, 0x004354, 0x0043d0, 0x00444c, 0x0044c8, 0x004544, 0x0045c0, 0x00463c, 0x0046b8, 0x004734, 0x0047b0, 0x00482c, 0x0048a8, 0x004924, 0x0049a0, 0x004a1c, 0x004a98, 0x004b14, 0x004b90, 0x004c0c, 0x004c88, 0x004d04, 0x004d80, 0x004dfc, 0x004e78, 0x004ef4, 0x004f70, 0x004fec, 0x005068, 0x0050e4, 0x005160, 0x0051dc, 0x005258, 0x0052d4, 0x005350, 0x0053cc, 0x005448, 0x0054c4, 0x005540, 0x0055bc, 0x005638, 0x0056b4, 0x005730, 0x0057ac, 0x005828, 0x0058a4, 0x005920, 0x00599c, 0x005a18, 0x005a94, 0x005b10, 0x005b8c, 0x005c08, 0x005c84, 0x005d00, 0x005d7c, 0x005df8, 0x005e74, 0x005ef0, 0x005f6c, 0x005fe8, 0x006064, 0x0060e0, 0x00615c, 0x0061d8, 0x006254, 0x0062d0, 0x00634c, 0x0063c8, 0x006444, 0x0064c0, 0x00653c, 0x0065b8, 0x006634, 0x0066b0, 0x00672c, 0x0067a8, 0x006824, 0x0068a0, 0x00691c, 0x006998, 0x006a14, 0x006a90, 0x006b0c, 0x006b88, 0x006c04, 0x006c80, 0x006cfc, 0x006d78, 0x006df4, 0x006e70, 0x006eec, 0x006f68, 0x006fe4, 0x007060, 0x0070dc, 0x007158, 0x0071d4, 0x007250, 0x0072cc, 0x007348, 0x0073c4, 0x007440, 0x0074bc, 0x007538, 0x0075b4, 0x007630, 0x0076ac, 0x007728, 0x0077a4, 0x007820, 0x00789c, 0x007918, 0x007994, 0x007a10, 0x007a8c, 0x007b08, 0x007b84, 0x007c00, 0x007c7c, 0x007cf8, 0x007d74, 0x007df0, 0x007e6c, 0x007ee8, 0x007f64, 0x007fe0, 0x00805c, 0x0080d8, 0x008154, 0x0081d0, 0x00824c, 0x0082c8, 0x008344, 0x0083c0, 0x00843c, 0x0084b8, 0x008534, 0x0085b0, 0x00862c, 0x0086a8, 0x008724, 0x0087a0, 0x00881c, 0x008898, 0x008914, 0x008990, 0x008a0c, 0x008a88, 0x008b04, 0x008b80, 0x008bfc, 0x008c78, 0x008cf4, 0x008d70, 0x008dec, 0x008e68, 0x008ee4, 0x008f60, 0x008fdc, 0x009058, 0x0090d4, 0x009150, 0x0091cc, 0x009248, 0x0092c4, 0x009340, 0x0093bc, 0x009438, 0x0094b4, 0x009530, 0x0095ac, 0x009628, 0x0096a4, 0x009720, 0x00979c, 0x009818, 0x009894, 0x009910, 0x00998c, 0x009a08, 0x009a84, 0x009b00, 0x009b7c, 0x009bf8, 0x009c74, 0x009cf0, 0x009d6c, 0x009de8, 0x009e64, 0x009ee0, 0x009f5c, 0x009fd8, 0x00a054, 0x00a0d0, 0x00a14c, 0x00a1c8, 0x00a244, 0x00a2c0, 0x00a33c, 0x00a3b8, 0x00a434, 0x00a4b0, 0x00a52c, 0x00a5a8, 0x00a624, 0x00a6a0, 0x00a71c, 0x00a798, 0x00a814, 0x00a890, 0x00a90c, 0x00a988, 0x00aa04, 0x00aa80, 0x00aafc, 0x00ab78, 0x00abf4, 0x00ac70, 0x00acec, 0x00ad68, 0x00ade4, 0x00ae60, 0x00aedc, 0x00af58, 0x00afd4, 0x00b050, 0x00b0cc, 0x00b148, 0x00b1c4, 0x00b240, 0x00b2bc, 0x00b338, 0x00b3b4, 0x00b430, 0x00b4ac, 0x00b528, 0x00b5a4, 0x00b620, 0x00b69c, 0x00b718, 0x00b794, 0x00b810, 0x00b88c, 0x00b908, 0x00b984, 0x00ba00, 0x00ba7c, 0x00baf8, 0x00bb74, 0x00bbf0, 0x00bc6c, 0x00bce8, 0x00bd64, 0x00bde0, 0x00be5c, 0x00bed8, 0x00bf54, 0x00bfd0, 0x00c04c, 0x00c0c8, 0x00c144, 0x00c1c0, 0x00c23c, 0x00c2b8, 0x00c334, 0x00c3b0, 0x00c42c, 0x00c4a8, 0x00c524, 0x00c5a0, 0x00c61c, 0x00c698, 0x00c714, 0x00c790, 0x00c80c, 0x00c888, 0x00c904, 0x00c980, 0x00c9fc, 0x00ca78, 0x00caf4, 0x00cb70, 0x00cbec, 0x00cc68, 0x00cce4, 0x00cd60, 0x00cddc, 0x00ce58, 0x00ced4, 0x00cf50, 0x00cfcc, 0x00d048, 0x00d0c4, 0x00d140, 0x00d1bc, 0x00d238, 0x00d2b4, 0x00d330, 0x00d3ac, 0x00d428, 0x00d4a4, 0x00d520, 0x00d59c, 0x00d618, 0x00d694, 0x00d710, 0x00d78c, 0x00d808, 0x00d884, 0x00d900, 0x00d97c, 0x00d9f8, 0x00da74, 0x00daf0, 0x00db6c, 0x00dbe8, 0x00dc64, 0x00dce0, 0x00dd5c, 0x00ddd8, 0x00de54, 0x00ded0, 0x00df4c, 0x00dfc8, 0x00e044, 0x00e0c0, 0x00e13c, 0x00e1b8, 0x00e234, 0x00e2b0, 0x00e32c, 0x00e3a8, 0x00e424, 0x00e4a0, 0x00e51c, 0x00e598, 0x00e614, 0x00e690, 0x00e70c, 0x00e788, 0x00e804, 0x00e880, 0x00e8fc, 0x00e978, 0x00e9f4, 0x00ea70, 0x00eaec, 0x00eb68, 0x00ebe4, 0x00ec60, 0x00ecdc, 0x00ed58, 0x00edd4, 0x00ee50, 0x00eecc, 0x00ef48, 0x00efc4, 0x00f040, 0x00f0bc, 0x00f138, 0x00f1b4, 0x00f230, 0x00f2ac, 0x00f328, 0x00f3a4, 0x00f420, 0x00f49c, 0x00f518, 0x00f594, 0x00f610, 0x00f68c, 0x00f708, 0x00f784, 0x00f800, 0x00f87c, 0x00f8f8, 0x00f974, 0x00f9f0, 0x00fa6c, 0x00fae8, 0x00fb64, 0x00fbe0, 0x00fc5c, 0x00fcd8, 0x00fd54, 0x00fdd0, 0x00fe4c, 0x00fec8, 0x00ff44, 0x00ffc0, 0x01003c, 0x0100b8, 0x010134, 0x0101b0, 0x01022c, 0x0102a8, 0x010324, 0x0103a0, 0x01041c, 0x010498, 0x010514, 0x010590, 0x01060c, 0x010688, 0x010704, 0x010780, 0x0107fc, 0x010878, 0x0108f4, 0x010970, 0x0109ec, 0x010a68, 0x010ae4, 0x010b60, 0x010bdc, 0x010c58, 0x010cd4, 0x010d50, 0x010dcc, 0x010e48, 0x010ec4, 0x010f40, 0x010fbc, 0x011038, 0x0110b4, 0x011130, 0x0111ac, 0x011228, 0x0112a4, 0x011320, 0x01139c, 0x011418, 0x011494, 0x011510, 0x01158c, 0x011608, 0x011684, 0x011700, 0x0117a4, 0x011848, 0x0118ec, 0x011990, 0x011a34, 0x011ad8, 0x011b7c, 0x011c20, 0x011cc4, 0x011d68, 0x011e0c, 0x011eb0, 0x011f54, 0x011ff8, 0x01209c, 0x012140, 0x0121e4, 0x012288, 0x01232c, 0x0123d0, 0x012474, 0x012518, 0x0125bc, 0x012660, 0x012704, 0x0127a8, 0x01284c, 0x0128f0, 0x012994, 0x012a38, 0x012adc, 0x012b80, 0x012c24, 0x012cc8, 0x012d6c, 0x012e10, 0x012eb4, 0x012f58, 0x012ffc, 0x0130a0, 0x013144, 0x0131e8, 0x01328c, 0x013330, 0x0133d4, 0x013478, 0x01351c, 0x0135c0, 0x013664, 0x013708, 0x0137ac, 0x013850, 0x0138f4, 0x013998, 0x013a3c, 0x013ae0, 0x013b84, 0x013c28, 0x013ccc, 0x013d70, 0x013e14, 0x013eb8, 0x013f5c, 0x014000, 0x01407c, 0x0140f8, 0x014174, 0x0141f0, 0x01426c, 0x0142e8, 0x014364, 0x0143e0, 0x01445c, 0x0144d8, 0x014554, 0x0145d0, 0x01464c, 0x0146c8, 0x014744, 0x0147c0, 0x01483c, 0x0148b8, 0x014934, 0x0149b0, 0x014a2c, 0x014aa8, 0x014b24, 0x014ba0, 0x014c1c, 0x014c98, 0x014d14, 0x014d90, 0x014e0c, 0x014e88, 0x014f04, 0x014f80, 0x014ffc, 0x015078, 0x0150f4, 0x015170, 0x0151ec, 0x015268, 0x0152e4, 0x015360, 0x0153dc, 0x015458, 0x0154d4, 0x015550, 0x0155cc, 0x015648, 0x0156c4, 0x015740, 0x0157bc, 0x015838, 0x0158b4, 0x015930, 0x0159ac, 0x015a28, 0x015aa4, 0x015b20, 0x015b9c, 0x015c18, 0x015c94, 0x015d10, 0x015d8c, 0x015e08, 0x015e84, 0x015f00, 0x015fa4, 0x016048, 0x0160ec, 0x016190, 0x016234, 0x0162d8, 0x01637c, 0x016420, 0x0164c4, 0x016568, 0x01660c, 0x0166b0, 0x016754, 0x0167f8, 0x01689c, 0x016940, 0x0169e4, 0x016a88, 0x016b2c, 0x016bd0, 0x016c74, 0x016d18, 0x016dbc, 0x016e60, 0x016f04, 0x016fa8, 0x01704c, 0x0170f0, 0x017194, 0x017238, 0x0172dc, 0x017380, 0x017424, 0x0174c8, 0x01756c, 0x017610, 0x0176b4, 0x017758, 0x0177fc, 0x0178a0, 0x017944, 0x0179e8, 0x017a8c, 0x017b30, 0x017bd4, 0x017c78, 0x017d1c, 0x017dc0, 0x017e64, 0x017f08, 0x017fac, 0x018050, 0x0180f4, 0x018198, 0x01823c, 0x0182e0, 0x018384, 0x018428, 0x0184cc, 0x018570, 0x018614, 0x0186b8, 0x01875c, 0x018800, 0x01887c, 0x0188f8, 0x018974, 0x0189f0, 0x018a6c, 0x018ae8, 0x018b64, 0x018be0, 0x018c5c, 0x018cd8, 0x018d54, 0x018dd0, 0x018e4c, 0x018ec8, 0x018f44, 0x018fc0, 0x01903c, 0x0190b8, 0x019134, 0x0191b0, 0x01922c, 0x0192a8, 0x019324, 0x0193a0, 0x01941c, 0x019498, 0x019514, 0x019590, 0x01960c, 0x019688, 0x019704, 0x019780, 0x0197fc, 0x019878, 0x0198f4, 0x019970, 0x0199ec, 0x019a68, 0x019ae4, 0x019b60, 0x019bdc, 0x019c58, 0x019cd4, 0x019d50, 0x019dcc, 0x019e48, 0x019ec4, 0x019f40, 0x019fbc, 0x01a038, 0x01a0b4, 0x01a130, 0x01a1ac, 0x01a228, 0x01a2a4, 0x01a320, 0x01a39c, 0x01a418, 0x01a494, 0x01a510, 0x01a58c, 0x01a608, 0x01a684, 0x01a700, 0x01a7a4, 0x01a848, 0x01a8ec, 0x01a990, 0x01aa34, 0x01aad8, 0x01ab7c, 0x01ac20, 0x01acc4, 0x01ad68, 0x01ae0c, 0x01aeb0, 0x01af54, 0x01aff8, 0x01b09c, 0x01b140, 0x01b1e4, 0x01b288, 0x01b32c, 0x01b3d0, 0x01b474, 0x01b518, 0x01b5bc, 0x01b660, 0x01b704, 0x01b7a8, 0x01b84c, 0x01b8f0, 0x01b994, 0x01ba38, 0x01badc, 0x01bb80, 0x01bc24, 0x01bcc8, 0x01bd6c, 0x01be10, 0x01beb4, 0x01bf58, 0x01bffc, 0x01c0a0, 0x01c144, 0x01c1e8, 0x01c28c, 0x01c330, 0x01c3d4, 0x01c478, 0x01c51c, 0x01c5c0, 0x01c664, 0x01c708, 0x01c7ac, 0x01c850, 0x01c8f4, 0x01c998, 0x01ca3c, 0x01cae0, 0x01cb84, 0x01cc28, 0x01cccc, 0x01cd70, 0x01ce14, 0x01ceb8, 0x01cf5c, 0x01d000, 0x01d07c, 0x01d0f8, 0x01d174, 0x01d1f0, 0x01d26c, 0x01d2e8, 0x01d364, 0x01d3e0, 0x01d45c, 0x01d4d8, 0x01d554, 0x01d5d0, 0x01d64c, 0x01d6c8, 0x01d744, 0x01d7c0, 0x01d83c, 0x01d8b8, 0x01d934, 0x01d9b0, 0x01da2c, 0x01daa8, 0x01db24, 0x01dba0, 0x01dc1c, 0x01dc98, 0x01dd14, 0x01dd90, 0x01de0c, 0x01de88, 0x01df04, 0x01df80, 0x01dffc, 0x01e078, 0x01e0f4, 0x01e170, 0x01e1ec, 0x01e268, 0x01e2e4, 0x01e360, 0x01e3dc, 0x01e458, 0x01e4d4, 0x01e550, 0x01e5cc, 0x01e648, 0x01e6c4, 0x01e740, 0x01e7bc, 0x01e838, 0x01e8b4, 0x01e930, 0x01e9ac, 0x01ea28, 0x01eaa4, 0x01eb20, 0x01eb9c, 0x01ec18, 0x01ec94, 0x01ed10, 0x01ed8c, 0x01ee08, 0x01ee84, 0x01ef00, 0x01efa4, 0x01f048, 0x01f0ec, 0x01f190, 0x01f234, 0x01f2d8, 0x01f37c, 0x01f420, 0x01f4c4, 0x01f568, 0x01f60c, 0x01f6b0, 0x01f754, 0x01f7f8, 0x01f89c, 0x01f940, 0x01f9e4, 0x01fa88, 0x01fb2c, 0x01fbd0, 0x01fc74, 0x01fd18, 0x01fdbc, 0x01fe60, 0x01ff04, 0x01ffa8, 0x02004c, 0x0200f0, 0x020194, 0x020238, 0x0202dc, 0x020380, 0x020424, 0x0204c8, 0x02056c, 0x020610, 0x0206b4, 0x020758, 0x0207fc, 0x0208a0, 0x020944, 0x0209e8, 0x020a8c, 0x020b30, 0x020bd4, 0x020c78, 0x020d1c, 0x020dc0, 0x020e64, 0x020f08, 0x020fac, 0x021050, 0x0210f4, 0x021198, 0x02123c, 0x0212e0, 0x021384, 0x021428, 0x0214cc, 0x021570, 0x021614, 0x0216b8, 0x02175c, 0x021800, 0x02187c, 0x0218f8, 0x021974, 0x0219f0, 0x021a6c, 0x021ae8, 0x021b64, 0x021be0, 0x021c5c, 0x021cd8, 0x021d54, 0x021dd0, 0x021e4c, 0x021ec8, 0x021f44, 0x021fc0, 0x02203c, 0x0220b8, 0x022134, 0x0221b0, 0x02222c, 0x0222a8, 0x022324, 0x0223a0, 0x02241c, 0x022498, 0x022514, 0x022590, 0x02260c, 0x022688, 0x022704, 0x022780, 0x0227fc, 0x022878, 0x0228f4, 0x022970, 0x0229ec, 0x022a68, 0x022ae4, 0x022b60, 0x022bdc, 0x022c58, 0x022cd4, 0x022d50, 0x022dcc, 0x022e48, 0x022ec4, 0x022f40, 0x022fbc, 0x023038, 0x0230b4, 0x023130, 0x0231ac, 0x023228, 0x0232a4, 0x023320, 0x02339c, 0x023418, 0x023494, 0x023510, 0x02358c, 0x023608, 0x023684, 0x023700, 0x02377c, 0x0237f8, 0x023874, 0x0238f0, 0x02396c, 0x0239e8, 0x023a64, 0x023ae0, 0x023b5c, 0x023bd8, 0x023c54, 0x023cd0, 0x023d4c, 0x023dc8, 0x023e44, 0x023ec0, 0x023f3c, 0x023fb8, 0x024034, 0x0240b0, 0x02412c, 0x0241a8, 0x024224, 0x0242a0, 0x02431c, 0x024398, 0x024414, 0x024490, 0x02450c, 0x024588, 0x024604, 0x024680, 0x0246fc, 0x024778, 0x0247f4, 0x024870, 0x0248ec, 0x024968, 0x0249e4, 0x024a60, 0x024adc, 0x024b58, 0x024bd4, 0x024c50, 0x024ccc, 0x024d48, 0x024dc4, 0x024e40, 0x024ebc, 0x024f38, 0x024fb4, 0x025030, 0x0250ac, 0x025128, 0x0251a4, 0x025220, 0x02529c, 0x025318, 0x025394, 0x025410, 0x02548c, 0x025508, 0x025584, 0x025600, 0x02567c, 0x0256f8, 0x025774, 0x0257f0, 0x02586c, 0x0258e8, 0x025964, 0x0259e0, 0x025a5c, 0x025ad8, 0x025b54, 0x025bd0, 0x025c4c, 0x025cc8, 0x025d44, 0x025dc0, 0x025e3c, 0x025eb8, 0x025f34, 0x025fb0, 0x02602c, 0x0260a8, 0x026124, 0x0261a0, 0x02621c, 0x026298, 0x026314, 0x026390, 0x02640c, 0x026488, 0x026504, 0x026580, 0x0265fc, 0x026678, 0x0266f4, 0x026770, 0x0267ec, 0x026868, 0x0268e4, 0x026960, 0x0269dc, 0x026a58, 0x026ad4, 0x026b50, 0x026bcc, 0x026c48, 0x026cc4, 0x026d40, 0x026dbc, 0x026e38, 0x026eb4, 0x026f30, 0x026fac, 0x027028, 0x0270a4, 0x027120, 0x02719c, 0x027218, 0x027294, 0x027310, 0x02738c, 0x027408, 0x027484, 0x027500, 0x02757c, 0x0275f8, 0x027674, 0x0276f0, 0x02776c, 0x0277e8, 0x027864, 0x0278e0, 0x02795c, 0x0279d8, 0x027a54, 0x027ad0, 0x027b4c, 0x027bc8, 0x027c44, 0x027cc0, 0x027d3c, 0x027db8, 0x027e34, 0x027eb0, 0x027f2c, 0x027fa8, 0x028024, 0x0280a0, 0x02811c, 0x028198, 0x028214, 0x028290, 0x02830c, 0x028388, 0x028404, 0x028480, 0x0284fc, 0x028578, 0x0285f4, 0x028670, 0x0286ec, 0x028768, 0x0287e4, 0x028860, 0x0288dc, 0x028958, 0x0289d4, 0x028a50, 0x028acc, 0x028b48, 0x028bc4, 0x028c40, 0x028cbc, 0x028d38, 0x028db4, 0x028e30, 0x028eac, 0x028f28, 0x028fa4, 0x029020, 0x02909c, 0x029118, 0x029194, 0x029210, 0x02928c, 0x029308, 0x029384, 0x029400, 0x02947c, 0x0294f8, 0x029574, 0x0295f0, 0x02966c, 0x0296e8, 0x029764, 0x0297e0, 0x02985c, 0x0298d8, 0x029954, 0x0299d0, 0x029a4c, 0x029ac8, 0x029b44, 0x029bc0, 0x029c3c, 0x029cb8, 0x029d34, 0x029db0, 0x029e2c, 0x029ea8, 0x029f24, 0x029fa0, 0x02a01c, 0x02a098, 0x02a114, 0x02a190, 0x02a20c, 0x02a288, 0x02a304, 0x02a380, 0x02a424, 0x02a4c8, 0x02a56c, 0x02a610, 0x02a6b4, 0x02a758, 0x02a7fc, 0x02a8a0, 0x02a944, 0x02a9e8, 0x02aa8c, 0x02ab30, 0x02abd4, 0x02ac78, 0x02ad1c, 0x02adc0, 0x02ae64, 0x02af08, 0x02afac, 0x02b050, 0x02b0f4, 0x02b198, 0x02b23c, 0x02b2e0, 0x02b384, 0x02b428, 0x02b4cc, 0x02b570, 0x02b614, 0x02b6b8, 0x02b75c, 0x02b800, 0x02b87c, 0x02b8f8, 0x02b974, 0x02b9f0, 0x02ba6c, 0x02bae8, 0x02bb64, 0x02bbe0, 0x02bc5c, 0x02bcd8, 0x02bd54, 0x02bdd0, 0x02be4c, 0x02bec8, 0x02bf44, 0x02bfc0, 0x02c03c, 0x02c0b8, 0x02c134, 0x02c1b0, 0x02c22c, 0x02c2a8, 0x02c324, 0x02c3a0, 0x02c41c, 0x02c498, 0x02c514, 0x02c590, 0x02c60c, 0x02c688, 0x02c704, 0x02c780, 0x02c824, 0x02c8c8, 0x02c96c, 0x02ca10, 0x02cab4, 0x02cb58, 0x02cbfc, 0x02cca0, 0x02cd44, 0x02cde8, 0x02ce8c, 0x02cf30, 0x02cfd4, 0x02d078, 0x02d11c, 0x02d1c0, 0x02d264, 0x02d308, 0x02d3ac, 0x02d450, 0x02d4f4, 0x02d598, 0x02d63c, 0x02d6e0, 0x02d784, 0x02d828, 0x02d8cc, 0x02d970, 0x02da14, 0x02dab8, 0x02db5c, 0x02dc00, 0x02dc7c, 0x02dcf8, 0x02dd74, 0x02ddf0, 0x02de6c, 0x02dee8, 0x02df64, 0x02dfe0, 0x02e05c, 0x02e0d8, 0x02e154, 0x02e1d0, 0x02e24c, 0x02e2c8, 0x02e344, 0x02e3c0, 0x02e43c, 0x02e4b8, 0x02e534, 0x02e5b0, 0x02e62c, 0x02e6a8, 0x02e724, 0x02e7a0, 0x02e81c, 0x02e898, 0x02e914, 0x02e990, 0x02ea0c, 0x02ea88, 0x02eb04, 0x02eb80, 0x02ec24, 0x02ecc8, 0x02ed6c, 0x02ee10, 0x02eeb4, 0x02ef58, 0x02effc, 0x02f0a0, 0x02f144, 0x02f1e8, 0x02f28c, 0x02f330, 0x02f3d4, 0x02f478, 0x02f51c, 0x02f5c0, 0x02f664, 0x02f708, 0x02f7ac, 0x02f850, 0x02f8f4, 0x02f998, 0x02fa3c, 0x02fae0, 0x02fb84, 0x02fc28, 0x02fccc, 0x02fd70, 0x02fe14, 0x02feb8, 0x02ff5c, 0x030000, 0x03007c, 0x0300f8, 0x030174, 0x0301f0, 0x03026c, 0x0302e8, 0x030364, 0x0303e0, 0x03045c, 0x0304d8, 0x030554, 0x0305d0, 0x03064c, 0x0306c8, 0x030744, 0x0307c0, 0x03083c, 0x0308b8, 0x030934, 0x0309b0, 0x030a2c, 0x030aa8, 0x030b24, 0x030ba0, 0x030c1c, 0x030c98, 0x030d14, 0x030d90, 0x030e0c, 0x030e88, 0x030f04, 0x030f80, 0x031024, 0x0310c8, 0x03116c, 0x031210, 0x0312b4, 0x031358, 0x0313fc, 0x0314a0, 0x031544, 0x0315e8, 0x03168c, 0x031730, 0x0317d4, 0x031878, 0x03191c, 0x0319c0, 0x031a64, 0x031b08, 0x031bac, 0x031c50, 0x031cf4, 0x031d98, 0x031e3c, 0x031ee0, 0x031f84, 0x032028, 0x0320cc, 0x032170, 0x032214, 0x0322b8, 0x03235c, 0x032400, 0x03247c, 0x0324f8, 0x032574, 0x0325f0, 0x03266c, 0x0326e8, 0x032764, 0x0327e0, 0x03285c, 0x0328d8, 0x032954, 0x0329d0, 0x032a4c, 0x032ac8, 0x032b44, 0x032bc0, 0x032c3c, 0x032cb8, 0x032d34, 0x032db0, 0x032e2c, 0x032ea8, 0x032f24, 0x032fa0, 0x03301c, 0x033098, 0x033114, 0x033190, 0x03320c, 0x033288, 0x033304, 0x033380, 0x0333fc, 0x033478, 0x0334f4, 0x033570, 0x0335ec, 0x033668, 0x0336e4, 0x033760, 0x0337dc, 0x033858, 0x0338d4, 0x033950, 0x0339cc, 0x033a48, 0x033ac4, 0x033b40, 0x033bbc, 0x033c38, 0x033cb4, 0x033d30, 0x033dac, 0x033e28, 0x033ea4, 0x033f20, 0x033f9c, 0x034018, 0x034094, 0x034110, 0x03418c, 0x034208, 0x034284, 0x034300, 0x03437c, 0x0343f8, 0x034474, 0x0344f0, 0x03456c, 0x0345e8, 0x034664, 0x0346e0, 0x03475c, 0x0347d8, 0x034854, 0x0348d0, 0x03494c, 0x0349c8, 0x034a44, 0x034ac0, 0x034b3c, 0x034bb8, 0x034c34, 0x034cb0, 0x034d2c, 0x034da8, 0x034e24, 0x034ea0, 0x034f1c, 0x034f98, 0x035014, 0x035090, 0x03510c, 0x035188, 0x035204, 0x035280, 0x0352fc, 0x035378, 0x0353f4, 0x035470, 0x0354ec, 0x035568, 0x0355e4, 0x035660, 0x0356dc, 0x035758, 0x0357d4, 0x035850, 0x0358cc, 0x035948, 0x0359c4, 0x035a40, 0x035abc, 0x035b38, 0x035bb4, 0x035c30, 0x035cac, 0x035d28, 0x035da4, 0x035e20, 0x035e9c, 0x035f18, 0x035f94, 0x036010, 0x03608c, 0x036108, 0x036184, 0x036200, 0x03627c, 0x0362f8, 0x036374, 0x0363f0, 0x03646c, 0x0364e8, 0x036564, 0x0365e0, 0x03665c, 0x0366d8, 0x036754, 0x0367d0, 0x03684c, 0x0368c8, 0x036944, 0x0369c0, 0x036a3c, 0x036ab8, 0x036b34, 0x036bb0, 0x036c2c, 0x036ca8, 0x036d24, 0x036da0, 0x036e1c, 0x036e98, 0x036f14, 0x036f90, 0x03700c, 0x037088, 0x037104, 0x037180, 0x0371fc, 0x037278, 0x0372f4, 0x037370, 0x0373ec, 0x037468, 0x0374e4, 0x037560, 0x0375dc, 0x037658, 0x0376d4, 0x037750, 0x0377cc, 0x037848, 0x0378c4, 0x037940, 0x0379bc, 0x037a38, 0x037ab4, 0x037b30, 0x037bac, 0x037c28, 0x037ca4, 0x037d20, 0x037d9c, 0x037e18, 0x037e94, 0x037f10, 0x037f8c, 0x038008, 0x038084, 0x038100, 0x03817c, 0x0381f8, 0x038274, 0x0382f0, 0x03836c, 0x0383e8, 0x038464, 0x0384e0, 0x03855c, 0x0385d8, 0x038654, 0x0386d0, 0x03874c, 0x0387c8, 0x038844, 0x0388c0, 0x03893c, 0x0389b8, 0x038a34, 0x038ab0, 0x038b2c, 0x038ba8, 0x038c24, 0x038ca0, 0x038d1c, 0x038d98, 0x038e14, 0x038e90, 0x038f0c, 0x038f88, 0x039004, 0x039080, 0x0390fc, 0x039178, 0x0391f4, 0x039270, 0x0392ec, 0x039368, 0x0393e4, 0x039460, 0x0394dc, 0x039558, 0x0395d4, 0x039650, 0x0396cc, 0x039748, 0x0397c4, 0x039840, 0x0398bc, 0x039938, 0x0399b4, 0x039a30, 0x039aac, 0x039b28, 0x039ba4, 0x039c20, 0x039c9c, 0x039d18, 0x039d94, 0x039e10, 0x039e8c, 0x039f08, 0x039f84, 0x03a000, 0x03a07c, 0x03a0f8, 0x03a174, 0x03a1f0, 0x03a26c, 0x03a2e8, 0x03a364, 0x03a3e0, 0x03a45c, 0x03a4d8, 0x03a554, 0x03a5d0, 0x03a64c, 0x03a6c8, 0x03a744, 0x03a7c0, 0x03a83c, 0x03a8b8, 0x03a934, 0x03a9b0, 0x03aa2c, 0x03aaa8, 0x03ab24, 0x03aba0, 0x03ac1c, 0x03ac98, 0x03ad14, 0x03ad90, 0x03ae0c, 0x03ae88, 0x03af04, 0x03af80, 0x03b024, 0x03b0c8, 0x03b16c, 0x03b210, 0x03b2b4, 0x03b358, 0x03b3fc, 0x03b4a0, 0x03b544, 0x03b5e8, 0x03b68c, 0x03b730, 0x03b7d4, 0x03b878, 0x03b91c, 0x03b9c0, 0x03ba64, 0x03bb08, 0x03bbac, 0x03bc50, 0x03bcf4, 0x03bd98, 0x03be3c, 0x03bee0, 0x03bf84, 0x03c028, 0x03c0cc, 0x03c170, 0x03c214, 0x03c2b8, 0x03c35c, 0x03c400, 0x03c47c, 0x03c4f8, 0x03c574, 0x03c5f0, 0x03c66c, 0x03c6e8, 0x03c764, 0x03c7e0, 0x03c85c, 0x03c8d8, 0x03c954, 0x03c9d0, 0x03ca4c, 0x03cac8, 0x03cb44, 0x03cbc0, 0x03cc3c, 0x03ccb8, 0x03cd34, 0x03cdb0, 0x03ce2c, 0x03cea8, 0x03cf24, 0x03cfa0, 0x03d01c, 0x03d098, 0x03d114, 0x03d190, 0x03d20c, 0x03d288, 0x03d304, 0x03d380, 0x03d424, 0x03d4c8, 0x03d56c, 0x03d610, 0x03d6b4, 0x03d758, 0x03d7fc, 0x03d8a0, 0x03d944, 0x03d9e8, 0x03da8c, 0x03db30, 0x03dbd4, 0x03dc78, 0x03dd1c, 0x03ddc0, 0x03de64, 0x03df08, 0x03dfac, 0x03e050, 0x03e0f4, 0x03e198, 0x03e23c, 0x03e2e0, 0x03e384, 0x03e428, 0x03e4cc, 0x03e570, 0x03e614, 0x03e6b8, 0x03e75c, 0x03e800, 0x03e87c, 0x03e8f8, 0x03e974, 0x03e9f0, 0x03ea6c, 0x03eae8, 0x03eb64, 0x03ebe0, 0x03ec5c, 0x03ecd8, 0x03ed54, 0x03edd0, 0x03ee4c, 0x03eec8, 0x03ef44, 0x03efc0, 0x03f03c, 0x03f0b8, 0x03f134, 0x03f1b0, 0x03f22c, 0x03f2a8, 0x03f324, 0x03f3a0, 0x03f41c, 0x03f498, 0x03f514, 0x03f590, 0x03f60c, 0x03f688, 0x03f704, 0x03f780, 0x03f824, 0x03f8c8, 0x03f96c, 0x03fa10, 0x03fab4, 0x03fb58, 0x03fbfc, 0x03fca0, 0x03fd44, 0x03fde8, 0x03fe8c, 0x03ff30, 0x03ffd4, 0x040078, 0x04011c, 0x0401c0, 0x040264, 0x040308, 0x0403ac, 0x040450, 0x0404f4, 0x040598, 0x04063c, 0x0406e0, 0x040784, 0x040828, 0x0408cc, 0x040970, 0x040a14, 0x040ab8, 0x040b5c, 0x040c00, 0x040c7c, 0x040cf8, 0x040d74, 0x040df0, 0x040e6c, 0x040ee8, 0x040f64, 0x040fe0, 0x04105c, 0x0410d8, 0x041154, 0x0411d0, 0x04124c, 0x0412c8, 0x041344, 0x0413c0, 0x04143c, 0x0414b8, 0x041534, 0x0415b0, 0x04162c, 0x0416a8, 0x041724, 0x0417a0, 0x04181c, 0x041898, 0x041914, 0x041990, 0x041a0c, 0x041a88, 0x041b04, 0x041b80, 0x041c24, 0x041cc8, 0x041d6c, 0x041e10, 0x041eb4, 0x041f58, 0x041ffc, 0x0420a0, 0x042144, 0x0421e8, 0x04228c, 0x042330, 0x0423d4, 0x042478, 0x04251c, 0x0425c0, 0x042664, 0x042708, 0x0427ac, 0x042850, 0x0428f4, 0x042998, 0x042a3c, 0x042ae0, 0x042b84, 0x042c28, 0x042ccc, 0x042d70, 0x042e14, 0x042eb8, 0x042f5c, 0x043000, 0x04307c, 0x0430f8, 0x043174, 0x0431f0, 0x04326c, 0x0432e8, 0x043364, 0x0433e0, 0x043484, 0x043500, 0x0435a4, 0x043620, 0x0436c4, 0x043740, 0x0437e4, 0x043860, 0x0438dc, 0x043958, 0x0439d4, 0x043a50, 0x043acc, 0x043b48, 0x043bc4, 0x043c40, 0x043ce4, 0x043d60, 0x043e04, 0x043e80, 0x043f24, 0x043fa0, 0x044044, 0x0440c0, 0x04413c, 0x0441b8, 0x044234, 0x0442b0, 0x04432c, 0x0443a8, 0x044424, 0x0444a0, 0x044544, 0x0445c0, 0x044664, 0x0446e0, 0x044784, 0x044800, 0x0448a4, 0x044920, 0x04499c, 0x044a18, 0x044a94, 0x044b10, 0x044b8c, 0x044c08, 0x044c84, 0x044d00, 0x044da4, 0x044e20, 0x044ec4, 0x044f40, 0x044fe4, 0x045060, 0x045104, 0x045180, 0x0451fc, 0x045278, 0x0452f4, 0x045370, 0x0453ec, 0x045468, 0x0454e4, 0x045560, 0x045604, 0x045680, 0x045724, 0x0457a0, 0x045844, 0x0458c0, 0x045964, 0x0459e0, 0x045a5c, 0x045ad8, 0x045b54, 0x045bd0, 0x045c4c, 0x045cc8, 0x045d44, 0x045dc0, 0x045e64, 0x045ee0, 0x045f84, 0x046000, 0x0460a4, 0x046120, 0x0461c4, 0x046240, 0x0462bc, 0x046338, 0x0463b4, 0x046430, 0x0464ac, 0x046528, 0x0465a4, 0x046620, 0x0466c4, 0x046740, 0x0467e4, 0x046860, 0x046904, 0x046980, 0x046a24, 0x046aa0, 0x046b1c, 0x046b98, 0x046c14, 0x046c90, 0x046d0c, 0x046d88, 0x046e04, 0x046e80, 0x046f24, 0x046fa0, 0x047044, 0x0470c0, 0x047164, 0x0471e0, 0x047284, 0x047300, 0x04737c, 0x0473f8, 0x047474, 0x0474f0, 0x04756c, 0x0475e8, 0x047664, 0x0476e0, 0x047784, 0x047800, 0x0478a4, 0x047920, 0x0479c4, 0x047a40, 0x047ae4, 0x047b60, 0x047bdc, 0x047c58, 0x047cd4, 0x047d50, 0x047dcc, 0x047e48, 0x047ec4, 0x047f40, 0x047fe4, 0x048060, 0x048104, 0x048180, 0x048224, 0x0482a0, 0x048344, 0x0483c0, 0x04843c, 0x0484b8, 0x048534, 0x0485b0, 0x04862c, 0x0486a8, 0x048724, 0x0487a0, 0x048844, 0x0488c0, 0x048964, 0x0489e0, 0x048a84, 0x048b00, 0x048ba4, 0x048c20, 0x048c9c, 0x048d18, 0x048d94, 0x048e10, 0x048e8c, 0x048f08, 0x048f84, 0x049000, 0x0490a4, 0x049120, 0x0491c4, 0x049240, 0x0492e4, 0x049360, 0x049404, 0x049480, 0x0494fc, 0x049578, 0x0495f4, 0x049670, 0x0496ec, 0x049768, 0x0497e4, 0x049860, 0x049904, 0x049980, 0x049a24, 0x049aa0, 0x049b44, 0x049bc0, 0x049c64, 0x049ce0, 0x049d5c, 0x049dd8, 0x049e54, 0x049ed0, 0x049f4c, 0x049fc8, 0x04a044, 0x04a0c0, 0x04a164, 0x04a1e0, 0x04a284, 0x04a300, 0x04a3a4, 0x04a420, 0x04a4c4, 0x04a540, 0x04a5bc, 0x04a638, 0x04a6b4, 0x04a730, 0x04a7ac, 0x04a828, 0x04a8a4, 0x04a920, 0x04a9c4, 0x04aa40, 0x04aae4, 0x04ab60, 0x04ac04, 0x04ac80, 0x04ad24, 0x04ada0, 0x04ae1c, 0x04ae98, 0x04af14, 0x04af90, 0x04b00c, 0x04b088, 0x04b104, 0x04b180, 0x04b224, 0x04b2a0, 0x04b344, 0x04b3c0, 0x04b464, 0x04b4e0, 0x04b584, 0x04b600, 0x04b67c, 0x04b6f8, 0x04b774, 0x04b7f0, 0x04b86c, 0x04b8e8, 0x04b964, 0x04b9e0, 0x04ba84, 0x04bb00, 0x04bba4, 0x04bc20, 0x04bcc4, 0x04bd40, 0x04bde4, 0x04be60, 0x04bedc, 0x04bf58, 0x04bfd4, 0x04c050, 0x04c0cc, 0x04c148, 0x04c1c4, 0x04c240, 0x04c2e4, 0x04c360, 0x04c404, 0x04c480, 0x04c524, 0x04c5a0, 0x04c644, 0x04c6c0, 0x04c73c, 0x04c7b8, 0x04c834, 0x04c8b0, 0x04c92c, 0x04c9a8, 0x04ca24, 0x04caa0, 0x04cb44, 0x04cbc0, 0x04cc64, 0x04cce0, 0x04cd84, 0x04ce00, 0x04cea4, 0x04cf20, 0x04cf9c, 0x04d018, 0x04d094, 0x04d110, 0x04d18c, 0x04d208, 0x04d284, 0x04d300, 0x04d3a4, 0x04d420, 0x04d4c4, 0x04d540, 0x04d5e4, 0x04d660, 0x04d704, 0x04d780, 0x04d7fc, 0x04d878, 0x04d8f4, 0x04d970, 0x04d9ec, 0x04da68, 0x04dae4, 0x04db60, 0x04dc04, 0x04dc80, 0x04dd24, 0x04dda0, 0x04de44, 0x04dec0, 0x04df64, 0x04dfe0, 0x04e05c, 0x04e0d8, 0x04e154, 0x04e1d0, 0x04e24c, 0x04e2c8, 0x04e344, 0x04e3c0, 0x04e464, 0x04e4e0, 0x04e584, 0x04e600, 0x04e6a4, 0x04e720, 0x04e7c4, 0x04e840, 0x04e8bc, 0x04e938, 0x04e9b4, 0x04ea30, 0x04eaac, 0x04eb28, 0x04eba4, 0x04ec20, 0x04ecc4, 0x04ed40, 0x04ede4, 0x04ee60, 0x04ef04, 0x04ef80, 0x04f024, 0x04f0a0, 0x04f11c, 0x04f198, 0x04f214, 0x04f290, 0x04f30c, 0x04f388, 0x04f404, 0x04f480, 0x04f524, 0x04f5a0, 0x04f644, 0x04f6c0, 0x04f764, 0x04f7e0, 0x04f884, 0x04f900, 0x04f97c, 0x04f9f8, 0x04fa74, 0x04faf0, 0x04fb6c, 0x04fbe8, 0x04fc64, 0x04fce0, 0x04fd84, 0x04fe00, 0x04fea4, 0x04ff20, 0x04ffc4, 0x050040, 0x0500e4, 0x050160, 0x0501dc, 0x050258, 0x0502d4, 0x050350, 0x0503cc, 0x050448, 0x0504c4, 0x050540, 0x0505e4, 0x050660, 0x050704, 0x050780, 0x050824, 0x0508a0, 0x050944, 0x0509c0, 0x050a3c, 0x050ab8, 0x050b34, 0x050bb0, 0x050c2c, 0x050ca8, 0x050d24, 0x050da0, 0x050e44, 0x050ec0, 0x050f64, 0x050fe0, 0x051084, 0x051100, 0x0511a4, 0x051220, 0x05129c, 0x051318, 0x051394, 0x051410, 0x05148c, 0x051508, 0x051584, 0x051600, 0x0516a4, 0x051720, 0x0517c4, 0x051840, 0x0518e4, 0x051960, 0x051a04, 0x051a80, 0x051afc, 0x051b78, 0x051bf4, 0x051c70, 0x051cec, 0x051d68, 0x051de4, 0x051e60, 0x051f04, 0x051f80, 0x052024, 0x0520a0, 0x052144, 0x0521c0, 0x052264, 0x0522e0, 0x05235c, 0x0523d8, 0x052454, 0x0524d0, 0x05254c, 0x0525c8, 0x052644, 0x0526c0, 0x052764, 0x0527e0, 0x052884, 0x052900, 0x0529a4, 0x052a20, 0x052ac4, 0x052b40, 0x052bbc, 0x052c38, 0x052cb4, 0x052d30, 0x052dac, 0x052e28, 0x052ea4, 0x052f20, 0x052fc4, 0x053040, 0x0530e4, 0x053160, 0x053204, 0x053280, 0x053324, 0x0533a0, 0x05341c, 0x053498, 0x053514, 0x053590, 0x05360c, 0x053688, 0x053704, 0x053780, 0x053824, 0x0538a0, 0x053944, 0x0539c0, 0x053a64, 0x053ae0, 0x053b84, 0x053c00, 0x053c7c, 0x053cf8, 0x053d74, 0x053df0, 0x053e6c, 0x053ee8, 0x053f64, 0x053fe0, 0x054084, 0x054100, 0x0541a4, 0x054220, 0x0542c4, 0x054340, 0x0543e4, 0x054460, 0x0544dc, 0x054558, 0x0545d4, 0x054650, 0x0546cc, 0x054748, 0x0547c4, 0x054840, 0x0548e4, 0x054960, 0x054a04, 0x054a80, 0x054b24, 0x054ba0, 0x054c44, 0x054cc0, 0x054d3c, 0x054db8, 0x054e34, 0x054eb0, 0x054f2c, 0x054fa8, 0x055024, 0x0550a0, 0x055144, 0x0551c0, 0x055264, 0x0552e0, 0x055384, 0x055400, 0x0554a4, 0x055520, 0x05559c, 0x055618, 0x055694, 0x055710, 0x05578c, 0x055808, 0x055884, 0x055900, 0x0559a4, 0x055a20, 0x055ac4, 0x055b40, 0x055be4, 0x055c60, 0x055d04, 0x055d80, 0x055dfc, 0x055e78, 0x055ef4, 0x055f70, 0x055fec, 0x056068, 0x0560e4, 0x056160, 0x056204, 0x056280, 0x056324, 0x0563a0, 0x056444, 0x0564c0, 0x056564, 0x0565e0, 0x05665c, 0x0566d8, 0x056754, 0x0567d0, 0x05684c, 0x0568c8, 0x056944, 0x0569c0, 0x056a64, 0x056ae0, 0x056b84, 0x056c00, 0x056ca4, 0x056d20, 0x056dc4, 0x056e40, 0x056ebc, 0x056f38, 0x056fb4, 0x057030, 0x0570ac, 0x057128, 0x0571a4, 0x057220, 0x0572c4, 0x057340, 0x0573e4, 0x057460, 0x057504, 0x057580, 0x057624, 0x0576a0, 0x05771c, 0x057798, 0x057814, 0x057890, 0x05790c, 0x057988, 0x057a04, 0x057a80, 0x057b24, 0x057ba0, 0x057c44, 0x057cc0, 0x057d64, 0x057de0, 0x057e84, 0x057f00, 0x057f7c, 0x057ff8, 0x058074, 0x0580f0, 0x05816c, 0x0581e8, 0x058264, 0x0582e0, 0x058384, 0x058400, 0x0584a4, 0x058520, 0x0585c4, 0x058640, 0x0586e4, 0x058760, 0x0587dc, 0x058858, 0x0588d4, 0x058950, 0x0589cc, 0x058a48, 0x058ac4, 0x058b40, 0x058be4, 0x058c60, 0x058d04, 0x058d80, 0x058e24, 0x058ea0, 0x058f44, 0x058fc0, 0x05903c, 0x0590b8, 0x059134, 0x0591b0, 0x05922c, 0x0592a8, 0x059324, 0x0593a0, 0x059444, 0x0594c0, 0x059564, 0x0595e0, 0x059684, 0x059700, 0x0597a4, 0x059820, 0x05989c, 0x059918, 0x059994, 0x059a10, 0x059a8c, 0x059b08, 0x059b84, 0x059c00, 0x059ca4, 0x059d20, 0x059dc4, 0x059e40, 0x059ee4, 0x059f60, 0x05a004, 0x05a080, 0x05a0fc, 0x05a178, 0x05a1f4, 0x05a270, 0x05a2ec, 0x05a368, 0x05a3e4, 0x05a460, 0x05a504, 0x05a580, 0x05a624, 0x05a6a0, 0x05a744, 0x05a7c0, 0x05a864, 0x05a8e0, 0x05a95c, 0x05a9d8, 0x05aa54, 0x05aad0, 0x05ab4c, 0x05abc8, 0x05ac44, 0x05acc0, 0x05ad64, 0x05ade0, 0x05ae84, 0x05af00, 0x05afa4, 0x05b020, 0x05b0c4, 0x05b140, 0x05b1bc, 0x05b238, 0x05b2b4, 0x05b330, 0x05b3ac, 0x05b428, 0x05b4a4, 0x05b520, 0x05b5c4, 0x05b640, 0x05b6e4, 0x05b760, 0x05b804, 0x05b880, 0x05b924, 0x05b9a0, 0x05ba1c, 0x05ba98, 0x05bb14, 0x05bb90, 0x05bc0c, 0x05bc88, 0x05bd04, 0x05bd80, 0x05be24, 0x05bea0, 0x05bf44, 0x05bfc0, 0x05c064, 0x05c0e0, 0x05c184, 0x05c200, 0x05c27c, 0x05c2f8, 0x05c374, 0x05c3f0, 0x05c46c, 0x05c4e8, 0x05c564, 0x05c5e0, 0x05c684, 0x05c700, 0x05c7a4, 0x05c820, 0x05c8c4, 0x05c940, 0x05c9e4, 0x05ca60, 0x05cadc, 0x05cb58, 0x05cbd4, 0x05cc50, 0x05cccc, 0x05cd48, 0x05cdc4, 0x05ce40, 0x05cee4, 0x05cf60, 0x05d004, 0x05d080, 0x05d124, 0x05d1a0, 0x05d244, 0x05d2c0, 0x05d33c, 0x05d3b8, 0x05d434, 0x05d4b0, 0x05d52c, 0x05d5a8, 0x05d624, 0x05d6a0, 0x05d744, 0x05d7c0, 0x05d864, 0x05d8e0, 0x05d984, 0x05da00, 0x05daa4, 0x05db20, 0x05db9c, 0x05dc18, 0x05dc94, 0x05dd10, 0x05dd8c, 0x05de08, 0x05de84, 0x05df00, 0x05dfa4, 0x05e020, 0x05e0c4, 0x05e140, 0x05e1e4, 0x05e260, 0x05e304, 0x05e380, 0x05e3fc, 0x05e478, 0x05e4f4, 0x05e570, 0x05e5ec, 0x05e668, 0x05e6e4, 0x05e760, 0x05e804, 0x05e880, 0x05e924, 0x05e9a0, 0x05ea44, 0x05eac0, 0x05eb64, 0x05ebe0, 0x05ec5c, 0x05ecd8, 0x05ed54, 0x05edd0, 0x05ee4c, 0x05eec8, 0x05ef44, 0x05efc0, 0x05f064, 0x05f0e0, 0x05f184, 0x05f200, 0x05f2a4, 0x05f320, 0x05f3c4, 0x05f440, 0x05f4bc, 0x05f538, 0x05f5b4, 0x05f630, 0x05f6ac, 0x05f728, 0x05f7a4, 0x05f820, 0x05f8c4, 0x05f940, 0x05f9e4, 0x05fa60, 0x05fb04, 0x05fb80, 0x05fc24, 0x05fca0, 0x05fd1c, 0x05fd98, 0x05fe14, 0x05fe90, 0x05ff0c, 0x05ff88, 0x060004, 0x060080, 0x060124, 0x0601a0, 0x060244, 0x0602c0, 0x060364, 0x0603e0, 0x060484, 0x060500, 0x06057c, 0x0605f8, 0x060674, 0x0606f0, 0x06076c, 0x0607e8, 0x060864, 0x0608e0, 0x060984, 0x060a00, 0x060aa4, 0x060b20, 0x060bc4, 0x060c40, 0x060ce4, 0x060d60, 0x060ddc, 0x060e58, 0x060ed4, 0x060f50, 0x060fcc, 0x061048, 0x0610c4, 0x061140, 0x0611e4, 0x061260, 0x061304, 0x061380, 0x061424, 0x0614a0, 0x061544, 0x0615c0, 0x06163c, 0x0616b8, 0x061734, 0x0617b0, 0x06182c, 0x0618a8, 0x061924, 0x0619a0, 0x061a44, 0x061ac0, 0x061b64, 0x061be0, 0x061c84, 0x061d00, 0x061da4, 0x061e20, 0x061e9c, 0x061f18, 0x061f94, 0x062010, 0x06208c, 0x062108, 0x062184, 0x062200, 0x0622a4, 0x062320, 0x0623c4, 0x062440, 0x0624e4, 0x062560, 0x062604, 0x062680, 0x0626fc, 0x062778, 0x0627f4, 0x062870, 0x0628ec, 0x062968, 0x0629e4, 0x062a60, 0x062b04, 0x062b80, 0x062c24, 0x062ca0, 0x062d44, 0x062dc0, 0x062e64, 0x062ee0, 0x062f5c, 0x062fd8, 0x063054, 0x0630d0, 0x06314c, 0x0631c8, 0x063244, 0x0632c0, 0x063364, 0x0633e0, 0x063484, 0x063500, 0x0635a4, 0x063620, 0x0636c4, 0x063740, 0x0637bc, 0x063838, 0x0638b4, 0x063930, 0x0639ac, 0x063a28, 0x063aa4, 0x063b20, 0x063bc4, 0x063c40, 0x063ce4, 0x063d60, 0x063e04, 0x063e80, 0x063f24, 0x063fa0, 0x06401c, 0x064098, 0x064114, 0x064190, 0x06420c, 0x064288, 0x064304, 0x064380, 0x064424, 0x0644a0, 0x064544, 0x0645c0, 0x064664, 0x0646e0, 0x064784, 0x064800, 0x06487c, 0x0648f8, 0x064974, 0x0649f0, 0x064a6c, 0x064ae8, 0x064b64, 0x064be0, 0x064c5c, 0x064cd8, 0x064d54, 0x064dd0, 0x064e4c, 0x064ec8, 0x064f44, 0x064fc0, 0x06503c, 0x0650b8, 0x065134, 0x0651b0, 0x06522c, 0x0652a8, 0x065324, 0x0653a0, 0x06541c, 0x065498, 0x065514, 0x065590, 0x06560c, 0x065688, 0x065704, 0x065780, 0x0657fc, 0x065878, 0x0658f4, 0x065970, 0x0659ec, 0x065a68, 0x065ae4, 0x065b60, 0x065bdc, 0x065c58, 0x065cd4, 0x065d50, 0x065dcc, 0x065e48, 0x065ec4, 0x065f40, 0x065fbc, 0x066038, 0x0660b4, 0x066130, 0x0661ac, 0x066228, 0x0662a4, 0x066320, 0x06639c, 0x066418, 0x066494, 0x066510, 0x06658c, 0x066608, 0x066684, 0x066700, 0x06677c, 0x0667f8, 0x066874, 0x0668f0, 0x06696c, 0x0669e8, 0x066a64, 0x066ae0, 0x066b5c, 0x066bd8, 0x066c54, 0x066cd0, 0x066d4c, 0x066dc8, 0x066e44, 0x066ec0, 0x066f3c, 0x066fb8, 0x067034, 0x0670b0, 0x06712c, 0x0671a8, 0x067224, 0x0672a0, 0x06731c, 0x067398, 0x067414, 0x067490, 0x06750c, 0x067588, 0x067604, 0x067680, 0x0676fc, 0x067778, 0x0677f4, 0x067870, 0x0678ec, 0x067968, 0x0679e4, 0x067a60, 0x067adc, 0x067b58, 0x067bd4, 0x067c50, 0x067ccc, 0x067d48, 0x067dc4, 0x067e40, 0x067ebc, 0x067f38, 0x067fb4, 0x068030, 0x0680ac, 0x068128, 0x0681a4, 0x068220, 0x06829c, 0x068318, 0x068394, 0x068410, 0x06848c, 0x068508, 0x068584, 0x068600, 0x06867c, 0x0686f8, 0x068774, 0x0687f0, 0x06886c, 0x0688e8, 0x068964, 0x0689e0, 0x068a5c, 0x068ad8, 0x068b54, 0x068bd0, 0x068c4c, 0x068cc8, 0x068d44, 0x068dc0, 0x068e3c, 0x068eb8, 0x068f34, 0x068fb0, 0x06902c, 0x0690a8, 0x069124, 0x0691a0, 0x06921c, 0x069298, 0x069314, 0x069390, 0x06940c, 0x069488, 0x069504, 0x069580, 0x0695fc, 0x069678, 0x0696f4, 0x069770, 0x0697ec, 0x069868, 0x0698e4, 0x069960, 0x0699dc, 0x069a58, 0x069ad4, 0x069b50, 0x069bcc, 0x069c48, 0x069cc4, 0x069d40, 0x069dbc, 0x069e38, 0x069eb4, 0x069f30, 0x069fac, 0x06a028, 0x06a0a4, 0x06a120, 0x06a19c, 0x06a218, 0x06a294, 0x06a310, 0x06a38c, 0x06a408, 0x06a484, 0x06a500, 0x06a57c, 0x06a5f8, 0x06a674, 0x06a6f0, 0x06a76c, 0x06a7e8, 0x06a864, 0x06a8e0, 0x06a95c, 0x06a9d8, 0x06aa54, 0x06aad0, 0x06ab4c, 0x06abc8, 0x06ac44, 0x06acc0, 0x06ad3c, 0x06adb8, 0x06ae34, 0x06aeb0, 0x06af2c, 0x06afa8, 0x06b024, 0x06b0a0, 0x06b11c, 0x06b198, 0x06b214, 0x06b290, 0x06b30c, 0x06b388, 0x06b404, 0x06b480, 0x06b4fc, 0x06b578, 0x06b5f4, 0x06b670, 0x06b6ec, 0x06b768, 0x06b7e4, 0x06b860, 0x06b8dc, 0x06b958, 0x06b9d4, 0x06ba50, 0x06bacc, 0x06bb48, 0x06bbc4, 0x06bc40, 0x06bcbc, 0x06bd38, 0x06bdb4, 0x06be30, 0x06beac, 0x06bf28, 0x06bfa4, 0x06c020, 0x06c09c, 0x06c118, 0x06c194, 0x06c210, 0x06c28c, 0x06c308, 0x06c384, 0x06c400, 0x06c47c, 0x06c4f8, 0x06c574, 0x06c5f0, 0x06c66c, 0x06c6e8, 0x06c764, 0x06c7e0, 0x06c85c, 0x06c8d8, 0x06c954, 0x06c9d0, 0x06ca4c, 0x06cac8, 0x06cb44, 0x06cbc0, 0x06cc3c, 0x06ccb8, 0x06cd34, 0x06cdb0, 0x06ce2c, 0x06cea8, 0x06cf24, 0x06cfa0, 0x06d01c, 0x06d098, 0x06d114, 0x06d190, 0x06d20c, 0x06d288, 0x06d304, 0x06d380, 0x06d3fc, 0x06d478, 0x06d4f4, 0x06d570, 0x06d5ec, 0x06d668, 0x06d6e4, 0x06d760, 0x06d7dc, 0x06d858, 0x06d8d4, 0x06d950, 0x06d9cc, 0x06da48, 0x06dac4, 0x06db40, 0x06dbbc, 0x06dc38, 0x06dcb4, 0x06dd30, 0x06ddac, 0x06de28, 0x06dea4, 0x06df20, 0x06df9c, 0x06e018, 0x06e094, 0x06e110, 0x06e18c, 0x06e208, 0x06e284, 0x06e300, 0x06e37c, 0x06e3f8, 0x06e474, 0x06e4f0, 0x06e56c, 0x06e5e8, 0x06e664, 0x06e6e0, 0x06e75c, 0x06e7d8, 0x06e854, 0x06e8d0, 0x06e94c, 0x06e9c8, 0x06ea44, 0x06eac0, 0x06eb3c, 0x06ebb8, 0x06ec34, 0x06ecb0, 0x06ed2c, 0x06eda8, 0x06ee24, 0x06eea0, 0x06ef1c, 0x06ef98, 0x06f014, 0x06f090, 0x06f10c, 0x06f188, 0x06f204, 0x06f280, 0x06f2fc, 0x06f378, 0x06f3f4, 0x06f470, 0x06f4ec, 0x06f568, 0x06f5e4, 0x06f660, 0x06f6dc, 0x06f758, 0x06f7d4, 0x06f850, 0x06f8cc, 0x06f948, 0x06f9c4, 0x06fa40, 0x06fabc, 0x06fb38, 0x06fbb4, 0x06fc30, 0x06fcac, 0x06fd28, 0x06fda4, 0x06fe20, 0x06fe9c, 0x06ff18, 0x06ff94, 0x070010, 0x07008c, 0x070108, 0x070184, 0x070200, 0x07027c, 0x0702f8, 0x070374, 0x0703f0, 0x07046c, 0x0704e8, 0x070564, 0x0705e0, 0x07065c, 0x0706d8, 0x070754, 0x0707d0, 0x07084c, 0x0708c8, 0x070944, 0x0709c0, 0x070a3c, 0x070ab8, 0x070b34, 0x070bb0, 0x070c2c, 0x070ca8, 0x070d24, 0x070da0, 0x070e1c, 0x070e98, 0x070f14, 0x070f90, 0x07100c, 0x071088, 0x071104, 0x071180, 0x0711fc, 0x071278, 0x0712f4, 0x071370, 0x0713ec, 0x071468, 0x0714e4, 0x071560, 0x0715dc, 0x071658, 0x0716d4, 0x071750, 0x0717cc, 0x071848, 0x0718c4, 0x071940, 0x0719bc, 0x071a38, 0x071ab4, 0x071b30, 0x071bac, 0x071c28, 0x071ca4, 0x071d20, 0x071d9c, 0x071e18, 0x071e94, 0x071f10, 0x071f8c, 0x072008, 0x072084, 0x072100, 0x07217c, 0x0721f8, 0x072274, 0x0722f0, 0x07236c, 0x0723e8, 0x072464, 0x0724e0, 0x07255c, 0x0725d8, 0x072654, 0x0726d0, 0x07274c, 0x0727c8, 0x072844, 0x0728c0, 0x07293c, 0x0729b8, 0x072a34, 0x072ab0, 0x072b2c, 0x072ba8, 0x072c24, 0x072ca0, 0x072d1c, 0x072d98, 0x072e14, 0x072e90, 0x072f0c, 0x072f88, 0x073004, 0x073080, 0x0730fc, 0x073178, 0x0731f4, 0x073270, 0x0732ec, 0x073368, 0x0733e4, 0x073460, 0x0734dc, 0x073558, 0x0735d4, 0x073650, 0x0736cc, 0x073748, 0x0737c4, 0x073840, 0x0738bc, 0x073938, 0x0739b4, 0x073a30, 0x073aac, 0x073b28, 0x073ba4, 0x073c20, 0x073c9c, 0x073d18, 0x073d94, 0x073e10, 0x073e8c, 0x073f08, 0x073f84, 0x074000, 0x07407c, 0x0740f8, 0x074174, 0x0741f0, 0x07426c, 0x0742e8, 0x074364, 0x0743e0, 0x07445c, 0x0744d8, 0x074554, 0x0745d0, 0x07464c, 0x0746c8, 0x074744, 0x0747c0, 0x07483c, 0x0748b8, 0x074934, 0x0749b0, 0x074a2c, 0x074aa8, 0x074b24, 0x074ba0, 0x074c1c, 0x074c98, 0x074d14, 0x074d90, 0x074e0c, 0x074e88, 0x074f04, 0x074f80, 0x075024, 0x0750c8, 0x07516c, 0x075210, 0x0752b4, 0x075358, 0x0753fc, 0x0754a0, 0x075544, 0x0755e8, 0x07568c, 0x075730, 0x0757d4, 0x075878, 0x07591c, 0x0759c0, 0x075a64, 0x075b08, 0x075bac, 0x075c50, 0x075cf4, 0x075d98, 0x075e3c, 0x075ee0, 0x075f84, 0x076028, 0x0760cc, 0x076170, 0x076214, 0x0762b8, 0x07635c, 0x076400, 0x07647c, 0x0764f8, 0x076574, 0x0765f0, 0x07666c, 0x0766e8, 0x076764, 0x0767e0, 0x07685c, 0x0768d8, 0x076954, 0x0769d0, 0x076a4c, 0x076ac8, 0x076b44, 0x076bc0, 0x076c3c, 0x076cb8, 0x076d34, 0x076db0, 0x076e2c, 0x076ea8, 0x076f24, 0x076fa0, 0x07701c, 0x077098, 0x077114, 0x077190, 0x07720c, 0x077288, 0x077304, 0x077380, 0x077424, 0x0774c8, 0x07756c, 0x077610, 0x0776b4, 0x077758, 0x0777fc, 0x0778a0, 0x077944, 0x0779e8, 0x077a8c, 0x077b30, 0x077bd4, 0x077c78, 0x077d1c, 0x077dc0, 0x077e64, 0x077f08, 0x077fac, 0x078050, 0x0780f4, 0x078198, 0x07823c, 0x0782e0, 0x078384, 0x078428, 0x0784cc, 0x078570, 0x078614, 0x0786b8, 0x07875c, 0x078800, 0x07887c, 0x0788f8, 0x078974, 0x0789f0, 0x078a6c, 0x078ae8, 0x078b64, 0x078be0, 0x078c5c, 0x078cd8, 0x078d54, 0x078dd0, 0x078e4c, 0x078ec8, 0x078f44, 0x078fc0, 0x07903c, 0x0790b8, 0x079134, 0x0791b0, 0x07922c, 0x0792a8, 0x079324, 0x0793a0, 0x07941c, 0x079498, 0x079514, 0x079590, 0x07960c, 0x079688, 0x079704, 0x079780, 0x079824, 0x0798c8, 0x07996c, 0x079a10, 0x079ab4, 0x079b58, 0x079bfc, 0x079ca0, 0x079d44, 0x079de8, 0x079e8c, 0x079f30, 0x079fd4, 0x07a078, 0x07a11c, 0x07a1c0, 0x07a264, 0x07a308, 0x07a3ac, 0x07a450, 0x07a4f4, 0x07a598, 0x07a63c, 0x07a6e0, 0x07a784, 0x07a828, 0x07a8cc, 0x07a970, 0x07aa14, 0x07aab8, 0x07ab5c, 0x07ac00, 0x07ac7c, 0x07acf8, 0x07ad74, 0x07adf0, 0x07ae6c, 0x07aee8, 0x07af64, 0x07afe0, 0x07b05c, 0x07b0d8, 0x07b154, 0x07b1d0, 0x07b24c, 0x07b2c8, 0x07b344, 0x07b3c0, 0x07b43c, 0x07b4b8, 0x07b534, 0x07b5b0, 0x07b62c, 0x07b6a8, 0x07b724, 0x07b7a0, 0x07b81c, 0x07b898, 0x07b914, 0x07b990, 0x07ba0c, 0x07ba88, 0x07bb04, 0x07bb80, 0x07bc24, 0x07bcc8, 0x07bd6c, 0x07be10, 0x07beb4, 0x07bf58, 0x07bffc, 0x07c0a0, 0x07c144, 0x07c1e8, 0x07c28c, 0x07c330, 0x07c3d4, 0x07c478, 0x07c51c, 0x07c5c0, 0x07c664, 0x07c708, 0x07c7ac, 0x07c850, 0x07c8f4, 0x07c998, 0x07ca3c, 0x07cae0, 0x07cb84, 0x07cc28, 0x07cccc, 0x07cd70, 0x07ce14, 0x07ceb8, 0x07cf5c, 0x07d000, 0x07d07c, 0x07d0f8, 0x07d174, 0x07d1f0, 0x07d26c, 0x07d2e8, 0x07d364, 0x07d3e0, 0x07d45c, 0x07d4d8, 0x07d554, 0x07d5d0, 0x07d64c, 0x07d6c8, 0x07d744, 0x07d7c0, 0x07d83c, 0x07d8b8, 0x07d934, 0x07d9b0, 0x07da2c, 0x07daa8, 0x07db24, 0x07dba0, 0x07dc1c, 0x07dc98, 0x07dd14, 0x07dd90, 0x07de0c, 0x07de88, 0x07df04, 0x07df80, 0x07e024, 0x07e0c8, 0x07e16c, 0x07e210, 0x07e2b4, 0x07e358, 0x07e3fc, 0x07e4a0, 0x07e544, 0x07e5e8, 0x07e68c, 0x07e730, 0x07e7d4, 0x07e878, 0x07e91c, 0x07e9c0, 0x07ea64, 0x07eb08, 0x07ebac, 0x07ec50, 0x07ecf4, 0x07ed98, 0x07ee3c, 0x07eee0, 0x07ef84, 0x07f028, 0x07f0cc, 0x07f170, 0x07f214, 0x07f2b8, 0x07f35c, 0x07f400, 0x07f47c, 0x07f4f8, 0x07f574, 0x07f5f0, 0x07f66c, 0x07f6e8, 0x07f764, 0x07f7e0, 0x07f85c, 0x07f8d8, 0x07f954, 0x07f9d0, 0x07fa4c, 0x07fac8, 0x07fb44, 0x07fbc0, 0x07fc3c, 0x07fcb8, 0x07fd34, 0x07fdb0, 0x07fe2c, 0x07fea8, 0x07ff24, 0x07ffa0, 0x08001c, 0x080098, 0x080114, 0x080190, 0x08020c, 0x080288, 0x080304, 0x080380, 0x080424, 0x0804c8, 0x08056c, 0x080610, 0x0806b4, 0x080758, 0x0807fc, 0x0808a0, 0x080944, 0x0809e8, 0x080a8c, 0x080b30, 0x080bd4, 0x080c78, 0x080d1c, 0x080dc0, 0x080e64, 0x080f08, 0x080fac, 0x081050, 0x0810f4, 0x081198, 0x08123c, 0x0812e0, 0x081384, 0x081428, 0x0814cc, 0x081570, 0x081614, 0x0816b8, 0x08175c, 0x081800, 0x08187c, 0x0818f8, 0x081974, 0x0819f0, 0x081a6c, 0x081ae8, 0x081b64, 0x081be0, 0x081c5c, 0x081cd8, 0x081d54, 0x081dd0, 0x081e4c, 0x081ec8, 0x081f44, 0x081fc0, 0x08203c, 0x0820b8, 0x082134, 0x0821b0, 0x08222c, 0x0822a8, 0x082324, 0x0823a0, 0x08241c, 0x082498, 0x082514, 0x082590, 0x08260c, 0x082688, 0x082704, 0x082780, 0x082824, 0x0828c8, 0x08296c, 0x082a10, 0x082ab4, 0x082b58, 0x082bfc, 0x082ca0, 0x082d44, 0x082de8, 0x082e8c, 0x082f30, 0x082fd4, 0x083078, 0x08311c, 0x0831c0, 0x083264, 0x083308, 0x0833ac, 0x083450, 0x0834f4, 0x083598, 0x08363c, 0x0836e0, 0x083784, 0x083828, 0x0838cc, 0x083970, 0x083a14, 0x083ab8, 0x083b5c, 0x083c00, 0x083c7c, 0x083cf8, 0x083d74, 0x083df0, 0x083e6c, 0x083ee8, 0x083f64, 0x083fe0, 0x08405c, 0x0840d8, 0x084154, 0x0841d0, 0x08424c, 0x0842c8, 0x084344, 0x0843c0, 0x08443c, 0x0844b8, 0x084534, 0x0845b0, 0x08462c, 0x0846a8, 0x084724, 0x0847a0, 0x08481c, 0x084898, 0x084914, 0x084990, 0x084a0c, 0x084a88, 0x084b04, 0x084b80, 0x084c24, 0x084cc8, 0x084d6c, 0x084e10, 0x084eb4, 0x084f58, 0x084ffc, 0x0850a0, 0x085144, 0x0851e8, 0x08528c, 0x085330, 0x0853d4, 0x085478, 0x08551c, 0x0855c0, 0x085664, 0x085708, 0x0857ac, 0x085850, 0x0858f4, 0x085998, 0x085a3c, 0x085ae0, 0x085b84, 0x085c28, 0x085ccc, 0x085d70, 0x085e14, 0x085eb8, 0x085f5c, 0x086000, 0x08607c, 0x0860f8, 0x086174, 0x0861f0, 0x08626c, 0x0862e8, 0x086364, 0x0863e0, 0x08645c, 0x0864d8, 0x086554, 0x0865d0, 0x08664c, 0x0866c8, 0x086744, 0x0867c0, 0x08683c, 0x0868b8, 0x086934, 0x0869b0, 0x086a2c, 0x086aa8, 0x086b24, 0x086ba0, 0x086c1c, 0x086c98, 0x086d14, 0x086d90, 0x086e0c, 0x086e88, 0x086f04, 0x086f80, 0x086ffc, 0x087078, 0x0870f4, 0x087170, 0x0871ec, 0x087268, 0x0872e4, 0x087360, 0x0873dc, 0x087458, 0x0874d4, 0x087550, 0x0875cc, 0x087648, 0x0876c4, 0x087740, 0x0877bc, 0x087838, 0x0878b4, 0x087930, 0x0879ac, 0x087a28, 0x087aa4, 0x087b20, 0x087b9c, 0x087c18, 0x087c94, 0x087d10, 0x087d8c, 0x087e08, 0x087e84, 0x087f00, 0x087f7c, 0x087ff8, 0x088074, 0x0880f0, 0x08816c, 0x0881e8, 0x088264, 0x0882e0, 0x08835c, 0x0883d8, 0x088454, 0x0884d0, 0x08854c, 0x0885c8, 0x088644, 0x0886c0, 0x08873c, 0x0887b8, 0x088834, 0x0888b0, 0x08892c, 0x0889a8, 0x088a24, 0x088aa0, 0x088b1c, 0x088b98, 0x088c14, 0x088c90, 0x088d0c, 0x088d88, 0x088e04, 0x088e80, 0x088efc, 0x088f78, 0x088ff4, 0x089070, 0x0890ec, 0x089168, 0x0891e4, 0x089260, 0x0892dc, 0x089358, 0x0893d4, 0x089450, 0x0894cc, 0x089548, 0x0895c4, 0x089640, 0x0896bc, 0x089738, 0x0897b4, 0x089830, 0x0898ac, 0x089928, 0x0899a4, 0x089a20, 0x089a9c, 0x089b18, 0x089b94, 0x089c10, 0x089c8c, 0x089d08, 0x089d84, 0x089e00, 0x089e7c, 0x089ef8, 0x089f74, 0x089ff0, 0x08a06c, 0x08a0e8, 0x08a164, 0x08a1e0, 0x08a25c, 0x08a2d8, 0x08a354, 0x08a3d0, 0x08a44c, 0x08a4c8, 0x08a544, 0x08a5c0, 0x08a63c, 0x08a6b8, 0x08a734, 0x08a7b0, 0x08a82c, 0x08a8a8, 0x08a924, 0x08a9a0, 0x08aa1c, 0x08aa98, 0x08ab14, 0x08ab90, 0x08ac0c, 0x08ac88, 0x08ad04, 0x08ad80, 0x08adfc, 0x08ae78, 0x08aef4, 0x08af70, 0x08afec, 0x08b068, 0x08b0e4, 0x08b160, 0x08b1dc, 0x08b258, 0x08b2d4, 0x08b350, 0x08b3cc, 0x08b448, 0x08b4c4, 0x08b540, 0x08b5bc, 0x08b638, 0x08b6b4, 0x08b730, 0x08b7ac, 0x08b828, 0x08b8a4, 0x08b920, 0x08b99c, 0x08ba18, 0x08ba94, 0x08bb10, 0x08bb8c, 0x08bc08, 0x08bc84, 0x08bd00, 0x08bd7c, 0x08bdf8, 0x08be74, 0x08bef0, 0x08bf6c, 0x08bfe8, 0x08c064, 0x08c0e0, 0x08c15c, 0x08c1d8, 0x08c254, 0x08c2d0, 0x08c34c, 0x08c3c8, 0x08c444, 0x08c4c0, 0x08c53c, 0x08c5b8, 0x08c634, 0x08c6b0, 0x08c72c, 0x08c7a8, 0x08c824, 0x08c8a0, 0x08c91c, 0x08c998, 0x08ca14, 0x08ca90, 0x08cb0c, 0x08cb88, 0x08cc04, 0x08cc80, 0x08ccfc, 0x08cd78, 0x08cdf4, 0x08ce70, 0x08ceec, 0x08cf68, 0x08cfe4, 0x08d060, 0x08d0dc, 0x08d158, 0x08d1d4, 0x08d250, 0x08d2cc, 0x08d348, 0x08d3c4, 0x08d440, 0x08d4bc, 0x08d538, 0x08d5b4, 0x08d630, 0x08d6ac, 0x08d728, 0x08d7a4, 0x08d820, 0x08d89c, 0x08d918, 0x08d994, 0x08da10, 0x08da8c, 0x08db08, 0x08db84, 0x08dc00, 0x08dca4, 0x08dd20, 0x08ddc4, 0x08de40, 0x08dee4, 0x08df60, 0x08e004, 0x08e080, 0x08e124, 0x08e1a0, 0x08e244, 0x08e2c0, 0x08e364, 0x08e3e0, 0x08e484, 0x08e500, 0x08e5a4, 0x08e620, 0x08e6c4, 0x08e740, 0x08e7e4, 0x08e860, 0x08e904, 0x08e980, 0x08ea24, 0x08eaa0, 0x08eb44, 0x08ebc0, 0x08ec64, 0x08ece0, 0x08ed84, 0x08ee00, 0x08eea4, 0x08ef20, 0x08efc4, 0x08f040, 0x08f0e4, 0x08f160, 0x08f204, 0x08f280, 0x08f324, 0x08f3a0, 0x08f444, 0x08f4c0, 0x08f564, 0x08f5e0, 0x08f684, 0x08f700, 0x08f7a4, 0x08f820, 0x08f8c4, 0x08f940, 0x08f9e4, 0x08fa60, 0x08fb04, 0x08fb80, 0x08fc24, 0x08fca0, 0x08fd44, 0x08fdc0, 0x08fe64, 0x08fee0, 0x08ff84, 0x090000, 0x0900a4, 0x090120, 0x0901c4, 0x090240, 0x0902e4, 0x090360, 0x090404, 0x090480, 0x090524, 0x0905a0, 0x090644, 0x0906c0, 0x090764, 0x0907e0, 0x090884, 0x090900, 0x0909a4, 0x090a20, 0x090ac4, 0x090b40, 0x090be4, 0x090c60, 0x090d04, 0x090d80, 0x090e24, 0x090ea0, 0x090f44, 0x090fc0, 0x091064, 0x0910e0, 0x091184, 0x091200, 0x0912a4, 0x091320, 0x0913c4, 0x091440, 0x0914e4, 0x091560, 0x091604, 0x091680, 0x091724, 0x0917a0, 0x091844, 0x0918c0, 0x091964, 0x0919e0, 0x091a84, 0x091b00, 0x091ba4, 0x091c20, 0x091cc4, 0x091d40, 0x091de4, 0x091e60, 0x091f04, 0x091f80, 0x092024, 0x0920a0, 0x092144, 0x0921c0, 0x092264, 0x0922e0, 0x092384, 0x092400, 0x0924a4, 0x092520, 0x0925c4, 0x092640, 0x0926e4, 0x092760, 0x092804, 0x092880, 0x092924, 0x0929a0, 0x092a44, 0x092ac0, 0x092b64, 0x092be0, 0x092c84, 0x092d00, 0x092da4, 0x092e20, 0x092ec4, 0x092f40, 0x092fe4, 0x093060, 0x093104, 0x093180, 0x093224, 0x0932a0, 0x093344, 0x0933c0, 0x093464, 0x0934e0, 0x093584, 0x093600, 0x0936a4, 0x093720, 0x0937c4, 0x093840, 0x0938e4, 0x093960, 0x093a04, 0x093a80, 0x093b24, 0x093ba0, 0x093c44, 0x093cc0, 0x093d64, 0x093de0, 0x093e84, 0x093f00, 0x093fa4, 0x094020, 0x0940c4, 0x094140, 0x0941e4, 0x094260, 0x094304, 0x094380, 0x094424, 0x0944a0, 0x094544, 0x0945c0, 0x094664, 0x0946e0, 0x094784, 0x094800, 0x0948a4, 0x094920, 0x0949c4, 0x094a40, 0x094ae4, 0x094b60, 0x094c04, 0x094c80, 0x094d24, 0x094da0, 0x094e44, 0x094ec0, 0x094f64, 0x094fe0, 0x095084, 0x095100, 0x0951a4, 0x095220, 0x0952c4, 0x095340, 0x0953e4, 0x095460, 0x095504, 0x095580, 0x095624, 0x0956a0, 0x095744, 0x0957c0, 0x095864, 0x0958e0, 0x095984, 0x095a00, 0x095aa4, 0x095b20, 0x095bc4, 0x095c40, 0x095ce4, 0x095d60, 0x095e04, 0x095e80, 0x095f24, 0x095fa0, 0x096044, 0x0960c0, 0x096164, 0x0961e0, 0x096284, 0x096300, 0x0963a4, 0x096420, 0x0964c4, 0x096540, 0x0965e4, 0x096660, 0x096704, 0x096780, 0x096824, 0x0968a0, 0x096944, 0x0969c0, 0x096a64, 0x096ae0, 0x096b84, 0x096c00, 0x096c7c, 0x096cf8, 0x096d74, 0x096df0, 0x096e6c, 0x096ee8, 0x096f64, 0x096fe0, 0x09705c, 0x0970d8, 0x097154, 0x0971d0, 0x09724c, 0x0972c8, 0x097344, 0x0973c0, 0x09743c, 0x0974b8, 0x097534, 0x0975b0, 0x09762c, 0x0976a8, 0x097724, 0x0977a0, 0x09781c, 0x097898, 0x097914, 0x097990, 0x097a0c, 0x097a88, 0x097b04, 0x097b80, 0x097bfc, 0x097c78, 0x097cf4, 0x097d70, 0x097dec, 0x097e68, 0x097ee4, 0x097f60, 0x097fdc, 0x098058, 0x0980d4, 0x098150, 0x0981cc, 0x098248, 0x0982c4, 0x098340, 0x0983bc, 0x098438, 0x0984b4, 0x098530, 0x0985ac, 0x098628, 0x0986a4, 0x098720, 0x09879c, 0x098818, 0x098894, 0x098910, 0x09898c, 0x098a08, 0x098a84, 0x098b00, 0x098b7c, 0x098bf8, 0x098c74, 0x098cf0, 0x098d6c, 0x098de8, 0x098e64, 0x098ee0, 0x098f5c, 0x098fd8, 0x099054, 0x0990d0, 0x09914c, 0x0991c8, 0x099244, 0x0992c0, 0x09933c, 0x0993b8, 0x099434, 0x0994b0, 0x09952c, 0x0995a8, 0x099624, 0x0996a0, 0x09971c, 0x099798, 0x099814, 0x099890, 0x09990c, 0x099988, 0x099a04, 0x099a80, 0x099afc, 0x099b78, 0x099bf4, 0x099c70, 0x099cec, 0x099d68, 0x099de4, 0x099e60, 0x099edc, 0x099f58, 0x099fd4, 0x09a050, 0x09a0cc, 0x09a148, 0x09a1c4, 0x09a240, 0x09a2bc, 0x09a338, 0x09a3b4, 0x09a430, 0x09a4ac, 0x09a528, 0x09a5a4, 0x09a620, 0x09a69c, 0x09a718, 0x09a794, 0x09a810, 0x09a88c, 0x09a908, 0x09a984, 0x09aa00, 0x09aa7c, 0x09aaf8, 0x09ab74, 0x09abf0, 0x09ac6c, 0x09ace8, 0x09ad64, 0x09ade0, 0x09ae5c, 0x09aed8, 0x09af54, 0x09afd0, 0x09b04c, 0x09b0c8, 0x09b144, 0x09b1c0, 0x09b23c, 0x09b2b8, 0x09b334, 0x09b3b0, 0x09b42c, 0x09b4a8, 0x09b524, 0x09b5a0, 0x09b61c, 0x09b698, 0x09b714, 0x09b790, 0x09b80c, 0x09b888, 0x09b904, 0x09b980, 0x09b9fc, 0x09ba78, 0x09baf4, 0x09bb70, 0x09bbec, 0x09bc68, 0x09bce4, 0x09bd60, 0x09bddc, 0x09be58, 0x09bed4, 0x09bf50, 0x09bfcc, 0x09c048, 0x09c0c4, 0x09c140, 0x09c1bc, 0x09c238, 0x09c2b4, 0x09c330, 0x09c3ac, 0x09c428, 0x09c4a4, 0x09c520, 0x09c59c, 0x09c618, 0x09c694, 0x09c710, 0x09c78c, 0x09c808, 0x09c884, 0x09c900, 0x09c97c, 0x09c9f8, 0x09ca74, 0x09caf0, 0x09cb6c, 0x09cbe8, 0x09cc64, 0x09cce0, 0x09cd5c, 0x09cdd8, 0x09ce54, 0x09ced0, 0x09cf4c, 0x09cfc8, 0x09d044, 0x09d0c0, 0x09d13c, 0x09d1b8, 0x09d234, 0x09d2b0, 0x09d32c, 0x09d3a8, 0x09d424, 0x09d4a0, 0x09d51c, 0x09d598, 0x09d614, 0x09d690, 0x09d70c, 0x09d788, 0x09d804, 0x09d880, 0x09d8fc, 0x09d978, 0x09d9f4, 0x09da70, 0x09daec, 0x09db68, 0x09dbe4, 0x09dc60, 0x09dcdc, 0x09dd58, 0x09ddd4, 0x09de50, 0x09decc, 0x09df48, 0x09dfc4, 0x09e040, 0x09e0bc, 0x09e138, 0x09e1b4, 0x09e230, 0x09e2ac, 0x09e328, 0x09e3a4, 0x09e420, 0x09e49c, 0x09e518, 0x09e594, 0x09e610, 0x09e68c, 0x09e708, 0x09e784, 0x09e800, 0x09e8a4, 0x09e920, 0x09e9c4, 0x09ea40, 0x09eae4, 0x09eb60, 0x09ec04, 0x09ec80, 0x09ed24, 0x09eda0, 0x09ee44, 0x09eec0, 0x09ef64, 0x09efe0, 0x09f084, 0x09f100, 0x09f1a4, 0x09f220, 0x09f2c4, 0x09f340, 0x09f3e4, 0x09f460, 0x09f504, 0x09f580, 0x09f624, 0x09f6a0, 0x09f744, 0x09f7c0, 0x09f864, 0x09f8e0, 0x09f984, 0x09fa00, 0x09faa4, 0x09fb20, 0x09fbc4, 0x09fc40, 0x09fce4, 0x09fd60, 0x09fe04, 0x09fe80, 0x09ff24, 0x09ffa0, 0x0a0044, 0x0a00c0, 0x0a0164, 0x0a01e0, 0x0a0284, 0x0a0300, 0x0a03a4, 0x0a0420, 0x0a04c4, 0x0a0540, 0x0a05e4, 0x0a0660, 0x0a0704, 0x0a0780, 0x0a0824, 0x0a08a0, 0x0a0944, 0x0a09c0, 0x0a0a64, 0x0a0ae0, 0x0a0b84, 0x0a0c00, 0x0a0ca4, 0x0a0d20, 0x0a0dc4, 0x0a0e40, 0x0a0ee4, 0x0a0f60, 0x0a1004, 0x0a1080, 0x0a1124, 0x0a11a0, 0x0a1244, 0x0a12c0, 0x0a1364, 0x0a13e0, 0x0a1484, 0x0a1500, 0x0a15a4, 0x0a1620, 0x0a16c4, 0x0a1740, 0x0a17e4, 0x0a1860, 0x0a1904, 0x0a1980, 0x0a1a24, 0x0a1aa0, 0x0a1b44, 0x0a1bc0, 0x0a1c64, 0x0a1ce0, 0x0a1d84, 0x0a1e00, 0x0a1ea4, 0x0a1f20, 0x0a1fc4, 0x0a2040, 0x0a20e4, 0x0a2160, 0x0a2204, 0x0a2280, 0x0a2324, 0x0a23a0, 0x0a2444, 0x0a24c0, 0x0a2564, 0x0a25e0, 0x0a2684, 0x0a2700, 0x0a27a4, 0x0a2820, 0x0a28c4, 0x0a2940, 0x0a29e4, 0x0a2a60, 0x0a2b04, 0x0a2b80, 0x0a2c24, 0x0a2ca0, 0x0a2d44, 0x0a2dc0, 0x0a2e64, 0x0a2ee0, 0x0a2f84, 0x0a3000, 0x0a30a4, 0x0a3120, 0x0a31c4, 0x0a3240, 0x0a32e4, 0x0a3360, 0x0a3404, 0x0a3480, 0x0a3524, 0x0a35a0, 0x0a3644, 0x0a36c0, 0x0a3764, 0x0a37e0, 0x0a3884, 0x0a3900, 0x0a39a4, 0x0a3a20, 0x0a3ac4, 0x0a3b40, 0x0a3be4, 0x0a3c60, 0x0a3d04, 0x0a3d80, 0x0a3e24, 0x0a3ea0, 0x0a3f44, 0x0a3fc0, 0x0a4064, 0x0a40e0, 0x0a4184, 0x0a4200, 0x0a42a4, 0x0a4320, 0x0a43c4, 0x0a4440, 0x0a44e4, 0x0a4560, 0x0a4604, 0x0a4680, 0x0a4724, 0x0a47a0, 0x0a4844, 0x0a48c0, 0x0a4964, 0x0a49e0, 0x0a4a84, 0x0a4b00, 0x0a4ba4, 0x0a4c20, 0x0a4cc4, 0x0a4d40, 0x0a4de4, 0x0a4e60, 0x0a4f04, 0x0a4f80, 0x0a5024, 0x0a50a0, 0x0a5144, 0x0a51c0, 0x0a5264, 0x0a52e0, 0x0a5384, 0x0a5400, 0x0a54a4, 0x0a5520, 0x0a55c4, 0x0a5640, 0x0a56e4, 0x0a5760, 0x0a5804, 0x0a5880, 0x0a5924, 0x0a59a0, 0x0a5a44, 0x0a5ac0, 0x0a5b64, 0x0a5be0, 0x0a5c84, 0x0a5d00, 0x0a5da4, 0x0a5e20, 0x0a5ec4, 0x0a5f40, 0x0a5fe4, 0x0a6060, 0x0a6104, 0x0a6180, 0x0a6224, 0x0a62a0, 0x0a6344, 0x0a63c0, 0x0a6464, 0x0a64e0, 0x0a6584, 0x0a6600, 0x0a66a4, 0x0a6720, 0x0a67c4, 0x0a6840, 0x0a68e4, 0x0a6960, 0x0a6a04, 0x0a6a80, 0x0a6b24, 0x0a6ba0, 0x0a6c44, 0x0a6cc0, 0x0a6d64, 0x0a6de0, 0x0a6e84, 0x0a6f00, 0x0a6fa4, 0x0a7020, 0x0a70c4, 0x0a7140, 0x0a71e4, 0x0a7260, 0x0a7304, 0x0a7380, 0x0a7424, 0x0a74a0, 0x0a7544, 0x0a75c0, 0x0a7664, 0x0a76e0, 0x0a7784, 0x0a7800, 0x0a787c, 0x0a78f8, 0x0a7974, 0x0a79f0, 0x0a7a6c, 0x0a7ae8, 0x0a7b64, 0x0a7be0, 0x0a7c5c, 0x0a7cd8, 0x0a7d54, 0x0a7dd0, 0x0a7e4c, 0x0a7ec8, 0x0a7f44, 0x0a7fc0, 0x0a8064, 0x0a80e0, 0x0a8184, 0x0a8200, 0x0a82a4, 0x0a8320, 0x0a83c4, 0x0a8440, 0x0a84e4, 0x0a8560, 0x0a8604, 0x0a8680, 0x0a8724, 0x0a87a0, 0x0a8844, 0x0a88c0, 0x0a893c, 0x0a89b8, 0x0a8a34, 0x0a8ab0, 0x0a8b2c, 0x0a8ba8, 0x0a8c24, 0x0a8ca0, 0x0a8d1c, 0x0a8d98, 0x0a8e14, 0x0a8e90, 0x0a8f0c, 0x0a8f88, 0x0a9004, 0x0a9080, 0x0a9124, 0x0a91a0, 0x0a9244, 0x0a92c0, 0x0a9364, 0x0a93e0, 0x0a9484, 0x0a9500, 0x0a95a4, 0x0a9620, 0x0a96c4, 0x0a9740, 0x0a97e4, 0x0a9860, 0x0a9904, 0x0a9980, 0x0a99fc, 0x0a9a78, 0x0a9af4, 0x0a9b70, 0x0a9bec, 0x0a9c68, 0x0a9ce4, 0x0a9d60, 0x0a9ddc, 0x0a9e58, 0x0a9ed4, 0x0a9f50, 0x0a9fcc, 0x0aa048, 0x0aa0c4, 0x0aa140, 0x0aa1e4, 0x0aa260, 0x0aa304, 0x0aa380, 0x0aa424, 0x0aa4a0, 0x0aa544, 0x0aa5c0, 0x0aa664, 0x0aa6e0, 0x0aa784, 0x0aa800, 0x0aa8a4, 0x0aa920, 0x0aa9c4, 0x0aaa40, 0x0aaabc, 0x0aab38, 0x0aabb4, 0x0aac30, 0x0aacac, 0x0aad28, 0x0aada4, 0x0aae20, 0x0aae9c, 0x0aaf18, 0x0aaf94, 0x0ab010, 0x0ab08c, 0x0ab108, 0x0ab184, 0x0ab200, 0x0ab2a4, 0x0ab320, 0x0ab3c4, 0x0ab440, 0x0ab4e4, 0x0ab560, 0x0ab604, 0x0ab680, 0x0ab724, 0x0ab7a0, 0x0ab844, 0x0ab8c0, 0x0ab964, 0x0ab9e0, 0x0aba84, 0x0abb00, 0x0abb7c, 0x0abbf8, 0x0abc74, 0x0abcf0, 0x0abd6c, 0x0abde8, 0x0abe64, 0x0abee0, 0x0abf5c, 0x0abfd8, 0x0ac054, 0x0ac0d0, 0x0ac14c, 0x0ac1c8, 0x0ac244, 0x0ac2c0, 0x0ac364, 0x0ac3e0, 0x0ac484, 0x0ac500, 0x0ac5a4, 0x0ac620, 0x0ac6c4, 0x0ac740, 0x0ac7e4, 0x0ac860, 0x0ac904, 0x0ac980, 0x0aca24, 0x0acaa0, 0x0acb44, 0x0acbc0, 0x0acc3c, 0x0accb8, 0x0acd34, 0x0acdb0, 0x0ace2c, 0x0acea8, 0x0acf24, 0x0acfa0, 0x0ad01c, 0x0ad098, 0x0ad114, 0x0ad190, 0x0ad20c, 0x0ad288, 0x0ad304, 0x0ad380, 0x0ad424, 0x0ad4a0, 0x0ad544, 0x0ad5c0, 0x0ad664, 0x0ad6e0, 0x0ad784, 0x0ad800, 0x0ad8a4, 0x0ad920, 0x0ad9c4, 0x0ada40, 0x0adae4, 0x0adb60, 0x0adc04, 0x0adc80, 0x0adcfc, 0x0add78, 0x0addf4, 0x0ade70, 0x0adeec, 0x0adf68, 0x0adfe4, 0x0ae060, 0x0ae0dc, 0x0ae158, 0x0ae1d4, 0x0ae250, 0x0ae2cc, 0x0ae348, 0x0ae3c4, 0x0ae440, 0x0ae4e4, 0x0ae560, 0x0ae604, 0x0ae680, 0x0ae724, 0x0ae7a0, 0x0ae844, 0x0ae8c0, 0x0ae964, 0x0ae9e0, 0x0aea84, 0x0aeb00, 0x0aeba4, 0x0aec20, 0x0aecc4, 0x0aed40, 0x0aedbc, 0x0aee38, 0x0aeeb4, 0x0aef30, 0x0aefac, 0x0af028, 0x0af0a4, 0x0af120, 0x0af19c, 0x0af218, 0x0af294, 0x0af310, 0x0af38c, 0x0af408, 0x0af484, 0x0af500, 0x0af5a4, 0x0af620, 0x0af6c4, 0x0af740, 0x0af7e4, 0x0af860, 0x0af904, 0x0af980, 0x0afa24, 0x0afaa0, 0x0afb44, 0x0afbc0, 0x0afc64, 0x0afce0, 0x0afd84, 0x0afe00, 0x0afe7c, 0x0afef8, 0x0aff74, 0x0afff0, 0x0b006c, 0x0b00e8, 0x0b0164, 0x0b01e0, 0x0b025c, 0x0b02d8, 0x0b0354, 0x0b03d0, 0x0b044c, 0x0b04c8, 0x0b0544, 0x0b05c0, 0x0b0664, 0x0b06e0, 0x0b0784, 0x0b0800, 0x0b08a4, 0x0b0920, 0x0b09c4, 0x0b0a40, 0x0b0ae4, 0x0b0b60, 0x0b0c04, 0x0b0c80, 0x0b0d24, 0x0b0da0, 0x0b0e44, 0x0b0ec0, 0x0b0f3c, 0x0b0fb8, 0x0b1034, 0x0b10b0, 0x0b112c, 0x0b11a8, 0x0b1224, 0x0b12a0, 0x0b131c, 0x0b1398, 0x0b1414, 0x0b1490, 0x0b150c, 0x0b1588, 0x0b1604, 0x0b1680, 0x0b1724, 0x0b17a0, 0x0b1844, 0x0b18c0, 0x0b1964, 0x0b19e0, 0x0b1a84, 0x0b1b00, 0x0b1ba4, 0x0b1c20, 0x0b1cc4, 0x0b1d40, 0x0b1de4, 0x0b1e60, 0x0b1f04, 0x0b1f80, 0x0b1ffc, 0x0b2078, 0x0b20f4, 0x0b2170, 0x0b21ec, 0x0b2268, 0x0b22e4, 0x0b2360, 0x0b23dc, 0x0b2458, 0x0b24d4, 0x0b2550, 0x0b25cc, 0x0b2648, 0x0b26c4, 0x0b2740, 0x0b27e4, 0x0b2860, 0x0b2904, 0x0b2980, 0x0b2a24, 0x0b2aa0, 0x0b2b44, 0x0b2bc0, 0x0b2c64, 0x0b2ce0, 0x0b2d84, 0x0b2e00, 0x0b2ea4, 0x0b2f20, 0x0b2fc4, 0x0b3040, 0x0b30bc, 0x0b3138, 0x0b31b4, 0x0b3230, 0x0b32ac, 0x0b3328, 0x0b33a4, 0x0b3420, 0x0b349c, 0x0b3518, 0x0b3594, 0x0b3610, 0x0b368c, 0x0b3708, 0x0b3784, 0x0b3800, 0x0b38a4, 0x0b3920, 0x0b39c4, 0x0b3a40, 0x0b3ae4, 0x0b3b60, 0x0b3c04, 0x0b3c80, 0x0b3d24, 0x0b3da0, 0x0b3e44, 0x0b3ec0, 0x0b3f64, 0x0b3fe0, 0x0b4084, 0x0b4100, 0x0b417c, 0x0b41f8, 0x0b4274, 0x0b42f0, 0x0b436c, 0x0b43e8, 0x0b4464, 0x0b44e0, 0x0b455c, 0x0b45d8, 0x0b4654, 0x0b46d0, 0x0b474c, 0x0b47c8, 0x0b4844, 0x0b48c0, 0x0b4964, 0x0b49e0, 0x0b4a84, 0x0b4b00, 0x0b4ba4, 0x0b4c20, 0x0b4cc4, 0x0b4d40, 0x0b4de4, 0x0b4e60, 0x0b4f04, 0x0b4f80, 0x0b5024, 0x0b50a0, 0x0b5144, 0x0b51c0, 0x0b523c, 0x0b52b8, 0x0b5334, 0x0b53b0, 0x0b542c, 0x0b54a8, 0x0b5524, 0x0b55a0, 0x0b561c, 0x0b5698, 0x0b5714, 0x0b5790, 0x0b580c, 0x0b5888, 0x0b5904, 0x0b5980, 0x0b5a24, 0x0b5aa0, 0x0b5b44, 0x0b5bc0, 0x0b5c64, 0x0b5ce0, 0x0b5d84, 0x0b5e00, 0x0b5ea4, 0x0b5f20, 0x0b5fc4, 0x0b6040, 0x0b60e4, 0x0b6160, 0x0b6204, 0x0b6280, 0x0b62fc, 0x0b6378, 0x0b63f4, 0x0b6470, 0x0b64ec, 0x0b6568, 0x0b65e4, 0x0b6660, 0x0b66dc, 0x0b6758, 0x0b67d4, 0x0b6850, 0x0b68cc, 0x0b6948, 0x0b69c4, 0x0b6a40, 0x0b6ae4, 0x0b6b60, 0x0b6c04, 0x0b6c80, 0x0b6d24, 0x0b6da0, 0x0b6e44, 0x0b6ec0, 0x0b6f64, 0x0b6fe0, 0x0b7084, 0x0b7100, 0x0b71a4, 0x0b7220, 0x0b72c4, 0x0b7340, 0x0b73bc, 0x0b7438, 0x0b74b4, 0x0b7530, 0x0b75ac, 0x0b7628, 0x0b76a4, 0x0b7720, 0x0b779c, 0x0b7818, 0x0b7894, 0x0b7910, 0x0b798c, 0x0b7a08, 0x0b7a84, 0x0b7b00, 0x0b7ba4, 0x0b7c20, 0x0b7cc4, 0x0b7d40, 0x0b7de4, 0x0b7e60, 0x0b7f04, 0x0b7f80, 0x0b8024, 0x0b80a0, 0x0b8144, 0x0b81c0, 0x0b8264, 0x0b82e0, 0x0b8384, 0x0b8400, 0x0b847c, 0x0b84f8, 0x0b8574, 0x0b85f0, 0x0b866c, 0x0b86e8, 0x0b8764, 0x0b87e0, 0x0b885c, 0x0b88d8, 0x0b8954, 0x0b89d0, 0x0b8a4c, 0x0b8ac8, 0x0b8b44, 0x0b8bc0, 0x0b8c64, 0x0b8ce0, 0x0b8d84, 0x0b8e00, 0x0b8ea4, 0x0b8f20, 0x0b8fc4, 0x0b9040, 0x0b90e4, 0x0b9160, 0x0b9204, 0x0b9280, 0x0b9324, 0x0b93a0, 0x0b9444, 0x0b94c0, 0x0b953c, 0x0b95b8, 0x0b9634, 0x0b96b0, 0x0b972c, 0x0b97a8, 0x0b9824, 0x0b98a0, 0x0b991c, 0x0b9998, 0x0b9a14, 0x0b9a90, 0x0b9b0c, 0x0b9b88, 0x0b9c04, 0x0b9c80, 0x0b9d24, 0x0b9da0, 0x0b9e44, 0x0b9ec0, 0x0b9f64, 0x0b9fe0, 0x0ba084, 0x0ba100, 0x0ba1a4, 0x0ba220, 0x0ba2c4, 0x0ba340, 0x0ba3e4, 0x0ba460, 0x0ba504, 0x0ba580, 0x0ba5fc, 0x0ba678, 0x0ba6f4, 0x0ba770, 0x0ba7ec, 0x0ba868, 0x0ba8e4, 0x0ba960, 0x0ba9dc, 0x0baa58, 0x0baad4, 0x0bab50, 0x0babcc, 0x0bac48, 0x0bacc4, 0x0bad40, 0x0bade4, 0x0bae60, 0x0baf04, 0x0baf80, 0x0bb024, 0x0bb0a0, 0x0bb144, 0x0bb1c0, 0x0bb264, 0x0bb2e0, 0x0bb384, 0x0bb400, 0x0bb4a4, 0x0bb520, 0x0bb5c4, 0x0bb640, 0x0bb6bc, 0x0bb738, 0x0bb7b4, 0x0bb830, 0x0bb8ac, 0x0bb928, 0x0bb9a4, 0x0bba20, 0x0bba9c, 0x0bbb18, 0x0bbb94, 0x0bbc10, 0x0bbc8c, 0x0bbd08, 0x0bbd84, 0x0bbe00, 0x0bbea4, 0x0bbf20, 0x0bbfc4, 0x0bc040, 0x0bc0e4, 0x0bc160, 0x0bc204, 0x0bc280, 0x0bc324, 0x0bc3a0, 0x0bc444, 0x0bc4c0, 0x0bc564, 0x0bc5e0, 0x0bc684, 0x0bc700, 0x0bc77c, 0x0bc7f8, 0x0bc874, 0x0bc8f0, 0x0bc96c, 0x0bc9e8, 0x0bca64, 0x0bcae0, 0x0bcb5c, 0x0bcbd8, 0x0bcc54, 0x0bccd0, 0x0bcd4c, 0x0bcdc8, 0x0bce44, 0x0bcec0, 0x0bcf64, 0x0bcfe0, 0x0bd084, 0x0bd100, 0x0bd1a4, 0x0bd220, 0x0bd2c4, 0x0bd340, 0x0bd3e4, 0x0bd460, 0x0bd504, 0x0bd580, 0x0bd624, 0x0bd6a0, 0x0bd744, 0x0bd7c0, 0x0bd83c, 0x0bd8b8, 0x0bd934, 0x0bd9b0, 0x0bda2c, 0x0bdaa8, 0x0bdb24, 0x0bdba0, 0x0bdc1c, 0x0bdc98, 0x0bdd14, 0x0bdd90, 0x0bde0c, 0x0bde88, 0x0bdf04, 0x0bdf80, 0x0be024, 0x0be0a0, 0x0be144, 0x0be1c0, 0x0be264, 0x0be2e0, 0x0be384, 0x0be400, 0x0be4a4, 0x0be520, 0x0be5c4, 0x0be640, 0x0be6e4, 0x0be760, 0x0be804, 0x0be880, 0x0be8fc, 0x0be978, 0x0be9f4, 0x0bea70, 0x0beaec, 0x0beb68, 0x0bebe4, 0x0bec60, 0x0becdc, 0x0bed58, 0x0bedd4, 0x0bee50, 0x0beecc, 0x0bef48, 0x0befc4, 0x0bf040, 0x0bf0e4, 0x0bf160, 0x0bf204, 0x0bf280, 0x0bf324, 0x0bf3a0, 0x0bf444, 0x0bf4c0, 0x0bf564, 0x0bf5e0, 0x0bf684, 0x0bf700, 0x0bf7a4, 0x0bf820, 0x0bf8c4, 0x0bf940, 0x0bf9bc, 0x0bfa38, 0x0bfab4, 0x0bfb30, 0x0bfbac, 0x0bfc28, 0x0bfca4, 0x0bfd20, 0x0bfd9c, 0x0bfe18, 0x0bfe94, 0x0bff10, 0x0bff8c, 0x0c0008, 0x0c0084, 0x0c0100, 0x0c01a4, 0x0c0220, 0x0c02c4, 0x0c0340, 0x0c03e4, 0x0c0460, 0x0c0504, 0x0c0580, 0x0c0624, 0x0c06a0, 0x0c0744, 0x0c07c0, 0x0c0864, 0x0c08e0, 0x0c0984, 0x0c0a00, 0x0c0a7c, 0x0c0af8, 0x0c0b74, 0x0c0bf0, 0x0c0c6c, 0x0c0ce8, 0x0c0d64, 0x0c0de0, 0x0c0e5c, 0x0c0ed8, 0x0c0f54, 0x0c0fd0, 0x0c104c, 0x0c10c8, 0x0c1144, 0x0c11c0, 0x0c1264, 0x0c12e0, 0x0c1384, 0x0c1400, 0x0c14a4, 0x0c1520, 0x0c15c4, 0x0c1640, 0x0c16e4, 0x0c1760, 0x0c1804, 0x0c1880, 0x0c1924, 0x0c19a0, 0x0c1a44, 0x0c1ac0, 0x0c1b3c, 0x0c1bb8, 0x0c1c34, 0x0c1cb0, 0x0c1d2c, 0x0c1da8, 0x0c1e24, 0x0c1ea0, 0x0c1f1c, 0x0c1f98, 0x0c2014, 0x0c2090, 0x0c210c, 0x0c2188, 0x0c2204, 0x0c2280, 0x0c2324, 0x0c23a0, 0x0c2444, 0x0c24c0, 0x0c2564, 0x0c25e0, 0x0c2684, 0x0c2700, 0x0c27a4, 0x0c2820, 0x0c28c4, 0x0c2940, 0x0c29e4, 0x0c2a60, 0x0c2b04, 0x0c2b80, 0x0c2bfc, 0x0c2c78, 0x0c2cf4, 0x0c2d70, 0x0c2dec, 0x0c2e68, 0x0c2ee4, 0x0c2f60, 0x0c2fdc, 0x0c3058, 0x0c30d4, 0x0c3150, 0x0c31cc, 0x0c3248, 0x0c32c4, 0x0c3340, 0x0c33e4, 0x0c3460, 0x0c3504, 0x0c3580, 0x0c3624, 0x0c36a0, 0x0c3744, 0x0c37c0, 0x0c3864, 0x0c38e0, 0x0c3984, 0x0c3a00, 0x0c3aa4, 0x0c3b20, 0x0c3bc4, 0x0c3c40, 0x0c3cbc, 0x0c3d38, 0x0c3db4, 0x0c3e30, 0x0c3eac, 0x0c3f28, 0x0c3fa4, 0x0c4020, 0x0c409c, 0x0c4118, 0x0c4194, 0x0c4210, 0x0c428c, 0x0c4308, 0x0c4384, 0x0c4400, 0x0c44a4, 0x0c4520, 0x0c45c4, 0x0c4640, 0x0c46e4, 0x0c4760, 0x0c4804, 0x0c4880, 0x0c4924, 0x0c49a0, 0x0c4a44, 0x0c4ac0, 0x0c4b64, 0x0c4be0, 0x0c4c84, 0x0c4d00, 0x0c4d7c, 0x0c4df8, 0x0c4e74, 0x0c4ef0, 0x0c4f6c, 0x0c4fe8, 0x0c5064, 0x0c50e0, 0x0c515c, 0x0c51d8, 0x0c5254, 0x0c52d0, 0x0c534c, 0x0c53c8, 0x0c5444, 0x0c54c0, 0x0c5564, 0x0c55e0, 0x0c5684, 0x0c5700, 0x0c57a4, 0x0c5820, 0x0c58c4, 0x0c5940, 0x0c59e4, 0x0c5a60, 0x0c5b04, 0x0c5b80, 0x0c5c24, 0x0c5ca0, 0x0c5d44, 0x0c5dc0, 0x0c5e3c, 0x0c5eb8, 0x0c5f34, 0x0c5fb0, 0x0c602c, 0x0c60a8, 0x0c6124, 0x0c61a0, 0x0c621c, 0x0c6298, 0x0c6314, 0x0c6390, 0x0c640c, 0x0c6488, 0x0c6504, 0x0c6580, 0x0c6624, 0x0c66a0, 0x0c6744, 0x0c67c0, 0x0c6864, 0x0c68e0, 0x0c6984, 0x0c6a00, 0x0c6aa4, 0x0c6b20, 0x0c6bc4, 0x0c6c40, 0x0c6ce4, 0x0c6d60, 0x0c6e04, 0x0c6e80, 0x0c6efc, 0x0c6f78, 0x0c6ff4, 0x0c7070, 0x0c70ec, 0x0c7168, 0x0c71e4, 0x0c7260, 0x0c72dc, 0x0c7358, 0x0c73d4, 0x0c7450, 0x0c74cc, 0x0c7548, 0x0c75c4, 0x0c7640, 0x0c76e4, 0x0c7760, 0x0c7804, 0x0c7880, 0x0c7924, 0x0c79a0, 0x0c7a44, 0x0c7ac0, 0x0c7b64, 0x0c7be0, 0x0c7c84, 0x0c7d00, 0x0c7da4, 0x0c7e20, 0x0c7ec4, 0x0c7f40, 0x0c7fbc, 0x0c8038, 0x0c80b4, 0x0c8130, 0x0c81ac, 0x0c8228, 0x0c82a4, 0x0c8320, 0x0c839c, 0x0c8418, 0x0c8494, 0x0c8510, 0x0c858c, 0x0c8608, 0x0c8684, 0x0c8700, 0x0c87a4, 0x0c8820, 0x0c88c4, 0x0c8940, 0x0c89e4, 0x0c8a60, 0x0c8b04, 0x0c8b80, 0x0c8c24, 0x0c8ca0, 0x0c8d44, 0x0c8dc0, 0x0c8e64, 0x0c8ee0, 0x0c8f84, 0x0c9000, 0x0c907c, 0x0c90f8, 0x0c9174, 0x0c91f0, 0x0c926c, 0x0c92e8, 0x0c9364, 0x0c93e0, 0x0c945c, 0x0c94d8, 0x0c9554, 0x0c95d0, 0x0c964c, 0x0c96c8, 0x0c9744, 0x0c97c0, 0x0c983c, 0x0c98b8, 0x0c9934, 0x0c99b0, 0x0c9a2c, 0x0c9aa8, 0x0c9b24, 0x0c9ba0, 0x0c9c1c, 0x0c9c98, 0x0c9d14, 0x0c9d90, 0x0c9e0c, 0x0c9e88, 0x0c9f04, 0x0c9f80, 0x0c9ffc, 0x0ca078, 0x0ca0f4, 0x0ca170, 0x0ca1ec, 0x0ca268, 0x0ca2e4, 0x0ca360, 0x0ca3dc, 0x0ca458, 0x0ca4d4, 0x0ca550, 0x0ca5cc, 0x0ca648, 0x0ca6c4, 0x0ca740, 0x0ca7bc, 0x0ca838, 0x0ca8b4, 0x0ca930, 0x0ca9ac, 0x0caa28, 0x0caaa4, 0x0cab20, 0x0cab9c, 0x0cac18, 0x0cac94, 0x0cad10, 0x0cad8c, 0x0cae08, 0x0cae84, 0x0caf00, 0x0caf7c, 0x0caff8, 0x0cb074, 0x0cb0f0, 0x0cb16c, 0x0cb1e8, 0x0cb264, 0x0cb2e0, 0x0cb35c, 0x0cb3d8, 0x0cb454, 0x0cb4d0, 0x0cb54c, 0x0cb5c8, 0x0cb644, 0x0cb6c0, 0x0cb73c, 0x0cb7b8, 0x0cb834, 0x0cb8b0, 0x0cb92c, 0x0cb9a8, 0x0cba24, 0x0cbaa0, 0x0cbb1c, 0x0cbb98, 0x0cbc14, 0x0cbc90, 0x0cbd0c, 0x0cbd88, 0x0cbe04, 0x0cbe80, 0x0cbefc, 0x0cbf78, 0x0cbff4, 0x0cc070, 0x0cc0ec, 0x0cc168, 0x0cc1e4, 0x0cc260, 0x0cc2dc, 0x0cc358, 0x0cc3d4, 0x0cc450, 0x0cc4cc, 0x0cc548, 0x0cc5c4, 0x0cc640, 0x0cc6bc, 0x0cc738, 0x0cc7b4, 0x0cc830, 0x0cc8ac, 0x0cc928, 0x0cc9a4, 0x0cca20, 0x0cca9c, 0x0ccb18, 0x0ccb94, 0x0ccc10, 0x0ccc8c, 0x0ccd08, 0x0ccd84, 0x0cce00, 0x0cce7c, 0x0ccef8, 0x0ccf9c, 0x0cd040, 0x0cd0bc, 0x0cd138, 0x0cd1dc, 0x0cd280, 0x0cd2fc, 0x0cd378, 0x0cd41c, 0x0cd4c0, 0x0cd53c, 0x0cd5b8, 0x0cd65c, 0x0cd700, 0x0cd77c, 0x0cd7f8, 0x0cd89c, 0x0cd940, 0x0cd9bc, 0x0cda38, 0x0cdadc, 0x0cdb80, 0x0cdbfc, 0x0cdc78, 0x0cdd1c, 0x0cddc0, 0x0cde3c, 0x0cdeb8, 0x0cdf5c, 0x0ce000, 0x0ce07c, 0x0ce0f8, 0x0ce19c, 0x0ce240, 0x0ce2bc, 0x0ce338, 0x0ce3dc, 0x0ce480, 0x0ce4fc, 0x0ce578, 0x0ce61c, 0x0ce6c0, 0x0ce73c, 0x0ce7b8, 0x0ce85c, 0x0ce900, 0x0ce97c, 0x0ce9f8, 0x0cea9c, 0x0ceb40, 0x0cebbc, 0x0cec38, 0x0cecdc, 0x0ced80, 0x0cedfc, 0x0cee78, 0x0cef1c, 0x0cefc0, 0x0cf03c, 0x0cf0b8, 0x0cf15c, 0x0cf200, 0x0cf27c, 0x0cf2f8, 0x0cf39c, 0x0cf440, 0x0cf4bc, 0x0cf538, 0x0cf5dc, 0x0cf680, 0x0cf6fc, 0x0cf778, 0x0cf81c, 0x0cf8c0, 0x0cf93c, 0x0cf9b8, 0x0cfa5c, 0x0cfb00, 0x0cfb7c, 0x0cfbf8, 0x0cfc9c, 0x0cfd40, 0x0cfdbc, 0x0cfe38, 0x0cfedc, 0x0cff80, 0x0cfffc, 0x0d0078, 0x0d011c, 0x0d01c0, 0x0d023c, 0x0d02b8, 0x0d035c, 0x0d0400, 0x0d047c, 0x0d04f8, 0x0d059c, 0x0d0640, 0x0d06bc, 0x0d0738, 0x0d07dc, 0x0d0880, 0x0d08fc, 0x0d0978, 0x0d0a1c, 0x0d0ac0, 0x0d0b3c, 0x0d0bb8, 0x0d0c5c, 0x0d0d00, 0x0d0d7c, 0x0d0df8, 0x0d0e9c, 0x0d0f40, 0x0d0fbc, 0x0d1038, 0x0d10dc, 0x0d1180, 0x0d11fc, 0x0d1278, 0x0d131c, 0x0d13c0, 0x0d143c, 0x0d14b8, 0x0d155c, 0x0d1600, 0x0d167c, 0x0d16f8, 0x0d1774, 0x0d17f0, 0x0d186c, 0x0d18e8, 0x0d1964, 0x0d19e0, 0x0d1a5c, 0x0d1ad8, 0x0d1b54, 0x0d1bd0, 0x0d1c4c, 0x0d1cc8, 0x0d1d44, 0x0d1dc0, 0x0d1e3c, 0x0d1eb8, 0x0d1f34, 0x0d1fb0, 0x0d202c, 0x0d20a8, 0x0d2124, 0x0d21a0, 0x0d221c, 0x0d2298, 0x0d2314, 0x0d2390, 0x0d240c, 0x0d2488, 0x0d2504, 0x0d2580, 0x0d25fc, 0x0d2678, 0x0d26f4, 0x0d2770, 0x0d27ec, 0x0d2868, 0x0d28e4, 0x0d2960, 0x0d29dc, 0x0d2a58, 0x0d2ad4, 0x0d2b50, 0x0d2bcc, 0x0d2c48, 0x0d2cc4, 0x0d2d40, 0x0d2dbc, 0x0d2e38, 0x0d2eb4, 0x0d2f30, 0x0d2fac, 0x0d3028, 0x0d30a4, 0x0d3120, 0x0d319c, 0x0d3218, 0x0d3294, 0x0d3310, 0x0d338c, 0x0d3408, 0x0d3484, 0x0d3500, 0x0d357c, 0x0d35f8, 0x0d3674, 0x0d36f0, 0x0d376c, 0x0d37e8, 0x0d3864, 0x0d38e0, 0x0d395c, 0x0d39d8, 0x0d3a54, 0x0d3ad0, 0x0d3b4c, 0x0d3bc8, 0x0d3c44, 0x0d3cc0, 0x0d3d3c, 0x0d3db8, 0x0d3e34, 0x0d3eb0, 0x0d3f2c, 0x0d3fa8, 0x0d4024, 0x0d40a0, 0x0d411c, 0x0d4198, 0x0d4214, 0x0d4290, 0x0d430c, 0x0d4388, 0x0d4404, 0x0d4480, 0x0d44fc, 0x0d4578, 0x0d45f4, 0x0d4670, 0x0d46ec, 0x0d4768, 0x0d47e4, 0x0d4860, 0x0d48dc, 0x0d4958, 0x0d49d4, 0x0d4a50, 0x0d4acc, 0x0d4b48, 0x0d4bc4, 0x0d4c40, 0x0d4cbc, 0x0d4d38, 0x0d4db4, 0x0d4e30, 0x0d4eac, 0x0d4f28, 0x0d4fa4, 0x0d5020, 0x0d509c, 0x0d5118, 0x0d5194, 0x0d5210, 0x0d528c, 0x0d5308, 0x0d5384, 0x0d5400, 0x0d547c, 0x0d54f8, 0x0d559c, 0x0d5640, 0x0d56bc, 0x0d5738, 0x0d57dc, 0x0d5880, 0x0d58fc, 0x0d5978, 0x0d5a1c, 0x0d5ac0, 0x0d5b3c, 0x0d5bb8, 0x0d5c5c, 0x0d5d00, 0x0d5d7c, 0x0d5df8, 0x0d5e9c, 0x0d5f40, 0x0d5fbc, 0x0d6038, 0x0d60dc, 0x0d6180, 0x0d61fc, 0x0d6278, 0x0d631c, 0x0d63c0, 0x0d643c, 0x0d64b8, 0x0d655c, 0x0d6600, 0x0d667c, 0x0d66f8, 0x0d679c, 0x0d6840, 0x0d68bc, 0x0d6938, 0x0d69dc, 0x0d6a80, 0x0d6afc, 0x0d6b78, 0x0d6c1c, 0x0d6cc0, 0x0d6d3c, 0x0d6db8, 0x0d6e5c, 0x0d6f00, 0x0d6f7c, 0x0d6ff8, 0x0d709c, 0x0d7140, 0x0d71bc, 0x0d7238, 0x0d72dc, 0x0d7380, 0x0d73fc, 0x0d7478, 0x0d751c, 0x0d75c0, 0x0d763c, 0x0d76b8, 0x0d775c, 0x0d7800, 0x0d787c, 0x0d78f8, 0x0d799c, 0x0d7a40, 0x0d7abc, 0x0d7b38, 0x0d7bdc, 0x0d7c80, 0x0d7cfc, 0x0d7d78, 0x0d7e1c, 0x0d7ec0, 0x0d7f3c, 0x0d7fb8, 0x0d805c, 0x0d8100, 0x0d817c, 0x0d81f8, 0x0d829c, 0x0d8340, 0x0d83bc, 0x0d8438, 0x0d84dc, 0x0d8580, 0x0d85fc, 0x0d8678, 0x0d871c, 0x0d87c0, 0x0d883c, 0x0d88b8, 0x0d895c, 0x0d8a00, 0x0d8a7c, 0x0d8af8, 0x0d8b9c, 0x0d8c40, 0x0d8cbc, 0x0d8d38, 0x0d8ddc, 0x0d8e80, 0x0d8efc, 0x0d8f78, 0x0d901c, 0x0d90c0, 0x0d913c, 0x0d91b8, 0x0d925c, 0x0d9300, 0x0d937c, 0x0d93f8, 0x0d949c, 0x0d9540, 0x0d95bc, 0x0d9638, 0x0d96dc, 0x0d9780, 0x0d97fc, 0x0d9878, 0x0d991c, 0x0d99c0, 0x0d9a3c, 0x0d9ab8, 0x0d9b5c, 0x0d9c00, 0x0d9c7c, 0x0d9cf8, 0x0d9d74, 0x0d9df0, 0x0d9e6c, 0x0d9ee8, 0x0d9f64, 0x0d9fe0, 0x0da05c, 0x0da0d8, 0x0da154, 0x0da1d0, 0x0da24c, 0x0da2c8, 0x0da344, 0x0da3c0, 0x0da43c, 0x0da4b8, 0x0da534, 0x0da5b0, 0x0da62c, 0x0da6a8, 0x0da724, 0x0da7a0, 0x0da81c, 0x0da898, 0x0da914, 0x0da990, 0x0daa0c, 0x0daa88, 0x0dab04, 0x0dab80, 0x0dabfc, 0x0dac78, 0x0dacf4, 0x0dad70, 0x0dadec, 0x0dae68, 0x0daee4, 0x0daf60, 0x0dafdc, 0x0db058, 0x0db0d4, 0x0db150, 0x0db1cc, 0x0db248, 0x0db2c4, 0x0db340, 0x0db3bc, 0x0db438, 0x0db4b4, 0x0db530, 0x0db5ac, 0x0db628, 0x0db6a4, 0x0db720, 0x0db79c, 0x0db818, 0x0db894, 0x0db910, 0x0db98c, 0x0dba08, 0x0dba84, 0x0dbb00, 0x0dbb7c, 0x0dbbf8, 0x0dbc74, 0x0dbcf0, 0x0dbd6c, 0x0dbde8, 0x0dbe64, 0x0dbee0, 0x0dbf5c, 0x0dbfd8, 0x0dc054, 0x0dc0d0, 0x0dc14c, 0x0dc1c8, 0x0dc244, 0x0dc2c0, 0x0dc33c, 0x0dc3b8, 0x0dc434, 0x0dc4b0, 0x0dc52c, 0x0dc5a8, 0x0dc624, 0x0dc6a0, 0x0dc71c, 0x0dc798, 0x0dc814, 0x0dc890, 0x0dc90c, 0x0dc988, 0x0dca04, 0x0dca80, 0x0dcafc, 0x0dcb78, 0x0dcbf4, 0x0dcc70, 0x0dccec, 0x0dcd68, 0x0dcde4, 0x0dce60, 0x0dcedc, 0x0dcf58, 0x0dcfd4, 0x0dd050, 0x0dd0cc, 0x0dd148, 0x0dd1c4, 0x0dd240, 0x0dd2bc, 0x0dd338, 0x0dd3b4, 0x0dd430, 0x0dd4ac, 0x0dd528, 0x0dd5a4, 0x0dd620, 0x0dd69c, 0x0dd718, 0x0dd794, 0x0dd810, 0x0dd88c, 0x0dd908, 0x0dd984, 0x0dda00, 0x0dda7c, 0x0ddaf8, 0x0ddb9c, 0x0ddc40, 0x0ddcbc, 0x0ddd38, 0x0ddddc, 0x0dde80, 0x0ddefc, 0x0ddf78, 0x0de01c, 0x0de0c0, 0x0de13c, 0x0de1b8, 0x0de25c, 0x0de300, 0x0de37c, 0x0de3f8, 0x0de49c, 0x0de540, 0x0de5bc, 0x0de638, 0x0de6dc, 0x0de780, 0x0de7fc, 0x0de878, 0x0de91c, 0x0de9c0, 0x0dea3c, 0x0deab8, 0x0deb5c, 0x0dec00, 0x0dec7c, 0x0decf8, 0x0ded9c, 0x0dee40, 0x0deebc, 0x0def38, 0x0defdc, 0x0df080, 0x0df0fc, 0x0df178, 0x0df21c, 0x0df2c0, 0x0df33c, 0x0df3b8, 0x0df45c, 0x0df500, 0x0df57c, 0x0df5f8, 0x0df69c, 0x0df740, 0x0df7bc, 0x0df838, 0x0df8dc, 0x0df980, 0x0df9fc, 0x0dfa78, 0x0dfb1c, 0x0dfbc0, 0x0dfc3c, 0x0dfcb8, 0x0dfd5c, 0x0dfe00, 0x0dfe7c, 0x0dfef8, 0x0dff9c, 0x0e0040, 0x0e00bc, 0x0e0138, 0x0e01dc, 0x0e0280, 0x0e02fc, 0x0e0378, 0x0e041c, 0x0e04c0, 0x0e053c, 0x0e05b8, 0x0e065c, 0x0e0700, 0x0e077c, 0x0e07f8, 0x0e089c, 0x0e0940, 0x0e09bc, 0x0e0a38, 0x0e0adc, 0x0e0b80, 0x0e0bfc, 0x0e0c78, 0x0e0d1c, 0x0e0dc0, 0x0e0e3c, 0x0e0eb8, 0x0e0f5c, 0x0e1000, 0x0e107c, 0x0e10f8, 0x0e119c, 0x0e1240, 0x0e12bc, 0x0e1338, 0x0e13dc, 0x0e1480, 0x0e14fc, 0x0e1578, 0x0e161c, 0x0e16c0, 0x0e173c, 0x0e17b8, 0x0e185c, 0x0e1900, 0x0e197c, 0x0e19f8, 0x0e1a9c, 0x0e1b40, 0x0e1bbc, 0x0e1c38, 0x0e1cdc, 0x0e1d80, 0x0e1dfc, 0x0e1e78, 0x0e1f1c, 0x0e1fc0, 0x0e203c, 0x0e20b8, 0x0e215c, 0x0e2200, 0x0e227c, 0x0e22f8, 0x0e2374, 0x0e23f0, 0x0e246c, 0x0e24e8, 0x0e2564, 0x0e25e0, 0x0e265c, 0x0e26d8, 0x0e2754, 0x0e27d0, 0x0e284c, 0x0e28c8, 0x0e2944, 0x0e29c0, 0x0e2a3c, 0x0e2ab8, 0x0e2b34, 0x0e2bb0, 0x0e2c2c, 0x0e2ca8, 0x0e2d24, 0x0e2da0, 0x0e2e1c, 0x0e2e98, 0x0e2f14, 0x0e2f90, 0x0e300c, 0x0e3088, 0x0e3104, 0x0e3180, 0x0e31fc, 0x0e3278, 0x0e32f4, 0x0e3370, 0x0e33ec, 0x0e3468, 0x0e34e4, 0x0e3560, 0x0e35dc, 0x0e3658, 0x0e36d4, 0x0e3750, 0x0e37cc, 0x0e3848, 0x0e38c4, 0x0e3940, 0x0e39bc, 0x0e3a38, 0x0e3ab4, 0x0e3b30, 0x0e3bac, 0x0e3c28, 0x0e3ca4, 0x0e3d20, 0x0e3d9c, 0x0e3e18, 0x0e3e94, 0x0e3f10, 0x0e3f8c, 0x0e4008, 0x0e4084, 0x0e4100, 0x0e417c, 0x0e41f8, 0x0e4274, 0x0e42f0, 0x0e436c, 0x0e43e8, 0x0e4464, 0x0e44e0, 0x0e455c, 0x0e45d8, 0x0e4654, 0x0e46d0, 0x0e474c, 0x0e47c8, 0x0e4844, 0x0e48c0, 0x0e493c, 0x0e49b8, 0x0e4a34, 0x0e4ab0, 0x0e4b2c, 0x0e4ba8, 0x0e4c24, 0x0e4ca0, 0x0e4d1c, 0x0e4d98, 0x0e4e14, 0x0e4e90, 0x0e4f0c, 0x0e4f88, 0x0e5004, 0x0e5080, 0x0e50fc, 0x0e5178, 0x0e51f4, 0x0e5270, 0x0e52ec, 0x0e5368, 0x0e53e4, 0x0e5460, 0x0e54dc, 0x0e5558, 0x0e55d4, 0x0e5650, 0x0e56cc, 0x0e5748, 0x0e57c4, 0x0e5840, 0x0e58bc, 0x0e5938, 0x0e59b4, 0x0e5a30, 0x0e5aac, 0x0e5b28, 0x0e5ba4, 0x0e5c20, 0x0e5c9c, 0x0e5d18, 0x0e5d94, 0x0e5e10, 0x0e5e8c, 0x0e5f08, 0x0e5f84, 0x0e6000, 0x0e607c, 0x0e60f8, 0x0e619c, 0x0e6240, 0x0e62bc, 0x0e6338, 0x0e63dc, 0x0e6480, 0x0e64fc, 0x0e6578, 0x0e661c, 0x0e66c0, 0x0e673c, 0x0e67b8, 0x0e685c, 0x0e6900, 0x0e697c, 0x0e69f8, 0x0e6a9c, 0x0e6b40, 0x0e6bbc, 0x0e6c38, 0x0e6cdc, 0x0e6d80, 0x0e6dfc, 0x0e6e78, 0x0e6f1c, 0x0e6fc0, 0x0e703c, 0x0e70b8, 0x0e715c, 0x0e7200, 0x0e727c, 0x0e72f8, 0x0e739c, 0x0e7440, 0x0e74bc, 0x0e7538, 0x0e75dc, 0x0e7680, 0x0e76fc, 0x0e7778, 0x0e781c, 0x0e78c0, 0x0e793c, 0x0e79b8, 0x0e7a5c, 0x0e7b00, 0x0e7b7c, 0x0e7bf8, 0x0e7c9c, 0x0e7d40, 0x0e7dbc, 0x0e7e38, 0x0e7edc, 0x0e7f80, 0x0e7ffc, 0x0e8078, 0x0e811c, 0x0e81c0, 0x0e823c, 0x0e82b8, 0x0e835c, 0x0e8400, 0x0e847c, 0x0e84f8, 0x0e859c, 0x0e8640, 0x0e86bc, 0x0e8738, 0x0e87dc, 0x0e8880, 0x0e88fc, 0x0e8978, 0x0e8a1c, 0x0e8ac0, 0x0e8b3c, 0x0e8bb8, 0x0e8c5c, 0x0e8d00, 0x0e8d7c, 0x0e8df8, 0x0e8e9c, 0x0e8f40, 0x0e8fbc, 0x0e9038, 0x0e90dc, 0x0e9180, 0x0e91fc, 0x0e9278, 0x0e931c, 0x0e93c0, 0x0e943c, 0x0e94b8, 0x0e955c, 0x0e9600, 0x0e967c, 0x0e96f8, 0x0e979c, 0x0e9840, 0x0e98bc, 0x0e9938, 0x0e99dc, 0x0e9a80, 0x0e9afc, 0x0e9b78, 0x0e9c1c, 0x0e9cc0, 0x0e9d3c, 0x0e9db8, 0x0e9e5c, 0x0e9f00, 0x0e9f7c, 0x0e9ff8, 0x0ea09c, 0x0ea140, 0x0ea1bc, 0x0ea238, 0x0ea2dc, 0x0ea380, 0x0ea3fc, 0x0ea478, 0x0ea51c, 0x0ea5c0, 0x0ea63c, 0x0ea6b8, 0x0ea75c, 0x0ea800, 0x0ea87c, 0x0ea8f8, 0x0ea974, 0x0ea9f0, 0x0eaa6c, 0x0eaae8, 0x0eab64, 0x0eabe0, 0x0eac5c, 0x0eacd8, 0x0ead54, 0x0eadd0, 0x0eae4c, 0x0eaec8, 0x0eaf44, 0x0eafc0, 0x0eb03c, 0x0eb0b8, 0x0eb134, 0x0eb1b0, 0x0eb22c, 0x0eb2a8, 0x0eb324, 0x0eb3a0, 0x0eb41c, 0x0eb498, 0x0eb514, 0x0eb590, 0x0eb60c, 0x0eb688, 0x0eb704, 0x0eb780, 0x0eb7fc, 0x0eb878, 0x0eb8f4, 0x0eb970, 0x0eb9ec, 0x0eba68, 0x0ebae4, 0x0ebb60, 0x0ebbdc, 0x0ebc58, 0x0ebcd4, 0x0ebd50, 0x0ebdcc, 0x0ebe48, 0x0ebec4, 0x0ebf40, 0x0ebfe4, 0x0ec088, 0x0ec12c, 0x0ec1d0, 0x0ec274, 0x0ec318, 0x0ec3bc, 0x0ec460, 0x0ec504, 0x0ec5a8, 0x0ec64c, 0x0ec6f0, 0x0ec794, 0x0ec838, 0x0ec8dc, 0x0ec980, 0x0ec9fc, 0x0eca78, 0x0ecaf4, 0x0ecb70, 0x0ecbec, 0x0ecc68, 0x0ecce4, 0x0ecd60, 0x0ecddc, 0x0ece58, 0x0eced4, 0x0ecf50, 0x0ecfcc, 0x0ed048, 0x0ed0c4, 0x0ed140, 0x0ed1bc, 0x0ed238, 0x0ed2b4, 0x0ed330, 0x0ed3ac, 0x0ed428, 0x0ed4a4, 0x0ed520, 0x0ed59c, 0x0ed618, 0x0ed694, 0x0ed710, 0x0ed78c, 0x0ed808, 0x0ed884, 0x0ed900, 0x0ed97c, 0x0ed9f8, 0x0eda74, 0x0edaf0, 0x0edb6c, 0x0edbe8, 0x0edc64, 0x0edce0, 0x0edd5c, 0x0eddd8, 0x0ede54, 0x0eded0, 0x0edf4c, 0x0edfc8, 0x0ee044, 0x0ee0c0, 0x0ee164, 0x0ee208, 0x0ee2ac, 0x0ee350, 0x0ee3f4, 0x0ee498, 0x0ee53c, 0x0ee5e0, 0x0ee684, 0x0ee728, 0x0ee7cc, 0x0ee870, 0x0ee914, 0x0ee9b8, 0x0eea5c, 0x0eeb00, 0x0eeb7c, 0x0eebf8, 0x0eec74, 0x0eecf0, 0x0eed6c, 0x0eede8, 0x0eee64, 0x0eeee0, 0x0eef5c, 0x0eefd8, 0x0ef054, 0x0ef0d0, 0x0ef14c, 0x0ef1c8, 0x0ef244, 0x0ef2c0, 0x0ef33c, 0x0ef3b8, 0x0ef434, 0x0ef4b0, 0x0ef52c, 0x0ef5a8, 0x0ef624, 0x0ef6a0, 0x0ef71c, 0x0ef798, 0x0ef814, 0x0ef890, 0x0ef90c, 0x0ef988, 0x0efa04, 0x0efa80, 0x0efafc, 0x0efb78, 0x0efbf4, 0x0efc70, 0x0efcec, 0x0efd68, 0x0efde4, 0x0efe60, 0x0efedc, 0x0eff58, 0x0effd4, 0x0f0050, 0x0f00cc, 0x0f0148, 0x0f01c4, 0x0f0240, 0x0f02e4, 0x0f0388, 0x0f042c, 0x0f04d0, 0x0f0574, 0x0f0618, 0x0f06bc, 0x0f0760, 0x0f0804, 0x0f08a8, 0x0f094c, 0x0f09f0, 0x0f0a94, 0x0f0b38, 0x0f0bdc, 0x0f0c80, 0x0f0cfc, 0x0f0d78, 0x0f0df4, 0x0f0e70, 0x0f0eec, 0x0f0f68, 0x0f0fe4, 0x0f1060, 0x0f10dc, 0x0f1158, 0x0f11d4, 0x0f1250, 0x0f12cc, 0x0f1348, 0x0f13c4, 0x0f1440, 0x0f14bc, 0x0f1538, 0x0f15b4, 0x0f1630, 0x0f16ac, 0x0f1728, 0x0f17a4, 0x0f1820, 0x0f189c, 0x0f1918, 0x0f1994, 0x0f1a10, 0x0f1a8c, 0x0f1b08, 0x0f1b84, 0x0f1c00, 0x0f1c7c, 0x0f1cf8, 0x0f1d74, 0x0f1df0, 0x0f1e6c, 0x0f1ee8, 0x0f1f64, 0x0f1fe0, 0x0f205c, 0x0f20d8, 0x0f2154, 0x0f21d0, 0x0f224c, 0x0f22c8, 0x0f2344, 0x0f23c0, 0x0f2464, 0x0f2508, 0x0f25ac, 0x0f2650, 0x0f26f4, 0x0f2798, 0x0f283c, 0x0f28e0, 0x0f2984, 0x0f2a28, 0x0f2acc, 0x0f2b70, 0x0f2c14, 0x0f2cb8, 0x0f2d5c, 0x0f2e00, 0x0f2e7c, 0x0f2ef8, 0x0f2f74, 0x0f2ff0, 0x0f306c, 0x0f30e8, 0x0f3164, 0x0f31e0, 0x0f325c, 0x0f32d8, 0x0f3354, 0x0f33d0, 0x0f344c, 0x0f34c8, 0x0f3544, 0x0f35c0, 0x0f363c, 0x0f36b8, 0x0f3734, 0x0f37b0, 0x0f382c, 0x0f38a8, 0x0f3924, 0x0f39a0, 0x0f3a1c, 0x0f3a98, 0x0f3b14, 0x0f3b90, 0x0f3c0c, 0x0f3c88, 0x0f3d04, 0x0f3d80, 0x0f3dfc, 0x0f3e78, 0x0f3ef4, 0x0f3f70, 0x0f3fec, 0x0f4068, 0x0f40e4, 0x0f4160, 0x0f41dc, 0x0f4258, 0x0f42d4, 0x0f4350, 0x0f43cc, 0x0f4448, 0x0f44c4, 0x0f4540, 0x0f45e4, 0x0f4688, 0x0f472c, 0x0f47d0, 0x0f4874, 0x0f4918, 0x0f49bc, 0x0f4a60, 0x0f4b04, 0x0f4ba8, 0x0f4c4c, 0x0f4cf0, 0x0f4d94, 0x0f4e38, 0x0f4edc, 0x0f4f80, 0x0f4ffc, 0x0f5078, 0x0f50f4, 0x0f5170, 0x0f51ec, 0x0f5268, 0x0f52e4, 0x0f5360, 0x0f53dc, 0x0f5458, 0x0f54d4, 0x0f5550, 0x0f55cc, 0x0f5648, 0x0f56c4, 0x0f5740, 0x0f57bc, 0x0f5838, 0x0f58b4, 0x0f5930, 0x0f59ac, 0x0f5a28, 0x0f5aa4, 0x0f5b20, 0x0f5b9c, 0x0f5c18, 0x0f5c94, 0x0f5d10, 0x0f5d8c, 0x0f5e08, 0x0f5e84, 0x0f5f00, 0x0f5f7c, 0x0f5ff8, 0x0f6074, 0x0f60f0, 0x0f616c, 0x0f61e8, 0x0f6264, 0x0f62e0, 0x0f635c, 0x0f63d8, 0x0f6454, 0x0f64d0, 0x0f654c, 0x0f65c8, 0x0f6644, 0x0f66c0, 0x0f6764, 0x0f6808, 0x0f68ac, 0x0f6950, 0x0f69f4, 0x0f6a98, 0x0f6b3c, 0x0f6be0, 0x0f6c84, 0x0f6d28, 0x0f6dcc, 0x0f6e70, 0x0f6f14, 0x0f6fb8, 0x0f705c, 0x0f7100, 0x0f717c, 0x0f71f8, 0x0f7274, 0x0f72f0, 0x0f736c, 0x0f73e8, 0x0f7464, 0x0f74e0, 0x0f755c, 0x0f75d8, 0x0f7654, 0x0f76d0, 0x0f774c, 0x0f77c8, 0x0f7844, 0x0f78c0, 0x0f793c, 0x0f79b8, 0x0f7a34, 0x0f7ab0, 0x0f7b2c, 0x0f7ba8, 0x0f7c24, 0x0f7ca0, 0x0f7d1c, 0x0f7d98, 0x0f7e14, 0x0f7e90, 0x0f7f0c, 0x0f7f88, 0x0f8004, 0x0f8080, 0x0f80fc, 0x0f8178, 0x0f81f4, 0x0f8270, 0x0f82ec, 0x0f8368, 0x0f83e4, 0x0f8460, 0x0f84dc, 0x0f8558, 0x0f85d4, 0x0f8650, 0x0f86cc, 0x0f8748, 0x0f87c4, 0x0f8840, 0x0f88e4, 0x0f8988, 0x0f8a2c, 0x0f8ad0, 0x0f8b74, 0x0f8c18, 0x0f8cbc, 0x0f8d60, 0x0f8e04, 0x0f8ea8, 0x0f8f4c, 0x0f8ff0, 0x0f9094, 0x0f9138, 0x0f91dc, 0x0f9280, 0x0f92fc, 0x0f9378, 0x0f93f4, 0x0f9470, 0x0f94ec, 0x0f9568, 0x0f95e4, 0x0f9660, 0x0f96dc, 0x0f9758, 0x0f97d4, 0x0f9850, 0x0f98cc, 0x0f9948, 0x0f99c4, 0x0f9a40, 0x0f9abc, 0x0f9b38, 0x0f9bb4, 0x0f9c30, 0x0f9cac, 0x0f9d28, 0x0f9da4, 0x0f9e20, 0x0f9e9c, 0x0f9f18, 0x0f9f94, 0x0fa010, 0x0fa08c, 0x0fa108, 0x0fa184, 0x0fa200, 0x0fa27c, 0x0fa2f8, 0x0fa374, 0x0fa3f0, 0x0fa46c, 0x0fa4e8, 0x0fa564, 0x0fa5e0, 0x0fa65c, 0x0fa6d8, 0x0fa754, 0x0fa7d0, 0x0fa84c, 0x0fa8c8, 0x0fa944, 0x0fa9c0, 0x0faa64, 0x0fab08, 0x0fabac, 0x0fac50, 0x0facf4, 0x0fad98, 0x0fae3c, 0x0faee0, 0x0faf84, 0x0fb028, 0x0fb0cc, 0x0fb170, 0x0fb214, 0x0fb2b8, 0x0fb35c, 0x0fb400, 0x0fb47c, 0x0fb4f8, 0x0fb574, 0x0fb5f0, 0x0fb66c, 0x0fb6e8, 0x0fb764, 0x0fb7e0, 0x0fb85c, 0x0fb8d8, 0x0fb954, 0x0fb9d0, 0x0fba4c, 0x0fbac8, 0x0fbb44, 0x0fbbc0, 0x0fbc3c, 0x0fbcb8, 0x0fbd34, 0x0fbdb0, 0x0fbe2c, 0x0fbea8, 0x0fbf24, 0x0fbfa0, 0x0fc01c, 0x0fc098, 0x0fc114, 0x0fc190, 0x0fc20c, 0x0fc288, 0x0fc304, 0x0fc380, 0x0fc3fc, 0x0fc478, 0x0fc4f4, 0x0fc570, 0x0fc5ec, 0x0fc668, 0x0fc6e4, 0x0fc760, 0x0fc7dc, 0x0fc858, 0x0fc8d4, 0x0fc950, 0x0fc9cc, 0x0fca48, 0x0fcac4, 0x0fcb40, 0x0fcbe4, 0x0fcc88, 0x0fcd2c, 0x0fcdd0, 0x0fce74, 0x0fcf18, 0x0fcfbc, 0x0fd060, 0x0fd104, 0x0fd1a8, 0x0fd24c, 0x0fd2f0, 0x0fd394, 0x0fd438, 0x0fd4dc, 0x0fd580, 0x0fd5fc, 0x0fd678, 0x0fd6f4, 0x0fd770, 0x0fd7ec, 0x0fd868, 0x0fd8e4, 0x0fd960, 0x0fd9dc, 0x0fda58, 0x0fdad4, 0x0fdb50, 0x0fdbcc, 0x0fdc48, 0x0fdcc4, 0x0fdd40, 0x0fddbc, 0x0fde38, 0x0fdeb4, 0x0fdf30, 0x0fdfac, 0x0fe028, 0x0fe0a4, 0x0fe120, 0x0fe19c, 0x0fe218, 0x0fe294, 0x0fe310, 0x0fe38c, 0x0fe408, 0x0fe484, 0x0fe500, 0x0fe57c, 0x0fe5f8, 0x0fe674, 0x0fe6f0, 0x0fe76c, 0x0fe7e8, 0x0fe864, 0x0fe8e0, 0x0fe95c, 0x0fe9d8, 0x0fea54, 0x0fead0, 0x0feb4c, 0x0febc8, 0x0fec44, 0x0fecc0, 0x0fed64, 0x0fee08, 0x0feeac, 0x0fef50, 0x0feff4, 0x0ff098, 0x0ff13c, 0x0ff1e0, 0x0ff284, 0x0ff328, 0x0ff3cc, 0x0ff470, 0x0ff514, 0x0ff5b8, 0x0ff65c, 0x0ff700, 0x0ff77c, 0x0ff7f8, 0x0ff874, 0x0ff8f0, 0x0ff96c, 0x0ff9e8, 0x0ffa64, 0x0ffae0, 0x0ffb5c, 0x0ffbd8, 0x0ffc54, 0x0ffcd0, 0x0ffd4c, 0x0ffdc8, 0x0ffe44, 0x0ffec0, 0x0fff3c, 0x0fffb8, 0x100034, 0x1000b0, 0x10012c, 0x1001a8, 0x100224, 0x1002a0, 0x10031c, 0x100398, 0x100414, 0x100490, 0x10050c, 0x100588, 0x100604, 0x100680, 0x1006fc, 0x100778, 0x1007f4, 0x100870, 0x1008ec, 0x100968, 0x1009e4, 0x100a60, 0x100adc, 0x100b58, 0x100bd4, 0x100c50, 0x100ccc, 0x100d48, 0x100dc4, 0x100e40, 0x100ee4, 0x100f88, 0x10102c, 0x1010d0, 0x101174, 0x101218, 0x1012bc, 0x101360, 0x101404, 0x1014a8, 0x10154c, 0x1015f0, 0x101694, 0x101738, 0x1017dc, 0x101880, 0x1018fc, 0x101978, 0x1019f4, 0x101a70, 0x101aec, 0x101b68, 0x101be4, 0x101c60, 0x101cdc, 0x101d58, 0x101dd4, 0x101e50, 0x101ecc, 0x101f48, 0x101fc4, 0x102040, 0x1020bc, 0x102138, 0x1021b4, 0x102230, 0x1022ac, 0x102328, 0x1023a4, 0x102420, 0x10249c, 0x102518, 0x102594, 0x102610, 0x10268c, 0x102708, 0x102784, 0x102800, 0x10287c, 0x1028f8, 0x102974, 0x1029f0, 0x102a6c, 0x102ae8, 0x102b64, 0x102be0, 0x102c5c, 0x102cd8, 0x102d54, 0x102dd0, 0x102e4c, 0x102ec8, 0x102f44, 0x102fc0, 0x103064, 0x103108, 0x1031ac, 0x103250, 0x1032f4, 0x103398, 0x10343c, 0x1034e0, 0x103584, 0x103628, 0x1036cc, 0x103770, 0x103814, 0x1038b8, 0x10395c, 0x103a00, 0x103a7c, 0x103af8, 0x103b74, 0x103bf0, 0x103c6c, 0x103ce8, 0x103d64, 0x103de0, 0x103e5c, 0x103ed8, 0x103f54, 0x103fd0, 0x10404c, 0x1040c8, 0x104144, 0x1041c0, 0x10423c, 0x1042b8, 0x104334, 0x1043b0, 0x10442c, 0x1044a8, 0x104524, 0x1045a0, 0x10461c, 0x104698, 0x104714, 0x104790, 0x10480c, 0x104888, 0x104904, 0x104980, 0x1049fc, 0x104a78, 0x104af4, 0x104b70, 0x104bec, 0x104c68, 0x104ce4, 0x104d60, 0x104ddc, 0x104e58, 0x104ed4, 0x104f50, 0x104fcc, 0x105048, 0x1050c4, 0x105140, 0x1051e4, 0x105288, 0x10532c, 0x1053d0, 0x105474, 0x105518, 0x1055bc, 0x105660, 0x105704, 0x1057a8, 0x10584c, 0x1058f0, 0x105994, 0x105a38, 0x105adc, 0x105b80, 0x105bfc, 0x105c78, 0x105cf4, 0x105d70, 0x105dec, 0x105e68, 0x105ee4, 0x105f60, 0x105fdc, 0x106058, 0x1060d4, 0x106150, 0x1061cc, 0x106248, 0x1062c4, 0x106340, 0x1063bc, 0x106438, 0x1064b4, 0x106530, 0x1065ac, 0x106628, 0x1066a4, 0x106720, 0x10679c, 0x106818, 0x106894, 0x106910, 0x10698c, 0x106a08, 0x106a84, 0x106b00, 0x106b7c, 0x106bf8, 0x106c74, 0x106cf0, 0x106d6c, 0x106de8, 0x106e64, 0x106ee0, 0x106f5c, 0x106fd8, 0x107054, 0x1070d0, 0x10714c, 0x1071c8, 0x107244, 0x1072c0, 0x107364, 0x107408, 0x1074ac, 0x107550, 0x1075f4, 0x107698, 0x10773c, 0x1077e0, 0x107884, 0x107928, 0x1079cc, 0x107a70, 0x107b14, 0x107bb8, 0x107c5c, 0x107d00, 0x107d7c, 0x107df8, 0x107e74, 0x107ef0, 0x107f6c, 0x107fe8, 0x108064, 0x1080e0, 0x10815c, 0x1081d8, 0x108254, 0x1082d0, 0x10834c, 0x1083c8, 0x108444, 0x1084c0, 0x10853c, 0x1085b8, 0x108634, 0x1086b0, 0x10872c, 0x1087a8, 0x108824, 0x1088a0, 0x10891c, 0x108998, 0x108a14, 0x108a90, 0x108b0c, 0x108b88, 0x108c04, 0x108c80, 0x108cfc, 0x108d78, 0x108df4, 0x108e70, 0x108eec, 0x108f68, 0x108fe4, 0x109060, 0x1090dc, 0x109158, 0x1091d4, 0x109250, 0x1092cc, 0x109348, 0x1093c4, 0x109440, 0x1094e4, 0x109588, 0x10962c, 0x1096d0, 0x109774, 0x109818, 0x1098bc, 0x109960, 0x109a04, 0x109aa8, 0x109b4c, 0x109bf0, 0x109c94, 0x109d38, 0x109ddc, 0x109e80, 0x109efc, 0x109f78, 0x109ff4, 0x10a070, 0x10a0ec, 0x10a168, 0x10a1e4, 0x10a260, 0x10a2dc, 0x10a358, 0x10a3d4, 0x10a450, 0x10a4cc, 0x10a548, 0x10a5c4, 0x10a640, 0x10a6bc, 0x10a738, 0x10a7b4, 0x10a830, 0x10a8ac, 0x10a928, 0x10a9a4, 0x10aa20, 0x10aa9c, 0x10ab18, 0x10ab94, 0x10ac10, 0x10ac8c, 0x10ad08, 0x10ad84, 0x10ae00, 0x10ae7c, 0x10aef8, 0x10af74, 0x10aff0, 0x10b06c, 0x10b0e8, 0x10b164, 0x10b1e0, 0x10b25c, 0x10b2d8, 0x10b354, 0x10b3d0, 0x10b44c, 0x10b4c8, 0x10b544, 0x10b5c0, 0x10b664, 0x10b708, 0x10b7ac, 0x10b850, 0x10b8f4, 0x10b998, 0x10ba3c, 0x10bae0, 0x10bb84, 0x10bc28, 0x10bccc, 0x10bd70, 0x10be14, 0x10beb8, 0x10bf5c, 0x10c000, 0x10c07c, 0x10c0f8, 0x10c174, 0x10c1f0, 0x10c26c, 0x10c2e8, 0x10c364, 0x10c3e0, 0x10c484, 0x10c500, 0x10c5a4, 0x10c620, 0x10c6c4, 0x10c740, 0x10c7e4, 0x10c860, 0x10c8dc, 0x10c958, 0x10c9d4, 0x10ca50, 0x10cacc, 0x10cb48, 0x10cbc4, 0x10cc40, 0x10cce4, 0x10cd60, 0x10ce04, 0x10ce80, 0x10cf24, 0x10cfa0, 0x10d044, 0x10d0c0, 0x10d13c, 0x10d1b8, 0x10d234, 0x10d2b0, 0x10d32c, 0x10d3a8, 0x10d424, 0x10d4a0, 0x10d544, 0x10d5c0, 0x10d664, 0x10d6e0, 0x10d784, 0x10d800, 0x10d8a4, 0x10d920, 0x10d99c, 0x10da18, 0x10da94, 0x10db10, 0x10db8c, 0x10dc08, 0x10dc84, 0x10dd00, 0x10dda4, 0x10de20, 0x10dec4, 0x10df40, 0x10dfe4, 0x10e060, 0x10e104, 0x10e180, 0x10e1fc, 0x10e278, 0x10e2f4, 0x10e370, 0x10e3ec, 0x10e468, 0x10e4e4, 0x10e560, 0x10e604, 0x10e680, 0x10e724, 0x10e7a0, 0x10e844, 0x10e8c0, 0x10e964, 0x10e9e0, 0x10ea5c, 0x10ead8, 0x10eb54, 0x10ebd0, 0x10ec4c, 0x10ecc8, 0x10ed44, 0x10edc0, 0x10ee64, 0x10eee0, 0x10ef84, 0x10f000, 0x10f0a4, 0x10f120, 0x10f1c4, 0x10f240, 0x10f2bc, 0x10f338, 0x10f3b4, 0x10f430, 0x10f4ac, 0x10f528, 0x10f5a4, 0x10f620, 0x10f6c4, 0x10f740, 0x10f7e4, 0x10f860, 0x10f904, 0x10f980, 0x10fa24, 0x10faa0, 0x10fb1c, 0x10fb98, 0x10fc14, 0x10fc90, 0x10fd0c, 0x10fd88, 0x10fe04, 0x10fe80, 0x10ff24, 0x10ffa0, 0x110044, 0x1100c0, 0x110164, 0x1101e0, 0x110284, 0x110300, 0x11037c, 0x1103f8, 0x110474, 0x1104f0, 0x11056c, 0x1105e8, 0x110664, 0x1106e0, 0x110784, 0x110800, 0x1108a4, 0x110920, 0x1109c4, 0x110a40, 0x110ae4, 0x110b60, 0x110bdc, 0x110c58, 0x110cd4, 0x110d50, 0x110dcc, 0x110e48, 0x110ec4, 0x110f40, 0x110fe4, 0x111060, 0x111104, 0x111180, 0x111224, 0x1112a0, 0x111344, 0x1113c0, 0x11143c, 0x1114b8, 0x111534, 0x1115b0, 0x11162c, 0x1116a8, 0x111724, 0x1117a0, 0x111844, 0x1118c0, 0x111964, 0x1119e0, 0x111a84, 0x111b00, 0x111ba4, 0x111c20, 0x111c9c, 0x111d18, 0x111d94, 0x111e10, 0x111e8c, 0x111f08, 0x111f84, 0x112000, 0x1120a4, 0x112120, 0x1121c4, 0x112240, 0x1122e4, 0x112360, 0x112404, 0x112480, 0x1124fc, 0x112578, 0x1125f4, 0x112670, 0x1126ec, 0x112768, 0x1127e4, 0x112860, 0x112904, 0x112980, 0x112a24, 0x112aa0, 0x112b44, 0x112bc0, 0x112c64, 0x112ce0, 0x112d5c, 0x112dd8, 0x112e54, 0x112ed0, 0x112f4c, 0x112fc8, 0x113044, 0x1130c0, 0x113164, 0x1131e0, 0x113284, 0x113300, 0x1133a4, 0x113420, 0x1134c4, 0x113540, 0x1135bc, 0x113638, 0x1136b4, 0x113730, 0x1137ac, 0x113828, 0x1138a4, 0x113920, 0x1139c4, 0x113a40, 0x113ae4, 0x113b60, 0x113c04, 0x113c80, 0x113d24, 0x113da0, 0x113e1c, 0x113e98, 0x113f14, 0x113f90, 0x11400c, 0x114088, 0x114104, 0x114180, 0x114224, 0x1142a0, 0x114344, 0x1143c0, 0x114464, 0x1144e0, 0x114584, 0x114600, 0x11467c, 0x1146f8, 0x114774, 0x1147f0, 0x11486c, 0x1148e8, 0x114964, 0x1149e0, 0x114a84, 0x114b00, 0x114ba4, 0x114c20, 0x114cc4, 0x114d40, 0x114de4, 0x114e60, 0x114edc, 0x114f58, 0x114fd4, 0x115050, 0x1150cc, 0x115148, 0x1151c4, 0x115240, 0x1152e4, 0x115360, 0x115404, 0x115480, 0x115524, 0x1155a0, 0x115644, 0x1156c0, 0x11573c, 0x1157b8, 0x115834, 0x1158b0, 0x11592c, 0x1159a8, 0x115a24, 0x115aa0, 0x115b44, 0x115bc0, 0x115c64, 0x115ce0, 0x115d84, 0x115e00, 0x115ea4, 0x115f20, 0x115f9c, 0x116018, 0x116094, 0x116110, 0x11618c, 0x116208, 0x116284, 0x116300, 0x1163a4, 0x116420, 0x1164c4, 0x116540, 0x1165e4, 0x116660, 0x116704, 0x116780, 0x1167fc, 0x116878, 0x1168f4, 0x116970, 0x1169ec, 0x116a68, 0x116ae4, 0x116b60, 0x116c04, 0x116c80, 0x116d24, 0x116da0, 0x116e44, 0x116ec0, 0x116f64, 0x116fe0, 0x11705c, 0x1170d8, 0x117154, 0x1171d0, 0x11724c, 0x1172c8, 0x117344, 0x1173c0, 0x117464, 0x1174e0, 0x117584, 0x117600, 0x1176a4, 0x117720, 0x1177c4, 0x117840, 0x1178bc, 0x117938, 0x1179b4, 0x117a30, 0x117aac, 0x117b28, 0x117ba4, 0x117c20, 0x117cc4, 0x117d40, 0x117de4, 0x117e60, 0x117f04, 0x117f80, 0x118024, 0x1180a0, 0x11811c, 0x118198, 0x118214, 0x118290, 0x11830c, 0x118388, 0x118404, 0x118480, 0x118524, 0x1185a0, 0x118644, 0x1186c0, 0x118764, 0x1187e0, 0x118884, 0x118900, 0x11897c, 0x1189f8, 0x118a74, 0x118af0, 0x118b6c, 0x118be8, 0x118c64, 0x118ce0, 0x118d84, 0x118e00, 0x118ea4, 0x118f20, 0x118fc4, 0x119040, 0x1190e4, 0x119160, 0x1191dc, 0x119258, 0x1192d4, 0x119350, 0x1193cc, 0x119448, 0x1194c4, 0x119540, 0x1195e4, 0x119660, 0x119704, 0x119780, 0x119824, 0x1198a0, 0x119944, 0x1199c0, 0x119a3c, 0x119ab8, 0x119b34, 0x119bb0, 0x119c2c, 0x119ca8, 0x119d24, 0x119da0, 0x119e44, 0x119ec0, 0x119f64, 0x119fe0, 0x11a084, 0x11a100, 0x11a1a4, 0x11a220, 0x11a29c, 0x11a318, 0x11a394, 0x11a410, 0x11a48c, 0x11a508, 0x11a584, 0x11a600, 0x11a6a4, 0x11a720, 0x11a7c4, 0x11a840, 0x11a8e4, 0x11a960, 0x11aa04, 0x11aa80, 0x11aafc, 0x11ab78, 0x11abf4, 0x11ac70, 0x11acec, 0x11ad68, 0x11ade4, 0x11ae60, 0x11af04, 0x11af80, 0x11b024, 0x11b0a0, 0x11b144, 0x11b1c0, 0x11b264, 0x11b2e0, 0x11b35c, 0x11b3d8, 0x11b454, 0x11b4d0, 0x11b54c, 0x11b5c8, 0x11b644, 0x11b6c0, 0x11b764, 0x11b7e0, 0x11b884, 0x11b900, 0x11b9a4, 0x11ba20, 0x11bac4, 0x11bb40, 0x11bbbc, 0x11bc38, 0x11bcb4, 0x11bd30, 0x11bdac, 0x11be28, 0x11bea4, 0x11bf20, 0x11bfc4, 0x11c040, 0x11c0e4, 0x11c160, 0x11c204, 0x11c280, 0x11c324, 0x11c3a0, 0x11c41c, 0x11c498, 0x11c514, 0x11c590, 0x11c60c, 0x11c688, 0x11c704, 0x11c780, 0x11c824, 0x11c8a0, 0x11c944, 0x11c9c0, 0x11ca64, 0x11cae0, 0x11cb84, 0x11cc00, 0x11cc7c, 0x11ccf8, 0x11cd74, 0x11cdf0, 0x11ce6c, 0x11cee8, 0x11cf64, 0x11cfe0, 0x11d084, 0x11d100, 0x11d1a4, 0x11d220, 0x11d2c4, 0x11d340, 0x11d3e4, 0x11d460, 0x11d4dc, 0x11d558, 0x11d5d4, 0x11d650, 0x11d6cc, 0x11d748, 0x11d7c4, 0x11d840, 0x11d8e4, 0x11d960, 0x11da04, 0x11da80, 0x11db24, 0x11dba0, 0x11dc44, 0x11dcc0, 0x11dd3c, 0x11ddb8, 0x11de34, 0x11deb0, 0x11df2c, 0x11dfa8, 0x11e024, 0x11e0a0, 0x11e144, 0x11e1c0, 0x11e264, 0x11e2e0, 0x11e384, 0x11e400, 0x11e4a4, 0x11e520, 0x11e59c, 0x11e618, 0x11e694, 0x11e710, 0x11e78c, 0x11e808, 0x11e884, 0x11e900, 0x11e9a4, 0x11ea20, 0x11eac4, 0x11eb40, 0x11ebe4, 0x11ec60, 0x11ed04, 0x11ed80, 0x11edfc, 0x11ee78, 0x11eef4, 0x11ef70, 0x11efec, 0x11f068, 0x11f0e4, 0x11f160, 0x11f204, 0x11f280, 0x11f324, 0x11f3a0, 0x11f444, 0x11f4c0, 0x11f564, 0x11f5e0, 0x11f65c, 0x11f6d8, 0x11f754, 0x11f7d0, 0x11f84c, 0x11f8c8, 0x11f944, 0x11f9c0, 0x11fa64, 0x11fae0, 0x11fb84, 0x11fc00, 0x11fca4, 0x11fd20, 0x11fdc4, 0x11fe40, 0x11febc, 0x11ff38, 0x11ffb4, 0x120030, 0x1200ac, 0x120128, 0x1201a4, 0x120220, 0x1202c4, 0x120340, 0x1203e4, 0x120460, 0x120504, 0x120580, 0x120624, 0x1206a0, 0x12071c, 0x120798, 0x120814, 0x120890, 0x12090c, 0x120988, 0x120a04, 0x120a80, 0x120b24, 0x120ba0, 0x120c44, 0x120cc0, 0x120d64, 0x120de0, 0x120e84, 0x120f00, 0x120f7c, 0x120ff8, 0x121074, 0x1210f0, 0x12116c, 0x1211e8, 0x121264, 0x1212e0, 0x121384, 0x121400, 0x1214a4, 0x121520, 0x1215c4, 0x121640, 0x1216e4, 0x121760, 0x1217dc, 0x121858, 0x1218d4, 0x121950, 0x1219cc, 0x121a48, 0x121ac4, 0x121b40, 0x121be4, 0x121c60, 0x121d04, 0x121d80, 0x121e24, 0x121ea0, 0x121f44, 0x121fc0, 0x12203c, 0x1220b8, 0x122134, 0x1221b0, 0x12222c, 0x1222a8, 0x122324, 0x1223a0, 0x122444, 0x1224c0, 0x122564, 0x1225e0, 0x122684, 0x122700, 0x1227a4, 0x122820, 0x12289c, 0x122918, 0x122994, 0x122a10, 0x122a8c, 0x122b08, 0x122b84, 0x122c00, 0x122ca4, 0x122d20, 0x122dc4, 0x122e40, 0x122ee4, 0x122f60, 0x123004, 0x123080, 0x1230fc, 0x123178, 0x1231f4, 0x123270, 0x1232ec, 0x123368, 0x1233e4, 0x123460, 0x123504, 0x123580, 0x123624, 0x1236a0, 0x123744, 0x1237c0, 0x123864, 0x1238e0, 0x12395c, 0x1239d8, 0x123a54, 0x123ad0, 0x123b4c, 0x123bc8, 0x123c44, 0x123cc0, 0x123d64, 0x123de0, 0x123e84, 0x123f00, 0x123fa4, 0x124020, 0x1240c4, 0x124140, 0x1241bc, 0x124238, 0x1242b4, 0x124330, 0x1243ac, 0x124428, 0x1244a4, 0x124520, 0x1245c4, 0x124640, 0x1246e4, 0x124760, 0x124804, 0x124880, 0x124924, 0x1249a0, 0x124a1c, 0x124a98, 0x124b14, 0x124b90, 0x124c0c, 0x124c88, 0x124d04, 0x124d80, 0x124e24, 0x124ea0, 0x124f44, 0x124fc0, 0x125064, 0x1250e0, 0x125184, 0x125200, 0x12527c, 0x1252f8, 0x125374, 0x1253f0, 0x12546c, 0x1254e8, 0x125564, 0x1255e0, 0x125684, 0x125700, 0x1257a4, 0x125820, 0x1258c4, 0x125940, 0x1259e4, 0x125a60, 0x125adc, 0x125b58, 0x125bd4, 0x125c50, 0x125ccc, 0x125d48, 0x125dc4, 0x125e40, 0x125ee4, 0x125f60, 0x126004, 0x126080, 0x126124, 0x1261a0, 0x126244, 0x1262c0, 0x12633c, 0x1263b8, 0x126434, 0x1264b0, 0x12652c, 0x1265a8, 0x126624, 0x1266a0, 0x126744, 0x1267c0, 0x126864, 0x1268e0, 0x126984, 0x126a00, 0x126aa4, 0x126b20, 0x126b9c, 0x126c18, 0x126c94, 0x126d10, 0x126d8c, 0x126e08, 0x126e84, 0x126f00, 0x126fa4, 0x127020, 0x1270c4, 0x127140, 0x1271e4, 0x127260, 0x127304, 0x127380, 0x1273fc, 0x127478, 0x1274f4, 0x127570, 0x1275ec, 0x127668, 0x1276e4, 0x127760, 0x127804, 0x127880, 0x127924, 0x1279a0, 0x127a44, 0x127ac0, 0x127b64, 0x127be0, 0x127c5c, 0x127cd8, 0x127d54, 0x127dd0, 0x127e4c, 0x127ec8, 0x127f44, 0x127fc0, 0x128064, 0x1280e0, 0x128184, 0x128200, 0x1282a4, 0x128320, 0x1283c4, 0x128440, 0x1284bc, 0x128538, 0x1285b4, 0x128630, 0x1286ac, 0x128728, 0x1287a4, 0x128820, 0x1288c4, 0x128940, 0x1289e4, 0x128a60, 0x128b04, 0x128b80, 0x128c24, 0x128ca0, 0x128d1c, 0x128d98, 0x128e14, 0x128e90, 0x128f0c, 0x128f88, 0x129004, 0x129080, 0x129124, 0x1291a0, 0x129244, 0x1292c0, 0x129364, 0x1293e0, 0x129484, 0x129500, 0x12957c, 0x1295f8, 0x129674, 0x1296f0, 0x12976c, 0x1297e8, 0x129864, 0x1298e0, 0x129984, 0x129a00, 0x129aa4, 0x129b20, 0x129bc4, 0x129c40, 0x129ce4, 0x129d60, 0x129ddc, 0x129e58, 0x129ed4, 0x129f50, 0x129fcc, 0x12a048, 0x12a0c4, 0x12a140, 0x12a1e4, 0x12a260, 0x12a304, 0x12a380, 0x12a424, 0x12a4a0, 0x12a544, 0x12a5c0, 0x12a63c, 0x12a6b8, 0x12a734, 0x12a7b0, 0x12a82c, 0x12a8a8, 0x12a924, 0x12a9a0, 0x12aa44, 0x12aac0, 0x12ab64, 0x12abe0, 0x12ac84, 0x12ad00, 0x12ada4, 0x12ae20, 0x12ae9c, 0x12af18, 0x12af94, 0x12b010, 0x12b08c, 0x12b108, 0x12b184, 0x12b200, 0x12b2a4, 0x12b320, 0x12b3c4, 0x12b440, 0x12b4e4, 0x12b560, 0x12b604, 0x12b680, 0x12b6fc, 0x12b778, 0x12b7f4, 0x12b870, 0x12b8ec, 0x12b968, 0x12b9e4, 0x12ba60, 0x12bb04, 0x12bb80, 0x12bc24, 0x12bca0, 0x12bd44, 0x12bdc0, 0x12be64, 0x12bee0, 0x12bf5c, 0x12bfd8, 0x12c054, 0x12c0d0, 0x12c14c, 0x12c1c8, 0x12c244, 0x12c2c0, 0x12c364, 0x12c3e0, 0x12c484, 0x12c500, 0x12c5a4, 0x12c620, 0x12c6c4, 0x12c740, 0x12c7bc, 0x12c838, 0x12c8b4, 0x12c930, 0x12c9ac, 0x12ca28, 0x12caa4, 0x12cb20, 0x12cbc4, 0x12cc40, 0x12cce4, 0x12cd60, 0x12ce04, 0x12ce80, 0x12cf24, 0x12cfa0, 0x12d01c, 0x12d098, 0x12d114, 0x12d190, 0x12d20c, 0x12d288, 0x12d304, 0x12d380, 0x12d424, 0x12d4a0, 0x12d544, 0x12d5c0, 0x12d664, 0x12d6e0, 0x12d784, 0x12d800, 0x12d87c, 0x12d8f8, 0x12d974, 0x12d9f0, 0x12da6c, 0x12dae8, 0x12db64, 0x12dbe0, 0x12dc5c, 0x12dcd8, 0x12dd54, 0x12ddd0, 0x12de4c, 0x12dec8, 0x12df44, 0x12dfc0, 0x12e03c, 0x12e0b8, 0x12e134, 0x12e1b0, 0x12e22c, 0x12e2a8, 0x12e324, 0x12e3a0, 0x12e41c, 0x12e498, 0x12e514, 0x12e590, 0x12e60c, 0x12e688, 0x12e704, 0x12e780, 0x12e7fc, 0x12e878, 0x12e8f4, 0x12e970, 0x12e9ec, 0x12ea68, 0x12eae4, 0x12eb60, 0x12ebdc, 0x12ec58, 0x12ecd4, 0x12ed50, 0x12edcc, 0x12ee48, 0x12eec4, 0x12ef40, 0x12efbc, 0x12f038, 0x12f0b4, 0x12f130, 0x12f1ac, 0x12f228, 0x12f2a4, 0x12f320, 0x12f39c, 0x12f418, 0x12f494, 0x12f510, 0x12f58c, 0x12f608, 0x12f684, 0x12f700, 0x12f77c, 0x12f7f8, 0x12f874, 0x12f8f0, 0x12f96c, 0x12f9e8, 0x12fa64, 0x12fae0, 0x12fb5c, 0x12fbd8, 0x12fc54, 0x12fcd0, 0x12fd4c, 0x12fdc8, 0x12fe44, 0x12fec0, 0x12ff3c, 0x12ffb8, 0x130034, 0x1300b0, 0x13012c, 0x1301a8, 0x130224, 0x1302a0, 0x13031c, 0x130398, 0x130414, 0x130490, 0x13050c, 0x130588, 0x130604, 0x130680, 0x1306fc, 0x130778, 0x1307f4, 0x130870, 0x1308ec, 0x130968, 0x1309e4, 0x130a60, 0x130adc, 0x130b58, 0x130bd4, 0x130c50, 0x130ccc, 0x130d48, 0x130dc4, 0x130e40, 0x130ebc, 0x130f38, 0x130fb4, 0x131030, 0x1310ac, 0x131128, 0x1311a4, 0x131220, 0x13129c, 0x131318, 0x131394, 0x131410, 0x13148c, 0x131508, 0x131584, 0x131600, 0x13167c, 0x1316f8, 0x131774, 0x1317f0, 0x13186c, 0x1318e8, 0x131964, 0x1319e0, 0x131a5c, 0x131ad8, 0x131b54, 0x131bd0, 0x131c4c, 0x131cc8, 0x131d44, 0x131dc0, 0x131e3c, 0x131eb8, 0x131f34, 0x131fb0, 0x13202c, 0x1320a8, 0x132124, 0x1321a0, 0x13221c, 0x132298, 0x132314, 0x132390, 0x13240c, 0x132488, 0x132504, 0x132580, 0x1325fc, 0x132678, 0x1326f4, 0x132770, 0x1327ec, 0x132868, 0x1328e4, 0x132960, 0x1329dc, 0x132a58, 0x132ad4, 0x132b50, 0x132bcc, 0x132c48, 0x132cc4, 0x132d40, 0x132dbc, 0x132e38, 0x132eb4, 0x132f30, 0x132fac, 0x133028, 0x1330a4, 0x133120, 0x13319c, 0x133218, 0x133294, 0x133310, 0x13338c, 0x133408, 0x133484, 0x133500, 0x13357c, 0x1335f8, 0x133674, 0x1336f0, 0x13376c, 0x1337e8, 0x133864, 0x1338e0, 0x13395c, 0x1339d8, 0x133a54, 0x133ad0, 0x133b4c, 0x133bc8, 0x133c44, 0x133cc0, 0x133d3c, 0x133db8, 0x133e34, 0x133eb0, 0x133f2c, 0x133fa8, 0x134024, 0x1340a0, 0x13411c, 0x134198, 0x134214, 0x134290, 0x13430c, 0x134388, 0x134404, 0x134480, 0x1344fc, 0x134578, 0x1345f4, 0x134670, 0x1346ec, 0x134768, 0x1347e4, 0x134860, 0x1348dc, 0x134958, 0x1349d4, 0x134a50, 0x134acc, 0x134b48, 0x134bc4, 0x134c40, 0x134cbc, 0x134d38, 0x134db4, 0x134e30, 0x134eac, 0x134f28, 0x134fa4, 0x135020, 0x13509c, 0x135118, 0x135194, 0x135210, 0x13528c, 0x135308, 0x135384, 0x135400, 0x13547c, 0x1354f8, 0x135574, 0x1355f0, 0x13566c, 0x1356e8, 0x135764, 0x1357e0, 0x13585c, 0x1358d8, 0x135954, 0x1359d0, 0x135a4c, 0x135ac8, 0x135b44, 0x135bc0, 0x135c3c, 0x135cb8, 0x135d34, 0x135db0, 0x135e2c, 0x135ea8, 0x135f24, 0x135fa0, 0x13601c, 0x136098, 0x136114, 0x136190, 0x13620c, 0x136288, 0x136304, 0x136380, 0x1363fc, 0x136478, 0x1364f4, 0x136570, 0x1365ec, 0x136668, 0x1366e4, 0x136760, 0x1367dc, 0x136858, 0x1368d4, 0x136950, 0x1369cc, 0x136a48, 0x136ac4, 0x136b40, 0x136bbc, 0x136c38, 0x136cb4, 0x136d30, 0x136dac, 0x136e28, 0x136ea4, 0x136f20, 0x136f9c, 0x137018, 0x137094, 0x137110, 0x13718c, 0x137208, 0x137284, 0x137300, 0x13737c, 0x1373f8, 0x137474, 0x1374f0, 0x13756c, 0x1375e8, 0x137664, 0x1376e0, 0x13775c, 0x1377d8, 0x137854, 0x1378d0, 0x13794c, 0x1379c8, 0x137a44, 0x137ac0, 0x137b3c, 0x137bb8, 0x137c34, 0x137cb0, 0x137d2c, 0x137da8, 0x137e24, 0x137ea0, 0x137f1c, 0x137f98, 0x138014, 0x138090, 0x13810c, 0x138188, 0x138204, 0x138280, 0x1382fc, 0x138378, 0x1383f4, 0x138470, 0x1384ec, 0x138568, 0x1385e4, 0x138660, 0x1386dc, 0x138758, 0x1387d4, 0x138850, 0x1388cc, 0x138948, 0x1389c4, 0x138a40, 0x138abc, 0x138b38, 0x138bb4, 0x138c30, 0x138cac, 0x138d28, 0x138da4, 0x138e20, 0x138e9c, 0x138f18, 0x138f94, 0x139010, 0x13908c, 0x139108, 0x139184, 0x139200, 0x13927c, 0x1392f8, 0x139374, 0x1393f0, 0x13946c, 0x1394e8, 0x139564, 0x1395e0, 0x13965c, 0x1396d8, 0x139754, 0x1397d0, 0x13984c, 0x1398c8, 0x139944, 0x1399c0, 0x139a3c, 0x139ab8, 0x139b34, 0x139bb0, 0x139c2c, 0x139ca8, 0x139d24, 0x139da0, 0x139e1c, 0x139e98, 0x139f14, 0x139f90, 0x13a00c, 0x13a088, 0x13a104, 0x13a180, 0x13a1fc, 0x13a278, 0x13a2f4, 0x13a370, 0x13a3ec, 0x13a468, 0x13a4e4, 0x13a560, 0x13a5dc, 0x13a658, 0x13a6d4, 0x13a750, 0x13a7cc, 0x13a848, 0x13a8c4, 0x13a940, 0x13a9bc, 0x13aa38, 0x13aab4, 0x13ab30, 0x13abac, 0x13ac28, 0x13aca4, 0x13ad20, 0x13ad9c, 0x13ae18, 0x13ae94, 0x13af10, 0x13af8c, 0x13b008, 0x13b084, 0x13b100, 0x13b17c, 0x13b1f8, 0x13b274, 0x13b2f0, 0x13b36c, 0x13b3e8, 0x13b464, 0x13b4e0, 0x13b55c, 0x13b5d8, 0x13b654, 0x13b6d0, 0x13b74c, 0x13b7c8, 0x13b844, 0x13b8c0, 0x13b93c, 0x13b9b8, 0x13ba34, 0x13bab0, 0x13bb2c, 0x13bba8, 0x13bc24, 0x13bca0, 0x13bd1c, 0x13bd98, 0x13be14, 0x13be90, 0x13bf0c, 0x13bf88, 0x13c004, 0x13c080, 0x13c0fc, 0x13c178, 0x13c1f4, 0x13c270, 0x13c2ec, 0x13c368, 0x13c3e4, 0x13c460, 0x13c4dc, 0x13c558, 0x13c5d4, 0x13c650, 0x13c6cc, 0x13c748, 0x13c7c4, 0x13c840, 0x13c8bc, 0x13c938, 0x13c9b4, 0x13ca30, 0x13caac, 0x13cb28, 0x13cba4, 0x13cc20, 0x13cc9c, 0x13cd18, 0x13cd94, 0x13ce10, 0x13ce8c, 0x13cf08, 0x13cf84, 0x13d000, 0x13d07c, 0x13d0f8, 0x13d174, 0x13d1f0, 0x13d26c, 0x13d2e8, 0x13d364, 0x13d3e0, 0x13d45c, 0x13d4d8, 0x13d554, 0x13d5d0, 0x13d64c, 0x13d6c8, 0x13d744, 0x13d7c0, 0x13d83c, 0x13d8b8, 0x13d934, 0x13d9b0, 0x13da2c, 0x13daa8, 0x13db24, 0x13dba0, 0x13dc1c, 0x13dc98, 0x13dd14, 0x13dd90, 0x13de0c, 0x13de88, 0x13df04, 0x13df80, 0x13e024, 0x13e0c8, 0x13e16c, 0x13e210, 0x13e2b4, 0x13e358, 0x13e3fc, 0x13e4a0, 0x13e544, 0x13e5e8, 0x13e68c, 0x13e730, 0x13e7d4, 0x13e878, 0x13e91c, 0x13e9c0, 0x13ea64, 0x13eb08, 0x13ebac, 0x13ec50, 0x13ecf4, 0x13ed98, 0x13ee3c, 0x13eee0, 0x13ef84, 0x13f028, 0x13f0cc, 0x13f170, 0x13f214, 0x13f2b8, 0x13f35c, 0x13f400, 0x13f47c, 0x13f4f8, 0x13f574, 0x13f5f0, 0x13f66c, 0x13f6e8, 0x13f764, 0x13f7e0, 0x13f85c, 0x13f8d8, 0x13f954, 0x13f9d0, 0x13fa4c, 0x13fac8, 0x13fb44, 0x13fbc0, 0x13fc3c, 0x13fcb8, 0x13fd34, 0x13fdb0, 0x13fe2c, 0x13fea8, 0x13ff24, 0x13ffa0, 0x14001c, 0x140098, 0x140114, 0x140190, 0x14020c, 0x140288, 0x140304, 0x140380, 0x140424, 0x1404c8, 0x14056c, 0x140610, 0x1406b4, 0x140758, 0x1407fc, 0x1408a0, 0x140944, 0x1409e8, 0x140a8c, 0x140b30, 0x140bd4, 0x140c78, 0x140d1c, 0x140dc0, 0x140e64, 0x140f08, 0x140fac, 0x141050, 0x1410f4, 0x141198, 0x14123c, 0x1412e0, 0x141384, 0x141428, 0x1414cc, 0x141570, 0x141614, 0x1416b8, 0x14175c, 0x141800, 0x14187c, 0x1418f8, 0x141974, 0x1419f0, 0x141a6c, 0x141ae8, 0x141b64, 0x141be0, 0x141c5c, 0x141cd8, 0x141d54, 0x141dd0, 0x141e4c, 0x141ec8, 0x141f44, 0x141fc0, 0x14203c, 0x1420b8, 0x142134, 0x1421b0, 0x14222c, 0x1422a8, 0x142324, 0x1423a0, 0x14241c, 0x142498, 0x142514, 0x142590, 0x14260c, 0x142688, 0x142704, 0x142780, 0x142824, 0x1428c8, 0x14296c, 0x142a10, 0x142ab4, 0x142b58, 0x142bfc, 0x142ca0, 0x142d44, 0x142de8, 0x142e8c, 0x142f30, 0x142fd4, 0x143078, 0x14311c, 0x1431c0, 0x143264, 0x143308, 0x1433ac, 0x143450, 0x1434f4, 0x143598, 0x14363c, 0x1436e0, 0x143784, 0x143828, 0x1438cc, 0x143970, 0x143a14, 0x143ab8, 0x143b5c, 0x143c00, 0x143c7c, 0x143cf8, 0x143d74, 0x143df0, 0x143e6c, 0x143ee8, 0x143f64, 0x143fe0, 0x14405c, 0x1440d8, 0x144154, 0x1441d0, 0x14424c, 0x1442c8, 0x144344, 0x1443c0, 0x14443c, 0x1444b8, 0x144534, 0x1445b0, 0x14462c, 0x1446a8, 0x144724, 0x1447a0, 0x14481c, 0x144898, 0x144914, 0x144990, 0x144a0c, 0x144a88, 0x144b04, 0x144b80, 0x144c24, 0x144cc8, 0x144d6c, 0x144e10, 0x144eb4, 0x144f58, 0x144ffc, 0x1450a0, 0x145144, 0x1451e8, 0x14528c, 0x145330, 0x1453d4, 0x145478, 0x14551c, 0x1455c0, 0x145664, 0x145708, 0x1457ac, 0x145850, 0x1458f4, 0x145998, 0x145a3c, 0x145ae0, 0x145b84, 0x145c28, 0x145ccc, 0x145d70, 0x145e14, 0x145eb8, 0x145f5c, 0x146000, 0x14607c, 0x1460f8, 0x146174, 0x1461f0, 0x14626c, 0x1462e8, 0x146364, 0x1463e0, 0x14645c, 0x1464d8, 0x146554, 0x1465d0, 0x14664c, 0x1466c8, 0x146744, 0x1467c0, 0x14683c, 0x1468b8, 0x146934, 0x1469b0, 0x146a2c, 0x146aa8, 0x146b24, 0x146ba0, 0x146c1c, 0x146c98, 0x146d14, 0x146d90, 0x146e0c, 0x146e88, 0x146f04, 0x146f80, 0x147024, 0x1470c8, 0x14716c, 0x147210, 0x1472b4, 0x147358, 0x1473fc, 0x1474a0, 0x147544, 0x1475e8, 0x14768c, 0x147730, 0x1477d4, 0x147878, 0x14791c, 0x1479c0, 0x147a64, 0x147b08, 0x147bac, 0x147c50, 0x147cf4, 0x147d98, 0x147e3c, 0x147ee0, 0x147f84, 0x148028, 0x1480cc, 0x148170, 0x148214, 0x1482b8, 0x14835c, 0x148400, 0x14847c, 0x1484f8, 0x148574, 0x1485f0, 0x14866c, 0x1486e8, 0x148764, 0x1487e0, 0x14885c, 0x1488d8, 0x148954, 0x1489d0, 0x148a4c, 0x148ac8, 0x148b44, 0x148bc0, 0x148c3c, 0x148cb8, 0x148d34, 0x148db0, 0x148e2c, 0x148ea8, 0x148f24, 0x148fa0, 0x14901c, 0x149098, 0x149114, 0x149190, 0x14920c, 0x149288, 0x149304, 0x149380, 0x149424, 0x1494c8, 0x14956c, 0x149610, 0x1496b4, 0x149758, 0x1497fc, 0x1498a0, 0x149944, 0x1499e8, 0x149a8c, 0x149b30, 0x149bd4, 0x149c78, 0x149d1c, 0x149dc0, 0x149e64, 0x149f08, 0x149fac, 0x14a050, 0x14a0f4, 0x14a198, 0x14a23c, 0x14a2e0, 0x14a384, 0x14a428, 0x14a4cc, 0x14a570, 0x14a614, 0x14a6b8, 0x14a75c, 0x14a800, 0x14a87c, 0x14a8f8, 0x14a974, 0x14a9f0, 0x14aa6c, 0x14aae8, 0x14ab64, 0x14abe0, 0x14ac5c, 0x14acd8, 0x14ad54, 0x14add0, 0x14ae4c, 0x14aec8, 0x14af44, 0x14afc0, 0x14b03c, 0x14b0b8, 0x14b134, 0x14b1b0, 0x14b22c, 0x14b2a8, 0x14b324, 0x14b3a0, 0x14b41c, 0x14b498, 0x14b514, 0x14b590, 0x14b60c, 0x14b688, 0x14b704, 0x14b780, 0x14b824, 0x14b8c8, 0x14b96c, 0x14ba10, 0x14bab4, 0x14bb58, 0x14bbfc, 0x14bca0, 0x14bd44, 0x14bde8, 0x14be8c, 0x14bf30, 0x14bfd4, 0x14c078, 0x14c11c, 0x14c1c0, 0x14c264, 0x14c308, 0x14c3ac, 0x14c450, 0x14c4f4, 0x14c598, 0x14c63c, 0x14c6e0, 0x14c784, 0x14c828, 0x14c8cc, 0x14c970, 0x14ca14, 0x14cab8, 0x14cb5c, 0x14cc00, 0x14cc7c, 0x14ccf8, 0x14cd74, 0x14cdf0, 0x14ce6c, 0x14cee8, 0x14cf64, 0x14cfe0, 0x14d05c, 0x14d0d8, 0x14d154, 0x14d1d0, 0x14d24c, 0x14d2c8, 0x14d344, 0x14d3c0, 0x14d43c, 0x14d4b8, 0x14d534, 0x14d5b0, 0x14d62c, 0x14d6a8, 0x14d724, 0x14d7a0, 0x14d81c, 0x14d898, 0x14d914, 0x14d990, 0x14da0c, 0x14da88, 0x14db04, 0x14db80, 0x14dc24, 0x14dcc8, 0x14dd6c, 0x14de10, 0x14deb4, 0x14df58, 0x14dffc, 0x14e0a0, 0x14e144, 0x14e1e8, 0x14e28c, 0x14e330, 0x14e3d4, 0x14e478, 0x14e51c, 0x14e5c0, 0x14e664, 0x14e708, 0x14e7ac, 0x14e850, 0x14e8f4, 0x14e998, 0x14ea3c, 0x14eae0, 0x14eb84, 0x14ec28, 0x14eccc, 0x14ed70, 0x14ee14, 0x14eeb8, 0x14ef5c, 0x14f000, 0x14f07c, 0x14f0f8, 0x14f174, 0x14f1f0, 0x14f26c, 0x14f2e8, 0x14f364, 0x14f3e0, 0x14f45c, 0x14f4d8, 0x14f554, 0x14f5d0, 0x14f64c, 0x14f6c8, 0x14f744, 0x14f7c0, 0x14f83c, 0x14f8b8, 0x14f934, 0x14f9b0, 0x14fa2c, 0x14faa8, 0x14fb24, 0x14fba0, 0x14fc1c, 0x14fc98, 0x14fd14, 0x14fd90, 0x14fe0c, 0x14fe88, 0x14ff04, 0x14ff80, 0x14fffc, 0x150078, 0x1500f4, 0x150170, 0x1501ec, 0x150268, 0x1502e4, 0x150360, 0x1503dc, 0x150458, 0x1504d4, 0x150550, 0x1505cc, 0x150648, 0x1506c4, 0x150740, 0x1507bc, 0x150838, 0x1508b4, 0x150930, 0x1509ac, 0x150a28, 0x150aa4, 0x150b20, 0x150b9c, 0x150c18, 0x150c94, 0x150d10, 0x150d8c, 0x150e08, 0x150e84, 0x150f00, 0x150f7c, 0x150ff8, 0x151074, 0x1510f0, 0x15116c, 0x1511e8, 0x151264, 0x1512e0, 0x15135c, 0x1513d8, 0x151454, 0x1514d0, 0x15154c, 0x1515c8, 0x151644, 0x1516c0, 0x15173c, 0x1517b8, 0x151834, 0x1518b0, 0x15192c, 0x1519a8, 0x151a24, 0x151aa0, 0x151b1c, 0x151b98, 0x151c14, 0x151c90, 0x151d0c, 0x151d88, 0x151e04, 0x151e80, 0x151efc, 0x151f78, 0x151ff4, 0x152070, 0x1520ec, 0x152168, 0x1521e4, 0x152260, 0x1522dc, 0x152358, 0x1523d4, 0x152450, 0x1524cc, 0x152548, 0x1525c4, 0x152640, 0x1526bc, 0x152738, 0x1527b4, 0x152830, 0x1528ac, 0x152928, 0x1529a4, 0x152a20, 0x152a9c, 0x152b18, 0x152b94, 0x152c10, 0x152c8c, 0x152d08, 0x152d84, 0x152e00, 0x152e7c, 0x152ef8, 0x152f74, 0x152ff0, 0x15306c, 0x1530e8, 0x153164, 0x1531e0, 0x15325c, 0x1532d8, 0x153354, 0x1533d0, 0x15344c, 0x1534c8, 0x153544, 0x1535c0, 0x15363c, 0x1536b8, 0x153734, 0x1537b0, 0x15382c, 0x1538a8, 0x153924, 0x1539a0, 0x153a1c, 0x153a98, 0x153b14, 0x153b90, 0x153c0c, 0x153c88, 0x153d04, 0x153d80, 0x153dfc, 0x153e78, 0x153ef4, 0x153f70, 0x153fec, 0x154068, 0x1540e4, 0x154160, 0x1541dc, 0x154258, 0x1542d4, 0x154350, 0x1543cc, 0x154448, 0x1544c4, 0x154540, 0x1545bc, 0x154638, 0x1546b4, 0x154730, 0x1547ac, 0x154828, 0x1548a4, 0x154920, 0x15499c, 0x154a18, 0x154a94, 0x154b10, 0x154b8c, 0x154c08, 0x154c84, 0x154d00, 0x154d7c, 0x154df8, 0x154e74, 0x154ef0, 0x154f6c, 0x154fe8, 0x155064, 0x1550e0, 0x15515c, 0x1551d8, 0x155254, 0x1552d0, 0x15534c, 0x1553c8, 0x155444, 0x1554c0, 0x15553c, 0x1555b8, 0x155634, 0x1556b0, 0x15572c, 0x1557a8, 0x155824, 0x1558a0, 0x15591c, 0x155998, 0x155a14, 0x155a90, 0x155b0c, 0x155b88, 0x155c04, 0x155c80, 0x155cfc, 0x155d78, 0x155df4, 0x155e70, 0x155eec, 0x155f68, 0x155fe4, 0x156060, 0x1560dc, 0x156158, 0x1561d4, 0x156250, 0x1562cc, 0x156348, 0x1563c4, 0x156440, 0x1564bc, 0x156538, 0x1565b4, 0x156630, 0x1566ac, 0x156728, 0x1567a4, 0x156820, 0x15689c, 0x156918, 0x156994, 0x156a10, 0x156a8c, 0x156b08, 0x156b84, 0x156c00, 0x156c7c, 0x156cf8, 0x156d74, 0x156df0, 0x156e6c, 0x156ee8, 0x156f64, 0x156fe0, 0x15705c, 0x1570d8, 0x157154, 0x1571d0, 0x15724c, 0x1572c8, 0x157344, 0x1573c0, 0x15743c, 0x1574b8, 0x157534, 0x1575b0, 0x15762c, 0x1576a8, 0x157724, 0x1577a0, 0x15781c, 0x157898, 0x157914, 0x157990, 0x157a0c, 0x157a88, 0x157b04, 0x157b80, 0x157bfc, 0x157c78, 0x157cf4, 0x157d70, 0x157dec, 0x157e68, 0x157ee4, 0x157f60, 0x157fdc, 0x158058, 0x1580d4, 0x158150, 0x1581cc, 0x158248, 0x1582c4, 0x158340, 0x1583bc, 0x158438, 0x1584b4, 0x158530, 0x1585ac, 0x158628, 0x1586a4, 0x158720, 0x15879c, 0x158818, 0x158894, 0x158910, 0x15898c, 0x158a08, 0x158a84, 0x158b00, 0x158b7c, 0x158bf8, 0x158c74, 0x158cf0, 0x158d6c, 0x158de8, 0x158e64, 0x158ee0, 0x158f5c, 0x158fd8, 0x159054, 0x1590d0, 0x15914c, 0x1591c8, 0x159244, 0x1592c0, 0x15933c, 0x1593b8, 0x159434, 0x1594b0, 0x15952c, 0x1595a8, 0x159624, 0x1596a0, 0x15971c, 0x159798, 0x159814, 0x159890, 0x15990c, 0x159988, 0x159a04, 0x159a80, 0x159afc, 0x159b78, 0x159bf4, 0x159c70, 0x159cec, 0x159d68, 0x159de4, 0x159e60, 0x159edc, 0x159f58, 0x159fd4, 0x15a050, 0x15a0cc, 0x15a148, 0x15a1c4, 0x15a240, 0x15a2bc, 0x15a338, 0x15a3b4, 0x15a430, 0x15a4ac, 0x15a528, 0x15a5a4, 0x15a620, 0x15a69c, 0x15a718, 0x15a794, 0x15a810, 0x15a88c, 0x15a908, 0x15a984, 0x15aa00, 0x15aa7c, 0x15aaf8, 0x15ab74, 0x15abf0, 0x15ac6c, 0x15ace8, 0x15ad64, 0x15ade0, 0x15ae5c, 0x15aed8, 0x15af54, 0x15afd0, 0x15b04c, 0x15b0c8, 0x15b144, 0x15b1c0, 0x15b23c, 0x15b2b8, 0x15b334, 0x15b3b0, 0x15b42c, 0x15b4a8, 0x15b524, 0x15b5a0, 0x15b61c, 0x15b698, 0x15b714, 0x15b790, 0x15b80c, 0x15b888, 0x15b904, 0x15b980, 0x15b9fc, 0x15ba78, 0x15baf4, 0x15bb70, 0x15bbec, 0x15bc68, 0x15bce4, 0x15bd60, 0x15bddc, 0x15be58, 0x15bed4, 0x15bf50, 0x15bfcc, 0x15c048, 0x15c0c4, 0x15c140, 0x15c1bc, 0x15c238, 0x15c2b4, 0x15c330, 0x15c3ac, 0x15c428, 0x15c4a4, 0x15c520, 0x15c59c, 0x15c618, 0x15c694, 0x15c710, 0x15c78c, 0x15c808, 0x15c884, 0x15c900, 0x15c97c, 0x15c9f8, 0x15ca74, 0x15caf0, 0x15cb6c, 0x15cbe8, 0x15cc64, 0x15cce0, 0x15cd5c, 0x15cdd8, 0x15ce54, 0x15ced0, 0x15cf4c, 0x15cfc8, 0x15d044, 0x15d0c0, 0x15d13c, 0x15d1b8, 0x15d234, 0x15d2b0, 0x15d32c, 0x15d3a8, 0x15d424, 0x15d4a0, 0x15d51c, 0x15d598, 0x15d614, 0x15d690, 0x15d70c, 0x15d788, 0x15d804, 0x15d880, 0x15d8fc, 0x15d978, 0x15d9f4, 0x15da70, 0x15daec, 0x15db68, 0x15dbe4, 0x15dc60, 0x15dcdc, 0x15dd58, 0x15ddd4, 0x15de50, 0x15decc, 0x15df48, 0x15dfc4, 0x15e040, 0x15e0bc, 0x15e138, 0x15e1b4, 0x15e230, 0x15e2ac, 0x15e328, 0x15e3a4, 0x15e420, 0x15e49c, 0x15e518, 0x15e594, 0x15e610, 0x15e68c, 0x15e708, 0x15e784, 0x15e800, 0x15e87c, 0x15e8f8, 0x15e974, 0x15e9f0, 0x15ea6c, 0x15eae8, 0x15eb64, 0x15ebe0, 0x15ec5c, 0x15ecd8, 0x15ed54, 0x15edd0, 0x15ee4c, 0x15eec8, 0x15ef44, 0x15efc0, 0x15f03c, 0x15f0b8, 0x15f134, 0x15f1b0, 0x15f22c, 0x15f2a8, 0x15f324, 0x15f3a0, 0x15f41c, 0x15f498, 0x15f514, 0x15f590, 0x15f60c, 0x15f688, 0x15f704, 0x15f780, 0x15f7fc, 0x15f878, 0x15f8f4, 0x15f970, 0x15f9ec, 0x15fa68, 0x15fae4, 0x15fb60, 0x15fbdc, 0x15fc58, 0x15fcd4, 0x15fd50, 0x15fdcc, 0x15fe48, 0x15fec4, 0x15ff40, 0x15ffbc, 0x160038, 0x1600b4, 0x160130, 0x1601ac, 0x160228, 0x1602a4, 0x160320, 0x16039c, 0x160418, 0x160494, 0x160510, 0x16058c, 0x160608, 0x160684, 0x160700, 0x1607a4, 0x160848, 0x1608ec, 0x160990, 0x160a34, 0x160ad8, 0x160b7c, 0x160c20, 0x160cc4, 0x160d68, 0x160e0c, 0x160eb0, 0x160f54, 0x160ff8, 0x16109c, 0x161140, 0x1611e4, 0x161288, 0x16132c, 0x1613d0, 0x161474, 0x161518, 0x1615bc, 0x161660, 0x161704, 0x1617a8, 0x16184c, 0x1618f0, 0x161994, 0x161a38, 0x161adc, 0x161b80, 0x161c24, 0x161cc8, 0x161d6c, 0x161e10, 0x161eb4, 0x161f58, 0x161ffc, 0x1620a0, 0x162144, 0x1621e8, 0x16228c, 0x162330, 0x1623d4, 0x162478, 0x16251c, 0x1625c0, 0x162664, 0x162708, 0x1627ac, 0x162850, 0x1628f4, 0x162998, 0x162a3c, 0x162ae0, 0x162b84, 0x162c28, 0x162ccc, 0x162d70, 0x162e14, 0x162eb8, 0x162f5c, 0x163000, 0x16307c, 0x1630f8, 0x163174, 0x1631f0, 0x16326c, 0x1632e8, 0x163364, 0x1633e0, 0x16345c, 0x1634d8, 0x163554, 0x1635d0, 0x16364c, 0x1636c8, 0x163744, 0x1637c0, 0x16383c, 0x1638b8, 0x163934, 0x1639b0, 0x163a2c, 0x163aa8, 0x163b24, 0x163ba0, 0x163c1c, 0x163c98, 0x163d14, 0x163d90, 0x163e0c, 0x163e88, 0x163f04, 0x163f80, 0x163ffc, 0x164078, 0x1640f4, 0x164170, 0x1641ec, 0x164268, 0x1642e4, 0x164360, 0x1643dc, 0x164458, 0x1644d4, 0x164550, 0x1645cc, 0x164648, 0x1646c4, 0x164740, 0x1647bc, 0x164838, 0x1648b4, 0x164930, 0x1649ac, 0x164a28, 0x164aa4, 0x164b20, 0x164b9c, 0x164c18, 0x164c94, 0x164d10, 0x164d8c, 0x164e08, 0x164e84, 0x164f00, 0x164fa4, 0x165048, 0x1650ec, 0x165190, 0x165234, 0x1652d8, 0x16537c, 0x165420, 0x1654c4, 0x165568, 0x16560c, 0x1656b0, 0x165754, 0x1657f8, 0x16589c, 0x165940, 0x1659e4, 0x165a88, 0x165b2c, 0x165bd0, 0x165c74, 0x165d18, 0x165dbc, 0x165e60, 0x165f04, 0x165fa8, 0x16604c, 0x1660f0, 0x166194, 0x166238, 0x1662dc, 0x166380, 0x166424, 0x1664c8, 0x16656c, 0x166610, 0x1666b4, 0x166758, 0x1667fc, 0x1668a0, 0x166944, 0x1669e8, 0x166a8c, 0x166b30, 0x166bd4, 0x166c78, 0x166d1c, 0x166dc0, 0x166e64, 0x166f08, 0x166fac, 0x167050, 0x1670f4, 0x167198, 0x16723c, 0x1672e0, 0x167384, 0x167428, 0x1674cc, 0x167570, 0x167614, 0x1676b8, 0x16775c, 0x167800, 0x16787c, 0x1678f8, 0x167974, 0x1679f0, 0x167a6c, 0x167ae8, 0x167b64, 0x167be0, 0x167c5c, 0x167cd8, 0x167d54, 0x167dd0, 0x167e4c, 0x167ec8, 0x167f44, 0x167fc0, 0x16803c, 0x1680b8, 0x168134, 0x1681b0, 0x16822c, 0x1682a8, 0x168324, 0x1683a0, 0x16841c, 0x168498, 0x168514, 0x168590, 0x16860c, 0x168688, 0x168704, 0x168780, 0x1687fc, 0x168878, 0x1688f4, 0x168970, 0x1689ec, 0x168a68, 0x168ae4, 0x168b60, 0x168bdc, 0x168c58, 0x168cd4, 0x168d50, 0x168dcc, 0x168e48, 0x168ec4, 0x168f40, 0x168fbc, 0x169038, 0x1690b4, 0x169130, 0x1691ac, 0x169228, 0x1692a4, 0x169320, 0x16939c, 0x169418, 0x169494, 0x169510, 0x16958c, 0x169608, 0x169684, 0x169700, 0x1697a4, 0x169848, 0x1698ec, 0x169990, 0x169a34, 0x169ad8, 0x169b7c, 0x169c20, 0x169cc4, 0x169d68, 0x169e0c, 0x169eb0, 0x169f54, 0x169ff8, 0x16a09c, 0x16a140, 0x16a1e4, 0x16a288, 0x16a32c, 0x16a3d0, 0x16a474, 0x16a518, 0x16a5bc, 0x16a660, 0x16a704, 0x16a7a8, 0x16a84c, 0x16a8f0, 0x16a994, 0x16aa38, 0x16aadc, 0x16ab80, 0x16ac24, 0x16acc8, 0x16ad6c, 0x16ae10, 0x16aeb4, 0x16af58, 0x16affc, 0x16b0a0, 0x16b144, 0x16b1e8, 0x16b28c, 0x16b330, 0x16b3d4, 0x16b478, 0x16b51c, 0x16b5c0, 0x16b664, 0x16b708, 0x16b7ac, 0x16b850, 0x16b8f4, 0x16b998, 0x16ba3c, 0x16bae0, 0x16bb84, 0x16bc28, 0x16bccc, 0x16bd70, 0x16be14, 0x16beb8, 0x16bf5c, 0x16c000, 0x16c07c, 0x16c0f8, 0x16c174, 0x16c1f0, 0x16c26c, 0x16c2e8, 0x16c364, 0x16c3e0, 0x16c45c, 0x16c4d8, 0x16c554, 0x16c5d0, 0x16c64c, 0x16c6c8, 0x16c744, 0x16c7c0, 0x16c83c, 0x16c8b8, 0x16c934, 0x16c9b0, 0x16ca2c, 0x16caa8, 0x16cb24, 0x16cba0, 0x16cc1c, 0x16cc98, 0x16cd14, 0x16cd90, 0x16ce0c, 0x16ce88, 0x16cf04, 0x16cf80, 0x16cffc, 0x16d078, 0x16d0f4, 0x16d170, 0x16d1ec, 0x16d268, 0x16d2e4, 0x16d360, 0x16d3dc, 0x16d458, 0x16d4d4, 0x16d550, 0x16d5cc, 0x16d648, 0x16d6c4, 0x16d740, 0x16d7bc, 0x16d838, 0x16d8b4, 0x16d930, 0x16d9ac, 0x16da28, 0x16daa4, 0x16db20, 0x16db9c, 0x16dc18, 0x16dc94, 0x16dd10, 0x16dd8c, 0x16de08, 0x16de84, 0x16df00, 0x16dfa4, 0x16e048, 0x16e0ec, 0x16e190, 0x16e234, 0x16e2d8, 0x16e37c, 0x16e420, 0x16e4c4, 0x16e568, 0x16e60c, 0x16e6b0, 0x16e754, 0x16e7f8, 0x16e89c, 0x16e940, 0x16e9e4, 0x16ea88, 0x16eb2c, 0x16ebd0, 0x16ec74, 0x16ed18, 0x16edbc, 0x16ee60, 0x16ef04, 0x16efa8, 0x16f04c, 0x16f0f0, 0x16f194, 0x16f238, 0x16f2dc, 0x16f380, 0x16f424, 0x16f4c8, 0x16f56c, 0x16f610, 0x16f6b4, 0x16f758, 0x16f7fc, 0x16f8a0, 0x16f944, 0x16f9e8, 0x16fa8c, 0x16fb30, 0x16fbd4, 0x16fc78, 0x16fd1c, 0x16fdc0, 0x16fe64, 0x16ff08, 0x16ffac, 0x170050, 0x1700f4, 0x170198, 0x17023c, 0x1702e0, 0x170384, 0x170428, 0x1704cc, 0x170570, 0x170614, 0x1706b8, 0x17075c, 0x170800, 0x17087c, 0x1708f8, 0x170974, 0x1709f0, 0x170a6c, 0x170ae8, 0x170b64, 0x170be0, 0x170c5c, 0x170cd8, 0x170d54, 0x170dd0, 0x170e4c, 0x170ec8, 0x170f44, 0x170fc0, 0x17103c, 0x1710b8, 0x171134, 0x1711b0, 0x17122c, 0x1712a8, 0x171324, 0x1713a0, 0x17141c, 0x171498, 0x171514, 0x171590, 0x17160c, 0x171688, 0x171704, 0x171780, 0x1717fc, 0x171878, 0x1718f4, 0x171970, 0x1719ec, 0x171a68, 0x171ae4, 0x171b60, 0x171bdc, 0x171c58, 0x171cd4, 0x171d50, 0x171dcc, 0x171e48, 0x171ec4, 0x171f40, 0x171fbc, 0x172038, 0x1720b4, 0x172130, 0x1721ac, 0x172228, 0x1722a4, 0x172320, 0x17239c, 0x172418, 0x172494, 0x172510, 0x17258c, 0x172608, 0x172684, 0x172700, 0x17277c, 0x1727f8, 0x172874, 0x1728f0, 0x17296c, 0x1729e8, 0x172a64, 0x172ae0, 0x172b5c, 0x172bd8, 0x172c54, 0x172cd0, 0x172d4c, 0x172dc8, 0x172e44, 0x172ec0, 0x172f3c, 0x172fb8, 0x173034, 0x1730b0, 0x17312c, 0x1731a8, 0x173224, 0x1732a0, 0x17331c, 0x173398, 0x173414, 0x173490, 0x17350c, 0x173588, 0x173604, 0x173680, 0x1736fc, 0x173778, 0x1737f4, 0x173870, 0x1738ec, 0x173968, 0x1739e4, 0x173a60, 0x173adc, 0x173b58, 0x173bd4, 0x173c50, 0x173ccc, 0x173d48, 0x173dc4, 0x173e40, 0x173ebc, 0x173f38, 0x173fb4, 0x174030, 0x1740ac, 0x174128, 0x1741a4, 0x174220, 0x17429c, 0x174318, 0x174394, 0x174410, 0x17448c, 0x174508, 0x174584, 0x174600, 0x17467c, 0x1746f8, 0x174774, 0x1747f0, 0x17486c, 0x1748e8, 0x174964, 0x1749e0, 0x174a5c, 0x174ad8, 0x174b54, 0x174bd0, 0x174c4c, 0x174cc8, 0x174d44, 0x174dc0, 0x174e3c, 0x174eb8, 0x174f34, 0x174fb0, 0x17502c, 0x1750a8, 0x175124, 0x1751a0, 0x17521c, 0x175298, 0x175314, 0x175390, 0x17540c, 0x175488, 0x175504, 0x175580, 0x1755fc, 0x175678, 0x1756f4, 0x175770, 0x1757ec, 0x175868, 0x1758e4, 0x175960, 0x1759dc, 0x175a58, 0x175ad4, 0x175b50, 0x175bcc, 0x175c48, 0x175cc4, 0x175d40, 0x175dbc, 0x175e38, 0x175eb4, 0x175f30, 0x175fac, 0x176028, 0x1760a4, 0x176120, 0x17619c, 0x176218, 0x176294, 0x176310, 0x17638c, 0x176408, 0x176484, 0x176500, 0x17657c, 0x1765f8, 0x176674, 0x1766f0, 0x17676c, 0x1767e8, 0x176864, 0x1768e0, 0x17695c, 0x1769d8, 0x176a54, 0x176ad0, 0x176b4c, 0x176bc8, 0x176c44, 0x176cc0, 0x176d3c, 0x176db8, 0x176e34, 0x176eb0, 0x176f2c, 0x176fa8, 0x177024, 0x1770a0, 0x17711c, 0x177198, 0x177214, 0x177290, 0x17730c, 0x177388, 0x177404, 0x177480, 0x1774fc, 0x177578, 0x1775f4, 0x177670, 0x1776ec, 0x177768, 0x1777e4, 0x177860, 0x1778dc, 0x177958, 0x1779d4, 0x177a50, 0x177acc, 0x177b48, 0x177bc4, 0x177c40, 0x177cbc, 0x177d38, 0x177db4, 0x177e30, 0x177eac, 0x177f28, 0x177fa4, 0x178020, 0x17809c, 0x178118, 0x178194, 0x178210, 0x17828c, 0x178308, 0x178384, 0x178400, 0x17847c, 0x1784f8, 0x178574, 0x1785f0, 0x17866c, 0x1786e8, 0x178764, 0x1787e0, 0x17885c, 0x1788d8, 0x178954, 0x1789d0, 0x178a4c, 0x178ac8, 0x178b44, 0x178bc0, 0x178c3c, 0x178cb8, 0x178d34, 0x178db0, 0x178e2c, 0x178ea8, 0x178f24, 0x178fa0, 0x17901c, 0x179098, 0x179114, 0x179190, 0x17920c, 0x179288, 0x179304, 0x179380, 0x179424, 0x1794c8, 0x17956c, 0x179610, 0x1796b4, 0x179758, 0x1797fc, 0x1798a0, 0x179944, 0x1799e8, 0x179a8c, 0x179b30, 0x179bd4, 0x179c78, 0x179d1c, 0x179dc0, 0x179e64, 0x179f08, 0x179fac, 0x17a050, 0x17a0f4, 0x17a198, 0x17a23c, 0x17a2e0, 0x17a384, 0x17a428, 0x17a4cc, 0x17a570, 0x17a614, 0x17a6b8, 0x17a75c, 0x17a800, 0x17a87c, 0x17a8f8, 0x17a974, 0x17a9f0, 0x17aa6c, 0x17aae8, 0x17ab64, 0x17abe0, 0x17ac5c, 0x17acd8, 0x17ad54, 0x17add0, 0x17ae4c, 0x17aec8, 0x17af44, 0x17afc0, 0x17b03c, 0x17b0b8, 0x17b134, 0x17b1b0, 0x17b22c, 0x17b2a8, 0x17b324, 0x17b3a0, 0x17b41c, 0x17b498, 0x17b514, 0x17b590, 0x17b60c, 0x17b688, 0x17b704, 0x17b780, 0x17b824, 0x17b8c8, 0x17b96c, 0x17ba10, 0x17bab4, 0x17bb58, 0x17bbfc, 0x17bca0, 0x17bd44, 0x17bde8, 0x17be8c, 0x17bf30, 0x17bfd4, 0x17c078, 0x17c11c, 0x17c1c0, 0x17c264, 0x17c308, 0x17c3ac, 0x17c450, 0x17c4f4, 0x17c598, 0x17c63c, 0x17c6e0, 0x17c784, 0x17c828, 0x17c8cc, 0x17c970, 0x17ca14, 0x17cab8, 0x17cb5c, 0x17cc00, 0x17cc7c, 0x17ccf8, 0x17cd74, 0x17cdf0, 0x17ce6c, 0x17cee8, 0x17cf64, 0x17cfe0, 0x17d05c, 0x17d0d8, 0x17d154, 0x17d1d0, 0x17d24c, 0x17d2c8, 0x17d344, 0x17d3c0, 0x17d43c, 0x17d4b8, 0x17d534, 0x17d5b0, 0x17d62c, 0x17d6a8, 0x17d724, 0x17d7a0, 0x17d81c, 0x17d898, 0x17d914, 0x17d990, 0x17da0c, 0x17da88, 0x17db04, 0x17db80, 0x17dc24, 0x17dcc8, 0x17dd6c, 0x17de10, 0x17deb4, 0x17df58, 0x17dffc, 0x17e0a0, 0x17e144, 0x17e1e8, 0x17e28c, 0x17e330, 0x17e3d4, 0x17e478, 0x17e51c, 0x17e5c0, 0x17e664, 0x17e708, 0x17e7ac, 0x17e850, 0x17e8f4, 0x17e998, 0x17ea3c, 0x17eae0, 0x17eb84, 0x17ec28, 0x17eccc, 0x17ed70, 0x17ee14, 0x17eeb8, 0x17ef5c, 0x17f000, 0x17f07c, 0x17f0f8, 0x17f174, 0x17f1f0, 0x17f26c, 0x17f2e8, 0x17f364, 0x17f3e0, 0x17f45c, 0x17f4d8, 0x17f554, 0x17f5d0, 0x17f64c, 0x17f6c8, 0x17f744, 0x17f7c0, 0x17f83c, 0x17f8b8, 0x17f934, 0x17f9b0, 0x17fa2c, 0x17faa8, 0x17fb24, 0x17fba0, 0x17fc1c, 0x17fc98, 0x17fd14, 0x17fd90, 0x17fe0c, 0x17fe88, 0x17ff04, 0x17ff80, 0x180024, 0x1800c8, 0x18016c, 0x180210, 0x1802b4, 0x180358, 0x1803fc, 0x1804a0, 0x180544, 0x1805e8, 0x18068c, 0x180730, 0x1807d4, 0x180878, 0x18091c, 0x1809c0, 0x180a64, 0x180b08, 0x180bac, 0x180c50, 0x180cf4, 0x180d98, 0x180e3c, 0x180ee0, 0x180f84, 0x181028, 0x1810cc, 0x181170, 0x181214, 0x1812b8, 0x18135c, 0x181400, 0x18147c, 0x1814f8, 0x181574, 0x1815f0, 0x18166c, 0x1816e8, 0x181764, 0x1817e0, 0x18185c, 0x1818d8, 0x181954, 0x1819d0, 0x181a4c, 0x181ac8, 0x181b44, 0x181bc0, 0x181c3c, 0x181cb8, 0x181d34, 0x181db0, 0x181e2c, 0x181ea8, 0x181f24, 0x181fa0, 0x18201c, 0x182098, 0x182114, 0x182190, 0x18220c, 0x182288, 0x182304, 0x182380, 0x1823fc, 0x182478, 0x1824f4, 0x182570, 0x1825ec, 0x182668, 0x1826e4, 0x182760, 0x1827dc, 0x182858, 0x1828d4, 0x182950, 0x1829cc, 0x182a48, 0x182ac4, 0x182b40, 0x182bbc, 0x182c38, 0x182cb4, 0x182d30, 0x182dac, 0x182e28, 0x182ea4, 0x182f20, 0x182f9c, 0x183018, 0x183094, 0x183110, 0x18318c, 0x183208, 0x183284, 0x183300, 0x18337c, 0x1833f8, 0x183474, 0x1834f0, 0x18356c, 0x1835e8, 0x183664, 0x1836e0, 0x18375c, 0x1837d8, 0x183854, 0x1838d0, 0x18394c, 0x1839c8, 0x183a44, 0x183ac0, 0x183b3c, 0x183bb8, 0x183c34, 0x183cb0, 0x183d2c, 0x183da8, 0x183e24, 0x183ea0, 0x183f1c, 0x183f98, 0x184014, 0x184090, 0x18410c, 0x184188, 0x184204, 0x184280, 0x1842fc, 0x184378, 0x1843f4, 0x184470, 0x1844ec, 0x184568, 0x1845e4, 0x184660, 0x1846dc, 0x184758, 0x1847d4, 0x184850, 0x1848cc, 0x184948, 0x1849c4, 0x184a40, 0x184abc, 0x184b38, 0x184bb4, 0x184c30, 0x184cac, 0x184d28, 0x184da4, 0x184e20, 0x184e9c, 0x184f18, 0x184f94, 0x185010, 0x18508c, 0x185108, 0x185184, 0x185200, 0x18527c, 0x1852f8, 0x185374, 0x1853f0, 0x18546c, 0x1854e8, 0x185564, 0x1855e0, 0x18565c, 0x1856d8, 0x185754, 0x1857d0, 0x18584c, 0x1858c8, 0x185944, 0x1859c0, 0x185a3c, 0x185ab8, 0x185b34, 0x185bb0, 0x185c2c, 0x185ca8, 0x185d24, 0x185da0, 0x185e1c, 0x185e98, 0x185f14, 0x185f90, 0x18600c, 0x186088, 0x186104, 0x186180, 0x1861fc, 0x186278, 0x1862f4, 0x186370, 0x1863ec, 0x186468, 0x1864e4, 0x186560, 0x1865dc, 0x186658, 0x1866d4, 0x186750, 0x1867cc, 0x186848, 0x1868c4, 0x186940, 0x1869bc, 0x186a38, 0x186ab4, 0x186b30, 0x186bac, 0x186c28, 0x186ca4, 0x186d20, 0x186d9c, 0x186e18, 0x186e94, 0x186f10, 0x186f8c, 0x187008, 0x187084, 0x187100, 0x18717c, 0x1871f8, 0x187274, 0x1872f0, 0x18736c, 0x1873e8, 0x187464, 0x1874e0, 0x18755c, 0x1875d8, 0x187654, 0x1876d0, 0x18774c, 0x1877c8, 0x187844, 0x1878c0, 0x18793c, 0x1879b8, 0x187a34, 0x187ab0, 0x187b2c, 0x187ba8, 0x187c24, 0x187ca0, 0x187d1c, 0x187d98, 0x187e14, 0x187e90, 0x187f0c, 0x187f88, 0x188004, 0x188080, 0x1880fc, 0x188178, 0x1881f4, 0x188270, 0x1882ec, 0x188368, 0x1883e4, 0x188460, 0x1884dc, 0x188558, 0x1885d4, 0x188650, 0x1886cc, 0x188748, 0x1887c4, 0x188840, 0x1888bc, 0x188938, 0x1889b4, 0x188a30, 0x188aac, 0x188b28, 0x188ba4, 0x188c20, 0x188c9c, 0x188d18, 0x188d94, 0x188e10, 0x188e8c, 0x188f08, 0x188f84, 0x189000, 0x18907c, 0x1890f8, 0x189174, 0x1891f0, 0x18926c, 0x1892e8, 0x189364, 0x1893e0, 0x18945c, 0x1894d8, 0x189554, 0x1895d0, 0x18964c, 0x1896c8, 0x189744, 0x1897c0, 0x18983c, 0x1898b8, 0x189934, 0x1899b0, 0x189a2c, 0x189aa8, 0x189b24, 0x189ba0, 0x189c1c, 0x189c98, 0x189d14, 0x189d90, 0x189e0c, 0x189e88, 0x189f04, 0x189f80, 0x18a024, 0x18a0c8, 0x18a16c, 0x18a210, 0x18a2b4, 0x18a358, 0x18a3fc, 0x18a4a0, 0x18a544, 0x18a5e8, 0x18a68c, 0x18a730, 0x18a7d4, 0x18a878, 0x18a91c, 0x18a9c0, 0x18aa64, 0x18ab08, 0x18abac, 0x18ac50, 0x18acf4, 0x18ad98, 0x18ae3c, 0x18aee0, 0x18af84, 0x18b028, 0x18b0cc, 0x18b170, 0x18b214, 0x18b2b8, 0x18b35c, 0x18b400, 0x18b47c, 0x18b4f8, 0x18b574, 0x18b5f0, 0x18b66c, 0x18b6e8, 0x18b764, 0x18b7e0, 0x18b85c, 0x18b8d8, 0x18b954, 0x18b9d0, 0x18ba4c, 0x18bac8, 0x18bb44, 0x18bbc0, 0x18bc3c, 0x18bcb8, 0x18bd34, 0x18bdb0, 0x18be2c, 0x18bea8, 0x18bf24, 0x18bfa0, 0x18c01c, 0x18c098, 0x18c114, 0x18c190, 0x18c20c, 0x18c288, 0x18c304, 0x18c380, 0x18c424, 0x18c4c8, 0x18c56c, 0x18c610, 0x18c6b4, 0x18c758, 0x18c7fc, 0x18c8a0, 0x18c944, 0x18c9e8, 0x18ca8c, 0x18cb30, 0x18cbd4, 0x18cc78, 0x18cd1c, 0x18cdc0, 0x18ce64, 0x18cf08, 0x18cfac, 0x18d050, 0x18d0f4, 0x18d198, 0x18d23c, 0x18d2e0, 0x18d384, 0x18d428, 0x18d4cc, 0x18d570, 0x18d614, 0x18d6b8, 0x18d75c, 0x18d800, 0x18d87c, 0x18d8f8, 0x18d974, 0x18d9f0, 0x18da6c, 0x18dae8, 0x18db64, 0x18dbe0, 0x18dc5c, 0x18dcd8, 0x18dd54, 0x18ddd0, 0x18de4c, 0x18dec8, 0x18df44, 0x18dfc0, 0x18e03c, 0x18e0b8, 0x18e134, 0x18e1b0, 0x18e22c, 0x18e2a8, 0x18e324, 0x18e3a0, 0x18e41c, 0x18e498, 0x18e514, 0x18e590, 0x18e60c, 0x18e688, 0x18e704, 0x18e780, 0x18e824, 0x18e8c8, 0x18e96c, 0x18ea10, 0x18eab4, 0x18eb58, 0x18ebfc, 0x18eca0, 0x18ed44, 0x18ede8, 0x18ee8c, 0x18ef30, 0x18efd4, 0x18f078, 0x18f11c, 0x18f1c0, 0x18f264, 0x18f308, 0x18f3ac, 0x18f450, 0x18f4f4, 0x18f598, 0x18f63c, 0x18f6e0, 0x18f784, 0x18f828, 0x18f8cc, 0x18f970, 0x18fa14, 0x18fab8, 0x18fb5c, 0x18fc00, 0x18fc7c, 0x18fcf8, 0x18fd74, 0x18fdf0, 0x18fe6c, 0x18fee8, 0x18ff64, 0x18ffe0, 0x19005c, 0x1900d8, 0x190154, 0x1901d0, 0x19024c, 0x1902c8, 0x190344, 0x1903c0, 0x19043c, 0x1904b8, 0x190534, 0x1905b0, 0x19062c, 0x1906a8, 0x190724, 0x1907a0, 0x19081c, 0x190898, 0x190914, 0x190990, 0x190a0c, 0x190a88, 0x190b04, 0x190b80, 0x190c24, 0x190cc8, 0x190d6c, 0x190e10, 0x190eb4, 0x190f58, 0x190ffc, 0x1910a0, 0x191144, 0x1911e8, 0x19128c, 0x191330, 0x1913d4, 0x191478, 0x19151c, 0x1915c0, 0x191664, 0x191708, 0x1917ac, 0x191850, 0x1918f4, 0x191998, 0x191a3c, 0x191ae0, 0x191b84, 0x191c28, 0x191ccc, 0x191d70, 0x191e14, 0x191eb8, 0x191f5c, 0x192000, 0x19207c, 0x1920f8, 0x192174, 0x1921f0, 0x19226c, 0x1922e8, 0x192364, 0x1923e0, 0x19245c, 0x1924d8, 0x192554, 0x1925d0, 0x19264c, 0x1926c8, 0x192744, 0x1927c0, 0x19283c, 0x1928b8, 0x192934, 0x1929b0, 0x192a2c, 0x192aa8, 0x192b24, 0x192ba0, 0x192c1c, 0x192c98, 0x192d14, 0x192d90, 0x192e0c, 0x192e88, 0x192f04, 0x192f80, 0x192ffc, 0x193078, 0x1930f4, 0x193170, 0x1931ec, 0x193268, 0x1932e4, 0x193360, 0x1933dc, 0x193458, 0x1934d4, 0x193550, 0x1935cc, 0x193648, 0x1936c4, 0x193740, 0x1937e4, 0x193888, 0x19392c, 0x1939d0, 0x193a74, 0x193b18, 0x193bbc, 0x193c60, 0x193d04, 0x193da8, 0x193e4c, 0x193ef0, 0x193f94, 0x194038, 0x1940dc, 0x194180, 0x1941fc, 0x194278, 0x1942f4, 0x194370, 0x1943ec, 0x194468, 0x1944e4, 0x194560, 0x1945dc, 0x194658, 0x1946d4, 0x194750, 0x1947cc, 0x194848, 0x1948c4, 0x194940, 0x1949bc, 0x194a38, 0x194ab4, 0x194b30, 0x194bac, 0x194c28, 0x194ca4, 0x194d20, 0x194d9c, 0x194e18, 0x194e94, 0x194f10, 0x194f8c, 0x195008, 0x195084, 0x195100, 0x19517c, 0x1951f8, 0x195274, 0x1952f0, 0x19536c, 0x1953e8, 0x195464, 0x1954e0, 0x19555c, 0x1955d8, 0x195654, 0x1956d0, 0x19574c, 0x1957c8, 0x195844, 0x1958c0, 0x195964, 0x195a08, 0x195aac, 0x195b50, 0x195bf4, 0x195c98, 0x195d3c, 0x195de0, 0x195e84, 0x195f28, 0x195fcc, 0x196070, 0x196114, 0x1961b8, 0x19625c, 0x196300, 0x19637c, 0x1963f8, 0x196474, 0x1964f0, 0x19656c, 0x1965e8, 0x196664, 0x1966e0, 0x19675c, 0x1967d8, 0x196854, 0x1968d0, 0x19694c, 0x1969c8, 0x196a44, 0x196ac0, 0x196b3c, 0x196bb8, 0x196c34, 0x196cb0, 0x196d2c, 0x196da8, 0x196e24, 0x196ea0, 0x196f1c, 0x196f98, 0x197014, 0x197090, 0x19710c, 0x197188, 0x197204, 0x197280, 0x1972fc, 0x197378, 0x1973f4, 0x197470, 0x1974ec, 0x197568, 0x1975e4, 0x197660, 0x1976dc, 0x197758, 0x1977d4, 0x197850, 0x1978cc, 0x197948, 0x1979c4, 0x197a40, 0x197ae4, 0x197b88, 0x197c2c, 0x197cd0, 0x197d74, 0x197e18, 0x197ebc, 0x197f60, 0x198004, 0x1980a8, 0x19814c, 0x1981f0, 0x198294, 0x198338, 0x1983dc, 0x198480, 0x1984fc, 0x198578, 0x1985f4, 0x198670, 0x1986ec, 0x198768, 0x1987e4, 0x198860, 0x1988dc, 0x198958, 0x1989d4, 0x198a50, 0x198acc, 0x198b48, 0x198bc4, 0x198c40, 0x198cbc, 0x198d38, 0x198db4, 0x198e30, 0x198eac, 0x198f28, 0x198fa4, 0x199020, 0x19909c, 0x199118, 0x199194, 0x199210, 0x19928c, 0x199308, 0x199384, 0x199400, 0x19947c, 0x1994f8, 0x199574, 0x1995f0, 0x19966c, 0x1996e8, 0x199764, 0x1997e0, 0x19985c, 0x1998d8, 0x199954, 0x1999d0, 0x199a4c, 0x199ac8, 0x199b44, 0x199bc0, 0x199c64, 0x199d08, 0x199dac, 0x199e50, 0x199ef4, 0x199f98, 0x19a03c, 0x19a0e0, 0x19a184, 0x19a228, 0x19a2cc, 0x19a370, 0x19a414, 0x19a4b8, 0x19a55c, 0x19a600, 0x19a67c, 0x19a6f8, 0x19a774, 0x19a7f0, 0x19a86c, 0x19a8e8, 0x19a964, 0x19a9e0, 0x19aa5c, 0x19aad8, 0x19ab54, 0x19abd0, 0x19ac4c, 0x19acc8, 0x19ad44, 0x19adc0, 0x19ae3c, 0x19aeb8, 0x19af34, 0x19afb0, 0x19b02c, 0x19b0a8, 0x19b124, 0x19b1a0, 0x19b21c, 0x19b298, 0x19b314, 0x19b390, 0x19b40c, 0x19b488, 0x19b504, 0x19b580, 0x19b5fc, 0x19b678, 0x19b6f4, 0x19b770, 0x19b7ec, 0x19b868, 0x19b8e4, 0x19b960, 0x19b9dc, 0x19ba58, 0x19bad4, 0x19bb50, 0x19bbcc, 0x19bc48, 0x19bcc4, 0x19bd40, 0x19bde4, 0x19be88, 0x19bf2c, 0x19bfd0, 0x19c074, 0x19c118, 0x19c1bc, 0x19c260, 0x19c304, 0x19c3a8, 0x19c44c, 0x19c4f0, 0x19c594, 0x19c638, 0x19c6dc, 0x19c780, 0x19c7fc, 0x19c878, 0x19c8f4, 0x19c970, 0x19c9ec, 0x19ca68, 0x19cae4, 0x19cb60, 0x19cbdc, 0x19cc58, 0x19ccd4, 0x19cd50, 0x19cdcc, 0x19ce48, 0x19cec4, 0x19cf40, 0x19cfbc, 0x19d038, 0x19d0b4, 0x19d130, 0x19d1ac, 0x19d228, 0x19d2a4, 0x19d320, 0x19d39c, 0x19d418, 0x19d494, 0x19d510, 0x19d58c, 0x19d608, 0x19d684, 0x19d700, 0x19d77c, 0x19d7f8, 0x19d874, 0x19d8f0, 0x19d96c, 0x19d9e8, 0x19da64, 0x19dae0, 0x19db5c, 0x19dbd8, 0x19dc54, 0x19dcd0, 0x19dd4c, 0x19ddc8, 0x19de44, 0x19dec0, 0x19df64, 0x19e008, 0x19e0ac, 0x19e150, 0x19e1f4, 0x19e298, 0x19e33c, 0x19e3e0, 0x19e484, 0x19e528, 0x19e5cc, 0x19e670, 0x19e714, 0x19e7b8, 0x19e85c, 0x19e900, 0x19e97c, 0x19e9f8, 0x19ea74, 0x19eaf0, 0x19eb6c, 0x19ebe8, 0x19ec64, 0x19ece0, 0x19ed5c, 0x19edd8, 0x19ee54, 0x19eed0, 0x19ef4c, 0x19efc8, 0x19f044, 0x19f0c0, 0x19f13c, 0x19f1b8, 0x19f234, 0x19f2b0, 0x19f32c, 0x19f3a8, 0x19f424, 0x19f4a0, 0x19f51c, 0x19f598, 0x19f614, 0x19f690, 0x19f70c, 0x19f788, 0x19f804, 0x19f880, 0x19f8fc, 0x19f978, 0x19f9f4, 0x19fa70, 0x19faec, 0x19fb68, 0x19fbe4, 0x19fc60, 0x19fcdc, 0x19fd58, 0x19fdd4, 0x19fe50, 0x19fecc, 0x19ff48, 0x19ffc4, 0x1a0040, 0x1a00e4, 0x1a0188, 0x1a022c, 0x1a02d0, 0x1a0374, 0x1a0418, 0x1a04bc, 0x1a0560, 0x1a0604, 0x1a06a8, 0x1a074c, 0x1a07f0, 0x1a0894, 0x1a0938, 0x1a09dc, 0x1a0a80, 0x1a0afc, 0x1a0b78, 0x1a0bf4, 0x1a0c70, 0x1a0cec, 0x1a0d68, 0x1a0de4, 0x1a0e60, 0x1a0edc, 0x1a0f58, 0x1a0fd4, 0x1a1050, 0x1a10cc, 0x1a1148, 0x1a11c4, 0x1a1240, 0x1a12bc, 0x1a1338, 0x1a13b4, 0x1a1430, 0x1a14ac, 0x1a1528, 0x1a15a4, 0x1a1620, 0x1a169c, 0x1a1718, 0x1a1794, 0x1a1810, 0x1a188c, 0x1a1908, 0x1a1984, 0x1a1a00, 0x1a1a7c, 0x1a1af8, 0x1a1b74, 0x1a1bf0, 0x1a1c6c, 0x1a1ce8, 0x1a1d64, 0x1a1de0, 0x1a1e5c, 0x1a1ed8, 0x1a1f54, 0x1a1fd0, 0x1a204c, 0x1a20c8, 0x1a2144, 0x1a21c0, 0x1a2264, 0x1a2308, 0x1a23ac, 0x1a2450, 0x1a24f4, 0x1a2598, 0x1a263c, 0x1a26e0, 0x1a2784, 0x1a2828, 0x1a28cc, 0x1a2970, 0x1a2a14, 0x1a2ab8, 0x1a2b5c, 0x1a2c00, 0x1a2c7c, 0x1a2cf8, 0x1a2d74, 0x1a2df0, 0x1a2e6c, 0x1a2ee8, 0x1a2f64, 0x1a2fe0, 0x1a305c, 0x1a30d8, 0x1a3154, 0x1a31d0, 0x1a324c, 0x1a32c8, 0x1a3344, 0x1a33c0, 0x1a343c, 0x1a34b8, 0x1a3534, 0x1a35b0, 0x1a362c, 0x1a36a8, 0x1a3724, 0x1a37a0, 0x1a381c, 0x1a3898, 0x1a3914, 0x1a3990, 0x1a3a0c, 0x1a3a88, 0x1a3b04, 0x1a3b80, 0x1a3bfc, 0x1a3c78, 0x1a3cf4, 0x1a3d70, 0x1a3dec, 0x1a3e68, 0x1a3ee4, 0x1a3f60, 0x1a3fdc, 0x1a4058, 0x1a40d4, 0x1a4150, 0x1a41cc, 0x1a4248, 0x1a42c4, 0x1a4340, 0x1a43e4, 0x1a4488, 0x1a452c, 0x1a45d0, 0x1a4674, 0x1a4718, 0x1a47bc, 0x1a4860, 0x1a4904, 0x1a49a8, 0x1a4a4c, 0x1a4af0, 0x1a4b94, 0x1a4c38, 0x1a4cdc, 0x1a4d80, 0x1a4dfc, 0x1a4e78, 0x1a4ef4, 0x1a4f70, 0x1a4fec, 0x1a5068, 0x1a50e4, 0x1a5160, 0x1a51dc, 0x1a5258, 0x1a52d4, 0x1a5350, 0x1a53cc, 0x1a5448, 0x1a54c4, 0x1a5540, 0x1a55bc, 0x1a5638, 0x1a56b4, 0x1a5730, 0x1a57ac, 0x1a5828, 0x1a58a4, 0x1a5920, 0x1a599c, 0x1a5a18, 0x1a5a94, 0x1a5b10, 0x1a5b8c, 0x1a5c08, 0x1a5c84, 0x1a5d00, 0x1a5d7c, 0x1a5df8, 0x1a5e74, 0x1a5ef0, 0x1a5f6c, 0x1a5fe8, 0x1a6064, 0x1a60e0, 0x1a615c, 0x1a61d8, 0x1a6254, 0x1a62d0, 0x1a634c, 0x1a63c8, 0x1a6444, 0x1a64c0, 0x1a6564, 0x1a6608, 0x1a66ac, 0x1a6750, 0x1a67f4, 0x1a6898, 0x1a693c, 0x1a69e0, 0x1a6a84, 0x1a6b28, 0x1a6bcc, 0x1a6c70, 0x1a6d14, 0x1a6db8, 0x1a6e5c, 0x1a6f00, 0x1a6f7c, 0x1a6ff8, 0x1a7074, 0x1a70f0, 0x1a716c, 0x1a71e8, 0x1a7264, 0x1a72e0, 0x1a735c, 0x1a73d8, 0x1a7454, 0x1a74d0, 0x1a754c, 0x1a75c8, 0x1a7644, 0x1a76c0, 0x1a773c, 0x1a77b8, 0x1a7834, 0x1a78b0, 0x1a792c, 0x1a79a8, 0x1a7a24, 0x1a7aa0, 0x1a7b1c, 0x1a7b98, 0x1a7c14, 0x1a7c90, 0x1a7d0c, 0x1a7d88, 0x1a7e04, 0x1a7e80, 0x1a7efc, 0x1a7f78, 0x1a7ff4, 0x1a8070, 0x1a80ec, 0x1a8168, 0x1a81e4, 0x1a8260, 0x1a82dc, 0x1a8358, 0x1a83d4, 0x1a8450, 0x1a84cc, 0x1a8548, 0x1a85c4, 0x1a8640, 0x1a86e4, 0x1a8788, 0x1a882c, 0x1a88d0, 0x1a8974, 0x1a8a18, 0x1a8abc, 0x1a8b60, 0x1a8c04, 0x1a8ca8, 0x1a8d4c, 0x1a8df0, 0x1a8e94, 0x1a8f38, 0x1a8fdc, 0x1a9080, 0x1a90fc, 0x1a9178, 0x1a91f4, 0x1a9270, 0x1a92ec, 0x1a9368, 0x1a93e4, 0x1a9460, 0x1a94dc, 0x1a9558, 0x1a95d4, 0x1a9650, 0x1a96cc, 0x1a9748, 0x1a97c4, 0x1a9840, 0x1a98bc, 0x1a9938, 0x1a99b4, 0x1a9a30, 0x1a9aac, 0x1a9b28, 0x1a9ba4, 0x1a9c20, 0x1a9c9c, 0x1a9d18, 0x1a9d94, 0x1a9e10, 0x1a9e8c, 0x1a9f08, 0x1a9f84, 0x1aa000, 0x1aa07c, 0x1aa0f8, 0x1aa174, 0x1aa1f0, 0x1aa26c, 0x1aa2e8, 0x1aa364, 0x1aa3e0, 0x1aa45c, 0x1aa4d8, 0x1aa554, 0x1aa5d0, 0x1aa64c, 0x1aa6c8, 0x1aa744, 0x1aa7c0, 0x1aa864, 0x1aa908, 0x1aa9ac, 0x1aaa50, 0x1aaaf4, 0x1aab98, 0x1aac3c, 0x1aace0, 0x1aad84, 0x1aae28, 0x1aaecc, 0x1aaf70, 0x1ab014, 0x1ab0b8, 0x1ab15c, 0x1ab200, 0x1ab27c, 0x1ab2f8, 0x1ab374, 0x1ab3f0, 0x1ab46c, 0x1ab4e8, 0x1ab564, 0x1ab5e0, 0x1ab65c, 0x1ab6d8, 0x1ab754, 0x1ab7d0, 0x1ab84c, 0x1ab8c8, 0x1ab944, 0x1ab9c0, 0x1aba3c, 0x1abab8, 0x1abb34, 0x1abbb0, 0x1abc2c, 0x1abca8, 0x1abd24, 0x1abda0, 0x1abe1c, 0x1abe98, 0x1abf14, 0x1abf90, 0x1ac00c, 0x1ac088, 0x1ac104, 0x1ac180, 0x1ac1fc, 0x1ac278, 0x1ac2f4, 0x1ac370, 0x1ac3ec, 0x1ac468, 0x1ac4e4, 0x1ac560, 0x1ac5dc, 0x1ac658, 0x1ac6d4, 0x1ac750, 0x1ac7cc, 0x1ac848, 0x1ac8c4, 0x1ac940, 0x1ac9e4, 0x1aca88, 0x1acb2c, 0x1acbd0, 0x1acc74, 0x1acd18, 0x1acdbc, 0x1ace60, 0x1acf04, 0x1acfa8, 0x1ad04c, 0x1ad0f0, 0x1ad194, 0x1ad238, 0x1ad2dc, 0x1ad380, 0x1ad3fc, 0x1ad478, 0x1ad4f4, 0x1ad570, 0x1ad5ec, 0x1ad668, 0x1ad6e4, 0x1ad760, 0x1ad7dc, 0x1ad858, 0x1ad8d4, 0x1ad950, 0x1ad9cc, 0x1ada48, 0x1adac4, 0x1adb40, 0x1adbbc, 0x1adc38, 0x1adcb4, 0x1add30, 0x1addac, 0x1ade28, 0x1adea4, 0x1adf20, 0x1adf9c, 0x1ae018, 0x1ae094, 0x1ae110, 0x1ae18c, 0x1ae208, 0x1ae284, 0x1ae300, 0x1ae37c, 0x1ae3f8, 0x1ae474, 0x1ae4f0, 0x1ae56c, 0x1ae5e8, 0x1ae664, 0x1ae6e0, 0x1ae75c, 0x1ae7d8, 0x1ae854, 0x1ae8d0, 0x1ae94c, 0x1ae9c8, 0x1aea44, 0x1aeac0, 0x1aeb64, 0x1aec08, 0x1aecac, 0x1aed50, 0x1aedf4, 0x1aee98, 0x1aef3c, 0x1aefe0, 0x1af084, 0x1af128, 0x1af1cc, 0x1af270, 0x1af314, 0x1af3b8, 0x1af45c, 0x1af500, 0x1af57c, 0x1af5f8, 0x1af674, 0x1af6f0, 0x1af76c, 0x1af7e8, 0x1af864, 0x1af8e0, 0x1af95c, 0x1af9d8, 0x1afa54, 0x1afad0, 0x1afb4c, 0x1afbc8, 0x1afc44, 0x1afcc0, 0x1afd3c, 0x1afdb8, 0x1afe34, 0x1afeb0, 0x1aff2c, 0x1affa8, 0x1b0024, 0x1b00a0, 0x1b011c, 0x1b0198, 0x1b0214, 0x1b0290, 0x1b030c, 0x1b0388, 0x1b0404, 0x1b0480, 0x1b04fc, 0x1b0578, 0x1b05f4, 0x1b0670, 0x1b06ec, 0x1b0768, 0x1b07e4, 0x1b0860, 0x1b08dc, 0x1b0958, 0x1b09d4, 0x1b0a50, 0x1b0acc, 0x1b0b48, 0x1b0bc4, 0x1b0c40, 0x1b0ce4, 0x1b0d88, 0x1b0e2c, 0x1b0ed0, 0x1b0f74, 0x1b1018, 0x1b10bc, 0x1b1160, 0x1b1204, 0x1b12a8, 0x1b134c, 0x1b13f0, 0x1b1494, 0x1b1538, 0x1b15dc, 0x1b1680, 0x1b16fc, 0x1b1778, 0x1b17f4, 0x1b1870, 0x1b18ec, 0x1b1968, 0x1b19e4, 0x1b1a60, 0x1b1adc, 0x1b1b58, 0x1b1bd4, 0x1b1c50, 0x1b1ccc, 0x1b1d48, 0x1b1dc4, 0x1b1e40, 0x1b1ebc, 0x1b1f38, 0x1b1fb4, 0x1b2030, 0x1b20ac, 0x1b2128, 0x1b21a4, 0x1b2220, 0x1b229c, 0x1b2318, 0x1b2394, 0x1b2410, 0x1b248c, 0x1b2508, 0x1b2584, 0x1b2600, 0x1b267c, 0x1b26f8, 0x1b2774, 0x1b27f0, 0x1b286c, 0x1b28e8, 0x1b2964, 0x1b29e0, 0x1b2a5c, 0x1b2ad8, 0x1b2b54, 0x1b2bd0, 0x1b2c4c, 0x1b2cc8, 0x1b2d44, 0x1b2dc0, 0x1b2e64, 0x1b2f08, 0x1b2fac, 0x1b3050, 0x1b30f4, 0x1b3198, 0x1b323c, 0x1b32e0, 0x1b3384, 0x1b3428, 0x1b34cc, 0x1b3570, 0x1b3614, 0x1b36b8, 0x1b375c, 0x1b3800, 0x1b387c, 0x1b38f8, 0x1b3974, 0x1b39f0, 0x1b3a6c, 0x1b3ae8, 0x1b3b64, 0x1b3be0, 0x1b3c5c, 0x1b3cd8, 0x1b3d54, 0x1b3dd0, 0x1b3e4c, 0x1b3ec8, 0x1b3f44, 0x1b3fc0, 0x1b403c, 0x1b40b8, 0x1b4134, 0x1b41b0, 0x1b422c, 0x1b42a8, 0x1b4324, 0x1b43a0, 0x1b441c, 0x1b4498, 0x1b4514, 0x1b4590, 0x1b460c, 0x1b4688, 0x1b4704, 0x1b4780, 0x1b47fc, 0x1b4878, 0x1b48f4, 0x1b4970, 0x1b49ec, 0x1b4a68, 0x1b4ae4, 0x1b4b60, 0x1b4bdc, 0x1b4c58, 0x1b4cd4, 0x1b4d50, 0x1b4dcc, 0x1b4e48, 0x1b4ec4, 0x1b4f40, 0x1b4fbc, 0x1b5038, 0x1b50b4, 0x1b5130, 0x1b51ac, 0x1b5228, 0x1b52a4, 0x1b5320, 0x1b539c, 0x1b5418, 0x1b5494, 0x1b5510, 0x1b558c, 0x1b5608, 0x1b5684, 0x1b5700, 0x1b577c, 0x1b57f8, 0x1b5874, 0x1b58f0, 0x1b596c, 0x1b59e8, 0x1b5a64, 0x1b5ae0, 0x1b5b5c, 0x1b5bd8, 0x1b5c54, 0x1b5cd0, 0x1b5d4c, 0x1b5dc8, 0x1b5e44, 0x1b5ec0, 0x1b5f3c, 0x1b5fb8, 0x1b6034, 0x1b60b0, 0x1b612c, 0x1b61a8, 0x1b6224, 0x1b62a0, 0x1b631c, 0x1b6398, 0x1b6414, 0x1b6490, 0x1b650c, 0x1b6588, 0x1b6604, 0x1b6680, 0x1b66fc, 0x1b6778, 0x1b67f4, 0x1b6870, 0x1b68ec, 0x1b6968, 0x1b69e4, 0x1b6a60, 0x1b6adc, 0x1b6b58, 0x1b6bd4, 0x1b6c50, 0x1b6ccc, 0x1b6d48, 0x1b6dc4, 0x1b6e40, 0x1b6ebc, 0x1b6f38, 0x1b6fb4, 0x1b7030, 0x1b70ac, 0x1b7128, 0x1b71a4, 0x1b7220, 0x1b729c, 0x1b7318, 0x1b7394, 0x1b7410, 0x1b748c, 0x1b7508, 0x1b7584, 0x1b7600, 0x1b767c, 0x1b76f8, 0x1b779c, 0x1b7840, 0x1b78bc, 0x1b7938, 0x1b79dc, 0x1b7a80, 0x1b7afc, 0x1b7b78, 0x1b7c1c, 0x1b7cc0, 0x1b7d3c, 0x1b7db8, 0x1b7e5c, 0x1b7f00, 0x1b7f7c, 0x1b7ff8, 0x1b809c, 0x1b8140, 0x1b81bc, 0x1b8238, 0x1b82dc, 0x1b8380, 0x1b83fc, 0x1b8478, 0x1b851c, 0x1b85c0, 0x1b863c, 0x1b86b8, 0x1b875c, 0x1b8800, 0x1b887c, 0x1b88f8, 0x1b899c, 0x1b8a40, 0x1b8abc, 0x1b8b38, 0x1b8bdc, 0x1b8c80, 0x1b8cfc, 0x1b8d78, 0x1b8e1c, 0x1b8ec0, 0x1b8f3c, 0x1b8fb8, 0x1b905c, 0x1b9100, 0x1b917c, 0x1b91f8, 0x1b929c, 0x1b9340, 0x1b93bc, 0x1b9438, 0x1b94dc, 0x1b9580, 0x1b95fc, 0x1b9678, 0x1b971c, 0x1b97c0, 0x1b983c, 0x1b98b8, 0x1b995c, 0x1b9a00, 0x1b9a7c, 0x1b9af8, 0x1b9b9c, 0x1b9c40, 0x1b9cbc, 0x1b9d38, 0x1b9ddc, 0x1b9e80, 0x1b9efc, 0x1b9f78, 0x1ba01c, 0x1ba0c0, 0x1ba13c, 0x1ba1b8, 0x1ba25c, 0x1ba300, 0x1ba37c, 0x1ba3f8, 0x1ba49c, 0x1ba540, 0x1ba5bc, 0x1ba638, 0x1ba6dc, 0x1ba780, 0x1ba7fc, 0x1ba878, 0x1ba91c, 0x1ba9c0, 0x1baa3c, 0x1baab8, 0x1bab5c, 0x1bac00, 0x1bac7c, 0x1bacf8, 0x1bad9c, 0x1bae40, 0x1baebc, 0x1baf38, 0x1bafdc, 0x1bb080, 0x1bb0fc, 0x1bb178, 0x1bb21c, 0x1bb2c0, 0x1bb33c, 0x1bb3b8, 0x1bb45c, 0x1bb500, 0x1bb57c, 0x1bb5f8, 0x1bb69c, 0x1bb740, 0x1bb7bc, 0x1bb838, 0x1bb8dc, 0x1bb980, 0x1bb9fc, 0x1bba78, 0x1bbb1c, 0x1bbbc0, 0x1bbc3c, 0x1bbcb8, 0x1bbd5c, 0x1bbe00, 0x1bbe7c, 0x1bbef8, 0x1bbf74, 0x1bbff0, 0x1bc06c, 0x1bc0e8, 0x1bc164, 0x1bc1e0, 0x1bc25c, 0x1bc2d8, 0x1bc354, 0x1bc3d0, 0x1bc44c, 0x1bc4c8, 0x1bc544, 0x1bc5c0, 0x1bc63c, 0x1bc6b8, 0x1bc734, 0x1bc7b0, 0x1bc82c, 0x1bc8a8, 0x1bc924, 0x1bc9a0, 0x1bca1c, 0x1bca98, 0x1bcb14, 0x1bcb90, 0x1bcc0c, 0x1bcc88, 0x1bcd04, 0x1bcd80, 0x1bcdfc, 0x1bce78, 0x1bcef4, 0x1bcf70, 0x1bcfec, 0x1bd068, 0x1bd0e4, 0x1bd160, 0x1bd1dc, 0x1bd258, 0x1bd2d4, 0x1bd350, 0x1bd3cc, 0x1bd448, 0x1bd4c4, 0x1bd540, 0x1bd5bc, 0x1bd638, 0x1bd6b4, 0x1bd730, 0x1bd7ac, 0x1bd828, 0x1bd8a4, 0x1bd920, 0x1bd99c, 0x1bda18, 0x1bda94, 0x1bdb10, 0x1bdb8c, 0x1bdc08, 0x1bdc84, 0x1bdd00, 0x1bdd7c, 0x1bddf8, 0x1bde74, 0x1bdef0, 0x1bdf6c, 0x1bdfe8, 0x1be064, 0x1be0e0, 0x1be15c, 0x1be1d8, 0x1be254, 0x1be2d0, 0x1be34c, 0x1be3c8, 0x1be444, 0x1be4c0, 0x1be53c, 0x1be5b8, 0x1be634, 0x1be6b0, 0x1be72c, 0x1be7a8, 0x1be824, 0x1be8a0, 0x1be91c, 0x1be998, 0x1bea14, 0x1bea90, 0x1beb0c, 0x1beb88, 0x1bec04, 0x1bec80, 0x1becfc, 0x1bed78, 0x1bedf4, 0x1bee70, 0x1beeec, 0x1bef68, 0x1befe4, 0x1bf060, 0x1bf0dc, 0x1bf158, 0x1bf1d4, 0x1bf250, 0x1bf2cc, 0x1bf348, 0x1bf3c4, 0x1bf440, 0x1bf4bc, 0x1bf538, 0x1bf5b4, 0x1bf630, 0x1bf6ac, 0x1bf728, 0x1bf7a4, 0x1bf820, 0x1bf89c, 0x1bf918, 0x1bf994, 0x1bfa10, 0x1bfa8c, 0x1bfb08, 0x1bfb84, 0x1bfc00, 0x1bfc7c, 0x1bfcf8, 0x1bfd9c, 0x1bfe40, 0x1bfebc, 0x1bff38, 0x1bffdc, 0x1c0080, 0x1c00fc, 0x1c0178, 0x1c021c, 0x1c02c0, 0x1c033c, 0x1c03b8, 0x1c045c, 0x1c0500, 0x1c057c, 0x1c05f8, 0x1c069c, 0x1c0740, 0x1c07bc, 0x1c0838, 0x1c08dc, 0x1c0980, 0x1c09fc, 0x1c0a78, 0x1c0b1c, 0x1c0bc0, 0x1c0c3c, 0x1c0cb8, 0x1c0d5c, 0x1c0e00, 0x1c0e7c, 0x1c0ef8, 0x1c0f9c, 0x1c1040, 0x1c10bc, 0x1c1138, 0x1c11dc, 0x1c1280, 0x1c12fc, 0x1c1378, 0x1c141c, 0x1c14c0, 0x1c153c, 0x1c15b8, 0x1c165c, 0x1c1700, 0x1c177c, 0x1c17f8, 0x1c189c, 0x1c1940, 0x1c19bc, 0x1c1a38, 0x1c1adc, 0x1c1b80, 0x1c1bfc, 0x1c1c78, 0x1c1d1c, 0x1c1dc0, 0x1c1e3c, 0x1c1eb8, 0x1c1f5c, 0x1c2000, 0x1c207c, 0x1c20f8, 0x1c219c, 0x1c2240, 0x1c22bc, 0x1c2338, 0x1c23dc, 0x1c2480, 0x1c24fc, 0x1c2578, 0x1c261c, 0x1c26c0, 0x1c273c, 0x1c27b8, 0x1c285c, 0x1c2900, 0x1c297c, 0x1c29f8, 0x1c2a9c, 0x1c2b40, 0x1c2bbc, 0x1c2c38, 0x1c2cdc, 0x1c2d80, 0x1c2dfc, 0x1c2e78, 0x1c2f1c, 0x1c2fc0, 0x1c303c, 0x1c30b8, 0x1c315c, 0x1c3200, 0x1c327c, 0x1c32f8, 0x1c339c, 0x1c3440, 0x1c34bc, 0x1c3538, 0x1c35dc, 0x1c3680, 0x1c36fc, 0x1c3778, 0x1c381c, 0x1c38c0, 0x1c393c, 0x1c39b8, 0x1c3a5c, 0x1c3b00, 0x1c3b7c, 0x1c3bf8, 0x1c3c9c, 0x1c3d40, 0x1c3dbc, 0x1c3e38, 0x1c3edc, 0x1c3f80, 0x1c3ffc, 0x1c4078, 0x1c411c, 0x1c41c0, 0x1c423c, 0x1c42b8, 0x1c435c, 0x1c4400, 0x1c447c, 0x1c44f8, 0x1c4574, 0x1c45f0, 0x1c466c, 0x1c46e8, 0x1c4764, 0x1c47e0, 0x1c485c, 0x1c48d8, 0x1c4954, 0x1c49d0, 0x1c4a4c, 0x1c4ac8, 0x1c4b44, 0x1c4bc0, 0x1c4c3c, 0x1c4cb8, 0x1c4d34, 0x1c4db0, 0x1c4e2c, 0x1c4ea8, 0x1c4f24, 0x1c4fa0, 0x1c501c, 0x1c5098, 0x1c5114, 0x1c5190, 0x1c520c, 0x1c5288, 0x1c5304, 0x1c5380, 0x1c53fc, 0x1c5478, 0x1c54f4, 0x1c5570, 0x1c55ec, 0x1c5668, 0x1c56e4, 0x1c5760, 0x1c57dc, 0x1c5858, 0x1c58d4, 0x1c5950, 0x1c59cc, 0x1c5a48, 0x1c5ac4, 0x1c5b40, 0x1c5bbc, 0x1c5c38, 0x1c5cb4, 0x1c5d30, 0x1c5dac, 0x1c5e28, 0x1c5ea4, 0x1c5f20, 0x1c5f9c, 0x1c6018, 0x1c6094, 0x1c6110, 0x1c618c, 0x1c6208, 0x1c6284, 0x1c6300, 0x1c637c, 0x1c63f8, 0x1c6474, 0x1c64f0, 0x1c656c, 0x1c65e8, 0x1c6664, 0x1c66e0, 0x1c675c, 0x1c67d8, 0x1c6854, 0x1c68d0, 0x1c694c, 0x1c69c8, 0x1c6a44, 0x1c6ac0, 0x1c6b3c, 0x1c6bb8, 0x1c6c34, 0x1c6cb0, 0x1c6d2c, 0x1c6da8, 0x1c6e24, 0x1c6ea0, 0x1c6f1c, 0x1c6f98, 0x1c7014, 0x1c7090, 0x1c710c, 0x1c7188, 0x1c7204, 0x1c7280, 0x1c72fc, 0x1c7378, 0x1c73f4, 0x1c7470, 0x1c74ec, 0x1c7568, 0x1c75e4, 0x1c7660, 0x1c76dc, 0x1c7758, 0x1c77d4, 0x1c7850, 0x1c78cc, 0x1c7948, 0x1c79c4, 0x1c7a40, 0x1c7abc, 0x1c7b38, 0x1c7bb4, 0x1c7c30, 0x1c7cac, 0x1c7d28, 0x1c7da4, 0x1c7e20, 0x1c7e9c, 0x1c7f18, 0x1c7f94, 0x1c8010, 0x1c808c, 0x1c8108, 0x1c8184, 0x1c8200, 0x1c827c, 0x1c82f8, 0x1c839c, 0x1c8440, 0x1c84bc, 0x1c8538, 0x1c85dc, 0x1c8680, 0x1c86fc, 0x1c8778, 0x1c881c, 0x1c88c0, 0x1c893c, 0x1c89b8, 0x1c8a5c, 0x1c8b00, 0x1c8b7c, 0x1c8bf8, 0x1c8c9c, 0x1c8d40, 0x1c8dbc, 0x1c8e38, 0x1c8edc, 0x1c8f80, 0x1c8ffc, 0x1c9078, 0x1c911c, 0x1c91c0, 0x1c923c, 0x1c92b8, 0x1c935c, 0x1c9400, 0x1c947c, 0x1c94f8, 0x1c959c, 0x1c9640, 0x1c96bc, 0x1c9738, 0x1c97dc, 0x1c9880, 0x1c98fc, 0x1c9978, 0x1c9a1c, 0x1c9ac0, 0x1c9b3c, 0x1c9bb8, 0x1c9c5c, 0x1c9d00, 0x1c9d7c, 0x1c9df8, 0x1c9e9c, 0x1c9f40, 0x1c9fbc, 0x1ca038, 0x1ca0dc, 0x1ca180, 0x1ca1fc, 0x1ca278, 0x1ca31c, 0x1ca3c0, 0x1ca43c, 0x1ca4b8, 0x1ca55c, 0x1ca600, 0x1ca67c, 0x1ca6f8, 0x1ca79c, 0x1ca840, 0x1ca8bc, 0x1ca938, 0x1ca9dc, 0x1caa80, 0x1caafc, 0x1cab78, 0x1cac1c, 0x1cacc0, 0x1cad3c, 0x1cadb8, 0x1cae5c, 0x1caf00, 0x1caf7c, 0x1caff8, 0x1cb09c, 0x1cb140, 0x1cb1bc, 0x1cb238, 0x1cb2dc, 0x1cb380, 0x1cb3fc, 0x1cb478, 0x1cb51c, 0x1cb5c0, 0x1cb63c, 0x1cb6b8, 0x1cb75c, 0x1cb800, 0x1cb87c, 0x1cb8f8, 0x1cb99c, 0x1cba40, 0x1cbabc, 0x1cbb38, 0x1cbbdc, 0x1cbc80, 0x1cbcfc, 0x1cbd78, 0x1cbe1c, 0x1cbec0, 0x1cbf3c, 0x1cbfb8, 0x1cc05c, 0x1cc100, 0x1cc17c, 0x1cc1f8, 0x1cc29c, 0x1cc340, 0x1cc3bc, 0x1cc438, 0x1cc4dc, 0x1cc580, 0x1cc5fc, 0x1cc678, 0x1cc71c, 0x1cc7c0, 0x1cc83c, 0x1cc8b8, 0x1cc95c, 0x1cca00, 0x1cca7c, 0x1ccaf8, 0x1ccb74, 0x1ccbf0, 0x1ccc6c, 0x1ccce8, 0x1ccd64, 0x1ccde0, 0x1cce5c, 0x1cced8, 0x1ccf54, 0x1ccfd0, 0x1cd04c, 0x1cd0c8, 0x1cd144, 0x1cd1c0, 0x1cd23c, 0x1cd2b8, 0x1cd334, 0x1cd3b0, 0x1cd42c, 0x1cd4a8, 0x1cd524, 0x1cd5a0, 0x1cd61c, 0x1cd698, 0x1cd714, 0x1cd790, 0x1cd80c, 0x1cd888, 0x1cd904, 0x1cd980, 0x1cd9fc, 0x1cda78, 0x1cdaf4, 0x1cdb70, 0x1cdbec, 0x1cdc68, 0x1cdce4, 0x1cdd60, 0x1cdddc, 0x1cde58, 0x1cded4, 0x1cdf50, 0x1cdfcc, 0x1ce048, 0x1ce0c4, 0x1ce140, 0x1ce1bc, 0x1ce238, 0x1ce2b4, 0x1ce330, 0x1ce3ac, 0x1ce428, 0x1ce4a4, 0x1ce520, 0x1ce59c, 0x1ce618, 0x1ce694, 0x1ce710, 0x1ce78c, 0x1ce808, 0x1ce884, 0x1ce900, 0x1ce97c, 0x1ce9f8, 0x1cea74, 0x1ceaf0, 0x1ceb6c, 0x1cebe8, 0x1cec64, 0x1cece0, 0x1ced5c, 0x1cedd8, 0x1cee54, 0x1ceed0, 0x1cef4c, 0x1cefc8, 0x1cf044, 0x1cf0c0, 0x1cf13c, 0x1cf1b8, 0x1cf234, 0x1cf2b0, 0x1cf32c, 0x1cf3a8, 0x1cf424, 0x1cf4a0, 0x1cf51c, 0x1cf598, 0x1cf614, 0x1cf690, 0x1cf70c, 0x1cf788, 0x1cf804, 0x1cf880, 0x1cf8fc, 0x1cf978, 0x1cf9f4, 0x1cfa70, 0x1cfaec, 0x1cfb68, 0x1cfbe4, 0x1cfc60, 0x1cfcdc, 0x1cfd58, 0x1cfdd4, 0x1cfe50, 0x1cfecc, 0x1cff48, 0x1cffc4, 0x1d0040, 0x1d00bc, 0x1d0138, 0x1d01b4, 0x1d0230, 0x1d02ac, 0x1d0328, 0x1d03a4, 0x1d0420, 0x1d049c, 0x1d0518, 0x1d0594, 0x1d0610, 0x1d068c, 0x1d0708, 0x1d0784, 0x1d0800, 0x1d087c, 0x1d08f8, 0x1d099c, 0x1d0a40, 0x1d0abc, 0x1d0b38, 0x1d0bdc, 0x1d0c80, 0x1d0cfc, 0x1d0d78, 0x1d0e1c, 0x1d0ec0, 0x1d0f3c, 0x1d0fb8, 0x1d105c, 0x1d1100, 0x1d117c, 0x1d11f8, 0x1d129c, 0x1d1340, 0x1d13bc, 0x1d1438, 0x1d14dc, 0x1d1580, 0x1d15fc, 0x1d1678, 0x1d171c, 0x1d17c0, 0x1d183c, 0x1d18b8, 0x1d195c, 0x1d1a00, 0x1d1a7c, 0x1d1af8, 0x1d1b9c, 0x1d1c40, 0x1d1cbc, 0x1d1d38, 0x1d1ddc, 0x1d1e80, 0x1d1efc, 0x1d1f78, 0x1d201c, 0x1d20c0, 0x1d213c, 0x1d21b8, 0x1d225c, 0x1d2300, 0x1d237c, 0x1d23f8, 0x1d249c, 0x1d2540, 0x1d25bc, 0x1d2638, 0x1d26dc, 0x1d2780, 0x1d27fc, 0x1d2878, 0x1d291c, 0x1d29c0, 0x1d2a3c, 0x1d2ab8, 0x1d2b5c, 0x1d2c00, 0x1d2c7c, 0x1d2cf8, 0x1d2d9c, 0x1d2e40, 0x1d2ebc, 0x1d2f38, 0x1d2fdc, 0x1d3080, 0x1d30fc, 0x1d3178, 0x1d321c, 0x1d32c0, 0x1d333c, 0x1d33b8, 0x1d345c, 0x1d3500, 0x1d357c, 0x1d35f8, 0x1d369c, 0x1d3740, 0x1d37bc, 0x1d3838, 0x1d38dc, 0x1d3980, 0x1d39fc, 0x1d3a78, 0x1d3b1c, 0x1d3bc0, 0x1d3c3c, 0x1d3cb8, 0x1d3d5c, 0x1d3e00, 0x1d3e7c, 0x1d3ef8, 0x1d3f9c, 0x1d4040, 0x1d40bc, 0x1d4138, 0x1d41dc, 0x1d4280, 0x1d42fc, 0x1d4378, 0x1d441c, 0x1d44c0, 0x1d453c, 0x1d45b8, 0x1d465c, 0x1d4700, 0x1d477c, 0x1d47f8, 0x1d489c, 0x1d4940, 0x1d49bc, 0x1d4a38, 0x1d4adc, 0x1d4b80, 0x1d4bfc, 0x1d4c78, 0x1d4d1c, 0x1d4dc0, 0x1d4e3c, 0x1d4eb8, 0x1d4f5c, 0x1d5000, 0x1d507c, 0x1d50f8, 0x000000, 0x1d513c, 0x1d51b8, 0x000000, 0x000000, 0x1d5234, 0x1d52b0, 0x000000, 0x000000, 0x1d532c, 0x1d53a8, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x1d5424, 0x1d54a0, 0x000000, 0x000000, 0x1d551c, 0x1d5598, 0x000000, 0x000000, 0x1d5614, 0x1d5690, 0x000000, 0x000000, 0x1d570c, 0x1d5788, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x1d5804, 0x1d5880, 0x000000, 0x000000, 0x1d58fc, 0x1d5978, 0x000000, 0x000000, 0x1d59f4, 0x1d5a70, 0x000000, 0x000000, 0x1d5aec, 0x1d5b68, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x1d5be4, 0x1d5c60, 0x000000, 0x000000, 0x1d5cdc, 0x1d5d58, 0x000000, 0x000000, 0x1d5dd4, 0x1d5e50, 0x000000, 0x000000, 0x1d5ecc, 0x1d5f48, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x1d5fc4, 0x1d6040, 0x000000, 0x000000, 0x1d60bc, 0x1d6138, 0x000000, 0x000000, 0x1d61b4, 0x1d6230, 0x000000, 0x000000, 0x1d62ac, 0x1d6328, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x1d63a4, 0x1d6420, 0x000000, 0x000000, 0x1d649c, 0x1d6518, 0x000000, 0x000000, 0x1d6594, 0x1d6610, 0x000000, 0x000000, 0x1d668c, 0x1d6708, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x1d6784, 0x1d6800, 0x000000, 0x000000, 0x1d687c, 0x1d68f8, 0x000000, 0x000000, 0x1d6974, 0x1d69f0, 0x000000, 0x000000, 0x1d6a6c, 0x1d6ae8, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x1d6b64, 0x1d6be0, 0x000000, 0x000000, 0x1d6c5c, 0x1d6cd8, 0x000000, 0x000000, 0x1d6d54, 0x1d6dd0, 0x000000, 0x000000, 0x1d6e4c, 0x1d6ec8, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x1d6f44, 0x1d6fe8, 0x000000, 0x000000, 0x1d7064, 0x1d7108, 0x000000, 0x000000, 0x1d7184, 0x1d7228, 0x000000, 0x000000, 0x1d72a4, 0x1d7348, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x1d73c4, 0x1d7468, 0x000000, 0x000000, 0x1d74e4, 0x1d7588, 0x000000, 0x000000, 0x1d7604, 0x1d76a8, 0x000000, 0x000000, 0x1d7724, 0x1d77c8, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x1d7844, 0x1d78e8, 0x000000, 0x000000, 0x1d7964, 0x1d7a08, 0x000000, 0x000000, 0x1d7a84, 0x1d7b28, 0x000000, 0x000000, 0x1d7ba4, 0x1d7c48, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x1d7cc4, 0x1d7d68, 0x000000, 0x000000, 0x1d7de4, 0x1d7e88, 0x000000, 0x000000, 0x1d7f04, 0x1d7fa8, 0x000000, 0x000000, 0x1d8024, 0x1d80c8, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x1d8144, 0x1d81e8, 0x000000, 0x000000, 0x1d8264, 0x1d8308, 0x000000, 0x000000, 0x1d8384, 0x1d8428, 0x000000, 0x000000, 0x1d84a4, 0x1d8548, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x1d85c4, 0x1d8668, 0x000000, 0x000000, 0x1d86e4, 0x1d8788, 0x000000, 0x000000, 0x1d8804, 0x1d88a8, 0x000000, 0x000000, 0x1d8924, 0x1d89c8, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x1d8a44, 0x1d8ae8, 0x000000, 0x000000, 0x1d8b64, 0x1d8c08, 0x000000, 0x000000, 0x1d8c84, 0x1d8d28, 0x000000, 0x000000, 0x1d8da4, 0x1d8e48, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x1d8ec4, 0x1d8f68, 0x000000, 0x000000, 0x1d8fe4, 0x1d9088, 0x000000, 0x000000, 0x1d9104, 0x1d91a8, 0x000000, 0x000000, 0x1d9224, 0x1d92c8, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x1d9344, 0x1d93c0, 0x000000, 0x000000, 0x1d943c, 0x1d94b8, 0x000000, 0x000000, 0x1d9534, 0x1d95b0, 0x000000, 0x000000, 0x1d962c, 0x1d96a8, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x1d9724, 0x1d97a0, 0x000000, 0x000000, 0x1d981c, 0x1d9898, 0x000000, 0x000000, 0x1d9914, 0x1d9990, 0x000000, 0x000000, 0x1d9a0c, 0x1d9a88, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x1d9b04, 0x1d9b80, 0x000000, 0x000000, 0x1d9bfc, 0x1d9c78, 0x000000, 0x000000, 0x1d9cf4, 0x1d9d70, 0x000000, 0x000000, 0x1d9dec, 0x1d9e68, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x1d9ee4, 0x1d9f60, 0x000000, 0x000000, 0x1d9fdc, 0x1da058, 0x000000, 0x000000, 0x1da0d4, 0x1da150, 0x000000, 0x000000, 0x1da1cc, 0x1da248, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x1da2c4, 0x1da340, 0x000000, 0x000000, 0x1da3bc, 0x1da438, 0x000000, 0x000000, 0x1da4b4, 0x1da530, 0x000000, 0x000000, 0x1da5ac, 0x1da628, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x1da6a4, 0x1da720, 0x000000, 0x000000, 0x1da79c, 0x1da818, 0x000000, 0x000000, 0x1da894, 0x1da910, 0x000000, 0x000000, 0x1da98c, 0x1daa08, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x1daa84, 0x1dab00, 0x000000, 0x000000, 0x1dab7c, 0x1dabf8, 0x000000, 0x000000, 0x1dac74, 0x1dacf0, 0x000000, 0x000000, 0x1dad6c, 0x1dade8, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x1dae64, 0x1daee0, 0x000000, 0x000000, 0x1daf5c, 0x1dafd8, 0x000000, 0x000000, 0x1db054, 0x1db0d0, 0x000000, 0x000000, 0x1db14c, 0x1db1c8, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x1db244, 0x1db2e8, 0x000000, 0x000000, 0x1db364, 0x1db408, 0x000000, 0x000000, 0x1db484, 0x1db528, 0x000000, 0x000000, 0x1db5a4, 0x1db648, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x1db6c4, 0x1db768, 0x000000, 0x000000, 0x1db7e4, 0x1db888, 0x000000, 0x000000, 0x1db904, 0x1db9a8, 0x000000, 0x000000, 0x1dba24, 0x1dbac8, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x1dbb44, 0x1dbbe8, 0x000000, 0x000000, 0x1dbc64, 0x1dbd08, 0x000000, 0x000000, 0x1dbd84, 0x1dbe28, 0x000000, 0x000000, 0x1dbea4, 0x1dbf48, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x1dbfc4, 0x1dc068, 0x000000, 0x000000, 0x1dc0e4, 0x1dc188, 0x000000, 0x000000, 0x1dc204, 0x1dc2a8, 0x000000, 0x000000, 0x1dc324, 0x1dc3c8, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x1dc444, 0x1dc4e8, 0x000000, 0x000000, 0x1dc564, 0x1dc608, 0x000000, 0x000000, 0x1dc684, 0x1dc728, 0x000000, 0x000000, 0x1dc7a4, 0x1dc848, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x1dc8c4, 0x1dc968, 0x000000, 0x000000, 0x1dc9e4, 0x1dca88, 0x000000, 0x000000, 0x1dcb04, 0x1dcba8, 0x000000, 0x000000, 0x1dcc24, 0x1dccc8, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x1dcd44, 0x1dcde8, 0x000000, 0x000000, 0x1dce64, 0x1dcf08, 0x000000, 0x000000, 0x1dcf84, 0x1dd028, 0x000000, 0x000000, 0x1dd0a4, 0x1dd148, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x1dd1c4, 0x1dd268, 0x000000, 0x000000, 0x1dd2e4, 0x1dd388, 0x000000, 0x000000, 0x1dd404, 0x1dd4a8, 0x000000, 0x000000, 0x1dd524, 0x1dd5c8, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000 };
the_stack_data/73576175.c
#include <stdlib.h> #include <stdio.h> int main(int argc, char* argv[]) { char * s = "azAZ9."; // test boundaries long l = a64l(s); if (l != 194301926) { printf("Invalid result: a64l(%s) = %ld\n", s, l); return 1; } printf("Correct a64l: %s = %ld\n", s, l); s = "azA"; // test null terminated string l = a64l(s); if (l != 53222) { printf("Invalid result: a64l(%s) = %ld\n", s, l); return 1; } printf("Correct a64l: %s = %ld\n", s, l); return 0; }
the_stack_data/148579482.c
#include <stdio.h> #include <string.h> int bu_degeri_bulmayin_ya[] = {0x79,0x61,0x76,0x61,0x73,0x20,0x79,0x61,0x76,0x61,0x73,0x20,0x69,0x73,0x69,0x6e,0x69,0x79,0x6f,0x72,0x75,0x7a,0x20,0x64,0x65,0x67,0x69,0x6c,0x20,0x6d,0x69,0x3f}; int harika_fonksiyon(const char* value){ int len = sizeof(bu_degeri_bulmayin_ya) / sizeof(int); if(strlen(value) < len){ return 0; } int i; for(i=0;i<len;i++){ if(value[i] != bu_degeri_bulmayin_ya[i]){ return 0; } } return 1; } int main(int argc, char *argv[]) { if(argc < 2){ printf("Kullanim: %s <deger>", argv[0]); }else{ if(harika_fonksiyon(argv[1]) == 1){ printf("tebrikler beni kirdiniz!"); }else{ printf("bu sefer olmadi :("); } } return 0; }
the_stack_data/100713.c
/* text version of maze 'mazefiles/binary/euro84.maz' generated by mazetool (c) Peter Harrison 2018 o---o---o---o---o---o---o---o---o---o---o---o---o---o---o---o---o | | | | o o---o---o o o---o---o---o---o o o o---o---o---o o | | | | | | | o---o---o o---o---o o---o---o---o o o---o---o o o---o | | | | | | | o o---o---o o---o---o o o o---o---o o---o---o o o | | | | | | | | | | o o o o o o---o o o---o---o---o o---o---o o o | | | | | | | | | | o o o o o o---o---o o---o---o---o o o o o o | | | | | | | | | | | o o o---o---o o o---o---o---o---o o o o o o o | | | | | | | | | | o o o o---o---o---o o---o---o o o o o o o o | | | | | | | | | | | | o o o---o---o o o o o o o o o---o---o o o | | | | | | | | | | o o---o---o---o o o o---o---o o o o o---o---o o | | | | | | | | | | o o o---o o o o o---o---o---o o o---o---o o o | | | | | | | | | | | o o---o o o o o---o---o o o o o o o---o o | | | | | | | | | o---o---o---o o o---o---o o---o---o o---o o o---o---o | | | | | | | | o o o---o---o---o---o o---o---o---o---o o o o o o | | | | | | | | o o o o---o---o o---o---o o---o---o---o o---o---o o | | | | | | | | | o o o---o---o o o o o---o---o---o---o---o o o o | | | | | | o---o---o---o---o---o---o---o---o---o---o---o---o---o---o---o---o */ int euro84_maz[] ={ 0x0E, 0x0A, 0x0A, 0x09, 0x0C, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x09, 0x0C, 0x09, 0x0C, 0x0A, 0x0A, 0x01, 0x05, 0x0C, 0x09, 0x0C, 0x0A, 0x0A, 0x0A, 0x0A, 0x09, 0x05, 0x05, 0x05, 0x05, 0x0C, 0x09, 0x05, 0x06, 0x03, 0x05, 0x05, 0x0C, 0x09, 0x0C, 0x0A, 0x03, 0x06, 0x03, 0x05, 0x05, 0x05, 0x05, 0x06, 0x0A, 0x0A, 0x03, 0x05, 0x05, 0x05, 0x06, 0x0A, 0x0A, 0x09, 0x0C, 0x03, 0x06, 0x03, 0x05, 0x0C, 0x0A, 0x0A, 0x0A, 0x02, 0x01, 0x06, 0x0A, 0x08, 0x09, 0x05, 0x06, 0x09, 0x0C, 0x0A, 0x03, 0x05, 0x0C, 0x0A, 0x0A, 0x0A, 0x03, 0x0C, 0x09, 0x05, 0x05, 0x06, 0x09, 0x05, 0x06, 0x09, 0x0C, 0x03, 0x05, 0x0C, 0x08, 0x0A, 0x0A, 0x01, 0x05, 0x06, 0x02, 0x09, 0x05, 0x05, 0x0C, 0x03, 0x05, 0x0C, 0x03, 0x05, 0x05, 0x0C, 0x09, 0x05, 0x04, 0x08, 0x0A, 0x03, 0x05, 0x05, 0x05, 0x0C, 0x01, 0x05, 0x0C, 0x03, 0x05, 0x04, 0x03, 0x05, 0x05, 0x05, 0x0C, 0x09, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x06, 0x09, 0x06, 0x02, 0x0A, 0x03, 0x05, 0x05, 0x05, 0x06, 0x02, 0x01, 0x05, 0x05, 0x05, 0x06, 0x08, 0x02, 0x0A, 0x0A, 0x0A, 0x0A, 0x03, 0x05, 0x07, 0x0C, 0x0A, 0x03, 0x05, 0x05, 0x06, 0x0B, 0x06, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x02, 0x0A, 0x01, 0x0C, 0x09, 0x05, 0x06, 0x0A, 0x0A, 0x0A, 0x09, 0x0C, 0x09, 0x0C, 0x0A, 0x0A, 0x09, 0x0D, 0x05, 0x05, 0x05, 0x06, 0x09, 0x0C, 0x0A, 0x08, 0x01, 0x05, 0x05, 0x06, 0x08, 0x0A, 0x03, 0x05, 0x06, 0x03, 0x05, 0x0C, 0x03, 0x06, 0x09, 0x05, 0x06, 0x03, 0x06, 0x0A, 0x02, 0x0A, 0x0A, 0x02, 0x08, 0x09, 0x05, 0x06, 0x0A, 0x0A, 0x03, 0x06, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x03, 0x06, 0x03, }; /* end of mazefile */
the_stack_data/127055.c
/** ****************************************************************************** * @file stm32f3xx_ll_rtc.c * @author MCD Application Team * @version V1.3.0 * @date 01-July-2016 * @brief RTC LL module driver. ****************************************************************************** * @attention * * <h2><center>&copy; COPYRIGHT(c) 2016 STMicroelectronics</center></h2> * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * 3. Neither the name of STMicroelectronics nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * ****************************************************************************** */ #if defined(USE_FULL_LL_DRIVER) /* Includes ------------------------------------------------------------------*/ #include "stm32f3xx_ll_rtc.h" #include "stm32f3xx_ll_cortex.h" #ifdef USE_FULL_ASSERT #include "stm32_assert.h" #else #define assert_param(expr) ((void)0U) #endif /** @addtogroup STM32F3xx_LL_Driver * @{ */ #if defined(RTC) /** @addtogroup RTC_LL * @{ */ /* Private types -------------------------------------------------------------*/ /* Private variables ---------------------------------------------------------*/ /* Private constants ---------------------------------------------------------*/ /** @addtogroup RTC_LL_Private_Constants * @{ */ /* Default values used for prescaler */ #define RTC_ASYNCH_PRESC_DEFAULT ((uint32_t) 0x0000007FU) #define RTC_SYNCH_PRESC_DEFAULT ((uint32_t) 0x000000FFU) /* Values used for timeout */ #define RTC_INITMODE_TIMEOUT ((uint32_t) 1000U) /* 1s when tick set to 1ms */ #define RTC_SYNCHRO_TIMEOUT ((uint32_t) 1000U) /* 1s when tick set to 1ms */ /** * @} */ /* Private macros ------------------------------------------------------------*/ /** @addtogroup RTC_LL_Private_Macros * @{ */ #define IS_LL_RTC_HOURFORMAT(__VALUE__) (((__VALUE__) == LL_RTC_HOURFORMAT_24HOUR) \ || ((__VALUE__) == LL_RTC_HOURFORMAT_AMPM)) #define IS_LL_RTC_ASYNCH_PREDIV(__VALUE__) ((__VALUE__) <= (uint32_t)0x7FU) #define IS_LL_RTC_SYNCH_PREDIV(__VALUE__) ((__VALUE__) <= (uint32_t)0x7FFFU) #define IS_LL_RTC_FORMAT(__VALUE__) (((__VALUE__) == LL_RTC_FORMAT_BIN) \ || ((__VALUE__) == LL_RTC_FORMAT_BCD)) #define IS_LL_RTC_TIME_FORMAT(__VALUE__) (((__VALUE__) == LL_RTC_TIME_FORMAT_AM_OR_24) \ || ((__VALUE__) == LL_RTC_TIME_FORMAT_PM)) #define IS_LL_RTC_HOUR12(__HOUR__) (((__HOUR__) > 0U) && ((__HOUR__) <= 12U)) #define IS_LL_RTC_HOUR24(__HOUR__) ((__HOUR__) <= 23U) #define IS_LL_RTC_MINUTES(__MINUTES__) ((__MINUTES__) <= 59U) #define IS_LL_RTC_SECONDS(__SECONDS__) ((__SECONDS__) <= 59U) #define IS_LL_RTC_WEEKDAY(__VALUE__) (((__VALUE__) == LL_RTC_WEEKDAY_MONDAY) \ || ((__VALUE__) == LL_RTC_WEEKDAY_TUESDAY) \ || ((__VALUE__) == LL_RTC_WEEKDAY_WEDNESDAY) \ || ((__VALUE__) == LL_RTC_WEEKDAY_THURSDAY) \ || ((__VALUE__) == LL_RTC_WEEKDAY_FRIDAY) \ || ((__VALUE__) == LL_RTC_WEEKDAY_SATURDAY) \ || ((__VALUE__) == LL_RTC_WEEKDAY_SUNDAY)) #define IS_LL_RTC_DAY(__DAY__) (((__DAY__) >= (uint32_t)1U) && ((__DAY__) <= (uint32_t)31U)) #define IS_LL_RTC_MONTH(__VALUE__) (((__VALUE__) == LL_RTC_MONTH_JANUARY) \ || ((__VALUE__) == LL_RTC_MONTH_FEBRUARY) \ || ((__VALUE__) == LL_RTC_MONTH_MARCH) \ || ((__VALUE__) == LL_RTC_MONTH_APRIL) \ || ((__VALUE__) == LL_RTC_MONTH_MAY) \ || ((__VALUE__) == LL_RTC_MONTH_JUNE) \ || ((__VALUE__) == LL_RTC_MONTH_JULY) \ || ((__VALUE__) == LL_RTC_MONTH_AUGUST) \ || ((__VALUE__) == LL_RTC_MONTH_SEPTEMBER) \ || ((__VALUE__) == LL_RTC_MONTH_OCTOBER) \ || ((__VALUE__) == LL_RTC_MONTH_NOVEMBER) \ || ((__VALUE__) == LL_RTC_MONTH_DECEMBER)) #define IS_LL_RTC_YEAR(__YEAR__) ((__YEAR__) <= 99U) #define IS_LL_RTC_ALMA_MASK(__VALUE__) (((__VALUE__) == LL_RTC_ALMA_MASK_NONE) \ || ((__VALUE__) == LL_RTC_ALMA_MASK_DATEWEEKDAY) \ || ((__VALUE__) == LL_RTC_ALMA_MASK_HOURS) \ || ((__VALUE__) == LL_RTC_ALMA_MASK_MINUTES) \ || ((__VALUE__) == LL_RTC_ALMA_MASK_SECONDS) \ || ((__VALUE__) == LL_RTC_ALMA_MASK_ALL)) #define IS_LL_RTC_ALMB_MASK(__VALUE__) (((__VALUE__) == LL_RTC_ALMB_MASK_NONE) \ || ((__VALUE__) == LL_RTC_ALMB_MASK_DATEWEEKDAY) \ || ((__VALUE__) == LL_RTC_ALMB_MASK_HOURS) \ || ((__VALUE__) == LL_RTC_ALMB_MASK_MINUTES) \ || ((__VALUE__) == LL_RTC_ALMB_MASK_SECONDS) \ || ((__VALUE__) == LL_RTC_ALMB_MASK_ALL)) #define IS_LL_RTC_ALMA_DATE_WEEKDAY_SEL(__SEL__) (((__SEL__) == LL_RTC_ALMA_DATEWEEKDAYSEL_DATE) || \ ((__SEL__) == LL_RTC_ALMA_DATEWEEKDAYSEL_WEEKDAY)) #define IS_LL_RTC_ALMB_DATE_WEEKDAY_SEL(__SEL__) (((__SEL__) == LL_RTC_ALMB_DATEWEEKDAYSEL_DATE) || \ ((__SEL__) == LL_RTC_ALMB_DATEWEEKDAYSEL_WEEKDAY)) /** * @} */ /* Private function prototypes -----------------------------------------------*/ /* Exported functions --------------------------------------------------------*/ /** @addtogroup RTC_LL_Exported_Functions * @{ */ /** @addtogroup RTC_LL_EF_Init * @{ */ /** * @brief De-Initializes the RTC registers to their default reset values. * @note This function doesn't reset the RTC Clock source and RTC Backup Data * registers. * @param RTCx RTC Instance * @retval An ErrorStatus enumeration value: * - SUCCESS: RTC registers are de-initialized * - ERROR: RTC registers are not de-initialized */ ErrorStatus LL_RTC_DeInit(RTC_TypeDef *RTCx) { ErrorStatus status = ERROR; /* Check the parameter */ assert_param(IS_RTC_ALL_INSTANCE(RTCx)); /* Disable the write protection for RTC registers */ LL_RTC_DisableWriteProtection(RTCx); /* Set Initialization mode */ if (LL_RTC_EnterInitMode(RTCx) != ERROR) { /* Reset TR, DR and CR registers */ LL_RTC_WriteReg(RTCx, TR, 0x00000000U); #if defined(RTC_WAKEUP_SUPPORT) LL_RTC_WriteReg(RTCx, WUTR, RTC_WUTR_WUT); #endif /* RTC_WAKEUP_SUPPORT */ LL_RTC_WriteReg(RTCx, DR , (RTC_DR_WDU_0 | RTC_DR_MU_0 | RTC_DR_DU_0)); /* Reset All CR bits except CR[2:0] */ #if defined(RTC_WAKEUP_SUPPORT) LL_RTC_WriteReg(RTCx, CR, (LL_RTC_ReadReg(RTCx, CR) & RTC_CR_WUCKSEL)); #else LL_RTC_WriteReg(RTCx, CR, 0x00000000U); #endif /* RTC_WAKEUP_SUPPORT */ LL_RTC_WriteReg(RTCx, PRER, (RTC_PRER_PREDIV_A | RTC_SYNCH_PRESC_DEFAULT)); LL_RTC_WriteReg(RTCx, ALRMAR, 0x00000000U); LL_RTC_WriteReg(RTCx, ALRMBR, 0x00000000U); LL_RTC_WriteReg(RTCx, SHIFTR, 0x00000000U); LL_RTC_WriteReg(RTCx, CALR, 0x00000000U); LL_RTC_WriteReg(RTCx, ALRMASSR, 0x00000000U); LL_RTC_WriteReg(RTCx, ALRMBSSR, 0x00000000U); /* Reset ISR register and exit initialization mode */ LL_RTC_WriteReg(RTCx, ISR, 0x00000000U); /* Reset Tamper and alternate functions configuration register */ LL_RTC_WriteReg(RTCx, TAFCR, 0x00000000U); /* Wait till the RTC RSF flag is set */ status = LL_RTC_WaitForSynchro(RTCx); } /* Enable the write protection for RTC registers */ LL_RTC_EnableWriteProtection(RTCx); return status; } /** * @brief Initializes the RTC registers according to the specified parameters * in RTC_InitStruct. * @param RTCx RTC Instance * @param RTC_InitStruct pointer to a @ref LL_RTC_InitTypeDef structure that contains * the configuration information for the RTC peripheral. * @note The RTC Prescaler register is write protected and can be written in * initialization mode only. * @retval An ErrorStatus enumeration value: * - SUCCESS: RTC registers are initialized * - ERROR: RTC registers are not initialized */ ErrorStatus LL_RTC_Init(RTC_TypeDef *RTCx, LL_RTC_InitTypeDef *RTC_InitStruct) { ErrorStatus status = ERROR; /* Check the parameters */ assert_param(IS_RTC_ALL_INSTANCE(RTCx)); assert_param(IS_LL_RTC_HOURFORMAT(RTC_InitStruct->HourFormat)); assert_param(IS_LL_RTC_ASYNCH_PREDIV(RTC_InitStruct->AsynchPrescaler)); assert_param(IS_LL_RTC_SYNCH_PREDIV(RTC_InitStruct->SynchPrescaler)); /* Disable the write protection for RTC registers */ LL_RTC_DisableWriteProtection(RTCx); /* Set Initialization mode */ if (LL_RTC_EnterInitMode(RTCx) != ERROR) { /* Set Hour Format */ LL_RTC_SetHourFormat(RTCx, RTC_InitStruct->HourFormat); /* Configure Synchronous and Asynchronous prescaler factor */ LL_RTC_SetSynchPrescaler(RTCx, RTC_InitStruct->SynchPrescaler); LL_RTC_SetAsynchPrescaler(RTCx, RTC_InitStruct->AsynchPrescaler); /* Exit Initialization mode */ LL_RTC_DisableInitMode(RTCx); status = SUCCESS; } /* Enable the write protection for RTC registers */ LL_RTC_EnableWriteProtection(RTCx); return status; } /** * @brief Set each @ref LL_RTC_InitTypeDef field to default value. * @param RTC_InitStruct pointer to a @ref LL_RTC_InitTypeDef structure which will be initialized. * @retval None */ void LL_RTC_StructInit(LL_RTC_InitTypeDef *RTC_InitStruct) { /* Set RTC_InitStruct fields to default values */ RTC_InitStruct->HourFormat = LL_RTC_HOURFORMAT_24HOUR; RTC_InitStruct->AsynchPrescaler = RTC_ASYNCH_PRESC_DEFAULT; RTC_InitStruct->SynchPrescaler = RTC_SYNCH_PRESC_DEFAULT; } /** * @brief Set the RTC current time. * @param RTCx RTC Instance * @param RTC_Format This parameter can be one of the following values: * @arg @ref LL_RTC_FORMAT_BIN * @arg @ref LL_RTC_FORMAT_BCD * @param RTC_TimeStruct pointer to a RTC_TimeTypeDef structure that contains * the time configuration information for the RTC. * @retval An ErrorStatus enumeration value: * - SUCCESS: RTC Time register is configured * - ERROR: RTC Time register is not configured */ ErrorStatus LL_RTC_TIME_Init(RTC_TypeDef *RTCx, uint32_t RTC_Format, LL_RTC_TimeTypeDef *RTC_TimeStruct) { ErrorStatus status = ERROR; /* Check the parameters */ assert_param(IS_RTC_ALL_INSTANCE(RTCx)); assert_param(IS_LL_RTC_FORMAT(RTC_Format)); if (RTC_Format == LL_RTC_FORMAT_BIN) { if (LL_RTC_GetHourFormat(RTCx) != LL_RTC_HOURFORMAT_24HOUR) { assert_param(IS_LL_RTC_HOUR12(RTC_TimeStruct->Hours)); assert_param(IS_LL_RTC_TIME_FORMAT(RTC_TimeStruct->TimeFormat)); } else { RTC_TimeStruct->TimeFormat = 0x00U; assert_param(IS_LL_RTC_HOUR24(RTC_TimeStruct->Hours)); } assert_param(IS_LL_RTC_MINUTES(RTC_TimeStruct->Minutes)); assert_param(IS_LL_RTC_SECONDS(RTC_TimeStruct->Seconds)); } else { if (LL_RTC_GetHourFormat(RTCx) != LL_RTC_HOURFORMAT_24HOUR) { assert_param(IS_LL_RTC_HOUR12(__LL_RTC_CONVERT_BCD2BIN(RTC_TimeStruct->Hours))); assert_param(IS_LL_RTC_TIME_FORMAT(RTC_TimeStruct->TimeFormat)); } else { RTC_TimeStruct->TimeFormat = 0x00U; assert_param(IS_LL_RTC_HOUR24(__LL_RTC_CONVERT_BCD2BIN(RTC_TimeStruct->Hours))); } assert_param(IS_LL_RTC_MINUTES(__LL_RTC_CONVERT_BCD2BIN(RTC_TimeStruct->Minutes))); assert_param(IS_LL_RTC_SECONDS(__LL_RTC_CONVERT_BCD2BIN(RTC_TimeStruct->Seconds))); } /* Disable the write protection for RTC registers */ LL_RTC_DisableWriteProtection(RTCx); /* Set Initialization mode */ if (LL_RTC_EnterInitMode(RTCx) != ERROR) { /* Check the input parameters format */ if (RTC_Format != LL_RTC_FORMAT_BIN) { LL_RTC_TIME_Config(RTCx, RTC_TimeStruct->TimeFormat, RTC_TimeStruct->Hours, RTC_TimeStruct->Minutes, RTC_TimeStruct->Seconds); } else { LL_RTC_TIME_Config(RTCx, RTC_TimeStruct->TimeFormat, __LL_RTC_CONVERT_BIN2BCD(RTC_TimeStruct->Hours), __LL_RTC_CONVERT_BIN2BCD(RTC_TimeStruct->Minutes), __LL_RTC_CONVERT_BIN2BCD(RTC_TimeStruct->Seconds)); } /* Exit Initialization mode */ LL_RTC_DisableInitMode(RTC); /* If RTC_CR_BYPSHAD bit = 0, wait for synchro else this check is not needed */ if (LL_RTC_IsShadowRegBypassEnabled(RTCx) == 0U) { status = LL_RTC_WaitForSynchro(RTCx); } else { status = SUCCESS; } } /* Enable the write protection for RTC registers */ LL_RTC_EnableWriteProtection(RTCx); return status; } /** * @brief Set each @ref LL_RTC_TimeTypeDef field to default value (Time = 00h:00min:00sec). * @param RTC_TimeStruct pointer to a @ref LL_RTC_TimeTypeDef structure which will be initialized. * @retval None */ void LL_RTC_TIME_StructInit(LL_RTC_TimeTypeDef *RTC_TimeStruct) { /* Time = 00h:00min:00sec */ RTC_TimeStruct->TimeFormat = LL_RTC_TIME_FORMAT_AM_OR_24; RTC_TimeStruct->Hours = 0U; RTC_TimeStruct->Minutes = 0U; RTC_TimeStruct->Seconds = 0U; } /** * @brief Set the RTC current date. * @param RTCx RTC Instance * @param RTC_Format This parameter can be one of the following values: * @arg @ref LL_RTC_FORMAT_BIN * @arg @ref LL_RTC_FORMAT_BCD * @param RTC_DateStruct: pointer to a RTC_DateTypeDef structure that contains * the date configuration information for the RTC. * @retval An ErrorStatus enumeration value: * - SUCCESS: RTC Day register is configured * - ERROR: RTC Day register is not configured */ ErrorStatus LL_RTC_DATE_Init(RTC_TypeDef *RTCx, uint32_t RTC_Format, LL_RTC_DateTypeDef *RTC_DateStruct) { ErrorStatus status = ERROR; /* Check the parameters */ assert_param(IS_RTC_ALL_INSTANCE(RTCx)); assert_param(IS_LL_RTC_FORMAT(RTC_Format)); if ((RTC_Format == LL_RTC_FORMAT_BIN) && ((RTC_DateStruct->Month & 0x10U) == 0x10U)) { RTC_DateStruct->Month = (RTC_DateStruct->Month & (uint32_t)~(0x10U)) + 0x0AU; } if (RTC_Format == LL_RTC_FORMAT_BIN) { assert_param(IS_LL_RTC_YEAR(RTC_DateStruct->Year)); assert_param(IS_LL_RTC_MONTH(RTC_DateStruct->Month)); assert_param(IS_LL_RTC_DAY(RTC_DateStruct->Day)); } else { assert_param(IS_LL_RTC_YEAR(__LL_RTC_CONVERT_BCD2BIN(RTC_DateStruct->Year))); assert_param(IS_LL_RTC_MONTH(__LL_RTC_CONVERT_BCD2BIN(RTC_DateStruct->Month))); assert_param(IS_LL_RTC_DAY(__LL_RTC_CONVERT_BCD2BIN(RTC_DateStruct->Day))); } assert_param(IS_LL_RTC_WEEKDAY(RTC_DateStruct->WeekDay)); /* Disable the write protection for RTC registers */ LL_RTC_DisableWriteProtection(RTCx); /* Set Initialization mode */ if (LL_RTC_EnterInitMode(RTCx) != ERROR) { /* Check the input parameters format */ if (RTC_Format != LL_RTC_FORMAT_BIN) { LL_RTC_DATE_Config(RTCx, RTC_DateStruct->WeekDay, RTC_DateStruct->Day, RTC_DateStruct->Month, RTC_DateStruct->Year); } else { LL_RTC_DATE_Config(RTCx, RTC_DateStruct->WeekDay, __LL_RTC_CONVERT_BIN2BCD(RTC_DateStruct->Day), __LL_RTC_CONVERT_BIN2BCD(RTC_DateStruct->Month), __LL_RTC_CONVERT_BIN2BCD(RTC_DateStruct->Year)); } /* Exit Initialization mode */ LL_RTC_DisableInitMode(RTC); /* If RTC_CR_BYPSHAD bit = 0, wait for synchro else this check is not needed */ if (LL_RTC_IsShadowRegBypassEnabled(RTCx) == 0U) { status = LL_RTC_WaitForSynchro(RTCx); } else { status = SUCCESS; } } /* Enable the write protection for RTC registers */ LL_RTC_EnableWriteProtection(RTCx); return status; } /** * @brief Set each @ref LL_RTC_DateTypeDef field to default value (date = Monday, January 01 xx00) * @param RTC_DateStruct pointer to a @ref LL_RTC_DateTypeDef structure which will be initialized. * @retval None */ void LL_RTC_DATE_StructInit(LL_RTC_DateTypeDef *RTC_DateStruct) { /* Monday, January 01 xx00 */ RTC_DateStruct->WeekDay = LL_RTC_WEEKDAY_MONDAY; RTC_DateStruct->Day = 1U; RTC_DateStruct->Month = LL_RTC_MONTH_JANUARY; RTC_DateStruct->Year = 0U; } /** * @brief Set the RTC Alarm A. * @note The Alarm register can only be written when the corresponding Alarm * is disabled (Use @ref LL_RTC_ALMA_Disable function). * @param RTCx RTC Instance * @param RTC_Format This parameter can be one of the following values: * @arg @ref LL_RTC_FORMAT_BIN * @arg @ref LL_RTC_FORMAT_BCD * @param RTC_AlarmStruct pointer to a @ref LL_RTC_AlarmTypeDef structure that * contains the alarm configuration parameters. * @retval An ErrorStatus enumeration value: * - SUCCESS: ALARMA registers are configured * - ERROR: ALARMA registers are not configured */ ErrorStatus LL_RTC_ALMA_Init(RTC_TypeDef *RTCx, uint32_t RTC_Format, LL_RTC_AlarmTypeDef *RTC_AlarmStruct) { /* Check the parameters */ assert_param(IS_RTC_ALL_INSTANCE(RTCx)); assert_param(IS_LL_RTC_FORMAT(RTC_Format)); assert_param(IS_LL_RTC_ALMA_MASK(RTC_AlarmStruct->AlarmMask)); assert_param(IS_LL_RTC_ALMA_DATE_WEEKDAY_SEL(RTC_AlarmStruct->AlarmDateWeekDaySel)); if (RTC_Format == LL_RTC_FORMAT_BIN) { if (LL_RTC_GetHourFormat(RTCx) != LL_RTC_HOURFORMAT_24HOUR) { assert_param(IS_LL_RTC_HOUR12(RTC_AlarmStruct->AlarmTime.Hours)); assert_param(IS_LL_RTC_TIME_FORMAT(RTC_AlarmStruct->AlarmTime.TimeFormat)); } else { RTC_AlarmStruct->AlarmTime.TimeFormat = 0x00U; assert_param(IS_LL_RTC_HOUR24(RTC_AlarmStruct->AlarmTime.Hours)); } assert_param(IS_LL_RTC_MINUTES(RTC_AlarmStruct->AlarmTime.Minutes)); assert_param(IS_LL_RTC_SECONDS(RTC_AlarmStruct->AlarmTime.Seconds)); if (RTC_AlarmStruct->AlarmDateWeekDaySel == LL_RTC_ALMA_DATEWEEKDAYSEL_DATE) { assert_param(IS_LL_RTC_DAY(RTC_AlarmStruct->AlarmDateWeekDay)); } else { assert_param(IS_LL_RTC_WEEKDAY(RTC_AlarmStruct->AlarmDateWeekDay)); } } else { if (LL_RTC_GetHourFormat(RTCx) != LL_RTC_HOURFORMAT_24HOUR) { assert_param(IS_LL_RTC_HOUR12(__LL_RTC_CONVERT_BCD2BIN(RTC_AlarmStruct->AlarmTime.Hours))); assert_param(IS_LL_RTC_TIME_FORMAT(RTC_AlarmStruct->AlarmTime.TimeFormat)); } else { RTC_AlarmStruct->AlarmTime.TimeFormat = 0x00U; assert_param(IS_LL_RTC_HOUR24(__LL_RTC_CONVERT_BCD2BIN(RTC_AlarmStruct->AlarmTime.Hours))); } assert_param(IS_LL_RTC_MINUTES(__LL_RTC_CONVERT_BCD2BIN(RTC_AlarmStruct->AlarmTime.Minutes))); assert_param(IS_LL_RTC_SECONDS(__LL_RTC_CONVERT_BCD2BIN(RTC_AlarmStruct->AlarmTime.Seconds))); if (RTC_AlarmStruct->AlarmDateWeekDaySel == LL_RTC_ALMA_DATEWEEKDAYSEL_DATE) { assert_param(IS_LL_RTC_DAY(__LL_RTC_CONVERT_BCD2BIN(RTC_AlarmStruct->AlarmDateWeekDay))); } else { assert_param(IS_LL_RTC_WEEKDAY(__LL_RTC_CONVERT_BCD2BIN(RTC_AlarmStruct->AlarmDateWeekDay))); } } /* Disable the write protection for RTC registers */ LL_RTC_DisableWriteProtection(RTCx); /* Select weekday selection */ if (RTC_AlarmStruct->AlarmDateWeekDaySel == LL_RTC_ALMA_DATEWEEKDAYSEL_DATE) { /* Set the date for ALARM */ LL_RTC_ALMA_DisableWeekday(RTCx); if (RTC_Format != LL_RTC_FORMAT_BIN) { LL_RTC_ALMA_SetDay(RTCx, RTC_AlarmStruct->AlarmDateWeekDay); } else { LL_RTC_ALMA_SetDay(RTCx, __LL_RTC_CONVERT_BIN2BCD(RTC_AlarmStruct->AlarmDateWeekDay)); } } else { /* Set the week day for ALARM */ LL_RTC_ALMA_EnableWeekday(RTCx); LL_RTC_ALMA_SetWeekDay(RTCx, RTC_AlarmStruct->AlarmDateWeekDay); } /* Configure the Alarm register */ if (RTC_Format != LL_RTC_FORMAT_BIN) { LL_RTC_ALMA_ConfigTime(RTCx, RTC_AlarmStruct->AlarmTime.TimeFormat, RTC_AlarmStruct->AlarmTime.Hours, RTC_AlarmStruct->AlarmTime.Minutes, RTC_AlarmStruct->AlarmTime.Seconds); } else { LL_RTC_ALMA_ConfigTime(RTCx, RTC_AlarmStruct->AlarmTime.TimeFormat, __LL_RTC_CONVERT_BIN2BCD(RTC_AlarmStruct->AlarmTime.Hours), __LL_RTC_CONVERT_BIN2BCD(RTC_AlarmStruct->AlarmTime.Minutes), __LL_RTC_CONVERT_BIN2BCD(RTC_AlarmStruct->AlarmTime.Seconds)); } /* Set ALARM mask */ LL_RTC_ALMA_SetMask(RTCx, RTC_AlarmStruct->AlarmMask); /* Enable the write protection for RTC registers */ LL_RTC_EnableWriteProtection(RTCx); return SUCCESS; } /** * @brief Set the RTC Alarm B. * @note The Alarm register can only be written when the corresponding Alarm * is disabled (@ref LL_RTC_ALMB_Disable function). * @param RTCx RTC Instance * @param RTC_Format This parameter can be one of the following values: * @arg @ref LL_RTC_FORMAT_BIN * @arg @ref LL_RTC_FORMAT_BCD * @param RTC_AlarmStruct pointer to a @ref LL_RTC_AlarmTypeDef structure that * contains the alarm configuration parameters. * @retval An ErrorStatus enumeration value: * - SUCCESS: ALARMB registers are configured * - ERROR: ALARMB registers are not configured */ ErrorStatus LL_RTC_ALMB_Init(RTC_TypeDef *RTCx, uint32_t RTC_Format, LL_RTC_AlarmTypeDef *RTC_AlarmStruct) { /* Check the parameters */ assert_param(IS_RTC_ALL_INSTANCE(RTCx)); assert_param(IS_LL_RTC_FORMAT(RTC_Format)); assert_param(IS_LL_RTC_ALMB_MASK(RTC_AlarmStruct->AlarmMask)); assert_param(IS_LL_RTC_ALMB_DATE_WEEKDAY_SEL(RTC_AlarmStruct->AlarmDateWeekDaySel)); if (RTC_Format == LL_RTC_FORMAT_BIN) { if (LL_RTC_GetHourFormat(RTCx) != LL_RTC_HOURFORMAT_24HOUR) { assert_param(IS_LL_RTC_HOUR12(RTC_AlarmStruct->AlarmTime.Hours)); assert_param(IS_LL_RTC_TIME_FORMAT(RTC_AlarmStruct->AlarmTime.TimeFormat)); } else { RTC_AlarmStruct->AlarmTime.TimeFormat = 0x00U; assert_param(IS_LL_RTC_HOUR24(RTC_AlarmStruct->AlarmTime.Hours)); } assert_param(IS_LL_RTC_MINUTES(RTC_AlarmStruct->AlarmTime.Minutes)); assert_param(IS_LL_RTC_SECONDS(RTC_AlarmStruct->AlarmTime.Seconds)); if (RTC_AlarmStruct->AlarmDateWeekDaySel == LL_RTC_ALMB_DATEWEEKDAYSEL_DATE) { assert_param(IS_LL_RTC_DAY(RTC_AlarmStruct->AlarmDateWeekDay)); } else { assert_param(IS_LL_RTC_WEEKDAY(RTC_AlarmStruct->AlarmDateWeekDay)); } } else { if (LL_RTC_GetHourFormat(RTCx) != LL_RTC_HOURFORMAT_24HOUR) { assert_param(IS_LL_RTC_HOUR12(__LL_RTC_CONVERT_BCD2BIN(RTC_AlarmStruct->AlarmTime.Hours))); assert_param(IS_LL_RTC_TIME_FORMAT(RTC_AlarmStruct->AlarmTime.TimeFormat)); } else { RTC_AlarmStruct->AlarmTime.TimeFormat = 0x00U; assert_param(IS_LL_RTC_HOUR24(__LL_RTC_CONVERT_BCD2BIN(RTC_AlarmStruct->AlarmTime.Hours))); } assert_param(IS_LL_RTC_MINUTES(__LL_RTC_CONVERT_BCD2BIN(RTC_AlarmStruct->AlarmTime.Minutes))); assert_param(IS_LL_RTC_SECONDS(__LL_RTC_CONVERT_BCD2BIN(RTC_AlarmStruct->AlarmTime.Seconds))); if (RTC_AlarmStruct->AlarmDateWeekDaySel == LL_RTC_ALMB_DATEWEEKDAYSEL_DATE) { assert_param(IS_LL_RTC_DAY(__LL_RTC_CONVERT_BCD2BIN(RTC_AlarmStruct->AlarmDateWeekDay))); } else { assert_param(IS_LL_RTC_WEEKDAY(__LL_RTC_CONVERT_BCD2BIN(RTC_AlarmStruct->AlarmDateWeekDay))); } } /* Disable the write protection for RTC registers */ LL_RTC_DisableWriteProtection(RTCx); /* Select weekday selection */ if (RTC_AlarmStruct->AlarmDateWeekDaySel == LL_RTC_ALMB_DATEWEEKDAYSEL_DATE) { /* Set the date for ALARM */ LL_RTC_ALMB_DisableWeekday(RTCx); if (RTC_Format != LL_RTC_FORMAT_BIN) { LL_RTC_ALMB_SetDay(RTCx, RTC_AlarmStruct->AlarmDateWeekDay); } else { LL_RTC_ALMB_SetDay(RTCx, __LL_RTC_CONVERT_BIN2BCD(RTC_AlarmStruct->AlarmDateWeekDay)); } } else { /* Set the week day for ALARM */ LL_RTC_ALMB_EnableWeekday(RTCx); LL_RTC_ALMB_SetWeekDay(RTCx, RTC_AlarmStruct->AlarmDateWeekDay); } /* Configure the Alarm register */ if (RTC_Format != LL_RTC_FORMAT_BIN) { LL_RTC_ALMB_ConfigTime(RTCx, RTC_AlarmStruct->AlarmTime.TimeFormat, RTC_AlarmStruct->AlarmTime.Hours, RTC_AlarmStruct->AlarmTime.Minutes, RTC_AlarmStruct->AlarmTime.Seconds); } else { LL_RTC_ALMB_ConfigTime(RTCx, RTC_AlarmStruct->AlarmTime.TimeFormat, __LL_RTC_CONVERT_BIN2BCD(RTC_AlarmStruct->AlarmTime.Hours), __LL_RTC_CONVERT_BIN2BCD(RTC_AlarmStruct->AlarmTime.Minutes), __LL_RTC_CONVERT_BIN2BCD(RTC_AlarmStruct->AlarmTime.Seconds)); } /* Set ALARM mask */ LL_RTC_ALMB_SetMask(RTCx, RTC_AlarmStruct->AlarmMask); /* Enable the write protection for RTC registers */ LL_RTC_EnableWriteProtection(RTCx); return SUCCESS; } /** * @brief Set each @ref LL_RTC_AlarmTypeDef of ALARMA field to default value (Time = 00h:00mn:00sec / * Day = 1st day of the month/Mask = all fields are masked). * @param RTC_AlarmStruct pointer to a @ref LL_RTC_AlarmTypeDef structure which will be initialized. * @retval None */ void LL_RTC_ALMA_StructInit(LL_RTC_AlarmTypeDef *RTC_AlarmStruct) { /* Alarm Time Settings : Time = 00h:00mn:00sec */ RTC_AlarmStruct->AlarmTime.TimeFormat = LL_RTC_ALMA_TIME_FORMAT_AM; RTC_AlarmStruct->AlarmTime.Hours = 0U; RTC_AlarmStruct->AlarmTime.Minutes = 0U; RTC_AlarmStruct->AlarmTime.Seconds = 0U; /* Alarm Day Settings : Day = 1st day of the month */ RTC_AlarmStruct->AlarmDateWeekDaySel = LL_RTC_ALMA_DATEWEEKDAYSEL_DATE; RTC_AlarmStruct->AlarmDateWeekDay = 1U; /* Alarm Masks Settings : Mask = all fields are not masked */ RTC_AlarmStruct->AlarmMask = LL_RTC_ALMA_MASK_NONE; } /** * @brief Set each @ref LL_RTC_AlarmTypeDef of ALARMA field to default value (Time = 00h:00mn:00sec / * Day = 1st day of the month/Mask = all fields are masked). * @param RTC_AlarmStruct pointer to a @ref LL_RTC_AlarmTypeDef structure which will be initialized. * @retval None */ void LL_RTC_ALMB_StructInit(LL_RTC_AlarmTypeDef *RTC_AlarmStruct) { /* Alarm Time Settings : Time = 00h:00mn:00sec */ RTC_AlarmStruct->AlarmTime.TimeFormat = LL_RTC_ALMB_TIME_FORMAT_AM; RTC_AlarmStruct->AlarmTime.Hours = 0U; RTC_AlarmStruct->AlarmTime.Minutes = 0U; RTC_AlarmStruct->AlarmTime.Seconds = 0U; /* Alarm Day Settings : Day = 1st day of the month */ RTC_AlarmStruct->AlarmDateWeekDaySel = LL_RTC_ALMB_DATEWEEKDAYSEL_DATE; RTC_AlarmStruct->AlarmDateWeekDay = 1U; /* Alarm Masks Settings : Mask = all fields are not masked */ RTC_AlarmStruct->AlarmMask = LL_RTC_ALMB_MASK_NONE; } /** * @brief Enters the RTC Initialization mode. * @note The RTC Initialization mode is write protected, use the * @ref LL_RTC_DisableWriteProtection before calling this function. * @param RTCx RTC Instance * @retval An ErrorStatus enumeration value: * - SUCCESS: RTC is in Init mode * - ERROR: RTC is not in Init mode */ ErrorStatus LL_RTC_EnterInitMode(RTC_TypeDef *RTCx) { __IO uint32_t timeout = RTC_INITMODE_TIMEOUT; ErrorStatus status = SUCCESS; uint32_t tmp = 0U; /* Check the parameter */ assert_param(IS_RTC_ALL_INSTANCE(RTCx)); /* Check if the Initialization mode is set */ if (LL_RTC_IsActiveFlag_INIT(RTCx) == 0U) { /* Set the Initialization mode */ LL_RTC_EnableInitMode(RTCx); /* Wait till RTC is in INIT state and if Time out is reached exit */ tmp = LL_RTC_IsActiveFlag_INIT(RTCx); while ((timeout != 0U) && (tmp != 1U)) { if (LL_SYSTICK_IsActiveCounterFlag() == 1U) { timeout --; } tmp = LL_RTC_IsActiveFlag_INIT(RTCx); if (timeout == 0U) { status = ERROR; } } } return status; } /** * @brief Exit the RTC Initialization mode. * @note When the initialization sequence is complete, the calendar restarts * counting after 4 RTCCLK cycles. * @note The RTC Initialization mode is write protected, use the * @ref LL_RTC_DisableWriteProtection before calling this function. * @param RTCx RTC Instance * @retval An ErrorStatus enumeration value: * - SUCCESS: RTC exited from in Init mode * - ERROR: Not applicable */ ErrorStatus LL_RTC_ExitInitMode(RTC_TypeDef *RTCx) { /* Check the parameter */ assert_param(IS_RTC_ALL_INSTANCE(RTCx)); /* Disable initialization mode */ LL_RTC_DisableInitMode(RTCx); return SUCCESS; } /** * @brief Waits until the RTC Time and Day registers (RTC_TR and RTC_DR) are * synchronized with RTC APB clock. * @note The RTC Resynchronization mode is write protected, use the * @ref LL_RTC_DisableWriteProtection before calling this function. * @note To read the calendar through the shadow registers after Calendar * initialization, calendar update or after wakeup from low power modes * the software must first clear the RSF flag. * The software must then wait until it is set again before reading * the calendar, which means that the calendar registers have been * correctly copied into the RTC_TR and RTC_DR shadow registers. * @param RTCx RTC Instance * @retval An ErrorStatus enumeration value: * - SUCCESS: RTC registers are synchronised * - ERROR: RTC registers are not synchronised */ ErrorStatus LL_RTC_WaitForSynchro(RTC_TypeDef *RTCx) { __IO uint32_t timeout = RTC_SYNCHRO_TIMEOUT; ErrorStatus status = SUCCESS; uint32_t tmp = 0U; /* Check the parameter */ assert_param(IS_RTC_ALL_INSTANCE(RTCx)); /* Clear RSF flag */ LL_RTC_ClearFlag_RS(RTCx); /* Wait the registers to be synchronised */ tmp = LL_RTC_IsActiveFlag_RS(RTCx); while ((timeout != 0U) && (tmp != 0U)) { if (LL_SYSTICK_IsActiveCounterFlag() == 1U) { timeout--; } tmp = LL_RTC_IsActiveFlag_RS(RTCx); if (timeout == 0U) { status = ERROR; } } if (status != ERROR) { timeout = RTC_SYNCHRO_TIMEOUT; tmp = LL_RTC_IsActiveFlag_RS(RTCx); while ((timeout != 0U) && (tmp != 1U)) { if (LL_SYSTICK_IsActiveCounterFlag() == 1U) { timeout--; } tmp = LL_RTC_IsActiveFlag_RS(RTCx); if (timeout == 0U) { status = ERROR; } } } return (status); } /** * @} */ /** * @} */ /** * @} */ #endif /* defined(RTC) */ /** * @} */ #endif /* USE_FULL_LL_DRIVER */ /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
the_stack_data/154831834.c
#include <string.h> #undef strcspn #define BITOP(a,b,op) \ ((a)[(size_t)(b)/(8*sizeof *(a))] op (size_t)1<<((size_t)(b)%(8*sizeof *(a)))) char *__strchrnul(const char *, int); size_t strcspn(const char *s, const char *c) { const char *a = s; size_t byteset[32/sizeof(size_t)]; if (!c[0] || !c[1]) return __strchrnul(s, *c)-a; memset(byteset, 0, sizeof byteset); for (; *c && BITOP(byteset, *(unsigned char *)c, |=); c++); for (; *s && !BITOP(byteset, *(unsigned char *)s, &); s++); return s-a; }
the_stack_data/234517382.c
/*@ begin PerfTuning ( def build { arg build_command = 'gcc -O3 -fopenmp -DDYNAMIC'; arg libs = '-lm -lrt'; } def performance_counter { arg repetitions = 10; } def performance_params { # Cache tiling param T2_I[] = [1,16,32,64,128,256,512]; param T2_J[] = [1,16,32,64,128,256,512]; param T2_Ia[] = [1,64,128,256,512,1024,2048]; param T2_Ja[] = [1,64,128,256,512,1024,2048]; param T4_I[] = [1,16,32,64,128,256,512]; param T4_J[] = [1,16,32,64,128,256,512]; param T4_Ia[] = [1,64,128,256,512,1024,2048]; param T4_Ja[] = [1,64,128,256,512,1024,2048]; # Unroll-jam param U1_I[] = [1]+range(2,17,2); param U2_I[] = [1]; param U2_J[] = [1]+range(2,17,2); param U3_I[] = [1]+range(2,17,2); param U4_I[] = [1]+range(2,17,2); param U4_J[] = [1]+range(2,17,2); # Scalar replacement param SCR[] = [False,True]; # Vectorization param VEC1[] = [False,True]; param VEC2[] = [False,True]; param VEC3[] = [False,True]; param VEC4[] = [False,True]; # Parallelization param OMP1[] = [False,True]; param OMP2[] = [False,True]; # Constraints constraint tileI2 = ((T2_Ia == 1) or (T2_Ia % T2_I == 0)); constraint tileJ2 = ((T2_Ja == 1) or (T2_Ja % T2_J == 0)); constraint tileI4 = ((T4_Ia == 1) or (T4_Ia % T4_I == 0)); constraint tileJ4 = ((T4_Ja == 1) or (T4_Ja % T4_J == 0)); constraint unroll_limit_2 = (U2_I == 1) or (U2_J == 1); constraint unroll_limit_4 = (U4_I == 1) or (U4_J == 1); } def search { arg algorithm = 'Randomlocal'; arg total_runs = 1000; } def input_params { param N[] = [10000]; } def input_vars { arg decl_file = 'decl.h'; arg init_file = 'init.c'; } ) @*/ #define max(x,y) ((x) > (y)? (x) : (y)) #define min(x,y) ((x) < (y)? (x) : (y)) int i,j, k,t; int it, jt, kt; int ii, jj, kk; int iii, jjj, kkk; /*@ begin Loop( transform Composite( unrolljam = (['i'],[U1_I]), vector = (VEC1, ['ivdep','vector always']) ) for (i=0;i<=n-1;i++) { x[i]=0; w[i]=0; } transform Composite( tile = [('j',T2_J,'jj'),('i',T2_I,'ii'), (('jj','j'),T2_Ja,'jjj'),(('ii','i'),T2_Ia,'iii')], unrolljam = (['j','i'],[U2_J,U2_I]), scalarreplace = (SCR, 'double'), vector = (VEC2, ['ivdep','vector always']), openmp = (OMP1, 'omp parallel for private(iii,jjj,kkk,ii,jj,kk,i,j,k)') ) for (j=0;j<=n-1;j++) { for (i=0;i<=n-1;i++) { B[j*n+i]=u2[j]*v2[i]+u1[j]*v1[i]+A[j*n+i]; x[i]=y[j]*B[j*n+i]+x[i]; } } transform Composite( unrolljam = (['i'],[U3_I]), vector = (VEC3, ['ivdep','vector always']), openmp = (OMP2, 'omp parallel for private(i)') ) for (i=0;i<=n-1;i++) { x[i]=b*x[i]+z[i]; } transform Composite( tile = [('i',T4_I,'ii'),('j',T4_J,'jj'), (('ii','i'),T4_Ia,'iii'),(('jj','j'),T4_Ja,'jjj')], unrolljam = (['i','j'],[U4_J,U4_I]), scalarreplace = (SCR, 'double'), vector = (VEC4, ['ivdep','vector always']), openmp = (OMP1, 'omp parallel for private(iii,jjj,kkk,ii,jj,kk,i,j,k)') ) for (i = 0; i <= n-1; i++) { for (j = 0; j <= n-1; j++) { w[i] = w[i] + B[i*n+j]*x[j]; } w[i] = a*w[i]; } ) @*/ /*@ end @*/ /*@ end @*/
the_stack_data/190768409.c
#include <stdio.h> int main(void) { int month, day, year; // Take Input printf("Enter a date (mm/dd/yy): "); scanf("%d/%d/%d", &month, &day, &year); // Output printf("You entered the date %.2d%.2d%.4d\n", month, day, year); return 0; }
the_stack_data/92325037.c
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_strncmp.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: pgomez-a <[email protected]> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/12/03 17:52:04 by pgomez-a #+# #+# */ /* Updated: 2020/12/09 08:22:16 by pgomez-a ### ########.fr */ /* */ /* ************************************************************************** */ int ft_strncmp(char *s1, char *s2, unsigned int n) { unsigned int count; unsigned int output; count = 0; output = 0; if (s1[0] == s2[0] && count < n) { while ((unsigned char)s1[count] == (unsigned char)s2[count] && (unsigned char)(s1[count] != '\0' && (unsigned char)s2[count] != '\0') && count < n) { count++; if ((unsigned char)s1[count] != (unsigned char)s2[count] && count < n) output = (unsigned char)s1[count] - (unsigned char)s2[count]; } } else if (n == 0) output = 0; else output = (unsigned char)s1[count] - (unsigned char)s2[count]; return (output); }
the_stack_data/232956433.c
#include <stdio.h> #include <stdlib.h> #include <locale.h> void main(){ setlocale(LC_ALL,"Portuguese"); int *vet = malloc(100 * sizeof(int)); if (vet == 0){ printf("Tristonho"); exit(1); } for (int *i = vet; i != vet+100; i++){ *i = 0; } free(vet); }
the_stack_data/1159384.c
#include <stdio.h> #include <math.h> int main (){ int a,b; printf("Por digite dois numeros inteiros:\n"); scanf("%d", &a); scanf("%d", &b); if (a==b){ printf("Os numeros sao iguais\n");} else { printf("Os numeros nao sao iguais\n");} return 0;}
the_stack_data/100141055.c
#include <stdio.h> void main() { int arr1[3][3],i,j; printf("\n\nRead a 2D array of size 3x3 and print the matrix :\n"); printf("------------------------------------------------------\n"); printf("Input elements in the matrix :\n"); for(i=0;i<3;i++) { for(j=0;j<3;j++) { printf("element - [%d],[%d] : ",i,j); scanf("%d",&arr1[i][j]); } } printf("\nThe matrix is : \n"); for(i=0;i<3;i++) { printf("\n"); for(j=0;j<3;j++) printf("%d\t",arr1[i][j]); } printf("\n\n"); }
the_stack_data/145453178.c
/* Prints a date in legal form */ #include <stdio.h> int main(void) { int month, day, year; printf("Enter date (mm/dd/yy): "); scanf("%d/%d/%d", &month, &day, &year); printf("Dated this %d", day); switch (day) { case 1: case 21: case 31: printf("st"); break; case 2: case 22: printf("nd"); break; case 3: case 23: printf("rd"); break; default: printf("th"); break; } printf(" day of "); switch (month) { case 1: printf("January"); break; case 2: printf("February"); break; case 3: printf("March"); break; case 4: printf("April"); break; case 5: printf("May"); break; case 6: printf("June"); break; case 7: printf("July"); break; case 8: printf("August"); break; case 9: printf("September"); break; case 10: printf("October"); break; case 11: printf("November"); break; case 12: printf("December"); break; } printf(", 20%.2d.\n", year); return 0; }
the_stack_data/211080978.c
#include <stdbool.h> #include <stdio.h> #include <stdlib.h> void DFS(int** matrix, int vertices, int paths, int vertex, bool* visitedVertexes) { if (visitedVertexes[vertex]) return; visitedVertexes[vertex] = true; for (int i = 0; i < paths; ++i) { if (matrix[vertex][i] > 0) { for (int j = 0; j < vertices; ++j) if (matrix[j][i] < 0) DFS(matrix, vertices, paths, j, visitedVertexes); } } } void universalVertex(int** matrix, int vertices, int paths) { for (int i = 0; i < vertices; ++i) { bool* isVisted = calloc(vertices, sizeof(bool)); DFS(matrix, vertices, paths, i, isVisted); bool flag = true; for (int j = 0; j < vertices; ++j) if (!isVisted[j]) flag = false; if (flag) printf("Universal vertex found: %d", i + 1); free(isVisted); } } int main() { int rows = 0; int columns = 0; printf("Enter vertices and paths numbers, separate them with space: "); scanf("%d %d", &rows, &columns); int** matrix = calloc(rows, sizeof(int*)); for (int i = 0; i < rows; ++i) matrix[i] = calloc(columns, sizeof(int)); printf("Enter matrix: "); for (int i = 0; i < rows; ++i) for (int j = 0; j < columns; ++j) scanf("%d", &matrix[i][j]); universalVertex(matrix, rows, columns); for (int i = 0; i < rows; ++i) free(matrix[i]); free(matrix); return 0; }
the_stack_data/192332039.c
#include<stdio.h> main(argc, argv) int argc; char *argv[]; { int i,fact, n; n = atoi(argv[1]); fact = 1; for(i=1;i<=n;i++) { fact = fact * i; } printf("%d\n",fact); }
the_stack_data/95451111.c
#include <assert.h> int main() { int signed_int=1; float a_float=1; double a_double=1; long long long_long_int=1; struct some { int f; }; assert(*(unsigned long long int *)&long_long_int==1); assert(*(unsigned int *)&signed_int==1); assert(((struct some *)&signed_int)->f==1); assert(*(int *)&a_float==1065353216); assert(*(long long int *)&a_double==4607182418800017408l); // other direction signed_int=1065353216; assert(*(float *)&signed_int==1.0f); }
the_stack_data/138119.c
/* * Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved. * Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, this list of * conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright notice, this list * of conditions and the following disclaimer in the documentation and/or other materials * provided with the distribution. * * 3. Neither the name of the copyright holder nor the names of its contributors may be used * to endorse or promote products derived from this software without specific prior written * permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* +-------------------------------------------------------+ | Info | log_space | +-------------------------------------------------------+ | |__buffer_space Case A: +-------------------------------------------------------+ | |#############################| | +-------------------------------------------------------+ | | Head Tail Case B: +-------------------------------------------------------+ |##########| |#######| +-------------------------------------------------------+ | | Tail Head */ #ifdef LOSCFG_SHELL_DMESG #include "dmesg_pri.h" #include "show.h" #include "shcmd.h" #include "securec.h" #include "stdlib.h" #include "unistd.h" #include "los_init.h" #include "los_task.h" #define BUF_MAX_INDEX (g_logBufSize - 1) LITE_OS_SEC_BSS STATIC SPIN_LOCK_INIT(g_dmesgSpin); STATIC DmesgInfo *g_dmesgInfo = NULL; STATIC UINT32 g_logBufSize = 0; STATIC VOID *g_mallocAddr = NULL; STATIC UINT32 g_dmesgLogLevel = 3; STATIC UINT32 g_consoleLock = 0; STATIC UINT32 g_uartLock = 0; STATIC const CHAR *g_levelString[] = { "EMG", "COMMON", "ERR", "WARN", "INFO", "DEBUG" }; STATIC VOID OsLockConsole(VOID) { g_consoleLock = 1; } STATIC VOID OsUnlockConsole(VOID) { g_consoleLock = 0; } STATIC VOID OsLockUart(VOID) { g_uartLock = 1; } STATIC VOID OsUnlockUart(VOID) { g_uartLock = 0; } STATIC UINT32 OsCheckError(VOID) { if (g_dmesgInfo == NULL) { return LOS_NOK; } if (g_dmesgInfo->logSize > g_logBufSize) { return LOS_NOK; } if (((g_dmesgInfo->logSize == g_logBufSize) || (g_dmesgInfo->logSize == 0)) && (g_dmesgInfo->logTail != g_dmesgInfo->logHead)) { return LOS_NOK; } return LOS_OK; } STATIC INT32 OsDmesgRead(CHAR *buf, UINT32 len) { UINT32 readLen; UINT32 logSize = g_dmesgInfo->logSize; UINT32 head = g_dmesgInfo->logHead; UINT32 tail = g_dmesgInfo->logTail; CHAR *logBuf = g_dmesgInfo->logBuf; errno_t ret; if (OsCheckError()) { return -1; } if (logSize == 0) { return 0; } readLen = len < logSize ? len : logSize; if (head < tail) { /* Case A */ ret = memcpy_s(buf, len, logBuf + head, readLen); if (ret != EOK) { return -1; } g_dmesgInfo->logHead += readLen; g_dmesgInfo->logSize -= readLen; } else { /* Case B */ if (readLen <= (g_logBufSize - head)) { ret = memcpy_s(buf, len, logBuf + head, readLen); if (ret != EOK) { return -1; } g_dmesgInfo->logHead += readLen; g_dmesgInfo->logSize -= readLen; } else { ret = memcpy_s(buf, len, logBuf + head, g_logBufSize - head); if (ret != EOK) { return -1; } ret = memcpy_s(buf + g_logBufSize - head, len - (g_logBufSize - head), logBuf, readLen - (g_logBufSize - head)); if (ret != EOK) { return -1; } g_dmesgInfo->logHead = readLen - (g_logBufSize - head); g_dmesgInfo->logSize -= readLen; } } return (INT32)readLen; } STATIC INT32 OsCopyToNew(const VOID *addr, UINT32 size) { UINT32 copyStart = 0; UINT32 copyLen; CHAR *temp = NULL; CHAR *newBuf = (CHAR *)addr + sizeof(DmesgInfo); UINT32 bufSize = size - sizeof(DmesgInfo); INT32 ret; if (g_dmesgInfo->logSize == 0) { return 0; } temp = (CHAR *)malloc(g_dmesgInfo->logSize); if (temp == NULL) { return -1; } (VOID)memset_s(temp, g_dmesgInfo->logSize, 0, g_dmesgInfo->logSize); copyLen = ((bufSize < g_dmesgInfo->logSize) ? bufSize : g_dmesgInfo->logSize); if (bufSize < g_dmesgInfo->logSize) { copyStart = g_dmesgInfo->logSize - bufSize; } ret = OsDmesgRead(temp, g_dmesgInfo->logSize); if (ret <= 0) { PRINT_ERR("%s,%d failed, err:%d!\n", __FUNCTION__, __LINE__, ret); free(temp); return -1; } /* if new buf size smaller than logSize */ ret = memcpy_s(newBuf, bufSize, temp + copyStart, copyLen); if (ret != EOK) { PRINT_ERR("%s,%d memcpy_s failed, err:%d!\n", __FUNCTION__, __LINE__, ret); free(temp); return -1; } free(temp); return (INT32)copyLen; } STATIC UINT32 OsDmesgResetMem(const VOID *addr, UINT32 size) { VOID *temp = NULL; INT32 copyLen; UINT32 intSave; if (size <= sizeof(DmesgInfo)) { return LOS_NOK; } LOS_SpinLockSave(&g_dmesgSpin, &intSave); temp = g_dmesgInfo; copyLen = OsCopyToNew(addr, size); if (copyLen < 0) { LOS_SpinUnlockRestore(&g_dmesgSpin, intSave); return LOS_NOK; } g_logBufSize = size - sizeof(DmesgInfo); g_dmesgInfo = (DmesgInfo *)addr; g_dmesgInfo->logBuf = (CHAR *)addr + sizeof(DmesgInfo); g_dmesgInfo->logSize = copyLen; g_dmesgInfo->logTail = ((copyLen == g_logBufSize) ? 0 : copyLen); g_dmesgInfo->logHead = 0; /* if old mem came from malloc */ if (temp == g_mallocAddr) { g_mallocAddr = NULL; free(temp); } LOS_SpinUnlockRestore(&g_dmesgSpin, intSave); return LOS_OK; } STATIC UINT32 OsDmesgChangeSize(UINT32 size) { VOID *temp = NULL; INT32 copyLen; CHAR *newString = NULL; UINT32 intSave; if (size == 0) { return LOS_NOK; } newString = (CHAR *)malloc(size + sizeof(DmesgInfo)); if (newString == NULL) { return LOS_NOK; } LOS_SpinLockSave(&g_dmesgSpin, &intSave); temp = g_dmesgInfo; copyLen = OsCopyToNew(newString, size + sizeof(DmesgInfo)); if (copyLen < 0) { LOS_SpinUnlockRestore(&g_dmesgSpin, intSave); free(newString); return LOS_NOK; } g_logBufSize = size; g_dmesgInfo = (DmesgInfo *)newString; g_dmesgInfo->logBuf = (CHAR *)newString + sizeof(DmesgInfo); g_dmesgInfo->logSize = copyLen; g_dmesgInfo->logTail = ((copyLen == g_logBufSize) ? 0 : copyLen); g_dmesgInfo->logHead = 0; if (temp == g_mallocAddr) { g_mallocAddr = NULL; free(temp); } g_mallocAddr = newString; LOS_SpinUnlockRestore(&g_dmesgSpin, intSave); return LOS_OK; } UINT32 OsCheckConsoleLock(VOID) { return g_consoleLock; } UINT32 OsCheckUartLock(VOID) { return g_uartLock; } UINT32 OsDmesgInit(VOID) { CHAR* buffer = NULL; buffer = (CHAR *)malloc(KERNEL_LOG_BUF_SIZE + sizeof(DmesgInfo)); if (buffer == NULL) { return LOS_NOK; } g_mallocAddr = buffer; g_dmesgInfo = (DmesgInfo *)buffer; g_dmesgInfo->logHead = 0; g_dmesgInfo->logTail = 0; g_dmesgInfo->logSize = 0; g_dmesgInfo->logBuf = buffer + sizeof(DmesgInfo); g_logBufSize = KERNEL_LOG_BUF_SIZE; return LOS_OK; } STATIC CHAR OsLogRecordChar(CHAR c) { *(g_dmesgInfo->logBuf + g_dmesgInfo->logTail++) = c; if (g_dmesgInfo->logTail > BUF_MAX_INDEX) { g_dmesgInfo->logTail = 0; } if (g_dmesgInfo->logSize < g_logBufSize) { (g_dmesgInfo->logSize)++; } else { g_dmesgInfo->logHead = g_dmesgInfo->logTail; } return c; } UINT32 OsLogRecordStr(const CHAR *str, UINT32 len) { UINT32 i = 0; UINTPTR intSave; LOS_SpinLockSave(&g_dmesgSpin, &intSave); while (len--) { (VOID)OsLogRecordChar(str[i]); i++; } LOS_SpinUnlockRestore(&g_dmesgSpin, intSave); return i; } STATIC VOID OsBufFullWrite(const CHAR *dst, UINT32 logLen) { UINT32 bufSize = g_logBufSize; UINT32 tail = g_dmesgInfo->logTail; CHAR *buf = g_dmesgInfo->logBuf; errno_t ret; if (!logLen || (dst == NULL)) { return; } if (logLen > bufSize) { /* full re-write */ ret = memcpy_s(buf + tail, bufSize - tail, dst, bufSize - tail); if (ret != EOK) { PRINT_ERR("%s,%d memcpy_s failed, err:%d!\n", __FUNCTION__, __LINE__, ret); return; } ret = memcpy_s(buf, bufSize, dst + bufSize - tail, tail); if (ret != EOK) { PRINT_ERR("%s,%d memcpy_s failed, err:%d!\n", __FUNCTION__, __LINE__, ret); return; } OsBufFullWrite(dst + bufSize, logLen - bufSize); } else { if (logLen > (bufSize - tail)) { /* need cycle back to start */ ret = memcpy_s(buf + tail, bufSize - tail, dst, bufSize - tail); if (ret != EOK) { PRINT_ERR("%s,%d memcpy_s failed, err:%d!\n", __FUNCTION__, __LINE__, ret); return; } ret = memcpy_s(buf, bufSize, dst + bufSize - tail, logLen - (bufSize - tail)); if (ret != EOK) { PRINT_ERR("%s,%d memcpy_s failed, err:%d!\n", __FUNCTION__, __LINE__, ret); return; } g_dmesgInfo->logTail = logLen - (bufSize - tail); g_dmesgInfo->logHead = g_dmesgInfo->logTail; } else { /* no need cycle back to start */ ret = memcpy_s(buf + tail, bufSize - tail, dst, logLen); if (ret != EOK) { PRINT_ERR("%s,%d memcpy_s failed, err:%d!\n", __FUNCTION__, __LINE__, ret); return; } g_dmesgInfo->logTail += logLen; if (g_dmesgInfo->logTail > BUF_MAX_INDEX) { g_dmesgInfo->logTail = 0; } g_dmesgInfo->logHead = g_dmesgInfo->logTail; } } } STATIC VOID OsWriteTailToHead(const CHAR *dst, UINT32 logLen) { UINT32 writeLen = 0; UINT32 bufSize = g_logBufSize; UINT32 logSize = g_dmesgInfo->logSize; UINT32 tail = g_dmesgInfo->logTail; CHAR *buf = g_dmesgInfo->logBuf; errno_t ret; if ((!logLen) || (dst == NULL)) { return; } if (logLen > (bufSize - logSize)) { /* space-need > space-remain */ writeLen = bufSize - logSize; ret = memcpy_s(buf + tail, bufSize - tail, dst, writeLen); if (ret != EOK) { PRINT_ERR("%s,%d memcpy_s failed, err:%d!\n", __FUNCTION__, __LINE__, ret); return; } g_dmesgInfo->logTail = g_dmesgInfo->logHead; g_dmesgInfo->logSize = g_logBufSize; OsBufFullWrite(dst + writeLen, logLen - writeLen); } else { ret = memcpy_s(buf + tail, bufSize - tail, dst, logLen); if (ret != EOK) { PRINT_ERR("%s,%d memcpy_s failed, err:%d!\n", __FUNCTION__, __LINE__, ret); return; } g_dmesgInfo->logTail += logLen; g_dmesgInfo->logSize += logLen; } } STATIC VOID OsWriteTailToEnd(const CHAR *dst, UINT32 logLen) { UINT32 writeLen; UINT32 bufSize = g_logBufSize; UINT32 tail = g_dmesgInfo->logTail; CHAR *buf = g_dmesgInfo->logBuf; errno_t ret; if ((!logLen) || (dst == NULL)) { return; } if (logLen >= (bufSize - tail)) { /* need cycle to start ,then became B */ writeLen = bufSize - tail; ret = memcpy_s(buf + tail, writeLen, dst, writeLen); if (ret != EOK) { PRINT_ERR("%s,%d memcpy_s failed, err:%d!\n", __FUNCTION__, __LINE__, ret); return; } g_dmesgInfo->logSize += writeLen; g_dmesgInfo->logTail = 0; if (g_dmesgInfo->logSize == g_logBufSize) { /* Tail = Head is 0 */ OsBufFullWrite(dst + writeLen, logLen - writeLen); } else { OsWriteTailToHead(dst + writeLen, logLen - writeLen); } } else { /* just do serial copy */ ret = memcpy_s(buf + tail, bufSize - tail, dst, logLen); if (ret != EOK) { PRINT_ERR("%s,%d memcpy_s failed, err:%d!\n", __FUNCTION__, __LINE__, ret); return; } g_dmesgInfo->logTail += logLen; g_dmesgInfo->logSize += logLen; } } INT32 OsLogMemcpyRecord(const CHAR *buf, UINT32 logLen) { UINT32 intSave; LOS_SpinLockSave(&g_dmesgSpin, &intSave); if (OsCheckError()) { LOS_SpinUnlockRestore(&g_dmesgSpin, intSave); return -1; } if (g_dmesgInfo->logSize < g_logBufSize) { if (g_dmesgInfo->logHead <= g_dmesgInfo->logTail) { OsWriteTailToEnd(buf, logLen); } else { OsWriteTailToHead(buf, logLen); } } else { OsBufFullWrite(buf, logLen); } LOS_SpinUnlockRestore(&g_dmesgSpin, intSave); return LOS_OK; } VOID OsLogShow(VOID) { UINT32 intSave; UINT32 index; UINT32 i = 0; CHAR *p = NULL; LOS_SpinLockSave(&g_dmesgSpin, &intSave); index = g_dmesgInfo->logHead; p = (CHAR *)malloc(g_dmesgInfo->logSize + 1); if (p == NULL) { LOS_SpinUnlockRestore(&g_dmesgSpin, intSave); return; } (VOID)memset_s(p, g_dmesgInfo->logSize + 1, 0, g_dmesgInfo->logSize + 1); while (i < g_dmesgInfo->logSize) { *(p + i) = *(g_dmesgInfo->logBuf + index++); if (index > BUF_MAX_INDEX) { index = 0; } i++; if (index == g_dmesgInfo->logTail) { break; } } LOS_SpinUnlockRestore(&g_dmesgSpin, intSave); UartPuts(p, i, UART_WITH_LOCK); free(p); } STATIC INT32 OsDmesgLvSet(const CHAR *level) { UINT32 levelNum, ret; CHAR *p = NULL; levelNum = strtoul(level, &p, 0); if (*p != 0) { PRINTK("dmesg: invalid option or parameter.\n"); return -1; } ret = LOS_DmesgLvSet(levelNum); if (ret == LOS_OK) { PRINTK("Set current dmesg log level %s\n", g_levelString[g_dmesgLogLevel]); return LOS_OK; } else { PRINTK("current dmesg log level %s\n", g_levelString[g_dmesgLogLevel]); PRINTK("dmesg -l [num] can access as 0:EMG 1:COMMON 2:ERROR 3:WARN 4:INFO 5:DEBUG\n"); return -1; } } STATIC INT32 OsDmesgMemSizeSet(const CHAR *size) { UINT32 sizeVal; CHAR *p = NULL; sizeVal = strtoul(size, &p, 0); if (sizeVal > MAX_KERNEL_LOG_BUF_SIZE) { goto ERR_OUT; } if (!(LOS_DmesgMemSet(NULL, sizeVal))) { PRINTK("Set dmesg buf size %u success\n", sizeVal); return LOS_OK; } else { goto ERR_OUT; } ERR_OUT: PRINTK("Set dmesg buf size %u fail\n", sizeVal); return LOS_NOK; } UINT32 OsDmesgLvGet(VOID) { return g_dmesgLogLevel; } UINT32 LOS_DmesgLvSet(UINT32 level) { if (level > 5) { /* 5: count of level */ return LOS_NOK; } g_dmesgLogLevel = level; return LOS_OK; } VOID LOS_DmesgClear(VOID) { UINT32 intSave; LOS_SpinLockSave(&g_dmesgSpin, &intSave); (VOID)memset_s(g_dmesgInfo->logBuf, g_logBufSize, 0, g_logBufSize); g_dmesgInfo->logHead = 0; g_dmesgInfo->logTail = 0; g_dmesgInfo->logSize = 0; LOS_SpinUnlockRestore(&g_dmesgSpin, intSave); } UINT32 LOS_DmesgMemSet(const VOID *addr, UINT32 size) { UINT32 ret = 0; if (addr == NULL) { ret = OsDmesgChangeSize(size); } else { ret = OsDmesgResetMem(addr, size); } return ret; } INT32 LOS_DmesgRead(CHAR *buf, UINT32 len) { INT32 ret; UINT32 intSave; if (buf == NULL) { return -1; } if (len == 0) { return 0; } LOS_SpinLockSave(&g_dmesgSpin, &intSave); ret = OsDmesgRead(buf, len); LOS_SpinUnlockRestore(&g_dmesgSpin, intSave); return ret; } INT32 OsDmesgWrite2File(const CHAR *fullpath, const CHAR *buf, UINT32 logSize) { INT32 ret; INT32 fd = open(fullpath, O_CREAT | O_RDWR | O_APPEND, 0644); /* 0644:file right */ if (fd < 0) { return -1; } ret = write(fd, buf, logSize); (VOID)close(fd); return ret; } #ifdef LOSCFG_FS_VFS INT32 LOS_DmesgToFile(const CHAR *filename) { CHAR *fullpath = NULL; CHAR *buf = NULL; INT32 ret; CHAR *shellWorkingDirectory = OsShellGetWorkingDirectory(); UINT32 logSize, bufSize, head, tail, intSave; CHAR *logBuf = NULL; LOS_SpinLockSave(&g_dmesgSpin, &intSave); if (OsCheckError()) { LOS_SpinUnlockRestore(&g_dmesgSpin, intSave); return -1; } logSize = g_dmesgInfo->logSize; bufSize = g_logBufSize; head = g_dmesgInfo->logHead; tail = g_dmesgInfo->logTail; logBuf = g_dmesgInfo->logBuf; LOS_SpinUnlockRestore(&g_dmesgSpin, intSave); ret = vfs_normalize_path(shellWorkingDirectory, filename, &fullpath); if (ret != 0) { return -1; } buf = (CHAR *)malloc(logSize); if (buf == NULL) { goto ERR_OUT2; } if (head < tail) { ret = memcpy_s(buf, logSize, logBuf + head, logSize); if (ret != EOK) { goto ERR_OUT3; } } else { ret = memcpy_s(buf, logSize, logBuf + head, bufSize - head); if (ret != EOK) { goto ERR_OUT3; } ret = memcpy_s(buf + bufSize - head, logSize - (bufSize - head), logBuf, tail); if (ret != EOK) { goto ERR_OUT3; } } ret = OsDmesgWrite2File(fullpath, buf, logSize); ERR_OUT3: free(buf); ERR_OUT2: free(fullpath); return ret; } #else INT32 LOS_DmesgToFile(CHAR *filename) { (VOID)filename; PRINTK("File operation need VFS\n"); return -1; } #endif INT32 OsShellCmdDmesg(INT32 argc, const CHAR **argv) { if (argc == 1) { PRINTK("\n"); OsLogShow(); return LOS_OK; } else if (argc == 2) { /* 2: count of parameters */ if (argv == NULL) { goto ERR_OUT; } if (!strcmp(argv[1], "-c")) { PRINTK("\n"); OsLogShow(); LOS_DmesgClear(); return LOS_OK; } else if (!strcmp(argv[1], "-C")) { LOS_DmesgClear(); return LOS_OK; } else if (!strcmp(argv[1], "-D")) { OsLockConsole(); return LOS_OK; } else if (!strcmp(argv[1], "-E")) { OsUnlockConsole(); return LOS_OK; } else if (!strcmp(argv[1], "-L")) { OsLockUart(); return LOS_OK; } else if (!strcmp(argv[1], "-U")) { OsUnlockUart(); return LOS_OK; } } else if (argc == 3) { /* 3: count of parameters */ if (argv == NULL) { goto ERR_OUT; } if (!strcmp(argv[1], ">")) { if (LOS_DmesgToFile((CHAR *)argv[2]) < 0) { /* 2:index of parameters */ PRINTK("Dmesg write log to %s fail \n", argv[2]); /* 2:index of parameters */ return -1; } else { PRINTK("Dmesg write log to %s success \n", argv[2]); /* 2:index of parameters */ return LOS_OK; } } else if (!strcmp(argv[1], "-l")) { return OsDmesgLvSet(argv[2]); /* 2:index of parameters */ } else if (!strcmp(argv[1], "-s")) { return OsDmesgMemSizeSet(argv[2]); /* 2:index of parameters */ } } ERR_OUT: PRINTK("dmesg: invalid option or parameter.\n"); return -1; } SHELLCMD_ENTRY(dmesg_shellcmd, CMD_TYPE_STD, "dmesg", XARGS, (CmdCallBackFunc)OsShellCmdDmesg); LOS_MODULE_INIT(OsDmesgInit, LOS_INIT_LEVEL_EARLIEST); #endif
the_stack_data/1229421.c
#include <stdbool.h> bool main(__attribute__((private(0))) int a, __attribute__((private(1))) int b) { return a == b; }
the_stack_data/559373.c
#include <stdio.h> int main(void){ char Asciicode = 65; printf("%c\n", Asciicode); }
the_stack_data/16066.c
#include <stdio.h> #include <stdlib.h> #include <mqueue.h> #include <unistd.h> #include <string.h> #define GET_QUEUE "/get_queue" #define RET_QUEUE "/ret_queue" #define MAX_TICKETS 100 mqd_t get_queue; mqd_t ret_queue; int ticket = 0, msg; int tickets[MAX_TICKETS]; struct mq_attr attr; void open_queues(){ if((get_queue = mq_open(GET_QUEUE, O_RDWR)) < 0){ perror("get mq_open"); exit(1); } if((ret_queue = mq_open(RET_QUEUE, O_RDWR|O_CREAT, 0666, &attr)) < 0){ perror("ret mq_open"); exit(1); } } int get_ticket(){ int i; int t; for(i = 0; i < MAX_TICKETS; i++){ if(tickets[i] == -1){ t = i; break; } } if(i == MAX_TICKETS-1){ t = -1; } return t; } void get_request(){ int receive = mq_receive(get_queue, (void*) &msg, sizeof(msg), 0); if(receive < 0){ perror("mq_receive:"); exit(1); } } void send_ticket(){ if (mq_send (ret_queue, (void *) &ticket, sizeof(ticket), 0) < 0){ perror("mq_send"); exit(1); } } int main(int argc, char *argv[]){ memset(tickets, -1, sizeof(tickets)); attr.mq_maxmsg = 10; attr.mq_msgsize = sizeof(ticket); attr.mq_flags = 0; open_queues(); for(;;){ get_request(); printf("Um pedido foi solicitado!\n"); ticket = get_ticket(); printf("Ticket %d selecionado!\n", ticket); send_ticket(ticket); printf("Ticket %d foi enviado!\n", ticket); sleep(1); } }
the_stack_data/139291.c
/* public domain rewrite of strerror(3) */ extern int sys_nerr; extern char *sys_errlist[]; static char msg[50]; char * strerror(error) int error; { if (error <= sys_nerr && error > 0) { return sys_errlist[error]; } sprintf(msg, "Unknown error (%d)", error); return msg; }
the_stack_data/95450299.c
#include <stdio.h> #include <string.h> #include <stdlib.h> #define MAX_LEN 256 #define COLUMNS 12 #define ROWS 1000 /* * Transform a binary string to decimal number */ int bin_to_dec(char *s) { int i, dec = 0; int pow = 1; for(i = COLUMNS - 1; i >= 0; i--) { if(s[i]) { dec += pow; } pow *= 2; } return dec; } int main() { char gamma[COLUMNS+1] = {0}; char epsilon[COLUMNS+1] = {0}; int i,j; int rows = 0, freq_0 = 0; FILE *fp; char input[ROWS][COLUMNS+1]; char buffer[ROWS]; fp = fopen("input_1", "r"); if(fp == NULL) { perror("Failed to open the file"); return 1; } /* * Read all data and put all characters in input matrix */ rows = 0; while(fgets(buffer, MAX_LEN, fp)) { for(j = 0; j < COLUMNS; j++) { input[rows][j] = buffer[j]; } rows++; } /* * Calculate frequency of 0. If it's bigger than the frequency for 1 * we should put in gamma 0 and in epsilon 1. */ for(j = 0; j < COLUMNS; j++) { for(i = 0; i < rows; i++) { if(input[i][j] == '0') freq_0++; } if(freq_0 >= rows/2) { gamma[j] = 0; epsilon[j] = 1; } else { gamma[j] = 1; epsilon[j] = 0; } freq_0 = 0; } printf("gamma: %d epsilon: %d\n", bin_to_dec(gamma), bin_to_dec(epsilon)); printf("gamma * epsilon: %d\n", bin_to_dec(gamma) * bin_to_dec(epsilon)); fclose(fp); return 0; }
the_stack_data/31720.c
#include<stdio.h> #include<stdlib.h> #include<time.h> #define size 1000 int main(){ time_t now; time(&now); struct tm mbeg; mbeg = *localtime(&now); mbeg.tm_hour = 0; mbeg.tm_min = 0; mbeg.tm_sec = 0; mbeg.tm_mday = 1; double dff = difftime(now,mktime(&mbeg))/3600; printf("%f hours\n",dff); return 0; }