file
stringlengths 18
26
| data
stringlengths 3
1.04M
|
---|---|
the_stack_data/119995.c
|
/*
sqlite3_bctbx_vfs.c
Copyright (C) 2016 Belledonne Communications SARL
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifdef SQLITE_STORAGE_ENABLED
#include "private.h"
#include "bctoolbox/charconv.h"
#include "sqlite3_bctbx_vfs.h"
#include <sqlite3.h>
#ifndef _WIN32_WCE
#include <errno.h>
#endif /*_WIN32_WCE*/
/**
* Closes the file whose file descriptor is stored in the file handle p.
* @param p sqlite3_file file handle pointer.
* @return SQLITE_OK if successful, SQLITE_IOERR_CLOSE otherwise.
*/
static int sqlite3bctbx_Close(sqlite3_file *p){
int ret;
sqlite3_bctbx_file_t *pFile = (sqlite3_bctbx_file_t*) p;
ret = bctbx_file_close(pFile->pbctbx_file);
if (!ret){
return SQLITE_OK;
}
else{
free(pFile);
return SQLITE_IOERR_CLOSE ;
}
}
/**
* Read count bytes from the open file given by p, starting at offset and puts them in
* the buffer pointed by buf.
* Calls bctbx_file_read.
*
* @param p sqlite3_file file handle pointer.
* @param buf buffer to write the read bytes to.
* @param count number of bytes to read
* @param offset file offset where to start reading
* @return SQLITE_OK if read bytes equals count,
* SQLITE_IOERR_SHORT_READ if the number of bytes read is inferior to count
* SQLITE_IOERR_READ if an error occurred.
*/
static int sqlite3bctbx_Read(sqlite3_file *p, void *buf, int count, sqlite_int64 offset){
int ret;
sqlite3_bctbx_file_t *pFile = (sqlite3_bctbx_file_t*) p;
if (pFile){
ret = (int)bctbx_file_read(pFile->pbctbx_file, buf, (size_t)count, (off_t)offset);
if( ret==count ){
return SQLITE_OK;
}
else if( ret >= 0 ){
/*fill in unread portion of buffer, as requested by sqlite3 documentation*/
memset(((uint8_t*)buf) + ret, 0, (size_t)(count-ret));
return SQLITE_IOERR_SHORT_READ;
}else {
return SQLITE_IOERR_READ;
}
}
return SQLITE_IOERR_READ;
}
/**
* Writes directly to the open file given through the p argument.
* Calls bctbx_file_write .
* @param p sqlite3_file file handle pointer.
* @param buf Buffer containing data to write
* @param count Size of data to write in bytes
* @param offset File offset where to write to
* @return SQLITE_OK on success, SQLITE_IOERR_WRITE if an error occurred.
*/
static int sqlite3bctbx_Write(sqlite3_file *p, const void *buf, int count, sqlite_int64 offset){
sqlite3_bctbx_file_t *pFile = (sqlite3_bctbx_file_t*) p;
int ret;
if (pFile ){
ret = (int)bctbx_file_write(pFile->pbctbx_file, buf, (size_t)count, (off_t)offset);
if(ret > 0 ) return SQLITE_OK;
else {
return SQLITE_IOERR_WRITE;
}
}
return SQLITE_IOERR_WRITE;
}
/**
* TRuncates or extends a file depending on the size provided.
* @param p sqlite3_file file handle pointer.
* @param size New file size.
* @return SQLITE_OK on success, SQLITE_IOERR_TRUNCATE if an error occurred during truncate,
* SQLITE_ERROR if ther was a problem on the file descriptor.
*/
static int sqlite3bctbx_Truncate(sqlite3_file *p, sqlite_int64 size){
int rc;
sqlite3_bctbx_file_t *pFile = (sqlite3_bctbx_file_t*) p;
if (pFile->pbctbx_file){
rc = bctbx_file_truncate(pFile->pbctbx_file, size);
if( rc < 0 ) {
return SQLITE_IOERR_TRUNCATE;
}
if (rc == 0){
return SQLITE_OK;
}
}
return SQLITE_ERROR;
}
/**
* Saves the file size associated with the file handle p into the argument pSize.
* @param p sqlite3_file file handle pointer.
* @return SQLITE_OK if read bytes equals count,
* SQLITE_IOERR_FSTAT if the file size returned is negative
* SQLITE_ERROR if an error occurred.
*/
static int sqlite3bctbx_FileSize(sqlite3_file *p, sqlite_int64 *pSize){
int64_t rc; /* Return code from fstat() call */
sqlite3_bctbx_file_t *pFile = (sqlite3_bctbx_file_t*) p;
if (pFile->pbctbx_file){
rc = bctbx_file_size(pFile->pbctbx_file);
if( rc < 0 ) {
return SQLITE_IOERR_FSTAT;
}
if (pSize){
*pSize = rc;
return SQLITE_OK;
}
}
return SQLITE_ERROR;
}
/************************ PLACE HOLDER FUNCTIONS ***********************/
/** These functions were implemented to please the SQLite VFS
implementation. Some of them are just stubs, some do a very limited job. */
/**
* Returns the device characteristics for the file. Stub function
* to fill the SQLite VFS function pointer structure .
* @param p sqlite3_file file handle pointer.
* @return value 4096.
*/
static int sqlite3bctbx_DeviceCharacteristics(sqlite3_file *p){
int rc = 0x00001000;
return rc;
}
/**
* Stub function for information and control over the open file.
* @param p sqlite3_file file handle pointer.
* @param op operation
* @param pArg unused
* @return SQLITE_OK on success, SALITE_NOTFOUND otherwise.
*/
static int sqlite3bctbx_FileControl(sqlite3_file *p, int op, void *pArg){
#ifdef SQLITE_FCNTL_MMAP_SIZE
if (op == SQLITE_FCNTL_MMAP_SIZE) return SQLITE_OK;
#endif
return SQLITE_NOTFOUND;
}
/**
* The lock file mechanism is not used with this VFS : checking
* the reserved lock is always OK.
* @param pUnused sqlite3_file file handle pointer.
* @param pResOut set to 0 since there is no lock mechanism.
* @return SQLITE_OK
*/
static int sqlite3bctbx_nolockCheckReservedLock(sqlite3_file *pUnused, int *pResOut){
*pResOut = 0;
return SQLITE_OK;
}
/**
* The lock file mechanism is not used with this VFS : locking the file
* is always OK.
* @param pUnused sqlite3_file file handle pointer.
* @param unused unused
* @return SQLITE_OK
*/
static int sqlite3bctbx_nolockLock(sqlite3_file *pUnused, int unused){
return SQLITE_OK;
}
/**
* The lock file mechanism is not used with this VFS : unlocking the file
* is always OK.
* @param pUnused sqlite3_file file handle pointer.
* @param unused unused
* @return SQLITE_OK
*/
static int sqlite3bctbx_nolockUnlock(sqlite3_file *pUnused, int unused){
return SQLITE_OK;
}
/**
* Simply sync the file contents given through the file handle p
* to the persistent media.
* @param p sqlite3_file file handle pointer.
* @param flags unused
* @return SQLITE_OK on success, SLITE_IOERR_FSYNC if an error occurred.
*/
static int sqlite3bctbx_Sync(sqlite3_file *p, int flags){
sqlite3_bctbx_file_t *pFile = (sqlite3_bctbx_file_t*)p;
#if _WIN32
int ret;
ret = FlushFileBuffers((HANDLE)_get_osfhandle(pFile->pbctbx_file->fd));
return (ret!=0 ? SQLITE_OK : SQLITE_IOERR_FSYNC);
#else
int rc = fsync(pFile->pbctbx_file->fd);
return (rc==0 ? SQLITE_OK : SQLITE_IOERR_FSYNC);
#endif
}
/************************ END OF PLACE HOLDER FUNCTIONS ***********************/
/**
* Opens the file fName and populates the structure pointed by p
* with the necessary io_methods
* Methods not implemented for version 1 : xTruncate, xSectorSize.
* Initializes some fields in the p structure, some of which where already
* initialized by SQLite.
* @param pVfs sqlite3_vfs VFS pointer.
* @param fName filename
* @param p file handle pointer
* @param flags db file access flags
* @param pOutFlags flags used by SQLite
* @return SQLITE_CANTOPEN on error, SQLITE_OK on success.
*/
static int sqlite3bctbx_Open(sqlite3_vfs *pVfs, const char *fName, sqlite3_file *p, int flags, int *pOutFlags ){
static const sqlite3_io_methods sqlite3_bctbx_io = {
1, /* iVersion Structure version number */
sqlite3bctbx_Close, /* xClose */
sqlite3bctbx_Read, /* xRead */
sqlite3bctbx_Write, /* xWrite */
sqlite3bctbx_Truncate, /* xTruncate */
sqlite3bctbx_Sync,
sqlite3bctbx_FileSize,
sqlite3bctbx_nolockLock,
sqlite3bctbx_nolockUnlock,
sqlite3bctbx_nolockCheckReservedLock,
sqlite3bctbx_FileControl,
NULL, /* xSectorSize */
sqlite3bctbx_DeviceCharacteristics
/*other function points follows, all NULL but not present in all sqlite3 versions.*/
};
sqlite3_bctbx_file_t * pFile = (sqlite3_bctbx_file_t*)p; /*File handle sqlite3_bctbx_file_t*/
int openFlags = 0;
char* wFname;
/*returns error if filename is empty or file handle not initialized*/
if (pFile == NULL || fName == NULL){
return SQLITE_IOERR;
}
/* Set flags to open the file with */
if( flags&SQLITE_OPEN_EXCLUSIVE ) openFlags |= O_EXCL;
if( flags&SQLITE_OPEN_CREATE ) openFlags |= O_CREAT;
if( flags&SQLITE_OPEN_READONLY ) openFlags |= O_RDONLY;
if( flags&SQLITE_OPEN_READWRITE ) openFlags |= O_RDWR;
#if defined(_WIN32)
openFlags |= O_BINARY;
#endif
wFname = bctbx_utf8_to_locale(fName);
if (wFname != NULL) {
pFile->pbctbx_file = bctbx_file_open2(bctbx_vfs_get_default(), wFname, openFlags);
bctbx_free(wFname);
} else {
pFile->pbctbx_file = NULL;
}
if( pFile->pbctbx_file == NULL){
return SQLITE_CANTOPEN;
}
if( pOutFlags ){
*pOutFlags = flags;
}
pFile->base.pMethods = &sqlite3_bctbx_io;
return SQLITE_OK;
}
sqlite3_vfs *sqlite3_bctbx_vfs_create(void){
static sqlite3_vfs bctbx_vfs = {
1, /* iVersion */
sizeof(sqlite3_bctbx_file_t), /* szOsFile */
MAXPATHNAME, /* mxPathname */
NULL, /* pNext */
LINPHONE_SQLITE3_VFS, /* zName */
NULL, /* pAppData */
sqlite3bctbx_Open, /* xOpen */
NULL, /* xDelete */
NULL, /* xAccess */
NULL /* xFullPathname */
};
return &bctbx_vfs;
}
/*static int sqlite3bctbx_winFullPathname(
sqlite3_vfs *pVfs, // Pointer to vfs object
const char *zRelative, // Possibly relative input path
int nFull, // Size of output buffer in bytes
char *zFull){
//LPWSTR zTemp;
//DWORD nByte;
// If this path name begins with "/X:", where "X" is any alphabetic
// character, discard the initial "/" from the pathname.
//
//if (zRelative[0] == '/' && sqlite3Isalpha(zRelative[1]) && zRelative[2] == ':'){
// zRelative++;
//}
nByte = GetFullPathNameW((LPCWSTR)zRelative, 0, 0, 0);
if (nByte == 0){
return SQLITE_CANTOPEN_FULLPATH;
}
nByte += 3;
zTemp = bctbx_malloc(nByte*sizeof(zTemp[0]));
memset(zTemp, 0, nByte*sizeof(zTemp[0]));
if (zTemp == 0){
return SQLITE_IOERR_NOMEM;
}
nByte = GetFullPathNameW((LPCWSTR)zRelative, nByte, zTemp, 0);
if (nByte == 0){
bctbx_free(zTemp);
return SQLITE_CANTOPEN_FULLPATH;
}
if (zTemp){
sqlite3_snprintf(MIN(nFull, pVfs->mxPathname), zFull, "%s", zTemp);
bctbx_free(zTemp);
return SQLITE_OK;
}
else{
return SQLITE_IOERR_NOMEM;
}
sqlite3_snprintf(MIN(nFull, pVfs->mxPathname), zFull, "%s", zRelative);
return SQLITE_OK;
}*/
void sqlite3_bctbx_vfs_register( int makeDefault){
sqlite3_vfs* pVfsToUse = sqlite3_bctbx_vfs_create();
#if _WIN32
sqlite3_vfs* pDefault = sqlite3_vfs_find("win32");
#else
sqlite3_vfs* pDefault = sqlite3_vfs_find("unix-none");
#endif
pVfsToUse->xCurrentTime = pDefault->xCurrentTime;
pVfsToUse->xAccess = pDefault->xAccess;
pVfsToUse->xFullPathname = pDefault->xFullPathname;
pVfsToUse->xDelete = pDefault->xDelete;
pVfsToUse->xSleep = pDefault->xSleep;
pVfsToUse->xRandomness = pDefault->xRandomness;
pVfsToUse->xGetLastError = pDefault->xGetLastError; /* Not implemented by sqlite3 :place holder */
/*Functions below should not be a problem sincve we are declaring ourselves
in version 1 */
/* used in version 2
xCurrentTimeInt64;*/
/* used in version 3
xGetSystemCall
xSetSystemCall
xNextSystemCall*/
sqlite3_vfs_register(pVfsToUse, makeDefault);
}
void sqlite3_bctbx_vfs_unregister(void)
{
sqlite3_vfs* pVfs = sqlite3_vfs_find(LINPHONE_SQLITE3_VFS);
sqlite3_vfs_unregister(pVfs);
}
#endif /*SQLITE_STORAGE_ENABLED*/
|
the_stack_data/170454374.c
|
/*
MÍNIMO. Escreva uma função que encontre uma célula
de conteúdo mínimo. Faça duas versões: uma iterativa
e outra recursiva.
*/
#include <stdio.h>
#include <stdlib.h>
typedef struct lmp{
int conteudo;
struct lmp *proximo;
} CELULA;
void insere(int conteudo, CELULA *lista){
CELULA *nova;
nova = malloc(sizeof(CELULA));
nova -> conteudo = conteudo;
nova -> proximo = lista -> proximo;
lista -> proximo = nova;
}
void min(CELULA *lista){
CELULA *p;
p = lista -> proximo;
int minimo = p -> conteudo;
while(1){
p = p -> proximo;
if(minimo > p -> conteudo)
minimo = p -> conteudo;
if(p -> proximo == NULL)
break;
}
printf("O valor mínimo é: %d\n", minimo);
}
void main(void){
CELULA *lista;
lista = malloc(sizeof(CELULA));
lista -> proximo = NULL;
int array[] = {4,20,40,60,80,100};
for(int i = 0; i < sizeof(CELULA) / sizeof(int); i++)
insere(array[i], lista);
min(lista);
}
|
the_stack_data/57491.c
|
/* { dg-do compile } */
extern void bar(int);
void f1(void)
{
#pragma omp sections nowait
{
bar (1);
#pragma omp section
bar (2);
#pragma omp section
bar (3);
#pragma omp section
bar (4);
#pragma omp section
bar (5);
}
}
void f2(void)
{
#pragma omp sections
{
#pragma omp section
{
bar (1);
bar (1);
}
#pragma omp section
bar (2);
#pragma omp section
bar (3);
#pragma omp section
bar (4);
#pragma omp section
bar (5);
}
}
|
the_stack_data/91519.c
|
int main() {
int i = 3;
int sum = 0;
switch (i) {
default:
while (i-- >= 0) {
sum++;
}
}
return sum;
}
|
the_stack_data/18889056.c
|
// general protection fault in nf_nat_setup_info
// https://syzkaller.appspot.com/bug?id=e9ebb7c4f8359696c15b
// status:6
// autogenerated by syzkaller (https://github.com/google/syzkaller)
#define _GNU_SOURCE
#include <endian.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/syscall.h>
#include <sys/types.h>
#include <unistd.h>
#define BITMASK(bf_off, bf_len) (((1ull << (bf_len)) - 1) << (bf_off))
#define STORE_BY_BITMASK(type, htobe, addr, val, bf_off, bf_len) \
*(type*)(addr) = \
htobe((htobe(*(type*)(addr)) & ~BITMASK((bf_off), (bf_len))) | \
(((type)(val) << (bf_off)) & BITMASK((bf_off), (bf_len))))
uint64_t r[1] = {0xffffffffffffffff};
int main(void)
{
syscall(__NR_mmap, 0x1ffff000ul, 0x1000ul, 0ul, 0x32ul, -1, 0ul);
syscall(__NR_mmap, 0x20000000ul, 0x1000000ul, 7ul, 0x32ul, -1, 0ul);
syscall(__NR_mmap, 0x21000000ul, 0x1000ul, 0ul, 0x32ul, -1, 0ul);
intptr_t res = 0;
res = syscall(__NR_socket, 0x10ul, 3ul, 0xc);
if (res != -1)
r[0] = res;
*(uint64_t*)0x20000300 = 0;
*(uint32_t*)0x20000308 = 0;
*(uint64_t*)0x20000310 = 0x200000c0;
*(uint64_t*)0x200000c0 = 0x20000600;
*(uint32_t*)0x20000600 = 0x7c;
*(uint8_t*)0x20000604 = 0;
*(uint8_t*)0x20000605 = 1;
*(uint16_t*)0x20000606 = 0x401;
*(uint32_t*)0x20000608 = 0;
*(uint32_t*)0x2000060c = 0;
*(uint8_t*)0x20000610 = 0x18;
*(uint8_t*)0x20000611 = 0;
*(uint16_t*)0x20000612 = htobe16(0);
*(uint16_t*)0x20000614 = 0x24;
STORE_BY_BITMASK(uint16_t, , 0x20000616, 1, 0, 14);
STORE_BY_BITMASK(uint16_t, , 0x20000617, 0, 6, 1);
STORE_BY_BITMASK(uint16_t, , 0x20000617, 1, 7, 1);
*(uint16_t*)0x20000618 = 0x14;
STORE_BY_BITMASK(uint16_t, , 0x2000061a, 1, 0, 14);
STORE_BY_BITMASK(uint16_t, , 0x2000061b, 0, 6, 1);
STORE_BY_BITMASK(uint16_t, , 0x2000061b, 1, 7, 1);
*(uint16_t*)0x2000061c = 8;
*(uint16_t*)0x2000061e = 1;
*(uint32_t*)0x20000620 = htobe32(0xe0000001);
*(uint16_t*)0x20000624 = 8;
*(uint16_t*)0x20000626 = 2;
*(uint8_t*)0x20000628 = 0xac;
*(uint8_t*)0x20000629 = 0x14;
*(uint8_t*)0x2000062a = 0x14;
*(uint8_t*)0x2000062b = 0;
*(uint16_t*)0x2000062c = 0xc;
STORE_BY_BITMASK(uint16_t, , 0x2000062e, 2, 0, 14);
STORE_BY_BITMASK(uint16_t, , 0x2000062f, 0, 6, 1);
STORE_BY_BITMASK(uint16_t, , 0x2000062f, 1, 7, 1);
*(uint16_t*)0x20000630 = 5;
*(uint16_t*)0x20000632 = 1;
*(uint8_t*)0x20000634 = 0;
*(uint16_t*)0x20000638 = 0x18;
STORE_BY_BITMASK(uint16_t, , 0x2000063a, 6, 0, 14);
STORE_BY_BITMASK(uint16_t, , 0x2000063b, 0, 6, 1);
STORE_BY_BITMASK(uint16_t, , 0x2000063b, 1, 7, 1);
*(uint16_t*)0x2000063c = 8;
*(uint16_t*)0x2000063e = 1;
*(uint32_t*)0x20000640 = htobe32(0xe0000001);
*(uint16_t*)0x20000644 = 0xc;
STORE_BY_BITMASK(uint16_t, , 0x20000646, 3, 0, 14);
STORE_BY_BITMASK(uint16_t, , 0x20000647, 0, 6, 1);
STORE_BY_BITMASK(uint16_t, , 0x20000647, 1, 7, 1);
*(uint16_t*)0x20000648 = 4;
*(uint16_t*)0x2000064a = 2;
*(uint16_t*)0x2000064c = htobe16(0);
*(uint16_t*)0x20000650 = 0x24;
STORE_BY_BITMASK(uint16_t, , 0x20000652, 2, 0, 14);
STORE_BY_BITMASK(uint16_t, , 0x20000653, 0, 6, 1);
STORE_BY_BITMASK(uint16_t, , 0x20000653, 1, 7, 1);
*(uint16_t*)0x20000654 = 0x14;
STORE_BY_BITMASK(uint16_t, , 0x20000656, 1, 0, 14);
STORE_BY_BITMASK(uint16_t, , 0x20000657, 0, 6, 1);
STORE_BY_BITMASK(uint16_t, , 0x20000657, 1, 7, 1);
*(uint16_t*)0x20000658 = 8;
*(uint16_t*)0x2000065a = 1;
*(uint8_t*)0x2000065c = 0xac;
*(uint8_t*)0x2000065d = 0x14;
*(uint8_t*)0x2000065e = 0x14;
*(uint8_t*)0x2000065f = 0;
*(uint16_t*)0x20000660 = 8;
*(uint16_t*)0x20000662 = 2;
*(uint32_t*)0x20000664 = htobe32(-1);
*(uint16_t*)0x20000668 = 0xc;
STORE_BY_BITMASK(uint16_t, , 0x2000066a, 2, 0, 14);
STORE_BY_BITMASK(uint16_t, , 0x2000066b, 0, 6, 1);
STORE_BY_BITMASK(uint16_t, , 0x2000066b, 1, 7, 1);
*(uint16_t*)0x2000066c = 5;
*(uint16_t*)0x2000066e = 1;
*(uint8_t*)0x20000670 = 0;
*(uint16_t*)0x20000674 = 8;
STORE_BY_BITMASK(uint16_t, , 0x20000676, 7, 0, 14);
STORE_BY_BITMASK(uint16_t, , 0x20000677, 1, 6, 1);
STORE_BY_BITMASK(uint16_t, , 0x20000677, 0, 7, 1);
*(uint32_t*)0x20000678 = htobe32(0);
*(uint64_t*)0x200000c8 = 0x7c;
*(uint64_t*)0x20000318 = 1;
*(uint64_t*)0x20000320 = 0;
*(uint64_t*)0x20000328 = 0;
*(uint32_t*)0x20000330 = 0;
syscall(__NR_sendmsg, r[0], 0x20000300ul, 0ul);
return 0;
}
|
the_stack_data/176706367.c
|
struct a {int b;} c;
|
the_stack_data/90691.c
|
/***************************************************************
* Name: main.c
* Purpose: Code for Application Frame
* Author: D5n9sMatrix ([email protected])
* Created: 2022-01-13
* Copyright: D5n9sMatrix (https://www.bing.com/)
* License:
**************************************************************/
int main(int argc, char* argv[]){
return 0;
}
|
the_stack_data/215767266.c
|
/*
How to compile for DOS (all mode(l)s: tiny/.COM, small/.EXE, huge/.EXE):
smlrcc -dost -nobss hw0.c -o hw0dt.com
smlrcc -doss -nobss hw0.c -o hw0ds.exe
smlrcc -dosh -nobss hw0.c -o hw0dh.exe
How to compile for Windows:
smlrcc -win -norel -nobss hw0.c -o hw0w.exe
How to compile for Linux:
smlrcc -linux -nobss hw0.c -o hw0l
*/
#ifdef _WINDOWS
typedef unsigned uint32;
typedef struct
{
union
{
uint32 Characteristics;
uint32 OrdinalFirstThunk;
} u;
uint32 TimeDateStamp;
uint32 ForwarderChain;
uint32 Name;
uint32 FirstThunk;
} tPeImageImportDescriptor;
static char hint_ExitProcess[] = "\0\0ExitProcess";
static char hint_GetStdHandle[] = "\0\0GetStdHandle";
static char hint_WriteFile[] = "\0\0WriteFile";
static void* hints[] =
{
hint_ExitProcess,
hint_GetStdHandle,
hint_WriteFile,
0
};
static void* iat[] =
{
hint_ExitProcess,
hint_GetStdHandle,
hint_WriteFile,
0
};
tPeImageImportDescriptor _dll_imports[] =
{
{
{ hints },
0,
0,
"kernel32.dll",
iat
},
{
{ 0 }
}
};
void ExitProcess(unsigned ExitCode)
{
asm("push dword [ebp+8]\n"
"call [_iat + 4*0]");
}
unsigned GetStdHandle(unsigned nStdHandle)
{
asm("push dword [ebp+8]\n"
"call [_iat + 4*1]");
}
int WriteFile(unsigned Handle,
void* Buffer,
unsigned NumberOfBytesToWrite,
unsigned* NumberOfBytesWritten,
void* Overlapped)
{
asm("push dword [ebp+24]\n"
"push dword [ebp+20]\n"
"push dword [ebp+16]\n"
"push dword [ebp+12]\n"
"push dword [ebp+8]\n"
"call [_iat + 4*2]");
}
#define STD_OUTPUT_HANDLE (-11u)
void _start(void)
{
char hwmsg[] = "Hello, World!\r\n";
unsigned h = GetStdHandle(STD_OUTPUT_HANDLE);
unsigned NumberOfBytesWritten;
WriteFile(h, hwmsg, sizeof hwmsg - 1, &NumberOfBytesWritten, 0);
ExitProcess(0);
}
#endif
#ifdef _LINUX
void exit(int e)
{
asm("mov eax, 1\n"
"mov ebx, [ebp + 8]\n"
"int 0x80");
}
int write(int fd, void* p, unsigned s)
{
asm("mov eax, 4\n" // sys_write
"mov ebx, [ebp + 8]\n"
"mov ecx, [ebp + 12]\n"
"mov edx, [ebp + 16]\n"
"int 0x80");
}
void _start(void)
{
char hwmsg[] = "Hello, World!\r\n";
write(1, hwmsg, sizeof hwmsg - 1);
exit(0);
}
#endif
#ifdef _DOS
void exit(int e)
{
#ifndef __SMALLER_C_16__
asm("mov ah, 0x4c\n"
"mov al, [bp + 8]\n"
"int 0x21");
#else
asm("mov ah, 0x4c\n"
"mov al, [bp + 4]\n"
"int 0x21");
#endif
}
int write(int fd, void* p, unsigned s)
{
#ifndef __SMALLER_C_16__
asm("mov cx, [bp + 16]\n"
"test cx, cx\n"
"jnz DosWriteCont\n"
"xor eax, eax\n"
"jmp DosWriteEnd");
asm("DosWriteCont:\n"
"mov ah, 0x40\n"
"mov bx, [bp + 8]\n"
"mov edx, [bp + 12]\n"
"ror edx, 4\n"
"mov ds, dx\n"
"shr edx, 28\n"
"int 0x21");
asm("sbb ebx, ebx\n"
"and eax, 0xffff\n"
"or eax, ebx\n"
"DosWriteEnd:");
#else
asm("mov cx, [bp + 8]\n"
"test cx, cx\n"
"jnz DosWriteCont\n"
"xor ax, ax\n"
"jmp DosWriteEnd");
asm("DosWriteCont:\n"
"mov ah, 0x40\n"
"mov bx, [bp + 4]\n"
"mov dx, [bp + 6]\n"
"int 0x21\n"
"sbb bx, bx\n"
"or ax, bx\n"
"DosWriteEnd:");
#endif
}
void __start__(void);
#ifdef __SMALLER_C_16__
void _start(void)
{
// DS and ES must be explicitly initialized in DOS .EXEs in the small memory model
// (.COM/tiny and .EXE/huge don't need that)
asm("push ss");
asm("push ss");
asm("pop ds");
asm("pop es");
__start__();
}
#else
void _start(void)
{
// perform code/data relocations
asm("extern __start__relot");
asm("extern __stop__relot");
asm("extern __start__relod");
asm("extern __stop__relod");
asm("call labnext");
asm("labnext:");
asm("xor ebx, ebx");
asm("mov bx, cs");
asm("shl ebx, 4");
asm("xor eax, eax");
asm("pop ax");
asm("add ebx, eax");
asm("sub ebx, labnext"); // ebx = base physical address
asm("mov esi, __start__relot");
asm("relo_text_loop:");
asm("cmp esi, __stop__relot");
asm("jae relo_text_done");
asm("lea edi, [ebx + esi]"); // edi = physical address of a relocation table element
asm("ror edi, 4");
asm("mov ds, di");
asm("shr edi, 28");
asm("mov edi, [di]");
asm("add edi, ebx"); // edi = physical address of a dword to which to add ebx and which then to transform into seg:ofs far pointer
asm("ror edi, 4");
asm("mov ds, di");
asm("shr edi, 28");
asm("mov eax, [di]");
asm("add eax, ebx");
asm("shl eax, 12");
asm("rol ax, 4");
asm("mov [di], eax");
asm("add esi, 4");
asm("jmp relo_text_loop");
asm("relo_text_done:");
asm("mov esi, __start__relod");
asm("relo_data_loop:");
asm("cmp esi, __stop__relod");
asm("jae relo_data_done");
asm("lea edi, [ebx + esi]"); // edi = physical address of a relocation table element
asm("ror edi, 4");
asm("mov ds, di");
asm("shr edi, 28");
asm("mov edi, [di]");
asm("add edi, ebx"); // edi = physical address of a dword to which to add ebx
asm("ror edi, 4");
asm("mov ds, di");
asm("shr edi, 28");
asm("add [di], ebx"); // actual relocation
asm("add esi, 4");
asm("jmp relo_data_loop");
asm("relo_data_done:");
// make sure there's no garbage in the 16 most significant bits of EBP and ESP
asm("xor ebp, ebp");
asm("and esp, 0xFFFF");
__start__();
}
#endif
void __start__(void)
{
char hwmsg[] = "Hello, World!\r\n";
write(1, hwmsg, sizeof hwmsg - 1);
exit(0);
}
#endif
|
the_stack_data/18995.c
|
/*-
* Copyright (c) 2009 Michihiro NAKAJIMA
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR(S) 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.
*
* $FreeBSD$
*/
#if defined(_WIN32) && !defined(__CYGWIN__)
#include "bsdtar_platform.h"
#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
#include <io.h>
#include <stddef.h>
#ifdef HAVE_SYS_UTIME_H
#include <sys/utime.h>
#endif
#include <sys/stat.h>
#include <process.h>
#include <stdlib.h>
#include <wchar.h>
#include <windows.h>
#include <sddl.h>
#include "bsdtar.h"
#include "err.h"
/* This may actually not be needed anymore.
* TODO: Review the error handling for chdir() failures and
* simply dump this if it's not really needed. */
static void __tar_dosmaperr(unsigned long);
/*
* Prepend "\\?\" to the path name and convert it to unicode to permit
* an extended-length path for a maximum total path length of 32767
* characters.
* see also http://msdn.microsoft.com/en-us/library/aa365247.aspx
*/
static wchar_t *
permissive_name(const char *name)
{
wchar_t *wn, *wnp;
wchar_t *ws, *wsp;
DWORD l, len, slen, alloclen;
int unc;
len = (DWORD)strlen(name);
wn = malloc((len + 1) * sizeof(wchar_t));
if (wn == NULL)
return (NULL);
l = MultiByteToWideChar(CP_ACP, 0, name, len, wn, len);
if (l == 0) {
free(wn);
return (NULL);
}
wn[l] = L'\0';
/* Get a full path names */
l = GetFullPathNameW(wn, 0, NULL, NULL);
if (l == 0) {
free(wn);
return (NULL);
}
wnp = malloc(l * sizeof(wchar_t));
if (wnp == NULL) {
free(wn);
return (NULL);
}
len = GetFullPathNameW(wn, l, wnp, NULL);
free(wn);
wn = wnp;
if (wnp[0] == L'\\' && wnp[1] == L'\\' &&
wnp[2] == L'?' && wnp[3] == L'\\')
/* We have already permissive names. */
return (wn);
if (wnp[0] == L'\\' && wnp[1] == L'\\' &&
wnp[2] == L'.' && wnp[3] == L'\\') {
/* Device names */
if (((wnp[4] >= L'a' && wnp[4] <= L'z') ||
(wnp[4] >= L'A' && wnp[4] <= L'Z')) &&
wnp[5] == L':' && wnp[6] == L'\\')
wnp[2] = L'?';/* Not device names. */
return (wn);
}
unc = 0;
if (wnp[0] == L'\\' && wnp[1] == L'\\' && wnp[2] != L'\\') {
wchar_t *p = &wnp[2];
/* Skip server-name letters. */
while (*p != L'\\' && *p != L'\0')
++p;
if (*p == L'\\') {
wchar_t *rp = ++p;
/* Skip share-name letters. */
while (*p != L'\\' && *p != L'\0')
++p;
if (*p == L'\\' && p != rp) {
/* Now, match patterns such as
* "\\server-name\share-name\" */
wnp += 2;
len -= 2;
unc = 1;
}
}
}
alloclen = slen = 4 + (unc * 4) + len + 1;
ws = wsp = malloc(slen * sizeof(wchar_t));
if (ws == NULL) {
free(wn);
return (NULL);
}
/* prepend "\\?\" */
wcsncpy(wsp, L"\\\\?\\", 4);
wsp += 4;
slen -= 4;
if (unc) {
/* append "UNC\" ---> "\\?\UNC\" */
wcsncpy(wsp, L"UNC\\", 4);
wsp += 4;
slen -= 4;
}
wcsncpy(wsp, wnp, slen);
free(wn);
ws[alloclen - 1] = L'\0';
return (ws);
}
int
__tar_chdir(const char *path)
{
wchar_t *ws;
int r;
r = SetCurrentDirectoryA(path);
if (r == 0) {
if (GetLastError() != ERROR_FILE_NOT_FOUND) {
__tar_dosmaperr(GetLastError());
return (-1);
}
} else
return (0);
ws = permissive_name(path);
if (ws == NULL) {
errno = EINVAL;
return (-1);
}
r = SetCurrentDirectoryW(ws);
free(ws);
if (r == 0) {
__tar_dosmaperr(GetLastError());
return (-1);
}
return (0);
}
/*
* The following function was modified from PostgreSQL sources and is
* subject to the copyright below.
*/
/*-------------------------------------------------------------------------
*
* win32error.c
* Map win32 error codes to errno values
*
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/port/win32error.c,v 1.4 2008/01/01 19:46:00 momjian Exp $
*
*-------------------------------------------------------------------------
*/
/*
PostgreSQL Database Management System
(formerly known as Postgres, then as Postgres95)
Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
Portions Copyright (c) 1994, The Regents of the University of California
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose, without fee, and without a written agreement
is hereby granted, provided that the above copyright notice and this
paragraph and the following two paragraphs appear in all copies.
IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING
LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS
DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATIONS TO
PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
*/
static const struct {
DWORD winerr;
int doserr;
} doserrors[] =
{
{ ERROR_INVALID_FUNCTION, EINVAL },
{ ERROR_FILE_NOT_FOUND, ENOENT },
{ ERROR_PATH_NOT_FOUND, ENOENT },
{ ERROR_TOO_MANY_OPEN_FILES, EMFILE },
{ ERROR_ACCESS_DENIED, EACCES },
{ ERROR_INVALID_HANDLE, EBADF },
{ ERROR_ARENA_TRASHED, ENOMEM },
{ ERROR_NOT_ENOUGH_MEMORY, ENOMEM },
{ ERROR_INVALID_BLOCK, ENOMEM },
{ ERROR_BAD_ENVIRONMENT, E2BIG },
{ ERROR_BAD_FORMAT, ENOEXEC },
{ ERROR_INVALID_ACCESS, EINVAL },
{ ERROR_INVALID_DATA, EINVAL },
{ ERROR_INVALID_DRIVE, ENOENT },
{ ERROR_CURRENT_DIRECTORY, EACCES },
{ ERROR_NOT_SAME_DEVICE, EXDEV },
{ ERROR_NO_MORE_FILES, ENOENT },
{ ERROR_LOCK_VIOLATION, EACCES },
{ ERROR_SHARING_VIOLATION, EACCES },
{ ERROR_BAD_NETPATH, ENOENT },
{ ERROR_NETWORK_ACCESS_DENIED, EACCES },
{ ERROR_BAD_NET_NAME, ENOENT },
{ ERROR_FILE_EXISTS, EEXIST },
{ ERROR_CANNOT_MAKE, EACCES },
{ ERROR_FAIL_I24, EACCES },
{ ERROR_INVALID_PARAMETER, EINVAL },
{ ERROR_NO_PROC_SLOTS, EAGAIN },
{ ERROR_DRIVE_LOCKED, EACCES },
{ ERROR_BROKEN_PIPE, EPIPE },
{ ERROR_DISK_FULL, ENOSPC },
{ ERROR_INVALID_TARGET_HANDLE, EBADF },
{ ERROR_INVALID_HANDLE, EINVAL },
{ ERROR_WAIT_NO_CHILDREN, ECHILD },
{ ERROR_CHILD_NOT_COMPLETE, ECHILD },
{ ERROR_DIRECT_ACCESS_HANDLE, EBADF },
{ ERROR_NEGATIVE_SEEK, EINVAL },
{ ERROR_SEEK_ON_DEVICE, EACCES },
{ ERROR_DIR_NOT_EMPTY, ENOTEMPTY },
{ ERROR_NOT_LOCKED, EACCES },
{ ERROR_BAD_PATHNAME, ENOENT },
{ ERROR_MAX_THRDS_REACHED, EAGAIN },
{ ERROR_LOCK_FAILED, EACCES },
{ ERROR_ALREADY_EXISTS, EEXIST },
{ ERROR_FILENAME_EXCED_RANGE, ENOENT },
{ ERROR_NESTING_NOT_ALLOWED, EAGAIN },
{ ERROR_NOT_ENOUGH_QUOTA, ENOMEM }
};
static void
__tar_dosmaperr(unsigned long e)
{
int i;
if (e == 0) {
errno = 0;
return;
}
for (i = 0; i < sizeof(doserrors); i++) {
if (doserrors[i].winerr == e) {
errno = doserrors[i].doserr;
return;
}
}
/* fprintf(stderr, "unrecognized win32 error code: %lu", e); */
errno = EINVAL;
return;
}
#endif
|
the_stack_data/56719.c
|
#if 0
void regerror(char * s)
{
printk("regexp(3): %s", s);
/* NOTREACHED */
}
#endif
|
the_stack_data/167329542.c
|
/* Autogenerated: 'src/ExtractionOCaml/word_by_word_montgomery' --static --use-value-barrier secp256k1 32 '2^256 - 2^32 - 977' mul square add sub opp from_montgomery to_montgomery nonzero selectznz to_bytes from_bytes one msat divstep divstep_precomp */
/* curve description: secp256k1 */
/* machine_wordsize = 32 (from "32") */
/* requested operations: mul, square, add, sub, opp, from_montgomery, to_montgomery, nonzero, selectznz, to_bytes, from_bytes, one, msat, divstep, divstep_precomp */
/* m = 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f (from "2^256 - 2^32 - 977") */
/* */
/* NOTE: In addition to the bounds specified above each function, all */
/* functions synthesized for this Montgomery arithmetic require the */
/* input to be strictly less than the prime modulus (m), and also */
/* require the input to be in the unique saturated representation. */
/* All functions also ensure that these two properties are true of */
/* return values. */
/* */
/* Computed values: */
/* eval z = z[0] + (z[1] << 32) + (z[2] << 64) + (z[3] << 96) + (z[4] << 128) + (z[5] << 160) + (z[6] << 192) + (z[7] << 224) */
/* bytes_eval z = z[0] + (z[1] << 8) + (z[2] << 16) + (z[3] << 24) + (z[4] << 32) + (z[5] << 40) + (z[6] << 48) + (z[7] << 56) + (z[8] << 64) + (z[9] << 72) + (z[10] << 80) + (z[11] << 88) + (z[12] << 96) + (z[13] << 104) + (z[14] << 112) + (z[15] << 120) + (z[16] << 128) + (z[17] << 136) + (z[18] << 144) + (z[19] << 152) + (z[20] << 160) + (z[21] << 168) + (z[22] << 176) + (z[23] << 184) + (z[24] << 192) + (z[25] << 200) + (z[26] << 208) + (z[27] << 216) + (z[28] << 224) + (z[29] << 232) + (z[30] << 240) + (z[31] << 248) */
/* twos_complement_eval z = let x1 := z[0] + (z[1] << 32) + (z[2] << 64) + (z[3] << 96) + (z[4] << 128) + (z[5] << 160) + (z[6] << 192) + (z[7] << 224) in */
/* if x1 & (2^256-1) < 2^255 then x1 & (2^256-1) else (x1 & (2^256-1)) - 2^256 */
#include <stdint.h>
typedef unsigned char fiat_secp256k1_uint1;
typedef signed char fiat_secp256k1_int1;
#if (-1 & 3) != 3
#error "This code only works on a two's complement system"
#endif
#if !defined(FIAT_SECP256K1_NO_ASM) && (defined(__GNUC__) || defined(__clang__))
static __inline__ uint32_t fiat_secp256k1_value_barrier_u32(uint32_t a) {
__asm__("" : "+r"(a) : /* no inputs */);
return a;
}
#else
# define fiat_secp256k1_value_barrier_u32(x) (x)
#endif
/*
* The function fiat_secp256k1_addcarryx_u32 is an addition with carry.
* Postconditions:
* out1 = (arg1 + arg2 + arg3) mod 2^32
* out2 = ⌊(arg1 + arg2 + arg3) / 2^32⌋
*
* Input Bounds:
* arg1: [0x0 ~> 0x1]
* arg2: [0x0 ~> 0xffffffff]
* arg3: [0x0 ~> 0xffffffff]
* Output Bounds:
* out1: [0x0 ~> 0xffffffff]
* out2: [0x0 ~> 0x1]
*/
static void fiat_secp256k1_addcarryx_u32(uint32_t* out1, fiat_secp256k1_uint1* out2, fiat_secp256k1_uint1 arg1, uint32_t arg2, uint32_t arg3) {
uint64_t x1;
uint32_t x2;
fiat_secp256k1_uint1 x3;
x1 = ((arg1 + (uint64_t)arg2) + arg3);
x2 = (uint32_t)(x1 & UINT32_C(0xffffffff));
x3 = (fiat_secp256k1_uint1)(x1 >> 32);
*out1 = x2;
*out2 = x3;
}
/*
* The function fiat_secp256k1_subborrowx_u32 is a subtraction with borrow.
* Postconditions:
* out1 = (-arg1 + arg2 + -arg3) mod 2^32
* out2 = -⌊(-arg1 + arg2 + -arg3) / 2^32⌋
*
* Input Bounds:
* arg1: [0x0 ~> 0x1]
* arg2: [0x0 ~> 0xffffffff]
* arg3: [0x0 ~> 0xffffffff]
* Output Bounds:
* out1: [0x0 ~> 0xffffffff]
* out2: [0x0 ~> 0x1]
*/
static void fiat_secp256k1_subborrowx_u32(uint32_t* out1, fiat_secp256k1_uint1* out2, fiat_secp256k1_uint1 arg1, uint32_t arg2, uint32_t arg3) {
int64_t x1;
fiat_secp256k1_int1 x2;
uint32_t x3;
x1 = ((arg2 - (int64_t)arg1) - arg3);
x2 = (fiat_secp256k1_int1)(x1 >> 32);
x3 = (uint32_t)(x1 & UINT32_C(0xffffffff));
*out1 = x3;
*out2 = (fiat_secp256k1_uint1)(0x0 - x2);
}
/*
* The function fiat_secp256k1_mulx_u32 is a multiplication, returning the full double-width result.
* Postconditions:
* out1 = (arg1 * arg2) mod 2^32
* out2 = ⌊arg1 * arg2 / 2^32⌋
*
* Input Bounds:
* arg1: [0x0 ~> 0xffffffff]
* arg2: [0x0 ~> 0xffffffff]
* Output Bounds:
* out1: [0x0 ~> 0xffffffff]
* out2: [0x0 ~> 0xffffffff]
*/
static void fiat_secp256k1_mulx_u32(uint32_t* out1, uint32_t* out2, uint32_t arg1, uint32_t arg2) {
uint64_t x1;
uint32_t x2;
uint32_t x3;
x1 = ((uint64_t)arg1 * arg2);
x2 = (uint32_t)(x1 & UINT32_C(0xffffffff));
x3 = (uint32_t)(x1 >> 32);
*out1 = x2;
*out2 = x3;
}
/*
* The function fiat_secp256k1_cmovznz_u32 is a single-word conditional move.
* Postconditions:
* out1 = (if arg1 = 0 then arg2 else arg3)
*
* Input Bounds:
* arg1: [0x0 ~> 0x1]
* arg2: [0x0 ~> 0xffffffff]
* arg3: [0x0 ~> 0xffffffff]
* Output Bounds:
* out1: [0x0 ~> 0xffffffff]
*/
static void fiat_secp256k1_cmovznz_u32(uint32_t* out1, fiat_secp256k1_uint1 arg1, uint32_t arg2, uint32_t arg3) {
fiat_secp256k1_uint1 x1;
uint32_t x2;
uint32_t x3;
x1 = (!(!arg1));
x2 = ((fiat_secp256k1_int1)(0x0 - x1) & UINT32_C(0xffffffff));
x3 = ((fiat_secp256k1_value_barrier_u32(x2) & arg3) | (fiat_secp256k1_value_barrier_u32((~x2)) & arg2));
*out1 = x3;
}
/*
* The function fiat_secp256k1_mul multiplies two field elements in the Montgomery domain.
* Preconditions:
* 0 ≤ eval arg1 < m
* 0 ≤ eval arg2 < m
* Postconditions:
* eval (from_montgomery out1) mod m = (eval (from_montgomery arg1) * eval (from_montgomery arg2)) mod m
* 0 ≤ eval out1 < m
*
* Input Bounds:
* arg1: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]]
* arg2: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]]
* Output Bounds:
* out1: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]]
*/
static void fiat_secp256k1_mul(uint32_t out1[8], const uint32_t arg1[8], const uint32_t arg2[8]) {
uint32_t x1;
uint32_t x2;
uint32_t x3;
uint32_t x4;
uint32_t x5;
uint32_t x6;
uint32_t x7;
uint32_t x8;
uint32_t x9;
uint32_t x10;
uint32_t x11;
uint32_t x12;
uint32_t x13;
uint32_t x14;
uint32_t x15;
uint32_t x16;
uint32_t x17;
uint32_t x18;
uint32_t x19;
uint32_t x20;
uint32_t x21;
uint32_t x22;
uint32_t x23;
uint32_t x24;
uint32_t x25;
fiat_secp256k1_uint1 x26;
uint32_t x27;
fiat_secp256k1_uint1 x28;
uint32_t x29;
fiat_secp256k1_uint1 x30;
uint32_t x31;
fiat_secp256k1_uint1 x32;
uint32_t x33;
fiat_secp256k1_uint1 x34;
uint32_t x35;
fiat_secp256k1_uint1 x36;
uint32_t x37;
fiat_secp256k1_uint1 x38;
uint32_t x39;
uint32_t x40;
uint32_t x41;
uint32_t x42;
uint32_t x43;
uint32_t x44;
uint32_t x45;
uint32_t x46;
uint32_t x47;
uint32_t x48;
uint32_t x49;
uint32_t x50;
uint32_t x51;
uint32_t x52;
uint32_t x53;
uint32_t x54;
uint32_t x55;
uint32_t x56;
uint32_t x57;
uint32_t x58;
fiat_secp256k1_uint1 x59;
uint32_t x60;
fiat_secp256k1_uint1 x61;
uint32_t x62;
fiat_secp256k1_uint1 x63;
uint32_t x64;
fiat_secp256k1_uint1 x65;
uint32_t x66;
fiat_secp256k1_uint1 x67;
uint32_t x68;
fiat_secp256k1_uint1 x69;
uint32_t x70;
fiat_secp256k1_uint1 x71;
uint32_t x72;
uint32_t x73;
fiat_secp256k1_uint1 x74;
uint32_t x75;
fiat_secp256k1_uint1 x76;
uint32_t x77;
fiat_secp256k1_uint1 x78;
uint32_t x79;
fiat_secp256k1_uint1 x80;
uint32_t x81;
fiat_secp256k1_uint1 x82;
uint32_t x83;
fiat_secp256k1_uint1 x84;
uint32_t x85;
fiat_secp256k1_uint1 x86;
uint32_t x87;
fiat_secp256k1_uint1 x88;
uint32_t x89;
fiat_secp256k1_uint1 x90;
uint32_t x91;
uint32_t x92;
uint32_t x93;
uint32_t x94;
uint32_t x95;
uint32_t x96;
uint32_t x97;
uint32_t x98;
uint32_t x99;
uint32_t x100;
uint32_t x101;
uint32_t x102;
uint32_t x103;
uint32_t x104;
uint32_t x105;
uint32_t x106;
uint32_t x107;
fiat_secp256k1_uint1 x108;
uint32_t x109;
fiat_secp256k1_uint1 x110;
uint32_t x111;
fiat_secp256k1_uint1 x112;
uint32_t x113;
fiat_secp256k1_uint1 x114;
uint32_t x115;
fiat_secp256k1_uint1 x116;
uint32_t x117;
fiat_secp256k1_uint1 x118;
uint32_t x119;
fiat_secp256k1_uint1 x120;
uint32_t x121;
uint32_t x122;
fiat_secp256k1_uint1 x123;
uint32_t x124;
fiat_secp256k1_uint1 x125;
uint32_t x126;
fiat_secp256k1_uint1 x127;
uint32_t x128;
fiat_secp256k1_uint1 x129;
uint32_t x130;
fiat_secp256k1_uint1 x131;
uint32_t x132;
fiat_secp256k1_uint1 x133;
uint32_t x134;
fiat_secp256k1_uint1 x135;
uint32_t x136;
fiat_secp256k1_uint1 x137;
uint32_t x138;
fiat_secp256k1_uint1 x139;
uint32_t x140;
uint32_t x141;
uint32_t x142;
uint32_t x143;
uint32_t x144;
uint32_t x145;
uint32_t x146;
uint32_t x147;
uint32_t x148;
uint32_t x149;
uint32_t x150;
uint32_t x151;
uint32_t x152;
uint32_t x153;
uint32_t x154;
uint32_t x155;
uint32_t x156;
uint32_t x157;
uint32_t x158;
fiat_secp256k1_uint1 x159;
uint32_t x160;
fiat_secp256k1_uint1 x161;
uint32_t x162;
fiat_secp256k1_uint1 x163;
uint32_t x164;
fiat_secp256k1_uint1 x165;
uint32_t x166;
fiat_secp256k1_uint1 x167;
uint32_t x168;
fiat_secp256k1_uint1 x169;
uint32_t x170;
fiat_secp256k1_uint1 x171;
uint32_t x172;
uint32_t x173;
fiat_secp256k1_uint1 x174;
uint32_t x175;
fiat_secp256k1_uint1 x176;
uint32_t x177;
fiat_secp256k1_uint1 x178;
uint32_t x179;
fiat_secp256k1_uint1 x180;
uint32_t x181;
fiat_secp256k1_uint1 x182;
uint32_t x183;
fiat_secp256k1_uint1 x184;
uint32_t x185;
fiat_secp256k1_uint1 x186;
uint32_t x187;
fiat_secp256k1_uint1 x188;
uint32_t x189;
fiat_secp256k1_uint1 x190;
uint32_t x191;
uint32_t x192;
uint32_t x193;
uint32_t x194;
uint32_t x195;
uint32_t x196;
uint32_t x197;
uint32_t x198;
uint32_t x199;
uint32_t x200;
uint32_t x201;
uint32_t x202;
uint32_t x203;
uint32_t x204;
uint32_t x205;
uint32_t x206;
uint32_t x207;
uint32_t x208;
fiat_secp256k1_uint1 x209;
uint32_t x210;
fiat_secp256k1_uint1 x211;
uint32_t x212;
fiat_secp256k1_uint1 x213;
uint32_t x214;
fiat_secp256k1_uint1 x215;
uint32_t x216;
fiat_secp256k1_uint1 x217;
uint32_t x218;
fiat_secp256k1_uint1 x219;
uint32_t x220;
fiat_secp256k1_uint1 x221;
uint32_t x222;
uint32_t x223;
fiat_secp256k1_uint1 x224;
uint32_t x225;
fiat_secp256k1_uint1 x226;
uint32_t x227;
fiat_secp256k1_uint1 x228;
uint32_t x229;
fiat_secp256k1_uint1 x230;
uint32_t x231;
fiat_secp256k1_uint1 x232;
uint32_t x233;
fiat_secp256k1_uint1 x234;
uint32_t x235;
fiat_secp256k1_uint1 x236;
uint32_t x237;
fiat_secp256k1_uint1 x238;
uint32_t x239;
fiat_secp256k1_uint1 x240;
uint32_t x241;
uint32_t x242;
uint32_t x243;
uint32_t x244;
uint32_t x245;
uint32_t x246;
uint32_t x247;
uint32_t x248;
uint32_t x249;
uint32_t x250;
uint32_t x251;
uint32_t x252;
uint32_t x253;
uint32_t x254;
uint32_t x255;
uint32_t x256;
uint32_t x257;
uint32_t x258;
uint32_t x259;
fiat_secp256k1_uint1 x260;
uint32_t x261;
fiat_secp256k1_uint1 x262;
uint32_t x263;
fiat_secp256k1_uint1 x264;
uint32_t x265;
fiat_secp256k1_uint1 x266;
uint32_t x267;
fiat_secp256k1_uint1 x268;
uint32_t x269;
fiat_secp256k1_uint1 x270;
uint32_t x271;
fiat_secp256k1_uint1 x272;
uint32_t x273;
uint32_t x274;
fiat_secp256k1_uint1 x275;
uint32_t x276;
fiat_secp256k1_uint1 x277;
uint32_t x278;
fiat_secp256k1_uint1 x279;
uint32_t x280;
fiat_secp256k1_uint1 x281;
uint32_t x282;
fiat_secp256k1_uint1 x283;
uint32_t x284;
fiat_secp256k1_uint1 x285;
uint32_t x286;
fiat_secp256k1_uint1 x287;
uint32_t x288;
fiat_secp256k1_uint1 x289;
uint32_t x290;
fiat_secp256k1_uint1 x291;
uint32_t x292;
uint32_t x293;
uint32_t x294;
uint32_t x295;
uint32_t x296;
uint32_t x297;
uint32_t x298;
uint32_t x299;
uint32_t x300;
uint32_t x301;
uint32_t x302;
uint32_t x303;
uint32_t x304;
uint32_t x305;
uint32_t x306;
uint32_t x307;
uint32_t x308;
uint32_t x309;
fiat_secp256k1_uint1 x310;
uint32_t x311;
fiat_secp256k1_uint1 x312;
uint32_t x313;
fiat_secp256k1_uint1 x314;
uint32_t x315;
fiat_secp256k1_uint1 x316;
uint32_t x317;
fiat_secp256k1_uint1 x318;
uint32_t x319;
fiat_secp256k1_uint1 x320;
uint32_t x321;
fiat_secp256k1_uint1 x322;
uint32_t x323;
uint32_t x324;
fiat_secp256k1_uint1 x325;
uint32_t x326;
fiat_secp256k1_uint1 x327;
uint32_t x328;
fiat_secp256k1_uint1 x329;
uint32_t x330;
fiat_secp256k1_uint1 x331;
uint32_t x332;
fiat_secp256k1_uint1 x333;
uint32_t x334;
fiat_secp256k1_uint1 x335;
uint32_t x336;
fiat_secp256k1_uint1 x337;
uint32_t x338;
fiat_secp256k1_uint1 x339;
uint32_t x340;
fiat_secp256k1_uint1 x341;
uint32_t x342;
uint32_t x343;
uint32_t x344;
uint32_t x345;
uint32_t x346;
uint32_t x347;
uint32_t x348;
uint32_t x349;
uint32_t x350;
uint32_t x351;
uint32_t x352;
uint32_t x353;
uint32_t x354;
uint32_t x355;
uint32_t x356;
uint32_t x357;
uint32_t x358;
uint32_t x359;
uint32_t x360;
fiat_secp256k1_uint1 x361;
uint32_t x362;
fiat_secp256k1_uint1 x363;
uint32_t x364;
fiat_secp256k1_uint1 x365;
uint32_t x366;
fiat_secp256k1_uint1 x367;
uint32_t x368;
fiat_secp256k1_uint1 x369;
uint32_t x370;
fiat_secp256k1_uint1 x371;
uint32_t x372;
fiat_secp256k1_uint1 x373;
uint32_t x374;
uint32_t x375;
fiat_secp256k1_uint1 x376;
uint32_t x377;
fiat_secp256k1_uint1 x378;
uint32_t x379;
fiat_secp256k1_uint1 x380;
uint32_t x381;
fiat_secp256k1_uint1 x382;
uint32_t x383;
fiat_secp256k1_uint1 x384;
uint32_t x385;
fiat_secp256k1_uint1 x386;
uint32_t x387;
fiat_secp256k1_uint1 x388;
uint32_t x389;
fiat_secp256k1_uint1 x390;
uint32_t x391;
fiat_secp256k1_uint1 x392;
uint32_t x393;
uint32_t x394;
uint32_t x395;
uint32_t x396;
uint32_t x397;
uint32_t x398;
uint32_t x399;
uint32_t x400;
uint32_t x401;
uint32_t x402;
uint32_t x403;
uint32_t x404;
uint32_t x405;
uint32_t x406;
uint32_t x407;
uint32_t x408;
uint32_t x409;
uint32_t x410;
fiat_secp256k1_uint1 x411;
uint32_t x412;
fiat_secp256k1_uint1 x413;
uint32_t x414;
fiat_secp256k1_uint1 x415;
uint32_t x416;
fiat_secp256k1_uint1 x417;
uint32_t x418;
fiat_secp256k1_uint1 x419;
uint32_t x420;
fiat_secp256k1_uint1 x421;
uint32_t x422;
fiat_secp256k1_uint1 x423;
uint32_t x424;
uint32_t x425;
fiat_secp256k1_uint1 x426;
uint32_t x427;
fiat_secp256k1_uint1 x428;
uint32_t x429;
fiat_secp256k1_uint1 x430;
uint32_t x431;
fiat_secp256k1_uint1 x432;
uint32_t x433;
fiat_secp256k1_uint1 x434;
uint32_t x435;
fiat_secp256k1_uint1 x436;
uint32_t x437;
fiat_secp256k1_uint1 x438;
uint32_t x439;
fiat_secp256k1_uint1 x440;
uint32_t x441;
fiat_secp256k1_uint1 x442;
uint32_t x443;
uint32_t x444;
uint32_t x445;
uint32_t x446;
uint32_t x447;
uint32_t x448;
uint32_t x449;
uint32_t x450;
uint32_t x451;
uint32_t x452;
uint32_t x453;
uint32_t x454;
uint32_t x455;
uint32_t x456;
uint32_t x457;
uint32_t x458;
uint32_t x459;
uint32_t x460;
uint32_t x461;
fiat_secp256k1_uint1 x462;
uint32_t x463;
fiat_secp256k1_uint1 x464;
uint32_t x465;
fiat_secp256k1_uint1 x466;
uint32_t x467;
fiat_secp256k1_uint1 x468;
uint32_t x469;
fiat_secp256k1_uint1 x470;
uint32_t x471;
fiat_secp256k1_uint1 x472;
uint32_t x473;
fiat_secp256k1_uint1 x474;
uint32_t x475;
uint32_t x476;
fiat_secp256k1_uint1 x477;
uint32_t x478;
fiat_secp256k1_uint1 x479;
uint32_t x480;
fiat_secp256k1_uint1 x481;
uint32_t x482;
fiat_secp256k1_uint1 x483;
uint32_t x484;
fiat_secp256k1_uint1 x485;
uint32_t x486;
fiat_secp256k1_uint1 x487;
uint32_t x488;
fiat_secp256k1_uint1 x489;
uint32_t x490;
fiat_secp256k1_uint1 x491;
uint32_t x492;
fiat_secp256k1_uint1 x493;
uint32_t x494;
uint32_t x495;
uint32_t x496;
uint32_t x497;
uint32_t x498;
uint32_t x499;
uint32_t x500;
uint32_t x501;
uint32_t x502;
uint32_t x503;
uint32_t x504;
uint32_t x505;
uint32_t x506;
uint32_t x507;
uint32_t x508;
uint32_t x509;
uint32_t x510;
uint32_t x511;
fiat_secp256k1_uint1 x512;
uint32_t x513;
fiat_secp256k1_uint1 x514;
uint32_t x515;
fiat_secp256k1_uint1 x516;
uint32_t x517;
fiat_secp256k1_uint1 x518;
uint32_t x519;
fiat_secp256k1_uint1 x520;
uint32_t x521;
fiat_secp256k1_uint1 x522;
uint32_t x523;
fiat_secp256k1_uint1 x524;
uint32_t x525;
uint32_t x526;
fiat_secp256k1_uint1 x527;
uint32_t x528;
fiat_secp256k1_uint1 x529;
uint32_t x530;
fiat_secp256k1_uint1 x531;
uint32_t x532;
fiat_secp256k1_uint1 x533;
uint32_t x534;
fiat_secp256k1_uint1 x535;
uint32_t x536;
fiat_secp256k1_uint1 x537;
uint32_t x538;
fiat_secp256k1_uint1 x539;
uint32_t x540;
fiat_secp256k1_uint1 x541;
uint32_t x542;
fiat_secp256k1_uint1 x543;
uint32_t x544;
uint32_t x545;
uint32_t x546;
uint32_t x547;
uint32_t x548;
uint32_t x549;
uint32_t x550;
uint32_t x551;
uint32_t x552;
uint32_t x553;
uint32_t x554;
uint32_t x555;
uint32_t x556;
uint32_t x557;
uint32_t x558;
uint32_t x559;
uint32_t x560;
uint32_t x561;
uint32_t x562;
fiat_secp256k1_uint1 x563;
uint32_t x564;
fiat_secp256k1_uint1 x565;
uint32_t x566;
fiat_secp256k1_uint1 x567;
uint32_t x568;
fiat_secp256k1_uint1 x569;
uint32_t x570;
fiat_secp256k1_uint1 x571;
uint32_t x572;
fiat_secp256k1_uint1 x573;
uint32_t x574;
fiat_secp256k1_uint1 x575;
uint32_t x576;
uint32_t x577;
fiat_secp256k1_uint1 x578;
uint32_t x579;
fiat_secp256k1_uint1 x580;
uint32_t x581;
fiat_secp256k1_uint1 x582;
uint32_t x583;
fiat_secp256k1_uint1 x584;
uint32_t x585;
fiat_secp256k1_uint1 x586;
uint32_t x587;
fiat_secp256k1_uint1 x588;
uint32_t x589;
fiat_secp256k1_uint1 x590;
uint32_t x591;
fiat_secp256k1_uint1 x592;
uint32_t x593;
fiat_secp256k1_uint1 x594;
uint32_t x595;
uint32_t x596;
uint32_t x597;
uint32_t x598;
uint32_t x599;
uint32_t x600;
uint32_t x601;
uint32_t x602;
uint32_t x603;
uint32_t x604;
uint32_t x605;
uint32_t x606;
uint32_t x607;
uint32_t x608;
uint32_t x609;
uint32_t x610;
uint32_t x611;
uint32_t x612;
fiat_secp256k1_uint1 x613;
uint32_t x614;
fiat_secp256k1_uint1 x615;
uint32_t x616;
fiat_secp256k1_uint1 x617;
uint32_t x618;
fiat_secp256k1_uint1 x619;
uint32_t x620;
fiat_secp256k1_uint1 x621;
uint32_t x622;
fiat_secp256k1_uint1 x623;
uint32_t x624;
fiat_secp256k1_uint1 x625;
uint32_t x626;
uint32_t x627;
fiat_secp256k1_uint1 x628;
uint32_t x629;
fiat_secp256k1_uint1 x630;
uint32_t x631;
fiat_secp256k1_uint1 x632;
uint32_t x633;
fiat_secp256k1_uint1 x634;
uint32_t x635;
fiat_secp256k1_uint1 x636;
uint32_t x637;
fiat_secp256k1_uint1 x638;
uint32_t x639;
fiat_secp256k1_uint1 x640;
uint32_t x641;
fiat_secp256k1_uint1 x642;
uint32_t x643;
fiat_secp256k1_uint1 x644;
uint32_t x645;
uint32_t x646;
uint32_t x647;
uint32_t x648;
uint32_t x649;
uint32_t x650;
uint32_t x651;
uint32_t x652;
uint32_t x653;
uint32_t x654;
uint32_t x655;
uint32_t x656;
uint32_t x657;
uint32_t x658;
uint32_t x659;
uint32_t x660;
uint32_t x661;
uint32_t x662;
uint32_t x663;
fiat_secp256k1_uint1 x664;
uint32_t x665;
fiat_secp256k1_uint1 x666;
uint32_t x667;
fiat_secp256k1_uint1 x668;
uint32_t x669;
fiat_secp256k1_uint1 x670;
uint32_t x671;
fiat_secp256k1_uint1 x672;
uint32_t x673;
fiat_secp256k1_uint1 x674;
uint32_t x675;
fiat_secp256k1_uint1 x676;
uint32_t x677;
uint32_t x678;
fiat_secp256k1_uint1 x679;
uint32_t x680;
fiat_secp256k1_uint1 x681;
uint32_t x682;
fiat_secp256k1_uint1 x683;
uint32_t x684;
fiat_secp256k1_uint1 x685;
uint32_t x686;
fiat_secp256k1_uint1 x687;
uint32_t x688;
fiat_secp256k1_uint1 x689;
uint32_t x690;
fiat_secp256k1_uint1 x691;
uint32_t x692;
fiat_secp256k1_uint1 x693;
uint32_t x694;
fiat_secp256k1_uint1 x695;
uint32_t x696;
uint32_t x697;
uint32_t x698;
uint32_t x699;
uint32_t x700;
uint32_t x701;
uint32_t x702;
uint32_t x703;
uint32_t x704;
uint32_t x705;
uint32_t x706;
uint32_t x707;
uint32_t x708;
uint32_t x709;
uint32_t x710;
uint32_t x711;
uint32_t x712;
uint32_t x713;
fiat_secp256k1_uint1 x714;
uint32_t x715;
fiat_secp256k1_uint1 x716;
uint32_t x717;
fiat_secp256k1_uint1 x718;
uint32_t x719;
fiat_secp256k1_uint1 x720;
uint32_t x721;
fiat_secp256k1_uint1 x722;
uint32_t x723;
fiat_secp256k1_uint1 x724;
uint32_t x725;
fiat_secp256k1_uint1 x726;
uint32_t x727;
uint32_t x728;
fiat_secp256k1_uint1 x729;
uint32_t x730;
fiat_secp256k1_uint1 x731;
uint32_t x732;
fiat_secp256k1_uint1 x733;
uint32_t x734;
fiat_secp256k1_uint1 x735;
uint32_t x736;
fiat_secp256k1_uint1 x737;
uint32_t x738;
fiat_secp256k1_uint1 x739;
uint32_t x740;
fiat_secp256k1_uint1 x741;
uint32_t x742;
fiat_secp256k1_uint1 x743;
uint32_t x744;
fiat_secp256k1_uint1 x745;
uint32_t x746;
uint32_t x747;
uint32_t x748;
uint32_t x749;
uint32_t x750;
uint32_t x751;
uint32_t x752;
uint32_t x753;
uint32_t x754;
uint32_t x755;
uint32_t x756;
uint32_t x757;
uint32_t x758;
uint32_t x759;
uint32_t x760;
uint32_t x761;
uint32_t x762;
uint32_t x763;
uint32_t x764;
fiat_secp256k1_uint1 x765;
uint32_t x766;
fiat_secp256k1_uint1 x767;
uint32_t x768;
fiat_secp256k1_uint1 x769;
uint32_t x770;
fiat_secp256k1_uint1 x771;
uint32_t x772;
fiat_secp256k1_uint1 x773;
uint32_t x774;
fiat_secp256k1_uint1 x775;
uint32_t x776;
fiat_secp256k1_uint1 x777;
uint32_t x778;
uint32_t x779;
fiat_secp256k1_uint1 x780;
uint32_t x781;
fiat_secp256k1_uint1 x782;
uint32_t x783;
fiat_secp256k1_uint1 x784;
uint32_t x785;
fiat_secp256k1_uint1 x786;
uint32_t x787;
fiat_secp256k1_uint1 x788;
uint32_t x789;
fiat_secp256k1_uint1 x790;
uint32_t x791;
fiat_secp256k1_uint1 x792;
uint32_t x793;
fiat_secp256k1_uint1 x794;
uint32_t x795;
fiat_secp256k1_uint1 x796;
uint32_t x797;
uint32_t x798;
fiat_secp256k1_uint1 x799;
uint32_t x800;
fiat_secp256k1_uint1 x801;
uint32_t x802;
fiat_secp256k1_uint1 x803;
uint32_t x804;
fiat_secp256k1_uint1 x805;
uint32_t x806;
fiat_secp256k1_uint1 x807;
uint32_t x808;
fiat_secp256k1_uint1 x809;
uint32_t x810;
fiat_secp256k1_uint1 x811;
uint32_t x812;
fiat_secp256k1_uint1 x813;
uint32_t x814;
fiat_secp256k1_uint1 x815;
uint32_t x816;
uint32_t x817;
uint32_t x818;
uint32_t x819;
uint32_t x820;
uint32_t x821;
uint32_t x822;
uint32_t x823;
x1 = (arg1[1]);
x2 = (arg1[2]);
x3 = (arg1[3]);
x4 = (arg1[4]);
x5 = (arg1[5]);
x6 = (arg1[6]);
x7 = (arg1[7]);
x8 = (arg1[0]);
fiat_secp256k1_mulx_u32(&x9, &x10, x8, (arg2[7]));
fiat_secp256k1_mulx_u32(&x11, &x12, x8, (arg2[6]));
fiat_secp256k1_mulx_u32(&x13, &x14, x8, (arg2[5]));
fiat_secp256k1_mulx_u32(&x15, &x16, x8, (arg2[4]));
fiat_secp256k1_mulx_u32(&x17, &x18, x8, (arg2[3]));
fiat_secp256k1_mulx_u32(&x19, &x20, x8, (arg2[2]));
fiat_secp256k1_mulx_u32(&x21, &x22, x8, (arg2[1]));
fiat_secp256k1_mulx_u32(&x23, &x24, x8, (arg2[0]));
fiat_secp256k1_addcarryx_u32(&x25, &x26, 0x0, x24, x21);
fiat_secp256k1_addcarryx_u32(&x27, &x28, x26, x22, x19);
fiat_secp256k1_addcarryx_u32(&x29, &x30, x28, x20, x17);
fiat_secp256k1_addcarryx_u32(&x31, &x32, x30, x18, x15);
fiat_secp256k1_addcarryx_u32(&x33, &x34, x32, x16, x13);
fiat_secp256k1_addcarryx_u32(&x35, &x36, x34, x14, x11);
fiat_secp256k1_addcarryx_u32(&x37, &x38, x36, x12, x9);
x39 = (x38 + x10);
fiat_secp256k1_mulx_u32(&x40, &x41, x23, UINT32_C(0xd2253531));
fiat_secp256k1_mulx_u32(&x42, &x43, x40, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x44, &x45, x40, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x46, &x47, x40, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x48, &x49, x40, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x50, &x51, x40, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x52, &x53, x40, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x54, &x55, x40, UINT32_C(0xfffffffe));
fiat_secp256k1_mulx_u32(&x56, &x57, x40, UINT32_C(0xfffffc2f));
fiat_secp256k1_addcarryx_u32(&x58, &x59, 0x0, x57, x54);
fiat_secp256k1_addcarryx_u32(&x60, &x61, x59, x55, x52);
fiat_secp256k1_addcarryx_u32(&x62, &x63, x61, x53, x50);
fiat_secp256k1_addcarryx_u32(&x64, &x65, x63, x51, x48);
fiat_secp256k1_addcarryx_u32(&x66, &x67, x65, x49, x46);
fiat_secp256k1_addcarryx_u32(&x68, &x69, x67, x47, x44);
fiat_secp256k1_addcarryx_u32(&x70, &x71, x69, x45, x42);
x72 = (x71 + x43);
fiat_secp256k1_addcarryx_u32(&x73, &x74, 0x0, x23, x56);
fiat_secp256k1_addcarryx_u32(&x75, &x76, x74, x25, x58);
fiat_secp256k1_addcarryx_u32(&x77, &x78, x76, x27, x60);
fiat_secp256k1_addcarryx_u32(&x79, &x80, x78, x29, x62);
fiat_secp256k1_addcarryx_u32(&x81, &x82, x80, x31, x64);
fiat_secp256k1_addcarryx_u32(&x83, &x84, x82, x33, x66);
fiat_secp256k1_addcarryx_u32(&x85, &x86, x84, x35, x68);
fiat_secp256k1_addcarryx_u32(&x87, &x88, x86, x37, x70);
fiat_secp256k1_addcarryx_u32(&x89, &x90, x88, x39, x72);
fiat_secp256k1_mulx_u32(&x91, &x92, x1, (arg2[7]));
fiat_secp256k1_mulx_u32(&x93, &x94, x1, (arg2[6]));
fiat_secp256k1_mulx_u32(&x95, &x96, x1, (arg2[5]));
fiat_secp256k1_mulx_u32(&x97, &x98, x1, (arg2[4]));
fiat_secp256k1_mulx_u32(&x99, &x100, x1, (arg2[3]));
fiat_secp256k1_mulx_u32(&x101, &x102, x1, (arg2[2]));
fiat_secp256k1_mulx_u32(&x103, &x104, x1, (arg2[1]));
fiat_secp256k1_mulx_u32(&x105, &x106, x1, (arg2[0]));
fiat_secp256k1_addcarryx_u32(&x107, &x108, 0x0, x106, x103);
fiat_secp256k1_addcarryx_u32(&x109, &x110, x108, x104, x101);
fiat_secp256k1_addcarryx_u32(&x111, &x112, x110, x102, x99);
fiat_secp256k1_addcarryx_u32(&x113, &x114, x112, x100, x97);
fiat_secp256k1_addcarryx_u32(&x115, &x116, x114, x98, x95);
fiat_secp256k1_addcarryx_u32(&x117, &x118, x116, x96, x93);
fiat_secp256k1_addcarryx_u32(&x119, &x120, x118, x94, x91);
x121 = (x120 + x92);
fiat_secp256k1_addcarryx_u32(&x122, &x123, 0x0, x75, x105);
fiat_secp256k1_addcarryx_u32(&x124, &x125, x123, x77, x107);
fiat_secp256k1_addcarryx_u32(&x126, &x127, x125, x79, x109);
fiat_secp256k1_addcarryx_u32(&x128, &x129, x127, x81, x111);
fiat_secp256k1_addcarryx_u32(&x130, &x131, x129, x83, x113);
fiat_secp256k1_addcarryx_u32(&x132, &x133, x131, x85, x115);
fiat_secp256k1_addcarryx_u32(&x134, &x135, x133, x87, x117);
fiat_secp256k1_addcarryx_u32(&x136, &x137, x135, x89, x119);
fiat_secp256k1_addcarryx_u32(&x138, &x139, x137, x90, x121);
fiat_secp256k1_mulx_u32(&x140, &x141, x122, UINT32_C(0xd2253531));
fiat_secp256k1_mulx_u32(&x142, &x143, x140, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x144, &x145, x140, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x146, &x147, x140, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x148, &x149, x140, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x150, &x151, x140, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x152, &x153, x140, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x154, &x155, x140, UINT32_C(0xfffffffe));
fiat_secp256k1_mulx_u32(&x156, &x157, x140, UINT32_C(0xfffffc2f));
fiat_secp256k1_addcarryx_u32(&x158, &x159, 0x0, x157, x154);
fiat_secp256k1_addcarryx_u32(&x160, &x161, x159, x155, x152);
fiat_secp256k1_addcarryx_u32(&x162, &x163, x161, x153, x150);
fiat_secp256k1_addcarryx_u32(&x164, &x165, x163, x151, x148);
fiat_secp256k1_addcarryx_u32(&x166, &x167, x165, x149, x146);
fiat_secp256k1_addcarryx_u32(&x168, &x169, x167, x147, x144);
fiat_secp256k1_addcarryx_u32(&x170, &x171, x169, x145, x142);
x172 = (x171 + x143);
fiat_secp256k1_addcarryx_u32(&x173, &x174, 0x0, x122, x156);
fiat_secp256k1_addcarryx_u32(&x175, &x176, x174, x124, x158);
fiat_secp256k1_addcarryx_u32(&x177, &x178, x176, x126, x160);
fiat_secp256k1_addcarryx_u32(&x179, &x180, x178, x128, x162);
fiat_secp256k1_addcarryx_u32(&x181, &x182, x180, x130, x164);
fiat_secp256k1_addcarryx_u32(&x183, &x184, x182, x132, x166);
fiat_secp256k1_addcarryx_u32(&x185, &x186, x184, x134, x168);
fiat_secp256k1_addcarryx_u32(&x187, &x188, x186, x136, x170);
fiat_secp256k1_addcarryx_u32(&x189, &x190, x188, x138, x172);
x191 = ((uint32_t)x190 + x139);
fiat_secp256k1_mulx_u32(&x192, &x193, x2, (arg2[7]));
fiat_secp256k1_mulx_u32(&x194, &x195, x2, (arg2[6]));
fiat_secp256k1_mulx_u32(&x196, &x197, x2, (arg2[5]));
fiat_secp256k1_mulx_u32(&x198, &x199, x2, (arg2[4]));
fiat_secp256k1_mulx_u32(&x200, &x201, x2, (arg2[3]));
fiat_secp256k1_mulx_u32(&x202, &x203, x2, (arg2[2]));
fiat_secp256k1_mulx_u32(&x204, &x205, x2, (arg2[1]));
fiat_secp256k1_mulx_u32(&x206, &x207, x2, (arg2[0]));
fiat_secp256k1_addcarryx_u32(&x208, &x209, 0x0, x207, x204);
fiat_secp256k1_addcarryx_u32(&x210, &x211, x209, x205, x202);
fiat_secp256k1_addcarryx_u32(&x212, &x213, x211, x203, x200);
fiat_secp256k1_addcarryx_u32(&x214, &x215, x213, x201, x198);
fiat_secp256k1_addcarryx_u32(&x216, &x217, x215, x199, x196);
fiat_secp256k1_addcarryx_u32(&x218, &x219, x217, x197, x194);
fiat_secp256k1_addcarryx_u32(&x220, &x221, x219, x195, x192);
x222 = (x221 + x193);
fiat_secp256k1_addcarryx_u32(&x223, &x224, 0x0, x175, x206);
fiat_secp256k1_addcarryx_u32(&x225, &x226, x224, x177, x208);
fiat_secp256k1_addcarryx_u32(&x227, &x228, x226, x179, x210);
fiat_secp256k1_addcarryx_u32(&x229, &x230, x228, x181, x212);
fiat_secp256k1_addcarryx_u32(&x231, &x232, x230, x183, x214);
fiat_secp256k1_addcarryx_u32(&x233, &x234, x232, x185, x216);
fiat_secp256k1_addcarryx_u32(&x235, &x236, x234, x187, x218);
fiat_secp256k1_addcarryx_u32(&x237, &x238, x236, x189, x220);
fiat_secp256k1_addcarryx_u32(&x239, &x240, x238, x191, x222);
fiat_secp256k1_mulx_u32(&x241, &x242, x223, UINT32_C(0xd2253531));
fiat_secp256k1_mulx_u32(&x243, &x244, x241, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x245, &x246, x241, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x247, &x248, x241, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x249, &x250, x241, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x251, &x252, x241, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x253, &x254, x241, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x255, &x256, x241, UINT32_C(0xfffffffe));
fiat_secp256k1_mulx_u32(&x257, &x258, x241, UINT32_C(0xfffffc2f));
fiat_secp256k1_addcarryx_u32(&x259, &x260, 0x0, x258, x255);
fiat_secp256k1_addcarryx_u32(&x261, &x262, x260, x256, x253);
fiat_secp256k1_addcarryx_u32(&x263, &x264, x262, x254, x251);
fiat_secp256k1_addcarryx_u32(&x265, &x266, x264, x252, x249);
fiat_secp256k1_addcarryx_u32(&x267, &x268, x266, x250, x247);
fiat_secp256k1_addcarryx_u32(&x269, &x270, x268, x248, x245);
fiat_secp256k1_addcarryx_u32(&x271, &x272, x270, x246, x243);
x273 = (x272 + x244);
fiat_secp256k1_addcarryx_u32(&x274, &x275, 0x0, x223, x257);
fiat_secp256k1_addcarryx_u32(&x276, &x277, x275, x225, x259);
fiat_secp256k1_addcarryx_u32(&x278, &x279, x277, x227, x261);
fiat_secp256k1_addcarryx_u32(&x280, &x281, x279, x229, x263);
fiat_secp256k1_addcarryx_u32(&x282, &x283, x281, x231, x265);
fiat_secp256k1_addcarryx_u32(&x284, &x285, x283, x233, x267);
fiat_secp256k1_addcarryx_u32(&x286, &x287, x285, x235, x269);
fiat_secp256k1_addcarryx_u32(&x288, &x289, x287, x237, x271);
fiat_secp256k1_addcarryx_u32(&x290, &x291, x289, x239, x273);
x292 = ((uint32_t)x291 + x240);
fiat_secp256k1_mulx_u32(&x293, &x294, x3, (arg2[7]));
fiat_secp256k1_mulx_u32(&x295, &x296, x3, (arg2[6]));
fiat_secp256k1_mulx_u32(&x297, &x298, x3, (arg2[5]));
fiat_secp256k1_mulx_u32(&x299, &x300, x3, (arg2[4]));
fiat_secp256k1_mulx_u32(&x301, &x302, x3, (arg2[3]));
fiat_secp256k1_mulx_u32(&x303, &x304, x3, (arg2[2]));
fiat_secp256k1_mulx_u32(&x305, &x306, x3, (arg2[1]));
fiat_secp256k1_mulx_u32(&x307, &x308, x3, (arg2[0]));
fiat_secp256k1_addcarryx_u32(&x309, &x310, 0x0, x308, x305);
fiat_secp256k1_addcarryx_u32(&x311, &x312, x310, x306, x303);
fiat_secp256k1_addcarryx_u32(&x313, &x314, x312, x304, x301);
fiat_secp256k1_addcarryx_u32(&x315, &x316, x314, x302, x299);
fiat_secp256k1_addcarryx_u32(&x317, &x318, x316, x300, x297);
fiat_secp256k1_addcarryx_u32(&x319, &x320, x318, x298, x295);
fiat_secp256k1_addcarryx_u32(&x321, &x322, x320, x296, x293);
x323 = (x322 + x294);
fiat_secp256k1_addcarryx_u32(&x324, &x325, 0x0, x276, x307);
fiat_secp256k1_addcarryx_u32(&x326, &x327, x325, x278, x309);
fiat_secp256k1_addcarryx_u32(&x328, &x329, x327, x280, x311);
fiat_secp256k1_addcarryx_u32(&x330, &x331, x329, x282, x313);
fiat_secp256k1_addcarryx_u32(&x332, &x333, x331, x284, x315);
fiat_secp256k1_addcarryx_u32(&x334, &x335, x333, x286, x317);
fiat_secp256k1_addcarryx_u32(&x336, &x337, x335, x288, x319);
fiat_secp256k1_addcarryx_u32(&x338, &x339, x337, x290, x321);
fiat_secp256k1_addcarryx_u32(&x340, &x341, x339, x292, x323);
fiat_secp256k1_mulx_u32(&x342, &x343, x324, UINT32_C(0xd2253531));
fiat_secp256k1_mulx_u32(&x344, &x345, x342, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x346, &x347, x342, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x348, &x349, x342, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x350, &x351, x342, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x352, &x353, x342, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x354, &x355, x342, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x356, &x357, x342, UINT32_C(0xfffffffe));
fiat_secp256k1_mulx_u32(&x358, &x359, x342, UINT32_C(0xfffffc2f));
fiat_secp256k1_addcarryx_u32(&x360, &x361, 0x0, x359, x356);
fiat_secp256k1_addcarryx_u32(&x362, &x363, x361, x357, x354);
fiat_secp256k1_addcarryx_u32(&x364, &x365, x363, x355, x352);
fiat_secp256k1_addcarryx_u32(&x366, &x367, x365, x353, x350);
fiat_secp256k1_addcarryx_u32(&x368, &x369, x367, x351, x348);
fiat_secp256k1_addcarryx_u32(&x370, &x371, x369, x349, x346);
fiat_secp256k1_addcarryx_u32(&x372, &x373, x371, x347, x344);
x374 = (x373 + x345);
fiat_secp256k1_addcarryx_u32(&x375, &x376, 0x0, x324, x358);
fiat_secp256k1_addcarryx_u32(&x377, &x378, x376, x326, x360);
fiat_secp256k1_addcarryx_u32(&x379, &x380, x378, x328, x362);
fiat_secp256k1_addcarryx_u32(&x381, &x382, x380, x330, x364);
fiat_secp256k1_addcarryx_u32(&x383, &x384, x382, x332, x366);
fiat_secp256k1_addcarryx_u32(&x385, &x386, x384, x334, x368);
fiat_secp256k1_addcarryx_u32(&x387, &x388, x386, x336, x370);
fiat_secp256k1_addcarryx_u32(&x389, &x390, x388, x338, x372);
fiat_secp256k1_addcarryx_u32(&x391, &x392, x390, x340, x374);
x393 = ((uint32_t)x392 + x341);
fiat_secp256k1_mulx_u32(&x394, &x395, x4, (arg2[7]));
fiat_secp256k1_mulx_u32(&x396, &x397, x4, (arg2[6]));
fiat_secp256k1_mulx_u32(&x398, &x399, x4, (arg2[5]));
fiat_secp256k1_mulx_u32(&x400, &x401, x4, (arg2[4]));
fiat_secp256k1_mulx_u32(&x402, &x403, x4, (arg2[3]));
fiat_secp256k1_mulx_u32(&x404, &x405, x4, (arg2[2]));
fiat_secp256k1_mulx_u32(&x406, &x407, x4, (arg2[1]));
fiat_secp256k1_mulx_u32(&x408, &x409, x4, (arg2[0]));
fiat_secp256k1_addcarryx_u32(&x410, &x411, 0x0, x409, x406);
fiat_secp256k1_addcarryx_u32(&x412, &x413, x411, x407, x404);
fiat_secp256k1_addcarryx_u32(&x414, &x415, x413, x405, x402);
fiat_secp256k1_addcarryx_u32(&x416, &x417, x415, x403, x400);
fiat_secp256k1_addcarryx_u32(&x418, &x419, x417, x401, x398);
fiat_secp256k1_addcarryx_u32(&x420, &x421, x419, x399, x396);
fiat_secp256k1_addcarryx_u32(&x422, &x423, x421, x397, x394);
x424 = (x423 + x395);
fiat_secp256k1_addcarryx_u32(&x425, &x426, 0x0, x377, x408);
fiat_secp256k1_addcarryx_u32(&x427, &x428, x426, x379, x410);
fiat_secp256k1_addcarryx_u32(&x429, &x430, x428, x381, x412);
fiat_secp256k1_addcarryx_u32(&x431, &x432, x430, x383, x414);
fiat_secp256k1_addcarryx_u32(&x433, &x434, x432, x385, x416);
fiat_secp256k1_addcarryx_u32(&x435, &x436, x434, x387, x418);
fiat_secp256k1_addcarryx_u32(&x437, &x438, x436, x389, x420);
fiat_secp256k1_addcarryx_u32(&x439, &x440, x438, x391, x422);
fiat_secp256k1_addcarryx_u32(&x441, &x442, x440, x393, x424);
fiat_secp256k1_mulx_u32(&x443, &x444, x425, UINT32_C(0xd2253531));
fiat_secp256k1_mulx_u32(&x445, &x446, x443, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x447, &x448, x443, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x449, &x450, x443, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x451, &x452, x443, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x453, &x454, x443, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x455, &x456, x443, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x457, &x458, x443, UINT32_C(0xfffffffe));
fiat_secp256k1_mulx_u32(&x459, &x460, x443, UINT32_C(0xfffffc2f));
fiat_secp256k1_addcarryx_u32(&x461, &x462, 0x0, x460, x457);
fiat_secp256k1_addcarryx_u32(&x463, &x464, x462, x458, x455);
fiat_secp256k1_addcarryx_u32(&x465, &x466, x464, x456, x453);
fiat_secp256k1_addcarryx_u32(&x467, &x468, x466, x454, x451);
fiat_secp256k1_addcarryx_u32(&x469, &x470, x468, x452, x449);
fiat_secp256k1_addcarryx_u32(&x471, &x472, x470, x450, x447);
fiat_secp256k1_addcarryx_u32(&x473, &x474, x472, x448, x445);
x475 = (x474 + x446);
fiat_secp256k1_addcarryx_u32(&x476, &x477, 0x0, x425, x459);
fiat_secp256k1_addcarryx_u32(&x478, &x479, x477, x427, x461);
fiat_secp256k1_addcarryx_u32(&x480, &x481, x479, x429, x463);
fiat_secp256k1_addcarryx_u32(&x482, &x483, x481, x431, x465);
fiat_secp256k1_addcarryx_u32(&x484, &x485, x483, x433, x467);
fiat_secp256k1_addcarryx_u32(&x486, &x487, x485, x435, x469);
fiat_secp256k1_addcarryx_u32(&x488, &x489, x487, x437, x471);
fiat_secp256k1_addcarryx_u32(&x490, &x491, x489, x439, x473);
fiat_secp256k1_addcarryx_u32(&x492, &x493, x491, x441, x475);
x494 = ((uint32_t)x493 + x442);
fiat_secp256k1_mulx_u32(&x495, &x496, x5, (arg2[7]));
fiat_secp256k1_mulx_u32(&x497, &x498, x5, (arg2[6]));
fiat_secp256k1_mulx_u32(&x499, &x500, x5, (arg2[5]));
fiat_secp256k1_mulx_u32(&x501, &x502, x5, (arg2[4]));
fiat_secp256k1_mulx_u32(&x503, &x504, x5, (arg2[3]));
fiat_secp256k1_mulx_u32(&x505, &x506, x5, (arg2[2]));
fiat_secp256k1_mulx_u32(&x507, &x508, x5, (arg2[1]));
fiat_secp256k1_mulx_u32(&x509, &x510, x5, (arg2[0]));
fiat_secp256k1_addcarryx_u32(&x511, &x512, 0x0, x510, x507);
fiat_secp256k1_addcarryx_u32(&x513, &x514, x512, x508, x505);
fiat_secp256k1_addcarryx_u32(&x515, &x516, x514, x506, x503);
fiat_secp256k1_addcarryx_u32(&x517, &x518, x516, x504, x501);
fiat_secp256k1_addcarryx_u32(&x519, &x520, x518, x502, x499);
fiat_secp256k1_addcarryx_u32(&x521, &x522, x520, x500, x497);
fiat_secp256k1_addcarryx_u32(&x523, &x524, x522, x498, x495);
x525 = (x524 + x496);
fiat_secp256k1_addcarryx_u32(&x526, &x527, 0x0, x478, x509);
fiat_secp256k1_addcarryx_u32(&x528, &x529, x527, x480, x511);
fiat_secp256k1_addcarryx_u32(&x530, &x531, x529, x482, x513);
fiat_secp256k1_addcarryx_u32(&x532, &x533, x531, x484, x515);
fiat_secp256k1_addcarryx_u32(&x534, &x535, x533, x486, x517);
fiat_secp256k1_addcarryx_u32(&x536, &x537, x535, x488, x519);
fiat_secp256k1_addcarryx_u32(&x538, &x539, x537, x490, x521);
fiat_secp256k1_addcarryx_u32(&x540, &x541, x539, x492, x523);
fiat_secp256k1_addcarryx_u32(&x542, &x543, x541, x494, x525);
fiat_secp256k1_mulx_u32(&x544, &x545, x526, UINT32_C(0xd2253531));
fiat_secp256k1_mulx_u32(&x546, &x547, x544, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x548, &x549, x544, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x550, &x551, x544, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x552, &x553, x544, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x554, &x555, x544, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x556, &x557, x544, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x558, &x559, x544, UINT32_C(0xfffffffe));
fiat_secp256k1_mulx_u32(&x560, &x561, x544, UINT32_C(0xfffffc2f));
fiat_secp256k1_addcarryx_u32(&x562, &x563, 0x0, x561, x558);
fiat_secp256k1_addcarryx_u32(&x564, &x565, x563, x559, x556);
fiat_secp256k1_addcarryx_u32(&x566, &x567, x565, x557, x554);
fiat_secp256k1_addcarryx_u32(&x568, &x569, x567, x555, x552);
fiat_secp256k1_addcarryx_u32(&x570, &x571, x569, x553, x550);
fiat_secp256k1_addcarryx_u32(&x572, &x573, x571, x551, x548);
fiat_secp256k1_addcarryx_u32(&x574, &x575, x573, x549, x546);
x576 = (x575 + x547);
fiat_secp256k1_addcarryx_u32(&x577, &x578, 0x0, x526, x560);
fiat_secp256k1_addcarryx_u32(&x579, &x580, x578, x528, x562);
fiat_secp256k1_addcarryx_u32(&x581, &x582, x580, x530, x564);
fiat_secp256k1_addcarryx_u32(&x583, &x584, x582, x532, x566);
fiat_secp256k1_addcarryx_u32(&x585, &x586, x584, x534, x568);
fiat_secp256k1_addcarryx_u32(&x587, &x588, x586, x536, x570);
fiat_secp256k1_addcarryx_u32(&x589, &x590, x588, x538, x572);
fiat_secp256k1_addcarryx_u32(&x591, &x592, x590, x540, x574);
fiat_secp256k1_addcarryx_u32(&x593, &x594, x592, x542, x576);
x595 = ((uint32_t)x594 + x543);
fiat_secp256k1_mulx_u32(&x596, &x597, x6, (arg2[7]));
fiat_secp256k1_mulx_u32(&x598, &x599, x6, (arg2[6]));
fiat_secp256k1_mulx_u32(&x600, &x601, x6, (arg2[5]));
fiat_secp256k1_mulx_u32(&x602, &x603, x6, (arg2[4]));
fiat_secp256k1_mulx_u32(&x604, &x605, x6, (arg2[3]));
fiat_secp256k1_mulx_u32(&x606, &x607, x6, (arg2[2]));
fiat_secp256k1_mulx_u32(&x608, &x609, x6, (arg2[1]));
fiat_secp256k1_mulx_u32(&x610, &x611, x6, (arg2[0]));
fiat_secp256k1_addcarryx_u32(&x612, &x613, 0x0, x611, x608);
fiat_secp256k1_addcarryx_u32(&x614, &x615, x613, x609, x606);
fiat_secp256k1_addcarryx_u32(&x616, &x617, x615, x607, x604);
fiat_secp256k1_addcarryx_u32(&x618, &x619, x617, x605, x602);
fiat_secp256k1_addcarryx_u32(&x620, &x621, x619, x603, x600);
fiat_secp256k1_addcarryx_u32(&x622, &x623, x621, x601, x598);
fiat_secp256k1_addcarryx_u32(&x624, &x625, x623, x599, x596);
x626 = (x625 + x597);
fiat_secp256k1_addcarryx_u32(&x627, &x628, 0x0, x579, x610);
fiat_secp256k1_addcarryx_u32(&x629, &x630, x628, x581, x612);
fiat_secp256k1_addcarryx_u32(&x631, &x632, x630, x583, x614);
fiat_secp256k1_addcarryx_u32(&x633, &x634, x632, x585, x616);
fiat_secp256k1_addcarryx_u32(&x635, &x636, x634, x587, x618);
fiat_secp256k1_addcarryx_u32(&x637, &x638, x636, x589, x620);
fiat_secp256k1_addcarryx_u32(&x639, &x640, x638, x591, x622);
fiat_secp256k1_addcarryx_u32(&x641, &x642, x640, x593, x624);
fiat_secp256k1_addcarryx_u32(&x643, &x644, x642, x595, x626);
fiat_secp256k1_mulx_u32(&x645, &x646, x627, UINT32_C(0xd2253531));
fiat_secp256k1_mulx_u32(&x647, &x648, x645, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x649, &x650, x645, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x651, &x652, x645, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x653, &x654, x645, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x655, &x656, x645, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x657, &x658, x645, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x659, &x660, x645, UINT32_C(0xfffffffe));
fiat_secp256k1_mulx_u32(&x661, &x662, x645, UINT32_C(0xfffffc2f));
fiat_secp256k1_addcarryx_u32(&x663, &x664, 0x0, x662, x659);
fiat_secp256k1_addcarryx_u32(&x665, &x666, x664, x660, x657);
fiat_secp256k1_addcarryx_u32(&x667, &x668, x666, x658, x655);
fiat_secp256k1_addcarryx_u32(&x669, &x670, x668, x656, x653);
fiat_secp256k1_addcarryx_u32(&x671, &x672, x670, x654, x651);
fiat_secp256k1_addcarryx_u32(&x673, &x674, x672, x652, x649);
fiat_secp256k1_addcarryx_u32(&x675, &x676, x674, x650, x647);
x677 = (x676 + x648);
fiat_secp256k1_addcarryx_u32(&x678, &x679, 0x0, x627, x661);
fiat_secp256k1_addcarryx_u32(&x680, &x681, x679, x629, x663);
fiat_secp256k1_addcarryx_u32(&x682, &x683, x681, x631, x665);
fiat_secp256k1_addcarryx_u32(&x684, &x685, x683, x633, x667);
fiat_secp256k1_addcarryx_u32(&x686, &x687, x685, x635, x669);
fiat_secp256k1_addcarryx_u32(&x688, &x689, x687, x637, x671);
fiat_secp256k1_addcarryx_u32(&x690, &x691, x689, x639, x673);
fiat_secp256k1_addcarryx_u32(&x692, &x693, x691, x641, x675);
fiat_secp256k1_addcarryx_u32(&x694, &x695, x693, x643, x677);
x696 = ((uint32_t)x695 + x644);
fiat_secp256k1_mulx_u32(&x697, &x698, x7, (arg2[7]));
fiat_secp256k1_mulx_u32(&x699, &x700, x7, (arg2[6]));
fiat_secp256k1_mulx_u32(&x701, &x702, x7, (arg2[5]));
fiat_secp256k1_mulx_u32(&x703, &x704, x7, (arg2[4]));
fiat_secp256k1_mulx_u32(&x705, &x706, x7, (arg2[3]));
fiat_secp256k1_mulx_u32(&x707, &x708, x7, (arg2[2]));
fiat_secp256k1_mulx_u32(&x709, &x710, x7, (arg2[1]));
fiat_secp256k1_mulx_u32(&x711, &x712, x7, (arg2[0]));
fiat_secp256k1_addcarryx_u32(&x713, &x714, 0x0, x712, x709);
fiat_secp256k1_addcarryx_u32(&x715, &x716, x714, x710, x707);
fiat_secp256k1_addcarryx_u32(&x717, &x718, x716, x708, x705);
fiat_secp256k1_addcarryx_u32(&x719, &x720, x718, x706, x703);
fiat_secp256k1_addcarryx_u32(&x721, &x722, x720, x704, x701);
fiat_secp256k1_addcarryx_u32(&x723, &x724, x722, x702, x699);
fiat_secp256k1_addcarryx_u32(&x725, &x726, x724, x700, x697);
x727 = (x726 + x698);
fiat_secp256k1_addcarryx_u32(&x728, &x729, 0x0, x680, x711);
fiat_secp256k1_addcarryx_u32(&x730, &x731, x729, x682, x713);
fiat_secp256k1_addcarryx_u32(&x732, &x733, x731, x684, x715);
fiat_secp256k1_addcarryx_u32(&x734, &x735, x733, x686, x717);
fiat_secp256k1_addcarryx_u32(&x736, &x737, x735, x688, x719);
fiat_secp256k1_addcarryx_u32(&x738, &x739, x737, x690, x721);
fiat_secp256k1_addcarryx_u32(&x740, &x741, x739, x692, x723);
fiat_secp256k1_addcarryx_u32(&x742, &x743, x741, x694, x725);
fiat_secp256k1_addcarryx_u32(&x744, &x745, x743, x696, x727);
fiat_secp256k1_mulx_u32(&x746, &x747, x728, UINT32_C(0xd2253531));
fiat_secp256k1_mulx_u32(&x748, &x749, x746, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x750, &x751, x746, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x752, &x753, x746, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x754, &x755, x746, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x756, &x757, x746, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x758, &x759, x746, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x760, &x761, x746, UINT32_C(0xfffffffe));
fiat_secp256k1_mulx_u32(&x762, &x763, x746, UINT32_C(0xfffffc2f));
fiat_secp256k1_addcarryx_u32(&x764, &x765, 0x0, x763, x760);
fiat_secp256k1_addcarryx_u32(&x766, &x767, x765, x761, x758);
fiat_secp256k1_addcarryx_u32(&x768, &x769, x767, x759, x756);
fiat_secp256k1_addcarryx_u32(&x770, &x771, x769, x757, x754);
fiat_secp256k1_addcarryx_u32(&x772, &x773, x771, x755, x752);
fiat_secp256k1_addcarryx_u32(&x774, &x775, x773, x753, x750);
fiat_secp256k1_addcarryx_u32(&x776, &x777, x775, x751, x748);
x778 = (x777 + x749);
fiat_secp256k1_addcarryx_u32(&x779, &x780, 0x0, x728, x762);
fiat_secp256k1_addcarryx_u32(&x781, &x782, x780, x730, x764);
fiat_secp256k1_addcarryx_u32(&x783, &x784, x782, x732, x766);
fiat_secp256k1_addcarryx_u32(&x785, &x786, x784, x734, x768);
fiat_secp256k1_addcarryx_u32(&x787, &x788, x786, x736, x770);
fiat_secp256k1_addcarryx_u32(&x789, &x790, x788, x738, x772);
fiat_secp256k1_addcarryx_u32(&x791, &x792, x790, x740, x774);
fiat_secp256k1_addcarryx_u32(&x793, &x794, x792, x742, x776);
fiat_secp256k1_addcarryx_u32(&x795, &x796, x794, x744, x778);
x797 = ((uint32_t)x796 + x745);
fiat_secp256k1_subborrowx_u32(&x798, &x799, 0x0, x781, UINT32_C(0xfffffc2f));
fiat_secp256k1_subborrowx_u32(&x800, &x801, x799, x783, UINT32_C(0xfffffffe));
fiat_secp256k1_subborrowx_u32(&x802, &x803, x801, x785, UINT32_C(0xffffffff));
fiat_secp256k1_subborrowx_u32(&x804, &x805, x803, x787, UINT32_C(0xffffffff));
fiat_secp256k1_subborrowx_u32(&x806, &x807, x805, x789, UINT32_C(0xffffffff));
fiat_secp256k1_subborrowx_u32(&x808, &x809, x807, x791, UINT32_C(0xffffffff));
fiat_secp256k1_subborrowx_u32(&x810, &x811, x809, x793, UINT32_C(0xffffffff));
fiat_secp256k1_subborrowx_u32(&x812, &x813, x811, x795, UINT32_C(0xffffffff));
fiat_secp256k1_subborrowx_u32(&x814, &x815, x813, x797, 0x0);
fiat_secp256k1_cmovznz_u32(&x816, x815, x798, x781);
fiat_secp256k1_cmovznz_u32(&x817, x815, x800, x783);
fiat_secp256k1_cmovznz_u32(&x818, x815, x802, x785);
fiat_secp256k1_cmovznz_u32(&x819, x815, x804, x787);
fiat_secp256k1_cmovznz_u32(&x820, x815, x806, x789);
fiat_secp256k1_cmovznz_u32(&x821, x815, x808, x791);
fiat_secp256k1_cmovznz_u32(&x822, x815, x810, x793);
fiat_secp256k1_cmovznz_u32(&x823, x815, x812, x795);
out1[0] = x816;
out1[1] = x817;
out1[2] = x818;
out1[3] = x819;
out1[4] = x820;
out1[5] = x821;
out1[6] = x822;
out1[7] = x823;
}
/*
* The function fiat_secp256k1_square squares a field element in the Montgomery domain.
* Preconditions:
* 0 ≤ eval arg1 < m
* Postconditions:
* eval (from_montgomery out1) mod m = (eval (from_montgomery arg1) * eval (from_montgomery arg1)) mod m
* 0 ≤ eval out1 < m
*
* Input Bounds:
* arg1: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]]
* Output Bounds:
* out1: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]]
*/
static void fiat_secp256k1_square(uint32_t out1[8], const uint32_t arg1[8]) {
uint32_t x1;
uint32_t x2;
uint32_t x3;
uint32_t x4;
uint32_t x5;
uint32_t x6;
uint32_t x7;
uint32_t x8;
uint32_t x9;
uint32_t x10;
uint32_t x11;
uint32_t x12;
uint32_t x13;
uint32_t x14;
uint32_t x15;
uint32_t x16;
uint32_t x17;
uint32_t x18;
uint32_t x19;
uint32_t x20;
uint32_t x21;
uint32_t x22;
uint32_t x23;
uint32_t x24;
uint32_t x25;
fiat_secp256k1_uint1 x26;
uint32_t x27;
fiat_secp256k1_uint1 x28;
uint32_t x29;
fiat_secp256k1_uint1 x30;
uint32_t x31;
fiat_secp256k1_uint1 x32;
uint32_t x33;
fiat_secp256k1_uint1 x34;
uint32_t x35;
fiat_secp256k1_uint1 x36;
uint32_t x37;
fiat_secp256k1_uint1 x38;
uint32_t x39;
uint32_t x40;
uint32_t x41;
uint32_t x42;
uint32_t x43;
uint32_t x44;
uint32_t x45;
uint32_t x46;
uint32_t x47;
uint32_t x48;
uint32_t x49;
uint32_t x50;
uint32_t x51;
uint32_t x52;
uint32_t x53;
uint32_t x54;
uint32_t x55;
uint32_t x56;
uint32_t x57;
uint32_t x58;
fiat_secp256k1_uint1 x59;
uint32_t x60;
fiat_secp256k1_uint1 x61;
uint32_t x62;
fiat_secp256k1_uint1 x63;
uint32_t x64;
fiat_secp256k1_uint1 x65;
uint32_t x66;
fiat_secp256k1_uint1 x67;
uint32_t x68;
fiat_secp256k1_uint1 x69;
uint32_t x70;
fiat_secp256k1_uint1 x71;
uint32_t x72;
uint32_t x73;
fiat_secp256k1_uint1 x74;
uint32_t x75;
fiat_secp256k1_uint1 x76;
uint32_t x77;
fiat_secp256k1_uint1 x78;
uint32_t x79;
fiat_secp256k1_uint1 x80;
uint32_t x81;
fiat_secp256k1_uint1 x82;
uint32_t x83;
fiat_secp256k1_uint1 x84;
uint32_t x85;
fiat_secp256k1_uint1 x86;
uint32_t x87;
fiat_secp256k1_uint1 x88;
uint32_t x89;
fiat_secp256k1_uint1 x90;
uint32_t x91;
uint32_t x92;
uint32_t x93;
uint32_t x94;
uint32_t x95;
uint32_t x96;
uint32_t x97;
uint32_t x98;
uint32_t x99;
uint32_t x100;
uint32_t x101;
uint32_t x102;
uint32_t x103;
uint32_t x104;
uint32_t x105;
uint32_t x106;
uint32_t x107;
fiat_secp256k1_uint1 x108;
uint32_t x109;
fiat_secp256k1_uint1 x110;
uint32_t x111;
fiat_secp256k1_uint1 x112;
uint32_t x113;
fiat_secp256k1_uint1 x114;
uint32_t x115;
fiat_secp256k1_uint1 x116;
uint32_t x117;
fiat_secp256k1_uint1 x118;
uint32_t x119;
fiat_secp256k1_uint1 x120;
uint32_t x121;
uint32_t x122;
fiat_secp256k1_uint1 x123;
uint32_t x124;
fiat_secp256k1_uint1 x125;
uint32_t x126;
fiat_secp256k1_uint1 x127;
uint32_t x128;
fiat_secp256k1_uint1 x129;
uint32_t x130;
fiat_secp256k1_uint1 x131;
uint32_t x132;
fiat_secp256k1_uint1 x133;
uint32_t x134;
fiat_secp256k1_uint1 x135;
uint32_t x136;
fiat_secp256k1_uint1 x137;
uint32_t x138;
fiat_secp256k1_uint1 x139;
uint32_t x140;
uint32_t x141;
uint32_t x142;
uint32_t x143;
uint32_t x144;
uint32_t x145;
uint32_t x146;
uint32_t x147;
uint32_t x148;
uint32_t x149;
uint32_t x150;
uint32_t x151;
uint32_t x152;
uint32_t x153;
uint32_t x154;
uint32_t x155;
uint32_t x156;
uint32_t x157;
uint32_t x158;
fiat_secp256k1_uint1 x159;
uint32_t x160;
fiat_secp256k1_uint1 x161;
uint32_t x162;
fiat_secp256k1_uint1 x163;
uint32_t x164;
fiat_secp256k1_uint1 x165;
uint32_t x166;
fiat_secp256k1_uint1 x167;
uint32_t x168;
fiat_secp256k1_uint1 x169;
uint32_t x170;
fiat_secp256k1_uint1 x171;
uint32_t x172;
uint32_t x173;
fiat_secp256k1_uint1 x174;
uint32_t x175;
fiat_secp256k1_uint1 x176;
uint32_t x177;
fiat_secp256k1_uint1 x178;
uint32_t x179;
fiat_secp256k1_uint1 x180;
uint32_t x181;
fiat_secp256k1_uint1 x182;
uint32_t x183;
fiat_secp256k1_uint1 x184;
uint32_t x185;
fiat_secp256k1_uint1 x186;
uint32_t x187;
fiat_secp256k1_uint1 x188;
uint32_t x189;
fiat_secp256k1_uint1 x190;
uint32_t x191;
uint32_t x192;
uint32_t x193;
uint32_t x194;
uint32_t x195;
uint32_t x196;
uint32_t x197;
uint32_t x198;
uint32_t x199;
uint32_t x200;
uint32_t x201;
uint32_t x202;
uint32_t x203;
uint32_t x204;
uint32_t x205;
uint32_t x206;
uint32_t x207;
uint32_t x208;
fiat_secp256k1_uint1 x209;
uint32_t x210;
fiat_secp256k1_uint1 x211;
uint32_t x212;
fiat_secp256k1_uint1 x213;
uint32_t x214;
fiat_secp256k1_uint1 x215;
uint32_t x216;
fiat_secp256k1_uint1 x217;
uint32_t x218;
fiat_secp256k1_uint1 x219;
uint32_t x220;
fiat_secp256k1_uint1 x221;
uint32_t x222;
uint32_t x223;
fiat_secp256k1_uint1 x224;
uint32_t x225;
fiat_secp256k1_uint1 x226;
uint32_t x227;
fiat_secp256k1_uint1 x228;
uint32_t x229;
fiat_secp256k1_uint1 x230;
uint32_t x231;
fiat_secp256k1_uint1 x232;
uint32_t x233;
fiat_secp256k1_uint1 x234;
uint32_t x235;
fiat_secp256k1_uint1 x236;
uint32_t x237;
fiat_secp256k1_uint1 x238;
uint32_t x239;
fiat_secp256k1_uint1 x240;
uint32_t x241;
uint32_t x242;
uint32_t x243;
uint32_t x244;
uint32_t x245;
uint32_t x246;
uint32_t x247;
uint32_t x248;
uint32_t x249;
uint32_t x250;
uint32_t x251;
uint32_t x252;
uint32_t x253;
uint32_t x254;
uint32_t x255;
uint32_t x256;
uint32_t x257;
uint32_t x258;
uint32_t x259;
fiat_secp256k1_uint1 x260;
uint32_t x261;
fiat_secp256k1_uint1 x262;
uint32_t x263;
fiat_secp256k1_uint1 x264;
uint32_t x265;
fiat_secp256k1_uint1 x266;
uint32_t x267;
fiat_secp256k1_uint1 x268;
uint32_t x269;
fiat_secp256k1_uint1 x270;
uint32_t x271;
fiat_secp256k1_uint1 x272;
uint32_t x273;
uint32_t x274;
fiat_secp256k1_uint1 x275;
uint32_t x276;
fiat_secp256k1_uint1 x277;
uint32_t x278;
fiat_secp256k1_uint1 x279;
uint32_t x280;
fiat_secp256k1_uint1 x281;
uint32_t x282;
fiat_secp256k1_uint1 x283;
uint32_t x284;
fiat_secp256k1_uint1 x285;
uint32_t x286;
fiat_secp256k1_uint1 x287;
uint32_t x288;
fiat_secp256k1_uint1 x289;
uint32_t x290;
fiat_secp256k1_uint1 x291;
uint32_t x292;
uint32_t x293;
uint32_t x294;
uint32_t x295;
uint32_t x296;
uint32_t x297;
uint32_t x298;
uint32_t x299;
uint32_t x300;
uint32_t x301;
uint32_t x302;
uint32_t x303;
uint32_t x304;
uint32_t x305;
uint32_t x306;
uint32_t x307;
uint32_t x308;
uint32_t x309;
fiat_secp256k1_uint1 x310;
uint32_t x311;
fiat_secp256k1_uint1 x312;
uint32_t x313;
fiat_secp256k1_uint1 x314;
uint32_t x315;
fiat_secp256k1_uint1 x316;
uint32_t x317;
fiat_secp256k1_uint1 x318;
uint32_t x319;
fiat_secp256k1_uint1 x320;
uint32_t x321;
fiat_secp256k1_uint1 x322;
uint32_t x323;
uint32_t x324;
fiat_secp256k1_uint1 x325;
uint32_t x326;
fiat_secp256k1_uint1 x327;
uint32_t x328;
fiat_secp256k1_uint1 x329;
uint32_t x330;
fiat_secp256k1_uint1 x331;
uint32_t x332;
fiat_secp256k1_uint1 x333;
uint32_t x334;
fiat_secp256k1_uint1 x335;
uint32_t x336;
fiat_secp256k1_uint1 x337;
uint32_t x338;
fiat_secp256k1_uint1 x339;
uint32_t x340;
fiat_secp256k1_uint1 x341;
uint32_t x342;
uint32_t x343;
uint32_t x344;
uint32_t x345;
uint32_t x346;
uint32_t x347;
uint32_t x348;
uint32_t x349;
uint32_t x350;
uint32_t x351;
uint32_t x352;
uint32_t x353;
uint32_t x354;
uint32_t x355;
uint32_t x356;
uint32_t x357;
uint32_t x358;
uint32_t x359;
uint32_t x360;
fiat_secp256k1_uint1 x361;
uint32_t x362;
fiat_secp256k1_uint1 x363;
uint32_t x364;
fiat_secp256k1_uint1 x365;
uint32_t x366;
fiat_secp256k1_uint1 x367;
uint32_t x368;
fiat_secp256k1_uint1 x369;
uint32_t x370;
fiat_secp256k1_uint1 x371;
uint32_t x372;
fiat_secp256k1_uint1 x373;
uint32_t x374;
uint32_t x375;
fiat_secp256k1_uint1 x376;
uint32_t x377;
fiat_secp256k1_uint1 x378;
uint32_t x379;
fiat_secp256k1_uint1 x380;
uint32_t x381;
fiat_secp256k1_uint1 x382;
uint32_t x383;
fiat_secp256k1_uint1 x384;
uint32_t x385;
fiat_secp256k1_uint1 x386;
uint32_t x387;
fiat_secp256k1_uint1 x388;
uint32_t x389;
fiat_secp256k1_uint1 x390;
uint32_t x391;
fiat_secp256k1_uint1 x392;
uint32_t x393;
uint32_t x394;
uint32_t x395;
uint32_t x396;
uint32_t x397;
uint32_t x398;
uint32_t x399;
uint32_t x400;
uint32_t x401;
uint32_t x402;
uint32_t x403;
uint32_t x404;
uint32_t x405;
uint32_t x406;
uint32_t x407;
uint32_t x408;
uint32_t x409;
uint32_t x410;
fiat_secp256k1_uint1 x411;
uint32_t x412;
fiat_secp256k1_uint1 x413;
uint32_t x414;
fiat_secp256k1_uint1 x415;
uint32_t x416;
fiat_secp256k1_uint1 x417;
uint32_t x418;
fiat_secp256k1_uint1 x419;
uint32_t x420;
fiat_secp256k1_uint1 x421;
uint32_t x422;
fiat_secp256k1_uint1 x423;
uint32_t x424;
uint32_t x425;
fiat_secp256k1_uint1 x426;
uint32_t x427;
fiat_secp256k1_uint1 x428;
uint32_t x429;
fiat_secp256k1_uint1 x430;
uint32_t x431;
fiat_secp256k1_uint1 x432;
uint32_t x433;
fiat_secp256k1_uint1 x434;
uint32_t x435;
fiat_secp256k1_uint1 x436;
uint32_t x437;
fiat_secp256k1_uint1 x438;
uint32_t x439;
fiat_secp256k1_uint1 x440;
uint32_t x441;
fiat_secp256k1_uint1 x442;
uint32_t x443;
uint32_t x444;
uint32_t x445;
uint32_t x446;
uint32_t x447;
uint32_t x448;
uint32_t x449;
uint32_t x450;
uint32_t x451;
uint32_t x452;
uint32_t x453;
uint32_t x454;
uint32_t x455;
uint32_t x456;
uint32_t x457;
uint32_t x458;
uint32_t x459;
uint32_t x460;
uint32_t x461;
fiat_secp256k1_uint1 x462;
uint32_t x463;
fiat_secp256k1_uint1 x464;
uint32_t x465;
fiat_secp256k1_uint1 x466;
uint32_t x467;
fiat_secp256k1_uint1 x468;
uint32_t x469;
fiat_secp256k1_uint1 x470;
uint32_t x471;
fiat_secp256k1_uint1 x472;
uint32_t x473;
fiat_secp256k1_uint1 x474;
uint32_t x475;
uint32_t x476;
fiat_secp256k1_uint1 x477;
uint32_t x478;
fiat_secp256k1_uint1 x479;
uint32_t x480;
fiat_secp256k1_uint1 x481;
uint32_t x482;
fiat_secp256k1_uint1 x483;
uint32_t x484;
fiat_secp256k1_uint1 x485;
uint32_t x486;
fiat_secp256k1_uint1 x487;
uint32_t x488;
fiat_secp256k1_uint1 x489;
uint32_t x490;
fiat_secp256k1_uint1 x491;
uint32_t x492;
fiat_secp256k1_uint1 x493;
uint32_t x494;
uint32_t x495;
uint32_t x496;
uint32_t x497;
uint32_t x498;
uint32_t x499;
uint32_t x500;
uint32_t x501;
uint32_t x502;
uint32_t x503;
uint32_t x504;
uint32_t x505;
uint32_t x506;
uint32_t x507;
uint32_t x508;
uint32_t x509;
uint32_t x510;
uint32_t x511;
fiat_secp256k1_uint1 x512;
uint32_t x513;
fiat_secp256k1_uint1 x514;
uint32_t x515;
fiat_secp256k1_uint1 x516;
uint32_t x517;
fiat_secp256k1_uint1 x518;
uint32_t x519;
fiat_secp256k1_uint1 x520;
uint32_t x521;
fiat_secp256k1_uint1 x522;
uint32_t x523;
fiat_secp256k1_uint1 x524;
uint32_t x525;
uint32_t x526;
fiat_secp256k1_uint1 x527;
uint32_t x528;
fiat_secp256k1_uint1 x529;
uint32_t x530;
fiat_secp256k1_uint1 x531;
uint32_t x532;
fiat_secp256k1_uint1 x533;
uint32_t x534;
fiat_secp256k1_uint1 x535;
uint32_t x536;
fiat_secp256k1_uint1 x537;
uint32_t x538;
fiat_secp256k1_uint1 x539;
uint32_t x540;
fiat_secp256k1_uint1 x541;
uint32_t x542;
fiat_secp256k1_uint1 x543;
uint32_t x544;
uint32_t x545;
uint32_t x546;
uint32_t x547;
uint32_t x548;
uint32_t x549;
uint32_t x550;
uint32_t x551;
uint32_t x552;
uint32_t x553;
uint32_t x554;
uint32_t x555;
uint32_t x556;
uint32_t x557;
uint32_t x558;
uint32_t x559;
uint32_t x560;
uint32_t x561;
uint32_t x562;
fiat_secp256k1_uint1 x563;
uint32_t x564;
fiat_secp256k1_uint1 x565;
uint32_t x566;
fiat_secp256k1_uint1 x567;
uint32_t x568;
fiat_secp256k1_uint1 x569;
uint32_t x570;
fiat_secp256k1_uint1 x571;
uint32_t x572;
fiat_secp256k1_uint1 x573;
uint32_t x574;
fiat_secp256k1_uint1 x575;
uint32_t x576;
uint32_t x577;
fiat_secp256k1_uint1 x578;
uint32_t x579;
fiat_secp256k1_uint1 x580;
uint32_t x581;
fiat_secp256k1_uint1 x582;
uint32_t x583;
fiat_secp256k1_uint1 x584;
uint32_t x585;
fiat_secp256k1_uint1 x586;
uint32_t x587;
fiat_secp256k1_uint1 x588;
uint32_t x589;
fiat_secp256k1_uint1 x590;
uint32_t x591;
fiat_secp256k1_uint1 x592;
uint32_t x593;
fiat_secp256k1_uint1 x594;
uint32_t x595;
uint32_t x596;
uint32_t x597;
uint32_t x598;
uint32_t x599;
uint32_t x600;
uint32_t x601;
uint32_t x602;
uint32_t x603;
uint32_t x604;
uint32_t x605;
uint32_t x606;
uint32_t x607;
uint32_t x608;
uint32_t x609;
uint32_t x610;
uint32_t x611;
uint32_t x612;
fiat_secp256k1_uint1 x613;
uint32_t x614;
fiat_secp256k1_uint1 x615;
uint32_t x616;
fiat_secp256k1_uint1 x617;
uint32_t x618;
fiat_secp256k1_uint1 x619;
uint32_t x620;
fiat_secp256k1_uint1 x621;
uint32_t x622;
fiat_secp256k1_uint1 x623;
uint32_t x624;
fiat_secp256k1_uint1 x625;
uint32_t x626;
uint32_t x627;
fiat_secp256k1_uint1 x628;
uint32_t x629;
fiat_secp256k1_uint1 x630;
uint32_t x631;
fiat_secp256k1_uint1 x632;
uint32_t x633;
fiat_secp256k1_uint1 x634;
uint32_t x635;
fiat_secp256k1_uint1 x636;
uint32_t x637;
fiat_secp256k1_uint1 x638;
uint32_t x639;
fiat_secp256k1_uint1 x640;
uint32_t x641;
fiat_secp256k1_uint1 x642;
uint32_t x643;
fiat_secp256k1_uint1 x644;
uint32_t x645;
uint32_t x646;
uint32_t x647;
uint32_t x648;
uint32_t x649;
uint32_t x650;
uint32_t x651;
uint32_t x652;
uint32_t x653;
uint32_t x654;
uint32_t x655;
uint32_t x656;
uint32_t x657;
uint32_t x658;
uint32_t x659;
uint32_t x660;
uint32_t x661;
uint32_t x662;
uint32_t x663;
fiat_secp256k1_uint1 x664;
uint32_t x665;
fiat_secp256k1_uint1 x666;
uint32_t x667;
fiat_secp256k1_uint1 x668;
uint32_t x669;
fiat_secp256k1_uint1 x670;
uint32_t x671;
fiat_secp256k1_uint1 x672;
uint32_t x673;
fiat_secp256k1_uint1 x674;
uint32_t x675;
fiat_secp256k1_uint1 x676;
uint32_t x677;
uint32_t x678;
fiat_secp256k1_uint1 x679;
uint32_t x680;
fiat_secp256k1_uint1 x681;
uint32_t x682;
fiat_secp256k1_uint1 x683;
uint32_t x684;
fiat_secp256k1_uint1 x685;
uint32_t x686;
fiat_secp256k1_uint1 x687;
uint32_t x688;
fiat_secp256k1_uint1 x689;
uint32_t x690;
fiat_secp256k1_uint1 x691;
uint32_t x692;
fiat_secp256k1_uint1 x693;
uint32_t x694;
fiat_secp256k1_uint1 x695;
uint32_t x696;
uint32_t x697;
uint32_t x698;
uint32_t x699;
uint32_t x700;
uint32_t x701;
uint32_t x702;
uint32_t x703;
uint32_t x704;
uint32_t x705;
uint32_t x706;
uint32_t x707;
uint32_t x708;
uint32_t x709;
uint32_t x710;
uint32_t x711;
uint32_t x712;
uint32_t x713;
fiat_secp256k1_uint1 x714;
uint32_t x715;
fiat_secp256k1_uint1 x716;
uint32_t x717;
fiat_secp256k1_uint1 x718;
uint32_t x719;
fiat_secp256k1_uint1 x720;
uint32_t x721;
fiat_secp256k1_uint1 x722;
uint32_t x723;
fiat_secp256k1_uint1 x724;
uint32_t x725;
fiat_secp256k1_uint1 x726;
uint32_t x727;
uint32_t x728;
fiat_secp256k1_uint1 x729;
uint32_t x730;
fiat_secp256k1_uint1 x731;
uint32_t x732;
fiat_secp256k1_uint1 x733;
uint32_t x734;
fiat_secp256k1_uint1 x735;
uint32_t x736;
fiat_secp256k1_uint1 x737;
uint32_t x738;
fiat_secp256k1_uint1 x739;
uint32_t x740;
fiat_secp256k1_uint1 x741;
uint32_t x742;
fiat_secp256k1_uint1 x743;
uint32_t x744;
fiat_secp256k1_uint1 x745;
uint32_t x746;
uint32_t x747;
uint32_t x748;
uint32_t x749;
uint32_t x750;
uint32_t x751;
uint32_t x752;
uint32_t x753;
uint32_t x754;
uint32_t x755;
uint32_t x756;
uint32_t x757;
uint32_t x758;
uint32_t x759;
uint32_t x760;
uint32_t x761;
uint32_t x762;
uint32_t x763;
uint32_t x764;
fiat_secp256k1_uint1 x765;
uint32_t x766;
fiat_secp256k1_uint1 x767;
uint32_t x768;
fiat_secp256k1_uint1 x769;
uint32_t x770;
fiat_secp256k1_uint1 x771;
uint32_t x772;
fiat_secp256k1_uint1 x773;
uint32_t x774;
fiat_secp256k1_uint1 x775;
uint32_t x776;
fiat_secp256k1_uint1 x777;
uint32_t x778;
uint32_t x779;
fiat_secp256k1_uint1 x780;
uint32_t x781;
fiat_secp256k1_uint1 x782;
uint32_t x783;
fiat_secp256k1_uint1 x784;
uint32_t x785;
fiat_secp256k1_uint1 x786;
uint32_t x787;
fiat_secp256k1_uint1 x788;
uint32_t x789;
fiat_secp256k1_uint1 x790;
uint32_t x791;
fiat_secp256k1_uint1 x792;
uint32_t x793;
fiat_secp256k1_uint1 x794;
uint32_t x795;
fiat_secp256k1_uint1 x796;
uint32_t x797;
uint32_t x798;
fiat_secp256k1_uint1 x799;
uint32_t x800;
fiat_secp256k1_uint1 x801;
uint32_t x802;
fiat_secp256k1_uint1 x803;
uint32_t x804;
fiat_secp256k1_uint1 x805;
uint32_t x806;
fiat_secp256k1_uint1 x807;
uint32_t x808;
fiat_secp256k1_uint1 x809;
uint32_t x810;
fiat_secp256k1_uint1 x811;
uint32_t x812;
fiat_secp256k1_uint1 x813;
uint32_t x814;
fiat_secp256k1_uint1 x815;
uint32_t x816;
uint32_t x817;
uint32_t x818;
uint32_t x819;
uint32_t x820;
uint32_t x821;
uint32_t x822;
uint32_t x823;
x1 = (arg1[1]);
x2 = (arg1[2]);
x3 = (arg1[3]);
x4 = (arg1[4]);
x5 = (arg1[5]);
x6 = (arg1[6]);
x7 = (arg1[7]);
x8 = (arg1[0]);
fiat_secp256k1_mulx_u32(&x9, &x10, x8, (arg1[7]));
fiat_secp256k1_mulx_u32(&x11, &x12, x8, (arg1[6]));
fiat_secp256k1_mulx_u32(&x13, &x14, x8, (arg1[5]));
fiat_secp256k1_mulx_u32(&x15, &x16, x8, (arg1[4]));
fiat_secp256k1_mulx_u32(&x17, &x18, x8, (arg1[3]));
fiat_secp256k1_mulx_u32(&x19, &x20, x8, (arg1[2]));
fiat_secp256k1_mulx_u32(&x21, &x22, x8, (arg1[1]));
fiat_secp256k1_mulx_u32(&x23, &x24, x8, (arg1[0]));
fiat_secp256k1_addcarryx_u32(&x25, &x26, 0x0, x24, x21);
fiat_secp256k1_addcarryx_u32(&x27, &x28, x26, x22, x19);
fiat_secp256k1_addcarryx_u32(&x29, &x30, x28, x20, x17);
fiat_secp256k1_addcarryx_u32(&x31, &x32, x30, x18, x15);
fiat_secp256k1_addcarryx_u32(&x33, &x34, x32, x16, x13);
fiat_secp256k1_addcarryx_u32(&x35, &x36, x34, x14, x11);
fiat_secp256k1_addcarryx_u32(&x37, &x38, x36, x12, x9);
x39 = (x38 + x10);
fiat_secp256k1_mulx_u32(&x40, &x41, x23, UINT32_C(0xd2253531));
fiat_secp256k1_mulx_u32(&x42, &x43, x40, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x44, &x45, x40, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x46, &x47, x40, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x48, &x49, x40, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x50, &x51, x40, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x52, &x53, x40, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x54, &x55, x40, UINT32_C(0xfffffffe));
fiat_secp256k1_mulx_u32(&x56, &x57, x40, UINT32_C(0xfffffc2f));
fiat_secp256k1_addcarryx_u32(&x58, &x59, 0x0, x57, x54);
fiat_secp256k1_addcarryx_u32(&x60, &x61, x59, x55, x52);
fiat_secp256k1_addcarryx_u32(&x62, &x63, x61, x53, x50);
fiat_secp256k1_addcarryx_u32(&x64, &x65, x63, x51, x48);
fiat_secp256k1_addcarryx_u32(&x66, &x67, x65, x49, x46);
fiat_secp256k1_addcarryx_u32(&x68, &x69, x67, x47, x44);
fiat_secp256k1_addcarryx_u32(&x70, &x71, x69, x45, x42);
x72 = (x71 + x43);
fiat_secp256k1_addcarryx_u32(&x73, &x74, 0x0, x23, x56);
fiat_secp256k1_addcarryx_u32(&x75, &x76, x74, x25, x58);
fiat_secp256k1_addcarryx_u32(&x77, &x78, x76, x27, x60);
fiat_secp256k1_addcarryx_u32(&x79, &x80, x78, x29, x62);
fiat_secp256k1_addcarryx_u32(&x81, &x82, x80, x31, x64);
fiat_secp256k1_addcarryx_u32(&x83, &x84, x82, x33, x66);
fiat_secp256k1_addcarryx_u32(&x85, &x86, x84, x35, x68);
fiat_secp256k1_addcarryx_u32(&x87, &x88, x86, x37, x70);
fiat_secp256k1_addcarryx_u32(&x89, &x90, x88, x39, x72);
fiat_secp256k1_mulx_u32(&x91, &x92, x1, (arg1[7]));
fiat_secp256k1_mulx_u32(&x93, &x94, x1, (arg1[6]));
fiat_secp256k1_mulx_u32(&x95, &x96, x1, (arg1[5]));
fiat_secp256k1_mulx_u32(&x97, &x98, x1, (arg1[4]));
fiat_secp256k1_mulx_u32(&x99, &x100, x1, (arg1[3]));
fiat_secp256k1_mulx_u32(&x101, &x102, x1, (arg1[2]));
fiat_secp256k1_mulx_u32(&x103, &x104, x1, (arg1[1]));
fiat_secp256k1_mulx_u32(&x105, &x106, x1, (arg1[0]));
fiat_secp256k1_addcarryx_u32(&x107, &x108, 0x0, x106, x103);
fiat_secp256k1_addcarryx_u32(&x109, &x110, x108, x104, x101);
fiat_secp256k1_addcarryx_u32(&x111, &x112, x110, x102, x99);
fiat_secp256k1_addcarryx_u32(&x113, &x114, x112, x100, x97);
fiat_secp256k1_addcarryx_u32(&x115, &x116, x114, x98, x95);
fiat_secp256k1_addcarryx_u32(&x117, &x118, x116, x96, x93);
fiat_secp256k1_addcarryx_u32(&x119, &x120, x118, x94, x91);
x121 = (x120 + x92);
fiat_secp256k1_addcarryx_u32(&x122, &x123, 0x0, x75, x105);
fiat_secp256k1_addcarryx_u32(&x124, &x125, x123, x77, x107);
fiat_secp256k1_addcarryx_u32(&x126, &x127, x125, x79, x109);
fiat_secp256k1_addcarryx_u32(&x128, &x129, x127, x81, x111);
fiat_secp256k1_addcarryx_u32(&x130, &x131, x129, x83, x113);
fiat_secp256k1_addcarryx_u32(&x132, &x133, x131, x85, x115);
fiat_secp256k1_addcarryx_u32(&x134, &x135, x133, x87, x117);
fiat_secp256k1_addcarryx_u32(&x136, &x137, x135, x89, x119);
fiat_secp256k1_addcarryx_u32(&x138, &x139, x137, x90, x121);
fiat_secp256k1_mulx_u32(&x140, &x141, x122, UINT32_C(0xd2253531));
fiat_secp256k1_mulx_u32(&x142, &x143, x140, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x144, &x145, x140, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x146, &x147, x140, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x148, &x149, x140, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x150, &x151, x140, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x152, &x153, x140, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x154, &x155, x140, UINT32_C(0xfffffffe));
fiat_secp256k1_mulx_u32(&x156, &x157, x140, UINT32_C(0xfffffc2f));
fiat_secp256k1_addcarryx_u32(&x158, &x159, 0x0, x157, x154);
fiat_secp256k1_addcarryx_u32(&x160, &x161, x159, x155, x152);
fiat_secp256k1_addcarryx_u32(&x162, &x163, x161, x153, x150);
fiat_secp256k1_addcarryx_u32(&x164, &x165, x163, x151, x148);
fiat_secp256k1_addcarryx_u32(&x166, &x167, x165, x149, x146);
fiat_secp256k1_addcarryx_u32(&x168, &x169, x167, x147, x144);
fiat_secp256k1_addcarryx_u32(&x170, &x171, x169, x145, x142);
x172 = (x171 + x143);
fiat_secp256k1_addcarryx_u32(&x173, &x174, 0x0, x122, x156);
fiat_secp256k1_addcarryx_u32(&x175, &x176, x174, x124, x158);
fiat_secp256k1_addcarryx_u32(&x177, &x178, x176, x126, x160);
fiat_secp256k1_addcarryx_u32(&x179, &x180, x178, x128, x162);
fiat_secp256k1_addcarryx_u32(&x181, &x182, x180, x130, x164);
fiat_secp256k1_addcarryx_u32(&x183, &x184, x182, x132, x166);
fiat_secp256k1_addcarryx_u32(&x185, &x186, x184, x134, x168);
fiat_secp256k1_addcarryx_u32(&x187, &x188, x186, x136, x170);
fiat_secp256k1_addcarryx_u32(&x189, &x190, x188, x138, x172);
x191 = ((uint32_t)x190 + x139);
fiat_secp256k1_mulx_u32(&x192, &x193, x2, (arg1[7]));
fiat_secp256k1_mulx_u32(&x194, &x195, x2, (arg1[6]));
fiat_secp256k1_mulx_u32(&x196, &x197, x2, (arg1[5]));
fiat_secp256k1_mulx_u32(&x198, &x199, x2, (arg1[4]));
fiat_secp256k1_mulx_u32(&x200, &x201, x2, (arg1[3]));
fiat_secp256k1_mulx_u32(&x202, &x203, x2, (arg1[2]));
fiat_secp256k1_mulx_u32(&x204, &x205, x2, (arg1[1]));
fiat_secp256k1_mulx_u32(&x206, &x207, x2, (arg1[0]));
fiat_secp256k1_addcarryx_u32(&x208, &x209, 0x0, x207, x204);
fiat_secp256k1_addcarryx_u32(&x210, &x211, x209, x205, x202);
fiat_secp256k1_addcarryx_u32(&x212, &x213, x211, x203, x200);
fiat_secp256k1_addcarryx_u32(&x214, &x215, x213, x201, x198);
fiat_secp256k1_addcarryx_u32(&x216, &x217, x215, x199, x196);
fiat_secp256k1_addcarryx_u32(&x218, &x219, x217, x197, x194);
fiat_secp256k1_addcarryx_u32(&x220, &x221, x219, x195, x192);
x222 = (x221 + x193);
fiat_secp256k1_addcarryx_u32(&x223, &x224, 0x0, x175, x206);
fiat_secp256k1_addcarryx_u32(&x225, &x226, x224, x177, x208);
fiat_secp256k1_addcarryx_u32(&x227, &x228, x226, x179, x210);
fiat_secp256k1_addcarryx_u32(&x229, &x230, x228, x181, x212);
fiat_secp256k1_addcarryx_u32(&x231, &x232, x230, x183, x214);
fiat_secp256k1_addcarryx_u32(&x233, &x234, x232, x185, x216);
fiat_secp256k1_addcarryx_u32(&x235, &x236, x234, x187, x218);
fiat_secp256k1_addcarryx_u32(&x237, &x238, x236, x189, x220);
fiat_secp256k1_addcarryx_u32(&x239, &x240, x238, x191, x222);
fiat_secp256k1_mulx_u32(&x241, &x242, x223, UINT32_C(0xd2253531));
fiat_secp256k1_mulx_u32(&x243, &x244, x241, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x245, &x246, x241, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x247, &x248, x241, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x249, &x250, x241, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x251, &x252, x241, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x253, &x254, x241, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x255, &x256, x241, UINT32_C(0xfffffffe));
fiat_secp256k1_mulx_u32(&x257, &x258, x241, UINT32_C(0xfffffc2f));
fiat_secp256k1_addcarryx_u32(&x259, &x260, 0x0, x258, x255);
fiat_secp256k1_addcarryx_u32(&x261, &x262, x260, x256, x253);
fiat_secp256k1_addcarryx_u32(&x263, &x264, x262, x254, x251);
fiat_secp256k1_addcarryx_u32(&x265, &x266, x264, x252, x249);
fiat_secp256k1_addcarryx_u32(&x267, &x268, x266, x250, x247);
fiat_secp256k1_addcarryx_u32(&x269, &x270, x268, x248, x245);
fiat_secp256k1_addcarryx_u32(&x271, &x272, x270, x246, x243);
x273 = (x272 + x244);
fiat_secp256k1_addcarryx_u32(&x274, &x275, 0x0, x223, x257);
fiat_secp256k1_addcarryx_u32(&x276, &x277, x275, x225, x259);
fiat_secp256k1_addcarryx_u32(&x278, &x279, x277, x227, x261);
fiat_secp256k1_addcarryx_u32(&x280, &x281, x279, x229, x263);
fiat_secp256k1_addcarryx_u32(&x282, &x283, x281, x231, x265);
fiat_secp256k1_addcarryx_u32(&x284, &x285, x283, x233, x267);
fiat_secp256k1_addcarryx_u32(&x286, &x287, x285, x235, x269);
fiat_secp256k1_addcarryx_u32(&x288, &x289, x287, x237, x271);
fiat_secp256k1_addcarryx_u32(&x290, &x291, x289, x239, x273);
x292 = ((uint32_t)x291 + x240);
fiat_secp256k1_mulx_u32(&x293, &x294, x3, (arg1[7]));
fiat_secp256k1_mulx_u32(&x295, &x296, x3, (arg1[6]));
fiat_secp256k1_mulx_u32(&x297, &x298, x3, (arg1[5]));
fiat_secp256k1_mulx_u32(&x299, &x300, x3, (arg1[4]));
fiat_secp256k1_mulx_u32(&x301, &x302, x3, (arg1[3]));
fiat_secp256k1_mulx_u32(&x303, &x304, x3, (arg1[2]));
fiat_secp256k1_mulx_u32(&x305, &x306, x3, (arg1[1]));
fiat_secp256k1_mulx_u32(&x307, &x308, x3, (arg1[0]));
fiat_secp256k1_addcarryx_u32(&x309, &x310, 0x0, x308, x305);
fiat_secp256k1_addcarryx_u32(&x311, &x312, x310, x306, x303);
fiat_secp256k1_addcarryx_u32(&x313, &x314, x312, x304, x301);
fiat_secp256k1_addcarryx_u32(&x315, &x316, x314, x302, x299);
fiat_secp256k1_addcarryx_u32(&x317, &x318, x316, x300, x297);
fiat_secp256k1_addcarryx_u32(&x319, &x320, x318, x298, x295);
fiat_secp256k1_addcarryx_u32(&x321, &x322, x320, x296, x293);
x323 = (x322 + x294);
fiat_secp256k1_addcarryx_u32(&x324, &x325, 0x0, x276, x307);
fiat_secp256k1_addcarryx_u32(&x326, &x327, x325, x278, x309);
fiat_secp256k1_addcarryx_u32(&x328, &x329, x327, x280, x311);
fiat_secp256k1_addcarryx_u32(&x330, &x331, x329, x282, x313);
fiat_secp256k1_addcarryx_u32(&x332, &x333, x331, x284, x315);
fiat_secp256k1_addcarryx_u32(&x334, &x335, x333, x286, x317);
fiat_secp256k1_addcarryx_u32(&x336, &x337, x335, x288, x319);
fiat_secp256k1_addcarryx_u32(&x338, &x339, x337, x290, x321);
fiat_secp256k1_addcarryx_u32(&x340, &x341, x339, x292, x323);
fiat_secp256k1_mulx_u32(&x342, &x343, x324, UINT32_C(0xd2253531));
fiat_secp256k1_mulx_u32(&x344, &x345, x342, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x346, &x347, x342, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x348, &x349, x342, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x350, &x351, x342, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x352, &x353, x342, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x354, &x355, x342, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x356, &x357, x342, UINT32_C(0xfffffffe));
fiat_secp256k1_mulx_u32(&x358, &x359, x342, UINT32_C(0xfffffc2f));
fiat_secp256k1_addcarryx_u32(&x360, &x361, 0x0, x359, x356);
fiat_secp256k1_addcarryx_u32(&x362, &x363, x361, x357, x354);
fiat_secp256k1_addcarryx_u32(&x364, &x365, x363, x355, x352);
fiat_secp256k1_addcarryx_u32(&x366, &x367, x365, x353, x350);
fiat_secp256k1_addcarryx_u32(&x368, &x369, x367, x351, x348);
fiat_secp256k1_addcarryx_u32(&x370, &x371, x369, x349, x346);
fiat_secp256k1_addcarryx_u32(&x372, &x373, x371, x347, x344);
x374 = (x373 + x345);
fiat_secp256k1_addcarryx_u32(&x375, &x376, 0x0, x324, x358);
fiat_secp256k1_addcarryx_u32(&x377, &x378, x376, x326, x360);
fiat_secp256k1_addcarryx_u32(&x379, &x380, x378, x328, x362);
fiat_secp256k1_addcarryx_u32(&x381, &x382, x380, x330, x364);
fiat_secp256k1_addcarryx_u32(&x383, &x384, x382, x332, x366);
fiat_secp256k1_addcarryx_u32(&x385, &x386, x384, x334, x368);
fiat_secp256k1_addcarryx_u32(&x387, &x388, x386, x336, x370);
fiat_secp256k1_addcarryx_u32(&x389, &x390, x388, x338, x372);
fiat_secp256k1_addcarryx_u32(&x391, &x392, x390, x340, x374);
x393 = ((uint32_t)x392 + x341);
fiat_secp256k1_mulx_u32(&x394, &x395, x4, (arg1[7]));
fiat_secp256k1_mulx_u32(&x396, &x397, x4, (arg1[6]));
fiat_secp256k1_mulx_u32(&x398, &x399, x4, (arg1[5]));
fiat_secp256k1_mulx_u32(&x400, &x401, x4, (arg1[4]));
fiat_secp256k1_mulx_u32(&x402, &x403, x4, (arg1[3]));
fiat_secp256k1_mulx_u32(&x404, &x405, x4, (arg1[2]));
fiat_secp256k1_mulx_u32(&x406, &x407, x4, (arg1[1]));
fiat_secp256k1_mulx_u32(&x408, &x409, x4, (arg1[0]));
fiat_secp256k1_addcarryx_u32(&x410, &x411, 0x0, x409, x406);
fiat_secp256k1_addcarryx_u32(&x412, &x413, x411, x407, x404);
fiat_secp256k1_addcarryx_u32(&x414, &x415, x413, x405, x402);
fiat_secp256k1_addcarryx_u32(&x416, &x417, x415, x403, x400);
fiat_secp256k1_addcarryx_u32(&x418, &x419, x417, x401, x398);
fiat_secp256k1_addcarryx_u32(&x420, &x421, x419, x399, x396);
fiat_secp256k1_addcarryx_u32(&x422, &x423, x421, x397, x394);
x424 = (x423 + x395);
fiat_secp256k1_addcarryx_u32(&x425, &x426, 0x0, x377, x408);
fiat_secp256k1_addcarryx_u32(&x427, &x428, x426, x379, x410);
fiat_secp256k1_addcarryx_u32(&x429, &x430, x428, x381, x412);
fiat_secp256k1_addcarryx_u32(&x431, &x432, x430, x383, x414);
fiat_secp256k1_addcarryx_u32(&x433, &x434, x432, x385, x416);
fiat_secp256k1_addcarryx_u32(&x435, &x436, x434, x387, x418);
fiat_secp256k1_addcarryx_u32(&x437, &x438, x436, x389, x420);
fiat_secp256k1_addcarryx_u32(&x439, &x440, x438, x391, x422);
fiat_secp256k1_addcarryx_u32(&x441, &x442, x440, x393, x424);
fiat_secp256k1_mulx_u32(&x443, &x444, x425, UINT32_C(0xd2253531));
fiat_secp256k1_mulx_u32(&x445, &x446, x443, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x447, &x448, x443, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x449, &x450, x443, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x451, &x452, x443, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x453, &x454, x443, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x455, &x456, x443, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x457, &x458, x443, UINT32_C(0xfffffffe));
fiat_secp256k1_mulx_u32(&x459, &x460, x443, UINT32_C(0xfffffc2f));
fiat_secp256k1_addcarryx_u32(&x461, &x462, 0x0, x460, x457);
fiat_secp256k1_addcarryx_u32(&x463, &x464, x462, x458, x455);
fiat_secp256k1_addcarryx_u32(&x465, &x466, x464, x456, x453);
fiat_secp256k1_addcarryx_u32(&x467, &x468, x466, x454, x451);
fiat_secp256k1_addcarryx_u32(&x469, &x470, x468, x452, x449);
fiat_secp256k1_addcarryx_u32(&x471, &x472, x470, x450, x447);
fiat_secp256k1_addcarryx_u32(&x473, &x474, x472, x448, x445);
x475 = (x474 + x446);
fiat_secp256k1_addcarryx_u32(&x476, &x477, 0x0, x425, x459);
fiat_secp256k1_addcarryx_u32(&x478, &x479, x477, x427, x461);
fiat_secp256k1_addcarryx_u32(&x480, &x481, x479, x429, x463);
fiat_secp256k1_addcarryx_u32(&x482, &x483, x481, x431, x465);
fiat_secp256k1_addcarryx_u32(&x484, &x485, x483, x433, x467);
fiat_secp256k1_addcarryx_u32(&x486, &x487, x485, x435, x469);
fiat_secp256k1_addcarryx_u32(&x488, &x489, x487, x437, x471);
fiat_secp256k1_addcarryx_u32(&x490, &x491, x489, x439, x473);
fiat_secp256k1_addcarryx_u32(&x492, &x493, x491, x441, x475);
x494 = ((uint32_t)x493 + x442);
fiat_secp256k1_mulx_u32(&x495, &x496, x5, (arg1[7]));
fiat_secp256k1_mulx_u32(&x497, &x498, x5, (arg1[6]));
fiat_secp256k1_mulx_u32(&x499, &x500, x5, (arg1[5]));
fiat_secp256k1_mulx_u32(&x501, &x502, x5, (arg1[4]));
fiat_secp256k1_mulx_u32(&x503, &x504, x5, (arg1[3]));
fiat_secp256k1_mulx_u32(&x505, &x506, x5, (arg1[2]));
fiat_secp256k1_mulx_u32(&x507, &x508, x5, (arg1[1]));
fiat_secp256k1_mulx_u32(&x509, &x510, x5, (arg1[0]));
fiat_secp256k1_addcarryx_u32(&x511, &x512, 0x0, x510, x507);
fiat_secp256k1_addcarryx_u32(&x513, &x514, x512, x508, x505);
fiat_secp256k1_addcarryx_u32(&x515, &x516, x514, x506, x503);
fiat_secp256k1_addcarryx_u32(&x517, &x518, x516, x504, x501);
fiat_secp256k1_addcarryx_u32(&x519, &x520, x518, x502, x499);
fiat_secp256k1_addcarryx_u32(&x521, &x522, x520, x500, x497);
fiat_secp256k1_addcarryx_u32(&x523, &x524, x522, x498, x495);
x525 = (x524 + x496);
fiat_secp256k1_addcarryx_u32(&x526, &x527, 0x0, x478, x509);
fiat_secp256k1_addcarryx_u32(&x528, &x529, x527, x480, x511);
fiat_secp256k1_addcarryx_u32(&x530, &x531, x529, x482, x513);
fiat_secp256k1_addcarryx_u32(&x532, &x533, x531, x484, x515);
fiat_secp256k1_addcarryx_u32(&x534, &x535, x533, x486, x517);
fiat_secp256k1_addcarryx_u32(&x536, &x537, x535, x488, x519);
fiat_secp256k1_addcarryx_u32(&x538, &x539, x537, x490, x521);
fiat_secp256k1_addcarryx_u32(&x540, &x541, x539, x492, x523);
fiat_secp256k1_addcarryx_u32(&x542, &x543, x541, x494, x525);
fiat_secp256k1_mulx_u32(&x544, &x545, x526, UINT32_C(0xd2253531));
fiat_secp256k1_mulx_u32(&x546, &x547, x544, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x548, &x549, x544, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x550, &x551, x544, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x552, &x553, x544, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x554, &x555, x544, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x556, &x557, x544, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x558, &x559, x544, UINT32_C(0xfffffffe));
fiat_secp256k1_mulx_u32(&x560, &x561, x544, UINT32_C(0xfffffc2f));
fiat_secp256k1_addcarryx_u32(&x562, &x563, 0x0, x561, x558);
fiat_secp256k1_addcarryx_u32(&x564, &x565, x563, x559, x556);
fiat_secp256k1_addcarryx_u32(&x566, &x567, x565, x557, x554);
fiat_secp256k1_addcarryx_u32(&x568, &x569, x567, x555, x552);
fiat_secp256k1_addcarryx_u32(&x570, &x571, x569, x553, x550);
fiat_secp256k1_addcarryx_u32(&x572, &x573, x571, x551, x548);
fiat_secp256k1_addcarryx_u32(&x574, &x575, x573, x549, x546);
x576 = (x575 + x547);
fiat_secp256k1_addcarryx_u32(&x577, &x578, 0x0, x526, x560);
fiat_secp256k1_addcarryx_u32(&x579, &x580, x578, x528, x562);
fiat_secp256k1_addcarryx_u32(&x581, &x582, x580, x530, x564);
fiat_secp256k1_addcarryx_u32(&x583, &x584, x582, x532, x566);
fiat_secp256k1_addcarryx_u32(&x585, &x586, x584, x534, x568);
fiat_secp256k1_addcarryx_u32(&x587, &x588, x586, x536, x570);
fiat_secp256k1_addcarryx_u32(&x589, &x590, x588, x538, x572);
fiat_secp256k1_addcarryx_u32(&x591, &x592, x590, x540, x574);
fiat_secp256k1_addcarryx_u32(&x593, &x594, x592, x542, x576);
x595 = ((uint32_t)x594 + x543);
fiat_secp256k1_mulx_u32(&x596, &x597, x6, (arg1[7]));
fiat_secp256k1_mulx_u32(&x598, &x599, x6, (arg1[6]));
fiat_secp256k1_mulx_u32(&x600, &x601, x6, (arg1[5]));
fiat_secp256k1_mulx_u32(&x602, &x603, x6, (arg1[4]));
fiat_secp256k1_mulx_u32(&x604, &x605, x6, (arg1[3]));
fiat_secp256k1_mulx_u32(&x606, &x607, x6, (arg1[2]));
fiat_secp256k1_mulx_u32(&x608, &x609, x6, (arg1[1]));
fiat_secp256k1_mulx_u32(&x610, &x611, x6, (arg1[0]));
fiat_secp256k1_addcarryx_u32(&x612, &x613, 0x0, x611, x608);
fiat_secp256k1_addcarryx_u32(&x614, &x615, x613, x609, x606);
fiat_secp256k1_addcarryx_u32(&x616, &x617, x615, x607, x604);
fiat_secp256k1_addcarryx_u32(&x618, &x619, x617, x605, x602);
fiat_secp256k1_addcarryx_u32(&x620, &x621, x619, x603, x600);
fiat_secp256k1_addcarryx_u32(&x622, &x623, x621, x601, x598);
fiat_secp256k1_addcarryx_u32(&x624, &x625, x623, x599, x596);
x626 = (x625 + x597);
fiat_secp256k1_addcarryx_u32(&x627, &x628, 0x0, x579, x610);
fiat_secp256k1_addcarryx_u32(&x629, &x630, x628, x581, x612);
fiat_secp256k1_addcarryx_u32(&x631, &x632, x630, x583, x614);
fiat_secp256k1_addcarryx_u32(&x633, &x634, x632, x585, x616);
fiat_secp256k1_addcarryx_u32(&x635, &x636, x634, x587, x618);
fiat_secp256k1_addcarryx_u32(&x637, &x638, x636, x589, x620);
fiat_secp256k1_addcarryx_u32(&x639, &x640, x638, x591, x622);
fiat_secp256k1_addcarryx_u32(&x641, &x642, x640, x593, x624);
fiat_secp256k1_addcarryx_u32(&x643, &x644, x642, x595, x626);
fiat_secp256k1_mulx_u32(&x645, &x646, x627, UINT32_C(0xd2253531));
fiat_secp256k1_mulx_u32(&x647, &x648, x645, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x649, &x650, x645, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x651, &x652, x645, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x653, &x654, x645, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x655, &x656, x645, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x657, &x658, x645, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x659, &x660, x645, UINT32_C(0xfffffffe));
fiat_secp256k1_mulx_u32(&x661, &x662, x645, UINT32_C(0xfffffc2f));
fiat_secp256k1_addcarryx_u32(&x663, &x664, 0x0, x662, x659);
fiat_secp256k1_addcarryx_u32(&x665, &x666, x664, x660, x657);
fiat_secp256k1_addcarryx_u32(&x667, &x668, x666, x658, x655);
fiat_secp256k1_addcarryx_u32(&x669, &x670, x668, x656, x653);
fiat_secp256k1_addcarryx_u32(&x671, &x672, x670, x654, x651);
fiat_secp256k1_addcarryx_u32(&x673, &x674, x672, x652, x649);
fiat_secp256k1_addcarryx_u32(&x675, &x676, x674, x650, x647);
x677 = (x676 + x648);
fiat_secp256k1_addcarryx_u32(&x678, &x679, 0x0, x627, x661);
fiat_secp256k1_addcarryx_u32(&x680, &x681, x679, x629, x663);
fiat_secp256k1_addcarryx_u32(&x682, &x683, x681, x631, x665);
fiat_secp256k1_addcarryx_u32(&x684, &x685, x683, x633, x667);
fiat_secp256k1_addcarryx_u32(&x686, &x687, x685, x635, x669);
fiat_secp256k1_addcarryx_u32(&x688, &x689, x687, x637, x671);
fiat_secp256k1_addcarryx_u32(&x690, &x691, x689, x639, x673);
fiat_secp256k1_addcarryx_u32(&x692, &x693, x691, x641, x675);
fiat_secp256k1_addcarryx_u32(&x694, &x695, x693, x643, x677);
x696 = ((uint32_t)x695 + x644);
fiat_secp256k1_mulx_u32(&x697, &x698, x7, (arg1[7]));
fiat_secp256k1_mulx_u32(&x699, &x700, x7, (arg1[6]));
fiat_secp256k1_mulx_u32(&x701, &x702, x7, (arg1[5]));
fiat_secp256k1_mulx_u32(&x703, &x704, x7, (arg1[4]));
fiat_secp256k1_mulx_u32(&x705, &x706, x7, (arg1[3]));
fiat_secp256k1_mulx_u32(&x707, &x708, x7, (arg1[2]));
fiat_secp256k1_mulx_u32(&x709, &x710, x7, (arg1[1]));
fiat_secp256k1_mulx_u32(&x711, &x712, x7, (arg1[0]));
fiat_secp256k1_addcarryx_u32(&x713, &x714, 0x0, x712, x709);
fiat_secp256k1_addcarryx_u32(&x715, &x716, x714, x710, x707);
fiat_secp256k1_addcarryx_u32(&x717, &x718, x716, x708, x705);
fiat_secp256k1_addcarryx_u32(&x719, &x720, x718, x706, x703);
fiat_secp256k1_addcarryx_u32(&x721, &x722, x720, x704, x701);
fiat_secp256k1_addcarryx_u32(&x723, &x724, x722, x702, x699);
fiat_secp256k1_addcarryx_u32(&x725, &x726, x724, x700, x697);
x727 = (x726 + x698);
fiat_secp256k1_addcarryx_u32(&x728, &x729, 0x0, x680, x711);
fiat_secp256k1_addcarryx_u32(&x730, &x731, x729, x682, x713);
fiat_secp256k1_addcarryx_u32(&x732, &x733, x731, x684, x715);
fiat_secp256k1_addcarryx_u32(&x734, &x735, x733, x686, x717);
fiat_secp256k1_addcarryx_u32(&x736, &x737, x735, x688, x719);
fiat_secp256k1_addcarryx_u32(&x738, &x739, x737, x690, x721);
fiat_secp256k1_addcarryx_u32(&x740, &x741, x739, x692, x723);
fiat_secp256k1_addcarryx_u32(&x742, &x743, x741, x694, x725);
fiat_secp256k1_addcarryx_u32(&x744, &x745, x743, x696, x727);
fiat_secp256k1_mulx_u32(&x746, &x747, x728, UINT32_C(0xd2253531));
fiat_secp256k1_mulx_u32(&x748, &x749, x746, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x750, &x751, x746, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x752, &x753, x746, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x754, &x755, x746, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x756, &x757, x746, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x758, &x759, x746, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x760, &x761, x746, UINT32_C(0xfffffffe));
fiat_secp256k1_mulx_u32(&x762, &x763, x746, UINT32_C(0xfffffc2f));
fiat_secp256k1_addcarryx_u32(&x764, &x765, 0x0, x763, x760);
fiat_secp256k1_addcarryx_u32(&x766, &x767, x765, x761, x758);
fiat_secp256k1_addcarryx_u32(&x768, &x769, x767, x759, x756);
fiat_secp256k1_addcarryx_u32(&x770, &x771, x769, x757, x754);
fiat_secp256k1_addcarryx_u32(&x772, &x773, x771, x755, x752);
fiat_secp256k1_addcarryx_u32(&x774, &x775, x773, x753, x750);
fiat_secp256k1_addcarryx_u32(&x776, &x777, x775, x751, x748);
x778 = (x777 + x749);
fiat_secp256k1_addcarryx_u32(&x779, &x780, 0x0, x728, x762);
fiat_secp256k1_addcarryx_u32(&x781, &x782, x780, x730, x764);
fiat_secp256k1_addcarryx_u32(&x783, &x784, x782, x732, x766);
fiat_secp256k1_addcarryx_u32(&x785, &x786, x784, x734, x768);
fiat_secp256k1_addcarryx_u32(&x787, &x788, x786, x736, x770);
fiat_secp256k1_addcarryx_u32(&x789, &x790, x788, x738, x772);
fiat_secp256k1_addcarryx_u32(&x791, &x792, x790, x740, x774);
fiat_secp256k1_addcarryx_u32(&x793, &x794, x792, x742, x776);
fiat_secp256k1_addcarryx_u32(&x795, &x796, x794, x744, x778);
x797 = ((uint32_t)x796 + x745);
fiat_secp256k1_subborrowx_u32(&x798, &x799, 0x0, x781, UINT32_C(0xfffffc2f));
fiat_secp256k1_subborrowx_u32(&x800, &x801, x799, x783, UINT32_C(0xfffffffe));
fiat_secp256k1_subborrowx_u32(&x802, &x803, x801, x785, UINT32_C(0xffffffff));
fiat_secp256k1_subborrowx_u32(&x804, &x805, x803, x787, UINT32_C(0xffffffff));
fiat_secp256k1_subborrowx_u32(&x806, &x807, x805, x789, UINT32_C(0xffffffff));
fiat_secp256k1_subborrowx_u32(&x808, &x809, x807, x791, UINT32_C(0xffffffff));
fiat_secp256k1_subborrowx_u32(&x810, &x811, x809, x793, UINT32_C(0xffffffff));
fiat_secp256k1_subborrowx_u32(&x812, &x813, x811, x795, UINT32_C(0xffffffff));
fiat_secp256k1_subborrowx_u32(&x814, &x815, x813, x797, 0x0);
fiat_secp256k1_cmovznz_u32(&x816, x815, x798, x781);
fiat_secp256k1_cmovznz_u32(&x817, x815, x800, x783);
fiat_secp256k1_cmovznz_u32(&x818, x815, x802, x785);
fiat_secp256k1_cmovznz_u32(&x819, x815, x804, x787);
fiat_secp256k1_cmovznz_u32(&x820, x815, x806, x789);
fiat_secp256k1_cmovznz_u32(&x821, x815, x808, x791);
fiat_secp256k1_cmovznz_u32(&x822, x815, x810, x793);
fiat_secp256k1_cmovznz_u32(&x823, x815, x812, x795);
out1[0] = x816;
out1[1] = x817;
out1[2] = x818;
out1[3] = x819;
out1[4] = x820;
out1[5] = x821;
out1[6] = x822;
out1[7] = x823;
}
/*
* The function fiat_secp256k1_add adds two field elements in the Montgomery domain.
* Preconditions:
* 0 ≤ eval arg1 < m
* 0 ≤ eval arg2 < m
* Postconditions:
* eval (from_montgomery out1) mod m = (eval (from_montgomery arg1) + eval (from_montgomery arg2)) mod m
* 0 ≤ eval out1 < m
*
* Input Bounds:
* arg1: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]]
* arg2: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]]
* Output Bounds:
* out1: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]]
*/
static void fiat_secp256k1_add(uint32_t out1[8], const uint32_t arg1[8], const uint32_t arg2[8]) {
uint32_t x1;
fiat_secp256k1_uint1 x2;
uint32_t x3;
fiat_secp256k1_uint1 x4;
uint32_t x5;
fiat_secp256k1_uint1 x6;
uint32_t x7;
fiat_secp256k1_uint1 x8;
uint32_t x9;
fiat_secp256k1_uint1 x10;
uint32_t x11;
fiat_secp256k1_uint1 x12;
uint32_t x13;
fiat_secp256k1_uint1 x14;
uint32_t x15;
fiat_secp256k1_uint1 x16;
uint32_t x17;
fiat_secp256k1_uint1 x18;
uint32_t x19;
fiat_secp256k1_uint1 x20;
uint32_t x21;
fiat_secp256k1_uint1 x22;
uint32_t x23;
fiat_secp256k1_uint1 x24;
uint32_t x25;
fiat_secp256k1_uint1 x26;
uint32_t x27;
fiat_secp256k1_uint1 x28;
uint32_t x29;
fiat_secp256k1_uint1 x30;
uint32_t x31;
fiat_secp256k1_uint1 x32;
uint32_t x33;
fiat_secp256k1_uint1 x34;
uint32_t x35;
uint32_t x36;
uint32_t x37;
uint32_t x38;
uint32_t x39;
uint32_t x40;
uint32_t x41;
uint32_t x42;
fiat_secp256k1_addcarryx_u32(&x1, &x2, 0x0, (arg1[0]), (arg2[0]));
fiat_secp256k1_addcarryx_u32(&x3, &x4, x2, (arg1[1]), (arg2[1]));
fiat_secp256k1_addcarryx_u32(&x5, &x6, x4, (arg1[2]), (arg2[2]));
fiat_secp256k1_addcarryx_u32(&x7, &x8, x6, (arg1[3]), (arg2[3]));
fiat_secp256k1_addcarryx_u32(&x9, &x10, x8, (arg1[4]), (arg2[4]));
fiat_secp256k1_addcarryx_u32(&x11, &x12, x10, (arg1[5]), (arg2[5]));
fiat_secp256k1_addcarryx_u32(&x13, &x14, x12, (arg1[6]), (arg2[6]));
fiat_secp256k1_addcarryx_u32(&x15, &x16, x14, (arg1[7]), (arg2[7]));
fiat_secp256k1_subborrowx_u32(&x17, &x18, 0x0, x1, UINT32_C(0xfffffc2f));
fiat_secp256k1_subborrowx_u32(&x19, &x20, x18, x3, UINT32_C(0xfffffffe));
fiat_secp256k1_subborrowx_u32(&x21, &x22, x20, x5, UINT32_C(0xffffffff));
fiat_secp256k1_subborrowx_u32(&x23, &x24, x22, x7, UINT32_C(0xffffffff));
fiat_secp256k1_subborrowx_u32(&x25, &x26, x24, x9, UINT32_C(0xffffffff));
fiat_secp256k1_subborrowx_u32(&x27, &x28, x26, x11, UINT32_C(0xffffffff));
fiat_secp256k1_subborrowx_u32(&x29, &x30, x28, x13, UINT32_C(0xffffffff));
fiat_secp256k1_subborrowx_u32(&x31, &x32, x30, x15, UINT32_C(0xffffffff));
fiat_secp256k1_subborrowx_u32(&x33, &x34, x32, x16, 0x0);
fiat_secp256k1_cmovznz_u32(&x35, x34, x17, x1);
fiat_secp256k1_cmovznz_u32(&x36, x34, x19, x3);
fiat_secp256k1_cmovznz_u32(&x37, x34, x21, x5);
fiat_secp256k1_cmovznz_u32(&x38, x34, x23, x7);
fiat_secp256k1_cmovznz_u32(&x39, x34, x25, x9);
fiat_secp256k1_cmovznz_u32(&x40, x34, x27, x11);
fiat_secp256k1_cmovznz_u32(&x41, x34, x29, x13);
fiat_secp256k1_cmovznz_u32(&x42, x34, x31, x15);
out1[0] = x35;
out1[1] = x36;
out1[2] = x37;
out1[3] = x38;
out1[4] = x39;
out1[5] = x40;
out1[6] = x41;
out1[7] = x42;
}
/*
* The function fiat_secp256k1_sub subtracts two field elements in the Montgomery domain.
* Preconditions:
* 0 ≤ eval arg1 < m
* 0 ≤ eval arg2 < m
* Postconditions:
* eval (from_montgomery out1) mod m = (eval (from_montgomery arg1) - eval (from_montgomery arg2)) mod m
* 0 ≤ eval out1 < m
*
* Input Bounds:
* arg1: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]]
* arg2: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]]
* Output Bounds:
* out1: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]]
*/
static void fiat_secp256k1_sub(uint32_t out1[8], const uint32_t arg1[8], const uint32_t arg2[8]) {
uint32_t x1;
fiat_secp256k1_uint1 x2;
uint32_t x3;
fiat_secp256k1_uint1 x4;
uint32_t x5;
fiat_secp256k1_uint1 x6;
uint32_t x7;
fiat_secp256k1_uint1 x8;
uint32_t x9;
fiat_secp256k1_uint1 x10;
uint32_t x11;
fiat_secp256k1_uint1 x12;
uint32_t x13;
fiat_secp256k1_uint1 x14;
uint32_t x15;
fiat_secp256k1_uint1 x16;
uint32_t x17;
uint32_t x18;
fiat_secp256k1_uint1 x19;
uint32_t x20;
fiat_secp256k1_uint1 x21;
uint32_t x22;
fiat_secp256k1_uint1 x23;
uint32_t x24;
fiat_secp256k1_uint1 x25;
uint32_t x26;
fiat_secp256k1_uint1 x27;
uint32_t x28;
fiat_secp256k1_uint1 x29;
uint32_t x30;
fiat_secp256k1_uint1 x31;
uint32_t x32;
fiat_secp256k1_uint1 x33;
fiat_secp256k1_subborrowx_u32(&x1, &x2, 0x0, (arg1[0]), (arg2[0]));
fiat_secp256k1_subborrowx_u32(&x3, &x4, x2, (arg1[1]), (arg2[1]));
fiat_secp256k1_subborrowx_u32(&x5, &x6, x4, (arg1[2]), (arg2[2]));
fiat_secp256k1_subborrowx_u32(&x7, &x8, x6, (arg1[3]), (arg2[3]));
fiat_secp256k1_subborrowx_u32(&x9, &x10, x8, (arg1[4]), (arg2[4]));
fiat_secp256k1_subborrowx_u32(&x11, &x12, x10, (arg1[5]), (arg2[5]));
fiat_secp256k1_subborrowx_u32(&x13, &x14, x12, (arg1[6]), (arg2[6]));
fiat_secp256k1_subborrowx_u32(&x15, &x16, x14, (arg1[7]), (arg2[7]));
fiat_secp256k1_cmovznz_u32(&x17, x16, 0x0, UINT32_C(0xffffffff));
fiat_secp256k1_addcarryx_u32(&x18, &x19, 0x0, x1, (x17 & UINT32_C(0xfffffc2f)));
fiat_secp256k1_addcarryx_u32(&x20, &x21, x19, x3, (x17 & UINT32_C(0xfffffffe)));
fiat_secp256k1_addcarryx_u32(&x22, &x23, x21, x5, x17);
fiat_secp256k1_addcarryx_u32(&x24, &x25, x23, x7, x17);
fiat_secp256k1_addcarryx_u32(&x26, &x27, x25, x9, x17);
fiat_secp256k1_addcarryx_u32(&x28, &x29, x27, x11, x17);
fiat_secp256k1_addcarryx_u32(&x30, &x31, x29, x13, x17);
fiat_secp256k1_addcarryx_u32(&x32, &x33, x31, x15, x17);
out1[0] = x18;
out1[1] = x20;
out1[2] = x22;
out1[3] = x24;
out1[4] = x26;
out1[5] = x28;
out1[6] = x30;
out1[7] = x32;
}
/*
* The function fiat_secp256k1_opp negates a field element in the Montgomery domain.
* Preconditions:
* 0 ≤ eval arg1 < m
* Postconditions:
* eval (from_montgomery out1) mod m = -eval (from_montgomery arg1) mod m
* 0 ≤ eval out1 < m
*
* Input Bounds:
* arg1: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]]
* Output Bounds:
* out1: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]]
*/
static void fiat_secp256k1_opp(uint32_t out1[8], const uint32_t arg1[8]) {
uint32_t x1;
fiat_secp256k1_uint1 x2;
uint32_t x3;
fiat_secp256k1_uint1 x4;
uint32_t x5;
fiat_secp256k1_uint1 x6;
uint32_t x7;
fiat_secp256k1_uint1 x8;
uint32_t x9;
fiat_secp256k1_uint1 x10;
uint32_t x11;
fiat_secp256k1_uint1 x12;
uint32_t x13;
fiat_secp256k1_uint1 x14;
uint32_t x15;
fiat_secp256k1_uint1 x16;
uint32_t x17;
uint32_t x18;
fiat_secp256k1_uint1 x19;
uint32_t x20;
fiat_secp256k1_uint1 x21;
uint32_t x22;
fiat_secp256k1_uint1 x23;
uint32_t x24;
fiat_secp256k1_uint1 x25;
uint32_t x26;
fiat_secp256k1_uint1 x27;
uint32_t x28;
fiat_secp256k1_uint1 x29;
uint32_t x30;
fiat_secp256k1_uint1 x31;
uint32_t x32;
fiat_secp256k1_uint1 x33;
fiat_secp256k1_subborrowx_u32(&x1, &x2, 0x0, 0x0, (arg1[0]));
fiat_secp256k1_subborrowx_u32(&x3, &x4, x2, 0x0, (arg1[1]));
fiat_secp256k1_subborrowx_u32(&x5, &x6, x4, 0x0, (arg1[2]));
fiat_secp256k1_subborrowx_u32(&x7, &x8, x6, 0x0, (arg1[3]));
fiat_secp256k1_subborrowx_u32(&x9, &x10, x8, 0x0, (arg1[4]));
fiat_secp256k1_subborrowx_u32(&x11, &x12, x10, 0x0, (arg1[5]));
fiat_secp256k1_subborrowx_u32(&x13, &x14, x12, 0x0, (arg1[6]));
fiat_secp256k1_subborrowx_u32(&x15, &x16, x14, 0x0, (arg1[7]));
fiat_secp256k1_cmovznz_u32(&x17, x16, 0x0, UINT32_C(0xffffffff));
fiat_secp256k1_addcarryx_u32(&x18, &x19, 0x0, x1, (x17 & UINT32_C(0xfffffc2f)));
fiat_secp256k1_addcarryx_u32(&x20, &x21, x19, x3, (x17 & UINT32_C(0xfffffffe)));
fiat_secp256k1_addcarryx_u32(&x22, &x23, x21, x5, x17);
fiat_secp256k1_addcarryx_u32(&x24, &x25, x23, x7, x17);
fiat_secp256k1_addcarryx_u32(&x26, &x27, x25, x9, x17);
fiat_secp256k1_addcarryx_u32(&x28, &x29, x27, x11, x17);
fiat_secp256k1_addcarryx_u32(&x30, &x31, x29, x13, x17);
fiat_secp256k1_addcarryx_u32(&x32, &x33, x31, x15, x17);
out1[0] = x18;
out1[1] = x20;
out1[2] = x22;
out1[3] = x24;
out1[4] = x26;
out1[5] = x28;
out1[6] = x30;
out1[7] = x32;
}
/*
* The function fiat_secp256k1_from_montgomery translates a field element out of the Montgomery domain.
* Preconditions:
* 0 ≤ eval arg1 < m
* Postconditions:
* eval out1 mod m = (eval arg1 * ((2^32)⁻¹ mod m)^8) mod m
* 0 ≤ eval out1 < m
*
* Input Bounds:
* arg1: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]]
* Output Bounds:
* out1: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]]
*/
static void fiat_secp256k1_from_montgomery(uint32_t out1[8], const uint32_t arg1[8]) {
uint32_t x1;
uint32_t x2;
uint32_t x3;
uint32_t x4;
uint32_t x5;
uint32_t x6;
uint32_t x7;
uint32_t x8;
uint32_t x9;
uint32_t x10;
uint32_t x11;
uint32_t x12;
uint32_t x13;
uint32_t x14;
uint32_t x15;
uint32_t x16;
uint32_t x17;
uint32_t x18;
uint32_t x19;
uint32_t x20;
fiat_secp256k1_uint1 x21;
uint32_t x22;
fiat_secp256k1_uint1 x23;
uint32_t x24;
fiat_secp256k1_uint1 x25;
uint32_t x26;
fiat_secp256k1_uint1 x27;
uint32_t x28;
fiat_secp256k1_uint1 x29;
uint32_t x30;
fiat_secp256k1_uint1 x31;
uint32_t x32;
fiat_secp256k1_uint1 x33;
uint32_t x34;
fiat_secp256k1_uint1 x35;
uint32_t x36;
fiat_secp256k1_uint1 x37;
uint32_t x38;
fiat_secp256k1_uint1 x39;
uint32_t x40;
fiat_secp256k1_uint1 x41;
uint32_t x42;
fiat_secp256k1_uint1 x43;
uint32_t x44;
fiat_secp256k1_uint1 x45;
uint32_t x46;
fiat_secp256k1_uint1 x47;
uint32_t x48;
fiat_secp256k1_uint1 x49;
uint32_t x50;
fiat_secp256k1_uint1 x51;
uint32_t x52;
fiat_secp256k1_uint1 x53;
uint32_t x54;
fiat_secp256k1_uint1 x55;
uint32_t x56;
fiat_secp256k1_uint1 x57;
uint32_t x58;
fiat_secp256k1_uint1 x59;
uint32_t x60;
fiat_secp256k1_uint1 x61;
uint32_t x62;
fiat_secp256k1_uint1 x63;
uint32_t x64;
fiat_secp256k1_uint1 x65;
uint32_t x66;
fiat_secp256k1_uint1 x67;
uint32_t x68;
uint32_t x69;
uint32_t x70;
uint32_t x71;
uint32_t x72;
uint32_t x73;
uint32_t x74;
uint32_t x75;
uint32_t x76;
uint32_t x77;
uint32_t x78;
uint32_t x79;
uint32_t x80;
uint32_t x81;
uint32_t x82;
uint32_t x83;
uint32_t x84;
uint32_t x85;
uint32_t x86;
fiat_secp256k1_uint1 x87;
uint32_t x88;
fiat_secp256k1_uint1 x89;
uint32_t x90;
fiat_secp256k1_uint1 x91;
uint32_t x92;
fiat_secp256k1_uint1 x93;
uint32_t x94;
fiat_secp256k1_uint1 x95;
uint32_t x96;
fiat_secp256k1_uint1 x97;
uint32_t x98;
fiat_secp256k1_uint1 x99;
uint32_t x100;
fiat_secp256k1_uint1 x101;
uint32_t x102;
fiat_secp256k1_uint1 x103;
uint32_t x104;
fiat_secp256k1_uint1 x105;
uint32_t x106;
fiat_secp256k1_uint1 x107;
uint32_t x108;
fiat_secp256k1_uint1 x109;
uint32_t x110;
fiat_secp256k1_uint1 x111;
uint32_t x112;
fiat_secp256k1_uint1 x113;
uint32_t x114;
fiat_secp256k1_uint1 x115;
uint32_t x116;
fiat_secp256k1_uint1 x117;
uint32_t x118;
fiat_secp256k1_uint1 x119;
uint32_t x120;
fiat_secp256k1_uint1 x121;
uint32_t x122;
fiat_secp256k1_uint1 x123;
uint32_t x124;
fiat_secp256k1_uint1 x125;
uint32_t x126;
fiat_secp256k1_uint1 x127;
uint32_t x128;
fiat_secp256k1_uint1 x129;
uint32_t x130;
fiat_secp256k1_uint1 x131;
uint32_t x132;
fiat_secp256k1_uint1 x133;
uint32_t x134;
uint32_t x135;
uint32_t x136;
uint32_t x137;
uint32_t x138;
uint32_t x139;
uint32_t x140;
uint32_t x141;
uint32_t x142;
uint32_t x143;
uint32_t x144;
uint32_t x145;
uint32_t x146;
uint32_t x147;
uint32_t x148;
uint32_t x149;
uint32_t x150;
uint32_t x151;
uint32_t x152;
fiat_secp256k1_uint1 x153;
uint32_t x154;
fiat_secp256k1_uint1 x155;
uint32_t x156;
fiat_secp256k1_uint1 x157;
uint32_t x158;
fiat_secp256k1_uint1 x159;
uint32_t x160;
fiat_secp256k1_uint1 x161;
uint32_t x162;
fiat_secp256k1_uint1 x163;
uint32_t x164;
fiat_secp256k1_uint1 x165;
uint32_t x166;
fiat_secp256k1_uint1 x167;
uint32_t x168;
fiat_secp256k1_uint1 x169;
uint32_t x170;
fiat_secp256k1_uint1 x171;
uint32_t x172;
fiat_secp256k1_uint1 x173;
uint32_t x174;
fiat_secp256k1_uint1 x175;
uint32_t x176;
fiat_secp256k1_uint1 x177;
uint32_t x178;
fiat_secp256k1_uint1 x179;
uint32_t x180;
fiat_secp256k1_uint1 x181;
uint32_t x182;
fiat_secp256k1_uint1 x183;
uint32_t x184;
fiat_secp256k1_uint1 x185;
uint32_t x186;
fiat_secp256k1_uint1 x187;
uint32_t x188;
fiat_secp256k1_uint1 x189;
uint32_t x190;
fiat_secp256k1_uint1 x191;
uint32_t x192;
fiat_secp256k1_uint1 x193;
uint32_t x194;
fiat_secp256k1_uint1 x195;
uint32_t x196;
fiat_secp256k1_uint1 x197;
uint32_t x198;
fiat_secp256k1_uint1 x199;
uint32_t x200;
uint32_t x201;
uint32_t x202;
uint32_t x203;
uint32_t x204;
uint32_t x205;
uint32_t x206;
uint32_t x207;
uint32_t x208;
uint32_t x209;
uint32_t x210;
uint32_t x211;
uint32_t x212;
uint32_t x213;
uint32_t x214;
uint32_t x215;
uint32_t x216;
uint32_t x217;
uint32_t x218;
fiat_secp256k1_uint1 x219;
uint32_t x220;
fiat_secp256k1_uint1 x221;
uint32_t x222;
fiat_secp256k1_uint1 x223;
uint32_t x224;
fiat_secp256k1_uint1 x225;
uint32_t x226;
fiat_secp256k1_uint1 x227;
uint32_t x228;
fiat_secp256k1_uint1 x229;
uint32_t x230;
fiat_secp256k1_uint1 x231;
uint32_t x232;
fiat_secp256k1_uint1 x233;
uint32_t x234;
fiat_secp256k1_uint1 x235;
uint32_t x236;
fiat_secp256k1_uint1 x237;
uint32_t x238;
fiat_secp256k1_uint1 x239;
uint32_t x240;
fiat_secp256k1_uint1 x241;
uint32_t x242;
fiat_secp256k1_uint1 x243;
uint32_t x244;
fiat_secp256k1_uint1 x245;
uint32_t x246;
fiat_secp256k1_uint1 x247;
uint32_t x248;
fiat_secp256k1_uint1 x249;
uint32_t x250;
fiat_secp256k1_uint1 x251;
uint32_t x252;
fiat_secp256k1_uint1 x253;
uint32_t x254;
fiat_secp256k1_uint1 x255;
uint32_t x256;
fiat_secp256k1_uint1 x257;
uint32_t x258;
fiat_secp256k1_uint1 x259;
uint32_t x260;
fiat_secp256k1_uint1 x261;
uint32_t x262;
fiat_secp256k1_uint1 x263;
uint32_t x264;
fiat_secp256k1_uint1 x265;
uint32_t x266;
uint32_t x267;
uint32_t x268;
uint32_t x269;
uint32_t x270;
uint32_t x271;
uint32_t x272;
uint32_t x273;
uint32_t x274;
uint32_t x275;
uint32_t x276;
uint32_t x277;
uint32_t x278;
uint32_t x279;
uint32_t x280;
uint32_t x281;
uint32_t x282;
uint32_t x283;
uint32_t x284;
fiat_secp256k1_uint1 x285;
uint32_t x286;
fiat_secp256k1_uint1 x287;
uint32_t x288;
fiat_secp256k1_uint1 x289;
uint32_t x290;
fiat_secp256k1_uint1 x291;
uint32_t x292;
fiat_secp256k1_uint1 x293;
uint32_t x294;
fiat_secp256k1_uint1 x295;
uint32_t x296;
fiat_secp256k1_uint1 x297;
uint32_t x298;
fiat_secp256k1_uint1 x299;
uint32_t x300;
fiat_secp256k1_uint1 x301;
uint32_t x302;
fiat_secp256k1_uint1 x303;
uint32_t x304;
fiat_secp256k1_uint1 x305;
uint32_t x306;
fiat_secp256k1_uint1 x307;
uint32_t x308;
fiat_secp256k1_uint1 x309;
uint32_t x310;
fiat_secp256k1_uint1 x311;
uint32_t x312;
fiat_secp256k1_uint1 x313;
uint32_t x314;
fiat_secp256k1_uint1 x315;
uint32_t x316;
fiat_secp256k1_uint1 x317;
uint32_t x318;
fiat_secp256k1_uint1 x319;
uint32_t x320;
fiat_secp256k1_uint1 x321;
uint32_t x322;
fiat_secp256k1_uint1 x323;
uint32_t x324;
fiat_secp256k1_uint1 x325;
uint32_t x326;
fiat_secp256k1_uint1 x327;
uint32_t x328;
fiat_secp256k1_uint1 x329;
uint32_t x330;
fiat_secp256k1_uint1 x331;
uint32_t x332;
uint32_t x333;
uint32_t x334;
uint32_t x335;
uint32_t x336;
uint32_t x337;
uint32_t x338;
uint32_t x339;
uint32_t x340;
uint32_t x341;
uint32_t x342;
uint32_t x343;
uint32_t x344;
uint32_t x345;
uint32_t x346;
uint32_t x347;
uint32_t x348;
uint32_t x349;
uint32_t x350;
fiat_secp256k1_uint1 x351;
uint32_t x352;
fiat_secp256k1_uint1 x353;
uint32_t x354;
fiat_secp256k1_uint1 x355;
uint32_t x356;
fiat_secp256k1_uint1 x357;
uint32_t x358;
fiat_secp256k1_uint1 x359;
uint32_t x360;
fiat_secp256k1_uint1 x361;
uint32_t x362;
fiat_secp256k1_uint1 x363;
uint32_t x364;
fiat_secp256k1_uint1 x365;
uint32_t x366;
fiat_secp256k1_uint1 x367;
uint32_t x368;
fiat_secp256k1_uint1 x369;
uint32_t x370;
fiat_secp256k1_uint1 x371;
uint32_t x372;
fiat_secp256k1_uint1 x373;
uint32_t x374;
fiat_secp256k1_uint1 x375;
uint32_t x376;
fiat_secp256k1_uint1 x377;
uint32_t x378;
fiat_secp256k1_uint1 x379;
uint32_t x380;
fiat_secp256k1_uint1 x381;
uint32_t x382;
fiat_secp256k1_uint1 x383;
uint32_t x384;
fiat_secp256k1_uint1 x385;
uint32_t x386;
fiat_secp256k1_uint1 x387;
uint32_t x388;
fiat_secp256k1_uint1 x389;
uint32_t x390;
fiat_secp256k1_uint1 x391;
uint32_t x392;
fiat_secp256k1_uint1 x393;
uint32_t x394;
fiat_secp256k1_uint1 x395;
uint32_t x396;
fiat_secp256k1_uint1 x397;
uint32_t x398;
uint32_t x399;
uint32_t x400;
uint32_t x401;
uint32_t x402;
uint32_t x403;
uint32_t x404;
uint32_t x405;
uint32_t x406;
uint32_t x407;
uint32_t x408;
uint32_t x409;
uint32_t x410;
uint32_t x411;
uint32_t x412;
uint32_t x413;
uint32_t x414;
uint32_t x415;
uint32_t x416;
fiat_secp256k1_uint1 x417;
uint32_t x418;
fiat_secp256k1_uint1 x419;
uint32_t x420;
fiat_secp256k1_uint1 x421;
uint32_t x422;
fiat_secp256k1_uint1 x423;
uint32_t x424;
fiat_secp256k1_uint1 x425;
uint32_t x426;
fiat_secp256k1_uint1 x427;
uint32_t x428;
fiat_secp256k1_uint1 x429;
uint32_t x430;
fiat_secp256k1_uint1 x431;
uint32_t x432;
fiat_secp256k1_uint1 x433;
uint32_t x434;
fiat_secp256k1_uint1 x435;
uint32_t x436;
fiat_secp256k1_uint1 x437;
uint32_t x438;
fiat_secp256k1_uint1 x439;
uint32_t x440;
fiat_secp256k1_uint1 x441;
uint32_t x442;
fiat_secp256k1_uint1 x443;
uint32_t x444;
fiat_secp256k1_uint1 x445;
uint32_t x446;
fiat_secp256k1_uint1 x447;
uint32_t x448;
fiat_secp256k1_uint1 x449;
uint32_t x450;
fiat_secp256k1_uint1 x451;
uint32_t x452;
fiat_secp256k1_uint1 x453;
uint32_t x454;
fiat_secp256k1_uint1 x455;
uint32_t x456;
fiat_secp256k1_uint1 x457;
uint32_t x458;
fiat_secp256k1_uint1 x459;
uint32_t x460;
fiat_secp256k1_uint1 x461;
uint32_t x462;
fiat_secp256k1_uint1 x463;
uint32_t x464;
uint32_t x465;
uint32_t x466;
uint32_t x467;
uint32_t x468;
uint32_t x469;
uint32_t x470;
uint32_t x471;
uint32_t x472;
uint32_t x473;
uint32_t x474;
uint32_t x475;
uint32_t x476;
uint32_t x477;
uint32_t x478;
uint32_t x479;
uint32_t x480;
uint32_t x481;
uint32_t x482;
fiat_secp256k1_uint1 x483;
uint32_t x484;
fiat_secp256k1_uint1 x485;
uint32_t x486;
fiat_secp256k1_uint1 x487;
uint32_t x488;
fiat_secp256k1_uint1 x489;
uint32_t x490;
fiat_secp256k1_uint1 x491;
uint32_t x492;
fiat_secp256k1_uint1 x493;
uint32_t x494;
fiat_secp256k1_uint1 x495;
uint32_t x496;
fiat_secp256k1_uint1 x497;
uint32_t x498;
fiat_secp256k1_uint1 x499;
uint32_t x500;
fiat_secp256k1_uint1 x501;
uint32_t x502;
fiat_secp256k1_uint1 x503;
uint32_t x504;
fiat_secp256k1_uint1 x505;
uint32_t x506;
fiat_secp256k1_uint1 x507;
uint32_t x508;
fiat_secp256k1_uint1 x509;
uint32_t x510;
fiat_secp256k1_uint1 x511;
uint32_t x512;
fiat_secp256k1_uint1 x513;
uint32_t x514;
fiat_secp256k1_uint1 x515;
uint32_t x516;
fiat_secp256k1_uint1 x517;
uint32_t x518;
fiat_secp256k1_uint1 x519;
uint32_t x520;
fiat_secp256k1_uint1 x521;
uint32_t x522;
fiat_secp256k1_uint1 x523;
uint32_t x524;
fiat_secp256k1_uint1 x525;
uint32_t x526;
fiat_secp256k1_uint1 x527;
uint32_t x528;
fiat_secp256k1_uint1 x529;
uint32_t x530;
fiat_secp256k1_uint1 x531;
uint32_t x532;
uint32_t x533;
uint32_t x534;
uint32_t x535;
uint32_t x536;
uint32_t x537;
uint32_t x538;
uint32_t x539;
x1 = (arg1[0]);
fiat_secp256k1_mulx_u32(&x2, &x3, x1, UINT32_C(0xd2253531));
fiat_secp256k1_mulx_u32(&x4, &x5, x2, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x6, &x7, x2, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x8, &x9, x2, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x10, &x11, x2, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x12, &x13, x2, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x14, &x15, x2, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x16, &x17, x2, UINT32_C(0xfffffffe));
fiat_secp256k1_mulx_u32(&x18, &x19, x2, UINT32_C(0xfffffc2f));
fiat_secp256k1_addcarryx_u32(&x20, &x21, 0x0, x19, x16);
fiat_secp256k1_addcarryx_u32(&x22, &x23, x21, x17, x14);
fiat_secp256k1_addcarryx_u32(&x24, &x25, x23, x15, x12);
fiat_secp256k1_addcarryx_u32(&x26, &x27, x25, x13, x10);
fiat_secp256k1_addcarryx_u32(&x28, &x29, x27, x11, x8);
fiat_secp256k1_addcarryx_u32(&x30, &x31, x29, x9, x6);
fiat_secp256k1_addcarryx_u32(&x32, &x33, x31, x7, x4);
fiat_secp256k1_addcarryx_u32(&x34, &x35, 0x0, x1, x18);
fiat_secp256k1_addcarryx_u32(&x36, &x37, x35, 0x0, x20);
fiat_secp256k1_addcarryx_u32(&x38, &x39, x37, 0x0, x22);
fiat_secp256k1_addcarryx_u32(&x40, &x41, x39, 0x0, x24);
fiat_secp256k1_addcarryx_u32(&x42, &x43, x41, 0x0, x26);
fiat_secp256k1_addcarryx_u32(&x44, &x45, x43, 0x0, x28);
fiat_secp256k1_addcarryx_u32(&x46, &x47, x45, 0x0, x30);
fiat_secp256k1_addcarryx_u32(&x48, &x49, x47, 0x0, x32);
fiat_secp256k1_addcarryx_u32(&x50, &x51, x49, 0x0, (x33 + x5));
fiat_secp256k1_addcarryx_u32(&x52, &x53, 0x0, x36, (arg1[1]));
fiat_secp256k1_addcarryx_u32(&x54, &x55, x53, x38, 0x0);
fiat_secp256k1_addcarryx_u32(&x56, &x57, x55, x40, 0x0);
fiat_secp256k1_addcarryx_u32(&x58, &x59, x57, x42, 0x0);
fiat_secp256k1_addcarryx_u32(&x60, &x61, x59, x44, 0x0);
fiat_secp256k1_addcarryx_u32(&x62, &x63, x61, x46, 0x0);
fiat_secp256k1_addcarryx_u32(&x64, &x65, x63, x48, 0x0);
fiat_secp256k1_addcarryx_u32(&x66, &x67, x65, x50, 0x0);
fiat_secp256k1_mulx_u32(&x68, &x69, x52, UINT32_C(0xd2253531));
fiat_secp256k1_mulx_u32(&x70, &x71, x68, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x72, &x73, x68, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x74, &x75, x68, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x76, &x77, x68, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x78, &x79, x68, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x80, &x81, x68, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x82, &x83, x68, UINT32_C(0xfffffffe));
fiat_secp256k1_mulx_u32(&x84, &x85, x68, UINT32_C(0xfffffc2f));
fiat_secp256k1_addcarryx_u32(&x86, &x87, 0x0, x85, x82);
fiat_secp256k1_addcarryx_u32(&x88, &x89, x87, x83, x80);
fiat_secp256k1_addcarryx_u32(&x90, &x91, x89, x81, x78);
fiat_secp256k1_addcarryx_u32(&x92, &x93, x91, x79, x76);
fiat_secp256k1_addcarryx_u32(&x94, &x95, x93, x77, x74);
fiat_secp256k1_addcarryx_u32(&x96, &x97, x95, x75, x72);
fiat_secp256k1_addcarryx_u32(&x98, &x99, x97, x73, x70);
fiat_secp256k1_addcarryx_u32(&x100, &x101, 0x0, x52, x84);
fiat_secp256k1_addcarryx_u32(&x102, &x103, x101, x54, x86);
fiat_secp256k1_addcarryx_u32(&x104, &x105, x103, x56, x88);
fiat_secp256k1_addcarryx_u32(&x106, &x107, x105, x58, x90);
fiat_secp256k1_addcarryx_u32(&x108, &x109, x107, x60, x92);
fiat_secp256k1_addcarryx_u32(&x110, &x111, x109, x62, x94);
fiat_secp256k1_addcarryx_u32(&x112, &x113, x111, x64, x96);
fiat_secp256k1_addcarryx_u32(&x114, &x115, x113, x66, x98);
fiat_secp256k1_addcarryx_u32(&x116, &x117, x115, ((uint32_t)x67 + x51), (x99 + x71));
fiat_secp256k1_addcarryx_u32(&x118, &x119, 0x0, x102, (arg1[2]));
fiat_secp256k1_addcarryx_u32(&x120, &x121, x119, x104, 0x0);
fiat_secp256k1_addcarryx_u32(&x122, &x123, x121, x106, 0x0);
fiat_secp256k1_addcarryx_u32(&x124, &x125, x123, x108, 0x0);
fiat_secp256k1_addcarryx_u32(&x126, &x127, x125, x110, 0x0);
fiat_secp256k1_addcarryx_u32(&x128, &x129, x127, x112, 0x0);
fiat_secp256k1_addcarryx_u32(&x130, &x131, x129, x114, 0x0);
fiat_secp256k1_addcarryx_u32(&x132, &x133, x131, x116, 0x0);
fiat_secp256k1_mulx_u32(&x134, &x135, x118, UINT32_C(0xd2253531));
fiat_secp256k1_mulx_u32(&x136, &x137, x134, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x138, &x139, x134, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x140, &x141, x134, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x142, &x143, x134, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x144, &x145, x134, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x146, &x147, x134, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x148, &x149, x134, UINT32_C(0xfffffffe));
fiat_secp256k1_mulx_u32(&x150, &x151, x134, UINT32_C(0xfffffc2f));
fiat_secp256k1_addcarryx_u32(&x152, &x153, 0x0, x151, x148);
fiat_secp256k1_addcarryx_u32(&x154, &x155, x153, x149, x146);
fiat_secp256k1_addcarryx_u32(&x156, &x157, x155, x147, x144);
fiat_secp256k1_addcarryx_u32(&x158, &x159, x157, x145, x142);
fiat_secp256k1_addcarryx_u32(&x160, &x161, x159, x143, x140);
fiat_secp256k1_addcarryx_u32(&x162, &x163, x161, x141, x138);
fiat_secp256k1_addcarryx_u32(&x164, &x165, x163, x139, x136);
fiat_secp256k1_addcarryx_u32(&x166, &x167, 0x0, x118, x150);
fiat_secp256k1_addcarryx_u32(&x168, &x169, x167, x120, x152);
fiat_secp256k1_addcarryx_u32(&x170, &x171, x169, x122, x154);
fiat_secp256k1_addcarryx_u32(&x172, &x173, x171, x124, x156);
fiat_secp256k1_addcarryx_u32(&x174, &x175, x173, x126, x158);
fiat_secp256k1_addcarryx_u32(&x176, &x177, x175, x128, x160);
fiat_secp256k1_addcarryx_u32(&x178, &x179, x177, x130, x162);
fiat_secp256k1_addcarryx_u32(&x180, &x181, x179, x132, x164);
fiat_secp256k1_addcarryx_u32(&x182, &x183, x181, ((uint32_t)x133 + x117), (x165 + x137));
fiat_secp256k1_addcarryx_u32(&x184, &x185, 0x0, x168, (arg1[3]));
fiat_secp256k1_addcarryx_u32(&x186, &x187, x185, x170, 0x0);
fiat_secp256k1_addcarryx_u32(&x188, &x189, x187, x172, 0x0);
fiat_secp256k1_addcarryx_u32(&x190, &x191, x189, x174, 0x0);
fiat_secp256k1_addcarryx_u32(&x192, &x193, x191, x176, 0x0);
fiat_secp256k1_addcarryx_u32(&x194, &x195, x193, x178, 0x0);
fiat_secp256k1_addcarryx_u32(&x196, &x197, x195, x180, 0x0);
fiat_secp256k1_addcarryx_u32(&x198, &x199, x197, x182, 0x0);
fiat_secp256k1_mulx_u32(&x200, &x201, x184, UINT32_C(0xd2253531));
fiat_secp256k1_mulx_u32(&x202, &x203, x200, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x204, &x205, x200, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x206, &x207, x200, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x208, &x209, x200, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x210, &x211, x200, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x212, &x213, x200, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x214, &x215, x200, UINT32_C(0xfffffffe));
fiat_secp256k1_mulx_u32(&x216, &x217, x200, UINT32_C(0xfffffc2f));
fiat_secp256k1_addcarryx_u32(&x218, &x219, 0x0, x217, x214);
fiat_secp256k1_addcarryx_u32(&x220, &x221, x219, x215, x212);
fiat_secp256k1_addcarryx_u32(&x222, &x223, x221, x213, x210);
fiat_secp256k1_addcarryx_u32(&x224, &x225, x223, x211, x208);
fiat_secp256k1_addcarryx_u32(&x226, &x227, x225, x209, x206);
fiat_secp256k1_addcarryx_u32(&x228, &x229, x227, x207, x204);
fiat_secp256k1_addcarryx_u32(&x230, &x231, x229, x205, x202);
fiat_secp256k1_addcarryx_u32(&x232, &x233, 0x0, x184, x216);
fiat_secp256k1_addcarryx_u32(&x234, &x235, x233, x186, x218);
fiat_secp256k1_addcarryx_u32(&x236, &x237, x235, x188, x220);
fiat_secp256k1_addcarryx_u32(&x238, &x239, x237, x190, x222);
fiat_secp256k1_addcarryx_u32(&x240, &x241, x239, x192, x224);
fiat_secp256k1_addcarryx_u32(&x242, &x243, x241, x194, x226);
fiat_secp256k1_addcarryx_u32(&x244, &x245, x243, x196, x228);
fiat_secp256k1_addcarryx_u32(&x246, &x247, x245, x198, x230);
fiat_secp256k1_addcarryx_u32(&x248, &x249, x247, ((uint32_t)x199 + x183), (x231 + x203));
fiat_secp256k1_addcarryx_u32(&x250, &x251, 0x0, x234, (arg1[4]));
fiat_secp256k1_addcarryx_u32(&x252, &x253, x251, x236, 0x0);
fiat_secp256k1_addcarryx_u32(&x254, &x255, x253, x238, 0x0);
fiat_secp256k1_addcarryx_u32(&x256, &x257, x255, x240, 0x0);
fiat_secp256k1_addcarryx_u32(&x258, &x259, x257, x242, 0x0);
fiat_secp256k1_addcarryx_u32(&x260, &x261, x259, x244, 0x0);
fiat_secp256k1_addcarryx_u32(&x262, &x263, x261, x246, 0x0);
fiat_secp256k1_addcarryx_u32(&x264, &x265, x263, x248, 0x0);
fiat_secp256k1_mulx_u32(&x266, &x267, x250, UINT32_C(0xd2253531));
fiat_secp256k1_mulx_u32(&x268, &x269, x266, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x270, &x271, x266, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x272, &x273, x266, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x274, &x275, x266, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x276, &x277, x266, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x278, &x279, x266, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x280, &x281, x266, UINT32_C(0xfffffffe));
fiat_secp256k1_mulx_u32(&x282, &x283, x266, UINT32_C(0xfffffc2f));
fiat_secp256k1_addcarryx_u32(&x284, &x285, 0x0, x283, x280);
fiat_secp256k1_addcarryx_u32(&x286, &x287, x285, x281, x278);
fiat_secp256k1_addcarryx_u32(&x288, &x289, x287, x279, x276);
fiat_secp256k1_addcarryx_u32(&x290, &x291, x289, x277, x274);
fiat_secp256k1_addcarryx_u32(&x292, &x293, x291, x275, x272);
fiat_secp256k1_addcarryx_u32(&x294, &x295, x293, x273, x270);
fiat_secp256k1_addcarryx_u32(&x296, &x297, x295, x271, x268);
fiat_secp256k1_addcarryx_u32(&x298, &x299, 0x0, x250, x282);
fiat_secp256k1_addcarryx_u32(&x300, &x301, x299, x252, x284);
fiat_secp256k1_addcarryx_u32(&x302, &x303, x301, x254, x286);
fiat_secp256k1_addcarryx_u32(&x304, &x305, x303, x256, x288);
fiat_secp256k1_addcarryx_u32(&x306, &x307, x305, x258, x290);
fiat_secp256k1_addcarryx_u32(&x308, &x309, x307, x260, x292);
fiat_secp256k1_addcarryx_u32(&x310, &x311, x309, x262, x294);
fiat_secp256k1_addcarryx_u32(&x312, &x313, x311, x264, x296);
fiat_secp256k1_addcarryx_u32(&x314, &x315, x313, ((uint32_t)x265 + x249), (x297 + x269));
fiat_secp256k1_addcarryx_u32(&x316, &x317, 0x0, x300, (arg1[5]));
fiat_secp256k1_addcarryx_u32(&x318, &x319, x317, x302, 0x0);
fiat_secp256k1_addcarryx_u32(&x320, &x321, x319, x304, 0x0);
fiat_secp256k1_addcarryx_u32(&x322, &x323, x321, x306, 0x0);
fiat_secp256k1_addcarryx_u32(&x324, &x325, x323, x308, 0x0);
fiat_secp256k1_addcarryx_u32(&x326, &x327, x325, x310, 0x0);
fiat_secp256k1_addcarryx_u32(&x328, &x329, x327, x312, 0x0);
fiat_secp256k1_addcarryx_u32(&x330, &x331, x329, x314, 0x0);
fiat_secp256k1_mulx_u32(&x332, &x333, x316, UINT32_C(0xd2253531));
fiat_secp256k1_mulx_u32(&x334, &x335, x332, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x336, &x337, x332, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x338, &x339, x332, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x340, &x341, x332, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x342, &x343, x332, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x344, &x345, x332, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x346, &x347, x332, UINT32_C(0xfffffffe));
fiat_secp256k1_mulx_u32(&x348, &x349, x332, UINT32_C(0xfffffc2f));
fiat_secp256k1_addcarryx_u32(&x350, &x351, 0x0, x349, x346);
fiat_secp256k1_addcarryx_u32(&x352, &x353, x351, x347, x344);
fiat_secp256k1_addcarryx_u32(&x354, &x355, x353, x345, x342);
fiat_secp256k1_addcarryx_u32(&x356, &x357, x355, x343, x340);
fiat_secp256k1_addcarryx_u32(&x358, &x359, x357, x341, x338);
fiat_secp256k1_addcarryx_u32(&x360, &x361, x359, x339, x336);
fiat_secp256k1_addcarryx_u32(&x362, &x363, x361, x337, x334);
fiat_secp256k1_addcarryx_u32(&x364, &x365, 0x0, x316, x348);
fiat_secp256k1_addcarryx_u32(&x366, &x367, x365, x318, x350);
fiat_secp256k1_addcarryx_u32(&x368, &x369, x367, x320, x352);
fiat_secp256k1_addcarryx_u32(&x370, &x371, x369, x322, x354);
fiat_secp256k1_addcarryx_u32(&x372, &x373, x371, x324, x356);
fiat_secp256k1_addcarryx_u32(&x374, &x375, x373, x326, x358);
fiat_secp256k1_addcarryx_u32(&x376, &x377, x375, x328, x360);
fiat_secp256k1_addcarryx_u32(&x378, &x379, x377, x330, x362);
fiat_secp256k1_addcarryx_u32(&x380, &x381, x379, ((uint32_t)x331 + x315), (x363 + x335));
fiat_secp256k1_addcarryx_u32(&x382, &x383, 0x0, x366, (arg1[6]));
fiat_secp256k1_addcarryx_u32(&x384, &x385, x383, x368, 0x0);
fiat_secp256k1_addcarryx_u32(&x386, &x387, x385, x370, 0x0);
fiat_secp256k1_addcarryx_u32(&x388, &x389, x387, x372, 0x0);
fiat_secp256k1_addcarryx_u32(&x390, &x391, x389, x374, 0x0);
fiat_secp256k1_addcarryx_u32(&x392, &x393, x391, x376, 0x0);
fiat_secp256k1_addcarryx_u32(&x394, &x395, x393, x378, 0x0);
fiat_secp256k1_addcarryx_u32(&x396, &x397, x395, x380, 0x0);
fiat_secp256k1_mulx_u32(&x398, &x399, x382, UINT32_C(0xd2253531));
fiat_secp256k1_mulx_u32(&x400, &x401, x398, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x402, &x403, x398, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x404, &x405, x398, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x406, &x407, x398, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x408, &x409, x398, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x410, &x411, x398, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x412, &x413, x398, UINT32_C(0xfffffffe));
fiat_secp256k1_mulx_u32(&x414, &x415, x398, UINT32_C(0xfffffc2f));
fiat_secp256k1_addcarryx_u32(&x416, &x417, 0x0, x415, x412);
fiat_secp256k1_addcarryx_u32(&x418, &x419, x417, x413, x410);
fiat_secp256k1_addcarryx_u32(&x420, &x421, x419, x411, x408);
fiat_secp256k1_addcarryx_u32(&x422, &x423, x421, x409, x406);
fiat_secp256k1_addcarryx_u32(&x424, &x425, x423, x407, x404);
fiat_secp256k1_addcarryx_u32(&x426, &x427, x425, x405, x402);
fiat_secp256k1_addcarryx_u32(&x428, &x429, x427, x403, x400);
fiat_secp256k1_addcarryx_u32(&x430, &x431, 0x0, x382, x414);
fiat_secp256k1_addcarryx_u32(&x432, &x433, x431, x384, x416);
fiat_secp256k1_addcarryx_u32(&x434, &x435, x433, x386, x418);
fiat_secp256k1_addcarryx_u32(&x436, &x437, x435, x388, x420);
fiat_secp256k1_addcarryx_u32(&x438, &x439, x437, x390, x422);
fiat_secp256k1_addcarryx_u32(&x440, &x441, x439, x392, x424);
fiat_secp256k1_addcarryx_u32(&x442, &x443, x441, x394, x426);
fiat_secp256k1_addcarryx_u32(&x444, &x445, x443, x396, x428);
fiat_secp256k1_addcarryx_u32(&x446, &x447, x445, ((uint32_t)x397 + x381), (x429 + x401));
fiat_secp256k1_addcarryx_u32(&x448, &x449, 0x0, x432, (arg1[7]));
fiat_secp256k1_addcarryx_u32(&x450, &x451, x449, x434, 0x0);
fiat_secp256k1_addcarryx_u32(&x452, &x453, x451, x436, 0x0);
fiat_secp256k1_addcarryx_u32(&x454, &x455, x453, x438, 0x0);
fiat_secp256k1_addcarryx_u32(&x456, &x457, x455, x440, 0x0);
fiat_secp256k1_addcarryx_u32(&x458, &x459, x457, x442, 0x0);
fiat_secp256k1_addcarryx_u32(&x460, &x461, x459, x444, 0x0);
fiat_secp256k1_addcarryx_u32(&x462, &x463, x461, x446, 0x0);
fiat_secp256k1_mulx_u32(&x464, &x465, x448, UINT32_C(0xd2253531));
fiat_secp256k1_mulx_u32(&x466, &x467, x464, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x468, &x469, x464, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x470, &x471, x464, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x472, &x473, x464, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x474, &x475, x464, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x476, &x477, x464, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x478, &x479, x464, UINT32_C(0xfffffffe));
fiat_secp256k1_mulx_u32(&x480, &x481, x464, UINT32_C(0xfffffc2f));
fiat_secp256k1_addcarryx_u32(&x482, &x483, 0x0, x481, x478);
fiat_secp256k1_addcarryx_u32(&x484, &x485, x483, x479, x476);
fiat_secp256k1_addcarryx_u32(&x486, &x487, x485, x477, x474);
fiat_secp256k1_addcarryx_u32(&x488, &x489, x487, x475, x472);
fiat_secp256k1_addcarryx_u32(&x490, &x491, x489, x473, x470);
fiat_secp256k1_addcarryx_u32(&x492, &x493, x491, x471, x468);
fiat_secp256k1_addcarryx_u32(&x494, &x495, x493, x469, x466);
fiat_secp256k1_addcarryx_u32(&x496, &x497, 0x0, x448, x480);
fiat_secp256k1_addcarryx_u32(&x498, &x499, x497, x450, x482);
fiat_secp256k1_addcarryx_u32(&x500, &x501, x499, x452, x484);
fiat_secp256k1_addcarryx_u32(&x502, &x503, x501, x454, x486);
fiat_secp256k1_addcarryx_u32(&x504, &x505, x503, x456, x488);
fiat_secp256k1_addcarryx_u32(&x506, &x507, x505, x458, x490);
fiat_secp256k1_addcarryx_u32(&x508, &x509, x507, x460, x492);
fiat_secp256k1_addcarryx_u32(&x510, &x511, x509, x462, x494);
fiat_secp256k1_addcarryx_u32(&x512, &x513, x511, ((uint32_t)x463 + x447), (x495 + x467));
fiat_secp256k1_subborrowx_u32(&x514, &x515, 0x0, x498, UINT32_C(0xfffffc2f));
fiat_secp256k1_subborrowx_u32(&x516, &x517, x515, x500, UINT32_C(0xfffffffe));
fiat_secp256k1_subborrowx_u32(&x518, &x519, x517, x502, UINT32_C(0xffffffff));
fiat_secp256k1_subborrowx_u32(&x520, &x521, x519, x504, UINT32_C(0xffffffff));
fiat_secp256k1_subborrowx_u32(&x522, &x523, x521, x506, UINT32_C(0xffffffff));
fiat_secp256k1_subborrowx_u32(&x524, &x525, x523, x508, UINT32_C(0xffffffff));
fiat_secp256k1_subborrowx_u32(&x526, &x527, x525, x510, UINT32_C(0xffffffff));
fiat_secp256k1_subborrowx_u32(&x528, &x529, x527, x512, UINT32_C(0xffffffff));
fiat_secp256k1_subborrowx_u32(&x530, &x531, x529, x513, 0x0);
fiat_secp256k1_cmovznz_u32(&x532, x531, x514, x498);
fiat_secp256k1_cmovznz_u32(&x533, x531, x516, x500);
fiat_secp256k1_cmovznz_u32(&x534, x531, x518, x502);
fiat_secp256k1_cmovznz_u32(&x535, x531, x520, x504);
fiat_secp256k1_cmovznz_u32(&x536, x531, x522, x506);
fiat_secp256k1_cmovznz_u32(&x537, x531, x524, x508);
fiat_secp256k1_cmovznz_u32(&x538, x531, x526, x510);
fiat_secp256k1_cmovznz_u32(&x539, x531, x528, x512);
out1[0] = x532;
out1[1] = x533;
out1[2] = x534;
out1[3] = x535;
out1[4] = x536;
out1[5] = x537;
out1[6] = x538;
out1[7] = x539;
}
/*
* The function fiat_secp256k1_to_montgomery translates a field element into the Montgomery domain.
* Preconditions:
* 0 ≤ eval arg1 < m
* Postconditions:
* eval (from_montgomery out1) mod m = eval arg1 mod m
* 0 ≤ eval out1 < m
*
* Input Bounds:
* arg1: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]]
* Output Bounds:
* out1: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]]
*/
static void fiat_secp256k1_to_montgomery(uint32_t out1[8], const uint32_t arg1[8]) {
uint32_t x1;
uint32_t x2;
uint32_t x3;
uint32_t x4;
uint32_t x5;
uint32_t x6;
uint32_t x7;
uint32_t x8;
uint32_t x9;
uint32_t x10;
uint32_t x11;
uint32_t x12;
uint32_t x13;
fiat_secp256k1_uint1 x14;
uint32_t x15;
fiat_secp256k1_uint1 x16;
uint32_t x17;
uint32_t x18;
uint32_t x19;
uint32_t x20;
uint32_t x21;
uint32_t x22;
uint32_t x23;
uint32_t x24;
uint32_t x25;
uint32_t x26;
uint32_t x27;
uint32_t x28;
uint32_t x29;
uint32_t x30;
uint32_t x31;
uint32_t x32;
uint32_t x33;
uint32_t x34;
uint32_t x35;
fiat_secp256k1_uint1 x36;
uint32_t x37;
fiat_secp256k1_uint1 x38;
uint32_t x39;
fiat_secp256k1_uint1 x40;
uint32_t x41;
fiat_secp256k1_uint1 x42;
uint32_t x43;
fiat_secp256k1_uint1 x44;
uint32_t x45;
fiat_secp256k1_uint1 x46;
uint32_t x47;
fiat_secp256k1_uint1 x48;
uint32_t x49;
fiat_secp256k1_uint1 x50;
uint32_t x51;
fiat_secp256k1_uint1 x52;
uint32_t x53;
fiat_secp256k1_uint1 x54;
uint32_t x55;
fiat_secp256k1_uint1 x56;
uint32_t x57;
fiat_secp256k1_uint1 x58;
uint32_t x59;
fiat_secp256k1_uint1 x60;
uint32_t x61;
fiat_secp256k1_uint1 x62;
uint32_t x63;
fiat_secp256k1_uint1 x64;
uint32_t x65;
fiat_secp256k1_uint1 x66;
uint32_t x67;
uint32_t x68;
uint32_t x69;
uint32_t x70;
uint32_t x71;
fiat_secp256k1_uint1 x72;
uint32_t x73;
fiat_secp256k1_uint1 x74;
uint32_t x75;
fiat_secp256k1_uint1 x76;
uint32_t x77;
fiat_secp256k1_uint1 x78;
uint32_t x79;
fiat_secp256k1_uint1 x80;
uint32_t x81;
fiat_secp256k1_uint1 x82;
uint32_t x83;
fiat_secp256k1_uint1 x84;
uint32_t x85;
fiat_secp256k1_uint1 x86;
uint32_t x87;
fiat_secp256k1_uint1 x88;
uint32_t x89;
fiat_secp256k1_uint1 x90;
uint32_t x91;
uint32_t x92;
uint32_t x93;
uint32_t x94;
uint32_t x95;
uint32_t x96;
uint32_t x97;
uint32_t x98;
uint32_t x99;
uint32_t x100;
uint32_t x101;
uint32_t x102;
uint32_t x103;
uint32_t x104;
uint32_t x105;
uint32_t x106;
uint32_t x107;
uint32_t x108;
uint32_t x109;
fiat_secp256k1_uint1 x110;
uint32_t x111;
fiat_secp256k1_uint1 x112;
uint32_t x113;
fiat_secp256k1_uint1 x114;
uint32_t x115;
fiat_secp256k1_uint1 x116;
uint32_t x117;
fiat_secp256k1_uint1 x118;
uint32_t x119;
fiat_secp256k1_uint1 x120;
uint32_t x121;
fiat_secp256k1_uint1 x122;
uint32_t x123;
fiat_secp256k1_uint1 x124;
uint32_t x125;
fiat_secp256k1_uint1 x126;
uint32_t x127;
fiat_secp256k1_uint1 x128;
uint32_t x129;
fiat_secp256k1_uint1 x130;
uint32_t x131;
fiat_secp256k1_uint1 x132;
uint32_t x133;
fiat_secp256k1_uint1 x134;
uint32_t x135;
fiat_secp256k1_uint1 x136;
uint32_t x137;
fiat_secp256k1_uint1 x138;
uint32_t x139;
fiat_secp256k1_uint1 x140;
uint32_t x141;
uint32_t x142;
uint32_t x143;
uint32_t x144;
uint32_t x145;
fiat_secp256k1_uint1 x146;
uint32_t x147;
fiat_secp256k1_uint1 x148;
uint32_t x149;
fiat_secp256k1_uint1 x150;
uint32_t x151;
fiat_secp256k1_uint1 x152;
uint32_t x153;
fiat_secp256k1_uint1 x154;
uint32_t x155;
fiat_secp256k1_uint1 x156;
uint32_t x157;
fiat_secp256k1_uint1 x158;
uint32_t x159;
fiat_secp256k1_uint1 x160;
uint32_t x161;
fiat_secp256k1_uint1 x162;
uint32_t x163;
fiat_secp256k1_uint1 x164;
uint32_t x165;
uint32_t x166;
uint32_t x167;
uint32_t x168;
uint32_t x169;
uint32_t x170;
uint32_t x171;
uint32_t x172;
uint32_t x173;
uint32_t x174;
uint32_t x175;
uint32_t x176;
uint32_t x177;
uint32_t x178;
uint32_t x179;
uint32_t x180;
uint32_t x181;
uint32_t x182;
uint32_t x183;
fiat_secp256k1_uint1 x184;
uint32_t x185;
fiat_secp256k1_uint1 x186;
uint32_t x187;
fiat_secp256k1_uint1 x188;
uint32_t x189;
fiat_secp256k1_uint1 x190;
uint32_t x191;
fiat_secp256k1_uint1 x192;
uint32_t x193;
fiat_secp256k1_uint1 x194;
uint32_t x195;
fiat_secp256k1_uint1 x196;
uint32_t x197;
fiat_secp256k1_uint1 x198;
uint32_t x199;
fiat_secp256k1_uint1 x200;
uint32_t x201;
fiat_secp256k1_uint1 x202;
uint32_t x203;
fiat_secp256k1_uint1 x204;
uint32_t x205;
fiat_secp256k1_uint1 x206;
uint32_t x207;
fiat_secp256k1_uint1 x208;
uint32_t x209;
fiat_secp256k1_uint1 x210;
uint32_t x211;
fiat_secp256k1_uint1 x212;
uint32_t x213;
fiat_secp256k1_uint1 x214;
uint32_t x215;
uint32_t x216;
uint32_t x217;
uint32_t x218;
uint32_t x219;
fiat_secp256k1_uint1 x220;
uint32_t x221;
fiat_secp256k1_uint1 x222;
uint32_t x223;
fiat_secp256k1_uint1 x224;
uint32_t x225;
fiat_secp256k1_uint1 x226;
uint32_t x227;
fiat_secp256k1_uint1 x228;
uint32_t x229;
fiat_secp256k1_uint1 x230;
uint32_t x231;
fiat_secp256k1_uint1 x232;
uint32_t x233;
fiat_secp256k1_uint1 x234;
uint32_t x235;
fiat_secp256k1_uint1 x236;
uint32_t x237;
fiat_secp256k1_uint1 x238;
uint32_t x239;
uint32_t x240;
uint32_t x241;
uint32_t x242;
uint32_t x243;
uint32_t x244;
uint32_t x245;
uint32_t x246;
uint32_t x247;
uint32_t x248;
uint32_t x249;
uint32_t x250;
uint32_t x251;
uint32_t x252;
uint32_t x253;
uint32_t x254;
uint32_t x255;
uint32_t x256;
uint32_t x257;
fiat_secp256k1_uint1 x258;
uint32_t x259;
fiat_secp256k1_uint1 x260;
uint32_t x261;
fiat_secp256k1_uint1 x262;
uint32_t x263;
fiat_secp256k1_uint1 x264;
uint32_t x265;
fiat_secp256k1_uint1 x266;
uint32_t x267;
fiat_secp256k1_uint1 x268;
uint32_t x269;
fiat_secp256k1_uint1 x270;
uint32_t x271;
fiat_secp256k1_uint1 x272;
uint32_t x273;
fiat_secp256k1_uint1 x274;
uint32_t x275;
fiat_secp256k1_uint1 x276;
uint32_t x277;
fiat_secp256k1_uint1 x278;
uint32_t x279;
fiat_secp256k1_uint1 x280;
uint32_t x281;
fiat_secp256k1_uint1 x282;
uint32_t x283;
fiat_secp256k1_uint1 x284;
uint32_t x285;
fiat_secp256k1_uint1 x286;
uint32_t x287;
fiat_secp256k1_uint1 x288;
uint32_t x289;
uint32_t x290;
uint32_t x291;
uint32_t x292;
uint32_t x293;
fiat_secp256k1_uint1 x294;
uint32_t x295;
fiat_secp256k1_uint1 x296;
uint32_t x297;
fiat_secp256k1_uint1 x298;
uint32_t x299;
fiat_secp256k1_uint1 x300;
uint32_t x301;
fiat_secp256k1_uint1 x302;
uint32_t x303;
fiat_secp256k1_uint1 x304;
uint32_t x305;
fiat_secp256k1_uint1 x306;
uint32_t x307;
fiat_secp256k1_uint1 x308;
uint32_t x309;
fiat_secp256k1_uint1 x310;
uint32_t x311;
fiat_secp256k1_uint1 x312;
uint32_t x313;
uint32_t x314;
uint32_t x315;
uint32_t x316;
uint32_t x317;
uint32_t x318;
uint32_t x319;
uint32_t x320;
uint32_t x321;
uint32_t x322;
uint32_t x323;
uint32_t x324;
uint32_t x325;
uint32_t x326;
uint32_t x327;
uint32_t x328;
uint32_t x329;
uint32_t x330;
uint32_t x331;
fiat_secp256k1_uint1 x332;
uint32_t x333;
fiat_secp256k1_uint1 x334;
uint32_t x335;
fiat_secp256k1_uint1 x336;
uint32_t x337;
fiat_secp256k1_uint1 x338;
uint32_t x339;
fiat_secp256k1_uint1 x340;
uint32_t x341;
fiat_secp256k1_uint1 x342;
uint32_t x343;
fiat_secp256k1_uint1 x344;
uint32_t x345;
fiat_secp256k1_uint1 x346;
uint32_t x347;
fiat_secp256k1_uint1 x348;
uint32_t x349;
fiat_secp256k1_uint1 x350;
uint32_t x351;
fiat_secp256k1_uint1 x352;
uint32_t x353;
fiat_secp256k1_uint1 x354;
uint32_t x355;
fiat_secp256k1_uint1 x356;
uint32_t x357;
fiat_secp256k1_uint1 x358;
uint32_t x359;
fiat_secp256k1_uint1 x360;
uint32_t x361;
fiat_secp256k1_uint1 x362;
uint32_t x363;
uint32_t x364;
uint32_t x365;
uint32_t x366;
uint32_t x367;
fiat_secp256k1_uint1 x368;
uint32_t x369;
fiat_secp256k1_uint1 x370;
uint32_t x371;
fiat_secp256k1_uint1 x372;
uint32_t x373;
fiat_secp256k1_uint1 x374;
uint32_t x375;
fiat_secp256k1_uint1 x376;
uint32_t x377;
fiat_secp256k1_uint1 x378;
uint32_t x379;
fiat_secp256k1_uint1 x380;
uint32_t x381;
fiat_secp256k1_uint1 x382;
uint32_t x383;
fiat_secp256k1_uint1 x384;
uint32_t x385;
fiat_secp256k1_uint1 x386;
uint32_t x387;
uint32_t x388;
uint32_t x389;
uint32_t x390;
uint32_t x391;
uint32_t x392;
uint32_t x393;
uint32_t x394;
uint32_t x395;
uint32_t x396;
uint32_t x397;
uint32_t x398;
uint32_t x399;
uint32_t x400;
uint32_t x401;
uint32_t x402;
uint32_t x403;
uint32_t x404;
uint32_t x405;
fiat_secp256k1_uint1 x406;
uint32_t x407;
fiat_secp256k1_uint1 x408;
uint32_t x409;
fiat_secp256k1_uint1 x410;
uint32_t x411;
fiat_secp256k1_uint1 x412;
uint32_t x413;
fiat_secp256k1_uint1 x414;
uint32_t x415;
fiat_secp256k1_uint1 x416;
uint32_t x417;
fiat_secp256k1_uint1 x418;
uint32_t x419;
fiat_secp256k1_uint1 x420;
uint32_t x421;
fiat_secp256k1_uint1 x422;
uint32_t x423;
fiat_secp256k1_uint1 x424;
uint32_t x425;
fiat_secp256k1_uint1 x426;
uint32_t x427;
fiat_secp256k1_uint1 x428;
uint32_t x429;
fiat_secp256k1_uint1 x430;
uint32_t x431;
fiat_secp256k1_uint1 x432;
uint32_t x433;
fiat_secp256k1_uint1 x434;
uint32_t x435;
fiat_secp256k1_uint1 x436;
uint32_t x437;
uint32_t x438;
uint32_t x439;
uint32_t x440;
uint32_t x441;
fiat_secp256k1_uint1 x442;
uint32_t x443;
fiat_secp256k1_uint1 x444;
uint32_t x445;
fiat_secp256k1_uint1 x446;
uint32_t x447;
fiat_secp256k1_uint1 x448;
uint32_t x449;
fiat_secp256k1_uint1 x450;
uint32_t x451;
fiat_secp256k1_uint1 x452;
uint32_t x453;
fiat_secp256k1_uint1 x454;
uint32_t x455;
fiat_secp256k1_uint1 x456;
uint32_t x457;
fiat_secp256k1_uint1 x458;
uint32_t x459;
fiat_secp256k1_uint1 x460;
uint32_t x461;
uint32_t x462;
uint32_t x463;
uint32_t x464;
uint32_t x465;
uint32_t x466;
uint32_t x467;
uint32_t x468;
uint32_t x469;
uint32_t x470;
uint32_t x471;
uint32_t x472;
uint32_t x473;
uint32_t x474;
uint32_t x475;
uint32_t x476;
uint32_t x477;
uint32_t x478;
uint32_t x479;
fiat_secp256k1_uint1 x480;
uint32_t x481;
fiat_secp256k1_uint1 x482;
uint32_t x483;
fiat_secp256k1_uint1 x484;
uint32_t x485;
fiat_secp256k1_uint1 x486;
uint32_t x487;
fiat_secp256k1_uint1 x488;
uint32_t x489;
fiat_secp256k1_uint1 x490;
uint32_t x491;
fiat_secp256k1_uint1 x492;
uint32_t x493;
fiat_secp256k1_uint1 x494;
uint32_t x495;
fiat_secp256k1_uint1 x496;
uint32_t x497;
fiat_secp256k1_uint1 x498;
uint32_t x499;
fiat_secp256k1_uint1 x500;
uint32_t x501;
fiat_secp256k1_uint1 x502;
uint32_t x503;
fiat_secp256k1_uint1 x504;
uint32_t x505;
fiat_secp256k1_uint1 x506;
uint32_t x507;
fiat_secp256k1_uint1 x508;
uint32_t x509;
fiat_secp256k1_uint1 x510;
uint32_t x511;
uint32_t x512;
uint32_t x513;
uint32_t x514;
uint32_t x515;
fiat_secp256k1_uint1 x516;
uint32_t x517;
fiat_secp256k1_uint1 x518;
uint32_t x519;
fiat_secp256k1_uint1 x520;
uint32_t x521;
fiat_secp256k1_uint1 x522;
uint32_t x523;
fiat_secp256k1_uint1 x524;
uint32_t x525;
fiat_secp256k1_uint1 x526;
uint32_t x527;
fiat_secp256k1_uint1 x528;
uint32_t x529;
fiat_secp256k1_uint1 x530;
uint32_t x531;
fiat_secp256k1_uint1 x532;
uint32_t x533;
fiat_secp256k1_uint1 x534;
uint32_t x535;
uint32_t x536;
uint32_t x537;
uint32_t x538;
uint32_t x539;
uint32_t x540;
uint32_t x541;
uint32_t x542;
uint32_t x543;
uint32_t x544;
uint32_t x545;
uint32_t x546;
uint32_t x547;
uint32_t x548;
uint32_t x549;
uint32_t x550;
uint32_t x551;
uint32_t x552;
uint32_t x553;
fiat_secp256k1_uint1 x554;
uint32_t x555;
fiat_secp256k1_uint1 x556;
uint32_t x557;
fiat_secp256k1_uint1 x558;
uint32_t x559;
fiat_secp256k1_uint1 x560;
uint32_t x561;
fiat_secp256k1_uint1 x562;
uint32_t x563;
fiat_secp256k1_uint1 x564;
uint32_t x565;
fiat_secp256k1_uint1 x566;
uint32_t x567;
fiat_secp256k1_uint1 x568;
uint32_t x569;
fiat_secp256k1_uint1 x570;
uint32_t x571;
fiat_secp256k1_uint1 x572;
uint32_t x573;
fiat_secp256k1_uint1 x574;
uint32_t x575;
fiat_secp256k1_uint1 x576;
uint32_t x577;
fiat_secp256k1_uint1 x578;
uint32_t x579;
fiat_secp256k1_uint1 x580;
uint32_t x581;
fiat_secp256k1_uint1 x582;
uint32_t x583;
fiat_secp256k1_uint1 x584;
uint32_t x585;
fiat_secp256k1_uint1 x586;
uint32_t x587;
fiat_secp256k1_uint1 x588;
uint32_t x589;
fiat_secp256k1_uint1 x590;
uint32_t x591;
fiat_secp256k1_uint1 x592;
uint32_t x593;
fiat_secp256k1_uint1 x594;
uint32_t x595;
fiat_secp256k1_uint1 x596;
uint32_t x597;
fiat_secp256k1_uint1 x598;
uint32_t x599;
fiat_secp256k1_uint1 x600;
uint32_t x601;
fiat_secp256k1_uint1 x602;
uint32_t x603;
uint32_t x604;
uint32_t x605;
uint32_t x606;
uint32_t x607;
uint32_t x608;
uint32_t x609;
uint32_t x610;
x1 = (arg1[1]);
x2 = (arg1[2]);
x3 = (arg1[3]);
x4 = (arg1[4]);
x5 = (arg1[5]);
x6 = (arg1[6]);
x7 = (arg1[7]);
x8 = (arg1[0]);
fiat_secp256k1_mulx_u32(&x9, &x10, x8, UINT16_C(0x7a2));
fiat_secp256k1_mulx_u32(&x11, &x12, x8, UINT32_C(0xe90a1));
fiat_secp256k1_addcarryx_u32(&x13, &x14, 0x0, x12, x9);
fiat_secp256k1_addcarryx_u32(&x15, &x16, x14, x10, x8);
fiat_secp256k1_mulx_u32(&x17, &x18, x11, UINT32_C(0xd2253531));
fiat_secp256k1_mulx_u32(&x19, &x20, x17, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x21, &x22, x17, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x23, &x24, x17, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x25, &x26, x17, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x27, &x28, x17, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x29, &x30, x17, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x31, &x32, x17, UINT32_C(0xfffffffe));
fiat_secp256k1_mulx_u32(&x33, &x34, x17, UINT32_C(0xfffffc2f));
fiat_secp256k1_addcarryx_u32(&x35, &x36, 0x0, x34, x31);
fiat_secp256k1_addcarryx_u32(&x37, &x38, x36, x32, x29);
fiat_secp256k1_addcarryx_u32(&x39, &x40, x38, x30, x27);
fiat_secp256k1_addcarryx_u32(&x41, &x42, x40, x28, x25);
fiat_secp256k1_addcarryx_u32(&x43, &x44, x42, x26, x23);
fiat_secp256k1_addcarryx_u32(&x45, &x46, x44, x24, x21);
fiat_secp256k1_addcarryx_u32(&x47, &x48, x46, x22, x19);
fiat_secp256k1_addcarryx_u32(&x49, &x50, 0x0, x11, x33);
fiat_secp256k1_addcarryx_u32(&x51, &x52, x50, x13, x35);
fiat_secp256k1_addcarryx_u32(&x53, &x54, x52, x15, x37);
fiat_secp256k1_addcarryx_u32(&x55, &x56, x54, x16, x39);
fiat_secp256k1_addcarryx_u32(&x57, &x58, x56, 0x0, x41);
fiat_secp256k1_addcarryx_u32(&x59, &x60, x58, 0x0, x43);
fiat_secp256k1_addcarryx_u32(&x61, &x62, x60, 0x0, x45);
fiat_secp256k1_addcarryx_u32(&x63, &x64, x62, 0x0, x47);
fiat_secp256k1_addcarryx_u32(&x65, &x66, x64, 0x0, (x48 + x20));
fiat_secp256k1_mulx_u32(&x67, &x68, x1, UINT16_C(0x7a2));
fiat_secp256k1_mulx_u32(&x69, &x70, x1, UINT32_C(0xe90a1));
fiat_secp256k1_addcarryx_u32(&x71, &x72, 0x0, x70, x67);
fiat_secp256k1_addcarryx_u32(&x73, &x74, x72, x68, x1);
fiat_secp256k1_addcarryx_u32(&x75, &x76, 0x0, x51, x69);
fiat_secp256k1_addcarryx_u32(&x77, &x78, x76, x53, x71);
fiat_secp256k1_addcarryx_u32(&x79, &x80, x78, x55, x73);
fiat_secp256k1_addcarryx_u32(&x81, &x82, x80, x57, x74);
fiat_secp256k1_addcarryx_u32(&x83, &x84, x82, x59, 0x0);
fiat_secp256k1_addcarryx_u32(&x85, &x86, x84, x61, 0x0);
fiat_secp256k1_addcarryx_u32(&x87, &x88, x86, x63, 0x0);
fiat_secp256k1_addcarryx_u32(&x89, &x90, x88, x65, 0x0);
fiat_secp256k1_mulx_u32(&x91, &x92, x75, UINT32_C(0xd2253531));
fiat_secp256k1_mulx_u32(&x93, &x94, x91, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x95, &x96, x91, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x97, &x98, x91, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x99, &x100, x91, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x101, &x102, x91, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x103, &x104, x91, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x105, &x106, x91, UINT32_C(0xfffffffe));
fiat_secp256k1_mulx_u32(&x107, &x108, x91, UINT32_C(0xfffffc2f));
fiat_secp256k1_addcarryx_u32(&x109, &x110, 0x0, x108, x105);
fiat_secp256k1_addcarryx_u32(&x111, &x112, x110, x106, x103);
fiat_secp256k1_addcarryx_u32(&x113, &x114, x112, x104, x101);
fiat_secp256k1_addcarryx_u32(&x115, &x116, x114, x102, x99);
fiat_secp256k1_addcarryx_u32(&x117, &x118, x116, x100, x97);
fiat_secp256k1_addcarryx_u32(&x119, &x120, x118, x98, x95);
fiat_secp256k1_addcarryx_u32(&x121, &x122, x120, x96, x93);
fiat_secp256k1_addcarryx_u32(&x123, &x124, 0x0, x75, x107);
fiat_secp256k1_addcarryx_u32(&x125, &x126, x124, x77, x109);
fiat_secp256k1_addcarryx_u32(&x127, &x128, x126, x79, x111);
fiat_secp256k1_addcarryx_u32(&x129, &x130, x128, x81, x113);
fiat_secp256k1_addcarryx_u32(&x131, &x132, x130, x83, x115);
fiat_secp256k1_addcarryx_u32(&x133, &x134, x132, x85, x117);
fiat_secp256k1_addcarryx_u32(&x135, &x136, x134, x87, x119);
fiat_secp256k1_addcarryx_u32(&x137, &x138, x136, x89, x121);
fiat_secp256k1_addcarryx_u32(&x139, &x140, x138, ((uint32_t)x90 + x66), (x122 + x94));
fiat_secp256k1_mulx_u32(&x141, &x142, x2, UINT16_C(0x7a2));
fiat_secp256k1_mulx_u32(&x143, &x144, x2, UINT32_C(0xe90a1));
fiat_secp256k1_addcarryx_u32(&x145, &x146, 0x0, x144, x141);
fiat_secp256k1_addcarryx_u32(&x147, &x148, x146, x142, x2);
fiat_secp256k1_addcarryx_u32(&x149, &x150, 0x0, x125, x143);
fiat_secp256k1_addcarryx_u32(&x151, &x152, x150, x127, x145);
fiat_secp256k1_addcarryx_u32(&x153, &x154, x152, x129, x147);
fiat_secp256k1_addcarryx_u32(&x155, &x156, x154, x131, x148);
fiat_secp256k1_addcarryx_u32(&x157, &x158, x156, x133, 0x0);
fiat_secp256k1_addcarryx_u32(&x159, &x160, x158, x135, 0x0);
fiat_secp256k1_addcarryx_u32(&x161, &x162, x160, x137, 0x0);
fiat_secp256k1_addcarryx_u32(&x163, &x164, x162, x139, 0x0);
fiat_secp256k1_mulx_u32(&x165, &x166, x149, UINT32_C(0xd2253531));
fiat_secp256k1_mulx_u32(&x167, &x168, x165, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x169, &x170, x165, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x171, &x172, x165, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x173, &x174, x165, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x175, &x176, x165, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x177, &x178, x165, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x179, &x180, x165, UINT32_C(0xfffffffe));
fiat_secp256k1_mulx_u32(&x181, &x182, x165, UINT32_C(0xfffffc2f));
fiat_secp256k1_addcarryx_u32(&x183, &x184, 0x0, x182, x179);
fiat_secp256k1_addcarryx_u32(&x185, &x186, x184, x180, x177);
fiat_secp256k1_addcarryx_u32(&x187, &x188, x186, x178, x175);
fiat_secp256k1_addcarryx_u32(&x189, &x190, x188, x176, x173);
fiat_secp256k1_addcarryx_u32(&x191, &x192, x190, x174, x171);
fiat_secp256k1_addcarryx_u32(&x193, &x194, x192, x172, x169);
fiat_secp256k1_addcarryx_u32(&x195, &x196, x194, x170, x167);
fiat_secp256k1_addcarryx_u32(&x197, &x198, 0x0, x149, x181);
fiat_secp256k1_addcarryx_u32(&x199, &x200, x198, x151, x183);
fiat_secp256k1_addcarryx_u32(&x201, &x202, x200, x153, x185);
fiat_secp256k1_addcarryx_u32(&x203, &x204, x202, x155, x187);
fiat_secp256k1_addcarryx_u32(&x205, &x206, x204, x157, x189);
fiat_secp256k1_addcarryx_u32(&x207, &x208, x206, x159, x191);
fiat_secp256k1_addcarryx_u32(&x209, &x210, x208, x161, x193);
fiat_secp256k1_addcarryx_u32(&x211, &x212, x210, x163, x195);
fiat_secp256k1_addcarryx_u32(&x213, &x214, x212, ((uint32_t)x164 + x140), (x196 + x168));
fiat_secp256k1_mulx_u32(&x215, &x216, x3, UINT16_C(0x7a2));
fiat_secp256k1_mulx_u32(&x217, &x218, x3, UINT32_C(0xe90a1));
fiat_secp256k1_addcarryx_u32(&x219, &x220, 0x0, x218, x215);
fiat_secp256k1_addcarryx_u32(&x221, &x222, x220, x216, x3);
fiat_secp256k1_addcarryx_u32(&x223, &x224, 0x0, x199, x217);
fiat_secp256k1_addcarryx_u32(&x225, &x226, x224, x201, x219);
fiat_secp256k1_addcarryx_u32(&x227, &x228, x226, x203, x221);
fiat_secp256k1_addcarryx_u32(&x229, &x230, x228, x205, x222);
fiat_secp256k1_addcarryx_u32(&x231, &x232, x230, x207, 0x0);
fiat_secp256k1_addcarryx_u32(&x233, &x234, x232, x209, 0x0);
fiat_secp256k1_addcarryx_u32(&x235, &x236, x234, x211, 0x0);
fiat_secp256k1_addcarryx_u32(&x237, &x238, x236, x213, 0x0);
fiat_secp256k1_mulx_u32(&x239, &x240, x223, UINT32_C(0xd2253531));
fiat_secp256k1_mulx_u32(&x241, &x242, x239, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x243, &x244, x239, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x245, &x246, x239, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x247, &x248, x239, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x249, &x250, x239, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x251, &x252, x239, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x253, &x254, x239, UINT32_C(0xfffffffe));
fiat_secp256k1_mulx_u32(&x255, &x256, x239, UINT32_C(0xfffffc2f));
fiat_secp256k1_addcarryx_u32(&x257, &x258, 0x0, x256, x253);
fiat_secp256k1_addcarryx_u32(&x259, &x260, x258, x254, x251);
fiat_secp256k1_addcarryx_u32(&x261, &x262, x260, x252, x249);
fiat_secp256k1_addcarryx_u32(&x263, &x264, x262, x250, x247);
fiat_secp256k1_addcarryx_u32(&x265, &x266, x264, x248, x245);
fiat_secp256k1_addcarryx_u32(&x267, &x268, x266, x246, x243);
fiat_secp256k1_addcarryx_u32(&x269, &x270, x268, x244, x241);
fiat_secp256k1_addcarryx_u32(&x271, &x272, 0x0, x223, x255);
fiat_secp256k1_addcarryx_u32(&x273, &x274, x272, x225, x257);
fiat_secp256k1_addcarryx_u32(&x275, &x276, x274, x227, x259);
fiat_secp256k1_addcarryx_u32(&x277, &x278, x276, x229, x261);
fiat_secp256k1_addcarryx_u32(&x279, &x280, x278, x231, x263);
fiat_secp256k1_addcarryx_u32(&x281, &x282, x280, x233, x265);
fiat_secp256k1_addcarryx_u32(&x283, &x284, x282, x235, x267);
fiat_secp256k1_addcarryx_u32(&x285, &x286, x284, x237, x269);
fiat_secp256k1_addcarryx_u32(&x287, &x288, x286, ((uint32_t)x238 + x214), (x270 + x242));
fiat_secp256k1_mulx_u32(&x289, &x290, x4, UINT16_C(0x7a2));
fiat_secp256k1_mulx_u32(&x291, &x292, x4, UINT32_C(0xe90a1));
fiat_secp256k1_addcarryx_u32(&x293, &x294, 0x0, x292, x289);
fiat_secp256k1_addcarryx_u32(&x295, &x296, x294, x290, x4);
fiat_secp256k1_addcarryx_u32(&x297, &x298, 0x0, x273, x291);
fiat_secp256k1_addcarryx_u32(&x299, &x300, x298, x275, x293);
fiat_secp256k1_addcarryx_u32(&x301, &x302, x300, x277, x295);
fiat_secp256k1_addcarryx_u32(&x303, &x304, x302, x279, x296);
fiat_secp256k1_addcarryx_u32(&x305, &x306, x304, x281, 0x0);
fiat_secp256k1_addcarryx_u32(&x307, &x308, x306, x283, 0x0);
fiat_secp256k1_addcarryx_u32(&x309, &x310, x308, x285, 0x0);
fiat_secp256k1_addcarryx_u32(&x311, &x312, x310, x287, 0x0);
fiat_secp256k1_mulx_u32(&x313, &x314, x297, UINT32_C(0xd2253531));
fiat_secp256k1_mulx_u32(&x315, &x316, x313, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x317, &x318, x313, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x319, &x320, x313, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x321, &x322, x313, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x323, &x324, x313, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x325, &x326, x313, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x327, &x328, x313, UINT32_C(0xfffffffe));
fiat_secp256k1_mulx_u32(&x329, &x330, x313, UINT32_C(0xfffffc2f));
fiat_secp256k1_addcarryx_u32(&x331, &x332, 0x0, x330, x327);
fiat_secp256k1_addcarryx_u32(&x333, &x334, x332, x328, x325);
fiat_secp256k1_addcarryx_u32(&x335, &x336, x334, x326, x323);
fiat_secp256k1_addcarryx_u32(&x337, &x338, x336, x324, x321);
fiat_secp256k1_addcarryx_u32(&x339, &x340, x338, x322, x319);
fiat_secp256k1_addcarryx_u32(&x341, &x342, x340, x320, x317);
fiat_secp256k1_addcarryx_u32(&x343, &x344, x342, x318, x315);
fiat_secp256k1_addcarryx_u32(&x345, &x346, 0x0, x297, x329);
fiat_secp256k1_addcarryx_u32(&x347, &x348, x346, x299, x331);
fiat_secp256k1_addcarryx_u32(&x349, &x350, x348, x301, x333);
fiat_secp256k1_addcarryx_u32(&x351, &x352, x350, x303, x335);
fiat_secp256k1_addcarryx_u32(&x353, &x354, x352, x305, x337);
fiat_secp256k1_addcarryx_u32(&x355, &x356, x354, x307, x339);
fiat_secp256k1_addcarryx_u32(&x357, &x358, x356, x309, x341);
fiat_secp256k1_addcarryx_u32(&x359, &x360, x358, x311, x343);
fiat_secp256k1_addcarryx_u32(&x361, &x362, x360, ((uint32_t)x312 + x288), (x344 + x316));
fiat_secp256k1_mulx_u32(&x363, &x364, x5, UINT16_C(0x7a2));
fiat_secp256k1_mulx_u32(&x365, &x366, x5, UINT32_C(0xe90a1));
fiat_secp256k1_addcarryx_u32(&x367, &x368, 0x0, x366, x363);
fiat_secp256k1_addcarryx_u32(&x369, &x370, x368, x364, x5);
fiat_secp256k1_addcarryx_u32(&x371, &x372, 0x0, x347, x365);
fiat_secp256k1_addcarryx_u32(&x373, &x374, x372, x349, x367);
fiat_secp256k1_addcarryx_u32(&x375, &x376, x374, x351, x369);
fiat_secp256k1_addcarryx_u32(&x377, &x378, x376, x353, x370);
fiat_secp256k1_addcarryx_u32(&x379, &x380, x378, x355, 0x0);
fiat_secp256k1_addcarryx_u32(&x381, &x382, x380, x357, 0x0);
fiat_secp256k1_addcarryx_u32(&x383, &x384, x382, x359, 0x0);
fiat_secp256k1_addcarryx_u32(&x385, &x386, x384, x361, 0x0);
fiat_secp256k1_mulx_u32(&x387, &x388, x371, UINT32_C(0xd2253531));
fiat_secp256k1_mulx_u32(&x389, &x390, x387, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x391, &x392, x387, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x393, &x394, x387, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x395, &x396, x387, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x397, &x398, x387, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x399, &x400, x387, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x401, &x402, x387, UINT32_C(0xfffffffe));
fiat_secp256k1_mulx_u32(&x403, &x404, x387, UINT32_C(0xfffffc2f));
fiat_secp256k1_addcarryx_u32(&x405, &x406, 0x0, x404, x401);
fiat_secp256k1_addcarryx_u32(&x407, &x408, x406, x402, x399);
fiat_secp256k1_addcarryx_u32(&x409, &x410, x408, x400, x397);
fiat_secp256k1_addcarryx_u32(&x411, &x412, x410, x398, x395);
fiat_secp256k1_addcarryx_u32(&x413, &x414, x412, x396, x393);
fiat_secp256k1_addcarryx_u32(&x415, &x416, x414, x394, x391);
fiat_secp256k1_addcarryx_u32(&x417, &x418, x416, x392, x389);
fiat_secp256k1_addcarryx_u32(&x419, &x420, 0x0, x371, x403);
fiat_secp256k1_addcarryx_u32(&x421, &x422, x420, x373, x405);
fiat_secp256k1_addcarryx_u32(&x423, &x424, x422, x375, x407);
fiat_secp256k1_addcarryx_u32(&x425, &x426, x424, x377, x409);
fiat_secp256k1_addcarryx_u32(&x427, &x428, x426, x379, x411);
fiat_secp256k1_addcarryx_u32(&x429, &x430, x428, x381, x413);
fiat_secp256k1_addcarryx_u32(&x431, &x432, x430, x383, x415);
fiat_secp256k1_addcarryx_u32(&x433, &x434, x432, x385, x417);
fiat_secp256k1_addcarryx_u32(&x435, &x436, x434, ((uint32_t)x386 + x362), (x418 + x390));
fiat_secp256k1_mulx_u32(&x437, &x438, x6, UINT16_C(0x7a2));
fiat_secp256k1_mulx_u32(&x439, &x440, x6, UINT32_C(0xe90a1));
fiat_secp256k1_addcarryx_u32(&x441, &x442, 0x0, x440, x437);
fiat_secp256k1_addcarryx_u32(&x443, &x444, x442, x438, x6);
fiat_secp256k1_addcarryx_u32(&x445, &x446, 0x0, x421, x439);
fiat_secp256k1_addcarryx_u32(&x447, &x448, x446, x423, x441);
fiat_secp256k1_addcarryx_u32(&x449, &x450, x448, x425, x443);
fiat_secp256k1_addcarryx_u32(&x451, &x452, x450, x427, x444);
fiat_secp256k1_addcarryx_u32(&x453, &x454, x452, x429, 0x0);
fiat_secp256k1_addcarryx_u32(&x455, &x456, x454, x431, 0x0);
fiat_secp256k1_addcarryx_u32(&x457, &x458, x456, x433, 0x0);
fiat_secp256k1_addcarryx_u32(&x459, &x460, x458, x435, 0x0);
fiat_secp256k1_mulx_u32(&x461, &x462, x445, UINT32_C(0xd2253531));
fiat_secp256k1_mulx_u32(&x463, &x464, x461, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x465, &x466, x461, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x467, &x468, x461, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x469, &x470, x461, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x471, &x472, x461, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x473, &x474, x461, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x475, &x476, x461, UINT32_C(0xfffffffe));
fiat_secp256k1_mulx_u32(&x477, &x478, x461, UINT32_C(0xfffffc2f));
fiat_secp256k1_addcarryx_u32(&x479, &x480, 0x0, x478, x475);
fiat_secp256k1_addcarryx_u32(&x481, &x482, x480, x476, x473);
fiat_secp256k1_addcarryx_u32(&x483, &x484, x482, x474, x471);
fiat_secp256k1_addcarryx_u32(&x485, &x486, x484, x472, x469);
fiat_secp256k1_addcarryx_u32(&x487, &x488, x486, x470, x467);
fiat_secp256k1_addcarryx_u32(&x489, &x490, x488, x468, x465);
fiat_secp256k1_addcarryx_u32(&x491, &x492, x490, x466, x463);
fiat_secp256k1_addcarryx_u32(&x493, &x494, 0x0, x445, x477);
fiat_secp256k1_addcarryx_u32(&x495, &x496, x494, x447, x479);
fiat_secp256k1_addcarryx_u32(&x497, &x498, x496, x449, x481);
fiat_secp256k1_addcarryx_u32(&x499, &x500, x498, x451, x483);
fiat_secp256k1_addcarryx_u32(&x501, &x502, x500, x453, x485);
fiat_secp256k1_addcarryx_u32(&x503, &x504, x502, x455, x487);
fiat_secp256k1_addcarryx_u32(&x505, &x506, x504, x457, x489);
fiat_secp256k1_addcarryx_u32(&x507, &x508, x506, x459, x491);
fiat_secp256k1_addcarryx_u32(&x509, &x510, x508, ((uint32_t)x460 + x436), (x492 + x464));
fiat_secp256k1_mulx_u32(&x511, &x512, x7, UINT16_C(0x7a2));
fiat_secp256k1_mulx_u32(&x513, &x514, x7, UINT32_C(0xe90a1));
fiat_secp256k1_addcarryx_u32(&x515, &x516, 0x0, x514, x511);
fiat_secp256k1_addcarryx_u32(&x517, &x518, x516, x512, x7);
fiat_secp256k1_addcarryx_u32(&x519, &x520, 0x0, x495, x513);
fiat_secp256k1_addcarryx_u32(&x521, &x522, x520, x497, x515);
fiat_secp256k1_addcarryx_u32(&x523, &x524, x522, x499, x517);
fiat_secp256k1_addcarryx_u32(&x525, &x526, x524, x501, x518);
fiat_secp256k1_addcarryx_u32(&x527, &x528, x526, x503, 0x0);
fiat_secp256k1_addcarryx_u32(&x529, &x530, x528, x505, 0x0);
fiat_secp256k1_addcarryx_u32(&x531, &x532, x530, x507, 0x0);
fiat_secp256k1_addcarryx_u32(&x533, &x534, x532, x509, 0x0);
fiat_secp256k1_mulx_u32(&x535, &x536, x519, UINT32_C(0xd2253531));
fiat_secp256k1_mulx_u32(&x537, &x538, x535, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x539, &x540, x535, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x541, &x542, x535, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x543, &x544, x535, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x545, &x546, x535, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x547, &x548, x535, UINT32_C(0xffffffff));
fiat_secp256k1_mulx_u32(&x549, &x550, x535, UINT32_C(0xfffffffe));
fiat_secp256k1_mulx_u32(&x551, &x552, x535, UINT32_C(0xfffffc2f));
fiat_secp256k1_addcarryx_u32(&x553, &x554, 0x0, x552, x549);
fiat_secp256k1_addcarryx_u32(&x555, &x556, x554, x550, x547);
fiat_secp256k1_addcarryx_u32(&x557, &x558, x556, x548, x545);
fiat_secp256k1_addcarryx_u32(&x559, &x560, x558, x546, x543);
fiat_secp256k1_addcarryx_u32(&x561, &x562, x560, x544, x541);
fiat_secp256k1_addcarryx_u32(&x563, &x564, x562, x542, x539);
fiat_secp256k1_addcarryx_u32(&x565, &x566, x564, x540, x537);
fiat_secp256k1_addcarryx_u32(&x567, &x568, 0x0, x519, x551);
fiat_secp256k1_addcarryx_u32(&x569, &x570, x568, x521, x553);
fiat_secp256k1_addcarryx_u32(&x571, &x572, x570, x523, x555);
fiat_secp256k1_addcarryx_u32(&x573, &x574, x572, x525, x557);
fiat_secp256k1_addcarryx_u32(&x575, &x576, x574, x527, x559);
fiat_secp256k1_addcarryx_u32(&x577, &x578, x576, x529, x561);
fiat_secp256k1_addcarryx_u32(&x579, &x580, x578, x531, x563);
fiat_secp256k1_addcarryx_u32(&x581, &x582, x580, x533, x565);
fiat_secp256k1_addcarryx_u32(&x583, &x584, x582, ((uint32_t)x534 + x510), (x566 + x538));
fiat_secp256k1_subborrowx_u32(&x585, &x586, 0x0, x569, UINT32_C(0xfffffc2f));
fiat_secp256k1_subborrowx_u32(&x587, &x588, x586, x571, UINT32_C(0xfffffffe));
fiat_secp256k1_subborrowx_u32(&x589, &x590, x588, x573, UINT32_C(0xffffffff));
fiat_secp256k1_subborrowx_u32(&x591, &x592, x590, x575, UINT32_C(0xffffffff));
fiat_secp256k1_subborrowx_u32(&x593, &x594, x592, x577, UINT32_C(0xffffffff));
fiat_secp256k1_subborrowx_u32(&x595, &x596, x594, x579, UINT32_C(0xffffffff));
fiat_secp256k1_subborrowx_u32(&x597, &x598, x596, x581, UINT32_C(0xffffffff));
fiat_secp256k1_subborrowx_u32(&x599, &x600, x598, x583, UINT32_C(0xffffffff));
fiat_secp256k1_subborrowx_u32(&x601, &x602, x600, x584, 0x0);
fiat_secp256k1_cmovznz_u32(&x603, x602, x585, x569);
fiat_secp256k1_cmovznz_u32(&x604, x602, x587, x571);
fiat_secp256k1_cmovznz_u32(&x605, x602, x589, x573);
fiat_secp256k1_cmovznz_u32(&x606, x602, x591, x575);
fiat_secp256k1_cmovznz_u32(&x607, x602, x593, x577);
fiat_secp256k1_cmovznz_u32(&x608, x602, x595, x579);
fiat_secp256k1_cmovznz_u32(&x609, x602, x597, x581);
fiat_secp256k1_cmovznz_u32(&x610, x602, x599, x583);
out1[0] = x603;
out1[1] = x604;
out1[2] = x605;
out1[3] = x606;
out1[4] = x607;
out1[5] = x608;
out1[6] = x609;
out1[7] = x610;
}
/*
* The function fiat_secp256k1_nonzero outputs a single non-zero word if the input is non-zero and zero otherwise.
* Preconditions:
* 0 ≤ eval arg1 < m
* Postconditions:
* out1 = 0 ↔ eval (from_montgomery arg1) mod m = 0
*
* Input Bounds:
* arg1: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]]
* Output Bounds:
* out1: [0x0 ~> 0xffffffff]
*/
static void fiat_secp256k1_nonzero(uint32_t* out1, const uint32_t arg1[8]) {
uint32_t x1;
x1 = ((arg1[0]) | ((arg1[1]) | ((arg1[2]) | ((arg1[3]) | ((arg1[4]) | ((arg1[5]) | ((arg1[6]) | (arg1[7]))))))));
*out1 = x1;
}
/*
* The function fiat_secp256k1_selectznz is a multi-limb conditional select.
* Postconditions:
* eval out1 = (if arg1 = 0 then eval arg2 else eval arg3)
*
* Input Bounds:
* arg1: [0x0 ~> 0x1]
* arg2: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]]
* arg3: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]]
* Output Bounds:
* out1: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]]
*/
static void fiat_secp256k1_selectznz(uint32_t out1[8], fiat_secp256k1_uint1 arg1, const uint32_t arg2[8], const uint32_t arg3[8]) {
uint32_t x1;
uint32_t x2;
uint32_t x3;
uint32_t x4;
uint32_t x5;
uint32_t x6;
uint32_t x7;
uint32_t x8;
fiat_secp256k1_cmovznz_u32(&x1, arg1, (arg2[0]), (arg3[0]));
fiat_secp256k1_cmovznz_u32(&x2, arg1, (arg2[1]), (arg3[1]));
fiat_secp256k1_cmovznz_u32(&x3, arg1, (arg2[2]), (arg3[2]));
fiat_secp256k1_cmovznz_u32(&x4, arg1, (arg2[3]), (arg3[3]));
fiat_secp256k1_cmovznz_u32(&x5, arg1, (arg2[4]), (arg3[4]));
fiat_secp256k1_cmovznz_u32(&x6, arg1, (arg2[5]), (arg3[5]));
fiat_secp256k1_cmovznz_u32(&x7, arg1, (arg2[6]), (arg3[6]));
fiat_secp256k1_cmovznz_u32(&x8, arg1, (arg2[7]), (arg3[7]));
out1[0] = x1;
out1[1] = x2;
out1[2] = x3;
out1[3] = x4;
out1[4] = x5;
out1[5] = x6;
out1[6] = x7;
out1[7] = x8;
}
/*
* The function fiat_secp256k1_to_bytes serializes a field element NOT in the Montgomery domain to bytes in little-endian order.
* Preconditions:
* 0 ≤ eval arg1 < m
* Postconditions:
* out1 = map (λ x, ⌊((eval arg1 mod m) mod 2^(8 * (x + 1))) / 2^(8 * x)⌋) [0..31]
*
* Input Bounds:
* arg1: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]]
* Output Bounds:
* out1: [[0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff]]
*/
static void fiat_secp256k1_to_bytes(uint8_t out1[32], const uint32_t arg1[8]) {
uint32_t x1;
uint32_t x2;
uint32_t x3;
uint32_t x4;
uint32_t x5;
uint32_t x6;
uint32_t x7;
uint32_t x8;
uint8_t x9;
uint32_t x10;
uint8_t x11;
uint32_t x12;
uint8_t x13;
uint8_t x14;
uint8_t x15;
uint32_t x16;
uint8_t x17;
uint32_t x18;
uint8_t x19;
uint8_t x20;
uint8_t x21;
uint32_t x22;
uint8_t x23;
uint32_t x24;
uint8_t x25;
uint8_t x26;
uint8_t x27;
uint32_t x28;
uint8_t x29;
uint32_t x30;
uint8_t x31;
uint8_t x32;
uint8_t x33;
uint32_t x34;
uint8_t x35;
uint32_t x36;
uint8_t x37;
uint8_t x38;
uint8_t x39;
uint32_t x40;
uint8_t x41;
uint32_t x42;
uint8_t x43;
uint8_t x44;
uint8_t x45;
uint32_t x46;
uint8_t x47;
uint32_t x48;
uint8_t x49;
uint8_t x50;
uint8_t x51;
uint32_t x52;
uint8_t x53;
uint32_t x54;
uint8_t x55;
uint8_t x56;
x1 = (arg1[7]);
x2 = (arg1[6]);
x3 = (arg1[5]);
x4 = (arg1[4]);
x5 = (arg1[3]);
x6 = (arg1[2]);
x7 = (arg1[1]);
x8 = (arg1[0]);
x9 = (uint8_t)(x8 & UINT8_C(0xff));
x10 = (x8 >> 8);
x11 = (uint8_t)(x10 & UINT8_C(0xff));
x12 = (x10 >> 8);
x13 = (uint8_t)(x12 & UINT8_C(0xff));
x14 = (uint8_t)(x12 >> 8);
x15 = (uint8_t)(x7 & UINT8_C(0xff));
x16 = (x7 >> 8);
x17 = (uint8_t)(x16 & UINT8_C(0xff));
x18 = (x16 >> 8);
x19 = (uint8_t)(x18 & UINT8_C(0xff));
x20 = (uint8_t)(x18 >> 8);
x21 = (uint8_t)(x6 & UINT8_C(0xff));
x22 = (x6 >> 8);
x23 = (uint8_t)(x22 & UINT8_C(0xff));
x24 = (x22 >> 8);
x25 = (uint8_t)(x24 & UINT8_C(0xff));
x26 = (uint8_t)(x24 >> 8);
x27 = (uint8_t)(x5 & UINT8_C(0xff));
x28 = (x5 >> 8);
x29 = (uint8_t)(x28 & UINT8_C(0xff));
x30 = (x28 >> 8);
x31 = (uint8_t)(x30 & UINT8_C(0xff));
x32 = (uint8_t)(x30 >> 8);
x33 = (uint8_t)(x4 & UINT8_C(0xff));
x34 = (x4 >> 8);
x35 = (uint8_t)(x34 & UINT8_C(0xff));
x36 = (x34 >> 8);
x37 = (uint8_t)(x36 & UINT8_C(0xff));
x38 = (uint8_t)(x36 >> 8);
x39 = (uint8_t)(x3 & UINT8_C(0xff));
x40 = (x3 >> 8);
x41 = (uint8_t)(x40 & UINT8_C(0xff));
x42 = (x40 >> 8);
x43 = (uint8_t)(x42 & UINT8_C(0xff));
x44 = (uint8_t)(x42 >> 8);
x45 = (uint8_t)(x2 & UINT8_C(0xff));
x46 = (x2 >> 8);
x47 = (uint8_t)(x46 & UINT8_C(0xff));
x48 = (x46 >> 8);
x49 = (uint8_t)(x48 & UINT8_C(0xff));
x50 = (uint8_t)(x48 >> 8);
x51 = (uint8_t)(x1 & UINT8_C(0xff));
x52 = (x1 >> 8);
x53 = (uint8_t)(x52 & UINT8_C(0xff));
x54 = (x52 >> 8);
x55 = (uint8_t)(x54 & UINT8_C(0xff));
x56 = (uint8_t)(x54 >> 8);
out1[0] = x9;
out1[1] = x11;
out1[2] = x13;
out1[3] = x14;
out1[4] = x15;
out1[5] = x17;
out1[6] = x19;
out1[7] = x20;
out1[8] = x21;
out1[9] = x23;
out1[10] = x25;
out1[11] = x26;
out1[12] = x27;
out1[13] = x29;
out1[14] = x31;
out1[15] = x32;
out1[16] = x33;
out1[17] = x35;
out1[18] = x37;
out1[19] = x38;
out1[20] = x39;
out1[21] = x41;
out1[22] = x43;
out1[23] = x44;
out1[24] = x45;
out1[25] = x47;
out1[26] = x49;
out1[27] = x50;
out1[28] = x51;
out1[29] = x53;
out1[30] = x55;
out1[31] = x56;
}
/*
* The function fiat_secp256k1_from_bytes deserializes a field element NOT in the Montgomery domain from bytes in little-endian order.
* Preconditions:
* 0 ≤ bytes_eval arg1 < m
* Postconditions:
* eval out1 mod m = bytes_eval arg1 mod m
* 0 ≤ eval out1 < m
*
* Input Bounds:
* arg1: [[0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff]]
* Output Bounds:
* out1: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]]
*/
static void fiat_secp256k1_from_bytes(uint32_t out1[8], const uint8_t arg1[32]) {
uint32_t x1;
uint32_t x2;
uint32_t x3;
uint8_t x4;
uint32_t x5;
uint32_t x6;
uint32_t x7;
uint8_t x8;
uint32_t x9;
uint32_t x10;
uint32_t x11;
uint8_t x12;
uint32_t x13;
uint32_t x14;
uint32_t x15;
uint8_t x16;
uint32_t x17;
uint32_t x18;
uint32_t x19;
uint8_t x20;
uint32_t x21;
uint32_t x22;
uint32_t x23;
uint8_t x24;
uint32_t x25;
uint32_t x26;
uint32_t x27;
uint8_t x28;
uint32_t x29;
uint32_t x30;
uint32_t x31;
uint8_t x32;
uint32_t x33;
uint32_t x34;
uint32_t x35;
uint32_t x36;
uint32_t x37;
uint32_t x38;
uint32_t x39;
uint32_t x40;
uint32_t x41;
uint32_t x42;
uint32_t x43;
uint32_t x44;
uint32_t x45;
uint32_t x46;
uint32_t x47;
uint32_t x48;
uint32_t x49;
uint32_t x50;
uint32_t x51;
uint32_t x52;
uint32_t x53;
uint32_t x54;
uint32_t x55;
uint32_t x56;
x1 = ((uint32_t)(arg1[31]) << 24);
x2 = ((uint32_t)(arg1[30]) << 16);
x3 = ((uint32_t)(arg1[29]) << 8);
x4 = (arg1[28]);
x5 = ((uint32_t)(arg1[27]) << 24);
x6 = ((uint32_t)(arg1[26]) << 16);
x7 = ((uint32_t)(arg1[25]) << 8);
x8 = (arg1[24]);
x9 = ((uint32_t)(arg1[23]) << 24);
x10 = ((uint32_t)(arg1[22]) << 16);
x11 = ((uint32_t)(arg1[21]) << 8);
x12 = (arg1[20]);
x13 = ((uint32_t)(arg1[19]) << 24);
x14 = ((uint32_t)(arg1[18]) << 16);
x15 = ((uint32_t)(arg1[17]) << 8);
x16 = (arg1[16]);
x17 = ((uint32_t)(arg1[15]) << 24);
x18 = ((uint32_t)(arg1[14]) << 16);
x19 = ((uint32_t)(arg1[13]) << 8);
x20 = (arg1[12]);
x21 = ((uint32_t)(arg1[11]) << 24);
x22 = ((uint32_t)(arg1[10]) << 16);
x23 = ((uint32_t)(arg1[9]) << 8);
x24 = (arg1[8]);
x25 = ((uint32_t)(arg1[7]) << 24);
x26 = ((uint32_t)(arg1[6]) << 16);
x27 = ((uint32_t)(arg1[5]) << 8);
x28 = (arg1[4]);
x29 = ((uint32_t)(arg1[3]) << 24);
x30 = ((uint32_t)(arg1[2]) << 16);
x31 = ((uint32_t)(arg1[1]) << 8);
x32 = (arg1[0]);
x33 = (x31 + (uint32_t)x32);
x34 = (x30 + x33);
x35 = (x29 + x34);
x36 = (x27 + (uint32_t)x28);
x37 = (x26 + x36);
x38 = (x25 + x37);
x39 = (x23 + (uint32_t)x24);
x40 = (x22 + x39);
x41 = (x21 + x40);
x42 = (x19 + (uint32_t)x20);
x43 = (x18 + x42);
x44 = (x17 + x43);
x45 = (x15 + (uint32_t)x16);
x46 = (x14 + x45);
x47 = (x13 + x46);
x48 = (x11 + (uint32_t)x12);
x49 = (x10 + x48);
x50 = (x9 + x49);
x51 = (x7 + (uint32_t)x8);
x52 = (x6 + x51);
x53 = (x5 + x52);
x54 = (x3 + (uint32_t)x4);
x55 = (x2 + x54);
x56 = (x1 + x55);
out1[0] = x35;
out1[1] = x38;
out1[2] = x41;
out1[3] = x44;
out1[4] = x47;
out1[5] = x50;
out1[6] = x53;
out1[7] = x56;
}
/*
* The function fiat_secp256k1_set_one returns the field element one in the Montgomery domain.
* Postconditions:
* eval (from_montgomery out1) mod m = 1 mod m
* 0 ≤ eval out1 < m
*
* Input Bounds:
* Output Bounds:
* out1: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]]
*/
static void fiat_secp256k1_set_one(uint32_t out1[8]) {
out1[0] = UINT16_C(0x3d1);
out1[1] = 0x1;
out1[2] = 0x0;
out1[3] = 0x0;
out1[4] = 0x0;
out1[5] = 0x0;
out1[6] = 0x0;
out1[7] = 0x0;
}
/*
* The function fiat_secp256k1_msat returns the saturated representation of the prime modulus.
* Postconditions:
* twos_complement_eval out1 = m
* 0 ≤ eval out1 < m
*
* Input Bounds:
* Output Bounds:
* out1: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]]
*/
static void fiat_secp256k1_msat(uint32_t out1[9]) {
out1[0] = UINT32_C(0xfffffc2f);
out1[1] = UINT32_C(0xfffffffe);
out1[2] = UINT32_C(0xffffffff);
out1[3] = UINT32_C(0xffffffff);
out1[4] = UINT32_C(0xffffffff);
out1[5] = UINT32_C(0xffffffff);
out1[6] = UINT32_C(0xffffffff);
out1[7] = UINT32_C(0xffffffff);
out1[8] = 0x0;
}
/*
* The function fiat_secp256k1_divstep computes a divstep.
* Preconditions:
* 0 ≤ eval arg4 < m
* 0 ≤ eval arg5 < m
* Postconditions:
* out1 = (if 0 < arg1 ∧ (twos_complement_eval arg3) is odd then 1 - arg1 else 1 + arg1)
* twos_complement_eval out2 = (if 0 < arg1 ∧ (twos_complement_eval arg3) is odd then twos_complement_eval arg3 else twos_complement_eval arg2)
* twos_complement_eval out3 = (if 0 < arg1 ∧ (twos_complement_eval arg3) is odd then ⌊(twos_complement_eval arg3 - twos_complement_eval arg2) / 2⌋ else ⌊(twos_complement_eval arg3 + (twos_complement_eval arg3 mod 2) * twos_complement_eval arg2) / 2⌋)
* eval (from_montgomery out4) mod m = (if 0 < arg1 ∧ (twos_complement_eval arg3) is odd then (2 * eval (from_montgomery arg5)) mod m else (2 * eval (from_montgomery arg4)) mod m)
* eval (from_montgomery out5) mod m = (if 0 < arg1 ∧ (twos_complement_eval arg3) is odd then (eval (from_montgomery arg4) - eval (from_montgomery arg4)) mod m else (eval (from_montgomery arg5) + (twos_complement_eval arg3 mod 2) * eval (from_montgomery arg4)) mod m)
* 0 ≤ eval out5 < m
* 0 ≤ eval out5 < m
* 0 ≤ eval out2 < m
* 0 ≤ eval out3 < m
*
* Input Bounds:
* arg1: [0x0 ~> 0xffffffff]
* arg2: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]]
* arg3: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]]
* arg4: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]]
* arg5: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]]
* Output Bounds:
* out1: [0x0 ~> 0xffffffff]
* out2: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]]
* out3: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]]
* out4: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]]
* out5: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]]
*/
static void fiat_secp256k1_divstep(uint32_t* out1, uint32_t out2[9], uint32_t out3[9], uint32_t out4[8], uint32_t out5[8], uint32_t arg1, const uint32_t arg2[9], const uint32_t arg3[9], const uint32_t arg4[8], const uint32_t arg5[8]) {
uint32_t x1;
fiat_secp256k1_uint1 x2;
fiat_secp256k1_uint1 x3;
uint32_t x4;
fiat_secp256k1_uint1 x5;
uint32_t x6;
uint32_t x7;
uint32_t x8;
uint32_t x9;
uint32_t x10;
uint32_t x11;
uint32_t x12;
uint32_t x13;
uint32_t x14;
uint32_t x15;
uint32_t x16;
fiat_secp256k1_uint1 x17;
uint32_t x18;
fiat_secp256k1_uint1 x19;
uint32_t x20;
fiat_secp256k1_uint1 x21;
uint32_t x22;
fiat_secp256k1_uint1 x23;
uint32_t x24;
fiat_secp256k1_uint1 x25;
uint32_t x26;
fiat_secp256k1_uint1 x27;
uint32_t x28;
fiat_secp256k1_uint1 x29;
uint32_t x30;
fiat_secp256k1_uint1 x31;
uint32_t x32;
fiat_secp256k1_uint1 x33;
uint32_t x34;
uint32_t x35;
uint32_t x36;
uint32_t x37;
uint32_t x38;
uint32_t x39;
uint32_t x40;
uint32_t x41;
uint32_t x42;
uint32_t x43;
uint32_t x44;
uint32_t x45;
uint32_t x46;
uint32_t x47;
uint32_t x48;
uint32_t x49;
uint32_t x50;
uint32_t x51;
fiat_secp256k1_uint1 x52;
uint32_t x53;
fiat_secp256k1_uint1 x54;
uint32_t x55;
fiat_secp256k1_uint1 x56;
uint32_t x57;
fiat_secp256k1_uint1 x58;
uint32_t x59;
fiat_secp256k1_uint1 x60;
uint32_t x61;
fiat_secp256k1_uint1 x62;
uint32_t x63;
fiat_secp256k1_uint1 x64;
uint32_t x65;
fiat_secp256k1_uint1 x66;
uint32_t x67;
fiat_secp256k1_uint1 x68;
uint32_t x69;
fiat_secp256k1_uint1 x70;
uint32_t x71;
fiat_secp256k1_uint1 x72;
uint32_t x73;
fiat_secp256k1_uint1 x74;
uint32_t x75;
fiat_secp256k1_uint1 x76;
uint32_t x77;
fiat_secp256k1_uint1 x78;
uint32_t x79;
fiat_secp256k1_uint1 x80;
uint32_t x81;
fiat_secp256k1_uint1 x82;
uint32_t x83;
fiat_secp256k1_uint1 x84;
uint32_t x85;
uint32_t x86;
uint32_t x87;
uint32_t x88;
uint32_t x89;
uint32_t x90;
uint32_t x91;
uint32_t x92;
uint32_t x93;
fiat_secp256k1_uint1 x94;
uint32_t x95;
fiat_secp256k1_uint1 x96;
uint32_t x97;
fiat_secp256k1_uint1 x98;
uint32_t x99;
fiat_secp256k1_uint1 x100;
uint32_t x101;
fiat_secp256k1_uint1 x102;
uint32_t x103;
fiat_secp256k1_uint1 x104;
uint32_t x105;
fiat_secp256k1_uint1 x106;
uint32_t x107;
fiat_secp256k1_uint1 x108;
uint32_t x109;
uint32_t x110;
fiat_secp256k1_uint1 x111;
uint32_t x112;
fiat_secp256k1_uint1 x113;
uint32_t x114;
fiat_secp256k1_uint1 x115;
uint32_t x116;
fiat_secp256k1_uint1 x117;
uint32_t x118;
fiat_secp256k1_uint1 x119;
uint32_t x120;
fiat_secp256k1_uint1 x121;
uint32_t x122;
fiat_secp256k1_uint1 x123;
uint32_t x124;
fiat_secp256k1_uint1 x125;
uint32_t x126;
uint32_t x127;
uint32_t x128;
uint32_t x129;
uint32_t x130;
uint32_t x131;
uint32_t x132;
uint32_t x133;
fiat_secp256k1_uint1 x134;
uint32_t x135;
uint32_t x136;
uint32_t x137;
uint32_t x138;
uint32_t x139;
uint32_t x140;
uint32_t x141;
uint32_t x142;
uint32_t x143;
uint32_t x144;
fiat_secp256k1_uint1 x145;
uint32_t x146;
fiat_secp256k1_uint1 x147;
uint32_t x148;
fiat_secp256k1_uint1 x149;
uint32_t x150;
fiat_secp256k1_uint1 x151;
uint32_t x152;
fiat_secp256k1_uint1 x153;
uint32_t x154;
fiat_secp256k1_uint1 x155;
uint32_t x156;
fiat_secp256k1_uint1 x157;
uint32_t x158;
fiat_secp256k1_uint1 x159;
uint32_t x160;
fiat_secp256k1_uint1 x161;
uint32_t x162;
uint32_t x163;
uint32_t x164;
uint32_t x165;
uint32_t x166;
uint32_t x167;
uint32_t x168;
uint32_t x169;
uint32_t x170;
fiat_secp256k1_uint1 x171;
uint32_t x172;
fiat_secp256k1_uint1 x173;
uint32_t x174;
fiat_secp256k1_uint1 x175;
uint32_t x176;
fiat_secp256k1_uint1 x177;
uint32_t x178;
fiat_secp256k1_uint1 x179;
uint32_t x180;
fiat_secp256k1_uint1 x181;
uint32_t x182;
fiat_secp256k1_uint1 x183;
uint32_t x184;
fiat_secp256k1_uint1 x185;
uint32_t x186;
fiat_secp256k1_uint1 x187;
uint32_t x188;
fiat_secp256k1_uint1 x189;
uint32_t x190;
fiat_secp256k1_uint1 x191;
uint32_t x192;
fiat_secp256k1_uint1 x193;
uint32_t x194;
fiat_secp256k1_uint1 x195;
uint32_t x196;
fiat_secp256k1_uint1 x197;
uint32_t x198;
fiat_secp256k1_uint1 x199;
uint32_t x200;
fiat_secp256k1_uint1 x201;
uint32_t x202;
fiat_secp256k1_uint1 x203;
uint32_t x204;
fiat_secp256k1_uint1 x205;
uint32_t x206;
uint32_t x207;
uint32_t x208;
uint32_t x209;
uint32_t x210;
uint32_t x211;
uint32_t x212;
uint32_t x213;
uint32_t x214;
uint32_t x215;
uint32_t x216;
uint32_t x217;
uint32_t x218;
uint32_t x219;
uint32_t x220;
uint32_t x221;
uint32_t x222;
uint32_t x223;
uint32_t x224;
uint32_t x225;
uint32_t x226;
uint32_t x227;
uint32_t x228;
uint32_t x229;
uint32_t x230;
fiat_secp256k1_addcarryx_u32(&x1, &x2, 0x0, (~arg1), 0x1);
x3 = (fiat_secp256k1_uint1)((fiat_secp256k1_uint1)(x1 >> 31) & (fiat_secp256k1_uint1)((arg3[0]) & 0x1));
fiat_secp256k1_addcarryx_u32(&x4, &x5, 0x0, (~arg1), 0x1);
fiat_secp256k1_cmovznz_u32(&x6, x3, arg1, x4);
fiat_secp256k1_cmovznz_u32(&x7, x3, (arg2[0]), (arg3[0]));
fiat_secp256k1_cmovznz_u32(&x8, x3, (arg2[1]), (arg3[1]));
fiat_secp256k1_cmovznz_u32(&x9, x3, (arg2[2]), (arg3[2]));
fiat_secp256k1_cmovznz_u32(&x10, x3, (arg2[3]), (arg3[3]));
fiat_secp256k1_cmovznz_u32(&x11, x3, (arg2[4]), (arg3[4]));
fiat_secp256k1_cmovznz_u32(&x12, x3, (arg2[5]), (arg3[5]));
fiat_secp256k1_cmovznz_u32(&x13, x3, (arg2[6]), (arg3[6]));
fiat_secp256k1_cmovznz_u32(&x14, x3, (arg2[7]), (arg3[7]));
fiat_secp256k1_cmovznz_u32(&x15, x3, (arg2[8]), (arg3[8]));
fiat_secp256k1_addcarryx_u32(&x16, &x17, 0x0, 0x1, (~(arg2[0])));
fiat_secp256k1_addcarryx_u32(&x18, &x19, x17, 0x0, (~(arg2[1])));
fiat_secp256k1_addcarryx_u32(&x20, &x21, x19, 0x0, (~(arg2[2])));
fiat_secp256k1_addcarryx_u32(&x22, &x23, x21, 0x0, (~(arg2[3])));
fiat_secp256k1_addcarryx_u32(&x24, &x25, x23, 0x0, (~(arg2[4])));
fiat_secp256k1_addcarryx_u32(&x26, &x27, x25, 0x0, (~(arg2[5])));
fiat_secp256k1_addcarryx_u32(&x28, &x29, x27, 0x0, (~(arg2[6])));
fiat_secp256k1_addcarryx_u32(&x30, &x31, x29, 0x0, (~(arg2[7])));
fiat_secp256k1_addcarryx_u32(&x32, &x33, x31, 0x0, (~(arg2[8])));
fiat_secp256k1_cmovznz_u32(&x34, x3, (arg3[0]), x16);
fiat_secp256k1_cmovznz_u32(&x35, x3, (arg3[1]), x18);
fiat_secp256k1_cmovznz_u32(&x36, x3, (arg3[2]), x20);
fiat_secp256k1_cmovznz_u32(&x37, x3, (arg3[3]), x22);
fiat_secp256k1_cmovznz_u32(&x38, x3, (arg3[4]), x24);
fiat_secp256k1_cmovznz_u32(&x39, x3, (arg3[5]), x26);
fiat_secp256k1_cmovznz_u32(&x40, x3, (arg3[6]), x28);
fiat_secp256k1_cmovznz_u32(&x41, x3, (arg3[7]), x30);
fiat_secp256k1_cmovznz_u32(&x42, x3, (arg3[8]), x32);
fiat_secp256k1_cmovznz_u32(&x43, x3, (arg4[0]), (arg5[0]));
fiat_secp256k1_cmovznz_u32(&x44, x3, (arg4[1]), (arg5[1]));
fiat_secp256k1_cmovznz_u32(&x45, x3, (arg4[2]), (arg5[2]));
fiat_secp256k1_cmovznz_u32(&x46, x3, (arg4[3]), (arg5[3]));
fiat_secp256k1_cmovznz_u32(&x47, x3, (arg4[4]), (arg5[4]));
fiat_secp256k1_cmovznz_u32(&x48, x3, (arg4[5]), (arg5[5]));
fiat_secp256k1_cmovznz_u32(&x49, x3, (arg4[6]), (arg5[6]));
fiat_secp256k1_cmovznz_u32(&x50, x3, (arg4[7]), (arg5[7]));
fiat_secp256k1_addcarryx_u32(&x51, &x52, 0x0, x43, x43);
fiat_secp256k1_addcarryx_u32(&x53, &x54, x52, x44, x44);
fiat_secp256k1_addcarryx_u32(&x55, &x56, x54, x45, x45);
fiat_secp256k1_addcarryx_u32(&x57, &x58, x56, x46, x46);
fiat_secp256k1_addcarryx_u32(&x59, &x60, x58, x47, x47);
fiat_secp256k1_addcarryx_u32(&x61, &x62, x60, x48, x48);
fiat_secp256k1_addcarryx_u32(&x63, &x64, x62, x49, x49);
fiat_secp256k1_addcarryx_u32(&x65, &x66, x64, x50, x50);
fiat_secp256k1_subborrowx_u32(&x67, &x68, 0x0, x51, UINT32_C(0xfffffc2f));
fiat_secp256k1_subborrowx_u32(&x69, &x70, x68, x53, UINT32_C(0xfffffffe));
fiat_secp256k1_subborrowx_u32(&x71, &x72, x70, x55, UINT32_C(0xffffffff));
fiat_secp256k1_subborrowx_u32(&x73, &x74, x72, x57, UINT32_C(0xffffffff));
fiat_secp256k1_subborrowx_u32(&x75, &x76, x74, x59, UINT32_C(0xffffffff));
fiat_secp256k1_subborrowx_u32(&x77, &x78, x76, x61, UINT32_C(0xffffffff));
fiat_secp256k1_subborrowx_u32(&x79, &x80, x78, x63, UINT32_C(0xffffffff));
fiat_secp256k1_subborrowx_u32(&x81, &x82, x80, x65, UINT32_C(0xffffffff));
fiat_secp256k1_subborrowx_u32(&x83, &x84, x82, x66, 0x0);
x85 = (arg4[7]);
x86 = (arg4[6]);
x87 = (arg4[5]);
x88 = (arg4[4]);
x89 = (arg4[3]);
x90 = (arg4[2]);
x91 = (arg4[1]);
x92 = (arg4[0]);
fiat_secp256k1_subborrowx_u32(&x93, &x94, 0x0, 0x0, x92);
fiat_secp256k1_subborrowx_u32(&x95, &x96, x94, 0x0, x91);
fiat_secp256k1_subborrowx_u32(&x97, &x98, x96, 0x0, x90);
fiat_secp256k1_subborrowx_u32(&x99, &x100, x98, 0x0, x89);
fiat_secp256k1_subborrowx_u32(&x101, &x102, x100, 0x0, x88);
fiat_secp256k1_subborrowx_u32(&x103, &x104, x102, 0x0, x87);
fiat_secp256k1_subborrowx_u32(&x105, &x106, x104, 0x0, x86);
fiat_secp256k1_subborrowx_u32(&x107, &x108, x106, 0x0, x85);
fiat_secp256k1_cmovznz_u32(&x109, x108, 0x0, UINT32_C(0xffffffff));
fiat_secp256k1_addcarryx_u32(&x110, &x111, 0x0, x93, (x109 & UINT32_C(0xfffffc2f)));
fiat_secp256k1_addcarryx_u32(&x112, &x113, x111, x95, (x109 & UINT32_C(0xfffffffe)));
fiat_secp256k1_addcarryx_u32(&x114, &x115, x113, x97, x109);
fiat_secp256k1_addcarryx_u32(&x116, &x117, x115, x99, x109);
fiat_secp256k1_addcarryx_u32(&x118, &x119, x117, x101, x109);
fiat_secp256k1_addcarryx_u32(&x120, &x121, x119, x103, x109);
fiat_secp256k1_addcarryx_u32(&x122, &x123, x121, x105, x109);
fiat_secp256k1_addcarryx_u32(&x124, &x125, x123, x107, x109);
fiat_secp256k1_cmovznz_u32(&x126, x3, (arg5[0]), x110);
fiat_secp256k1_cmovznz_u32(&x127, x3, (arg5[1]), x112);
fiat_secp256k1_cmovznz_u32(&x128, x3, (arg5[2]), x114);
fiat_secp256k1_cmovznz_u32(&x129, x3, (arg5[3]), x116);
fiat_secp256k1_cmovznz_u32(&x130, x3, (arg5[4]), x118);
fiat_secp256k1_cmovznz_u32(&x131, x3, (arg5[5]), x120);
fiat_secp256k1_cmovznz_u32(&x132, x3, (arg5[6]), x122);
fiat_secp256k1_cmovznz_u32(&x133, x3, (arg5[7]), x124);
x134 = (fiat_secp256k1_uint1)(x34 & 0x1);
fiat_secp256k1_cmovznz_u32(&x135, x134, 0x0, x7);
fiat_secp256k1_cmovznz_u32(&x136, x134, 0x0, x8);
fiat_secp256k1_cmovznz_u32(&x137, x134, 0x0, x9);
fiat_secp256k1_cmovznz_u32(&x138, x134, 0x0, x10);
fiat_secp256k1_cmovznz_u32(&x139, x134, 0x0, x11);
fiat_secp256k1_cmovznz_u32(&x140, x134, 0x0, x12);
fiat_secp256k1_cmovznz_u32(&x141, x134, 0x0, x13);
fiat_secp256k1_cmovznz_u32(&x142, x134, 0x0, x14);
fiat_secp256k1_cmovznz_u32(&x143, x134, 0x0, x15);
fiat_secp256k1_addcarryx_u32(&x144, &x145, 0x0, x34, x135);
fiat_secp256k1_addcarryx_u32(&x146, &x147, x145, x35, x136);
fiat_secp256k1_addcarryx_u32(&x148, &x149, x147, x36, x137);
fiat_secp256k1_addcarryx_u32(&x150, &x151, x149, x37, x138);
fiat_secp256k1_addcarryx_u32(&x152, &x153, x151, x38, x139);
fiat_secp256k1_addcarryx_u32(&x154, &x155, x153, x39, x140);
fiat_secp256k1_addcarryx_u32(&x156, &x157, x155, x40, x141);
fiat_secp256k1_addcarryx_u32(&x158, &x159, x157, x41, x142);
fiat_secp256k1_addcarryx_u32(&x160, &x161, x159, x42, x143);
fiat_secp256k1_cmovznz_u32(&x162, x134, 0x0, x43);
fiat_secp256k1_cmovznz_u32(&x163, x134, 0x0, x44);
fiat_secp256k1_cmovznz_u32(&x164, x134, 0x0, x45);
fiat_secp256k1_cmovznz_u32(&x165, x134, 0x0, x46);
fiat_secp256k1_cmovznz_u32(&x166, x134, 0x0, x47);
fiat_secp256k1_cmovznz_u32(&x167, x134, 0x0, x48);
fiat_secp256k1_cmovznz_u32(&x168, x134, 0x0, x49);
fiat_secp256k1_cmovznz_u32(&x169, x134, 0x0, x50);
fiat_secp256k1_addcarryx_u32(&x170, &x171, 0x0, x126, x162);
fiat_secp256k1_addcarryx_u32(&x172, &x173, x171, x127, x163);
fiat_secp256k1_addcarryx_u32(&x174, &x175, x173, x128, x164);
fiat_secp256k1_addcarryx_u32(&x176, &x177, x175, x129, x165);
fiat_secp256k1_addcarryx_u32(&x178, &x179, x177, x130, x166);
fiat_secp256k1_addcarryx_u32(&x180, &x181, x179, x131, x167);
fiat_secp256k1_addcarryx_u32(&x182, &x183, x181, x132, x168);
fiat_secp256k1_addcarryx_u32(&x184, &x185, x183, x133, x169);
fiat_secp256k1_subborrowx_u32(&x186, &x187, 0x0, x170, UINT32_C(0xfffffc2f));
fiat_secp256k1_subborrowx_u32(&x188, &x189, x187, x172, UINT32_C(0xfffffffe));
fiat_secp256k1_subborrowx_u32(&x190, &x191, x189, x174, UINT32_C(0xffffffff));
fiat_secp256k1_subborrowx_u32(&x192, &x193, x191, x176, UINT32_C(0xffffffff));
fiat_secp256k1_subborrowx_u32(&x194, &x195, x193, x178, UINT32_C(0xffffffff));
fiat_secp256k1_subborrowx_u32(&x196, &x197, x195, x180, UINT32_C(0xffffffff));
fiat_secp256k1_subborrowx_u32(&x198, &x199, x197, x182, UINT32_C(0xffffffff));
fiat_secp256k1_subborrowx_u32(&x200, &x201, x199, x184, UINT32_C(0xffffffff));
fiat_secp256k1_subborrowx_u32(&x202, &x203, x201, x185, 0x0);
fiat_secp256k1_addcarryx_u32(&x204, &x205, 0x0, x6, 0x1);
x206 = ((x144 >> 1) | ((x146 << 31) & UINT32_C(0xffffffff)));
x207 = ((x146 >> 1) | ((x148 << 31) & UINT32_C(0xffffffff)));
x208 = ((x148 >> 1) | ((x150 << 31) & UINT32_C(0xffffffff)));
x209 = ((x150 >> 1) | ((x152 << 31) & UINT32_C(0xffffffff)));
x210 = ((x152 >> 1) | ((x154 << 31) & UINT32_C(0xffffffff)));
x211 = ((x154 >> 1) | ((x156 << 31) & UINT32_C(0xffffffff)));
x212 = ((x156 >> 1) | ((x158 << 31) & UINT32_C(0xffffffff)));
x213 = ((x158 >> 1) | ((x160 << 31) & UINT32_C(0xffffffff)));
x214 = ((x160 & UINT32_C(0x80000000)) | (x160 >> 1));
fiat_secp256k1_cmovznz_u32(&x215, x84, x67, x51);
fiat_secp256k1_cmovznz_u32(&x216, x84, x69, x53);
fiat_secp256k1_cmovznz_u32(&x217, x84, x71, x55);
fiat_secp256k1_cmovznz_u32(&x218, x84, x73, x57);
fiat_secp256k1_cmovznz_u32(&x219, x84, x75, x59);
fiat_secp256k1_cmovznz_u32(&x220, x84, x77, x61);
fiat_secp256k1_cmovznz_u32(&x221, x84, x79, x63);
fiat_secp256k1_cmovznz_u32(&x222, x84, x81, x65);
fiat_secp256k1_cmovznz_u32(&x223, x203, x186, x170);
fiat_secp256k1_cmovznz_u32(&x224, x203, x188, x172);
fiat_secp256k1_cmovznz_u32(&x225, x203, x190, x174);
fiat_secp256k1_cmovznz_u32(&x226, x203, x192, x176);
fiat_secp256k1_cmovznz_u32(&x227, x203, x194, x178);
fiat_secp256k1_cmovznz_u32(&x228, x203, x196, x180);
fiat_secp256k1_cmovznz_u32(&x229, x203, x198, x182);
fiat_secp256k1_cmovznz_u32(&x230, x203, x200, x184);
*out1 = x204;
out2[0] = x7;
out2[1] = x8;
out2[2] = x9;
out2[3] = x10;
out2[4] = x11;
out2[5] = x12;
out2[6] = x13;
out2[7] = x14;
out2[8] = x15;
out3[0] = x206;
out3[1] = x207;
out3[2] = x208;
out3[3] = x209;
out3[4] = x210;
out3[5] = x211;
out3[6] = x212;
out3[7] = x213;
out3[8] = x214;
out4[0] = x215;
out4[1] = x216;
out4[2] = x217;
out4[3] = x218;
out4[4] = x219;
out4[5] = x220;
out4[6] = x221;
out4[7] = x222;
out5[0] = x223;
out5[1] = x224;
out5[2] = x225;
out5[3] = x226;
out5[4] = x227;
out5[5] = x228;
out5[6] = x229;
out5[7] = x230;
}
/*
* The function fiat_secp256k1_divstep_precomp returns the precomputed value for Bernstein-Yang-inversion (in montgomery form).
* Postconditions:
* eval (from_montgomery out1) = ⌊(m - 1) / 2⌋^(if (log2 m) + 1 < 46 then ⌊(49 * ((log2 m) + 1) + 80) / 17⌋ else ⌊(49 * ((log2 m) + 1) + 57) / 17⌋)
* 0 ≤ eval out1 < m
*
* Input Bounds:
* Output Bounds:
* out1: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]]
*/
static void fiat_secp256k1_divstep_precomp(uint32_t out1[8]) {
out1[0] = UINT32_C(0x31525e0a);
out1[1] = UINT32_C(0xf201a418);
out1[2] = UINT32_C(0xcd648d85);
out1[3] = UINT32_C(0x9953f9dd);
out1[4] = UINT32_C(0x3db210a9);
out1[5] = UINT32_C(0xe8602946);
out1[6] = UINT32_C(0x4b03709);
out1[7] = UINT32_C(0x24fb8a31);
}
|
the_stack_data/93888293.c
|
// -*-Mode: C++;-*- // technically C99
// * BeginRiceCopyright *****************************************************
//
// $HeadURL$
// $Id$
//
// --------------------------------------------------------------------------
// Part of HPCToolkit (hpctoolkit.org)
//
// Information about sources of support for research and development of
// HPCToolkit is at 'hpctoolkit.org' and in 'README.Acknowledgments'.
// --------------------------------------------------------------------------
//
// Copyright ((c)) 2002-2016, Rice University
// 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 Rice University (RICE) 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 RICE 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 RICE 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.
//
// ******************************************************* EndRiceCopyright *
/* provided to figure out where libcsprof's .text section ends */
void
hpcrun_last_func()
{
}
|
the_stack_data/327578.c
|
/*
FUNCTION
<<isalnum>>---alphanumeric character predicate
INDEX
isalnum
ANSI_SYNOPSIS
#include <ctype.h>
int isalnum(int <[c]>);
TRAD_SYNOPSIS
#include <ctype.h>
int isalnum(<[c]>);
DESCRIPTION
<<isalnum>> is a macro which classifies ASCII integer values by table
lookup. It is a predicate returning non-zero for alphabetic or
numeric ASCII characters, and <<0>> for other arguments. It is defined
for all integer values.
You can use a compiled subroutine instead of the macro definition by
undefining the macro using `<<#undef isalnum>>'.
RETURNS
<<isalnum>> returns non-zero if <[c]> is a letter (<<a>>--<<z>> or
<<A>>--<<Z>>) or a digit (<<0>>--<<9>>).
PORTABILITY
<<isalnum>> is ANSI C.
No OS subroutines are required.
*/
#include "ctype.h"
#undef isalnum
int isalnum(int c)
{
return(((c>='a') && (c<='z')) || ((c>='A') && (c<='Z')) || ((c>='0') && (c<='9')));
}
|
the_stack_data/22012515.c
|
static int var_static = 3;
__attribute__((visibility("hidden")))
int var_hidden = 4;
int var_global = 5;
__attribute__((visibility("hidden"), weak))
int var_weak_hidden = 4;
__attribute__((weak))
int var_weak_global = 5;
static int* foo_static() { return &var_static; }
__attribute__((visibility("hidden")))
int* foo_hidden() { return &var_hidden; }
int* foo_global() { return &var_global; }
__attribute__((visibility("hidden"),weak))
int* foo_weak_hidden() { return &var_weak_hidden; }
__attribute__((weak))
int* foo_weak_global() { return &var_weak_global; }
__attribute__((visibility("hidden")))
void* keep[] = { &foo_static };
|
the_stack_data/781512.c
|
#include<stdio.h>
int main(void)
{
int m,n,i,j;
int sum_1 = 1,sum_2 = 1;
scanf("%d %d",&m,&n);
for((i=(m-n)+1);i<=m;i++)
sum_1=sum_1*i;
for(j=1;j<=n;j++)
sum_2=sum_2*j;
printf("%d",(sum_1/sum_2));
return 0;
}
|
the_stack_data/11076458.c
|
/*
* WAD support routines for PhysicsFS.
*
* This driver handles DOOM engine archives ("wads").
* This format (but not this driver) was designed by id Software for use
* with the DOOM engine.
* The specs of the format are from the unofficial doom specs v1.666
* found here: http://www.gamers.org/dhs/helpdocs/dmsp1666.html
* The format of the archive: (from the specs)
*
* A WAD file has three parts:
* (1) a twelve-byte header
* (2) one or more "lumps"
* (3) a directory or "info table" that contains the names, offsets, and
* sizes of all the lumps in the WAD
*
* The header consists of three four-byte parts:
* (a) an ASCII string which must be either "IWAD" or "PWAD"
* (b) a 4-byte (long) integer which is the number of lumps in the wad
* (c) a long integer which is the file offset to the start of
* the directory
*
* The directory has one 16-byte entry for every lump. Each entry consists
* of three parts:
*
* (a) a long integer, the file offset to the start of the lump
* (b) a long integer, the size of the lump in bytes
* (c) an 8-byte ASCII string, the name of the lump, padded with zeros.
* For example, the "DEMO1" entry in hexadecimal would be
* (44 45 4D 4F 31 00 00 00)
*
* Note that there is no way to tell if an opened WAD archive is a
* IWAD or PWAD with this archiver.
* I couldn't think of a way to provide that information, without being too
* hacky.
* I don't think it's really that important though.
*
*
* Please see the file LICENSE.txt in the source's root directory.
*
* This file written by Travis Wells, based on the GRP archiver by
* Ryan C. Gordon.
*/
#if (defined PHYSFS_SUPPORTS_WAD)
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "physfs.h"
#define __PHYSICSFS_INTERNAL__
#include "physfs_internal.h"
typedef struct
{
char name[18];
PHYSFS_uint32 startPos;
PHYSFS_uint32 size;
} WADentry;
typedef struct
{
char *filename;
PHYSFS_sint64 last_mod_time;
PHYSFS_uint32 entryCount;
PHYSFS_uint32 entryOffset;
WADentry *entries;
} WADinfo;
typedef struct
{
void *handle;
WADentry *entry;
PHYSFS_uint32 curPos;
} WADfileinfo;
static void WAD_dirClose(dvoid *opaque)
{
WADinfo *info = ((WADinfo *) opaque);
allocator.Free(info->filename);
allocator.Free(info->entries);
allocator.Free(info);
} /* WAD_dirClose */
static PHYSFS_sint64 WAD_read(fvoid *opaque, void *buffer,
PHYSFS_uint32 objSize, PHYSFS_uint32 objCount)
{
WADfileinfo *finfo = (WADfileinfo *) opaque;
WADentry *entry = finfo->entry;
PHYSFS_uint32 bytesLeft = entry->size - finfo->curPos;
PHYSFS_uint32 objsLeft = (bytesLeft / objSize);
PHYSFS_sint64 rc;
if (objsLeft < objCount)
objCount = objsLeft;
rc = __PHYSFS_platformRead(finfo->handle, buffer, objSize, objCount);
if (rc > 0)
finfo->curPos += (PHYSFS_uint32) (rc * objSize);
return(rc);
} /* WAD_read */
static PHYSFS_sint64 WAD_write(fvoid *opaque, const void *buffer,
PHYSFS_uint32 objSize, PHYSFS_uint32 objCount)
{
BAIL_MACRO(ERR_NOT_SUPPORTED, -1);
} /* WAD_write */
static int WAD_eof(fvoid *opaque)
{
WADfileinfo *finfo = (WADfileinfo *) opaque;
WADentry *entry = finfo->entry;
return(finfo->curPos >= entry->size);
} /* WAD_eof */
static PHYSFS_sint64 WAD_tell(fvoid *opaque)
{
return(((WADfileinfo *) opaque)->curPos);
} /* WAD_tell */
static int WAD_seek(fvoid *opaque, PHYSFS_uint64 offset)
{
WADfileinfo *finfo = (WADfileinfo *) opaque;
WADentry *entry = finfo->entry;
int rc;
BAIL_IF_MACRO(offset < 0, ERR_INVALID_ARGUMENT, 0);
BAIL_IF_MACRO(offset >= entry->size, ERR_PAST_EOF, 0);
rc = __PHYSFS_platformSeek(finfo->handle, entry->startPos + offset);
if (rc)
finfo->curPos = (PHYSFS_uint32) offset;
return(rc);
} /* WAD_seek */
static PHYSFS_sint64 WAD_fileLength(fvoid *opaque)
{
WADfileinfo *finfo = (WADfileinfo *) opaque;
return((PHYSFS_sint64) finfo->entry->size);
} /* WAD_fileLength */
static int WAD_fileClose(fvoid *opaque)
{
WADfileinfo *finfo = (WADfileinfo *) opaque;
BAIL_IF_MACRO(!__PHYSFS_platformClose(finfo->handle), NULL, 0);
allocator.Free(finfo);
return(1);
} /* WAD_fileClose */
static int wad_open(const char *filename, int forWriting,
void **fh, PHYSFS_uint32 *count,PHYSFS_uint32 *offset)
{
PHYSFS_uint8 buf[4];
*fh = NULL;
BAIL_IF_MACRO(forWriting, ERR_ARC_IS_READ_ONLY, 0);
*fh = __PHYSFS_platformOpenRead(filename);
BAIL_IF_MACRO(*fh == NULL, NULL, 0);
if (__PHYSFS_platformRead(*fh, buf, 4, 1) != 1)
goto openWad_failed;
if (memcmp(buf, "IWAD", 4) != 0 && memcmp(buf, "PWAD", 4) != 0)
{
__PHYSFS_setError(ERR_UNSUPPORTED_ARCHIVE);
goto openWad_failed;
} /* if */
if (__PHYSFS_platformRead(*fh, count, sizeof (PHYSFS_uint32), 1) != 1)
goto openWad_failed;
*count = PHYSFS_swapULE32(*count);
if (__PHYSFS_platformRead(*fh, offset, sizeof (PHYSFS_uint32), 1) != 1)
goto openWad_failed;
*offset = PHYSFS_swapULE32(*offset);
return(1);
openWad_failed:
if (*fh != NULL)
__PHYSFS_platformClose(*fh);
*count = -1;
*fh = NULL;
return(0);
} /* wad_open */
static int WAD_isArchive(const char *filename, int forWriting)
{
void *fh;
PHYSFS_uint32 fileCount,offset;
int retval = wad_open(filename, forWriting, &fh, &fileCount,&offset);
if (fh != NULL)
__PHYSFS_platformClose(fh);
return(retval);
} /* WAD_isArchive */
static int wad_entry_cmp(void *_a, PHYSFS_uint32 one, PHYSFS_uint32 two)
{
if (one != two)
{
const WADentry *a = (const WADentry *) _a;
return(strcmp(a[one].name, a[two].name));
} /* if */
return 0;
} /* wad_entry_cmp */
static void wad_entry_swap(void *_a, PHYSFS_uint32 one, PHYSFS_uint32 two)
{
if (one != two)
{
WADentry tmp;
WADentry *first = &(((WADentry *) _a)[one]);
WADentry *second = &(((WADentry *) _a)[two]);
memcpy(&tmp, first, sizeof (WADentry));
memcpy(first, second, sizeof (WADentry));
memcpy(second, &tmp, sizeof (WADentry));
} /* if */
} /* wad_entry_swap */
static int wad_load_entries(const char *name, int forWriting, WADinfo *info)
{
void *fh = NULL;
PHYSFS_uint32 fileCount;
PHYSFS_uint32 directoryOffset;
WADentry *entry;
BAIL_IF_MACRO(!wad_open(name, forWriting, &fh, &fileCount,&directoryOffset), NULL, 0);
info->entryCount = fileCount;
info->entries = (WADentry *) allocator.Malloc(sizeof(WADentry)*fileCount);
if (info->entries == NULL)
{
__PHYSFS_platformClose(fh);
BAIL_MACRO(ERR_OUT_OF_MEMORY, 0);
} /* if */
__PHYSFS_platformSeek(fh,directoryOffset);
for (entry = info->entries; fileCount > 0; fileCount--, entry++)
{
if (__PHYSFS_platformRead(fh, &entry->startPos, 4, 1) != 1)
{
__PHYSFS_platformClose(fh);
return(0);
} /* if */
if (__PHYSFS_platformRead(fh, &entry->size, 4, 1) != 1)
{
__PHYSFS_platformClose(fh);
return(0);
} /* if */
if (__PHYSFS_platformRead(fh, &entry->name, 8, 1) != 1)
{
__PHYSFS_platformClose(fh);
return(0);
} /* if */
entry->name[8] = '\0'; /* name might not be null-terminated in file. */
entry->size = PHYSFS_swapULE32(entry->size);
entry->startPos = PHYSFS_swapULE32(entry->startPos);
} /* for */
__PHYSFS_platformClose(fh);
__PHYSFS_sort(info->entries, info->entryCount,
wad_entry_cmp, wad_entry_swap);
return(1);
} /* wad_load_entries */
static void *WAD_openArchive(const char *name, int forWriting)
{
PHYSFS_sint64 modtime = __PHYSFS_platformGetLastModTime(name);
WADinfo *info = (WADinfo *) allocator.Malloc(sizeof (WADinfo));
BAIL_IF_MACRO(info == NULL, ERR_OUT_OF_MEMORY, NULL);
memset(info, '\0', sizeof (WADinfo));
info->filename = (char *) allocator.Malloc(strlen(name) + 1);
GOTO_IF_MACRO(!info->filename, ERR_OUT_OF_MEMORY, WAD_openArchive_failed);
if (!wad_load_entries(name, forWriting, info))
goto WAD_openArchive_failed;
strcpy(info->filename, name);
info->last_mod_time = modtime;
return(info);
WAD_openArchive_failed:
if (info != NULL)
{
if (info->filename != NULL)
allocator.Free(info->filename);
if (info->entries != NULL)
allocator.Free(info->entries);
allocator.Free(info);
} /* if */
return(NULL);
} /* WAD_openArchive */
static void WAD_enumerateFiles(dvoid *opaque, const char *dname,
int omitSymLinks, PHYSFS_EnumFilesCallback cb,
const char *origdir, void *callbackdata)
{
WADinfo *info = ((WADinfo *) opaque);
WADentry *entry = info->entries;
PHYSFS_uint32 max = info->entryCount;
PHYSFS_uint32 i;
const char *name;
char *sep;
if (*dname == '\0') /* root directory enumeration? */
{
for (i = 0; i < max; i++, entry++)
{
name = entry->name;
if (strchr(name, '/') == NULL)
cb(callbackdata, origdir, name);
} /* for */
} /* if */
else
{
for (i = 0; i < max; i++, entry++)
{
name = entry->name;
sep = strchr(name, '/');
if (sep != NULL)
{
if (strncmp(dname, name, (sep - name)) == 0)
cb(callbackdata, origdir, sep + 1);
} /* if */
} /* for */
} /* else */
} /* WAD_enumerateFiles */
static WADentry *wad_find_entry(WADinfo *info, const char *name)
{
WADentry *a = info->entries;
PHYSFS_sint32 lo = 0;
PHYSFS_sint32 hi = (PHYSFS_sint32) (info->entryCount - 1);
PHYSFS_sint32 middle;
int rc;
while (lo <= hi)
{
middle = lo + ((hi - lo) / 2);
rc = strcmp(name, a[middle].name);
if (rc == 0) /* found it! */
return(&a[middle]);
else if (rc > 0)
lo = middle + 1;
else
hi = middle - 1;
} /* while */
BAIL_MACRO(ERR_NO_SUCH_FILE, NULL);
} /* wad_find_entry */
static int WAD_exists(dvoid *opaque, const char *name)
{
return(wad_find_entry(((WADinfo *) opaque), name) != NULL);
} /* WAD_exists */
static int WAD_isDirectory(dvoid *opaque, const char *name, int *fileExists)
{
WADentry *entry = wad_find_entry(((WADinfo *) opaque), name);
if (entry != NULL)
{
char *n;
*fileExists = 1;
/* Can't be a directory if it's a subdirectory. */
if (strchr(entry->name, '/') != NULL)
return(0);
/* Check if it matches "MAP??" or "E?M?" ... */
n = entry->name;
if ((n[0] == 'E' && n[2] == 'M') ||
(n[0] == 'M' && n[1] == 'A' && n[2] == 'P' && n[6] == 0))
{
return(1);
} /* if */
return(0);
} /* if */
else
{
*fileExists = 0;
return(0);
} /* else */
} /* WAD_isDirectory */
static int WAD_isSymLink(dvoid *opaque, const char *name, int *fileExists)
{
*fileExists = WAD_exists(opaque, name);
return(0); /* never symlinks in a wad. */
} /* WAD_isSymLink */
static PHYSFS_sint64 WAD_getLastModTime(dvoid *opaque,
const char *name,
int *fileExists)
{
WADinfo *info = ((WADinfo *) opaque);
PHYSFS_sint64 retval = -1;
*fileExists = (wad_find_entry(info, name) != NULL);
if (*fileExists) /* use time of WAD itself in the physical filesystem. */
retval = info->last_mod_time;
return(retval);
} /* WAD_getLastModTime */
static fvoid *WAD_openRead(dvoid *opaque, const char *fnm, int *fileExists)
{
WADinfo *info = ((WADinfo *) opaque);
WADfileinfo *finfo;
WADentry *entry;
entry = wad_find_entry(info, fnm);
*fileExists = (entry != NULL);
BAIL_IF_MACRO(entry == NULL, NULL, NULL);
finfo = (WADfileinfo *) allocator.Malloc(sizeof (WADfileinfo));
BAIL_IF_MACRO(finfo == NULL, ERR_OUT_OF_MEMORY, NULL);
finfo->handle = __PHYSFS_platformOpenRead(info->filename);
if ( (finfo->handle == NULL) ||
(!__PHYSFS_platformSeek(finfo->handle, entry->startPos)) )
{
allocator.Free(finfo);
return(NULL);
} /* if */
finfo->curPos = 0;
finfo->entry = entry;
return(finfo);
} /* WAD_openRead */
static fvoid *WAD_openWrite(dvoid *opaque, const char *name)
{
BAIL_MACRO(ERR_NOT_SUPPORTED, NULL);
} /* WAD_openWrite */
static fvoid *WAD_openAppend(dvoid *opaque, const char *name)
{
BAIL_MACRO(ERR_NOT_SUPPORTED, NULL);
} /* WAD_openAppend */
static int WAD_remove(dvoid *opaque, const char *name)
{
BAIL_MACRO(ERR_NOT_SUPPORTED, 0);
} /* WAD_remove */
static int WAD_mkdir(dvoid *opaque, const char *name)
{
BAIL_MACRO(ERR_NOT_SUPPORTED, 0);
} /* WAD_mkdir */
const PHYSFS_ArchiveInfo __PHYSFS_ArchiveInfo_WAD =
{
"WAD",
WAD_ARCHIVE_DESCRIPTION,
"Travis Wells <[email protected]>",
"http://www.3dmm2.com/doom/",
};
const PHYSFS_Archiver __PHYSFS_Archiver_WAD =
{
&__PHYSFS_ArchiveInfo_WAD,
WAD_isArchive, /* isArchive() method */
WAD_openArchive, /* openArchive() method */
WAD_enumerateFiles, /* enumerateFiles() method */
WAD_exists, /* exists() method */
WAD_isDirectory, /* isDirectory() method */
WAD_isSymLink, /* isSymLink() method */
WAD_getLastModTime, /* getLastModTime() method */
WAD_openRead, /* openRead() method */
WAD_openWrite, /* openWrite() method */
WAD_openAppend, /* openAppend() method */
WAD_remove, /* remove() method */
WAD_mkdir, /* mkdir() method */
WAD_dirClose, /* dirClose() method */
WAD_read, /* read() method */
WAD_write, /* write() method */
WAD_eof, /* eof() method */
WAD_tell, /* tell() method */
WAD_seek, /* seek() method */
WAD_fileLength, /* fileLength() method */
WAD_fileClose /* fileClose() method */
};
#endif /* defined PHYSFS_SUPPORTS_WAD */
/* end of wad.c ... */
|
the_stack_data/181391893.c
|
/*
* very simple vsnprintf
* adapted by David Betz from:
* very simple printf, adapted from one written by Eric Smith
* for the MiNT OS long ago
* placed in the public domain
* - Eric Smith
* Propeller specific adaptations
* Copyright (c) 2011 Parallax, Inc.
* Written by Eric R. Smith, Total Spectrum Software Inc.
* MIT licensed (see terms at end of file)
*/
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <ctype.h>
#include <limits.h>
/*
* very simple printf -- just understands a few format features
* does c,s,u,d,x
*/
//typedef long LONG;
//typedef unsigned long ULONG;
typedef int LONG;
typedef unsigned int ULONG;
/* string buffer */
typedef struct {
char *p;
size_t remaining;
} STRINGBUF;
static void
STRINGBUF_putc(STRINGBUF *buf, int ch)
{
if (buf->remaining > 1) {
--buf->remaining;
*buf->p++ = ch;
}
}
static int
PUTC(STRINGBUF *buf, int c, int width) {
int put = 0;
STRINGBUF_putc(buf, c); put++;
while (--width > 0) {
STRINGBUF_putc(buf, ' ');
put++;
}
return put;
}
static int
PUTS(STRINGBUF *buf, const char *s, int width) {
int put = 0;
while (*s) {
STRINGBUF_putc(buf, *s++); put++;
width--;
}
while (width-- > 0) {
STRINGBUF_putc(buf, ' '); put++;
}
return put;
}
static int
PUTL(STRINGBUF *buf, ULONG u, int base, int width, int fill_char)
{
int put = 0;
char obuf[24]; /* 64 bits -> 22 digits maximum in octal */
char *t;
t = obuf;
do {
*t++ = "0123456789ABCDEF"[u % base];
u /= base;
width--;
} while (u > 0);
while (width-- > 0) {
STRINGBUF_putc(buf, fill_char); put++;
}
while (t != obuf) {
STRINGBUF_putc(buf, *--t); put++;
}
return put;
}
int __simple_vsprintf(char *str, const char *fmt, va_list args)
{
return __simple_vsnprintf(str, INT_MAX, fmt, args);
}
int __simple_vsnprintf(char *str, size_t size, const char *fmt, va_list args)
{
STRINGBUF buf;
char c, fill_char;
char *s_arg;
unsigned int i_arg;
ULONG l_arg;
int width, long_flag;
int outbytes = 0;
int base;
buf.p = str;
buf.remaining = size;
while( (c = *fmt++) != 0 ) {
if (c != '%') {
outbytes += PUTC(&buf, c, 1);
continue;
}
c = *fmt++;
width = 0;
long_flag = 0;
fill_char = ' ';
if (c == '*') {
width = va_arg(args, int);
c = *fmt++;
}
else {
if (c == '0') fill_char = '0';
while (c && isdigit(c)) {
width = 10*width + (c-'0');
c = *fmt++;
}
}
/* for us "long int" and "int" are the same size, so
we can ignore one 'l' flag; use long long if two
'l flags are seen */
while (c == 'l' || c == 'L') {
long_flag++;
c = *fmt++;
}
if (!c) break;
switch (c) {
case '%':
outbytes += PUTC(&buf, c, width);
break;
case 'c':
i_arg = va_arg(args, unsigned int);
outbytes += PUTC(&buf, i_arg, width);
break;
case 's':
s_arg = va_arg(args, char *);
outbytes += PUTS(&buf, s_arg, width);
break;
case 'd':
case 'x':
case 'u':
base = (c == 'x') ? 16 : 10;
l_arg = va_arg(args, ULONG);
if (c == 'd' && (((LONG)l_arg < 0))) {
outbytes += PUTC(&buf, '-', 1);
width--;
l_arg = (ULONG)(-((LONG)l_arg));
}
outbytes += PUTL(&buf, l_arg, base, width, fill_char);
break;
}
}
*buf.p = '\0';
return outbytes;
}
int __simple_snprintf(char *str, size_t size, const char *fmt, ...)
{
int outbytes;
va_list ap;
va_start(ap, fmt);
outbytes = __simple_vsnprintf(str, size, fmt, ap);
va_end(ap);
return outbytes;
}
/* +--------------------------------------------------------------------
* ¦ TERMS OF USE: MIT License
* +--------------------------------------------------------------------
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files
* (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge,
* publish, distribute, sublicense, and/or sell copies of the Software,
* and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* +--------------------------------------------------------------------
*/
|
the_stack_data/49655.c
|
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_toupper.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: esupatae <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/09/23 00:14:15 by esupatae #+# #+# */
/* Updated: 2019/09/23 00:14:17 by esupatae ### ########.fr */
/* */
/* ************************************************************************** */
int ft_toupper(int c)
{
if (c >= 'a' && c <= 'z')
return (c - 32);
return (c);
}
|
the_stack_data/181392648.c
|
#include <stdio.h>
void SpinYetAgain()
{
volatile unsigned int count = 0;
int i;
for(i=0; i<1000; i++)
{
count++;
}
}
void SpinSomeMore()
{
volatile unsigned int count = 0;
int i;
for(i=0; i<1000; i++)
{
count++;
}
SpinYetAgain();
}
void Spin()
{
volatile unsigned int count = 0;
int i;
for(i=0; i<1000; i++)
{
count++;
}
SpinSomeMore();
}
int main(int argc, char* argv[])
{
while(1)
{
Spin();
}
}
|
the_stack_data/23144.c
|
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <errno.h>
int main() {
char* fName = "/storage3/1000genomes/ftp.1000genomes.ebi.ac.uk/vol1/ftp/release/20130502/ALL.chr22.phase3_shapeit2_mvncall_integrated_v5a.20130502.genotypes.vcf";
//
struct stat sb;
long cntr = 0;
int fd, lineLen;
char *data;
char *line;
// map the file
fd = open(fName, O_RDONLY);
fstat(fd, &sb);
//// int pageSize;
//// pageSize = getpagesize();
//// data = mmap((caddr_t)0, pageSize, PROT_READ, MAP_PRIVATE, fd, pageSize);
data = mmap((caddr_t)0, sb.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
line = data;
// get lines
while(cntr < sb.st_size) {
lineLen = 0;
line = data;
// find the next line
while(*data != '\n' && cntr < sb.st_size) {
data++;
cntr++;
lineLen++;
}
/***** PROCESS LINE *****/
// ... processLine(line, lineLen);
}
return 0;
}
|
the_stack_data/151706103.c
|
/*Pesquisa Operacional ou Otimização é uma área da ciência da computação que trata em resolver problemas chamado de Problema de Otimização. Esses são problemas que cada solução tem um valor associado e deseja-se encontrar a solução que tem o menor (problema de minimização) ou maior (problema de maximização) valor.
Um desses problemas é o chamado de problema de formação de equipes sociais, que consiste em formar uma equipe que possua a melhor relação interpessoal. Para isso, calcula-se o fator de sociabilidade, um número entre 1 a 100, que indica o quanto a pessoa é sociável. Estudos do instituto de pesquisa Tabajara comprovam que pessoas que possuem fator de sociabilidade iguais ou próximos, independente do valor, tentem a se darem bem. Exemplo, Temos 4 pessoas com fator de sociabilidade 45, 39, 10, 20, então as pessoas 1 e 2 terão mais chances de se darem bem em uma equipe.
Uma empresa precisa selecionar duas pessoas para formar uma equipe em um projeto e deseja selecionar essas duas pessoas de acordo com o estudo do instituto Tabajara.
Com isso, implemente um programa que recebe n números inteiros que indicam o fator de sociabilidade das n pessoas da empresa e devolva as duas pessoas com os fator de sociabilidade mais próximas.
Considere que o primeiro fator de sociabilidade informado é da pessoa 1, o segunda da pessoa 2 e assim sucessivamente.
Imprima primeiro a pessoa de menor código, ou seja, 2 9 e não 9 2.*/
#include <stdio.h>
#include <math.h>
int main(){
int tam, pessoa1, pessoa2;
scanf("%d", &tam);
int vet[tam];
for(int cont = 0; cont < tam; cont++){
scanf("%d", &vet[cont]);
}
int dif = 100;
for(int cont = 0; cont < tam; cont++){
for(int c1 = (cont +1); c1 < tam; c1++){
int difRod = abs(vet[cont] - vet[c1]);
if(dif > difRod ){
dif = difRod;
pessoa1 = (cont +1);
pessoa2 = c1 + 1;
}
}
}
printf("%d %d", pessoa1, pessoa2);
return 0;
}
|
the_stack_data/161079802.c
|
#include <stdio.h>
#define alturaMaxima 255
typedef struct
{
int peso;
int altura;
} PesoAltura;
int main()
{
PesoAltura pessoa1;
pessoa1.peso = 80;
pessoa1.altura = 185;
printf("Peso: %i., Altura: %i. ", pessoa1.peso, pessoa1.altura);
if(pessoa1.altura > alturaMaxima) printf("Altura acima da maxima.");
else printf("Altura abaixo da maxima. \n");
return 0;
}
|
the_stack_data/67323953.c
|
//
// Created by Nikolaj on 27/04/2021.
//
|
the_stack_data/182953778.c
|
#include <stdio.h>
void reverse(int n,int a[]){
int i;
for(i = 0;i < n/2;i++){
int temp = a[i];
a[i]=a[n-i-1];
a[n-i-1]=temp;
}
}
int main()
{
int i,n;
scanf("%d",&n);
int a[n];
for(i = 0;i < n;i++){
scanf("%d",&a[i]);
}
reverse(n,a);
for(i = 0;i < n;i++){
printf("%d ",a[i]);
}
return 0;
}
|
the_stack_data/198580503.c
|
#ifdef TIME_WITH_SYS_TIME
/* Time with sys/time test */
#include <sys/types.h>
#include <sys/time.h>
#include <time.h>
int
main ()
{
if ((struct tm *) 0)
return 0;
;
return 0;
}
#endif
#ifdef HAVE_O_NONBLOCK
#include <sys/types.h>
#include <unistd.h>
#include <fcntl.h>
int
main ()
{
/* try to compile O_NONBLOCK */
#if defined(sun) || defined(__sun__) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
# if defined(__SVR4) || defined(__srv4__)
# define PLATFORM_SOLARIS
# else
# define PLATFORM_SUNOS4
# endif
#endif
#if (defined(_AIX) || defined(__xlC__)) && !defined(_AIX4)
# define PLATFORM_AIX_V3
#endif
#if defined(PLATFORM_SUNOS4) || defined(PLATFORM_AIX_V3) || defined(__BEOS__)
#error "O_NONBLOCK does not work on this platform"
#endif
int socket;
int flags = fcntl(socket, F_SETFL, flags | O_NONBLOCK);
return 0;
}
#endif
#ifdef HAVE_GETHOSTBYADDR_R_5
#include <sys/types.h>
#include <netdb.h>
int
main ()
{
char * address;
int length;
int type;
struct hostent h;
struct hostent_data hdata;
int rc;
#ifndef gethostbyaddr_r
(void)gethostbyaddr_r;
#endif
rc = gethostbyaddr_r(address, length, type, &h, &hdata);
;
return 0;
}
#endif
#ifdef HAVE_GETHOSTBYADDR_R_5_REENTRANT
#define _REENTRANT
#include <sys/types.h>
#include <netdb.h>
int
main ()
{
char * address;
int length;q
int type;
struct hostent h;
struct hostent_data hdata;
int rc;
#ifndef gethostbyaddr_r
(void)gethostbyaddr_r;
#endif
rc = gethostbyaddr_r(address, length, type, &h, &hdata);
;
return 0;
}
#endif
#ifdef HAVE_GETHOSTBYADDR_R_7
#include <sys/types.h>
#include <netdb.h>
int
main ()
{
char * address;
int length;
int type;
struct hostent h;
char buffer[8192];
int h_errnop;
struct hostent * hp;
#ifndef gethostbyaddr_r
(void)gethostbyaddr_r;
#endif
hp = gethostbyaddr_r(address, length, type, &h,
buffer, 8192, &h_errnop);
;
return 0;
}
#endif
#ifdef HAVE_GETHOSTBYADDR_R_7_REENTRANT
#define _REENTRANT
#include <sys/types.h>
#include <netdb.h>
int
main ()
{
char * address;
int length;
int type;
struct hostent h;
char buffer[8192];
int h_errnop;
struct hostent * hp;
#ifndef gethostbyaddr_r
(void)gethostbyaddr_r;
#endif
hp = gethostbyaddr_r(address, length, type, &h,
buffer, 8192, &h_errnop);
;
return 0;
}
#endif
#ifdef HAVE_GETHOSTBYADDR_R_8
#include <sys/types.h>
#include <netdb.h>
int
main ()
{
char * address;
int length;
int type;
struct hostent h;
char buffer[8192];
int h_errnop;
struct hostent * hp;
int rc;
#ifndef gethostbyaddr_r
(void)gethostbyaddr_r;
#endif
rc = gethostbyaddr_r(address, length, type, &h,
buffer, 8192, &hp, &h_errnop);
;
return 0;
}
#endif
#ifdef HAVE_GETHOSTBYADDR_R_8_REENTRANT
#define _REENTRANT
#include <sys/types.h>
#include <netdb.h>
int
main ()
{
char * address;
int length;
int type;
struct hostent h;
char buffer[8192];
int h_errnop;
struct hostent * hp;
int rc;
#ifndef gethostbyaddr_r
(void)gethostbyaddr_r;
#endif
rc = gethostbyaddr_r(address, length, type, &h,
buffer, 8192, &hp, &h_errnop);
;
return 0;
}
#endif
#ifdef HAVE_GETHOSTBYNAME_R_3
#include <string.h>
#include <sys/types.h>
#include <netdb.h>
#undef NULL
#define NULL (void *)0
int
main ()
{
struct hostent_data data;
#ifndef gethostbyname_r
(void)gethostbyname_r;
#endif
gethostbyname_r(NULL, NULL, NULL);
;
return 0;
}
#endif
#ifdef HAVE_GETHOSTBYNAME_R_3_REENTRANT
#define _REENTRANT
#include <string.h>
#include <sys/types.h>
#include <netdb.h>
#undef NULL
#define NULL (void *)0
int
main ()
{
struct hostent_data data;
#ifndef gethostbyname_r
(void)gethostbyname_r;
#endif
gethostbyname_r(NULL, NULL, NULL);
;
return 0;
}
#endif
#ifdef HAVE_GETHOSTBYNAME_R_5
#include <sys/types.h>
#include <netinet/in.h>
#include <netdb.h>
#undef NULL
#define NULL (void *)0
int
main ()
{
#ifndef gethostbyname_r
(void)gethostbyname_r;
#endif
gethostbyname_r(NULL, NULL, NULL, 0, NULL);
;
return 0;
}
#endif
#ifdef HAVE_GETHOSTBYNAME_R_5_REENTRANT
#define _REENTRANT
#include <sys/types.h>
#include <netdb.h>
#undef NULL
#define NULL (void *)0
int
main ()
{
#ifndef gethostbyname_r
(void)gethostbyname_r;
#endif
gethostbyname_r(NULL, NULL, NULL, 0, NULL);
;
return 0;
}
#endif
#ifdef HAVE_GETHOSTBYNAME_R_6
#include <sys/types.h>
#include <netdb.h>
#undef NULL
#define NULL (void *)0
int
main ()
{
#ifndef gethostbyname_r
(void)gethostbyname_r;
#endif
gethostbyname_r(NULL, NULL, NULL, 0, NULL, NULL);
;
return 0;
}
#endif
#ifdef HAVE_GETHOSTBYNAME_R_6_REENTRANT
#define _REENTRANT
#include <sys/types.h>
#include <netdb.h>
#undef NULL
#define NULL (void *)0
int
main ()
{
#ifndef gethostbyname_r
(void)gethostbyname_r;
#endif
gethostbyname_r(NULL, NULL, NULL, 0, NULL, NULL);
;
return 0;
}
#endif
#ifdef HAVE_SOCKLEN_T
#ifdef _WIN32
#include <ws2tcpip.h>
#else
#include <sys/types.h>
#include <sys/socket.h>
#endif
int
main ()
{
if ((socklen_t *) 0)
return 0;
if (sizeof (socklen_t))
return 0;
;
return 0;
}
#endif
#ifdef HAVE_IN_ADDR_T
#include <sys/types.h>
#include <sys/socket.h>
#include <arpa/inet.h>
int
main ()
{
if ((in_addr_t *) 0)
return 0;
if (sizeof (in_addr_t))
return 0;
;
return 0;
}
#endif
#ifdef STDC_HEADERS
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <float.h>
int main() { return 0; }
#endif
#ifdef RETSIGTYPE_TEST
#include <sys/types.h>
#include <signal.h>
#ifdef signal
# undef signal
#endif
#ifdef __cplusplus
extern "C" void (*signal (int, void (*)(int)))(int);
#else
void (*signal ()) ();
#endif
int
main ()
{
return 0;
}
#endif
#ifdef HAVE_INET_NTOA_R_DECL
#include <arpa/inet.h>
typedef void (*func_type)();
int main()
{
#ifndef inet_ntoa_r
func_type func;
func = (func_type)inet_ntoa_r;
#endif
return 0;
}
#endif
#ifdef HAVE_INET_NTOA_R_DECL_REENTRANT
#define _REENTRANT
#include <arpa/inet.h>
typedef void (*func_type)();
int main()
{
#ifndef inet_ntoa_r
func_type func;
func = (func_type)&inet_ntoa_r;
#endif
return 0;
}
#endif
#ifdef HAVE_GETADDRINFO
#include <netdb.h>
#include <sys/types.h>
#include <sys/socket.h>
int main(void) {
struct addrinfo hints, *ai;
int error;
memset(&hints, 0, sizeof(hints));
hints.ai_family = AF_UNSPEC;
hints.ai_socktype = SOCK_STREAM;
#ifndef getaddrinfo
(void)getaddrinfo;
#endif
error = getaddrinfo("127.0.0.1", "8080", &hints, &ai);
if (error) {
return 1;
}
return 0;
}
#endif
#ifdef HAVE_FILE_OFFSET_BITS
#ifdef _FILE_OFFSET_BITS
#undef _FILE_OFFSET_BITS
#endif
#define _FILE_OFFSET_BITS 64
#include <sys/types.h>
/* Check that off_t can represent 2**63 - 1 correctly.
We can't simply define LARGE_OFF_T to be 9223372036854775807,
since some C++ compilers masquerading as C compilers
incorrectly reject 9223372036854775807. */
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
int main () { ; return 0; }
#endif
#ifdef HAVE_IOCTLSOCKET
#include <windows.h>
int
main ()
{
/* ioctlsocket source code */
int socket;
unsigned long flags = ioctlsocket(socket, FIONBIO, &flags);
;
return 0;
}
#endif
#ifdef HAVE_IOCTLSOCKET_CASE
#include <windows.h>
int
main ()
{
/* IoctlSocket source code */
int socket;
int flags = IoctlSocket(socket, FIONBIO, (long)1);
;
return 0;
}
#endif
#ifdef HAVE_FIONBIO
/* headers for FIONBIO test */
#include <unistd.h>
#include <stropts.h>
int
main ()
{
/* FIONBIO source test (old-style unix) */
int socket;
int flags = ioctl(socket, FIONBIO, &flags);
;
return 0;
}
#endif
#ifdef HAVE_SO_NONBLOCK
/* headers for SO_NONBLOCK test (BeOS) */
#include <sys/types.h>
#include <unistd.h>
#include <fcntl.h>
int main()
{
/* SO_NONBLOCK source code */
long b = 1;
int socket;
int flags = setsockopt(socket, SOL_SOCKET, SO_NONBLOCK, &b, sizeof(b));
return 0;
}
#endif
#ifdef HAVE_GLIBC_STRERROR_R
#include <string.h>
#include <errno.h>
int
main () {
char buffer[1024]; /* big enough to play with */
char *string =
strerror_r(EACCES, buffer, sizeof(buffer));
/* this should've returned a string */
if(!string || !string[0])
return 99;
return 0;
}
#endif
#ifdef HAVE_POSIX_STRERROR_R
#include <string.h>
#include <errno.h>
int
main () {
char buffer[1024]; /* big enough to play with */
int error =
strerror_r(EACCES, buffer, sizeof(buffer));
/* This should've returned zero, and written an error string in the
buffer.*/
if(!buffer[0] || error)
return 99;
return 0;
}
#endif
|
the_stack_data/225142981.c
|
void foo(void);
void foo(void)
{
float f = 0.0;
f = 3.0;
}
|
the_stack_data/132954280.c
|
/* Declarations for math functions.
Copyright (C) 1991-1993,1995-1999,2001,2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
/*
* ISO C99 Standard: 7.12 Mathematics <math.h>
*/
/* Copyright (C) 1991-1993,1995-2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
/* These are defined by the user (or the compiler)
to specify the desired environment:
__STRICT_ANSI__ ISO Standard C.
_ISOC99_SOURCE Extensions to ISO C89 from ISO C99.
_POSIX_SOURCE IEEE Std 1003.1.
_POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2;
if >=199309L, add IEEE Std 1003.1b-1993;
if >=199506L, add IEEE Std 1003.1c-1995
_XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if
Single Unix conformance is wanted, to 600 for the
upcoming sixth revision.
_XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions.
_LARGEFILE_SOURCE Some more functions for correct standard I/O.
_LARGEFILE64_SOURCE Additional functionality from LFS for large files.
_FILE_OFFSET_BITS=N Select default filesystem interface.
_BSD_SOURCE ISO C, POSIX, and 4.3BSD things.
_SVID_SOURCE ISO C, POSIX, and SVID things.
_GNU_SOURCE All of the above, plus GNU extensions.
_REENTRANT Select additionally reentrant object.
_THREAD_SAFE Same as _REENTRANT, often used by other systems.
The `-ansi' switch to the GNU C compiler defines __STRICT_ANSI__.
If none of these are defined, the default is to have _SVID_SOURCE,
_BSD_SOURCE, and _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to
199506L. If more than one of these are defined, they accumulate.
For example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE
together give you ISO C, 1003.1, and 1003.2, but nothing else.
These are defined by this file and are used by the
header files to decide what to declare or define:
__USE_ISOC99 Define ISO C99 things.
__USE_POSIX Define IEEE Std 1003.1 things.
__USE_POSIX2 Define IEEE Std 1003.2 things.
__USE_POSIX199309 Define IEEE Std 1003.1, and .1b things.
__USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things.
__USE_XOPEN Define XPG things.
__USE_XOPEN_EXTENDED Define X/Open Unix things.
__USE_UNIX98 Define Single Unix V2 things.
__USE_XOPEN2K Define XPG6 things.
__USE_LARGEFILE Define correct standard I/O things.
__USE_LARGEFILE64 Define LFS things with separate names.
__USE_FILE_OFFSET64 Define 64bit interface as default.
__USE_BSD Define 4.3BSD things.
__USE_SVID Define SVID things.
__USE_MISC Define things common to BSD and System V Unix.
__USE_GNU Define GNU extensions.
__USE_REENTRANT Define reentrant/thread-safe *_r functions.
__FAVOR_BSD Favor 4.3BSD things in cases of conflict.
The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are
defined by this file unconditionally. `__GNU_LIBRARY__' is provided
only for compatibility. All new code should use the other symbols
to test for features.
All macros listed above as possibly being defined by this file are
explicitly undefined if they are not explicitly defined.
Feature-test macros that are not defined by the user or compiler
but are implied by the other feature-test macros defined (or by the
lack of any definitions) are defined by the file. */
/* Undefine everything, so we get a clean slate. */
/* Suppress kernel-name space pollution unless user expressedly asks
for it. */
/* Always use ISO C things. */
/* If _BSD_SOURCE was defined by the user, favor BSD over POSIX. */
/* If _GNU_SOURCE was defined by the user, turn on all the other features. */
/* If nothing (other than _GNU_SOURCE) is defined,
define _BSD_SOURCE and _SVID_SOURCE. */
/* This is to enable the ISO C99 extension. Also recognize the old macro
which was used prior to the standard acceptance. This macro will
eventually go away and the features enabled by default once the ISO C99
standard is widely adopted. */
/* If none of the ANSI/POSIX macros are defined, use POSIX.1 and POSIX.2
(and IEEE Std 1003.1b-1993 unless _XOPEN_SOURCE is defined). */
/* We do support the IEC 559 math functionality, real and complex. */
/* wchar_t uses ISO 10646-1 (2nd ed., published 2000-09-15) / Unicode 3.1. */
/* This macro indicates that the installed library is the GNU C Library.
For historic reasons the value now is 6 and this will stay from now
on. The use of this variable is deprecated. Use __GLIBC__ and
__GLIBC_MINOR__ now (see below) when you want to test for a specific
GNU C library version and use the values in <gnu/lib-names.h> to get
the sonames of the shared libraries. */
/* Major and minor version number of the GNU C library package. Use
these macros to test for features in specific releases. */
/* Convenience macros to test the versions of glibc and gcc.
Use them like this:
#if __GNUC_PREREQ (2,8)
... code requiring gcc 2.8 or later ...
#endif
Note - they won't work for gcc1 or glibc1, since the _MINOR macros
were not defined then. */
/* Decide whether a compiler supports the long long datatypes. */
/* This is here only because every header file already includes this one. */
/* Copyright (C) 1992-2001, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
/* We are almost always included from features.h. */
/* The GNU libc does not support any K&R compilers or the traditional mode
of ISO C compilers anymore. Check for some of the combinations not
anymore supported. */
/* Some user header file might have defined this before. */
/* For these things, GCC behaves the ANSI way normally,
and the non-ANSI way under -traditional. */
/* This is not a typedef so `const __ptr_t' does the right thing. */
/* C++ needs to know that types and declarations are C, not C++. */
/* The standard library needs the functions from the ISO C90 standard
in the std namespace. At the same time we want to be safe for
future changes and we include the ISO C99 code in the non-standard
namespace __c99. The C++ wrapper header take case of adding the
definitions to the global namespace. */
/* For compatibility we do not add the declarations into any
namespace. They will end up in the global namespace which is what
old code expects. */
/* Support for bounded pointers. */
/* Support for flexible arrays. */
/* Some other non-C99 compiler. Approximate with [1]. */
/* __asm__ ("xyz") is used throughout the headers to rename functions
at the assembly language level. This is wrapped by the __REDIRECT
macro, in order to support compilers that can do this some other
way. When compilers don't support asm-names at all, we have to do
preprocessor tricks instead (which don't have exactly the right
semantics, but it's the best we can do).
Example:
int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid); */
/* GCC has various useful declarations that can be made with the
`__attribute__' syntax. All of the ways we use this do fine if
they are omitted for compilers that don't understand it. */
/* At some point during the gcc 2.96 development the `malloc' attribute
for functions was introduced. We don't want to use it unconditionally
(although this would be possible) since it generates warnings. */
/* At some point during the gcc 2.96 development the `pure' attribute
for functions was introduced. We don't want to use it unconditionally
(although this would be possible) since it generates warnings. */
/* At some point during the gcc 3.1 development the `used' attribute
for functions was introduced. We don't want to use it unconditionally
(although this would be possible) since it generates warnings. */
/* gcc allows marking deprecated functions. */
/* At some point during the gcc 2.8 development the `format_arg' attribute
for functions was introduced. We don't want to use it unconditionally
(although this would be possible) since it generates warnings.
If several `format_arg' attributes are given for the same function, in
gcc-3.0 and older, all but the last one are ignored. In newer gccs,
all designated arguments are considered. */
/* At some point during the gcc 2.97 development the `strfmon' format
attribute for functions was introduced. We don't want to use it
unconditionally (although this would be possible) since it
generates warnings. */
/* It is possible to compile containing GCC extensions even if GCC is
run in pedantic mode if the uses are carefully marked using the
`__extension__' keyword. But this is not generally available before
version 2.8. */
/* __restrict is known in EGCS 1.2 and above. */
/* ISO C99 also allows to declare arrays as non-overlapping. The syntax is
array_name[restrict]
GCC 3.1 supports this. */
/* Some other non-C99 compiler. */
/* If we don't have __REDIRECT, prototypes will be missing if
__USE_FILE_OFFSET64 but not __USE_LARGEFILE[64]. */
/* Decide whether we can define 'extern inline' functions in headers. */
/* This is here only because every header file already includes this one.
Get the definitions of all the appropriate `__stub_FUNCTION' symbols.
<gnu/stubs.h> contains `#define __stub_FUNCTION' when FUNCTION is a stub
that will always return failure (and set errno to ENOSYS). */
/* This file is automatically generated.
It defines a symbol `__stub_FUNCTION' for each function
in the C library which is a stub, meaning it will fail
every time called, usually setting errno to ENOSYS. */
/* Get machine-dependent HUGE_VAL value (returned on overflow).
On all IEEE754 machines, this is +Infinity. */
/* `HUGE_VAL' constants for ix86 (where it is infinity).
Used by <stdlib.h> and <math.h> functions for overflow.
Copyright (C) 1992, 1995, 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
/* Copyright (C) 1991-1993,1995-2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
/* IEEE positive infinity (-HUGE_VAL is negative infinity). */
static union { unsigned char __c[8]; double __d; } __huge_val = { { 0, 0, 0, 0, 0, 0, 0xf0, 0x7f } };
/* ISO C99 extensions: (float) HUGE_VALF and (long double) HUGE_VALL. */
/* Get machine-dependent NAN value (returned for some domain errors). */
/* Get general and ISO C99 specific information. */
/* Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
/* The file <bits/mathcalls.h> contains the prototypes for all the
actual math functions. These macros are used for those prototypes,
so we can easily declare each function as both `name' and `__name',
and can declare the float versions `namef' and `__namef'. */
/* Prototype declarations for math functions; helper file for <math.h>.
Copyright (C) 1996-2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
/* NOTE: Because of the special way this file is used by <math.h>, this
file must NOT be protected from multiple inclusion as header files
usually are.
This file provides prototype declarations for the math functions.
Most functions are declared using the macro:
__MATHCALL (NAME,[_r], (ARGS...));
This means there is a function `NAME' returning `double' and a function
`NAMEf' returning `float'. Each place `_Mdouble_' appears in the
prototype, that is actually `double' in the prototype for `NAME' and
`float' in the prototype for `NAMEf'. Reentrant variant functions are
called `NAME_r' and `NAMEf_r'.
Functions returning other types like `int' are declared using the macro:
__MATHDECL (TYPE, NAME,[_r], (ARGS...));
This is just like __MATHCALL but for a function returning `TYPE'
instead of `_Mdouble_'. In all of these cases, there is still
both a `NAME' and a `NAMEf' that takes `float' arguments.
Note that there must be no whitespace before the argument passed for
NAME, to make token pasting work with -traditional. */
/* Trigonometric functions. */
/* Arc cosine of X. */
extern double acos (double __x) ; extern double __acos (double __x) ;
/* Arc sine of X. */
extern double asin (double __x) ; extern double __asin (double __x) ;
/* Arc tangent of X. */
extern double atan (double __x) ; extern double __atan (double __x) ;
/* Arc tangent of Y/X. */
extern double atan2 (double __y, double __x) ; extern double __atan2 (double __y, double __x) ;
/* Cosine of X. */
extern double cos (double __x) ; extern double __cos (double __x) ;
/* Sine of X. */
extern double sin (double __x) ; extern double __sin (double __x) ;
/* Tangent of X. */
extern double tan (double __x) ; extern double __tan (double __x) ;
/* Hyperbolic functions. */
/* Hyperbolic cosine of X. */
extern double cosh (double __x) ; extern double __cosh (double __x) ;
/* Hyperbolic sine of X. */
extern double sinh (double __x) ; extern double __sinh (double __x) ;
/* Hyperbolic tangent of X. */
extern double tanh (double __x) ; extern double __tanh (double __x) ;
/* Hyperbolic arc cosine of X. */
extern double acosh (double __x) ; extern double __acosh (double __x) ;
/* Hyperbolic arc sine of X. */
extern double asinh (double __x) ; extern double __asinh (double __x) ;
/* Hyperbolic arc tangent of X. */
extern double atanh (double __x) ; extern double __atanh (double __x) ;
/* Exponential and logarithmic functions. */
/* Exponential function of X. */
extern double exp (double __x) ; extern double __exp (double __x) ;
/* Break VALUE into a normalized fraction and an integral power of 2. */
extern double frexp (double __x, int *__exponent) ; extern double __frexp (double __x, int *__exponent) ;
/* X times (two to the EXP power). */
extern double ldexp (double __x, int __exponent) ; extern double __ldexp (double __x, int __exponent) ;
/* Natural logarithm of X. */
extern double log (double __x) ; extern double __log (double __x) ;
/* Base-ten logarithm of X. */
extern double log10 (double __x) ; extern double __log10 (double __x) ;
/* Break VALUE into integral and fractional parts. */
extern double modf (double __x, double *__iptr) ; extern double __modf (double __x, double *__iptr) ;
/* Return exp(X) - 1. */
extern double expm1 (double __x) ; extern double __expm1 (double __x) ;
/* Return log(1 + X). */
extern double log1p (double __x) ; extern double __log1p (double __x) ;
/* Return the base 2 signed integral exponent of X. */
extern double logb (double __x) ; extern double __logb (double __x) ;
/* Power functions. */
/* Return X to the Y power. */
extern double pow (double __x, double __y) ; extern double __pow (double __x, double __y) ;
/* Return the square root of X. */
extern double sqrt (double __x) ; extern double __sqrt (double __x) ;
/* Return `sqrt(X*X + Y*Y)'. */
extern double hypot (double __x, double __y) ; extern double __hypot (double __x, double __y) ;
/* Return the cube root of X. */
extern double cbrt (double __x) ; extern double __cbrt (double __x) ;
/* Nearest integer, absolute value, and remainder functions. */
/* Smallest integral value not less than X. */
extern double ceil (double __x) ; extern double __ceil (double __x) ;
/* Absolute value of X. */
extern double fabs (double __x) ; extern double __fabs (double __x) ;
/* Largest integer not greater than X. */
extern double floor (double __x) ; extern double __floor (double __x) ;
/* Floating-point modulo remainder of X/Y. */
extern double fmod (double __x, double __y) ; extern double __fmod (double __x, double __y) ;
/* Return 0 if VALUE is finite or NaN, +1 if it
is +Infinity, -1 if it is -Infinity. */
extern int __isinf (double __value) ;
/* Return nonzero if VALUE is finite and not NaN. */
extern int __finite (double __value) ;
/* Return 0 if VALUE is finite or NaN, +1 if it
is +Infinity, -1 if it is -Infinity. */
extern int isinf (double __value) ;
/* Return nonzero if VALUE is finite and not NaN. */
extern int finite (double __value) ;
/* Return the remainder of X/Y. */
extern double drem (double __x, double __y) ; extern double __drem (double __x, double __y) ;
/* Return the fractional part of X after dividing out `ilogb (X)'. */
extern double significand (double __x) ; extern double __significand (double __x) ;
/* Return X with its signed changed to Y's. */
extern double copysign (double __x, double __y) ; extern double __copysign (double __x, double __y) ;
/* Return nonzero if VALUE is not a number. */
extern int __isnan (double __value) ;
/* Return nonzero if VALUE is not a number. */
extern int isnan (double __value) ;
/* Bessel functions. */
extern double j0 (double) ; extern double __j0 (double) ;
extern double j1 (double) ; extern double __j1 (double) ;
extern double jn (int, double) ; extern double __jn (int, double) ;
extern double y0 (double) ; extern double __y0 (double) ;
extern double y1 (double) ; extern double __y1 (double) ;
extern double yn (int, double) ; extern double __yn (int, double) ;
/* Error and gamma functions. */
extern double erf (double) ; extern double __erf (double) ;
extern double erfc (double) ; extern double __erfc (double) ;
extern double lgamma (double) ; extern double __lgamma (double) ;
/* Obsolete alias for `lgamma'. */
extern double gamma (double) ; extern double __gamma (double) ;
/* Reentrant version of lgamma. This function uses the global variable
`signgam'. The reentrant version instead takes a pointer and stores
the value through it. */
extern double lgamma_r (double, int *__signgamp) ; extern double __lgamma_r (double, int *__signgamp) ;
/* Return the integer nearest X in the direction of the
prevailing rounding mode. */
extern double rint (double __x) ; extern double __rint (double __x) ;
/* Return X + epsilon if X < Y, X - epsilon if X > Y. */
extern double nextafter (double __x, double __y) ; extern double __nextafter (double __x, double __y) ;
/* Return the remainder of integer divison X / Y with infinite precision. */
extern double remainder (double __x, double __y) ; extern double __remainder (double __x, double __y) ;
/* Return X times (2 to the Nth power). */
extern double scalbn (double __x, int __n) ; extern double __scalbn (double __x, int __n) ;
/* Return the binary exponent of X, which must be nonzero. */
extern int ilogb (double __x) ; extern int __ilogb (double __x) ;
/* Include the file of declarations again, this time using `float'
instead of `double' and appending f to each function name. */
/* Prototype declarations for math functions; helper file for <math.h>.
Copyright (C) 1996-2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
/* NOTE: Because of the special way this file is used by <math.h>, this
file must NOT be protected from multiple inclusion as header files
usually are.
This file provides prototype declarations for the math functions.
Most functions are declared using the macro:
__MATHCALL (NAME,[_r], (ARGS...));
This means there is a function `NAME' returning `double' and a function
`NAMEf' returning `float'. Each place `_Mdouble_' appears in the
prototype, that is actually `double' in the prototype for `NAME' and
`float' in the prototype for `NAMEf'. Reentrant variant functions are
called `NAME_r' and `NAMEf_r'.
Functions returning other types like `int' are declared using the macro:
__MATHDECL (TYPE, NAME,[_r], (ARGS...));
This is just like __MATHCALL but for a function returning `TYPE'
instead of `_Mdouble_'. In all of these cases, there is still
both a `NAME' and a `NAMEf' that takes `float' arguments.
Note that there must be no whitespace before the argument passed for
NAME, to make token pasting work with -traditional. */
/* Trigonometric functions. */
/* Arc cosine of X. */
extern float acosf (float __x) ; extern float __acosf (float __x) ;
/* Arc sine of X. */
extern float asinf (float __x) ; extern float __asinf (float __x) ;
/* Arc tangent of X. */
extern float atanf (float __x) ; extern float __atanf (float __x) ;
/* Arc tangent of Y/X. */
extern float atan2f (float __y, float __x) ; extern float __atan2f (float __y, float __x) ;
/* Cosine of X. */
extern float cosf (float __x) ; extern float __cosf (float __x) ;
/* Sine of X. */
extern float sinf (float __x) ; extern float __sinf (float __x) ;
/* Tangent of X. */
extern float tanf (float __x) ; extern float __tanf (float __x) ;
/* Hyperbolic functions. */
/* Hyperbolic cosine of X. */
extern float coshf (float __x) ; extern float __coshf (float __x) ;
/* Hyperbolic sine of X. */
extern float sinhf (float __x) ; extern float __sinhf (float __x) ;
/* Hyperbolic tangent of X. */
extern float tanhf (float __x) ; extern float __tanhf (float __x) ;
/* Hyperbolic arc cosine of X. */
extern float acoshf (float __x) ; extern float __acoshf (float __x) ;
/* Hyperbolic arc sine of X. */
extern float asinhf (float __x) ; extern float __asinhf (float __x) ;
/* Hyperbolic arc tangent of X. */
extern float atanhf (float __x) ; extern float __atanhf (float __x) ;
/* Exponential and logarithmic functions. */
/* Exponential function of X. */
extern float expf (float __x) ; extern float __expf (float __x) ;
/* Break VALUE into a normalized fraction and an integral power of 2. */
extern float frexpf (float __x, int *__exponent) ; extern float __frexpf (float __x, int *__exponent) ;
/* X times (two to the EXP power). */
extern float ldexpf (float __x, int __exponent) ; extern float __ldexpf (float __x, int __exponent) ;
/* Natural logarithm of X. */
extern float logf (float __x) ; extern float __logf (float __x) ;
/* Base-ten logarithm of X. */
extern float log10f (float __x) ; extern float __log10f (float __x) ;
/* Break VALUE into integral and fractional parts. */
extern float modff (float __x, float *__iptr) ; extern float __modff (float __x, float *__iptr) ;
/* Return exp(X) - 1. */
extern float expm1f (float __x) ; extern float __expm1f (float __x) ;
/* Return log(1 + X). */
extern float log1pf (float __x) ; extern float __log1pf (float __x) ;
/* Return the base 2 signed integral exponent of X. */
extern float logbf (float __x) ; extern float __logbf (float __x) ;
/* Power functions. */
/* Return X to the Y power. */
extern float powf (float __x, float __y) ; extern float __powf (float __x, float __y) ;
/* Return the square root of X. */
extern float sqrtf (float __x) ; extern float __sqrtf (float __x) ;
/* Return `sqrt(X*X + Y*Y)'. */
extern float hypotf (float __x, float __y) ; extern float __hypotf (float __x, float __y) ;
/* Return the cube root of X. */
extern float cbrtf (float __x) ; extern float __cbrtf (float __x) ;
/* Nearest integer, absolute value, and remainder functions. */
/* Smallest integral value not less than X. */
extern float ceilf (float __x) ; extern float __ceilf (float __x) ;
/* Absolute value of X. */
extern float fabsf (float __x) ; extern float __fabsf (float __x) ;
/* Largest integer not greater than X. */
extern float floorf (float __x) ; extern float __floorf (float __x) ;
/* Floating-point modulo remainder of X/Y. */
extern float fmodf (float __x, float __y) ; extern float __fmodf (float __x, float __y) ;
/* Return 0 if VALUE is finite or NaN, +1 if it
is +Infinity, -1 if it is -Infinity. */
extern int __isinff (float __value) ;
/* Return nonzero if VALUE is finite and not NaN. */
extern int __finitef (float __value) ;
/* Return 0 if VALUE is finite or NaN, +1 if it
is +Infinity, -1 if it is -Infinity. */
extern int isinff (float __value) ;
/* Return nonzero if VALUE is finite and not NaN. */
extern int finitef (float __value) ;
/* Return the remainder of X/Y. */
extern float dremf (float __x, float __y) ; extern float __dremf (float __x, float __y) ;
/* Return the fractional part of X after dividing out `ilogb (X)'. */
extern float significandf (float __x) ; extern float __significandf (float __x) ;
/* Return X with its signed changed to Y's. */
extern float copysignf (float __x, float __y) ; extern float __copysignf (float __x, float __y) ;
/* Return nonzero if VALUE is not a number. */
extern int __isnanf (float __value) ;
/* Return nonzero if VALUE is not a number. */
extern int isnanf (float __value) ;
/* Bessel functions. */
extern float j0f (float) ; extern float __j0f (float) ;
extern float j1f (float) ; extern float __j1f (float) ;
extern float jnf (int, float) ; extern float __jnf (int, float) ;
extern float y0f (float) ; extern float __y0f (float) ;
extern float y1f (float) ; extern float __y1f (float) ;
extern float ynf (int, float) ; extern float __ynf (int, float) ;
/* Error and gamma functions. */
extern float erff (float) ; extern float __erff (float) ;
extern float erfcf (float) ; extern float __erfcf (float) ;
extern float lgammaf (float) ; extern float __lgammaf (float) ;
/* Obsolete alias for `lgamma'. */
extern float gammaf (float) ; extern float __gammaf (float) ;
/* Reentrant version of lgamma. This function uses the global variable
`signgam'. The reentrant version instead takes a pointer and stores
the value through it. */
extern float lgammaf_r (float, int *__signgamp) ; extern float __lgammaf_r (float, int *__signgamp) ;
/* Return the integer nearest X in the direction of the
prevailing rounding mode. */
extern float rintf (float __x) ; extern float __rintf (float __x) ;
/* Return X + epsilon if X < Y, X - epsilon if X > Y. */
extern float nextafterf (float __x, float __y) ; extern float __nextafterf (float __x, float __y) ;
/* Return the remainder of integer divison X / Y with infinite precision. */
extern float remainderf (float __x, float __y) ; extern float __remainderf (float __x, float __y) ;
/* Return X times (2 to the Nth power). */
extern float scalbnf (float __x, int __n) ; extern float __scalbnf (float __x, int __n) ;
/* Return the binary exponent of X, which must be nonzero. */
extern int ilogbf (float __x) ; extern int __ilogbf (float __x) ;
/* Include the file of declarations again, this time using `long double'
instead of `double' and appending l to each function name. */
/* Prototype declarations for math functions; helper file for <math.h>.
Copyright (C) 1996-2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
/* NOTE: Because of the special way this file is used by <math.h>, this
file must NOT be protected from multiple inclusion as header files
usually are.
This file provides prototype declarations for the math functions.
Most functions are declared using the macro:
__MATHCALL (NAME,[_r], (ARGS...));
This means there is a function `NAME' returning `double' and a function
`NAMEf' returning `float'. Each place `_Mdouble_' appears in the
prototype, that is actually `double' in the prototype for `NAME' and
`float' in the prototype for `NAMEf'. Reentrant variant functions are
called `NAME_r' and `NAMEf_r'.
Functions returning other types like `int' are declared using the macro:
__MATHDECL (TYPE, NAME,[_r], (ARGS...));
This is just like __MATHCALL but for a function returning `TYPE'
instead of `_Mdouble_'. In all of these cases, there is still
both a `NAME' and a `NAMEf' that takes `float' arguments.
Note that there must be no whitespace before the argument passed for
NAME, to make token pasting work with -traditional. */
/* Trigonometric functions. */
/* Arc cosine of X. */
extern long double acosl (long double __x) ; extern long double __acosl (long double __x) ;
/* Arc sine of X. */
extern long double asinl (long double __x) ; extern long double __asinl (long double __x) ;
/* Arc tangent of X. */
extern long double atanl (long double __x) ; extern long double __atanl (long double __x) ;
/* Arc tangent of Y/X. */
extern long double atan2l (long double __y, long double __x) ; extern long double __atan2l (long double __y, long double __x) ;
/* Cosine of X. */
extern long double cosl (long double __x) ; extern long double __cosl (long double __x) ;
/* Sine of X. */
extern long double sinl (long double __x) ; extern long double __sinl (long double __x) ;
/* Tangent of X. */
extern long double tanl (long double __x) ; extern long double __tanl (long double __x) ;
/* Hyperbolic functions. */
/* Hyperbolic cosine of X. */
extern long double coshl (long double __x) ; extern long double __coshl (long double __x) ;
/* Hyperbolic sine of X. */
extern long double sinhl (long double __x) ; extern long double __sinhl (long double __x) ;
/* Hyperbolic tangent of X. */
extern long double tanhl (long double __x) ; extern long double __tanhl (long double __x) ;
/* Hyperbolic arc cosine of X. */
extern long double acoshl (long double __x) ; extern long double __acoshl (long double __x) ;
/* Hyperbolic arc sine of X. */
extern long double asinhl (long double __x) ; extern long double __asinhl (long double __x) ;
/* Hyperbolic arc tangent of X. */
extern long double atanhl (long double __x) ; extern long double __atanhl (long double __x) ;
/* Exponential and logarithmic functions. */
/* Exponential function of X. */
extern long double expl (long double __x) ; extern long double __expl (long double __x) ;
/* Break VALUE into a normalized fraction and an integral power of 2. */
extern long double frexpl (long double __x, int *__exponent) ; extern long double __frexpl (long double __x, int *__exponent) ;
/* X times (two to the EXP power). */
extern long double ldexpl (long double __x, int __exponent) ; extern long double __ldexpl (long double __x, int __exponent) ;
/* Natural logarithm of X. */
extern long double logl (long double __x) ; extern long double __logl (long double __x) ;
/* Base-ten logarithm of X. */
extern long double log10l (long double __x) ; extern long double __log10l (long double __x) ;
/* Break VALUE into integral and fractional parts. */
extern long double modfl (long double __x, long double *__iptr) ; extern long double __modfl (long double __x, long double *__iptr) ;
/* Return exp(X) - 1. */
extern long double expm1l (long double __x) ; extern long double __expm1l (long double __x) ;
/* Return log(1 + X). */
extern long double log1pl (long double __x) ; extern long double __log1pl (long double __x) ;
/* Return the base 2 signed integral exponent of X. */
extern long double logbl (long double __x) ; extern long double __logbl (long double __x) ;
/* Power functions. */
/* Return X to the Y power. */
extern long double powl (long double __x, long double __y) ; extern long double __powl (long double __x, long double __y) ;
/* Return the square root of X. */
extern long double sqrtl (long double __x) ; extern long double __sqrtl (long double __x) ;
/* Return `sqrt(X*X + Y*Y)'. */
extern long double hypotl (long double __x, long double __y) ; extern long double __hypotl (long double __x, long double __y) ;
/* Return the cube root of X. */
extern long double cbrtl (long double __x) ; extern long double __cbrtl (long double __x) ;
/* Nearest integer, absolute value, and remainder functions. */
/* Smallest integral value not less than X. */
extern long double ceill (long double __x) ; extern long double __ceill (long double __x) ;
/* Absolute value of X. */
extern long double fabsl (long double __x) ; extern long double __fabsl (long double __x) ;
/* Largest integer not greater than X. */
extern long double floorl (long double __x) ; extern long double __floorl (long double __x) ;
/* Floating-point modulo remainder of X/Y. */
extern long double fmodl (long double __x, long double __y) ; extern long double __fmodl (long double __x, long double __y) ;
/* Return 0 if VALUE is finite or NaN, +1 if it
is +Infinity, -1 if it is -Infinity. */
extern int __isinfl (long double __value) ;
/* Return nonzero if VALUE is finite and not NaN. */
extern int __finitel (long double __value) ;
/* Return 0 if VALUE is finite or NaN, +1 if it
is +Infinity, -1 if it is -Infinity. */
extern int isinfl (long double __value) ;
/* Return nonzero if VALUE is finite and not NaN. */
extern int finitel (long double __value) ;
/* Return the remainder of X/Y. */
extern long double dreml (long double __x, long double __y) ; extern long double __dreml (long double __x, long double __y) ;
/* Return the fractional part of X after dividing out `ilogb (X)'. */
extern long double significandl (long double __x) ; extern long double __significandl (long double __x) ;
/* Return X with its signed changed to Y's. */
extern long double copysignl (long double __x, long double __y) ; extern long double __copysignl (long double __x, long double __y) ;
/* Return nonzero if VALUE is not a number. */
extern int __isnanl (long double __value) ;
/* Return nonzero if VALUE is not a number. */
extern int isnanl (long double __value) ;
/* Bessel functions. */
extern long double j0l (long double) ; extern long double __j0l (long double) ;
extern long double j1l (long double) ; extern long double __j1l (long double) ;
extern long double jnl (int, long double) ; extern long double __jnl (int, long double) ;
extern long double y0l (long double) ; extern long double __y0l (long double) ;
extern long double y1l (long double) ; extern long double __y1l (long double) ;
extern long double ynl (int, long double) ; extern long double __ynl (int, long double) ;
/* Error and gamma functions. */
extern long double erfl (long double) ; extern long double __erfl (long double) ;
extern long double erfcl (long double) ; extern long double __erfcl (long double) ;
extern long double lgammal (long double) ; extern long double __lgammal (long double) ;
/* Obsolete alias for `lgamma'. */
extern long double gammal (long double) ; extern long double __gammal (long double) ;
/* Reentrant version of lgamma. This function uses the global variable
`signgam'. The reentrant version instead takes a pointer and stores
the value through it. */
extern long double lgammal_r (long double, int *__signgamp) ; extern long double __lgammal_r (long double, int *__signgamp) ;
/* Return the integer nearest X in the direction of the
prevailing rounding mode. */
extern long double rintl (long double __x) ; extern long double __rintl (long double __x) ;
/* Return X + epsilon if X < Y, X - epsilon if X > Y. */
extern long double nextafterl (long double __x, long double __y) ; extern long double __nextafterl (long double __x, long double __y) ;
/* Return the remainder of integer divison X / Y with infinite precision. */
extern long double remainderl (long double __x, long double __y) ; extern long double __remainderl (long double __x, long double __y) ;
/* Return X times (2 to the Nth power). */
extern long double scalbnl (long double __x, int __n) ; extern long double __scalbnl (long double __x, int __n) ;
/* Return the binary exponent of X, which must be nonzero. */
extern int ilogbl (long double __x) ; extern int __ilogbl (long double __x) ;
/* This variable is used by `gamma' and `lgamma'. */
extern int signgam;
/* ISO C99 defines some generic macros which work on any data type. */
/* Support for various different standard error handling behaviors. */
typedef enum
{
_IEEE_ = -1, /* According to IEEE 754/IEEE 854. */
_SVID_, /* According to System V, release 4. */
_XOPEN_, /* Nowadays also Unix98. */
_POSIX_,
_ISOC_ /* Actually this is ISO C99. */
} _LIB_VERSION_TYPE;
/* This variable can be changed at run-time to any of the values above to
affect floating point error handling behavior (it may also be necessary
to change the hardware FPU exception settings). */
extern _LIB_VERSION_TYPE _LIB_VERSION;
/* In SVID error handling, `matherr' is called with this description
of the exceptional condition.
We have a problem when using C++ since `exception' is a reserved
name in C++. */
struct exception
{
int type;
char *name;
double arg1;
double arg2;
double retval;
};
extern int matherr (struct exception *__exc);
/* Types of exceptions in the `type' field. */
/* SVID mode specifies returning this large value instead of infinity. */
/* Some useful constants. */
/* The above constants are not adequate for computation using `long double's.
Therefore we provide as an extension constants with similar names as a
GNU extension. Provide enough digits for the 128-bit IEEE quad. */
/* When compiling in strict ISO C compatible mode we must not use the
inline functions since they, among other things, do not set the
`errno' variable correctly. */
/* Get machine-dependent inline versions (if there are any). */
void pearsn(x,y,n,r,prob,z)
float x[],y[],*r,*prob,*z;
int n;
{
int j;
float yt,xt,t,df;
float syy=0.0,sxy=0.0,sxx=0.0,ay=0.0,ax=0.0;
float betai(),erfcc();
for (j=1;j<=n;j++) {
ax += x[j];
ay += y[j];
}
ax /= n;
ay /= n;
for (j=1;j<=n;j++) {
xt=x[j]-ax;
yt=y[j]-ay;
sxx += xt*xt;
syy += yt*yt;
sxy += xt*yt;
}
*r=sxy/sqrt(sxx*syy);
*z=0.5*log((1.0+(*r)+1.0e-20)/(1.0-(*r)+1.0e-20));
df=n-2;
t=(*r)*sqrt(df/((1.0-(*r)+1.0e-20)*(1.0+(*r)+1.0e-20)));
*prob=betai(0.5*df,0.5,df/(df+t*t));
/* *prob=erfcc(fabs((*z)*sqrt(n-1.0))/1.4142136) */
}
|
the_stack_data/572095.c
|
#include <stdio.h>
#include <stdlib.h>
typedef struct Stack
{
char name[20];
struct Stack *previous, *next;
} Stack;
Stack *top, *helper;
int verify_if_stack_is_empty()
{
if (top != NULL)
return 1;
printf("\nNo elements in stack\n");
system("pause");
return 0;
}
void enter_data()
{
printf("\nInsert the name of this element: ");
scanf("%s", &top->name);
}
void consult()
{
if (verify_if_stack_is_empty() == 0)
return;
printf("Item on top of the stack: %s", top->name);
}
void pop()
{
if (verify_if_stack_is_empty() == 0)
return;
if (top->previous == NULL) {
free(top);
top = NULL;
printf("End item of stack removed");
return;
}
helper = top;
top = top->previous;
top->next = NULL;
free(helper);
printf("\nElement removed from the stack");
}
void push()
{
if (top == NULL)
{
top = malloc(sizeof(Stack));
top->previous = NULL;
top->next = NULL;
helper = top;
enter_data();
return;
}
top = malloc(sizeof(Stack));
helper->next = top;
top->previous = helper;
top->next = NULL;
helper = top;
enter_data();
}
void list()
{
if (verify_if_stack_is_empty() == 0)
return;
helper = top;
while (helper != NULL) {
printf("\nI'm in the %s element", helper->name);
helper = helper->previous;
}
printf("\n");
helper = NULL;
}
int main()
{
int option;
do
{
fflush(stdin);
printf("\n --- Stack ---");
printf("\n [1] - Insert element in the stack");
printf("\n [2] - Remove element from the stack");
printf("\n [3] - Consult element in the stack");
printf("\n [4] - List all the elements in the stack (for DEBUG)");
printf("\n [5] - Clear screen");
printf("\n Choose the option: ");
scanf("%d", &option);
switch (option)
{
case 1:
push();
break;
case 2:
pop();
break;
case 3:
consult();
break;
case 4:
list();
break;
case 5:
system("cls");
main();
break;
default:
printf("\n Invalid option... Try again");
system("pause");
}
} while (option != 5);
}
|
the_stack_data/75139009.c
|
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <complex.h>
#ifdef complex
#undef complex
#endif
#ifdef I
#undef I
#endif
#if defined(_WIN64)
typedef long long BLASLONG;
typedef unsigned long long BLASULONG;
#else
typedef long BLASLONG;
typedef unsigned long BLASULONG;
#endif
#ifdef LAPACK_ILP64
typedef BLASLONG blasint;
#if defined(_WIN64)
#define blasabs(x) llabs(x)
#else
#define blasabs(x) labs(x)
#endif
#else
typedef int blasint;
#define blasabs(x) abs(x)
#endif
typedef blasint integer;
typedef unsigned int uinteger;
typedef char *address;
typedef short int shortint;
typedef float real;
typedef double doublereal;
typedef struct { real r, i; } complex;
typedef struct { doublereal r, i; } doublecomplex;
#ifdef _MSC_VER
static inline _Fcomplex Cf(complex *z) {_Fcomplex zz={z->r , z->i}; return zz;}
static inline _Dcomplex Cd(doublecomplex *z) {_Dcomplex zz={z->r , z->i};return zz;}
static inline _Fcomplex * _pCf(complex *z) {return (_Fcomplex*)z;}
static inline _Dcomplex * _pCd(doublecomplex *z) {return (_Dcomplex*)z;}
#else
static inline _Complex float Cf(complex *z) {return z->r + z->i*_Complex_I;}
static inline _Complex double Cd(doublecomplex *z) {return z->r + z->i*_Complex_I;}
static inline _Complex float * _pCf(complex *z) {return (_Complex float*)z;}
static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*)z;}
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
typedef int logical;
typedef short int shortlogical;
typedef char logical1;
typedef char integer1;
#define TRUE_ (1)
#define FALSE_ (0)
/* Extern is for use with -E */
#ifndef Extern
#define Extern extern
#endif
/* I/O stuff */
typedef int flag;
typedef int ftnlen;
typedef int ftnint;
/*external read, write*/
typedef struct
{ flag cierr;
ftnint ciunit;
flag ciend;
char *cifmt;
ftnint cirec;
} cilist;
/*internal read, write*/
typedef struct
{ flag icierr;
char *iciunit;
flag iciend;
char *icifmt;
ftnint icirlen;
ftnint icirnum;
} icilist;
/*open*/
typedef struct
{ flag oerr;
ftnint ounit;
char *ofnm;
ftnlen ofnmlen;
char *osta;
char *oacc;
char *ofm;
ftnint orl;
char *oblnk;
} olist;
/*close*/
typedef struct
{ flag cerr;
ftnint cunit;
char *csta;
} cllist;
/*rewind, backspace, endfile*/
typedef struct
{ flag aerr;
ftnint aunit;
} alist;
/* inquire */
typedef struct
{ flag inerr;
ftnint inunit;
char *infile;
ftnlen infilen;
ftnint *inex; /*parameters in standard's order*/
ftnint *inopen;
ftnint *innum;
ftnint *innamed;
char *inname;
ftnlen innamlen;
char *inacc;
ftnlen inacclen;
char *inseq;
ftnlen inseqlen;
char *indir;
ftnlen indirlen;
char *infmt;
ftnlen infmtlen;
char *inform;
ftnint informlen;
char *inunf;
ftnlen inunflen;
ftnint *inrecl;
ftnint *innrec;
char *inblank;
ftnlen inblanklen;
} inlist;
#define VOID void
union Multitype { /* for multiple entry points */
integer1 g;
shortint h;
integer i;
/* longint j; */
real r;
doublereal d;
complex c;
doublecomplex z;
};
typedef union Multitype Multitype;
struct Vardesc { /* for Namelist */
char *name;
char *addr;
ftnlen *dims;
int type;
};
typedef struct Vardesc Vardesc;
struct Namelist {
char *name;
Vardesc **vars;
int nvars;
};
typedef struct Namelist Namelist;
#define abs(x) ((x) >= 0 ? (x) : -(x))
#define dabs(x) (fabs(x))
#define f2cmin(a,b) ((a) <= (b) ? (a) : (b))
#define f2cmax(a,b) ((a) >= (b) ? (a) : (b))
#define dmin(a,b) (f2cmin(a,b))
#define dmax(a,b) (f2cmax(a,b))
#define bit_test(a,b) ((a) >> (b) & 1)
#define bit_clear(a,b) ((a) & ~((uinteger)1 << (b)))
#define bit_set(a,b) ((a) | ((uinteger)1 << (b)))
#define abort_() { sig_die("Fortran abort routine called", 1); }
#define c_abs(z) (cabsf(Cf(z)))
#define c_cos(R,Z) { pCf(R)=ccos(Cf(Z)); }
#ifdef _MSC_VER
#define c_div(c, a, b) {Cf(c)._Val[0] = (Cf(a)._Val[0]/Cf(b)._Val[0]); Cf(c)._Val[1]=(Cf(a)._Val[1]/Cf(b)._Val[1]);}
#define z_div(c, a, b) {Cd(c)._Val[0] = (Cd(a)._Val[0]/Cd(b)._Val[0]); Cd(c)._Val[1]=(Cd(a)._Val[1]/df(b)._Val[1]);}
#else
#define c_div(c, a, b) {pCf(c) = Cf(a)/Cf(b);}
#define z_div(c, a, b) {pCd(c) = Cd(a)/Cd(b);}
#endif
#define c_exp(R, Z) {pCf(R) = cexpf(Cf(Z));}
#define c_log(R, Z) {pCf(R) = clogf(Cf(Z));}
#define c_sin(R, Z) {pCf(R) = csinf(Cf(Z));}
//#define c_sqrt(R, Z) {*(R) = csqrtf(Cf(Z));}
#define c_sqrt(R, Z) {pCf(R) = csqrtf(Cf(Z));}
#define d_abs(x) (fabs(*(x)))
#define d_acos(x) (acos(*(x)))
#define d_asin(x) (asin(*(x)))
#define d_atan(x) (atan(*(x)))
#define d_atn2(x, y) (atan2(*(x),*(y)))
#define d_cnjg(R, Z) { pCd(R) = conj(Cd(Z)); }
#define r_cnjg(R, Z) { pCf(R) = conjf(Cf(Z)); }
#define d_cos(x) (cos(*(x)))
#define d_cosh(x) (cosh(*(x)))
#define d_dim(__a, __b) ( *(__a) > *(__b) ? *(__a) - *(__b) : 0.0 )
#define d_exp(x) (exp(*(x)))
#define d_imag(z) (cimag(Cd(z)))
#define r_imag(z) (cimagf(Cf(z)))
#define d_int(__x) (*(__x)>0 ? floor(*(__x)) : -floor(- *(__x)))
#define r_int(__x) (*(__x)>0 ? floor(*(__x)) : -floor(- *(__x)))
#define d_lg10(x) ( 0.43429448190325182765 * log(*(x)) )
#define r_lg10(x) ( 0.43429448190325182765 * log(*(x)) )
#define d_log(x) (log(*(x)))
#define d_mod(x, y) (fmod(*(x), *(y)))
#define u_nint(__x) ((__x)>=0 ? floor((__x) + .5) : -floor(.5 - (__x)))
#define d_nint(x) u_nint(*(x))
#define u_sign(__a,__b) ((__b) >= 0 ? ((__a) >= 0 ? (__a) : -(__a)) : -((__a) >= 0 ? (__a) : -(__a)))
#define d_sign(a,b) u_sign(*(a),*(b))
#define r_sign(a,b) u_sign(*(a),*(b))
#define d_sin(x) (sin(*(x)))
#define d_sinh(x) (sinh(*(x)))
#define d_sqrt(x) (sqrt(*(x)))
#define d_tan(x) (tan(*(x)))
#define d_tanh(x) (tanh(*(x)))
#define i_abs(x) abs(*(x))
#define i_dnnt(x) ((integer)u_nint(*(x)))
#define i_len(s, n) (n)
#define i_nint(x) ((integer)u_nint(*(x)))
#define i_sign(a,b) ((integer)u_sign((integer)*(a),(integer)*(b)))
#define pow_dd(ap, bp) ( pow(*(ap), *(bp)))
#define pow_si(B,E) spow_ui(*(B),*(E))
#define pow_ri(B,E) spow_ui(*(B),*(E))
#define pow_di(B,E) dpow_ui(*(B),*(E))
#define pow_zi(p, a, b) {pCd(p) = zpow_ui(Cd(a), *(b));}
#define pow_ci(p, a, b) {pCf(p) = cpow_ui(Cf(a), *(b));}
#define pow_zz(R,A,B) {pCd(R) = cpow(Cd(A),*(B));}
#define s_cat(lpp, rpp, rnp, np, llp) { ftnlen i, nc, ll; char *f__rp, *lp; ll = (llp); lp = (lpp); for(i=0; i < (int)*(np); ++i) { nc = ll; if((rnp)[i] < nc) nc = (rnp)[i]; ll -= nc; f__rp = (rpp)[i]; while(--nc >= 0) *lp++ = *(f__rp)++; } while(--ll >= 0) *lp++ = ' '; }
#define s_cmp(a,b,c,d) ((integer)strncmp((a),(b),f2cmin((c),(d))))
#define s_copy(A,B,C,D) { int __i,__m; for (__i=0, __m=f2cmin((C),(D)); __i<__m && (B)[__i] != 0; ++__i) (A)[__i] = (B)[__i]; }
#define sig_die(s, kill) { exit(1); }
#define s_stop(s, n) {exit(0);}
static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
#define z_abs(z) (cabs(Cd(z)))
#define z_exp(R, Z) {pCd(R) = cexp(Cd(Z));}
#define z_sqrt(R, Z) {pCd(R) = csqrt(Cd(Z));}
#define myexit_() break;
#define mycycle() continue;
#define myceiling(w) {ceil(w)}
#define myhuge(w) {HUGE_VAL}
//#define mymaxloc_(w,s,e,n) {if (sizeof(*(w)) == sizeof(double)) dmaxloc_((w),*(s),*(e),n); else dmaxloc_((w),*(s),*(e),n);}
#define mymaxloc(w,s,e,n) {dmaxloc_(w,*(s),*(e),n)}
/* procedure parameter types for -A and -C++ */
#define F2C_proc_par_types 1
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
typedef logical (*L_fp)();
#endif
static float spow_ui(float x, integer n) {
float pow=1.0; unsigned long int u;
if(n != 0) {
if(n < 0) n = -n, x = 1/x;
for(u = n; ; ) {
if(u & 01) pow *= x;
if(u >>= 1) x *= x;
else break;
}
}
return pow;
}
static double dpow_ui(double x, integer n) {
double pow=1.0; unsigned long int u;
if(n != 0) {
if(n < 0) n = -n, x = 1/x;
for(u = n; ; ) {
if(u & 01) pow *= x;
if(u >>= 1) x *= x;
else break;
}
}
return pow;
}
#ifdef _MSC_VER
static _Fcomplex cpow_ui(complex x, integer n) {
complex pow={1.0,0.0}; unsigned long int u;
if(n != 0) {
if(n < 0) n = -n, x.r = 1/x.r, x.i=1/x.i;
for(u = n; ; ) {
if(u & 01) pow.r *= x.r, pow.i *= x.i;
if(u >>= 1) x.r *= x.r, x.i *= x.i;
else break;
}
}
_Fcomplex p={pow.r, pow.i};
return p;
}
#else
static _Complex float cpow_ui(_Complex float x, integer n) {
_Complex float pow=1.0; unsigned long int u;
if(n != 0) {
if(n < 0) n = -n, x = 1/x;
for(u = n; ; ) {
if(u & 01) pow *= x;
if(u >>= 1) x *= x;
else break;
}
}
return pow;
}
#endif
#ifdef _MSC_VER
static _Dcomplex zpow_ui(_Dcomplex x, integer n) {
_Dcomplex pow={1.0,0.0}; unsigned long int u;
if(n != 0) {
if(n < 0) n = -n, x._Val[0] = 1/x._Val[0], x._Val[1] =1/x._Val[1];
for(u = n; ; ) {
if(u & 01) pow._Val[0] *= x._Val[0], pow._Val[1] *= x._Val[1];
if(u >>= 1) x._Val[0] *= x._Val[0], x._Val[1] *= x._Val[1];
else break;
}
}
_Dcomplex p = {pow._Val[0], pow._Val[1]};
return p;
}
#else
static _Complex double zpow_ui(_Complex double x, integer n) {
_Complex double pow=1.0; unsigned long int u;
if(n != 0) {
if(n < 0) n = -n, x = 1/x;
for(u = n; ; ) {
if(u & 01) pow *= x;
if(u >>= 1) x *= x;
else break;
}
}
return pow;
}
#endif
static integer pow_ii(integer x, integer n) {
integer pow; unsigned long int u;
if (n <= 0) {
if (n == 0 || x == 1) pow = 1;
else if (x != -1) pow = x == 0 ? 1/x : 0;
else n = -n;
}
if ((n > 0) || !(n == 0 || x == 1 || x != -1)) {
u = n;
for(pow = 1; ; ) {
if(u & 01) pow *= x;
if(u >>= 1) x *= x;
else break;
}
}
return pow;
}
static integer dmaxloc_(double *w, integer s, integer e, integer *n)
{
double m; integer i, mi;
for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
if (w[i-1]>m) mi=i ,m=w[i-1];
return mi-s+1;
}
static integer smaxloc_(float *w, integer s, integer e, integer *n)
{
float m; integer i, mi;
for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
if (w[i-1]>m) mi=i ,m=w[i-1];
return mi-s+1;
}
static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
integer n = *n_, incx = *incx_, incy = *incy_, i;
#ifdef _MSC_VER
_Fcomplex zdotc = {0.0, 0.0};
if (incx == 1 && incy == 1) {
for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
zdotc._Val[0] += conjf(Cf(&x[i]))._Val[0] * Cf(&y[i])._Val[0];
zdotc._Val[1] += conjf(Cf(&x[i]))._Val[1] * Cf(&y[i])._Val[1];
}
} else {
for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
zdotc._Val[0] += conjf(Cf(&x[i*incx]))._Val[0] * Cf(&y[i*incy])._Val[0];
zdotc._Val[1] += conjf(Cf(&x[i*incx]))._Val[1] * Cf(&y[i*incy])._Val[1];
}
}
pCf(z) = zdotc;
}
#else
_Complex float zdotc = 0.0;
if (incx == 1 && incy == 1) {
for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
zdotc += conjf(Cf(&x[i])) * Cf(&y[i]);
}
} else {
for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
zdotc += conjf(Cf(&x[i*incx])) * Cf(&y[i*incy]);
}
}
pCf(z) = zdotc;
}
#endif
static inline void zdotc_(doublecomplex *z, integer *n_, doublecomplex *x, integer *incx_, doublecomplex *y, integer *incy_) {
integer n = *n_, incx = *incx_, incy = *incy_, i;
#ifdef _MSC_VER
_Dcomplex zdotc = {0.0, 0.0};
if (incx == 1 && incy == 1) {
for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
zdotc._Val[0] += conj(Cd(&x[i]))._Val[0] * Cd(&y[i])._Val[0];
zdotc._Val[1] += conj(Cd(&x[i]))._Val[1] * Cd(&y[i])._Val[1];
}
} else {
for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
zdotc._Val[0] += conj(Cd(&x[i*incx]))._Val[0] * Cd(&y[i*incy])._Val[0];
zdotc._Val[1] += conj(Cd(&x[i*incx]))._Val[1] * Cd(&y[i*incy])._Val[1];
}
}
pCd(z) = zdotc;
}
#else
_Complex double zdotc = 0.0;
if (incx == 1 && incy == 1) {
for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
zdotc += conj(Cd(&x[i])) * Cd(&y[i]);
}
} else {
for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
zdotc += conj(Cd(&x[i*incx])) * Cd(&y[i*incy]);
}
}
pCd(z) = zdotc;
}
#endif
static inline void cdotu_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
integer n = *n_, incx = *incx_, incy = *incy_, i;
#ifdef _MSC_VER
_Fcomplex zdotc = {0.0, 0.0};
if (incx == 1 && incy == 1) {
for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
zdotc._Val[0] += Cf(&x[i])._Val[0] * Cf(&y[i])._Val[0];
zdotc._Val[1] += Cf(&x[i])._Val[1] * Cf(&y[i])._Val[1];
}
} else {
for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
zdotc._Val[0] += Cf(&x[i*incx])._Val[0] * Cf(&y[i*incy])._Val[0];
zdotc._Val[1] += Cf(&x[i*incx])._Val[1] * Cf(&y[i*incy])._Val[1];
}
}
pCf(z) = zdotc;
}
#else
_Complex float zdotc = 0.0;
if (incx == 1 && incy == 1) {
for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
zdotc += Cf(&x[i]) * Cf(&y[i]);
}
} else {
for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
zdotc += Cf(&x[i*incx]) * Cf(&y[i*incy]);
}
}
pCf(z) = zdotc;
}
#endif
static inline void zdotu_(doublecomplex *z, integer *n_, doublecomplex *x, integer *incx_, doublecomplex *y, integer *incy_) {
integer n = *n_, incx = *incx_, incy = *incy_, i;
#ifdef _MSC_VER
_Dcomplex zdotc = {0.0, 0.0};
if (incx == 1 && incy == 1) {
for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
zdotc._Val[0] += Cd(&x[i])._Val[0] * Cd(&y[i])._Val[0];
zdotc._Val[1] += Cd(&x[i])._Val[1] * Cd(&y[i])._Val[1];
}
} else {
for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
zdotc._Val[0] += Cd(&x[i*incx])._Val[0] * Cd(&y[i*incy])._Val[0];
zdotc._Val[1] += Cd(&x[i*incx])._Val[1] * Cd(&y[i*incy])._Val[1];
}
}
pCd(z) = zdotc;
}
#else
_Complex double zdotc = 0.0;
if (incx == 1 && incy == 1) {
for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
zdotc += Cd(&x[i]) * Cd(&y[i]);
}
} else {
for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
zdotc += Cd(&x[i*incx]) * Cd(&y[i*incy]);
}
}
pCd(z) = zdotc;
}
#endif
/* -- translated by f2c (version 20000121).
You must link the resulting object file with the libraries:
-lf2c -lm (in that order)
*/
/* Table of constant values */
static integer c__1 = 1;
/* > \brief \b CLANSB returns the value of the 1-norm, or the Frobenius norm, or the infinity norm, or the ele
ment of largest absolute value of a symmetric band matrix. */
/* =========== DOCUMENTATION =========== */
/* Online html documentation available at */
/* http://www.netlib.org/lapack/explore-html/ */
/* > \htmlonly */
/* > Download CLANSB + dependencies */
/* > <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/clansb.
f"> */
/* > [TGZ]</a> */
/* > <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/clansb.
f"> */
/* > [ZIP]</a> */
/* > <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/clansb.
f"> */
/* > [TXT]</a> */
/* > \endhtmlonly */
/* Definition: */
/* =========== */
/* REAL FUNCTION CLANSB( NORM, UPLO, N, K, AB, LDAB, */
/* WORK ) */
/* CHARACTER NORM, UPLO */
/* INTEGER K, LDAB, N */
/* REAL WORK( * ) */
/* COMPLEX AB( LDAB, * ) */
/* > \par Purpose: */
/* ============= */
/* > */
/* > \verbatim */
/* > */
/* > CLANSB returns the value of the one norm, or the Frobenius norm, or */
/* > the infinity norm, or the element of largest absolute value of an */
/* > n by n symmetric band matrix A, with k super-diagonals. */
/* > \endverbatim */
/* > */
/* > \return CLANSB */
/* > \verbatim */
/* > */
/* > CLANSB = ( f2cmax(abs(A(i,j))), NORM = 'M' or 'm' */
/* > ( */
/* > ( norm1(A), NORM = '1', 'O' or 'o' */
/* > ( */
/* > ( normI(A), NORM = 'I' or 'i' */
/* > ( */
/* > ( normF(A), NORM = 'F', 'f', 'E' or 'e' */
/* > */
/* > where norm1 denotes the one norm of a matrix (maximum column sum), */
/* > normI denotes the infinity norm of a matrix (maximum row sum) and */
/* > normF denotes the Frobenius norm of a matrix (square root of sum of */
/* > squares). Note that f2cmax(abs(A(i,j))) is not a consistent matrix norm. */
/* > \endverbatim */
/* Arguments: */
/* ========== */
/* > \param[in] NORM */
/* > \verbatim */
/* > NORM is CHARACTER*1 */
/* > Specifies the value to be returned in CLANSB as described */
/* > above. */
/* > \endverbatim */
/* > */
/* > \param[in] UPLO */
/* > \verbatim */
/* > UPLO is CHARACTER*1 */
/* > Specifies whether the upper or lower triangular part of the */
/* > band matrix A is supplied. */
/* > = 'U': Upper triangular part is supplied */
/* > = 'L': Lower triangular part is supplied */
/* > \endverbatim */
/* > */
/* > \param[in] N */
/* > \verbatim */
/* > N is INTEGER */
/* > The order of the matrix A. N >= 0. When N = 0, CLANSB is */
/* > set to zero. */
/* > \endverbatim */
/* > */
/* > \param[in] K */
/* > \verbatim */
/* > K is INTEGER */
/* > The number of super-diagonals or sub-diagonals of the */
/* > band matrix A. K >= 0. */
/* > \endverbatim */
/* > */
/* > \param[in] AB */
/* > \verbatim */
/* > AB is COMPLEX array, dimension (LDAB,N) */
/* > The upper or lower triangle of the symmetric band matrix A, */
/* > stored in the first K+1 rows of AB. The j-th column of A is */
/* > stored in the j-th column of the array AB as follows: */
/* > if UPLO = 'U', AB(k+1+i-j,j) = A(i,j) for f2cmax(1,j-k)<=i<=j; */
/* > if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=f2cmin(n,j+k). */
/* > \endverbatim */
/* > */
/* > \param[in] LDAB */
/* > \verbatim */
/* > LDAB is INTEGER */
/* > The leading dimension of the array AB. LDAB >= K+1. */
/* > \endverbatim */
/* > */
/* > \param[out] WORK */
/* > \verbatim */
/* > WORK is REAL array, dimension (MAX(1,LWORK)), */
/* > where LWORK >= N when NORM = 'I' or '1' or 'O'; otherwise, */
/* > WORK is not referenced. */
/* > \endverbatim */
/* Authors: */
/* ======== */
/* > \author Univ. of Tennessee */
/* > \author Univ. of California Berkeley */
/* > \author Univ. of Colorado Denver */
/* > \author NAG Ltd. */
/* > \date December 2016 */
/* > \ingroup complexOTHERauxiliary */
/* ===================================================================== */
real clansb_(char *norm, char *uplo, integer *n, integer *k, complex *ab,
integer *ldab, real *work)
{
/* System generated locals */
integer ab_dim1, ab_offset, i__1, i__2, i__3, i__4;
real ret_val;
/* Local variables */
real absa;
extern /* Subroutine */ int scombssq_(real *, real *);
integer i__, j, l;
extern logical lsame_(char *, char *);
real value;
extern /* Subroutine */ int classq_(integer *, complex *, integer *, real
*, real *);
extern logical sisnan_(real *);
real colssq[2], sum, ssq[2];
/* -- LAPACK auxiliary routine (version 3.7.0) -- */
/* -- LAPACK is a software package provided by Univ. of Tennessee, -- */
/* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- */
/* December 2016 */
/* ===================================================================== */
/* Parameter adjustments */
ab_dim1 = *ldab;
ab_offset = 1 + ab_dim1 * 1;
ab -= ab_offset;
--work;
/* Function Body */
if (*n == 0) {
value = 0.f;
} else if (lsame_(norm, "M")) {
/* Find f2cmax(abs(A(i,j))). */
value = 0.f;
if (lsame_(uplo, "U")) {
i__1 = *n;
for (j = 1; j <= i__1; ++j) {
/* Computing MAX */
i__2 = *k + 2 - j;
i__3 = *k + 1;
for (i__ = f2cmax(i__2,1); i__ <= i__3; ++i__) {
sum = c_abs(&ab[i__ + j * ab_dim1]);
if (value < sum || sisnan_(&sum)) {
value = sum;
}
/* L10: */
}
/* L20: */
}
} else {
i__1 = *n;
for (j = 1; j <= i__1; ++j) {
/* Computing MIN */
i__2 = *n + 1 - j, i__4 = *k + 1;
i__3 = f2cmin(i__2,i__4);
for (i__ = 1; i__ <= i__3; ++i__) {
sum = c_abs(&ab[i__ + j * ab_dim1]);
if (value < sum || sisnan_(&sum)) {
value = sum;
}
/* L30: */
}
/* L40: */
}
}
} else if (lsame_(norm, "I") || lsame_(norm, "O") || *(unsigned char *)norm == '1') {
/* Find normI(A) ( = norm1(A), since A is symmetric). */
value = 0.f;
if (lsame_(uplo, "U")) {
i__1 = *n;
for (j = 1; j <= i__1; ++j) {
sum = 0.f;
l = *k + 1 - j;
/* Computing MAX */
i__3 = 1, i__2 = j - *k;
i__4 = j - 1;
for (i__ = f2cmax(i__3,i__2); i__ <= i__4; ++i__) {
absa = c_abs(&ab[l + i__ + j * ab_dim1]);
sum += absa;
work[i__] += absa;
/* L50: */
}
work[j] = sum + c_abs(&ab[*k + 1 + j * ab_dim1]);
/* L60: */
}
i__1 = *n;
for (i__ = 1; i__ <= i__1; ++i__) {
sum = work[i__];
if (value < sum || sisnan_(&sum)) {
value = sum;
}
/* L70: */
}
} else {
i__1 = *n;
for (i__ = 1; i__ <= i__1; ++i__) {
work[i__] = 0.f;
/* L80: */
}
i__1 = *n;
for (j = 1; j <= i__1; ++j) {
sum = work[j] + c_abs(&ab[j * ab_dim1 + 1]);
l = 1 - j;
/* Computing MIN */
i__3 = *n, i__2 = j + *k;
i__4 = f2cmin(i__3,i__2);
for (i__ = j + 1; i__ <= i__4; ++i__) {
absa = c_abs(&ab[l + i__ + j * ab_dim1]);
sum += absa;
work[i__] += absa;
/* L90: */
}
if (value < sum || sisnan_(&sum)) {
value = sum;
}
/* L100: */
}
}
} else if (lsame_(norm, "F") || lsame_(norm, "E")) {
/* Find normF(A). */
/* SSQ(1) is scale */
/* SSQ(2) is sum-of-squares */
/* For better accuracy, sum each column separately. */
ssq[0] = 0.f;
ssq[1] = 1.f;
/* Sum off-diagonals */
if (*k > 0) {
if (lsame_(uplo, "U")) {
i__1 = *n;
for (j = 2; j <= i__1; ++j) {
colssq[0] = 0.f;
colssq[1] = 1.f;
/* Computing MIN */
i__3 = j - 1;
i__4 = f2cmin(i__3,*k);
/* Computing MAX */
i__2 = *k + 2 - j;
classq_(&i__4, &ab[f2cmax(i__2,1) + j * ab_dim1], &c__1,
colssq, &colssq[1]);
scombssq_(ssq, colssq);
/* L110: */
}
l = *k + 1;
} else {
i__1 = *n - 1;
for (j = 1; j <= i__1; ++j) {
colssq[0] = 0.f;
colssq[1] = 1.f;
/* Computing MIN */
i__3 = *n - j;
i__4 = f2cmin(i__3,*k);
classq_(&i__4, &ab[j * ab_dim1 + 2], &c__1, colssq, &
colssq[1]);
scombssq_(ssq, colssq);
/* L120: */
}
l = 1;
}
ssq[1] *= 2;
} else {
l = 1;
}
/* Sum diagonal */
colssq[0] = 0.f;
colssq[1] = 1.f;
classq_(n, &ab[l + ab_dim1], ldab, colssq, &colssq[1]);
scombssq_(ssq, colssq);
value = ssq[0] * sqrt(ssq[1]);
}
ret_val = value;
return ret_val;
/* End of CLANSB */
} /* clansb_ */
|
the_stack_data/103266113.c
|
#include<stdio.h>
int comb_num(int, int);
int main()
{
int m, n;
scanf("%d%d", &m, &n);
printf("%d\n", comb_num(m, n));
return 0;
}
int comb_num(int m, int n){
if ( m<n || m<1 || n<1 ) return 0;
if ( n == 1 ) return m;
if ( n == m ) return 1;
return comb_num(m-1, n) +
comb_num(m-1, n-1);
}
|
the_stack_data/112177.c
|
/* ---------------------------------------------------------------- avl_tree.h
AVL Tree - Caio Dutra <[email protected]>
UFT - EDII - 01/2010
Biblioteca relativa a estrutura de dados. Caracteriza aqui a Árvore AVL.
----> Por convenção, todos as funções listadas neste arquivo referentes a
manipulação de árvore AVL terão o prefixo avl_, para evitar possíveis
conflitos de nomes.
---------------------------------------------------------------------------*/
#ifndef AVL_H
#define AVL_H
#ifdef __cplusplus
exterm "C" {
#endif
typedef struct AVL_Node
{
/*
* Estrutura do nó da árvore AVL.
* Contém um bit extra que informa
* o grau de balanceamento da árvore.
* Se for 0, 1 ou -1, a árvore está
* balanceada. Se não, serão realizadas
* algumas mudanças até que se balanceie
*/
void *info; // Informação contida no nó
int bal; // Fator de balanceamento do nó
struct AVL_Node *pai; // Aponta para o nó ancestral
struct AVL_Node *esq; // Aponta para o filho da esquerda
struct AVL_Node *dir; // Aponta para o filho da direita
} AVL_Node;
typedef struct AVL_Tree
{
/*
* Estrutura que define a árvore AVL.
* Aonde está guardada a raiz da árvore.
* Contém ponteiros para funções que
* manipulam as informações contidas na
* árvore.
*
* A função que o ponteiro compara_info
* aponta deverá retornar um valor inteiro
* segundo a seguinte legenda:
* +1 => Se o primeiro for maior
* -1 => Se o segundo for maior
* 0 => Se os dois forem iguais
*/
AVL_Node *root; // Raiz da árvore
unsigned int num_nodes; // Número de nós da árvore
// Função que compara duas informações
int (*compara_info)( const void *, const void * );
// Função que imprime uma informação
void (*imprime_info)( const void * );
} AVL_Tree;
/* Funções para manipulação da árvore */
// Inicialização da árvore
void avl_init ( AVL_Tree **, int (*compara_info)( const void *, const void * ),
void (*imprime_info)( const void * ));
// Insere um elemento na árvore
int avl_insert ( AVL_Tree **, AVL_Node *, AVL_Node **, void * );
// Remove um elemento da árvore
int avl_remove ( AVL_Tree **, AVL_Node **, void * );
// Realiza o percurso em pré-ordem
void avl_walk_pre ( AVL_Tree *, AVL_Node * );
// Realiza o percurso em pos-ordem
void avl_walk_pos ( AVL_Tree *, AVL_Node * );
// Realiza o percurso em ordem simetrica
void avl_walk_sim ( AVL_Tree *, AVL_Node * );
// Realiza o percurso na árvore por nível
void avl_walk_byLevel ( AVL_Tree * );
// Faz uma busca na árvore
AVL_Node *avl_search ( AVL_Tree *, AVL_Node *, void * );
// Retorna a altura de uma sub-árvore
int avl_height ( AVL_Node * );
#ifdef __cplusplus
}
#endif
#endif /* AVL_H */
/* ---------------------------------------------------------------- avl_tree.c
AVL Tree API - Caio Dutra <[email protected]>
UFT - EDII - 01/2010
Biblioteca relativa a estrutura de dados. Caracteriza aqui a Árvore AVL.
----> Por convenção, todos as funções listadas neste arquivo referentes a
manipulação de árvore AVL terão o prefixo avl_, para evitar possíveis
conflitos de nomes.
---------------------------------------------------------------------------*/
#include <stdio.h>
#include <stdlib.h>
void avl_init ( AVL_Tree **tree,
int (*compara_info)( const void *, const void *),
void (*imprime_info)( const void * ))
/* Inicializa a árvore */
{
AVL_Tree *nova;
nova = ( AVL_Tree * ) malloc ( sizeof ( AVL_Tree ));
if ( nova == NULL ) return;
nova->root = NULL;
nova->num_nodes = 0;
nova->compara_info = compara_info;
nova->imprime_info = imprime_info;
*tree = nova;
}
int avl_height ( AVL_Node *node ) {
int esq, dir;
if ( node == NULL ) return -1;
esq = avl_height ( node->esq );
dir = avl_height ( node->dir );
if ( esq > dir )
return esq + 1;
else
return dir + 1;
}
/* -- Rotações de sub-árvore --
*
* A árvore AVL necessita, além das rotinas
* básicas, algumas rotinas auxiliares para
* mantê-la balanceada. São elas: rotação
* simples para a esquerda, rotação simples
* para a direita.
*/
AVL_Node *rotacao_direita ( AVL_Node *p )
/* Rotação simples para a direita */
{
AVL_Node *q;
q = p->esq;
//----------------> Realiza a rotação
p->esq = q->dir;
if ( q->dir != NULL )
q->dir->pai = p;
q->dir = p;
q->pai = p->pai;
if ( p->pai != NULL )
if ( p->pai->esq == p )
p->pai->esq = q;
else
p->pai->dir = q;
p->pai = q;
//----------------> Rebalanceia
q->bal = avl_height ( q->dir ) - avl_height ( q->esq );
p->bal = avl_height ( p->dir ) - avl_height ( p->esq );
return q;
}
AVL_Node *rotacao_esquerda ( AVL_Node *p )
/* Rotação simples para a esquerda */
{
AVL_Node *q;
q = p->dir;
//----------------> Realiza a rotação
p->dir = q->esq;
if ( q->esq != NULL )
q->esq->pai = p;
q->esq = p;
q->pai = p->pai;
if ( p->pai != NULL )
if ( p->pai->esq == p )
p->pai->esq = q;
else
p->pai->dir = q;
p->pai = q;
//----------------> Rebalanceia
q->bal = avl_height ( q->dir ) - avl_height ( q->esq );
p->bal = avl_height ( p->dir ) - avl_height ( p->esq );
return q;
}
/* Inserção na árvore AVL */
int avl_insert ( AVL_Tree **tree, AVL_Node *pai, AVL_Node **node, void *info )
{
AVL_Node *novo;
int aux;
if ( *tree == NULL ) return -1;
if ( *node == NULL )
// Se for o local correto para a inserção
{
novo = ( AVL_Node * ) malloc ( sizeof ( AVL_Node ));
if ( novo == NULL ) return -1;
novo->info = info;
novo->bal = 0;
novo->pai = pai;
novo->esq = NULL;
novo->dir = NULL;
*node = novo;
(*tree)->num_nodes++;
return 1;
}
/*
* Procura o local apropriado. Na volta da pilha do processador, o
* algoritmo vai atualizando o fator de balanceamento de cada nó.
* São feitas rotações, se necessárias, para que a árvore se rebalanceie.
*/
if ( (*tree)->compara_info( info, (*node)->info ) == +1 ) {
aux = avl_insert ( tree, *node, &((*node)->dir), info );
if ( aux != 1 ) return 0;
if ( ++((*node)->bal) == 2 ) {
if ( (*node)->dir->bal == 1 ) {
*node = rotacao_esquerda ( *node );
return 0;
}
(*node)->dir = rotacao_direita ( (*node)->dir );
*node = rotacao_esquerda ( *node );
return 0;
}
return ( (*node)->bal == 0 )? 0: 1;
}
if ( (*tree)->compara_info( info, (*node)->info ) == -1 ) {
aux = avl_insert ( tree, *node, &((*node)->esq), info );
if ( aux != 1 ) return 0;
if ( --((*node)->bal) == -2 ) {
if ( (*node)->esq->bal == -1 ) {
*node = rotacao_direita ( *node );
return 0;
}
(*node)->esq = rotacao_esquerda ( (*node)->esq );
*node = rotacao_direita ( *node );
return 0;
}
return ( (*node)->bal == 0 )? 0: 1;
}
return 0;
}
/* Remove um elemento da árvore */
int avl_remove ( AVL_Tree **tree, AVL_Node **node, void *info )
{
int ret;
if ( *node == NULL || *tree == NULL ) return -1;
if ( (*tree)->compara_info( info, (*node)->info ) == +1 )
// Vai para a S.A. da esquerda
{
ret = avl_remove ( tree, &((*node)->dir), info );
if ( ret != 1 ) return 0;
if ( --((*node)->bal) == -2 ) {
if ( (*node)->esq->bal == -1 ) {
*node = rotacao_direita ( *node );
return 0;
}
(*node)->esq = rotacao_esquerda ( (*node)->esq );
*node = rotacao_direita ( *node );
return 0;
}
return ( (*node)->bal == 0 )? 1: 0;
}
if ( (*tree)->compara_info( info, (*node)->info ) == -1 )
// Vai para a S.A. da direita
{
ret = avl_remove ( tree, &((*node)->esq), info );
if ( ret != 1 ) return 0;
if ( ++((*node)->bal) == +2 ) {
if ( (*node)->dir->bal == 1 ) {
*node = rotacao_esquerda ( *node );
return 0;
}
(*node)->dir = rotacao_direita ( (*node)->dir );
*node = rotacao_esquerda ( *node );
return 0;
}
return ( (*node)->bal == 0 )? 1: 0;
}
if ( (*tree)->compara_info( info, (*node)->info ) == 0 )
// Encontrou o elemento a ser removido
{
AVL_Node *aux, *temp;
void *i;
if ( (*node)->esq == NULL ) {
if ( (*node)->dir == NULL )
// Se não contiver filho algum
{
free ( *node );
*node = NULL;
(*tree)->num_nodes--;
return 1;
}
// Se contiver o filho da direita
aux = *node;
temp = (*node)->dir;
temp->pai = (*node)->pai;
if ( (*node)->pai != NULL )
if ( (*node)->pai->esq == *node )
(*node)->pai->esq = temp;
else
(*node)->pai->dir = temp;
*node = temp;
free ( aux );
(*tree)->num_nodes--;
return 1;
}
if ( (*node)->dir == NULL )
// Se contiver apenas o filho da esquerda
{
aux = *node;
temp = (*node)->esq;
temp->pai = (*node)->pai;
if ( (*node)->pai != NULL )
if ( (*node)->pai->esq == *node )
(*node)->pai->esq = temp;
else
(*node)->pai->dir = temp;
*node = temp;
free ( aux );
(*tree)->num_nodes--;
return 1;
}
// Se contiver os dois filhos
aux = (*node)->esq;
while ( aux->dir != NULL )
aux = aux->dir;
i = aux->info;
avl_remove ( tree, node, aux->info );
(*node)->info = i;
return 1;
}
}
/* Percursos da árvore */
void avl_walk_pre ( AVL_Tree *tree, AVL_Node *node )
// Percorre a árvore em pré-ordem
{
if ( node == NULL ) return;
tree->imprime_info( node->info );
if ( node->esq != NULL && node->dir != NULL ) printf ( ", " );
avl_walk_pre ( tree, node->esq );
avl_walk_pre ( tree, node->dir );
}
void avl_walk_pos ( AVL_Tree *tree, AVL_Node *node )
// Percorre a árvore em pós-ordem
{
if ( node == NULL ) return;
avl_walk_pre ( tree, node->esq );
avl_walk_pre ( tree, node->dir );
tree->imprime_info( node->info );
if ( node->esq != NULL && node->dir != NULL ) printf ( ", " );
}
void avl_walk_sim ( AVL_Tree *tree, AVL_Node *node )
// Percorre a árvore em ordem simétrica
{
if ( node == NULL ) return;
avl_walk_pre ( tree, node->esq );
tree->imprime_info( node->info );
if ( node->esq != NULL && node->dir != NULL ) printf ( ", " );
avl_walk_pre ( tree, node->dir );
}
void avl_walk_lev ( AVL_Tree *tree )
// Percorre a árvore por nível ( Busca Lateral )
{
AVL_Node *queue[tree->num_nodes];
AVL_Node *aux;
int tail = -1, i;
if ( tree->root == NULL ) return;
queue[++tail] = tree->root;
while ( tail > -1 ) {
aux = queue[0];
for ( i = 0; i < tail; i++ )
queue[i] = queue[i+1];
tail--;
tree->imprime_info( aux->info );
printf ( " " );
if ( aux->esq != NULL )
queue[++tail] = aux->esq;
if ( aux->dir != NULL )
queue[++tail] = aux->dir;
}
}
void avl_print ( AVL_Tree *tree, AVL_Node *node, int level )
{
int i;
if ( tree == NULL || node == NULL ) return;
for ( i = 0; i < level; i++ )
printf ( " " );
printf ( "> [" );
tree->imprime_info( node->info );
printf ( "][%i]\n", node->bal );
avl_print ( tree, node->esq, level + 1 );
avl_print ( tree, node->dir, level + 1 );
}
/* Busca por um elemento */
AVL_Node *avl_search ( AVL_Tree *tree, AVL_Node *node, void *info )
{
if ( tree == NULL || node == NULL ) return NULL;
if ( tree->compara_info( info, node->info ) == 0 ) return node;
if ( tree->compara_info( info, node->info ) > 0 )
return avl_search ( tree, node->dir, info );
else
return avl_search ( tree, node->esq, info );
}
|
the_stack_data/135631.c
|
#include <stdio.h>
int main() {
float mark1,mark2;
float avg;
printf("Enter mark of 1st subject:");
scanf("%f",&mark1);
printf("Enter mark of 2nd subject:");
scanf("%f",&mark2);
avg=(mark1+mark2)/2;
printf("average is:%2.f",avg);
return 0;
}
|
the_stack_data/75138381.c
|
/*************************************************************************\
* Copyright (C) Michael Kerrisk, 2018. *
* *
* This program is free software. You may use, modify, and redistribute it *
* under the terms of the GNU General Public License as published by the *
* Free Software Foundation, either version 3 or (at your option) any *
* later version. This program is distributed without any warranty. See *
* the file COPYING.gpl-v3 for details. *
\*************************************************************************/
/* Supplementary program for Chapter 13 */
/* mix23io.c
Illustrates the impact of stdio buffering when using stdio library functions
and I/O system calls to work on the same file.
Try running this program (with stdout directed to the terminal) without and
with a command-line argument (any string).
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
int
main(int argc, char *argv[])
{
printf("To man the world is twofold, ");
if (argc > 1)
printf("\n");
write(STDOUT_FILENO, "in accordance with his twofold attitude.\n", 41);
exit(EXIT_SUCCESS);
}
|
the_stack_data/26699314.c
|
int main() {
int while_ = 2;
int _while = 2;
int while2 = 2;
return while_ + _while + while2;
}
|
the_stack_data/192330707.c
|
/*
* @file h264-nalu.c
* @author Akagi201
* @date 2015/02/03
*/
|
the_stack_data/32396.c
|
// Problem Link: https://www.hackerrank.com/contests/projecteuler/challenges/euler001/problem
#include <stdio.h>
int main(){
int t;
scanf("%d",&t);
for(int a0 = 0; a0 < t; a0++){
long n;
scanf("%ld",&n);
long k, sum=0;
k = (n-1)/3;
sum = sum + 3*k*(k+1)/2;
k = (n-1)/5;
sum = sum + 5*k*(k+1)/2;
k = (n-1)/15;
sum = sum - 15*k*(k+1)/2;
printf("%ld\n", sum);
}
return 0;
}
|
the_stack_data/861877.c
|
// 显示当前时间,此程序的模块化实现见 gettime.c
// 12.22 by wjh
#include <time.h>
#include <stdio.h>
#include <unistd.h>
// 让光标别瞎他喵的乱闪
#define HIDE_CURSOR() printf("\033[?25l")
int main()
{
int h = 0, m = 0, s = 0;
int t = 0;
while (1)
{
HIDE_CURSOR();
t = time(0); //获取总秒数
s = t % 60;
m = t % 3600 / 60;
//1h= 3600s不足1h的除60即为分钟
h = (t % (24 * 3600) / 3600 + 8) % 24;
//1天24h 得到当天小时数+8为东八区区时 避免出现大于24h的情况对24取余
printf("%02d:%02d:%02d\r", h, m, s);
// %02d是将数字按宽度为2,采用右对齐方式输出,若数据位数不到2位,则左边补0 \r到当前行最左
usleep(700);
//程序执行较快 对时间进行控制 执行挂起1s
}
return 0;
}
|
the_stack_data/75137397.c
|
#ifdef CONFIG_USE_LOCAL_STRING_H
#include "_string.h"
#else
#include <string.h>
#endif
//-----------------------------------------------------------------
// rindex:
//-----------------------------------------------------------------
char *rindex(const char *s, int c)
{
char *it = 0;
while (1)
{
if (*s == c)
it = (char *)s;
if (*s == 0)
return it;
s++;
}
return 0;
}
|
the_stack_data/89201513.c
|
/*
** 2014-06-13
**
** The author disclaims copyright to this source code. In place of
** a legal notice, here is a blessing:
**
** May you do good and not evil.
** May you find forgiveness for yourself and forgive others.
** May you share freely, never taking more than you give.
**
******************************************************************************
**
** This SQLite extension implements SQL functions readfile() and
** writefile(), and eponymous virtual type "fsdir".
**
** WRITEFILE(FILE, DATA [, MODE [, MTIME]]):
**
** If neither of the optional arguments is present, then this UDF
** function writes blob DATA to file FILE. If successful, the number
** of bytes written is returned. If an error occurs, NULL is returned.
**
** If the first option argument - MODE - is present, then it must
** be passed an integer value that corresponds to a POSIX mode
** value (file type + permissions, as returned in the stat.st_mode
** field by the stat() system call). Three types of files may
** be written/created:
**
** regular files: (mode & 0170000)==0100000
** symbolic links: (mode & 0170000)==0120000
** directories: (mode & 0170000)==0040000
**
** For a directory, the DATA is ignored. For a symbolic link, it is
** interpreted as text and used as the target of the link. For a
** regular file, it is interpreted as a blob and written into the
** named file. Regardless of the type of file, its permissions are
** set to (mode & 0777) before returning.
**
** If the optional MTIME argument is present, then it is interpreted
** as an integer - the number of seconds since the unix epoch. The
** modification-time of the target file is set to this value before
** returning.
**
** If three or more arguments are passed to this function and an
** error is encountered, an exception is raised.
**
** READFILE(FILE):
**
** Read and return the contents of file FILE (type blob) from disk.
**
** FSDIR:
**
** Used as follows:
**
** SELECT * FROM fsdir($path [, $dir]);
**
** Parameter $path is an absolute or relative pathname. If the file that it
** refers to does not exist, it is an error. If the path refers to a regular
** file or symbolic link, it returns a single row. Or, if the path refers
** to a directory, it returns one row for the directory, and one row for each
** file within the hierarchy rooted at $path.
**
** Each row has the following columns:
**
** name: Path to file or directory (text value).
** mode: Value of stat.st_mode for directory entry (an integer).
** mtime: Value of stat.st_mtime for directory entry (an integer).
** data: For a regular file, a blob containing the file data. For a
** symlink, a text value containing the text of the link. For a
** directory, NULL.
**
** If a non-NULL value is specified for the optional $dir parameter and
** $path is a relative path, then $path is interpreted relative to $dir.
** And the paths returned in the "name" column of the table are also
** relative to directory $dir.
*/
#include "sqlite3ext.h"
SQLITE_EXTENSION_INIT1
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#if !defined(_WIN32) && !defined(WIN32)
# include <unistd.h>
# include <dirent.h>
# include <utime.h>
# include <sys/time.h>
#else
# include "windows.h"
# include <io.h>
# include <direct.h>
# include "test_windirent.h"
# define dirent DIRENT
# ifndef chmod
# define chmod _chmod
# endif
# ifndef stat
# define stat _stat
# endif
# define mkdir(path,mode) _mkdir(path)
# define lstat(path,buf) stat(path,buf)
#endif
#include <time.h>
#include <errno.h>
#define FSDIR_SCHEMA "(name,mode,mtime,data,path HIDDEN,dir HIDDEN)"
/*
** Set the result stored by context ctx to a blob containing the
** contents of file zName.
*/
static void readFileContents(sqlite3_context *ctx, const char *zName){
FILE *in;
long nIn;
void *pBuf;
in = fopen(zName, "rb");
if( in==0 ) return;
fseek(in, 0, SEEK_END);
nIn = ftell(in);
rewind(in);
pBuf = sqlite3_malloc( nIn );
if( pBuf && 1==fread(pBuf, nIn, 1, in) ){
sqlite3_result_blob(ctx, pBuf, nIn, sqlite3_free);
}else{
sqlite3_free(pBuf);
}
fclose(in);
}
/*
** Implementation of the "readfile(X)" SQL function. The entire content
** of the file named X is read and returned as a BLOB. NULL is returned
** if the file does not exist or is unreadable.
*/
static void readfileFunc(
sqlite3_context *context,
int argc,
sqlite3_value **argv
){
const char *zName;
(void)(argc); /* Unused parameter */
zName = (const char*)sqlite3_value_text(argv[0]);
if( zName==0 ) return;
readFileContents(context, zName);
}
/*
** Set the error message contained in context ctx to the results of
** vprintf(zFmt, ...).
*/
static void ctxErrorMsg(sqlite3_context *ctx, const char *zFmt, ...){
char *zMsg = 0;
va_list ap;
va_start(ap, zFmt);
zMsg = sqlite3_vmprintf(zFmt, ap);
sqlite3_result_error(ctx, zMsg, -1);
sqlite3_free(zMsg);
va_end(ap);
}
#if defined(_WIN32)
/*
** This function is designed to convert a Win32 FILETIME structure into the
** number of seconds since the Unix Epoch (1970-01-01 00:00:00 UTC).
*/
static sqlite3_uint64 fileTimeToUnixTime(
LPFILETIME pFileTime
){
SYSTEMTIME epochSystemTime;
ULARGE_INTEGER epochIntervals;
FILETIME epochFileTime;
ULARGE_INTEGER fileIntervals;
memset(&epochSystemTime, 0, sizeof(SYSTEMTIME));
epochSystemTime.wYear = 1970;
epochSystemTime.wMonth = 1;
epochSystemTime.wDay = 1;
SystemTimeToFileTime(&epochSystemTime, &epochFileTime);
epochIntervals.LowPart = epochFileTime.dwLowDateTime;
epochIntervals.HighPart = epochFileTime.dwHighDateTime;
fileIntervals.LowPart = pFileTime->dwLowDateTime;
fileIntervals.HighPart = pFileTime->dwHighDateTime;
return (fileIntervals.QuadPart - epochIntervals.QuadPart) / 10000000;
}
/*
** This function attempts to normalize the time values found in the stat()
** buffer to UTC. This is necessary on Win32, where the runtime library
** appears to return these values as local times.
*/
static void statTimesToUtc(
const char *zPath,
struct stat *pStatBuf
){
HANDLE hFindFile;
WIN32_FIND_DATAW fd;
LPWSTR zUnicodeName;
extern LPWSTR sqlite3_win32_utf8_to_unicode(const char*);
zUnicodeName = sqlite3_win32_utf8_to_unicode(zPath);
if( zUnicodeName ){
memset(&fd, 0, sizeof(WIN32_FIND_DATA));
hFindFile = FindFirstFileW(zUnicodeName, &fd);
if( hFindFile!=NULL ){
pStatBuf->st_ctime = (time_t)fileTimeToUnixTime(&fd.ftCreationTime);
pStatBuf->st_atime = (time_t)fileTimeToUnixTime(&fd.ftLastAccessTime);
pStatBuf->st_mtime = (time_t)fileTimeToUnixTime(&fd.ftLastWriteTime);
FindClose(hFindFile);
}
sqlite3_free(zUnicodeName);
}
}
#endif
/*
** This function is used in place of stat(). On Windows, special handling
** is required in order for the included time to be returned as UTC. On all
** other systems, this function simply calls stat().
*/
static int fileStat(
const char *zPath,
struct stat *pStatBuf
){
#if defined(_WIN32)
int rc = stat(zPath, pStatBuf);
if( rc==0 ) statTimesToUtc(zPath, pStatBuf);
return rc;
#else
return stat(zPath, pStatBuf);
#endif
}
/*
** This function is used in place of lstat(). On Windows, special handling
** is required in order for the included time to be returned as UTC. On all
** other systems, this function simply calls lstat().
*/
static int fileLinkStat(
const char *zPath,
struct stat *pStatBuf
){
#if defined(_WIN32)
int rc = lstat(zPath, pStatBuf);
if( rc==0 ) statTimesToUtc(zPath, pStatBuf);
return rc;
#else
return lstat(zPath, pStatBuf);
#endif
}
/*
** Argument zFile is the name of a file that will be created and/or written
** by SQL function writefile(). This function ensures that the directory
** zFile will be written to exists, creating it if required. The permissions
** for any path components created by this function are set to (mode&0777).
**
** If an OOM condition is encountered, SQLITE_NOMEM is returned. Otherwise,
** SQLITE_OK is returned if the directory is successfully created, or
** SQLITE_ERROR otherwise.
*/
static int makeDirectory(
const char *zFile,
mode_t mode
){
char *zCopy = sqlite3_mprintf("%s", zFile);
int rc = SQLITE_OK;
if( zCopy==0 ){
rc = SQLITE_NOMEM;
}else{
int nCopy = (int)strlen(zCopy);
int i = 1;
while( rc==SQLITE_OK ){
struct stat sStat;
int rc2;
for(; zCopy[i]!='/' && i<nCopy; i++);
if( i==nCopy ) break;
zCopy[i] = '\0';
rc2 = fileStat(zCopy, &sStat);
if( rc2!=0 ){
if( mkdir(zCopy, mode & 0777) ) rc = SQLITE_ERROR;
}else{
if( !S_ISDIR(sStat.st_mode) ) rc = SQLITE_ERROR;
}
zCopy[i] = '/';
i++;
}
sqlite3_free(zCopy);
}
return rc;
}
/*
** This function does the work for the writefile() UDF. Refer to
** header comments at the top of this file for details.
*/
static int writeFile(
sqlite3_context *pCtx, /* Context to return bytes written in */
const char *zFile, /* File to write */
sqlite3_value *pData, /* Data to write */
mode_t mode, /* MODE parameter passed to writefile() */
sqlite3_int64 mtime /* MTIME parameter (or -1 to not set time) */
){
#if !defined(_WIN32) && !defined(WIN32)
if( S_ISLNK(mode) ){
const char *zTo = (const char*)sqlite3_value_text(pData);
if( symlink(zTo, zFile)<0 ) return 1;
}else
#endif
{
if( S_ISDIR(mode) ){
if( mkdir(zFile, mode) ){
/* The mkdir() call to create the directory failed. This might not
** be an error though - if there is already a directory at the same
** path and either the permissions already match or can be changed
** to do so using chmod(), it is not an error. */
struct stat sStat;
if( errno!=EEXIST
|| 0!=fileStat(zFile, &sStat)
|| !S_ISDIR(sStat.st_mode)
|| ((sStat.st_mode&0777)!=(mode&0777) && 0!=chmod(zFile, mode&0777))
){
return 1;
}
}
}else{
sqlite3_int64 nWrite = 0;
const char *z;
int rc = 0;
FILE *out = fopen(zFile, "wb");
if( out==0 ) return 1;
z = (const char*)sqlite3_value_blob(pData);
if( z ){
sqlite3_int64 n = fwrite(z, 1, sqlite3_value_bytes(pData), out);
nWrite = sqlite3_value_bytes(pData);
if( nWrite!=n ){
rc = 1;
}
}
fclose(out);
if( rc==0 && mode && chmod(zFile, mode & 0777) ){
rc = 1;
}
if( rc ) return 2;
sqlite3_result_int64(pCtx, nWrite);
}
}
if( mtime>=0 ){
#if defined(_WIN32)
/* Windows */
FILETIME lastAccess;
FILETIME lastWrite;
SYSTEMTIME currentTime;
LONGLONG intervals;
HANDLE hFile;
LPWSTR zUnicodeName;
extern LPWSTR sqlite3_win32_utf8_to_unicode(const char*);
GetSystemTime(¤tTime);
SystemTimeToFileTime(¤tTime, &lastAccess);
intervals = Int32x32To64(mtime, 10000000) + 116444736000000000;
lastWrite.dwLowDateTime = (DWORD)intervals;
lastWrite.dwHighDateTime = intervals >> 32;
zUnicodeName = sqlite3_win32_utf8_to_unicode(zFile);
if( zUnicodeName==0 ){
return 1;
}
hFile = CreateFileW(
zUnicodeName, FILE_WRITE_ATTRIBUTES, 0, NULL, OPEN_EXISTING,
FILE_FLAG_BACKUP_SEMANTICS, NULL
);
sqlite3_free(zUnicodeName);
if( hFile!=INVALID_HANDLE_VALUE ){
BOOL bResult = SetFileTime(hFile, NULL, &lastAccess, &lastWrite);
CloseHandle(hFile);
return !bResult;
}else{
return 1;
}
#elif defined(AT_FDCWD) && 0 /* utimensat() is not universally available */
/* Recent unix */
struct timespec times[2];
times[0].tv_nsec = times[1].tv_nsec = 0;
times[0].tv_sec = time(0);
times[1].tv_sec = mtime;
if( utimensat(AT_FDCWD, zFile, times, AT_SYMLINK_NOFOLLOW) ){
return 1;
}
#else
/* Legacy unix */
struct timeval times[2];
times[0].tv_usec = times[1].tv_usec = 0;
times[0].tv_sec = time(0);
times[1].tv_sec = mtime;
if( utimes(zFile, times) ){
return 1;
}
#endif
}
return 0;
}
/*
** Implementation of the "writefile(W,X[,Y[,Z]]])" SQL function.
** Refer to header comments at the top of this file for details.
*/
static void writefileFunc(
sqlite3_context *context,
int argc,
sqlite3_value **argv
){
const char *zFile;
mode_t mode = 0;
int res;
sqlite3_int64 mtime = -1;
if( argc<2 || argc>4 ){
sqlite3_result_error(context,
"wrong number of arguments to function writefile()", -1
);
return;
}
zFile = (const char*)sqlite3_value_text(argv[0]);
if( zFile==0 ) return;
if( argc>=3 ){
mode = (mode_t)sqlite3_value_int(argv[2]);
}
if( argc==4 ){
mtime = sqlite3_value_int64(argv[3]);
}
res = writeFile(context, zFile, argv[1], mode, mtime);
if( res==1 && errno==ENOENT ){
if( makeDirectory(zFile, mode)==SQLITE_OK ){
res = writeFile(context, zFile, argv[1], mode, mtime);
}
}
if( argc>2 && res!=0 ){
if( S_ISLNK(mode) ){
ctxErrorMsg(context, "failed to create symlink: %s", zFile);
}else if( S_ISDIR(mode) ){
ctxErrorMsg(context, "failed to create directory: %s", zFile);
}else{
ctxErrorMsg(context, "failed to write file: %s", zFile);
}
}
}
/*
** SQL function: lsmode(MODE)
**
** Given a numberic st_mode from stat(), convert it into a human-readable
** text string in the style of "ls -l".
*/
static void lsModeFunc(
sqlite3_context *context,
int argc,
sqlite3_value **argv
){
int i;
int iMode = sqlite3_value_int(argv[0]);
char z[16];
(void)argc;
if( S_ISLNK(iMode) ){
z[0] = 'l';
}else if( S_ISREG(iMode) ){
z[0] = '-';
}else if( S_ISDIR(iMode) ){
z[0] = 'd';
}else{
z[0] = '?';
}
for(i=0; i<3; i++){
int m = (iMode >> ((2-i)*3));
char *a = &z[1 + i*3];
a[0] = (m & 0x4) ? 'r' : '-';
a[1] = (m & 0x2) ? 'w' : '-';
a[2] = (m & 0x1) ? 'x' : '-';
}
z[10] = '\0';
sqlite3_result_text(context, z, -1, SQLITE_TRANSIENT);
}
#ifndef SQLITE_OMIT_VIRTUALTABLE
/*
** Cursor type for recursively iterating through a directory structure.
*/
typedef struct fsdir_cursor fsdir_cursor;
typedef struct FsdirLevel FsdirLevel;
struct FsdirLevel {
DIR *pDir; /* From opendir() */
char *zDir; /* Name of directory (nul-terminated) */
};
struct fsdir_cursor {
sqlite3_vtab_cursor base; /* Base class - must be first */
int nLvl; /* Number of entries in aLvl[] array */
int iLvl; /* Index of current entry */
FsdirLevel *aLvl; /* Hierarchy of directories being traversed */
const char *zBase;
int nBase;
struct stat sStat; /* Current lstat() results */
char *zPath; /* Path to current entry */
sqlite3_int64 iRowid; /* Current rowid */
};
typedef struct fsdir_tab fsdir_tab;
struct fsdir_tab {
sqlite3_vtab base; /* Base class - must be first */
};
/*
** Construct a new fsdir virtual table object.
*/
static int fsdirConnect(
sqlite3 *db,
void *pAux,
int argc, const char *const*argv,
sqlite3_vtab **ppVtab,
char **pzErr
){
fsdir_tab *pNew = 0;
int rc;
(void)pAux;
(void)argc;
(void)argv;
(void)pzErr;
rc = sqlite3_declare_vtab(db, "CREATE TABLE x" FSDIR_SCHEMA);
if( rc==SQLITE_OK ){
pNew = (fsdir_tab*)sqlite3_malloc( sizeof(*pNew) );
if( pNew==0 ) return SQLITE_NOMEM;
memset(pNew, 0, sizeof(*pNew));
}
*ppVtab = (sqlite3_vtab*)pNew;
return rc;
}
/*
** This method is the destructor for fsdir vtab objects.
*/
static int fsdirDisconnect(sqlite3_vtab *pVtab){
sqlite3_free(pVtab);
return SQLITE_OK;
}
/*
** Constructor for a new fsdir_cursor object.
*/
static int fsdirOpen(sqlite3_vtab *p, sqlite3_vtab_cursor **ppCursor){
fsdir_cursor *pCur;
(void)p;
pCur = sqlite3_malloc( sizeof(*pCur) );
if( pCur==0 ) return SQLITE_NOMEM;
memset(pCur, 0, sizeof(*pCur));
pCur->iLvl = -1;
*ppCursor = &pCur->base;
return SQLITE_OK;
}
/*
** Reset a cursor back to the state it was in when first returned
** by fsdirOpen().
*/
static void fsdirResetCursor(fsdir_cursor *pCur){
int i;
for(i=0; i<=pCur->iLvl; i++){
FsdirLevel *pLvl = &pCur->aLvl[i];
if( pLvl->pDir ) closedir(pLvl->pDir);
sqlite3_free(pLvl->zDir);
}
sqlite3_free(pCur->zPath);
sqlite3_free(pCur->aLvl);
pCur->aLvl = 0;
pCur->zPath = 0;
pCur->zBase = 0;
pCur->nBase = 0;
pCur->nLvl = 0;
pCur->iLvl = -1;
pCur->iRowid = 1;
}
/*
** Destructor for an fsdir_cursor.
*/
static int fsdirClose(sqlite3_vtab_cursor *cur){
fsdir_cursor *pCur = (fsdir_cursor*)cur;
fsdirResetCursor(pCur);
sqlite3_free(pCur);
return SQLITE_OK;
}
/*
** Set the error message for the virtual table associated with cursor
** pCur to the results of vprintf(zFmt, ...).
*/
static void fsdirSetErrmsg(fsdir_cursor *pCur, const char *zFmt, ...){
va_list ap;
va_start(ap, zFmt);
pCur->base.pVtab->zErrMsg = sqlite3_vmprintf(zFmt, ap);
va_end(ap);
}
/*
** Advance an fsdir_cursor to its next row of output.
*/
static int fsdirNext(sqlite3_vtab_cursor *cur){
fsdir_cursor *pCur = (fsdir_cursor*)cur;
mode_t m = pCur->sStat.st_mode;
pCur->iRowid++;
if( S_ISDIR(m) ){
/* Descend into this directory */
int iNew = pCur->iLvl + 1;
FsdirLevel *pLvl;
if( iNew>=pCur->nLvl ){
int nNew = iNew+1;
int nByte = nNew*sizeof(FsdirLevel);
FsdirLevel *aNew = (FsdirLevel*)sqlite3_realloc(pCur->aLvl, nByte);
if( aNew==0 ) return SQLITE_NOMEM;
memset(&aNew[pCur->nLvl], 0, sizeof(FsdirLevel)*(nNew-pCur->nLvl));
pCur->aLvl = aNew;
pCur->nLvl = nNew;
}
pCur->iLvl = iNew;
pLvl = &pCur->aLvl[iNew];
pLvl->zDir = pCur->zPath;
pCur->zPath = 0;
pLvl->pDir = opendir(pLvl->zDir);
if( pLvl->pDir==0 ){
fsdirSetErrmsg(pCur, "cannot read directory: %s", pCur->zPath);
return SQLITE_ERROR;
}
}
while( pCur->iLvl>=0 ){
FsdirLevel *pLvl = &pCur->aLvl[pCur->iLvl];
struct dirent *pEntry = readdir(pLvl->pDir);
if( pEntry ){
if( pEntry->d_name[0]=='.' ){
if( pEntry->d_name[1]=='.' && pEntry->d_name[2]=='\0' ) continue;
if( pEntry->d_name[1]=='\0' ) continue;
}
sqlite3_free(pCur->zPath);
pCur->zPath = sqlite3_mprintf("%s/%s", pLvl->zDir, pEntry->d_name);
if( pCur->zPath==0 ) return SQLITE_NOMEM;
if( fileLinkStat(pCur->zPath, &pCur->sStat) ){
fsdirSetErrmsg(pCur, "cannot stat file: %s", pCur->zPath);
return SQLITE_ERROR;
}
return SQLITE_OK;
}
closedir(pLvl->pDir);
sqlite3_free(pLvl->zDir);
pLvl->pDir = 0;
pLvl->zDir = 0;
pCur->iLvl--;
}
/* EOF */
sqlite3_free(pCur->zPath);
pCur->zPath = 0;
return SQLITE_OK;
}
/*
** Return values of columns for the row at which the series_cursor
** is currently pointing.
*/
static int fsdirColumn(
sqlite3_vtab_cursor *cur, /* The cursor */
sqlite3_context *ctx, /* First argument to sqlite3_result_...() */
int i /* Which column to return */
){
fsdir_cursor *pCur = (fsdir_cursor*)cur;
switch( i ){
case 0: { /* name */
sqlite3_result_text(ctx, &pCur->zPath[pCur->nBase], -1, SQLITE_TRANSIENT);
break;
}
case 1: /* mode */
sqlite3_result_int64(ctx, pCur->sStat.st_mode);
break;
case 2: /* mtime */
sqlite3_result_int64(ctx, pCur->sStat.st_mtime);
break;
case 3: { /* data */
mode_t m = pCur->sStat.st_mode;
if( S_ISDIR(m) ){
sqlite3_result_null(ctx);
#if !defined(_WIN32) && !defined(WIN32)
}else if( S_ISLNK(m) ){
char aStatic[64];
char *aBuf = aStatic;
int nBuf = 64;
int n;
while( 1 ){
n = readlink(pCur->zPath, aBuf, nBuf);
if( n<nBuf ) break;
if( aBuf!=aStatic ) sqlite3_free(aBuf);
nBuf = nBuf*2;
aBuf = sqlite3_malloc(nBuf);
if( aBuf==0 ){
sqlite3_result_error_nomem(ctx);
return SQLITE_NOMEM;
}
}
sqlite3_result_text(ctx, aBuf, n, SQLITE_TRANSIENT);
if( aBuf!=aStatic ) sqlite3_free(aBuf);
#endif
}else{
readFileContents(ctx, pCur->zPath);
}
}
}
return SQLITE_OK;
}
/*
** Return the rowid for the current row. In this implementation, the
** first row returned is assigned rowid value 1, and each subsequent
** row a value 1 more than that of the previous.
*/
static int fsdirRowid(sqlite3_vtab_cursor *cur, sqlite_int64 *pRowid){
fsdir_cursor *pCur = (fsdir_cursor*)cur;
*pRowid = pCur->iRowid;
return SQLITE_OK;
}
/*
** Return TRUE if the cursor has been moved off of the last
** row of output.
*/
static int fsdirEof(sqlite3_vtab_cursor *cur){
fsdir_cursor *pCur = (fsdir_cursor*)cur;
return (pCur->zPath==0);
}
/*
** xFilter callback.
*/
static int fsdirFilter(
sqlite3_vtab_cursor *cur,
int idxNum, const char *idxStr,
int argc, sqlite3_value **argv
){
const char *zDir = 0;
fsdir_cursor *pCur = (fsdir_cursor*)cur;
(void)idxStr;
fsdirResetCursor(pCur);
if( idxNum==0 ){
fsdirSetErrmsg(pCur, "table function fsdir requires an argument");
return SQLITE_ERROR;
}
assert( argc==idxNum && (argc==1 || argc==2) );
zDir = (const char*)sqlite3_value_text(argv[0]);
if( zDir==0 ){
fsdirSetErrmsg(pCur, "table function fsdir requires a non-NULL argument");
return SQLITE_ERROR;
}
if( argc==2 ){
pCur->zBase = (const char*)sqlite3_value_text(argv[1]);
}
if( pCur->zBase ){
pCur->nBase = (int)strlen(pCur->zBase)+1;
pCur->zPath = sqlite3_mprintf("%s/%s", pCur->zBase, zDir);
}else{
pCur->zPath = sqlite3_mprintf("%s", zDir);
}
if( pCur->zPath==0 ){
return SQLITE_NOMEM;
}
if( fileLinkStat(pCur->zPath, &pCur->sStat) ){
fsdirSetErrmsg(pCur, "cannot stat file: %s", pCur->zPath);
return SQLITE_ERROR;
}
return SQLITE_OK;
}
/*
** SQLite will invoke this method one or more times while planning a query
** that uses the generate_series virtual table. This routine needs to create
** a query plan for each invocation and compute an estimated cost for that
** plan.
**
** In this implementation idxNum is used to represent the
** query plan. idxStr is unused.
**
** The query plan is represented by bits in idxNum:
**
** (1) start = $value -- constraint exists
** (2) stop = $value -- constraint exists
** (4) step = $value -- constraint exists
** (8) output in descending order
*/
static int fsdirBestIndex(
sqlite3_vtab *tab,
sqlite3_index_info *pIdxInfo
){
int i; /* Loop over constraints */
int idx4 = -1;
int idx5 = -1;
const struct sqlite3_index_constraint *pConstraint;
(void)tab;
pConstraint = pIdxInfo->aConstraint;
for(i=0; i<pIdxInfo->nConstraint; i++, pConstraint++){
if( pConstraint->usable==0 ) continue;
if( pConstraint->op!=SQLITE_INDEX_CONSTRAINT_EQ ) continue;
if( pConstraint->iColumn==4 ) idx4 = i;
if( pConstraint->iColumn==5 ) idx5 = i;
}
if( idx4<0 ){
pIdxInfo->idxNum = 0;
pIdxInfo->estimatedCost = (double)(((sqlite3_int64)1) << 50);
}else{
pIdxInfo->aConstraintUsage[idx4].omit = 1;
pIdxInfo->aConstraintUsage[idx4].argvIndex = 1;
if( idx5>=0 ){
pIdxInfo->aConstraintUsage[idx5].omit = 1;
pIdxInfo->aConstraintUsage[idx5].argvIndex = 2;
pIdxInfo->idxNum = 2;
pIdxInfo->estimatedCost = 10.0;
}else{
pIdxInfo->idxNum = 1;
pIdxInfo->estimatedCost = 100.0;
}
}
return SQLITE_OK;
}
/*
** Register the "fsdir" virtual table.
*/
static int fsdirRegister(sqlite3 *db){
static sqlite3_module fsdirModule = {
0, /* iVersion */
0, /* xCreate */
fsdirConnect, /* xConnect */
fsdirBestIndex, /* xBestIndex */
fsdirDisconnect, /* xDisconnect */
0, /* xDestroy */
fsdirOpen, /* xOpen - open a cursor */
fsdirClose, /* xClose - close a cursor */
fsdirFilter, /* xFilter - configure scan constraints */
fsdirNext, /* xNext - advance a cursor */
fsdirEof, /* xEof - check for end of scan */
fsdirColumn, /* xColumn - read data */
fsdirRowid, /* xRowid - read data */
0, /* xUpdate */
0, /* xBegin */
0, /* xSync */
0, /* xCommit */
0, /* xRollback */
0, /* xFindMethod */
0, /* xRename */
0, /* xSavepoint */
0, /* xRelease */
0 /* xRollbackTo */
};
int rc = sqlite3_create_module(db, "fsdir", &fsdirModule, 0);
return rc;
}
#else /* SQLITE_OMIT_VIRTUALTABLE */
# define fsdirRegister(x) SQLITE_OK
#endif
#ifdef _WIN32
__declspec(dllexport)
#endif
int sqlite3_fileio_init(
sqlite3 *db,
char **pzErrMsg,
const sqlite3_api_routines *pApi
){
int rc = SQLITE_OK;
SQLITE_EXTENSION_INIT2(pApi);
(void)pzErrMsg; /* Unused parameter */
rc = sqlite3_create_function(db, "readfile", 1, SQLITE_UTF8, 0,
readfileFunc, 0, 0);
if( rc==SQLITE_OK ){
rc = sqlite3_create_function(db, "writefile", -1, SQLITE_UTF8, 0,
writefileFunc, 0, 0);
}
if( rc==SQLITE_OK ){
rc = sqlite3_create_function(db, "lsmode", 1, SQLITE_UTF8, 0,
lsModeFunc, 0, 0);
}
if( rc==SQLITE_OK ){
rc = fsdirRegister(db);
}
return rc;
}
|
the_stack_data/34512465.c
|
/* Tests clBuildProgram, passing the user options etc.
Copyright (c) 2013 Pekka Jääskeläinen and
Kalray
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <CL/cl.h>
#define MAX_PLATFORMS 32
#define MAX_DEVICES 32
#define MAX_BINARIES 32
/* A dummy kernel that just includes another kernel. To test the #include and
-I */
char kernel[] =
"#include \"test_kernel_src_in_another_dir.h\"\n"
"#include \"test_kernel_src_in_pwd.h\"\n";
int
main(void){
cl_int err;
cl_platform_id platforms[MAX_PLATFORMS];
cl_uint nplatforms;
cl_device_id devices[MAX_DEVICES + 1]; // + 1 for duplicate test
cl_uint num_devices;
cl_uint i;
cl_program program = NULL;
cl_program program_with_binary = NULL;
err = clGetPlatformIDs(MAX_PLATFORMS, platforms, &nplatforms);
if (err != CL_SUCCESS && !nplatforms)
return EXIT_FAILURE;
err = clGetDeviceIDs(platforms[0], CL_DEVICE_TYPE_ALL, MAX_DEVICES,
devices, &num_devices);
if (err != CL_SUCCESS)
return EXIT_FAILURE;
cl_context context = clCreateContext(NULL, num_devices, devices, NULL, NULL, &err);
if (err != CL_SUCCESS)
return EXIT_FAILURE;
size_t kernel_size = strlen(kernel);
char* kernel_buffer = kernel;
program = clCreateProgramWithSource(context, 1, (const char**)&kernel_buffer,
&kernel_size, &err);
if (err != CL_SUCCESS)
return EXIT_FAILURE;
err = clBuildProgram
(program, num_devices, devices,
"-D__FUNC__=helper_func -I./test_data",
NULL, NULL);
if (err != CL_SUCCESS)
return EXIT_FAILURE;
return err == CL_SUCCESS ? EXIT_SUCCESS : EXIT_FAILURE;
}
|
the_stack_data/14758.c
|
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <dirent.h>
#include <sys/types.h>//mkdir
#include <sys/stat.h> //mkdir
#include <unistd.h>
int main(int argc, char *argv[]) {
int mod_rwx = 0755; // S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH
char buffer[100];
memset(buffer, 0, sizeof (buffer));
if (argc == 2) {
strcpy(buffer, argv[1]);
} else {
printf("Enter name directory \n");
}
int result = mkdir(buffer, mod_rwx);
if (result >= 0) {
printf("Ok make!!!\n");
} else {
printf("cannot make!!!\n");
}
return 0;
}
|
the_stack_data/92326481.c
|
extern const unsigned char CocoaLumberjackVersionString[];
extern const double CocoaLumberjackVersionNumber;
const unsigned char CocoaLumberjackVersionString[] __attribute__ ((used)) = "@(#)PROGRAM:CocoaLumberjack PROJECT:Pods-1" "\n";
const double CocoaLumberjackVersionNumber __attribute__ ((used)) = (double)1.;
|
the_stack_data/107952969.c
|
/* This testcase is part of GDB, the GNU debugger.
Copyright 2005-2019 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
int array[] = {1, 2, 3, 4};
int
main (void)
{
array[0] = 5;
return 0;
}
|
the_stack_data/90762275.c
|
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
#include <fcntl.h>
#include <sys/mman.h>
int main(int argc, char *argv[])
{
int fd, i;
char *end;
volatile void *cfg, *sts;
volatile uint32_t *fifo;
volatile uint8_t *rst;
volatile uint16_t *cntr;
long number;
uint32_t buffer;
float corr;
errno = 0;
number = (argc == 2) ? strtol(argv[1], &end, 10) : -1;
if(errno != 0 || end == argv[1] || number < 1 || number > 30)
{
fprintf(stderr, "Usage: measure-corr [1-30]\n");
return EXIT_FAILURE;
}
if((fd = open("/dev/mem", O_RDWR)) < 0)
{
fprintf(stderr, "Cannot open /dev/mem.\n");
return EXIT_FAILURE;
}
sts = mmap(NULL, sysconf(_SC_PAGESIZE), PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0x40000000);
cfg = mmap(NULL, sysconf(_SC_PAGESIZE), PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0x40001000);
fifo = mmap(NULL, sysconf(_SC_PAGESIZE), PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0x40013000);
rst = (uint8_t *)(cfg + 3);
cntr = (uint16_t *)(sts + 28);
*rst &= ~1;
*rst |= 1;
sleep(number + 1);
if(*cntr < number)
{
fprintf(stderr, "Not enough PPS pulses.\n");
return EXIT_FAILURE;
}
buffer = 0;
for(i = 0; i < number; ++i)
{
buffer += *fifo + 1;
}
corr = (122.88e6 * number / buffer - 1.0) * 1.0e6;
if(corr < -100.0 || corr > 100.0)
{
fprintf(stderr, "Correction value is out of range.\n");
return EXIT_FAILURE;
}
printf("%.2f\n", corr);
return EXIT_SUCCESS;
}
|
the_stack_data/232955085.c
|
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
*
* This code is derived from software contributed to Berkeley by
* Chris Torek.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
#include <stdint.h>
/*
* sizeof(word) MUST BE A POWER OF TWO
* SO THAT wmask BELOW IS ALL ONES
*/
typedef int word; /* "word" used for optimal copy speed */
#define wsize sizeof(word)
#define wmask (wsize - 1)
/*
* Copy a block of memory, handling overlap.
* This is the routine that actually implements
* (the portable versions of) bcopy, memcpy, and memmove.
*/
#if defined(MEMCOPY) || defined(MEMMOVE)
#include <string.h>
void *
#ifdef MEMCOPY
memcpy
#else
memmove
#endif
(void *dst0, const void *src0, size_t length)
#else
#include <strings.h>
void
bcopy(const void *src0, void *dst0, size_t length)
#endif
{
char *dst = dst0;
const char *src = src0;
size_t t;
if (length == 0 || dst == src) /* nothing to do */
goto done;
/*
* Macros: loop-t-times; and loop-t-times, t>0
*/
#define TLOOP(s) if (t) TLOOP1(s)
#define TLOOP1(s) do { s; } while (--t)
if ((unsigned long)dst < (unsigned long)src) {
/*
* Copy forward.
*/
t = (uintptr_t)src; /* only need low bits */
if ((t | (uintptr_t)dst) & wmask) {
/*
* Try to align operands. This cannot be done
* unless the low bits match.
*/
if ((t ^ (uintptr_t)dst) & wmask || length < wsize)
t = length;
else
t = wsize - (t & wmask);
length -= t;
TLOOP1(*dst++ = *src++);
}
/*
* Copy whole words, then mop up any trailing bytes.
*/
t = length / wsize;
TLOOP(*(word *)dst = *(word *)src; src += wsize; dst += wsize);
t = length & wmask;
TLOOP(*dst++ = *src++);
} else {
/*
* Copy backwards. Otherwise essentially the same.
* Alignment works as before, except that it takes
* (t&wmask) bytes to align, not wsize-(t&wmask).
*/
src += length;
dst += length;
t = (uintptr_t)src;
if ((t | (uintptr_t)dst) & wmask) {
if ((t ^ (uintptr_t)dst) & wmask || length <= wsize)
t = length;
else
t &= wmask;
length -= t;
TLOOP1(*--dst = *--src);
}
t = length / wsize;
TLOOP(src -= wsize; dst -= wsize; *(word *)dst = *(word *)src);
t = length & wmask;
TLOOP(*--dst = *--src);
}
done:
#if defined(MEMCOPY) || defined(MEMMOVE)
return (dst0);
#else
return;
#endif
}
|
the_stack_data/544501.c
|
/*
Task 1 of C Programming assignment
Cryptographic hash lookup generator (Simplified Version)
Author: Javier Yong 1726682 DISM/1A/21
Ng Jun Xiang 1703151 DISM/1A/21
Last Updated: 23/12/2017
*/
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <crypt.h>
#include <ctype.h>
#include <time.h>
void starttime();
void endtime();
void words(FILE * filename,int maxsize,int minsize);
int main(int argc, char const *argv[]){
starttime(); // calling starttime function
char filename[256]; //declare a char array variable to store the value of the wordlist file name in the command line argument
if(argc != 4){
printf("Usage : ./task1 <wordlist> <min> <max>\n\t<wordlist> : A file path/name in which contains the password dictionary\n\t<min> : An integer value greater than 1.\n\t\tThis value represents the minimum length of the password\n\t<max> : An integer value greater than or equal to <min>.\n\t\t<max> represents the maximum length of the password.\n");
endtime();
exit(-1);
}
strcpy(filename,argv[1]);
int minsize = atoi(argv[2]);
int maxsize = atoi(argv[3]);
FILE *file = fopen(filename,"r");
if(file == NULL){
printf("Fatal error! wordlist: %s, cannot be not found\n ", argv[1]);
}
else if (minsize > maxsize){
printf("Usage : ./task1 <wordlist> <min> <max>\n\t<wordlist> : A file path/name in which contains the password dictionary\n\t<min> : An integer value greater than 1.\n\t\tThis value represents the minimum length of the password\n\t<max> : An integer value greater than or equal to <min>.\n\t\t<max> represents the maximum length of the password.\n");
}
else{ //if file is valid
words(file,maxsize,minsize);
}
endtime(); // calling endtime function
return 0; // end of the program
}
//this function calculates the system time when the program is executed and prints on the terminal
void starttime(){
time_t timer; // declare the variable timer as a arithmetic time type
char buffer[26]; // declare an array buffer of size 26
struct tm* tm_info; // delcare tm_info as a simplified calender time type,year,month,day,hour,seconds,minute
time(&timer); // returns current time of ubuntu system as a time_t value and store it into address of timer
tm_info = localtime(&timer); // converts time_t value (&timer) and express as local time
strftime(buffer, 26, "%Y-%m-%d %H:%M:%S", tm_info); // converts struct_tm object to year-month-date and hour-minutes-seconds and store it in the buffer array
printf("Program started at %s\n",buffer); // print out the value of the buffer array
}
//this function calculate the systen time before the program exits and prints the time on terminal
void endtime(){
time_t timer; // declare the variable timer as a arithmetic time type
char buffer[26]; // declare an array buffer of size 26
struct tm* tm_info; // delcare tm_info as a simplified calender time type,year,month,day,hour,seconds,minute
time(&timer); // returns current time of ubuntu system as a time_t value and store it into address of timer
tm_info = localtime(&timer); // converts time_t value (&timer) and express as local time
strftime(buffer, 26, "%Y-%m-%d %H:%M:%S", tm_info); // converts struct_tm object to year-month-date and hour-minutes-seconds and store it in the buffer array
printf("Program ended at %s\n",buffer); // print out the value of the buffer array
}
/*
word function takes in a file pointer of the wordlist file, and the minimum and maximum word length from the terminal input in the function parameters.
This function hashes each word in the wordlist file using the crypt library,
each word is hash to MD5 and SHA-512 until it reaches to the end of the file
*/
void words(FILE * filename,int maxsize,int minsize){
char * hash_type_1 = "$1$"; // type 1 implies md5 (number of iteration is only 1000 rounds)
char * hash_type_2 = "$6$"; // type 2 implies sha-512 (default value as in yr 2017, number of iteration is minimum 10,000 rounds )
char * salt_1 ="$"; // a simplified 0 length salt.
char * result;
char encyption_scheme[20]; // declare an array of size 20 to store the encryption type for md5 later
char encyption_scheme2[20]; // declare an array of size 20 to store the encryption type for sha-512 later
int count=0;
char sizeofline[50];
strcpy(encyption_scheme,hash_type_1); // copy value of hashtype into encyptionscheme
strcpy(encyption_scheme2,hash_type_2);
strcat(encyption_scheme,salt_1); // add "$" into value of encryptionscheme
strcat(encyption_scheme2,salt_1);
FILE *fp =fopen("mytab2411.txt","w"); // Open mytab2411.txt and allow writing permission, able to change the content of file
while((fgets(sizeofline,sizeof(sizeofline),filename)) != NULL){
// To read the file line by line from "smallwordlist until the last line.
//A null pointer is returned when EOF is encountered and no more characters can be read
int len = strlen(sizeofline); //finding the length of each word plus '\n' character
if(len - 1 >= minsize && len - 1 <= maxsize){ //if the length of word is in the range of the min and max value specified in command line
//finding the last character
while( len>0 && isspace(sizeofline[len-1])){ // Searches for "\n" (last character in the password)
// printf("%d\n",len); This would print the length of the first password .. Examaple C\n (two character)
len--;
// printf("%d\n",len); This would print the new length of the first password , which is now C "one character"
// It then returns to the while loop
// Since len-1 is now just C , it does not fulfil the isspace() requirement and therefore exits the while loop
}
// Since the program nows know where the last character is, it thus makes the last character a '\0' value
sizeofline[len]='\0';
result = crypt(sizeofline,encyption_scheme); // store the encrypted value into result using md5 encryption
fprintf(fp,"%s:%s\n",sizeofline,result);// print the result into mytab2411.txt file
result = crypt(sizeofline,encyption_scheme2);// store the encrypted value into result using sha-512 encryption
fprintf(fp,"%s:%s\n",sizeofline,result);// print the result into mytab2411.txt file
count++; // count the numbers of line in small_wordlist.txt
}
else{ //if word length does not fit the condition in if statement
continue; //forces the next iteration/next word
}
}
printf("Total number of words processed\t=>%d\n",count ); // number of line in small wordlist
printf("Total number of generated entries =>%d\n",count*2); // number of encrypted passwords in both sha-512 and md5
}
/*
References:
starttime and endtime function adapted from: https://stackoverflow.com/questions/5141960/get-the-current-time-in-c
strftime function: https://www.tutorialspoint.com/c_standard_library/c_function_strftime.htm
isspace function: https://www.tutorialspoint.com/c_standard_library/c_function_isspace.htm
crypt library and crypt function adapted from mkpassword.c
fgets function used for reading file: https://stackoverflow.com/questions/9434207/reading-from-file-using-fgets
strcat function: https://www.tutorialspoint.com/c_standard_library/c_function_strcat.htm
*/
|
the_stack_data/704753.c
|
typedef int __pid_t;
int handle_sigchld()
{
int status;
int pid;
char signame[32];
if (((union {__pid_t __in;int __i;}){.__in = status} . __i & 0xff) == 0x7f)
{
if (((union {__pid_t __in;int __i;}){status} . __i & 0xff00) >> 8 == -1)
{
signame[0] = 'x';
}
signame[0] = 'x';
}
signame[0] = 'x';
}
|
the_stack_data/45898.c
|
#include <stdio.h>
int main(int argc, char *argv[]) {
printf("hello world A12Z, double=%lu, long double=%lu\n", sizeof(double), sizeof(long double));
return 0;
}
|
the_stack_data/83910.c
|
#include <complex.h>
#include <stdint.h>
void hspiral_dft_32(const double X[restrict static 64],
double Y[restrict static 64])
{
double t;
double t1;
double t2;
double t3;
double t4;
double t5;
double t6;
double t7;
double t8;
double t9;
double t10;
double t11;
double t12;
double t13;
double t14;
double t15;
double t16;
double t17;
double t18;
double t19;
double t20;
double t21;
double t22;
double t23;
double t24;
double t25;
double t26;
double t27;
double t28;
double t29;
double t30;
double t31;
double t32;
double t33;
double t34;
double t35;
double t36;
double t37;
double t38;
double t39;
double t40;
double t41;
double t42;
double t43;
double t44;
double t45;
double t46;
double t47;
double t48;
double t49;
double t50;
double t51;
double t52;
double t53;
double t54;
double t55;
double t56;
double t57;
double t58;
double t59;
double t60;
double t61;
double t62;
double t63;
double t64;
double t65;
double t66;
double t67;
double t68;
double t69;
double t70;
double t71;
double t72;
double t73;
double t74;
double t75;
double t76;
double t77;
double t78;
double t79;
double t80;
double t81;
double t82;
double t83;
double t84;
double t85;
double t86;
double t87;
double t88;
double t89;
double t90;
double t91;
double t92;
double t93;
double t94;
double t95;
double t96;
double t97;
double t98;
double t99;
double t100;
double t101;
double t102;
double t103;
double t104;
double t105;
double t106;
double t107;
double t108;
double t109;
double t110;
double t111;
double t112;
double t113;
double t114;
double t115;
double t116;
double t117;
double t118;
double t119;
double t120;
double t121;
double t122;
double t123;
double t124;
double t125;
double t126;
double t127;
double t128;
double t129;
double t130;
double t131;
double t132;
double t133;
double t134;
double t135;
double t136;
double t137;
double t138;
double t139;
double t140;
double t141;
double t142;
double t143;
double t144;
double t145;
double t146;
double t147;
double t148;
double t149;
double t150;
double t151;
double t152;
double t153;
double t154;
double t155;
double t156;
double t157;
double t158;
double t159;
double t160;
double t161;
double t162;
double t163;
double t164;
double t165;
double t166;
double t167;
double t168;
double t169;
double t170;
double t171;
double t172;
double t173;
double t174;
double t175;
double t176;
double t177;
double t178;
double t179;
double t180;
double t181;
double t182;
double t183;
double t184;
double t185;
double t186;
double t187;
double t188;
double t189;
double t190;
double t191;
double t192;
double t193;
double t194;
double t195;
double t196;
double t197;
double t198;
double t199;
double t200;
double t201;
double t202;
double t203;
double t204;
double t205;
double t206;
double t207;
double t208;
double t209;
double t210;
double t211;
double t212;
double t213;
double t214;
double t215;
double t216;
double t217;
double t218;
double t219;
double t220;
double t221;
double t222;
double t223;
double t224;
double t225;
double t226;
double t227;
double t228;
double t229;
double t230;
double t231;
double t232;
double t233;
double t234;
double t235;
double t236;
double t237;
double t238;
double t239;
double t240;
double t241;
double t242;
double t243;
double t244;
double t245;
double t246;
double t247;
double t248;
double t249;
double t250;
double t251;
double t252;
double t253;
double t254;
double t255;
double t256;
double t257;
double t258;
double t259;
double t260;
double t261;
double t262;
double t263;
double t264;
double t265;
double t266;
double t267;
double t268;
double t269;
double t270;
double t271;
double t272;
double t273;
double t274;
double t275;
double t276;
double t277;
double t278;
double t279;
double t280;
double t281;
double t282;
double t283;
double t284;
double t285;
double t286;
double t287;
double t288;
double t289;
double t290;
double t291;
double t292;
double t293;
double t294;
double t295;
double t296;
double t297;
double t298;
double t299;
double t300;
double t301;
double t302;
double t303;
double t304;
double t305;
double t306;
double t307;
double t308;
double t309;
double t310;
double t311;
double t312;
double t313;
double t314;
double t315;
double t316;
double t317;
double t318;
double t319;
double t320;
double t321;
double t322;
double t323;
double t324;
double t325;
double t326;
double t327;
double t328;
double t329;
double t330;
double t331;
double t332;
double t333;
double t334;
double t335;
double t336;
double t337;
double t338;
double t339;
double t340;
double t341;
double t342;
double t343;
double t344;
double t345;
double t346;
double t347;
double t348;
double t349;
double t350;
double t351;
double t352;
double t353;
double t354;
double t355;
double t356;
double t357;
double t358;
double t359;
double t360;
double t361;
double t362;
double t363;
double t364;
double t365;
double t366;
double t367;
double t368;
double t369;
double t370;
double t371;
double t372;
double t373;
double t374;
double t375;
double t376;
double t377;
double t378;
double t379;
double t380;
double t381;
double t382;
double t383;
double t384;
double t385;
double t386;
double t387;
double t388;
double t389;
double t390;
double t391;
double t392;
double t393;
double t394;
double t395;
double t396;
double t397;
double t398;
double t399;
double t400;
double t401;
double t402;
double t403;
double t404;
double t405;
double t406;
double t407;
double t408;
double t409;
double t410;
double t411;
double t412;
double t413;
double t414;
double t415;
double t416;
double t417;
double t418;
double t419;
double t420;
double t421;
double t422;
double t423;
double t424;
double t425;
double t426;
double t427;
double t428;
double t429;
double t430;
double t431;
double t432;
double t433;
double t434;
double t435;
double t436;
double t437;
double t438;
double t439;
double t440;
double t441;
double t442;
double t443;
double t444;
double t445;
double t446;
double t447;
double t448;
double t449;
double t450;
double t451;
double t452;
double t453;
double t454;
double t455;
double t456;
double t457;
double t458;
double t459;
double t460;
double t461;
double t462;
double t463;
double t464;
double t465;
double t466;
double t467;
double t468;
double t469;
double t470;
double t471;
double t472;
double t473;
double t474;
double t475;
double t476;
double t477;
double t478;
double t479;
double t480;
double t481;
double t482;
double t483;
double t484;
double t485;
double t486;
double t487;
double t488;
double t489;
double t490;
double t491;
double t492;
double t493;
double t494;
double t495;
double t496;
double t497;
double t498;
double t499;
double t500;
double t501;
double t502;
double t503;
double t504;
double t505;
double t506;
double t507;
double t508;
double t509;
double t510;
double t511;
t = X[0];
t1 = X[1];
t2 = X[4];
t3 = X[5];
t4 = X[8];
t5 = X[9];
t6 = X[12];
t7 = X[13];
t8 = X[16];
t9 = X[17];
t10 = X[20];
t11 = X[21];
t12 = X[24];
t13 = X[25];
t14 = X[28];
t15 = X[29];
t16 = X[32];
t17 = X[33];
t18 = X[36];
t19 = X[37];
t20 = X[40];
t21 = X[41];
t22 = X[44];
t23 = X[45];
t24 = X[48];
t25 = X[49];
t26 = X[52];
t27 = X[53];
t28 = X[56];
t29 = X[57];
t30 = X[60];
t31 = X[61];
t32 = X[2];
t33 = X[3];
t34 = X[10];
t35 = X[11];
t36 = X[18];
t37 = X[19];
t38 = X[26];
t39 = X[27];
t40 = X[34];
t41 = X[35];
t42 = X[42];
t43 = X[43];
t44 = X[50];
t45 = X[51];
t46 = X[58];
t47 = X[59];
t48 = X[6];
t49 = X[7];
t50 = X[14];
t51 = X[15];
t52 = X[22];
t53 = X[23];
t54 = X[30];
t55 = X[31];
t56 = X[38];
t57 = X[39];
t58 = X[46];
t59 = X[47];
t60 = X[54];
t61 = X[55];
t62 = X[62];
t63 = X[63];
t64 = t + t16;
t65 = t1 + t17;
t66 = t - t16;
t67 = t1 - t17;
t68 = t8 + t24;
t69 = t9 + t25;
t70 = t8 - t24;
t71 = t9 - t25;
t72 = t64 + t68;
t73 = t65 + t69;
t74 = t64 - t68;
t75 = t65 - t69;
t76 = t66 + t71;
t77 = t67 - t70;
t78 = t66 - t71;
t79 = t67 + t70;
t80 = t2 + t18;
t81 = t3 + t19;
t82 = t2 - t18;
t83 = t3 - t19;
t84 = t10 + t26;
t85 = t11 + t27;
t86 = t10 - t26;
t87 = t11 - t27;
t88 = t80 + t84;
t89 = t81 + t85;
t90 = t80 - t84;
t91 = t81 - t85;
t92 = t82 + t87;
t93 = t83 - t86;
t94 = t82 - t87;
t95 = t83 + t86;
t96 = t4 + t20;
t97 = t5 + t21;
t98 = t4 - t20;
t99 = t5 - t21;
t100 = t12 + t28;
t101 = t13 + t29;
t102 = t12 - t28;
t103 = t13 - t29;
t104 = t96 + t100;
t105 = t97 + t101;
t106 = t96 - t100;
t107 = t97 - t101;
t108 = t98 + t103;
t109 = t99 - t102;
t110 = t98 - t103;
t111 = t99 + t102;
t112 = t6 + t22;
t113 = t7 + t23;
t114 = t6 - t22;
t115 = t7 - t23;
t116 = t14 + t30;
t117 = t15 + t31;
t118 = t14 - t30;
t119 = t15 - t31;
t120 = t112 + t116;
t121 = t113 + t117;
t122 = t112 - t116;
t123 = t113 - t117;
t124 = t114 + t119;
t125 = t115 - t118;
t126 = t114 - t119;
t127 = t115 + t118;
t128 = t72 + t104;
t129 = t73 + t105;
t130 = t72 - t104;
t131 = t73 - t105;
t132 = t88 + t120;
t133 = t89 + t121;
t134 = t88 - t120;
t135 = t89 - t121;
t136 = t128 + t132;
t137 = t129 + t133;
t138 = t128 - t132;
t139 = t129 - t133;
t140 = t130 + t135;
t141 = t131 - t134;
t142 = t130 - t135;
t143 = t131 + t134;
t144 = 0.7071067811865475 * t108;
t145 = 0.7071067811865475 * t109;
t146 = t144 + t145;
t147 = t76 + t146;
t148 = t144 - t145;
t149 = t77 - t148;
t150 = t76 - t146;
t151 = t77 + t148;
t152 = 0.9238795325112867 * t92;
t153 = 0.38268343236508984 * t93;
t154 = t152 + t153;
t155 = 0.38268343236508984 * t124;
t156 = 0.9238795325112867 * t125;
t157 = t155 + t156;
t158 = t154 + t157;
t159 = 0.38268343236508984 * t92;
t160 = 0.9238795325112867 * t93;
t161 = t159 - t160;
t162 = 0.9238795325112867 * t124;
t163 = 0.38268343236508984 * t125;
t164 = t162 - t163;
t165 = t161 + t164;
t166 = t154 - t157;
t167 = t161 - t164;
t168 = t147 + t158;
t169 = t149 - t165;
t170 = t147 - t158;
t171 = t149 + t165;
t172 = t150 - t167;
t173 = t151 - t166;
t174 = t150 + t167;
t175 = t151 + t166;
t176 = t74 + t107;
t177 = t75 - t106;
t178 = t74 - t107;
t179 = t75 + t106;
t180 = 0.7071067811865475 * t90;
t181 = 0.7071067811865475 * t91;
t182 = t180 + t181;
t183 = 0.7071067811865475 * t122;
t184 = 0.7071067811865475 * t123;
t185 = t183 - t184;
t186 = t182 - t185;
t187 = t180 - t181;
t188 = t183 + t184;
t189 = t187 + t188;
t190 = t182 + t185;
t191 = t187 - t188;
t192 = t176 + t186;
t193 = t177 - t189;
t194 = t176 - t186;
t195 = t177 + t189;
t196 = t178 - t191;
t197 = t179 - t190;
t198 = t178 + t191;
t199 = t179 + t190;
t200 = 0.7071067811865475 * t110;
t201 = 0.7071067811865475 * t111;
t202 = t200 - t201;
t203 = t78 - t202;
t204 = t200 + t201;
t205 = t79 - t204;
t206 = t78 + t202;
t207 = t79 + t204;
t208 = 0.38268343236508984 * t94;
t209 = 0.9238795325112867 * t95;
t210 = t208 + t209;
t211 = 0.9238795325112867 * t126;
t212 = 0.38268343236508984 * t127;
t213 = t211 + t212;
t214 = t210 - t213;
t215 = 0.9238795325112867 * t94;
t216 = 0.38268343236508984 * t95;
t217 = t215 - t216;
t218 = 0.38268343236508984 * t126;
t219 = 0.9238795325112867 * t127;
t220 = t218 - t219;
t221 = t217 - t220;
t222 = t210 + t213;
t223 = t217 + t220;
t224 = t203 + t214;
t225 = t205 - t221;
t226 = t203 - t214;
t227 = t205 + t221;
t228 = t206 - t223;
t229 = t207 - t222;
t230 = t206 + t223;
t231 = t207 + t222;
t232 = t32 + t40;
t233 = t33 + t41;
t234 = t32 - t40;
t235 = t33 - t41;
t236 = t36 + t44;
t237 = t37 + t45;
t238 = t36 - t44;
t239 = t37 - t45;
t240 = t232 + t236;
t241 = t233 + t237;
t242 = t232 - t236;
t243 = t233 - t237;
t244 = t234 + t239;
t245 = t235 - t238;
t246 = t234 - t239;
t247 = t235 + t238;
t248 = t34 + t42;
t249 = t35 + t43;
t250 = t34 - t42;
t251 = t35 - t43;
t252 = t38 + t46;
t253 = t39 + t47;
t254 = t38 - t46;
t255 = t39 - t47;
t256 = t250 + t251;
t257 = t250 - t251;
t258 = t254 - t255;
t259 = t254 + t255;
t260 = t248 + t252;
t261 = t249 + t253;
t262 = t248 - t252;
t263 = t249 - t253;
t264 = t240 + t260;
t265 = t241 + t261;
t266 = t240 - t260;
t267 = t241 - t261;
t268 = t242 + t263;
t269 = t243 - t262;
t270 = t242 - t263;
t271 = t243 + t262;
t272 = t256 - t258;
t273 = t257 + t259;
t274 = t256 + t258;
t275 = t257 - t259;
t276 = t244 + t272;
t277 = t245 - t273;
t278 = t244 - t272;
t279 = t245 + t273;
t280 = t246 - t275;
t281 = t247 - t274;
t282 = t246 + t275;
t283 = t247 + t274;
t284 = t54 + t62;
t285 = t55 + t63;
t286 = t54 - t62;
t287 = t55 - t63;
t288 = t50 + t58;
t289 = t51 + t59;
t290 = t50 - t58;
t291 = t51 - t59;
t292 = t284 + t288;
t293 = t285 + t289;
t294 = t284 - t288;
t295 = t285 - t289;
t296 = t286 - t291;
t297 = t287 + t290;
t298 = t286 + t291;
t299 = t287 - t290;
t300 = t48 + t56;
t301 = t49 + t57;
t302 = t48 - t56;
t303 = t49 - t57;
t304 = t52 + t60;
t305 = t53 + t61;
t306 = t52 - t60;
t307 = t53 - t61;
t308 = t302 + t303;
t309 = t302 - t303;
t310 = t306 - t307;
t311 = t306 + t307;
t312 = t300 + t304;
t313 = t301 + t305;
t314 = t300 - t304;
t315 = t301 - t305;
t316 = t292 + t312;
t317 = t293 + t313;
t318 = t292 - t312;
t319 = t293 - t313;
t320 = t294 + t315;
t321 = t295 - t314;
t322 = t294 - t315;
t323 = t295 + t314;
t324 = t308 - t310;
t325 = t309 + t311;
t326 = t308 + t310;
t327 = t309 - t311;
t328 = t296 - t324;
t329 = t297 + t325;
t330 = t296 + t324;
t331 = t297 - t325;
t332 = t298 + t327;
t333 = t299 + t326;
t334 = t298 - t327;
t335 = t299 - t326;
t336 = 0.6935199226610737 * t276;
t337 = 0.13794968964147147 * t277;
t338 = t336 + t337;
t339 = 0.13794968964147147 * t276;
t340 = 0.6935199226610737 * t277;
t341 = t339 - t340;
t342 = 0.5879378012096793 * t280;
t343 = 0.392847479193551 * t281;
t344 = t342 + t343;
t345 = 0.392847479193551 * t280;
t346 = 0.5879378012096793 * t281;
t347 = t345 - t346;
t348 = 0.392847479193551 * t278;
t349 = 0.5879378012096793 * t279;
t350 = t348 + t349;
t351 = 0.5879378012096793 * t278;
t352 = 0.392847479193551 * t279;
t353 = t351 - t352;
t354 = 0.13794968964147147 * t282;
t355 = 0.6935199226610737 * t283;
t356 = t354 + t355;
t357 = 0.6935199226610737 * t282;
t358 = 0.13794968964147147 * t283;
t359 = t357 - t358;
t360 = 0.13794968964147147 * t329;
t361 = 0.6935199226610737 * t328;
t362 = t360 - t361;
t363 = 0.13794968964147147 * t328;
t364 = 0.6935199226610737 * t329;
t365 = t363 + t364;
t366 = 0.392847479193551 * t333;
t367 = 0.5879378012096793 * t332;
t368 = t366 - t367;
t369 = 0.392847479193551 * t332;
t370 = 0.5879378012096793 * t333;
t371 = t369 + t370;
t372 = 0.5879378012096793 * t331;
t373 = 0.392847479193551 * t330;
t374 = t372 - t373;
t375 = 0.5879378012096793 * t330;
t376 = 0.392847479193551 * t331;
t377 = t375 + t376;
t378 = 0.6935199226610737 * t335;
t379 = 0.13794968964147147 * t334;
t380 = t378 - t379;
t381 = 0.6935199226610737 * t334;
t382 = 0.13794968964147147 * t335;
t383 = t381 + t382;
t384 = t264 + t316;
t385 = t265 + t317;
t386 = t264 - t316;
t387 = t265 - t317;
t388 = t136 + t384;
Y[0] = t388;
t389 = t137 + t385;
Y[1] = t389;
t390 = t136 - t384;
Y[32] = t390;
t391 = t137 - t385;
Y[33] = t391;
t392 = t138 + t387;
Y[16] = t392;
t393 = t139 - t386;
Y[17] = t393;
t394 = t138 - t387;
Y[48] = t394;
t395 = t139 + t386;
Y[49] = t395;
t396 = t338 + t362;
t397 = t341 + t365;
t398 = t338 - t362;
t399 = t341 - t365;
t400 = t168 + t396;
Y[2] = t400;
t401 = t169 - t397;
Y[3] = t401;
t402 = t168 - t396;
Y[34] = t402;
t403 = t169 + t397;
Y[35] = t403;
t404 = t170 - t399;
Y[18] = t404;
t405 = t171 - t398;
Y[19] = t405;
t406 = t170 + t399;
Y[50] = t406;
t407 = t171 + t398;
Y[51] = t407;
t408 = 0.9238795325112867 * t268;
t409 = 0.38268343236508984 * t269;
t410 = t408 + t409;
t411 = 0.9238795325112867 * t320;
t412 = 0.38268343236508984 * t321;
t413 = t411 - t412;
t414 = t410 + t413;
t415 = 0.38268343236508984 * t268;
t416 = 0.9238795325112867 * t269;
t417 = t415 - t416;
t418 = 0.38268343236508984 * t320;
t419 = 0.9238795325112867 * t321;
t420 = t418 + t419;
t421 = t417 - t420;
t422 = t410 - t413;
t423 = t417 + t420;
t424 = t192 + t414;
Y[4] = t424;
t425 = t193 - t421;
Y[5] = t425;
t426 = t192 - t414;
Y[36] = t426;
t427 = t193 + t421;
Y[37] = t427;
t428 = t194 - t423;
Y[20] = t428;
t429 = t195 - t422;
Y[21] = t429;
t430 = t194 + t423;
Y[52] = t430;
t431 = t195 + t422;
Y[53] = t431;
t432 = t344 + t368;
t433 = t347 + t371;
t434 = t344 - t368;
t435 = t347 - t371;
t436 = t224 + t432;
Y[6] = t436;
t437 = t225 - t433;
Y[7] = t437;
t438 = t224 - t432;
Y[38] = t438;
t439 = t225 + t433;
Y[39] = t439;
t440 = t226 - t435;
Y[22] = t440;
t441 = t227 - t434;
Y[23] = t441;
t442 = t226 + t435;
Y[54] = t442;
t443 = t227 + t434;
Y[55] = t443;
t444 = 0.7071067811865475 * t266;
t445 = 0.7071067811865475 * t267;
t446 = t444 + t445;
t447 = 0.7071067811865475 * t318;
t448 = 0.7071067811865475 * t319;
t449 = t447 - t448;
t450 = t446 + t449;
t451 = t444 - t445;
t452 = t447 + t448;
t453 = t451 - t452;
t454 = t446 - t449;
t455 = t451 + t452;
t456 = t140 + t450;
Y[8] = t456;
t457 = t141 - t453;
Y[9] = t457;
t458 = t140 - t450;
Y[40] = t458;
t459 = t141 + t453;
Y[41] = t459;
t460 = t142 - t455;
Y[24] = t460;
t461 = t143 - t454;
Y[25] = t461;
t462 = t142 + t455;
Y[56] = t462;
t463 = t143 + t454;
Y[57] = t463;
t464 = t350 + t374;
t465 = t353 + t377;
t466 = t350 - t374;
t467 = t353 - t377;
t468 = t172 + t464;
Y[10] = t468;
t469 = t173 - t465;
Y[11] = t469;
t470 = t172 - t464;
Y[42] = t470;
t471 = t173 + t465;
Y[43] = t471;
t472 = t174 - t467;
Y[26] = t472;
t473 = t175 - t466;
Y[27] = t473;
t474 = t174 + t467;
Y[58] = t474;
t475 = t175 + t466;
Y[59] = t475;
t476 = 0.38268343236508984 * t270;
t477 = 0.9238795325112867 * t271;
t478 = t476 + t477;
t479 = 0.38268343236508984 * t322;
t480 = 0.9238795325112867 * t323;
t481 = t479 - t480;
t482 = t478 + t481;
t483 = 0.9238795325112867 * t270;
t484 = 0.38268343236508984 * t271;
t485 = t483 - t484;
t486 = 0.9238795325112867 * t322;
t487 = 0.38268343236508984 * t323;
t488 = t486 + t487;
t489 = t485 - t488;
t490 = t478 - t481;
t491 = t485 + t488;
t492 = t196 + t482;
Y[12] = t492;
t493 = t197 - t489;
Y[13] = t493;
t494 = t196 - t482;
Y[44] = t494;
t495 = t197 + t489;
Y[45] = t495;
t496 = t198 - t491;
Y[28] = t496;
t497 = t199 - t490;
Y[29] = t497;
t498 = t198 + t491;
Y[60] = t498;
t499 = t199 + t490;
Y[61] = t499;
t500 = t356 + t380;
t501 = t359 + t383;
t502 = t356 - t380;
t503 = t359 - t383;
t504 = t228 + t500;
Y[14] = t504;
t505 = t229 - t501;
Y[15] = t505;
t506 = t228 - t500;
Y[46] = t506;
t507 = t229 + t501;
Y[47] = t507;
t508 = t230 - t503;
Y[30] = t508;
t509 = t231 - t502;
Y[31] = t509;
t510 = t230 + t503;
Y[62] = t510;
t511 = t231 + t502;
Y[63] = t511;
}
|
the_stack_data/92327709.c
|
/*
* Copyright 2014, NICTA
*
* This software may be distributed and modified according to the terms of
* the BSD 2-Clause license. Note that NO WARRANTY is provided.
* See "LICENSE_BSD2.txt" for details.
*
* @TAG(NICTA_BSD)
*/
/*
* Accessing nested structs.
* Testcase for bug VER-321.
*/
struct num {
int n;
};
struct point1 {
struct num x, y;
};
struct point2 {
int n[2];
};
void f(struct point1 *p1, struct point2 *p2) {
p1->x.n = p2->n[0];
p2->n[1] = p1->y.n;
}
int test(struct point1 *p1, struct point2 *p2) {
f(p1, p2);
return p1->x.n == p2->n[0] && p1->y.n == p2->n[1];
}
struct s1 {
unsigned x, y;
};
struct s2 {
struct s1 x[2];
};
struct s3 {
struct s2 x, y;
};
struct s4 {
struct s3 x[2];
};
void g(struct s4 *s) {
s->x[0].x.x[0].y = s->x[0].x.x[0].x;
s->x[0].x.x[1] = s->x[0].x.x[0];
s->x[0].y = s->x[0].x;
s->x[1] = s->x[0];
*s = *s;
}
|
the_stack_data/51701057.c
|
/*
* Copyright (c) 2007 Wayne Meissner. All rights reserved.
*
* This file is part of jffi.
*
* This code is free software: you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License version 3 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
* version 3 for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with this work. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __mips__
# include <stdint.h>
#endif
#ifndef _STDINT_H
typedef signed char int8_t;
typedef signed short int16_t;
typedef signed int int32_t;
typedef signed long long int64_t;
#endif
#define REF(T) void ref_##T(T arg, T* result) { *result = arg; }
#define ADD(T) void ref_add_##T(T arg1, T arg2, T* result) { *result = arg1 + arg2; }
#define SUB(T) void ref_sub_##T(T arg1, T arg2, T* result) { *result = arg1 - arg2; }
#define MUL(T) void ref_mul_##T(T arg1, T arg2, T* result) { *result = arg1 * arg2; }
#define DIV(T) void ref_div_##T(T arg1, T arg2, T* result) { *result = arg1 / arg2; }
#define TEST(T) ADD(T) SUB(T) MUL(T) DIV(T) REF(T)
TEST(int8_t);
TEST(int16_t);
TEST(int32_t);
TEST(int64_t);
TEST(float);
TEST(double);
|
the_stack_data/583701.c
|
#include <stdio.h>
float total_array(int array[], int array_size) {
int sum = 0;
for (int i = 0; i < array_size; i++)
{
sum += array[i];
}
return sum;
}
int main(int argc, char const *argv[])
{
int array[10] = {5, 8, 11, 13, 15, 16, 23, 38, 45, 48};
printf("%f\n", total_array(array, 10));
return 0;
}
|
the_stack_data/1075389.c
|
#include <stdio.h>
void tower_of_hanoi(int disks, int initial_tower, int intermediate_tower, int final_tower)
{
if (disks > 0)
{
tower_of_hanoi(disks - 1, initial_tower, final_tower, intermediate_tower);
printf("Moving disk from %d to %d\n", initial_tower, final_tower);
tower_of_hanoi(disks - 1, intermediate_tower, initial_tower, final_tower);
}
}
int main()
{
tower_of_hanoi(3, 1, 2, 3);
}
|
the_stack_data/154831259.c
|
#include <stdio.h>
#include <stdlib.h>
enum deste {
club = 0,
diamonds = 10,
hearts = 30,
spades = 3,
} card;
int main()
{
card = hearts;
printf("Enum degiskenin byte buyuklugu = %d bytes\n", sizeof(card)); //4 byte
printf("%d\n", card);
}
|
the_stack_data/168894005.c
|
#include <string.h>
char *strpbrk(const char *s, const char *accept)
{
s += strcspn(s, accept);
return *s ? (char *)s : NULL;
}
|
the_stack_data/1211846.c
|
const unsigned char Arrows_16bpp_red[] = {
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x6d,0x6b,0x6d,0x6b,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x6d,0x6b,
0xff,0xff,0xff,0xff,0x6d,0x6b,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0x6d,0x6b,0xff,0xff,0xff,0xff,0xff,0xff,0x8e,0x73,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0x6d,0x6b,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0x8e,0x73,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x6d,0x6b,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0x8e,0x73,0x8e,0x73,0xae,0x73,0xae,0x73,0xae,0x73,
0xae,0x73,0xae,0x7b,0xcf,0x7b,0xcf,0x7b,0xcf,0x7b,0xcf,0x7b,0xff,0xff,0x6d,0x6b,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xef,0x7b,0x6d,0x6b,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xef,0x7b,0x6d,0x6b,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xef,0x7b,
0x6d,0x73,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xef,0x83,0xff,0xff,0x8e,0x73,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xae,0x73,0xae,0x7b,0xcf,0x7b,0xcf,0x7b,0xcf,0x7b,0xcf,0x7b,
0xcf,0x7b,0xef,0x7b,0xef,0x7b,0xef,0x7b,0xef,0x83,0xff,0xff,0xff,0xff,0xff,0xff,
0x8e,0x73,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xae,0x7b,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xae,0x73,0xff,0xff,0xff,0xff,0xff,0xff,
0xcf,0x7b,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xae,0x73,0xff,0xff,0xff,0xff,0xcf,0x7b,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xcf,0x7b,0xcf,0x7b,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x92,0x94,0x92,0x94,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0x92,0x94,0xff,0xff,0xff,0xff,0xb2,0x94,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0x92,0x94,0xff,0xff,0xff,0xff,0xff,0xff,0xb2,0x94,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x92,0x94,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xd2,0x94,0xff,0xff,0xff,0xff,0xff,0xff,0x51,0x8c,
0x71,0x8c,0x71,0x8c,0x71,0x8c,0x71,0x94,0x92,0x94,0x92,0x94,0x92,0x94,0x92,0x94,
0x92,0x94,0xb2,0x94,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xd3,0x9c,
0xff,0xff,0x71,0x8c,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xd3,0x9c,0x71,0x8c,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf3,0x9c,0x71,0x8c,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xf3,0x9c,0x71,0x8c,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf3,0x9c,0xff,0xff,0x91,0x94,0x92,0x94,
0x92,0x94,0x92,0x94,0xb2,0x94,0xb2,0x94,0xb2,0x94,0xb2,0x94,0xb2,0x94,0xb2,0x94,
0xd3,0x9c,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf3,0x9c,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xd3,0x9c,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xf3,0x9c,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xd3,0x9c,0xff,0xff,
0xff,0xff,0xff,0xff,0xf3,0x9c,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xd3,0x9c,0xff,0xff,0xff,0xff,0xf3,0x9c,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf3,0x9c,0xf3,0x9c,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0x71,0x8c,0x71,0x8c,0x71,0x8c,0x71,0x8c,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x71,0x8c,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0x92,0x94,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x71,0x8c,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0x92,0x94,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0x71,0x8c,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x92,0x94,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0x71,0x8c,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x92,0x94,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x71,0x94,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0x92,0x94,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x92,0x94,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xb2,0x94,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0x92,0x94,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xb2,0x94,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0x92,0x94,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xb2,0x94,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x92,0x94,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xb2,0x94,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x92,0x94,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xd2,0x9c,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x92,0x94,
0x92,0x94,0xb2,0x94,0xb2,0x94,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xd2,0x9c,
0xd3,0x9c,0xd3,0x9c,0xd3,0x9c,0xff,0xff,0x92,0x94,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xf3,0x9c,0x92,0x94,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf3,0x9c,
0xff,0xff,0xb2,0x94,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf3,0x9c,0xff,0xff,0xff,0xff,0xff,0xff,
0xb2,0x94,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xf3,0x9c,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xd2,0x9c,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf3,0x9c,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xd3,0x9c,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xf3,0x9c,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf3,0x9c,0xf3,0x9c,0xf3,0x9c,
0xf3,0x9c,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0x6d,0x6b,0x6d,0x6b,0x6d,0x6b,0x6d,0x73,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0x6d,0x6b,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x8e,0x73,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x6d,0x6b,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x8e,0x73,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0x6d,0x6b,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xae,0x73,0xff,0xff,0xff,0xff,0xff,0xff,0x6d,0x6b,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xae,0x73,0xff,0xff,0x6d,0x6b,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xcf,0x7b,0x6d,0x6b,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xcf,0x7b,
0xff,0xff,0x6d,0x6b,0x8e,0x73,0x8e,0x73,0x8e,0x73,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xae,0x73,0xae,0x7b,0xcf,0x7b,0xcf,0x7b,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0x8e,0x73,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xae,0x73,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xae,0x73,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xcf,0x7b,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xae,0x73,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xcf,0x7b,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xae,0x73,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xcf,0x7b,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xae,0x73,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xcf,0x7b,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xce,0x73,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xcf,0x7b,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xcf,0x7b,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xef,0x7b,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xcf,0x7b,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xef,0x7b,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xcf,0x7b,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xef,0x7b,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xcf,0x7b,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xef,0x7b,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xef,0x7b,
0xef,0x7b,0xef,0x7b,0xef,0x7b,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x10,0x84,0x10,0x84,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xef,0x7b,
0xf0,0x83,0xff,0xff,0xff,0xff,0x10,0x84,0x10,0x84,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xef,0x7b,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0x30,0x84,0xff,0xff,0xff,0xff,0xff,0xff,0xef,0x7b,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x30,0x84,0xff,0xff,
0xff,0xff,0x0f,0x84,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0x51,0x8c,0xff,0xff,0x10,0x84,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x51,0x8c,
0x10,0x84,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0x51,0x8c,0xff,0xff,0x10,0x84,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x51,0x8c,0xff,0xff,
0xff,0xff,0x10,0x84,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0x71,0x8c,0xff,0xff,0xff,0xff,0xff,0xff,0x30,0x84,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x51,0x8c,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0x30,0x8c,0x51,0x8c,0xff,0xff,0xff,0xff,0x51,0x8c,
0x71,0x8c,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0x51,0x8c,0x51,0x8c,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x6d,0x6b,0x6d,0x6b,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x6d,0x6b,
0x65,0xb1,0x65,0xb1,0x6d,0x6b,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0x6d,0x6b,0x65,0xb1,0x65,0xb1,0x65,0xb1,0x8e,0x73,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0x6d,0x6b,0x65,0xb1,0x65,0xb1,0x65,0xb1,0x45,0xb9,
0x8e,0x73,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x6d,0x6b,0x65,0xb1,0x65,0xb1,
0x45,0xb1,0x45,0xb9,0x45,0xb9,0x8e,0x73,0x8e,0x73,0xae,0x73,0xae,0x73,0xae,0x73,
0xae,0x73,0xae,0x7b,0xcf,0x7b,0xcf,0x7b,0xcf,0x7b,0xcf,0x7b,0xff,0xff,0x6d,0x6b,
0x65,0xb1,0x65,0xb1,0x65,0xb1,0x45,0xb9,0x45,0xb9,0x45,0xb9,0x25,0xb9,0x24,0xb9,
0x24,0xc1,0x24,0xc1,0x04,0xc1,0x04,0xc1,0x04,0xc9,0x04,0xc9,0xe4,0xc8,0xe4,0xc8,
0xe3,0xc8,0xef,0x7b,0x6d,0x6b,0x65,0xb1,0x45,0xb1,0x45,0xb9,0x45,0xb9,0x45,0xb9,
0x25,0xb9,0x24,0xc1,0x24,0xc1,0x24,0xc1,0x04,0xc1,0x04,0xc1,0x04,0xc9,0x04,0xc9,
0xe4,0xc8,0xe3,0xc8,0xe3,0xd0,0xc3,0xd0,0xef,0x7b,0x6d,0x6b,0x45,0xb1,0x45,0xb9,
0x45,0xb9,0x45,0xb9,0x45,0xb9,0x24,0xb9,0x24,0xc1,0x24,0xc1,0x04,0xc1,0x04,0xc1,
0x04,0xc9,0x04,0xc9,0xe4,0xc8,0xe4,0xc8,0xe3,0xc8,0xe3,0xd0,0xc3,0xd0,0xef,0x7b,
0x6d,0x73,0x45,0xb9,0x45,0xb9,0x45,0xb9,0x45,0xb9,0x25,0xb9,0x24,0xc1,0x24,0xc1,
0x04,0xc1,0x04,0xc1,0x04,0xc9,0x04,0xc9,0xe4,0xc8,0xe3,0xc8,0xe3,0xc8,0xc3,0xd0,
0xc3,0xd0,0xc3,0xd0,0xef,0x83,0xff,0xff,0x8e,0x73,0x45,0xb9,0x25,0xb9,0x24,0xb9,
0x24,0xc1,0x24,0xc1,0xae,0x73,0xae,0x7b,0xcf,0x7b,0xcf,0x7b,0xcf,0x7b,0xcf,0x7b,
0xcf,0x7b,0xef,0x7b,0xef,0x7b,0xef,0x7b,0xef,0x83,0xff,0xff,0xff,0xff,0xff,0xff,
0x8e,0x73,0x25,0xb9,0x24,0xc1,0x24,0xc1,0x04,0xc1,0xae,0x7b,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xae,0x73,0x24,0xc1,0x04,0xc1,0x04,0xc1,
0xcf,0x7b,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xae,0x73,0x04,0xc1,0x04,0xc9,0xcf,0x7b,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xcf,0x7b,0xcf,0x7b,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x92,0x94,0x92,0x94,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0x92,0x94,0x00,0xf8,0x00,0xf8,0xb2,0x94,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0x92,0x94,0x00,0xf8,0x00,0xf8,0x00,0xf8,0xb2,0x94,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x92,0x94,0x00,0xf8,
0x00,0xf8,0x00,0xf8,0x00,0xf8,0xd2,0x94,0xff,0xff,0xff,0xff,0xff,0xff,0x51,0x8c,
0x71,0x8c,0x71,0x8c,0x71,0x8c,0x71,0x94,0x92,0x94,0x92,0x94,0x92,0x94,0x92,0x94,
0x92,0x94,0xb2,0x94,0x00,0xf8,0x00,0xf8,0x00,0xf8,0x00,0xf8,0x00,0xf8,0xd3,0x9c,
0xff,0xff,0x71,0x8c,0x41,0xf0,0x21,0xf0,0x21,0xf0,0x20,0xf0,0x20,0xf0,0x00,0xf8,
0x00,0xf8,0x00,0xf8,0x00,0xf8,0x00,0xf8,0x00,0xf8,0x00,0xf8,0x00,0xf8,0x00,0xf8,
0x00,0xf8,0x00,0xf8,0x00,0xf8,0xd3,0x9c,0x71,0x8c,0x21,0xf0,0x21,0xf0,0x20,0xf0,
0x20,0xf0,0x00,0xf8,0x00,0xf8,0x00,0xf8,0x00,0xf8,0x00,0xf8,0x00,0xf8,0x00,0xf8,
0x00,0xf8,0x00,0xf8,0x00,0xf8,0x00,0xf8,0x00,0xf8,0x00,0xf8,0xf3,0x9c,0x71,0x8c,
0x21,0xf0,0x21,0xf0,0x20,0xf0,0x00,0xf8,0x00,0xf8,0x00,0xf8,0x00,0xf8,0x00,0xf8,
0x00,0xf8,0x00,0xf8,0x00,0xf8,0x00,0xf8,0x00,0xf8,0x00,0xf8,0x00,0xf8,0x00,0xf8,
0x00,0xf8,0xf3,0x9c,0x71,0x8c,0x20,0xf0,0x20,0xf0,0x00,0xf8,0x00,0xf8,0x00,0xf8,
0x00,0xf8,0x00,0xf8,0x00,0xf8,0x00,0xf8,0x00,0xf8,0x00,0xf8,0x00,0xf8,0x00,0xf8,
0x00,0xf8,0x00,0xf8,0x00,0xf8,0x00,0xf8,0xf3,0x9c,0xff,0xff,0x91,0x94,0x92,0x94,
0x92,0x94,0x92,0x94,0xb2,0x94,0xb2,0x94,0xb2,0x94,0xb2,0x94,0xb2,0x94,0xb2,0x94,
0xd3,0x9c,0x00,0xf8,0x00,0xf8,0x00,0xf8,0x00,0xf8,0x00,0xf8,0xf3,0x9c,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xd3,0x9c,0x00,0xf8,0x00,0xf8,0x00,0xf8,0x00,0xf8,
0xf3,0x9c,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xd3,0x9c,0x00,0xf8,
0x00,0xf8,0x00,0xf8,0xf3,0x9c,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xd3,0x9c,0x00,0xf8,0x00,0xf8,0xf3,0x9c,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf3,0x9c,0xf3,0x9c,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0x71,0x8c,0x71,0x8c,0x71,0x8c,0x71,0x8c,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x71,0x8c,0x41,0xe8,
0x41,0xf0,0x21,0xf0,0x21,0xf0,0x92,0x94,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x71,0x8c,0x41,0xf0,0x21,0xf0,0x21,0xf0,
0x20,0xf0,0x92,0x94,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0x71,0x8c,0x21,0xf0,0x21,0xf0,0x20,0xf0,0x20,0xf0,0x92,0x94,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0x71,0x8c,0x21,0xf0,0x20,0xf0,0x20,0xf8,0x00,0xf8,0x92,0x94,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x71,0x94,0x20,0xf0,
0x20,0xf0,0x00,0xf8,0x00,0xf8,0x92,0x94,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x92,0x94,0x20,0xf0,0x00,0xf8,0x00,0xf8,
0x00,0xf8,0xb2,0x94,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0x92,0x94,0x00,0xf8,0x00,0xf8,0x00,0xf8,0x00,0xf8,0xb2,0x94,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0x92,0x94,0x00,0xf8,0x00,0xf8,0x00,0xf8,0x00,0xf8,0xb2,0x94,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x92,0x94,0x00,0xf8,
0x00,0xf8,0x00,0xf8,0x00,0xf8,0xb2,0x94,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x92,0x94,0x00,0xf8,0x00,0xf8,0x00,0xf8,
0x00,0xf8,0xd2,0x9c,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x92,0x94,
0x92,0x94,0xb2,0x94,0xb2,0x94,0x00,0xf8,0x00,0xf8,0x00,0xf8,0x00,0xf8,0xd2,0x9c,
0xd3,0x9c,0xd3,0x9c,0xd3,0x9c,0xff,0xff,0x92,0x94,0x00,0xf8,0x00,0xf8,0x00,0xf8,
0x00,0xf8,0x00,0xf8,0x00,0xf8,0x00,0xf8,0x00,0xf8,0x00,0xf8,0x00,0xf8,0x00,0xf8,
0x00,0xf8,0xf3,0x9c,0x92,0x94,0x00,0xf8,0x00,0xf8,0x00,0xf8,0x00,0xf8,0x00,0xf8,
0x00,0xf8,0x00,0xf8,0x00,0xf8,0x00,0xf8,0x00,0xf8,0x00,0xf8,0x00,0xf8,0xf3,0x9c,
0xff,0xff,0xb2,0x94,0x00,0xf8,0x00,0xf8,0x00,0xf8,0x00,0xf8,0x00,0xf8,0x00,0xf8,
0x00,0xf8,0x00,0xf8,0x00,0xf8,0x00,0xf8,0xf3,0x9c,0xff,0xff,0xff,0xff,0xff,0xff,
0xb2,0x94,0x00,0xf8,0x00,0xf8,0x00,0xf8,0x00,0xf8,0x00,0xf8,0x00,0xf8,0x00,0xf8,
0x00,0xf8,0xf3,0x9c,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xd2,0x9c,
0x00,0xf8,0x00,0xf8,0x00,0xf8,0x00,0xf8,0x00,0xf8,0x00,0xf8,0xf3,0x9c,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xd3,0x9c,0x00,0xf8,
0x00,0xf8,0x00,0xf8,0x00,0xf8,0xf3,0x9c,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf3,0x9c,0xf3,0x9c,0xf3,0x9c,
0xf3,0x9c,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0x6d,0x6b,0x6d,0x6b,0x6d,0x6b,0x6d,0x73,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0x6d,0x6b,0x65,0xb1,0x45,0xb9,0x45,0xb9,0x45,0xb9,0x8e,0x73,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x6d,0x6b,0x65,0xb1,0x45,0xb9,
0x45,0xb9,0x45,0xb9,0x45,0xb9,0x24,0xb9,0x8e,0x73,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0x6d,0x6b,0x65,0xb1,0x45,0xb1,0x45,0xb9,0x45,0xb9,0x45,0xb9,
0x24,0xb9,0x24,0xc1,0x24,0xc1,0xae,0x73,0xff,0xff,0xff,0xff,0xff,0xff,0x6d,0x6b,
0x65,0xb1,0x45,0xb1,0x45,0xb9,0x45,0xb9,0x45,0xb9,0x25,0xb9,0x24,0xc1,0x24,0xc1,
0x04,0xc1,0x04,0xc1,0xae,0x73,0xff,0xff,0x6d,0x6b,0x65,0xb1,0x45,0xb1,0x45,0xb9,
0x45,0xb9,0x45,0xb9,0x24,0xb9,0x24,0xc1,0x24,0xc1,0x24,0xc1,0x04,0xc1,0x04,0xc9,
0x04,0xc9,0xcf,0x7b,0x6d,0x6b,0x65,0xb9,0x45,0xb9,0x45,0xb9,0x45,0xb9,0x25,0xb9,
0x24,0xc1,0x24,0xc1,0x24,0xc1,0x04,0xc1,0x04,0xc1,0x04,0xc9,0xe4,0xc8,0xcf,0x7b,
0xff,0xff,0x6d,0x6b,0x8e,0x73,0x8e,0x73,0x8e,0x73,0x24,0xc1,0x24,0xc1,0x04,0xc1,
0x04,0xc1,0xae,0x73,0xae,0x7b,0xcf,0x7b,0xcf,0x7b,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0x8e,0x73,0x24,0xc1,0x24,0xc1,0x04,0xc1,0x04,0xc1,0xae,0x73,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xae,0x73,0x24,0xc1,0x04,0xc1,0x04,0xc1,0x04,0xc9,0xcf,0x7b,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xae,0x73,0x04,0xc1,
0x04,0xc1,0x04,0xc9,0x04,0xc9,0xcf,0x7b,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xae,0x73,0x04,0xc1,0x04,0xc9,0xe4,0xc8,
0xe4,0xc8,0xcf,0x7b,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xae,0x73,0x04,0xc9,0xe4,0xc8,0xe4,0xc8,0xe4,0xc8,0xcf,0x7b,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xce,0x73,0x04,0xc9,0xe4,0xc8,0xe4,0xc8,0xe3,0xc8,0xcf,0x7b,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xcf,0x7b,0xe4,0xc8,
0xe4,0xc8,0xe3,0xc8,0xc3,0xd0,0xef,0x7b,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xcf,0x7b,0xe4,0xc8,0xe3,0xc8,0xe3,0xd0,
0xc3,0xd0,0xef,0x7b,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xcf,0x7b,0xe3,0xc8,0xc3,0xd0,0xc3,0xd0,0xc3,0xd0,0xef,0x7b,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xcf,0x7b,0xe3,0xd0,0xc3,0xd0,0xc3,0xd0,0xc3,0xd0,0xef,0x7b,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xef,0x7b,
0xef,0x7b,0xef,0x7b,0xef,0x7b,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x10,0x84,0x10,0x84,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xef,0x7b,
0xf0,0x83,0xa2,0xd8,0xa2,0xd8,0x10,0x84,0x10,0x84,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xef,0x7b,0xa3,0xd8,0xa3,0xd8,0xa2,0xd8,0xa2,0xd8,0x82,0xd8,
0x82,0xe0,0x30,0x84,0xff,0xff,0xff,0xff,0xff,0xff,0xef,0x7b,0xa3,0xd8,0xa3,0xd8,
0xa2,0xd8,0xa2,0xd8,0x82,0xd8,0x82,0xe0,0x82,0xe0,0x82,0xe0,0x30,0x84,0xff,0xff,
0xff,0xff,0x0f,0x84,0xa3,0xd8,0xa2,0xd8,0xa2,0xd8,0x82,0xd8,0x82,0xe0,0x82,0xe0,
0x82,0xe0,0x62,0xe0,0x51,0x8c,0xff,0xff,0x10,0x84,0xa3,0xd8,0xa2,0xd8,0xa2,0xd8,
0x82,0xd8,0x82,0xe0,0x82,0xe0,0x82,0xe0,0x62,0xe0,0x61,0xe0,0x61,0xe8,0x51,0x8c,
0x10,0x84,0xa2,0xd8,0xa2,0xd8,0x82,0xd8,0x82,0xe0,0x82,0xe0,0x62,0xe0,0x62,0xe0,
0x62,0xe0,0x61,0xe8,0x41,0xe8,0x51,0x8c,0xff,0xff,0x10,0x84,0xa2,0xd8,0x82,0xe0,
0x82,0xe0,0x82,0xe0,0x62,0xe0,0x62,0xe0,0x61,0xe8,0x41,0xe8,0x51,0x8c,0xff,0xff,
0xff,0xff,0x10,0x84,0x82,0xe0,0x82,0xe0,0x82,0xe0,0x62,0xe0,0x62,0xe0,0x61,0xe8,
0x61,0xe8,0x41,0xe8,0x71,0x8c,0xff,0xff,0xff,0xff,0xff,0xff,0x30,0x84,0x82,0xe0,
0x62,0xe0,0x62,0xe0,0x61,0xe8,0x41,0xe8,0x41,0xe8,0x51,0x8c,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0x30,0x8c,0x51,0x8c,0x61,0xe8,0x61,0xe8,0x51,0x8c,
0x71,0x8c,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0x51,0x8c,0x51,0x8c,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
};
|
the_stack_data/61105.c
|
int findLengthOfLCIS(int* nums, int numsSize)
{
int c=0,v=0;
if(numsSize==0)
return 0;
for(int i=0;i<numsSize-1;i++)
{
if(nums[i]<nums[i+1])
c++;
else
{
if(c+1>v)
v=c+1;
c=0;
}
}
if(c+1>v)
v=c+1;
return v;
}
|
the_stack_data/46643.c
|
// RUN: %clang_analyze_cc1 -triple x86_64-apple-darwin10 -disable-free -analyzer-checker=core,deadcode,debug.ExprInspection -Wno-pointer-to-int-cast -verify %s
void clang_analyzer_eval(int);
int size_rdar9373039 = 1;
int foo_rdar9373039(const char *);
int rdar93730392() {
int x;
int j = 0;
for (int i = 0 ; i < size_rdar9373039 ; ++i)
x = 1;
int extra = (2 + foo_rdar9373039 ("Clang") + ((4 - ((unsigned int) (2 + foo_rdar9373039 ("Clang")) % 4)) % 4)) + (2 + foo_rdar9373039 ("1.0") + ((4 - ((unsigned int) (2 + foo_rdar9373039 ("1.0")) % 4)) % 4)); // expected-warning {{never read}}
for (int i = 0 ; i < size_rdar9373039 ; ++i)
j += x; // expected-warning {{garbage}}
return j;
}
int PR8962 (int *t) {
// This should look through the __extension__ no-op.
if (__extension__ (t)) return 0;
return *t; // expected-warning {{null pointer}}
}
int PR8962_b (int *t) {
// This should still ignore the nested casts
// which aren't handled by a single IgnoreParens()
if (((int)((int)t))) return 0;
return *t; // expected-warning {{null pointer}}
}
int PR8962_c (int *t) {
// If the last element in a StmtExpr was a ParenExpr, it's still live
if (({ (t ? (_Bool)0 : (_Bool)1); })) return 0;
return *t; // no-warning
}
int PR8962_d (int *t) {
// If the last element in a StmtExpr is an __extension__, it's still live
if (({ __extension__(t ? (_Bool)0 : (_Bool)1); })) return 0;
return *t; // no-warning
}
int PR8962_e (int *t) {
// Redundant casts can mess things up!
// Environment used to skip through NoOp casts, but LiveVariables didn't!
if (({ (t ? (int)(int)0L : (int)(int)1L); })) return 0;
return *t; // no-warning
}
int PR8962_f (int *t) {
// The StmtExpr isn't a block-level expression here,
// the __extension__ is. But the value should be attached to the StmtExpr
// anyway. Make sure the block-level check is /before/ IgnoreParens.
if ( __extension__({
_Bool r;
if (t) r = 0;
else r = 1;
r;
}) ) return 0;
return *t; // no-warning
}
// This previously crashed logic in the analyzer engine when evaluating locations.
void rdar10308201_aux(unsigned val);
void rdar10308201 (int valA, void *valB, unsigned valC) {
unsigned actual_base, lines;
if (valC == 0) {
actual_base = (unsigned)valB;
for (;;) {
if (valA & (1<<0))
rdar10308201_aux(actual_base);
}
}
}
typedef struct Struct103 {
unsigned i;
} Struct103;
typedef unsigned int size_t;
void __my_memset_chk(char*, int, size_t);
static int radar10367606(int t) {
Struct103 overall;
((__builtin_object_size ((char *) &overall, 0) != (size_t) -1) ? __builtin___memset_chk ((char *) &overall, 0, sizeof(Struct103), __builtin_object_size ((char *) &overall, 0)) : __my_memset_chk ((char *) &overall, 0, sizeof(Struct103)));
return 0;
}
/* Caching out on a sink node. */
extern int fooR10376675();
extern int* bazR10376675();
extern int nR10376675;
void barR10376675(int *x) {
int *pm;
if (nR10376675 * 2) {
int *pk = bazR10376675();
pm = pk; //expected-warning {{never read}}
}
do {
*x = fooR10376675();
} while (0);
}
// Test accesses to wide character strings doesn't break the analyzer.
typedef int wchar_t;
struct rdar10385775 {
wchar_t *name;
};
void RDar10385775(struct rdar10385775* p) {
p->name = L"a";
}
// Test double loop of array and array literals. Previously this
// resulted in a false positive uninitailized value warning.
void rdar10686586() {
int array1[] = { 1, 2, 3, 0 };
int array2[] = { 1, 2, 3, 0 };
int *array[] = { array1, array2 };
int sum = 0;
for (int i = 0; i < 2; i++) {
for (int j = 0; j < 4; j++) {
sum += array[i][j]; // no-warning
}
}
}
// This example tests CFG handling of '||' nested in a ternary expression,
// and seeing that the analyzer doesn't crash.
int isctype(char c, unsigned long f)
{
return (c < 1 || c > 10) ? 0 : !!(c & f);
}
// Test that symbolic array offsets are modeled conservatively.
// This was triggering a false "use of uninitialized value" warning.
void rdar_12075238__aux(unsigned long y);
int rdar_12075238_(unsigned long count) {
if ((count < 3) || (count > 6))
return 0;
unsigned long array[6];
unsigned long i = 0;
for (; i <= count - 2; i++)
{
array[i] = i;
}
array[count - 1] = i;
rdar_12075238__aux(array[2]); // no-warning
return 0;
}
// Test that we handle an uninitialized value within a logical expression.
void PR14635(int *p) {
int a = 0, b;
*p = a || b; // expected-warning {{Assigned value is garbage or undefined}}
}
// Test handling floating point values with unary '!'.
int PR14634(int x) {
double y = (double)x;
return !y;
}
// PR15684: If a checker generates a sink node after generating a regular node
// and no state changes between the two, graph trimming would consider the two
// the same node, forming a loop.
struct PR15684 {
void (*callback)(int);
};
void sinkAfterRegularNode(struct PR15684 *context) {
int uninitialized;
context->callback(uninitialized); // expected-warning {{uninitialized}}
}
// PR16131: C permits variables to be declared extern void.
static void PR16131(int x) {
extern void v;
int *ip = (int *)&v;
char *cp = (char *)&v;
clang_analyzer_eval(ip == cp); // expected-warning{{TRUE}}
// expected-warning@-1 {{comparison of distinct pointer types}}
*ip = 42;
clang_analyzer_eval(*ip == 42); // expected-warning{{TRUE}}
clang_analyzer_eval(*(int *)&v == 42); // expected-warning{{TRUE}}
}
// PR15623: Currently the analyzer doesn't handle symbolic expressions of the
// form "(exp comparison_op expr) != 0" very well. We perform a simplification
// translating an assume of a constraint of the form "(exp comparison_op expr)
// != 0" to true into an assume of "exp comparison_op expr" to true.
void PR15623(int n) {
if ((n == 0) != 0) {
clang_analyzer_eval(n == 0); // expected-warning{{TRUE}}
}
}
|
the_stack_data/187643364.c
|
#include <stdio.h>
int main(void)
{
int n, i, max, min, cnt = 0;
int input[20], input2[20];
int critical[7][2];
scanf("%d", &n);
for (i = 0; i < n; i++)
{
scanf("%d", &input[i]);
input2[i] = input[i];
}
for (i = n - 1; i >= 0; i--)
printf("%d ", input[i]);
putchar('\n');
for (i = 0; i < n; i += 3)
{
max = input[i];
min = input2[i];
for (int j = 0; j < 3; j++)
{
if (i + j >= n)
break;
if (input[i + j] >= max)
max = input[i + j];
if (input2[i + j] <= min)
min = input2[i + j];
}
critical[cnt][0] = max;
critical[cnt++][1] = min;
}
for (i = 0; i < cnt; i++)
printf("%d ", critical[i][0]);
putchar('\n');
for (i = 0; i < cnt; i++)
printf("%d ", critical[i][1]);
return 0;
}
|
the_stack_data/93887285.c
|
/*
Copyright 2016 Robert Elder Software Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License. You may obtain a copy
of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations
under the License.
*/
#include <stdio.h>
int output(int);
int output(int i){
int j;
(void)j;
putchar(i);
return 0;
}
int main(void){
output('a');
return 0;
}
|
the_stack_data/115766063.c
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
void pega_data_sistema (int *,int *,int *);
void valida_nome(char *nome)
{
int j=0, conf=0;
if (nome[j]=='\n')
conf=1;
while (conf!=0)
{
system("clear");
printf("O nome anterior foi digitado incorretamente!\n");
printf("Digite o nome novamente: ");
fgets(nome, 100, stdin);
j=0;
conf=0;
if (nome[j]=='\n')
conf=1;
}
}
void valida_endereco(char *endereco)
{
int j=0, conf=1;
if (endereco[j]=='\n')
conf=0;
while (conf==0)
{
system("clear");
printf("O endereço do cliente foi digitado incorretamente!\n\n");
printf("Digite o endereço do cliente novamente: ");
fgets(endereco, 100, stdin);
j=0;
conf=1;
if (endereco[j]=='\n')
conf=0;
}
}
void valida_telefone(char *telefone)
{
int j=0, conf=0;
if ((telefone[j]=='\n') || (telefone[11]!='\n') || (telefone[0]!='0'))
conf=1;
while ((conf==0) && (telefone[j]!='\n'))
{
conf=isalpha(telefone[j]);
j++;
}
while (conf)
{
system("clear");
printf("O telefone anterior foi digitado incorretamente!(0xxyyyyyyyy)\n");
printf("Digite o telefone novamente: ");
fgets(telefone, 14, stdin);
j=0;
conf=0;
if ((telefone[j]=='\n') || (telefone[11]!='\n') || (telefone[0]!='0'))
conf=1;
while ((conf==0) && (telefone[j]!='\n'))
{
conf=isalpha(telefone[j]);
j++;
}
}
}
void valida_email(char *email)
{
int j=0, conf=1;
if (email[j]=='\n')
conf=0;
if (conf==0)
{
while (conf==0)
{
system("clear");
printf("O e-mail do cliente foi digitado incorretamente!\n\n");
printf("Digite o e-mail do cliente novamente: ");
fgets(email, 30, stdin);
j=0;
conf=1;
if (email[j]=='\n')
conf=0;
}
}
}
int valida_cpf(char cpf[])
{
int j=0, conf=0;
if (cpf[11]!='\n')
conf=1;
while ((conf==0) && (j<11))
{
conf=isalpha(cpf[j]);
j++;
}
return conf;
}
int valida_data(int x, int y, int z)
{
int dia = 0, mes=0,ano=0;
pega_data_sistema (&dia,&mes,&ano);
if (z<ano)
return 1;
else {
if (z>ano)
return 0;
if (y<mes)
return 1;
else
if (x<dia)
return 1;
}
return 0;
}
int valida_cidade(char cidade[])
{
int j=0, conf=1;
while ((conf!=0) && (cidade[j]!='\n'))
{
conf=isalpha(cidade[j]);
j++;
}
return conf;
}
int valida_hotel(char hotel[])
{
int j=0, conf=1;
if (hotel[j]=='\n')
conf=0;
return conf;
}
int valida_quantidade(int x)
{
if (x<0)
return 1;
return 0;
}
|
the_stack_data/122015441.c
|
/* fsys_jfs.c - an implementation for the IBM JFS file system */
/*
* GRUB -- GRand Unified Bootloader
* Copyright (C) 2001,2002 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifdef FSYS_JFS
#include "shared.h"
#include "filesys.h"
#include "jfs.h"
#define MAX_LINK_COUNT 8
#define DTTYPE_INLINE 0
#define DTTYPE_PAGE 1
struct jfs_info
{
int bsize;
int l2bsize;
int bdlog;
int xindex;
int xlastindex;
int sindex;
int slastindex;
int de_index;
int dttype;
xad_t *xad;
ldtentry_t *de;
};
static struct jfs_info jfs;
#define xtpage ((xtpage_t *)FSYS_BUF)
#define dtpage ((dtpage_t *)((char *)FSYS_BUF + 4096))
#define fileset ((dinode_t *)((char *)FSYS_BUF + 8192))
#define inode ((dinode_t *)((char *)FSYS_BUF + 8192 + sizeof(dinode_t)))
#define dtroot ((dtroot_t *)(&inode->di_btroot))
static ldtentry_t de_always[2] = {
{1, -1, 2, {'.', '.'}},
{1, -1, 1, {'.'}}
};
static int
isinxt (s64 key, s64 offset, s64 len)
{
return (key >= offset) ? (key < offset + len ? 1 : 0) : 0;
}
static xad_t *
first_extent (dinode_t *di)
{
xtpage_t *xtp;
jfs.xindex = 2;
xtp = (xtpage_t *)&di->di_btroot;
jfs.xad = &xtp->xad[2];
if (xtp->header.flag & BT_LEAF) {
jfs.xlastindex = xtp->header.nextindex;
} else {
do {
devread (addressXAD (jfs.xad) << jfs.bdlog, 0,
sizeof(xtpage_t), (char *)xtpage);
jfs.xad = &xtpage->xad[2];
} while (!(xtpage->header.flag & BT_LEAF));
jfs.xlastindex = xtpage->header.nextindex;
}
return jfs.xad;
}
static xad_t *
next_extent (void)
{
if (++jfs.xindex < jfs.xlastindex) {
} else if (xtpage->header.next) {
devread (xtpage->header.next << jfs.bdlog, 0,
sizeof(xtpage_t), (char *)xtpage);
jfs.xlastindex = xtpage->header.nextindex;
jfs.xindex = XTENTRYSTART;
jfs.xad = &xtpage->xad[XTENTRYSTART];
} else {
return NULL;
}
return ++jfs.xad;
}
static void
di_read (u32 inum, dinode_t *di)
{
s64 key;
u32 xd, ioffset;
s64 offset;
xad_t *xad;
pxd_t pxd;
key = (((inum >> L2INOSPERIAG) << L2INOSPERIAG) + 4096) >> jfs.l2bsize;
xd = (inum & (INOSPERIAG - 1)) >> L2INOSPEREXT;
ioffset = ((inum & (INOSPERIAG - 1)) & (INOSPEREXT - 1)) << L2DISIZE;
xad = first_extent (fileset);
do {
offset = offsetXAD (xad);
if (isinxt (key, offset, lengthXAD (xad))) {
devread ((addressXAD (xad) + key - offset) << jfs.bdlog,
3072 + xd*sizeof(pxd_t), sizeof(pxd_t), (char *)&pxd);
devread (addressPXD (&pxd) << jfs.bdlog,
ioffset, DISIZE, (char *)di);
break;
}
} while ((xad = next_extent ()));
}
static ldtentry_t *
next_dentry (void)
{
ldtentry_t *de;
s8 *stbl;
if (jfs.dttype == DTTYPE_INLINE) {
if (jfs.sindex < jfs.slastindex) {
return (ldtentry_t *)&dtroot->slot[(int)dtroot->header.stbl[jfs.sindex++]];
}
} else {
de = (ldtentry_t *)dtpage->slot;
stbl = (s8 *)&de[(int)dtpage->header.stblindex];
if (jfs.sindex < jfs.slastindex) {
return &de[(int)stbl[jfs.sindex++]];
} else if (dtpage->header.next) {
devread (dtpage->header.next << jfs.bdlog, 0,
sizeof(dtpage_t), (char *)dtpage);
jfs.slastindex = dtpage->header.nextindex;
jfs.sindex = 1;
return &de[(int)((s8 *)&de[(int)dtpage->header.stblindex])[0]];
}
}
return (jfs.de_index < 2) ? &de_always[jfs.de_index++] : NULL;
}
static ldtentry_t *
first_dentry (void)
{
dtroot_t *dtr;
pxd_t *xd;
idtentry_t *de;
dtr = (dtroot_t *)&inode->di_btroot;
jfs.sindex = 0;
jfs.de_index = 0;
de_always[0].inumber = inode->di_parent;
de_always[1].inumber = inode->di_number;
if (dtr->header.flag & BT_LEAF) {
jfs.dttype = DTTYPE_INLINE;
jfs.slastindex = dtr->header.nextindex;
} else {
de = (idtentry_t *)dtpage->slot;
jfs.dttype = DTTYPE_PAGE;
xd = &((idtentry_t *)dtr->slot)[(int)dtr->header.stbl[0]].xd;
for (;;) {
devread (addressPXD (xd) << jfs.bdlog, 0,
sizeof(dtpage_t), (char *)dtpage);
if (dtpage->header.flag & BT_LEAF)
break;
xd = &de[(int)((s8 *)&de[(int)dtpage->header.stblindex])[0]].xd;
}
jfs.slastindex = dtpage->header.nextindex;
}
return next_dentry ();
}
static dtslot_t *
next_dslot (int next)
{
return (jfs.dttype == DTTYPE_INLINE)
? (dtslot_t *)&dtroot->slot[next]
: &((dtslot_t *)dtpage->slot)[next];
}
static void
uni2ansi (UniChar *uni, char *ansi, int len)
{
for (; len; len--, uni++)
*ansi++ = (*uni & 0xff80) ? '?' : *(char *)uni;
}
int
jfs_mount (void)
{
struct jfs_superblock super;
if (part_length < MINJFS >> SECTOR_BITS
|| !devread (SUPER1_OFF >> SECTOR_BITS, 0,
sizeof(struct jfs_superblock), (char *)&super)
|| (super.s_magic != JFS_MAGIC)
|| !devread ((AITBL_OFF >> SECTOR_BITS) + FILESYSTEM_I,
0, DISIZE, (char*)fileset)) {
return 0;
}
jfs.bsize = super.s_bsize;
jfs.l2bsize = super.s_l2bsize;
jfs.bdlog = jfs.l2bsize - SECTOR_BITS;
return 1;
}
int
jfs_read (char *buf, int len)
{
xad_t *xad;
s64 endofprev, endofcur;
s64 offset, xadlen;
int toread, startpos, endpos;
startpos = filepos;
endpos = filepos + len;
endofprev = (1ULL << 62) - 1;
xad = first_extent (inode);
do {
offset = offsetXAD (xad);
xadlen = lengthXAD (xad);
if (isinxt (filepos >> jfs.l2bsize, offset, xadlen)) {
endofcur = (offset + xadlen) << jfs.l2bsize;
toread = (endofcur >= endpos)
? len : (endofcur - filepos);
disk_read_func = disk_read_hook;
devread (addressXAD (xad) << jfs.bdlog,
filepos - (offset << jfs.l2bsize), toread, buf);
disk_read_func = NULL;
buf += toread;
len -= toread;
filepos += toread;
} else if (offset > endofprev) {
toread = ((offset << jfs.l2bsize) >= endpos)
? len : ((offset - endofprev) << jfs.l2bsize);
len -= toread;
filepos += toread;
for (; toread; toread--) {
*buf++ = 0;
}
continue;
}
endofprev = offset + xadlen;
xad = next_extent ();
} while (len > 0 && xad);
return filepos - startpos;
}
int
jfs_dir (char *dirname)
{
char *ptr, *rest, ch;
ldtentry_t *de;
dtslot_t *ds;
u32 inum, parent_inum;
s64 di_size;
u32 di_mode;
int namlen, cmp, n, link_count;
char namebuf[JFS_NAME_MAX + 1], linkbuf[JFS_PATH_MAX];
parent_inum = inum = ROOT_I;
link_count = 0;
for (;;) {
di_read (inum, inode);
di_size = inode->di_size;
di_mode = inode->di_mode;
if ((di_mode & IFMT) == IFLNK) {
if (++link_count > MAX_LINK_COUNT) {
errnum = ERR_SYMLINK_LOOP;
return 0;
}
if (di_size < (di_mode & INLINEEA ? 256 : 128)) {
grub_memmove (linkbuf, inode->di_fastsymlink, di_size);
n = di_size;
} else if (di_size < JFS_PATH_MAX - 1) {
filepos = 0;
filemax = di_size;
n = jfs_read (linkbuf, filemax);
} else {
errnum = ERR_FILELENGTH;
return 0;
}
inum = (linkbuf[0] == '/') ? ROOT_I : parent_inum;
while (n < (JFS_PATH_MAX - 1) && (linkbuf[n++] = *dirname++));
linkbuf[n] = 0;
dirname = linkbuf;
continue;
}
if (!*dirname || isspace (*dirname)) {
if ((di_mode & IFMT) != IFREG) {
errnum = ERR_BAD_FILETYPE;
return 0;
}
filepos = 0;
filemax = di_size;
return 1;
}
if ((di_mode & IFMT) != IFDIR) {
errnum = ERR_BAD_FILETYPE;
return 0;
}
for (; *dirname == '/'; dirname++);
for (rest = dirname; (ch = *rest) && !isspace (ch) && ch != '/'; rest++);
*rest = 0;
de = first_dentry ();
for (;;) {
namlen = de->namlen;
if (de->next == -1) {
uni2ansi (de->name, namebuf, namlen);
namebuf[namlen] = 0;
} else {
uni2ansi (de->name, namebuf, DTLHDRDATALEN);
ptr = namebuf;
ptr += DTLHDRDATALEN;
namlen -= DTLHDRDATALEN;
ds = next_dslot (de->next);
while (ds->next != -1) {
uni2ansi (ds->name, ptr, DTSLOTDATALEN);
ptr += DTSLOTDATALEN;
namlen -= DTSLOTDATALEN;
ds = next_dslot (ds->next);
}
uni2ansi (ds->name, ptr, namlen);
ptr += namlen;
*ptr = 0;
}
cmp = (!*dirname) ? -1 : substring (dirname, namebuf);
#ifndef STAGE1_5
if (print_possibilities && ch != '/'
&& cmp <= 0) {
if (print_possibilities > 0)
print_possibilities = -print_possibilities;
print_a_completion (namebuf);
} else
#endif
if (cmp == 0) {
parent_inum = inum;
inum = de->inumber;
*(dirname = rest) = ch;
break;
}
de = next_dentry ();
if (de == NULL) {
if (print_possibilities < 0)
return 1;
errnum = ERR_FILE_NOT_FOUND;
*rest = ch;
return 0;
}
}
}
}
int
jfs_embed (int *start_sector, int needed_sectors)
{
struct jfs_superblock super;
if (needed_sectors > 63
|| !devread (SUPER1_OFF >> SECTOR_BITS, 0,
sizeof (struct jfs_superblock),
(char *)&super)
|| (super.s_magic != JFS_MAGIC)) {
return 0;
}
*start_sector = 1;
return 1;
}
#endif /* FSYS_JFS */
|
the_stack_data/211080315.c
|
typedef struct {
char *buffer;
int len;
int allocatedLen;
// char staticBuf[DBUF_STATIC_SIZE];
} DynamicBuffer;
int DBufPutcFN(DynamicBuffer *dbuf, char c);
#define DBufPutc(dbuf, c) ( (dbuf)->allocatedLen < (dbuf)->len+1 ) ? (dbuf)->buffer[(dbuf)->len++] = c, (dbuf)->buffer[(dbuf)->len] = 0, 0 : DBufPutcFN((dbuf), c)
int main()
{
char const **in;
DynamicBuffer* buf;
DBufPutc(buf, '\v');
DBufPutc(buf, **in);
};
|
the_stack_data/81443.c
|
#include <assert.h>
#include <limits.h>
#include <math.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
// Please either make the string static or allocate on the heap. For example,
// static char str[] = "hello world";
// return str;
//
// OR
//
// char* str = "hello world";
// return str;
//
int main()
{
int test,i,flag=0;
char a[100008],b[100008];
scanf("%d",&test);
while(test--)
{
flag = 0;
int hash[26]={0};
scanf("%s",a);
scanf("%s",b);
int len,len1;
len=strlen(a);
len1=strlen(b);
for(i=0;i<len;i++)
hash[a[i]-'a']++;
for(i=0;i<len1;i++)
{
if(hash[b[i]-'a'])
{
flag=1;
break;
}
}
if(flag==1)
printf("YES\n");
else
printf("NO\n");
}
return 0;
}
|
the_stack_data/242329820.c
|
/* invert4.c */
#include <stdio.h>
#include <limits.h>
char * itobs(int, char *);
void show_bstr(const char *);
int invert_end(int num, int bits);
int main(void)
{
char bin_str[CHAR_BIT * sizeof(int) + 1];
int number;
puts("Enter integers and see them in binary.");
puts("Non-numeric input terminates program.");
while (scanf("%d", &number) == 1)
{
itobs(number, bin_str);
printf("%d is\n", number);
show_bstr(bin_str);
putchar('\n');
number = invert_end(number, 4);
printf("Inberting the last 4 bits gives\n");
show_bstr(itobs(number, bin_str));
putchar('\n');
}
puts("Bye!");
return 0;
}
char * itobs(int n, char *ps)
{
int i;
const static int size = CHAR_BIT * sizeof(int);
for (i = size - 1; i >= 0; i--,n >>= 1)
ps[i] = (01 & n) + '0';
ps[size] = '\0';
return ps;
}
void show_bstr(const char * str)
{
int i = 0;
while (str[i])
{
putchar(str[i]);
if (++i % 4 == 0 && str[i])
putchar(' ');
}
}
int invert_end(int num, int bits)
{
int mask = 0;
int bitval = 1;
while (bits-- > 0)
{
mask |= bitval;
bitval <<= 1;
}
return num ^= mask;
}
|
the_stack_data/640771.c
|
/**ARGS: symbols -UFOO --no-transients --locate --expand --inactive */
/**SYSCODE: = 2 */
#define A 1
#undef B
#ifdef A
#define C
#endif
#ifndef B
#define D
#endif
#ifdef FOO
#define E
#endif
|
the_stack_data/218099.c
|
#include<stdio.h>
/**
* main - Entry point
*
* Return: Always 0 (Success)
*/
int main(void)
{
int x, y;
x = 48;
while (x < 57)
{
y = x + 1;
while (y < 58)
{
putchar(x);
putchar(y);
if (x == 56 && y == 57)
{
putchar('\n');
} else
{
putchar(44);
putchar(32);
}
y++;
}
x++;
}
return (0);
}
|
the_stack_data/17983.c
|
#include <stdio.h>
inline int f(long long x) {
long long t = 1;
while (x > t)
t <<= 1;
if (x == t)
return 0;
return 1;
}
int main() {
#ifndef ONLINE_JUDGE
freopen("1.in", "r", stdin);
freopen("1.out", "w", stdout);
freopen("1.err", "w", stderr);
#endif
long long x;
scanf("%lld", &x);
if (f(x))
printf("%lld不是2的幂",x);
else
printf("%lld是2的幂",x);
#ifndef ONLINE_JUDGE
fclose(stdin);
fclose(stdout);
fclose(stderr);
#endif
return 0;
}
|
the_stack_data/215768270.c
|
/*
* Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
*
* Contact: Lukasz Pawelczyk ([email protected])
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License
*/
/**
* @file
* @author Lukasz Pawelczyk ([email protected])
* @brief Simple and static container init
*/
#include <signal.h>
#include <unistd.h>
void sighandler(__attribute__((unused)) int signal)
{
_exit(0);
}
int main(__attribute__((unused)) int argc, __attribute__((unused)) const char *argv[])
{
signal(SIGTERM, sighandler);
signal(SIGUSR1, sighandler);
signal(SIGUSR2, sighandler);
sleep(60);
return -1;
}
|
the_stack_data/1608.c
|
#include <stdio.h>
int main(int argc, char* argv[]) {
int sum = 0;
for(int i = 0; i < 1000; i++) {
if(i % 3 == 0 || i % 5 == 0) sum += i;
}
printf("%i", sum);
return 0;
}
|
the_stack_data/54826257.c
|
/*
* Glide64 - Glide video plugin for Nintendo 64 emulators.
* Copyright (c) 2002 Dave2001
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public
* Licence along with this program; if not, write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA
*/
#include <stdio.h>
int main(int argc, char **argv)
{
FILE *src, *dest;
unsigned char a;
src = fopen(argv[1], "rb");
dest = fopen(argv[2], "wb");
fprintf(dest, "unsigned char %s[] = {", argv[3]);
while(fread(&a, 1, 1, src))
{
fprintf(dest, "%d,\n", a);
}
fprintf(dest, "0};\n");
fclose(src);
fclose(dest);
return 0;
}
|
the_stack_data/76701233.c
|
#include <assert.h>
#include <math.h>
int main()
{
_dsign();
assert(0);
return 0;
}
|
the_stack_data/3264090.c
|
int main()
{
int a[5];
a[0] = 0;
a[1] = 1;
a[2] = 2;
a[3] = 3;
a[4] = 4;
return 0;
}
|
the_stack_data/177670.c
|
/*
Copyright (c) 2014-2020 Jorge Matricali
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#include <sys/select.h>
#pragma GCC diagnostic ignored "-Wsign-conversion"
void FdSet(int fd, fd_set *set)
{
FD_SET(fd, set);
}
|
the_stack_data/58487.c
|
#include<stdio.h>
int main()
{
int row,column,n = 5;
for(row=0; row<n; row++)
{
for(column=0; column<n; column++)
{
if (row == 0)
{
printf("*");
continue;
}
else if (column >= row)
{
if (row == column || column == (n-1))
{
if(row%2!=0)
printf("+");
else
printf("*");
}
else
{
printf(" ");
}
}
else
{
printf(" ");
}
}
printf("\n");
}
return 0;
}
|
the_stack_data/150136.c
|
#include <stdio.h>
#include <string.h>
#define MAX 100
int palindrom(char *str) {
int i, len = strlen(str);
for (i = 0; i < len / 2; i++)
if (*(str + i) != *(str + len - 1 - i))
return 0;;
return 1;
}
int pal(char *str, int start, int end) {
if(start >= end) return 1;
if(str[start] == str[end])
return pal(str, start + 1, end - 1);
return 0;
}
int main() {
char s[MAX];
printf("Vnesete string: ");
gets(s);
printf("Vneseniot string %s ", s);
if (pal(s, 0, strlen(s) - 1))
printf("e palindrom.");
else
printf("ne e palindrom.");
return 0;
}
|
the_stack_data/14613.c
|
#include<stdio.h>
int main()
{
printf("Enter a number to GENERATE FIBONACCI SERIES\n");
int num,i,a=0,b=1,c;
scanf("%d",&num);
if(num==1)
printf("%d",a);
else if(num==2)
printf("%d %d ",a,b);
else
{
printf("%d %d ",a,b);
for(i=3;i<=num;i++)
{
c=a+b;
a=b;
b=c;
printf("%d ",c);
}
}
}
|
the_stack_data/89201458.c
|
// Ensure calling bypassing the driver with -fembed-bitcode embeds bitcode pre-
// optimizations
// REQUIRES: x86-registered-target
// RUN: %clang_cc1 %s -O2 -emit-obj -triple=x86_64-unknown-linux-gnu -o %t.o -fembed-bitcode=all
// RUN: llvm-objcopy --dump-section=.llvmbc=%t.bc %t.o /dev/null
// Also check that the .llvmcmd section captures the optimization options.
// RUN: llvm-dis %t.bc -o - | FileCheck %s --check-prefix=CHECK-BC
// RUN: llvm-objcopy --dump-section=.llvmcmd=- %t.o /dev/null | FileCheck %s --check-prefix=CHECK-CMD
// CHECK-BC-LABEL: define{{.*}} void @bar() #0 {
// CHECK-BC-NEXT: entry:
// CHECK-BC-NEXT: ret void
// CHECK-BC-NEXT: }
// CHECK-BC-LABEL: define{{.*}} void @foo() #1 {
// CHECK-BC-NEXT: entry:
// CHECK-BC-NEXT: call void @bar()
// CHECK-BC-NEXT: ret void
// CHECK-BC-NEXT: }
// CHECK-BC-LABEL: attributes #0 = {{.*}} alwaysinline
// CHECK-CMD: -O2
__attribute__((always_inline)) void bar() {
return;
}
void foo() {
bar();
return;
}
|
the_stack_data/2998.c
|
/*
* version.c: version string
*/
#include <stdio.h>
#include <ctype.h>
#include <string.h>
#ifndef VERSION
#define VER "anonymous build (" __DATE__ " " __TIME__ ")"
#else
#define VER "version " VERSION
#endif
#define VERSTRFMT "v1.0 (NSIS Custom Build, %s)"
#define VERSTRSCMREVMAX 20
static char versionbuf[sizeof(VERSTRFMT)-2+VERSTRSCMREVMAX];
const char *const version = versionbuf;
void initversionstring(void)
{
char scmverbuf[VERSTRSCMREVMAX+1];
int cchsvnrev = 0;
/* SCM trigger 20210912 */
const char*svnproprev = "$Revision$";
if ('$' == *svnproprev++)
{
const char*p;
while('$' != *svnproprev && !isdigit(*svnproprev)) svnproprev++;
for (p = svnproprev; isdigit(*p); ++p) cchsvnrev++;
}
if (!cchsvnrev)
{
cchsvnrev = 1;
svnproprev = "?";
}
strcpy(scmverbuf, "SVN:r");
strncat(scmverbuf, svnproprev, cchsvnrev);
sprintf(versionbuf,VERSTRFMT,scmverbuf);
}
|
the_stack_data/33155.c
|
#include<stdio.h>
#include<math.h>
#include<string.h>
#include<ctype.h>
int main()
{
int i;
int players[5] = {58, 66, 68, 71, 87};
int goals[5] = {26, 39, 25, 29, 31};
int gamesPlayed[5] = {30, 30, 28, 30, 26};
float ppg[5];//points per game
float bestPPG = 0.0;
int bestPlayer;
for(i=0 ; i<5 ; i++){
ppg[i] = (float)goals[i] / (float)gamesPlayed[i];//when we wnat to get a value in exactly in float or
printf(" %d \t %d \t %d \t %.2f \n", players[i], goals[i], gamesPlayed[i], ppg[i]);
if(ppg[i] > bestPPG){
bestPPG = ppg[i];
bestPlayer = players[i];
}
} //integer we need to put float or integer before that value....and it is called TYPECASTING
printf("\n the best player is %d\n", bestPlayer); // used much in spreadsheet
return 0;
}
|
the_stack_data/452573.c
|
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
#ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.5 */
/* EMACS_MODES: !fill, lnumb, !overwrite, !nodelete, !picture */
#include "ctype.h"
/*
* Compare strings ignoring case: s1>s2: >0 s1==s2: 0 s1<s2: <0
*/
int
#if defined(__STDC__)
cs_strcmp(
char * s1,
char * s2
)
#else
cs_strcmp(s1, s2)
register char *s1, *s2;
#endif
{
if(s1 == s2)
return(0);
while(toupper(*s1) == toupper(*s2++))
if(*s1++ == '\0')
return(0);
return(toupper(*s1) - toupper(*--s2));
}
|
the_stack_data/1145735.c
|
#include<stdio.h>
#include<stdint.h>
void wait_for_user_input(void);
int main(void)
{
int32_t start_num , end_num;
uint32_t even;
printf("Enter starting and ending numbers(give space between 2 nos):");
scanf("%d %d",&start_num,&end_num);
if(end_num < start_num){
//error
printf("ending number should be > starting number\n");
wait_for_user_input();
return 0;
}
printf("Even numbers are :\n");
even=0;
while(start_num <= end_num){
if(!(start_num % 2) ){
printf("%4d\t",start_num);
even++;
}
start_num++;
}//end of while loop
printf("\nTotal even numbers : %u\n",even);
wait_for_user_input();
}
void wait_for_user_input(void)
{
printf("Press enter key to exit this application");
while(getchar() != '\n')
{
//just read the input buffer and do nothing
}
getchar();
}
|
the_stack_data/1235090.c
|
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_iterative_factorial.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: soumanso <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/09/05 14:53:54 by soumanso #+# #+# */
/* Updated: 2021/09/05 15:05:58 by soumanso ### ########lyon.fr */
/* */
/* ************************************************************************** */
int ft_iterative_factorial(int nb)
{
int i;
int x;
if (nb < 0)
return (0);
i = 1;
x = 1;
while (i <= nb)
{
x *= i;
i += 1;
}
return (x);
}
|
the_stack_data/73575488.c
|
/******************************************************************************
// File: readline.c
// Fach: Betriebssysteme
// Autor: M. Thaler, 2/2010
// Modified: O. Walch, 3/2012
******************************************************************************/
#include <stdio.h>
#include <string.h>
/**
* readline() - Reads at most count characters from stdin into the buffer buf
* @buf: Buffer for the whole command
* @count: Size of the buffer
* @return: Size of detected chars
*/
int readline(char *buf, int count) {
char ch;
int i = 0; /* character counter */
memset(buf,0, count);
while ((ch = getchar()) != EOF && ch != '\n' && i < count-1) {
buf[i] = ch;
i++;
}
buf[i] = '\0';
return i;
}
|
the_stack_data/385134.c
|
#include <stdio.h>
#include <stdlib.h>
int N(int a[],int n,int l,int r)
{
int i,result=0;
for(i=l;i<=r;i++)
{
result=(result+a[i])%n;
}
return result;
}
int M(int a[],int n,int l,int r)
{
int i,result=1;
for(i=l;i<=r;i++)
{
result=(result*a[i])%n;
}
return result;
}
int H(int a[],int l,int r)
{
int i,result=0;
for(i=l;i<=r;i++)
{
result=result^a[i];
}
return result;
}
int main()
{
int n,k,a[100],c[100],i,j,l,r,min,max;
scanf("%d%d",&n,&k);
for(i=0;i<n;i++)
scanf("%d",&a[i]);
for(j=0;j<k;j++)
{
scanf("%d%d",&l,&r);
min=N(a,n,l,r);
max=M(a,n,l,r);
if(min>max)
{
max=N(a,n,l,r);
min=M(a,n,l,r);
}
c[j]=H(a,min,max);
}
for(j=0;j<k;j++)
printf("%d\n",c[j]);
return 0;
}
|
the_stack_data/92327642.c
|
/* $OpenBSD: explicit_bzero.c,v 1.4 2015/08/31 02:53:57 guenther Exp $ */
/*
* Public domain.
* Written by Matthew Dempsky.
*/
#include <string.h>
__attribute__((weak)) void
__explicit_bzero_hook(void *buf, size_t len)
{
}
void
explicit_bzero(void *buf, size_t len)
{
memset(buf, 0, len);
__explicit_bzero_hook(buf, len);
}
|
the_stack_data/107952822.c
|
/*
*******************************************************************************
* Copyright (c) 2021, STMicroelectronics
* All rights reserved.
*
* This software component is licensed by ST under BSD 3-Clause license,
* the "License"; You may not use this file except in compliance with the
* License. You may obtain a copy of the License at:
* opensource.org/licenses/BSD-3-Clause
*
*******************************************************************************
*/
/*
* Automatically generated from STM32L4S5VITx.xml
* CubeMX DB release 6.0.10
*/
#if defined(ARDUINO_B_L4S5I_IOT01A)
#include "Arduino.h"
#include "PeripheralPins.h"
/* =====
* Notes:
* - The pins mentioned Px_y_ALTz are alternative possibilities which use other
* HW peripheral instances. You can use them the same way as any other "normal"
* pin (i.e. analogWrite(PA7_ALT1, 128);).
*
* - Commented lines are alternative possibilities which are not used per default.
* If you change them, you will have to know what you do
* =====
*/
//*** ADC ***
#ifdef HAL_ADC_MODULE_ENABLED
WEAK const PinMap PinMap_ADC[] = {
{PA_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC1_IN5
{PA_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 6, 0)}, // ADC1_IN6
{PA_2, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 7, 0)}, // ADC1_IN7
{PA_3, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 8, 0)}, // ADC1_IN8
{PA_4, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 9, 0)}, // ADC1_IN9
{PA_5, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC1_IN10
{PA_6, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 11, 0)}, // ADC1_IN11
{PA_7, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 12, 0)}, // ADC1_IN12
{PB_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 15, 0)}, // ADC1_IN15
{PB_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 16, 0)}, // ADC1_IN16
{PC_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC1_IN1
{PC_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC1_IN2
{PC_2, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC1_IN3
{PC_3, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC1_IN4
{PC_4, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 13, 0)}, // ADC1_IN13
{PC_5, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 14, 0)}, // ADC1_IN14
{NC, NP, 0}
};
#endif
//*** DAC ***
#ifdef HAL_DAC_MODULE_ENABLED
WEAK const PinMap PinMap_DAC[] = {
{PA_4, DAC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // DAC1_OUT1
{PA_5, DAC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // DAC1_OUT2
{NC, NP, 0}
};
#endif
//*** I2C ***
#ifdef HAL_I2C_MODULE_ENABLED
WEAK const PinMap PinMap_I2C_SDA[] = {
{PB_4, I2C3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C3)},
// {PB_7, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, //ST-LINK-UART1_RX
// {PB_7_ALT1, I2C4, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF5_I2C4)},
{PB_9, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)},
{PB_11, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C2)},
{PB_11_ALT1, I2C4, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF3_I2C4)},
// {PB_14, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C2)}, //LED2
{PC_1, I2C3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C3)},
// {PC_9, I2C3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF6_I2C3)},
// {PD_13, I2C4, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C4)},
{NC, NP, 0}
};
#endif
#ifdef HAL_I2C_MODULE_ENABLED
WEAK const PinMap PinMap_I2C_SCL[] = {
{PA_7, I2C3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C3)},
// {PB_6, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, //ST-LINK-UART1_TX
// {PB_6_ALT1, I2C4, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF5_I2C4)},
{PB_8, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)},
{PB_10, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C2)},
{PB_10_ALT1, I2C4, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF3_I2C4)},
// {PB_13, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C2)}, //ISM43362-WAKEUP
{PC_0, I2C3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C3)},
// {PD_12, I2C4, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C4)},
{NC, NP, 0}
};
#endif
//*** TIM ***
#ifdef HAL_TIM_MODULE_ENABLED
WEAK const PinMap PinMap_TIM[] = {
{PA_0, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 1, 0)}, // TIM2_CH1
{PA_0_ALT1, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 1, 0)}, // TIM5_CH1
{PA_1, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 2, 0)}, // TIM2_CH2
{PA_1_ALT1, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 2, 0)}, // TIM5_CH2
{PA_1_ALT2, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF14_TIM15, 1, 1)}, // TIM15_CH1N
{PA_2, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 3, 0)}, // TIM2_CH3
{PA_2_ALT1, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 3, 0)}, // TIM5_CH3
{PA_2_ALT2, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF14_TIM15, 1, 0)}, // TIM15_CH1
{PA_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 4, 0)}, // TIM2_CH4
{PA_3_ALT1, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 4, 0)}, // TIM5_CH4
{PA_3_ALT2, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF14_TIM15, 2, 0)}, // TIM15_CH2
{PA_5, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 1, 0)}, // TIM2_CH1
{PA_5_ALT1, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 1, 1)}, // TIM8_CH1N
{PA_6, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 1, 0)}, // TIM3_CH1
{PA_6_ALT1, TIM16, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF14_TIM16, 1, 0)}, // TIM16_CH1
{PA_7, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 1)}, // TIM1_CH1N
{PA_7_ALT1, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 2, 0)}, // TIM3_CH2
{PA_7_ALT2, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 1, 1)}, // TIM8_CH1N
{PA_7_ALT3, TIM17, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF14_TIM17, 1, 0)}, // TIM17_CH1
// {PA_8, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 0)}, // TIM1_CH1
// {PA_9, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 0)}, // TIM1_CH2
// {PA_10, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 0)}, // TIM1_CH3
// {PA_11, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 4, 0)}, // TIM1_CH4
{PA_15, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 1, 0)}, // TIM2_CH1
{PB_0, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 1)}, // TIM1_CH2N
{PB_0_ALT1, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 3, 0)}, // TIM3_CH3
{PB_0_ALT2, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 2, 1)}, // TIM8_CH2N
{PB_1, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 1)}, // TIM1_CH3N
{PB_1_ALT1, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 4, 0)}, // TIM3_CH4
{PB_1_ALT2, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 3, 1)}, // TIM8_CH3N
// {PB_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 2, 0)}, // TIM2_CH2
{PB_4, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 1, 0)}, // TIM3_CH1
// {PB_5, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 2, 0)}, // TIM3_CH2
// {PB_6, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 1, 0)}, // TIM4_CH1
// {PB_6_ALT1, TIM16, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF14_TIM16, 1, 1)}, // TIM16_CH1N
// {PB_7, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 2, 0)}, // TIM4_CH2
// {PB_7_ALT1, TIM17, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF14_TIM17, 1, 1)}, // TIM17_CH1N
{PB_8, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 3, 0)}, // TIM4_CH3
{PB_8_ALT1, TIM16, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF14_TIM16, 1, 0)}, // TIM16_CH1
{PB_9, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 4, 0)}, // TIM4_CH4
{PB_9_ALT1, TIM17, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF14_TIM17, 1, 0)}, // TIM17_CH1
// {PB_10, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 3, 0)}, // TIM2_CH3
// {PB_11, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 4, 0)}, // TIM2_CH4
// {PB_13, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 1)}, // TIM1_CH1N
// {PB_13_ALT1, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF14_TIM15, 1, 1)}, // TIM15_CH1N
{PB_14, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 1)}, // TIM1_CH2N
{PB_14_ALT1, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 2, 1)}, // TIM8_CH2N
{PB_14_ALT2, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF14_TIM15, 1, 0)}, // TIM15_CH1
// {PB_15, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 1)}, // TIM1_CH3N
// {PB_15_ALT1, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 3, 1)}, // TIM8_CH3N
// {PB_15_ALT2, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF14_TIM15, 2, 0)}, // TIM15_CH2
// {PC_6, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 1, 0)}, // TIM3_CH1
// {PC_6_ALT1, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 1, 0)}, // TIM8_CH1
// {PC_7, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 2, 0)}, // TIM3_CH2
// {PC_7_ALT1, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 2, 0)}, // TIM8_CH2
// {PC_8, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 3, 0)}, // TIM3_CH3
// {PC_8_ALT1, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 3, 0)}, // TIM8_CH3
// {PC_9, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 4, 0)}, // TIM3_CH4
// {PC_9_ALT1, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 4, 0)}, // TIM8_CH4
// {PD_12, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 1, 0)}, // TIM4_CH1
// {PD_13, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 2, 0)}, // TIM4_CH2
{PD_14, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 3, 0)}, // TIM4_CH3
// {PD_15, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 4, 0)}, // TIM4_CH4
// {PE_0, TIM16, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF14_TIM16, 1, 0)}, // TIM16_CH1
// {PE_1, TIM17, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF14_TIM17, 1, 0)}, // TIM17_CH1
// {PE_3, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 1, 0)}, // TIM3_CH1
// {PE_4, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 2, 0)}, // TIM3_CH2
// {PE_5, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 3, 0)}, // TIM3_CH3
// {PE_6, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 4, 0)}, // TIM3_CH4
// {PE_8, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 1)}, // TIM1_CH1N
// {PE_9, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 0)}, // TIM1_CH1
// {PE_10, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 1)}, // TIM1_CH2N
// {PE_11, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 0)}, // TIM1_CH2
// {PE_12, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 1)}, // TIM1_CH3N
// {PE_13, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 0)}, // TIM1_CH3
// {PE_14, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 4, 0)}, // TIM1_CH4
{NC, NP, 0}
};
#endif
//*** UART ***
#ifdef HAL_UART_MODULE_ENABLED
WEAK const PinMap PinMap_UART_TX[] = {
{PA_0, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)},
{PA_2, LPUART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_LPUART1)},
{PA_2_ALT1, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)},
{PA_9, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)},
{PB_6, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)},
// {PB_10, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)},
// {PB_11, LPUART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_LPUART1)},
{PC_1, LPUART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_LPUART1)},
{PC_4, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)},
// {PC_10, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)},
// {PC_10_ALT1, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)},
// {PC_12, UART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART5)},
{PD_5, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)},
{PD_8, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)},
{NC, NP, 0}
};
#endif
#ifdef HAL_UART_MODULE_ENABLED
WEAK const PinMap PinMap_UART_RX[] = {
{PA_1, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)},
{PA_3, LPUART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_LPUART1)},
{PA_3_ALT1, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)},
// {PA_10, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)},
{PA_15, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_USART2)},
{PB_7, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)},
// {PB_10, LPUART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_LPUART1)},
// {PB_11, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)},
{PC_0, LPUART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_LPUART1)},
{PC_5, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)},
// {PC_11, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)},
// {PC_11_ALT1, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)},
{PD_2, UART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART5)},
{PD_6, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)},
{PD_9, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)},
{NC, NP, 0}
};
#endif
#ifdef HAL_UART_MODULE_ENABLED
WEAK const PinMap PinMap_UART_RTS[] = {
// {PA_1, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)},
// {PA_12, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)},
// {PA_15, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)},
// {PA_15_ALT1, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)},
// {PB_1, LPUART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_LPUART1)},
// {PB_1_ALT1, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)},
// {PB_3, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)},
// {PB_4, UART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART5)},
// {PB_12, LPUART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_LPUART1)},
// {PB_14, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)},
// {PD_2, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)},
// {PD_4, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)},
// {PD_12, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)},
{NC, NP, 0}
};
#endif
#ifdef HAL_UART_MODULE_ENABLED
WEAK const PinMap PinMap_UART_CTS[] = {
// {PA_0, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)},
// {PA_6, LPUART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_LPUART1)},
// {PA_6_ALT1, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)},
// {PA_11, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)},
// {PB_4, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)},
// {PB_5, UART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART5)},
// {PB_7, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)},
// {PB_13, LPUART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_LPUART1)},
// {PB_13_ALT1, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)},
// {PD_3, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)},
// {PD_11, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)},
{NC, NP, 0}
};
#endif
//*** SPI ***
#ifdef HAL_SPI_MODULE_ENABLED
WEAK const PinMap PinMap_SPI_MOSI[] = {
{PA_7, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)},
// {PA_12, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)},
// {PB_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)},
// {PB_5_ALT1, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)},
// {PB_15, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)},
{PC_1, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_SPI2)},
{PC_3, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)},
{PC_12, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)},
{PD_4, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)},
{PD_6, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI3)},
// {PE_15, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)},
{NC, NP, 0}
};
#endif
#ifdef HAL_SPI_MODULE_ENABLED
WEAK const PinMap PinMap_SPI_MISO[] = {
{PA_6, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)},
// {PA_11, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)},
{PB_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)},
{PB_4_ALT1, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)},
// {PB_14, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)},
{PC_2, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)},
{PC_11, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)},
{PD_3, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)},
// {PE_14, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)},
{NC, NP, 0}
};
#endif
#ifdef HAL_SPI_MODULE_ENABLED
WEAK const PinMap PinMap_SPI_SCLK[] = {
{PA_1, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)},
{PA_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)},
// {PA_9, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_SPI2)},
// {PB_3, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)},
// {PB_3_ALT1, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)},
// {PB_10, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)},
// {PB_13, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)},
{PC_10, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)},
{PD_1, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)},
{PD_3, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_SPI2)},
// {PE_13, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)},
{NC, NP, 0}
};
#endif
#ifdef HAL_SPI_MODULE_ENABLED
WEAK const PinMap PinMap_SPI_SSEL[] = {
{PA_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)},
{PA_4_ALT1, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)},
{PA_15, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)},
{PA_15_ALT1, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)},
{PB_0, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)},
{PB_9, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)},
// {PB_12, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)},
// {PD_0, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)},
// {PE_12, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)},
{NC, NP, 0}
};
#endif
//*** CAN ***
#if defined(HAL_CAN_MODULE_ENABLED) || defined(HAL_CAN_LEGACY_MODULE_ENABLED)
WEAK const PinMap PinMap_CAN_RD[] = {
// {PA_11, CAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN1)},
{PB_8, CAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN1)},
// {PD_0, CAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN1)},
{NC, NP, 0}
};
#endif
#if defined(HAL_CAN_MODULE_ENABLED) || defined(HAL_CAN_LEGACY_MODULE_ENABLED)
WEAK const PinMap PinMap_CAN_TD[] = {
// {PA_12, CAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN1)},
{PB_9, CAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN1)},
{PD_1, CAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN1)},
{NC, NP, 0}
};
#endif
//*** No ETHERNET ***
//*** OCTOSPI ***
#ifdef HAL_OSPI_MODULE_ENABLED
WEAK const PinMap PinMap_OCTOSPI_DATA0[] = {
// {PB_1, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OCTOSPIM_P1)}, // OCTOSPIM_P1_IO0
{PE_12, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OCTOSPIM_P1)}, // OCTOSPIM_P1_IO0
{NC, NP, 0}
};
#endif
#ifdef HAL_OSPI_MODULE_ENABLED
WEAK const PinMap PinMap_OCTOSPI_DATA1[] = {
// {PB_0, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OCTOSPIM_P1)}, // OCTOSPIM_P1_IO1
{PE_13, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OCTOSPIM_P1)}, // OCTOSPIM_P1_IO1
{NC, NP, 0}
};
#endif
#ifdef HAL_OSPI_MODULE_ENABLED
WEAK const PinMap PinMap_OCTOSPI_DATA2[] = {
// {PA_7, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OCTOSPIM_P1)}, // OCTOSPIM_P1_IO2
{PE_14, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OCTOSPIM_P1)}, // OCTOSPIM_P1_IO2
{NC, NP, 0}
};
#endif
#ifdef HAL_OSPI_MODULE_ENABLED
WEAK const PinMap PinMap_OCTOSPI_DATA3[] = {
// {PA_6, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OCTOSPIM_P1)}, // OCTOSPIM_P1_IO3
{PE_15, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OCTOSPIM_P1)}, // OCTOSPIM_P1_IO3
{NC, NP, 0}
};
#endif
#ifdef HAL_OSPI_MODULE_ENABLED
WEAK const PinMap PinMap_OCTOSPI_DATA4[] = {
// {PC_1, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OCTOSPIM_P1)}, // OCTOSPIM_P1_IO4
// {PD_4, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OCTOSPIM_P1)}, // OCTOSPIM_P1_IO4
{NC, NP, 0}
};
#endif
#ifdef HAL_OSPI_MODULE_ENABLED
WEAK const PinMap PinMap_OCTOSPI_DATA5[] = {
// {PC_2, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OCTOSPIM_P1)}, // OCTOSPIM_P1_IO5
// {PD_5, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OCTOSPIM_P1)}, // OCTOSPIM_P1_IO5
{NC, NP, 0}
};
#endif
#ifdef HAL_OSPI_MODULE_ENABLED
WEAK const PinMap PinMap_OCTOSPI_DATA6[] = {
// {PC_3, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OCTOSPIM_P1)}, // OCTOSPIM_P1_IO6
// {PD_6, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OCTOSPIM_P1)}, // OCTOSPIM_P1_IO6
{NC, NP, 0}
};
#endif
#ifdef HAL_OSPI_MODULE_ENABLED
WEAK const PinMap PinMap_OCTOSPI_DATA7[] = {
// {PC_4, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OCTOSPIM_P1)}, // OCTOSPIM_P1_IO7
// {PD_7, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OCTOSPIM_P1)}, // OCTOSPIM_P1_IO7
{NC, NP, 0}
};
#endif
#ifdef HAL_OSPI_MODULE_ENABLED
WEAK const PinMap PinMap_OCTOSPI_SCLK[] = {
// {PA_3, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OCTOSPIM_P1)}, // OCTOSPIM_P1_CLK
// {PB_10, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OCTOSPIM_P1)}, // OCTOSPIM_P1_CLK
{PE_10, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OCTOSPIM_P1)}, // OCTOSPIM_P1_CLK
{NC, NP, 0}
};
#endif
#ifdef HAL_OSPI_MODULE_ENABLED
WEAK const PinMap PinMap_OCTOSPI_SSEL[] = {
// {PA_2, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OCTOSPIM_P1)}, // OCTOSPIM_P1_NCS
// {PA_4, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_OCTOSPIM_P1)}, // OCTOSPIM_P1_NCS
// {PB_11, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OCTOSPIM_P1)}, // OCTOSPIM_P1_NCS
// {PC_11, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_OCTOSPIM_P1)}, // OCTOSPIM_P1_NCS
// {PD_3, OCTOSPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OCTOSPIM_P2)}, // OCTOSPIM_P2_NCS
{PE_11, OCTOSPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OCTOSPIM_P1)}, // OCTOSPIM_P1_NCS
{NC, NP, 0}
};
#endif
//*** USB ***
#if defined(HAL_PCD_MODULE_ENABLED) || defined(HAL_HCD_MODULE_ENABLED)
WEAK const PinMap PinMap_USB_OTG_FS[] = {
// {PA_8, USB_OTG_FS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_SOF
{PA_9, USB_OTG_FS, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, GPIO_AF_NONE)}, // USB_OTG_FS_VBUS
{PA_10, USB_OTG_FS, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_ID
{PA_11, USB_OTG_FS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_DM
{PA_12, USB_OTG_FS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_DP
// {PA_13, USB_OTG_FS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_NOE
// {PA_14, USB_OTG_FS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_SOF
// {PC_9, USB_OTG_FS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_NOE
{NC, NP, 0}
};
#endif
//*** SD ***
#ifdef HAL_SD_MODULE_ENABLED
WEAK const PinMap PinMap_SD[] = {
// {PB_8, SDMMC1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF8_SDMMC1)}, // SDMMC1_CKIN
// {PB_8_ALT1, SDMMC1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDMMC1)}, // SDMMC1_D4
// {PB_9, SDMMC1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF8_SDMMC1)}, // SDMMC1_CDIR
// {PB_9_ALT1, SDMMC1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDMMC1)}, // SDMMC1_D5
// {PC_6, SDMMC1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF8_SDMMC1)}, // SDMMC1_D0DIR
// {PC_6_ALT1, SDMMC1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDMMC1)}, // SDMMC1_D6
// {PC_7, SDMMC1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF8_SDMMC1)}, // SDMMC1_D123DIR
// {PC_7_ALT1, SDMMC1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDMMC1)}, // SDMMC1_D7
// {PC_8, SDMMC1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDMMC1)}, // SDMMC1_D0
// {PC_9, SDMMC1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDMMC1)}, // SDMMC1_D1
// {PC_10, SDMMC1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDMMC1)}, // SDMMC1_D2
// {PC_11, SDMMC1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDMMC1)}, // SDMMC1_D3
// {PC_12, SDMMC1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF12_SDMMC1)}, // SDMMC1_CK
// {PD_2, SDMMC1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF12_SDMMC1)}, // SDMMC1_CMD
{NC, NP, 0}
};
#endif
#endif /* ARDUINO_B_L475E_IOT01A */
|
the_stack_data/162643620.c
|
const unsigned char Room1[]={
0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,
0,1,1,1,1,1,1,0,0,0,0,0,4,4,0,0,
0,0,0,0,0,1,0,0,0,0,0,0,4,4,0,0,
0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,2,2,0,0,0,0,0,0,0,0,3,3,0,0,
0,0,2,2,0,0,0,0,0,0,0,0,3,3,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
};
|
the_stack_data/102166.c
|
/* mbed Microcontroller Library
* Copyright (c) 2017 ARM Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#if MBED_CONF_NSAPI_PRESENT
#include "onboard_modem_api.h"
#include "gpio_api.h"
#include "platform/mbed_thread.h"
#include "PinNames.h"
#if MODEM_ON_BOARD
// Note microseconds not milliseconds
static void press_power_button(int time_us)
{
gpio_t gpio;
gpio_init_out_ex(&gpio, MDMPWRON, 1);
wait_us(time_us);
gpio_write(&gpio, 0);
}
void onboard_modem_init()
{
gpio_t gpio;
// Take us out of reset
gpio_init_inout(&gpio, RADIO_PWR, PIN_OUTPUT, PushPullNoPull, 1);
gpio_init_inout(&gpio, BUF_EN, PIN_OUTPUT, OpenDrainNoPull, 0);
gpio_init_out_ex(&gpio, MDMRST, 0);
gpio_init_out_ex(&gpio, MDMPWRON, 0);
gpio_init_inout(&gpio, RADIO_DTR, PIN_OUTPUT, OpenDrainNoPull, 0);
}
void onboard_modem_deinit()
{
onboard_modem_power_down();
gpio_t gpio;
// Back into reset
gpio_init_out_ex(&gpio, MDMRST, 1);
gpio_init_out_ex(&gpio, MDMPWRON, 1);
gpio_init_inout(&gpio, BUF_EN, PIN_OUTPUT, OpenDrainNoPull, 1);
gpio_init_inout(&gpio, RADIO_PWR, PIN_OUTPUT, PushPullNoPull, 0);
gpio_init_inout(&gpio, RADIO_DTR, PIN_OUTPUT, OpenDrainNoPull, 1);
}
void onboard_modem_power_up()
{
onboard_modem_init();
gpio_t gpio;
gpio_init_in(&gpio, MON_1V8);
if(gpio_is_connected(&gpio) && !gpio_read(&gpio)) {
unsigned int i = 0;
while(i < 3)
{
press_power_button(150000);
thread_sleep_for(250);
if(gpio_read(&gpio))
{
break;
}
i++;
}
}
}
void onboard_modem_power_down()
{
/* Activate PWR_ON for 1.5s to switch off */
press_power_button(1500000);
// check for 1.8v low if not, take reset low for 10s
}
#endif //MODEM_ON_BOARD
#endif //MBED_CONF_NSAPI_PRESENT
|
the_stack_data/125620.c
|
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strjoin.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: mamaurai <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/07/05 16:14:11 by mamaurai #+# #+# */
/* Updated: 2021/07/05 16:14:12 by mamaurai ### ########.fr */
/* */
/* ************************************************************************** */
#include <stdlib.h>
char *ft_strcat(char *dest, char *src)
{
int i;
int j;
i = 0;
while (dest[i])
i++;
j = -1;
while (src[++j])
dest[i + j] = src[j];
dest[i + j] = '\0';
return (dest);
}
int ft_strlen(char *str)
{
int i;
i = 0;
while (str[i])
i++;
return (i);
}
int ft_len(int size, char **strs, char *sep)
{
int i;
int len;
i = -1;
len = 0;
while (++i < size)
{
len += ft_strlen(strs[i]);
if (i < size - 1)
len += ft_strlen(sep);
}
return (len);
}
char *ft_strjoin(int size, char **strs, char *sep)
{
int i;
char *res;
res = (char *)malloc(sizeof(char) * ft_len(size, strs, sep) + 1);
if (!res)
return (NULL);
*res = '\0';
if (size <= 0)
return (res);
i = -1;
while (++i < size)
{
ft_strcat(res, strs[i]);
if (i < size - 1)
ft_strcat(res, sep);
}
return (res);
}
|
the_stack_data/51700294.c
|
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[])
{
printf("\007");
exit(0);
}
|
the_stack_data/37638340.c
|
#define A(a, x, y, z) (a[(z) * ny * nx + (y) * nx + x])
static void inner_block(const float *restrict const f,
float *restrict const fp,
const int nx,
const int ny,
const int nz,
const int nxi,
const float *restrict const model_padded2_dt2,
const float *restrict const fd_coeff,
const int bx,
const int by,
const int bz,
const int blocksize_x, const int blocksize_y,
const int blocksize_z)
{
int x;
int y;
int z;
float f_xx;
const int x_start = bx * blocksize_x + 8;
const int y_start = by * blocksize_y + 8;
const int z_start = bz * blocksize_z + 8;
const int x_end = x_start + blocksize_x <= nxi + 8 ?
x_start + blocksize_x : nxi + 8;
const int y_end = y_start + blocksize_y <= ny - 8 ?
y_start + blocksize_y : ny - 8;
const int z_end = z_start + blocksize_z <= nz - 8 ?
z_start + blocksize_z : nz - 8;
for (z = z_start; z < z_end; z++) {
for (y = y_start; y < y_end; y++) {
for (x = x_start; x < x_end; x++) {
f_xx = 3 * fd_coeff[0] * A(f, x, y, z) +
fd_coeff[1] *
(A(f, x + 1, y, z) +
A(f, x - 1, y, z) +
A(f, x, y + 1, z) +
A(f, x, y - 1, z) +
A(f, x, y, z + 1) +
A(f, x, y, z - 1)) +
fd_coeff[2] *
(A(f, x + 2, y, z) +
A(f, x - 2, y, z) +
A(f, x, y + 2, z) +
A(f, x, y - 2, z) +
A(f, x, y, z + 2) +
A(f, x, y, z - 2)) +
fd_coeff[3] *
(A(f, x + 3, y, z) +
A(f, x - 3, y, z) +
A(f, x, y + 3, z) +
A(f, x, y - 3, z) +
A(f, x, y, z + 3) +
A(f, x, y, z - 3)) +
fd_coeff[4] *
(A(f, x + 4, y, z) +
A(f, x - 4, y, z) +
A(f, x, y + 4, z) +
A(f, x, y - 4, z) +
A(f, x, y, z + 4) +
A(f, x, y, z - 4)) +
fd_coeff[5] *
(A(f, x + 5, y, z) +
A(f, x - 5, y, z) +
A(f, x, y + 5, z) +
A(f, x, y - 5, z) +
A(f, x, y, z + 5) +
A(f, x, y, z - 5)) +
fd_coeff[6] *
(A(f, x + 6, y, z) +
A(f, x - 6, y, z) +
A(f, x, y + 6, z) +
A(f, x, y - 6, z) +
A(f, x, y, z + 6) +
A(f, x, y, z - 6)) +
fd_coeff[7] *
(A(f, x + 7, y, z) +
A(f, x - 7, y, z) +
A(f, x, y + 7, z) +
A(f, x, y - 7, z) +
A(f, x, y, z + 7) +
A(f, x, y, z - 7)) +
fd_coeff[8] *
(A(f, x + 8, y, z) +
A(f, x - 8, y, z) +
A(f, x, y + 8, z) +
A(f, x, y - 8, z) +
A(f, x, y, z + 8) + A(f, x, y, z - 8));
A(fp, x, y, z) =
A(model_padded2_dt2, x, y, z) *
f_xx + 2 * A(f, x, y, z) - A(fp, x, y, z);
}
}
}
}
static void inner(const float *restrict const f,
float *restrict const fp,
const int nx,
const int ny,
const int nz,
const int nxi,
const float *restrict const model_padded2_dt2,
const float dt,
const float *restrict const sources,
const int *restrict const sources_x,
const int *restrict const sources_y,
const int *restrict const sources_z,
const int num_sources, const int source_len,
const float *restrict const fd_coeff, const int step,
const int blocksize_x, const int blocksize_y,
const int blocksize_z,
const int nbx, const int nby, const int nbz)
{
int bx;
int by;
int bz;
int i;
int sx;
int sy;
int sz;
#pragma omp parallel for default(none) private(by, bx)
for (bz = 0; bz < nbz; bz++) {
for (by = 0; by < nby; by++) {
for (bx = 0; bx < nbx; bx++) {
inner_block(f, fp, nx, ny, nz, nxi,
model_padded2_dt2, fd_coeff, bx,
by, bz, blocksize_x, blocksize_y,
blocksize_z);
}
}
}
for (i = 0; i < num_sources; i++) {
sx = sources_x[i] + 8;
sy = sources_y[i] + 8;
sz = sources_z[i] + 8;
A(fp, sx, sy, sz) +=
A(model_padded2_dt2, sx, sy, sz) *
sources[i * source_len + step] * dt;
}
}
void step(float *restrict f,
float *restrict fp,
const int nx,
const int ny,
const int nz,
const int nxi,
const float *restrict const model_padded2_dt2,
const float dx,
const float dt,
const float *restrict const sources,
const int *restrict const sources_x,
const int *restrict const sources_y,
const int *restrict const sources_z,
const int num_sources, const int source_len, const int num_steps)
{
int step;
float *tmp;
float fd_coeff[9] = {
-924708642.0f / 302702400 / (dx * dx),
538137600.0f / 302702400 / (dx * dx),
-94174080.0f / 302702400 / (dx * dx),
22830080.0f / 302702400 / (dx * dx),
-5350800.0f / 302702400 / (dx * dx),
1053696.0f / 302702400 / (dx * dx),
-156800.0f / 302702400 / (dx * dx),
15360.0f / 302702400 / (dx * dx),
-735.0f / 302702400 / (dx * dx)
};
const int blocksize_x = 128;
const int blocksize_y = 8;
const int blocksize_z = 8;
const int nbx = (int)((float)(nxi) / blocksize_x) +
(int)(((nxi) % blocksize_x) != 0);
const int nby = (int)((float)(ny - 16) / blocksize_y) +
(int)(((ny - 16) % blocksize_y) != 0);
const int nbz = (int)((float)(nz - 16) / blocksize_z) +
(int)(((nz - 16) % blocksize_z) != 0);
for (step = 0; step < num_steps; step++) {
inner(f, fp, nx, ny, nz, nxi, model_padded2_dt2, dt,
sources, sources_x, sources_y, sources_z,
num_sources, source_len, fd_coeff, step,
blocksize_x, blocksize_y, blocksize_z, nbx, nby, nbz);
tmp = f;
f = fp;
fp = tmp;
}
}
|
the_stack_data/73574700.c
|
void alert(int val);
void sum(int a, int b){
int res = a + b;
alert(res);
}
|
the_stack_data/81508.c
|
#include <stdio.h>
#include <string.h>
int main()
{
char str_a[20];
strcpy(str_a, "Hello, world!\n");
printf(str_a);
}
|
the_stack_data/47480.c
|
int capture_me_1(void)
{
return 0;
}
|
the_stack_data/126702065.c
|
#include <stdio.h>
#include <stdlib.h>
typedef struct {
int x;
int y;
} t_posicion;
t_posicion* cargar_posicion(int* x, int* y);
void correr_rutina();
t_posicion* cargar_posicion(int* x, int* y) {
t_posicion* ret = malloc(sizeof(short));
ret->x = *x;
ret->y = *y;
return ret;
}
void correr_rutina() {
int* a = malloc(sizeof(int));
int* b = malloc(sizeof(int));
t_posicion* pos = cargar_posicion(a, b);
free(b);
return;
}
int main() {
correr_rutina();
return 0;
}
|
the_stack_data/115766128.c
|
/* $NetBSD: h_spawn.c,v 1.1 2012/02/13 21:03:08 martin Exp $ */
/*-
* Copyright (c) 2012 The NetBSD Foundation, Inc.
* All rights reserved.
*
* This code is derived from software contributed to The NetBSD Foundation
* by Charles Zhang <[email protected]> and
* Martin Husemann <[email protected]>.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION OR CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <stdio.h>
#include <stdlib.h>
int
main(int argc, char **argv)
{
unsigned long ret;
char *endp;
if (argc < 2) {
fprintf(stderr, "usage:\n\t%s (retcode)\n", getprogname());
exit(255);
}
ret = strtoul(argv[1], &endp, 10);
#if DEBUG
fprintf(stderr, "%s exiting with status %lu\n", getprogname(), ret);
#endif
return ret;
}
|
the_stack_data/46708.c
|
extern void exit (int);
int bar = 0;
f (p)
int *p;
{
int foo = 2;
while (foo > bar)
{
foo -= bar;
*p++ = foo;
bar = 1;
}
}
main ()
{
int tab[2];
tab[0] = tab[1] = 0;
f (tab);
if (tab[0] != 2 || tab[1] != 1)
abort ();
exit (0);
}
|
the_stack_data/952210.c
|
#include <stddef.h>
#include <wctype.h>
#define CASEMAP(u1, u2, l) \
{ (u1), (l) - (u1), (u2) - (u1) + 1 }
#define CASELACE(u1, u2) CASEMAP((u1), (u2), (u1) + 1)
static const struct {
unsigned short upper;
signed char lower;
unsigned char len;
} casemaps[] = {CASEMAP('A', 'Z', 'a'), CASEMAP(0xc0, 0xde, 0xe0),
CASELACE(0x0100, 0x012e), CASELACE(0x0132, 0x0136),
CASELACE(0x0139, 0x0147), CASELACE(0x014a, 0x0176),
CASELACE(0x0179, 0x017d),
CASELACE(0x370, 0x372), CASEMAP(0x391, 0x3a1, 0x3b1),
CASEMAP(0x3a3, 0x3ab, 0x3c3), CASEMAP(0x400, 0x40f, 0x450),
CASEMAP(0x410, 0x42f, 0x430),
CASELACE(0x460, 0x480), CASELACE(0x48a, 0x4be),
CASELACE(0x4c1, 0x4cd), CASELACE(0x4d0, 0x50e),
CASELACE(0x514, 0x526), CASEMAP(0x531, 0x556, 0x561),
CASELACE(0x01a0, 0x01a4), CASELACE(0x01b3, 0x01b5),
CASELACE(0x01cd, 0x01db), CASELACE(0x01de, 0x01ee),
CASELACE(0x01f8, 0x021e), CASELACE(0x0222, 0x0232),
CASELACE(0x03d8, 0x03ee),
CASELACE(0x1e00, 0x1e94), CASELACE(0x1ea0, 0x1efe),
CASEMAP(0x1f08, 0x1f0f, 0x1f00), CASEMAP(0x1f18, 0x1f1d, 0x1f10),
CASEMAP(0x1f28, 0x1f2f, 0x1f20), CASEMAP(0x1f38, 0x1f3f, 0x1f30),
CASEMAP(0x1f48, 0x1f4d, 0x1f40),
CASEMAP(0x1f68, 0x1f6f, 0x1f60), CASEMAP(0x1f88, 0x1f8f, 0x1f80),
CASEMAP(0x1f98, 0x1f9f, 0x1f90), CASEMAP(0x1fa8, 0x1faf, 0x1fa0),
CASEMAP(0x1fb8, 0x1fb9, 0x1fb0), CASEMAP(0x1fba, 0x1fbb, 0x1f70),
CASEMAP(0x1fc8, 0x1fcb, 0x1f72), CASEMAP(0x1fd8, 0x1fd9, 0x1fd0),
CASEMAP(0x1fda, 0x1fdb, 0x1f76), CASEMAP(0x1fe8, 0x1fe9, 0x1fe0),
CASEMAP(0x1fea, 0x1feb, 0x1f7a), CASEMAP(0x1ff8, 0x1ff9, 0x1f78),
CASEMAP(0x1ffa, 0x1ffb, 0x1f7c),
CASELACE(0x246, 0x24e), CASELACE(0x510, 0x512),
CASEMAP(0x2160, 0x216f, 0x2170), CASEMAP(0x2c00, 0x2c2e, 0x2c30),
CASELACE(0x2c67, 0x2c6b), CASELACE(0x2c80, 0x2ce2),
CASELACE(0x2ceb, 0x2ced),
CASELACE(0xa640, 0xa66c), CASELACE(0xa680, 0xa696),
CASELACE(0xa722, 0xa72e), CASELACE(0xa732, 0xa76e),
CASELACE(0xa779, 0xa77b), CASELACE(0xa77e, 0xa786),
CASELACE(0xa790, 0xa792), CASELACE(0xa7a0, 0xa7a8),
CASEMAP(0xff21, 0xff3a, 0xff41), {0, 0, 0}};
static const unsigned short pairs[][2] = {{'I', 0x0131},
{'S', 0x017f},
{0x0130, 'i'},
{0x0178, 0x00ff},
{0x0181, 0x0253},
{0x0182, 0x0183},
{0x0184, 0x0185},
{0x0186, 0x0254},
{0x0187, 0x0188},
{0x0189, 0x0256},
{0x018a, 0x0257},
{0x018b, 0x018c},
{0x018e, 0x01dd},
{0x018f, 0x0259},
{0x0190, 0x025b},
{0x0191, 0x0192},
{0x0193, 0x0260},
{0x0194, 0x0263},
{0x0196, 0x0269},
{0x0197, 0x0268},
{0x0198, 0x0199},
{0x019c, 0x026f},
{0x019d, 0x0272},
{0x019f, 0x0275},
{0x01a6, 0x0280},
{0x01a7, 0x01a8},
{0x01a9, 0x0283},
{0x01ac, 0x01ad},
{0x01ae, 0x0288},
{0x01af, 0x01b0},
{0x01b1, 0x028a},
{0x01b2, 0x028b},
{0x01b7, 0x0292},
{0x01b8, 0x01b9},
{0x01bc, 0x01bd},
{0x01c4, 0x01c6},
{0x01c4, 0x01c5},
{0x01c5, 0x01c6},
{0x01c7, 0x01c9},
{0x01c7, 0x01c8},
{0x01c8, 0x01c9},
{0x01ca, 0x01cc},
{0x01ca, 0x01cb},
{0x01cb, 0x01cc},
{0x01f1, 0x01f3},
{0x01f1, 0x01f2},
{0x01f2, 0x01f3},
{0x01f4, 0x01f5},
{0x01f6, 0x0195},
{0x01f7, 0x01bf},
{0x0220, 0x019e},
{0x0386, 0x03ac},
{0x0388, 0x03ad},
{0x0389, 0x03ae},
{0x038a, 0x03af},
{0x038c, 0x03cc},
{0x038e, 0x03cd},
{0x038f, 0x03ce},
{0x0399, 0x0345},
{0x0399, 0x1fbe},
{0x03a3, 0x03c2},
{0x03f7, 0x03f8},
{0x03fa, 0x03fb},
{0x1e60, 0x1e9b},
{0x1e9e, 0xdf},
{0x1f59, 0x1f51},
{0x1f5b, 0x1f53},
{0x1f5d, 0x1f55},
{0x1f5f, 0x1f57},
{0x1fbc, 0x1fb3},
{0x1fcc, 0x1fc3},
{0x1fec, 0x1fe5},
{0x1ffc, 0x1ff3},
{0x23a, 0x2c65},
{0x23b, 0x23c},
{0x23d, 0x19a},
{0x23e, 0x2c66},
{0x241, 0x242},
{0x243, 0x180},
{0x244, 0x289},
{0x245, 0x28c},
{0x3f4, 0x3b8},
{0x3f9, 0x3f2},
{0x3fd, 0x37b},
{0x3fe, 0x37c},
{0x3ff, 0x37d},
{0x4c0, 0x4cf},
{0x2126, 0x3c9},
{0x212a, 'k'},
{0x212b, 0xe5},
{0x2132, 0x214e},
{0x2183, 0x2184},
{0x2c60, 0x2c61},
{0x2c62, 0x26b},
{0x2c63, 0x1d7d},
{0x2c64, 0x27d},
{0x2c6d, 0x251},
{0x2c6e, 0x271},
{0x2c6f, 0x250},
{0x2c70, 0x252},
{0x2c72, 0x2c73},
{0x2c75, 0x2c76},
{0x2c7e, 0x23f},
{0x2c7f, 0x240},
{0x2cf2, 0x2cf3},
{0xa77d, 0x1d79},
{0xa78b, 0xa78c},
{0xa78d, 0x265},
{0xa7aa, 0x266},
{0x10c7, 0x2d27},
{0x10cd, 0x2d2d},
/* bogus greek 'symbol' letters */
{0x376, 0x377},
{0x39c, 0xb5},
{0x392, 0x3d0},
{0x398, 0x3d1},
{0x3a6, 0x3d5},
{0x3a0, 0x3d6},
{0x39a, 0x3f0},
{0x3a1, 0x3f1},
{0x395, 0x3f5},
{0x3cf, 0x3d7},
{0, 0}};
static wchar_t __towcase(wchar_t wc, int lower) {
int i;
int lmul = 2 * lower - 1;
int lmask = lower - 1;
/* no letters with case in these large ranges */
if (!iswalpha(wc) || (unsigned)wc - 0x0600 <= 0x0fff - 0x0600 ||
(unsigned)wc - 0x2e00 <= 0xa63f - 0x2e00 || (unsigned)wc - 0xa800 <= 0xfeff - 0xa800)
return wc;
/* special case because the diff between upper/lower is too big */
if (lower && (unsigned)wc - 0x10a0 < 0x2e) {
if (wc > 0x10c5 && wc != 0x10c7 && wc != 0x10cd)
return wc;
else
return wc + 0x2d00 - 0x10a0;
}
if (!lower && (unsigned)wc - 0x2d00 < 0x26) {
if (wc > 0x2d25 && wc != 0x2d27 && wc != 0x2d2d)
return wc;
else
return wc + 0x10a0 - 0x2d00;
}
for (i = 0; casemaps[i].len; i++) {
int base = casemaps[i].upper + (lmask & casemaps[i].lower);
if ((unsigned)wc - base < casemaps[i].len) {
if (casemaps[i].lower == 1)
return wc + lower - ((wc - casemaps[i].upper) & 1);
return wc + lmul * casemaps[i].lower;
}
}
for (i = 0; pairs[i][1 - lower]; i++) {
if (pairs[i][1 - lower] == wc)
return pairs[i][lower];
}
if ((unsigned)wc - (0x10428 - 0x28 * lower) < 0x28)
return wc - 0x28 + 0x50 * lower;
return wc;
}
wint_t towupper(wint_t wc) { return __towcase(wc, 0); }
wint_t towlower(wint_t wc) { return __towcase(wc, 1); }
|
the_stack_data/80680.c
|
#include <math.h>
void Tags(T, q)
double T[24];
double q[7];
{
double t1;
double t10;
double t11;
double t14;
double t16;
double t18;
double t19;
double t2;
double t20;
double t21;
double t24;
double t25;
double t26;
double t27;
double t29;
double t3;
double t30;
double t33;
double t35;
double t37;
double t39;
double t4;
double t43;
double t49;
double t51;
double t58;
double t6;
double t62;
double t65;
double t7;
double t72;
double t73;
double t8;
{
T[0] = 0.0;
T[1] = 0.0;
t1 = q[0];
t2 = cos(t1);
t3 = q[1];
t4 = sin(t3);
T[2] = 0.45 * t2 * t4;
T[3] = T[2];
t6 = cos(t3);
t7 = q[2];
t8 = cos(t7);
t10 = q[3];
t11 = sin(t10);
t14 = cos(t10);
t16 = -0.45 - 0.48 * t14;
t18 = 0.48 * t6 * t8 * t11 - t4 * t16;
t19 = t2 * t18;
t20 = sin(t1);
t21 = sin(t7);
t24 = 0.48 * t20 * t21 * t11;
// t25 = &*(t,tag_5);
t25 = 0;
T[4] = t19 - t24 + t25;
T[5] = t19 - t24;
T[6] = T[5];
t26 = q[4];
t27 = cos(t26);
t29 = q[5];
t30 = sin(t29);
t33 = cos(t29);
t35 = -0.276576E1 - 0.11004 * t33;
t37 = 0.11004 * t14 * t27 * t30 - t11 * t35;
t39 = sin(t26);
t43 = t8 * t37 - 0.11004 * t21 * t39 * t30;
t49 = -0.67391E1 + 0.11004 * t11 * t27 * t30 + t14 * t35;
t51 = t6 * t43 - t4 * t49;
t58 = t21 * t37 + 0.11004 * t8 * t39 * t30;
T[7] = 0.3684598379E-1 * t2 * t51 - 0.3684598379E-1 * t20 * t58;
T[8] = 0.0;
T[9] = 0.0;
T[10] = 0.45 * t20 * t4;
T[11] = T[10];
t62 = t20 * t18;
t65 = 0.48 * t2 * t21 * t11;
T[12] = t62 + t65 + t25;
T[13] = t62 + t65;
T[14] = T[13];
T[15] = 0.3684598379E-1 * t20 * t51 + 0.3684598379E-1 * t2 * t58;
T[16] = 0.0;
T[17] = 0.0;
T[18] = 0.45 * t6;
T[19] = T[18];
t72 = 0.48 * t4 * t8 * t11;
t73 = t6 * t16;
T[20] = -t72 - t73 + t25;
T[21] = -t72 - t73;
T[22] = T[21];
T[23] = -0.3397199705E-2 - 0.3684598379E-1 * t4 * t43 - 0.3684598379E-1 * t6 * t49;
return;
}
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.